:root {
  --bg: #f4f5f7; --panel: #ffffff; --ink: #2b2f36; --muted: #8a919c; --line: #eceef1; --line-strong: #dfe2e7;
  --accent: #2f7bf5; --accent-ink: #ffffff; --accent-soft: #eaf2ff;
  --side: #2c333c; --side-ink: #aab2bd; --side-active: #3b444f;
  --chip: #eef0f3; --chip-ink: #4a505a; --seg: #f3f4f6; --seg-active: #e6e8ec;
  --pos: #1f9d55; --neg: #2b2f36; --neg-strong: #e5484d;
  --badge-bg: #fde3e4; --badge-ink: #e5484d;
  --warn-bg: #fff4e0; --ok-bg: #e8f6ee; --row-hover: #f8f9fb; --sub: #f7f8fa; --total: #f1f3f6;
  --shadow: 0 1px 2px rgba(20, 30, 50, .05);
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #15181c; --panel: #1d2126; --ink: #e7e9ec; --muted: #8d949e; --line: #2a2f36; --line-strong: #353b43;
    --accent: #4a8dff; --accent-soft: #1d2c44; --side: #101317; --side-ink: #8d949e; --side-active: #232830;
    --chip: #262b31; --chip-ink: #c4c9d0; --seg: #22262c; --seg-active: #2e343b;
    --neg: #e7e9ec; --badge-bg: #3a1f22; --warn-bg: #3a2f1c; --ok-bg: #18301f; --row-hover: #22262c;
    --sub: #21252a; --total: #262b31;
  }
}
* { box-sizing: border-box; }
html, body { height: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink);
  font: 15px/1.45 "Roboto", -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ---------- layout: dark icon sidebar + top bar ---------- */
.side { position: fixed; inset: 0 auto 0 0; width: 92px; background: var(--side); display: flex; flex-direction: column;
  align-items: center; padding: 26px 0 18px; z-index: 30; }
.side .logo { width: 48px; height: 48px; border-radius: 12px; background: var(--accent); color: #fff; display: grid;
  place-items: center; font-weight: 700; font-size: 20px; letter-spacing: .02em; margin-bottom: 34px; }
.side .logo:hover { text-decoration: none; }
.side a.nav { width: 78px; padding: 10px 0 8px; border-radius: 8px; color: var(--side-ink); display: flex;
  flex-direction: column; align-items: center; gap: 4px; margin: 2px 0; position: relative; }
.side a.nav svg { width: 22px; height: 22px; fill: currentColor; }
.side a.nav span { font-size: 10.5px; line-height: 1.1; text-align: center; }
.side a.nav:hover { color: #fff; text-decoration: none; }
.side a.nav.active { background: var(--side-active); color: #fff; }
.side .spacer { flex: 1; }
.side .badge { position: absolute; top: 4px; right: 12px; min-width: 16px; height: 16px; padding: 0 4px; border-radius: 8px;
  background: var(--badge-ink); color: #fff; font-size: 10px; line-height: 16px; text-align: center; }

.page { margin-left: 92px; min-height: 100%; }
.topbar { height: 82px; background: var(--panel); border-bottom: 1px solid var(--line); display: flex; align-items: center;
  gap: 18px; padding: 0 40px; position: sticky; top: 0; z-index: 20; }
.topbar h1 { font-size: 21px; font-weight: 700; margin: 0; white-space: nowrap; }
.pill-bad { background: var(--badge-bg); color: var(--badge-ink); border-radius: 18px; padding: 6px 16px; font-size: 15px; white-space: nowrap; }
.pill-bad:hover { text-decoration: none; filter: brightness(.97); }
.topbar .grow { flex: 1; }
.topbar .cash { text-align: right; line-height: 1.15; }
.topbar .cash b { font-size: 17px; font-weight: 700; }
.topbar .cash small { display: block; color: var(--muted); font-size: 13px; }
.pill-ai { border: 1px solid #cfe0ff; background: var(--accent-soft); color: var(--accent); border-radius: 22px; padding: 8px 16px;
  font-weight: 600; white-space: nowrap; box-shadow: 0 0 0 4px rgba(47, 123, 245, .08); }
.pill-ai:hover { text-decoration: none; }
main { padding: 32px 40px 48px; max-width: 1800px; }
h1.page-h { display: none; }
h2 { font-size: 17px; margin: 26px 0 12px; font-weight: 700; }
.muted { color: var(--muted); }
.small { font-size: 13px; }

/* ---------- segmented tabs & chips ---------- */
.tabs { display: inline-flex; border: 1px solid var(--line-strong); border-radius: 6px; overflow: hidden; background: var(--panel);
  margin: 0 12px 18px 0; vertical-align: top; }
.tabs a { padding: 10px 22px; color: var(--ink); border-right: 1px solid var(--line-strong); white-space: nowrap; }
.tabs a:last-child { border-right: 0; }
.tabs a:hover { background: var(--seg); text-decoration: none; }
.tabs a.on { background: var(--seg-active); }
.tabs-row { display: flex; flex-wrap: wrap; align-items: flex-start; }

.filters { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-bottom: 18px; }
.filters label { display: inline-flex; align-items: center; gap: 6px; font-size: 14px; color: var(--chip-ink);
  background: var(--chip); border-radius: 18px; padding: 3px 6px 3px 14px; }
.filters label input, .filters label select { border: 0; background: transparent; padding: 4px 4px; color: var(--chip-ink); }
.filters label input[type=checkbox] { margin-right: 4px; }
.flash { padding: 12px 16px; border-radius: 8px; margin-bottom: 16px; }
.flash.ok { background: var(--ok-bg); }
.flash.warn { background: var(--warn-bg); }

/* ---------- controls ---------- */
input, select, textarea, button { font: inherit; color: var(--ink); background: var(--panel); border: 1px solid var(--line-strong);
  border-radius: 6px; padding: 7px 10px; }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--accent-soft); border-color: var(--accent); }
input[type=checkbox], input[type=radio] { width: auto; accent-color: var(--accent); }
button, .btn { background: var(--accent); color: var(--accent-ink); border: 1px solid var(--accent); cursor: pointer;
  padding: 8px 18px; border-radius: 6px; display: inline-block; font-weight: 500; white-space: nowrap; }
.btn.secondary, button.secondary { background: var(--panel); color: var(--ink); border-color: var(--line-strong); }
.btn.secondary:hover, button.secondary:hover { background: var(--seg); }
button.danger { background: var(--panel); color: var(--neg-strong); border-color: #f3c4c6; }
.btn:hover { text-decoration: none; filter: brightness(.98); }

/* ---------- cards & tables ---------- */
.panel { background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: 20px 22px; margin-bottom: 18px;
  box-shadow: var(--shadow); }
.grid { display: grid; gap: 18px; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); }
.kpi .label { color: var(--muted); font-size: 12px; text-transform: uppercase; letter-spacing: .06em; font-weight: 500; }
.kpi .value { font-size: 26px; font-weight: 700; margin-top: 6px; font-variant-numeric: tabular-nums; }
.kpi .delta { font-size: 13px; margin-top: 4px; }
.table-wrap { overflow-x: auto; background: var(--panel); border: 1px solid var(--line); border-radius: 10px; box-shadow: var(--shadow); }
table { border-collapse: collapse; width: 100%; }
th, td { padding: 13px 18px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: middle; }
th { font-size: 12.5px; color: var(--muted); font-weight: 500; text-transform: uppercase; letter-spacing: .04em;
  background: var(--panel); position: sticky; top: 0; height: 60px; }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
tr:hover td { background: var(--row-hover); }
.neg { color: var(--neg); }
.pos { color: var(--pos); }
.neg-strong { color: var(--neg-strong); }

/* reports: Adesk-like tree */
.report td:first-child, .report th:first-child { position: sticky; left: 0; background: var(--panel); min-width: 330px;
  z-index: 1; border-right: 1px solid var(--line); }
.report td { font-size: 15.5px; }
.report tr.block td { font-weight: 700; font-size: 17px; border-top: 6px solid var(--bg); padding-top: 16px; padding-bottom: 14px; }
.report tr.block td:first-child::before { content: "▾"; color: var(--muted); font-size: 13px; margin-right: 10px; }
.report tr.group td:first-child { padding-left: 40px; cursor: pointer; }
.report tr.group td:first-child::before { content: "▸"; color: var(--muted); font-size: 12px; margin-right: 10px; margin-left: -20px; }
.report tr.group.open td:first-child::before { content: "▾"; }
.report tr:not(.block):not(.group):not(.subtotal):not(.total):not(.margin):not(.balance) td:first-child { padding-left: 40px; }
.report tr.child td:first-child { padding-left: 64px; color: var(--ink); }
.report tr.child td { font-size: 14.5px; }
.report tr.child { display: none; }
.report tr.child.show { display: table-row; }
.report tr.subtotal td { background: var(--sub); font-weight: 700; }
.report tr.total td { background: var(--total); font-weight: 700; font-size: 17px; }
.report tr.margin td { color: var(--muted); font-size: 13px; padding-top: 8px; padding-bottom: 8px; }
.report tr.balance td { color: var(--ink); }
.report tr.balance td:first-child::before { content: "▸"; color: var(--muted); font-size: 12px; margin-right: 10px; }

.tag { display: inline-block; padding: 2px 9px; border-radius: 12px; background: var(--chip); color: var(--chip-ink); font-size: 12px; }
.tag.warn { background: var(--badge-bg); color: var(--badge-ink); }
.cat-cell .cat-btn { background: none; color: var(--accent); padding: 0; border: 0; text-align: left; font-weight: 400; }
.cat-cell .cat-btn.empty { color: var(--badge-ink); font-weight: 500; }
.desc { max-width: 560px; word-break: break-word; }
.form-grid { display: grid; grid-template-columns: 200px 1fr; gap: 12px 16px; align-items: center; max-width: 780px; }
.form-grid label { color: var(--muted); }
.row-actions { display: flex; gap: 10px; align-items: center; margin-top: 18px; flex-wrap: wrap; }
.bulkbar { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; padding: 12px 16px; position: sticky; bottom: 0;
  background: var(--panel); border-top: 1px solid var(--line); }
.preview td { font-size: 12.5px; white-space: nowrap; max-width: 240px; overflow: hidden; text-overflow: ellipsis; padding: 8px 12px; }
.chart { width: 100%; height: 260px; }
.bar-row { display: grid; grid-template-columns: 150px 1fr 150px; gap: 10px; align-items: center; margin: 8px 0; }
.bar { height: 10px; background: var(--accent); border-radius: 5px; }
details summary { cursor: pointer; color: var(--ink); padding: 6px 0; }
details summary:hover { color: var(--accent); }
.budget input { width: 112px; text-align: right; padding: 5px 7px; }
.budget td { padding: 4px 6px; }
.hint { font-size: 12px; color: var(--muted); }

@media (max-width: 760px) {
  .side { width: 64px; }
  .side a.nav { width: 56px; }
  .side a.nav span { display: none; }
  .page { margin-left: 64px; }
  .topbar { padding: 0 16px; height: 64px; }
  .topbar .cash, .pill-ai { display: none; }
  main { padding: 16px; }
  .form-grid { grid-template-columns: 1fr; }
  .report td:first-child, .report th:first-child { min-width: 190px; }
}

/* report rows read as plain text like Adesk; links reveal on hover */
.report td a, .table-wrap td.desc a { color: var(--ink); }
.report td a:hover { color: var(--accent); text-decoration: none; }
.report td:first-child { white-space: nowrap; }

/* ОПИУ: three-level drill-down */
.report.opiu tr.lvl0 td:first-child { padding-left: 40px; font-weight: 600; }
.report.opiu tr.lvl1 td:first-child { padding-left: 64px; }
.report.opiu tr.lvl2 td:first-child { padding-left: 92px; color: var(--muted); }
.report.opiu tr.lvl3 td:first-child { padding-left: 120px; color: var(--muted); font-size: 13px; }
.report.opiu tr.lvl2 td, .report.opiu tr.lvl3 td { font-size: 13.5px; }
.report.opiu tr.lvl1.group td:first-child::before, .report.opiu tr.lvl2.group td:first-child::before { margin-left: -20px; }
.report.opiu tr.memo td { color: var(--accent); }
.report a.amt { color: inherit; border-bottom: 1px dotted var(--line-strong); }
.report a.amt:hover { color: var(--accent); border-bottom-color: var(--accent); text-decoration: none; }

/* ---------- directions report ---------- */
.dir-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px; margin: 14px 0 22px; }
.dir-cards .card { background: var(--panel); border-radius: 10px; padding: 18px 20px; box-shadow: var(--shadow); border-top: 4px solid var(--accent); }
.dir-cards .dir-hair { border-top-color: #2f7bf5; } .dir-cards .dir-face { border-top-color: #d6409f; } .dir-cards .dir-clothes { border-top-color: #1f9d55; }
.dir-cards .label { font-size: 12px; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); }
.dir-cards .value { font-size: 26px; font-weight: 700; margin: 6px 0 10px; }
.dir-kpis { display: flex; gap: 14px; flex-wrap: wrap; font-size: 13px; color: var(--muted); }
.dir-kpis b { color: var(--ink); font-size: 15px; }
.report tr.strong td { font-weight: 600; }
b.neg { color: var(--neg-strong); }

/* ---------- home control panel ---------- */
.cockpit { position: relative; overflow: hidden; border-radius: 16px; padding: 22px 24px 18px; margin-bottom: 16px; color: #e8ecf3;
  background: radial-gradient(1200px 300px at 10% -40%, rgba(76,141,255,.35), transparent 60%),
              radial-gradient(800px 260px at 100% 0%, rgba(47,212,127,.18), transparent 60%), #0f141b;
  box-shadow: 0 10px 30px rgba(10, 20, 40, .18); }
.cockpit::after { content: ""; position: absolute; inset: 0; pointer-events: none; opacity: .07;
  background-image: linear-gradient(rgba(255,255,255,.6) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.6) 1px, transparent 1px);
  background-size: 28px 28px; }
.cp-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; flex-wrap: wrap; position: relative; z-index: 1; }
.cp-brand { font-size: 13px; letter-spacing: .22em; font-weight: 700; color: #fff; }
.cp-brand span { color: #7f8ba0; font-weight: 500; }
.cp-sub { color: #9aa6b8; font-size: 13px; margin-top: 4px; }
.cp-sub b { color: #fff; }
.cp-pre { color: #f5a623; }
.cp-status { display: flex; align-items: center; gap: 8px; font-size: 13px; color: #c8d0dc; background: rgba(255,255,255,.06);
  padding: 6px 12px; border-radius: 999px; border: 1px solid rgba(255,255,255,.08); }
.cp-clock { color: #7f8ba0; font-variant-numeric: tabular-nums; margin-left: 6px; }
.cp-led { display: inline-block; width: 9px; height: 9px; border-radius: 50%; margin-right: 6px; vertical-align: middle; background: #8a919c; }
.cp-led.ok { background: #2fd47f; box-shadow: 0 0 8px #2fd47f; }
.cp-led.warn { background: #f5a623; box-shadow: 0 0 8px #f5a623; }
.cp-led.bad { background: #ff4d5e; box-shadow: 0 0 8px #ff4d5e; animation: cp-pulse 1.6s infinite; }
.cp-led.info { background: #4c8dff; }
@keyframes cp-pulse { 50% { opacity: .35; } }
.cp-kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 12px; margin-top: 18px; position: relative; z-index: 1; }
.cp-kpi { background: rgba(255,255,255,.045); border: 1px solid rgba(255,255,255,.07); border-radius: 12px; padding: 14px 16px 8px; }
.cp-label { font-size: 11px; text-transform: uppercase; letter-spacing: .08em; color: #8f9bb0; }
.cp-value { font-size: 24px; font-weight: 700; color: #fff; margin: 4px 0 2px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.cp-value.neg { color: #ff6b78; }
.cp-meta { font-size: 12px; display: flex; gap: 8px; flex-wrap: wrap; min-height: 18px; }
.cp-share { color: #8f9bb0; }
.cp-delta.up { color: #2fd47f; } .cp-delta.down { color: #ff6b78; }
.cp-spark { width: 100%; height: 34px; margin-top: 4px; }
.cp-spark polyline { fill: none; stroke: #4c8dff; stroke-width: 2; vector-effect: non-scaling-stroke; }
.cp-mini { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 12px; margin-top: 12px; position: relative; z-index: 1; }
.cp-mini > div { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; font-size: 12px; color: #8f9bb0; padding: 8px 2px; border-top: 1px solid rgba(255,255,255,.07); }
.cp-mini b { color: #fff; font-size: 16px; font-variant-numeric: tabular-nums; }
.cp-mini b.warn { color: #f5a623; }
.cp-alerts { display: grid; gap: 8px; margin-bottom: 16px; }
.cp-alert { background: var(--panel); border-radius: 10px; padding: 10px 14px; box-shadow: var(--shadow); font-size: 14px; border-left: 4px solid #4c8dff; }
.cp-alert.warn { border-left-color: #f5a623; } .cp-alert.bad { border-left-color: #ff4d5e; }
.cp-alert a { margin-left: 8px; }
.cp-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.cp-grid .span2 { grid-column: span 2; }
@media (max-width: 1100px) { .cp-grid { grid-template-columns: 1fr; } .cp-grid .span2 { grid-column: auto; } }
.cp-panel { margin: 0; }
.cp-title { font-weight: 700; margin-bottom: 12px; display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.cp-title a { font-weight: 400; font-size: 13px; }
.cp-mix { display: flex; height: 10px; border-radius: 6px; overflow: hidden; margin-bottom: 14px; }
.cp-dirs { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 14px; }
.cp-dir { border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; }
.cp-dir-name { font-weight: 600; }
.cp-dir-name i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 6px; }
.cp-dir-rev { font-size: 20px; font-weight: 700; margin: 4px 0 8px; font-variant-numeric: tabular-nums; }
.cp-rings { display: flex; justify-content: space-between; gap: 6px; }
.cp-rings > div { text-align: center; font-size: 11px; color: var(--muted); }
.cp-ring { width: 58px; height: 58px; display: block; margin: 0 auto 2px; }
.cp-ring .bg { fill: none; stroke: var(--line); stroke-width: 3.2; }
.cp-ring .fg { fill: none; stroke-width: 3.2; stroke-linecap: round; transform: rotate(-90deg); transform-origin: 50% 50%; }
.cp-ring text { font-size: 8.5px; font-weight: 700; fill: var(--ink); }
.cp-bar { margin-bottom: 12px; }
.cp-bar-top { display: flex; justify-content: space-between; gap: 8px; font-size: 14px; margin-bottom: 4px; }
.cp-track { height: 8px; background: var(--seg); border-radius: 5px; overflow: hidden; }
.cp-track > div { height: 100%; background: var(--accent); border-radius: 5px; }
.cp-rank { display: inline-grid; place-items: center; width: 20px; height: 20px; border-radius: 6px; background: var(--chip); font-size: 11px; font-weight: 700; margin-right: 6px; }
.cp-chart { width: 100%; height: 230px; }
.cp-chart .axis { stroke: var(--line-strong); }
.cp-chart .rev { fill: var(--accent); opacity: .22; } .cp-chart .rev:hover { opacity: .45; }
.cp-chart .np { fill: none; stroke: #1f9d55; stroke-width: 3; vector-effect: non-scaling-stroke; }
.cp-chart .eb { fill: none; stroke: #f5a623; stroke-width: 2; stroke-dasharray: 6 5; vector-effect: non-scaling-stroke; }
.cp-chart .np-dot { fill: #1f9d55; }
.cp-chart .lbl { font-size: 13px; fill: var(--muted); }
.lg { display: inline-block; width: 12px; height: 4px; border-radius: 2px; margin: 0 4px 2px 10px; vertical-align: middle; }
.lg.rev { background: var(--accent); opacity: .5; } .lg.eb { background: #f5a623; } .lg.np { background: #1f9d55; }
.cp-co { display: flex; justify-content: space-between; font-weight: 600; margin: 10px 0 4px; }
.cp-acc { display: flex; justify-content: space-between; gap: 8px; font-size: 13px; padding: 3px 0; border-bottom: 1px dashed var(--line); }
.cp-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.cp-actions a { display: block; padding: 10px 12px; border-radius: 10px; background: var(--seg); color: var(--ink); font-size: 14px; }
.cp-actions a:hover { background: var(--accent-soft); text-decoration: none; }

.cp-nav { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.cp-nav select { background: rgba(255,255,255,.08); color: #fff; border: 1px solid rgba(255,255,255,.15); border-radius: 8px;
  padding: 4px 8px; font-weight: 700; font-size: 14px; }
.cp-nav select option { color: #111; }
.cp-step { display: inline-grid; place-items: center; width: 28px; height: 28px; border-radius: 8px; background: rgba(255,255,255,.08);
  color: #fff; font-size: 18px; text-decoration: none; }
.cp-step:hover { background: rgba(255,255,255,.18); text-decoration: none; }
.cp-step.off { opacity: .25; pointer-events: none; }
.cp-latest { color: #8fb6ff; margin-left: 6px; }

.cp-health { display: grid; gap: 0; }
.cp-hrow { display: grid; grid-template-columns: 16px minmax(0, 1fr) auto 52px; align-items: center; gap: 8px;
  padding: 7px 0; border-bottom: 1px dashed var(--line); font-size: 14px; }
.cp-hrow .cp-led { margin: 0; }
.cp-hname { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cp-hdate { font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap; }
.cp-hdate.warn { color: #c98a12; } .cp-hdate.bad { color: var(--neg-strong); }
.cp-hdays { color: var(--muted); font-size: 12px; text-align: right; white-space: nowrap; }

/* ---------- control ---------- */
.ctl-chip { display: inline-block; padding: 4px 10px; border-radius: 999px; font-size: 13px; font-weight: 600; }
.ctl-chip.bad { background: var(--badge-bg); color: var(--neg-strong); }
.ctl-chip.warn { background: var(--warn-bg); color: #b07612; }
.ctl-chip.info { background: var(--chip); color: var(--chip-ink); }
.ctl-sec { margin-bottom: 12px; }
.ctl-sec > summary { cursor: pointer; display: flex; align-items: center; gap: 8px; list-style: none; }
.ctl-sec > summary::-webkit-details-marker { display: none; }
.ctl-sec[open] > summary { margin-bottom: 10px; }
.report.ctl td { vertical-align: top; font-size: 14px; }
.report.ctl tr.ctl-info td { color: var(--muted); }
.nowrap { white-space: nowrap; }

/* ---------- team: list, card, schedule, leave ---------- */
.staff-top { display: grid; grid-template-columns: 2fr 1fr; gap: 18px; }
@media (max-width: 1000px) { .staff-top { grid-template-columns: 1fr; } }
.stack { display: flex; flex-direction: column; gap: 10px; }
.filters .grow, .week-nav .grow { flex: 1; }
.staff-table tr.sec td { background: var(--sub); font-weight: 700; font-size: 13px; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); padding: 8px 18px; }
.due { white-space: nowrap; }
.due.bad { color: var(--neg-strong); font-weight: 600; }
.due.warn { color: #c77700; font-weight: 600; }
.due.info { color: var(--accent); }
.score { display: inline-block; min-width: 34px; text-align: center; padding: 2px 8px; border-radius: 10px; font-weight: 700; font-size: 13px; background: var(--chip); }
.score.s5, .score.s4 { background: var(--ok-bg); color: var(--pos); }
.score.s3 { background: var(--warn-bg); color: #c77700; }
.score.s2, .score.s1 { background: var(--badge-bg); color: var(--badge-ink); }
.small-btn { padding: 3px 10px; font-size: 13px; font-weight: 400; }

.rem-list { list-style: none; margin: 0; padding: 0; }
.rem { display: flex; align-items: center; gap: 12px; padding: 9px 0; border-bottom: 1px solid var(--line); }
.rem:last-child { border-bottom: 0; }
.rem .dot { width: 9px; height: 9px; border-radius: 50%; background: var(--muted); flex: none; }
.rem.bad .dot { background: var(--neg-strong); } .rem.warn .dot { background: #f0a020; } .rem.info .dot { background: var(--accent); }
.rem-when { width: 150px; flex: none; font-size: 13px; }
.rem-when small { color: var(--muted); display: block; }
.rem-text { flex: 1; }
.rem-act { margin: 0; display: flex; gap: 6px; }
.rem.done .rem-text { text-decoration: line-through; color: var(--muted); }

.emp-head { display: flex; gap: 18px; align-items: center; }
.emp-avatar { width: 56px; height: 56px; border-radius: 50%; background: var(--accent-soft); color: var(--accent); display: grid; place-items: center; font-size: 24px; font-weight: 700; flex: none; }
.emp-main { flex: 1; }
.emp-name { font-size: 20px; font-weight: 700; }
.emp-meta { display: flex; flex-wrap: wrap; gap: 6px 16px; color: var(--muted); font-size: 14px; margin-top: 4px; }
.card-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
@media (max-width: 1000px) { .card-grid { grid-template-columns: 1fr; } }
.kv { display: grid; grid-template-columns: 170px 1fr; gap: 8px 14px; margin: 0; }
.kv dt { color: var(--muted); } .kv dd { margin: 0; }
.stat-row { display: flex; gap: 14px; padding: 6px 0; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.table-wrap.flat { box-shadow: none; margin-bottom: 14px; }
.inline-form { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.inline-form label { display: inline-flex; align-items: center; gap: 6px; }
.lv-st { font-size: 13px; padding: 2px 9px; border-radius: 10px; background: var(--chip); }
.lv-st.requested { background: var(--warn-bg); color: #c77700; }
.lv-st.approved { background: var(--ok-bg); color: var(--pos); }
.lv-act { display: inline-flex; gap: 6px; margin: 0; }
tr.muted td { color: var(--muted); }
.review { border-bottom: 1px solid var(--line); padding: 10px 0; }
.review-head { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.review-head .push { margin: 0 0 0 auto; }
.crit { display: flex; flex-wrap: wrap; gap: 4px 18px; font-size: 13px; color: var(--muted); margin-top: 4px; }
.crit b { color: var(--ink); }
.crit-form { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 6px 24px; margin: 12px 0; }
.crit-q { display: flex; justify-content: space-between; align-items: center; }
.stars { display: inline-flex; flex-direction: row-reverse; }
.stars input { display: none; }
.stars label { font-size: 24px; color: var(--line-strong); cursor: pointer; padding: 0 2px; }
.stars input:checked ~ label, .stars label:hover, .stars label:hover ~ label { color: #f5b301; }

/* schedule grid: colours follow the old Google sheet */
.week-nav { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 12px; }
.week-nav b { font-size: 16px; min-width: 150px; text-align: center; }
table.sched th, table.sched td { padding: 0; height: 34px; text-align: center; border: 1px solid var(--line); font-size: 13.5px; }
table.sched th { height: 40px; }
table.sched th.today { color: var(--accent); }
table.sched .sc-name { text-align: left; padding: 0 12px; white-space: nowrap; min-width: 170px; position: sticky; left: 0; background: var(--panel); z-index: 1; }
table.sched td.num { padding: 0 10px; color: var(--muted); }
table.sched .sc-note { min-width: 200px; text-align: left; }
table.sched .wk-note { border: 0; background: transparent; width: 100%; padding: 6px 10px; font-size: 13px; }
table.sched tr.sc-sec td { background: var(--total); font-weight: 700; text-align: left; padding: 8px 12px; letter-spacing: .03em; text-transform: uppercase; font-size: 13px; }
table.sched tr.sc-total td { font-weight: 700; background: var(--sub); }
table.sched tr.sc-total td.low { color: var(--neg-strong); }
table.sched tr.visitor .sc-name a { color: var(--muted); }
table.sched td.sc { min-width: 96px; cursor: pointer; font-weight: 500; position: relative; }
table.sched td.sc:hover { outline: 2px solid var(--accent); outline-offset: -2px; }
tr:hover td.sc { filter: brightness(.97); }
.sc.work, .code.work { background: #c9f2c9; color: #155d27; }
.sc.off, .code.off { background: #ffd6d6; color: #b3261e; }
.sc.train, .code.train { background: #fff1a8; color: #6b5600; }
.sc.leave, .code.leave { background: #e7dcff; color: #5b3cc4; }
.sc.leave.req { background: repeating-linear-gradient(45deg, #efe8ff, #efe8ff 6px, #fff 6px, #fff 12px); }
.sc.g, .code.g { background: #d5e0ff; color: #23408f; }
.sc.a1, .code.a1 { background: #c9f2c9; color: #155d27; }
.sc.a2, .code.a2 { background: #c6f1f7; color: #0d5c69; }
.sc.a3, .code.a3 { background: #fff1a8; color: #6b5600; }
.sc.a4, .code.a4 { background: #ffd9e1; color: #8a2843; }
.sc.away { background: var(--sub) !important; color: var(--muted) !important; font-weight: 400; font-size: 12.5px; }
.sc.elsewhere { background: repeating-linear-gradient(45deg, transparent, transparent 5px, var(--line) 5px, var(--line) 6px); }
.sc.clash { box-shadow: inset 0 0 0 2px var(--neg-strong); }
.sc .has-note { position: absolute; top: 3px; right: 3px; width: 0; height: 0; border-left: 7px solid transparent; border-top: 7px solid currentColor; opacity: .6; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .sc.work, :root:not([data-theme="light"]) .sc.a1 { background: #1d4024; color: #9be3a8; }
  :root:not([data-theme="light"]) .sc.off { background: #4a1f22; color: #ff9b9b; }
  :root:not([data-theme="light"]) .sc.train, :root:not([data-theme="light"]) .sc.a3 { background: #4a4214; color: #f5e27a; }
  :root:not([data-theme="light"]) .sc.leave { background: #33285a; color: #c8b6ff; }
  :root:not([data-theme="light"]) .sc.g { background: #22305a; color: #b2c6ff; }
  :root:not([data-theme="light"]) .sc.a2 { background: #173f46; color: #8fe3ef; }
  :root:not([data-theme="light"]) .sc.a4 { background: #4a2230; color: #ffb3c4; }
}
.sc-pop { position: absolute; z-index: 50; width: 300px; background: var(--panel); border: 1px solid var(--line-strong); border-radius: 10px;
  box-shadow: 0 10px 30px rgba(10, 20, 40, .18); padding: 14px; display: flex; flex-direction: column; gap: 10px; }
.sc-pop[hidden] { display: none; }
.sc-pop label { display: flex; flex-direction: column; gap: 4px; }
.pop-title { font-weight: 700; }
.pop-codes { display: flex; flex-wrap: wrap; gap: 6px; }
.pop-codes .code { border: 0; padding: 7px 12px; font-weight: 600; min-width: 46px; }
.pop-codes .code:hover { filter: brightness(.95); }
.pop-actions { display: flex; gap: 8px; }

.legend { display: inline-flex; gap: 6px 10px; align-items: center; font-size: 13px; color: var(--muted); flex-wrap: wrap; }
.legend .lg { display: inline-block; width: 14px; height: 14px; border-radius: 3px; margin-left: 8px; }
table.leave-cal th, table.leave-cal td { padding: 0; text-align: center; min-width: 30px; height: 34px; border: 1px solid var(--line); font-size: 12.5px; }
table.leave-cal th small { display: block; font-size: 10px; text-transform: none; }
table.leave-cal td:first-child, table.leave-cal th:first-child { text-align: left; padding: 0 12px; min-width: 190px; white-space: nowrap; position: sticky; left: 0; background: var(--panel); z-index: 1; }
table.leave-cal .we { background: var(--sub); }
table.leave-cal th.today { color: var(--accent); }
.lc.vacation, .lg.vacation { background: #b9a4ff !important; }
.lc.sick, .lg.sick { background: #ffb0b0 !important; }
.lc.dayoff, .lg.dayoff { background: #ffd98a !important; }
.lc.req, .lg.req { background: repeating-linear-gradient(45deg, #d9ccff, #d9ccff 4px, transparent 4px, transparent 8px) !important; }

@media print {
  .side, .topbar, .tabs-row, .no-print, .hint, .flash { display: none !important; }
  .page { margin: 0; } main { padding: 0; }
  .table-wrap { box-shadow: none; border: 0; overflow: visible; }
  table.sched td.sc, table.sched th { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  table.sched .wk-note { font-size: 11px; }
}

/* ---------- employee's own page (/me/<token>), phone first ---------- */
body.me { background: var(--bg); }
.me-wrap { max-width: 560px; margin: 0 auto; padding: 16px 16px 40px; }
.me-head { display: flex; align-items: center; gap: 14px; margin: 6px 0 16px; }
.me-logo { width: 44px; height: 44px; border-radius: 12px; background: var(--accent); color: #fff; display: grid; place-items: center; font-weight: 700; }
.me-hi { font-size: 20px; font-weight: 700; }
.me-card { background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 16px; margin-bottom: 14px; box-shadow: var(--shadow); }
.me-card h2 { margin: 0 0 10px; font-size: 17px; display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.me-day { display: flex; gap: 12px; align-items: flex-start; padding: 10px 0; border-bottom: 1px solid var(--line); }
.me-day:last-child { border-bottom: 0; }
.me-day.today { background: var(--accent-soft); margin: 0 -16px; padding: 10px 16px; }
.me-date { width: 76px; flex: none; }
.me-now { display: block; font-size: 11px; color: var(--accent); text-transform: uppercase; letter-spacing: .05em; }
.me-what { flex: 1; display: flex; flex-wrap: wrap; gap: 6px 10px; align-items: center; }
.me-what .small { flex-basis: 100%; }
.me-pill { display: inline-block; padding: 4px 12px; border-radius: 14px; font-size: 14px; font-weight: 600; }
.me-leave { display: flex; justify-content: space-between; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--line); align-items: center; }
.me-leave-r { display: flex; gap: 8px; align-items: center; flex: none; }
.me-leave-r form { margin: 0; }
.me-form { display: flex; flex-direction: column; gap: 12px; }
.me-form label { display: flex; flex-direction: column; gap: 4px; font-size: 13px; color: var(--muted); }
.me-form input, .me-form select, .me-form textarea { font-size: 16px; width: 100%; }
.me-two { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.me-form button { padding: 12px; font-size: 16px; }
.access-link { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.access-link input { flex: 1; min-width: 260px; font-size: 13px; }
/* staff portal frame */
.pt-bar { background: var(--panel); border-bottom: 1px solid var(--line); display: flex; align-items: center; gap: 18px; padding: 10px 16px; flex-wrap: wrap; position: sticky; top: 0; z-index: 20; }
.pt-brand { display: flex; align-items: center; gap: 10px; font-size: 15px; }
.pt-brand .me-logo { width: 34px; height: 34px; border-radius: 9px; font-size: 14px; }
.pt-bar .grow { flex: 1; }
.pt-user { display: flex; gap: 10px; align-items: center; font-size: 14px; }
.pt-user form { margin: 0; }
.pt-wide { padding: 16px; max-width: 1500px; margin: 0 auto; }
.pt-login { max-width: 400px; margin: 10vh auto 0; }
.sc-team { margin: 22px 0 10px; }
@media print { .pt-bar { display: none !important; } }
/* employee panel: next shift, jump links, contract, balances, forms */
.me-next { display: flex; justify-content: space-between; gap: 12px; align-items: center; background: var(--accent-soft); border-radius: 14px; padding: 14px 16px; margin-bottom: 12px; }
.me-next .small { text-align: right; }
.me-jump { display: flex; gap: 6px; overflow-x: auto; margin: 0 -16px 14px; padding: 0 16px 4px; }
.me-jump a { white-space: nowrap; background: var(--panel); border: 1px solid var(--line); border-radius: 16px; padding: 6px 12px; font-size: 13px; color: var(--ink); }
.me-jump a.sick { color: var(--neg-strong); border-color: #f3c4c6; }
.me-jump a:hover { text-decoration: none; }
.me-kv { grid-template-columns: 120px 1fr; margin-bottom: 10px; }
.me-doc { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 10px 0; border-top: 1px solid var(--line); }
.doc-st { font-size: 12.5px; padding: 3px 10px; border-radius: 12px; white-space: nowrap; background: var(--ok-bg); color: var(--pos); }
.doc-st.warn, .doc-st.info { background: var(--warn-bg); color: #c77700; }
.doc-st.bad { background: var(--badge-bg); color: var(--badge-ink); }
.me-tiles { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.me-tile { background: var(--sub); border-radius: 12px; padding: 12px 14px; }
.me-big { font-size: 30px; font-weight: 700; line-height: 1.2; }
.me-big small { font-size: 15px; color: var(--muted); font-weight: 500; }
.me-seg { display: flex; flex-wrap: wrap; gap: 6px; }
.me-seg label { flex-direction: row !important; align-items: center; gap: 6px !important; background: var(--sub); border-radius: 10px; padding: 8px 12px; color: var(--ink) !important; font-size: 14px !important; cursor: pointer; }
.me-seg label:has(input:checked) { background: var(--accent-soft); color: var(--accent) !important; }
.me-seg label:has(input:disabled) { opacity: .45; cursor: default; }
.me-form input[type=radio] { width: auto; }
.me-sick { border-color: #f3c4c6; }
.danger-btn { background: var(--neg-strong); border-color: var(--neg-strong); }
.me-answer { color: var(--accent); margin-top: 2px; }
.acc { color: var(--line-strong); } .acc.on { color: var(--pos); }
.acc-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px 18px; margin: 10px 0 14px; }
.lang-switch { display: inline-flex; border: 1px solid var(--line-strong); border-radius: 18px; overflow: hidden; background: var(--panel); flex: none; }
.lang-switch a { padding: 5px 11px; font-size: 12.5px; font-weight: 700; color: var(--muted); letter-spacing: .04em; }
.lang-switch a.on { background: var(--accent); color: #fff; }
.lang-switch a:hover { text-decoration: none; color: var(--ink); }
.lang-switch a.on:hover { color: #fff; }

/* =====================================================================
   Team site — design system of rasagayastudios.com
   dark base, lowercase Helvetica Neue, bold tight titles, pill buttons,
   glass surfaces, orange #F26522 / mauve #C4A8B8 / blue #8FA8B8
   ===================================================================== */
body.team {
  --rg-orange: #F26522; --rg-mauve: #C4A8B8; --rg-blue: #8FA8B8; --rg-off: #F5EEF0; --rg-sand: #c8b89a; --rg-dark: #0d0d0d;
  --bg: #F5EEF0; --panel: #ffffff; --ink: #0d0d0d; --muted: #8a7c82; --line: #ece2e6; --line-strong: #dfd2d7;
  --accent: var(--rg-orange); --accent-ink: #fff; --accent-soft: #fde6da;
  --side: #ffffff; --side-active: #F5EEF0; --side-ink: #7a6d73;
  --chip: #f3eaed; --chip-ink: #50414a; --seg: #f7f1f3; --seg-active: #efe4e8;
  --pos: #1f8a4c; --neg: #0d0d0d; --neg-strong: #d9472b; --badge-bg: #fde3dc; --badge-ink: #d9472b;
  --warn-bg: #fff0dc; --ok-bg: #e5f3e9; --row-hover: #fbf7f8; --sub: #faf6f7; --total: #f5eef0;
  --glass: rgba(255, 255, 255, .72); --glass-line: rgba(80, 50, 65, .14);
  --shadow: 0 1px 2px rgba(80, 50, 65, .04);
  background: var(--bg); color: var(--ink);
  font-family: "Helvetica Neue", Helvetica, Arial, sans-serif; text-transform: lowercase;
  -webkit-font-smoothing: antialiased;
}
body.team input, body.team textarea, body.team select, body.team code, body.team .num, body.team .keep-case { text-transform: none; }
body.team ::placeholder { text-transform: lowercase; color: #b3a6ab; }
body.team a { color: var(--ink); }
body.team a:hover { color: var(--rg-orange); text-decoration: none; }

/* type */
body.team h1, body.team .topbar h1 { font-weight: 700; letter-spacing: -.025em; }
body.team h2 { font-size: 18px; font-weight: 700; letter-spacing: -.01em; }
body.team .muted, body.team .hint { color: var(--muted); }
body.team th { color: var(--muted); font-size: 11px; font-weight: 400; letter-spacing: .08em; text-transform: lowercase; background: var(--panel); }
body.team .small { font-size: 12.5px; }

/* surfaces */
body.team .panel, body.team .table-wrap, body.team .me-card { background: var(--panel); border: 1px solid var(--line); border-radius: 18px; box-shadow: none; }
body.team .table-wrap.flat { border-radius: 14px; }
body.team th, body.team td { border-bottom-color: var(--line); }
body.team .topbar { background: rgba(245, 238, 240, .82); backdrop-filter: blur(22px); -webkit-backdrop-filter: blur(22px); border-bottom: 1px solid var(--line); }
body.team .side { background: var(--side); border-right: 1px solid var(--line); }
body.team .side a.nav { border-radius: 14px; }
body.team .side a.nav.active { background: var(--side-active); color: var(--ink); box-shadow: none; }
body.team .side a.nav:hover { color: var(--ink); }
body.team .side a.nav.active svg { color: var(--rg-orange); }
body.team .side .logo { width: 58px; height: 58px; padding: 0; background: none; border-radius: 50%; margin-bottom: 30px; }
body.team .side .logo img { width: 58px; height: 58px; display: block; }
body.team .side .badge { background: var(--rg-orange); }
body.team .flash { border-radius: 14px; border: 1px solid var(--line); }
body.team .flash.ok { background: var(--ok-bg); } body.team .flash.warn { background: var(--warn-bg); }

/* controls: pills */
body.team input, body.team select, body.team textarea { background: #fff; border: 1px solid var(--line-strong); border-radius: 12px; color: var(--ink); }
body.team input:focus, body.team select:focus, body.team textarea:focus { border-color: var(--rg-orange); outline: 2px solid rgba(242, 101, 34, .25); }
body.team input[type=date] { color-scheme: light; }
body.team button, body.team .btn { background: var(--rg-orange); border: 0; color: #fff; border-radius: 50px; padding: 10px 22px; font-weight: 700; font-size: 13px; letter-spacing: 0; transition: opacity .2s, transform .15s; }
body.team button:hover, body.team .btn:hover { opacity: .88; filter: none; }
body.team button:active, body.team .btn:active { transform: scale(.97); }
body.team button.secondary, body.team .btn.secondary { background: #fff; border: 1px solid var(--line-strong); color: var(--ink); font-weight: 400; backdrop-filter: blur(22px); -webkit-backdrop-filter: blur(22px); }
body.team button.secondary:hover, body.team .btn.secondary:hover { background: var(--seg); opacity: 1; }
body.team button.danger { background: transparent; border: 1px solid #f1c3b8; color: var(--neg-strong); font-weight: 400; }
body.team .small-btn { padding: 5px 13px; font-size: 12px; }
body.team .tabs { border: 1px solid var(--line-strong); border-radius: 50px; background: var(--panel); padding: 3px; gap: 2px; }
body.team .tabs a { border: 0; border-radius: 50px; padding: 8px 18px; color: var(--muted); }
body.team .tabs a:hover { background: var(--seg); color: var(--ink); }
body.team .tabs a.on { background: var(--rg-orange); color: #fff; }
body.team .filters label { background: var(--chip); border-radius: 50px; }
body.team .filters label select, body.team .filters label input { background: transparent; border: 0; }
body.team .tag { background: transparent; border: 1.5px solid rgba(120, 80, 100, .25); color: rgba(80, 50, 65, .75); border-radius: 50px; letter-spacing: .04em; }
body.team .tag.warn { border-color: rgba(217, 71, 43, .35); color: var(--neg-strong); }
body.team .lang-switch { border: 1px solid var(--glass-line); background: var(--glass); backdrop-filter: blur(22px); -webkit-backdrop-filter: blur(22px); border-radius: 50px; padding: 3px; gap: 2px; }
body.team .lang-switch a { border-radius: 50px; color: var(--muted); text-transform: lowercase; letter-spacing: .02em; padding: 5px 12px; }
body.team .lang-switch a.on { background: var(--rg-orange); color: #fff; }
.team-badge { background: var(--glass); border: 1px solid var(--glass-line); color: var(--ink); border-radius: 50px; padding: 7px 14px; font-size: 12px; font-weight: 700; white-space: nowrap; }

/* statuses */
body.team .lv-st { border-radius: 50px; background: var(--chip); }
body.team .lv-st.requested { background: var(--warn-bg); color: #b86a12; }
body.team .lv-st.approved { background: var(--ok-bg); color: var(--pos); }
body.team .due.warn { color: #c77700; } body.team .due.info { color: var(--rg-blue); } body.team .due.bad { color: var(--neg-strong); }
body.team .score { background: var(--chip); }
body.team .doc-st { background: var(--ok-bg); color: var(--pos); }
body.team .doc-st.warn, body.team .doc-st.info { background: var(--warn-bg); color: #b86a12; }
body.team .doc-st.bad { background: var(--badge-bg); color: var(--badge-ink); }
body.team .acc.on { color: var(--pos); }
body.team .rem.info .dot { background: var(--rg-blue); } body.team .rem.warn .dot { background: #f0a020; } body.team .rem.bad .dot { background: var(--neg-strong); }

/* schedule cells: the light palette of the base styles */
body.team .sc.away { background: var(--sub) !important; color: var(--muted) !important; }
body.team .sc-pop { background: rgba(255, 255, 255, .97); border: 1px solid var(--glass-line); border-radius: 20px; backdrop-filter: blur(24px); -webkit-backdrop-filter: blur(24px); }
body.team .pop-codes .code { border-radius: 12px; }
body.team table.sched tr.sc-sec td, body.team .staff-table tr.sec td { background: var(--sub); color: var(--muted); font-weight: 700; letter-spacing: .08em; }

/* employee panel */
body.team .pt-bar { background: rgba(245, 238, 240, .82); backdrop-filter: blur(22px); -webkit-backdrop-filter: blur(22px); border-bottom: 1px solid var(--line); }
body.team .pt-brand { font-weight: 700; letter-spacing: -.01em; font-size: 15px; text-transform: lowercase; }
body.team .pt-brand b { color: var(--rg-orange); font-weight: 700; }
body.team .me-logo { display: none; }
body.team .me-hi { font-size: 28px; font-weight: 700; letter-spacing: -.025em; }
body.team .me-next { background: rgba(13, 13, 13, .92); border: 1px solid rgba(255, 255, 255, .08); border-radius: 22px; color: #fff; backdrop-filter: blur(22px); -webkit-backdrop-filter: blur(22px); }
body.team .me-next .muted { color: rgba(255, 255, 255, .55); }
body.team .me-next b { font-size: 15px; }
body.team .me-day.today { background: var(--accent-soft); }
body.team .me-now { color: var(--rg-orange); }
body.team .me-jump a { background: #fff; border: 1px solid var(--line-strong); color: var(--ink); border-radius: 50px; }
body.team .me-jump a.sick { color: var(--neg-strong); border-color: #f1c3b8; }
body.team .me-tile { background: var(--sub); border-radius: 14px; }
body.team .me-seg label { background: var(--sub); border-radius: 50px; color: var(--muted) !important; }
body.team .me-seg label:has(input:checked) { background: var(--rg-orange); color: #fff !important; }
body.team .me-form button { padding: 14px; font-size: 14px; }
body.team .me-sick { border-color: #f1c3b8; }
body.team .danger-btn { background: transparent; border: 1.5px solid var(--neg-strong); color: var(--neg-strong); }
body.team .me-answer { color: var(--rg-blue); }

/* ---------- login: the site's hero — big bold title, glass card, orange pill ---------- */
.lx-wrap { padding: 0; max-width: none; }
.lx { --glass: rgba(40, 25, 32, .55); --glass-line: rgba(255, 255, 255, .1); color: #fff; position: relative; min-height: 100vh; min-height: 100dvh; overflow: hidden; display: flex; flex-direction: column;
  background: radial-gradient(900px 600px at 85% 10%, rgba(196, 168, 184, .28), transparent 60%),
              radial-gradient(800px 600px at 10% 100%, rgba(242, 101, 34, .22), transparent 60%), #0d0b09; }
.lx-nav { display: flex; justify-content: space-between; align-items: center; padding: 16px 24px; position: relative; z-index: 2; }
.lx-logo { font-size: 15px; font-weight: 700; color: #fff; background: var(--glass); border: 1px solid var(--glass-line); border-radius: 50px;
  padding: 13px 22px; backdrop-filter: blur(22px); -webkit-backdrop-filter: blur(22px); }
.lx-hero { flex: 1; display: grid; grid-template-columns: 1.2fr minmax(320px, 420px); gap: 48px; align-items: end; padding: 24px 52px 64px; position: relative; z-index: 2; }
.lx-eyebrow { font-size: 11px; letter-spacing: .08em; color: rgba(255, 255, 255, .5); margin-bottom: 14px; }
.lx-title { margin: 0; font-size: clamp(52px, 8.5vw, 108px); font-weight: 700; letter-spacing: -.025em; line-height: .93; color: #fff; }
.lx-title span { display: block; padding-left: .9em; }
.lx-sub { font-size: 14px; letter-spacing: .08em; color: rgba(255, 255, 255, .55); margin-top: 20px; }
.lx-card { background: var(--glass); border: 1px solid var(--glass-line); border-radius: 22px; padding: 26px 28px;
  backdrop-filter: blur(22px); -webkit-backdrop-filter: blur(22px); }
.lx-card-title { font-size: 15px; font-weight: 700; letter-spacing: -.01em; margin: 0 0 18px; }
.lx-form { display: flex; flex-direction: column; gap: 12px; }
.lx-field { display: flex; flex-direction: column; gap: 6px; font-size: 11px; letter-spacing: .08em; color: rgba(255, 255, 255, .5); }
body.team .lx-field input { background: rgba(255, 255, 255, .06); border: 1px solid rgba(255, 255, 255, .12); border-radius: 14px; padding: 13px 14px; font-size: 16px; color: #fff; }
body.team .lx-field input:focus { border-color: var(--rg-orange); outline: none; background: rgba(255, 255, 255, .09); }
.lx-field input:-webkit-autofill { -webkit-box-shadow: 0 0 0 40px #2a1d22 inset; -webkit-text-fill-color: #fff; }
body.team .lx-btn { margin-top: 6px; border-radius: 14px; padding: 14px 34px; font-size: 13px; font-weight: 700; }
.lx-error { background: rgba(242, 101, 34, .15); border: 1px solid rgba(242, 101, 34, .4); color: #ffb08a; border-radius: 12px; padding: 10px 12px; font-size: 13px; margin-bottom: 12px; }
.lx-help { font-size: 12px; color: rgba(255, 255, 255, .45); margin: 14px 0 0; line-height: 1.5; }
.lx-foot { display: flex; justify-content: space-between; gap: 16px; padding: 22px 52px; border-top: 1px solid rgba(255, 255, 255, .1);
  font-size: 11px; letter-spacing: .08em; color: rgba(255, 255, 255, .4); position: relative; z-index: 2; }
@media (max-width: 860px) {
  .lx-nav { padding: 10px 14px; }
  .lx-logo { font-size: 12px; padding: 10px 14px; }
  .lx-hero { grid-template-columns: 1fr; gap: 28px; padding: 28px 16px 28px; align-items: start; }
  .lx-title { font-size: clamp(48px, 15vw, 72px); }
  .lx-card { padding: 20px 18px; }
  .lx-foot { padding: 16px; flex-direction: column; gap: 4px; }
}
/* lowercase everywhere, like the site (buttons and old uppercase labels included) */
body.team button, body.team .btn, body.team th.num, body.team .me-now, body.team table.sched tr.sc-sec td,
body.team .staff-table tr.sec td, body.team .team-badge, body.team .kpi .label { text-transform: lowercase; }
body.team .lx .lang-switch a { color: rgba(255, 255, 255, .6); }
body.team .lx .lang-switch a.on { color: #fff; }
body.team .lx a { color: #fff; }
body.team:has(.lx) { background: #0d0b09; }

/* ---------- rules / SOP ---------- */
.pt-tabs { display: flex; gap: 6px; padding: 10px 16px 0; max-width: 560px; margin: 0 auto; }
.pt-tabs a { padding: 7px 14px; border-radius: 50px; background: #fff; border: 1px solid var(--line-strong); color: var(--ink); font-size: 13px; }
.pt-tabs a.on { background: var(--rg-dark, #0d0d0d); border-color: var(--rg-dark, #0d0d0d); color: #fff; }
.pt-tabs a:hover { text-decoration: none; }
.sop-wrap { max-width: 860px; }
.sop-role { display: grid; gap: 2px; background: #0d0d0d; color: #fff; border-radius: 22px; padding: 16px 18px; margin-bottom: 14px; }
.sop-role b { font-size: 17px; font-weight: 700; letter-spacing: -.01em; }
.sop-role .muted { color: rgba(255, 255, 255, .55); }
.sop-role-go { margin-top: 8px; justify-self: start; background: var(--rg-orange, #F26522); border-radius: 50px; padding: 6px 14px; font-size: 12px; font-weight: 700; }
body.team a.sop-role, body.team a.sop-role:hover { color: #fff; text-decoration: none; }
.sop-sec { background: var(--panel); border: 1px solid var(--line); border-radius: 18px; padding: 6px 16px 8px; margin-bottom: 12px; }
.sop-sec-head { display: flex; align-items: center; gap: 10px; padding: 10px 0 6px; }
.sop-sec-head h2 { margin: 0; font-size: 16px; flex: 1; }
.sop-n { width: 24px; height: 24px; border-radius: 50%; background: var(--accent-soft); color: var(--rg-orange, #F26522); display: grid; place-items: center; font-size: 12px; font-weight: 700; }
.sop-item { display: flex; justify-content: space-between; gap: 10px; padding: 11px 0; border-top: 1px solid var(--line); color: var(--ink); font-size: 14px; }
body.team .sop-item:hover { color: var(--rg-orange, #F26522); text-decoration: none; }
.sop-crumbs { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; }
.sop-kicker { margin: 0; font-size: 11px; letter-spacing: .08em; color: var(--muted); }
.sop-title { margin: 4px 0 14px; font-size: 28px; line-height: 1.1; font-weight: 700; letter-spacing: -.025em; }
.sop-body { background: var(--panel); border: 1px solid var(--line); border-radius: 18px; padding: 18px 20px; font-size: 14.5px; line-height: 1.6; text-transform: none; }
.sop-body h2 { font-size: 18px; margin: 18px 0 8px; text-transform: none; }
.sop-body h3 { font-size: 16px; margin: 16px 0 6px; }
.sop-body h4 { font-size: 14.5px; margin: 12px 0 4px; }
.sop-body h2:first-child, .sop-body h3:first-child { margin-top: 0; }
.sop-body p { margin: 6px 0; }
.sop-body i { color: var(--muted); }
.sop-body hr { border: 0; border-top: 1px solid var(--line); margin: 16px 0; }
.sop-body blockquote { margin: 10px 0; padding: 10px 14px; border-left: 3px solid var(--rg-orange, #F26522); background: var(--sub); border-radius: 0; }
.sop-list { margin: 6px 0; }
.sop-list .li { display: grid; grid-template-columns: 22px 1fr; gap: 2px; padding: 2px 0; }
.sop-list .li .mk { color: var(--rg-orange, #F26522); font-weight: 700; }
.sop-list .d1 { margin-left: 22px; } .sop-list .d2 { margin-left: 44px; } .sop-list .d3 { margin-left: 66px; }
.sop-list .li-cont { margin-left: 22px; padding: 1px 0 3px; }
.sop-list .li-cont.d2 { margin-left: 44px; }
.sop-table { overflow-x: auto; margin: 10px 0; }
.sop-table table { border-collapse: collapse; width: 100%; font-size: 13.5px; }
.sop-table th, .sop-table td { border: 1px solid var(--line); padding: 8px 10px; vertical-align: top; text-align: left; height: auto; position: static; }
.sop-table th { background: var(--sub); color: var(--ink); font-weight: 700; text-transform: none; letter-spacing: 0; font-size: 13px; }
.sop-callout { display: flex; gap: 10px; background: var(--accent-soft); border-radius: 14px; padding: 12px 14px; margin: 10px 0; }
.sop-img { margin: 0 0 14px; }
.sop-img img { width: 100%; height: auto; border-radius: 12px; border: 1px solid var(--line); background: #fff; }
.sop-foot { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; margin: 14px 0 30px; }
.sop-nav { display: flex; gap: 8px; }
body.team .sop-table th { text-transform: none; color: var(--ink); font-size: 13px; letter-spacing: 0; background: var(--sub); }
.pop-codes[hidden] { display: none; }
body.team [hidden] { display: none !important; }
/* schedule lock switch */
.lock-switch { display: flex; align-items: center; gap: 10px; margin: 0; padding: 6px 14px 6px 8px; border-radius: 50px; background: var(--panel); border: 1px solid var(--line-strong); }
.lock-switch.is-locked { background: #0d0d0d; border-color: #0d0d0d; color: #fff; }
.lock-label { font-size: 13px; white-space: nowrap; }
.switch { position: relative; display: inline-block; width: 44px; height: 26px; flex: none; cursor: pointer; }
.switch input { opacity: 0; width: 0; height: 0; position: absolute; }
.switch .slider { position: absolute; inset: 0; background: #555; border-radius: 26px; transition: background .2s; }
.switch .slider::before { content: ""; position: absolute; width: 20px; height: 20px; left: 3px; top: 3px; background: #fff; border-radius: 50%; transition: transform .2s; }
.switch input:checked + .slider { background: var(--rg-orange, #F26522); }
.switch input:checked + .slider::before { transform: translateX(18px); }
.sched-grid.locked td.sc { cursor: not-allowed; }
.sched-grid.locked td.sc:hover { outline: none; }
.sched-grid.locked .wk-note { cursor: not-allowed; }
@keyframes nudge { 0%, 100% { transform: translateX(0); } 25% { transform: translateX(-5px); } 75% { transform: translateX(5px); } }
.lock-switch.nudge { animation: nudge .3s 2; box-shadow: 0 0 0 3px rgba(242, 101, 34, .35); }
