/*
 * WeFit Club – styles.css
 * Colours are taken from the club logo: leaf green (the heart and "We"),
 * blue ("Fit" and the swoosh) and orange (the two fruits).
 * The three sessions borrow those three colours everywhere they appear:
 *   Morning = orange    Afternoon = green    Evening = blue
 */

/* ---------- 1. Tokens ---------- */
:root {
  --leaf: #76C147;          /* logo green */
  --leaf-soft: #E8F5DF;
  --green: #1F7A36;         /* buttons and links: white text passes contrast */
  --green-deep: #14522A;
  --blue: #2570B6;          /* logo blue */
  --blue-soft: #E4EEF9;
  --blue-deep: #1B5A96;
  --orange: #FB8337;        /* logo orange */
  --orange-soft: #FFF0E3;
  --orange-deep: #A94A0A;

  --ink: #16302A;
  --muted: #566B62;
  --line: #D9E6D2;
  --paper: #FFFFFF;
  --mist: #F3F8EF;
  --danger: #B3261E;
  --danger-soft: #FCEBE9;

  --font-head: "Baloo 2", "Mukta", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-body: "Mukta", system-ui, -apple-system, "Segoe UI", Roboto, "Noto Sans", sans-serif;

  --tap: 48px;              /* smallest touch target */
  --radius: 14px;
  --radius-small: 10px;
  --nav-height: 64px;
  --gutter: 16px;
}

/* ---------- 2. Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--mist);
  color: var(--ink);
  font: 400 17px/1.45 var(--font-body);
  font-variant-numeric: tabular-nums;
  -webkit-tap-highlight-color: transparent;
}
[hidden] { display: none !important; }
h1, h2 { font-family: var(--font-head); line-height: 1.15; margin: 0; color: var(--green-deep); }
h1 { font-size: 1.75rem; font-weight: 700; }
h2 { font-size: 1.2rem; font-weight: 600; }
p { margin: 0; }
small { font-size: 0.86rem; color: var(--muted); }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
button:disabled { cursor: not-allowed; }
:focus-visible { outline: 3px solid var(--blue); outline-offset: 2px; }
.icon { width: 22px; height: 22px; flex: none; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

/* ---------- 3. Shell: top bar, navigation, main ---------- */
.app { min-height: 100dvh; }
.topbar {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  height: 64px; padding: 0 var(--gutter);
  background: var(--paper);
  border-bottom: 4px solid;
  /* the logo's proportions: mostly green, then blue, a touch of orange */
  border-image: linear-gradient(90deg, var(--leaf) 0 58%, var(--blue) 58% 88%, var(--orange) 88% 100%) 1;
}
.brand { display: flex; align-items: center; gap: 10px; min-width: 0; }
/*
 * The club logo: logo.png exactly as supplied (1536 x 1024, transparent).
 * The artwork sits in the middle of that canvas, so the frame below shows the
 * artwork area (244,166 to 1264,780) and leaves the empty margins out of view.
 */
.brand-logo { position: relative; display: block; flex: none; height: 52px; aspect-ratio: 1020 / 614; overflow: hidden; }
.brand-logo img { position: absolute; max-width: none; width: calc(100% * 1536 / 1020); height: auto; left: calc(-100% * 244 / 1020); top: calc(-100% * 166 / 614); }
.brand-name { display: none; font: 700 1.45rem/1 var(--font-head); white-space: nowrap; letter-spacing: -0.01em; }
.brand-logo[hidden] + .brand-name { display: block; }   /* text name only if logo.png is missing */
.we { color: var(--green); }
.fit { color: var(--blue); font-style: italic; }
.club { color: var(--green-deep); font-weight: 600; }
.topbar-right { display: flex; align-items: center; gap: 4px; }
.who { display: none; flex-direction: column; align-items: flex-end; line-height: 1.15; margin: 0 6px; }
.who-name { font-weight: 600; }
.who-role { font-size: 0.82rem; color: var(--muted); }
.icon-btn {
  display: inline-grid; place-items: center; width: var(--tap); height: var(--tap);
  border: 0; border-radius: 50%; background: transparent; color: var(--green-deep); font-size: 1.1rem;
}
.icon-btn:hover { background: var(--leaf-soft); }
.icon-btn.is-busy .icon { animation: spin 0.9s linear infinite; }

.nav {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 20;
  display: flex; height: calc(var(--nav-height) + env(safe-area-inset-bottom, 0px));
  padding-bottom: env(safe-area-inset-bottom, 0px);
  background: var(--paper); border-top: 1px solid var(--line);
}
.nav button {
  flex: 1; min-width: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
  border: 0; background: transparent; color: var(--muted); font-size: 0.78rem; font-weight: 500;
  border-top: 3px solid transparent;
}
.nav button span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 100%; }
.nav button.is-active { color: var(--green); border-top-color: var(--leaf); font-weight: 700; }
.nav .wide-only { display: none; }

.main { padding: 18px var(--gutter) calc(var(--nav-height) + 32px + env(safe-area-inset-bottom, 0px)); max-width: 1180px; margin: 0 auto; }
.view-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 16px; }
.sub { color: var(--muted); margin-top: 2px; max-width: 62ch; }
.section-title { margin: 26px 0 8px; }

/* ---------- 4. Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: var(--tap); padding: 0 18px;
  border: 1.5px solid var(--line); border-radius: 999px;
  background: var(--paper); color: var(--green-deep); font-weight: 600; white-space: nowrap;
}
.btn:hover { border-color: var(--leaf); }
.btn-primary { background: var(--green); border-color: var(--green); color: #fff; }
.btn-primary:hover { background: var(--green-deep); border-color: var(--green-deep); }
.btn-danger { background: var(--danger); border-color: var(--danger); color: #fff; }
.btn-quiet { border-color: transparent; background: transparent; color: var(--muted); padding: 0 12px; }
.btn-quiet:hover { background: var(--mist); border-color: transparent; color: var(--ink); }
.btn-small { min-height: 40px; padding: 0 14px; font-size: 0.92rem; }
.btn-block { width: 100%; }
.btn:disabled { opacity: 0.5; }
.btn.is-busy { position: relative; color: transparent !important; }
.btn.is-busy::after {
  content: ""; position: absolute; width: 20px; height: 20px; border-radius: 50%;
  border: 3px solid rgba(255, 255, 255, 0.5); border-top-color: #fff; animation: spin 0.8s linear infinite;
}
.btn:not(.btn-primary):not(.btn-danger).is-busy::after { border-color: var(--line); border-top-color: var(--green); }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- 5. Panels, rows, pills ---------- */
.panel { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; margin-bottom: 16px; }
.panel > h2 { margin-bottom: 10px; }
.panel-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 8px; }
.columns { display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; }
.columns > .panel { margin-bottom: 0; }
.columns { margin-bottom: 16px; }

.rows { display: flex; flex-direction: column; }
#att-results, #att-present, #cust-list { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
#att-results > .row, #att-present > .row, #cust-list > .row { padding-left: 14px; padding-right: 14px; }
.row {
  display: flex; align-items: center; gap: 10px; width: 100%; min-height: 62px; padding: 8px 0;
  border: 0; border-bottom: 1px solid var(--line); background: transparent; text-align: left;
}
.row:last-child { border-bottom: 0; }
.row-link:hover { background: var(--mist); }
.row-main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.row-main strong { font-weight: 600; overflow-wrap: anywhere; }
.row-main small { overflow-wrap: anywhere; }
.row-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; margin-top: 3px; }
.row-side { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px; width: 100%; }
.row-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 4px; }
.row.is-inactive .row-main strong { color: var(--muted); }
.row.is-done { background: var(--mist); }
.row.is-pending { opacity: 0.6; }
.row-membership { flex-wrap: wrap; padding: 12px 0; }
.row-membership .row-main { flex: 1 1 100%; }
.needs { flex: none; color: var(--muted); font-size: 0.92rem; }
.discount-line { color: var(--orange-deep); }
.receipt-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.receipt-chip { display: inline-flex; align-items: center; gap: 6px; min-height: 40px; padding: 0 12px; border: 1.5px solid var(--blue-soft); border-radius: 999px; background: var(--paper); color: var(--blue-deep); font-size: 0.88rem; font-weight: 600; }
.receipt-chip:hover { border-color: var(--blue); }
.receipt-chip.is-cancelled { color: var(--muted); border-color: var(--line); text-decoration: line-through; }
.receipt-preview { min-height: 200px; }
.receipt-preview canvas { display: block; width: 100%; max-width: 400px; height: auto; margin: 0 auto 8px; border: 1px solid var(--line); border-radius: 8px; }
.tag { margin-left: 8px; padding: 1px 8px; border-radius: 999px; background: var(--mist); border: 1px solid var(--line); font-size: 0.78rem; font-weight: 500; color: var(--muted); }

.pill { flex: none; padding: 3px 11px; border-radius: 999px; font-size: 0.88rem; font-weight: 600; white-space: nowrap; }
.pill-ok { background: var(--leaf-soft); color: var(--green-deep); }
.pill-low { background: var(--orange-soft); color: var(--orange-deep); }
.pill-zero { background: var(--danger-soft); color: var(--danger); }
.pill-admin { background: var(--blue-soft); color: var(--blue-deep); }
.pill-plain { background: var(--mist); color: var(--muted); }
.amount { flex: none; font-weight: 600; white-space: nowrap; }
.amount-due { color: var(--orange-deep); }
.amount-paid { color: var(--green); }
.empty { padding: 18px 14px; color: var(--muted); }
.more-note { padding: 12px 14px; color: var(--muted); font-size: 0.92rem; }
.note { color: var(--muted); font-size: 0.95rem; margin-bottom: 12px; }

.alert { display: flex; align-items: flex-start; gap: 10px; padding: 12px 14px; margin-bottom: 14px; border-radius: var(--radius-small); font-weight: 500; }
.alert-warn { background: var(--orange-soft); color: var(--orange-deep); }
.alert-danger { background: var(--danger-soft); color: var(--danger); }

/* ---------- 6. Sessions: the three logo colours ---------- */
.s-morning { --s: var(--orange); --s-soft: var(--orange-soft); --s-ink: var(--orange-deep); --s-on: #3B1B02; }
.s-afternoon { --s: var(--leaf); --s-soft: var(--leaf-soft); --s-ink: var(--green); --s-on: #10330F; }
.s-evening { --s: var(--blue); --s-soft: var(--blue-soft); --s-ink: var(--blue-deep); --s-on: #FFFFFF; }

/* Attendance: the session switch */
.session-switch { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin-bottom: 14px; }
.session-btn {
  display: grid; grid-template-columns: auto 1fr; grid-template-areas: "icon count" "name name"; align-items: center; gap: 4px 8px;
  min-height: 76px; padding: 10px 12px; text-align: left; min-width: 0;
  border: 2px solid var(--s-soft); border-bottom: 5px solid var(--s); border-radius: var(--radius);
  background: var(--paper); color: var(--s-ink);
}
.session-btn .icon { grid-area: icon; width: 26px; height: 26px; }
.session-name { grid-area: name; font-weight: 600; font-size: 0.95rem; line-height: 1.1; }
.session-count { grid-area: count; justify-self: end; font: 700 1.6rem/1 var(--font-head); }
.session-btn.is-active { background: var(--s); border-color: var(--s); color: var(--s-on); }

/* Dashboard: today's three sessions */
.session-tiles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin-bottom: 14px; }
.session-tile {
  display: flex; flex-direction: column; align-items: flex-start; gap: 2px; min-height: 118px; padding: 14px;
  border: 0; border-radius: var(--radius); background: var(--s); color: var(--s-on); text-align: left;
}
.tile-label { font-weight: 600; }
.tile-count { font: 700 2.6rem/1 var(--font-head); margin-top: auto; }

.btn-mark { background: var(--s); border-color: var(--s); color: var(--s-on); flex: none; }
.btn-mark:hover { border-color: var(--s-ink); }
.btn-mark:disabled { background: var(--mist); border-color: var(--line); color: var(--muted); opacity: 1; }
.present-badge { flex: none; display: inline-flex; align-items: center; gap: 6px; min-height: var(--tap); padding: 0 12px; color: var(--s-ink); font-weight: 600; }
.tick { flex: none; display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: var(--s-soft); color: var(--s-ink); }
.tick .icon { width: 18px; height: 18px; stroke-width: 3; }

.failed { margin-bottom: 14px; padding: 12px 14px; border: 2px solid var(--danger); border-radius: var(--radius); background: var(--danger-soft); }
.failed-title { display: flex; align-items: center; gap: 8px; color: var(--danger); font-weight: 700; }
.failed-why { color: var(--danger); font-size: 0.95rem; margin: 2px 0 4px; }
.failed .row { border-color: rgba(179, 38, 30, 0.2); flex-wrap: wrap; }

/* ---------- 7. Stats ---------- */
.stats { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin-bottom: 16px; }
#inv-summary { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.stat { display: flex; flex-direction: column; gap: 2px; padding: 14px; background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); }
.stat-value { font: 700 1.7rem/1.05 var(--font-head); color: var(--green-deep); }
.stat-label { color: var(--muted); font-size: 0.92rem; }
.stat.is-alert { border-color: var(--orange); background: var(--orange-soft); }
.stat.is-alert .stat-value, .stat.is-due .stat-value { color: var(--orange-deep); }

.partner { padding: 10px 0; border-bottom: 1px solid var(--line); }
.partner:last-child { border-bottom: 0; }
.partner-head { display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.partner-head span { color: var(--muted); font-size: 0.92rem; }
.bar { height: 10px; margin: 6px 0 4px; border-radius: 999px; background: var(--leaf-soft); overflow: hidden; }
.bar span { display: block; height: 100%; border-radius: 999px; background: var(--blue); }

/* ---------- 8. Forms ---------- */
.form .field { display: flex; flex-direction: column; gap: 4px; margin: 0 0 14px; padding: 0; border: 0; min-width: 0; }
.form label, .form legend { font-weight: 600; font-size: 0.95rem; padding: 0; }
.form label small, .form legend small { font-weight: 400; margin-left: 4px; }
input[type="text"], input[type="tel"], input[type="number"], input[type="password"], input[type="date"], input[type="search"], select, textarea {
  width: 100%; min-height: var(--tap); padding: 10px 12px;
  border: 1.5px solid #B9CDB1; border-radius: var(--radius-small); background: var(--paper);
}
textarea { resize: vertical; }
input:focus, select:focus, textarea:focus { outline: 3px solid var(--blue-soft); border-color: var(--blue); }
input:disabled, select:disabled, textarea:disabled { background: var(--mist); color: var(--muted); border-color: var(--line); }
.readout { display: flex; align-items: center; min-height: var(--tap); padding: 0 12px; border-radius: var(--radius-small); background: var(--mist); font-weight: 600; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 12px; }
.grid-4 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 12px; }
.actions { display: flex; flex-wrap: wrap; gap: 8px; }
.form-error { margin: 0 0 12px; padding: 10px 12px; border-radius: var(--radius-small); background: var(--danger-soft); color: var(--danger); font-weight: 500; }
.optional { margin-bottom: 14px; }
.optional summary { min-height: var(--tap); display: flex; align-items: center; cursor: pointer; color: var(--green); font-weight: 600; }
.discount { padding: 12px 12px 0 !important; border: 1.5px dashed var(--orange) !important; border-radius: var(--radius-small); background: var(--orange-soft); }
.discount legend { padding: 0 6px; color: var(--orange-deep); }
.money-line { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; padding: 8px 0; margin-bottom: 10px; border-bottom: 1px solid var(--line); }
.money-line output { font-weight: 600; white-space: nowrap; }
.money-line.strong { border-bottom: 2px solid var(--green); }
.money-line.strong output { font: 700 1.5rem/1 var(--font-head); color: var(--green-deep); }

.plan-chips { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; }
.chip { min-height: 56px; padding: 4px 2px; border: 1.5px solid var(--line); border-radius: var(--radius-small); background: var(--paper); color: var(--muted); font-size: 0.82rem; line-height: 1.1; }
.chip strong { display: block; font: 700 1.3rem/1 var(--font-head); color: var(--green-deep); }
.chip.is-active { background: var(--green); border-color: var(--green); color: #fff; }
.chip.is-active strong { color: #fff; }
.chip:disabled { opacity: 0.6; }

.search { position: relative; margin-bottom: 12px; flex: 1; }
.search .icon { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--muted); pointer-events: none; }
.search input { padding-left: 44px; min-height: 52px; border-radius: 999px; }
.filters { display: flex; gap: 8px; align-items: flex-start; }
.filters select { width: auto; min-height: 52px; border-radius: 999px; }
.date-pick { display: flex; align-items: center; gap: 8px; font-weight: 600; }
.date-pick input { width: auto; }

.picker { position: relative; }
.picker-list { position: absolute; z-index: 5; left: 0; right: 0; top: calc(100% + 4px); max-height: 320px; overflow: auto; padding: 0 12px; background: var(--paper); border: 1.5px solid var(--blue); border-radius: var(--radius-small); }
.chosen { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: var(--radius-small); background: var(--leaf-soft); }

.shortcuts { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 16px; }
.shortcut { display: flex; align-items: center; gap: 10px; min-height: 64px; padding: 0 16px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--paper); color: var(--green-deep); font-weight: 600; text-align: left; }
.acct { margin-bottom: 12px; }

/* ---------- 9. Reports ---------- */
.report-form { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 0 12px; }
.report-form .field { flex: 1 1 150px; }
.report-form .field.grow { flex: 2 1 260px; }
.report-form .actions { margin-bottom: 14px; }
.table-wrap { overflow-x: auto; background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); }
.table { width: 100%; border-collapse: collapse; font-size: 0.95rem; }
.table th, .table td { padding: 10px 12px; text-align: left; white-space: nowrap; border-bottom: 1px solid var(--line); }
.table th { background: var(--leaf-soft); color: var(--green-deep); font-weight: 600; }
.table .num { text-align: right; }
.table tbody tr:nth-child(even) { background: #FAFCF8; }
.table tfoot td { font-weight: 700; border-top: 2px solid var(--green); border-bottom: 0; }

/* ---------- 10. Dialogs ---------- */
dialog { border: 0; padding: 0; color: var(--ink); }
dialog::backdrop { background: rgba(20, 50, 34, 0.55); }
.sheet { width: 100%; max-width: 100%; max-height: 92dvh; margin: auto 0 0; border-radius: 20px 20px 0 0; background: var(--paper); }
.sheet[open] { display: flex; flex-direction: column; }
.sheet > form { display: flex; flex-direction: column; min-height: 0; }
.sheet-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 10px 10px 18px; border-bottom: 1px solid var(--line); }
.sheet-body { padding: 16px 18px 4px; overflow-y: auto; }
.sheet-body > p { margin-bottom: 12px; }
.sheet-foot { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 12px 18px calc(12px + env(safe-area-inset-bottom, 0px)); border-top: 1px solid var(--line); }
.spacer { flex: 1; }
.temp-password { padding: 14px; border-radius: var(--radius-small); background: var(--leaf-soft); font: 700 1.6rem/1 var(--font-head); letter-spacing: 0.04em; text-align: center; user-select: all; }

/* Login covers the whole screen */
.login { width: 100vw; max-width: 100vw; height: 100dvh; max-height: 100dvh; margin: 0; background: var(--mist); overflow-y: auto; }
.login[open] { display: grid; place-items: center; }
.login::backdrop { background: var(--mist); }
.login-card { width: min(420px, calc(100vw - 32px)); margin: 24px 0; background: var(--paper); border: 1px solid var(--line); border-radius: 22px; overflow: hidden; }
.login-logo { display: block; width: 100%; height: auto; margin: -4% 0 -11%; }   /* tuck in the logo's own empty margins */
.login-title { display: none; padding: 26px 22px 0; font-size: 2rem; }
.login-logo[hidden] + .login-title { display: block; }   /* shown only if the logo image is missing */
.login-card form { padding: 20px 22px 22px; }
.login-card h2 { margin-bottom: 8px; }
.login-card .btn-block + .btn-block { margin-top: 8px; }
.login-msg { margin-bottom: 14px; padding: 10px 12px; border-radius: var(--radius-small); background: var(--blue-soft); color: var(--blue-deep); }

/* ---------- 11. Feedback: progress, offline, toasts ---------- */
.progress { position: fixed; z-index: 100; top: 0; left: 0; right: 0; height: 4px; background: var(--leaf-soft); overflow: hidden; }
.progress::after { content: ""; position: absolute; inset: 0; width: 40%; background: var(--green); animation: slide 1.1s ease-in-out infinite; }
@keyframes slide { from { transform: translateX(-100%); } to { transform: translateX(250%); } }
.banner-offline { position: sticky; top: 0; z-index: 30; padding: 10px var(--gutter); background: var(--danger); color: #fff; font-weight: 600; text-align: center; }
/* Toasts sit over the brand bar, never over the rows and buttons being tapped */
.toasts { position: fixed; z-index: 200; left: 8px; right: 8px; top: 6px; display: flex; flex-direction: column; gap: 6px; align-items: center; pointer-events: none; }
.toast { pointer-events: auto; display: flex; align-items: center; gap: 8px; width: min(520px, 100%); min-height: 48px; padding: 4px 4px 4px 14px; border-radius: var(--radius-small); background: var(--ink); color: #fff; font-weight: 500; font-size: 0.95rem; line-height: 1.25; box-shadow: 0 6px 18px rgba(20, 50, 34, 0.25); }
.toast span { flex: 1; }
.toast-ok { background: var(--green-deep); }
.toast-warn { background: var(--orange); color: #3B1B02; }
.toast-error { background: var(--danger); }
.toast-info { background: var(--blue-deep); }
.toast-close, .toast-action { flex: none; min-width: 40px; min-height: 40px; border: 0; border-radius: 8px; background: transparent; color: inherit; font-weight: 700; }
.toast-action { text-decoration: underline; }

/* ---------- 12. Tablet and desktop ---------- */
@media (max-width: 379px) {
  .nav button { font-size: 0.7rem; }
  .brand-name { font-size: 1.3rem; }
}
@media (min-width: 600px) {
  :root { --gutter: 24px; }
  .who { display: flex; }
  .topbar { height: 72px; }
  .brand-logo { height: 60px; }
  .stats { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .grid-4 { grid-template-columns: repeat(4, 1fr); }
  .session-btn { grid-template-areas: "icon name" "icon count"; min-height: 80px; padding: 12px 18px; gap: 0 12px; }
  .session-count { justify-self: start; font-size: 1.9rem; }
  .session-name { font-size: 1.05rem; }
  .sheet { width: 600px; margin: auto; border-radius: 20px; }
  .sheet-small { width: 460px; }
}
@media (min-width: 900px) {
  .app { display: grid; grid-template-columns: 216px minmax(0, 1fr); grid-template-rows: auto 1fr; }
  .topbar { grid-column: 1 / -1; }
  .nav {
    position: sticky; top: 68px; align-self: start; flex-direction: column; height: auto; gap: 4px; padding: 16px 12px;
    background: transparent; border-top: 0;
  }
  .nav button { flex: none; flex-direction: row; justify-content: flex-start; gap: 12px; min-height: var(--tap); padding: 0 14px; border-top: 0; border-radius: 999px; font-size: 1rem; }
  .nav button.is-active { background: var(--paper); border: 0; box-shadow: inset 0 0 0 1.5px var(--leaf); }
  .nav .wide-only { display: flex; }
  .main { padding-bottom: 48px; margin: 0; width: 100%; min-width: 0; }
  .columns { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: start; }
  .columns-form { grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); }
  .shortcuts { display: none; }
  .toasts { left: auto; right: 16px; align-items: flex-end; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; scroll-behavior: auto !important; }
}

@media print {
  .topbar, .nav, .toasts, .report-form, .progress { display: none !important; }
  .app { display: block; }
  body { background: #fff; }
}
