:root {
  --navy: #172554;
  --navy-soft: #1e3a8a;
  --blue: #2563eb;
  --blue-dark: #1d4ed8;
  --blue-pale: #eff6ff;
  --sky: #dbeafe;
  --ink: #172033;
  --muted: #667085;
  --line: #e4e7ec;
  --surface: #fff;
  --canvas: #f6f8fc;
  --success: #16803c;
  --success-pale: #ecfdf3;
  --danger: #c43232;
  --shadow: 0 14px 40px rgba(23, 37, 84, .08);
}

* { box-sizing: border-box; }
html { color-scheme: light; }
body {
  margin: 0;
  min-width: 320px;
  min-height: 100vh;
  color: var(--ink);
  background:
    radial-gradient(circle at 8% 2%, rgba(219, 234, 254, .9), transparent 24rem),
    var(--canvas);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
}

button, input, select, textarea { font: inherit; }
button { color: inherit; }
button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible {
  outline: 3px solid rgba(37, 99, 235, .23);
  outline-offset: 2px;
}

.app-shell { min-height: 100vh; }
.topbar {
  position: sticky;
  z-index: 20;
  top: 0;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  min-height: 72px;
  padding: 0 clamp(22px, 5vw, 72px);
  background: rgba(255, 255, 255, .88);
  border-bottom: 1px solid rgba(228, 231, 236, .88);
  backdrop-filter: blur(18px);
}

.brand {
  display: inline-flex;
  gap: 10px;
  align-items: center;
  width: fit-content;
  color: var(--navy);
  text-decoration: none;
  font-size: 21px;
  font-weight: 820;
  letter-spacing: -.04em;
}
.brand-mark {
  position: relative;
  width: 31px;
  height: 31px;
  border-radius: 10px;
  background: var(--blue);
  box-shadow: 0 6px 14px rgba(37, 99, 235, .23);
}
.brand-mark::before, .brand-mark::after, .brand-mark span {
  position: absolute;
  content: "";
  border-radius: 9px;
  background: white;
}
.brand-mark::before { top: 8px; left: 8px; width: 15px; height: 3px; }
.brand-mark::after { top: 20px; left: 8px; width: 15px; height: 3px; }
.brand-mark span { top: 8px; left: 14px; width: 3px; height: 15px; }

.primary-nav { display: flex; gap: 5px; align-self: stretch; }
.nav-item {
  position: relative;
  display: flex;
  gap: 7px;
  align-items: center;
  justify-content: center;
  border: 0;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font-size: 14px;
  font-weight: 720;
  text-decoration: none;
}
.primary-nav .nav-item { padding: 0 19px; }
.primary-nav .nav-item::after {
  position: absolute;
  right: 18px;
  bottom: -1px;
  left: 18px;
  height: 3px;
  border-radius: 3px 3px 0 0;
  background: transparent;
  content: "";
}
.nav-item:hover, .nav-item.is-active { color: var(--blue); }
.primary-nav .nav-item.is-active::after { background: var(--blue); }
.settings-button { justify-self: end; }
.account-actions { display: flex; gap: 9px; align-items: center; justify-self: end; }
.account-actions form { margin: 0; }
.header-link { display: inline-flex; align-items: center; justify-content: center; text-decoration: none; }

main { width: min(1180px, calc(100% - 44px)); margin: 0 auto; padding: 49px 0 96px; }
.view[hidden] { display: none; }
.page-heading {
  display: flex;
  justify-content: space-between;
  gap: 30px;
  align-items: flex-start;
  margin-bottom: 27px;
}
.page-heading h1 { margin: 3px 0 9px; font-size: clamp(29px, 4vw, 42px); line-height: 1.05; letter-spacing: -.045em; }
.page-heading > div > p:last-child { max-width: 680px; margin: 0; color: var(--muted); line-height: 1.55; }
.eyebrow { margin: 0; color: var(--blue); font-size: 11px; font-weight: 820; letter-spacing: .13em; text-transform: uppercase; }
.local-badge {
  display: inline-flex;
  gap: 8px;
  align-items: center;
  flex: none;
  margin-top: 11px;
  padding: 8px 12px;
  border: 1px solid #b7ebc7;
  border-radius: 999px;
  background: var(--success-pale);
  color: var(--success);
  font-size: 12px;
  font-weight: 750;
}
.local-badge i { width: 7px; height: 7px; border-radius: 50%; background: #22c55e; box-shadow: 0 0 0 4px rgba(34, 197, 94, .12); }

.tracker-layout { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(300px, .78fr); gap: 23px; align-items: start; }
.card { border: 1px solid rgba(220, 225, 234, .95); border-radius: 22px; background: var(--surface); box-shadow: var(--shadow); }
.entry-card { padding: clamp(20px, 3vw, 31px); }
.date-toolbar { display: grid; grid-template-columns: 42px 1fr 42px; gap: 12px; align-items: center; }
.icon-button {
  display: inline-grid;
  place-items: center;
  width: 42px;
  height: 42px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: white;
  cursor: pointer;
  font-size: 18px;
}
.icon-button:hover { border-color: #b8c4d8; background: #f9fafb; }
.date-title { border: 0; background: transparent; cursor: pointer; text-align: center; }
.date-title span { display: block; color: var(--blue); font-size: 12px; font-weight: 800; text-transform: uppercase; letter-spacing: .08em; }
.date-title strong { display: block; margin-top: 3px; font-size: 19px; letter-spacing: -.025em; }
.day-status {
  display: flex;
  gap: 9px;
  align-items: center;
  width: fit-content;
  margin: 20px auto 27px;
  padding: 7px 11px;
  border-radius: 999px;
  background: #f2f4f7;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}
.status-dot { width: 7px; height: 7px; border-radius: 50%; background: #98a2b3; }
.day-status.is-progress { background: #fff7e6; color: #9a6200; }
.day-status.is-progress .status-dot { background: #f59e0b; }
.day-status.is-complete { background: var(--success-pale); color: var(--success); }
.day-status.is-complete .status-dot { background: #22c55e; }

.time-fields { display: grid; grid-template-columns: 1fr auto 1fr; gap: 17px; align-items: end; }
.field-label-row { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
label, .time-field label { color: #344054; font-size: 13px; font-weight: 760; }
.text-button { padding: 3px 0; border: 0; background: transparent; color: var(--blue); cursor: pointer; font-size: 12px; font-weight: 780; }
input, select, textarea {
  width: 100%;
  border: 1px solid #d0d5dd;
  border-radius: 13px;
  background: white;
  color: var(--ink);
  transition: border-color .15s, box-shadow .15s;
}
input, select { min-height: 48px; padding: 11px 13px; }
textarea { padding: 12px 13px; resize: vertical; line-height: 1.5; }
input:hover, select:hover, textarea:hover { border-color: #aeb7c5; }
.time-field input { min-height: 59px; padding: 10px 14px; font-size: 24px; font-weight: 730; letter-spacing: .02em; }
.time-arrow { padding-bottom: 18px; color: #98a2b3; }
.next-day-row { display: flex; gap: 9px; align-items: center; width: fit-content; margin: 12px 0 0; cursor: pointer; color: var(--muted); font-weight: 600; }
.next-day-row input { width: 16px; min-height: 16px; height: 16px; padding: 0; accent-color: var(--blue); }
.next-day-row span { font-size: 12px; }

.break-section { margin-top: 27px; padding: 23px 0 24px; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.section-heading-row { display: flex; justify-content: space-between; gap: 16px; align-items: center; }
.section-heading-row h2, .calendar-summary h2 { margin: 4px 0 0; font-size: 17px; letter-spacing: -.025em; }
.section-heading-row > div > p:not(.eyebrow) { margin: 4px 0 0; color: var(--muted); font-size: 12px; }
.secondary-button, .danger-button, .primary-button {
  min-height: 45px;
  padding: 11px 17px;
  border-radius: 13px;
  cursor: pointer;
  font-size: 13px;
  font-weight: 780;
}
.secondary-button { border: 1px solid #cfd7e5; background: white; color: #344054; }
.secondary-button:hover { background: #f8fafc; }
.secondary-button.compact { min-height: 37px; padding: 8px 12px; color: var(--blue); }
.primary-button { border: 1px solid var(--blue); background: var(--blue); color: white; box-shadow: 0 7px 18px rgba(37, 99, 235, .19); }
.primary-button:hover { background: var(--blue-dark); }
.danger-button { border: 1px solid #f0caca; background: #fff; color: var(--danger); }
.danger-button:hover { background: #fff6f6; }
.danger-button.filled { border-color: var(--danger); background: var(--danger); color: white; }
.break-list { display: grid; gap: 10px; margin-top: 16px; }
.empty-breaks { margin: 18px 0 2px; color: #98a2b3; font-size: 13px; text-align: center; }
.break-row { display: grid; grid-template-columns: 160px 1fr 34px; gap: 9px; align-items: center; padding: 10px; border: 1px solid var(--line); border-radius: 14px; background: #fafbfc; }
.break-row .range-inputs { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.break-row input, .break-row select { min-height: 41px; padding: 8px 10px; border-radius: 10px; font-size: 13px; }
.remove-break { width: 34px; height: 34px; border: 0; border-radius: 9px; background: transparent; color: #98a2b3; cursor: pointer; font-size: 19px; }
.remove-break:hover { background: #feecec; color: var(--danger); }
.notes-field { margin-top: 24px; }
.notes-field label { display: block; margin-bottom: 8px; }
.notes-field label span { color: #98a2b3; font-weight: 500; }
.entry-actions { display: flex; justify-content: space-between; gap: 13px; margin-top: 20px; }
.entry-actions .primary-button { min-width: 180px; }
.form-error { margin-top: 14px; padding: 10px 12px; border-radius: 10px; background: #fff1f1; color: var(--danger); font-size: 13px; font-weight: 650; }

.summary-column { display: grid; gap: 23px; }
.live-summary { padding: 29px; background: linear-gradient(145deg, var(--navy), #203a7a); color: white; border-color: transparent; box-shadow: 0 20px 45px rgba(23, 37, 84, .19); }
.live-summary .eyebrow { color: #93c5fd; }
.big-hours { margin-top: 22px; font-size: clamp(45px, 6vw, 62px); font-weight: 830; line-height: .95; letter-spacing: -.055em; }
.big-hours-label { margin: 6px 0 0; color: #bfdbfe; font-size: 13px; }
.summary-divider { height: 1px; margin: 24px 0 15px; background: rgba(255, 255, 255, .15); }
.summary-list { margin: 0; }
.summary-list div { display: flex; justify-content: space-between; gap: 16px; padding: 8px 0; }
.summary-list dt, .summary-list dd { margin: 0; font-size: 12px; }
.summary-list dt { color: #bfcae0; }
.summary-list dd { font-weight: 740; }
.week-card { padding: 23px; }
.week-card h2 { font-size: 19px; }
.balance-badge { padding: 6px 8px; border-radius: 8px; background: #f2f4f7; color: #475467; font-size: 11px; font-weight: 800; }
.balance-badge.is-positive { background: var(--success-pale); color: var(--success); }
.balance-badge.is-negative { background: #fff2f2; color: var(--danger); }
.progress-track { height: 7px; margin: 17px 0 20px; overflow: hidden; border-radius: 999px; background: #edf0f5; }
.progress-track span { display: block; width: 0; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--blue), #60a5fa); transition: width .25s; }
.recent-days { display: grid; gap: 3px; }
.recent-day { display: grid; grid-template-columns: 1fr auto; gap: 12px; align-items: center; padding: 9px 0; border-top: 1px solid #f0f1f3; }
.recent-day:first-child { border-top: 0; }
.recent-day div { display: flex; gap: 10px; align-items: center; }
.recent-day i { display: grid; place-items: center; width: 25px; height: 25px; border-radius: 8px; background: #f2f4f7; color: #98a2b3; font-size: 10px; font-style: normal; font-weight: 800; }
.recent-day.is-complete i { background: var(--blue-pale); color: var(--blue); }
.recent-day span { font-size: 12px; font-weight: 670; }
.recent-day strong { font-size: 12px; }

.stats-heading { align-items: end; }
.stats-controls { display: flex; gap: 10px; align-items: center; }
.period-switcher { display: flex; gap: 3px; padding: 4px; border: 1px solid var(--line); border-radius: 13px; background: white; box-shadow: 0 5px 20px rgba(23, 37, 84, .05); }
.period-switcher button { min-width: 68px; padding: 9px 12px; border: 0; border-radius: 9px; background: transparent; color: var(--muted); cursor: pointer; font-size: 12px; font-weight: 760; }
.period-switcher button.is-active { background: var(--navy); color: white; }
.export-button { display: inline-flex; align-items: center; min-height: 43px; text-decoration: none; white-space: nowrap; }
.stats-toolbar { display: grid; grid-template-columns: 42px 1fr 42px; align-items: center; margin-bottom: 19px; padding: 13px 17px; text-align: center; }
.stats-toolbar span { display: block; color: var(--muted); font-size: 10px; font-weight: 760; text-transform: uppercase; letter-spacing: .08em; }
.stats-toolbar strong { display: block; margin-top: 3px; font-size: 16px; }
.metric-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 15px; margin-bottom: 20px; }
.metric-card { padding: 21px; }
.metric-card > span { color: var(--muted); font-size: 12px; font-weight: 680; }
.metric-card strong { display: block; margin: 11px 0 5px; font-size: 28px; letter-spacing: -.045em; }
.metric-card small { color: #98a2b3; font-size: 10px; }
.metric-card.accent { background: var(--blue-pale); border-color: #caddff; }
.metric-card.accent strong { color: var(--blue-dark); }
.statistics-layout { display: grid; grid-template-columns: 1.7fr .8fr; gap: 20px; }
.chart-card, .calendar-summary { min-height: 285px; padding: 24px; }
.chart-legend { display: flex; gap: 13px; color: var(--muted); font-size: 10px; }
.chart-legend span { display: flex; gap: 5px; align-items: center; }
.chart-legend i { width: 9px; height: 9px; border-radius: 3px; }
.chart-legend .actual { background: var(--blue); }
.chart-legend .target { background: #cbd5e1; }
.weekly-chart { display: flex; gap: 12px; align-items: end; height: 190px; margin-top: 18px; padding-top: 13px; border-bottom: 1px solid var(--line); }
.chart-column { display: flex; flex: 1; flex-direction: column; justify-content: end; min-width: 32px; height: 100%; text-align: center; }
.chart-bars { display: flex; gap: 4px; align-items: end; justify-content: center; height: 150px; }
.chart-bar { width: min(18px, 38%); min-height: 2px; border-radius: 5px 5px 0 0; background: var(--blue); }
.chart-bar.target { background: #d6dce6; }
.chart-column small { display: block; margin: 8px 0 -20px; color: var(--muted); font-size: 9px; }
.calendar-summary .summary-list { margin-top: 20px; }
.calendar-summary .summary-list div { padding: 12px 0; border-bottom: 1px solid var(--line); }
.calendar-summary .summary-list dt { color: var(--muted); }
.calendar-summary .summary-list dd { font-size: 15px; }
.calendar-note { margin: 18px 0 0; color: var(--muted); font-size: 10px; line-height: 1.55; }
.day-table-card { margin-top: 20px; padding: 24px; }
.table-scroll { overflow-x: auto; margin-top: 16px; }
table { width: 100%; border-collapse: collapse; white-space: nowrap; }
th { padding: 10px 12px; color: var(--muted); font-size: 10px; text-align: left; text-transform: uppercase; letter-spacing: .06em; }
td { padding: 12px; border-top: 1px solid var(--line); font-size: 12px; }
td strong { font-weight: 760; }
.calendar-pill { display: inline-block; max-width: 190px; overflow: hidden; padding: 5px 8px; border-radius: 8px; background: #f2f4f7; color: var(--muted); text-overflow: ellipsis; vertical-align: middle; }
.calendar-pill.holiday { background: #fff6e8; color: #9a6200; }
.positive { color: var(--success); }
.negative { color: var(--danger); }

.modal { width: min(470px, calc(100% - 30px)); padding: 0; border: 0; border-radius: 22px; box-shadow: 0 30px 80px rgba(15, 23, 42, .28); }
.modal::backdrop { background: rgba(15, 23, 42, .48); backdrop-filter: blur(3px); }
.modal form { display: grid; gap: 10px; padding: 26px; }
.modal-heading { display: flex; justify-content: space-between; align-items: start; margin-bottom: 8px; }
.modal h2 { margin: 3px 0 0; font-size: 22px; letter-spacing: -.035em; }
.modal label { margin-top: 5px; }
.field-help { margin: -4px 0 4px; color: var(--muted); font-size: 10px; line-height: 1.4; }
.input-with-suffix { position: relative; }
.input-with-suffix input { padding-right: 62px; }
.input-with-suffix span { position: absolute; top: 15px; right: 14px; color: var(--muted); font-size: 12px; }
.modal .primary-button { margin-top: 10px; }
.small-modal { width: min(420px, calc(100% - 30px)); }
.small-modal p { margin: 2px 0 12px; color: var(--muted); font-size: 13px; line-height: 1.5; }
.modal-actions { display: flex; justify-content: flex-end; gap: 10px; }
.toast { position: fixed; z-index: 50; right: 22px; bottom: 22px; max-width: 340px; padding: 12px 16px; border-radius: 12px; background: var(--navy); color: white; box-shadow: var(--shadow); opacity: 0; pointer-events: none; transform: translateY(15px); transition: .2s; font-size: 12px; font-weight: 680; }
.toast.is-visible { opacity: 1; transform: translateY(0); }
.mobile-nav { display: none; }
.visually-hidden { position: absolute !important; width: 1px !important; height: 1px !important; overflow: hidden !important; clip: rect(1px, 1px, 1px, 1px) !important; white-space: nowrap !important; }

.auth-topbar { grid-template-columns: 1fr auto; }
.auth-main { width: min(980px, calc(100% - 44px)); }
.auth-shell { display: grid; grid-template-columns: minmax(0, .9fr) minmax(390px, 1fr); gap: 34px; align-items: center; min-height: calc(100vh - 220px); }
.auth-copy h1, .security-heading h1, .capabilities-card h1 { margin: 8px 0 13px; font-size: clamp(32px, 5vw, 48px); line-height: 1.04; letter-spacing: -.05em; }
.auth-copy p, .security-heading p, .capabilities-card p, .capabilities-card li { color: var(--muted); line-height: 1.65; }
.auth-card, .dashboard-account-card, .capabilities-card { padding: clamp(22px, 4vw, 36px); border: 1px solid rgba(220, 225, 234, .95); border-radius: 22px; background: var(--surface); box-shadow: var(--shadow); }
.auth-panels { transition: height .2s ease; }
.auth-panel h2 { margin: 0 0 8px; font-size: 24px; letter-spacing: -.035em; }
.auth-panel > p { margin: 0 0 22px; color: var(--muted); line-height: 1.55; }
.auth-form { display: grid; gap: 15px; }
.auth-field { display: grid; gap: 7px; }
.auth-form button, .auth-tab-button { min-height: 48px; padding: 11px 17px; border: 1px solid var(--blue); border-radius: 13px; background: var(--blue); color: white; cursor: pointer; font-weight: 780; }
.auth-form button:disabled, .dashboard-account-card button:disabled { cursor: not-allowed; opacity: .55; }
.auth-tabs { display: grid; grid-template-columns: 1fr 1fr; gap: 7px; margin-top: 22px; padding-top: 18px; border-top: 1px solid var(--line); }
.auth-tab-button { min-height: 42px; border-color: transparent; background: transparent; color: var(--muted); }
.auth-tab-button[aria-selected="true"] { border-color: #caddff; background: var(--blue-pale); color: var(--blue-dark); }
.auth-banner, .dashboard-banner { margin: 0 0 16px; padding: 11px 13px; border-radius: 12px; font-size: 13px; line-height: 1.45; }
.auth-banner-error, .dashboard-banner-error { border: 1px solid #f0caca; background: #fff6f6; color: var(--danger); }
.auth-banner-success, .dashboard-banner-success { border: 1px solid #b7ebc7; background: var(--success-pale); color: var(--success); }
.security-heading { margin-bottom: 25px; }
.security-heading h1 { font-size: clamp(30px, 4vw, 42px); }
.dashboard-section-heading { display: flex; gap: 18px; align-items: center; justify-content: space-between; }
.dashboard-section-heading h2 { margin: 4px 0 0; font-size: 24px; letter-spacing: -.035em; }
.dashboard-label { margin: 0; color: var(--blue); font-size: 11px; font-weight: 820; letter-spacing: .13em; text-transform: uppercase; }
.dashboard-helper { margin: 13px 0 20px; color: var(--muted); line-height: 1.55; }
.passkey-name-form { display: grid; gap: 14px; margin: 18px 0; padding: 18px; border: 1px solid var(--line); border-radius: 16px; background: var(--canvas); }
.dashboard-field { display: grid; gap: 7px; }
.passkey-name-actions, .passkey-actions { flex-wrap: wrap; gap: 9px; }
.passkey-list { display: grid; gap: 11px; }
.passkey-row { gap: 18px; padding: 17px; border: 1px solid var(--line); border-radius: 16px; }
.passkey-copy { gap: 3px; }
.passkey-copy strong { font-size: 15px; }
.passkey-copy span { color: var(--muted); font-size: 11px; }
.dashboard-empty { padding: 22px; border: 1px dashed #cfd7e5; border-radius: 16px; text-align: center; }
.dashboard-empty h3 { margin: 0 0 5px; }
.dashboard-empty p { margin: 0; color: var(--muted); }
.item-modal { z-index: 60; padding: 18px; }
.item-modal-backdrop { width: 100%; border: 0; background: rgba(15, 23, 42, .48); backdrop-filter: blur(3px); }
.item-edit-panel { width: min(480px, 100%); padding: 26px; border: 1px solid var(--line); border-radius: 22px; background: white; box-shadow: 0 30px 80px rgba(15, 23, 42, .28); }
.add-item-panel-header { display: flex; gap: 18px; align-items: start; justify-content: space-between; }
.add-item-panel-header h3 { margin: 4px 0 0; font-size: 22px; }
.add-item-close { width: 38px; min-height: 38px; border: 1px solid var(--line); border-radius: 12px; background: white; cursor: pointer; font-size: 22px; }
.capabilities-card { max-width: 720px; margin: 0 auto; }
.capabilities-card ul { margin: 20px 0 26px; padding-left: 22px; }

@media (max-width: 900px) {
  .tracker-layout, .statistics-layout { grid-template-columns: 1fr; }
  .auth-shell { grid-template-columns: 1fr; min-height: auto; }
  .summary-column { grid-template-columns: 1fr 1fr; }
  .metric-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 640px) {
  body { background: var(--canvas); }
  .topbar { grid-template-columns: 1fr auto; min-height: 62px; padding: 0 18px; }
  .primary-nav { display: none; }
  .brand { font-size: 19px; }
  .brand-mark { width: 28px; height: 28px; }
  main { width: calc(100% - 24px); padding: 28px 0 105px; }
  .page-heading { display: block; margin-bottom: 20px; }
  .page-heading h1 { font-size: 30px; }
  .local-badge { margin-top: 16px; }
  .tracker-layout { gap: 14px; }
  .card { border-radius: 18px; }
  .entry-card { padding: 17px; }
  .time-fields { grid-template-columns: 1fr 1fr; gap: 10px; }
  .time-arrow { display: none; }
  .time-field input { min-height: 54px; font-size: 20px; }
  .break-row { grid-template-columns: 1fr 34px; }
  .break-row > select { grid-column: 1; }
  .break-row > div { grid-column: 1; }
  .break-row .remove-break { grid-column: 2; grid-row: 1 / span 2; }
  .entry-actions { align-items: stretch; flex-direction: column-reverse; }
  .entry-actions .primary-button { width: 100%; }
  .summary-column { grid-template-columns: 1fr; }
  .live-summary { padding: 24px; }
  .big-hours { font-size: 54px; }
  .stats-heading { display: block; }
  .stats-controls { align-items: stretch; flex-direction: column; margin-top: 18px; }
  .period-switcher { margin-top: 0; }
  .period-switcher button { flex: 1; }
  .export-button { justify-content: center; }
  .metric-grid { gap: 10px; }
  .metric-card { padding: 17px; }
  .metric-card strong { font-size: 23px; }
  .chart-card, .calendar-summary, .day-table-card { padding: 18px; }
  .topbar:not(.auth-topbar) .account-actions > .header-link,
  .topbar:not(.auth-topbar) .account-actions > form { display: none; }
  .mobile-nav { position: fixed; z-index: 30; right: 0; bottom: 0; left: 0; display: grid; grid-template-columns: repeat(4, 1fr); min-height: 69px; padding: 5px 8px max(5px, env(safe-area-inset-bottom)); border-top: 1px solid var(--line); background: rgba(255, 255, 255, .94); backdrop-filter: blur(18px); }
  .mobile-nav .nav-item { flex-direction: column; gap: 1px; font-size: 10px; }
  .mobile-nav .nav-item span { font-size: 18px; }
  .toast { right: 12px; bottom: 82px; left: 12px; max-width: none; text-align: center; }
  .auth-main { width: calc(100% - 24px); }
  .auth-copy h1 { font-size: 34px; }
  .auth-card, .dashboard-account-card, .capabilities-card { border-radius: 18px; }
  .passkey-row, .dashboard-section-heading { align-items: stretch; flex-direction: column; }
}
