/* ================================
   LAYOUT
   ================================ */
.app {
	min-height: 100vh;
	display: flex;
	flex-direction: column;
}

.main-layout {
	display: flex;
	flex: 1;
}

/* ================================
   HEADER
   ================================ */
.header {
	background: white;
	border-bottom: 1px solid var(--border);
	padding: 12px 24px;
	display: flex;
	justify-content: space-between;
	align-items: center;
	position: sticky;
	top: 0;
	z-index: 100;
}

.header-left {
	display: flex;
	align-items: center;
	gap: 16px;
}

.mobile-menu-btn {
	display: none;
	background: none;
	border: none;
	padding: 8px;
	color: var(--gray-600);
}

.logo {
	display: flex;
	align-items: center;
	gap: 10px;
	color: var(--primary);
	font-weight: 700;
	font-size: 1.25rem;
}

.logo svg {
	color: var(--primary);
}

.header-right {
	display: flex;
	align-items: center;
	gap: 12px;
}

.objects-count {
	padding: 6px 12px;
	background: var(--gray-100);
	border-radius: 6px;
	font-size: 0.875rem;
	color: var(--gray-600);
}

.objects-count strong {
	color: var(--primary);
}

/* ================================
   SIDEBAR
   ================================ */
.sidebar {
	width: 260px;
	background: white;
	border-right: 1px solid var(--border);
	padding: 16px 0;
	flex-shrink: 0;
	height: calc(100vh - 61px);
	position: sticky;
	top: 61px;
	overflow-y: auto;
}

.sidebar-badge {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 20px;
	height: 20px;
	padding: 0 6px;
	border-radius: 10px;
	background: var(--primary);
	color: white;
	font-size: 11px;
	font-weight: 700;
	line-height: 1;
	margin-left: 8px;
	vertical-align: middle;
}

.sidebar-nav {
	display: flex;
	flex-direction: column;
	gap: 4px;
	padding: 0 8px;
}

.sidebar-footer {
	padding: 12px 8px;
	margin-top: auto;
	border-top: 1px solid var(--border);
}

.export-all-btn {
	width: 100%;
	background: var(--primary) !important;
	color: white !important;
	justify-content: center;
}

.export-all-btn:hover {
	background: var(--primary-dark, #1d4ed8) !important;
}

.nav-item {
	display: flex;
	align-items: center;
	gap: 12px;
	padding: 10px 12px;
	border: none;
	background: none;
	border-radius: 8px;
	font-size: 0.9375rem;
	color: var(--gray-600);
	text-align: left;
	transition: all 0.15s ease;
	cursor: pointer;
}

.nav-item:hover {
	background: var(--gray-100);
	color: var(--gray-900);
}

.nav-item.active {
	background: var(--primary);
	color: white;
}

.nav-item.active svg {
	color: white;
}

/* ================================
   CONTENT
   ================================ */
.content {
	flex: 1;
	padding: 24px;
	min-width: 0;
}

.content-header {
	margin-bottom: 20px;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
}

.content-header h2 {
	margin: 0;
}

.header-actions {
	display: flex;
	gap: 8px;
}

.import-btn {
	cursor: pointer;
}

.search-box {
	display: flex;
	align-items: center;
	gap: 12px;
	background: white;
	border: 1px solid var(--border);
	border-radius: 10px;
	padding: 12px 16px;
	max-width: 600px;
	transition:
		border-color 0.15s ease,
		box-shadow 0.15s ease;
}

.search-box:focus-within {
	border-color: var(--primary);
	box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.search-box svg {
	color: var(--gray-400);
	flex-shrink: 0;
}

.search-box input {
	flex: 1;
	border: none;
	outline: none;
	font-size: 0.9375rem;
	background: none;
}

.search-box input::placeholder {
	color: var(--gray-400);
}

.clear-search {
	background: none;
	border: none;
	padding: 4px;
	color: var(--gray-400);
	cursor: pointer;
	border-radius: 4px;
	display: flex;
	align-items: center;
	justify-content: center;
}

.clear-search:hover {
	background: var(--gray-100);
	color: var(--gray-600);
}

/* ================================
   TABLE
   ================================ */
.table-container {
	background: white;
	border-radius: 12px;
	border: 1px solid var(--border);
	overflow-x: auto;
	overflow-y: visible;
	margin-bottom: 32px;
	max-height: 70vh;
}

.data-table {
	width: 100%;
	border-collapse: collapse;
	font-size: 0.875rem;
}

.data-table th {
	background: var(--gray-50);
	padding: 14px 16px;
	text-align: left;
	font-weight: 600;
	color: var(--gray-600);
	border-bottom: 1px solid var(--border);
	white-space: nowrap;
}

.data-table td {
	padding: 14px 16px;
	border-bottom: 1px solid var(--gray-100);
	vertical-align: middle;
}

.data-table tbody tr:hover {
	background: var(--gray-50);
}

.data-table tbody tr:last-child td {
	border-bottom: none;
}

/* === CHECKBOX STYLES === */
.th-checkbox,
.td-checkbox {
	width: 44px;
	text-align: center;
	padding: 8px 16px;
}

.th-checkbox input[type="checkbox"],
.td-checkbox input[type="checkbox"] {
	width: 18px;
	height: 18px;
	cursor: pointer;
	accent-color: var(--primary);
	border-radius: 4px;
}

.tr-selected td {
	background: #eff6ff;
}

.tr-selected:hover td {
	background: #dbeafe;
}

/* === BULK DELETE BUTTON === */
.btn-danger {
	background: var(--danger);
	color: white;
	border: none;
	padding: 8px 16px;
	border-radius: 8px;
	font-size: 0.875rem;
	font-weight: 500;
	display: inline-flex;
	align-items: center;
	gap: 6px;
	cursor: pointer;
	transition: background 0.2s;
}

.btn-danger:hover {
	background: #dc2626;
}

.btn-danger:active {
	transform: scale(0.98);
}

.btn-warning {
	background-color: #f59e0b;
	color: white;
}

.btn-warning:hover {
	background-color: #d97706;
}

.btn-warning:active {
	transform: scale(0.98);
}

.btn-success {
	background-color: #10b981;
	color: white;
}

.btn-success:hover {
	background-color: #059669;
}

.btn-success:active {
	transform: scale(0.98);
}

/* Role Info Box */
.role-info-box {
	background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%);
	border: 1px solid #0ea5e9;
	border-radius: 8px;
	padding: 12px 16px;
	margin-top: 8px;
}

.role-info-title {
	font-weight: 600;
	color: #0369a1;
	margin-bottom: 8px;
	font-size: 14px;
}

.role-functions {
	display: flex;
	flex-direction: column;
	gap: 4px;
}

.role-function-item {
	font-size: 13px;
	color: #475569;
	display: flex;
	align-items: center;
	gap: 6px;
}

.role-check {
	color: #10b981;
	font-weight: bold;
}

.cell-id {
	color: var(--gray-400);
	font-size: 0.8125rem;
	width: 50px;
}

.cell-name strong {
	color: var(--gray-900);
	font-weight: 600;
}

.cell-contract {
	font-size: 0.8125rem;
	color: var(--gray-600);
	max-width: 150px;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.cell-systems {
	font-size: 0.8125rem;
	color: var(--gray-600);
}

.cell-address {
	max-width: 180px;
}

.cell-clickable {
	cursor: pointer;
	color: var(--primary);
	font-weight: 500;
	font-size: 0.875rem;
	padding: 6px 12px;
	border-radius: 6px;
	background: #dbeafe;
	text-align: center;
	transition: all 0.15s ease;
	border: 1px solid #93c5fd;
}

.cell-clickable:hover {
	background: var(--primary);
	color: white;
	border-color: var(--primary);
}

.address-text {
	display: flex;
	align-items: center;
	gap: 6px;
	color: var(--gray-600);
	font-size: 0.8125rem;
}

.address-text svg {
	color: var(--gray-400);
	flex-shrink: 0;
}

.cell-contact {
	font-size: 0.8125rem;
	color: var(--gray-600);
	max-width: 180px;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.cell-actions {
	display: flex;
	gap: 8px;
}

.empty-state {
	text-align: center;
	color: var(--gray-400);
	padding: 48px 16px !important;
}

/* BADGES */
.badge {
	display: inline-block;
	padding: 4px 8px;
	border-radius: 6px;
	font-size: 0.75rem;
	font-weight: 500;
	white-space: nowrap;
	transition: all 0.2s;
}

.badge-client {
	background: var(--gray-100);
	color: var(--gray-700);
}

.badge-type {
	background: #dbeafe;
	color: #1d4ed8;
}

.badge-type.badge-смр {
	background: #dbeafe;
	color: #1d4ed8;
}

.badge-type.badge-пир {
	background: #fce7f3;
	color: #be185d;
}

.badge-type.badge-то {
	background: #d1fae5;
	color: #047857;
}

.badge-payment {
	background: var(--gray-100);
	color: var(--gray-600);
}

.badge-payment.badge-аванс {
	background: #d1fae5;
	color: #047857;
}

.badge-payment.badge-без-аванса {
	background: #fef3c7;
	color: #92400e;
}

.badge-payment.badge-кп {
	background: #ede9fe;
	color: #5b21b6;
}

/* BUTTONS */
.btn {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	padding: 10px 16px;
	border-radius: 8px;
	font-size: 0.9375rem;
	font-weight: 500;
	border: none;
	transition: all 0.15s ease;
	white-space: nowrap;
}

.btn-primary {
	background: var(--primary);
	color: white;
}

.btn-primary:hover {
	background: var(--primary-dark);
}

.btn-secondary {
	background: var(--gray-100);
	color: var(--gray-700);
}

.btn-secondary:hover {
	background: var(--gray-200);
}

.btn-outline {
	background: white;
	color: var(--gray-700);
	border: 1px solid var(--border);
}

.btn-outline:hover {
	background: var(--gray-50);
}

.btn-warning {
	background: #ff9800;
	color: white;
	border: none;
}

.btn-warning:hover {
	background: #f57c00;
}

.btn-full {
	width: 100%;
	justify-content: center;
}

.btn-icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 32px;
	height: 32px;
	border-radius: 6px;
	border: none;
	background: none;
	cursor: pointer;
	transition: all 0.15s ease;
}

.btn-edit {
	color: var(--primary);
}

.btn-edit:hover {
	background: #dbeafe;
}

.btn-delete {
	color: var(--danger);
}

.btn-delete:hover {
	background: #fee2e2;
}

/* ================================
   ADD FORM
   ================================ */
.add-form-section {
	background: white;
	border-radius: 12px;
	border: 1px solid var(--border);
	padding: 24px;
	clear: both;
}

.add-form-full {
	max-height: 90vh;
	overflow-y: auto;
}

.add-form-full .add-form {
	max-height: calc(90vh - 120px);
	overflow-y: auto;
	padding-right: 12px;
}

.add-form-section .form-grid {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 16px;
}

.add-form-section .form-grid .form-group {
	display: flex;
	flex-direction: column;
	gap: 6px;
}

.add-form-section .form-grid .form-group-full {
	grid-column: 1 / -1;
}

@media (max-width: 900px) {
	.add-form-section .form-grid {
		grid-template-columns: repeat(2, 1fr);
	}
}

@media (max-width: 600px) {
	.add-form-section .form-grid {
		grid-template-columns: 1fr;
	}
}

.add-form-section h3 {
	display: flex;
	align-items: center;
	gap: 10px;
	font-size: 1.125rem;
	margin-bottom: 20px;
	color: var(--gray-900);
}

.add-form-section h3 svg {
	color: var(--success);
}

.add-form {
	display: flex;
	flex-direction: column;
	gap: 20px;
}

.form-grid {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 16px;
}

.form-group {
	display: flex;
	flex-direction: column;
	gap: 6px;
}

.form-group-full {
	grid-column: 1 / -1;
}

.form-group label {
	font-size: 0.875rem;
	font-weight: 500;
	color: var(--gray-700);
}

.form-hint {
	font-size: 0.75rem;
	color: var(--gray-500);
	margin-top: 4px;
}

.form-group input,
.form-group select,
.form-group textarea {
	padding: 10px 14px;
	border: 1px solid var(--border);
	border-radius: 8px;
	font-size: 0.9375rem;
	transition:
		border-color 0.15s ease,
		box-shadow 0.15s ease;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
	outline: none;
	border-color: var(--primary);
	box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.form-group textarea {
	resize: vertical;
	min-height: 60px;
}

/* ================================
   LOGIN PAGE
   ================================ */
.login-container {
	min-height: 100vh;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 20px;
	background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.login-card {
	background: white;
	border-radius: 16px;
	padding: 40px;
	width: 100%;
	max-width: 420px;
	box-shadow: var(--shadow-lg);
}

.login-header {
	text-align: center;
	margin-bottom: 32px;
}

.login-logo {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 80px;
	height: 80px;
	background: var(--primary);
	color: white;
	border-radius: 20px;
	margin-bottom: 16px;
}

.login-header h1 {
	font-size: 1.75rem;
	color: var(--gray-900);
	margin-bottom: 8px;
}

.login-header p {
	color: var(--gray-500);
}

.login-form {
	display: flex;
	flex-direction: column;
	gap: 20px;
}

.login-form .form-group {
	text-align: left;
}

.auth-error {
	background: #fee2e2;
	color: #dc2626;
	padding: 12px;
	border-radius: 8px;
	font-size: 0.875rem;
	text-align: center;
}

.login-hint {
	margin-top: 24px;
	padding-top: 24px;
	border-top: 1px solid var(--border);
	text-align: center;
}

.login-hint p {
	color: var(--gray-500);
	font-size: 0.875rem;
}

.login-hint code {
	background: var(--gray-100);
	padding: 2px 6px;
	border-radius: 4px;
	font-size: 0.8125rem;
}

/* ================================
   APP LAYOUT + LOGIN OVERLAY
   ================================ */
.app-layout {
	display: flex;
	min-height: 100vh;
	background: var(--gray-100);
}

.sidebar-header {
	display: flex;
	align-items: center;
	gap: 10px;
	padding: 12px 20px;
	border-bottom: 1px solid var(--border);
	margin-bottom: 8px;
	font-size: 1.125rem;
	font-weight: 700;
	color: var(--primary);
}

.login-overlay {
	display: flex;
	align-items: center;
	justify-content: center;
	min-height: 100vh;
	background: rgba(0, 0, 0, 0.15);
	padding: 20px;
}

.login-overlay .login-card {
	width: 100%;
	max-width: 420px;
}

/* ================================
   LOADING STATE
   ================================ */
.loading {
	padding: 40px;
	text-align: center;
	color: var(--gray-500);
	font-size: 16px;
}

/* ================================
   COLLAPSIBLE SECTIONS
   ================================ */
.collapsible-section {
	background: white;
	border-radius: 12px;
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
	margin-bottom: 20px;
	overflow: hidden;
}

.collapsible-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 16px 20px;
	background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
	cursor: pointer;
	transition: background 0.2s;
	border-bottom: 1px solid transparent;
}

.collapsible-section.open .collapsible-header {
	border-bottom-color: var(--border);
}

.collapsible-header:hover {
	background: linear-gradient(135deg, #f1f5f9 0%, #e2e8f0 100%);
}

.collapsible-header h3 {
	display: flex;
	align-items: center;
	gap: 10px;
	margin: 0;
	font-size: 16px;
	font-weight: 600;
	color: var(--gray-800);
}

.collapsible-header h3 svg {
	color: var(--primary);
}

.collapse-icon {
	color: var(--gray-400);
	transition: transform 0.3s ease;
}

.collapse-icon.open {
	transform: rotate(180deg);
}

.collapsible-content {
	animation: slideDown 0.3s ease-out;
}

@keyframes slideDown {
	from {
		opacity: 0;
		transform: translateY(-10px);
	}
	to {
		opacity: 1;
		transform: translateY(0);
	}
}

/* ================================
   BUY STATUS BADGES
   ================================ */
.badge-order {
	background: #e3f2fd;
	color: #1565c0;
}

.badge-wait {
	background: #fff3e0;
	color: #e65100;
}

.badge-pay {
	background: #e8f5e9;
	color: #2e7d32;
}

.badge-paid {
	background: #c8e6c9;
	color: #1b5e20;
}

.badge-warehouse {
	background: #f3e5f5;
	color: #7b1fa2;
}

.badge-office {
	background: #d1fae5;
	color: #047857;
}

/* ================================
   SYSTEM TAGS (Время section)
   ================================ */
.selected-systems {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	margin-bottom: 10px;
}

.system-tag {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	padding: 6px 12px;
	background: var(--primary);
	color: white;
	border-radius: 20px;
	font-size: 0.85rem;
	font-weight: 500;
}

.system-tag-remove {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 18px;
	height: 18px;
	padding: 0;
	background: rgba(255, 255, 255, 0.3);
	color: white;
	border: none;
	border-radius: 50%;
	cursor: pointer;
	font-size: 14px;
	line-height: 1;
}

.system-tag-remove:hover {
	background: rgba(255, 255, 255, 0.5);
}

.text-success {
	color: #2e7d32;
	font-weight: 600;
}

.text-danger {
	color: #c62828;
	font-weight: 600;
}

.cell-id {
	font-family: monospace;
	color: var(--gray-500);
}

/* ================================
   LOADING SPINNER
   ================================ */
.loading-spinner {
	display: inline-block;
	width: 20px;
	height: 20px;
	border: 2px solid rgba(255, 255, 255, 0.3);
	border-radius: 50%;
	border-top-color: white;
	animation: spin 0.8s linear infinite;
}

.loading-spinner.small {
	width: 16px;
	height: 16px;
	border-color: rgba(255, 255, 255, 0.3);
	border-top-color: white;
}

@keyframes spin {
	to {
		transform: rotate(360deg);
	}
}

/* ================================
   MODAL
   ================================ */
.modal-overlay {
	position: fixed;
	inset: 0;
	background: rgba(0, 0, 0, 0.5);
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 20px;
	z-index: 1000;
	animation: fadeIn 0.15s ease;
}

.modal {
	background: white;
	border-radius: 16px;
	width: 100%;
	max-width: 700px;
	max-height: 90vh;
	overflow: hidden;
	display: flex;
	flex-direction: column;
	animation: slideUp 0.2s ease;
}

.modal-header {
	display: flex;
	justify-content: space-between;
	align-items: center;
	padding: 20px 24px;
	border-bottom: 1px solid var(--border);
}

.modal-header h2 {
	font-size: 1.25rem;
	color: var(--gray-900);
}

.modal-close {
	background: none;
	border: none;
	padding: 8px;
	color: var(--gray-400);
	cursor: pointer;
	border-radius: 6px;
	display: flex;
	align-items: center;
	justify-content: center;
}

.modal-close:hover {
	background: var(--gray-100);
	color: var(--gray-600);
}

.modal-body {
	padding: 24px;
	overflow-y: auto;
}

.modal-footer {
	display: flex;
	justify-content: flex-end;
	gap: 12px;
	padding-top: 20px;
	border-top: 1px solid var(--border);
	margin-top: 20px;
}

@keyframes fadeIn {
	from {
		opacity: 0;
	}
	to {
		opacity: 1;
	}
}

@keyframes slideUp {
	from {
		opacity: 0;
		transform: translateY(20px);
	}
	to {
		opacity: 1;
		transform: translateY(0);
	}
}

/* ================================
   PLACEHOLDER SECTION
   ================================ */
.placeholder-section {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	min-height: 400px;
	text-align: center;
	background: white;
	border-radius: 12px;
	border: 1px solid var(--border);
	padding: 48px;
}

.placeholder-icon {
	color: var(--gray-300);
	margin-bottom: 24px;
}

.placeholder-section h2 {
	font-size: 1.5rem;
	color: var(--gray-900);
	margin-bottom: 8px;
}

.placeholder-section > p {
	color: var(--gray-500);
	margin-bottom: 32px;
}

.coming-soon-features {
	background: var(--gray-50);
	padding: 24px;
	border-radius: 12px;
	text-align: left;
	max-width: 400px;
}

.coming-soon-features h4 {
	font-size: 0.875rem;
	text-transform: uppercase;
	letter-spacing: 0.05em;
	color: var(--gray-500);
	margin-bottom: 12px;
}

.coming-soon-features ul {
	list-style: none;
	display: flex;
	flex-direction: column;
	gap: 8px;
}

.coming-soon-features li {
	color: var(--gray-700);
	font-size: 0.9375rem;
	padding-left: 20px;
	position: relative;
}

.coming-soon-features li::before {
	content: "";
	position: absolute;
	left: 0;
	top: 8px;
	width: 6px;
	height: 6px;
	background: var(--primary);
	border-radius: 50%;
}

/* ================================
   RESPONSIVE
   ================================ */
@media (max-width: 1024px) {
	.form-grid {
		grid-template-columns: repeat(2, 1fr);
	}
}

@media (max-width: 768px) {
	.header {
		padding: 12px 16px;
	}

	.mobile-menu-btn {
		display: flex;
	}

	.objects-count {
		display: none;
	}

	.sidebar {
		position: fixed;
		left: 0;
		top: 61px;
		bottom: 0;
		z-index: 99;
		transform: translateX(-100%);
		transition: transform 0.2s ease;
	}

	.sidebar.open {
		transform: translateX(0);
		box-shadow: var(--shadow-lg);
	}

	.content {
		padding: 16px;
	}

	.table-container {
		overflow-x: auto;
	}

	.data-table {
		min-width: 900px;
	}

	.form-grid {
		grid-template-columns: 1fr;
	}

	.login-card {
		padding: 24px;
	}

	.modal {
		max-height: 95vh;
	}
}

@media (max-width: 480px) {
	.header-right {
		gap: 8px;
	}

	.btn {
		padding: 8px 12px;
		font-size: 0.875rem;
	}

	.btn span:not(.loading-spinner) {
		display: none;
	}

	.search-box {
		padding: 10px 12px;
	}
}

/* ================================
   CALLS SECTION
   ================================ */
.calls-header {
	margin-bottom: 24px;
}

.calls-stats {
	display: grid;
	grid-template-columns: repeat(4, 1fr);
	gap: 16px;
	margin-bottom: 20px;
}

.stat-card {
	display: flex;
	align-items: center;
	gap: 14px;
	padding: 18px 20px;
	background: white;
	border-radius: 12px;
	border: 1px solid var(--border);
}

.stat-icon {
	width: 44px;
	height: 44px;
	border-radius: 10px;
	display: flex;
	align-items: center;
	justify-content: center;
}

.stat-new .stat-icon {
	background: #fee2e2;
	color: #dc2626;
}

.stat-progress .stat-icon {
	background: #fef3c7;
	color: #d97706;
}

.stat-completed .stat-icon {
	background: #d1fae5;
	color: #059669;
}

.stat-waiting .stat-icon {
	background: #fef3c7;
	color: #d97706;
}

.badge.stat-waiting {
	background: #fef3c7;
	color: #d97706;
}

.stat-cancelled .stat-icon {
	background: #fee2e2;
	color: #dc2626;
}

.badge.stat-cancelled {
	background: #fee2e2;
	color: #dc2626;
}

.stat-total .stat-icon {
	background: #dbeafe;
	color: #2563eb;
}

.stat-info {
	display: flex;
	flex-direction: column;
}

.stat-count {
	font-size: 1.5rem;
	font-weight: 700;
	color: var(--gray-900);
	line-height: 1;
}

.stat-label {
	font-size: 0.8125rem;
	color: var(--gray-500);
	margin-top: 4px;
}

.filter-tabs {
	display: flex;
	gap: 8px;
	background: white;
	padding: 6px;
	border-radius: 10px;
	border: 1px solid var(--border);
	width: fit-content;
}

.filter-tab {
	padding: 8px 16px;
	border: none;
	background: none;
	border-radius: 6px;
	font-size: 0.875rem;
	color: var(--gray-600);
	cursor: pointer;
	transition: all 0.15s ease;
}

.filter-tab:hover {
	background: var(--gray-100);
}

.filter-tab.active {
	background: var(--primary);
	color: white;
}

/* ================================
   CALLS LIST
   ================================ */
.calls-list {
	display: flex;
	flex-direction: column;
	gap: 12px;
	margin-bottom: 32px;
}

.empty-calls {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	padding: 64px 20px;
	background: white;
	border-radius: 12px;
	border: 1px solid var(--border);
	text-align: center;
	color: var(--gray-400);
}

.empty-calls h3 {
	margin-top: 16px;
	font-size: 1.125rem;
	color: var(--gray-700);
}

.empty-calls p {
	margin-top: 8px;
	color: var(--gray-500);
}

.call-card {
	background: white;
	border-radius: 12px;
	border: 1px solid var(--border);
	overflow: hidden;
	transition: box-shadow 0.2s ease;
}

.call-card:hover {
	box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.call-card.priority-high {
	border-left: 4px solid #dc2626;
}

.call-header {
	display: flex;
	align-items: center;
	gap: 20px;
	padding: 18px 20px;
	cursor: pointer;
	transition: background 0.15s ease;
}

.call-header:hover {
	background: var(--gray-50);
}

.call-main-info {
	flex: 1;
	min-width: 0;
}

.call-badges {
	display: flex;
	gap: 8px;
	margin-bottom: 8px;
}

.call-customer {
	font-size: 1rem;
	font-weight: 600;
	color: var(--gray-900);
	margin-bottom: 4px;
}

.call-reason {
	font-size: 0.875rem;
	color: var(--gray-600);
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.call-quick-info {
	display: flex;
	flex-direction: column;
	gap: 8px;
	min-width: 200px;
}

.call-info-item {
	display: flex;
	align-items: center;
	gap: 8px;
	font-size: 0.8125rem;
	color: var(--gray-600);
}

.call-info-item svg {
	color: var(--gray-400);
	flex-shrink: 0;
}

.call-expand-icon {
	color: var(--gray-400);
}

/* ================================
   CALL DETAILS
   ================================ */
.call-details {
	padding: 0 20px 20px;
	border-top: 1px solid var(--gray-100);
	margin-top: 0;
}

.call-details-grid {
	display: grid;
	grid-template-columns: repeat(2, 1fr);
	gap: 20px;
	padding-top: 20px;
	margin-bottom: 20px;
}

.detail-section h4 {
	display: flex;
	align-items: center;
	gap: 8px;
	font-size: 0.8125rem;
	text-transform: uppercase;
	letter-spacing: 0.03em;
	color: var(--gray-500);
	margin-bottom: 10px;
}

.detail-section h4 svg {
	color: var(--gray-400);
}

.detail-section p {
	font-size: 0.9375rem;
	color: var(--gray-700);
	margin-bottom: 4px;
}

.detail-section p strong {
	color: var(--gray-900);
}

.detail-sub {
	font-size: 0.8125rem !important;
	color: var(--gray-500) !important;
}

.detail-desc {
	margin-top: 8px;
	padding: 10px 12px;
	background: var(--gray-50);
	border-radius: 8px;
	font-size: 0.875rem !important;
	color: var(--gray-600) !important;
}

.detail-note {
	margin-top: 8px;
	padding: 10px 12px;
	background: #fef3c7;
	border-radius: 8px;
	font-size: 0.875rem !important;
	color: #92400e !important;
}

.phone-link {
	font-weight: 500;
	color: var(--primary) !important;
}

.call-actions {
	display: flex;
	align-items: center;
	gap: 12px;
	padding-top: 16px;
	border-top: 1px solid var(--gray-100);
}

.action-group {
	display: flex;
	align-items: center;
	gap: 10px;
	margin-right: auto;
}

.action-group label {
	font-size: 0.875rem;
	color: var(--gray-600);
	white-space: nowrap;
}

.action-group select {
	padding: 8px 12px;
	border: 1px solid var(--border);
	border-radius: 8px;
	font-size: 0.875rem;
	min-width: 180px;
}

/* ================================
   ADD CALL SECTION
   ================================ */
.add-call-section {
	background: white;
	border-radius: 12px;
	border: 1px solid var(--border);
	padding: 24px;
}

.add-call-section h3 {
	display: flex;
	align-items: center;
	gap: 10px;
	font-size: 1.125rem;
	margin-bottom: 24px;
	color: var(--gray-900);
}

.add-call-section h3 svg {
	color: var(--primary);
}

.call-form {
	display: flex;
	flex-direction: column;
	gap: 24px;
}

.form-section {
	display: flex;
	flex-direction: column;
	gap: 16px;
}

.form-section h4 {
	font-size: 0.9375rem;
	font-weight: 600;
	color: var(--gray-800);
	padding-bottom: 10px;
	border-bottom: 1px solid var(--gray-200);
}

.form-row {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 16px;
}

/* ================================
   BADGES FOR CALLS
   ================================ */
.badge-status-new {
	background: #fee2e2;
	color: #dc2626;
}

.badge-status-progress {
	background: #fef3c7;
	color: #d97706;
}

.badge-status-completed {
	background: #d1fae5;
	color: #059669;
}

.badge-priority-high {
	background: #fecaca;
	color: #991b1b;
}

.badge-priority-normal {
	background: var(--gray-100);
	color: var(--gray-600);
}

.badge-priority-low {
	background: #e0e7ff;
	color: #4338ca;
}

/* ================================
   BUTTONS
   ================================ */
.btn-success {
	background: #059669;
	color: white;
}

.btn-success:hover {
	background: #047857;
}

.btn-sm {
	padding: 6px 12px;
	font-size: 0.8125rem;
}

/* ================================
   MODAL CALL
   ================================ */
.modal-call {
	max-width: 800px;
}

.modal-call .form-section {
	margin-bottom: 20px;
	padding-bottom: 20px;
	border-bottom: 1px solid var(--border);
}

.modal-call .form-section:last-of-type {
	border-bottom: none;
	margin-bottom: 0;
	padding-bottom: 0;
}

/* ================================
   RESPONSIVE FOR CALLS
   ================================ */
@media (max-width: 1024px) {
	.calls-stats {
		grid-template-columns: repeat(2, 1fr);
	}

	.call-details-grid {
		grid-template-columns: 1fr;
	}

	.form-row {
		grid-template-columns: repeat(2, 1fr);
	}
}

@media (max-width: 768px) {
	.calls-stats {
		grid-template-columns: 1fr;
	}

	.call-header {
		flex-direction: column;
		align-items: flex-start;
	}

	.call-quick-info {
		width: 100%;
		flex-direction: row;
		flex-wrap: wrap;
		gap: 12px 20px;
	}

	.call-expand-icon {
		position: absolute;
		right: 20px;
		top: 18px;
	}

	.call-card {
		position: relative;
	}

	.form-row {
		grid-template-columns: 1fr;
	}

	.action-group {
		flex-direction: column;
		align-items: flex-start;
		width: 100%;
		margin-bottom: 12px;
	}

	.action-group select {
		width: 100%;
	}

	.call-actions {
		flex-wrap: wrap;
	}
}

/* ================================
   TASKS TABLE
   ================================ */
.table-container-horizontal {
	overflow-x: auto;
	max-height: 70vh;
	overflow-y: auto;
}

.tasks-table {
	min-width: 2000px;
	font-size: 0.85rem;
}

.tasks-table th,
.tasks-table td {
	padding: 10px 12px;
	white-space: nowrap;
}

.tasks-table .sticky-col {
	position: sticky;
	left: 0;
	background: white;
	z-index: 10;
	min-width: 100px;
	box-shadow: 2px 0 4px rgba(0, 0, 0, 0.1);
}

.tasks-table thead th.sticky-col {
	background: var(--gray-50);
	z-index: 11;
}

.tasks-table tbody tr:hover .sticky-col {
	background: var(--gray-50);
}

.cell-date {
	font-family: monospace;
	font-size: 0.85rem;
}

.cell-executor {
	font-weight: 500;
}

.cell-status-cell {
	text-align: center;
	min-width: 80px;
}

.cell-status-cell:empty {
	color: var(--gray-400);
}

.form-grid-tasks {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
	gap: 16px;
}

/* Модальное окно для задач */
.modal-task {
	max-width: 900px;
	width: 95%;
}

.modal-task .form-grid {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 16px;
}

.modal-task .form-group-full {
	grid-column: 1 / -1;
}

@media (max-width: 768px) {
	.modal-task .form-grid {
		grid-template-columns: repeat(2, 1fr);
	}
}

@media (max-width: 480px) {
	.modal-task .form-grid {
		grid-template-columns: 1fr;
	}

	.form-grid-tasks {
		grid-template-columns: 1fr;
	}
}

/* ================================
   ENGINEERS CALENDAR
   ================================ */
.header-actions {
	display: flex;
	gap: 8px;
}

.engineers-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
	gap: 20px;
	margin-bottom: 24px;
}

.engineer-card {
	background: white;
	border-radius: 12px;
	padding: 20px;
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
	border: 1px solid var(--border);
}

.engineer-header {
	display: flex;
	align-items: flex-start;
	gap: 16px;
	margin-bottom: 16px;
	padding-bottom: 16px;
	border-bottom: 1px solid var(--border);
}

.engineer-avatar {
	width: 60px;
	height: 60px;
	border-radius: 50%;
	background: var(--primary-light);
	display: flex;
	align-items: center;
	justify-content: center;
	color: var(--primary);
	flex-shrink: 0;
}

.engineer-info {
	flex: 1;
}

.engineer-info h3 {
	margin: 0 0 4px 0;
	font-size: 1.1rem;
	color: var(--gray-900);
}

.engineer-position {
	margin: 0 0 4px 0;
	color: var(--gray-500);
	font-size: 0.875rem;
}

.engineer-phone {
	margin: 0;
	color: var(--gray-600);
	font-size: 0.875rem;
}

.engineer-stats {
	display: flex;
	flex-direction: column;
	gap: 8px;
	margin-bottom: 16px;
}

.stat-item {
	display: flex;
	justify-content: space-between;
	align-items: center;
}

.stat-label {
	color: var(--gray-500);
	font-size: 0.875rem;
}

.stat-value {
	font-weight: 500;
	color: var(--gray-800);
}

.stat-value.salary {
	color: var(--success);
	font-weight: 600;
}

.workday-badge {
	display: inline-block;
	padding: 2px 8px;
	background: var(--primary-light);
	color: var(--primary);
	border-radius: 4px;
	font-size: 0.75rem;
	margin-right: 4px;
}

.engineer-vacations h4 {
	margin: 0 0 12px 0;
	font-size: 0.9rem;
	color: var(--gray-700);
}

.no-vacations {
	color: var(--gray-400);
	font-size: 0.875rem;
	font-style: italic;
	margin-bottom: 12px;
}

.vacations-list {
	display: flex;
	flex-direction: column;
	gap: 8px;
	margin-bottom: 12px;
}

.vacation-item {
	display: flex;
	align-items: center;
	gap: 8px;
	padding: 8px 12px;
	background: var(--gray-50);
	border-radius: 6px;
	font-size: 0.875rem;
}

.vacation-dates {
	color: var(--gray-700);
}

.vacation-type {
	color: var(--primary);
	font-weight: 500;
	margin-left: auto;
}

.add-vacation-form {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
}

.add-vacation-form input,
.add-vacation-form select {
	flex: 1;
	min-width: 100px;
	padding: 6px 10px;
	border: 1px solid var(--border);
	border-radius: 6px;
	font-size: 0.875rem;
}

.btn-sm {
	padding: 6px 12px;
	font-size: 0.8rem;
}

/* Календарный вид */
.calendar-header {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 20px;
	margin-bottom: 20px;
}

.calendar-header h3 {
	margin: 0;
	min-width: 200px;
	text-align: center;
}

.calendar-grid {
	background: white;
	border-radius: 12px;
	padding: 20px;
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
	border: 1px solid var(--border);
	margin-bottom: 20px;
}

.calendar-days-header {
	display: grid;
	grid-template-columns: repeat(7, 1fr);
	gap: 4px;
	margin-bottom: 8px;
}

.day-name {
	text-align: center;
	font-weight: 600;
	color: var(--gray-500);
	padding: 8px;
	font-size: 0.875rem;
}

.calendar-days {
	display: grid;
	grid-template-columns: repeat(7, 1fr);
	gap: 4px;
}

.calendar-cell {
	aspect-ratio: 1;
	min-height: 60px;
	padding: 4px;
	background: var(--gray-50);
	border-radius: 6px;
	display: flex;
	flex-direction: column;
}

.calendar-cell.empty {
	background: transparent;
}

.calendar-cell .day-number {
	font-weight: 600;
	font-size: 0.875rem;
	color: var(--gray-700);
}

.engineers-status {
	display: flex;
	flex-wrap: wrap;
	gap: 2px;
	margin-top: auto;
}

.engineer-status {
	width: 20px;
	height: 20px;
	border-radius: 4px;
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 0.7rem;
	font-weight: 600;
}

.engineer-status.working {
	background: var(--success-light);
	color: var(--success);
}

.engineer-status.day-off {
	background: var(--gray-200);
	color: var(--gray-500);
}

.engineer-status.vacation {
	background: var(--warning-light);
	color: var(--warning);
}

.calendar-legend {
	display: flex;
	justify-content: center;
	gap: 24px;
	margin-bottom: 24px;
	padding: 12px;
	background: var(--gray-50);
	border-radius: 8px;
}

.legend-item {
	display: flex;
	align-items: center;
	gap: 8px;
	font-size: 0.875rem;
	color: var(--gray-600);
}

.legend-dot {
	width: 16px;
	height: 16px;
	border-radius: 4px;
}

.legend-dot.working {
	background: var(--success-light);
	border: 1px solid var(--success);
}

.legend-dot.day-off {
	background: var(--gray-200);
	border: 1px solid var(--gray-400);
}

.legend-dot.vacation {
	background: var(--warning-light);
	border: 1px solid var(--warning);
}

.engineers-list-compact {
	background: white;
	border-radius: 12px;
	padding: 20px;
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
	border: 1px solid var(--border);
}

.engineers-list-compact h4 {
	margin: 0 0 16px 0;
	color: var(--gray-800);
}

.salary-cell {
	color: var(--success);
	font-weight: 600;
}

.workdays-checkboxes {
	display: flex;
	flex-wrap: wrap;
	gap: 12px;
}

.workdays-checkboxes label {
	display: flex;
	align-items: center;
	gap: 4px;
	cursor: pointer;
	font-size: 0.9rem;
}

.workdays-checkboxes input[type="checkbox"] {
	width: 16px;
	height: 16px;
	cursor: pointer;
}

@media (max-width: 768px) {
	.engineers-grid {
		grid-template-columns: 1fr;
	}

	.calendar-cell {
		min-height: 50px;
	}
}

/* ================================
   STAFF SECTION
   ================================ */
.staff-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
	gap: 20px;
	margin-bottom: 24px;
}

.staff-card {
	background: white;
	border-radius: 12px;
	border: 1px solid var(--border);
	padding: 20px;
	display: flex;
	flex-direction: column;
	align-items: center;
	text-align: center;
	position: relative;
	transition: box-shadow 0.2s;
}

.staff-card:hover {
	box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.staff-photo {
	width: 100px;
	height: 100px;
	border-radius: 50%;
	overflow: hidden;
	margin-bottom: 12px;
}

.staff-photo img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.staff-avatar {
	width: 100%;
	height: 100%;
	background: var(--primary);
	color: white;
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 2rem;
	font-weight: 600;
}

.staff-info h3 {
	margin: 0 0 4px 0;
	color: var(--gray-900);
	font-size: 1.1rem;
}

.staff-position {
	color: var(--primary);
	font-weight: 500;
	margin: 0 0 8px 0;
}

.staff-location {
	color: var(--gray-600);
	font-size: 0.9rem;
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 4px;
	margin: 0 0 4px 0;
}

.staff-contact {
	color: var(--gray-700);
	font-size: 0.85rem;
	margin: 0 0 4px 0;
}

.staff-description {
	color: var(--gray-600);
	font-size: 0.85rem;
	margin: 8px 0 0 0;
	font-style: italic;
}

.staff-actions {
	position: absolute;
	top: 10px;
	right: 10px;
}

/* ================================
   SYSTEMS PICKER (clickable field)
   ================================ */
.cell-systems {
	cursor: pointer;
	transition: background-color 0.15s;
}

.cell-systems:hover {
	background-color: var(--primary-light);
}

.systems-link {
	color: var(--primary);
	text-decoration: none;
	border-bottom: 1px dashed var(--primary);
	transition: all 0.15s;
}

.cell-systems:hover .systems-link {
	border-bottom-style: solid;
	background-color: var(--primary-light);
	padding: 2px 4px;
	border-radius: 4px;
}

.systems-link em {
	color: var(--gray-400);
	font-style: italic;
}

/* ================================
   SYSTEM PICKER MODAL
   ================================ */
.modal-systems {
	max-width: 500px;
	width: 90%;
}

.modal-systems .modal-header {
	background: var(--primary);
	color: white;
}

.modal-systems .modal-header h2 {
	display: flex;
	align-items: center;
	gap: 10px;
	color: white;
}

.modal-systems .modal-close {
	color: white;
	opacity: 0.8;
}

.modal-systems .modal-close:hover {
	opacity: 1;
}

.system-picker-info {
	padding: 12px 16px;
	background: var(--gray-50);
	border-radius: 8px;
	margin-bottom: 16px;
}

.system-picker-info strong {
	display: block;
	color: var(--gray-900);
	font-size: 1rem;
	margin-bottom: 4px;
}

.system-picker-address {
	color: var(--gray-600);
	font-size: 0.875rem;
}

.system-search {
	margin-bottom: 16px;
}

.system-search input {
	width: 100%;
}

.systems-list {
	max-height: 300px;
	overflow-y: auto;
	border: 1px solid var(--border);
	border-radius: 8px;
	margin-bottom: 16px;
}

.system-item {
	display: flex;
	align-items: center;
	gap: 12px;
	padding: 12px 16px;
	cursor: pointer;
	transition: background-color 0.15s;
	border-bottom: 1px solid var(--border);
}

.system-item:last-child {
	border-bottom: none;
}

.system-item:hover {
	background-color: var(--gray-50);
}

.system-item.selected {
	background-color: var(--primary-light);
}

.system-checkbox {
	width: 22px;
	height: 22px;
	border: 2px solid var(--border);
	border-radius: 4px;
	display: flex;
	align-items: center;
	justify-content: center;
	flex-shrink: 0;
	transition: all 0.15s;
}

.system-item.selected .system-checkbox {
	background: var(--primary);
	border-color: var(--primary);
	color: white;
}

.system-name {
	color: var(--gray-800);
	font-size: 0.95rem;
}

.systems-empty {
	padding: 24px;
	text-align: center;
	color: var(--gray-500);
}

.system-picker-selected {
	padding: 12px 16px;
	background: var(--gray-100);
	border-radius: 8px;
	margin-bottom: 16px;
}

.system-picker-selected strong {
	display: block;
	color: var(--gray-700);
	font-size: 0.875rem;
	margin-bottom: 4px;
}

.selected-tags {
	color: var(--primary);
	font-size: 0.95rem;
}

.selected-tags em {
	color: var(--gray-400);
	font-style: italic;
}

/* ================================
   FILTERS BAR (objects list)
   ================================ */
.filters-bar {
	display: flex;
	flex-wrap: wrap;
	gap: 12px;
	padding: 12px 16px;
	background: var(--gray-50);
	border-radius: 8px;
	margin-bottom: 16px;
	align-items: center;
}

.filter-group {
	display: flex;
	align-items: center;
	gap: 8px;
}

.filter-group label {
	font-size: 0.85rem;
	color: var(--gray-600);
	white-space: nowrap;
}

.filter-group select {
	padding: 6px 10px;
	border: 1px solid var(--border);
	border-radius: 6px;
	font-size: 0.85rem;
	background: white;
	color: var(--gray-700);
	cursor: pointer;
	min-width: 120px;
}

.filter-group select:focus {
	outline: none;
	border-color: var(--primary);
	box-shadow: 0 0 0 2px var(--primary-light);
}

.btn-clear-filters {
	display: flex;
	align-items: center;
	gap: 4px;
	padding: 6px 12px;
	background: var(--danger-light);
	color: var(--danger);
	border: 1px solid var(--danger);
	border-radius: 6px;
	font-size: 0.8rem;
	cursor: pointer;
	transition: all 0.2s;
}

.btn-clear-filters:hover {
	background: var(--danger);
	color: white;
}

/* ================================
   DATE INPUT STYLING
   ================================ */
input[type="date"] {
	padding: 8px 12px;
	border: 1px solid var(--border);
	border-radius: 6px;
	font-size: 0.9rem;
	background: white;
	color: var(--gray-700);
	width: 100%;
	box-sizing: border-box;
}

input[type="date"]:focus {
	outline: none;
	border-color: var(--primary);
	box-shadow: 0 0 0 2px var(--primary-light);
}

/* ================================
   BADGE COUNT (for search results)
   ================================ */
.badge-count {
	padding: 6px 12px;
	background: var(--gray-100);
	border-radius: 20px;
	font-size: 0.8rem;
	color: var(--gray-600);
	font-weight: 500;
}

/* ================================
   TOOL PICKER (Выбор инструмента)
   ================================ */
.tool-picker-header {
	margin-bottom: 0;
}

.tool-picker-toggle {
	display: flex;
	align-items: center;
	gap: 10px;
	padding: 12px 16px;
	background: var(--gray-50);
	border: 2px solid var(--border);
	border-radius: 10px;
	cursor: pointer;
	width: 100%;
	text-align: left;
	font-size: 0.9375rem;
	font-weight: 500;
	color: var(--gray-700);
	transition: all 0.2s;
}

.tool-picker-toggle:hover {
	background: var(--gray-100);
	border-color: var(--primary);
}

.tool-picker-toggle svg {
	color: var(--primary);
}

.tool-count {
	color: var(--primary);
	font-weight: 600;
}

.tool-chevron {
	margin-left: auto;
	transition: transform 0.2s;
}

.tool-chevron.open {
	transform: rotate(180deg);
}

.tool-picker-body {
	margin-top: 12px;
	padding: 16px;
	background: var(--gray-50);
	border: 2px solid var(--primary);
	border-radius: 10px;
}

.tool-picker-empty {
	text-align: center;
	padding: 20px;
	color: var(--gray-500);
}

.tool-picker-empty p {
	margin: 4px 0;
}

.tool-picker-actions {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding-bottom: 12px;
	margin-bottom: 12px;
	border-bottom: 1px solid var(--border);
}

.tool-select-all {
	display: flex;
	align-items: center;
	gap: 8px;
	font-size: 0.875rem;
	color: var(--gray-600);
	cursor: pointer;
}

.tool-select-all input[type="checkbox"] {
	width: 18px;
	height: 18px;
	cursor: pointer;
	accent-color: var(--primary);
}

.btn-clear-tools {
	display: flex;
	align-items: center;
	gap: 4px;
	padding: 6px 12px;
	background: var(--danger-light);
	color: var(--danger);
	border: 1px solid var(--danger);
	border-radius: 6px;
	font-size: 0.8rem;
	cursor: pointer;
	transition: all 0.2s;
}

.btn-clear-tools:hover {
	background: var(--danger);
	color: white;
}

.tool-picker-list {
	display: flex;
	flex-direction: column;
	gap: 8px;
	max-height: 300px;
	overflow-y: auto;
}

.tool-item {
	display: flex;
	align-items: flex-start;
	gap: 12px;
	padding: 12px;
	background: white;
	border: 1px solid var(--border);
	border-radius: 8px;
	cursor: pointer;
	transition: all 0.15s;
}

.tool-item:hover {
	border-color: var(--primary);
	background: var(--primary-light);
}

.tool-item.selected {
	border-color: var(--primary);
	background: #eff6ff;
}

.tool-item input[type="checkbox"] {
	width: 18px;
	height: 18px;
	cursor: pointer;
	accent-color: var(--primary);
	margin-top: 2px;
	flex-shrink: 0;
}

.tool-info {
	display: flex;
	flex-direction: column;
	gap: 4px;
}

.tool-name {
	font-weight: 600;
	color: var(--gray-900);
}

.tool-brand {
	font-size: 0.8125rem;
	color: var(--gray-600);
}

.tool-inventory {
	font-size: 0.75rem;
	color: var(--gray-500);
	font-family: monospace;
}

.tool-object {
	font-size: 0.75rem;
	color: var(--primary);
}

/* ================================
   TOOL SELECT MODAL STYLES
   ================================ */
.tool-modal-trigger {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 10px 14px;
	border: 2px solid;
	border-radius: 8px;
	cursor: pointer;
	font-weight: 500;
	min-height: 44px;
}

.tool-modal-trigger:hover {
	opacity: 0.9;
}

.tool-modal-overlay {
	position: fixed;
	top: 0;
	left: 0;
	right: 0;
	bottom: 0;
	background: rgba(0, 0, 0, 0.5);
	display: flex;
	align-items: center;
	justify-content: center;
	z-index: 1000;
	padding: 20px;
}

.tool-modal-content {
	background: white;
	border-radius: 16px;
	width: 100%;
	max-width: 600px;
	max-height: 80vh;
	overflow: hidden;
	display: flex;
	flex-direction: column;
	box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.tool-modal-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 16px 20px;
	border-bottom: 1px solid var(--border);
}

.tool-modal-header h3 {
	margin: 0;
	font-size: 1.125rem;
	color: var(--gray-900);
}

.tool-modal-close {
	background: none;
	border: none;
	cursor: pointer;
	padding: 4px;
	color: var(--gray-500);
	display: flex;
	align-items: center;
	justify-content: center;
	border-radius: 6px;
}

.tool-modal-close:hover {
	background: var(--gray-100);
	color: var(--gray-700);
}

.tool-stats {
	display: flex;
	gap: 16px;
	padding: 12px 20px;
	background: var(--gray-50);
	border-bottom: 1px solid var(--border);
	font-size: 0.875rem;
}

.tool-stats span {
	display: flex;
	align-items: center;
	gap: 4px;
}

.stat-total {
	color: var(--gray-700);
}

.stat-available {
	color: var(--success);
}

.stat-busy {
	color: var(--danger);
}

.tool-search {
	position: relative;
	padding: 12px 20px;
	border-bottom: 1px solid var(--border);
}

.tool-search .search-icon {
	position: absolute;
	left: 32px;
	top: 50%;
	transform: translateY(-50%);
	color: var(--gray-400);
}

.tool-search-input {
	width: 100%;
	padding: 10px 12px 10px 40px;
	border: 1px solid var(--border);
	border-radius: 8px;
	font-size: 0.9375rem;
	outline: none;
	transition: border-color 0.2s;
}

.tool-search-input:focus {
	border-color: var(--primary);
}

.tool-filters {
	display: flex;
	gap: 8px;
	padding: 12px 20px;
	border-bottom: 1px solid var(--border);
}

.filter-btn {
	padding: 6px 14px;
	border: 1px solid var(--border);
	border-radius: 20px;
	background: white;
	cursor: pointer;
	font-size: 0.8125rem;
	color: var(--gray-600);
	transition: all 0.15s;
}

.filter-btn:hover {
	border-color: var(--primary);
	color: var(--primary);
}

.filter-btn.active {
	background: var(--primary);
	border-color: var(--primary);
	color: white;
}

.filter-available.active {
	background: var(--success);
	border-color: var(--success);
}

.filter-busy.active {
	background: var(--danger);
	border-color: var(--danger);
}

.tool-base-options {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	padding: 12px 20px;
	border-bottom: 1px solid var(--border);
}

.base-option {
	padding: 6px 16px;
	border: 2px solid;
	border-radius: 8px;
	background: white;
	cursor: pointer;
	font-weight: 500;
	transition: all 0.15s;
}

.base-option:hover {
	opacity: 0.8;
}

.base-option.selected {
	background: currentColor;
	color: white !important;
}

.base-option.selected span {
	color: white !important;
}

.tool-list {
	flex: 1;
	overflow-y: auto;
	padding: 12px 20px;
	max-height: 300px;
}

.tool-empty {
	text-align: center;
	padding: 30px;
	color: var(--gray-500);
}

.tool-item-checkbox input {
	width: 18px;
	height: 18px;
	cursor: pointer;
	accent-color: var(--primary);
}

.tool-item-details {
	display: flex;
	gap: 8px;
	font-size: 0.75rem;
	color: var(--gray-500);
	margin-top: 2px;
}

.detail-inv {
	font-family: monospace;
}

.status-badge {
	display: inline-block;
	padding: 2px 8px;
	border-radius: 10px;
	font-size: 0.75rem;
	font-weight: 500;
}

.status-badge.available {
	background: #d4edda;
	color: #155724;
}

.status-badge.busy {
	background: #f8d7da;
	color: #721c24;
}

.status-object {
	font-size: 0.7rem;
	color: var(--gray-500);
	margin-top: 2px;
}

.tool-selected-section {
	padding: 12px 20px;
	background: var(--gray-50);
	border-top: 1px solid var(--border);
}

.selected-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	margin-bottom: 8px;
	font-size: 0.875rem;
	font-weight: 500;
}

.clear-btn {
	padding: 4px 12px;
	background: none;
	border: 1px solid var(--danger);
	color: var(--danger);
	border-radius: 6px;
	cursor: pointer;
	font-size: 0.75rem;
}

.clear-btn:hover {
	background: var(--danger);
	color: white;
}

.selected-chips {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
}

.selected-chip {
	display: inline-flex;
	align-items: center;
	gap: 4px;
	padding: 4px 10px;
	border-radius: 14px;
	font-size: 0.8125rem;
	font-weight: 500;
}

.chip-remove {
	cursor: pointer;
	font-size: 1rem;
	line-height: 1;
	opacity: 0.7;
}

.chip-remove:hover {
	opacity: 1;
}

.tool-modal-actions {
	display: flex;
	justify-content: flex-end;
	gap: 12px;
	padding: 16px 20px;
	border-top: 1px solid var(--border);
}

/* ================================
   CHECKBOX GROUP STYLES
   ================================ */
.checkbox-group {
	display: flex;
	gap: 16px;
	padding: 8px 0;
}

.checkbox-label {
	display: flex;
	align-items: center;
	gap: 6px;
	cursor: pointer;
	font-size: 0.875rem;
	color: var(--gray-700);
}

.checkbox-label input[type="checkbox"] {
	width: 18px;
	height: 18px;
	cursor: pointer;
	accent-color: var(--primary);
	border-radius: 4px;
}

.checkbox-label:hover {
	color: var(--primary);
}

/* ================================
   FORM ACTIONS ROW
   ================================ */
.form-actions-row {
	display: flex;
	gap: 12px;
	margin-bottom: 20px;
	padding-bottom: 16px;
	border-bottom: 1px solid var(--border);
}

.add-form-inline {
	display: inline-flex;
}

.btn-secondary {
	background: var(--gray-100);
	color: var(--gray-700);
	border: 1px solid var(--border);
	padding: 10px 16px;
	border-radius: 8px;
	font-size: 0.875rem;
	font-weight: 500;
	display: inline-flex;
	align-items: center;
	gap: 6px;
	cursor: pointer;
	transition: all 0.2s;
}

.btn-secondary:hover {
	background: var(--gray-200);
	border-color: var(--gray-300);
}

.btn-secondary:active {
	transform: scale(0.98);
}

/* ================================
   CALLS FORM - НОВЫЙ КОМПОНЕНТ
   ================================ */

.calls-form-container {
	background: white;
	border-radius: 12px;
	padding: 24px;
	box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
	margin-bottom: 24px;
}

.form-header {
	display: flex;
	justify-content: space-between;
	align-items: center;
	margin-bottom: 20px;
}

.form-header h3 {
	display: flex;
	align-items: center;
	gap: 8px;
	margin: 0;
}

.form-hint {
	font-size: 0.85rem;
	color: var(--gray-500);
}

.hint-item.required {
	color: #dc3545;
	font-weight: bold;
}

/* DEADLINE CALENDAR */
.deadline-calendar-wrapper {
	position: relative;
}

.deadline-display {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 10px 12px;
	border: 2px solid var(--border);
	border-radius: 6px;
	cursor: pointer;
	transition: all 0.2s;
	background: white;
}

.deadline-display.empty {
	background: #e3f2fd;
	border-color: #2196f3;
}

.deadline-display.urgent {
	background: #ffebee;
	border-color: #f44336;
	animation: pulse-urgent 1s infinite;
}

.deadline-display.normal {
	background: white;
	border-color: var(--border);
}

.deadline-placeholder {
	color: #2196f3;
	font-style: italic;
}

@keyframes pulse-urgent {
	0%,
	100% {
		box-shadow: 0 0 0 0 rgba(244, 67, 54, 0.4);
	}
	50% {
		box-shadow: 0 0 0 4px rgba(244, 67, 54, 0.2);
	}
}

.calendar-popup {
	position: absolute;
	top: 100%;
	left: 0;
	z-index: 1000;
	background: white;
	border: 1px solid var(--border);
	border-radius: 8px;
	padding: 12px;
	box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
	margin-top: 4px;
	width: 280px;
}

.calendar-header {
	display: flex;
	justify-content: space-between;
	align-items: center;
	margin-bottom: 12px;
}

.calendar-header button {
	background: none;
	border: none;
	padding: 4px 8px;
	cursor: pointer;
	font-size: 1.2rem;
}

.calendar-weekdays {
	display: grid;
	grid-template-columns: repeat(7, 1fr);
	gap: 2px;
	text-align: center;
	font-size: 0.75rem;
	color: var(--gray-500);
	margin-bottom: 8px;
}

.calendar-days {
	display: grid;
	grid-template-columns: repeat(7, 1fr);
	gap: 2px;
}

.calendar-day {
	width: 32px;
	height: 32px;
	border: none;
	background: none;
	cursor: pointer;
	border-radius: 4px;
	font-size: 0.85rem;
}

.calendar-day:hover:not(.empty) {
	background: var(--gray-100);
}

.calendar-day.empty {
	cursor: default;
}

.calendar-day.selected {
	background: var(--primary);
	color: white;
}

.calendar-day.urgent {
	background: #ffcdd2;
	color: #c62828;
}

.calendar-legend {
	display: flex;
	gap: 12px;
	margin-top: 8px;
	padding-top: 8px;
	border-top: 1px solid var(--border);
	font-size: 0.75rem;
}

.legend-item {
	display: flex;
	align-items: center;
	gap: 4px;
}

.legend-item.urgent::before {
	content: "";
	width: 12px;
	height: 12px;
	background: #ffcdd2;
	border-radius: 2px;
}

.legend-item.empty::before {
	content: "";
	width: 12px;
	height: 12px;
	background: #e3f2fd;
	border-radius: 2px;
}

/* REQUIRED FIELDS */
.required-label {
	display: flex;
	align-items: center;
	gap: 6px;
}

.required-indicator {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 18px;
	height: 18px;
	background: #dc3545;
	color: white;
	border-radius: 50%;
	font-size: 0.75rem;
	font-weight: bold;
	animation: pulse-required 1s infinite;
}

@keyframes pulse-required {
	0%,
	100% {
		transform: scale(1);
	}
	50% {
		transform: scale(1.1);
	}
}

.required-label.error {
	color: #dc3545;
}

.error-label {
	color: #dc3545;
}

.error-message {
	color: #dc3545;
	font-size: 0.8rem;
	margin-top: 4px;
}

.input-error {
	border-color: #dc3545 !important;
	background: #fff5f5 !important;
}

.field-hint {
	font-size: 0.8rem;
	color: var(--gray-500);
	font-weight: normal;
}

.field-hint.error-hint {
	color: #dc3545;
}

.address-hint {
	color: #ff9800;
}

.char-count {
	font-size: 0.75rem;
	color: var(--gray-500);
	margin-top: 4px;
	display: block;
}

/* DISABLED FIELDS */
.disabled-field {
	background: var(--gray-100) !important;
	cursor: not-allowed;
	opacity: 0.7;
}

.auto-filled {
	background: #e8f5e9 !important;
}

/* HELPER FIELD */
.helper-label-unfilled {
	color: #2196f3;
}

.helper-options {
	display: inline-flex;
	align-items: center;
	gap: 4px;
	margin-left: 8px;
	font-size: 0.8rem;
}

.helper-option {
	cursor: pointer;
	padding: 2px 6px;
	border-radius: 4px;
	transition: all 0.2s;
}

.helper-option:hover {
	background: var(--gray-100);
}

.helper-option.required {
	color: #dc3545;
	font-weight: bold;
}

.helper-option.required:hover {
	background: #ffebee;
}

.helper-separator {
	color: var(--gray-400);
}

.helper-input-wrapper.unfilled {
	position: relative;
}

.helper-hint {
	font-size: 0.75rem;
	color: #2196f3;
	margin-top: 4px;
	font-style: italic;
}

/* ADDRESS SELECT */
.address-select-wrapper {
	position: relative;
}

.address-dropdown {
	position: absolute;
	top: 100%;
	left: 0;
	right: 0;
	background: white;
	border: 1px solid var(--border);
	border-radius: 6px;
	box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
	z-index: 1000;
	max-height: 200px;
	overflow-y: auto;
}

.address-dropdown-item {
	padding: 8px 12px;
	cursor: pointer;
	border-bottom: 1px solid var(--gray-100);
	display: flex;
	flex-direction: column;
}

.address-dropdown-item:last-child {
	border-bottom: none;
}

.address-dropdown-item:hover {
	background: var(--gray-50);
}

.address-dropdown-item .addr {
	font-weight: 500;
}

.address-dropdown-item .name {
	font-size: 0.8rem;
	color: var(--gray-500);
}

/* SYSTEM MULTI SELECT */
.system-multiselect {
	position: relative;
}

.system-selected {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 4px;
	padding: 8px 12px;
	border: 2px solid var(--border);
	border-radius: 6px;
	cursor: pointer;
	min-height: 42px;
	background: white;
}

.system-multiselect.disabled .system-selected {
	background: var(--gray-100);
	cursor: not-allowed;
	opacity: 0.7;
}

.system-multiselect.required .system-selected {
	border-color: #dc3545;
	background: #fff5f5;
}

.system-placeholder {
	color: var(--gray-400);
	font-style: italic;
}

.system-tag {
	display: inline-flex;
	align-items: center;
	gap: 4px;
	padding: 2px 8px;
	background: var(--primary);
	color: white;
	border-radius: 4px;
	font-size: 0.8rem;
}

.system-dropdown {
	position: absolute;
	top: 100%;
	left: 0;
	right: 0;
	background: white;
	border: 1px solid var(--border);
	border-radius: 6px;
	box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
	z-index: 1000;
	padding: 8px;
	max-height: 200px;
	overflow-y: auto;
}

.system-option {
	display: flex;
	align-items: center;
	gap: 8px;
	padding: 6px 8px;
	cursor: pointer;
	border-radius: 4px;
}

.system-option:hover {
	background: var(--gray-50);
}

.system-empty {
	padding: 12px;
	text-align: center;
	color: var(--gray-400);
}
.system-dropdown-footer {
	border-top: 1px solid #e5e7eb;
	padding: 8px 12px;
	margin-top: 4px;
}
.system-open-link {
	background: none;
	border: none;
	color: var(--primary, #4f46e5);
	font-size: 12px;
	font-weight: 500;
	cursor: pointer;
	padding: 4px 0;
	text-align: left;
	width: 100%;
}
.system-open-link:hover {
	text-decoration: underline;
}

/* TOOL & PURCHASE SELECT */
.tool-select-wrapper,
.purchase-select-wrapper {
	position: relative;
}

.tool-selected {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 10px 12px;
	border: 2px solid;
	border-radius: 6px;
	cursor: pointer;
	transition: all 0.2s;
}

.tool-dropdown {
	position: absolute;
	top: 100%;
	left: 0;
	right: 0;
	background: white;
	border: 1px solid var(--border);
	border-radius: 6px;
	box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
	z-index: 1000;
	overflow: hidden;
}

.tool-option {
	padding: 10px 12px;
	cursor: pointer;
	border-left: 4px solid;
	background: white;
	transition: all 0.2s;
}

.tool-option:hover {
	background: var(--gray-50);
}

.transport-status {
	display: flex;
	align-items: center;
	gap: 4px;
	margin-top: 6px;
	font-size: 0.8rem;
}

.transport-status a {
	color: var(--primary);
	text-decoration: underline;
}

/* STAFF SELECT */
.staff-select-wrapper {
	position: relative;
}

.staff-dropdown {
	position: absolute;
	top: 100%;
	left: 0;
	right: 0;
	background: white;
	border: 1px solid var(--border);
	border-radius: 6px;
	box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
	z-index: 1000;
	max-height: 200px;
	overflow-y: auto;
}

.staff-option {
	padding: 8px 12px;
	cursor: pointer;
	border-bottom: 1px solid var(--gray-100);
	display: flex;
	flex-direction: column;
}

.staff-option:last-child {
	border-bottom: none;
}

.staff-option:hover {
	background: var(--gray-50);
}

.staff-option.selected {
	background: #e3f2fd;
}

.staff-name {
	font-weight: 500;
}

.staff-position {
	font-size: 0.8rem;
	color: var(--gray-500);
}

/* CONTACT SELECT */
.contact-select-wrapper {
	position: relative;
}

.contact-dropdown {
	position: absolute;
	top: 100%;
	left: 0;
	right: 0;
	background: white;
	border: 1px solid var(--border);
	border-radius: 6px;
	box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
	z-index: 1000;
	max-height: 250px;
	overflow-y: auto;
}

.contact-option {
	padding: 8px 12px;
	cursor: pointer;
	border-bottom: 1px solid var(--gray-100);
	display: flex;
	flex-direction: column;
}

.contact-option:last-child {
	border-bottom: none;
}

.contact-option:hover {
	background: var(--gray-50);
}

.contact-option.selected {
	background: #e3f2fd;
}

.contact-name {
	font-weight: 500;
}

.contact-phone {
	font-size: 0.8rem;
	color: var(--gray-500);
}

.contact-add-divider {
	border-top: 1px dashed var(--gray-300);
	margin: 4px 0;
}

.contact-add {
	padding: 8px 12px;
	cursor: pointer;
	color: var(--primary);
	display: flex;
	align-items: center;
	gap: 6px;
	font-weight: 500;
}

.contact-add:hover {
	background: var(--gray-50);
}

.contact-add-form {
	padding: 12px;
	background: var(--gray-50);
	border: 1px solid var(--border);
	border-radius: 6px;
	margin-top: 8px;
}

.contact-add-form input {
	width: 100%;
	margin-bottom: 8px;
}

.contact-add-actions {
	display: flex;
	gap: 8px;
}

/* STATUS BADGES */
.status-badge {
	font-size: 0.7rem;
	padding: 2px 6px;
	border-radius: 4px;
	margin-left: 6px;
}

.status-badge.empty {
	background: #e3f2fd;
	color: #2196f3;
}

.status-badge.urgent {
	background: #ffcdd2;
	color: #c62828;
	font-weight: bold;
}

.deadline-label {
	display: flex;
	align-items: center;
}

.deadline-label.empty {
	color: #2196f3;
}

.deadline-label.urgent {
	color: #c62828;
}

/* FORM ACTIONS */
.form-actions {
	margin-top: 20px;
	padding-top: 16px;
	border-top: 1px solid var(--gray-200);
	display: flex;
	align-items: center;
	gap: 16px;
}

.form-warning {
	display: flex;
	align-items: center;
	gap: 6px;
	color: #ff9800;
	font-size: 0.9rem;
}

.btn-lg {
	padding: 12px 24px;
	font-size: 1rem;
}

/* ================================
   TOOL SECTION STYLES
   ================================ */
.tool-row {
	cursor: pointer;
	transition: background-color 0.15s ease;
}

.tool-row:hover {
	background-color: var(--gray-50);
}

.tool-row.has-transport {
	background-color: #e3f2fd;
}

.tool-row.has-transport:hover {
	background-color: #bbdefb;
}

.transport-badge {
	display: inline-flex;
	align-items: center;
	padding: 4px 8px;
	border-radius: 4px;
	font-size: 0.85rem;
	font-weight: 500;
}

.transport-badge.pending {
	background-color: #fff3e0;
	color: #e65100;
}

.transport-badge.confirmed {
	background-color: #e8f5e9;
	color: #2e7d32;
}

.text-muted {
	color: var(--gray-400);
	font-style: italic;
}

/* Tool Modal Styles */
.tool-modal {
	max-width: 800px;
}

.tool-info-section,
.tool-target-section,
.tool-fact-section {
	margin-bottom: 24px;
	padding-bottom: 20px;
	border-bottom: 1px solid var(--gray-200);
}

.tool-info-section:last-of-type {
	border-bottom: none;
}

.tool-info-section h3,
.tool-target-section h3,
.tool-fact-section h3 {
	font-size: 1rem;
	color: var(--gray-700);
	margin-bottom: 16px;
	padding-bottom: 8px;
	border-bottom: 2px solid var(--primary);
}

.tool-target-section h3 {
	border-bottom-color: #ff9800;
}

.tool-transport-section {
	margin-bottom: 24px;
	padding-bottom: 20px;
	border-bottom: 1px solid var(--gray-200);
}

.tool-transport-section h3 {
	font-size: 1rem;
	color: var(--gray-700);
	margin-bottom: 16px;
	padding-bottom: 8px;
	border-bottom: 2px solid #4caf50;
}

.info-field {
	padding: 8px 12px;
	background-color: var(--gray-100);
	border-radius: 6px;
	font-size: 0.9rem;
	color: var(--gray-700);
	min-height: 38px;
	display: flex;
	align-items: center;
}

.btn-confirm {
	width: 100%;
	margin-top: 16px;
	padding: 12px;
	font-size: 1rem;
	font-weight: 600;
	background-color: #4caf50;
}

.btn-confirm:hover {
	background-color: #388e3c;
}

.confirmed-badge {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	margin-top: 16px;
	padding: 12px;
	background-color: #e8f5e9;
	color: #2e7d32;
	border-radius: 8px;
	font-weight: 600;
}

/* ================================
   TRANSPORT SECTION STYLES
   ================================ */

/* Deadline coloring */
.deadline-empty {
	color: #2196f3;
	font-style: italic;
}

.deadline-urgent {
	color: #c62828;
	font-weight: 600;
	background-color: #ffebee;
}

.th-deadline {
	min-width: 100px;
}

.label-deadline-urgent {
	color: #c62828;
	font-weight: 600;
}

.deadline-hint {
	font-size: 0.85rem;
	font-weight: normal;
	color: var(--gray-500);
}

/* Disabled input */
.input-disabled {
	background-color: var(--gray-100);
	color: var(--gray-600);
	cursor: not-allowed;
}

/* Required label */
.label-required::after {
	content: " *";
	color: #c62828;
}

/* Status badges for transport */
.stat-draft {
	background-color: var(--gray-200);
	color: var(--gray-600);
}

.stat-incar {
	background-color: #e3f2fd;
	color: #1565c0;
}

.stat-repair {
	background-color: #fff3e0;
	color: #e65100;
}

/* Transport table */
.table-container.table-horizontal {
	overflow-x: auto;
}

.table-container.table-horizontal table {
	min-width: 1400px;
}

.table-container.table-horizontal td,
.table-container.table-horizontal th {
	white-space: nowrap;
	padding: 10px 12px;
}

/* Objects table - horizontal scrollbar at TOP */
.table-container.table-top-scroll {
	overflow-x: auto;
	overflow-y: visible;
	position: relative;
}

.table-container.table-top-scroll::-webkit-scrollbar {
	height: 12px;
}

.table-container.table-top-scroll::-webkit-scrollbar-track {
	background: #f1f1f1;
	border-radius: 6px;
}

.table-container.table-top-scroll::-webkit-scrollbar-thumb {
	background: #c1c1c1;
	border-radius: 6px;
}

.table-container.table-top-scroll::-webkit-scrollbar-thumb:hover {
	background: #a1a1a1;
}

/* Objects table - top scrollbar */
.objects-top-scroll-wrapper {
	display: flex;
	flex-direction: column;
	max-height: 70vh;
}

.objects-top-scroll {
	height: 30px;
	width: 100%;
	overflow-x: auto;
	overflow-y: hidden;
	background: #f8f9fa;
	border: 1px solid #dee2e6;
	border-radius: 6px;
	margin-bottom: 8px;
}

.objects-top-scroll::-webkit-scrollbar {
	height: 16px;
	width: 16px;
}

.objects-top-scroll::-webkit-scrollbar-track {
	background: #e9ecef;
}

.objects-top-scroll::-webkit-scrollbar-thumb {
	background: #6c757d;
	border-radius: 4px;
}

.objects-top-scroll::-webkit-scrollbar-track {
	background: #dee2e6;
	border-radius: 5px;
}

.objects-top-scroll::-webkit-scrollbar-thumb {
	background: #6c757d;
	border-radius: 4px;
}

.objects-top-scroll::-webkit-scrollbar-thumb:hover {
	background: #6c757d;
}

.table-container.table-horizontal {
	flex: 1;
	overflow-x: auto;
	overflow-y: auto;
}
.objects-table-wrapper {
	max-height: 70vh;
	display: flex;
	flex-direction: column;
}

.objects-table-wrapper .top-scroll {
	height: 16px;
	min-height: 16px;
	overflow-x: auto;
	overflow-y: hidden;
	background: #f1f5f9;
	border: 1px solid #e2e8f0;
	border-bottom: none;
	border-radius: 6px 6px 0 0;
	cursor: grab;
}

.objects-table-wrapper .top-scroll:active {
	cursor: grabbing;
}

.objects-table-wrapper .table-scroll {
	flex: 1;
	overflow-x: auto;
	overflow-y: auto;
	border: 1px solid #e2e8f0;
	border-radius: 0 0 6px 6px;
}

.objects-table-wrapper .top-scroll::-webkit-scrollbar,
.objects-table-wrapper .table-scroll::-webkit-scrollbar {
	height: 10px;
}

.objects-table-wrapper .top-scroll::-webkit-scrollbar-track,
.objects-table-wrapper .table-scroll::-webkit-scrollbar-track {
	background: #e2e8f0;
}

.objects-table-wrapper .top-scroll::-webkit-scrollbar-thumb,
.objects-table-wrapper .table-scroll::-webkit-scrollbar-thumb {
	background: #94a3b8;
	border-radius: 5px;
}

.objects-table-wrapper .top-scroll::-webkit-scrollbar-thumb:hover,
.objects-table-wrapper .table-scroll::-webkit-scrollbar-thumb:hover {
	background: #64748b;
}

/* ==================== USERS PANEL ==================== */
.section-header {
	display: flex;
	justify-content: space-between;
	align-items: center;
	margin-bottom: 20px;
	flex-wrap: wrap;
	gap: 15px;
}

.section-title {
	display: flex;
	align-items: center;
	gap: 10px;
}

.section-title h2 {
	margin: 0;
	font-size: 1.5rem;
}

.users-table-container {
	background: white;
	border-radius: 8px;
	box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
	overflow: hidden;
}

.users-table {
	width: 100%;
	border-collapse: collapse;
}

.users-table th,
.users-table td {
	padding: 12px 16px;
	text-align: left;
	border-bottom: 1px solid var(--gray-200);
}

.users-table th {
	background: var(--gray-50);
	font-weight: 600;
	color: var(--gray-700);
}

.users-table tr:hover {
	background: var(--gray-50);
}

.users-table tr.inactive {
	opacity: 0.6;
}

.user-info {
	display: flex;
	align-items: center;
	gap: 12px;
}

.user-avatar {
	width: 40px;
	height: 40px;
	border-radius: 50%;
	background: var(--primary-color);
	color: white;
	display: flex;
	align-items: center;
	justify-content: center;
	font-weight: 600;
	font-size: 1.1rem;
}

.user-name {
	font-weight: 600;
	color: var(--gray-800);
}

.user-email {
	font-size: 0.85rem;
	color: var(--gray-500);
}

.role-badge {
	display: inline-block;
	padding: 4px 10px;
	border-radius: 20px;
	color: white;
	font-size: 0.85rem;
	font-weight: 500;
}

.status-badge {
	display: inline-flex;
	align-items: center;
	gap: 4px;
	padding: 4px 10px;
	border-radius: 20px;
	font-size: 0.85rem;
}

.status-badge.status-active {
	background: #e8f5e9;
	color: #2e7d32;
}

.status-badge.status-inactive {
	background: #ffebee;
	color: #c62828;
}

.action-buttons {
	display: flex;
	gap: 4px;
}

.btn-icon {
	padding: 6px 8px;
	background: transparent;
	border: none;
	border-radius: 4px;
	cursor: pointer;
	color: var(--gray-600);
	transition: all 0.2s;
}

.btn-icon:hover {
	background: var(--gray-100);
	color: var(--gray-800);
}

.btn-icon.btn-danger:hover {
	background: #ffebee;
	color: #c62828;
}

/* Modal wide */
.modal-wide {
	max-width: 600px;
}

/* Permissions */
.permissions-info {
	margin-bottom: 15px;
	color: var(--gray-600);
}

.permissions-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
	gap: 10px;
}

.permission-item {
	display: flex;
	align-items: center;
	gap: 8px;
	padding: 10px 14px;
	background: var(--gray-50);
	border: 2px solid var(--gray-200);
	border-radius: 8px;
	cursor: pointer;
	transition: all 0.2s;
	user-select: none;
}

.permission-item:hover {
	border-color: var(--gray-300);
}

.permission-item.active {
	background: #e8f5e9;
	border-color: #4caf50;
}

.permission-item input[type="checkbox"] {
	width: 18px;
	height: 18px;
	cursor: pointer;
}

.permission-item span {
	flex: 1;
	font-weight: 500;
}

.permission-check {
	color: #4caf50;
}

.permission-cross {
	color: var(--gray-400);
}

.checkbox-label {
	display: flex;
	align-items: center;
	gap: 8px;
	cursor: pointer;
}

.checkbox-label input {
	width: 18px;
	height: 18px;
}

/* Explicit nav text styles to ensure visibility */
.nav-item {
	color: #4b5563 !important;
}

.nav-item span {
	color: #4b5563 !important;
	font-weight: 500;
	font-size: 15px;
}

.nav-item:hover {
	background: #f3f4f6 !important;
	color: #1f2937 !important;
}

.nav-item:hover span {
	color: #1f2937 !important;
}

.nav-item.active {
	background: #2563eb !important;
	color: #ffffff !important;
}

.nav-item.active span {
	color: #ffffff !important;
}

/* Правки - ВСЕГДА выделяется */
.nav-item[data-section="wishes"] {
	background: linear-gradient(135deg, #667eea, #764ba2) !important;
	color: #ffffff !important;
	font-weight: 600 !important;
	box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4) !important;
	text-decoration: underline !important;
	text-underline-offset: 4px !important;
}

.nav-item[data-section="wishes"] span {
	color: #ffffff !important;
	font-weight: 600 !important;
}

.nav-item[data-section="wishes"]:hover {
	background: linear-gradient(135deg, #5a6fd6, #6a4191) !important;
}

/* Sidebar text */
.sidebar {
	color-scheme: light;
}

.sidebar-nav {
	color: #374151;
}

/* === РД SECTION STYLES === */
.rd-breadcrumbs {
	display: flex;
	align-items: center;
	gap: 2px;
	margin-bottom: 12px;
	flex-wrap: wrap;
}
.rd-crumb {
	background: none;
	border: none;
	color: #2563eb;
	cursor: pointer;
	font-size: 14px;
	padding: 2px 4px;
	border-radius: 4px;
	display: flex;
	align-items: center;
	gap: 2px;
}
.rd-crumb:hover {
	background: #eff6ff;
}
.rd-crumb-sep {
	color: #9ca3af;
}
.rd-search {
	position: relative;
	margin-bottom: 16px;
}
.rd-search-icon {
	position: absolute;
	left: 10px;
	top: 50%;
	transform: translateY(-50%);
	color: #9ca3af;
}
.rd-search-input {
	width: 100%;
	padding: 8px 12px 8px 36px;
	border: 1px solid #d1d5db;
	border-radius: 8px;
	font-size: 14px;
	box-sizing: border-box;
}
.rd-search-input:focus {
	outline: none;
	border-color: #2563eb;
	box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}
.rd-content {
}
.rd-create-folder {
	display: flex;
	align-items: center;
	gap: 8px;
	padding: 12px;
	background: #eff6ff;
	border: 2px dashed #2563eb;
	border-radius: 8px;
	margin-bottom: 16px;
	color: #2563eb;
}
.rd-create-folder input {
	flex: 1;
	padding: 6px 10px;
	border: 1px solid #93c5fd;
	border-radius: 6px;
	font-size: 14px;
}
.rd-create-folder input:focus {
	outline: none;
	border-color: #2563eb;
}
.rd-section {
	margin-bottom: 20px;
}
.rd-section-title {
	font-size: 13px;
	font-weight: 600;
	color: #6b7280;
	text-transform: uppercase;
	letter-spacing: 0.05em;
	margin-bottom: 10px;
	padding-bottom: 6px;
	border-bottom: 1px solid #e5e7eb;
}
.rd-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
	gap: 12px;
}
.rd-item {
	display: flex;
	align-items: center;
	gap: 10px;
	padding: 12px;
	background: white;
	border: 1px solid #e5e7eb;
	border-radius: 10px;
	transition: all 0.15s;
	cursor: default;
}
.rd-item:hover {
	border-color: #2563eb;
	box-shadow: 0 2px 8px rgba(37, 99, 235, 0.1);
}
.rd-folder {
	background: #fffbeb;
	border-color: #fcd34d;
}
.rd-folder:hover {
	border-color: #f59e0b;
	background: #fffbeb;
}
.rd-folder .rd-item-icon {
	color: #f59e0b;
}
.rd-item-icon {
	color: #6b7280;
	flex-shrink: 0;
	cursor: pointer;
}
.rd-item-icon:hover {
	color: #2563eb;
}
.rd-item-info {
	flex: 1;
	min-width: 0;
	display: flex;
	flex-direction: column;
	gap: 2px;
}
.rd-item-name {
	font-size: 14px;
	font-weight: 500;
	color: #111827;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
	cursor: pointer;
}
.rd-item-name:hover {
	color: #2563eb;
}
.rd-item-meta {
	font-size: 12px;
	color: #9ca3af;
}
.rd-item-actions {
	display: flex;
	gap: 4px;
	opacity: 0;
	transition: opacity 0.15s;
}
.rd-item:hover .rd-item-actions {
	opacity: 1;
}
.btn-icon {
	background: none;
	border: none;
	cursor: pointer;
	padding: 4px;
	border-radius: 4px;
	color: #6b7280;
	display: flex;
	align-items: center;
	justify-content: center;
}
.btn-icon:hover {
	background: #f3f4f6;
	color: #dc2626;
}
.rd-empty {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	padding: 60px 20px;
	color: #9ca3af;
	text-align: center;
	gap: 8px;
}
.rd-empty p {
	font-size: 18px;
	font-weight: 600;
	color: #6b7280;
	margin: 0;
}
.rd-empty span {
	font-size: 14px;
}

/* === СТРАНИЦА ДЕТАЛЕЙ СИСТЕМЫ === */
.system-detail-page {
	padding: 16px;
	max-width: 900px;
	margin: 0 auto;
}
.system-detail-header {
	display: flex;
	align-items: center;
	gap: 16px;
	padding: 10px 16px;
	background: #4f46e5;
	color: white;
	border-radius: 4px 4px 0 0;
	margin-bottom: 0;
}
.system-detail-header h2 {
	font-size: 16px;
	font-weight: 600;
	margin: 0;
	flex: 1;
}
.system-detail-object {
	font-size: 13px;
	color: rgba(255, 255, 255, 0.9);
	margin: 0;
}
/* Excel-подобная таблица */
.system-excel-table {
	width: 100%;
	border-collapse: collapse;
	border: 1px solid #d4d4d4;
	background: white;
	font-size: 12px;
	font-family: Calibri, Arial, sans-serif;
}
.system-excel-table .excel-col-label {
	background: #f2f2f2;
	color: #000;
	font-weight: 600;
	text-align: center;
	padding: 8px 4px;
	border: 1px solid #d4d4d4;
	white-space: nowrap;
}
.system-excel-table .excel-row-header {
	background: #d9e1f2;
	color: #000;
	font-weight: 600;
	text-align: left;
	padding: 8px 12px;
	border: 1px solid #d4d4d4;
	white-space: nowrap;
	width: 160px;
}
.system-excel-table td {
	padding: 0;
	border: 1px solid #d4d4d4;
	background: white;
}
.system-excel-table input {
	width: 100%;
	padding: 8px 10px;
	border: none;
	font-size: 12px;
	font-family: Calibri, Arial, sans-serif;
	background: transparent;
	box-sizing: border-box;
}
.system-excel-table input:focus {
	outline: none;
	background: #e8f4fd;
}
.system-excel-table input::placeholder {
	color: #a0a0a0;
}
.system-excel-table .col-qty {
	width: 80px;
	text-align: center;
}
.system-excel-table .col-type {
	width: 140px;
}
.system-excel-table .col-brand {
	width: 140px;
}
.system-excel-table .col-link {
	min-width: 200px;
}
.system-excel-table .col-otcl {
	width: 50px;
	text-align: center;
}
.system-excel-table .col-group {
	width: 120px;
}
.system-excel-table .col-vid {
	width: 120px;
}
.system-excel-table .col-norm {
	width: 80px;
	text-align: center;
}
.system-excel-table .col-srok {
	width: 80px;
	text-align: center;
}
.system-excel-table .col-srok2 {
	width: 80px;
	text-align: center;
}
/* Подзаголовки строк */
.system-excel-table .sub-header td {
	background: #f8f8f8;
	font-weight: 600;
	font-size: 11px;
	color: #444;
	padding: 6px 12px;
	text-align: left;
	border: 1px solid #d4d4d4;
}
/* Кнопки действий */
.system-detail-actions {
	display: flex;
	gap: 8px;
	padding: 12px 16px;
	background: #f2f2f2;
	border: 1px solid #d4d4d4;
	border-top: none;
	border-radius: 0 0 4px 4px;
}
.system-detail-actions .btn {
	padding: 8px 18px;
	font-size: 13px;
	font-weight: 600;
	border-radius: 4px;
	cursor: pointer;
	transition: all 0.15s;
	font-family: Calibri, Arial, sans-serif;
}
.system-detail-actions .btn-primary {
	background: #4f46e5;
	color: white;
	border: 1px solid #4338ca;
}
.system-detail-actions .btn-primary:hover {
	background: #6366f1;
}
.system-detail-actions .btn-secondary {
	background: white;
	color: #1a1a1a;
	border: 1px solid #d4d4d4;
}
.system-detail-actions .btn-secondary:hover {
	background: #e8e8e8;
}

/* Кликабельные системы в таблице объектов */
.cell-systems {
	cursor: default;
}
.systems-list {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
}
.system-chip {
	display: inline-block;
	padding: 4px 10px;
	background: transparent;
	color: var(--primary, #4f46e5);
	border-radius: 12px;
	font-size: 12px;
	font-weight: 500;
	cursor: pointer;
	transition: color 0.2s;
	text-decoration: none;
	border: none;
	outline: none;
}
.system-chip:hover {
	color: var(--primary-dark, #4338ca);
	text-decoration: underline;
}

/* Красная ячейка — нет ссылки */
.cell-link-empty input {
	background: #ffcccc !important;
	color: #cc0000 !important;
	font-weight: 600;
}
.cell-link-empty input::placeholder {
	color: #ff6666 !important;
}
/* Жирный заголовок строки */
.excel-row-header-bold {
	font-weight: 700 !important;
	background: #d9e1f2;
	font-size: 12px !important;
}

/* Плашка сохранения системы */
.system-saved-toast {
	margin: 12px 0 0 0;
	padding: 12px 20px;
	background: #10b981;
	color: white;
	border-radius: 8px;
	font-size: 14px;
	font-weight: 600;
	text-align: center;
	animation: toastIn 0.3s ease;
}
@keyframes toastIn {
	from {
		opacity: 0;
		transform: translateY(-10px);
	}
	to {
		opacity: 1;
		transform: translateY(0);
	}
}

/* Кликабельная строка вызова */
.call-row-clickable {
	cursor: pointer;
}
.call-row-clickable:hover {
	background: #f0f4ff;
}
.status-cell {
	cursor: pointer;
}
.status-cell:hover .badge {
	opacity: 0.8;
	transform: scale(1.05);
}
/* Модальное окно детальной информации вызова */
.call-detail-modal {
	max-width: 700px;
	width: 95%;
	max-height: 90vh;
	overflow: hidden;
	display: flex;
	flex-direction: column;
}
.call-detail-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 16px 20px;
	background: var(--primary, #4f46e5);
	color: white;
	border-radius: 12px 12px 0 0;
}
.call-detail-title {
	display: flex;
	flex-direction: column;
	gap: 4px;
}
.call-detail-id {
	font-size: 20px;
	font-weight: 700;
}
.call-detail-date {
	font-size: 13px;
	opacity: 0.9;
}
.call-detail-body {
	padding: 20px;
	overflow-y: auto;
	flex: 1;
}
.call-detail-section {
	margin-bottom: 20px;
}
.call-detail-section h3 {
	font-size: 14px;
	font-weight: 600;
	color: var(--primary, #4f46e5);
	margin: 0 0 12px 0;
	padding-bottom: 8px;
	border-bottom: 1px solid #e5e7eb;
}
.call-detail-grid {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 12px;
}
.call-detail-field {
	display: flex;
	flex-direction: column;
	gap: 4px;
}
.call-detail-field.full-width {
	grid-column: 1 / -1;
}
.call-detail-field label {
	font-size: 12px;
	font-weight: 600;
	color: #6b7280;
}
.call-detail-field input,
.call-detail-field select,
.call-detail-field textarea {
	padding: 10px 12px;
	border: 1px solid #d1d5db;
	border-radius: 6px;
	font-size: 14px;
	font-family: inherit;
	background: white;
}
.call-detail-field input:focus,
.call-detail-field select:focus,
.call-detail-field textarea:focus {
	outline: none;
	border-color: var(--primary, #4f46e5);
	box-shadow: 0 0 0 2px rgba(79, 70, 229, 0.1);
}
.call-detail-field textarea {
	resize: vertical;
	min-height: 80px;
}
.call-detail-footer {
	display: flex;
	gap: 12px;
	justify-content: flex-end;
	padding: 16px 20px;
	background: #f9fafb;
	border-top: 1px solid #e5e7eb;
	border-radius: 0 0 12px 12px;
}
.call-detail-footer .btn {
	padding: 12px 24px;
	font-size: 14px;
	font-weight: 600;
}

/* Чекбоксы систем в карточке вызова */
.call-detail-systems {
	display: flex;
	flex-direction: column;
	gap: 8px;
}
.system-checkboxes {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
}
.system-checkbox-label {
	display: flex;
	align-items: center;
	gap: 6px;
	cursor: pointer;
	font-size: 14px;
	color: #374151;
}
.system-checkbox-label input[type="checkbox"] {
	width: 16px;
	height: 16px;
	cursor: pointer;
	accent-color: var(--primary, #4f46e5);
}
.system-checkbox-label span {
	font-weight: 500;
}

/* Стили для OurToolSelect с инструментами из базы */
.tool-dropdown-divider {
	padding: 8px 12px;
	font-size: 11px;
	font-weight: 600;
	color: #6c757d;
	text-transform: uppercase;
	letter-spacing: 0.5px;
	border-top: 1px solid #e5e7eb;
	margin-top: 4px;
}
.tool-busy {
	opacity: 0.8;
}
.tool-busy-badge {
	font-size: 11px;
	background: #dc3545;
	color: white;
	padding: 2px 6px;
	border-radius: 10px;
	margin-left: auto;
}
.tool-option-selected {
	background: #e8f5e9;
}
.tool-chip {
	display: inline-flex;
	align-items: center;
	gap: 4px;
	padding: 4px 10px;
	border-radius: 16px;
	font-size: 13px;
	margin: 4px 4px 0 0;
}
.chip-available {
	background: #d4edda;
	color: #155724;
	border: 1px solid #c3e6cb;
}
.chip-busy {
	background: #f8d7da;
	color: #721c24;
	border: 1px solid #f5c6cb;
}
.chip-remove {
	cursor: pointer;
	font-size: 16px;
	line-height: 1;
	opacity: 0.6;
}
.chip-remove:hover {
	opacity: 1;
}
.tool-chips {
	display: flex;
	flex-wrap: wrap;
	margin-top: 8px;
}
.tool-chip-sm {
	display: inline-block;
	padding: 2px 8px;
	border-radius: 12px;
	font-size: 12px;
	margin: 2px 4px 2px 0;
}
.chip-avail-sm {
	background: #d4edda;
	color: #155724;
}
.chip-busy-sm {
	background: #f8d7da;
	color: #721c24;
}
.tool-status-badge {
	padding: 3px 10px;
	border-radius: 12px;
	font-size: 12px;
	font-weight: 500;
}
.status-available {
	background: #d4edda;
	color: #155724;
}
.status-busy {
	background: #f8d7da;
	color: #721c24;
}
.tool-status-display {
	padding: 8px 16px;
	border-radius: 8px;
	font-size: 14px;
	font-weight: 600;
}
.status-avail-display {
	background: #d4edda;
	color: #155724;
}
.status-busy-display {
	background: #f8d7da;
	color: #721c24;
}
/* Карточка информации об инструменте */
.tool-info-card {
	margin-top: 10px;
	padding: 12px;
	background: #f8f9fa;
	border: 1px solid #e9ecef;
	border-radius: 8px;
	font-size: 13px;
}
.tool-info-header {
	display: flex;
	justify-content: space-between;
	align-items: center;
	margin-bottom: 8px;
}
.tool-info-name {
	font-weight: 600;
	color: #212529;
}
.tool-info-status {
	font-size: 12px;
	padding: 3px 8px;
	border-radius: 12px;
}
.tool-info-status.available {
	background: #d4edda;
	color: #155724;
}
.tool-info-status.busy {
	background: #f8d7da;
	color: #721c24;
}
.tool-info-row {
	display: flex;
	gap: 6px;
	margin-bottom: 4px;
}
.tool-info-label {
	color: #6c757d;
	font-weight: 500;
}
.tool-info-value {
	color: #212529;
}
.tool-info-object {
	margin-top: 8px;
	padding: 8px;
	background: #fff3cd;
	border: 1px solid #ffc107;
	border-radius: 4px;
	color: #856404;
}

/* === КНОПКА СПРАВКИ === */
.btn-help {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 36px;
	height: 36px;
	padding: 0;
	background: #e3f2fd;
	border: 1px solid #2196f3;
	border-radius: 8px;
	color: #1976d2;
	cursor: pointer;
	transition: all 0.2s ease;
	margin-left: 8px;
}
.btn-help:hover {
	background: #2196f3;
	color: white;
}

/* === МОДАЛЬНОЕ ОКНО СПРАВКИ === */
.help-modal {
	max-width: 700px;
	width: 95%;
}

.help-modal .modal-body {
	padding: 20px;
}

.help-info {
	font-size: 14px;
	color: #555;
	margin-bottom: 20px;
	padding: 12px;
	background: #f8f9fa;
	border-radius: 8px;
	border-left: 4px solid #2196f3;
}

.help-flow {
	display: flex;
	align-items: flex-start;
	gap: 20px;
}

.help-section {
	flex: 1;
	background: #f8f9fa;
	border-radius: 12px;
	padding: 16px;
}

.help-section h4 {
	display: flex;
	align-items: center;
	gap: 8px;
	margin: 0 0 12px 0;
	font-size: 14px;
	color: #333;
}

.help-section ul {
	list-style: none;
	padding: 0;
	margin: 0;
}

.help-section li {
	padding: 6px 0;
	font-size: 13px;
	color: #555;
	border-bottom: 1px solid #e9ecef;
}

.help-section li:last-child {
	border-bottom: none;
}

.help-arrow {
	display: flex;
	align-items: center;
	justify-content: center;
	color: #2196f3;
	font-size: 24px;
	padding-top: 40px;
}

/* Header actions alignment */
.header-actions {
	display: flex;
	align-items: center;
	gap: 8px;
}

/* Content header right alignment fix */
.content-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	flex-wrap: wrap;
	gap: 12px;
}

.content-header h2 {
	margin: 0;
	flex-shrink: 0;
}

/* === ПОДСКАЗКИ О СВЯЗЯХ МЕЖДУ РАЗДЕЛАМИ === */
.section-flow-hint {
	display: flex;
	align-items: center;
	gap: 8px;
	padding: 10px 16px;
	background: linear-gradient(135deg, #e3f2fd 0%, #f3e5f5 100%);
	border-radius: 8px;
	margin-bottom: 16px;
	font-size: 13px;
	flex-wrap: wrap;
}

.flow-label {
	font-weight: 600;
	color: #1565c0;
}

.flow-item {
	padding: 4px 10px;
	background: #fff;
	border: 1px solid #90caf9;
	border-radius: 16px;
	color: #1565c0;
	font-weight: 500;
}

.flow-current {
	padding: 4px 12px;
	background: #2196f3;
	border-radius: 16px;
	color: #fff;
	font-weight: 600;
}

.flow-arrow {
	color: #90caf9;
	font-weight: bold;
	font-size: 16px;
}

/* Цветовые варианты для разных разделов */
.flow-hint-calls {
	background: linear-gradient(135deg, #fff3e0 0%, #fce4ec 100%);
}
.flow-hint-calls .flow-label {
	color: #e65100;
}
.flow-hint-calls .flow-item {
	border-color: #ffab91;
	color: #e65100;
}
.flow-hint-calls .flow-current {
	background: #ff5722;
}
.flow-hint-calls .flow-arrow {
	color: #ffab91;
}

.flow-hint-tools {
	background: linear-gradient(135deg, #e8f5e9 0%, #e0f7fa 100%);
}
.flow-hint-tools .flow-label {
	color: #2e7d32;
}
.flow-hint-tools .flow-item {
	border-color: #a5d6a7;
	color: #2e7d32;
}
.flow-hint-tools .flow-current {
	background: #4caf50;
}
.flow-hint-tools .flow-arrow {
	color: #a5d6a7;
}

.flow-hint-transport {
	background: linear-gradient(135deg, #fff8e1 0%, #e1f5fe 100%);
}
.flow-hint-transport .flow-label {
	color: #f9a825;
}
.flow-hint-transport .flow-item {
	border-color: #ffe082;
	color: #f57f17;
}
.flow-hint-transport .flow-current {
	background: #ff9800;
}
.flow-hint-transport .flow-arrow {
	color: #ffe082;
}

.flow-hint-staff {
	background: linear-gradient(135deg, #f3e5f5 0%, #e1bee7 100%);
}
.flow-hint-staff .flow-label {
	color: #7b1fa2;
}
.flow-hint-staff .flow-item {
	border-color: #ce93d8;
	color: #7b1fa2;
}
.flow-hint-staff .flow-current {
	background: #9c27b0;
}
.flow-hint-staff .flow-arrow {
	color: #ce93d8;
}

.flow-hint-buy {
	background: linear-gradient(135deg, #fce4ec 0%, #f8bbd9 100%);
}
.flow-hint-buy .flow-label {
	color: #c2185b;
}
.flow-hint-buy .flow-item {
	border-color: #f48fb1;
	color: #c2185b;
}
.flow-hint-buy .flow-current {
	background: #e91e63;
}
.flow-hint-buy .flow-arrow {
	color: #f48fb1;
}

.flow-hint-time {
	background: linear-gradient(135deg, #e0f7fa 0%, #b2ebf2 100%);
}
.flow-hint-time .flow-label {
	color: #00838f;
}
.flow-hint-time .flow-item {
	border-color: #80deea;
	color: #00838f;
}
.flow-hint-time .flow-current {
	background: #00bcd4;
}
.flow-hint-time .flow-arrow {
	color: #80deea;
}

.flow-hint-invoices {
	background: linear-gradient(135deg, #e8eaf6 0%, #c5cae9 100%);
}
.flow-hint-invoices .flow-label {
	color: #3949ab;
}
.flow-hint-invoices .flow-item {
	border-color: #9fa8da;
	color: #3949ab;
}
.flow-hint-invoices .flow-current {
	background: #5c6bc0;
}
.flow-hint-invoices .flow-arrow {
	color: #9fa8da;
}

.flow-hint-contacts {
	background: linear-gradient(135deg, #fff3e0 0%, #ffe0b2 100%);
}
.flow-hint-contacts .flow-label {
	color: #ef6c00;
}
.flow-hint-contacts .flow-item {
	border-color: #ffcc80;
	color: #ef6c00;
}
.flow-hint-contacts .flow-current {
	background: #ff9800;
}
.flow-hint-contacts .flow-arrow {
	color: #ffcc80;
}

.flow-hint-activation {
	background: linear-gradient(135deg, #f1f8e9 0%, #dcedc8 100%);
}
.flow-hint-activation .flow-label {
	color: #558b2f;
}
.flow-hint-activation .flow-item {
	border-color: #aed581;
	color: #558b2f;
}
.flow-hint-activation .flow-current {
	background: #8bc34a;
}
.flow-hint-activation .flow-arrow {
	color: #aed581;
}

.flow-hint-wishes {
	background: linear-gradient(135deg, #fffde7 0%, #fff9c4 100%);
}
.flow-hint-wishes .flow-label {
	color: #f9a825;
}
.flow-hint-wishes .flow-item {
	border-color: #ffee58;
	color: #f57f17;
}
.flow-hint-wishes .flow-current {
	background: #ffc107;
}
.flow-hint-wishes .flow-arrow {
	color: #ffee58;
}

.flow-hint-costs {
	background: linear-gradient(135deg, #fbe9e7 0%, #ffccbc 100%);
}
.flow-hint-costs .flow-label {
	color: #d84315;
}
.flow-hint-costs .flow-item {
	border-color: #ff8a65;
	color: #d84315;
}
.flow-hint-costs .flow-current {
	background: #ff5722;
}
.flow-hint-costs .flow-arrow {
	color: #ff8a65;
}

.flow-hint-systems {
	background: linear-gradient(135deg, #e8eaf6 0%, #d1d9ff 100%);
}
.flow-hint-systems .flow-label {
	color: #3f51b5;
}
.flow-hint-systems .flow-item {
	border-color: #9fa8da;
	color: #3f51b5;
}
.flow-hint-systems .flow-current {
	background: #5c6bc0;
}
.flow-hint-systems .flow-arrow {
	color: #9fa8da;
}

.flow-hint-rd {
	background: linear-gradient(135deg, #efebe9 0%, #d7ccc8 100%);
}
.flow-hint-rd .flow-label {
	color: #5d4037;
}
.flow-hint-rd .flow-item {
	border-color: #bcaaa4;
	color: #5d4037;
}
.flow-hint-rd .flow-current {
	background: #795548;
}
.flow-hint-rd .flow-arrow {
	color: #bcaaa4;
}

.flow-hint-summary {
	background: linear-gradient(135deg, #eceff1 0%, #cfd8dc 100%);
}
.flow-hint-summary .flow-label {
	color: #455a64;
}
.flow-hint-summary .flow-item {
	border-color: #90a4ae;
	color: #455a64;
}
.flow-hint-summary .flow-current {
	background: #607d8b;
}
.flow-hint-summary .flow-arrow {
	color: #90a4ae;
}

.flow-hint-calendar {
	background: linear-gradient(135deg, #e8f5e9 0%, #c8e6c9 100%);
}
.flow-hint-calendar .flow-label {
	color: #2e7d32;
}
.flow-hint-calendar .flow-item {
	border-color: #81c784;
	color: #2e7d32;
}
.flow-hint-calendar .flow-current {
	background: #4caf50;
}
.flow-hint-calendar .flow-arrow {
	color: #81c784;
}

/* === HELP TIPS === */
.help-toggle-btn {
	display: flex;
	align-items: center;
	gap: 6px;
	padding: 6px 12px;
	background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
	color: white;
	border: none;
	border-radius: 20px;
	font-size: 13px;
	font-weight: 500;
	cursor: pointer;
	transition: all 0.2s;
	margin-left: auto;
}

.help-toggle-btn:hover {
	transform: translateY(-1px);
	box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

.help-overlay {
	position: fixed;
	top: 0;
	left: 0;
	right: 0;
	bottom: 0;
	background: rgba(0, 0, 0, 0.5);
	display: flex;
	align-items: center;
	justify-content: center;
	z-index: 10000;
	padding: 20px;
}

.help-modal {
	background: white;
	border-radius: 16px;
	max-width: 600px;
	width: 100%;
	max-height: 80vh;
	overflow: hidden;
	display: flex;
	flex-direction: column;
	box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
}

.help-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 16px 20px;
	background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
	color: white;
}

.help-header h3 {
	margin: 0;
	font-size: 16px;
	font-weight: 600;
}

.help-body {
	padding: 16px 20px;
	overflow-y: auto;
	flex: 1;
}

.help-description {
	color: #64748b;
	font-size: 14px;
	margin-bottom: 16px;
	padding-bottom: 12px;
	border-bottom: 1px solid #e2e8f0;
}

.help-section {
	margin-bottom: 8px;
	border-radius: 8px;
	overflow: hidden;
}

.help-section-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	width: 100%;
	padding: 10px 12px;
	background: #f1f5f9;
	border: none;
	border-radius: 8px;
	font-size: 14px;
	font-weight: 600;
	color: #334155;
	cursor: pointer;
	transition: all 0.2s;
}

.help-section-header:hover {
	background: #e2e8f0;
}

.help-section-content {
	padding: 12px;
	background: #fafafa;
	border: 1px solid #e2e8f0;
	border-top: none;
	border-radius: 0 0 8px 8px;
}

.help-section-content ul {
	margin: 0;
	padding-left: 20px;
}

.help-section-content li {
	font-size: 13px;
	color: #475569;
	margin-bottom: 6px;
	line-height: 1.4;
}

.help-section-content li:last-child {
	margin-bottom: 0;
}

/* Small Buy Button */
.btn-buy {
	background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
	color: white;
	border: none;
	border-radius: 6px;
	padding: 4px 10px;
	font-size: 12px;
	font-weight: 500;
	cursor: pointer;
	display: inline-flex;
	align-items: center;
	gap: 4px;
	transition: all 0.2s;
	margin-top: 6px;
}

.btn-buy:hover {
	background: linear-gradient(135deg, #d97706 0%, #b45309 100%);
	transform: translateY(-1px);
}

.btn-sm {
	padding: 4px 10px;
	font-size: 12px;
}

/* Transport Tools Attachment */
.tools-attached-list {
	margin-bottom: 12px;
	min-height: 40px;
}

.tool-attached-item {
	display: flex;
	align-items: center;
	gap: 8px;
	padding: 6px 10px;
	background: #e0f2fe;
	border: 1px solid #0ea5e9;
	border-radius: 6px;
	margin-bottom: 6px;
}

.tool-attached-item .tool-name {
	flex: 1;
	font-weight: 500;
	color: #0369a1;
}

.tool-attached-item .tool-inv {
	font-size: 12px;
	color: #64748b;
}

.no-tools-attached {
	padding: 12px;
	text-align: center;
	color: #94a3b8;
	font-style: italic;
	background: #f1f5f9;
	border-radius: 6px;
}

.available-tools {
	display: flex;
	flex-direction: column;
	gap: 6px;
}

.available-tools label {
	font-size: 13px;
	font-weight: 500;
	color: #64748b;
}

.available-tools select {
	padding: 8px 12px;
	border: 1px solid #e2e8f0;
	border-radius: 6px;
	font-size: 13px;
}

/* ========== Activity Log ========== */
.log-filters {
	display: flex;
	gap: 16px;
	margin-bottom: 20px;
	padding: 16px;
	background: #f8f9fa;
	border-radius: 8px;
}

.log-container {
	max-height: 70vh;
	overflow-y: auto;
}

.log-item {
	display: flex;
	align-items: center;
	gap: 16px;
	padding: 12px 16px;
	border-bottom: 1px solid #e5e7eb;
	transition: background 0.2s;
}

.log-item:hover {
	background: #f9fafb;
}

.log-icon {
	font-size: 20px;
	width: 32px;
	text-align: center;
}

.log-content {
	flex: 1;
}

.log-description {
	font-weight: 500;
	color: #374151;
}

.log-meta {
	display: flex;
	gap: 16px;
	font-size: 12px;
	color: #6b7280;
	margin-top: 4px;
}

.log-user {
	display: flex;
	align-items: center;
	gap: 4px;
}

.log-target {
	display: flex;
	align-items: center;
	gap: 4px;
	padding: 4px 8px;
	background: #e5e7eb;
	border-radius: 4px;
	font-size: 12px;
	color: #374151;
}

/* ========== Reports ========== */
.report-filters {
	display: flex;
	gap: 16px;
	margin-bottom: 20px;
	padding: 16px;
	background: #f8f9fa;
	border-radius: 8px;
}

.stats-grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
	gap: 20px;
	margin-bottom: 30px;
}

.stat-card {
	display: flex;
	align-items: center;
	gap: 16px;
	padding: 20px;
	background: white;
	border-radius: 12px;
	box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.stat-icon {
	width: 48px;
	height: 48px;
	border-radius: 12px;
	display: flex;
	align-items: center;
	justify-content: center;
}

.stat-value {
	font-size: 28px;
	font-weight: 700;
	color: #1f2937;
}

.stat-label {
	font-size: 14px;
	color: #6b7280;
}

.charts-grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
	gap: 20px;
}

.chart-card {
	padding: 20px;
	background: white;
	border-radius: 12px;
	box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.chart-card h3 {
	display: flex;
	align-items: center;
	gap: 8px;
	margin: 0 0 16px;
	font-size: 16px;
	color: #374151;
}

.chart-content {
	display: flex;
	flex-direction: column;
	gap: 12px;
}

.chart-item {
	display: flex;
	align-items: center;
	gap: 12px;
}

.chart-label {
	width: 100px;
	font-size: 13px;
	color: #6b7280;
	white-space: nowrap;
}

.chart-bar-container {
	flex: 1;
	height: 20px;
	background: #f3f4f6;
	border-radius: 4px;
	overflow: hidden;
}

.chart-bar {
	height: 100%;
	border-radius: 4px;
	transition: width 0.3s ease;
}

.chart-value {
	width: 40px;
	text-align: right;
	font-weight: 600;
	font-size: 14px;
	color: #374151;
}

.empty-state {
	text-align: center;
	padding: 40px;
	color: #6b7280;
}

/* ================================
   WISHES / NOTES SECTION
   ================================ */
.wishes-list {
	display: flex;
	flex-direction: column;
	gap: 16px;
	padding: 16px;
}

.wish-card {
	background: white;
	border-radius: 8px;
	padding: 16px;
	box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.wish-header {
	display: flex;
	justify-content: space-between;
	align-items: flex-start;
	margin-bottom: 8px;
}

.wish-header h3 {
	font-size: 16px;
	font-weight: 600;
	color: #333;
}

.wish-status-badge {
	padding: 2px 8px;
	border-radius: 12px;
	font-size: 11px;
	font-weight: 500;
}

.wish-actions {
	display: flex;
	gap: 8px;
}

.wish-actions button {
	background: none;
	border: none;
	cursor: pointer;
	padding: 4px;
	border-radius: 4px;
	color: #666;
}

.wish-actions button:hover {
	background: #f0f0f0;
	color: #333;
}

.wish-meta {
	color: #666;
	font-size: 13px;
	margin-bottom: 8px;
}

.wish-description {
	color: #444;
	font-size: 14px;
	line-height: 1.5;
	white-space: pre-wrap;
	margin-bottom: 12px;
}

.wish-files {
	display: flex;
	align-items: center;
	gap: 8px;
	margin-bottom: 8px;
	font-size: 13px;
	color: #666;
}

.wish-file {
	color: #0d6efd;
	text-decoration: none;
	padding: 2px 8px;
	background: #e7f1ff;
	border-radius: 4px;
	margin-right: 4px;
}

.wish-file:hover {
	text-decoration: underline;
}

.wish-footer {
	font-size: 12px;
	color: #999;
	text-align: right;
}

/* ================================
   WISH FORM PAGE
   ================================ */
.wish-form-page {
	max-width: 800px;
	margin: 0 auto;
	padding: 20px;
}

.wish-form-container {
	background: white;
	border-radius: 12px;
	padding: 24px;
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
	margin-top: 20px;
}

.wish-form-container h2 {
	margin-top: 0;
	margin-bottom: 24px;
	color: #333;
}

.wish-form-container .form-section {
	display: flex;
	flex-direction: column;
	gap: 20px;
}

.wish-form-container .form-group label {
	display: block;
	font-weight: 600;
	margin-bottom: 8px;
	color: #444;
}

.wish-form-container .form-group input[type="text"],
.wish-form-container .form-group textarea,
.wish-form-container .form-group select {
	width: 100%;
	padding: 12px;
	border: 1px solid #ddd;
	border-radius: 8px;
	font-size: 15px;
}

.wish-form-container .form-group textarea {
	min-height: 150px;
	resize: vertical;
}

.wish-form-container .form-actions {
	display: flex;
	gap: 12px;
	margin-top: 24px;
	justify-content: flex-end;
}

/* Status buttons */
.status-buttons {
	display: flex;
	gap: 8px;
	flex-wrap: wrap;
}

.status-btn {
	padding: 8px 16px;
	border: 2px solid #ddd;
	border-radius: 8px;
	background: white;
	color: #666;
	font-size: 14px;
	font-weight: 500;
	cursor: pointer;
	transition: all 0.2s ease;
}

.status-btn:hover {
	border-color: #999;
	background: #f5f5f5;
}

.status-btn.active {
	background: #dc3545;
	border-color: #dc3545;
	color: white;
	font-weight: 600;
}

/* Quick status buttons */
.quick-status-btns {
	display: flex;
	gap: 4px;
}

.quick-status-btn {
	width: 32px;
	height: 32px;
	border: 2px solid #ddd;
	border-radius: 6px;
	background: white;
	font-size: 16px;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	transition: all 0.2s ease;
}

.quick-status-btn:hover {
	border-color: #999;
	transform: scale(1.1);
}

.quick-status-btn.active {
	background: #dc3545;
	border-color: #dc3545;
}

/* Quick status buttons */
.quick-status-btns {
	display: flex;
	gap: 30px;
	flex-wrap: nowrap;
}

.quick-status-btn {
	padding: 10px 40px;
	border: 4px solid #ddd;
	border-radius: 8px;
	background: white;
	color: #666;
	font-size: 14px;
	font-weight: 500;
	cursor: pointer;
	transition: all 0.2s ease;
	white-space: nowrap;
}

.quick-status-btn:hover {
	border-color: #dc3545;
	color: #dc3545;
}

.quick-status-btn.active {
	background: #dc3545;
	border: 6px solid #dc3545;
	color: white;
	font-weight: 600;
}

/* Wish card fix */
.wish-card-header {
	padding-left: 12px;
}

/* Wishes section spacing */
.wishes-grid {
	display: flex;
	flex-direction: column;
	gap: 10px;
}

.wish-card {
	margin-bottom: 10px;
	padding: 15px 20px;
}

.wish-card-header {
	display: flex;
	align-items: center;
	gap: 30px;
	margin-bottom: 10px;
}

.wish-card-header > * {
	margin: 0;
}

.wish-card h3 {
	margin: 10px 0;
}

.wish-desc,
.wish-meta {
	margin: 8px 0;
}

.wish-badges {
	gap: 30px;
}

/* Quick status buttons */
.quick-status-btns {
	display: flex;
	gap: 30px;
	flex-wrap: nowrap;
}

.quick-status-btn {
	padding: 10px 40px;
	border: 4px solid #ddd;
	border-radius: 8px;
	background: white;
	color: #666;
	font-size: 14px;
	font-weight: 500;
	cursor: pointer;
	transition: all 0.2s ease;
	white-space: nowrap;
}

.quick-status-btn:hover {
	border-color: #dc3545;
	color: #dc3545;
}

.quick-status-btn.active {
	background: #dc3545;
	border: 4px solid #dc3545;
	color: white;
	font-weight: 600;
}

/* Wish card */
.wish-card {
	margin-bottom: 10px;
	padding: 15px 20px;
}

.wish-card-header {
	display: flex;
	align-items: center;
	gap: 30px;
	margin-bottom: 10px;
}

.wish-card h3 {
	margin: 10px 0;
}

/* WISH DETAIL MODAL */
.wish-detail-modal {
	max-width: 600px;
	width: 95%;
	max-height: 85vh;
	overflow-y: auto;
	background: #fff;
	border-radius: 16px;
	box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
	padding: 0;
	animation: slideUp 0.2s ease;
}

@keyframes slideUp {
	from {
		opacity: 0;
		transform: translateY(20px);
	}
	to {
		opacity: 1;
		transform: translateY(0);
	}
}

.wish-detail-modal .modal-header {
	display: flex;
	justify-content: space-between;
	align-items: center;
	padding: 20px 24px;
	border-bottom: 2px solid #f0f0f0;
	background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
	border-radius: 16px 16px 0 0;
	margin: 0;
}

.wish-detail-modal .modal-header h3 {
	margin: 0;
	font-size: 18px;
	color: white;
	font-weight: 600;
}

.wish-detail-modal .modal-body {
	padding: 24px;
}

.modal-close {
	background: rgba(255, 255, 255, 0.2);
	border: none;
	font-size: 24px;
	cursor: pointer;
	color: white;
	padding: 4px 12px;
	border-radius: 8px;
	transition: all 0.2s;
}

.modal-close:hover {
	background: rgba(255, 255, 255, 0.3);
}

.detail-row {
	display: flex;
	align-items: center;
	gap: 12px;
	margin-bottom: 16px;
	padding: 12px 16px;
	background: #f8f9fa;
	border-radius: 10px;
}

.detail-label {
	font-weight: 600;
	color: #555;
	min-width: 110px;
	font-size: 14px;
}

.detail-section {
	margin-top: 24px;
	padding-top: 20px;
	border-top: 2px solid #f0f0f0;
}

.detail-text {
	background: #f0f4f8;
	padding: 16px;
	border-radius: 12px;
	white-space: pre-wrap;
	margin-top: 10px;
	line-height: 1.6;
	color: #333;
	border: 1px solid #e0e0e0;
}

.detail-files {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
	margin-top: 8px;
}

.file-link {
	display: inline-flex;
	align-items: center;
	gap: 5px;
	padding: 8px 12px;
	background: #e3f2fd;
	border-radius: 6px;
	color: #1976d2;
	text-decoration: none;
	font-size: 14px;
}

.file-link:hover {
	background: #bbdefb;
}

.detail-comments {
	margin-top: 8px;
}

.comment-item-detail {
	background: #f8f9fa;
	padding: 12px;
	border-radius: 8px;
	margin-bottom: 10px;
}

.comment-meta {
	display: flex;
	justify-content: space-between;
	margin-bottom: 5px;
	font-size: 12px;
}

.comment-author {
	font-weight: 600;
	color: #1976d2;
}

.comment-date {
	color: #999;
}

.comment-text {
	color: #333;
	line-height: 1.4;
}

.modal-actions {
	display: flex;
	justify-content: flex-end;
	gap: 10px;
	margin-top: 20px;
	padding-top: 15px;
	border-top: 1px solid #eee;
}

/* Status Select */
.status-select {
	padding: 8px 16px;
	border-radius: 8px;
	border: 2px solid #ddd;
	font-size: 14px;
	font-weight: 500;
	cursor: pointer;
	background: white;
	transition: all 0.2s;
}

.status-select:hover {
	border-color: #667eea;
}

.status-select:focus {
	outline: none;
	border-color: #667eea;
	box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.2);
}

/* WISHES COLUMNS */
.wishes-columns {
	display: grid;
	grid-template-columns: repeat(4, 1fr);
	gap: 16px;
	min-height: calc(100vh - 200px);
}

.wish-column {
	background: #f8f9fa;
	border-radius: 12px;
	overflow: hidden;
	display: flex;
	flex-direction: column;
}

.wish-column-header {
	padding: 12px 16px;
	background: white;
	display: flex;
	justify-content: space-between;
	align-items: center;
}

.wish-column-header h3 {
	margin: 0;
	font-size: 14px;
	font-weight: 600;
}

.wish-count {
	background: #e9ecef;
	padding: 2px 8px;
	border-radius: 10px;
	font-size: 12px;
	font-weight: 600;
}

.wish-column-body {
	padding: 12px;
	flex: 1;
	overflow-y: auto;
}

.wish-empty {
	text-align: center;
	color: #adb5bd;
	padding: 30px 0;
	font-style: italic;
}

/* COMPACT WISH CARD */
.wish-card-compact {
	background: white;
	border-radius: 8px;
	padding: 12px;
	margin-bottom: 10px;
	cursor: pointer;
	transition: all 0.2s;
	border: 1px solid #e9ecef;
	box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.wish-card-compact:hover {
	box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
	transform: translateY(-2px);
}

.wish-card-compact-header {
	display: flex;
	justify-content: space-between;
	align-items: center;
	margin-bottom: 8px;
}

.wish-card-actions {
	display: flex;
	gap: 4px;
}

.wish-card-actions button {
	background: none;
	border: none;
	padding: 4px;
	cursor: pointer;
	border-radius: 4px;
	transition: background 0.2s;
}

.wish-card-actions button:hover {
	background: #f0f0f0;
}

.wish-card-compact h4 {
	margin: 0 0 6px 0;
	font-size: 14px;
	font-weight: 600;
	color: #333;
}

.wish-footer {
	display: flex;
	justify-content: space-between;
	align-items: center;
	margin-top: 8px;
	font-size: 11px;
	color: #6c757d;
}

.wish-footer span {
	display: flex;
	align-items: center;
	gap: 2px;
}

@media (max-width: 1200px) {
	.wishes-columns {
		grid-template-columns: repeat(2, 1fr);
	}
}

@media (max-width: 768px) {
	.wishes-columns {
		grid-template-columns: 1fr;
	}
}

#systems-dropdown.show {
	display: block !important;
}

/* Documentation badges in table */
.doc-badges {
	display: flex;
	gap: 4px;
	margin-bottom: 4px;
}

.doc-badge {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 28px;
	height: 24px;
	padding: 0 6px;
	font-size: 11px;
	font-weight: 600;
	border-radius: 4px;
	background: #e5e7eb;
	color: #6b7280;
}

.doc-badge.rd {
	background: #dbeafe;
	color: #1d4ed8;
}

.doc-badge.id {
	background: #cffafe;
	color: #0891b2;
}

.doc-badge.pd {
	background: #dcfce7;
	color: #16a34a;
}

.doc-badge.empty {
	background: #e5e7eb;
	color: #9ca3af;
}

/* === DOCUMENTATION MODAL STYLES === */
.modal-documents {
	width: 900px;
	max-width: 95vw;
	height: 700px;
	max-height: 90vh;
	display: flex;
	flex-direction: column;
}

.modal-documents .modal-header {
	padding: 20px 24px;
	border-bottom: 1px solid #e5e7eb;
	flex-shrink: 0;
}

.modal-documents .modal-header h2 {
	font-size: 1.25rem;
	font-weight: 600;
	color: #1f2937;
}

.modal-documents .modal-body {
	flex: 1;
	overflow-y: auto;
	padding: 24px;
}

/* Search */
.doc-search {
	display: flex;
	align-items: center;
	gap: 10px;
	padding: 12px 16px;
	background: #f3f4f6;
	border-radius: 8px;
	margin-bottom: 24px;
}

.doc-search input {
	flex: 1;
	border: none;
	background: transparent;
	font-size: 14px;
	outline: none;
}

.doc-search svg {
	color: #9ca3af;
}

/* Folder type cards - larger and more spacious */
.doc-types-grid {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 20px;
	margin-bottom: 20px;
}

.doc-type-card {
	padding: 28px 20px;
	border-radius: 12px;
	border: 2px solid;
	cursor: pointer;
	transition: all 0.2s ease;
	text-align: center;
}

.doc-type-card:hover {
	transform: translateY(-2px);
	box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
}

.doc-type-card.inactive {
	opacity: 0.6;
}

.doc-type-icon {
	margin-bottom: 12px;
}

.doc-type-info h4 {
	font-size: 15px;
	font-weight: 600;
	margin-bottom: 6px;
}

.doc-type-count {
	font-size: 13px;
	color: #6b7280;
}

.doc-type-empty {
	font-size: 12px;
	color: #9ca3af;
}

/* Breadcrumb */
.doc-breadcrumb {
	display: flex;
	align-items: center;
	gap: 12px;
	padding: 12px 16px;
	background: #f9fafb;
	border-radius: 8px;
	margin-bottom: 20px;
}

.doc-back-btn {
	padding: 6px 12px;
	background: white;
	border: 1px solid #e5e7eb;
	border-radius: 6px;
	cursor: pointer;
	font-size: 13px;
	color: #374151;
}

.doc-back-btn:hover {
	background: #f3f4f6;
}

.doc-current-folder {
	font-weight: 600;
	font-size: 15px;
}

/* Actions */
.doc-actions {
	display: flex;
	gap: 10px;
	margin-bottom: 20px;
}

.doc-actions .btn {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	padding: 10px 16px;
	font-size: 14px;
	border-radius: 8px;
}

/* Create folder */
.doc-create-folder {
	display: flex;
	gap: 10px;
	padding: 16px;
	background: #f0fdf4;
	border: 1px solid #86efac;
	border-radius: 8px;
	margin-bottom: 20px;
}

.doc-create-folder input {
	flex: 1;
	padding: 10px 14px;
	border: 1px solid #d1d5db;
	border-radius: 6px;
	font-size: 14px;
}

/* Sections */
.doc-section {
	margin-bottom: 24px;
}

.doc-section h4 {
	font-size: 13px;
	font-weight: 600;
	color: #6b7280;
	text-transform: uppercase;
	letter-spacing: 0.5px;
	margin-bottom: 12px;
}

/* Folders list */
.doc-folders-list {
	display: flex;
	flex-direction: column;
	gap: 8px;
}

.doc-folder-item {
	display: flex;
	align-items: center;
	gap: 12px;
	padding: 12px 16px;
	background: white;
	border: 1px solid #e5e7eb;
	border-radius: 8px;
	transition: all 0.15s ease;
}

.doc-folder-item:hover {
	background: #f9fafb;
	border-color: #d1d5db;
}

.doc-folder-name {
	flex: 1;
	font-size: 14px;
	color: #374151;
	cursor: pointer;
}

.doc-folder-name:hover {
	color: #1d4ed8;
}

/* Files list */
.doc-files-list {
	display: flex;
	flex-direction: column;
	gap: 8px;
}

.doc-file-item {
	display: flex;
	align-items: center;
	gap: 12px;
	padding: 14px 16px;
	background: white;
	border: 1px solid #e5e7eb;
	border-radius: 8px;
	transition: all 0.15s ease;
}

.doc-file-item:hover {
	background: #f9fafb;
	border-color: #d1d5db;
}

.doc-file-info {
	flex: 1;
	min-width: 0;
}

.doc-file-name {
	display: block;
	font-size: 14px;
	color: #374151;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.doc-file-meta {
	font-size: 12px;
	color: #9ca3af;
}

.doc-file-actions {
	display: flex;
	gap: 6px;
}

/* Empty state */
.doc-empty {
	text-align: center;
	padding: 48px 20px;
	color: #9ca3af;
}

.doc-empty svg {
	margin-bottom: 12px;
	opacity: 0.5;
}

.doc-empty p {
	font-size: 16px;
	font-weight: 500;
	margin-bottom: 4px;
	color: #6b7280;
}

.doc-empty span {
	font-size: 13px;
}
* {
	margin: 0;
	padding: 0;
	box-sizing: border-box;
}

:root {
	--primary: #2563eb;
	--primary-dark: #1d4ed8;
	--primary-light: #3b82f6;
	--success: #10b981;
	--success-light: #d1fae5;
	--warning: #f59e0b;
	--warning-light: #fef3c7;
	--danger: #ef4444;
	--gray-50: #f9fafb;
	--gray-100: #f3f4f6;
	--gray-200: #e5e7eb;
	--gray-300: #d1d5db;
	--gray-400: #9ca3af;
	--gray-500: #6b7280;
	--gray-600: #4b5563;
	--gray-700: #374151;
	--gray-800: #1f2937;
	--gray-900: #111827;
	--border: #e5e7eb;
	--shadow: 0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1);
	--shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
	--shadow-lg:
		0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
}

body {
	font-family:
		-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue",
		Arial, sans-serif;
	background: var(--gray-100);
	color: var(--gray-900);
	line-height: 1.5;
	min-height: 100vh;
}

#root {
	min-height: 100vh;
}

button {
	cursor: pointer;
	font-family: inherit;
}

input,
select,
textarea {
	font-family: inherit;
}

::-webkit-scrollbar {
	width: 8px;
	height: 8px;
}

::-webkit-scrollbar-track {
	background: var(--gray-100);
}

::-webkit-scrollbar-thumb {
	background: var(--gray-300);
	border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
	background: var(--gray-400);
}

/* Systems Excel Table */
.systems-excel-container {
	overflow-x: auto;
	max-height: calc(100vh - 200px);
	border: 1px solid #ddd;
	border-radius: 8px;
	margin-top: 16px;
}

.systems-excel-table {
	width: 100%;
	border-collapse: collapse;
	font-size: 13px;
	white-space: nowrap;
}

.systems-excel-table th,
.systems-excel-table td {
	border: 1px solid #ddd;
	padding: 8px 10px;
	text-align: left;
}

.systems-excel-table thead th {
	background: #f5f5f5;
	font-weight: 600;
	position: sticky;
	top: 0;
	z-index: 10;
}

.excel-sticky-col {
	position: sticky;
	left: 0;
	background: #fff;
	z-index: 5;
	min-width: 200px;
	font-weight: 600;
	border-right: 2px solid #999;
}

.systems-excel-table thead .excel-sticky-col {
	z-index: 15;
	background: #f5f5f5;
}

.excel-system-header {
	background: #e8f4fc !important;
	text-align: center;
	font-weight: 700;
	color: #1a5f7a;
}

.excel-col-header {
	background: #f0f7ff !important;
	font-size: 11px;
	text-align: center;
	font-weight: 500;
}

.excel-object-cell {
	background: #fafafa;
	font-weight: 600;
}

.excel-cell {
	cursor: pointer;
	min-width: 80px;
}

.excel-cell:hover {
	background: #fffde7;
}

.excel-cell.editing {
	padding: 4px;
}

.excel-cell.empty-cell {
	color: #ccc;
}

.excel-input {
	width: 100%;
	border: 2px solid #2196f3;
	border-radius: 4px;
	padding: 4px 8px;
	font-size: 13px;
	outline: none;
}

.systems-help {
	margin-top: 12px;
	padding: 12px;
	background: #f5f5f5;
	border-radius: 8px;
	color: #666;
	font-size: 13px;
}

.systems-help p {
	margin: 0;
}

/* Systems Section - новый дизайн */
.excel-system-col {
	min-width: 150px;
	background: #e8f4fc !important;
	font-weight: 700;
	color: #1a5f7a;
	position: sticky;
	left: 0;
	z-index: 10;
	border-right: 2px solid #999;
}

.excel-system-cell {
	background: #f0f7ff !important;
	position: sticky;
	left: 0;
	z-index: 5;
}

.excel-system-cell .system-name {
	font-weight: 600;
	margin-right: 8px;
}

.excel-object-header {
	min-width: 120px;
	background: #f5f5f5 !important;
	font-weight: 600;
	font-size: 12px;
	writing-mode: vertical-rl;
	text-orientation: mixed;
	transform: rotate(180deg);
	height: 150px;
	padding: 8px 4px !important;
	border-bottom: 2px solid #999;
}

.excel-object-header:last-child {
	border-right: none;
}

.systems-excel-container {
	overflow-x: auto;
	max-height: calc(100vh - 250px);
	border: 1px solid #ddd;
	border-radius: 8px;
	margin-top: 16px;
}

.systems-excel-table {
	width: 100%;
	border-collapse: collapse;
	font-size: 13px;
}

.systems-excel-table th,
.systems-excel-table td {
	border: 1px solid #ddd;
	padding: 6px 8px;
	text-align: left;
	white-space: nowrap;
}

.systems-excel-table thead th {
	background: #f5f5f5;
	font-weight: 600;
	position: sticky;
	top: 0;
	z-index: 10;
}

.excel-cell {
	cursor: pointer;
	min-width: 60px;
}

.excel-cell:hover {
	background: #fffde7;
}

.excel-cell.editing {
	padding: 2px;
}

.excel-cell.empty-cell {
	color: #ccc;
	background: #fafafa;
}

.excel-input {
	width: 100%;
	border: 2px solid #2196f3;
	border-radius: 4px;
	padding: 2px 4px;
	font-size: 12px;
	outline: none;
}

.btn-sm {
	padding: 2px 6px;
	font-size: 11px;
}

.systems-help {
	margin-top: 12px;
	padding: 12px;
	background: #f5f5f5;
	border-radius: 8px;
	color: #666;
	font-size: 13px;
}

.add-form-section {
	margin-bottom: 16px;
}

/* Object Panel */
.object-panel-overlay {
	position: fixed;
	top: 0;
	left: 0;
	right: 0;
	bottom: 0;
	background: rgba(0, 0, 0, 0.5);
	z-index: 1000;
	display: flex;
	justify-content: flex-end;
}

.object-panel {
	width: 450px;
	max-width: 90vw;
	height: 100vh;
	background: white;
	box-shadow: -2px 0 10px rgba(0, 0, 0, 0.2);
	overflow-y: auto;
	padding: 20px;
}

.object-panel-header {
	display: flex;
	justify-content: space-between;
	align-items: center;
	margin-bottom: 20px;
	padding-bottom: 15px;
	border-bottom: 2px solid #007bff;
}

.object-panel-header h3 {
	margin: 0;
	color: #007bff;
}

.object-panel-info {
	background: #f8f9fa;
	padding: 15px;
	border-radius: 8px;
	margin-bottom: 20px;
}

.object-panel-info p {
	margin: 5px 0;
}

.object-panel h4 {
	margin: 15px 0 10px;
}

.object-panel-systems {
	display: flex;
	flex-direction: column;
	gap: 10px;
}

.system-card {
	border: 1px solid #dee2e6;
	border-radius: 8px;
	padding: 12px;
	background: #fff;
}

.system-card-header {
	display: flex;
	justify-content: space-between;
	align-items: center;
	margin-bottom: 8px;
	padding-bottom: 8px;
	border-bottom: 1px solid #eee;
}

.system-card-header strong {
	color: #007bff;
}

.badge-success {
	background: #28a745;
	color: white;
	padding: 2px 8px;
	border-radius: 12px;
	font-size: 12px;
}

.system-card-fields {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 5px;
}

.field-row {
	display: flex;
	gap: 5px;
	font-size: 13px;
}

.field-row label {
	color: #6c757d;
	min-width: 60px;
}

.field-row em {
	color: #adb5bd;
	font-size: 12px;
}

.add-system-row td {
	background: #e8f4ff !important;
	border-top: 2px dashed #007bff;
}
