/* Общий интерфейсный каркас CRM Mebelka (15.09.2026): единые токены, левое меню, верхняя панель,
   карточки, таблицы, статусы, канбан и карточка Заказа. Существующие имена классов (.btn,
   .list-table, .detail-list, .form-inline, .badge, .hint, .accordion …) сохранены — прежние
   страницы получают новый вид без переписывания разметки. Блоки ниже раздела «Сохранено без
   изменений» перенесены дословно. */
:root {
  --bg: #f3f4f1;
  --surface: #ffffff;
  --surface-2: #f8f9f7;
  --border: #e1e5e0;
  --border-strong: #cfd6d0;
  --text: #1c2420;
  --muted: #6a736e;
  --green: #2f6b46;
  --green-dark: #24553a;
  --green-soft: #e5efe8;
  --green-line: #8fbf9f;
  --red: #b3261e;
  --red-soft: #fbe8e6;
  --amber: #9a5a00;
  --amber-soft: #fff0d9;
  --gray-soft: #eceeeb;
  --sidebar: #17211c;
  --sidebar-hover: #223029;
  --sidebar-text: #bfcac3;
  --radius: 8px;
  --shadow: 0 1px 2px rgba(20, 30, 25, 0.06);
}

* { box-sizing: border-box; }

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  margin: 0;
  color: var(--text);
  background: var(--bg);
  font-size: 14px;
  line-height: 1.45;
}

a { color: var(--green); }
a:hover { color: var(--green-dark); }

h1 { font-size: 22px; line-height: 1.25; margin: 0; font-weight: 650; }
h2 { font-size: 16px; margin: 22px 0 10px; font-weight: 650; }
h3 { font-size: 14px; margin: 0 0 8px; font-weight: 650; }

/* ---------- Каркас: левое меню + верхняя панель ---------- */
.app { display: grid; grid-template-columns: 220px minmax(0, 1fr); min-height: 100vh; }

.sidebar {
  background: var(--sidebar);
  color: var(--sidebar-text);
  position: sticky; top: 0; height: 100vh;
  display: flex; flex-direction: column;
  padding: 14px 10px;
  overflow-y: auto;
}
.sidebar .brand {
  display: flex; align-items: center; gap: 10px;
  color: #fff; text-decoration: none; font-weight: 650; font-size: 16px;
  padding: 4px 8px 18px;
}
.brand-mark {
  width: 30px; height: 30px; border-radius: 8px; background: var(--green);
  display: grid; place-items: center; font-weight: 700; color: #fff;
}
.brand small { display: block; font-size: 11px; font-weight: 500; color: var(--sidebar-text); letter-spacing: 0.04em; }
.nav { display: flex; flex-direction: column; gap: 2px; }
.nav a {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 10px; border-radius: 6px;
  color: var(--sidebar-text); text-decoration: none; font-size: 14px;
}
.nav a:hover { background: var(--sidebar-hover); color: #fff; }
.nav a.active { background: var(--sidebar-hover); color: #fff; box-shadow: inset 3px 0 0 #5fae7d; }
.nav svg { width: 18px; height: 18px; flex: 0 0 18px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.sidebar-foot { margin-top: auto; padding: 12px 8px 0; font-size: 12px; color: #7f8c85; }

.main { min-width: 0; display: flex; flex-direction: column; }
.topbar {
  position: sticky; top: 0; z-index: 40;
  height: 54px; display: flex; align-items: center; gap: 16px;
  padding: 0 24px; background: var(--surface); border-bottom: 1px solid var(--border);
}
.topbar .page-title { font-size: 16px; font-weight: 650; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.topbar .user { margin-left: auto; display: flex; align-items: center; gap: 10px; font-size: 13px; }
.topbar .user .who { display: flex; flex-direction: column; line-height: 1.2; text-align: right; }
.topbar .user .who span { color: var(--muted); font-size: 12px; }
.avatar {
  width: 32px; height: 32px; border-radius: 50%; background: var(--green-soft); color: var(--green);
  display: grid; place-items: center; font-weight: 700; font-size: 13px;
}
.topbar .user form { margin: 0; }
.topbar .user button {
  background: none; border: 1px solid var(--border-strong); color: var(--muted);
  padding: 5px 10px; border-radius: 6px; cursor: pointer; font-size: 13px;
}
.topbar .user button:hover { color: var(--text); border-color: var(--muted); }

.content { width: 100%; max-width: 1480px; margin: 0 auto; padding: 20px 24px 48px; }
.content.wide { max-width: none; }

@media (max-width: 900px) {
  .app { grid-template-columns: 1fr; }
  .sidebar { position: static; height: auto; flex-direction: row; align-items: center; padding: 8px; overflow-x: auto; }
  .sidebar .brand { padding: 0 10px 0 4px; }
  .brand small, .sidebar-foot { display: none; }
  .nav { flex-direction: row; }
  .nav a { white-space: nowrap; }
  .topbar { position: static; padding: 0 14px; }
  .topbar .user .who { display: none; }
  .content { padding: 14px 12px 32px; }
}

/* ---------- Заголовки страниц ---------- */
.page-header {
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px; flex-wrap: wrap; margin-bottom: 14px;
}
.page-header .actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.page-sub { color: var(--muted); font-size: 13px; margin: -8px 0 14px; }

/* ---------- Кнопки ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  background: var(--green); color: #fff;
  border: 1px solid var(--green);
  padding: 7px 14px; border-radius: 6px;
  text-decoration: none; font-size: 14px; font-weight: 500; line-height: 1.3;
  cursor: pointer; font-family: inherit; white-space: nowrap;
}
.btn:hover { background: var(--green-dark); border-color: var(--green-dark); color: #fff; }
.btn:disabled { opacity: 0.6; cursor: default; }
.btn-google { background: #4285f4; border-color: #4285f4; }
.btn-secondary { background: var(--surface); color: var(--text); border-color: var(--border-strong); }
.btn-secondary:hover { background: var(--surface-2); color: var(--text); border-color: var(--muted); }
.btn-sm { padding: 4px 10px; font-size: 13px; }
.btn-lg { padding: 9px 18px; font-size: 15px; }
.btn-success { background: var(--green); }
.btn-danger-outline { background: transparent; color: var(--red); border: 1px solid var(--red); }
.btn-danger-outline:hover { background: var(--red-soft); color: var(--red); border-color: var(--red); }
.link-btn { background: none; border: none; padding: 0; color: var(--green); cursor: pointer; font: inherit; text-decoration: underline; }

/* ---------- Поля ---------- */
label { display: flex; flex-direction: column; gap: 5px; font-size: 13px; color: #454d49; }
label.check { flex-direction: row; align-items: flex-start; gap: 8px; color: var(--text); font-size: 14px; }
label.check input { margin-top: 2px; }
input, textarea, select {
  font-size: 14px; padding: 7px 9px;
  border: 1px solid var(--border-strong); border-radius: 6px;
  font-family: inherit; color: var(--text); background: #fff;
}
input:focus, textarea:focus, select:focus { outline: none; border-color: var(--green); box-shadow: 0 0 0 3px var(--green-soft); }
input[type="checkbox"], input[type="radio"] { width: auto; box-shadow: none; }

/* Убираем стрелки увеличения/уменьшения у числовых полей (Пакет исправлений, п.2) —
   type="number" остаётся (серверная проверка, min/max, шаг, цифровая клавиатура на
   мобильном не меняются), меняется только визуальное поведение. */
input[type="number"]::-webkit-inner-spin-button,
input[type="number"]::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }
input[type="number"] { -moz-appearance: textfield; }

.form {
  display: flex; flex-direction: column; gap: 14px; max-width: 520px;
  background: var(--surface); padding: 18px 20px; border-radius: var(--radius); border: 1px solid var(--border);
}
.form-inline {
  display: flex; align-items: flex-end; gap: 10px; flex-wrap: wrap;
  background: var(--surface); padding: 12px 16px; border-radius: var(--radius);
  border: 1px solid var(--border); margin-bottom: 14px;
}
.form-actions { display: flex; align-items: center; gap: 10px; }
.field { display: flex; flex-direction: column; gap: 5px; margin-bottom: 12px; }

/* ---------- Сообщения ---------- */
.form-error { color: var(--red); }
p.form-error, div.form-error.block {
  background: var(--red-soft); border: 1px solid #f1c7c2; border-radius: 6px; padding: 8px 12px; margin: 0 0 12px;
}
.notice, .stage-notice {
  background: var(--green-soft); border: 1px solid #c6ddcd; color: var(--green-dark);
  border-radius: 6px; padding: 8px 12px; margin: 0 0 12px;
}
.warn-box { background: var(--amber-soft); border: 1px solid #f2d7a8; color: var(--amber); border-radius: 6px; padding: 8px 12px; margin: 0 0 12px; }
.hint { color: #525b56; font-size: 13px; background: var(--surface-2); border: 1px solid var(--border); padding: 8px 12px; border-radius: 6px; }
.muted { color: var(--muted); font-size: 13px; }
.empty { color: var(--muted); }
.empty-state {
  color: var(--muted); font-size: 13px; text-align: center;
  padding: 18px 12px; border: 1px dashed var(--border-strong); border-radius: var(--radius); background: var(--surface-2);
}

/* ---------- Карточки и сетки ---------- */
.card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 14px 16px; margin-bottom: 14px; box-shadow: var(--shadow); min-width: 0;
}
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 10px; }
.card-head h2, .card-head h3 { margin: 0; font-size: 14px; }
.card-head .count { color: var(--muted); font-size: 12px; }
.grid { display: grid; gap: 14px; }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-main { grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); align-items: start; }
.grid > .card { margin-bottom: 0; }
@media (max-width: 1180px) { .grid-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); } .grid-main { grid-template-columns: 1fr; } }
@media (max-width: 760px) { .grid-2, .grid-3 { grid-template-columns: 1fr; } }

.kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-bottom: 14px; }
.kpi { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 12px 14px; text-decoration: none; color: var(--text); box-shadow: var(--shadow); }
.kpi:hover { border-color: var(--green-line); color: var(--text); }
.kpi .kpi-label { color: var(--muted); font-size: 12px; }
.kpi .kpi-value { font-size: 26px; font-weight: 650; line-height: 1.2; margin-top: 2px; }
.kpi .kpi-note { font-size: 12px; color: var(--muted); }
.kpi.kpi-danger .kpi-value { color: var(--red); }
.kpi.kpi-warn .kpi-value { color: var(--amber); }
@media (max-width: 900px) { .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

.rows { list-style: none; margin: 0; padding: 0; }
.rows > li { display: flex; gap: 10px; align-items: flex-start; justify-content: space-between; padding: 8px 0; border-bottom: 1px solid #eef0ed; }
.rows > li:last-child { border-bottom: none; }
.rows .main-line { min-width: 0; }
.rows .main-line a { font-weight: 600; text-decoration: none; }
.rows .main-line > a:first-child { display: inline-block; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; vertical-align: bottom; }
.rows .sub { color: var(--muted); font-size: 12px; margin-top: 1px; }
.rows .side { text-align: right; flex: 0 0 auto; font-size: 12px; color: var(--muted); }

.stage-bars { display: flex; flex-direction: column; gap: 6px; }
.stage-bar { display: grid; grid-template-columns: 170px 1fr 28px; gap: 8px; align-items: center; font-size: 12px; text-decoration: none; color: var(--text); }
.stage-bar .bar { height: 8px; background: var(--gray-soft); border-radius: 99px; overflow: hidden; }
.stage-bar .bar span { display: block; height: 100%; background: var(--green-line); border-radius: 99px; }
.stage-bar b { text-align: right; font-weight: 600; }

/* ---------- Таблицы ---------- */
.table-wrap, .table-scroll { overflow-x: auto; }
.list-table {
  width: 100%; border-collapse: separate; border-spacing: 0;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden;
}
.list-table th, .list-table td { text-align: left; padding: 8px 12px; border-bottom: 1px solid #eef0ed; vertical-align: top; }
.list-table thead th { background: var(--surface-2); color: var(--muted); font-size: 12px; font-weight: 600; white-space: nowrap; }
.list-table tbody tr:last-child td { border-bottom: none; }
.list-table tfoot td { border-top: 1px solid var(--border); border-bottom: none; background: var(--surface-2); }
.list-table tbody tr { cursor: pointer; }
.list-table tbody tr:hover { background: #f3f7f4; }
.list-table.static tbody tr { cursor: default; }
.list-table.static tbody tr:hover { background: transparent; }
.card .list-table { border: none; border-radius: 0; }
.num { text-align: right; white-space: nowrap; }

/* ---------- Статусы ---------- */
.badge {
  display: inline-block; background: var(--green-soft); color: var(--green);
  padding: 2px 9px; border-radius: 999px; font-size: 12px; font-weight: 500; white-space: nowrap;
}
.badge-gray { background: var(--gray-soft); color: #5f6863; }
.pill { display: inline-flex; align-items: center; gap: 5px; padding: 2px 9px; border-radius: 999px; font-size: 12px; font-weight: 500; white-space: nowrap; }
.pill::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.pill-green { background: var(--green-soft); color: var(--green); }
.pill-amber { background: var(--amber-soft); color: var(--amber); }
.pill-red { background: var(--red-soft); color: var(--red); }
.pill-gray { background: var(--gray-soft); color: #5f6863; }
.flag { display: inline-block; font-size: 11px; font-weight: 600; padding: 1px 7px; border-radius: 4px; margin: 2px 4px 0 0; }
.flag-danger { background: var(--red-soft); color: var(--red); }
.flag-warn { background: var(--amber-soft); color: var(--amber); }

/* ---------- Списки «ключ — значение» ---------- */
.detail-list {
  display: grid; grid-template-columns: minmax(150px, 220px) minmax(0, 1fr); gap: 7px 16px;
  background: var(--surface); padding: 14px 18px; border-radius: var(--radius); border: 1px solid var(--border); margin: 0 0 14px;
}
.detail-list dt { font-size: 13px; color: var(--muted); margin: 0; }
.detail-list dd { margin: 0; font-size: 14px; min-width: 0; overflow-wrap: anywhere; }
.detail-list dd .form-inline { padding: 0; border: none; margin: 6px 0 0; background: none; }
.kv { display: grid; grid-template-columns: 130px minmax(0, 1fr); gap: 6px 12px; margin: 0; font-size: 13px; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; min-width: 0; overflow-wrap: anywhere; }
@media (max-width: 600px) { .detail-list, .kv { grid-template-columns: 1fr; } }

.icon-btn { text-decoration: none; font-size: 16px; margin-left: 8px; cursor: pointer; background: none; border: none; color: var(--red); }

.accordion { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); margin-bottom: 10px; padding: 0 16px; }
.accordion summary { cursor: pointer; font-weight: 600; padding: 11px 0; list-style: none; }
.accordion summary::-webkit-details-marker { display: none; }
.accordion summary::before { content: "▸ "; color: var(--green); }
.accordion[open] summary::before { content: "▾ "; }
.accordion .form { padding: 0 0 16px; box-shadow: none; border: none; }

.match-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 14px 18px; margin-bottom: 12px; }
.match-card .form-inline { padding: 0; margin-bottom: 0; background: none; border: none; }

/* ---------- Фильтры и переключатели ---------- */
.filters {
  display: flex; flex-wrap: wrap; gap: 8px; align-items: center;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 8px 10px; margin-bottom: 12px;
}
.filters input[type="search"], .filters input[type="text"] { min-width: 220px; }
.filters input, .filters select { font-size: 13px; padding: 6px 8px; }
.filters .spacer { flex: 1; }
.filters label.check { font-size: 13px; align-items: center; }
.seg { display: inline-flex; border: 1px solid var(--border-strong); border-radius: 6px; overflow: hidden; background: var(--surface); }
.seg a { padding: 6px 12px; text-decoration: none; color: var(--text); font-size: 13px; border-right: 1px solid var(--border-strong); }
.seg a:last-child { border-right: none; }
.seg a.active { background: var(--green); color: #fff; }

.orders-table { table-layout: fixed; }
.orders-table th:nth-child(1) { width: 30%; }
.orders-table th:nth-child(2) { width: 17%; }
.orders-table th:nth-child(3) { width: 13%; }
.orders-table th:nth-child(4) { width: 8%; }
.orders-table td { overflow-wrap: anywhere; }
.orders-table .col-order a { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ---------- Задачи (15.09.2026) ---------- */
.nav-counts { margin-left: auto; display: inline-flex; gap: 4px; }
.nav-count { font-size: 11px; line-height: 18px; min-width: 20px; text-align: center; padding: 0 6px; border-radius: 99px; background: rgba(255, 255, 255, 0.12); color: #e6ece8; font-weight: 600; }
.nav-count.red { background: var(--red); color: #fff; }
.tasks-table { table-layout: fixed; }
.tasks-table th:nth-child(1) { width: 38%; }
.tasks-table td { overflow-wrap: anywhere; }
.tasks-table .task-title { font-weight: 600; text-decoration: none; }
.tasks-table tr.task-critical td:first-child { box-shadow: inset 3px 0 0 var(--red); }
.tasks-table tr.task-new .task-title::before { content: ""; display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: #e0a030; margin-right: 6px; vertical-align: middle; }
.prio { font-weight: 600; font-size: 12px; }
.prio-high { color: var(--amber); }
.prio-critical { color: var(--red); }
.task-group.tone-red .card-head h3 { color: var(--red); }
.task-group.tone-amber .card-head h3 { color: var(--amber); }
.task-group .list-table { border: none; }
.task-mini { margin-top: 12px; padding: 10px 12px; border: 1px solid var(--border); border-radius: 8px; background: var(--surface-2); }
.task-mini.is-overdue { border-color: #f1c7c2; background: var(--red-soft); }
.task-mini.is-unassigned { border-color: #f2d7a8; background: var(--amber-soft); }
.task-mini .task-mini-title { font-weight: 600; text-decoration: none; }
.task-mini .kv { margin-top: 6px; }
.k-tasks { font-size: 11px; color: var(--muted); margin-top: 4px; }
.k-tasks b { color: var(--text); }
.task-actions .ap-form { margin-bottom: 4px; display: flex; flex-direction: column; align-items: flex-start; gap: 8px; }
.task-actions .ap-form select,
.task-actions .ap-form textarea,
.task-actions .ap-form input:not([type=hidden]) { width: 100%; max-width: 100%; box-sizing: border-box; }
.tasks-table th:nth-child(2) { width: 20%; }
.tasks-table td:nth-child(2) { overflow-wrap: normal; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.timeline .main-line b { font-weight: 600; }

/* ---------- Канбан Заказов ---------- */
.kanban { display: flex; gap: 10px; overflow-x: auto; padding-bottom: 10px; align-items: flex-start; }
.kcol { flex: 0 0 226px; background: #e9ece7; border-radius: var(--radius); padding: 8px; max-height: calc(100vh - 190px); overflow-y: auto; }
.kcol-head { display: flex; justify-content: space-between; align-items: center; gap: 6px; font-weight: 600; font-size: 12px; padding: 2px 4px 8px; color: #3b4540; position: sticky; top: -8px; background: #e9ece7; }
.kcol-head .n { background: #fff; border-radius: 99px; padding: 0 7px; font-size: 11px; color: var(--muted); }
.kcol-empty { font-size: 12px; color: #8a938e; text-align: center; padding: 10px 0; }
.kcard {
  display: block; background: var(--surface); border: 1px solid var(--border); border-left: 3px solid var(--border);
  border-radius: 7px; padding: 8px 10px; margin-bottom: 8px; text-decoration: none; color: var(--text); box-shadow: var(--shadow);
}
.kcard:hover { border-color: var(--green-line); color: var(--text); }
.kcard.is-attention { border-left-color: var(--red); }
.kcard.is-waiting { border-left-color: #e0a030; }
.kcard.is-inactive { opacity: 0.75; border-left-color: #9aa39e; }
.kcard .k-code { font-weight: 650; font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.kcard .k-line { font-size: 12px; color: var(--muted); overflow-wrap: anywhere; }
.kcard .k-pm { font-size: 12px; margin-top: 4px; }
.kcard .k-pm.none { color: var(--red); font-weight: 600; }
.kcard .k-foot { display: flex; justify-content: space-between; gap: 6px; align-items: center; margin-top: 6px; font-size: 11px; color: var(--muted); }

/* ---------- Карточка Заказа ---------- */
.order-hero {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 14px 18px; margin-bottom: 12px; display: flex; gap: 16px; justify-content: space-between; align-items: flex-start; flex-wrap: wrap;
  box-shadow: var(--shadow);
}
.order-hero .hero-title { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.order-hero h1 { font-size: 20px; overflow-wrap: anywhere; }
.hero-meta { display: flex; flex-wrap: wrap; gap: 4px 18px; font-size: 13px; color: var(--muted); margin-top: 6px; }
.hero-meta span b { color: var(--text); font-weight: 500; }
.hero-meta a { text-decoration: none; }
.hero-actions { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }

details.menu { position: relative; }
details.menu > summary { list-style: none; }
details.menu > summary::-webkit-details-marker { display: none; }
.menu-panel {
  position: absolute; right: 0; top: calc(100% + 4px); z-index: 30; min-width: 250px;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  box-shadow: 0 8px 24px rgba(20, 30, 25, 0.14); padding: 6px;
}
.menu-panel a, .menu-panel button {
  display: block; width: 100%; text-align: left; padding: 7px 10px; border-radius: 5px;
  color: var(--text); text-decoration: none; background: none; border: none; font: inherit; cursor: pointer;
}
.menu-panel a:hover, .menu-panel button:hover { background: var(--surface-2); }
.menu-panel form { margin: 0; }
.menu-panel .sep { height: 1px; background: var(--border); margin: 4px 2px; }

.stage-track {
  display: flex; list-style: none; margin: 0 0 12px; padding: 12px 6px 10px;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); overflow-x: auto;
}
.stage-track .st { flex: 1 0 92px; position: relative; text-align: center; font-size: 11.5px; color: var(--muted); padding: 0 3px; line-height: 1.25; }
.stage-track .st::before { content: ""; position: absolute; top: 11px; left: -50%; width: 100%; height: 2px; background: #dde2dd; }
.stage-track .st:first-child::before { display: none; }
.stage-track .dot {
  position: relative; z-index: 1; width: 24px; height: 24px; margin: 0 auto 5px; border-radius: 50%;
  border: 2px solid #cfd6d0; background: #fff; display: grid; place-items: center; font-size: 11px; font-weight: 700; color: #9aa39e;
}
.stage-track .st.done { color: #45504a; }
.stage-track .st.done::before { background: var(--green-line); }
.stage-track .st.done .dot { background: var(--green); border-color: var(--green); color: #fff; }
.stage-track .st.current { color: var(--text); font-weight: 650; }
.stage-track .st.current::before { background: var(--green-line); }
.stage-track .st.current .dot { border-color: var(--green); color: var(--green); box-shadow: 0 0 0 4px var(--green-soft); }
.stage-track .st.blocked .dot { border-color: var(--red); color: var(--red); }
.stage-track .st.blocked { color: var(--red); }
.stage-track.is-inactive .st.current .dot { border-color: #8a938e; color: #5f6863; box-shadow: 0 0 0 4px var(--gray-soft); }
.stage-track .st.closed-done .dot { background: #3d4a43; border-color: #3d4a43; color: #fff; }

.action-panel {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr); gap: 18px;
  background: var(--surface); border: 1px solid var(--border); border-left: 4px solid var(--green);
  border-radius: var(--radius); padding: 14px 18px; margin-bottom: 12px; box-shadow: var(--shadow);
}
.action-panel.is-blocked { border-left-color: var(--red); }
.action-panel.is-waiting { border-left-color: #e0a030; }
.action-panel.is-inactive { border-left-color: #8a938e; }
.action-panel .ap-eyebrow { font-size: 11px; text-transform: uppercase; letter-spacing: 0.05em; color: var(--muted); font-weight: 600; }
.action-panel .ap-title { font-size: 17px; font-weight: 650; margin: 2px 0 8px; }
.action-panel .ap-list { margin: 8px 0 0; padding-left: 18px; font-size: 13px; }
.action-panel .ap-list li { margin-bottom: 3px; }
.action-panel form.ap-form { display: flex; flex-direction: column; gap: 8px; margin: 0; }
.action-panel form.ap-form textarea { width: 100%; min-height: 64px; resize: vertical; }
.action-panel form.ap-form input[type="text"] { width: 100%; }
.action-panel .ap-buttons { display: flex; gap: 8px; flex-wrap: wrap; }
.action-panel .ap-side-note { font-size: 13px; color: var(--muted); }
@media (max-width: 1100px) { .action-panel { grid-template-columns: 1fr; } }

.tabs { display: flex; gap: 2px; box-shadow: inset 0 -1px 0 var(--border); margin: 4px 0 14px; overflow-x: auto; overflow-y: hidden; scrollbar-width: thin; }
.tabs a {
  padding: 9px 14px; color: var(--muted); text-decoration: none; border-bottom: 2px solid transparent;
  white-space: nowrap; font-weight: 500; flex: 0 0 auto;
}
.tabs a:hover { color: var(--text); }
.tabs a.active { color: var(--text); border-bottom-color: var(--green); }
.tabs a .n { font-size: 11px; background: var(--gray-soft); color: var(--muted); border-radius: 99px; padding: 0 6px; margin-left: 4px; }
.tabs a .n.red { background: var(--red-soft); color: var(--red); }

.center-box {
  max-width: 380px; margin: 12vh auto; text-align: center; background: var(--surface);
  padding: 32px; border-radius: 12px; border: 1px solid var(--border); box-shadow: 0 10px 30px rgba(20, 30, 25, 0.08);
}
.center-box h1 { margin-bottom: 8px; }
.center-box .brand-mark { margin: 0 auto 14px; width: 44px; height: 44px; font-size: 20px; }

@media (max-width: 600px) {
  .list-table.stack thead { display: none; }
  .list-table.stack tr { display: block; margin-bottom: 8px; border-bottom: 1px solid #eee; }
  .list-table.stack td { display: block; border: none; padding: 4px 12px; }
}

/* Корректировка Этапа 2 (22.08.2026): печать оферты не должна захватывать интерфейс CRM.
   .no-print — общий класс для служебных элементов; меню и верхняя панель скрыты всегда. */
@media print {
  .sidebar, .topbar, .no-print { display: none !important; }
  .app { display: block; }
  body { background: #fff; }
  .content { max-width: none; margin: 0; padding: 0; }
  @page { size: A4; margin: 12mm; }
}

/* ================= Сохранено без изменений ================= */

/* Новый fix-pack по итогам ручной проверки прода (п.9): повторяемые разделы ТЗ изделия
   (Техника, Вложения) — строка добавления нового элемента — обычная последняя <tr> той же
   таблицы (через атрибут form="..." у полей); table-layout:fixed с явной шириной столбцов. */
.equipment-table, .attachments-table {
  table-layout: fixed;
}
.equipment-table input, .attachments-table input, .attachments-table select {
  width: 100%;
  box-sizing: border-box;
}
.equipment-table th:nth-child(1), .equipment-table td:nth-child(1) { width: auto; }
.equipment-table th:nth-child(2), .equipment-table td:nth-child(2) { width: 60px; }
.equipment-table th:nth-child(3), .equipment-table td:nth-child(3) { width: 110px; }
.equipment-table th:nth-child(4), .equipment-table td:nth-child(4) { width: 130px; }
.equipment-table th:nth-child(5), .equipment-table td:nth-child(5) { width: 130px; }
.equipment-table th:nth-child(6), .equipment-table td:nth-child(6) { width: 110px; }
.equipment-table th:nth-child(7), .equipment-table td:nth-child(7) { width: 76px; }
.attachments-table th:nth-child(1), .attachments-table td:nth-child(1) { width: 170px; }
.attachments-table th:nth-child(2), .attachments-table td:nth-child(2) { width: auto; }
.attachments-table th:nth-child(3), .attachments-table td:nth-child(3) { width: 220px; }
.attachments-table th:nth-child(4), .attachments-table td:nth-child(4) { width: 150px; }
.attachments-table th:nth-child(5), .attachments-table td:nth-child(5) { width: 50px; }
.equipment-table td.row-actions, .attachments-table td.row-actions {
  white-space: nowrap;
}
.equipment-table tr.add-row, .attachments-table tr.add-row {
  background: #fafbfa;
}

/* Контроль заполнения ТЗ-Материалы (01.09.2026) — статусы полей и переключатели разделов
   (свой namespace .status-badge, .badge не переопределяется). */
.status-badge {
  display: inline-block;
  font-size: 11px;
  font-weight: 600;
  padding: 1px 6px;
  border-radius: 4px;
  margin-left: 6px;
}
.status-badge-red { background: #fbe4e2; color: #b3261e; }
.status-badge-orange { background: #ffe9cc; color: #a15c00; }

.field-unreviewed { border-left: 3px solid #b3261e; padding-left: 8px; }
.field-waiting { border-left: 3px solid #d98a00; padding-left: 8px; }
.field-na { opacity: 0.55; }

/* Несовместимость старых значений с новым enum (04.09.2026, напр. backPanelType) */
.field-warning { background: #fbe4e2; color: #b3261e; font-weight: 600; padding: 4px 8px; border-radius: 4px; margin: 4px 0; }

/* Часть 2А (08.09.2026) — сообщение об ошибке fetch-переключателя ТЗ рядом с кнопкой. */
.async-error { display: inline-block; color: #b3261e; font-size: 12px; margin-left: 8px; }

.toggle-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 0;
  border-bottom: 1px solid #eee;
}
.toggle-row-child { margin-left: 20px; }

/* Однозначные переключатели (02.09.2026, п.4) */
.status-badge-on { background: #dff3e6; color: #1e7a3d; }
.status-badge-off { background: #ececec; color: #666; }

/* Цвет заголовка раздела (02.09.2026, п.3) */
.accordion.section-red summary { border-left: 4px solid #b3261e; padding-left: 8px; }
.accordion.section-orange summary { border-left: 4px solid #d98a00; padding-left: 8px; }
.accordion.section-green summary { border-left: 4px solid #2f6b46; padding-left: 8px; }

.misc-items-table input[type="text"] { width: 100%; }
.equipment-edit-row td { background: #f7f7f2; }
.equipment-edit-row .form-inline { flex-wrap: wrap; gap: 8px; }

/* «ТЗ — Материалы» (13.09.2026): десять блоков с таблицей решений. */
.tz-panel { margin-bottom: 16px; }
.tz-panel-tools { display: flex; justify-content: flex-end; margin: 0 0 8px; }
.tz-block { background: #fff; border: 1px solid #e2e2e2; border-radius: 8px; margin-bottom: 8px; min-width: 0; }
.tz-block > summary { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding: 8px 12px; cursor: pointer; list-style: none; }
.tz-block > summary::-webkit-details-marker { display: none; }
.tz-block > summary::before { content: "▸"; color: #666; }
.tz-block[open] > summary::before { content: "▾"; }
.tz-block-title { font-weight: 600; }
.tz-block-toggle { margin-left: auto; }
.tz-block-body { padding: 0 12px 10px; min-width: 0; }
.tz-block-note { margin: 4px 0; }
.tz-panel .btn, .tz-btn { white-space: normal; max-width: 100%; }
.tz-btn { padding: 4px 10px; font-size: 13px; }
.tz-table { width: 100%; table-layout: fixed; border-collapse: collapse; }
.tz-table col.tz-col-el { width: 18%; }
.tz-table col.tz-col-ch { width: 42%; }
.tz-table col.tz-col-pl { width: 20%; }
.tz-table col.tz-col-act { width: 20%; }
.tz-table th { text-align: left; font-size: 12px; color: #666; font-weight: 600; padding: 6px; border-bottom: 1px solid #e2e2e2; }
.tz-table td { vertical-align: top; padding: 6px; border-bottom: 1px solid #f0f0f0; overflow-wrap: anywhere; min-width: 0; }
.tz-table input[type="text"], .tz-table input[type="date"], .tz-table select, .tz-table textarea {
  display: block; width: 100%; max-width: 100%; min-width: 0; box-sizing: border-box; font-size: 14px; padding: 4px 6px;
}
.tz-kind { font-size: 12px; margin-top: 2px; }
.tz-attrs { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 150px), 1fr)); gap: 6px 10px; }
.tz-attr { display: flex; flex-direction: column; gap: 2px; min-width: 0; font-size: 13px; }
.tz-attr-label { color: #444; font-size: 12px; }
.tz-attr-na { font-size: 12px; color: #666; }
.tz-attr-na input { width: auto; display: inline; }
.tz-zones { display: flex; flex-direction: column; gap: 4px; }
.tz-actions-row { display: flex; flex-wrap: wrap; gap: 6px; }
.tz-inline-form { display: inline; }
.tz-mini { margin-top: 6px; font-size: 13px; }
.tz-mini > summary { cursor: pointer; color: #555; }
.tz-exp-form { display: flex; flex-direction: column; gap: 6px; margin-top: 6px; }
.tz-exp-form label { display: flex; flex-direction: column; gap: 2px; font-size: 12px; color: #444; }
.tz-line-exps { margin: 6px 0 0; padding-left: 18px; font-size: 13px; }
.tz-add { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.tz-row-review > td:first-child { box-shadow: inset 4px 0 #b3261e; }
.tz-completeness { margin: 16px 0; }
.tz-completeness-table col.tz-cc-block { width: 18%; }
.tz-completeness-table col.tz-cc-state { width: 22%; }
.tz-questions { margin: 0; padding-left: 18px; font-size: 13px; }
@media (max-width: 760px) {
  .tz-table, .tz-table tbody, .tz-table tr, .tz-table td { display: block; width: 100%; }
  .tz-table thead, .tz-table colgroup { display: none; }
  .tz-table tr { border: 1px solid #e2e2e2; border-radius: 6px; margin-bottom: 8px; padding: 4px 0; }
  .tz-table td { border: none; padding: 6px 8px; }
  .tz-table td[data-label]::before { content: attr(data-label); display: block; font-size: 12px; color: #666; font-weight: 600; margin-bottom: 2px; }
  .tz-attrs { grid-template-columns: 1fr; }
  .tz-block-toggle { margin-left: 0; }
}
/* Длинное название без пробелов в заголовке карточки не должно раздвигать страницу по ширине. */
.page-header h1 { overflow-wrap: anywhere; min-width: 0; }

/* 19.09.2026 (маршрут Заказа и быстрые шаблоны): длинные тексты шаблонов, ожидаемого результата и подсказок
   переносятся и не расширяют карточки; подсказка внутри блока задачи — компактная сворачиваемая. */
.text-wrap { overflow-wrap: anywhere; min-width: 0; }
.pre-line { white-space: pre-line; overflow-wrap: anywhere; }
.task-mini .accordion { margin: 8px 0 0; padding: 0 10px; }
.task-mini .accordion summary { padding: 8px 0; font-size: 13px; }
.steps-list { margin: 0 0 10px; padding-left: 18px; font-size: 13px; overflow-wrap: anywhere; }
.steps-list li { margin-bottom: 3px; }
#task-from-template form.ap-form { display: flex; flex-direction: column; gap: 8px; margin: 0; }
#task-from-template form.ap-form textarea { width: 100%; min-height: 56px; resize: vertical; box-sizing: border-box; }
#task-from-template form.ap-form input[type="text"] { width: 100%; box-sizing: border-box; }
#task-from-template form.ap-form select, #task-from-template form.ap-form input[type="datetime-local"] { width: 100%; max-width: 100%; box-sizing: border-box; }
#task-from-template form.ap-form .ap-buttons { align-self: flex-start; }
/* Длинные подписи кнопок панели «Сейчас» и списки сотрудников в новых формах не расширяют страницу на телефоне. */
.action-panel .ap-buttons .btn { white-space: normal; max-width: 100%; text-align: left; }
#task-from-template .grid > label { min-width: 0; }
.process-fields > label.field { min-width: 0; }
.process-fields select, .process-fields input { max-width: 100%; min-width: 0; box-sizing: border-box; }

/* ---------- Календарь загрузки и Гант (23.09.2026) ----------
   Свой namespace .cal-*, существующие компоненты (.card, .btn, .pill, .notice, .warn-box,
   .list-table, .field) не переопределяются. Цвета берутся из тех же переменных :root, что и
   вся CRM — отдельной палитры не вводится. */

.cal-toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 12px; }
.cal-views { display: inline-flex; border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; background: var(--surface); }
.cal-views a { padding: 6px 12px; font-size: 13px; color: var(--text); text-decoration: none; border-right: 1px solid var(--border); }
.cal-views a:last-child { border-right: 0; }
.cal-views a.is-active { background: var(--green); color: #fff; }
.cal-nav { display: inline-flex; gap: 4px; align-items: center; }
.cal-title { font-weight: 600; font-size: 15px; }
.cal-filters { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-left: auto; }
.cal-filters select { max-width: 100%; min-width: 0; }

/* Цвет полосы по типу работы — различимые, но в общей гамме интерфейса. */
.cal-bar { --c: #6a736e; --cs: #eceeeb; }
.cal-bar.t-DESIGN { --c: #2f6b46; --cs: #e5efe8; }
.cal-bar.t-PRODUCTION_INTERNAL { --c: #5c5470; --cs: #ece9f2; }
.cal-bar.t-ASSEMBLY { --c: #1f6f7a; --cs: #e2f0f2; }
.cal-bar.t-DELIVERY { --c: #9a5a00; --cs: #fff0d9; }
.cal-bar.t-INSTALLATION { --c: #b3261e; --cs: #fbe8e6; }
.cal-bar.t-REVISIT, .cal-bar.t-EXTRA_DELIVERY, .cal-bar.t-PUNCHLIST { --c: #8a6d1f; --cs: #f7efd7; }
.cal-bar.t-RESERVE { --c: #6a736e; --cs: #eceeeb; }
.cal-bar.t-BLOCKED_EXTERNAL { --c: #7a4a4a; --cs: #f3e6e6; }
.cal-bar.t-MILESTONE { --c: #17211c; --cs: #dfe3e0; }
.cal-bar.s-DONE { opacity: .55; }
.cal-bar.s-CANCELLED { opacity: .4; text-decoration: line-through; }

/* Легенда */
.cal-legend { display: flex; flex-wrap: wrap; gap: 10px; font-size: 12px; color: var(--muted); margin-bottom: 10px; }
.cal-legend span { display: inline-flex; align-items: center; gap: 5px; }
.cal-legend i { width: 12px; height: 12px; border-radius: 3px; background: var(--c); display: inline-block; }

/* ---------- Год ----------
   Задача годового вида — оперативный обзор: весь год на одном экране, занятые дни видны,
   Заказы различимы цветом. Поэтому колонок фиксированное число, а не auto-fill: так
   12 месяцев укладываются в 2 ряда на 1366 px. На телефоне месяцы не растягиваются в
   вертикальную ленту (это перестало бы быть обзором года), а прокручиваются вбок внутри
   своего блока — сама страница вбок не едет. */
.cal-year { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 8px; }
.cal-year-month { border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); padding: 6px 8px; min-width: 0; }
@media (max-width: 1240px) { .cal-year { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
@media (max-width: 980px) { .cal-year { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.cal-year-month h4 { margin: 0 0 6px; font-size: 13px; text-transform: capitalize; }
.cal-year-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 2px; }
.cal-year-cell { aspect-ratio: 1; border-radius: 2px; background: var(--surface-2); font-size: 9px; color: var(--muted); display: flex; align-items: center; justify-content: center; position: relative; }
.cal-year-cell.off { background: #edefec; color: #aeb5b0; }
.cal-year-cell.has { background: var(--cs, #e5efe8); color: var(--text); font-weight: 600; }
.cal-year-month ul { list-style: none; margin: 6px 0 0; padding: 0; font-size: 11px; }
.cal-year-month li { display: flex; gap: 5px; align-items: center; padding: 1px 0; min-width: 0; }
.cal-year-month li b { width: 10px; height: 10px; border-radius: 2px; background: var(--c); flex: 0 0 auto; }
.cal-year-month li a { color: var(--text); text-decoration: none; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ---------- Месяц ---------- */
.cal-month { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px; }
.cal-dow { font-size: 11px; color: var(--muted); text-align: center; padding: 2px 0; }
.cal-day { border: 1px solid var(--border); border-radius: 6px; background: var(--surface); min-height: 84px; padding: 4px 5px; min-width: 0; }
.cal-day.off { background: var(--surface-2); }
.cal-day.today { border-color: var(--green); box-shadow: 0 0 0 1px var(--green) inset; }
.cal-day-h { display: flex; justify-content: space-between; align-items: baseline; font-size: 11px; color: var(--muted); margin-bottom: 3px; }
.cal-day-h b { font-size: 13px; color: var(--text); }
.cal-chip { display: block; font-size: 11px; line-height: 1.25; padding: 2px 4px; border-radius: 4px; background: var(--cs); border-left: 3px solid var(--c); color: var(--text); text-decoration: none; margin-bottom: 2px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cal-hol { font-size: 10px; color: var(--amber); display: block; }

/* ---------- Неделя ---------- */
.cal-week-wrap { overflow-x: auto; }
.cal-week { width: 100%; border-collapse: collapse; font-size: 12px; min-width: 680px; }
.cal-week th, .cal-week td { border: 1px solid var(--border); padding: 5px 6px; vertical-align: top; }
.cal-week th { background: var(--surface-2); font-weight: 600; text-align: left; }
.cal-week th.off, .cal-week td.off { background: #edefec; }
.cal-week .res { width: 150px; font-weight: 600; background: var(--surface-2); }
.cal-load { font-size: 10px; color: var(--muted); display: block; margin-top: 3px; }
.cal-load.over { color: var(--red); font-weight: 600; }

/* ---------- Гант ---------- */
.cal-gantt-wrap { overflow-x: auto; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); }
.cal-gantt { position: relative; min-width: 760px; }
.cal-gantt-head { display: flex; border-bottom: 1px solid var(--border); background: var(--surface-2); position: sticky; top: 0; z-index: 2; }
.cal-gantt-side { flex: 0 0 210px; padding: 6px 8px; font-size: 12px; font-weight: 600; border-right: 1px solid var(--border); box-sizing: border-box; }
.cal-gantt-scale { position: relative; flex: 1 1 auto; height: 34px; }
.cal-gantt-tick { position: absolute; top: 0; bottom: 0; border-left: 1px solid var(--border); font-size: 10px; color: var(--muted); padding-left: 3px; white-space: nowrap; }
.cal-gantt-row { display: flex; border-bottom: 1px solid var(--border); min-height: 30px; }
.cal-gantt-row.group { background: var(--surface-2); font-weight: 600; }
.cal-gantt-row .cal-gantt-side { font-weight: 400; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cal-gantt-track { position: relative; flex: 1 1 auto; }
.cal-gantt-track .off { position: absolute; top: 0; bottom: 0; background: #edefec; }
.cal-gantt-bar { position: absolute; top: 5px; height: 20px; border-radius: 4px; background: var(--cs); border: 1px solid var(--c); border-left-width: 4px; font-size: 11px; line-height: 18px; padding: 0 5px; color: var(--text); text-decoration: none; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; box-sizing: border-box; }
.cal-gantt-bar.conflict { outline: 2px solid var(--red); outline-offset: 1px; }
.cal-gantt-svg { position: absolute; inset: 0; pointer-events: none; }

/* Конфликты и предупреждения */
.cal-warn-list { margin: 0; padding-left: 18px; font-size: 13px; }
.cal-warn-list li { margin: 2px 0; }

/* План и факт */
.cal-pf { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 8px; }
.cal-pf div { background: var(--surface-2); border: 1px solid var(--border); border-radius: 6px; padding: 7px 9px; min-width: 0; }
.cal-pf small { display: block; color: var(--muted); font-size: 11px; }
.cal-pf b { font-size: 15px; }
.cal-dev-plus { color: var(--red); }
.cal-dev-minus { color: var(--green); }

@media (max-width: 760px) {
  .cal-filters { margin-left: 0; width: 100%; }
  .cal-year { display: flex; grid-template-columns: none; overflow-x: auto; -webkit-overflow-scrolling: touch; padding-bottom: 6px; }
  .cal-year-month { flex: 0 0 190px; }
  .cal-month { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .cal-month .cal-dow { display: none; }
  .cal-day { min-height: 0; }
  .cal-gantt-side { flex-basis: 120px; }
}

/* Цвет Заказа в годовом виде: занятый день окрашивается цветом своего Заказа, поэтому
   видно не только «занято», но и ЧЕЙ это день. Палитра фиксированная, назначается по
   порядку Заказов в окне — своих цветов в теме не заводим. */
.cal-order-0 { --oc: #2f6b46; } .cal-order-1 { --oc: #1f6f7a; } .cal-order-2 { --oc: #9a5a00; }
.cal-order-3 { --oc: #b3261e; } .cal-order-4 { --oc: #5c5470; } .cal-order-5 { --oc: #6a736e; }
.cal-order-6 { --oc: #3d6b8f; } .cal-order-7 { --oc: #8a6d1f; } .cal-order-8 { --oc: #7a4a4a; }
.cal-order-9 { --oc: #2b7a5e; }
.cal-year-cell.busy { background: var(--oc); color: #fff; font-weight: 600; }
.cal-year-cell.busy.multi { background: linear-gradient(135deg, var(--oc) 55%, #17211c 55%); }
.cal-orders-legend { display: flex; flex-wrap: wrap; gap: 8px; font-size: 12px; margin-bottom: 10px; }
.cal-orders-legend a { display: inline-flex; align-items: center; gap: 5px; color: var(--text); text-decoration: none; }
.cal-orders-legend i { width: 11px; height: 11px; border-radius: 3px; background: var(--oc); display: inline-block; flex: 0 0 auto; }
.cal-year-month li b.dot { background: var(--oc); }
