/* ============================================================
   ЕДИНАЯ ТЕМА АДМИНКИ
   Подключается после встроенных стилей страницы: меняет только
   внешний вид, не затрагивая разметку, id и JavaScript.
   ============================================================ */
:root {
  --accent:#c96a2b;
  --accent-hover:#b85a1f;
  --dark:#151922;
  --muted:#667085;
  --soft:#f4f6f9;
  --border:#e6e9ef;

  --ui-bg:#f4f6f9;
  --ui-surface:#fff;
  --ui-ink:#151922;
  --ui-muted:#667085;
  --ui-line:#e6e9ef;
  --ui-brand:#c96a2b;
  --ui-brand-2:#b85a1f;
  --ui-brand-soft:#fff4ea;
  --ui-green:#159c6b;
  --ui-radius:16px;
  --ui-shadow:0 1px 2px rgba(16,24,40,.04), 0 8px 24px rgba(16,24,40,.05);
}

/* ---- Основа ---- */
html, body { background:var(--ui-bg) !important; color:var(--ui-ink) !important; }
.bi { line-height:1; vertical-align:-.125em; }
::selection { background:rgba(201,106,43,.18); }

/* ---- Верхняя панель (одинаковая на всех страницах) ---- */
.topbar {
  background:#151a23 !important;
  padding:11px 28px !important;
  border-bottom:1px solid rgba(255,255,255,.07);
  box-shadow:0 4px 18px rgba(15,23,42,.14);
}
.topbar .logo { font-size:15px; font-weight:800; letter-spacing:-.2px; }
.topbar .logo span { color:#e8a86a !important; }
.topbar .logo .logo-img { height:30px; }
.topbar-nav { margin-left:26px; gap:3px !important; }
.topbar-nav a {
  padding:8px 13px !important; font-size:12px; font-weight:650;
  color:rgba(255,255,255,.68); border-radius:9px;
}
.topbar-nav a:hover { background:rgba(255,255,255,.08); color:#fff; }
.topbar-nav a.active {
  background:var(--ui-brand) !important; color:#fff !important;
  box-shadow:0 4px 12px rgba(201,106,43,.28);
}
.topbar a, .topbar button { font-size:12px; padding:8px 13px; }
.topbar-actions button {
  background:rgba(255,255,255,.08) !important;
  border:1px solid rgba(255,255,255,.1) !important;
}
.topbar-actions button:hover { background:rgba(255,255,255,.16) !important; }
.topbar-dropdown-menu { background:#1d2430; border-color:rgba(255,255,255,.1); border-radius:12px; }
.topbar-dropdown-menu button > .bi { color:#e8a86a; }

/* ---- Раскладка ---- */
.wrap { padding-top:22px; }
.card {
  background:var(--ui-surface);
  border:1px solid var(--ui-line);
  border-radius:var(--ui-radius);
  box-shadow:var(--ui-shadow);
  padding:20px;
}
.card + .card { margin-top:16px; }
.card-head { margin-bottom:16px; }
.card-head h2 { font-size:15px; font-weight:800; letter-spacing:-.3px; }
.card-head h2 .bi { color:var(--ui-brand); }

/* ---- Кнопки ---- */
.btn {
  border-radius:9px; font-size:12px; font-weight:700;
  transition:background .15s, box-shadow .15s, transform .15s;
}
.btn-primary { background:var(--ui-brand); color:#fff; }
.btn-primary:hover:not(:disabled) {
  background:var(--ui-brand-2); box-shadow:0 6px 16px rgba(201,106,43,.24);
}
.btn-dark { background:#222936; }
.btn-dark:hover:not(:disabled) { background:#323b4b; }
.btn-ghost { background:#fff; border-color:var(--ui-line); color:#3a4250; }
.btn-ghost:hover:not(:disabled) { background:#f6f8fb; border-color:#d3d9e2; }
.btn-danger { background:#fff5f5; border-color:#fbd5d5; }
.btn-green { background:var(--ui-green); }
.btn-green:hover:not(:disabled) { background:#0f7f57; }
.btn-sm { padding:6px 10px; }

/* ---- Поля ввода ---- */
.field label, .filter-group label {
  font-size:9.5px; font-weight:800; letter-spacing:.8px;
  color:#8a94a3; margin-bottom:6px;
}
.field input, .field select, .field textarea,
.filter-group select, .filter-group input,
.search-box input, .ef-add-form input {
  background:#fff; border:1px solid var(--ui-line);
  border-radius:9px; padding:10px 12px;
  font-size:12.5px; font-weight:550; color:var(--ui-ink);
  box-shadow:none;
}
.field input:hover, .field select:hover, .field textarea:hover,
.filter-group select:hover, .filter-group input:hover { border-color:#cfd6e0; }
.field input:focus, .field select:focus, .field textarea:focus,
.filter-group select:focus, .filter-group input:focus,
.search-box input:focus, .ef-add-form input:focus {
  border-color:var(--ui-brand); background:#fff;
  box-shadow:0 0 0 3px rgba(201,106,43,.12);
  outline:none;
}
.field input::placeholder, .field textarea::placeholder,
.search-box input::placeholder { color:#aab2bf; }
.search-box input { padding-left:38px !important; }
.grid-2, .grid-3 { gap:12px; }

/* ---- Таблицы ---- */
table { font-size:12.5px; }
th {
  background:#f8fafc; color:#8a94a3;
  padding:10px 8px; border-bottom:1px solid var(--ui-line);
  font-size:9.5px; letter-spacing:.7px;
}
td { padding:10px 8px; border-bottom-color:#eef1f5; }
tr:hover td { background:#fafbfd; }
th.sortable:hover, th.sortable.active .sort-icon { color:var(--ui-brand); }

/* ---- Модальные окна ---- */
.modal-overlay { background:rgba(15,23,42,.52); backdrop-filter:blur(2px); }
.modal {
  border:1px solid var(--ui-line); border-radius:20px;
  box-shadow:0 30px 70px rgba(15,23,42,.28);
}
.modal-head { border-bottom-color:var(--ui-line); }
.modal-head h3 { font-size:17px; color:#1b222d; }
.modal-head .sub { color:var(--ui-muted); font-size:11.5px; }
.modal-close { background:#f4f6f9; }
.modal-close:hover { background:#e8ecf2; }
.order-row { border-bottom-color:#eef1f5; }
.order-row .or-sum { color:var(--ui-brand); }

/* ---- Уведомления ---- */
.toast-wrap { bottom:22px; }
.toast {
  background:#1d2430; border-radius:11px; padding:11px 16px;
  font-size:12.5px; box-shadow:0 12px 32px rgba(15,23,42,.24);
}

/* ============================================================
   КАЛЕНДАРЬ
   ============================================================ */
.cal-nav-group, .view-toggle {
  background:#f8fafc; border-color:var(--ui-line); border-radius:11px;
}
.nav-btn, .btn-today {
  background:#fff; border:1px solid var(--ui-line); border-radius:8px;
}
.nav-btn:hover, .btn-today:hover { color:var(--ui-brand); border-color:#cfd6e0; }
.view-toggle button.active { color:var(--ui-brand); box-shadow:0 2px 6px rgba(16,24,40,.08); }
.cal-grid-wrap { border-color:var(--ui-line); border-radius:14px; }
.cal-weekdays { background:#f8fafc; border-bottom-color:var(--ui-line); }
.cal-grid { background:var(--ui-line); }
.cal-day { background:#fff; }
.cal-day:hover { background:#fafbfd; }
.cal-day.other-month { background:#fafbfc; }
.cal-day.today { background:#fff4ea; }
.cal-day.today .cal-day-num { background:var(--ui-brand); }
.cal-day-sum { color:var(--ui-brand); }
.mini-month { border-color:var(--ui-line); border-radius:12px; }
.mini-month-head { border-bottom-color:#eef1f5; }
.mini-month-head:hover { color:var(--ui-brand); }
.mini-month-sum { color:var(--ui-brand); }
.mini-day.has-events { background:#fff4ea; color:var(--ui-brand); }
.day-est { border-radius:10px; }
.day-est:hover { box-shadow:0 4px 14px rgba(201,106,43,.12); }
.stat-badge-item { border-color:var(--ui-line); border-radius:10px; }

/* ============================================================
   КЛИЕНТЫ
   ============================================================ */
.filters {
  background:#f8fafc; border:1px solid var(--ui-line);
  border-radius:12px; padding:14px 16px;
}
.filter-reset { border-color:var(--ui-line); border-radius:9px; background:#fff; }
.filter-reset:hover { border-color:var(--ui-brand); color:var(--ui-brand); }
.filter-count { background:#eef1f5; }
.filter-count b { color:var(--ui-brand); }
.client-name { color:#1b222d; }
.total-sum { color:var(--ui-brand); }
.badge-orders { border-radius:7px; }
.pagination-btn { border-color:var(--ui-line); border-radius:9px; }
.pagination-btn:hover:not(:disabled) { border-color:var(--ui-brand); color:var(--ui-brand); }
.pagination-btn.active { background:var(--ui-brand); border-color:var(--ui-brand); }
.empty-row td { color:var(--ui-muted); }

/* ============================================================
   ТОВАРЫ
   ============================================================ */
.tree-toolbar { background:#f8fafc; border-radius:12px; }
.tree-toolbar button { border-color:var(--ui-line); border-radius:8px; }
.tree-toolbar button:hover:not(:disabled) { border-color:var(--ui-brand); color:var(--ui-brand); }
.tree-toolbar #catSearch:focus { box-shadow:0 0 0 3px rgba(201,106,43,.12); }
.legend, .breadcrumbs { background:#fff; border-color:var(--ui-line); border-radius:10px; }
.breadcrumbs .crumb { color:var(--ui-brand); }
.breadcrumbs .crumb.current { color:#1b222d; }
.breadcrumbs .sep { color:#b8c0cc; }
.tree-node-head.is-folder { background:#fffaf5; border-color:#f2d2b5; }
.tree-node-head.is-folder:hover { background:#fbe7d4; }
.tree-node-head.is-leaf { background:#f8fafc; border-color:var(--ui-line); }
.tree-node-head.is-leaf:hover { background:#eef1f5; }
.tree-node-head.selected { box-shadow:0 0 0 2px rgba(201,106,43,.18); }
.tree-node-head .node-name { color:#1b222d; }
.tree-node-head .node-subtree-count { background:rgba(201,106,43,.08); }
.tree-product { border-color:var(--ui-line); border-radius:10px; }
.tree-product:hover { background:#fffaf5; }
.tree-product .p-price { color:var(--ui-brand); }
.tree-product .p-actions button:hover { color:var(--ui-brand); }
.bulk-bar { background:#1d2430; border-radius:14px; box-shadow:0 12px 32px rgba(15,23,42,.24); }
.bulk-bar .bulk-count b { color:#e8a86a; }
.sync-field.checked, .cat-selected { background:rgba(201,106,43,.07); }

/* ============================================================
   НАСТРОЙКИ
   ============================================================ */
.settings-page-head h1 { font-size:21px; letter-spacing:-.5px; }
.settings-page-head h1 .bi { color:var(--ui-brand); }
.settings-sidebar {
  background:#fff; border:1px solid var(--ui-line);
  border-radius:var(--ui-radius); box-shadow:var(--ui-shadow);
}
.settings-tab { font-size:13px; }
.settings-tab:hover { background:#f6f8fb; color:#1b222d; }
.settings-tab.active {
  color:var(--ui-brand); background:var(--ui-brand-soft);
  border-color:rgba(201,106,43,.2);
}
.settings-section { border-bottom-color:var(--ui-line); }
.settings-section-title { color:var(--ui-brand); }
.settings-footer {
  background:#fff; border:1px solid var(--ui-line);
  border-radius:14px; box-shadow:0 12px 34px rgba(16,24,40,.14);
}
.info-banner:not(.warn):not(.success) { background:#f8fafc; border-color:var(--ui-line); }
.info-banner:not(.warn):not(.success) > .bi,
.info-banner:not(.warn):not(.success) a { color:var(--ui-brand); }
.label-with-hint label { margin-bottom:0; }
.ef-card { background:#f8fafc; border-color:var(--ui-line); border-radius:14px; }
.ef-card-head .ef-name:focus { box-shadow:0 0 0 3px rgba(201,106,43,.12); }
.ef-card-head .ef-key { background:#eef1f5; }
.ef-photo-add:hover { background:var(--ui-brand-soft); }
.ef-add-form input:focus { box-shadow:0 0 0 3px rgba(201,106,43,.12); }
.about-card-item { background:#f8fafc; border-color:var(--ui-line); }
.about-card-item .ac-num { color:var(--ui-brand); }
.img-preview.has-image { border-color:var(--ui-line); }
.hint-icon:hover { background:var(--ui-brand); }


/* ============================================================
   СМЕТЫ — полный слой редизайна (перенесён из smeta.html)
   ============================================================ */
/* ============================================================
   РЕДИЗАЙН СТРАНИЦЫ СМЕТ — логика и разметка остаются прежними
   ============================================================ */
:root {
  --ui-bg:#f4f6f9;
  --ui-surface:#fff;
  --ui-ink:#151922;
  --ui-muted:#667085;
  --ui-line:#e6e9ef;
  --ui-brand:#c96a2b;
  --ui-brand-2:#b85a1f;
  --ui-brand-soft:#fff4ea;
  --ui-green:#159c6b;
  --ui-radius:16px;
  --ui-shadow:0 1px 2px rgba(16,24,40,.04), 0 8px 24px rgba(16,24,40,.05);
}

/* ---- Основа ---- */
html, body { background:var(--ui-bg) !important; color:var(--ui-ink) !important; }
body { min-width:1100px; }
::selection { background:rgba(201,106,43,.18); }

/* ---- Верхняя панель ---- */
.topbar {
  background:#151a23 !important;
  padding:11px 28px !important;
  border-bottom:1px solid rgba(255,255,255,.07);
  box-shadow:0 4px 18px rgba(15,23,42,.14);
}
.topbar .logo { font-size:15px; font-weight:800; letter-spacing:-.2px; }
.topbar .logo span { color:#e8a86a !important; }
.topbar .logo .logo-img { height:30px; }
.topbar-nav { margin-left:26px; gap:3px !important; }
.topbar-nav a {
  padding:8px 13px !important; font-size:12px; font-weight:650;
  color:rgba(255,255,255,.68); border-radius:9px;
}
.topbar-nav a:hover { background:rgba(255,255,255,.08); color:#fff; }
.topbar-nav a.active {
  background:var(--ui-brand) !important; color:#fff !important;
  box-shadow:0 4px 12px rgba(201,106,43,.28);
}
.topbar a, .topbar button { font-size:12px; padding:8px 13px; }
.topbar-actions button {
  background:rgba(255,255,255,.08) !important;
  border:1px solid rgba(255,255,255,.1) !important;
}
.topbar-actions button:hover { background:rgba(255,255,255,.16) !important; }

/* ---- Раскладка ---- */
.wrap { max-width:1680px; padding:22px 28px 28px; }
.split { grid-template-columns:400px minmax(0, 1fr); gap:20px; }
.split-side { top:70px; height:calc(100vh - 86px); }
.card {
  background:var(--ui-surface);
  border:1px solid var(--ui-line);
  border-radius:var(--ui-radius);
  box-shadow:var(--ui-shadow);
  padding:20px;
}
.split-side > .card { padding:18px; }
.card + .card { margin-top:16px; }

/* ---- Кнопки ---- */
.btn {
  border-radius:9px; font-size:12px; font-weight:700;
  transition:background .15s, box-shadow .15s, transform .15s;
}
.btn-primary { background:var(--ui-brand); color:#fff; }
.btn-primary:hover:not(:disabled) {
  background:var(--ui-brand-2); box-shadow:0 6px 16px rgba(201,106,43,.24);
}
.btn-dark { background:#222936; }
.btn-dark:hover:not(:disabled) { background:#323b4b; }
.btn-ghost {
  background:#fff; border-color:var(--ui-line); color:#3a4250;
}
.btn-ghost:hover:not(:disabled) { background:#f6f8fb; border-color:#d3d9e2; }
.btn-danger { background:#fff5f5; border-color:#fbd5d5; }
.btn-sm { padding:6px 10px; }

/* ---- Поля ввода ---- */
.field label {
  font-size:9.5px; font-weight:800; letter-spacing:.8px;
  color:#8a94a3; margin-bottom:6px;
}
.field input, .field select, .field textarea {
  background:#fff; border:1px solid var(--ui-line);
  border-radius:9px; padding:10px 12px;
  font-size:12.5px; font-weight:550; color:var(--ui-ink);
}
.field input:hover, .field select:hover, .field textarea:hover { border-color:#cfd6e0; }
.field input:focus, .field select:focus, .field textarea:focus {
  border-color:var(--ui-brand); background:#fff;
  box-shadow:0 0 0 3px rgba(201,106,43,.12);
}
.field input::placeholder, .field textarea::placeholder { color:#aab2bf; }
.grid-2 { gap:12px; }
.grid-3 { gap:12px; }

/* ---- Заголовок списка смет ---- */
.list-head { margin-bottom:14px !important; }
.list-head h2 { font-size:15px; font-weight:800; letter-spacing:-.3px; }
.head-icon {
  width:28px; height:28px; border-radius:8px; font-size:13px;
  background:var(--ui-brand-soft); color:var(--ui-brand);
  border:1px solid rgba(201,106,43,.16);
}
.list-search input {
  padding-left:36px !important;
  background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' fill='none' stroke='%239aa4b2' stroke-width='2' viewBox='0 0 24 24'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cpath d='m20 20-3.5-3.5'/%3E%3C/svg%3E") !important;
  background-repeat:no-repeat !important; background-position:12px center !important;
}

/* ---- Фильтр статусов ---- */
.sf-badge { background:var(--ui-brand); }
.sf-panel {
  border:1px solid var(--ui-line); border-radius:14px;
  box-shadow:0 18px 44px rgba(16,24,40,.16);
}
.sf-panel-head { color:#8a94a3; }
.sf-item { padding:9px 11px; border-radius:10px; background:#fff; border-color:var(--ui-line); }
.sf-item.on, .sf-item:hover { background:#f8fafc; border-color:#d9e0e8; }
.sf-item .sf-title { color:#1d2430; }
.sf-item .sf-desc { color:#8a94a3; }
.sf-quick button { border-color:var(--ui-line); border-radius:7px; color:#4d5665; }
.sf-quick button:hover { border-color:var(--ui-brand); color:var(--ui-brand); background:var(--ui-brand-soft); }
.sf-panel-foot { color:#a2abb8; }

/* ---- Фильтр по датам ---- */
.est-date-toggle {
  border:1px solid var(--ui-line); border-radius:10px;
  background:#fff; font-size:12px; font-weight:650; color:#2b3340;
}
.est-date-toggle:hover { border-color:#cbd3de; }
.est-date-toggle .bi-calendar3 { color:var(--ui-brand); }
.est-date-toggle.has-filter {
  border-color:rgba(201,106,43,.45); background:var(--ui-brand-soft);
}
.est-date-toggle.has-filter #estDateToggleLabel { color:var(--ui-brand); }
.est-date-panel { background:#f8fafc; border-color:var(--ui-line); border-radius:11px; }
.est-date-field input { border-color:var(--ui-line); border-radius:8px; background:#fff; font-size:11.5px; }
.est-date-presets button { border-color:var(--ui-line); border-radius:7px; background:#fff; }
.est-date-presets button:hover { border-color:var(--ui-brand); color:var(--ui-brand); }
.est-date-which { border-top-color:var(--ui-line); }
.est-date-which input { accent-color:var(--ui-brand); }

/* ---- Список смет ---- */
.est-list { gap:7px; padding-right:2px; }
.est-item {
  background:#fff; border:1px solid var(--ui-line);
  border-radius:12px; padding:11px 12px;
  box-shadow:0 1px 2px rgba(16,24,40,.03);
}
.est-item:hover { background:#fbfcfe; border-color:#d3dae4; }
.est-item.active {
  background:#fff; border-color:var(--ui-brand);
  box-shadow:0 0 0 3px rgba(201,106,43,.10), 0 6px 16px rgba(16,24,40,.06);
}
.est-item .num { color:#1b222d; font-size:11.5px; }
.est-item .row2 { font-size:12px; color:#222a36; }
.est-item .row2 .name { font-weight:750; }
.est-item .row3 .meta-line { color:#8a94a3; font-size:10px; }
.est-item .total { color:var(--ui-brand); font-size:12.5px; }
.badge {
  padding:3px 8px; border-radius:6px; font-size:9px;
  letter-spacing:.45px; text-transform:uppercase;
}
.badge.editable { border-radius:7px; }
.badge .badge-label { display:none; }

/* ---- Сводка ---- */
.list-summary {
  background:linear-gradient(135deg, #fffaf5, #fff4ea);
  border:1px solid rgba(201,106,43,.18); border-radius:12px;
  padding:11px 14px;
}
.est-summary-label { color:var(--ui-brand-2); font-size:10px; }
.est-summary-total { color:var(--ui-brand-2); font-size:16px; }

/* ---- Редактор ---- */
.editor-card { padding:24px 26px; }
.editor-head {
  margin-bottom:20px; padding-bottom:18px;
  border-bottom:1px solid var(--ui-line);
}
.editor-head h1 { font-size:21px; font-weight:800; letter-spacing:-.5px; }
.editor-head .meta { color:var(--ui-muted); font-size:11px; }
.section-title {
  display:flex; align-items:center; gap:9px;
  font-size:12px !important; font-weight:800 !important;
  letter-spacing:.2px; color:#2b3340;
  margin-bottom:12px !important;
}
.section-title .section-icon, .editor-head .section-icon {
  width:26px; height:26px; border-radius:8px;
  display:inline-flex; align-items:center; justify-content:center;
  background:var(--ui-brand-soft); color:var(--ui-brand);
  border:1px solid rgba(201,106,43,.14); font-size:12px;
}
.form-grid { gap:20px !important; }
.form-panel { min-width:0; }
.items-toolbar { margin-bottom:14px !important; }
.tune-grid {
  background:#f8fafc; border:1px solid var(--ui-line);
  border-radius:12px; padding:14px 14px 2px; margin-top:18px !important;
}
.comment-field { margin-top:14px; }
.empty-card { min-height:360px; display:flex; align-items:center; justify-content:center; }

/* ---- Таблица позиций ---- */
.items-table { font-size:12.5px; }
.items-table th {
  background:#f8fafc; color:#8a94a3;
  padding:10px 8px; border-bottom:1px solid var(--ui-line);
  font-size:9.5px; letter-spacing:.7px;
}
.items-table th:first-child { border-radius:8px 0 0 0; }
.items-table th:last-child { border-radius:0 8px 0 0; }
.items-table td { padding:9px 8px; border-bottom-color:#eef1f5; }
.items-table tr:hover td { background:#fafbfd; }
.items-table input { border-radius:7px; font-size:12px; }
.items-table input:focus { border-color:var(--ui-brand); box-shadow:0 0 0 2px rgba(201,106,43,.10); }
.items-table .sum { color:#1b222d; }
.items-table .zone-input {
  color:var(--ui-brand) !important; background:var(--ui-brand-soft) !important;
  border-radius:6px;
}
.items-table .row-total-weight { color:#4d5665; }
.item-desc-input { font-size:10.5px !important; }

/* ---- Подбор товаров ---- */
.picker input { border-radius:10px; font-size:12.5px; }
.picker input:focus { border-color:var(--ui-brand); box-shadow:0 0 0 3px rgba(201,106,43,.10); }
.picker-results { border-color:var(--ui-line); border-radius:12px; box-shadow:0 18px 44px rgba(16,24,40,.14); }
.picker-cat-head { color:var(--ui-brand); background:#fbfcfe; }
.picker-item:hover { background:#f8fafc; }
.picker-item .p-price { color:var(--ui-brand); }

/* ---- Итоги ---- */
.totals-box {
  background:#fff; border:1px solid var(--ui-line);
  border-radius:14px; padding:18px 20px; margin-top:20px;
}
.totals-row { font-size:12.5px; padding:5px 0; }
.totals-row .l { color:var(--ui-muted); }
.totals-row.total {
  border-top:1px solid var(--ui-line); margin-top:10px;
  padding-top:14px; font-size:15px;
}
.totals-row.total .v {
  color:#fff; font-size:20px; letter-spacing:-.5px;
  background:var(--ui-brand); padding:3px 12px; border-radius:9px;
}
.zones-summary { border-top-color:var(--ui-line); }
.zones-summary .zones-title { color:#8a94a3; }
.zones-summary .zones-title .bi { color:var(--ui-brand); }
.zone-total-row .z-name { color:var(--ui-brand); }

/* ---- История / пустые состояния ---- */
.history { font-size:11.5px; }
.history b { color:#2b3340; }
.empty { color:var(--ui-muted); }
.empty b { color:#2b3340; }
details summary { color:var(--ui-muted); }
details summary:hover { color:var(--ui-brand); }
.est-list .empty .icon, .empty-card .icon { opacity:.35; }

/* ---- Выпадающее меню отправки ---- */
.send-dropdown-menu { border-color:var(--ui-line); border-radius:12px; box-shadow:0 18px 44px rgba(16,24,40,.16); }
.send-dropdown-menu button { border-radius:8px; }
.send-dropdown-menu button > .bi { color:var(--ui-brand); }
.send-dropdown-menu button:hover { background:#f8fafc; }

/* ---- Модальные окна ---- */
.modal-overlay { background:rgba(15,23,42,.52); backdrop-filter:blur(2px); }
.modal {
  border:1px solid var(--ui-line); border-radius:20px;
  box-shadow:0 30px 70px rgba(15,23,42,.28);
  padding:26px;
}
.modal h3 { font-size:17px; color:#1b222d; }
.modal h3 .bi { color:var(--ui-brand); }
.modal .sub { color:var(--ui-muted); font-size:11.5px; }
.modal-actions .btn { flex:1; }
.link-box input { border-color:var(--ui-line); border-radius:9px; background:#f9fafb; }
.status-option { border-color:var(--ui-line); border-radius:11px; }
.status-option:hover, .status-option.active { background:#f8fafc; border-color:#d5dce5; }
.status-option .so-title { font-size:13px; }
.cp-modal .cp-head, .cp-modal .cp-toolbar { border-bottom-color:var(--ui-line); }
.cp-body { background:#fff; }
.ref-list .ref-item { border-color:var(--ui-line); border-radius:9px; }

/* ---- Уведомления ---- */
.toast-wrap { bottom:24px; }
.toast {
  background:#1d2430; border-radius:11px; padding:11px 16px;
  font-size:12.5px; box-shadow:0 12px 32px rgba(15,23,42,.24);
}

/* ============================================================
   ДОПОЛНИТЕЛЬНАЯ ДЕТАЛИЗАЦИЯ СТРАНИЦ
   ============================================================ */

/* ---- Календарь: панель управления и ячейки ---- */
.cal-header-wrap {
  background:#fff; border:1px solid var(--ui-line);
  border-radius:14px; padding:12px 16px; box-shadow:var(--ui-shadow);
}
.cal-current-month { font-size:17px; letter-spacing:-.4px; }
.cal-day.today { box-shadow:inset 0 0 0 1px rgba(201,106,43,.32); }
.cal-day.has-events:hover { background:#fffaf5; }
.day-est {
  background:#fffaf5; border-left:2px solid var(--ui-brand);
  border-radius:6px; padding:4px 6px; margin-bottom:4px;
}
.day-est:last-child { margin-bottom:0; }
.mini-month { box-shadow:0 1px 2px rgba(16,24,40,.03); }
.mini-month-head { font-size:12px; }
.stat-badge-item .val { color:#1b222d; }
.stat-badge-item .val.accent { color:var(--ui-brand); }

/* ---- Товары: дерево и карточки позиций ---- */
.tree-toolbar { border:1px solid var(--ui-line); }
.breadcrumbs { box-shadow:0 1px 2px rgba(16,24,40,.03); }
.breadcrumbs .crumb-count { background:#eef1f5; }
.tree-node-head.is-folder .node-icon { background:#fbe7d4; color:var(--ui-brand); }
.tree-node-head.is-leaf .node-icon { background:#eef1f5; color:#4d5665; }
.tree-product { padding:7px 10px; }
.tree-product .p-thumb { background:#f4f6f9; border-color:var(--ui-line); border-radius:8px; }
.tree-product .p-name { font-weight:700; }
.tree-product .p-price {
  background:var(--ui-brand-soft); padding:2px 7px; border-radius:6px;
}
.tree-product .p-actions button:hover { background:var(--ui-brand-soft); }
.bulk-bar button.bulk-accent { background:var(--ui-brand); }
.bulk-bar button.bulk-accent:hover { background:var(--ui-brand-2); }

/* ---- Клиенты: фильтры, строки и пагинация ---- */
.filters { box-shadow:0 1px 2px rgba(16,24,40,.03); }
.client-name { font-size:13.5px; }
.client-contact { color:#8a94a3; }
.badge-orders { padding:4px 9px; }
.date-cell { color:#8a94a3; }
.status-badge { padding:3px 8px; border-radius:6px; }
.pagination-btn { min-width:34px; }

/* ---- Настройки: боковое меню и секции ---- */
.settings-tab .bi { color:var(--ui-brand); opacity:.85; }
.settings-section-title { font-size:10px; letter-spacing:.8px; }
.settings-section { border-bottom-color:var(--ui-line); }
.ef-card { box-shadow:0 1px 2px rgba(16,24,40,.03); }
.ef-empty { background:#f8fafc; border:1px dashed var(--ui-line); }
.img-preview { border-radius:12px; border-color:#d9dfe8; }
.settings-footer .sf-text { color:#667085; }

/* ============================================================
   РЫЖИЙ АКЦЕНТ — контраст на тёмной шапке и светлом фоне
   ============================================================ */
:root { --ui-on-brand:#fff; }

/* Тёмный текст на золотых плашках */
.topbar-nav a.active,
.btn-primary,
.totals-row.total .v,
.sf-badge,
.pagination-btn.active,
.cal-day.today .cal-day-num { color:var(--ui-on-brand) !important; }

/* На более тёмном hover-оттенке текст светлый */
.btn-primary:hover:not(:disabled) { color:#fff !important; }

/* Тёмный оттенок золота для текста и иконок на светлом фоне */
.view-toggle button.active,
.nav-btn:hover,
.btn-today:hover,
.mini-month-head:hover,
.mini-month-sum,
.cal-day-sum,
.tree-toolbar button:hover:not(:disabled),
.breadcrumbs .crumb,
.filter-reset:hover,
.pagination-btn:hover:not(:disabled),
.filter-count b,
.stat-badge-item .val.accent,
.card-head h2 .bi,
.settings-page-head h1 .bi,
.settings-section-title,
.ef-card-head .ef-name:focus,
.about-card-item .ac-num,
.total-sum,
.tree-product .p-price,
.zone-total-row .z-name,
.zones-summary .zones-title .bi,
.head-icon,
.section-icon,
.picker-cat-head,
.picker-item .p-price,
.status-option .so-title .bi { color:var(--ui-brand-2) !important; }

/* Мягкие золотые подсветки вместо синих */
.bulk-bar .bulk-count b { color:#e8a86a !important; }
.stat-badge-item .val.accent { color:var(--ui-brand-2) !important; }
.cal-day.today { background:#fff4ea !important; }
.cal-day.today .cal-day-num { background:var(--ui-brand) !important; }
.mini-day.has-events { background:#fff4ea !important; }

/* ============================================================
   СТРАНИЦА ВХОДА — тот же стиль, что и у остальных разделов
   ============================================================ */

/* Тонкая тёмная полоса сверху — отголосок шапки админки */
body::before {
  content:""; position:fixed; left:0; right:0; top:0; height:5px;
  background:#151a23; z-index:0;
}

/* Карточка входа: те же радиусы, граница и тень, что у .card */
body > .card {
  padding:44px 38px 32px !important;
  border-radius:var(--ui-radius) !important;
  background:var(--ui-surface) !important;
  border:1px solid var(--ui-line) !important;
  box-shadow:var(--ui-shadow), 0 22px 50px rgba(16,24,40,.08) !important;
}
body > .card::before { background:rgba(201,106,43,.06) !important; }

/* Логотип-буква — золотой, с тёмным текстом */
.login-logo-wrap .logo-letter {
  background:var(--ui-brand) !important;
  color:var(--ui-on-brand) !important;
  border-radius:14px !important;
  box-shadow:0 8px 20px rgba(201,106,43,.22) !important;
}

/* Поля — как обычные поля админки, но с местом под иконку слева */
body > .card .field input {
  background:#fff !important;
  border:1px solid var(--ui-line) !important;
  border-radius:10px !important;
  padding:13px 14px 13px 42px !important;
  font-size:13px !important;
  font-weight:550 !important;
  color:var(--ui-ink) !important;
}
body > .card .field input:focus {
  border-color:var(--ui-brand) !important;
  box-shadow:0 0 0 3px rgba(201,106,43,.12) !important;
}
body > .card .field .input-wrap > .bi:first-child { color:#8a94a3 !important; }
body > .card .field .toggle-password { border-radius:8px; }
body > .card .field .toggle-password:hover {
  background:var(--ui-brand-soft) !important;
  color:var(--ui-brand-2) !important;
}

/* Кнопка входа — как основная кнопка админки */
body > .card button[type="submit"] {
  background:var(--ui-brand) !important;
  color:var(--ui-on-brand) !important;
  border-radius:10px !important;
  font-weight:800 !important;
  box-shadow:0 4px 14px rgba(201,106,43,.2);
}
body > .card button[type="submit"]:hover:not(:disabled) {
  background:var(--ui-brand-2) !important;
  color:#fff !important;
  box-shadow:0 8px 20px rgba(184,90,31,.25);
}

/* Ссылки и подсказки */
body > .card .back:hover {
  background:var(--ui-brand-soft) !important;
  color:var(--ui-brand-2) !important;
}
body > .card .footer-note { color:var(--ui-muted) !important; }

@media (max-width:480px) {
  body > .card { padding:36px 24px 28px !important; }
}


