/* Vozhak CRM — дизайн-система SnowUI Dashboard в палитре Vozhak.
   От SnowUI: Inter, шкала 12/14/18/24, радиусы 8/12/16, иерархия текста прозрачностью белого,
   плоские поверхности без теней, тонкие линии 10%, боковое меню с разделами и хлебные крошки.
   От Vozhak: тёмные поверхности #0e0e0e / #141414, акцент #FF161A, смысловые цвета клуба. */
:root {
  /* поверхности */
  --surface: #0e0e0e;        /* фон страницы и бокового меню */
  --panel: #141414;          /* карточки */
  --raised: #1b1b1b;         /* поля, кнопки, вложенные блоки */
  --hover: #232323;          /* наведение / выбранный сегмент */
  --tint: #1d1213;           /* карточка с оттенком бренда (ритм SnowUI) */

  /* текст и линии: прозрачность белого, как в SnowUI */
  --text: #ffffff;
  --text-80: rgba(255, 255, 255, .8);
  --text-75: rgba(255, 255, 255, .75);
  --text-60: rgba(255, 255, 255, .6);
  --text-45: rgba(255, 255, 255, .45);
  --text-20: rgba(255, 255, 255, .2);
  --text-10: rgba(255, 255, 255, .1);
  --text-5: rgba(255, 255, 255, .05);
  --border: rgba(255, 255, 255, .08);
  --muted-solid: #5f5f5f;

  /* акцент */
  --accent: #ff161a;
  --accent-hover: #ff3b3e;
  --accent-16: rgba(255, 22, 26, .16);
  --accent-8: rgba(255, 22, 26, .08);

  /* смысловые цвета */
  --ok: #45cd5b;
  --ok-16: rgba(69, 205, 91, .14);
  --warn: #f1b129;
  --warn-16: rgba(241, 177, 41, .14);
  --danger: #ff5c5f;
  --danger-16: rgba(239, 60, 60, .16);
  --day: #ffc85d;
  --day-16: rgba(255, 200, 93, .13);
  --night: #8fc6ee;
  --night-16: rgba(64, 152, 255, .16);
  --link: #6aaeff;

  /* совместимость со старыми именами */
  --bg: var(--surface);
  --line: var(--border);
  --muted: var(--text-45);
  --green: var(--ok);
  --green-text: var(--ok);
  --green-soft: var(--ok-16);
  --red: var(--danger);
  --red-soft: var(--danger-16);
  --orange: var(--warn);
  --orange-soft: var(--warn-16);
  --blue: var(--link);
  --accent-soft: var(--accent-16);
  --surface-2: var(--raised);

  --r-sm: 6px;
  --r-md: 8px;
  --r-lg: 12px;
  --r-xl: 16px;
  --r-full: 999px;
  --side-w: 232px;
  --font: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  background: var(--surface); color: var(--text); font: 400 14px/20px var(--font);
  font-feature-settings: "cv11", "ss01"; -webkit-font-smoothing: antialiased; -webkit-tap-highlight-color: transparent;
}
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
h1, h2, h3, h4 { margin: 0; }
h1 { font-size: 24px; line-height: 32px; font-weight: 600; letter-spacing: -.01em; }
h2 { font-size: 14px; line-height: 20px; font-weight: 600; }
h3 { font-size: 14px; line-height: 20px; font-weight: 600; color: var(--text-80); }
p { margin: 0 0 8px; }
b, strong { font-weight: 600; }
::selection { background: var(--accent); color: #fff; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.input:focus-visible, input:focus-visible, textarea:focus-visible, select:focus-visible { outline: none; }
[hidden] { display: none !important; }

.muted { color: var(--text-45); }
.small { font-size: 12px; line-height: 16px; }
.center { text-align: center; }
.row { display: flex; align-items: center; gap: 8px; }
.row.wrap { flex-wrap: wrap; }
.row.between { justify-content: space-between; }
.stack { display: flex; flex-direction: column; gap: 16px; }
.grow { flex: 1; min-width: 0; }
.hidden { display: none !important; }
.ellipsis { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ic { width: 20px; height: 20px; flex: none; }
.num { font-weight: 600; font-variant-numeric: tabular-nums; }
.unit { font-size: 12px; font-weight: 400; color: var(--text-45); margin-left: 4px; }
.eyebrow { font-size: 12px; line-height: 16px; color: var(--text-45); margin-bottom: 4px; }

/* ================================================================ каркас */
.layout { min-height: 100vh; }

/* боковое меню SnowUI */
.sidebar {
  position: fixed; left: 0; top: 0; bottom: 0; width: var(--side-w); z-index: 20;
  display: flex; flex-direction: column; padding: 20px 16px; gap: 4px; overflow-y: auto;
  background: var(--surface); border-right: 1px solid var(--border); scrollbar-width: none;
}
.sidebar::-webkit-scrollbar { display: none; }
.side-logo { display: flex; align-items: center; height: 32px; padding: 0 8px; margin-bottom: 16px; }
.side-logo img { height: 22px; width: auto; display: block; }
.side-section { font-size: 14px; line-height: 20px; color: var(--text-45); padding: 4px 8px; margin-top: 12px; }
.side-section:first-of-type { margin-top: 0; }
.nav-item {
  position: relative; display: flex; align-items: center; gap: 8px; height: 36px; padding: 0 8px 0 12px;
  border-radius: var(--r-md); color: var(--text-80); transition: background .12s, color .12s;
}
.nav-item:hover { background: var(--text-5); color: var(--text); }
.nav-item.active { background: var(--text-5); color: var(--text); }
.nav-item.active::before {
  content: ""; position: absolute; left: 0; top: 50%; width: 4px; height: 16px; margin-top: -8px;
  border-radius: 2px; background: var(--accent);
}
.nav-item .ic { width: 20px; height: 20px; color: var(--text-45); }
.nav-item.active .ic, .nav-item:hover .ic { color: var(--text); }
.nav-item .label { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.nav-item .count {
  min-width: 20px; height: 20px; padding: 0 6px; border-radius: var(--r-md); background: var(--accent); color: #fff;
  font-size: 12px; line-height: 20px; font-weight: 600; text-align: center;
}
.nav-sep { height: 1px; background: var(--border); margin: 8px; }
.side-me { margin-top: auto; padding-top: 16px; display: flex; flex-direction: column; gap: 4px; }
.me-card {
  display: flex; align-items: center; gap: 8px; padding: 8px; border-radius: var(--r-lg); transition: background .12s;
}
.me-card:hover, .me-card.active { background: var(--text-5); }
.me-card .nm { font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.me-card .ps { font-size: 12px; line-height: 16px; color: var(--text-45); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.logout-btn { color: var(--text-45); }

/* верхняя строка: хлебные крошки */
.topbar {
  position: sticky; top: 0; z-index: 15; display: flex; align-items: center; gap: 8px; height: 60px;
  padding: 0 28px; margin-left: var(--side-w); background: rgba(14, 14, 14, .88); border-bottom: 1px solid var(--border);
  -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px);
}
.crumbs { display: flex; align-items: center; gap: 8px; min-width: 0; flex: 1; }
.crumbs a, .crumbs span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.crumbs .dim { color: var(--text-45); }
.crumbs .dim:hover { color: var(--text-80); }
.crumbs .sep { color: var(--text-20); }
.top-logo { display: none; }
.top-logo img { height: 18px; width: auto; display: block; }
.top-date { color: var(--text-45); font-size: 12px; white-space: nowrap; }
.top-me { display: none; }

.main { margin-left: var(--side-w); padding: 28px 28px 80px; }
.main > * { max-width: 1160px; margin-left: auto; margin-right: auto; }
.page-head { display: flex; align-items: flex-end; gap: 16px; margin-bottom: 24px; flex-wrap: wrap; }
.page-head .sub { color: var(--text-45); margin-top: 4px; }
.page-head .actions { margin-left: auto; display: flex; gap: 8px; flex-wrap: wrap; }
.bottom-nav { display: none; }

@media (max-width: 900px) {
  .sidebar { display: none; }
  .topbar { margin-left: 0; padding: 0 16px; height: 52px; }
  .top-logo { display: block; }
  .crumbs, .top-date { display: none; }
  .top-me { display: block; margin-left: auto; }
  .main { margin-left: 0; padding: 20px 16px calc(96px + env(safe-area-inset-bottom)); }
  .page-head { margin-bottom: 20px; }
  .bottom-nav {
    display: flex; position: fixed; left: 0; right: 0; bottom: 0; z-index: 30;
    padding: 6px 8px calc(6px + env(safe-area-inset-bottom)); gap: 4px;
    background: rgba(14, 14, 14, .92); border-top: 1px solid var(--border);
    -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px);
  }
  .bottom-nav a {
    flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
    height: 52px; border-radius: var(--r-lg); position: relative;
    font-size: 11px; line-height: 14px; font-weight: 500; color: var(--text-45);
  }
  .bottom-nav a .ic { width: 22px; height: 22px; }
  .bottom-nav a.active { color: var(--text); background: var(--text-5); }
  .bottom-nav a.active .ic { color: var(--accent); }
  .bottom-nav .dot { position: absolute; top: 8px; left: calc(50% + 8px); width: 8px; height: 8px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 2px var(--surface); }
  .page-head .actions { margin-left: 0; width: 100%; }
}

/* ================================================================ карточки */
.card { background: var(--panel); border-radius: var(--r-xl); padding: 24px; }
.card.flat { background: var(--raised); }
.card + .card { margin-top: 16px; }
.grid > .card + .card, .stack > .card + .card { margin-top: 0; }
.card-title { display: flex; align-items: center; gap: 8px; margin-bottom: 16px; min-height: 28px; }
.card-title h2, .card-title h3 { flex: 1; }
.grid { display: grid; gap: 16px; }
.grid.two { grid-template-columns: repeat(auto-fit, minmax(340px, 1fr)); }
.grid.tiles { grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 16px; }
@media (max-width: 560px) {
  .card { padding: 20px 16px; }
  .grid.two { grid-template-columns: 1fr; }
  .grid.tiles { grid-template-columns: 1fr 1fr; gap: 8px; }
}

/* ================================================================ кнопки */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 0;
  background: var(--text-5); color: var(--text); padding: 0 16px; border-radius: var(--r-lg); font-weight: 500;
  cursor: pointer; height: 40px; white-space: nowrap; font-size: 14px; line-height: 20px;
  transition: background .15s, transform .06s, color .15s, opacity .15s;
}
.btn:hover { background: var(--text-10); }
.btn:active { transform: scale(.98); }
.btn:disabled { opacity: .35; pointer-events: none; }
.btn.primary { background: var(--accent); color: #fff; font-weight: 600; }
.btn.primary:hover { background: var(--accent-hover); }
.btn.outline-accent { background: var(--accent-16); color: var(--accent); }
.btn.outline-accent:hover { background: rgba(255, 22, 26, .24); }
.btn.dark { background: var(--text); color: #0e0e0e; font-weight: 600; }
.btn.dark:hover { background: var(--text-80); }
.btn.danger { color: var(--danger); }
.btn.danger.fill { background: var(--danger); color: #fff; }
.btn.ghost { background: transparent; color: var(--text-60); }
.btn.ghost:hover { background: var(--text-5); color: var(--text); }
.btn.sm { height: 32px; padding: 0 12px; font-size: 12px; line-height: 16px; border-radius: var(--r-md); gap: 4px; }
.btn.sm .ic { width: 16px; height: 16px; }
.btn.icon { padding: 0; width: 40px; }
.btn.icon.sm { width: 32px; }
.btn.block { width: 100%; }
.btn.lg { height: 48px; font-size: 15px; padding: 0 20px; }
.btn .ic { width: 18px; height: 18px; }

/* сегменты — вкладки SnowUI */
.seg { display: inline-flex; background: var(--panel); border-radius: var(--r-lg); padding: 4px; gap: 4px; overflow-x: auto; max-width: 100%; scrollbar-width: none; }
.seg::-webkit-scrollbar { display: none; }
.seg button { border: 0; background: transparent; height: 32px; padding: 0 12px; border-radius: var(--r-md); cursor: pointer; white-space: nowrap; color: var(--text-45); transition: background .15s, color .15s; }
.seg button:hover { color: var(--text-80); }
.seg button.active { background: var(--hover); color: var(--text); }
.seg button .n { color: var(--text-45); margin-left: 6px; font-size: 12px; font-variant-numeric: tabular-nums; }
.seg button.active .n { color: var(--accent); }

/* ================================================================ статусы — точка + текст, как в SnowUI */
.badge {
  display: inline-flex; align-items: center; gap: 6px; height: 24px; padding: 0 8px; border-radius: var(--r-md);
  font-size: 12px; line-height: 16px; font-weight: 500; background: var(--text-5); color: var(--text-60); white-space: nowrap;
}
.badge::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; opacity: .9; flex: none; }
.badge .ic { width: 14px; height: 14px; }
.badge.yellow { background: var(--accent-8); color: var(--accent); }
.badge.green { background: var(--ok-16); color: var(--ok); }
.badge.red { background: var(--danger-16); color: var(--danger); }
.badge.orange { background: var(--warn-16); color: var(--warn); }
.badge.night { background: var(--night-16); color: var(--night); }
.verified-mark { color: var(--accent); display: inline-flex; vertical-align: -3px; }
.verified-mark .ic { width: 16px; height: 16px; }

.avatar {
  width: 40px; height: 40px; border-radius: 50%; flex: none; background: var(--raised); color: #141414;
  display: grid; place-items: center; font-weight: 600; overflow: hidden; font-size: 14px;
}
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.avatar.lg { width: 96px; height: 96px; font-size: 32px; }
.avatar.xl { width: 64px; height: 64px; font-size: 22px; }
.avatar.sm { width: 28px; height: 28px; font-size: 11px; }

/* ================================================================ списки */
.list { display: flex; flex-direction: column; gap: 2px; }
.list-row { display: flex; align-items: center; gap: 12px; padding: 8px; border-radius: var(--r-lg); min-height: 48px; }
.list-row.link { cursor: pointer; transition: background .12s; }
.list-row.link:hover { background: var(--text-5); }
.list-row .title { font-weight: 500; }
.list-row .meta { font-size: 12px; line-height: 16px; color: var(--text-45); }
.rank { color: var(--text-45); font-size: 12px; width: 24px; flex: none; font-variant-numeric: tabular-nums; }

/* ================================================================ формы */
.field { display: flex; flex-direction: column; gap: 8px; }
.field > span { font-size: 12px; line-height: 16px; color: var(--text-45); }
.input, select.input, textarea.input {
  width: 100%; border: 1px solid transparent; background: var(--text-5); border-radius: var(--r-lg); padding: 0 12px;
  outline: none; height: 40px; transition: border-color .15s, background .15s;
}
select.input { appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--text-45) 50%), linear-gradient(135deg, var(--text-45) 50%, transparent 50%); background-position: calc(100% - 17px) 17px, calc(100% - 12px) 17px; background-size: 5px 5px; background-repeat: no-repeat; padding-right: 32px; }
select.input option { background: var(--raised); }
textarea.input { height: auto; min-height: 112px; resize: vertical; line-height: 20px; padding: 10px 12px; }
.input::placeholder { color: var(--text-45); }
.input:hover { background: var(--text-10); }
.input:focus { border-color: var(--text-20); background: var(--text-5); }
.input[type="time"]::-webkit-calendar-picker-indicator, .input[type="date"]::-webkit-calendar-picker-indicator { filter: invert(1); opacity: .45; }
@media (pointer: coarse) { .input, select.input, textarea.input { font-size: 16px; } }
.check { display: flex; gap: 12px; align-items: flex-start; cursor: pointer; color: var(--text-80); }
.check input { width: 18px; height: 18px; accent-color: var(--accent); flex: none; margin-top: 1px; }
.form { display: flex; flex-direction: column; gap: 16px; }
.form .two { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
@media (max-width: 560px) { .form .two { grid-template-columns: 1fr; } }
.error-text { color: var(--danger); font-size: 12px; line-height: 16px; }

/* ================================================================ показатели — карточки SnowUI */
.tile { background: var(--panel); border-radius: var(--r-xl); padding: 20px 24px; min-height: 112px; display: flex; flex-direction: column; }
.grid.tiles > .tile:nth-child(4n+1), .grid.tiles > .tile:nth-child(4n+4) { background: var(--tint); }
.tile .label { font-size: 14px; line-height: 20px; font-weight: 600; color: var(--text); }
.tile .value { font-size: 24px; line-height: 32px; font-weight: 600; margin-top: auto; padding-top: 8px; font-variant-numeric: tabular-nums; }
.tile .hint { font-size: 12px; line-height: 16px; color: var(--text-45); margin-top: 2px; }
.tile.soon .value { color: var(--text-20); }
.tile.accent { background: var(--accent); }
.tile.accent .label, .tile.accent .hint { color: rgba(255, 255, 255, .85); }
@media (max-width: 560px) { .tile { padding: 16px; min-height: 100px; } .tile .value { font-size: 20px; line-height: 28px; } }

.stars { color: var(--accent); letter-spacing: 1px; white-space: nowrap; font-size: 13px; }
.stars .off { color: var(--text-10); }

.empty { text-align: center; color: var(--text-45); padding: 32px 12px; }
.empty .ic { width: 32px; height: 32px; opacity: .35; margin-bottom: 8px; }

.progress { height: 4px; background: var(--text-10); border-radius: var(--r-full); overflow: hidden; }
.progress > div { height: 100%; background: var(--accent); border-radius: var(--r-full); transition: width .35s ease-out; }

/* ================================================================ входные экраны и заглушки */
.gate { min-height: 100vh; display: grid; place-items: center; padding: 20px 16px; }
.gate .card { width: 100%; max-width: 420px; padding: 32px 24px; }
.gate .logo { display: block; height: 28px; width: auto; margin: 0 auto 28px; }
.gate h1 { text-align: center; margin-bottom: 4px; }
.gate .lead { text-align: center; color: var(--text-45); margin-bottom: 24px; }
.hero-icon { width: 56px; height: 56px; margin: 0 auto 16px; border-radius: 50%; display: grid; place-items: center; background: var(--accent-16); color: var(--accent); }
.hero-icon .ic { width: 26px; height: 26px; }
.spinner { width: 24px; height: 24px; border: 2px solid var(--text-10); border-top-color: var(--accent); border-radius: 50%; animation: spin .8s linear infinite; margin: 48px auto; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ================================================================ модальные окна, меню, тосты */
.overlay { position: fixed; inset: 0; background: rgba(0, 0, 0, .6); z-index: 100; display: flex; align-items: center; justify-content: center; padding: 16px; animation: fade .15s; -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px); }
.modal { background: var(--panel); border: 1px solid var(--border); border-radius: var(--r-xl); width: 100%; max-width: 520px; max-height: calc(100vh - 32px); overflow: auto; animation: pop .18s ease-out; }
.modal.wide { max-width: 760px; }
.modal-head { display: flex; align-items: center; gap: 8px; padding: 20px 24px 8px; position: sticky; top: 0; background: var(--panel); z-index: 1; }
.modal-head h2 { flex: 1; font-size: 18px; line-height: 28px; }
.modal-body { padding: 8px 24px 24px; }
.modal-foot { display: flex; gap: 8px; justify-content: flex-end; padding: 0 24px 24px; flex-wrap: wrap; }
@media (max-width: 600px) {
  .overlay { align-items: flex-end; padding: 0; }
  .modal { border-radius: var(--r-xl) var(--r-xl) 0 0; max-height: 92vh; padding-bottom: env(safe-area-inset-bottom); animation: up .22s ease-out; border-bottom: 0; }
  .modal-head { padding: 20px 16px 8px; }
  .modal-body { padding: 8px 16px 20px; }
  .modal-foot { padding: 0 16px 20px; }
  .modal-foot .btn { flex: 1; }
}
@keyframes fade { from { opacity: 0; } }
@keyframes pop { from { transform: scale(.97); opacity: 0; } }
@keyframes up { from { transform: translateY(40px); opacity: 0; } }

.menu { position: fixed; z-index: 110; background: var(--raised); border: 1px solid var(--border); border-radius: var(--r-lg); padding: 4px; min-width: 220px; animation: pop .12s ease-out; box-shadow: 0 16px 48px rgba(0, 0, 0, .45); }
.menu button { display: flex; width: 100%; gap: 8px; align-items: center; border: 0; background: transparent; height: 36px; padding: 0 10px; border-radius: var(--r-md); cursor: pointer; text-align: left; color: var(--text-80); }
.menu button:hover { background: var(--text-5); color: var(--text); }
.menu button .ic { width: 18px; height: 18px; color: var(--text-45); }
.menu button.danger, .menu button.danger .ic { color: var(--danger); }
.menu hr { border: 0; height: 1px; background: var(--border); margin: 4px 8px; }

.toast-wrap { position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(84px + env(safe-area-inset-bottom)); z-index: 200; display: flex; flex-direction: column; gap: 8px; align-items: center; pointer-events: none; }
@media (min-width: 901px) { .toast-wrap { bottom: 28px; left: calc(50% + var(--side-w) / 2); } }
.toast { background: var(--hover); color: var(--text); border: 1px solid var(--border); padding: 10px 16px; border-radius: var(--r-lg); font-weight: 500; animation: up .2s ease-out; max-width: 90vw; box-shadow: 0 16px 48px rgba(0, 0, 0, .45); }
.toast.error { background: var(--accent); border-color: var(--accent); color: #fff; }

/* ================================================================ главная */
.shift-card { display: flex; gap: 20px; align-items: center; flex-wrap: wrap; position: relative; overflow: hidden; }
.shift-card .big { font-size: 32px; line-height: 40px; font-weight: 600; letter-spacing: -.02em; margin: 4px 0; font-variant-numeric: tabular-nums; }
.shift-card .big.md { font-size: 24px; line-height: 32px; }
.shift-card .kicker { display: flex; align-items: center; gap: 8px; font-size: 12px; line-height: 16px; color: var(--text-45); }
.shift-card.on .kicker { color: var(--ok); }
.shift-card.on { background: linear-gradient(90deg, rgba(69, 205, 91, .1), var(--panel) 55%); }
.shift-card.on::before { content: ""; position: absolute; left: 0; top: 24px; bottom: 24px; width: 3px; border-radius: 0 2px 2px 0; background: var(--ok); }
.pulse { width: 8px; height: 8px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 0 0 rgba(69, 205, 91, .6); animation: pulse 1.6s infinite; display: inline-block; }
@keyframes pulse { 70% { box-shadow: 0 0 0 10px rgba(69, 205, 91, 0); } 100% { box-shadow: 0 0 0 0 rgba(69, 205, 91, 0); } }
.request-banner { display: flex; align-items: center; gap: 12px; background: var(--accent-8); border: 1px solid var(--accent-16); border-radius: var(--r-xl); padding: 12px 16px; margin-bottom: 16px; transition: background .15s; }
.request-banner:hover { background: var(--accent-16); }

/* ================================================================ график */
.sched-toolbar { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 16px; }
.sched-toolbar .title { font-size: 18px; line-height: 28px; font-weight: 600; min-width: 170px; margin-left: 4px; }
.sched-toolbar .title span { color: var(--text-45); font-weight: 400; }
.sched-wrap { background: var(--panel); border-radius: var(--r-xl); overflow: auto; max-height: calc(100vh - 250px); }
table.sched { border-collapse: separate; border-spacing: 0; min-width: 100%; }
table.sched th, table.sched td { border-bottom: 1px solid var(--border); padding: 0; background: var(--panel); }
table.sched tr:last-child td, table.sched tr:last-child th { border-bottom: 0; }
table.sched thead th { position: sticky; top: 0; z-index: 3; padding: 12px 2px 10px; font-weight: 500; }
table.sched .emp-col { position: sticky; left: 0; z-index: 2; min-width: 230px; max-width: 230px; border-right: 1px solid var(--border); padding: 10px 16px; text-align: left; }
table.sched thead .emp-col { z-index: 4; font-size: 12px; color: var(--text-45); font-weight: 400; }
table.sched .total-col { min-width: 96px; border-right: 1px solid var(--border); padding: 8px 12px; font-size: 12px; color: var(--text-60); white-space: nowrap; }
table.sched thead .total-col { color: var(--text-45); font-size: 12px; font-weight: 400; }
.day-head { width: 58px; min-width: 58px; text-align: center; }
.day-head .num { font-size: 14px; font-weight: 600; display: inline-block; min-width: 28px; height: 28px; line-height: 28px; border-radius: var(--r-md); }
.day-head .wd { font-size: 11px; line-height: 14px; color: var(--text-45); display: block; margin-top: 2px; }
.day-head.weekend .num { color: var(--accent); }
.day-head.today .num { background: var(--accent); color: #fff; }
.day-head .cnt { font-size: 11px; color: var(--text-45); display: block; margin-top: 2px; font-variant-numeric: tabular-nums; }
.day-cell { padding: 4px 3px !important; vertical-align: top; height: 64px; transition: background .12s; }
.day-cell.today { background: rgba(255, 22, 26, .05) !important; }
.day-cell.editable { cursor: pointer; }
.day-cell.editable:hover { background: var(--hover) !important; }
.chip { border-radius: var(--r-sm); padding: 4px 2px; font-size: 10.5px; line-height: 13px; font-weight: 600; text-align: center; margin-bottom: 3px; position: relative; font-variant-numeric: tabular-nums; }
.chip.markable { cursor: pointer; transition: filter .12s, transform .06s; }
.chip.markable:hover { filter: brightness(1.35); }
.chip.markable:active { transform: scale(.96); }
.chip.day { background: var(--day-16); color: var(--day); }
.chip.night { background: var(--night-16); color: var(--night); }
.chip.pending::after { content: ""; position: absolute; top: 3px; right: 3px; width: 5px; height: 5px; border-radius: 50%; background: var(--warn); }
.chip .st { display: block; font-size: 10px; margin-top: 2px; color: var(--ok); }
.chip .st.late { color: var(--warn); }
.chip .st.miss { color: var(--danger); }
.emp-cell { display: flex; align-items: center; gap: 8px; min-width: 0; }
.emp-cell .nm { font-weight: 500; font-size: 14px; }
.emp-cell .ps { font-size: 12px; line-height: 16px; color: var(--text-45); }
tr.me-row .emp-col { box-shadow: inset 3px 0 0 var(--accent); }
.legend { display: flex; gap: 16px; flex-wrap: wrap; font-size: 12px; color: var(--text-45); margin-top: 12px; align-items: center; }
.legend i { display: inline-block; width: 8px; height: 8px; border-radius: 50%; vertical-align: 1px; margin-right: 6px; }
.legend .ic { width: 14px; height: 14px; vertical-align: -3px; }
@media (max-width: 900px) {
  table.sched .emp-col { min-width: 116px; max-width: 116px; padding: 8px 10px; }
  table.sched .emp-cell .avatar { display: none; }
  table.sched .total-col { display: none; }
  .sched-wrap { max-height: none; }
  .day-head { width: 50px; min-width: 50px; }
}
.my-shifts { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 4px; margin-bottom: 16px; scrollbar-width: none; }
.my-shift { flex: none; min-width: 150px; padding: 12px 16px; border-radius: var(--r-lg); font-size: 12px; line-height: 16px; }
.my-shift.day { background: var(--day-16); color: var(--day); }
.my-shift.night { background: var(--night-16); color: var(--night); }
.my-shift b { display: block; font-size: 14px; line-height: 20px; color: var(--text); margin-bottom: 2px; }

/* ================================================================ профиль */
.profile-head { display: flex; gap: 20px; align-items: center; flex-wrap: wrap; }
.profile-head h1 { display: flex; align-items: center; gap: 8px; }
.avatar-edit { position: relative; border: 0; padding: 0; background: none; cursor: pointer; border-radius: 50%; flex: none; }
.avatar-edit .badge-cam { position: absolute; right: 0; bottom: 0; width: 30px; height: 30px; border-radius: 50%; background: var(--accent); color: #fff; display: grid; place-items: center; box-shadow: 0 0 0 3px var(--panel); transition: transform .15s; }
.avatar-edit .badge-cam .ic { width: 16px; height: 16px; }
.avatar-edit:hover .badge-cam { transform: scale(1.08); }
.rating-big { display: flex; align-items: baseline; gap: 8px; }
.rating-big .num { font-size: 40px; line-height: 48px; letter-spacing: -.02em; }
.rating-bars { display: flex; flex-direction: column; gap: 8px; }
.rating-bars .row { gap: 8px; font-size: 12px; }
.rating-bars .bar { flex: 1; height: 4px; background: var(--text-10); border-radius: var(--r-full); overflow: hidden; }
.rating-bars .bar div { height: 100%; background: var(--accent); border-radius: var(--r-full); }
.review { padding: 12px 8px; }
.review + .review { border-top: 1px solid var(--border); }

/* ================================================================ справочник */
.article-body { font-size: 15px; line-height: 24px; color: var(--text-80); max-width: 70ch; }
.article-body h2 { font-size: 18px; line-height: 28px; margin: 24px 0 8px; color: var(--text); }
.article-body h3 { font-size: 15px; margin: 20px 0 8px; color: var(--text); }
.article-body b { color: var(--text); }
.article-body ul, .article-body ol { padding-left: 22px; margin: 0 0 12px; }
.article-body li::marker { color: var(--accent); }
.article-body table { border-collapse: collapse; width: 100%; margin: 12px 0 16px; font-size: 14px; }
.article-body td, .article-body th { border-bottom: 1px solid var(--border); padding: 10px 12px; text-align: left; }
.article-body th { color: var(--text-45); font-size: 12px; font-weight: 400; }
.article-body blockquote { margin: 12px 0; padding: 12px 16px; background: var(--accent-8); border-left: 3px solid var(--accent); border-radius: 0 var(--r-lg) var(--r-lg) 0; color: var(--text); }
.article-body code { background: var(--text-10); padding: 2px 6px; border-radius: 4px; font-size: 13px; }

/* ================================================================ аттестация */
.quiz { max-width: 640px; margin: 0 auto; }
.quiz .q-text { font-size: 20px; font-weight: 600; margin: 20px 0; line-height: 28px; }
.option {
  display: flex; gap: 12px; align-items: center; width: 100%; text-align: left; padding: 12px 16px; min-height: 56px;
  border: 1px solid transparent; border-radius: var(--r-lg); background: var(--panel); margin-bottom: 8px; cursor: pointer;
  font-size: 15px; transition: border-color .12s, background .12s;
}
.option:hover { background: var(--hover); }
.option .key { width: 28px; height: 28px; flex: none; border-radius: var(--r-md); background: var(--text-5); display: grid; place-items: center; font-weight: 600; font-size: 12px; color: var(--text-60); }
.option.selected { border-color: var(--accent); background: var(--accent-8); }
.option.selected .key { background: var(--accent); color: #fff; }
.block-card .row.between { align-items: flex-start; }
.result-circle { width: 140px; height: 140px; border-radius: 50%; margin: 8px auto 16px; display: grid; place-items: center; font-size: 36px; font-weight: 600; letter-spacing: -.02em; }
.q-admin { background: var(--raised); border-radius: var(--r-lg); padding: 12px 16px; margin-bottom: 8px; }
.q-admin ol { margin: 8px 0 0; padding-left: 20px; color: var(--text-60); }
.q-admin li.right { color: var(--ok); font-weight: 600; }
.q-admin.off { opacity: .5; }
.q-admin summary::marker { color: var(--text-45); }
table.plain { width: 100%; border-collapse: collapse; }
table.plain th, table.plain td { padding: 10px 8px; border-bottom: 1px solid var(--border); text-align: left; }
table.plain th { color: var(--text-45); font-weight: 400; font-size: 12px; }
table.plain tr:last-child td { border-bottom: 0; }
.table-scroll { overflow-x: auto; }
.qr-box { background: #fff; padding: 12px; border-radius: var(--r-xl); width: 200px; height: 200px; flex: none; }
.qr-box img { width: 100%; height: 100%; display: block; }
code { background: var(--text-10); padding: 2px 6px; border-radius: 4px; font-size: 12px; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}

/* ================================================================ телефон: мелкие уточнения */
@media (max-width: 560px) {
  .shift-card { gap: 16px; }
  .shift-card .btn { width: 100%; }
  .profile-head { gap: 16px; }
  .profile-head .avatar.lg { width: 72px; height: 72px; font-size: 24px; }
  .profile-head h1 { font-size: 20px; line-height: 28px; }
}

/* ================================================================ финансы */
.fin-row { display: grid; grid-template-columns: minmax(0, 2.2fr) repeat(4, minmax(90px, 1fr)); gap: 12px; align-items: center;
           padding: 10px 12px; border-radius: var(--r-lg); min-height: 56px; }
.fin-row.link { transition: background .12s; }
.fin-row.link:hover { background: var(--text-5); }
.fin-row.head { min-height: 36px; font-size: 12px; line-height: 16px; color: var(--text-45); border-bottom: 1px solid var(--border); border-radius: 0; margin-bottom: 4px; }
.fin-row .title { font-weight: 500; }
.fin-row .meta { font-size: 12px; line-height: 16px; color: var(--text-45); }
.fin-who { display: flex; align-items: center; gap: 12px; min-width: 0; }
.fin-num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.fin-num.neg { color: var(--danger); }
.fin-num.total { font-weight: 600; }
.fin-hero { display: flex; align-items: flex-end; gap: 20px; flex-wrap: wrap; background: linear-gradient(120deg, var(--tint), var(--panel) 70%); }
.fin-hero .kicker { font-size: 12px; line-height: 16px; color: var(--text-45); }
.fin-hero .big { font-size: 40px; line-height: 48px; font-weight: 600; letter-spacing: -.02em; margin: 4px 0 8px; font-variant-numeric: tabular-nums; }
.fin-formula { display: flex; flex-wrap: wrap; gap: 6px 10px; align-items: center; color: var(--text-60); font-size: 13px; }
.fin-formula b { color: var(--text); font-weight: 500; font-variant-numeric: tabular-nums; }
.fin-formula .op { color: var(--text-20); }
.fin-ico { width: 32px; height: 32px; border-radius: var(--r-md); background: var(--text-5); color: var(--text-45); display: grid; place-items: center; flex: none; }
.fin-ico .ic { width: 16px; height: 16px; }
.fin-ico.neg { background: var(--danger-16); color: var(--danger); }
.fin-amount { white-space: nowrap; font-variant-numeric: tabular-nums; }
.fin-cancelled { opacity: .45; }
.fin-cancelled .title, .fin-cancelled .fin-amount { text-decoration: line-through; }
.fin-hk-head, .fin-hk { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 8px; padding: 8px; }
.fin-hk-head { font-size: 12px; line-height: 16px; color: var(--text-45); border-bottom: 1px solid var(--border); }
.fin-hk-head span:not(:first-child), .fin-hk span:not(:first-child) { text-align: right; }
.fin-hk { border-radius: var(--r-md); }
.fin-hk:hover { background: var(--text-5); }
.fin-foot { display: flex; justify-content: space-between; padding: 12px 8px 0; margin-top: 8px; border-top: 1px solid var(--border); }
.rate-row { display: flex; align-items: center; gap: 12px; padding: 8px 0; border-bottom: 1px solid var(--border); }
.rate-row:last-child { border-bottom: 0; }
.rate-inp { display: flex; align-items: center; gap: 6px; width: 140px; flex: none; }
.rate-inp .input { text-align: right; }
.rate-inp span { color: var(--text-45); }
@media (max-width: 700px) {
  .fin-row { grid-template-columns: minmax(0, 1fr) auto; }
  .fin-row .c-sh, .fin-row .c-hk, .fin-row .c-fn { display: none; }
  .fin-hero .big { font-size: 32px; line-height: 40px; }
  .fin-hero .btn { width: 100%; }
  .rate-inp { width: 116px; }
}
.grid.tiles.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
@media (max-width: 560px) { .grid.tiles.three { grid-template-columns: 1fr 1fr; } .grid.tiles.three > .tile:nth-child(3) { grid-column: 1 / -1; min-height: 0; } }
