:root {
  --bg: #f8f7f3;
  --surface: #ffffff;
  --ink: #26342f;
  --muted: #66756c;
  --line: #d6ded8;
  --accent: #137f5a;
  --accent-deep: #0b6044;
  --accent-wash: #e6f4ec;
  --warning: #a76a1a;
  --warning-wash: #fff1dc;
  --danger: #ad423a;
  --danger-wash: #fff0ec;
  --font-body: 'Manrope', sans-serif;
  --radius-sm: 8px;
  --radius-md: 12px;
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-6: 24px;
  --space-8: 32px;
}
@supports (color: oklch(0 0 0)) {
  :root {
    --bg: oklch(0.976 0.006 93);
    --surface: oklch(1 0 0);
    --ink: oklch(0.25 0.025 165);
    --muted: oklch(0.48 0.018 165);
    --line: oklch(0.88 0.012 165);
    --accent: oklch(0.49 0.11 160);
    --accent-deep: oklch(0.40 0.105 160);
    --accent-wash: oklch(0.95 0.035 160);
    --warning: oklch(0.58 0.14 65);
    --warning-wash: oklch(0.97 0.035 75);
    --danger: oklch(0.52 0.17 28);
    --danger-wash: oklch(0.97 0.025 28);
  }
}
* { box-sizing: border-box; }
html { background: var(--bg); }
body { margin: 0; color: var(--ink); font: 400 16px/1.5 var(--font-body); -webkit-font-smoothing: antialiased; }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
a { color: var(--accent-deep); text-underline-position: from-font; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.skip-link { position: absolute; inset-inline-start: 12px; top: -60px; z-index: 100; background: var(--surface); padding: 10px; }
.skip-link:focus { top: 12px; }
.initial { min-height: 100vh; display: grid; place-items: center; }
h1, h2, h3, p { margin-block-start: 0; }
h1 { font-size: clamp(25px, 4vw, 31px); line-height: 1.15; letter-spacing: -.035em; }
h2 { font-size: 20px; line-height: 1.2; letter-spacing: -.02em; }
h3 { font-size: 16px; }
.eyebrow { font-size: 12px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.mono, time, .number { font-variant-numeric: tabular-nums; }
.app-shell { min-height: 100vh; display: grid; grid-template-columns: 240px minmax(0, 1fr); }
.sidebar { background: var(--ink); color: #f2f6f1; padding: 28px 18px; display: flex; flex-direction: column; gap: 30px; }
.brand { display: inline-flex; align-items: center; gap: 12px; font-weight: 800; font-size: 20px; letter-spacing: -.03em; }
.brand-mark { width: 32px; height: 32px; border-radius: 8px; background: var(--accent); display: grid; place-items: center; color: white; font-size: 20px; }
.side-nav { display: grid; gap: 4px; }
.nav-btn { width: 100%; display: flex; align-items: center; gap: 12px; border: 0; border-radius: var(--radius-sm); color: #bdcfc4; background: transparent; text-align: start; min-height: 44px; padding: 9px 12px; font-weight: 700; }
.nav-btn:hover, .nav-btn.active { color: #fff; background: #40534a; }
.nav-icon { width: 20px; text-align: center; font-size: 16px; }
.side-foot { margin-top: auto; border-top: 1px solid #50645b; padding-top: 16px; font-size: 13px; }
.side-foot strong { display: block; font-size: 14px; margin-bottom: 2px; overflow-wrap: anywhere; }
.side-foot .text-btn { color: #d3e8d9; padding-inline: 0; }
.main-wrap { min-width: 0; padding: 30px clamp(20px, 3.5vw, 52px) 70px; }
.page-head { display: flex; align-items: end; justify-content: space-between; gap: 20px; margin-bottom: 28px; }
.page-head h1 { margin-bottom: 5px; }
.page-head p { margin-bottom: 0; }
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-md); padding: 22px; }
.panel + .panel, .section-gap { margin-top: 24px; }
.panel-head { display: flex; align-items: start; justify-content: space-between; gap: 16px; margin-bottom: 18px; }
.panel-head h2 { margin: 0; }
.metric-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.metric { padding: 18px; border-radius: var(--radius-sm); background: var(--surface); border: 1px solid var(--line); }
.metric .value { display: block; font-size: 29px; font-weight: 800; line-height: 1.15; letter-spacing: -.04em; margin-top: 12px; font-variant-numeric: tabular-nums; }
.metric .label { font-size: 13px; color: var(--muted); }
.metric.attention { background: var(--warning-wash); border-color: transparent; }
.metric.attention .value { color: var(--warning); }
.toolbar { display: flex; flex-wrap: wrap; gap: 12px; align-items: end; }
.toolbar > .field { min-width: 150px; }
.toolbar .grow { flex: 1; }
.field { display: grid; gap: 6px; min-width: 0; }
.field > span, .field > label { font-size: 13px; color: var(--muted); font-weight: 700; }
.field input, .field select, .field textarea { width: 100%; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--surface); color: var(--ink); padding: 10px 12px; min-height: 44px; }
.field textarea { min-height: 92px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--accent); }
.field input[aria-invalid="true"] { border-color: var(--danger); }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.span-2 { grid-column: span 2; }
.checks { display: flex; flex-wrap: wrap; gap: 10px; }
.checks label { display: inline-flex; align-items: center; gap: 5px; padding: 6px 8px; min-height: 44px; }
.checks input { width: 18px; height: 18px; accent-color: var(--accent); }
.btn { border-radius: var(--radius-sm); min-height: 44px; padding: 10px 16px; border: 1px solid transparent; display: inline-flex; align-items: center; justify-content: center; gap: 8px; text-decoration: none; font-weight: 800; line-height: 1.3; white-space: normal; }
.btn:active { scale: .96; }
.btn:disabled { cursor: wait; opacity: .58; scale: 1; }
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-deep); }
.btn-secondary { background: var(--surface); border-color: var(--line); color: var(--ink); }
.btn-secondary:hover { background: var(--bg); }
.btn-danger { color: var(--danger); background: var(--danger-wash); }
.text-btn { border: 0; background: transparent; color: var(--accent-deep); padding: 8px 2px; text-decoration: underline; font-weight: 700; }
.text-btn:hover { color: var(--ink); }
.row-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th { text-align: start; font-size: 12px; font-weight: 800; color: var(--muted); padding: 10px 12px; border-bottom: 1px solid var(--line); white-space: nowrap; }
td { padding: 13px 12px; border-bottom: 1px solid var(--line); vertical-align: middle; }
tr:last-child td { border-bottom: 0; }
td.number, th.number { text-align: end; font-variant-numeric: tabular-nums; white-space: nowrap; }
.status { display: inline-flex; align-items: center; gap: 6px; border-radius: 100px; background: var(--accent-wash); color: var(--accent-deep); padding: 4px 9px; font-size: 12px; font-weight: 800; white-space: nowrap; }
.status.warning { background: var(--warning-wash); color: var(--warning); }
.status.danger { background: var(--danger-wash); color: var(--danger); }
.status.neutral { background: var(--bg); color: var(--muted); }
.empty { padding: 36px 12px; text-align: center; color: var(--muted); }
.empty strong { display: block; color: var(--ink); margin-bottom: 5px; }
.auth-wrap { min-height: 100vh; display: grid; grid-template-columns: minmax(0, 1fr) minmax(380px, .9fr); }
.auth-aside { background: var(--ink); color: #f4f7f2; padding: clamp(30px, 6vw, 90px); display: flex; flex-direction: column; justify-content: space-between; }
.auth-aside h1 { max-width: 560px; font-size: clamp(36px, 5vw, 66px); line-height: 1.06; margin: 0; }
.auth-aside p { max-width: 470px; color: #c7d5ca; }
.auth-main { display: grid; place-items: center; padding: 30px; }
.auth-box { width: min(100%, 400px); }
.auth-box .brand { margin-bottom: 36px; }
.auth-box form { display: grid; gap: 18px; }
.auth-box .btn { width: 100%; margin-top: 6px; }
.error-line { color: var(--danger); font-size: 14px; margin: 0; }
.employee-shell { max-width: 920px; margin: 0 auto; min-height: 100vh; padding: 20px 20px 88px; }
.employee-header { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding-block: 10px 24px; }
.employee-header .brand { font-size: 18px; }
.hero-day { background: var(--ink); color: #fff; border-radius: var(--radius-md); padding: clamp(22px, 5vw, 40px); overflow: hidden; }
.hero-day .eyebrow { color: #a9c7b6; }
.hero-day h1 { max-width: 550px; margin: 8px 0 18px; }
.hero-day p { color: #c4d6c9; max-width: 570px; }
.hero-day .btn-primary { background: #3ab985; color: #163a29; }
.hero-day .btn-primary:hover { background: #5aca9b; }
.day-scale { display: grid; grid-template-columns: 64px 1fr 64px; align-items: center; gap: 12px; margin: 30px 0 12px; }
.day-scale .line { height: 12px; border-radius: 20px; background: #526b5c; position: relative; }
.day-scale .line::before { content: ''; position: absolute; inset: 0 30% 0 0; border-radius: 20px; background: #49c18d; }
.day-scale .line.open::before { inset-inline-end: 65%; }
.day-scale strong { font-size: 13px; font-variant-numeric: tabular-nums; }
.employee-block { margin-top: 24px; }
.employee-block h2 { margin-bottom: 14px; }
.offline-banner { background: #fff3da; border-color: #e6b65f; }
.offline-banner p { margin: 8px 0 14px; color: var(--ink); }
.offline-flag { color: #9d5f00; font-weight: 700; white-space: nowrap; }
.request { display: flex; justify-content: space-between; align-items: center; gap: 20px; border-bottom: 1px solid var(--line); padding: 16px 0; }
.request:last-child { border-bottom: 0; }
.request p { margin: 0; }
.request .small { display: block; margin-top: 4px; }
.mobile-nav { display: none; }
#notice { position: fixed; z-index: 50; bottom: 20px; inset-inline-end: 20px; max-width: min(420px, calc(100vw - 40px)); }
#notice:not(:empty) { background: var(--ink); color: #fff; padding: 13px 18px; border-radius: var(--radius-sm); box-shadow: 0 10px 30px #16281b33; }
.calendar-key { display: flex; flex-wrap: wrap; gap: 10px 18px; font-size: 13px; color: var(--muted); }
.calendar-key span::before { content: ''; display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-inline-end: 5px; background: var(--accent); }
.calendar-key .holiday::before { background: var(--warning); }
.calendar-key .missing::before { background: var(--danger); }
@media (max-width: 1020px) { .metric-grid { grid-template-columns: repeat(2, 1fr); } .sidebar { width: 200px; } .app-shell { grid-template-columns: 200px 1fr; } }
@media (max-width: 760px) {
  .app-shell { display: block; }
  .sidebar { display: none; }
  .main-wrap { padding: 22px 16px 100px; }
  .page-head { align-items: start; }
  .page-head .btn { width: auto; }
  .mobile-nav { position: fixed; z-index: 30; inset: auto 0 0; display: flex; justify-content: space-around; background: var(--surface); border-top: 1px solid var(--line); padding: 7px 6px calc(7px + env(safe-area-inset-bottom)); }
  .mobile-nav .nav-btn { color: var(--muted); display: grid; justify-items: center; gap: 0; width: 25%; padding: 4px; font-size: 11px; text-align: center; }
  .mobile-nav .nav-btn.active { color: var(--accent-deep); background: var(--accent-wash); }
  .mobile-nav .nav-icon { font-size: 18px; }
  .panel { padding: 16px; }
  .auth-wrap { display: block; }
  .auth-aside { display: none; }
  .auth-main { min-height: 100vh; }
  .form-grid { grid-template-columns: 1fr; }
  .span-2 { grid-column: auto; }
  .employee-shell { padding-inline: 16px; }
  .employee-header { padding-block-end: 20px; }
  .request { align-items: start; flex-direction: column; }
}
@media (max-width: 420px) { .metric-grid { grid-template-columns: 1fr 1fr; gap: 8px; } .metric { padding: 12px; } .metric .value { font-size: 24px; } .toolbar { display: grid; } .toolbar > .field { min-width: 0; } .toolbar .btn { width: 100%; } .page-head { display: block; } }
@media print { .sidebar, .mobile-nav, .toolbar, .row-actions, .btn, #notice { display: none !important; } .app-shell { display: block; } .main-wrap { padding: 0; } body { background: #fff; } .panel, .metric { border: 0; } }
@media (prefers-reduced-motion: no-preference) { .btn, .nav-btn { transition: background-color 150ms cubic-bezier(.2,0,0,1), color 150ms cubic-bezier(.2,0,0,1), scale 150ms cubic-bezier(.2,0,0,1); } }
