/* Savdo nazorati — «Toshkent metrosi»: marmar fon, granit panel, menejer liniyalari. */

:root {
  --marble: #f3f1ec;
  --panel: #fbfaf7;
  --panel-2: #efece5;
  --rule: #dcd8cf;
  --rule-strong: #c6c1b6;
  --ink: #1e2228;
  --ink-2: #545a63;
  --ink-3: #737983;
  --granite: #23272e;
  --granite-2: #30353d;
  --on-granite: #ece9e2;
  --on-granite-2: #a9aeb6;
  --red: #c8322a;
  --red-soft: #f8e6e3;
  --ochre: #c8912e;
  --ochre-ink: #855a10;
  --ochre-soft: #f6ead2;
  --ok: #2f8a57;
  --ok-soft: #e3f1e8;
  --focus: #1f5aa6;
  --radius: 6px;
  --shadow: 0 1px 2px rgb(35 39 46 / 0.06), 0 4px 14px rgb(35 39 46 / 0.06);
  --font: "Golos Text", system-ui, -apple-system, "Segoe UI", sans-serif;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root {
    --marble: #191c21;
    --panel: #21252b;
    --panel-2: #2a2e35;
    --rule: #353a42;
    --rule-strong: #484e57;
    --ink: #ece9e2;
    --ink-2: #b4b9c0;
    --ink-3: #8e949c;
    --granite: #111317;
    --granite-2: #23272e;
    --red: #ef6a5f;
    --red-soft: #3a2422;
    --ochre: #dfa646;
    --ochre-ink: #e9b65c;
    --ochre-soft: #352b19;
    --ok: #5cbf86;
    --ok-soft: #1f3327;
    --focus: #79a7e6;
    --shadow: 0 1px 2px rgb(0 0 0 / 0.3), 0 6px 18px rgb(0 0 0 / 0.25);
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--marble);
  color: var(--ink);
  font: 400 15px/1.5 var(--font);
  font-feature-settings: "tnum" 1;
  -webkit-font-smoothing: antialiased;
}
::selection { background: color-mix(in srgb, var(--ochre) 35%, transparent); }
a { color: inherit; text-underline-offset: 3px; text-decoration-thickness: 1px; }
a:hover { text-decoration-color: var(--ochre); }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; border-radius: 4px; }
h1, h2, h3 { margin: 0; line-height: 1.2; text-wrap: balance; }
h1 { font-size: 26px; font-weight: 650; letter-spacing: -0.015em; }
h2 { font-size: 17px; font-weight: 600; }
h3 { font-size: 15px; font-weight: 600; }
p { margin: 0; }
.num { font-variant-numeric: tabular-nums; white-space: nowrap; }
.muted { color: var(--ink-2); }
.faint { color: var(--ink-3); }
.small { font-size: 13px; }
.icon { width: 18px; height: 18px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- каркас ---------- */
.shell { display: grid; grid-template-columns: 236px minmax(0, 1fr); min-height: 100vh; }
.rail {
  background: var(--granite);
  color: var(--on-granite);
  padding: 20px 14px;
  position: sticky; top: 0; height: 100vh;
  display: flex; flex-direction: column; gap: 22px;
}
.brand { display: flex; align-items: center; gap: 10px; padding: 0 8px; text-decoration: none; }
.brand-mark { width: 30px; height: 30px; flex: none; }
.brand b { display: block; font-size: 15px; font-weight: 650; letter-spacing: 0.01em; }
.brand span { display: block; font-size: 12px; color: var(--on-granite-2); }
.nav { display: flex; flex-direction: column; gap: 2px; }
.nav a {
  display: flex; align-items: center; gap: 11px;
  padding: 9px 10px; border-radius: var(--radius);
  color: var(--on-granite-2); text-decoration: none; font-weight: 500;
}
.nav a:hover { color: var(--on-granite); background: rgb(255 255 255 / 0.05); }
.nav a[aria-current="page"] { color: var(--on-granite); background: var(--granite-2); }
.nav .count {
  margin-left: auto; min-width: 22px; padding: 1px 7px; border-radius: 99px;
  background: var(--ochre); color: #231a08; font-size: 12px; font-weight: 650; text-align: center;
}
.nav .count.red { background: var(--red); color: #fff; }
.rail-foot { margin-top: auto; padding: 12px 10px 0; border-top: 1px solid var(--granite-2); font-size: 13px; color: var(--on-granite-2); display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.rail-foot button { background: none; border: 0; color: inherit; font: inherit; cursor: pointer; display: flex; align-items: center; gap: 6px; padding: 6px; border-radius: 4px; }
.rail-foot button:hover { color: var(--on-granite); }

.main { padding: 26px 32px 64px; max-width: 1240px; width: 100%; }
.topbar, .tabbar { display: none; }

.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 22px; }
.page-head .sub { color: var(--ink-2); margin-top: 4px; }
.stepper { display: inline-flex; align-items: center; border: 1px solid var(--rule); border-radius: var(--radius); background: var(--panel); }
.stepper a, .stepper span { display: inline-flex; align-items: center; justify-content: center; min-height: 36px; padding: 0 10px; text-decoration: none; }
.stepper a:hover { background: var(--panel-2); }
.stepper span { border-inline: 1px solid var(--rule); font-weight: 500; min-width: 120px; }
.stepper .off { color: var(--ink-3); pointer-events: none; }

/* модули */
.module { background: var(--panel); border: 1px solid var(--rule); border-radius: var(--radius); }
.module + .module { margin-top: 16px; }
.module-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 13px 16px; border-bottom: 1px solid var(--rule); }
.module-head h2 { display: flex; align-items: center; gap: 8px; }
.module-body { padding: 16px; }
.grid-2 { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr); gap: 16px; align-items: start; }
.stack > * + * { margin-top: 16px; }

/* кнопки и поля */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  min-height: 36px; padding: 0 14px; border-radius: var(--radius);
  border: 1px solid var(--rule-strong); background: var(--panel); color: var(--ink);
  font: 500 14px/1 var(--font); text-decoration: none; cursor: pointer; white-space: nowrap;
  transition: background-color 120ms ease-out, border-color 120ms ease-out;
}
.btn:hover { background: var(--panel-2); }
.btn:active { transform: translateY(1px); }
.btn.solid { background: var(--granite); border-color: var(--granite); color: var(--on-granite); }
.btn.solid:hover { background: var(--granite-2); }
.btn.ok { background: var(--ok); border-color: var(--ok); color: #fff; }
.btn.sm { min-height: 30px; padding: 0 10px; font-size: 13px; }
.btn[disabled] { opacity: 0.5; cursor: not-allowed; }
.btn-row { display: flex; gap: 8px; flex-wrap: wrap; }
label.field { display: block; font-size: 13px; color: var(--ink-2); }
label.field > span { display: block; margin-bottom: 4px; }
input, select, textarea {
  font: inherit; color: inherit; background: var(--panel);
  border: 1px solid var(--rule-strong); border-radius: var(--radius);
  min-height: 36px; padding: 6px 10px; width: 100%;
}
textarea { min-height: 76px; resize: vertical; }
input::placeholder, textarea::placeholder { color: var(--ink-3); }
input[type="checkbox"] { width: 16px; height: 16px; min-height: 0; accent-color: var(--granite); }
.filters { display: flex; gap: 10px; flex-wrap: wrap; align-items: end; }
.filters label.field { min-width: 150px; flex: 1 1 150px; max-width: 220px; }

/* статусы */
.tag { display: inline-flex; align-items: center; gap: 5px; padding: 2px 8px; border-radius: 99px; font-size: 12px; font-weight: 550; white-space: nowrap; }
.tag-pending { background: var(--ochre-soft); color: var(--ochre-ink); }
.tag-confirmed { background: var(--red-soft); color: var(--red); }
.tag-rejected { background: var(--panel-2); color: var(--ink-2); }
.tag-open { background: var(--ochre-soft); color: var(--ochre-ink); outline: 1px solid color-mix(in srgb, var(--ochre) 60%, transparent); }
.tag-accepted { background: var(--ok-soft); color: var(--ok); }
.tag-declined { background: var(--panel-2); color: var(--ink-2); }
.who { display: inline-flex; align-items: center; gap: 7px; font-weight: 550; white-space: nowrap; }
.who::before { content: ""; width: 10px; height: 10px; border-radius: 50%; background: var(--line); box-shadow: 0 0 0 2px var(--panel), 0 0 0 3px var(--line); }

.flash {
  position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); z-index: 50;
  background: var(--granite); color: var(--on-granite); padding: 10px 16px; border-radius: var(--radius);
  box-shadow: var(--shadow); display: flex; align-items: center; gap: 8px; font-size: 14px;
  animation: flash-in 260ms cubic-bezier(0.16, 1, 0.3, 1), flash-out 400ms ease-in 4.6s forwards;
}
@keyframes flash-in { from { opacity: 0; transform: translate(-50%, 10px); } }
@keyframes flash-out { to { opacity: 0; visibility: hidden; } }
.error-box { background: var(--red-soft); color: var(--red); padding: 10px 12px; border-radius: var(--radius); margin-bottom: 14px; }
.empty { padding: 28px 16px; text-align: center; color: var(--ink-2); }
.empty b { display: block; color: var(--ink); margin-bottom: 4px; }

/* ---------- линия дня (подпись направления) ---------- */
.line {
  --cols: 11;
  position: relative; display: grid; grid-template-columns: repeat(var(--cols), minmax(0, 1fr));
  list-style: none; margin: 0; padding: 0;
}
.line::before {
  content: ""; position: absolute; left: calc(50% / var(--cols)); right: calc(50% / var(--cols));
  top: 7px; height: 4px; border-radius: 2px; background: var(--line);
}
.line.off::before { background: repeating-linear-gradient(90deg, var(--rule-strong) 0 8px, transparent 8px 14px); }
.st { position: relative; display: flex; flex-direction: column; align-items: center; gap: 6px; min-width: 0; text-decoration: none; color: inherit; }
.st .dot {
  position: relative; z-index: 1; width: 18px; height: 18px; border-radius: 50%;
  background: var(--line); box-shadow: 0 0 0 3px var(--panel);
}
.st .dot::after { content: ""; position: absolute; inset: 5px; border-radius: 50%; background: var(--panel); }
.st-violation .dot { background: var(--red); }
.st-violation .dot::after { inset: 4px; }
.st-violation.has-pending .dot { box-shadow: 0 0 0 3px var(--panel), 0 0 0 5px var(--ochre); }
.st-waiting .dot { background: var(--rule-strong); }
.st-inactive .dot { background: transparent; box-shadow: none; }
.st-inactive .dot::after { inset: 6px; background: var(--rule-strong); }
.st .n {
  position: absolute; z-index: 2; top: -9px; left: calc(50% + 5px);
  min-width: 18px; padding: 0 5px; border-radius: 99px; background: var(--red); color: #fff;
  font-size: 11px; font-weight: 650; line-height: 17px; text-align: center;
}
.st .lbl { font-size: 11.5px; line-height: 1.2; color: var(--ink-2); text-align: center; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.st-violation .lbl { color: var(--red); font-weight: 600; }
.st-inactive .lbl { color: var(--ink-3); }
a.st:hover .lbl { text-decoration: underline; }
.line .off-label { position: absolute; inset: -2px auto auto 50%; transform: translateX(-50%); z-index: 2; background: var(--panel); padding: 0 10px; font-size: 13px; font-weight: 550; color: var(--ink-2); }
.line.off .st { visibility: hidden; }
.line.compact .lbl { display: none; }
.line.compact .st .dot { width: 14px; height: 14px; }
.line.compact .st .dot::after { inset: 4px; }
.line.compact::before { top: 5px; height: 4px; }
.line.compact .st .n { top: -8px; font-size: 11px; line-height: 15px; min-width: 15px; padding: 0 4px; }

.legend { display: flex; flex-wrap: wrap; gap: 6px 16px; font-size: 12.5px; color: var(--ink-2); }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.legend-row { padding: 9px 16px; border-bottom: 1px solid var(--rule); background: color-mix(in srgb, var(--panel-2) 40%, var(--panel)); }
.line-chips { display: none; list-style: none; margin: 12px 0 0; padding: 0; flex-wrap: wrap; gap: 6px; }
.line-chips li { display: inline-flex; align-items: center; gap: 6px; padding: 3px 9px; border-radius: 99px; background: var(--red-soft); color: var(--red); font-size: 12.5px; font-weight: 550; }
.line-chips li.pending { box-shadow: inset 0 0 0 1.5px var(--ochre); }
.legend i { width: 12px; height: 12px; border-radius: 50%; display: inline-block; }
.legend .l-ok { background: radial-gradient(circle, var(--panel) 32%, var(--ink-2) 34%); }
.legend .l-bad { background: radial-gradient(circle, var(--panel) 30%, var(--red) 32%); }
.legend .l-pend { background: radial-gradient(circle, var(--panel) 30%, var(--red) 32%); box-shadow: 0 0 0 2px var(--panel), 0 0 0 3.5px var(--ochre); }
.legend .l-wait { background: radial-gradient(circle, var(--panel) 32%, var(--rule-strong) 34%); }
.legend .l-inact { background: radial-gradient(circle, var(--rule-strong) 22%, transparent 24%); }

/* ---------- Bugun ---------- */
.mgr-row { padding: 18px 16px 16px; display: grid; grid-template-columns: 170px minmax(0, 1fr) 210px; gap: 14px 22px; align-items: center; }
.mgr-row + .mgr-row { border-top: 1px solid var(--rule); }
.mgr-name a { font-size: 17px; font-weight: 650; text-decoration: none; }
.mgr-name .who::before { width: 12px; height: 12px; }
.mgr-name .meta { font-size: 13px; color: var(--ink-2); margin-top: 3px; }
.norms { display: grid; grid-template-columns: repeat(3, auto); gap: 2px 14px; justify-content: start; font-size: 13px; }
.norm b { display: block; font-size: 18px; font-weight: 650; }
.norm b.bad { color: var(--red); }
.norm small { color: var(--ink-2); font-size: 12px; }
.norm .of { color: var(--ink-3); font-weight: 400; font-size: 13px; }
.mgr-sum { text-align: right; font-size: 13px; color: var(--ink-2); }
.mgr-sum b { display: block; font-size: 18px; color: var(--ink); font-weight: 650; }

.queue-item { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 10px 16px; align-items: center; padding: 12px 16px; position: relative; }
.queue-item + .queue-item { border-top: 1px solid var(--rule); }
.queue-item .what { min-width: 0; }
.queue-item .what a { font-weight: 550; text-decoration: none; display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.queue-item .what a:hover { text-decoration: underline; }
.queue-item .meta { font-size: 13px; color: var(--ink-2); display: flex; flex-wrap: wrap; gap: 4px 12px; margin-top: 3px; }
.queue-item.is-appeal { background: color-mix(in srgb, var(--ochre-soft) 55%, var(--panel)); }
.lamp { width: 8px; height: 8px; border-radius: 50%; background: var(--ochre); display: inline-block; flex: none; }

.alert-item { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 4px 12px; padding: 12px 16px; }
.alert-item + .alert-item { border-top: 1px solid var(--rule); }
.alert-item .icon { color: var(--red); margin-top: 2px; }
.alert-item b { font-weight: 600; }
.alert-item p { font-size: 13px; color: var(--ink-2); grid-column: 2; }

/* ---------- таблицы ---------- */
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th, td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--rule); vertical-align: middle; }
th { font-size: 12px; font-weight: 600; color: var(--ink-2); background: var(--panel-2); position: sticky; top: 0; z-index: 1; }
tbody tr:last-child td { border-bottom: 0; }
tbody tr:hover td { background: color-mix(in srgb, var(--panel-2) 45%, transparent); }
td.title-cell a { font-weight: 500; text-decoration: none; }
td.title-cell a:hover { text-decoration: underline; }
td .faint { display: block; font-size: 12.5px; margin-top: 2px; }
.r { text-align: right; }

/* очередь решений */
.group-head { display: flex; align-items: center; gap: 12px; justify-content: space-between; padding: 12px 16px; border-bottom: 1px solid var(--rule); background: var(--panel-2); flex-wrap: wrap; }
.group-head h3 { display: flex; align-items: center; gap: 8px; }
.group-head .rule-text { font-size: 13px; color: var(--ink-2); flex-basis: 100%; }
.pick { display: grid; grid-template-columns: 28px minmax(0, 1fr) auto; gap: 8px 12px; align-items: center; padding: 11px 16px; }
.pick + .pick { border-top: 1px solid var(--rule); }
.pick .what a { font-weight: 500; text-decoration: none; }
.pick .what a:hover { text-decoration: underline; }
.pick .meta { font-size: 13px; color: var(--ink-2); display: flex; flex-wrap: wrap; gap: 4px 12px; margin-top: 2px; }
.bulkbar {
  position: sticky; bottom: 0; z-index: 5; display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap;
  margin-top: 16px; padding: 12px 16px; background: var(--granite); color: var(--on-granite); border-radius: var(--radius); box-shadow: var(--shadow);
}
.bulkbar .btn { border-color: var(--granite-2); }
.chips { display: flex; gap: 6px; flex-wrap: wrap; }
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 5px 10px; border-radius: 99px; border: 1px solid var(--rule-strong); background: var(--panel); text-decoration: none; font-size: 13px; font-weight: 500; }
.chip[aria-current="true"] { background: var(--granite); color: var(--on-granite); border-color: var(--granite); }
.chip .c { color: var(--ink-3); font-weight: 400; }
.chip[aria-current="true"] .c { color: var(--on-granite-2); }

/* ---------- карточка нарушения ---------- */
.facts { display: grid; grid-template-columns: 150px minmax(0, 1fr); gap: 10px 16px; margin: 0; font-size: 14px; }
.facts dt { color: var(--ink-2); }
.facts dd { margin: 0; }
.rule-box { background: var(--panel-2); border-radius: var(--radius); padding: 12px 14px; font-size: 14px; }
.rule-box b { display: block; font-size: 12px; color: var(--ink-2); font-weight: 600; margin-bottom: 4px; }
.evidence { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 14px; border: 1px solid var(--rule); border-radius: var(--radius); text-decoration: none; }
.evidence:hover { border-color: var(--rule-strong); background: var(--panel-2); }
.quote { border-radius: var(--radius); background: var(--ochre-soft); padding: 12px 14px; }
.quote .who-line { font-size: 12.5px; color: var(--ochre-ink); font-weight: 600; margin-bottom: 4px; }

/* ---------- карточка менеджера ---------- */
.mgr-hero { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; justify-content: space-between; margin-bottom: 20px; }
.mgr-hero .badge { width: 46px; height: 46px; border-radius: 50%; background: var(--line); color: #fff; display: grid; place-items: center; font-size: 20px; font-weight: 650; box-shadow: 0 0 0 3px var(--marble), 0 0 0 5px var(--line); }
.mgr-hero .name { display: flex; align-items: center; gap: 14px; }
.kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border: 1px solid var(--rule); border-radius: var(--radius); background: var(--panel); margin-bottom: 16px; }
.kpi { padding: 14px 16px; }
.kpi + .kpi { border-left: 1px solid var(--rule); }
.kpi small { display: block; font-size: 12.5px; color: var(--ink-2); }
.kpi b { display: block; font-size: 22px; font-weight: 650; margin-top: 2px; }
.kpi b.red { color: var(--red); }
.kpi b.ochre { color: var(--ochre-ink); }
.kpi span { font-size: 12.5px; color: var(--ink-3); }

.map { overflow-x: auto; }
.map-grid { min-width: 640px; }
.map-row { display: grid; grid-template-columns: 112px minmax(0, 1fr) 78px; gap: 12px; align-items: center; padding: 9px 16px; }
.map-row + .map-row { border-top: 1px solid var(--rule); }
.map-row.head { position: sticky; top: 0; z-index: 3; background: var(--panel-2); border-bottom: 1px solid var(--rule); padding-block: 8px; }
.map-row .d { font-size: 13px; }
.map-row .d b { font-weight: 600; }
.map-row .d span { display: block; color: var(--ink-3); font-size: 12px; }
.map-row.is-weekend .d span { color: var(--ink-2); }
.map-cols { display: grid; grid-template-columns: repeat(11, minmax(0, 1fr)); }
.map-cols span { font-size: 11px; color: var(--ink-2); text-align: center; line-height: 1.15; padding: 0 2px; }
.map-cols .full { display: none; }
.map-cols .no { font-weight: 600; }
.map-row .v { text-align: right; font-size: 13px; }
.map-row .v b { color: var(--red); font-weight: 650; }
.map-row .v.zero { color: var(--ink-3); }

.bar { height: 6px; border-radius: 3px; background: var(--panel-2); overflow: hidden; margin-top: 4px; }
.bar i { display: block; height: 100%; background: var(--line); border-radius: 3px; }
.bar i.bad { background: var(--red); }
.check-list { list-style: none; margin: 0; padding: 0; }
.check-list li { display: grid; grid-template-columns: 26px minmax(0, 1fr) auto; gap: 10px; align-items: center; padding: 9px 16px; font-size: 14px; }
.check-list li + li { border-top: 1px solid var(--rule); }
.check-list .no { font-size: 12px; color: var(--ink-3); text-align: right; }
.check-list .cnt { font-weight: 650; }
.check-list .cnt.bad { color: var(--red); }
.check-list .cnt.zero { color: var(--ink-3); font-weight: 400; }
.check-list .off { color: var(--ink-3); font-size: 12.5px; }

/* ---------- график ---------- */
.cal { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px; }
.cal .wd { font-size: 12px; color: var(--ink-2); text-align: center; padding-bottom: 4px; font-weight: 550; }
.cal-cell { position: relative; min-height: 64px; border: 1px solid var(--rule); border-radius: var(--radius); background: var(--panel); padding: 6px 7px; font-size: 12px; display: flex; flex-direction: column; gap: 3px; }
.cal-cell.empty-cell { border: 0; background: none; }
.cal-cell .dn { font-weight: 600; font-size: 13px; }
.cal-cell.is-today { border-color: var(--ink); }
.cal-cell.k-weekly { background: var(--panel-2); }
.cal-cell.k-extra { background: color-mix(in srgb, var(--line) 12%, var(--panel)); border-color: color-mix(in srgb, var(--line) 40%, var(--rule)); }
.cal-cell.k-sick { background: var(--red-soft); border-color: color-mix(in srgb, var(--red) 30%, var(--rule)); }
.cal-cell.k-vacation { background: var(--ok-soft); border-color: color-mix(in srgb, var(--ok) 35%, var(--rule)); }
.cal-cell .kind { font-size: 11.5px; color: var(--ink-2); line-height: 1.2; }
.cal-cell.k-sick .kind { color: var(--red); }
.cal-cell .vio { margin-top: auto; color: var(--red); font-weight: 600; font-size: 11.5px; }
.cal-cell form { position: absolute; top: 3px; right: 3px; }
.cal-cell form button { border: 0; background: none; color: var(--ink-3); cursor: pointer; padding: 2px; border-radius: 4px; line-height: 0; }
.cal-cell form button:hover { color: var(--red); background: var(--panel); }
.cal-cell form .icon { width: 14px; height: 14px; }
.weekday-picks { display: flex; gap: 6px; flex-wrap: wrap; }
.weekday-picks label { display: inline-flex; align-items: center; justify-content: center; min-width: 42px; min-height: 34px; border: 1px solid var(--rule-strong); border-radius: var(--radius); cursor: pointer; font-size: 13px; font-weight: 550; background: var(--panel); user-select: none; }
.weekday-picks input { position: absolute; opacity: 0; pointer-events: none; }
.weekday-picks input:checked + span { color: var(--on-granite); }
.weekday-picks label:has(input:checked) { background: var(--granite); border-color: var(--granite); color: var(--on-granite); }
.weekday-picks label:has(input:focus-visible) { outline: 2px solid var(--focus); outline-offset: 2px; }
.sched-form { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)) auto; gap: 10px; align-items: end; }

/* ---------- вход ---------- */
.login-page { min-height: 100vh; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
.login-art { background: var(--granite); color: var(--on-granite); padding: 48px; display: flex; flex-direction: column; justify-content: space-between; overflow: hidden; }
.login-art svg { width: 100%; max-width: 520px; height: auto; }
.login-art p { color: var(--on-granite-2); max-width: 38ch; }
.login-form { display: grid; place-items: center; padding: 32px 16px; }
.login-form form { width: 100%; max-width: 340px; }
.login-form h1 { margin-bottom: 6px; }
.login-form .stack { margin-top: 22px; }

/* ---------- телефон и планшет ---------- */
@media (max-width: 1080px) {
  .grid-2 { grid-template-columns: minmax(0, 1fr); }
  .mgr-row { grid-template-columns: minmax(0, 1fr) auto; }
  .mgr-row .line-cell { grid-column: 1 / -1; grid-row: 2; }
  .mgr-row .norms-cell { grid-column: 1 / -1; grid-row: 3; }
  .mgr-sum { grid-row: 1; grid-column: 2; }
  .sched-form { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 860px) {
  .shell { display: block; }
  .rail { display: none; }
  .topbar {
    display: flex; align-items: center; justify-content: space-between; gap: 10px;
    position: sticky; top: 0; z-index: 20; background: var(--granite); color: var(--on-granite);
    padding: 10px 16px; padding-top: max(10px, env(safe-area-inset-top));
  }
  .topbar .brand b { font-size: 15px; }
  .topbar .brand span { display: none; }
  .topbar form button { background: none; border: 0; color: var(--on-granite-2); padding: 8px; border-radius: 6px; line-height: 0; cursor: pointer; }
  .tabbar {
    display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr);
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 20;
    background: var(--granite); padding: 6px 4px; padding-bottom: max(6px, env(safe-area-inset-bottom));
  }
  .tabbar a { display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 6px 2px; color: var(--on-granite-2); text-decoration: none; font-size: 11px; font-weight: 500; position: relative; border-radius: 6px; -webkit-tap-highlight-color: transparent; }
  .tabbar a[aria-current="page"] { color: var(--on-granite); background: var(--granite-2); }
  .tabbar .icon { width: 21px; height: 21px; }
  .tabbar .count { position: absolute; top: 1px; left: calc(50% + 6px); min-width: 17px; padding: 0 4px; border-radius: 99px; background: var(--ochre); color: #231a08; font-size: 11px; font-weight: 650; line-height: 16px; text-align: center; }
  .tabbar .count.red { background: var(--red); color: #fff; }
  .main { padding: 18px 16px 104px; }
  h1 { font-size: 22px; }
  .page-head { margin-bottom: 16px; }
  .flash { bottom: calc(80px + env(safe-area-inset-bottom)); width: max-content; max-width: calc(100vw - 32px); }
  .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .kpi:nth-child(3) { border-left: 0; }
  .kpi:nth-child(n + 3) { border-top: 1px solid var(--rule); }
  .line .lbl { display: none; }
  .line-chips { display: flex; }
  .legend-row { gap: 4px 12px; font-size: 12px; }
  .map-grid { min-width: 0; }
  .map-row { grid-template-columns: 64px minmax(0, 1fr) 24px; gap: 8px; padding: 9px 12px; }
  .map-row .d span { display: none; }
  .bulkbar { bottom: calc(68px + env(safe-area-inset-bottom)); }
  .mgr-hero .name { padding-left: 5px; }
  .queue-item { grid-template-columns: minmax(0, 1fr); }
  .pick { grid-template-columns: 28px minmax(0, 1fr); }
  .pick .btn-row { grid-column: 2; }
  .facts { grid-template-columns: minmax(0, 1fr); gap: 2px; }
  .facts dd { margin-bottom: 10px; }
  .login-page { grid-template-columns: minmax(0, 1fr); }
  .login-art { padding: 28px 20px; min-height: 220px; }
  .login-art p { display: none; }
  .sched-form { grid-template-columns: minmax(0, 1fr); }
  .cal-cell { min-height: 52px; padding: 4px 5px; }
  .cal-cell .kind { font-size: 11px; }
  .filters label.field { max-width: none; }
  table.responsive thead { display: none; }
  table.responsive, table.responsive tbody, table.responsive tr, table.responsive td { display: block; }
  table.responsive tr { padding: 10px 14px; border-bottom: 1px solid var(--rule); }
  table.responsive td { border: 0; padding: 2px 0; }
  table.responsive td.r { text-align: left; }
}
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } }

/* ---------- простой режим: главная, проверка по одной, итоги ---------- */
.btn.big { min-height: 48px; padding: 0 20px; font-size: 15px; font-weight: 600; }
td.bad, b.bad, .bad { color: var(--red); }
td.bad { font-weight: 600; }

.hero-action {
  display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 18px;
  padding: 20px 22px; margin-bottom: 14px; border-radius: 10px; text-decoration: none;
  background: var(--granite); color: var(--on-granite);
}
.hero-action:hover .btn { background: var(--ochre); border-color: var(--ochre); color: #231a08; }
.hero-num { font-size: 44px; font-weight: 700; line-height: 1; color: var(--ochre); letter-spacing: -0.02em; }
.hero-text b { display: block; font-size: 18px; font-weight: 600; }
.hero-text span { display: block; color: var(--on-granite-2); font-size: 14px; margin-top: 3px; }
.hero-action .btn { background: var(--on-granite); border-color: var(--on-granite); color: var(--granite); }
.hero-action.done { grid-template-columns: minmax(0, 1fr); background: var(--ok-soft); color: var(--ink); }
.hero-action.done .hero-text span { color: var(--ink-2); }

.notice {
  display: flex; align-items: center; gap: 10px; padding: 12px 16px; margin-bottom: 8px;
  border-radius: var(--radius); background: var(--red-soft); color: var(--ink); text-decoration: none; font-size: 14px;
}
.notice > .icon:first-child { color: var(--red); }
.notice > .icon:last-child { margin-left: auto; color: var(--ink-3); }
.notice b { color: var(--red); }

.day-switch { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 22px 0 14px; }
.day-switch h1 { font-size: 20px; text-align: center; }

.people { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 16px; }
.person { background: var(--panel); border: 1px solid var(--rule); border-radius: 10px; padding: 18px; display: flex; flex-direction: column; gap: 10px; }
.person header { display: flex; align-items: center; justify-content: space-between; }
.person header h2 { font-size: 19px; }
.person .label { font-size: 12.5px; font-weight: 600; color: var(--ink-2); margin-top: 6px; }
.person-off { padding: 14px; border-radius: var(--radius); background: var(--panel-2); color: var(--ink-2); }
.person footer { margin-top: auto; padding-top: 12px; border-top: 1px solid var(--rule); display: flex; justify-content: space-between; align-items: baseline; gap: 8px; color: var(--ink-2); font-size: 14px; }
.person footer b { font-size: 18px; color: var(--ink); }
.plain-list { list-style: none; margin: 0; padding: 0; }
.plain-list li { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 7px 0; border-bottom: 1px dashed var(--rule); font-size: 14.5px; }
.plain-list li:last-child { border-bottom: 0; }
.plain-list li > span:first-child { display: inline-flex; align-items: center; gap: 8px; }
.plain-list a { text-decoration: none; }
.plain-list a:hover { text-decoration: underline; }
.plain-list.padded li { padding: 9px 16px; }
.ok-line { display: flex; align-items: center; gap: 8px; color: var(--ok); font-weight: 550; }
.ok-mark, .bad-mark { display: inline-grid; place-items: center; width: 20px; height: 20px; border-radius: 50%; }
.ok-mark { background: var(--ok-soft); color: var(--ok); }
.bad-mark { background: var(--red-soft); color: var(--red); }
.ok-mark .icon, .bad-mark .icon { width: 13px; height: 13px; stroke-width: 2.5; }

.review { max-width: 720px; background: var(--panel); border: 1px solid var(--rule); border-radius: 10px; padding: 24px; display: flex; flex-direction: column; gap: 14px; }
.review h2 { font-size: 21px; line-height: 1.3; }
.review-kind { font-size: 13px; font-weight: 600; color: var(--red); }
.review-kind.appeal { color: var(--ochre-ink); }
.review-meta { color: var(--ink-2); font-size: 14px; display: flex; flex-wrap: wrap; gap: 4px 8px; align-items: center; }
.review-what, .review-rule { font-size: 15px; }
.review-rule { background: var(--panel-2); border-radius: var(--radius); padding: 12px 14px; font-size: 14px; }
.review-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 4px; }
.review-actions .btn { flex: 1 1 220px; }
.comment { flex-basis: 100%; }
.comment summary { cursor: pointer; color: var(--ink-2); font-size: 14px; }
.comment textarea { margin-top: 8px; }
.review-nav { display: flex; justify-content: space-between; align-items: center; padding-top: 12px; border-top: 1px solid var(--rule); font-size: 14px; }
.review-nav a { display: inline-flex; align-items: center; gap: 4px; text-decoration: none; color: var(--ink-2); }
.review-nav a:hover { color: var(--ink); }
.review.done { align-items: center; text-align: center; padding: 48px 24px; }
.done-icon { display: grid; place-items: center; width: 56px; height: 56px; border-radius: 50%; background: var(--ok-soft); color: var(--ok); }
.done-icon .icon { width: 28px; height: 28px; stroke-width: 2.25; }
.bulk-offer { max-width: 720px; margin-top: 12px; padding: 14px 16px; border: 1px dashed var(--rule-strong); border-radius: 10px; display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; font-size: 14px; color: var(--ink-2); }
.bulk-offer b { color: var(--ink); }

.summary { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin-bottom: 16px; }
.sum-item { background: var(--panel); border: 1px solid var(--rule); border-radius: 10px; padding: 16px; display: flex; flex-direction: column; gap: 2px; }
.sum-item span { font-size: 13px; color: var(--ink-2); }
.sum-item b { font-size: 24px; font-weight: 650; }
.sum-item b.red { color: var(--red); }
.sum-item small { font-size: 13px; color: var(--ink-3); }
.mistake { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 16px; text-decoration: none; }
.mistake + .mistake { border-top: 1px solid var(--rule); }
.mistake:hover { background: color-mix(in srgb, var(--panel-2) 50%, transparent); }
.mistake-main { min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.mistake-main b { font-weight: 550; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mistake-side { flex: none; }

@media (max-width: 860px) {
  .hero-action { grid-template-columns: auto minmax(0, 1fr); padding: 18px; gap: 12px 14px; }
  .hero-action .btn { grid-column: 1 / -1; width: 100%; }
  .hero-num { font-size: 38px; }
  .hero-text b { font-size: 16px; }
  .day-switch .btn { padding: 0 10px; }
  .day-switch .btn .icon + *, .day-switch h1 { font-size: 16px; }
  .review { padding: 18px; }
  .review h2 { font-size: 18px; }
  .review-actions .btn { flex-basis: 100%; }
  .summary { grid-template-columns: minmax(0, 1fr); }
  .sum-item { flex-direction: row; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 2px 10px; }
  .sum-item b { font-size: 20px; }
  .sum-item small { flex-basis: 100%; }
  .mistake { flex-direction: column; align-items: flex-start; gap: 6px; }
  .mistake-main b { white-space: normal; }
}

/* ---------- Kunlik hisobot ---------- */
.today h2 { font-size: 16px; color: var(--ink-2); font-weight: 600; margin-bottom: 10px; }
.tiles { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.tile { border-radius: 10px; padding: 16px; display: flex; flex-direction: column; gap: 4px; border: 1px solid var(--rule); background: var(--panel); }
.tile b { font-size: 34px; font-weight: 700; line-height: 1.1; letter-spacing: -0.02em; }
.tile-label { font-size: 13.5px; color: var(--ink-2); font-weight: 500; }
.tile-norm { font-size: 13px; display: inline-flex; align-items: center; gap: 5px; color: var(--ink-2); }
.tile-norm .icon { width: 15px; height: 15px; stroke-width: 2.4; }
.tile.good { background: var(--ok-soft); border-color: color-mix(in srgb, var(--ok) 35%, var(--rule)); }
.tile.good b, .tile.good .tile-norm { color: var(--ok); }
.tile.bad { background: var(--red-soft); border-color: color-mix(in srgb, var(--red) 35%, var(--rule)); }
.tile.bad b, .tile.bad .tile-norm { color: var(--red); }
.tile.sale b { font-size: 24px; margin-top: 8px; }

.pay-row { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.pay-row b { display: block; font-size: 19px; font-weight: 650; margin-top: 2px; }
.progress { position: relative; height: 12px; border-radius: 6px; background: var(--panel-2); margin: 26px 0 30px; }
.progress > i { display: block; height: 100%; border-radius: 6px; background: var(--line, var(--ok)); }
.progress .mark { position: absolute; top: -4px; bottom: -4px; width: 2px; background: var(--rule-strong); }
.progress .mark em { position: absolute; top: 18px; left: 50%; transform: translateX(-50%); font-style: normal; font-size: 11.5px; color: var(--ink-3); white-space: nowrap; }
.progress.thin { height: 8px; margin: 8px 0 6px; }
.salary { display: flex; flex-direction: column; gap: 2px; padding: 14px 16px; border-radius: var(--radius); background: var(--granite); color: var(--on-granite); }
.salary span { font-size: 13.5px; color: var(--on-granite-2); }
.salary b { font-size: 28px; font-weight: 700; color: var(--ochre); }
.salary small { color: var(--on-granite-2); font-size: 12.5px; }
.next-tier { margin-top: 12px; font-size: 14px; color: var(--ink-2); }
.next-tier .icon { vertical-align: -4px; margin-right: 4px; }
.next-tier .icon { color: var(--ok); }
.plan-form { display: flex; gap: 10px; align-items: end; margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--rule); }
.plan-form .field { flex: 1; }

.rating { list-style: none; margin: 0; padding: 0; }
.rating li { padding: 14px 16px; }
.rating li + li { border-top: 1px solid var(--rule); }
.rating li.me { background: color-mix(in srgb, var(--panel-2) 55%, var(--panel)); }
.rating-top { display: flex; align-items: center; gap: 10px; }
.rating-top b { margin-left: auto; font-size: 17px; }
.place { width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; background: var(--panel-2); font-size: 12.5px; font-weight: 650; }

table.days td.g { color: var(--ok); background: var(--ok-soft); font-weight: 600; }
table.days td.b { color: var(--red); background: var(--red-soft); font-weight: 600; }
table.days td.off-cell { color: var(--ink-3); text-align: center; font-size: 13px; }
table.days tfoot td { font-weight: 650; border-top: 2px solid var(--rule-strong); background: var(--panel-2); }
table.days th .faint { font-weight: 400; }
.add-fine summary { list-style: none; cursor: pointer; }
.add-fine summary::-webkit-details-marker { display: none; }
.add-fine[open] summary { border-bottom: 1px solid var(--rule); }
.add-fine:not([open]) summary { border-bottom: 0; }

@media (max-width: 1080px) { .tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 860px) {
  .tile { padding: 12px; }
  .tile b { font-size: 28px; }
  .tile.sale b { font-size: 19px; }
  .tile-label { font-size: 12.5px; }
  .pay-row { grid-template-columns: minmax(0, 1fr); gap: 6px; }
  .pay-row > div { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; }
  .pay-row b { font-size: 16px; margin: 0; }
  .salary b { font-size: 24px; }
  table.days th, table.days td { padding: 8px 6px; font-size: 13px; }
  table.days th .faint { display: none; }
  table.days td .faint { display: block; font-size: 11.5px; }
  .plan-form { flex-direction: column; align-items: stretch; }
}

/* ---------- Kunlik hisobot: oy kalendari ---------- */
.cal-score { font-size: 14px; color: var(--ink-2); }
.good-t { color: var(--ok); }
.bad-t { color: var(--red); }
.mc-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px; max-width: 560px; }
.mc-wd { text-align: center; font-size: 12.5px; font-weight: 600; color: var(--ink-2); padding-bottom: 2px; }
.mc-cell {
  aspect-ratio: 1; border-radius: 10px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
  text-decoration: none; font-size: 15px; border: 2px solid transparent; transition: transform 120ms ease-out;
}
a.mc-cell:hover { transform: translateY(-1px); }
.mc-cell b { font-weight: 650; line-height: 1; }
.mc-cell .icon { width: 16px; height: 16px; stroke-width: 2.6; }
.mc-cell.good { background: var(--ok); color: #fff; }
.mc-cell.bad { background: var(--red); color: #fff; }
.mc-cell.off, .mc-cell.none { background: var(--panel-2); color: var(--ink-3); }
.mc-cell.future { color: var(--ink-3); border: 1px dashed var(--rule-strong); }
.mc-cell.out { visibility: hidden; }
.mc-cell.picked { border-color: var(--ink); box-shadow: 0 0 0 2px var(--panel); }
.mc-legend { display: flex; flex-wrap: wrap; gap: 6px 16px; margin-top: 14px; font-size: 13px; color: var(--ink-2); }
.mc-legend span { display: inline-flex; align-items: center; gap: 6px; }
.mc-legend i { width: 14px; height: 14px; border-radius: 4px; display: inline-block; }
.mc-legend i.good { background: var(--ok); }
.mc-legend i.bad { background: var(--red); }
.mc-legend i.off { background: var(--panel-2); border: 1px solid var(--rule-strong); }
@media (max-width: 860px) {
  .mc-grid { gap: 5px; max-width: none; }
  .mc-cell { border-radius: 8px; font-size: 14px; }
  .mc-cell .icon { width: 13px; height: 13px; }
  .month-cal .module-head { flex-wrap: wrap; }
}

/* ---------- bugun: qancha qoldi ---------- */
.today-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin-bottom: 10px; }
.today-head h2 { margin: 0; font-size: 18px; color: var(--ink); }
.clock { display: inline-flex; align-items: center; gap: 6px; font-size: 13.5px; font-weight: 550; color: var(--ochre-ink); background: var(--ochre-soft); padding: 4px 10px; border-radius: 99px; }
.clock .icon { width: 15px; height: 15px; }
.clock.done { color: var(--ink-2); background: var(--panel-2); }
.tile b .of { font-size: 16px; font-weight: 500; color: var(--ink-3); letter-spacing: 0; }
.tile.good b .of { color: color-mix(in srgb, var(--ok) 70%, var(--ink-3)); }
.tile.bad b .of { color: color-mix(in srgb, var(--red) 70%, var(--ink-3)); }
.tile-bar { height: 6px; border-radius: 3px; background: color-mix(in srgb, var(--ink) 8%, transparent); overflow: hidden; margin: 4px 0 2px; }
.tile-bar i { display: block; height: 100%; border-radius: 3px; background: var(--ink-3); }
.tile.good .tile-bar i { background: var(--ok); }
.tile.bad .tile-bar i { background: var(--red); }
.tile.progress-tile { background: var(--panel); border-color: color-mix(in srgb, var(--ochre) 45%, var(--rule)); }
.tile.progress-tile b { color: var(--ink); }
.tile.progress-tile .tile-bar i { background: var(--ochre); }
.tile.progress-tile .tile-norm { color: var(--ochre-ink); font-size: 14px; }
.tile.progress-tile .tile-norm b { font-size: 15px; letter-spacing: 0; }
.mc-cell.today { background: var(--ochre-soft); color: var(--ochre-ink); border-color: var(--ochre); }
.mc-cell small { font-size: 11px; font-weight: 600; }
.mc-legend i.today { background: var(--ochre-soft); border: 2px solid var(--ochre); }
.tile.progress-tile .tile-norm { display: block; }

/* ---------- AI-yordamchi maslahatlari ---------- */
.tip { padding: 14px 16px; }
.tip + .tip { border-top: 1px solid var(--rule); }
.tip-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 4px; }
.tip-head b { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; }
.tip p { font-size: 14.5px; color: var(--ink-2); }
.tip.solo { border-radius: var(--radius); background: var(--ok-soft); }
.tip.solo .tip-head b { color: var(--ok); }
.tip.solo p { color: var(--ink); }
@media (max-width: 1080px) { .tips-first > .stack { order: -1; } }

/* ---------- geymifikatsiya: kun kartasi, darajalar, yutuqlar ---------- */
.day-hero {
  display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 22px; align-items: center;
  padding: 22px 24px; border-radius: 14px; margin-bottom: 14px;
  background: var(--granite); color: var(--on-granite);
  background-image: radial-gradient(120% 140% at 100% 0%, color-mix(in srgb, var(--line) 35%, transparent) 0%, transparent 60%);
}
.ring { position: relative; width: 124px; height: 124px; flex: none; }
.ring svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.ring circle { fill: none; stroke-width: 11; }
.ring-bg { stroke: rgb(255 255 255 / 0.1); }
.ring-fg { stroke: var(--ochre); stroke-linecap: round; transition: stroke-dasharray 900ms cubic-bezier(0.16, 1, 0.3, 1); }
.ring-fg.full { stroke: #5cbf86; }
.ring-text { position: absolute; inset: 0; display: grid; place-content: center; text-align: center; }
.ring-text b { font-size: 30px; font-weight: 700; line-height: 1; }
.ring-text span { font-size: 11.5px; color: var(--on-granite-2); margin-top: 4px; }
.hello { color: var(--on-granite-2); font-size: 14px; margin-bottom: 4px; }
.day-hero h1 { font-size: 23px; line-height: 1.25; color: var(--on-granite); }
.badges { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.badge-pill { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: 99px; font-size: 13.5px; font-weight: 600; background: rgb(255 255 255 / 0.08); color: var(--on-granite); text-decoration: none; }
.badge-pill .icon { width: 17px; height: 17px; }
.badge-pill.flame { background: color-mix(in srgb, #ff8a3d 22%, transparent); color: #ffb27a; }
.badge-pill.flame.cold { background: rgb(255 255 255 / 0.08); color: var(--on-granite-2); }
.badge-pill.level { background: color-mix(in srgb, var(--ochre) 25%, transparent); color: #f1c46f; }
.badge-pill.link:hover { background: rgb(255 255 255 / 0.14); }

.tile-label { display: inline-flex; align-items: center; gap: 6px; }
.tile-label .icon { width: 16px; height: 16px; color: var(--ink-3); }
.tile.good .tile-label .icon { color: var(--ok); }
.updated { margin-top: 8px; }

.levels { list-style: none; margin: 0 0 18px; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; position: relative; }
.levels li { display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 10px 4px; border-radius: 10px; background: var(--panel-2); color: var(--ink-3); }
.levels li.passed { color: var(--ink-2); }
.levels li.current { background: var(--ochre-soft); color: var(--ochre-ink); box-shadow: inset 0 0 0 2px var(--ochre); }
.lv-medal { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; background: var(--panel); }
.lv-medal .icon { width: 20px; height: 20px; }
.levels li.passed .lv-medal { color: var(--ok); }
.levels li.current .lv-medal { background: var(--ochre); color: #231a08; }
.lv-rate { font-size: 17px; font-weight: 700; }
.lv-floor { font-size: 11.5px; }
.plan-line .progress { margin: 0 0 6px; }
.plan-line p { font-size: 14px; color: var(--ink-2); }
.plan-line p b { color: var(--ink); }
.next-goal { display: flex; gap: 8px; align-items: flex-start; margin: 14px 0; padding: 12px 14px; border-radius: 10px; background: var(--ok-soft); font-size: 14px; }
.next-goal .icon { color: var(--ok); flex: none; margin-top: 1px; }
.next-goal.top { background: var(--ochre-soft); }
.next-goal.top .icon { color: var(--ochre-ink); }
.salary { border-radius: 10px; }

.podium { list-style: none; margin: 0; padding: 0; }
.podium li { display: grid; grid-template-columns: 38px minmax(0, 1fr); gap: 12px; align-items: center; padding: 14px 16px; }
.podium li + li { border-top: 1px solid var(--rule); }
.podium li.me { background: color-mix(in srgb, var(--line) 8%, var(--panel)); }
.pd-place { width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; background: var(--panel-2); font-weight: 700; color: var(--ink-2); }
.podium li.first .pd-place { background: var(--ochre); color: #231a08; }
.pd-place .icon { width: 20px; height: 20px; }
.pd-top { display: flex; align-items: center; gap: 8px; }
.pd-top b { margin-left: auto; font-size: 17px; }
.you { font-size: 11.5px; font-weight: 600; padding: 1px 7px; border-radius: 99px; background: var(--line); color: #fff; }
.podium .progress.thin > i { background: var(--line); }

.achievements { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; padding: 16px; }
.ach { display: flex; flex-direction: column; gap: 4px; padding: 14px; border-radius: 12px; background: var(--panel-2); color: var(--ink-3); min-width: 0; }
.ach b { color: var(--ink-2); font-size: 14.5px; font-weight: 650; }
.ach-text { font-size: 12.5px; line-height: 1.35; }
.ach-icon { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; background: var(--panel); margin-bottom: 4px; filter: grayscale(1); opacity: 0.7; }
.ach-icon .icon { width: 22px; height: 22px; }
.ach.on { background: color-mix(in srgb, var(--ochre-soft) 70%, var(--panel)); color: var(--ink-2); box-shadow: inset 0 0 0 1.5px color-mix(in srgb, var(--ochre) 55%, transparent); }
.ach.on b { color: var(--ink); }
.ach.on .ach-icon { filter: none; opacity: 1; background: var(--ochre); color: #231a08; }
.ach-done { display: inline-flex; align-items: center; gap: 4px; margin-top: auto; padding-top: 6px; font-size: 12.5px; font-weight: 650; color: var(--ok); }
.ach-done .icon { width: 14px; height: 14px; stroke-width: 2.6; }
.ach-bar { height: 5px; border-radius: 3px; background: var(--panel); overflow: hidden; margin-top: auto; }
.ach-bar i { display: block; height: 100%; background: var(--ink-3); border-radius: 3px; }
.ach-cap { font-size: 12px; }

.stepper.sm a, .stepper.sm span { min-height: 32px; font-size: 14px; }
.stepper.sm span { min-width: 110px; }

#confetti { position: fixed; inset: 0; pointer-events: none; z-index: 60; overflow: hidden; }
#confetti i { position: absolute; top: -12px; width: 8px; height: 14px; border-radius: 2px; animation: confetti-fall 2.6s cubic-bezier(0.25, 0.6, 0.4, 1) forwards; }
@keyframes confetti-fall { to { transform: translate(var(--x), 105vh) rotate(var(--r)); opacity: 0.9; } }

@media (max-width: 1080px) { .achievements { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 860px) {
  .day-hero { grid-template-columns: 96px minmax(0, 1fr); gap: 16px; padding: 18px 16px; }
  .ring { width: 96px; height: 96px; }
  .ring-text b { font-size: 23px; }
  .ring-text span { font-size: 11px; }
  .day-hero h1 { font-size: 18px; }
  .badges { margin-top: 10px; gap: 6px; }
  .badge-pill { font-size: 12.5px; padding: 5px 10px; }
  .levels { gap: 5px; }
  .lv-medal { width: 28px; height: 28px; }
  .lv-rate { font-size: 15px; }
  .achievements { gap: 8px; padding: 12px; }
  .ach { padding: 12px; }
}
