:root {
  font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-synthesis: none;
  font-size: 14px;
  color: #203b36;
  background: #f6f7f4;
  --ink: #203b36;
  --muted: #667970;
  --accent: #274f40;
  --line: #e0e7df;
  --radius: 12px;
}
* { box-sizing: border-box; }
body { margin: 0; line-height: 1.5; }
body:has(dialog[open]) { overflow: hidden; }
button, input, select, textarea { font: inherit; }
button, a, input, select, textarea { -webkit-tap-highlight-color: transparent; }
button { border: 0; cursor: pointer; transition: background .15s, box-shadow .15s; }
button:disabled { opacity: .55; cursor: not-allowed; }
a { color: inherit; text-decoration: none; }
button:focus-visible, a:focus-visible { outline: 3px solid #80ad9b; outline-offset: 3px; }
input:focus, select:focus, textarea:focus { outline: 2px solid #80ad9b; outline-offset: 1px; }
input[aria-invalid=true] { border-color: #a6574b; }
button, input, select, textarea { touch-action: manipulation; }
[hidden] { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
h1 { font-size: clamp(25px, 2.6vw, 32px); line-height: 1.2; letter-spacing: -.9px; font-weight: 600; margin: 10px 0; }
h2, h3 { line-height: 1.3; }
p { color: var(--muted); line-height: 1.65; margin: 0; }
strong { font-weight: 600; }
.eyebrow { font-size: 11px; letter-spacing: 1.4px; font-weight: 650; color: var(--muted); text-transform: uppercase; }
.shell { display: flex; min-height: 100vh; min-height: 100dvh; }
.sidebar { width: 248px; flex-shrink: 0; position: sticky; top: 0; height: 100vh; height: 100dvh; overflow-y: auto; background: #fff; border-right: 1px solid var(--line); padding: 30px 20px; display: flex; flex-direction: column; }
.brand { display: flex; align-items: center; gap: 10px; font-size: 21px; font-weight: 650; letter-spacing: -.7px; white-space: nowrap; }
.brandmark { width: 36px; height: 36px; flex-shrink: 0; display: grid; place-items: center; background: var(--accent); color: #fff; font-size: 23px; border-radius: 10px; }
.location { font-size: 12px; color: var(--muted); display: flex; align-items: center; gap: 7px; padding: 16px 0 30px 4px; }
.live-dot { width: 6px; height: 6px; background: #8baf78; border-radius: 50%; }
nav { display: grid; gap: 6px; }
nav button { display: flex; align-items: center; gap: 8px; min-height: 44px; text-align: left; padding: 10px 12px; background: transparent; color: var(--muted); font-size: 13px; border-radius: 8px; line-height: 1.4; }
nav button span { font-size: 20px; flex-shrink: 0; }
nav button .nav-chevron { margin-left: auto; font-size: 17px; }
nav button.active, nav button.selected { background: #edf3ed; color: var(--accent); font-weight: 600; }
.overview-subnav { display: grid; gap: 4px; margin: 0 0 8px 20px; padding-left: 12px; border-left: 1px solid var(--line); }
.overview-subnav button { font-size: 12px; padding: 9px 10px; }
.sidebar-bottom { margin-top: auto; padding-top: 24px; }
.local-tag { font-size: 10px; letter-spacing: 1px; color: var(--muted); margin-bottom: 20px; }
.profile { display: flex; align-items: center; gap: 10px; border-top: 1px solid var(--line); padding-top: 16px; }
.profile>div { min-width: 0; flex: 1; }
.profile strong { font-size: 13px; display: block; overflow-wrap: anywhere; }
.profile small { display: block; color: var(--muted); font-size: 11px; margin-top: 3px; }
.avatar { width: 36px; height: 36px; flex-shrink: 0; display: grid; place-items: center; background: #eeeade; color: #776f55; border-radius: 50%; }
.profile .icon-button { margin-left: auto; flex-shrink: 0; }
.main { width: 100%; min-width: 0; max-width: 1530px; margin: 0 auto; padding: 36px clamp(24px, 3vw, 48px); }
.page-header { display: flex; align-items: center; justify-content: space-between; gap: 24px; margin-bottom: 28px; }
.page-header>div { min-width: 0; }
.page-header p { font-size: 14px; }
.primary { background: var(--accent); color: #fff; border-radius: 8px; min-height: 44px; padding: 11px 18px; display: inline-flex; align-items: center; justify-content: center; gap: 8px; font-size: 13px; font-weight: 600; line-height: 1.4; }
.primary span { font-size: 21px; line-height: 1; }
.secondary, .today-button { background: #fff; color: #51675b; border: 1px solid var(--line); border-radius: 8px; min-height: 44px; padding: 10px 14px; font-size: 13px; }
.icon-button { background: transparent; display: inline-grid; place-items: center; min-width: 44px; height: 44px; color: var(--muted); font-size: 24px; border-radius: 8px; }
.text-button { min-height: 44px; padding: 8px 0; background: none; color: #3b6b50; font-size: 13px; font-weight: 600; line-height: 1.5; }
@media (hover: hover) {
  .primary:hover { background: #163a2c; box-shadow: 0 3px 8px #15392c18; }
  nav button:hover, .icon-button:hover { background: #edf2ea; }
  .text-button:hover { text-decoration: underline; }
  .day:hover { background: #f7faf4; }
  .entry:hover { filter: brightness(.97); }
  .day:hover .plus { opacity: 1; }
}
.stats { display: grid; grid-template-columns: 1fr 1fr 1.1fr; gap: 16px; margin-bottom: 24px; }
.stats article { min-width: 0; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; }
.stat-label { font-size: 13px; color: var(--muted); display: flex; align-items: center; gap: 8px; justify-content: space-between; }
.stats strong { display: block; font-size: clamp(24px, 2.4vw, 30px); font-weight: 600; letter-spacing: -.7px; margin: 12px 0; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.stats strong small { font-size: 13px; font-weight: 400; margin-left: 8px; letter-spacing: 0; color: var(--muted); }
.stats article>div { font-size: 12px; color: var(--muted); line-height: 1.6; }
.sample-badge { flex-shrink: 0; font-size: 9px; background: #f6f4e9; color: #786e48; padding: 4px 6px; border-radius: 4px; letter-spacing: .4px; }
.stats .net-card { background: #eaf0e5; border-color: #dfe8d8; }
.net-card strong { color: #2e533d; }
.net-card .text-button { margin-left: 6px; text-decoration: underline; }
.unemployment-summary, .meal-summary, .recup-summary { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 18px 20px; margin-bottom: 12px; border: 1px solid var(--line); border-radius: var(--radius); }
.unemployment-summary { background: #f0f4f3; }
.meal-summary { background: #fbf8ee; border-color: #e6dfcd; }
.recup-summary { background: #edf4ef; border-color: #dbe6df; margin-bottom: 24px; }
.unemployment-summary>div:first-child, .meal-summary>div:first-child, .recup-summary>div { min-width: 0; }
.unemployment-summary strong, .meal-summary strong, .recup-summary strong { font-size: 14px; }
.unemployment-summary small, .meal-summary small, .recup-summary small { display: block; margin-top: 6px; font-size: 12px; line-height: 1.6; color: var(--muted); }
.monthly-amount, .meal-total { text-align: right; max-width: 45%; flex-shrink: 0; }
.monthly-amount strong, .meal-total strong { font-size: 24px; white-space: nowrap; font-variant-numeric: tabular-nums; }
.recup-summary .text-button { flex-shrink: 0; }
.calendar-panel, .saved-recup, .wage-history, .personal-history { background: white; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.calendar-toolbar { padding: 18px 20px; display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; }
.month-nav { display: flex; align-items: center; gap: 4px; min-width: 0; }
.month-nav h2 { font-size: 21px; font-weight: 600; letter-spacing: -.4px; margin: 0 12px 0 0; text-transform: capitalize; }
.period-tabs { display: flex; border: 1px solid var(--line); border-radius: 8px; padding: 3px; background: #fafbf8; }
.period-tabs button { min-height: 44px; font-size: 12px; background: none; padding: 8px 12px; color: var(--muted); border-radius: 6px; white-space: nowrap; }
.period-tabs button.selected { background: #fff; color: #355a40; box-shadow: 0 1px 4px #172c1312; font-weight: 600; }
.weekday-row { display: grid; grid-template-columns: repeat(7,minmax(0,1fr)); border-block: 1px solid var(--line); background: #fcfdfb; }
.weekday-row span { text-align: right; padding: 10px 12px; font-size: 11px; letter-spacing: .8px; color: var(--muted); }
.calendar-grid { display: grid; grid-template-columns: repeat(7,minmax(0,1fr)); }
.day { position: relative; min-height: 120px; border-right: 1px solid #e9ece5; border-bottom: 1px solid #e9ece5; padding: 5px; min-width: 0; }
.day:nth-child(7n) { border-right: 0; }
.day:nth-child(7n), .day:nth-child(7n-1) { background: #fcfdfb; }
.day.muted { background: #fafbf8; color: #a5afa1; }
.day.muted .day-entries { opacity: .55; }
.day-add { display: flex; width: 100%; min-height: 36px; align-items: center; flex-direction: row-reverse; justify-content: space-between; background: transparent; color: inherit; font-size: 12px; padding: 3px 4px; border-radius: 6px; }
.day-number { height: 26px; min-width: 26px; display: grid; place-items: center; }
.is-today .day-number { background: #2a5643; color: #fff; border-radius: 50%; }
.plus { opacity: 0; color: #6f886c; }
.day-add:focus-visible .plus { opacity: 1; }
.day-entries { display: grid; gap: 5px; }
.entry { width: 100%; min-width: 0; min-height: 44px; display: block; text-align: left; background: #edf3e7; color: #4c6c38; border-left: 2px solid #a4bc85; border-radius: 5px; padding: 8px 6px; overflow-wrap: anywhere; }
.entry.late { background: #f8f0e2; color: #80622d; border-color: #d5b16c; }
.entry.night { background: #eeedf7; color: #655b8d; border-color: #a399c3; }
.entry.unemployment { background: #eff2f0; color: #5f7569; border-color: #b4beb8; }
.entry.recup { background: #e2f0eb; border-color: #72a696; color: #3f695b; }
.entry-name { font-weight: 600; font-size: 12px; display: block; }
.entry small { font-size: 10px; display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; margin-top: 4px; }
.entry .overnight-start { white-space: normal; font-size: 10px; font-weight: 550; margin-top: 5px; line-height: 1.4; }
.entry-amount { font-size: 11px; margin-top: 8px; display: block; font-weight: 600; }
.mobile-entry-name, .mobile-entry-amount, .mobile-entry-start { display: none; }
.calendar-footer { padding: 16px 20px; display: flex; justify-content: space-between; font-size: 11px; color: var(--muted); gap: 16px; }
.legend { display: flex; gap: 10px 16px; flex-wrap: wrap; }
.legend span { display: flex; align-items: center; gap: 6px; }
.legend i { width: 7px; height: 7px; border-radius: 50%; background: #a4bc85; flex-shrink: 0; }
.legend i.late { background: #d5b16c; }
.legend i.night { background: #a399c3; }
.legend i.unemployment { background: #b4beb8; }
.legend i.recup { background: #72a696; }
.under-calendar { display: flex; justify-content: space-between; align-items: flex-start; margin: 16px 0 24px; gap: 20px; }
.under-calendar p { font-size: 12px; }
.under-calendar button { white-space: nowrap; flex-shrink: 0; }
.pay-periods { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 16px; }
.pay-card { min-width: 0; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); display: flex; align-items: center; justify-content: space-between; padding: 20px; gap: 20px; flex-wrap: wrap; }
.pay-card .eyebrow { font-size: 10px; letter-spacing: 1px; }
.pay-card h3 { font-size: 16px; font-weight: 600; margin: 7px 0; }
.pay-card p { font-size: 12px; }
.pay-amount { text-align: right; min-width: 0; margin-left: auto; }
.pay-amount strong { display: block; font-size: 24px; letter-spacing: -.5px; font-variant-numeric: tabular-nums; }
.pay-amount small { display: block; font-size: 12px; color: var(--muted); margin-top: 7px; line-height: 1.6; }
.empty-state { text-align: center; padding: 60px 24px; }
.empty-state>span { font-size: 32px; color: #8aa27b; }
.empty-state h3 { font-size: 22px; font-weight: 600; margin: 16px 0 10px; }
.empty-state p { font-size: 14px; }
.table-scroll { overflow-x: auto; overscroll-behavior-x: contain; }
table { width: 100%; border-collapse: collapse; font-size: 13px; }
th, td { text-align: left; padding: 16px; border-top: 1px solid var(--line); vertical-align: top; }
th { font-size: 12px; color: var(--muted); background: #fafbf8; font-weight: 600; }
td { overflow-wrap: break-word; }
.provisional { display: block; font-size: 11px; color: #786e48; margin-top: 5px; line-height: 1.5; }
label { display: block; font-size: 14px; font-weight: 550; color: #516b59; margin-bottom: 20px; }
input, select, textarea { display: block; width: 100%; min-width: 0; min-height: 46px; padding: 11px 12px; border: 1px solid #d8e2d4; border-radius: 8px; background: #fff; color: #2d4938; margin-top: 7px; font-size: 16px; line-height: 1.4; }
textarea { resize: vertical; }
input[type=checkbox], input[type=radio] { min-height: 0; width: 18px; height: 18px; flex-shrink: 0; margin: 0; accent-color: var(--accent); }
label small { display: block; font-size: 12px; font-weight: 400; color: var(--muted); margin-top: 7px; line-height: 1.5; }
.optional, .favorite-hint { font-size: 12px; font-weight: 400; color: var(--muted); margin-left: 5px; }
dialog { border: 1px solid var(--line); border-radius: 16px; width: 500px; max-width: calc(100vw - 32px); max-height: calc(100vh - 48px); max-height: calc(100dvh - 48px); overflow: auto; overscroll-behavior: contain; padding: 24px; color: var(--ink); box-shadow: 0 20px 100px #19352733; }
dialog::backdrop { background: #15332170; backdrop-filter: blur(3px); }
.dialog-header { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
dialog h2 { font-size: 27px; letter-spacing: -.6px; font-weight: 600; margin: 12px 0 8px; }
.dialog-subtitle { font-size: 14px; margin-bottom: 24px; }
.kind-toggle { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 8px; padding: 0; border: 0; margin: 0 0 20px; min-width: 0; }
.kind-toggle label { display: flex; align-items: center; gap: 8px; background: #f5f8f3; border: 1px solid var(--line); padding: 12px; min-height: 48px; border-radius: 8px; margin: 0; font-size: 13px; cursor: pointer; }
.kind-toggle label:last-child { grid-column: 1/-1; }
.kind-toggle label:has(input:checked) { background: #eaf2e8; border-color: #82a78f; color: var(--accent); }
.entry-timing { padding: 14px; margin: 0 0 20px; background: #f3f2f8; border: 1px solid #e5e2ef; border-radius: 8px; display: grid; gap: 9px; font-size: 12px; }
.entry-timing>div { display: flex; justify-content: space-between; gap: 12px; }
.entry-timing span { color: #736b85; }
.entry-timing strong { text-align: right; color: #655b80; }
.date-control { display: flex; align-items: center; gap: 8px; position: relative; }
.date-control input[type=text] { flex: 1; min-width: 0; }
.date-control #choose-date { height: 46px; width: 46px; flex-shrink: 0; margin-top: 7px; border: 1px solid var(--line); font-size: 23px; }
.date-control #date-picker { position: absolute; right: 0; bottom: 0; width: 46px; height: 46px; margin: 0; padding: 0; clip: auto; opacity: 0; cursor: pointer; }
.field-pair { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 12px; }
.recup-save { padding: 14px; border: 1px solid var(--line); border-radius: 8px; background: #f5f8f3; display: grid; grid-template-columns: 18px minmax(0,1fr); align-items: start; gap: 10px; cursor: pointer; }
.recup-save input { margin-top: 2px; }
.recup-save small { grid-column: 2; margin: 0; }
.entry-estimate { display: flex; align-items: center; justify-content: space-between; gap: 16px; background: #eff4e9; padding: 16px; border-radius: 8px; font-size: 14px; }
.entry-estimate small { display: block; margin-top: 5px; font-size: 11px; color: var(--muted); }
.entry-estimate strong { font-size: 26px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.wage-breakdown { padding: 14px 2px; font-size: 13px; }
.wage-breakdown>div { display: flex; justify-content: space-between; gap: 14px; margin: 8px 0; color: var(--muted); }
.wage-breakdown strong { text-align: right; flex-shrink: 0; max-width: 55%; }
.wage-breakdown small { display: block; color: var(--muted); font-size: 12px; margin: 12px 0; line-height: 1.6; }
.estimate-notice { font-size: 12px; color: #866232; }
.dialog-actions { display: flex; justify-content: space-between; margin-top: 24px; gap: 12px; align-items: center; }
.delete-button { background: none; color: #a6574b; font-size: 14px; min-height: 44px; padding: 8px 0; }
.error { color: #a6574b; font-size: 13px; line-height: 1.6; margin-top: 12px; }
.error:empty { display: none; }
.settings-panel { background: white; border: 1px solid var(--line); border-radius: var(--radius); padding: 28px; max-width: 760px; }
.settings-panel h2 { font-size: 20px; font-weight: 600; margin: 0 0 10px; }
.settings-panel p { font-size: 14px; margin-bottom: 24px; }
.settings-panel form { max-width: 600px; }
.settings-panel hr { border: 0; border-top: 1px solid var(--line); margin: 28px 0; }
.placeholder-note { font-size: 12px; background: #f7f5e9; color: #786e48; padding: 16px; margin-top: 24px; border-radius: 8px; line-height: 1.7; }
dialog .placeholder-note { margin: 0 0 20px; }
.qualification-list { border: 0; padding: 4px; margin: 16px -4px; display: grid; gap: 8px; max-height: 380px; overflow: auto; overscroll-behavior: contain; min-width: 0; }
.qualification-list label { display: flex; align-items: center; gap: 12px; margin: 0; padding: 12px; border: 1px solid var(--line); border-radius: 8px; cursor: pointer; font-size: 14px; }
.qualification-list label>span { min-width: 0; overflow-wrap: anywhere; }
.qualification-list label:has(input:checked) { background: #edf4ef; border-color: #97b5a3; }
.qualification-list small { font-size: 11px; }
.fixed-payroll { display: grid; gap: 12px; padding: 16px; margin: 16px 0; background: #f5f8f2; border: 1px solid var(--line); border-radius: 8px; }
.fixed-payroll>div { display: flex; justify-content: space-between; font-size: 14px; gap: 16px; }
.fixed-payroll strong { white-space: nowrap; }
.saved-recup { margin: 0; }
.saved-recup header, .personal-history header { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 24px; }
.saved-recup h2, .personal-history h2, .wage-heading h2 { margin: 0 0 8px; font-size: 21px; font-weight: 600; }
.saved-recup p, .personal-history p, .wage-heading p, .wage-history footer p { font-size: 13px; }
.saved-recup header>strong { font-size: 14px; color: #477357; }
.recup-totals { display: flex; flex-wrap: wrap; gap: 12px 24px; padding: 0 24px 20px; font-size: 13px; color: var(--muted); }
.recup-totals strong { color: #3e6551; margin-left: 5px; }
.recup-empty { padding: 24px; font-size: 14px; line-height: 1.7; color: var(--muted); }
.wage-selectors { display: grid; grid-template-columns: minmax(0,1fr) minmax(0,1.8fr); gap: 20px; padding: 24px; }
.wage-selectors label { margin: 0; }
.wage-heading { display: flex; align-items: center; justify-content: space-between; padding: 0 24px 24px; gap: 16px; }
.wage-history footer, .personal-history footer { padding: 20px 24px; display: grid; gap: 10px; border-top: 1px solid var(--line); }
.base-wage-row { background: #f1f6ec; }
.personal-history header label { margin: 0; min-width: 140px; }
.personal-history td:first-child strong { font-weight: 600; }
.history-change { font-weight: 600; white-space: nowrap; }
.history-change.increase { color: #477357; }
.history-change.decrease { color: #9a705b; }
.personal-history td:last-child button { white-space: nowrap; }
#toast { position: fixed; bottom: max(24px,env(safe-area-inset-bottom)); left: 50%; transform: translate(-50%,20px); width: max-content; max-width: calc(100vw - 32px); background: #254d3b; color: white; padding: 14px 20px; border-radius: 10px; font-size: 14px; opacity: 0; pointer-events: none; transition: .2s; z-index: 20; }
#toast.show { opacity: 1; transform: translate(-50%,0); }
.auth { min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 40px 20px; background: radial-gradient(ellipse at 50% 30%,#eaf0e1 0%,#f6f7f4 60%); }
.auth .brand { margin-bottom: 32px; }
.port { font-size: 10px; letter-spacing: 1px; border-left: 1px solid #bccaba; padding-left: 12px; margin-left: 4px; }
.auth-card { background: #fff; border: 1px solid var(--line); border-radius: 16px; padding: 32px; width: 440px; max-width: 100%; box-shadow: 0 10px 40px #29482106; }
.auth-card h1 { font-size: 32px; margin: 14px 0; }
.auth-card>p { font-size: 14px; }
.auth-card form { margin-top: 24px; }
.wide { width: 100%; justify-content: space-between; }
.auth-switch { text-align: center; margin-top: 16px !important; font-size: 14px !important; }
.auth-switch button { margin-left: 4px; }
.auth-foot { text-align: center; font-size: 12px; color: var(--muted); margin-top: 20px; padding-top: 20px; border-top: 1px solid var(--line); }
.auth-notice { font-size: 12px; color: var(--muted); text-align: center; max-width: 440px; margin-top: 24px; line-height: 1.6; }
@media (min-width: 1500px) { .day { min-height: 140px; } }
@media (max-width: 1200px) and (min-width: 1025px) { .sidebar { width: 220px; padding: 26px 16px; } .main { padding: 28px 24px; } .stats { gap: 12px; } .stats article { padding: 16px; } }
@media (max-width: 1024px) {
  .shell { display: block; }
  .sidebar { width: 100%; height: auto; position: static; padding: 16px 24px; display: grid; grid-template-columns: 1fr auto; gap: 16px; border-right: 0; border-bottom: 1px solid var(--line); overflow: visible; }
  .sidebar .location, .local-tag, .avatar { display: none; }
  .sidebar nav { grid-column: 1/-1; grid-row: 2; display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 8px; }
  .sidebar nav>button { justify-content: center; }
  .sidebar nav>button[data-view=settings] { grid-column: 3; grid-row: 1; }
  .overview-subnav { grid-column: 1/-1; grid-row: 2; grid-template-columns: repeat(4,minmax(0,1fr)); margin: 0; padding: 8px 0 0; border-left: 0; border-top: 1px solid var(--line); }
  .overview-subnav button { justify-content: center; text-align: center; }
  nav button .nav-chevron { margin-left: 0; }
  .sidebar-bottom { grid-column: 2; grid-row: 1; margin: 0; padding: 0; }
  .profile { border: 0; padding: 0; }
  .profile>div { text-align: right; }
  .profile strong { font-size: 12px; max-width: 170px; }
  .profile small { font-size: 11px; }
  .main { padding: 28px 24px; }
  .stats strong { font-size: 28px; }
  .calendar-footer>span { display: none; }
  .pay-card { flex-direction: column; align-items: flex-start; }
  .pay-amount { text-align: left; margin: 0; }
}
@media (max-width: 700px) {
  .sidebar { padding: 12px 16px; gap: 12px; }
  .brand { font-size: 20px; }
  .profile strong { max-width: 100px; }
  .sidebar nav { gap: 4px; }
  .sidebar nav>button { padding: 8px 4px; font-size: 12px; gap: 5px; }
  .sidebar nav>button span { font-size: 18px; }
  .overview-subnav { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 6px; }
  .main { padding: 24px 16px; }
  .page-header { flex-direction: column; align-items: stretch; gap: 16px; margin-bottom: 24px; }
  .page-header .primary { align-self: flex-start; }
  .page-header h1 { max-width: none; font-size: 28px; }
  .stats { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 10px; margin-bottom: 16px; }
  .stats article { padding: 16px; }
  .stats article:first-child { grid-column: 1/-1; display: grid; grid-template-columns: 1fr auto; gap: 6px 16px; align-items: center; }
  .stats article:first-child strong { grid-column: 2; grid-row: 1/3; margin: 0; }
  .stat-label { align-items: flex-start; flex-wrap: wrap; font-size: 12px; }
  .stats strong { font-size: clamp(21px,5.7vw,30px); margin: 10px 0; }
  .stats strong small { font-size: 12px; }
  .net-card .text-button { display: block; margin: 0; }
  .unemployment-summary, .meal-summary, .recup-summary { padding: 16px; gap: 16px; align-items: flex-start; }
  .unemployment-summary { flex-wrap: wrap; }
  .monthly-amount { max-width: 100%; text-align: left; }
  .recup-summary { flex-direction: column; gap: 6px; }
  .meal-total strong, .monthly-amount strong { font-size: 24px; }
  .calendar-toolbar { padding: 14px 12px; gap: 12px; }
  .month-nav { width: 100%; }
  .month-nav h2 { font-size: 20px; margin-right: auto; }
  .month-nav .icon-button { min-width: 40px; }
  .today-button { padding: 8px 10px; font-size: 12px; }
  .period-tabs { width: 100%; }
  .period-tabs button { flex: 1; }
  .weekday-row span { font-size: 11px; padding: 10px 0; text-align: center; }
  .day { padding: 3px 2px; min-height: 96px; }
  .day-add { min-height: 44px; padding: 0; justify-content: center; }
  .day-number { width: 28px; height: 28px; }
  .plus { display: none; }
  .entry { padding: 6px 2px; text-align: center; border-left-width: 2px; line-height: 1.4; }
  .entry-name, .entry small, .entry-amount { display: none; }
  .entry .mobile-entry-name { display: block; font-size: 11px; font-weight: 650; }
  .entry .mobile-entry-amount { display: block; font-size: 10px; margin-top: 6px; font-weight: 600; }
  .entry .mobile-entry-start { display: block; font-size: 10px; margin-top: 4px; font-weight: 550; }
  .calendar-footer { padding: 16px 12px; }
  .legend { font-size: 11px; gap: 10px 12px; }
  .under-calendar { flex-direction: column; gap: 4px; margin-bottom: 20px; }
  .pay-periods { grid-template-columns: 1fr; gap: 12px; }
  .pay-card { padding: 20px; gap: 16px; flex-direction: row; }
  .pay-amount { margin-left: auto; text-align: right; }
  .settings-panel { padding: 20px; }
  .wage-selectors { grid-template-columns: minmax(0,1fr); padding: 20px; gap: 16px; }
  .wage-heading { padding: 0 20px 20px; align-items: flex-start; }
  .wage-heading .sample-badge { font-size: 9px; }
  .wage-history table { min-width: 540px; }
  .wage-history .table-scroll { border-top: 1px solid var(--line); }
  .wage-history footer, .personal-history footer { padding: 20px; }
  .saved-recup header, .personal-history header { padding: 20px; align-items: flex-start; flex-direction: column; gap: 16px; }
  .personal-history header label { width: 100%; }
  .recup-totals { padding: 0 20px 20px; gap: 10px 20px; }
  .responsive-table { display: block; }
  .responsive-table thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); }
  .responsive-table tbody { display: grid; gap: 12px; padding: 12px; }
  .responsive-table tr { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 14px; padding: 16px; border: 1px solid var(--line); border-radius: 10px; background: #fff; }
  .responsive-table td { display: block; border: 0; padding: 0; min-width: 0; font-size: 14px; overflow-wrap: anywhere; }
  .responsive-table td::before { content: attr(data-label); display: block; font-size: 11px; color: var(--muted); font-weight: 500; margin-bottom: 4px; }
  .responsive-table td:first-child { grid-column: 1/-1; padding-bottom: 10px; border-bottom: 1px solid var(--line); font-weight: 600; }
  .responsive-table td:last-child { grid-column: 1/-1; text-align: right; }
  .responsive-table td:last-child::before { display: none; }
  .responsive-table td:last-child button { padding: 10px 14px; border-radius: 8px; background: #edf3ed; width: 100%; }
  dialog { padding: 20px; width: 500px; max-width: calc(100vw - 24px); max-height: calc(100vh - 24px); max-height: calc(100dvh - 24px); border-radius: 14px; }
  .dialog-actions { align-items: stretch; }
  .dialog-actions .primary { flex: 1; }
  .auth { padding: 24px 16px max(24px,env(safe-area-inset-bottom)); }
  .auth .brand { margin-bottom: 24px; }
  .auth-card { padding: 24px; }
  .auth-card h1 { font-size: 30px; }
}
@media (max-width: 360px) {
  .sidebar { padding-inline: 12px; }
  .sidebar nav>button { font-size: 11px; }
  .sidebar nav>button span { font-size: 16px; }
  .main { padding-inline: 12px; }
  .profile strong { max-width: 70px; }
  .brand { font-size: 18px; gap: 7px; }
  .month-nav h2 { font-size: 18px; }
  .month-nav .icon-button { min-width: 36px; }
  .today-button { padding-inline: 6px; }
  .stats article { padding: 12px; }
  .field-pair { grid-template-columns: 1fr; gap: 0; }
  .kind-toggle { grid-template-columns: 1fr; }
  .entry-estimate { flex-wrap: wrap; gap: 8px; }
  .entry .mobile-entry-name, .entry .mobile-entry-amount, .entry .mobile-entry-start { font-size: 9px; }
  .dialog-actions { flex-direction: column-reverse; }
  .wage-heading { flex-direction: column; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { transition: none !important; scroll-behavior: auto !important; } }
.horizontal-hint { display: none; }
.date-control:has(#date-picker:focus-visible) #choose-date { outline: 3px solid #80ad9b; outline-offset: 3px; }
@media (max-width: 700px) { .horizontal-hint { display: block; font-size: 12px; padding: 0 20px 14px; } }
/* Keep account labels readable without forcing the header wider. */
@media (max-width: 1024px) {
  .profile strong { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .profile small { white-space: nowrap; }
}
@media (max-width: 700px) {
  .main>.calendar-panel { margin-bottom: 20px; }
  .entry.unemployment .mobile-entry-name { font-size: 9px; }
  .dialog-header { position: sticky; top: -20px; z-index: 1; background: #fff; padding-bottom: 8px; }
}
nav button .nav-label-desktop { font-size: 13px; min-width: 0; flex-shrink: 1; }
nav button .nav-label-mobile { display: none; }
@media (max-width: 1024px) {
  nav button .nav-label-desktop { display: none; }
  nav button .nav-label-mobile { display: inline; font-size: 13px; }
}
@media (max-width: 360px) { nav button .nav-label-mobile { font-size: 11px; } }
.profile strong { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dialog-header { position: sticky; top: -24px; z-index: 1; background: #fff; padding-bottom: 8px; }
.date-field { margin-bottom: 20px; }
.date-field>label { margin-bottom: 0; }
.date-field>small { display: block; margin-top: 7px; font-size: 12px; color: var(--muted); }
.date-control #date-picker::-webkit-calendar-picker-indicator { position: absolute; inset: 0; width: auto; height: auto; opacity: 0; cursor: pointer; }
.mobile-calendar-hint, .mobile-entry-extra { display: none; }
@media (max-width: 700px) {
  .calendar-footer { flex-direction: column; gap: 12px; }
  .calendar-footer .mobile-calendar-hint { display: block; font-size: 11px; }
  .entry .mobile-entry-extra { display: block; font-size: 9px; margin-top: 4px; }
  .dialog-header { top: -20px; }
}
@media (max-width: 1024px) { .sidebar nav>button .nav-label-mobile { font-size: 12px; } }
@media (max-width: 360px) { .sidebar nav>button .nav-label-mobile { font-size: 11px; } }
