/* ============================================================
   kw7.ru вЂ” РЅРѕРІР°СЏ С‚РµРјР° РёРЅС‚РµСЂС„РµР№СЃР°
   Р—Р°РіСЂСѓР¶Р°РµС‚СЃСЏ РїРѕСЃР»Рµ Р±Р°Р·РѕРІРѕРіРѕ styles.css Рё РїРµСЂРµРѕРїСЂРµРґРµР»СЏРµС‚ РµРіРѕ.
   ============================================================ */

:root {
  --accent: #2f6bff;
  --accent-weak: #e8efff;
  --accent-ink: #1a49c4;
  --ink: #0d1526;
  --text: #344054;
  --muted: #667085;
  --line: #e6eaf2;
  --line-soft: #f0f3f9;
  --bg: #f5f7fb;
  --card: #ffffff;
  --surface-2: #fafbfe;
  --surface-3: #f4f7fd;
  --ok: #12b76a;
  --warn: #f79009;
  --danger: #e5484d;
  --radius: 14px;
  --radius-sm: 10px;
  --radius-lg: 20px;
  --shadow-sm: 0 1px 2px rgba(16, 24, 40, .06), 0 1px 3px rgba(16, 24, 40, .04);
  --shadow-md: 0 12px 30px -18px rgba(16, 24, 40, .35);
  --shadow-lg: 0 24px 60px -30px rgba(16, 24, 40, .45);
  --sidebar-w: 264px;
  --font-ui: 'Inter', 'Segoe UI Variable Text', 'Segoe UI', system-ui, -apple-system, Roboto, Arial, sans-serif;
}

[data-theme="dark"] {
  --accent: #5b8cff;
  --accent-weak: #16224a;
  --accent-ink: #b9ccff;
  --ink: #eaf0fb;
  --text: #c3cee0;
  --muted: #8d9bb3;
  --line: #22304a;
  --line-soft: #1a2438;
  --bg: #0a1120;
  --card: #101a2c;
  --surface-2: #142034;
  --surface-3: #131f33;
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, .5);
  --shadow-md: 0 16px 36px -20px rgba(0, 0, 0, .8);
}

/* ---------- Р±Р°Р·Р° ---------- */
html, body { height: 100%; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-ui);
  font-size: 14.5px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 { color: var(--ink); font-weight: 650; letter-spacing: -.015em; margin: 0; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
hr { border: 0; border-top: 1px solid var(--line); margin: 16px 0; }
code, kbd { font-family: ui-monospace, 'Cascadia Code', Consolas, monospace; }

::selection { background: color-mix(in srgb, var(--accent) 22%, transparent); }

/* ---------- РєР°СЂРєР°СЃ ---------- */
.app-shell { display: flex; min-height: 100vh; }

.sidebar {
  width: var(--sidebar-w);
  flex: 0 0 var(--sidebar-w);
  position: sticky;
  top: 0;
  height: 100vh;
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 18px 14px 14px;
  background: var(--card);
  border-right: 1px solid var(--line);
  z-index: 40;
}

.sidebar-head { display: flex; align-items: center; gap: 10px; padding: 4px 6px 14px; }
.sidebar .brand { display: flex; align-items: center; gap: 10px; min-width: 0; }
.sidebar .brand-mark {
  width: 38px; height: 38px; border-radius: 12px;
  background: linear-gradient(135deg, var(--accent), #7aa2ff);
  color: #fff; font-weight: 700; font-size: 14px;
  display: grid; place-items: center; flex: 0 0 auto;
  box-shadow: 0 6px 16px -8px rgba(47, 107, 255, .8);
}
.sidebar .brand-text { display: flex; flex-direction: column; min-width: 0; }
.sidebar .brand-text b { color: var(--ink); font-size: 14.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sidebar .brand-text span { color: var(--muted); font-size: 11.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sidebar-close { display: none; margin-left: auto; }

.side-nav { flex: 1 1 auto; overflow-y: auto; padding: 2px 2px 8px; scrollbar-width: thin; }
.side-group { margin-bottom: 14px; }
.side-group-title {
  font-size: 10.5px; font-weight: 700; letter-spacing: .09em; text-transform: uppercase;
  color: var(--muted); padding: 6px 10px;
}
.side-link {
  width: 100%; display: flex; align-items: center; gap: 10px;
  padding: 9px 10px; margin: 1px 0;
  border: 0; border-radius: var(--radius-sm);
  background: transparent; color: var(--text);
  font: inherit; text-align: left; cursor: pointer;
  transition: background .15s ease, color .15s ease;
}
.side-link:hover { background: var(--surface-3); color: var(--ink); }
.side-link.active { background: var(--accent-weak); color: var(--accent-ink); font-weight: 600; }
.side-dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; opacity: .35; flex: 0 0 auto; }
.side-link.active .side-dot { opacity: 1; }

.sidebar-foot { border-top: 1px solid var(--line); padding-top: 10px; display: flex; align-items: center; gap: 8px; }
.side-user {
  flex: 1 1 auto; display: flex; align-items: center; gap: 10px; min-width: 0;
  border: 0; background: transparent; padding: 6px; border-radius: var(--radius-sm);
  cursor: pointer; text-align: left; font: inherit; color: inherit;
}
.side-user:hover { background: var(--surface-3); }
.side-user-text { display: flex; flex-direction: column; min-width: 0; }
.side-user-text b { color: var(--ink); font-size: 13px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.side-user-text span { color: var(--muted); font-size: 11.5px; }

.app-main { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; }

.topbar {
  position: sticky; top: 0; z-index: 30;
  display: flex; align-items: center; gap: 14px;
  padding: 12px 26px;
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--line);
}
.topbar .nav-toggle { display: none; }
.page-title { display: flex; flex-direction: column; min-width: 0; }
.page-kicker { font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.page-title h1 { font-size: 20px; line-height: 1.2; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.topbar-right { margin-left: auto; display: flex; align-items: center; gap: 8px; }

.topbar-search {
  display: flex; align-items: center; gap: 8px;
  height: 38px; padding: 0 12px;
  border: 1px solid var(--line); border-radius: 999px;
  background: var(--card); color: var(--muted); font: inherit; cursor: pointer;
}
.topbar-search:hover { border-color: color-mix(in srgb, var(--accent) 40%, var(--line)); color: var(--ink); }
.topbar-search kbd {
  font-size: 10.5px; padding: 2px 6px; border-radius: 6px;
  background: var(--surface-3); border: 1px solid var(--line); color: var(--muted);
}

.icon-btn {
  position: relative;
  width: 38px; height: 38px; display: inline-grid; place-items: center;
  border: 1px solid var(--line); border-radius: 12px; background: var(--card);
  color: var(--text); font-size: 16px; cursor: pointer; transition: .15s;
}
.icon-btn:hover { border-color: color-mix(in srgb, var(--accent) 35%, var(--line)); color: var(--ink); }
.bell-count {
  position: absolute; top: -6px; right: -6px;
  min-width: 18px; height: 18px; padding: 0 5px;
  border-radius: 999px; background: var(--danger); color: #fff;
  font-size: 10.5px; font-weight: 700; display: grid; place-items: center;
}

.user-chip {
  display: flex; align-items: center; gap: 10px;
  height: 42px; padding: 0 10px 0 6px;
  border: 1px solid var(--line); border-radius: 999px; background: var(--card);
  cursor: pointer; font: inherit; color: inherit;
}
.user-chip:hover { border-color: color-mix(in srgb, var(--accent) 35%, var(--line)); }
.user-avatar {
  width: 30px; height: 30px; border-radius: 50%;
  background: linear-gradient(135deg, #2f6bff, #7aa2ff);
  color: #fff; font-size: 12px; font-weight: 700;
  display: grid; place-items: center; flex: 0 0 auto;
}
.user-chip-text { display: flex; flex-direction: column; align-items: flex-start; line-height: 1.15; }
.user-name { font-size: 12.5px; font-weight: 600; color: var(--ink); max-width: 140px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.role-badge { font-size: 10.5px; color: var(--muted); }

.shell { padding: 24px 26px 64px; width: 100%; }
.shell > * { max-width: 1480px; }

/* ---------- Р·Р°РіРѕР»РѕРІРєРё СЃС‚СЂР°РЅРёС† ---------- */
.page-head {
  display: flex; align-items: flex-end; justify-content: space-between; gap: 16px;
  flex-wrap: wrap; margin-bottom: 20px;
}
.page-head h2, .page-head h1 { font-size: 22px; }
.page-head p, .page-head .muted { margin: 4px 0 0; }
.page-head .actions, .page-head > div:last-child { display: flex; gap: 8px; flex-wrap: wrap; }

/* ---------- РєР°СЂС‚РѕС‡РєРё ---------- */
.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}
.card + .card { margin-top: 16px; }
.card-head {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 16px 18px; border-bottom: 1px solid var(--line-soft);
}
.card-head h3, .card-head h2 { font-size: 15px; }
.card-head .muted { font-size: 12.5px; }
.card-body { padding: 18px; }
.card-table { padding: 0; overflow: hidden; }

/* ---------- РєРЅРѕРїРєРё ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 38px; padding: 0 14px;
  border: 1px solid var(--line); border-radius: 10px;
  background: var(--card); color: var(--ink);
  font: inherit; font-weight: 550; font-size: 13.5px;
  cursor: pointer; white-space: nowrap;
  transition: background .15s, border-color .15s, box-shadow .15s, transform .05s;
}
.btn:hover { background: var(--surface-3); }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .55; cursor: not-allowed; }
.btn-sm { height: 32px; padding: 0 10px; font-size: 12.5px; border-radius: 9px; }
.btn-primary {
  background: var(--accent); border-color: var(--accent); color: #fff;
  box-shadow: 0 8px 18px -12px color-mix(in srgb, var(--accent) 90%, transparent);
}
.btn-primary:hover { background: color-mix(in srgb, var(--accent) 88%, #000); }
.btn-danger { background: color-mix(in srgb, var(--danger) 10%, var(--card)); border-color: color-mix(in srgb, var(--danger) 35%, var(--line)); color: var(--danger); }
.btn-danger:hover { background: color-mix(in srgb, var(--danger) 16%, var(--card)); }
.btn-emerald { background: var(--ok); border-color: var(--ok); color: #fff; }
.link-btn, .link { background: none; border: 0; padding: 0; color: var(--accent); cursor: pointer; font: inherit; }
.link-btn:hover { text-decoration: underline; }

/* ---------- С‚Р°Р±Р»РёС†С‹ ---------- */
.table-wrap { width: 100%; overflow-x: auto; border-radius: var(--radius); }
table { width: 100%; border-collapse: separate; border-spacing: 0; }
th {
  text-align: left; font-size: 11.5px; font-weight: 650; letter-spacing: .04em;
  text-transform: uppercase; color: var(--muted);
  padding: 12px 14px; background: var(--surface-2);
  border-bottom: 1px solid var(--line);
  position: sticky; top: 0; z-index: 1;
}
td { padding: 12px 14px; border-bottom: 1px solid var(--line-soft); vertical-align: middle; }
tbody tr:hover td { background: color-mix(in srgb, var(--accent) 3%, transparent); }
tbody tr:last-child td { border-bottom: 0; }

/* ---------- Р±РµР№РґР¶Рё ---------- */
.badge, .pill, .role-badge, .mode-count {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 2px 9px; border-radius: 999px;
  font-size: 11.5px; font-weight: 600; line-height: 1.6;
  background: var(--surface-3); color: var(--text);
  border: 1px solid var(--line);
}
.badge.green, .pill.green { background: color-mix(in srgb, var(--ok) 12%, transparent); color: #0b7a4b; border-color: color-mix(in srgb, var(--ok) 30%, transparent); }
.badge.red, .badge.danger { background: color-mix(in srgb, var(--danger) 12%, transparent); color: #b02a2e; border-color: color-mix(in srgb, var(--danger) 28%, transparent); }
.badge.amber { background: color-mix(in srgb, var(--warn) 14%, transparent); color: #9a5b00; border-color: color-mix(in srgb, var(--warn) 30%, transparent); }
.badge.blue { background: var(--accent-weak); color: var(--accent-ink); border-color: color-mix(in srgb, var(--accent) 25%, transparent); }

/* ---------- С„РѕСЂРјС‹ ---------- */
.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; }
.label, .field > label { font-size: 12.5px; font-weight: 600; color: var(--ink); }
.input, .field input, .field select, .field textarea,
input[type="text"], input[type="search"], input[type="email"], input[type="password"],
input[type="number"], input[type="date"], input[type="datetime-local"], select, textarea {
  width: 100%; min-height: 38px; padding: 8px 12px;
  border: 1px solid var(--line); border-radius: 10px;
  background: var(--card); color: var(--ink);
  font: inherit; font-size: 13.5px;
  transition: border-color .15s, box-shadow .15s;
}
.input:focus, input:focus, select:focus, textarea:focus {
  outline: 0; border-color: var(--accent);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 18%, transparent);
}
textarea { min-height: 84px; resize: vertical; }
.field-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 14px; }
.form-hint, .hint { font-size: 12px; color: var(--muted); }
.form-sec { border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; margin-bottom: 16px; background: var(--surface-2); }
.form-sec-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.form-sec-head h3 { font-size: 14px; }

.filters-bar {
  display: flex; flex-wrap: wrap; gap: 10px; align-items: center;
  padding: 12px; margin-bottom: 16px;
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
}
.filters-bar .input, .filters-bar input, .filters-bar select { width: auto; min-width: 180px; }

/* ---------- KPI Рё РґР°С€Р±РѕСЂРґ ---------- */
.kpi-grid, .kpi-grid-4 { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); margin-bottom: 18px; }
.kpi, .dash-item {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 16px; box-shadow: var(--shadow-sm);
}
.kpi-label, .kpi-title { font-size: 12px; color: var(--muted); font-weight: 600; text-transform: uppercase; letter-spacing: .04em; }
.kpi-number, .kpi-value { font-size: 28px; font-weight: 700; color: var(--ink); letter-spacing: -.02em; margin-top: 6px; }
.kpi-hint, .kpi-note { font-size: 12px; color: var(--muted); margin-top: 4px; }

.dash-grid { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); }
.today-grid { display: grid; gap: 16px; grid-template-columns: 2fr 1fr; }
.two-col { display: grid; gap: 16px; grid-template-columns: 1fr 1fr; }

/* ---------- РїСѓСЃС‚С‹Рµ СЃРѕСЃС‚РѕСЏРЅРёСЏ ---------- */
.empty, .empty-state, .dash-empty {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px;
  padding: 44px 20px; text-align: center; color: var(--muted);
  background: var(--card); border: 1px dashed var(--line); border-radius: var(--radius);
}
.empty-icon { font-size: 26px; opacity: .6; }

/* ---------- РјРѕРґР°Р»СЊРЅС‹Рµ РѕРєРЅР° / С‚РѕСЃС‚С‹ / РїР°Р»РёС‚СЂР° ---------- */
.modal-backdrop, .palette-backdrop {
  position: fixed; inset: 0; background: rgba(9, 14, 26, .55);
  backdrop-filter: blur(3px); z-index: 100; display: grid; place-items: center; padding: 20px;
}
.modal {
  width: min(720px, 100%); max-height: 88vh; overflow: auto;
  background: var(--card); border: 1px solid var(--line);
  border-radius: var(--radius-lg); box-shadow: var(--shadow-lg);
}
.modal-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 18px 20px; border-bottom: 1px solid var(--line-soft); }
.modal-body { padding: 20px; }
.modal-foot { display: flex; justify-content: flex-end; gap: 10px; padding: 16px 20px; border-top: 1px solid var(--line-soft); }
.toast-wrap { position: fixed; right: 20px; bottom: 20px; display: flex; flex-direction: column; gap: 10px; z-index: 200; }
.toast {
  display: flex; align-items: center; gap: 10px;
  padding: 12px 14px; min-width: 260px;
  background: var(--card); border: 1px solid var(--line); border-left: 4px solid var(--accent);
  border-radius: 12px; box-shadow: var(--shadow-md); font-size: 13.5px;
}
.toast.error { border-left-color: var(--danger); }
.toast-close { margin-left: auto; background: none; border: 0; color: var(--muted); cursor: pointer; }

.palette { width: min(640px, 100%); background: var(--card); border: 1px solid var(--line); border-radius: var(--radius-lg); box-shadow: var(--shadow-lg); overflow: hidden; }
.palette-input { width: 100%; border: 0; border-bottom: 1px solid var(--line); border-radius: 0; padding: 16px 18px; font-size: 15px; }
.palette-list { max-height: 50vh; overflow: auto; }
.palette-item { display: flex; flex-direction: column; gap: 2px; width: 100%; text-align: left; padding: 12px 18px; border: 0; background: transparent; cursor: pointer; font: inherit; color: inherit; }
.palette-item:hover, .palette-item.active { background: var(--surface-3); }
.palette-label { font-size: 13.5px; font-weight: 600; color: var(--ink); }

/* ---------- РІС…РѕРґ ---------- */
.login-wrap { min-height: 100vh; display: grid; place-items: center; padding: 24px; background: radial-gradient(1200px 600px at 20% -10%, color-mix(in srgb, var(--accent) 18%, transparent), transparent), var(--bg); }
.login-card { width: min(420px, 100%); background: var(--card); border: 1px solid var(--line); border-radius: var(--radius-lg); box-shadow: var(--shadow-lg); padding: 28px; }
.login-logo { width: 48px; height: 48px; border-radius: 14px; background: linear-gradient(135deg, var(--accent), #7aa2ff); display: grid; place-items: center; color: #fff; font-weight: 700; margin-bottom: 16px; }
.login-card h1 { font-size: 20px; margin-bottom: 6px; }
.login-card .muted { font-size: 13px; }
.login-card .btn { width: 100%; margin-top: 6px; }
.login-error { margin-top: 12px; padding: 10px 12px; border-radius: 10px; background: color-mix(in srgb, var(--danger) 10%, transparent); color: var(--danger); font-size: 13px; }
.login-note { margin-top: 16px; font-size: 12px; color: var(--muted); }

/* ---------- СѓРІРµРґРѕРјР»РµРЅРёСЏ, РїСЂРѕС„РёР»СЊ, СЃРїСЂР°РІРєР° ---------- */
.notify-list { display: flex; flex-direction: column; gap: 10px; }
.notify-body { border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; background: var(--card); }
.notify-title { font-weight: 600; color: var(--ink); }
.notify-meta { font-size: 12px; color: var(--muted); margin-top: 2px; }
.profile-facts { display: grid; gap: 10px; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.help-grid { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.help-card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; }

/* ---------- С‡Р°С‚ РїРѕРјРѕС‰РЅРёРєР° ---------- */
.def-msg { display: flex; flex-direction: column; gap: 4px; max-width: 92%; }
.def-msg-text { padding: 10px 13px; border-radius: 14px; background: var(--surface-3); white-space: pre-wrap; }
.def-msg-meta { font-size: 11px; color: var(--muted); }
.def-input, .defect-input { display: flex; gap: 8px; align-items: flex-end; }
.defect-chat-card { display: flex; flex-direction: column; gap: 12px; }
.def-steps, .def-step { display: flex; gap: 8px; flex-wrap: wrap; font-size: 12px; color: var(--muted); }

/* ---------- РїСЂРѕС‡РµРµ ---------- */
.progress-bar, .progress-strip { height: 8px; border-radius: 999px; background: var(--surface-3); overflow: hidden; }
.progress-bar > i, .progress-text { display: block; height: 100%; background: var(--accent); border-radius: 999px; }
.muted { color: var(--muted); }
.spacer { flex: 1 1 auto; }
.stack { display: flex; flex-direction: column; gap: 12px; }
.grid:not(table) { display: grid; gap: 14px; }
.skel { border-radius: 10px; background: linear-gradient(90deg, var(--surface-3), var(--surface-2), var(--surface-3)); background-size: 200% 100%; animation: skel 1.2s ease-in-out infinite; }
@keyframes skel { 0% { background-position: 200% 0; } 100% { background-position: -200% 0; } }

.nav-scrim { display: none; }

/* ---------- Р°РґР°РїС‚РёРІ ---------- */
@media (max-width: 1279px) {
  .shell { padding: 20px 18px 56px; }
  .topbar { padding: 12px 18px; }
}

@media (max-width: 1024px) {
  .app-shell { display: block; }
  .sidebar {
    position: fixed; left: 0; top: 0; bottom: 0;
    transform: translateX(-104%);
    transition: transform .22s ease;
    box-shadow: var(--shadow-lg);
    z-index: 60;
  }
  .sidebar.open { transform: none; }
  .sidebar-close { display: inline-grid; }
  .nav-scrim { display: block; position: fixed; inset: 0; background: rgba(9, 14, 26, .5); opacity: 0; pointer-events: none; transition: opacity .2s; z-index: 55; }
  .nav-scrim.open { opacity: 1; pointer-events: auto; }
  .topbar .nav-toggle { display: inline-grid; }
  .app-main { min-height: 100vh; }
  .today-grid, .two-col { grid-template-columns: 1fr; }
}

@media (max-width: 640px) {
  .shell { padding: 16px 12px 48px; }
  .topbar { padding: 10px 12px; gap: 10px; }
  .page-title h1 { font-size: 17px; }
  .topbar-search .topbar-search-text, .topbar-search kbd { display: none; }
  .user-chip-text { display: none; }
  .kpi-number, .kpi-value { font-size: 24px; }
  th, td { padding: 10px; }
}

/* ---------- РїРµС‡Р°С‚СЊ: РѕСЃС‚Р°РІР»СЏРµРј РґРѕРєСѓРјРµРЅС‚С‹ РєР°Рє РµСЃС‚СЊ ---------- */
@media print {
  .sidebar, .topbar, .nav-scrim, .toast-wrap, .app-progress { display: none !important; }
  .app-main { margin: 0; }
  .shell { padding: 0; }
  body { background: #fff; }
}

/* ---------- мобильный осмотр ---------- */
@media (max-width: 700px) {
  .acc { border-radius: 12px; margin-bottom: 10px; }
  .acc-head { min-height: 58px; padding: 12px 14px; gap: 10px; align-items: center; }
  .acc-num { width: 28px; height: 28px; font-size: 12px; flex: none; }
  .acc-name { font-size: 15px; line-height: 1.3; }
  .acc-count { font-size: 12.5px; padding: 3px 8px; }
  .acc-tools { padding: 8px 12px 2px; gap: 8px; }
  .acc-tools .btn { flex: 1 1 auto; min-height: 40px; justify-content: center; }
  .item { min-height: 52px; padding: 12px; gap: 12px; font-size: 15px; line-height: 1.35; align-items: flex-start; }
  .item input[type="checkbox"] { width: 22px; height: 22px; margin-top: 1px; flex: none; }
  .item.done { background: #eef7f0; }
  .progress-strip { position: sticky; top: 60px; z-index: 5; background: var(--card, #fff); padding: 8px 4px; }
  .eq-card { min-height: 76px; }
  .field input, .field select, .field textarea, input, select, textarea { min-height: 44px; font-size: 16px; }
  .btn { min-height: 44px; }
  .btn-sm { min-height: 38px; }
  .page-head { align-items: stretch; }
  .page-head .btn { width: 100%; justify-content: center; }
  .modal-box, .modal { max-height: 88vh; }
}
.def-msg-text p { margin: 0 0 6px; }
.def-msg-text p:last-child { margin-bottom: 0; }
.def-msg-text ul, .def-msg-text ol { margin: 4px 0 6px; padding-left: 20px; }
.def-msg-text li { margin: 2px 0; }
.def-msg-text .md-h { font-weight: 600; margin: 6px 0 4px; }
.def-msg-text code { background: rgba(127,127,127,.18); padding: 1px 4px; border-radius: 4px; font-size: .92em; }

/* repairs ui v2: compact status chips and parts quantity */
.badge.badge-status {
  max-width: 170px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  vertical-align: middle;
}
.field .picker-row { cursor: default; }
.field .picker-check { display: flex; align-items: center; gap: 10px; flex: 1 1 auto; min-width: 0; cursor: pointer; }
.field .picker-row .picker-qty {
  flex: 0 0 68px; width: 68px; min-height: 32px; padding: 4px 6px;
  border: 1px solid var(--line); border-radius: 8px; background: var(--card);
  color: var(--ink); text-align: center;
}
.field .picker-row .picker-qty:disabled { opacity: .45; }
@media (max-width: 760px) {
  .badge.badge-status { max-width: none; white-space: normal; }
}

/* repairs detail, photo gallery, saved filters */
#repairs-table tbody tr[data-repair-id] { cursor: pointer; }
.repair-detail .detail-grid {
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px;
}
.repair-detail .detail-grid > div { min-width: 0; }
.repair-detail .detail-label {
  display: block; margin-bottom: 3px; color: var(--muted);
  font-size: 10.5px; font-weight: 600; letter-spacing: .05em; text-transform: uppercase;
}
.repair-detail .detail-block { margin-top: 16px; }
.repair-detail .detail-actions { display: flex; justify-content: flex-end; margin-top: 18px; }
.detail-parts { width: 100%; border-collapse: collapse; font-size: 13px; }
.detail-parts th, .detail-parts td { text-align: left; padding: 6px 8px; border-bottom: 1px solid var(--line-soft); }
.detail-parts th { color: var(--muted); font-weight: 600; font-size: 11px; }
.photo-thumb {
  width: 92px; height: 92px; padding: 0; border: 1px solid var(--line);
  border-radius: 10px; overflow: hidden; background: var(--surface-3); cursor: zoom-in;
}
.photo-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.photo-lightbox {
  position: fixed; inset: 0; z-index: 120; display: flex; align-items: center;
  justify-content: center; padding: 24px; background: rgba(8, 14, 28, .82); cursor: zoom-out;
}
.photo-lightbox img { max-width: 92vw; max-height: 92vh; border-radius: 12px; box-shadow: 0 30px 80px rgba(0,0,0,.5); }
@media (max-width: 760px) {
  .repair-detail .detail-grid { grid-template-columns: 1fr 1fr; }
  .photo-thumb { width: 76px; height: 76px; }
}

/* repairs bulk actions */
.bulk-bar {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  padding: 10px 16px; border-bottom: 1px solid var(--line); background: var(--surface-2);
}
.bulk-bar[hidden] { display: none; }
.bulk-bar .bulk-count { color: var(--muted); font-size: 13px; }
.bulk-bar .bulk-count b { color: var(--ink); }
.bulk-bar select { min-width: 260px; }
.bulk-bar .btn { flex: none; }
.select-col, .select-cell { width: 34px; min-width: 34px; padding-left: 12px !important; padding-right: 0 !important; text-align: center; }
.select-col input, .select-cell input, .repair-check { width: 16px; height: 16px; cursor: pointer; accent-color: var(--blue); }
@media (max-width: 760px) {
  .bulk-bar { align-items: stretch; padding: 10px 12px; }
  .bulk-bar select { width: 100%; min-width: 0; }
  .bulk-bar .btn { flex: 1 1 auto; }
  #repairs-table tbody tr { position: relative; }
  #repairs-table td.select-cell { position: absolute; top: 14px; right: 14px; z-index: 1; width: auto; padding: 0 !important; }
  #repairs-table td.select-cell::before { display: none; }
}
@media (max-width: 760px) {
  #repairs-table td[data-label="Дата"] { padding-right: 40px !important; }
}
@media (max-width: 760px) {
  #repairs-table td[data-label="Причина"] > .repair-cell,
  #repairs-table td[data-label="Время"] > .repair-cell,
  #repairs-table td[data-label="Запчасти"] > .repair-cell {
    flex: 1 1 0; min-width: 0; text-align: left;
  }
  #repairs-table td.actions { justify-content: flex-start; flex-wrap: wrap; gap: 6px; }
  #repairs-table td.actions::before { display: none; }
  #repairs-table td.actions .btn { flex: 1 1 auto; }
}
