:root {
	--primary: #4361ee;
	--primary-light: #eef2ff;
	--secondary: #3f37c9;
	--success: #4cc9f0;
	--danger: #f72585;
	--warning: #f8961e;
	--info: #4895ef;
	--dark: #212529;
	--light: #f8f9fa;
	--gray: #6c757d;
	--gray-light: #e9ecef;
	--border-radius: 8px;
	--shadow-sm: 0 1px 3px rgba(0,0,0,0.12);
	--shadow-md: 0 4px 6px rgba(0,0,0,0.1);
	--shadow-lg: 0 10px 15px rgba(0,0,0,0.1);
	--transition: all 0.2s ease;
	
	--bg:#f6f7f9;
	--card:#fff;
	--muted:#7b7f87;
	--accent:#2463ff;
	--danger:#e74c3c;
	--radius:8px;
	--gap:8px;
}

* {
	box-sizing: border-box;
	margin: 0;
	padding: 0;
}

body {
	font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
	line-height: 1.6;
	color: var(--dark);
	background-color: #f5f7fa;
	-webkit-font-smoothing: antialiased;
}

.tab-content {
	display: none;
}

.tab-content.active {
	display: block;
}

.hidden {
	display: none !important;
}

.container {
	max-width: 1400px;
	margin: 0 auto;
	padding: 0 20px;
}

/* Header */
.app-header {
	background-color: white;
	box-shadow: var(--shadow-sm);
	padding: 16px 0;
	position: sticky;
	top: 0;
	z-index: 100;
}

.header-content {
	display: flex;
	justify-content: space-between;
	align-items: center;
}

.app-title {
	font-size: 20px;
	font-weight: 600;
	color: var(--primary);
	display: flex;
	align-items: center;
	gap: 10px;
}

.app-title svg {
	width: 24px;
	height: 24px;
}

.user-info {
	display: flex;
	align-items: center;
	gap: 12px;
}

.user-avatar {
	width: 36px;
	height: 36px;
	border-radius: 50%;
	background-color: var(--primary-light);
	display: flex;
	align-items: center;
	justify-content: center;
	color: var(--primary);
	font-weight: 600;
	font-size: 14px;
}

.logout-btn {
	background: none;
	border: none;
	color: var(--gray);
	cursor: pointer;
	display: flex;
	align-items: center;
	gap: 6px;
	font-size: 14px;
	padding: 6px 10px;
	border-radius: var(--border-radius);
	transition: var(--transition);
}

.logout-btn:hover {
	background-color: var(--gray-light);
	color: var(--danger);
}

/* Main layout */
.main-layout {
	display: grid;
	grid-template-columns: 240px 1fr;
	gap: 24px;
	padding: 24px 0;
    height: calc(100vh - 80px); /* Высота минус высота header */
}

/*Order Vkladka*/

.order-tab {
	padding: 8px 16px;
	background-color: var(--gray-light);
	border-radius: var(--border-radius);
	cursor: pointer;
	font-size: 14px;
	white-space: nowrap;
	display: flex;
	align-items: center;
	gap: 8px;
	transition: var(--transition);
}

.order-tab.active {
	background-color: var(--primary);
	color: white;
}

.order-tab .close-tab {
	background: none;
	border: none;
	color: inherit;
	cursor: pointer;
	display: flex;
	align-items: center;
	padding: 0;
}

.order-form {
	display: none;
}

.order-form.active {
	display: block;
}

/* Sidebar */
.sidebar {
	background-color: white;
	border-radius: var(--border-radius);
	box-shadow: var(--shadow-sm);
	padding: 20px 0;
	height: fit-content;
	position: sticky;
	top: 80px;
    max-height: calc(100vh - 104px); /* Максимальная высота с учетом отступов */
}

.nav-item {
	display: flex;
	align-items: center;
	padding: 12px 20px;
	color: var(--dark);
	text-decoration: none;
	font-weight: 500;
	transition: var(--transition);
	border-left: 3px solid transparent;
}

.nav-item:hover {
	background-color: var(--primary-light);
	color: var(--primary);
}

.nav-item.active {
	background-color: var(--primary-light);
	color: var(--primary);
	border-left-color: var(--primary);
}

.nav-item svg {
	width: 20px;
	height: 20px;
	margin-right: 12px;
}

/* Content area */
.content-area {
	background-color: white;
	border-radius: var(--border-radius);
	box-shadow: var(--shadow-sm);
	padding: 24px;
	height: calc(100vh - 128px); /* Высота с учетом отступов */
    overflow-y: auto; /* Включаем прокрутку */
}

.content-header {
	display: flex;
	justify-content: space-between;
	align-items: center;
	margin-bottom: 24px;
}

.content-title {
	font-size: 20px;
	font-weight: 600;
}

/* Search and filters */
.search-bar {
	display: flex;
	gap: 12px;
	margin-bottom: 20px;
}

.search-input {
	flex: 1;
	padding: 10px 16px;
	border: 1px solid var(--gray-light);
	border-radius: var(--border-radius);
	font-size: 14px;
	transition: var(--transition);
}

.search-input:focus {
	outline: none;
	border-color: var(--primary);
	box-shadow: 0 0 0 3px rgba(67, 97, 238, 0.2);
}

/* Buttons */
.btn {
	padding: 10px 16px;
	border-radius: var(--border-radius);
	font-weight: 500;
	font-size: 14px;
	cursor: pointer;
	transition: var(--transition);
	border: none;
	display: inline-flex;
	align-items: center;
	gap: 8px;
}

.btn svg {
	width: 16px;
	height: 16px;
}

.btn-primary {
	background-color: var(--primary);
	color: white;
}

.btn-primary:hover {
	background-color: var(--secondary);
}

.btn-outline {
	background-color: white;
	border: 1px solid var(--gray-light);
	color: var(--dark);
}

.btn-outline:hover {
	background-color: var(--gray-light);
}

.btn-success {
	background-color: #10b981;
	color: white;
}

.btn-danger {
	background-color: var(--danger);
	color: white;
}

.btn-sm {
	padding: 6px 12px;
	font-size: 13px;
}

/* Table */
.orders-table-container {
	scrollbar-width: thin;
	scrollbar-color: var(--gray-light) white;
}

.orders-table-container::-webkit-scrollbar {
	width: 8px;
	height: 8px;
}

.orders-table-container::-webkit-scrollbar-track {
	background: white;
}

.orders-table-container::-webkit-scrollbar-thumb {
	background-color: var(--gray-light);
	border-radius: 4px;
}

.orders-table {
	width: 100%;
	border-collapse: separate;
	border-spacing: 0;
	font-size: 14px;
}

.orders-table th {
	background-color: var(--light);
	color: var(--gray);
	font-weight: 600;
	text-align: left;
	padding: 8px 12px;
	border-bottom: 1px solid var(--gray-light);
	top: 0;
}

.orders-table td {
	padding: 8px 12px;
	border-bottom: 1px solid var(--gray-light);
	vertical-align: middle;
}

.orders-table tr:last-child td {
	border-bottom: none;
}

.orders-table tr:hover td {
	background-color: var(--primary-light);
}

/* Status badges */
.status-badge {
	display: inline-flex;
	align-items: center;
	padding: 6px 12px;
	border-radius: 20px;
	font-size: 12px;
	font-weight: 500;
	color: white;
}

.status-new {
	background-color: var(--warning);
}

.status-ready {
	background-color: var(--success);
}

.status-deleted {
	background-color: #ff0000;
	color: #000000;
}

.status-delivered {
	background-color: var(--info);
}

.status-completed {
	background-color: #8b5cf6;
}

.status-notinstalled {
	background-color: #ff5029;
}

/* Order ID */
.order-id {
	font-weight: 600;
	color: var(--primary);
}

/* Finance info */
.finance-no-debt {
	color: var(--success);
}

.finance-debt {
	color: var(--danger);
}

/* Previews */
.previews-mini {
  display: flex;
  gap: 5px;
  overflow-x: auto;
  overflow-y: hidden;
  max-width: 120px; /* ширина ячейки, подбираешь под себя */
  scrollbar-width: thin; /* тонкий скролл в Firefox */
}

.previews-mini::-webkit-scrollbar {
  height: 6px; /* высота скроллбара */
}

.previews-mini::-webkit-scrollbar-thumb {
  background-color: rgba(0, 0, 0, 0.3);
  border-radius: 3px;
}

.preview-mini {
	flex: 0 0 auto;
	width: 48px;
	height: 48px;
	object-fit: cover;
	border-radius: 6px;
	border: 1px solid var(--gray-light);
	cursor: pointer;
	transition: var(--transition);
}

.preview-mini:hover {
	transform: scale(1.1);
	box-shadow: var(--shadow-sm);
	z-index: 1000;
}

/* Action buttons */
.table-actions {
	display: flex;
	gap: 8px;
}

.action-btn {
	width: 32px;
	height: 32px;
	border-radius: 6px;
	border: none;
	background-color: var(--primary-light);
	color: var(--primary);
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	transition: var(--transition);
}

.action-btn:hover {
	background-color: var(--primary);
	color: white;
}

.action-btn.danger {
	background-color: #fee2e2;
	color: var(--danger);
}

.action-btn.danger:hover {
	background-color: var(--danger);
	color: white;
}

.action-btn.success {
	background-color: #dcfce7;
	color: #10b981;
}

.action-btn.success:hover {
	background-color: #10b981;
	color: white;
}

.form-actions {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
    margin-top: 20px;
}

.loan-card {
	transition: var(--transition);
}

.loan-card:hover {
	box-shadow: var(--shadow-sm);
}

/* Стили для прокрутки */
.modal-body {
	scrollbar-width: thin;
	scrollbar-color: var(--gray-light) white;
}

.modal-body::-webkit-scrollbar {
	width: 8px;
}

.modal-body::-webkit-scrollbar-track {
	background: white;
}

.modal-body::-webkit-scrollbar-thumb {
	background-color: var(--gray-light);
	border-radius: 4px;
}


/* Modal */
.modal {
	display: none;
	position: fixed;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	background-color: rgba(0,0,0,0.5);
	z-index: 1000;
	justify-content: center;
	align-items: center;
}

.modal-content {
	background-color: white;
	border-radius: var(--border-radius);
	width: 90%;
	max-width: 800px;
	max-height: 90vh;
	overflow-y: auto;
	padding: 24px;
	box-shadow: var(--shadow-lg);
	position: relative;
}

.modal-content-debtoraddnew {
	background-color: white;
	border-radius: var(--border-radius);
	max-width: 800px;
	max-height: 90vh;
	overflow-y: auto;
	padding: 24px;
	box-shadow: var(--shadow-lg);
	position: relative;
}

.modal-header {
	display: flex;
	justify-content: space-between;
	align-items: center;
	margin-bottom: 20px;
	padding-bottom: 16px;
	border-bottom: 1px solid var(--gray-light);
}

.modal-title {
    display: flex;
    align-items: center;
    gap: 8px;
}

.compact-view {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 12px;
    padding: 16px;
    background: var(--primary-light);
    border-radius: var(--border-radius);
}

.info-item {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.info-label {
    font-size: 12px;
    color: var(--gray);
    font-weight: 500;
}

.info-value {
    font-size: 14px;
    font-weight: 500;
    color: var(--dark);
}

.finance-summary {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    padding: 16px;
    background: var(--light);
    border-radius: var(--border-radius);
}

.finance-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
}

.finance-label {
    font-size: 12px;
    color: var(--gray);
}

.finance-value {
    font-size: 16px;
    font-weight: 600;
}

.finance-value.success {
    color: var(--success);
}

.finance-value.danger {
    color: var(--danger);
}

.payments-section {
    padding: 16px;
    background: var(--light);
    border-radius: var(--border-radius);
}

.payments-list.compact {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.payment-item.compact {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 12px;
    background: white;
    border-radius: 6px;
    border: 1px solid var(--gray-light);
}

.order-details {
    padding: 16px;
    background: var(--light);
    border-radius: var(--border-radius);
}

.details-content {
    font-size: 14px;
    line-height: 1.5;
    color: var(--dark);
    padding: 12px;
    background: white;
    border-radius: 6px;
    border: 1px solid var(--gray-light);
}

.previews-section {
    padding: 16px;
    background: var(--light);
    border-radius: var(--border-radius);
}

.previews-container.compact {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(80px, 1fr));
    gap: 8px;
}

.preview-image.compact {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border-radius: 6px;
    border: 2px solid var(--gray-light);
    cursor: pointer;
    transition: var(--transition);
}

.preview-image.compact:hover {
    transform: scale(1.05);
    border-color: var(--primary);
}

.modal-footer.compact {
    padding: 16px;
    border-top: 1px solid var(--gray-light);
    background: var(--light);
}

.close-modal {
	background: none;
	border: none;
	font-size: 24px;
	cursor: pointer;
	color: var(--gray);
	transition: var(--transition);
}

.close-modal:hover {
	color: var(--danger);
}

.modal-body {
	display: grid;
	gap: 24px;
}

.modal-section {
	margin-bottom: 20px;
}

.section-title {
    font-size: 14px;
    font-weight: 600;
    color: var(--primary);
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.section-title::before {
    content: "";
    width: 4px;
    height: 16px;
    background: var(--primary);
    border-radius: 2px;
}

.info-row {
	display: flex;
	margin-bottom: 12px;
}

.info-label {
	width: 120px;
	color: var(--gray);
	font-size: 14px;
}

.info-value {
	flex: 1;
	font-weight: 500;
}

/* Previews in modal */
.previews-container {
	display: flex;
	gap: 12px;
	overflow-x: auto;
	padding: 0px 0;
	margin: 0px 0;
}

.preview-image {
	width: 150px;
	height: 150px;
	object-fit: cover;
	border-radius: 8px;
	border: 1px solid var(--gray-light);
	cursor: pointer;
	transition: var(--transition);
}

.preview-image:hover {
	transform: scale(1.03);
	box-shadow: var(--shadow-sm);
}

/* Payments */
.payments-list {
	margin-top: 16px;
}

.payment-item {
	display: flex;
	justify-content: space-between;
	padding: 12px 0;
	border-bottom: 1px solid var(--gray-light);
}

.payment-item:last-child {
	border-bottom: none;
}

.payment-method {
	font-weight: 500;
}

.payment-amount {
	font-weight: 600;
	color: #10b981;
}

/* Modal footer */
.modal-footer {
	display: flex;
	justify-content: flex-end;
	gap: 12px;
	margin-top: 24px;
	padding-top: 16px;
	border-top: 1px solid var(--gray-light);
}

/* Login screen */
.login-screen {
	display: flex;
	justify-content: center;
	align-items: center;
	min-height: 100vh;
	background-color: #f5f7fa;
	padding: 20px;
}

.login-card {
	background-color: white;
	border-radius: var(--border-radius);
	box-shadow: var(--shadow-lg);
	padding: 40px;
	width: 100%;
	max-width: 400px;
	text-align: center;
}

.login-logo {
	margin-bottom: 24px;
}

.login-title {
	font-size: 24px;
	font-weight: 600;
	margin-bottom: 24px;
	color: var(--primary);
}

.form-group {
	margin-bottom: 20px;
	text-align: left;
}

.form-label {
	display: block;
	margin-bottom: 2px;
	font-weight: 500;
	font-size: 14px;
}

.form-control {
	width: 100%;
	padding: 12px 16px;
	border: 1px solid var(--gray-light);
	border-radius: var(--border-radius);
	font-size: 14px;
	transition: var(--transition);
}

.form-control:focus {
	outline: none;
	border-color: var(--primary);
	box-shadow: 0 0 0 3px rgba(67, 97, 238, 0.2);
}

.login-btn {
	width: 100%;
	margin-top: 16px;
}

/* Empty state */
.empty-state {
	text-align: center;
	padding: 40px 20px;
}

.empty-icon {
	margin-bottom: 16px;
	color: var(--gray-light);
}

.empty-text {
	color: var(--gray);
	margin-bottom: 24px;
}


@media (max-width: 768px) {
	.modal-body {
		grid-template-columns: 1fr;
	}
	
	.orders-table th, 
	.orders-table td {
		padding: 12px;
		font-size: 13px;
	}
	
	.preview-mini {
		width: 36px;
		height: 36px;
	}
	
	.login-card {
		padding: 30px 20px;
	}
}

/* Icons */
.icon {
	width: 20px;
	height: 20px;
}

/* Checkbox */
.checkbox-container {
	display: flex;
	align-items: center;
	margin-bottom: 16px;
}

.checkbox-input {
	margin-right: 8px;
}

.checkbox-label {
	font-size: 14px;
}

/* Добавьте в секцию стилей */
.form-section {
	background-color: var(--light);
	border-radius: var(--border-radius);
	padding: 20px;
	margin-bottom: 24px;
}

.radio-group {
	display: flex;
	gap: 16px;
	margin-top: 2px;
}

.radio-label {
	display: flex;
	align-items: center;
	gap: 6px;
	cursor: pointer;
}

.payment-block {
	background-color: white;
	border: 1px solid var(--gray-light);
	border-radius: var(--border-radius);
	padding: 12px;
	margin-bottom: 12px;
}

.payment-row {
	display: flex;
	gap: 12px;
	align-items: flex-end;
}

.preview-upload {
	border: 2px dashed var(--gray-light);
	border-radius: var(--border-radius);
	padding: 2px;
	text-align: center;
	cursor: pointer;
	transition: var(--transition);
	margin-bottom: 16px;
}

.preview-upload:hover {
	border-color: var(--primary);
	background-color: var(--primary-light);
}


.file-upload {
	border: 2px dashed var(--gray-light);
	border-radius: var(--border-radius);
	padding: 5px;
	text-align: center;
	cursor: pointer;
	transition: var(--transition);
	margin-bottom: 10px;
}

.file-upload:hover {
	border-color: var(--primary);
	background-color: var(--primary-light);
}

.preview-item {
	position: relative;
	width: 60px;
	height: 60px;
	border-radius: 8px;
	overflow: hidden;
	box-shadow: var(--shadow-sm);
}

.file-item {
	position: relative;
	width: 100px;
	height: 100px;
	border-radius: 8px;
	overflow: hidden;
	background-color: var(--primary-light);
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	padding: 8px;
	box-shadow: var(--shadow-sm);
	text-align: center;
}		

/* Вкладка / контейнер ограничение по высоте */
.addorder-form-shell{
	max-height:500px;
	max-width: 1048px;
	display:flex;
	gap:30px;
	align-items:flex-start;
	overflow:hidden;
}

/* Left column with inputs, right column scrollable */
.addorder-left, .addorder-right, .addorder-center { 
	display:flex; 
	flex-direction:column; 
	gap:8px; 
}

.addorder-left { 
	flex: 1 1 320px;
	min-width:320px; 
}

.addorder-center {
	width:360px; 
	max-width:35%;
}

.addorder-right { 
	width:400px; 
	max-width:35%;
}

.addorder-input[type="text"], .addorder-input[type="number"], .addorder-textarea {
	width:100%;
	box-sizing:border-box;
	border:1px solid #e0e4ea;
	border-radius:8px;
	padding:8px 10px;
	background:#fff;
	outline: none;
	font-size:13px;
}

.addorder-textarea{
	resize: none;
	height: 100px;
	line-height: 1.2;
	overflow: auto
}
.addorder-label-small{font-size:12px;color:var(--muted);display:block;margin-bottom:4px}

/* кнопки */
.addorder-btn {
	display:inline-flex;
	align-items:center;
	gap:8px;
	background:#fff;
	border:1px solid #e0e4ea;
	padding:8px 10px;
	border-radius:8px;
	cursor:pointer;
	user-select:none;
	font-size:13px;
}

.addorder-btn-primary{
	background:linear-gradient(180deg,var(--accent),#174dbb);
	color:#fff;
	border:0;
}

.addorder-btn-ghost{background:transparent;border:1px dashed #e0e4ea}

.addorder-small{
	padding: 8px 10px;
	font-size: 12px;
	border-radius: 6px
}

.addorder-row { 
	display:flex; 
	gap:8px; 
	align-items:center;
	flex-wrap:wrap; 
	flex-wrap: nowrap;
}

.addorder-muted{color:var(--muted);font-size:13px}

/* previews */
.addorder-thumbs {
	display:flex;
	gap:8px;
	align-items:center;
	overflow-x:auto;
	padding-bottom:4px;
}

.addorder-thumb {
	width:56px;height:42px;border-radius:6px;
	border:1px solid #e6e9ee; background:#fafafa;
	position:relative; flex:0 0 56px; display:flex;align-items:center;justify-content:center;
}

.addorder-thumb img{max-width:100%; max-height:100%; border-radius:6px; object-fit:cover;}

.addorder-thumb .addorder-del {
	position:absolute; top:-8px; right:-8px; width:20px;height:20px;border-radius:50%;
	display:flex;align-items:center;justify-content:center;font-weight:bold;
	background:var(--danger); color:#fff; cursor:pointer; font-size:12px; box-shadow:0 2px 6px rgba(0,0,0,0.15)
}

/* toggle group for Цех/Офис */
.addorder-toggle-group{display:flex; gap:6px; align-items:center;}

.addorder-toggle-btn{
	padding:6px 10px; 
	border-radius:8px; 
	border:1px solid #e0e4ea; 
	cursor:pointer; 
	background:#fff; 
	font-size:13px;
}

.addorder-toggle-btn-active{
	background: var(--accent); 
	color: #fff; 
	border-color: transparent
}

/* payments */
.addorder-payments { display:flex; flex-direction:column; gap:8px; }

.addorder-payment-row {
display: flex;
flex-direction: column; /* теперь элементы можно располагать вертикально */
gap: 6px;
padding: 8px;
border: 1px solid #e0e4ea;
border-radius: 8px;
background: #f9faff; /* лёгкий фон, чтобы было видно, что это один блок */
}

.addorder-payment-top {
	display: flex;
	gap: 8px;
	align-items: center;
}
.addorder-payment-bottom {
	display: flex;
	gap: 6px;
	align-items: center;
}


.addorder-payment-row input[type="number"]{width:120px;padding-right:6px}

.addorder-method-switch {
	display:flex; 
	gap:6px;
	width: 100%;
}

.addorder-method-btn{
	padding:6px 8px;
	border-radius:6px;
	border:1px solid #e0e4ea;
	cursor:pointer;
}

.addorder-method-btn-active {
	background:#111;
	color:#fff;
	border-color:transparent
}

.addorder-percent-buttons {
	display:flex; 
	gap:6px; 
	margin-left:auto;
}

.addorder-percent-buttons button{padding:6px 8px;border-radius:6px;border:1px solid #e0e4ea;background:#fff;cursor:pointer}

.addorder-percent-buttons button.addorder-secondary{background:#f0f3ff;color:#1631b5;border-color:transparent}

/* files area */
.addorder-dropzone {
border:1px dashed #e0e4ea;border-radius:8px;padding:8px; min-height:68px; display:flex; align-items:center; gap:8px;
background:#fff;
}

.drop-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(255, 255, 255, 0.9);
  border: 2px dashed var(--accent);
  border-radius: 8px;
  display: none;
  justify-content: center;
  align-items: center;
  z-index: 1000;
  pointer-events: none;
}

.drop-text {
  font-size: 18px;
  font-weight: bold;
  color: var(--accent);
  text-align: center;
}

.drop-overlay.visible {
  display: flex;
}


.addorder-files-list {
display: flex;
flex-direction: column;
gap: 6px;
max-height: 70px;
overflow: auto;
padding-right: 6px;
flex: 1;         /* вот это ключевое */
min-width: 0;    /* важно для flex-элементов, чтобы не ломать размеры */
}

.addorder-file-item{display:flex;align-items:center;gap:8px;background:#f7f8fb;padding:6px;border-radius:6px}

.addorder-file-item .addorder-name{flex:1; font-size:13px; color:#111}

.addorder-file-item .addorder-del{cursor:pointer;color:var(--danger);font-weight:bold;padding:4px 6px}

/* bottom action */
.addorder-footer {
	margin-top: auto; display:flex; justify-content:flex-end; gap:8px; align-items:center;
}

/* compact helpers */
.addorder-muted-small{
	font-size:12px;
	color:var(--muted)
}

.addorder-scrollable-right{overflow:auto;max-height:220px;padding-right:6px}

/* responsive */
@media (max-width:860px) {

	.addorder-form-shell{
		flex-direction:column; 
		max-height:none
	}
	
	.addorder-right {
		width:auto
	}
}

.method-buttons {
	display: flex;
	gap: 8px;
	margin-top: 5px;
}

.method-btn {
	flex: 1;
	padding: 8px 12px;
	border: 1px solid #e0e4ea;
	border-radius: 8px;
	background: white;
	cursor: pointer;
	transition: all 0.2s ease;
}

.method-btn.active {
	background: var(--primary);
	color: white;
	border-color: var(--primary);
}

#payment-modal .modal-content {
	width: 500px; /* Оптимальный размер */
}


.loader {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(0,0,0,.3);
    border-radius: 50%;
    border-top-color: var(--accent);
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.status-filters {
    display: flex;
    gap: 8px;
    margin-bottom: 16px;
    flex-wrap: wrap;
}

.status-filter-btn {
    padding: 8px 12px;
    border: 1px solid #ddd;
    background: #f5f5f5;
    border-radius: 4px;
    cursor: pointer;
}

.status-filter-btn.active {
    background: #007bff;
    color: white;
    border-color: #007bff;
}

.no-results .empty-state {
    text-align: center;
    padding: 40px 0;
    color: #666;
}

.error-message .empty-state.error {
    color: #ff4d4f;
}

.btn-retry {
    background: #1890ff;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 4px;
    cursor: pointer;
    margin-top: 16px;
}

.btn-retry:hover {
    background: #40a9ff;
}

tr.updating {
    opacity: 0.6;
    transition: opacity 0.3s ease;
}

tr.updated {
    background-color: rgba(46, 204, 113, 0.2);
    transition: background-color 2s ease;
}

.month-filter {
    padding: 8px 12px;
    border-radius: 4px;
    border: 1px solid #ddd;
    background-color: white;
    font-size: 14px;
    margin-right: 10px;
    cursor: pointer;
}

.password-input-container {
    position: relative;
    display: flex;
    align-items: center;
}

.password-input-container input {
    padding-right: 40px;
    width: 100%;
}

.toggle-password {
    position: absolute;
    right: 8px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
    color: var(--gray);
    border-radius: 4px;
}

.toggle-password:hover {
    color: var(--dark);
    background-color: var(--light-gray);
}

.status-active {
    background-color: var(--success);
    color: white;
}

.status-inactive {
    background-color: var(--gray);
    color: var(--text);
}

.finance-filters {
    display: flex;
    gap: 8px;
    margin-bottom: 16px;
    flex-wrap: wrap;
    align-items: center;
}

.finance-filter-btn {
    padding: 8px 12px;
    border: 1px solid #e0e4ea;
    border-radius: 6px;
    background: white;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s ease;
}

.finance-filter-btn:hover {
    background: #f8f9fa;
    border-color: #4361ee;
}

.finance-filter-btn.active {
    background: #4361ee;
    color: white;
    border-color: #4361ee;
}

.finance-filters .form-control {
    min-width: 120px;
    height: 36px;
}

.finance-filters input[type="date"] {
    min-width: 140px;
    height: 36px;
}

/* Добавьте эти стили в styles.css */
.today-orders-sidebar {
    margin-top: 20px;
    padding: 16px;
    background: white;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-sm);
}

.today-orders-header {
    margin-bottom: 12px;
}

.today-orders-header h3 {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
}

.today-orders-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    overflow-y: auto;
    max-height: 400px;
    
    /* Скрываем scrollbar по умолчанию */
    scrollbar-width: none; /* Для Firefox */
}

/* Скрываем scrollbar по умолчанию для Webkit */
.today-orders-list::-webkit-scrollbar {
    width: 0;
    background: transparent;
}

/* Показываем scrollbar при наведении */
.today-orders-list:hover {
    /* Для Firefox */
    scrollbar-width: thin;
    scrollbar-color: #c1c1c1 #f8f9fa;
}

.today-orders-list:hover::-webkit-scrollbar {
    width: 4px; /* Очень тонкий ползунок */
}

.today-orders-list:hover::-webkit-scrollbar-track {
    background: #f8f9fa; /* Светлый фон трека */
    border-radius: 2px;
    margin: 4px 0;
}

.today-orders-list:hover::-webkit-scrollbar-thumb {
    background: #c1c1c1; /* Цвет ползунка */
    border-radius: 2px;
}

.today-orders-list:hover::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8; /* Цвет при наведении */
}

.today-order-number {
    font-weight: 600;
    color: #4361ee;
    margin-bottom: 0px;
	
	display: flex;
    justify-content: space-between;
    align-items: center;
}

.today-order-phone {
    color: #6c757d;
    font-size: 14px;
    margin-bottom: 0px;
}

.today-order-notify-btn {
	position: static; /* или static */
    right: 20px;
    margin-left: auto; /* выравнивание вправо */
    padding: 6px 6px;
    background: #4361ee;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 10px;
    transition: background-color 0.2s;
}

.today-order-notify-btn:hover {
    background: #3a56d4;
}

.today-order-item {
	border-bottom: 3px solid #cfd7fa; 
}

.today-order-empty {
    text-align: center;
    color: #6c757d;
    font-style: italic;
    padding: 20px;
}

/*уведомления*/
.notification-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 10000;
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-width: 350px;
}

.notification {
    padding: 15px 20px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    animation: slideIn 0.3s ease-out;
    transition: transform 0.3s ease, opacity 0.3s ease;
    position: relative;
    overflow: hidden;
}

.notification.success {
    background-color: #4caf50;
    color: white;
    border-left: 4px solid #2e7d32;
}

.notification.error {
    background-color: #f44336;
    color: white;
    border-left: 4px solid #c62828;
}

.notification.fade-out {
    animation: slideOut 0.3s ease-in forwards;
}

.notification-close {
    position: absolute;
    top: 5px;
    right: 5px;
    background: none;
    border: none;
    color: inherit;
    cursor: pointer;
    font-size: 16px;
    opacity: 0.7;
    transition: opacity 0.2s;
}

.notification-close:hover {
    opacity: 1;
}

@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes slideOut {
    from {
        transform: translateX(0);
        opacity: 1;
    }
    to {
        transform: translateX(100%);
        opacity: 0;
    }
}

/* Стили для модального окна редактирования */
#edit-previews-container {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 15px;
}

#edit-previews-container img {
  width: 80px;
  height: 80px;
  object-fit: cover;
  border-radius: 4px;
  cursor: pointer;
  border: 2px solid #e0e4ea;
}

#edit-previews-container img:hover {
  border-color: #4361ee;
}

.checkbox-label {
  display: flex;
  align-items: center;
  cursor: pointer;
  margin-bottom: 10px;
}

.checkbox-label input[type="checkbox"] {
  margin-right: 10px;
}

.checkmark {
  position: relative;
  height: 20px;
  width: 20px;
  background-color: #fff;
  border: 2px solid #ccc;
  border-radius: 3px;
  margin-right: 10px;
}

.checkbox-label input[type="checkbox"]:checked ~ .checkmark {
  background-color: #4361ee;
  border-color: #4361ee;
}

.checkmark:after {
  content: "";
  position: absolute;
  display: none;
  left: 6px;
  top: 2px;
  width: 5px;
  height: 10px;
  border: solid white;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

.checkbox-label input[type="checkbox"]:checked ~ .checkmark:after {
  display: block;
}

/* Стили для группировки платежей */
.payment-group-row {
    background-color: #f8f9fa;
    cursor: pointer;
    font-weight: 500;
}

.payment-group-row:hover {
    background-color: #e9ecef;
}

.payment-group-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.toggle-group-btn {
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
    border-radius: 4px;
}

.toggle-group-btn:hover {
    background-color: #dee2e6;
}

.toggle-group-btn svg {
    transition: transform 0.2s ease;
}

.payment-child-row {
    background-color: #fafafa;
}

.payment-child-name {
    padding-left: 20px !important;
    color: #6c757d;
}

.hidden {
    display: none;
}

.customer-dropdown-btn {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
    border-radius: 4px;
    color: #666;
}

.customer-dropdown-btn:hover {
    background-color: #f0f0f0;
}

.customer-suggestions {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border: 1px solid #ddd;
    border-top: none;
    border-radius: 0 0 4px 4px;
    max-height: 200px;
    overflow-y: auto;
    z-index: 1000;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.customer-suggestion-item {
    padding: 8px 12px;
    cursor: pointer;
    border-bottom: 1px solid #f0f0f0;
}

.customer-suggestion-item:hover,
.customer-suggestion-item.selected {
    background-color: #f5f5f5;
}

.customer-suggestion-item:last-child {
    border-bottom: none;
}

.customer-name {
    font-weight: 500;
}

.customer-phone {
    font-size: 13px;
    color: #666;
}


.custom-confirm-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 10000;
  animation: fadeIn 0.3s ease;
}

.custom-confirm-modal {
  background: white;
  padding: 24px;
  border-radius: 12px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
  max-width: 400px;
  width: 90%;
  text-align: center;
  animation: slideUp 0.3s ease;
}

.custom-confirm-message {
  font-size: 16px;
  margin-bottom: 20px;
  color: #333;
  line-height: 1.5;
}

.custom-confirm-buttons {
  display: flex;
  gap: 12px;
  justify-content: center;
}

.custom-confirm-btn {
  padding: 10px 20px;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 500;
  transition: all 0.2s ease;
  min-width: 100px;
}

.custom-confirm-cancel {
  background: #f0f0f0;
  color: #666;
}

.custom-confirm-cancel:hover {
  background: #e0e0e0;
}

.custom-confirm-continue {
  background: #007bff;
  color: white;
}

.custom-confirm-continue:hover {
  background: #0056b3;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes slideUp {
  from { 
    opacity: 0;
    transform: translateY(20px);
  }
  to { 
    opacity: 1;
    transform: translateY(0);
  }
}


.preview-zoomed {
  position: fixed;
  max-width: 400px;
  max-height: 400px;
  border: 2px solid white;
  border-radius: 8px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.3);
  z-index: 1001;
  pointer-events: none;
  background: white;
  object-fit: contain;
}

.preview-wrapper {
  position: relative;
  display: inline-block;
  margin-right: 5px;
}

.search-container {
    display: flex;
    align-items: center;
    gap: 10px;
}

#search-payments {
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
}

#search-payments:focus {
    outline: none;
    border-color: #4361ee;
    box-shadow: 0 0 0 2px rgba(67, 97, 238, 0.2);
}