/* ==========================================================================
   ПВЗ — дизайн v2: SaaS-дашборд с тёмным сайдбаром и индиго-акцентом.
   Светлая/тёмная темы. Шрифт — системный (Segoe UI / Inter-стек), без внешних
   загрузок: CSP остаётся строгим.
   ========================================================================== */

:root {
  --bg: #f3f5fb;
  --surface: #ffffff;
  --surface-2: #eef1f8;
  --border: #e3e8f2;
  --border-strong: #cbd3e4;

  --text: #101828;
  --text-secondary: #5b6472;
  --text-muted: #98a2b3;

  --primary: #4f46e5;
  --primary-hover: #4338ca;
  --on-primary: #ffffff;
  --accent: #7c3aed;
  --accent-soft: #ede9fe;
  --primary-soft: #eef2ff;

  --danger: #e11d48;
  --danger-hover: #be123c;
  --danger-soft: #ffe4e9;
  --warning: #b45309;
  --warning-soft: #fef3c7;
  --success: #059669;
  --success-soft: #d3f8e6;

  --sidebar-bg: linear-gradient(180deg, #1e1b4b 0%, #312e81 100%);
  --sidebar-text: #c7d2fe;
  --sidebar-muted: #8f9bda;

  --shadow-sm: 0 1px 2px rgba(16, 24, 40, 0.05);
  --shadow-md: 0 10px 30px rgba(16, 24, 40, 0.09);
  --shadow-lg: 0 24px 60px rgba(16, 24, 40, 0.18);

  --radius: 12px;
  --radius-lg: 18px;
  --radius-xl: 24px;

  color-scheme: light;
}

:root[data-theme="dark"] {
  --bg: #0b1220;
  --surface: #111a2e;
  --surface-2: #1a2640;
  --border: #243350;
  --border-strong: #34486e;
  --text: #e6ecf7;
  --text-secondary: #a7b4cc;
  --text-muted: #6d7c99;
  --primary: #818cf8;
  --primary-hover: #a5b4fc;
  --on-primary: #0b1220;
  --accent: #a78bfa;
  --accent-soft: #2b2352;
  --primary-soft: #1c2348;
  --danger: #fb7185;
  --danger-hover: #f43f5e;
  --danger-soft: #3b1726;
  --warning: #fbbf24;
  --warning-soft: #3b2e0e;
  --success: #34d399;
  --success-soft: #12332a;
  --sidebar-bg: linear-gradient(180deg, #0d1326 0%, #151c3d 100%);
  --sidebar-text: #b9c6ee;
  --sidebar-muted: #7f8bc4;
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.4);
  --shadow-md: 0 12px 32px rgba(0, 0, 0, 0.42);
  --shadow-lg: 0 26px 70px rgba(0, 0, 0, 0.55);
  color-scheme: dark;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0b1220;
    --surface: #111a2e;
    --surface-2: #1a2640;
    --border: #243350;
    --border-strong: #34486e;
    --text: #e6ecf7;
    --text-secondary: #a7b4cc;
    --text-muted: #6d7c99;
    --primary: #818cf8;
    --primary-hover: #a5b4fc;
    --on-primary: #0b1220;
    --accent: #a78bfa;
    --accent-soft: #2b2352;
    --primary-soft: #1c2348;
    --danger: #fb7185;
    --danger-hover: #f43f5e;
    --danger-soft: #3b1726;
    --warning: #fbbf24;
    --warning-soft: #3b2e0e;
    --success: #34d399;
    --success-soft: #12332a;
    --sidebar-bg: linear-gradient(180deg, #0d1326 0%, #151c3d 100%);
    --sidebar-text: #b9c6ee;
    --sidebar-muted: #7f8bc4;
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.4);
    --shadow-md: 0 12px 32px rgba(0, 0, 0, 0.42);
    --shadow-lg: 0 26px 70px rgba(0, 0, 0, 0.55);
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
.hidden { display: none !important; }

html, body {
  margin: 0; padding: 0;
  background: var(--bg); color: var(--text);
  font-family: "Segoe UI", Inter, Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 14px; line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
button, input, select, textarea { font: inherit; color: inherit; }
button, a { -webkit-tap-highlight-color: transparent; touch-action: manipulation; }
:focus-visible { outline: 3px solid var(--primary); outline-offset: 2px; }
a { color: inherit; }

.muted { color: var(--text-secondary); }
.small { font-size: 12px; }
.num { font-variant-numeric: tabular-nums; }
.error-text { color: var(--danger); font-size: 13px; font-weight: 600; margin: 10px 0 0; }
.error { color: var(--danger); font-size: 13px; font-weight: 600; margin: 10px 0 0; }
.inactive { opacity: .6; }

h1, h2, h3 { color: var(--text); line-height: 1.2; }

/* ---------------------------------------------------------------- каркас */

.shell { display: flex; min-height: 100vh; }

.sidebar {
  width: 252px; flex-shrink: 0; position: sticky; top: 0; height: 100vh;
  background: var(--sidebar-bg); color: var(--sidebar-text);
  display: flex; flex-direction: column; padding: 18px 14px;
}
.side-brand { display: flex; align-items: center; gap: 12px; padding: 4px 8px 18px; border-bottom: 1px solid rgba(255,255,255,.09); margin-bottom: 14px; }
.logo-mark {
  width: 40px; height: 40px; flex-shrink: 0; border-radius: 12px;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  color: #fff; display: inline-flex; align-items: center; justify-content: center;
}
.logo-mark.large { width: 58px; height: 58px; border-radius: 18px; }
.side-brand-text { line-height: 1.15; }
.side-brand-text b { display: block; font-size: 19px; letter-spacing: .5px; }
.side-brand-text small { font-size: 10px; letter-spacing: 1.1px; text-transform: uppercase; opacity: .62; }

.side-nav { display: flex; flex-direction: column; gap: 4px; flex: 1; overflow-y: auto; }
.side-nav .tab {
  display: flex; align-items: center; gap: 12px; width: 100%;
  padding: 11px 12px; border: 0; border-radius: 12px; background: transparent;
  color: var(--sidebar-text); font-weight: 600; font-size: 13.5px;
  cursor: pointer; text-align: left; transition: background .15s, color .15s;
}
.side-nav .tab:hover { background: rgba(255,255,255,.08); color: #fff; }
.side-nav .tab.active { background: rgba(255,255,255,.14); color: #fff; box-shadow: inset 0 0 0 1px rgba(255,255,255,.08); }
.side-nav .tab svg { opacity: .85; flex-shrink: 0; }
.side-nav .tab span:nth-child(2) { flex: 1; }
.side-nav .tab .badge { margin-left: auto; }

.side-foot { padding: 12px; font-size: 11px; opacity: .55; display: flex; align-items: center; gap: 8px; }
.side-status { width: 8px; height: 8px; border-radius: 50%; background: #34d399; box-shadow: 0 0 0 4px rgba(52,211,153,.15); }

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

.topbar {
  position: sticky; top: 0; z-index: 20; background: var(--surface);
  border-bottom: 1px solid var(--border); box-shadow: var(--shadow-sm);
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 12px 26px; min-height: 64px;
}
.topbar-title { font-size: 19px; font-weight: 800; letter-spacing: -.3px; margin: 0; }
.topbar-right { display: flex; align-items: center; gap: 8px; }
.input.compact { width: auto; min-width: 150px; min-height: 40px; }

.content { width: 100%; max-width: 1400px; margin: 0 auto; padding: 26px; }
.content h1 { font-size: 25px; font-weight: 800; letter-spacing: -.4px; margin: 0 0 14px; }

/* ---------------------------------------------------------------- вход */

.login-wrap { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 40px 16px; }
.login-card {
  width: 100%; max-width: 430px; background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-xl); box-shadow: var(--shadow-md); padding: 40px 32px; text-align: center;
}
.login-logo { margin-bottom: 12px; display: flex; justify-content: center; }
.login-card h1 { font-size: 30px; font-weight: 800; letter-spacing: -.6px; margin: 0 0 8px; }
.login-card .muted { margin: 0 0 24px; }
.login-card .field { text-align: left; }

/* ---------------------------------------------------------------- кнопки */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  min-height: 42px; padding: 10px 18px; border-radius: var(--radius);
  border: 1px solid var(--border-strong); background: var(--surface); color: var(--text);
  cursor: pointer; font-weight: 700; font-size: 13px; white-space: nowrap;
  text-decoration: none; transition: background .15s, border-color .15s, transform .05s, box-shadow .15s;
}
.btn:hover { border-color: var(--text-secondary); }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .55; cursor: not-allowed; }
.btn-primary { background: var(--primary); border-color: var(--primary); color: var(--on-primary); box-shadow: 0 6px 16px color-mix(in srgb, var(--primary) 30%, transparent); }
.btn-primary:hover { background: var(--primary-hover); border-color: var(--primary-hover); }
.btn-lime { background: linear-gradient(135deg, #10b981, #059669); border: 0; color: #fff; }
.btn-lime:hover { filter: brightness(1.05); }
.btn-danger { color: var(--danger); border-color: var(--danger); background: transparent; }
.btn-danger:hover { background: var(--danger-soft); border-color: var(--danger); }
.btn-ghost { border-color: transparent; background: transparent; color: var(--text-secondary); }
.btn-ghost:hover { background: var(--surface-2); color: var(--text); }
.btn-sm { min-height: 32px; padding: 6px 12px; font-size: 12px; border-radius: 9px; }
.btn-block { width: 100%; }
.btn-big { min-height: 54px; font-size: 15px; border-radius: 14px; }
.icon-btn {
  width: 40px; height: 40px; border-radius: 12px; border: 1px solid var(--border);
  background: var(--surface); cursor: pointer; font-size: 16px; color: var(--text-secondary);
}
.icon-btn:hover { color: var(--text); border-color: var(--border-strong); }
.btn-row { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 12px; }

/* ---------------------------------------------------------------- формы */

.input, select.input, textarea.input {
  min-height: 44px; padding: 10px 13px; border-radius: 12px; width: 100%;
  border: 1px solid var(--border-strong); background: var(--surface); font-size: 14px; color: var(--text);
}
.input:focus { border-color: var(--primary); outline: none; box-shadow: 0 0 0 4px color-mix(in srgb, var(--primary) 16%, transparent); }
.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 15px; }
.field > span { font-size: 12px; font-weight: 700; color: var(--text-secondary); }
.field-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 14px; }
.check { display: flex; align-items: center; gap: 10px; cursor: pointer; font-weight: 600; }
.check input { width: 18px; height: 18px; accent-color: var(--primary); margin: 0; }
.check-list {
  display: flex; flex-wrap: wrap; gap: 8px 18px; padding: 12px 14px;
  border: 1px solid var(--border); border-radius: 12px; background: var(--surface-2);
}
.check-list .check { font-weight: 500; }

/* ---------------------------------------------------------------- карточки */

.card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg);
  padding: 20px 22px; margin-bottom: 16px; box-shadow: var(--shadow-sm);
}
.card h2 { font-size: 16px; font-weight: 800; letter-spacing: -.2px; margin: 0 0 12px; }
.card-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 6px; }
.card-row h2 { margin: 0; }
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 16px; }
.cards .card { margin-bottom: 0; }
.overview-numbers { display: flex; gap: 22px; margin-top: 16px; }
.overview-numbers div { display: flex; flex-direction: column; gap: 2px; }
.overview-numbers b { font-size: 24px; letter-spacing: -.5px; color: var(--primary); }
:root[data-theme="dark"] .overview-numbers b { color: var(--primary); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .overview-numbers b { color: var(--primary); } }
.overview-numbers span { font-size: 11px; color: var(--text-secondary); }

.badge {
  display: inline-flex; align-items: center; gap: 4px; min-height: 21px; padding: 3px 9px;
  border-radius: 999px; background: var(--primary-soft); color: var(--primary);
  font-size: 11px; font-weight: 800; white-space: nowrap;
}
.side-nav .tab .badge { background: #fff; color: var(--primary); }

.kv { display: grid; grid-template-columns: 110px 1fr; gap: 5px 12px; font-size: 13px; margin: 8px 0; }
.kv .k { color: var(--text-secondary); font-weight: 600; }

.toolbar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 16px; }
.toolbar h1 { margin: 0 12px 0 0; }
.toolbar .input { width: auto; min-width: 150px; }

.review-card { max-width: 780px; }
.review-card h2 { font-size: 16px; }
.flags { list-style: none; padding: 0; margin: 10px 0; display: grid; gap: 6px; }
.flags li {
  padding: 8px 10px 8px 34px; position: relative; font-size: 13px;
  background: var(--warning-soft); color: var(--warning); border-radius: 10px;
}
.flags li::before {
  content: "!"; position: absolute; left: 9px; top: 7px; width: 17px; height: 17px;
  border-radius: 50%; background: var(--warning); color: #fff; font-size: 11px;
  font-weight: 800; display: flex; align-items: center; justify-content: center;
}

/* ---------------------------------------------------------------- таблицы */

.table-wrap {
  overflow-x: auto; background: var(--surface); border: 1px solid var(--border);
  border-radius: 14px; box-shadow: var(--shadow-sm);
}
table.grid { border-collapse: collapse; width: 100%; }
table.grid th, table.grid td { border-bottom: 1px solid var(--border); padding: 11px 14px; text-align: left; vertical-align: middle; }
table.grid th {
  font-size: 11px; font-weight: 800; letter-spacing: .5px; text-transform: uppercase;
  color: var(--text-secondary); background: var(--surface-2); white-space: nowrap;
}
table.grid td.r, table.grid th.r { text-align: right; }
table.grid td.c, table.grid th.c { text-align: center; }
table.grid td.num { white-space: nowrap; font-variant-numeric: tabular-nums; }
table.grid tbody tr:hover td { background: var(--surface-2); }
table.grid tr.total td { font-weight: 800; background: var(--surface-2); border-top: 2px solid var(--border-strong); }
table.grid tr.inactive td { color: var(--text-muted); }

table.ts { border-collapse: separate; border-spacing: 0; width: 100%; }
table.ts th, table.ts td { border-bottom: 1px solid var(--border); border-right: 1px solid var(--border); padding: 0; text-align: center; height: 44px; }
table.ts th { font-size: 11px; font-weight: 800; color: var(--text-secondary); background: var(--surface-2); padding: 6px 2px; }
table.ts th.today { color: #fff; background: var(--primary); }
table.ts th.weekend { color: var(--danger); }
table.ts th:first-child, table.ts td:first-child {
  position: sticky; left: 0; text-align: left; padding: 8px 12px; min-width: 190px;
  background: var(--surface); border-right: 1px solid var(--border); z-index: 1;
}
table.ts thead th:first-child { background: var(--surface-2); z-index: 2; }
.ts-cell { display: flex; flex-direction: column; align-items: center; justify-content: center; min-height: 42px; cursor: pointer; gap: 1px; }
.ts-cell:hover { background: var(--primary-soft); }
.ts-empty { color: var(--text-muted); cursor: pointer; }
.ts-empty:hover { background: var(--primary-soft); color: var(--primary); }
.ts-in { font-weight: 800; font-size: 12px; white-space: nowrap; }
.ts-name { font-size: 13px; font-weight: 700; }

/* ---------------------------------------------------------------- модалки */

.modal-overlay {
  position: fixed; inset: 0; z-index: 100; background: rgba(9, 12, 24, .55);
  backdrop-filter: blur(4px); display: flex; align-items: flex-start; justify-content: center;
  padding: 30px 16px; overflow-y: auto;
}
.modal {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-xl);
  box-shadow: var(--shadow-lg); padding: 22px 24px; width: 100%; max-width: 480px; margin: auto;
}
.modal.wide { max-width: 740px; }
.modal-head { display: flex; align-items: center; gap: 10px; margin-bottom: 16px; }
.modal-head h2 { font-size: 19px; font-weight: 800; letter-spacing: -.3px; margin: 0; flex: 1; }
.modal-foot { display: flex; gap: 8px; justify-content: flex-end; margin-top: 20px; flex-wrap: wrap; }
.modal-foot .left { margin-right: auto; }

/* ---------------------------------------------------------------- QR */

.qr-box { max-width: 440px; text-align: center; }
.qr-box #qrSvg svg { width: 250px; height: 250px; background: #fff; border-radius: 16px; padding: 12px; border: 1px solid var(--border); }

.qr-body { min-height: 100vh; background: var(--bg); }
.qr-wrap { max-width: 800px; margin: 0 auto; padding: 28px 18px; }
.qr-login {
  max-width: 420px; margin: 70px auto; background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-xl); box-shadow: var(--shadow-md); padding: 34px 28px; text-align: center;
}
.qr-logo { margin-bottom: 8px; display: flex; justify-content: center; }
.qr-toolbar { display: flex; gap: 14px; align-items: flex-end; margin-bottom: 20px; }
.qr-toolbar .field { margin: 0; flex: 1; }
.qr-toolbar .btn { margin-bottom: 15px; }
.qr-card {
  max-width: 500px; margin: 0 auto; background: #fff; color: #101828;
  border: 1px solid #e3e8f2; border-radius: var(--radius-xl); box-shadow: var(--shadow-md);
  padding: 30px 26px; text-align: center;
}
.qr-brand { display: flex; align-items: center; justify-content: center; gap: 10px; font-weight: 800; letter-spacing: .4px; font-size: 13px; text-transform: uppercase; color: #5b6472; }
.qr-card h1 { font-size: 34px; font-weight: 800; letter-spacing: -.8px; margin: 14px 0 2px; }
.qr-code { margin: 18px auto 8px; }
.qr-code svg { width: 280px; height: 280px; }

/* ---------------------------------------------------------------- страница сотрудника */

.worker-body {
  min-height: 100vh;
  background:
    radial-gradient(900px 500px at 15% -5%, color-mix(in srgb, var(--primary) 20%, transparent), transparent 60%),
    radial-gradient(700px 500px at 110% 15%, color-mix(in srgb, var(--accent) 16%, transparent), transparent 55%),
    var(--bg);
}
.worker-wrap { max-width: 540px; margin: 0 auto; padding: 24px 16px 60px; }
.worker-card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-xl);
  box-shadow: var(--shadow-md); padding: 26px 22px; margin-bottom: 16px;
}
.worker-top { display: flex; align-items: center; gap: 14px; margin-bottom: 16px; }
.worker-avatar {
  width: 54px; height: 54px; border-radius: 18px; flex-shrink: 0;
  background: linear-gradient(135deg, var(--primary), var(--accent)); color: #fff;
  display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: 20px;
}
.worker-id { flex: 1; min-width: 0; }
.worker-id h1 { font-size: 20px; font-weight: 800; letter-spacing: -.3px; margin: 0; }
.worker-id p { margin: 2px 0 0; color: var(--text-secondary); font-size: 13px; }
.worker-logo {
  width: 58px; height: 58px; border-radius: 18px; margin: 0 auto 12px;
  background: linear-gradient(135deg, var(--primary), var(--accent)); color: #fff;
  display: flex; align-items: center; justify-content: center;
}
.worker-card h1 { font-size: 22px; font-weight: 800; letter-spacing: -.4px; margin: 0 0 6px; }
.worker-card h2 { font-size: 20px; font-weight: 800; margin: 12px 0 4px; }
.worker-note {
  background: var(--warning-soft); color: var(--warning); border: 1px solid color-mix(in srgb, var(--warning) 25%, transparent);
  padding: 12px 14px; border-radius: 14px; margin-bottom: 16px; font-size: 13px; font-weight: 600;
}
.shift-on {
  background: linear-gradient(135deg, #4f46e5 0%, #7c3aed 100%); color: #fff;
  border: 0; position: relative; overflow: hidden;
}
.shift-on::after {
  content: ""; position: absolute; right: -50px; top: -50px; width: 180px; height: 180px;
  border-radius: 50%; background: rgba(255,255,255,.12);
}
.live-dot {
  position: absolute; top: 20px; right: 20px; width: 12px; height: 12px; border-radius: 50%;
  background: #34d399; box-shadow: 0 0 0 0 rgba(52,211,153,.55); animation: pulse 1.8s infinite;
}
@keyframes pulse { 70% { box-shadow: 0 0 0 12px rgba(52,211,153,0); } 100% { box-shadow: 0 0 0 0 rgba(52,211,153,0); } }
.on-label { font-size: 12px; font-weight: 800; letter-spacing: 1.4px; text-transform: uppercase; opacity: .8; }
.on-place { font-size: 28px; font-weight: 800; letter-spacing: -.5px; margin: 8px 0 18px; }
.on-meta { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 22px; position: relative; z-index: 1; }
.on-meta div { background: rgba(255,255,255,.12); border-radius: 14px; padding: 12px 14px; }
.on-meta span { display: block; font-size: 11px; opacity: .75; }
.on-meta b { font-size: 17px; }
.shift-on .btn-danger { color: #fff; border-color: rgba(255,255,255,.5); }
.shift-on .btn-danger:hover { background: rgba(255,255,255,.14); border-color: #fff; }
.off-icon {
  width: 54px; height: 54px; border-radius: 18px; background: var(--primary-soft);
  color: var(--primary); display: flex; align-items: center; justify-content: center; margin-bottom: 12px;
}
.worker-hint { font-size: 12px; color: var(--text-secondary); text-align: center; margin: 6px 12px 16px; }

/* ---------------------------------------------------------------- печать */

@media print {
  body { background: #fff; }
  .shell { display: block; }
  .sidebar, .topbar, .no-print, .qr-toolbar { display: none !important; }
  .main-area, .content { padding: 0; max-width: none; }
  .qr-card { box-shadow: none; border: 1px solid #ddd; }
}

/* ---------------------------------------------------------------- адаптив */

@media (max-width: 900px) {
  .shell { display: block; }
  .sidebar {
    position: sticky; top: 0; width: 100%; height: auto; z-index: 30;
    flex-direction: row; align-items: center; padding: 10px 14px;
  }
  .side-brand { border: 0; margin: 0 12px 0 0; padding: 0; }
  .side-brand-text small { display: none; }
  .side-nav { flex-direction: row; overflow-x: auto; gap: 2px; }
  .side-nav .tab { padding: 9px 11px; width: auto; white-space: nowrap; font-size: 12.5px; }
  .side-nav .tab svg { display: none; }
  .side-foot { display: none; }
  .topbar { padding: 10px 14px; }
  .topbar-title { font-size: 16px; }
  .content { padding: 18px 14px; }
  .input.compact { min-width: 110px; }
  .cards { grid-template-columns: 1fr; }
  .on-meta { grid-template-columns: 1fr; }
}

/* ---------------------------------------------------------------- график и статусы */

.chip { display: inline-block; padding: 3px 10px; border-radius: 999px; font-size: 12px; font-weight: 800; background: var(--surface-2); color: var(--text-secondary); white-space: nowrap; }
.chip.ok { background: var(--success-soft); color: var(--success); }
.chip.bad { background: var(--danger-soft); color: var(--danger); }
tr.clickable { cursor: pointer; }
table.grid.plan { table-layout: fixed; min-width: 960px; }
table.grid.plan th:first-child { width: 110px; }
table.grid td.plan-cell { vertical-align: top; padding: 6px; }
.plan-item { display: block; width: 100%; text-align: left; margin-bottom: 4px; padding: 5px 8px; border: 1px solid var(--border-strong); border-radius: 8px; background: var(--primary-soft); cursor: pointer; font-size: 12px; overflow-wrap: anywhere; }
.plan-item b, .plan-item span { display: block; }
.plan-gap { margin-bottom: 4px; padding: 4px 8px; border-radius: 8px; background: var(--danger-soft); color: var(--danger); font-size: 12px; font-weight: 700; }
.plan-add { width: 100%; border: 1px dashed var(--border-strong); border-radius: 8px; background: transparent; cursor: pointer; color: var(--text-secondary); }
.subsection { margin-top: 18px; padding-top: 14px; border-top: 1px solid var(--border); }
.subsection .table-wrap { margin-bottom: 12px; }
.plan-list { margin: 0; padding-left: 18px; }
.toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); z-index: 200; max-width: min(560px, 92vw); padding: 12px 18px; border-radius: 12px; background: var(--text); color: var(--bg); font-weight: 600; box-shadow: var(--shadow-lg); }
.toast.toast-error { background: var(--danger); color: #fff; }
.content h2 { margin-top: 18px; }
.shift-on .on-meta { margin-bottom: 18px; }

.worker-top .icon-btn .lbl { display: none; }
