:root {
  color-scheme: light;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --bg: #f3f5f7;
  --card: #ffffff;
  --ink: #16202a;
  --muted: #66727f;
  --line: #dde2e7;
  --brand: #16794b;
  --brand-strong: #0f623b;
  --danger: #b42318;
  --warn: #a15c00;
  --shadow: 0 8px 26px rgba(15, 23, 42, .08);
  --radius: 18px;
}
* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; background: var(--bg); color: var(--ink); }
body { min-height: 100dvh; }
button, input, textarea { font: inherit; }
button { cursor: pointer; }
.app-shell { min-height: 100dvh; padding-bottom: 84px; }
.topbar {
  position: sticky; top: 0; z-index: 20; height: 66px; display: flex; align-items: center;
  justify-content: space-between; padding: 0 18px; background: rgba(255,255,255,.94);
  border-bottom: 1px solid var(--line); backdrop-filter: blur(14px);
}
.brand { display: flex; align-items: center; gap: 10px; font-weight: 800; letter-spacing: .02em; }
.brand-mark { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; color: white; background: #111827; }
.role-switch { display: flex; align-items: center; gap: 8px; }
.role-pill { border: 1px solid var(--line); background: white; color: var(--ink); padding: 8px 10px; border-radius: 999px; font-size: 13px; font-weight: 700; }
.role-pill.active { background: #111827; color: white; border-color: #111827; }
.main { width: min(1120px, 100%); margin: 0 auto; padding: 20px 16px 30px; }
.page-title { margin: 3px 0 2px; font-size: clamp(26px, 6vw, 38px); letter-spacing: -.03em; }
.subtitle { color: var(--muted); margin: 0 0 18px; }
.grid { display: grid; gap: 14px; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 18px; }
.work-card { text-align: center; padding: 28px 20px; }
.status-badge { display: inline-flex; align-items: center; gap: 8px; padding: 7px 11px; border-radius: 999px; font-weight: 800; font-size: 13px; background: #edf2f4; }
.status-badge.working { background: #dff5e8; color: #0b6b3d; }
.dot { width: 9px; height: 9px; border-radius: 50%; background: currentColor; }
.timer { font-size: clamp(42px, 12vw, 64px); font-weight: 850; letter-spacing: -.055em; margin: 18px 0 2px; font-variant-numeric: tabular-nums; }
.small { color: var(--muted); font-size: 14px; }
.primary { width: 100%; border: 0; border-radius: 14px; background: var(--brand); color: white; padding: 15px 18px; font-weight: 850; margin-top: 22px; box-shadow: 0 7px 18px rgba(22,121,75,.22); }
.primary:hover { background: var(--brand-strong); }
.primary.danger { background: var(--danger); box-shadow: 0 7px 18px rgba(180,35,24,.18); }
.secondary { border: 1px solid var(--line); border-radius: 12px; background: white; color: var(--ink); padding: 11px 13px; font-weight: 750; }
.secondary.full { width: 100%; }
.secondary.warn { color: var(--warn); }
.action-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 10px; }
.action { border: 1px solid var(--line); background: white; border-radius: 14px; padding: 14px 10px; text-align: left; min-height: 78px; }
.action .icon { font-size: 22px; display: block; margin-bottom: 7px; }
.action strong { display: block; font-size: 14px; }
.action span { display: block; color: var(--muted); font-size: 12px; margin-top: 3px; }
.section-title { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin: 5px 0 10px; }
.section-title h2 { font-size: 18px; margin: 0; }
.summary-list { display: grid; gap: 0; }
.summary-row { display: flex; justify-content: space-between; gap: 12px; padding: 11px 0; border-bottom: 1px solid var(--line); }
.summary-row:last-child { border-bottom: 0; }
.summary-row span:first-child { color: var(--muted); }
.summary-row strong { text-align: right; }
.note { border-left: 4px solid #93a4b5; padding-left: 12px; color: #394858; line-height: 1.5; }
.bottom-nav { position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; display: grid; grid-template-columns: repeat(3, 1fr); min-height: 70px; padding-bottom: env(safe-area-inset-bottom); background: rgba(255,255,255,.97); border-top: 1px solid var(--line); }
.nav-button { border: 0; background: transparent; color: var(--muted); display: grid; place-items: center; align-content: center; gap: 4px; font-size: 12px; }
.nav-button b { font-size: 19px; font-weight: 500; }
.nav-button.active { color: var(--brand); font-weight: 800; }
.desktop-sidebar { display: none; }
.metric-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.metric { padding: 15px; border: 1px solid var(--line); border-radius: 14px; background: #fafbfc; }
.metric .value { font-size: 25px; font-weight: 850; }
.metric .label { color: var(--muted); font-size: 12px; margin-top: 4px; }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; min-width: 650px; }
th, td { text-align: left; padding: 12px 10px; border-bottom: 1px solid var(--line); white-space: nowrap; }
th { color: var(--muted); font-size: 12px; text-transform: uppercase; letter-spacing: .04em; }
.row-status { display: inline-flex; align-items: center; gap: 6px; font-weight: 750; font-size: 13px; }
.chip { display: inline-block; padding: 5px 8px; border-radius: 999px; background: #eef1f4; font-size: 12px; font-weight: 700; }
.chip.green { background: #dff5e8; color: #0b6b3d; }
.chip.red { background: #fde5e2; color: #9a2218; }
.chip.yellow { background: #fff1d6; color: #8a4b00; }
.toolbar { display: flex; gap: 8px; flex-wrap: wrap; }
.report-card { display: grid; gap: 10px; }
.report-head { display: flex; justify-content: space-between; gap: 12px; align-items: start; }
.report-head h3 { margin: 0; font-size: 16px; }
.report-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.empty { text-align: center; color: var(--muted); padding: 28px 10px; }
.calendar-days { display: grid; gap: 10px; }
.day-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 13px 0; border-bottom: 1px solid var(--line); }
.day-row:last-child { border-bottom: 0; }
.modal-backdrop { position: fixed; inset: 0; z-index: 100; display: grid; place-items: end center; background: rgba(15,23,42,.4); padding: 14px; }
.modal { width: min(540px, 100%); max-height: 90dvh; overflow: auto; background: white; border-radius: 22px 22px 16px 16px; padding: 18px; box-shadow: 0 30px 70px rgba(0,0,0,.25); }
.modal h2 { margin: 0 0 14px; }
.field { display: grid; gap: 7px; margin: 12px 0; }
.field label { font-size: 13px; font-weight: 750; color: #40505f; }
.field input, .field textarea { width: 100%; border: 1px solid #cfd6dd; border-radius: 12px; padding: 12px; background: white; color: var(--ink); }
.field textarea { min-height: 120px; resize: vertical; }
.modal-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; margin-top: 16px; }
.version { color: var(--muted); text-align: center; font-size: 11px; margin: 20px 0 0; }
.toast { position: fixed; z-index: 200; left: 50%; bottom: 88px; transform: translateX(-50%); background: #111827; color: white; padding: 11px 14px; border-radius: 999px; font-weight: 700; font-size: 13px; box-shadow: var(--shadow); }

@media (min-width: 760px) {
  .app-shell { padding-bottom: 0; padding-left: 220px; }
  .topbar { padding-left: 240px; }
  .bottom-nav { display: none; }
  .desktop-sidebar { position: fixed; left: 0; top: 0; bottom: 0; width: 220px; background: #111827; color: white; z-index: 50; display: flex; flex-direction: column; padding: 20px 14px; }
  .desktop-sidebar .brand { margin: 4px 6px 28px; }
  .desktop-sidebar .brand-mark { background: white; color: #111827; }
  .side-nav { display: grid; gap: 7px; }
  .side-nav button { border: 0; background: transparent; color: #cbd5e1; border-radius: 11px; text-align: left; padding: 11px 12px; font-weight: 700; }
  .side-nav button.active { color: white; background: #263241; }
  .side-footer { margin-top: auto; color: #94a3b8; font-size: 12px; padding: 10px 7px; }
  .main { padding: 28px 28px 48px; }
  .employee-layout { grid-template-columns: minmax(330px,.9fr) minmax(320px,1.1fr); align-items: start; }
  .action-grid { grid-template-columns: repeat(4, 1fr); }
  .metric-grid { grid-template-columns: repeat(4, 1fr); }
  .modal-backdrop { place-items: center; }
  .modal { border-radius: 20px; }
}
