	/** 
* CSS-таблица стилей
*
* @package		Sparky
* @author		Dmitry Karev (https://karev.ca/)
*/
@import url('sparky.css');

input {
	font-family: var(--sparky-font-family);
}

/* COMMON STYLES */
.align-right{
	text-align:right;
}
.colspan-4 {
	grid-column: span 4;
}

/* MESSAGING */
.messageBox {
	border: 1px solid var(--sparky-color-3);
	border-radius: 5px;
	display: none;
    position: absolute;
    top: 55px;
    left: -5px;
    z-index: 10000;
}
.message {
	align-content: center;
    background: #00284a9e;
	border: 4px solid white;
	border-radius: 5px;
    color: white;
	display: flex;
    flex-wrap: wrap;
	height: 80px;
    padding: 20px;
    width: 340px;
}
.msgIcon {
	margin-right: 10px;
}
.msgIcon i {
	font-size: 25px;
}

.msgSuccess { background: #00284a9e; }
.msgError 	{ background: #87000066; }
.msgWarning { background: #ba8d02d4; }

.msgText {
    align-items: center;
	display: flex;
	font-size: 13px;
}


/* HEADER */
header {
	background: var(--sparky-color-header-bg);
    border-bottom: 0.5px solid var(--sparky-body-bg-dark);
    box-shadow: 0 2px 7px rgba(0,0,0,0.1);
	color: white;
	height: 44px;
}
.header-content {
	align-items: center;
	display: flex;
	flex-direction: row;
	font-family: var(--sparky-font-headers);
	height:100%;
	margin: 0 auto;
	padding: 0 5px;
    transition: opacity 1s ease; /* плавное исчезновение */
	transition-duration: 1s;
}

.logo-image {
    border-radius: 0;
    height: 30px;
    margin: 0;
    max-width: 30px;
	padding: 0;
    width: 30px;
}
.logo-section {
	display: flex;
    padding: 0;
    text-align: left;
	width: 200px;
}
.logo-section .app {
	color: #555;
	font-family: var(--sparky-font-headers);
    font-size: 13px;
    font-weight: 600;
	padding: 7px 10px;
}	
.logo-section h1 {
    font-size: 2.5em;
    margin-bottom: 10px;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.2);
}
.logo-section p {
    font-size: 1.1em;
    opacity: 0.9;
}

.nav-horiz {
 	display: flex;
	font-family: var(--sparky-font-headers);
	font-size: 12px;
	margin-right:auto;
    position: relative;
	z-index: 99999;
}
.nav-menu {
    display: flex;
    list-style: none;
	font-size: var(--sparky-mainmenu-font-size);
    gap: 0;
}
.nav-menu li a {
    display: block;
    color: #333;
    text-decoration: none;
    padding: 15px 25px;
    transition: background 0.4s;
    font-weight: 500;
}
.nav-menu li a:hover {
    background: var(--sparky-body-bg-light);
}
.nav-menu li a.active {
    background: rgba(255, 255, 255, 0.15);
    border-bottom: 4px solid #60a5fa;
}
.nav-menu li a,

.submenu li a {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px; /* небольшое расстояние */
}

/* Название пункта меню */
.menu-title {
    flex-grow: 1;
}
.menu-hotkey {
    font-size: 0.9em;
    opacity: 0.7;
    white-space: nowrap; /* чтобы не переносился */
    margin-left: 15px;
}
.userinfo-container {
	align-items: center;
	color: #000;
	display: flex;
	flex-direction: row;
	padding: 0 10px;
    text-align: right;
    width: 300px;	
}



/* MAIN MENU */
.dropdown {
    position: relative;
}
.dropdown:hover .submenu,
.dropdown.active .submenu {
    display: block;
}

.menu-title i {
	margin-right: 10px;
}

.submenu {
    background: var(--sparky-color-header-bg);
    box-shadow: 0 3px 5px rgba(0,0,0,0.2);
	display: none;
    left: 0;
    list-style: none;
    min-width: 200px;
    position: absolute;
    top: 100%;
    z-index: 1000;
	
	/* transform: translateY(5px); */
	transition: 
    opacity 0.4s ease,
    transform 0.4s ease,
    visibility 0s linear 0.4s; /* <-- задержка скрытия */	
}
.submenu li {
	border: none;
}
.submenu li a {
    border-bottom: 0.5px solid rgba(255, 255, 255, 0.1);
    padding: 8px 17px;
	text-align: left;
}
.submenu li:last-child a {
    border-bottom: none;
}

span.divider {
	border-bottom: 0.7px solid var(--sparky-blue);
    height: 1px;
    display: block;
}


/* User menu */
.mode-switch-label {
	display: flex;
	justify-content: space-between;
	align-items: center;
	padding: 6px 17px;
}

.ios-switch {
	position: relative;
	display: inline-block;
	width: 40px;
	height: 24px;
}
.ios-switch input {
	opacity: 0;
	width: 0;
	height: 0;
}

.slider {
	position: absolute;
	cursor: pointer;
	top: 0;
	left: 0;
	right: 0;
	bottom: 0;
	background-color: #ccc;
	transition: .3s;
	border-radius: 34px;
}
.slider:before {
	position: absolute;
	content: "";
	height: 18px;
	width: 18px;
	left: 3px;
	bottom: 3px;
	background-color: white;
	transition: .3s;
	border-radius: 50%;
}

input:checked + .slider {
	background-color: #4cd964;
}
input:checked + .slider:before {
	transform: translateX(16px);
}


/* PROGRESS BAR */
.pb-container {
	align-content: center;
    align-items: center;
	display: flex;
    flex-direction: row;
	height: 30px;
	width: 300px;
}
.progress-bar {
	align-items: center;
    box-shadow: inset 0 1px 3px rgba(0,0,0,0.1);
    background-color: #f1f3f5;
    border-radius: 8px;
	display: flex;
    flex-direction: row;
    height: 16px;
    /* overflow: hidden; */
    overflow: visible; /* важно */
    position: relative;
    width: 100%;
}
.progress-color {
    align-items: center;
    background: linear-gradient(90deg, #4ade80, #22c55e);
    border-radius: 8px;
	color: white;
    display: flex;
    font-weight: bold;
    height: 100%;
    justify-content: center;
    transition: width 1s ease-in-out;
    width: 0%;
}

.progress-text {
	align-items: center;
	background: var(--sparky-color-header-bg);
    border: 1px solid #22c55e;
    border-radius: 50%;
    color: #444;
	display: flex;
	font-size: 12px;
    height: 30px;
	justify-content: center;
	margin-left:-8px;
    padding: 3px;
    pointer-events: none;
	width: 30px;
}
.pb-container .level {
	display:none;
	height:30px;
	width:auto;
	padding-left:15px;
}
.pb-container .level img {
	height:24px;
	width:24px;
}


/* SHARE LINK */
.share {
    margin: auto;
    text-align: center;
}
.share a {
    align-items: center;
	/* color: var(--sparky-color-2); */
    display: flex;
    font-weight: 500;
	text-align: center;
    text-decoration: none;
}

.tooltip {
    position: relative; /* обязательно для позиционирования подсказки */
    display: inline-block; /* можно блок или инлайн-блок */
    cursor: pointer;
    padding: 5px 10px;
    background-color: #4ade80;
    color: #fff;
    border-radius: 4px;
    font-weight: 500;
}
.tooltip .tooltip-text {
    visibility: hidden; /* скрыта по умолчанию */
    width: max-content;
    max-width: 200px;
    background-color: #111;
    color: #fff;
    text-align: center;
    padding: 6px 8px;
    border-radius: 6px;
    position: absolute;
    z-index: 10;
    bottom: 125%; /* над элементом */
    left: 50%;
    transform: translateX(-50%);
    opacity: 0;
    transition: opacity 0.3s;
    pointer-events: none;
}
.tooltip:hover .tooltip-text {
    visibility: visible;
    opacity: 1;
}



/* РАБОЧЕЕ ОКНО ПРИЛОЖЕНИЯ */
main {
    margin: 0 auto;
	background-color: var(--sparky-color-white);
	display:flex;
	flex:1;
	flex-direction:row;
	height: calc(100vh - 70px);
	min-width:0;
	overflow: hidden;
	transition: height 1s ease; /* плавное изменение высоты */
}
main.login {
	background-image: url(/assets/images/sparky600.png);
    /* background-repeat: no-repeat; */
    background-position: center;
	height: 100vh;
}

#workspace {
	flex: 1 1 auto;
	min-width: 0;
	height: 100%;
	overflow: hidden;
	position: relative;
}

.icon {
    /* margin-right: 0.5rem; */
	width: 1.75rem;
}

.hidden {
	opacity: 0;
	pointer-events: none;
}

/* LOADER */
.loader {
	align-items: center;
	color: #666;
	display: flex;
	flex-direction: column;
	height: 200px;
	justify-content: center;
	margin: auto;
}
.spinner {
	animation: spin 1s linear infinite;
	border: 4px solid #f3f3f3;
	border-top: 4px solid #3498db;
	border-radius: 50%;
	height: 40px;
	margin-bottom: 10px;
	width: 40px;
}
@keyframes spin {
	0% { transform: rotate(0deg); }
	100% { transform: rotate(360deg); }
}


.tabs {
	display: flex;
	border-bottom: 3px solid var(--sparky-blue-30);
	margin-bottom: 10px;
}
.tab {
    background: var(--sparky-body-bg-light);
    border: 1px solid var(--sparky-blue);
    border-bottom: none;
    border-radius: 5px 0 0 0;
    cursor: pointer;
    font-family: var(--sparky-font-family);
    font-size: var(--sparky-font-size);
    margin-right: -3px;
    padding: 5px 30px;
}
.tab.active {
	background: white;
	font-weight: bold;
	/* border-bottom: 2px solid white; */
}


.confirm-overlay {
    align-items: center;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    inset: 0;
    justify-content: center;
    position: fixed;
    z-index: 99999;
}
.confirm-modal {
    background: #fff;
	border: 2px solid var(--sparky-color-2);
    border-radius: 5px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
    min-width: 300px;
    max-width: 420px;
    padding: 20px;
}
.confirm-message {
    margin-bottom: 15px;
    /* color: #333; */
}
.confirm-buttons {
    display: flex;
    justify-content: center;
    gap: 10px;
}

.confirm-buttons button {
    padding: 6px 12px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
	width: 70px;
}

/* SPARKY MAN */
.sparkyman{
	align-items: flex-end;
    bottom:40%;
    /* display:flex; */
	display: none;
    gap:20px;
    left:65%;
    opacity:0;
    pointer-events:none;
    position:fixed;
    transform:translateX(-50%);
    transition:opacity .5s;
    width:70%;
    z-index:9999;
}
.sparkyman-character{
    width:140px;
    flex-shrink:0;
}
.sparkyman-character img{
    width:100%;
    height:auto;
}
.sparkyman-cloud{
    background:white;
    border-radius:18px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.15);
    margin-bottom: 150px;
    max-width:600px;
    padding:18px 22px;
    pointer-events:auto;
    position:relative;
}
.sparkyman.show{
	cursor: pointer;
	display: flex;
    opacity:1;
}
.sparkyman-text p, .sparkyman-text strong {
    line-height: 1.35;
	padding: 10px 0;
    font-size: 16px;
}


/* LOGIN FORM */
.login-container sup {
	padding-right: 3px;
	text-transform: uppercase;
}
#loginForm {
    background: var(--sparky-body-bg-light);
    min-width: 400px;
    max-width: 90vw;
    max-height: 90vh;
    overflow: auto;
    padding: 30px 35px;
}
#loginForm .control-group {
	display:flex;
	height: 30px;
}
#loginForm .control-label {
	align-items: center;
    display: flex;
	width: 100px;
}
#loginForm .controls {
	min-width: 175px;
}
#loginForm input {
	padding: 3px 5px;
    font-size: 15px;
	width: 225px;
}


.win-close {
	background: var(--sparky-red);
    color: white;
    border: none;
    cursor: pointer;
    font-size: 18px;
    padding: 0px 10px;
    margin-top: -8px;
}
.btn-help {
	background: transparent;
    border: none;
    color: #eee;
    cursor: pointer;
    font-size: 14px;
    margin-top: -8px;
    margin-left: auto;
    margin-right: 0;
    margin-right: 0;
    padding: 2px 10px;
}
.btn-help:hover {
	color: #fff;
}

.load-error {
    color: var(--sparky-color-accent-2);
    font-family: var(--sparky-font-headers);
    font-weight: 400;
    height: 100%;
    margin: 40px;
    padding: 10px;
    text-align: center;
}
.login-container {
    position: fixed;
    inset: 0;
    display: flex;
	flex-direction: column;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.1);
    z-index: 9999;
	
	.form-header {
        background-image: url(/assets/images/login_bg.jpg);
        background-size: cover;
        height: 225px;
        padding: 0;
        width: 400px;
    }
	
	.shadow {
		box-shadow: 0 0 10px rgba(0, 0, 0, 0.4);
	}
}

.window {
	background: linear-gradient(180deg,#fff,#f8f8f8);
	/* background: #fff; */
	/* border: 0.5px outset; */
	border: 2px solid var(--sparky-color-2);
	border-radius: 5px;
	box-shadow: 0 3px 8px rgba(0,0,0,0.15);
	display:flex;
	flex-direction:column;
	max-height: 100%;
	max-width:1400px;
	min-height: 200px;
	overflow: hidden;
	position: absolute;
	resize: both;
	touch-action: none;
	user-select: none;
}
.window:focus-visible {
	outline: var(--sparky-color-2);
}
.window.active {
	
	border: 2px solid var(--sparky-color-2);
	
	.window-header {
		background: var(--sparky-color-2);
		color: #fff;
		font-family: var(--sparky-font-headers);
	}
}
.window.inactive {
	/* opacity: 0.3; */
	color: #ddd;
    border: 2px solid;
	
	.data-table td {
		border-bottom: 0.5px solid var(--sparky-body-bg-dark);
		border-right: 2px double var(--sparky-body-bg-dark);
		text-overflow: inherit;
	}
	.data-table .selected {
		background-color: var(--sparky-selection-inactive) !important;
	}
}
.window-header {
	align-items: center;
	background: var(--sparky-blue-70);
	border-bottom: 0.5px solid var(--sparky-body-bg-dark);
	cursor:grab;
	display: flex; 
	font-weight:500;
	height:30px;
	justify-content: space-between; 
	min-height: 30px;
	padding:0 12px;
	user-select: none;
}
.window-content {
	background: #fff;
	display: contents;
	max-height: calc(100% - 35px);
	padding: 0px; 
	overflow: auto;
}
.window-content-inner {
	padding:15px;
}


/* SIDEBAR */
.resizer {
	background:var(--sparky-body-bg-dark);
    height: 100%;
    cursor: col-resize;
	height:100%;
	position: absolute;
	right:0;
	top: 0;
    width: 1px;
    z-index: 10;
}
.resizer:hover { 
	background:var(--sparky-blue);
}

.sidebar {
	background: var(--sparky-color-header-bg);
	display:flex;
	flex-direction:column;
	flex: 0 0 auto;      /* ВАЖНО */
	max-width: var(--sidebar-max);
	min-width: var(--sidebar-min);
	overflow: hidden;
	position: relative;
	width: var(--sidebar-init);
}
.sidebar.collapsed {
	width: 0;
	min-width: 0;
	flex: 0 0 0;
}
.sidebar.collapsed .group-header { justify-content:center; }
.sidebar.left {
	background: var(--sparky-color-xlight);
    border-right: 0.5px solid var(--sparky-color-4);
}
.sidebar.left .resizer {
    right: 0;
}
.sidebar.right {
    /* border-left: 1px solid var(--sparky-color-lt-grey); */
}
.sidebar.right .resizer {
    left: 0;
}

.toggle-btn {
	align-items:center;
	background:transparent;
	border:none;
    color: var(--sparky-color-lt-grey);
	cursor:pointer;
	display:inline-flex;
    /* margin: 0 4px; */
	padding-right: 5px;
	/* padding-bottom: 3px; */
	width: 35px;
}
.toggle-btn:hover {
	color: var(--sparky-blue);
}
.toggle-btn i {
	font-size: 16px;
	font-weight: 400;
}

.left-closed {display: none;}
.toggle-btn.left.collapsed .left-closed {display: inline;}
.toggle-btn.left.collapsed .left-opened {display: none;}

.right-closed {display: none;}
.toggle-btn.right.collapsed .right-closed {display: inline;}
.toggle-btn.right.collapsed .right-opened {display: none;}


/* Сворачивание пунктов вертикального меню — иконка */
.chev {transition:transform 0.2s ease;}
.chev.rotated { transform:rotate(90deg) }

/* Сворачивание пунктов help */
.group-toggle svg {transition: transform 0.2s ease;}



/* ПАНЕЛЬ НАВИГАЦИИ (Sidebar МЕНЮ) */
.app-mode span {
    align-items: center;
	display: flex;
	/* font-family: var(--sparky-font-headers); */
}
.app-mode .menu-item:hover { 
	background: transparent;
}
.app-mode i {
	font-size: 14px;
    line-height: 1.25;
	padding-right: 5px;
    width: 24px;    
}

.group-children {
	max-height: 9999px;
	padding-left:35px;
	transition: max-height .22s ease, opacity .18s ease, padding .18s ease;
}
.group-children.collapsed {
	max-height:0;
	opacity:0;
	padding:0 8px;
}
.group-children i { 
	/* padding-right: 5px; */
	width: 30px;
}
.group-header {
    align-items: center;
    display: flex;
    cursor: pointer;
    padding: 5px;
    gap: var(--gap);
    font-weight: 600;
    user-select: none;
}
.group-header:hover { 
	color: var(--sparky-color-accent-2);
}
.group-title { 
	align-items:center;
    color: inherit;
	display:flex;
	flex: 1;
    font-family: var(--sparky-font-family);
    font-size: 12px;
	font-weight: 400;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.group-toggle {
	align-items:center;
	background:transparent;
	border:0;
	display:inline-flex;
	height:24px;
	justify-content:center;
	width:16px;
}

.hmenu-hotkey {
    font-size: 0.9em;
    margin-left: auto;
    opacity: 0.7;
    white-space: nowrap;
}

.menu-divider {
    border-bottom: 1px solid #ccc;
    height: 1px;
    display: block;
    width: 120px;
    margin: 5px 0;
	margin-left: 8px;
}
.menu-group {
	margin-bottom:5px;
	overflow:hidden;
}
.menu-group .group-toggle svg {
    transition: transform 0.2s ease;
}
.menu-group.collapsed .group-children {
    display: none;
}
.menu-group:not(.collapsed) .group-toggle svg {
    transform: rotate(90deg);
}
.menu-item {
	align-items:center;
	color:inherit;
	cursor:pointer;
	display:flex;
	font-size: var(--sparky-font-size);
	gap:var(--gap);
	padding:5px;
	text-decoration:none;
}
.menu-item:focus {
	outline:none;
}
.menu-item:hover { 
	background: var(--sparky-body-bg);
    color: var(--sparky-color-accent-2);
}
.menu-item.add-new {
	font-style: italic;
    color: var(--sparky-color-accent-2);
    font-weight: 600;
}

.nav-vert {
	color: var(--sparky-color-2);
	height: -webkit-fill-available;
	overflow:auto;
	padding:10px;
}


/* СПРАВОЧНАЯ СИСТЕМА */
.help-body {
	line-height: 1.55;
	padding: 5px 10px;
}
.help-body h1 {
    font-size: 13px;
    font-family: var(--sparky-font-family);
    padding-bottom: 10px;
}
.help-body td {
	padding: 3px;
	vertical-align: baseline;
}
.help-body ul {
	padding-left: 15px;
}
.help-body code {
	color: var(--sparky-blue);
    font-weight: 600;
    font-size: 13px;
}
.help-boby p {
	padding: 5px 0;
}
.help-content {
	flex: 1;
	flex-direction: column;
    height: auto;
    overflow-y: auto;
    width: -webkit-fill-available;
}
.help-content li {
	line-height: 1.35;
	padding-top:5px;
}
.help-title {
    background-color: var(--sparky-body-bg-light);
    color: #555;
    font-family: var(--sparky-font-headers);
    font-size: var(--sparky-font-size-h3);
    font-weight: 600;
    padding: 10px;
}
.help-tree {
    border-bottom: 1px solid var(--sparky-color-lt-grey);
    display: flex;
	flex-direction: column;
    height: 350px;
	overflow-x: auto;
    padding: 5px 10px;
	width: -webkit-fill-available;
}
.help-tree .group-children {
    max-height: 9999px;
    padding-left: 24px;
    transition: max-height .22s ease, opacity .18s ease, padding .18s ease;
}
.help-tree .group-header {
	align-items: center;
    display: flex;
    cursor: pointer;
    padding: 0;
    gap: var(--gap);
    font-weight: 600;
    user-select: none;
}
.help-tree .group-title svg {
	padding-right: 5px;
    height: 30px;
}
.help-tree .menu-group {
	margin:0;
    overflow: auto;
	width: -webkit-fill-available;
}
.help-tree .menu-group.collapsed > .group-header .group-toggle svg {transform: rotate(0deg);}
.help-tree .menu-group:not(.collapsed) > .group-header .group-toggle svg {transform: rotate(90deg);}
.help-tree li {
    cursor: pointer;
    padding: 0 10px;
	user-select: none;
}
.help-tree-item {
    cursor: pointer;
}
.help-tree .tree-item {
    align-items: center;
	display: flex;
    gap: 10px;
    padding: 3px 5px;
}
.help-tree li.active > .tree-item {
	color: var(--sparky-color-accent-2);
    font-weight: 600;
}
.help-tree svg.icon {
    width: 18px;
    height: 18px;
}
.help-tree ul {
    list-style: none;
}
.help-window {
    display: flex;
    height: 100%;
    flex-direction: column;
}
.help-window h3 {
	background-color: var(--sparky-body-bg-light);
	margin-top: 10px;
    margin-bottom: 5px;
    padding: 5px;
}



/* TOOLBAR */
.btn-toolbar, .report-form button {
    align-content: center;
    background: transparent;
    border: 2px solid transparent;
	border-radius: 15px;
    color: inherit;
    cursor: pointer;
	display: flex;
    flex-wrap: wrap;
	font-size: inherit;
	height: 29px;
    justify-content: center;
	min-width: 29px;
	padding: 0 5px;
    transition: background-color 0.2s;
}
.btn-toolbar:hover, .report-form button:hover {
    color: #000;
	border: 2px solid var(--sparky-color-accent-2);
    background: #fff;
}
.btn-toolbar.btn-spacer {
    border-right: 0.7px solid var(--sparky-blue-30);
    border-radius: 0;
	cursor: default;
    opacity: 1;
    padding: 0;
    padding-left: 0;
    pointer-events: none;
	margin-left: -23px;
    margin-right: 5px;
}

.btn-disabled, .btn-disabled:hover {
	color: var(--sparky-color-3);
}


.toolbar, .dateRangeSelector {
	align-content: center;
	background: var(--sparky-body-bg-light);
	border-bottom: 0.5px solid var(--sparky-body-bg-dark);
	display: flex;
    flex-wrap: wrap;
    gap: 0;
	height: 33px;
    width: 100%;	
}

.toolbar {
	[class^="btn-"],
	[class*=" btn-"] {
		align-content: center;
		
		i {
			margin:0;
		}
	}
}

.dateRangeSelector {
    align-items: center;
	display:none;
	display: none;
    flex-direction: row;
    gap: 5px;
	padding: 5px 0;
}
.dateRangeSelector form {
    display: flex;
    gap: 5px;
    align-items: center;
    padding: 0 5px;
}

/* ФОРМА НАСТРОЕК БД */
.db-status {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 15px;
    background: #f3f4f6;
    border-radius: 8px;
    margin-bottom: 25px;
    font-weight: 500;
}
.status-indicator {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #9ca3af;
    animation: pulse 2s infinite;
}
.status-indicator.connected {
    background: #10b981;
}
.status-indicator.error {
    background: #ef4444;
}
@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}
.form-group {
    margin-bottom: 20px;
}
.form-group label {
    display: block;
    margin-bottom: 8px;
    color: #374151;
    font-weight: 500;
}
.form-group input {
    width: 100%;
    padding: 12px;
    border: 0.5px solid #d1d5db;
    border-radius: 6px;
    transition: border-color 0.3s;
}
.form-group input:focus {
    outline: none;
    border-color: var(--sparky-color-accent-2);
    box-shadow: 0 0 0 3px rgba(30, 64, 175, 0.1);
}
.form-actions {
    display: flex;
    gap: 15px;
    margin-top: 30px;
}


/* BUTTONS */
a.btn {
    text-decoration: none;
    color: black;
}
a.btn:hover {
    color: #fff;
}	
a.btn.call-button, a.btn.map-button {
    background: var(--sparky-body-bg);
    padding: 5px 5px;
}

.btn {
    border: 0.5px solid var(--sparky-blue);
    border-radius: 3px;
    cursor: pointer;
    font-size: var(--sparky-btn-font-size);
    font-weight: 500;
	padding: 7px;
    transition: all 0.3s;
}
.btn.blind {
	border: none;
    background: transparent;
    padding: 0 14px 0 14px;
}
.btn.blind:hover {
	background-color: var(--sparky-btn-hover);
	border-radius: 20px;
	color: var(--sparky-blue);
	background-color: var(--sparky-color-accent-2);
	color: #fff;
	/* padding: 0 5px 0 10px; */
}
.btn:hover {
	background: var(--sparky-blue);
    color: #fff;
}

.btn.primary {
    color: var(--sparky-color-1);
    border: 2px solid var(--sparky-color-accent-1);
    background: #fff;
    font-weight: 500;
    border-radius: 15px;
}
.btn.primary:hover {
    background: var(--sparky-color-accent-1);
    color: white;
}
.btn.primary:focus-visible {
	outline: var(--sparky-color-accent-1);
}

.btn.secondary {
	color: var(--sparky-color-1);
    border: 1px solid var(--sparky-color-2);
    background: var(--sparky-body-bg-light);
    border-radius: 15px;
}
.btn.secondary:hover {
	background: var(--sparky-blue);
    color: white;
}
.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.btn-primary {
	color: #000;
	border: 2px solid var(--sparky-color-accent-2);
    background: #fff;
}
.btn-primary:hover {
	background: var(--sparky-color-accent-2);
	border: 2px solid #fff;
	color: #fff;
}
	
.icon-btn {
	background: transparent;
	border: none;
}

#loginForm .btn i {
	margin-right: 5px;
}


/* ФОРМА СПИСКА */
.docTable {
	overflow-y: auto;
	border-top: none;
	height: 100%;
}
.data-table, .data-table-hd {
	border-collapse: collapse;
	border:none;
	border-right: 0.5px solid var(--sparky-blue-70);
    border-left: 0.5px solid var(--sparky-blue-70);
	border-spacing: 0;
	table-layout: fixed;
	width: 100%;
}
.data-table-hd thead {
	background-color: var(--sparky-color-xlight);
    border-bottom: 0.5px solid #ccc;
	border-spacing: 0;
	position: sticky;
    text-align: left;
	top: 0;
	width: -webkit-fill-available;
	z-index: 2;
}
.data-table-hd thead th {
	padding: 5px 5px;
}
.data-table-hd th.symbol, .data-table tbody td.symbol {
	width: 28px;
}
.data-table .deleted {
	background: var(--sparky-deleted);
	text-decoration: line-through;
}
.data-table .selected {
	
	background-color: var(--sparky-selection) !important;
	
	.deleted {
		background-color: var(--sparky-deleted);
		text-decoration: line-through;		
	}
}
.data-table tr:hover {
	background-color: #f1f1f1;
}
.data-table tr.input-line {
	td {
		padding: 0;
		white-space: nowrap;
	}
	
	input {
		border: none;
		padding: 5px 7px;		
	}
	input.hidden {padding:0;}
	input.amount.readonly {
		background: var(--sparky-body-bg-light);
	}
}
.data-table td {
	border-bottom: 0.5px solid var(--sparky-body-bg-dark);
	border-right: 2px double var(--sparky-color-2);
	padding: 5px;
	height: 24px;
    overflow: hidden;
    text-overflow: ellipsis;
	vertical-align: baseline;
	white-space: nowrap;
}
.data-table tr.nav {
	background: var(--sparky-color-4);
    border-bottom: 2px double var(--sparky-color-2);
	color: var(--sparky-color-2);
    font-weight: 600;
}
.data-table td.symbol {
    background: var(--sparky-color-xlight);
	border-right: 0.5px solid var(--sparky-body-bg-dark);	
    color: var(--sparky-color-2);
    padding: 5px;
    text-align: center;
	text-overflow: clip;
}
.data-table .docStatus {
	color: #333;
}

.table-controls {
    display: flex;
    gap: 15px;
    margin-bottom: 20px;
    align-items: center;
}
.table-controls input {
    flex: 1;
    padding: 10px;
    border: 0.5px solid #d1d5db;
    border-radius: 6px;
    font-size: 14px;
}
.table-controls input:focus {
    outline: none;
    border-color: var(--sparky-color-accent-2);
}


/* ФОРМА КАРТОЧКИ - CARD */
.doc-main {
    display: flex;
    position: relative;
    width: 100%;
}
	.docDate {
		font-family: var(--sparky-font-family);
		padding:5px;
		width: 115px;
	}
	.docDate-label, .docNumber-label, .docTotals-label {
		align-items: center;
		display:flex;
		width: 80px;
	}	
	.docName {
		font-family: var(--sparky-font-headers);
		font-size: 24px;
		padding-left: 5px;
		padding-top: 20px;
		width: stretch;
	}
	.docNumber {
		padding:5px;
		text-align: right;
		width: 115px;
	}
	.docProject {
		display:flex;
	}
	.docStamp {
		border: 1px solid var(--sparky-color-borders);
		display: flex;
		flex-direction: column;
		padding: 5px;
		row-gap: 5px;
	}
	.docNumber-group, .docDate-group {
		align-items: center;
		display:flex;
		flex-direction: row;
		padding: 0;
	}
	.docStamp .docProject .invisible {
		background:transparent;
		border:none;
		color: var(--sparky-color-accent-2);
		font-weight:600;
		width: stretch;
	}

.doc-head {
    display: flex;
    flex-direction: row;
	padding: 15px 0;
}
.doc-head-container {
	display: flex;
	flex-direction: column;
	width: calc(100% - 190px);    
}
	.doc-head .control-label {
		min-width: auto !important;
		width: 120px !important;
	}
	.doc-head-group {
		display: flex;
		flex-direction: column;
		row-gap:5px;
	}
	
	.amount-field {
		display: flex;
	}
	.amount-field .controls input.number {
		text-align:right;
		width: 150px;
	}
	.amount-field .currency {
		display:flex;
	}
	.amount-field .currency input {
		width: 80px !important;
	}
	div.notes {
		align-items: end;
		display: flex;
		height: stretch;
		padding-top: 30px;
	}
	input.notes {width:245px !important;}
	

.docTotals {
	border:none;
	display: flex;
	flex-direction: column;
	padding: 0 5px;
	row-gap: 5px;
}
	.docTotals input.readonly {
		background: inherit;
		border: none;
		font-size: larger;
		font-weight: 600;
		padding: 3px 0;
		width: 115px;
	}
	.docTotals-label {
		align-items:center;
		display: flex;
	}
	.docTotals-line {
		align-items: center;
		display:flex;
		flex-direction: row;
		padding: 0;
	}
	.docTotals-line input, .docTotals-line select {
		padding: 5px;
		text-align: right;
		width: 115px;
	}
	.docTotals-line select {
		padding: 5px;
		text-align: left;
		width: 115px;
	}
	
.card-form .control-group {
	align-items: anchor-center;
	display: flex;
	flex-wrap: wrap;
	min-width: 300px;
	max-width: 100%;
	max-width: max-content;
	position: relative;
	padding: 5px 0;
}
.card-form .controls {
	display: flex;
	flex: 1;
	flex-wrap: wrap;
	width: 260px;
	
	input[type="checkbox"] {
		accent-color: var(--sparky-color-accent-1);
		width: auto;
	}
	input, select {
		border: 0.5px solid var(--sparky-body-bg-dark);
		border-radius: 3px;
		font-size: var(--sparky-font-size);
		padding: 5px;
		width:230px;
	}
	input.date {
		width: 110px;
	}
}
.card-form .control-label {
	display: flex;
	padding: 5px ;
	width: 180px;
	min-width:180px;
}
.card-form .description {
    /* align-items: anchor-center; */
    display: flex;
	max-width: 300px;
	padding-left: 10px;
}
.card-form .docTable {
    min-height: 100px;
    background: #fff;
}

.separator {
    border-top: 1px solid var(--sparky-color-accent-2);
    height: 15px;
    margin-top: 15px;
}
	
input::placeholder {
	color: #AAA; 
	opacity: 1;
	/* text-align:center; */
	transition: color 0.2s;
}
input::-webkit-input-placeholder	{ color: #999; }	/* Chrome, Safari */
input::-moz-placeholder 			{ color: #999; }	/* Firefox */
input:-ms-input-placeholder 		{ color: #999; }	/* IE */
input::-ms-input-placeholder 		{ color: #999; }	/* старый Edge */

input:focus::placeholder 			{ color: #ddd; }

.card-form .error {
	border: 1px solid red;
}

.form-container {
	padding: 10px;
}
.form-container div.toolbar {
	padding: 0 3px;
    border: 0.5px solid var(--sparky-blue-70);
    border-radius: 0;
}

input.readonly.selectable {
	background: inherit;
}
input.readonly {
	/* background: var(--sparky-body-bg-light); */
}

fieldset {
	border: none;
}
label {
	align-items: center;
	display:flex;
	height: fit-content;
	width: fit-content;
}
textarea {
	font-family: var(--sparky-font-family);
	padding: 5px;
	width: 230px;
}

.form-panel {
	display: none;
	padding: 10px;
}
.form-panel.active {
	display: block;
}
.form-panel .control-label {
	display: flex;
	font-size: var(--sparky-font-size);
	padding: .3rem 1rem .3rem 0;
	width: 250px;
}
.form-panel .controls .key {
	font-size: larger;
	font-weight: 600;
}
.form-panel 
.form-panel .fields-container {
	display: flex;
	flex-direction: row;
	gap: 20px;
}
.form-panel fieldset {
	border: none;
	padding: 10px;
	background: var(--sparky-body-bg-light);
	
}		
.form-panel input, select {
	border: 0.5px solid var(--sparky-body-bg-dark);
	border-radius: 3px;
	font-size: var(--sparky-font-size);
	padding: 5px;
    transition: border-color 0.3s;
	width: 200px;
}
.form-panel input.checkbox {
	width: auto;
}
.form-panel select {
	width: 211px;
}
.form-panel input:focus {
    outline: none;
    border-color: var(--sparky-color-accent-2);
    box-shadow: 0 0 0 3px rgba(30, 64, 175, 0.1);
}
.form-panel label {
	display:flex;
}
.form-panel	legend {
	padding: 10px;
}
.form-panel textarea {
	border: 0.5px solid var(--sparky-body-bg-dark);
	font-family: var(--sparky-font-family);
	font-size: var(--sparky-font-size);
	padding: 5px;
}
.form-panel textarea.code {
	font-family: var(--sparky-code-font-family);
	font-size: var(--sparky-code-font-size);
}

.images-btn-line {
	display: flex;
    gap: var(--gap);
    justify-content: right;
	/* justify-content: center; */
    margin-right: -10px;
    margin-top: -10px;
	
	button {
		cursor:pointer;
		position: relative;
	}
}
.image-zone, .image-zone .clearImage-btn {
    cursor: pointer;
	display: none;
    transition: 0.2s;
}
.image-zone.has-image, 
.image-zone.has-image .clearImage-btn {
	display:block;
}

.image-zone.drag-over {
    border-color: #4a90e2;
    background: rgba(74,144,226,0.08);
}

#imagePreview {
    border-bottom: 1px solid var(--sparky-body-bg-dark);
    display: block;
    height: auto;
	max-height: 150px;
    object-fit: cover;
    width: 100%;
}
.clearImage-btn {
    background: #63a5cac2;
    border: none;
    color: #fff;
    font-size: 11px;
    padding: 3px 5px;
	position: absolute;
    right: 0;
    text-decoration: underline;
}


/* --- ПРЕДПРОСМОТР ПЕЧАТИ --- */
.print-form {
	padding: 10px;
}
.print-form .logo {
    display: flex;
    float: left;
    height: 65px;
	width: auto;
}
.print-form .logo-image {
    border: none;
	height: 40px;
    margin: 0;
    max-width: fit-content;
	width: 40px;
}
.print-form h1 {
	text-align: right;
	font-size: 36px;
}
.print-form .buyer, .print-form .seller {
	border: none;
    padding: 20px 0;
    line-height: 1.35;
}
.print-form .notes {padding-bottom: 20px;}
.print-form table { width: 100%; border-collapse: collapse; }
.print-form th, .print-form td { padding: 5px; border-bottom: 1px solid #ccc; }
.print-form tr.end-of-list {
	border-top: 2px solid #333;
}
.print-form tr.totals td {
	border: none;
}
.print-form td.right {
	text-align: right;
}


/* ФОРМА REPORT */
.bottom-line {
	border-top: 2px double var(--sparky-color-borders);
	font-weight: 600;
	
	.cell {
		border: none;
	}
}

.colspan-3 {
    grid-column: span 3;
}

.drill-down {
	cursor: zoom-in;
}
.drill-down:hover {
	background: var(--sparky-color-accent-3);
}

.initial-line {
	font-weight: 600;
}

.report .grid-table{
	display:grid;
	grid-template-rows:auto 1fr;
	height: calc(100% - 105px);
	font-size:14px;
	overflow-x: auto;
}
.report .grid-header{
	display:grid;
	grid-template-columns:var(--cols);
	background:#f6f7f9;
	border-bottom:1px solid #ddd;
	font-weight:600;
}
.report .grid-body{
	overflow:auto;
	position:relative;
}
.report .grid-row{
	display:grid;
	grid-template-columns:var(--cols);
}
.report .cell{
	border-bottom:1px solid #eee;
	padding:6px 10px;
	text-wrap: auto;
	white-space:nowrap;
}
.report .grid-row:hover{
	background:#f5f8ff;
}
.report-content {
	height: calc(100% - 100px);
	max-height: calc(100% - 100px);
	padding: 20px;
}
.report-window {
	min-height: fit-content;
}
.report-form {
	background: var(--sparky-body-bg);
    border-bottom: 0.5px solid #ccc;
	padding: 5px 10px;
}
.report-form form {
	align-items: center;
	display:flex;
}
.report-form .report-btn-container {
	display: flex;
	margin-left: auto;
}
.report-form input{
	font-family: var(--sparky-font-family);
	padding:3px;
}
.report-form .selection-label {
	margin: 0 5px;
}
.report-form button.select {
	height: 22px;
    border: 1px solid var(--sparky-color-lt-grey);
    width: 16px;
    padding: 0;
    border-radius: 3px;
}


/* ФОРМА CHART */
.chart-container {
	padding: 10px;
}


/* CONTEXT MENU */
.cmenu {
  position: absolute;
  background: #fff;
  border: 0.5px solid var(--sparky-color-1);
  border-radius: 4px;
  padding: 0;
  margin: 0;
  list-style: none;
  width: 200px;
  z-index: 99999;
  box-shadow: 2px 2px 5px rgba(0,0,0,0.2);
}
.cmenu.hidden {
  display: none;
}
.cmenu li {
  padding: 7px 10px;
  cursor: pointer;
  user-select: none;
  display: flex;
  align-items: center;
}
.cmenu li:hover {
  background: var(--sparky-selection);
}
.cmenu li.separator {
  border-top: 0.7px solid var(--sparky-color-1);
  margin: 4px 0;
  padding: 0;
  height: 0px;
}
.cmenu li i {
  margin-right: 8px;
}



/* Адаптив */
@media (max-width: 720px) {
	.sidebar { position:absolute; left:0; top:0; bottom:0; z-index:40; transform:translateX(-6px); }
}
