/* ══════════════════════════════════════════════════════════════════════
   Mobile app shell — phone-width redesign on the Nocturne palette.
   Scoped entirely under .mob-shell so it never touches the desktop
   Tailwind UI in index.html; activates when app.js's isMobileUI flips
   (viewport < 768px). Self-contained: does not depend on style.css.
   ══════════════════════════════════════════════════════════════════════ */

.mob-shell {
    --nc-bg: #161826;
    --nc-surface: #232532;
    --nc-sunk: #1b1d2c;
    --nc-text: #e9e9ed;
    --nc-divider: rgba(233, 233, 237, .16);
    --nc-n100: #f3f5fe; --nc-n200: #e4e7f5; --nc-n300: #cfd3e5; --nc-n400: #b2b6ca;
    --nc-n500: #9397ab; --nc-n600: #75798c; --nc-n700: #595d6c; --nc-n800: #3f424d; --nc-n900: #292b31;
    --nc-a100: #f5f4ff; --nc-a200: #e7e5fe; --nc-a300: #d2cefd; --nc-a400: #b5abfc; --nc-a500: #968ae0;
    --nc-a600: #796cbf; --nc-a700: #5d5294; --nc-a800: #423a6a; --nc-a900: #2b2741;
    --nc-accent: #9184d9;

    position: fixed;
    inset: 0;
    z-index: 100;
    display: flex;
    flex-direction: column;
    background: var(--nc-bg);
    color: var(--nc-text);
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    font-size: 15px;
    line-height: 1.5;
    -webkit-tap-highlight-color: transparent;
}
.mob-shell * { box-sizing: border-box; }
.mob-shell button, .mob-shell [role="button"] { touch-action: manipulation; }
.mob-shell input::placeholder { color: var(--nc-n700); }

/* Nocturne is a fixed dark palette, independent of the site's light/dark
   theme toggle — but style.css's `html.theme-light input/select/textarea`
   rule is `!important` and untargeted, so it would otherwise repaint every
   mobile input white-on-dark-slate when a device prefers light mode. Match
   its specificity (html + one class + element) and load after it (this
   file is linked after style.css) so the later, equal-specificity rule
   wins the cascade instead of relying on a specificity escalation war. */
html .mob-shell input,
html .mob-shell select,
html .mob-shell textarea {
    background-color: var(--nc-surface) !important;
    color: var(--nc-text) !important;
}

/* — layout — */
.mob-scroll {
    flex: 1;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    padding-top: calc(14px + env(safe-area-inset-top));
    padding-bottom: 24px;
}
.mob-page { padding: 8px 14px 0; }
.mob-page-wide { padding: 8px 18px 0; }
.mob-center { min-height: 100%; display: flex; flex-direction: column; justify-content: center; padding: 0 28px 40px; }

/* — nav row (month/year headers) — */
.mob-navrow { display: flex; align-items: center; justify-content: space-between; margin-bottom: 6px; padding: 0 4px; }
.mob-navrow.wide { margin-bottom: 18px; }
.mob-navbtn {
    width: 44px; height: 44px; border-radius: 8px; flex: none;
    display: flex; align-items: center; justify-content: center;
    cursor: pointer; background: transparent; border: none; color: var(--nc-n400); font-size: 18px;
}
.mob-navbtn:hover, .mob-navbtn:active { background: rgba(233, 233, 237, .07); }
.mob-navtitle { text-align: center; }
.mob-navtitle .t { font-size: 17px; letter-spacing: 0.06em; text-transform: uppercase; }
.mob-navtitle.big .t { font-size: 19px; letter-spacing: 0.1em; }
.mob-back-today {
    font-size: 11px; color: var(--nc-accent); cursor: pointer; margin-top: 2px;
    background: none; border: none; font-family: inherit; padding: 0;
}

/* — stat cards — */
.mob-stats { display: flex; gap: 8px; padding: 0 4px; margin-bottom: 16px; }
.mob-stat { flex: 1; padding: 10px 12px; border-radius: 8px; background: var(--nc-surface); box-shadow: 0 0 0 1px var(--nc-n800); }
.mob-stat.accent { flex: 1.15; box-shadow: 0 0 0 1px var(--nc-a800); }
.mob-stat-label { font-size: 9.5px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--nc-n600); margin-bottom: 3px; }
.mob-stat.accent .mob-stat-label { color: var(--nc-accent); }
.mob-stat-value { font-size: 17px; font-variant-numeric: tabular-nums; }
.mob-stat-value.bright { color: var(--nc-n300); }
.mob-stat.accent .mob-stat-value { color: var(--nc-a400); }
.mob-stats.year .mob-stat-value { font-size: 21px; }

/* — today prompt / summary row (Month tab) — */
.mob-today {
    display: flex; align-items: center; gap: 12px; margin: 0 4px 16px; padding: 12px 14px;
    border-radius: 10px; cursor: pointer; min-height: 56px;
    background: var(--nc-surface); box-shadow: 0 0 0 1px var(--nc-n800);
}
.mob-today.logged { background: var(--nc-a900); box-shadow: 0 0 0 1px var(--nc-a800); }
.mob-today-icon { font-size: 18px; color: var(--nc-accent); flex: none; width: 20px; text-align: center; }
.mob-today-body { flex: 1; min-width: 0; }
.mob-today-title { font-size: 13px; }
.mob-today-note { font-size: 11.5px; color: var(--nc-n600); }

/* — calendar grid — */
.mob-cal-headers { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; margin-bottom: 6px; }
.mob-cal-head { text-align: center; font-size: 10px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--nc-n600); }
.mob-cal-head.sat, .mob-cal-head.sun { color: var(--nc-accent); }
.mob-cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; }
.mob-cal-cell {
    min-height: 62px; border-radius: 8px; padding: 6px 5px; display: flex; flex-direction: column;
    cursor: pointer; background: var(--nc-surface);
}
.mob-cal-cell.adjacent { opacity: 0.4; cursor: default; }
.mob-cal-cell.has-data { box-shadow: 0 0 0 1px var(--nc-n800); }
.mob-cal-cell-top { display: flex; align-items: center; justify-content: space-between; }
/* The day number is a label, the hours are the data — keep them clearly
   apart in weight/brightness so a "3" and an "8.5" can't be read as one. */
.mob-cal-daynum { font-size: 11.5px; font-variant-numeric: tabular-nums; color: var(--nc-n600); }
/* Bonus money sits opposite the day number: it is an amount, not hours, so it
   must not read as part of the figure below it. */
.mob-cal-bonus {
    font-size: 9.5px; font-weight: 600; color: var(--nc-a400); white-space: nowrap;
    overflow: hidden; text-overflow: ellipsis; max-width: 60%;
}
.mob-cal-daynum.today { color: var(--nc-a100); background: var(--nc-accent); border-radius: 9999px; width: 18px; height: 18px; display: flex; align-items: center; justify-content: center; font-size: 10.5px; }
.mob-cal-mark { font-size: 8.5px; letter-spacing: 0.04em; color: var(--nc-accent); }
.mob-cal-hours {
    margin-top: auto; font-variant-numeric: tabular-nums;
    display: flex; align-items: baseline; gap: 3px; flex-wrap: wrap;
}
.mob-cal-h-base { font-size: 14px; font-weight: 500; color: var(--nc-n100); }
.mob-cal-h-ot   { font-size: 11px; font-weight: 600; color: var(--nc-a400); }

/* Forget a remembered account from the login picker. Padded out to a real
   touch target since it sits inside a row that navigates on tap. */
.mob-acc-forget {
    font-size: 14px; color: var(--nc-n600); padding: 10px; margin: -10px 2px -10px 0;
}
.mob-acc-forget:hover { color: #e28080; }

/* — print —
   The shell is `position: fixed` with its own scroll container, so printing
   it untouched emits exactly one clipped viewport on a dark background. Undo
   the shell, let content flow, and drop the chrome that isn't paper. */
@media print {
    .mob-shell {
        position: static !important; inset: auto !important; z-index: auto !important;
        display: block !important; background: #fff !important; color: #000 !important;
    }
    .mob-scroll { overflow: visible !important; height: auto !important; padding: 0 !important; }
    .mob-tabbar, .mob-navbtn, .mob-back-today, .mob-today, .mob-quickfills,
    .mob-sheet-backdrop, .mob-chip-row, .mob-sync { display: none !important; }
    .mob-shell .mob-stat, .mob-shell .mob-cal-cell, .mob-shell .mob-group-card,
    .mob-shell .mob-year-summary, .mob-shell .mob-pay-hero {
        background: #fff !important; box-shadow: 0 0 0 1px #888 !important;
    }
    .mob-shell, .mob-shell * { color: #000 !important; }
    .mob-cal-h-ot, .mob-week-net, .mob-year-net { color: #444 !important; }
    .mob-week-track, .mob-year-track { box-shadow: 0 0 0 1px #bbb; }
    .mob-week-bar, .mob-year-bar { background: #bbb !important; }
}

/* — sync state banner — */
.mob-sync {
    display: flex; align-items: center; gap: 8px; margin-bottom: 10px;
    padding: 8px 12px; border-radius: 8px; font-size: 12px; font-weight: 600;
}
.mob-sync.syncing { background: var(--nc-a900); color: var(--nc-a300); }
.mob-sync.pending { background: #3a3320; color: #e0c986; }
.mob-sync.error   { background: #3d2427; color: #e79aa0; cursor: pointer; }

/* — bulk fill actions — */
.mob-quickfills { display: flex; gap: 8px; margin-bottom: 12px; }
.mob-quickfills .mob-quickfill { flex: 1; }

/* — 4-weekly pay period highlight — */
.mob-cal-cell.in-period { box-shadow: inset 0 0 0 1px var(--nc-a700); }
.mob-cal-cell.in-period.has-data { box-shadow: inset 0 0 0 1px var(--nc-a600); }

/* — week strip — */
.mob-weeks-label { font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--nc-n600); margin: 16px 4px 6px; }
.mob-week-row { display: flex; align-items: center; gap: 10px; padding: 9px 4px; min-height: 44px; }
.mob-week-label { width: 52px; font-size: 11.5px; color: var(--nc-n500); flex: none; }
.mob-week-track { flex: 1; height: 6px; border-radius: 9999px; background: var(--nc-n900); overflow: hidden; }
.mob-week-bar { height: 6px; background: var(--nc-a600); border-radius: 9999px; }
.mob-week-hours { width: 62px; text-align: right; font-size: 12px; font-variant-numeric: tabular-nums; color: var(--nc-n300); flex: none; }
.mob-week-hours .mob-cal-h-base { font-size: 12px; }
.mob-week-hours .mob-cal-h-ot   { font-size: 10px; margin-left: 2px; }
.mob-week-net { width: 74px; text-align: right; font-size: 12.5px; font-variant-numeric: tabular-nums; color: var(--nc-a400); flex: none; }
.mob-week-gross { display: block; font-size: 10px; color: var(--nc-n600); }

/* — year tab — */
.mob-year-summary { border-radius: 14px; background: var(--nc-surface); box-shadow: 0 0 0 1px var(--nc-n800); padding: 16px; margin-bottom: 18px; display: flex; gap: 14px; }
.mob-year-summary-item { flex: 1; }
.mob-year-summary-item.net { flex: 1.2; }
.mob-year-row { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 8px; cursor: pointer; min-height: 52px; }
.mob-year-row.current { background: var(--nc-a900); }
.mob-year-name { width: 38px; font-size: 11.5px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--nc-n500); flex: none; }
.mob-year-row.current .mob-year-name { color: var(--nc-accent); }
.mob-year-track { flex: 1; height: 22px; display: flex; align-items: center; }
.mob-year-bar { height: 22px; border-radius: 4px; background: var(--nc-a700); }
.mob-year-row.current .mob-year-bar { background: var(--nc-accent); }
.mob-year-hours { width: 44px; text-align: right; font-size: 12px; font-variant-numeric: tabular-nums; color: var(--nc-n500); flex: none; }
.mob-year-net { width: 78px; text-align: right; font-size: 13px; font-variant-numeric: tabular-nums; color: var(--nc-n300); flex: none; }
.mob-year-row.current .mob-year-net { color: var(--nc-a400); }

/* — chips / segmented controls — */
.mob-chip-row { display: flex; gap: 6px; }
.mob-chip {
    padding: 9px 14px; border-radius: 8px; font-size: 12.5px; cursor: pointer; min-height: 40px;
    display: flex; align-items: center; justify-content: center; flex: 1;
    background: var(--nc-surface); color: var(--nc-n400); box-shadow: 0 0 0 1px var(--nc-n800); border: none; font-family: inherit;
}
.mob-chip.active { background: var(--nc-a900); color: var(--nc-a300); box-shadow: 0 0 0 1px var(--nc-a800); }
.mob-chip.sm { padding: 8px 10px; font-size: 11px; letter-spacing: 0.06em; text-transform: uppercase; min-height: 0; flex: none; }

/* — pay tab — */
.mob-pay-hero { border-radius: 14px; background: var(--nc-surface); box-shadow: 0 0 0 1px var(--nc-n800); padding: 18px; margin-bottom: 14px; }
.mob-pay-hero-top { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 4px; }
.mob-pay-hero-label { font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--nc-accent); }
.mob-pay-hero-hours { font-size: 11.5px; color: var(--nc-n600); }
.mob-pay-hero-value { font-size: 40px; line-height: 1.1; letter-spacing: -0.03em; font-variant-numeric: tabular-nums; color: var(--nc-a400); }
.mob-pay-hero-sub { font-size: 12.5px; color: var(--nc-n500); margin-top: 4px; }
.mob-section-label { font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--nc-n600); margin: 20px 0 8px; }
.mob-pay-table { border-radius: 14px; background: var(--nc-surface); box-shadow: 0 0 0 1px var(--nc-n800); padding: 6px 16px 12px; }
.mob-pay-table-head { display: flex; gap: 8px; padding: 10px 0 8px; font-size: 9.5px; letter-spacing: 0.07em; text-transform: uppercase; color: var(--nc-n600); }
.mob-pay-row { display: flex; gap: 8px; align-items: baseline; padding: 9px 0; background: linear-gradient(to right, transparent, rgba(233, 233, 237, .08) 10px, rgba(233, 233, 237, .08) calc(100% - 10px), transparent) no-repeat top / 100% 1px; }
.mob-pay-col-cat { flex: 1.4; min-width: 0; }
.mob-pay-col-hrs { width: 40px; text-align: right; flex: none; }
.mob-pay-col-gross { width: 60px; text-align: right; flex: none; }
.mob-pay-col-net { width: 62px; text-align: right; flex: none; }
.mob-pay-row-label { font-size: 13px; }
.mob-pay-row-note { font-size: 10.5px; color: var(--nc-n600); }
.mob-pay-row .mob-pay-col-hrs { font-size: 13px; font-variant-numeric: tabular-nums; }
.mob-pay-row .mob-pay-col-gross { font-size: 12.5px; font-variant-numeric: tabular-nums; color: var(--nc-n500); }
.mob-pay-row .mob-pay-col-net { font-size: 13px; font-variant-numeric: tabular-nums; color: var(--nc-n300); }
.mob-callout { margin-top: 16px; border-radius: 14px; padding: 16px; background: var(--nc-a900); box-shadow: 0 0 0 1px var(--nc-a800); }
.mob-callout-head { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.mob-callout-head i { font-size: 15px; color: var(--nc-a400); }
.mob-callout-head span { font-size: 12px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--nc-a400); }
.mob-callout-body { font-size: 12.5px; line-height: 1.6; color: var(--nc-a300); }
.mob-actions-row { margin-top: 16px; display: flex; gap: 8px; margin-bottom: 8px; }

/* — buttons (Nocturne .btn) — */
.mob-shell .btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 6px;
    cursor: pointer; text-decoration: none; font-family: inherit; font-weight: 500;
    font-size: 14px; line-height: 1.2; color: var(--nc-text);
    background: transparent; border: 1px solid transparent; padding: 6px 10px; border-radius: 8px;
}
.mob-shell .btn:disabled { opacity: 0.45; cursor: not-allowed; }
.mob-shell .btn-primary { color: var(--nc-accent); border-color: var(--nc-accent); }
.mob-shell .btn-primary:hover, .mob-shell .btn-primary:active { background: rgba(145, 132, 217, .16); }
.mob-shell .btn-secondary { border-color: var(--nc-n800); }
.mob-shell .btn-secondary:hover, .mob-shell .btn-secondary:active { background: rgba(233, 233, 237, .08); }
.mob-shell .btn-block { width: 100%; }
.mob-shell .btn-danger { color: #e28080; border-color: #6b3a3a; }
.mob-shell .btn-danger:hover { background: rgba(226, 128, 128, .1); }

/* — fields / inputs (Nocturne .field / .input) — */
.mob-shell .field { display: block; }
.mob-shell .field > label { display: block; font-size: 12px; margin-bottom: 6px; color: var(--nc-n300); }
.mob-shell .field-badge { float: right; font-size: 10px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--nc-n600); }
.mob-shell .field-badge.auto { color: var(--nc-accent); }
.mob-shell .input {
    width: 100%; min-height: 46px; padding: 6px 12px; font: inherit; font-size: 15px;
    color: var(--nc-text); caret-color: var(--nc-accent); background: var(--nc-surface);
    border: 1px solid var(--nc-n800); border-radius: 8px;
}
.mob-shell .input:focus-visible { border-color: var(--nc-accent); outline: none; }
.mob-shell .field-hint { font-size: 11px; color: var(--nc-n600); margin-top: 5px; }
.mob-shell .hr { height: 1px; border: 0; margin: 16px 0; background: linear-gradient(to right, transparent, var(--nc-divider) 20px, var(--nc-divider) calc(100% - 20px), transparent); }

/* — payslip fit cards (Settings › Rates, "from payslip" model) — */
.mob-fit-card { border-radius: 12px; padding: 12px; background: var(--nc-surface); box-shadow: 0 0 0 1px var(--nc-n800); }
.mob-fit-head { display: flex; align-items: baseline; gap: 10px; margin-bottom: 10px; }
.mob-fit-title { flex: 1; font-size: 12px; line-height: 1.45; color: var(--nc-n300); }
.mob-fit-out { font-size: 13px; font-weight: 600; white-space: nowrap; font-variant-numeric: tabular-nums; }
.mob-fit-out.good { color: var(--nc-a400); }
.mob-fit-out.warn { color: #e0bd77; }
.mob-fit-out.bad  { color: #e28080; }
.mob-fit-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.mob-fit-cell { display: block; min-width: 0; }
.mob-fit-cell > span { display: block; font-size: 9.5px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--nc-n600); margin-bottom: 4px; }
.mob-fit-cell.amount { grid-column: 1 / -1; }
.mob-shell .mob-fit-cell .input { min-height: 40px; font-size: 14px; background: var(--nc-sunk); }
.mob-fit-note { margin-top: 9px; font-size: 11px; line-height: 1.5; color: var(--nc-n600); }

/* — toggle switch — */
.mob-toggle-row { display: flex; align-items: flex-start; gap: 12px; padding: 13px 14px; border-radius: 10px; cursor: pointer; }
.mob-toggle-row.plain { padding: 0; border-radius: 0; }
.mob-toggle-track {
    width: 44px; height: 24px; border-radius: 9999px; position: relative; flex: none; margin-top: 2px;
    background: var(--nc-n800); transition: background-color .2s ease;
}
.mob-toggle-track.on { background: var(--nc-accent); }
.mob-toggle-thumb {
    position: absolute; top: 2px; left: 2px; width: 20px; height: 20px; border-radius: 9999px;
    background: var(--nc-a100); transition: transform .2s ease;
}
.mob-toggle-track.on .mob-toggle-thumb { transform: translateX(20px); }
.mob-toggle-body { flex: 1; }
.mob-toggle-label { font-size: 13.5px; }
.mob-toggle-note { font-size: 11.5px; color: var(--nc-n600); line-height: 1.5; margin-top: 2px; }

/* — day-of-week chip rows (shift / reminders) — */
.mob-days-row { display: flex; gap: 5px; }
.mob-day-chip {
    flex: 1; min-height: 44px; border-radius: 8px; display: flex; align-items: center; justify-content: center;
    font-size: 11px; letter-spacing: 0.04em; text-transform: uppercase; cursor: pointer;
    background: var(--nc-surface); color: var(--nc-n600); box-shadow: 0 0 0 1px var(--nc-n800); border: none; font-family: inherit;
}
.mob-day-chip.active { background: var(--nc-accent); color: var(--nc-a100); box-shadow: none; }

/* — settings — */
.mob-settings-header { display: flex; align-items: center; gap: 10px; margin-bottom: 18px; min-height: 44px; }
.mob-settings-title { font-size: 26px; margin: 0; font-weight: 500; letter-spacing: -0.02em; }
.mob-account-card {
    display: flex; align-items: center; gap: 12px; padding: 14px; border-radius: 12px;
    background: var(--nc-surface); box-shadow: 0 0 0 1px var(--nc-n800); margin-bottom: 20px; cursor: pointer;
}
.mob-avatar {
    width: 42px; height: 42px; border-radius: 9999px; background: var(--nc-a800); color: var(--nc-a100);
    display: flex; align-items: center; justify-content: center; font-size: 17px; text-transform: uppercase; flex: none;
}
.mob-avatar.sm { width: 38px; height: 38px; font-size: 15px; }
.mob-account-body { flex: 1; min-width: 0; }
.mob-account-name { font-size: 15px; }
.mob-account-meta { font-size: 11.5px; color: var(--nc-n600); }
.mob-group { margin-bottom: 20px; }
.mob-group-title { font-size: 10.5px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--nc-n600); margin-bottom: 8px; }
.mob-group-card { border-radius: 12px; background: var(--nc-surface); box-shadow: 0 0 0 1px var(--nc-n800); overflow: hidden; }
.mob-row {
    display: flex; align-items: center; gap: 12px; padding: 13px 14px; min-height: 52px; cursor: pointer;
    background: transparent; border: none; width: 100%; text-align: left; font-family: inherit; color: inherit;
}
.mob-row:hover { background: rgba(233, 233, 237, .04); }
.mob-row-icon { font-size: 17px; color: var(--nc-accent); width: 20px; flex: none; text-align: center; }
.mob-row-label { flex: 1; font-size: 14px; }
.mob-row-label.danger { color: #e28080; }
.mob-row-detail { font-size: 12.5px; color: var(--nc-n600); white-space: nowrap; }
.mob-row-caret { font-size: 13px; color: var(--nc-n700); flex: none; }
.mob-danger-btn { color: #e28080; }

/* — bottom sheets (day entry / account switcher) — */
.mob-sheet-backdrop { position: absolute; inset: 0; z-index: 80; }
.mob-sheet-backdrop.top { z-index: 90; }
.mob-sheet-scrim { position: absolute; inset: 0; background: rgba(22, 24, 38, .72); backdrop-filter: blur(3px); -webkit-backdrop-filter: blur(3px); }
.mob-sheet {
    position: absolute; left: 0; right: 0; bottom: 0; background: var(--nc-surface);
    border-radius: 18px 18px 0 0; box-shadow: 0 0 0 1px var(--nc-n700), 0 -16px 40px rgba(0, 0, 0, .65);
    padding: 10px 18px calc(30px + env(safe-area-inset-bottom));
    max-height: 88vh; overflow-y: auto;
}
.mob-sheet-handle { width: 42px; height: 4px; border-radius: 9999px; background: var(--nc-n800); margin: 0 auto 14px; }
.mob-sheet-head { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 16px; }
.mob-sheet-kicker { font-size: 10.5px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--nc-accent); margin-bottom: 3px; }
.mob-sheet-date { font-size: 22px; }
.mob-sheet-title { font-size: 19px; margin-bottom: 14px; }
.mob-sheet-close { width: 40px; height: 40px; border-radius: 8px; display: flex; align-items: center; justify-content: center; cursor: pointer; background: none; border: none; color: var(--nc-n500); font-size: 17px; }
.mob-sheet-close:hover { background: rgba(233, 233, 237, .07); }
.mob-sheet-body { display: flex; flex-direction: column; gap: 12px; }

.mob-mode-row { display: flex; gap: 6px; margin-bottom: 18px; }
.mob-mode-opt {
    flex: 1; min-height: 44px; border-radius: 8px; display: flex; align-items: center; justify-content: center; gap: 7px;
    font-size: 12.5px; cursor: pointer; background: var(--nc-sunk); color: var(--nc-n400); box-shadow: 0 0 0 1px var(--nc-n800); border: none; font-family: inherit;
}
.mob-mode-opt.active { background: var(--nc-a900); color: var(--nc-a300); box-shadow: 0 0 0 1px var(--nc-a800); }

.mob-quickfills { display: flex; gap: 8px; }
.mob-quickfill {
    flex: 1; min-height: 44px; border-radius: 8px; background: var(--nc-sunk); box-shadow: inset 0 0 0 1px var(--nc-n800);
    display: flex; align-items: center; justify-content: center; gap: 7px; font-size: 12.5px; color: var(--nc-n400);
    cursor: pointer; border: none; font-family: inherit;
}
.mob-quickfill:hover { box-shadow: inset 0 0 0 1px var(--nc-accent); }
.mob-quickfill i { color: var(--nc-accent); font-size: 15px; }

.mob-stepper { border-radius: 10px; background: var(--nc-sunk); box-shadow: 0 0 0 1px var(--nc-n800); padding: 12px 14px; }
.mob-stepper-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.mob-stepper-label { font-size: 11.5px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--nc-n400); }
.mob-stepper-label.sat { color: #d9a86e; }
.mob-stepper-note { font-size: 10.5px; color: var(--nc-n600); }
.mob-stepper-row { display: flex; align-items: center; gap: 10px; }
.mob-stepper-btn {
    width: 44px; height: 50px; border-radius: 8px; background: var(--nc-surface); box-shadow: 0 0 0 1px var(--nc-n800);
    display: flex; align-items: center; justify-content: center; cursor: pointer; flex: none; color: var(--nc-n300); border: none; font-size: 15px;
}
.mob-stepper-btn:hover { box-shadow: 0 0 0 1px var(--nc-accent); }
.mob-stepper-field {
    flex: 1; display: flex; align-items: baseline; justify-content: center; gap: 6px; background: var(--nc-surface);
    box-shadow: inset 0 0 0 1px var(--nc-n800); border-radius: 8px; padding: 0 8px; height: 50px;
}
.mob-stepper-input {
    width: 100%; height: 48px; border: 0; outline: none; background: transparent; text-align: center;
    font-family: inherit; font-size: 26px; color: var(--nc-text); font-variant-numeric: tabular-nums;
    letter-spacing: -0.02em; caret-color: var(--nc-accent); min-width: 0;
}
.mob-stepper-unit { font-size: 13px; color: var(--nc-n600); flex: none; }
.mob-clocksplit { border-radius: 10px; padding: 11px 14px; background: var(--nc-a900); box-shadow: 0 0 0 1px var(--nc-a800); font-size: 12px; color: var(--nc-a300); line-height: 1.5; }

.mob-preview { border-radius: 12px; background: var(--nc-sunk); box-shadow: 0 0 0 1px var(--nc-a800); padding: 14px 16px; }
.mob-preview-cols { display: flex; gap: 12px; }
.mob-preview-col { flex: 1; }
.mob-preview-col.net { flex: 1.2; }
.mob-preview-label { font-size: 9.5px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--nc-n600); margin-bottom: 4px; }
.mob-preview-col.net .mob-preview-label { color: var(--nc-accent); }
.mob-preview-value { font-size: 19px; font-variant-numeric: tabular-nums; }
.mob-preview-col.net .mob-preview-value { color: var(--nc-a400); }
.mob-preview-col.gross .mob-preview-value { color: var(--nc-n300); }
.mob-preview-travel { margin-top: 10px; padding-top: 10px; font-size: 11.5px; color: var(--nc-n500); background: linear-gradient(to right, transparent, rgba(233, 233, 237, .1) 10px, rgba(233, 233, 237, .1) calc(100% - 10px), transparent) no-repeat top / 100% 1px; }
.mob-sheet-actions { display: flex; gap: 8px; margin-top: 4px; }
.mob-icon-btn-danger {
    width: 52px; min-height: 50px; border-radius: 8px; display: flex; align-items: center; justify-content: center;
    cursor: pointer; box-shadow: 0 0 0 1px var(--nc-n800); background: none; border: none; color: var(--nc-n500); font-size: 16px;
}
.mob-icon-btn-danger:hover { background: rgba(233, 233, 237, .06); }

/* — account switcher / login picker rows — */
.mob-acc-list { display: flex; flex-direction: column; gap: 8px; }
.mob-acc-row {
    display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 10px; cursor: pointer; min-height: 60px;
    background: var(--nc-surface); box-shadow: 0 0 0 1px var(--nc-n800); border: none; width: 100%; text-align: left; font-family: inherit; color: inherit;
}
.mob-acc-row:hover { box-shadow: 0 0 0 1px var(--nc-accent); }
.mob-acc-row.current { background: var(--nc-a900); box-shadow: 0 0 0 1px var(--nc-a800); }
.mob-acc-body { flex: 1; min-width: 0; }
.mob-acc-name { font-size: 14.5px; }
.mob-acc-note { font-size: 11px; color: var(--nc-n600); }
.mob-signout-row {
    margin-top: 8px; min-height: 48px; border-radius: 8px; display: flex; align-items: center; justify-content: center; gap: 8px;
    font-size: 13.5px; color: var(--nc-n400); cursor: pointer; box-shadow: 0 0 0 1px var(--nc-n800); background: none; border: none; font-family: inherit; width: 100%;
}
.mob-signout-row:hover { background: rgba(233, 233, 237, .06); }

/* — login — */
.mob-login-logo {
    width: 64px; height: 64px; border-radius: 9999px; border: 1px solid var(--nc-accent);
    display: flex; align-items: center; justify-content: center; margin-bottom: 20px;
    box-shadow: 0 0 40px rgba(145, 132, 217, .22); font-size: 30px; color: var(--nc-accent);
}
.mob-login-title { font-size: 27px; margin: 0 0 4px; font-weight: 500; }
.mob-login-tagline { margin: 0 0 26px; font-size: 13.5px; color: var(--nc-n500); }

/* — audit log — */
.mob-audit-card { border-radius: 10px; background: var(--nc-surface); box-shadow: 0 0 0 1px var(--nc-n800); padding: 13px 14px; }
.mob-audit-head { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 6px; }
.mob-audit-action { font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--nc-accent); }
.mob-audit-when { font-size: 11px; color: var(--nc-n600); }
.mob-audit-day-row { margin-top: 6px; padding-left: 8px; border-left: 2px solid var(--nc-n800); }
.mob-audit-day-row.added { border-color: #6fae7e; }
.mob-audit-day-row.removed { border-color: #c4726f; }
.mob-audit-day-row.changed { border-color: #c9a35f; }
.mob-audit-day-top { display: flex; justify-content: space-between; align-items: baseline; }
.mob-audit-day-name { font-weight: 600; font-size: 13px; }
.mob-audit-day-type { font-size: 10px; letter-spacing: 0.06em; text-transform: uppercase; }
.mob-audit-field { font-size: 12px; color: var(--nc-n500); }
.mob-audit-total { font-size: 10.5px; color: var(--nc-n500); font-variant-numeric: tabular-nums; }

/* — toast override so it reads against the Nocturne shell too — */
.mob-shell ~ .toast-enter-active, .mob-shell ~ .toast-leave-active { transition: all .3s ease; }

/* — tab bar — */
.mob-tabbar {
    display: flex; padding: 6px 6px calc(6px + env(safe-area-inset-bottom));
    background: var(--nc-sunk); box-shadow: 0 -1px 0 rgba(233, 233, 237, .1); flex: none;
}
.mob-tab {
    flex: 1; min-height: 52px; display: flex; flex-direction: column; align-items: center; justify-content: center;
    gap: 3px; border-radius: 8px; cursor: pointer; background: none; border: none; font-family: inherit;
}
.mob-tab i { font-size: 21px; color: var(--nc-n600); }
.mob-tab span { font-size: 9.5px; letter-spacing: 0.04em; color: var(--nc-n600); }
.mob-tab.active i, .mob-tab.active span { color: var(--nc-accent); }

/* ── Wide screens ────────────────────────────────────────────────────────
   The Nocturne shell is phone-first: full-bleed, bottom tab bar, sheets
   pinned to the bottom edge, thumb-sized type. Everything below adapts it
   to a pointer + wide viewport without a second markup tree — the layout
   is already fluid, what it lacks is an upper bound and desktop scale.   */
@media (min-width: 768px) {
    .mob-shell { font-size: 15.5px; }

    /* Content gets a measure instead of stretching to the window. */
    .mob-page      { max-width: 980px; margin-inline: auto; padding: 18px 24px 0; width: 100%; }
    .mob-page-wide { max-width: 760px; margin-inline: auto; padding: 18px 24px 0; width: 100%; }
    .mob-scroll    { padding-top: 8px; padding-bottom: 40px; }

    /* Tab bar moves to the top and stops being a row of huge stretched
       targets. `order` does it without touching the markup. */
    .mob-tabbar {
        order: -1;
        justify-content: center;
        gap: 4px;
        padding: 8px 16px;
        box-shadow: 0 1px 0 rgba(233, 233, 237, .1);
    }
    .mob-tab {
        flex: none; min-width: 116px; min-height: 44px;
        flex-direction: row; gap: 8px; padding: 0 16px;
    }
    .mob-tab i    { font-size: 15px; }
    .mob-tab span { font-size: 12.5px; letter-spacing: 0.01em; }
    .mob-tab.active { background: var(--nc-a900); }

    /* Sheets become centred dialogs. */
    .mob-sheet-backdrop { display: flex; align-items: center; justify-content: center; }
    .mob-sheet {
        position: relative; left: auto; right: auto; bottom: auto;
        width: min(560px, 92vw); max-height: 86vh;
        border-radius: 16px; padding: 18px 24px 24px;
    }
    .mob-sheet-handle { display: none; }

    /* Calendar: cells were 62px tall for a thumb; give them room and scale
       the type up with them. */
    .mob-cal-grid   { gap: 6px; }
    .mob-cal-cell   { min-height: 104px; border-radius: 10px; padding: 9px 10px; }
    .mob-cal-head   { font-size: 11px; }
    .mob-cal-daynum { font-size: 13px; }
    .mob-cal-daynum.today { width: 22px; height: 22px; font-size: 12px; }
    .mob-cal-h-base { font-size: 19px; }
    .mob-cal-h-ot   { font-size: 13px; }

    /* Stop the elastic bars from eating the row and stranding the numbers. */
    .mob-week-track { max-width: 340px; }
    .mob-year-track { max-width: 420px; }
    .mob-week-row   { padding: 11px 6px; }
    .mob-week-label { width: 64px; font-size: 12.5px; }
    .mob-week-hours { width: 78px; font-size: 13px; }
    .mob-week-net   { width: 96px; font-size: 13.5px; }
    .mob-year-name  { width: 46px; font-size: 13px; }
    .mob-year-hours { width: 58px; font-size: 13px; }
    .mob-year-net   { width: 100px; font-size: 13.5px; }

    /* Cards and headings read as undersized at desktop distance. */
    .mob-stat-label  { font-size: 10.5px; }
    .mob-stat-value  { font-size: 22px; }
    .mob-navtitle .t { font-size: 19px; }
    .mob-section-label, .mob-weeks-label, .mob-group-title { font-size: 12px; }
    .mob-row         { min-height: 50px; }
    .mob-row-label   { font-size: 14px; }

    /* Inputs shouldn't span a 760px form. */
    .mob-shell .input { max-width: 380px; }
    .mob-shell select.input { max-width: 380px; }
    /* …but the payslip rows are a table, so they keep the card's full width. */
    .mob-fit-card { max-width: 620px; }
    .mob-fit-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
    .mob-shell .mob-fit-cell .input { max-width: none; }

    /* Pointer affordances the phone build never needed. */
    .mob-row:hover, .mob-acc-row:hover, .mob-year-row:hover,
    .mob-cal-cell:not(.adjacent):hover { background: var(--nc-n900); }
    .mob-shell button:focus-visible, .mob-shell .input:focus-visible,
    .mob-shell [role="button"]:focus-visible {
        outline: 2px solid var(--nc-accent); outline-offset: 2px;
    }
}

@media (min-width: 1200px) {
    .mob-page { max-width: 1120px; }
    .mob-cal-cell { min-height: 118px; }
}
