:root {
  font-family: "Aptos", "Segoe UI", system-ui, sans-serif;
  color: #17243a;
  background: #f2f5fa;
  font-synthesis: none;
  --line: #dbe3ef;
  --muted: #53627a;
  --primary: #274ac8;
  --primary-hover: #1f3eae;
  --focus: #355de0;
  --worked-bg: #ddf3ec;
  --worked-ink: #10624b;
  --pto-bg: #eae7fb;
  --pto-ink: #5533a7;
  --holiday-bg: #fceadd;
  --holiday-ink: #8e4810;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; min-width: 320px; }
button, input { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
button { cursor: pointer; }
button:disabled { cursor: default; opacity: .55; }
button:focus-visible, a:focus-visible, input:focus-visible, #editor-title:focus-visible, label:has(input:focus-visible) {
  outline: 2px solid var(--focus);
  outline-offset: 3px;
}
h1, h2, p { margin: 0; }
a { color: var(--primary); }
.shell { width: min(100% - 48px, 1096px); margin-inline: auto; }
.muted { color: var(--muted); }
.topbar { background: #fff; border-bottom: 1px solid var(--line); }
.topbar-inner { height: 65px; display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.brand, .topbar-actions, .timezone { display: flex; align-items: center; }
.brand { gap: 11px; font-weight: 750; font-size: 18px; letter-spacing: -.025em; white-space: nowrap; }
.topbar-actions { gap: 16px; }
.timezone { gap: 6px; font-size: 14px; font-weight: 600; }
.brand-mark { position: relative; display: block; flex: none; width: 31px; height: 31px; border-radius: 9px; background: #2950d2; }
.brand-mark::before, .brand-mark::after { position: absolute; content: ""; }
.brand-mark::before { width: 13px; height: 13px; border-radius: 50%; border: 1.5px solid #fff; top: 8px; left: 8px; }
.brand-mark::after { width: 4px; height: 5px; top: 11px; left: 15px; border-left: 1.5px solid #fff; border-bottom: 1.5px solid #fff; border-radius: 0 0 0 1px; }
.clock-icon { width: 14px; height: 14px; border: 1.5px solid #68788d; border-radius: 50%; display: inline-block; position: relative; }
.clock-icon::after { content: ""; width: 3px; height: 4px; border-left: 1px solid #68788d; border-bottom: 1px solid #68788d; position: absolute; top: 2px; left: 5px; }
.boot { margin: 54px 0; }
.page-heading { display: flex; align-items: end; justify-content: space-between; gap: 14px; padding: 37px 0 23px; }
.eyebrow { font-size: 13px; font-weight: 750; text-transform: uppercase; letter-spacing: .1em; color: #465a7c; margin-bottom: 7px; }
h1 { font-size: clamp(32px, 4.6vw, 48px); line-height: 1.04; font-weight: 740; letter-spacing: -.055em; }
h2 { font-size: 20px; font-weight: 740; line-height: 1.3; letter-spacing: -.025em; }
.month-nav { display: flex; gap: 5px; }
.button { border: 1px solid var(--line); border-radius: 8px; min-height: 44px; color: #253852; background: #fff; padding: 0 13px; font-weight: 670; }
.button:hover:enabled { background: #f0f4fc; border-color: #aebdd7; }
.button-small { min-height: 36px; font-size: 14px; }
.button-primary { background: var(--primary); border-color: var(--primary); color: #fff; }
.button-primary:hover:enabled { color: #fff; background: var(--primary-hover); border-color: var(--primary-hover); }
.button-remove { width: 100%; background: none; border-color: transparent; margin-top: 4px; color: #a72f4a; }
.card { border: 1px solid var(--line); border-radius: 16px; background: #fff; box-shadow: 0 2px 5px #263e6810; }
.summary { display: grid; grid-template-columns: 1fr 1.52fr; align-items: center; min-height: 188px; border: 0; padding: 29px 30px; color: #fff; background: linear-gradient(112deg, #182d56, #203f7b); }
.summary-main { padding-right: 32px; }
.summary-label { color: #dae6ff; font-weight: 600; font-size: 14px; }
.summary-hours { font-variant-numeric: tabular-nums; font-size: clamp(34px, 5.4vw, 56px); font-weight: 735; line-height: 1.12; letter-spacing: -.055em; margin: 5px 0; }
.summary-main p { color: #e0e9fc; font-size: 14px; }
.meter { height: 7px; overflow: hidden; margin-top: 17px; border-radius: 12px; background: #ffffff30; }
.meter > div { width: 0; height: 100%; border-radius: inherit; background: #85e8d0; transition: width .18s ease-out; }
.summary-details { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.summary-details > div { display: grid; align-content: center; gap: 9px; border-left: 1px solid #ffffff35; min-height: 89px; padding: 0 16px; }
.summary-details > div:last-child { padding-right: 0; }
.summary-details strong { display: block; font-variant-numeric: tabular-nums; font-size: clamp(21px, 3.2vw, 32px); font-weight: 720; line-height: 1.05; letter-spacing: -.035em; }
.summary-details small { color: #dae6ff; font-size: 13px; }
.summary-details .positive { color: #8af1d4; }
.summary-details .negative { color: #ffd0ab; }
.dashboard-grid { display: grid; grid-template-columns: minmax(0, 1.9fr) minmax(278px, 1fr); grid-template-areas: "calendar editor"; align-items: start; gap: 20px; margin-top: 20px; }
.calendar-card { grid-area: calendar; }
.editor-card { grid-area: editor; }
.calendar-card, .editor-card, .records-card { padding: 20px 23px; }
.card-heading { display: flex; align-items: center; justify-content: space-between; min-height: 35px; gap: 10px; }
.calendar-weekdays, .calendar { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px; }
.calendar-weekdays { margin: 15px 0 8px; text-align: center; color: var(--muted); font-weight: 660; font-size: 13px; }
.day { display: grid; justify-items: center; align-content: center; gap: 2px; min-width: 0; min-height: 53px; border: 1px solid #e4eaf4; border-radius: 8px; background: #f9faff; font-variant-numeric: tabular-nums; color: #233753; padding: 4px 0; }
.day:hover { border-color: #7795ed; }
.day[aria-pressed="true"] { border-color: var(--focus); box-shadow: inset 0 0 0 1px var(--focus); }
.day[aria-current="date"] .day-number { color: #244dcd; font-weight: 820; text-decoration: underline; text-underline-offset: 3px; }
.day-number { font-size: 15px; font-weight: 650; }
.day-caption { font-size: 12px; font-weight: 630; min-height: 14px; }
.day.worked, .legend .worked, .status-worked { background: var(--worked-bg); color: var(--worked-ink); }
.day.pto, .legend .pto, .status-pto { background: var(--pto-bg); color: var(--pto-ink); }
.day.holiday, .legend .holiday { background: var(--holiday-bg); color: var(--holiday-ink); }
.day.weekend, .legend .weekend { background: #edf1f6; color: #566782; }
.legend { display: flex; flex-wrap: wrap; gap: 8px 15px; color: var(--muted); margin-top: 16px; font-size: 13px; }
.legend span { display: flex; align-items: center; gap: 5px; }
.legend i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; border: 1px solid #182d5624; }
.editor-date { margin-top: 2px; font-size: 16px; font-weight: 620; color: #3c5172; }
.day-context { margin-top: 7px; font-size: 14px; }
.type-control { display: grid; grid-template-columns: 1fr 1fr; gap: 3px; border: 1px solid var(--line); border-radius: 9px; background: #eef2fa; padding: 3px; margin: 18px 0 16px; min-width: 0; }
.type-control label { display: grid; border-radius: 6px; text-align: center; position: relative; cursor: pointer; }
.type-control label:has(input:disabled) { cursor: default; opacity: .48; }
.type-control span { padding: 8px 4px; font-size: 14px; font-weight: 670; color: #40597c; }
.type-control input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.type-control input:checked + span { border-radius: inherit; background: #fff; color: #2445a5; box-shadow: 0 1px 3px #182d5630; }
label { font-size: 14px; font-weight: 680; }
input[type="time"], input[type="password"] { display: block; border: 1px solid #bbc9df; border-radius: 8px; min-height: 44px; width: 100%; min-width: 0; background: #fff; color: #17243a; padding: 0 9px; }
input[aria-invalid="true"] { border-color: #a72f4a; box-shadow: inset 0 0 0 1px #a72f4a; }
.time-fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.time-fields input { margin-top: 6px; }
.form-caption { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin: 12px 0 14px; min-height: 20px; }
.form-note { color: var(--muted); font-size: 14px; }
.shift-duration { display: inline-block; flex: none; border-radius: 5px; background: var(--worked-bg); color: var(--worked-ink); font: 670 13px/1.35 system-ui, sans-serif; font-variant-numeric: tabular-nums; padding: 2px 6px; white-space: nowrap; }
.editor-card .button-primary { width: 100%; }
.records-card { margin-top: 20px; }
.records-card p { margin: 8px 0 3px; }
.record-table { overflow: auto; }
table { width: 100%; border-collapse: collapse; text-align: left; min-width: 480px; }
th, td { font-size: 14px; padding: 11px 6px; border-bottom: 1px solid var(--line); }
th { color: var(--muted); font-weight: 660; }
tbody tr:last-child td { border-bottom: 0; }
td { font-variant-numeric: tabular-nums; }
.badge { display: inline-block; padding: 3px 7px; border-radius: 5px; font-weight: 640; white-space: nowrap; }
td:last-child { text-align: right; }
.footer { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 20px; font-size: 13px; color: var(--muted); padding: 18px 1px 26px; }
.auth-card { margin: 60px auto 0; max-width: 430px; padding: 30px; }
.auth-mark { margin-bottom: 15px; }
.auth-card h1 { font-size: 34px; }
.auth-card p { margin-top: 10px; line-height: 1.5; }
.auth-card form { margin-top: 23px; }
.auth-card input { margin: 6px 0 14px; }
.auth-card .button { width: 100%; margin-top: 3px; }
.message { padding: 9px 10px; border-radius: 7px; margin-top: 10px; font-size: 14px; color: #325426; background: #edf6e8; }
.message[data-error="true"] { color: #902d46; background: #faeaf0; }
.notice { margin: 0 0 12px; background: #e6edfb; color: #243f70; }
.notice-retry { margin-bottom: 12px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

@media (max-width: 790px) {
  .summary { grid-template-columns: 1fr; gap: 23px; }
  .summary-main { padding-right: 0; }
  .summary-details > div { min-height: 65px; }
  .summary-details > div:first-child { border-left: 0; padding-left: 0; }
}

@media (max-width: 700px) {
  .shell { width: calc(100% - 28px); }
  .topbar-inner { height: 56px; }
  .topbar-actions { gap: 8px; }
  .page-heading { align-items: start; flex-direction: column; gap: 16px; padding-top: 24px; }
  .summary { gap: 17px; padding: 18px 16px; }
  .summary-details { row-gap: 5px; }
  .summary-details > div { padding: 0 8px; }
  .summary-details .summary-label, .summary-details small { font-size: 12px; }
  .dashboard-grid { grid-template-columns: minmax(0, 1fr); grid-template-areas: "editor" "calendar"; gap: 14px; margin-top: 14px; }
  .calendar-card, .editor-card, .records-card { padding: 15px; }
  .calendar, .calendar-weekdays { gap: 4px; }
  .day { min-height: 46px; }
  .day-caption { font-size: 10px; }
  .records-card { margin-top: 14px; }
  .auth-card { margin-top: 28px; padding: 22px; }
  .month-nav { width: 100%; }
  .month-nav .button { min-height: 44px; flex: 1; }
  .topbar .button, .calendar-card .button { min-height: 44px; }
  .type-control span { padding-block: 11px; }
  input[type="time"], input[type="password"] { font-size: 16px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; scroll-behavior: auto !important; }
}

@supports (grid-template-rows: subgrid) {
  @media (max-width: 700px) {
    .summary-details > div { grid-row: span 3; grid-template-rows: subgrid; min-height: 0; gap: 0; }
  }
}

@media (max-width: 700px) {
  .record-table { overflow: visible; }
  .record-table table { display: block; min-width: 0; }
  .record-table thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
  .record-table tbody { display: block; }
  .record-table tr {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr) auto;
    align-items: center;
    gap: 5px 8px;
    border-bottom: 1px solid var(--line);
    padding: 10px 0;
  }
  .record-table tr:last-child { border: 0; }
  .record-table td { padding: 0; border: 0; min-width: 0; }
  .record-table td:nth-child(1) { grid-area: 1 / 1; font-weight: 720; }
  .record-table td:nth-child(2) { grid-area: 1 / 2; }
  .record-table td:nth-child(3) { grid-area: 2 / 1; color: var(--muted); }
  .record-table td:nth-child(4) { grid-area: 2 / 2; color: var(--muted); }
  .record-table td:nth-child(5) { grid-area: 2 / 3; text-align: right; font-weight: 720; }
  .record-table td:nth-child(6) { grid-area: 1 / 3; }
  .record-table td:nth-child(3)::before { content: "In "; }
  .record-table td:nth-child(4)::before { content: "Out "; }
  .record-table tr[data-kind="pto"] :is(td:nth-child(3), td:nth-child(4)) { display: none; }
  .record-table .badge { white-space: normal; }
  .record-table .button { min-height: 44px; }
}

@media (max-width: 365px) {
  .timezone .muted { display: none; }
}
