/*
 * Design tokens. Two layers:
 *  1. Foundation, shared by every screen: type, spacing, radii, shadows.
 *  2. Theme colors with semantic names. The Kiara Method screens (sign-in, setup,
 *     Super Admin) use the platform theme; business workspaces use a neutral theme
 *     that each business can tint with its own logo and two colors (see js/brand.js).
 * Provisional values taken from the sign-in screen until the official brand files arrive.
 */
:root {
  /* The Kiara Method palette (official hex values) */
  --tkm-cream: #EFE5DD;
  --tkm-plum: #4E0342;
  --tkm-orange: #EF4614;
  --tkm-orange-hover: #d63c0f;
  --tkm-pink: #F5B1B0;
  --tkm-blue: #B4CFF4;
  --tkm-mustard: #D1BE62;

  /* Foundation */
  --font-display: "League Spartan", "Work Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font: "Work Sans", system-ui, -apple-system, "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  --font-mono: "SF Mono", "Roboto Mono", ui-monospace, Menlo, Consolas, monospace;
  --tkm-display: var(--font-display);
  --tkm-body: var(--font);
  --space-1: 4px; --space-2: 8px; --space-3: 12px; --space-4: 16px; --space-5: 24px; --space-6: 32px; --space-7: 48px;
  --radius: 16px;
  --radius-sm: 10px;
  --shadow: 0 1px 2px rgba(16, 24, 40, 0.04);
  --shadow-lg: 0 12px 32px rgba(16, 24, 40, 0.14);

  /* Workspace theme: neutral until the business sets its own colors */
  --bg: #f5f6f8;
  --surface: #ffffff;
  --surface-2: #f3f5f8;
  --text: #18212f;
  --heading: #18212f;
  --muted: #5b6676;
  --faint: #667085;                                 /* 4.6:1 on the page background */
  --border: #e3e7ed;

  --primary: var(--ws-link, #18212f);              /* links, current menu item, marks */
  --primary-hover: var(--ws-link, #18212f);
  --on-primary: var(--ws-on-primary, #ffffff);
  --primary-soft: var(--ws-primary-soft, #f3f5f8);
  --cta: var(--ws-primary, #18212f);               /* main action buttons */
  --cta-hover: var(--ws-primary-hover, #000000);
  --on-cta: var(--ws-on-primary, #ffffff);
  --accent-2: var(--ws-secondary, transparent);     /* thin accent line under the top bar and on cards */
  --accent-mark: var(--ws-secondary-edge, var(--active)); /* indicators: dots, chart bars */
  --accent-text: var(--ws-secondary-ink, var(--faint));   /* small labels above titles */
  --accent-soft: var(--ws-secondary-soft, var(--surface-2));
  --focus-ring: rgba(24, 33, 47, .18);

  /* Active states (running timers): neutral green until the business sets a main color. */
  --active: var(--ws-active, #1f8a70);
  --active-soft: var(--ws-active-soft, #e7f5f0);
  --active-ring: var(--ws-active-ring, rgba(31, 138, 112, 0.28));
  --active-edge: var(--ws-primary-edge, #1f8a70);
  /* Start buttons: filled with the main color, with readable text and a visible edge. */
  --start: var(--ws-primary, #1f8a70);
  --start-hover: var(--ws-primary-hover, #1a7862);
  --on-start: var(--ws-on-primary, #ffffff);

  --warning: #9a6200;
  --warning-soft: #fff6e0;
  --danger: #b42318;
  --danger-soft: #fdecea;
}

/* Platform theme: The Kiara Method's own screens. Values from the sign-in screen. */
body.theme-platform, body.is-platform-screen {
  --bg: var(--tkm-cream);
  --surface: #ffffff;
  --surface-2: #f7f1ec;
  --text: #1f1a1e;
  --heading: var(--tkm-plum);
  --muted: #6b5566;
  --faint: #75626f;                                 /* 4.5:1 on cream */
  --border: rgba(78, 3, 66, .16);
  --primary: var(--tkm-plum);
  --primary-hover: var(--tkm-plum);
  --on-primary: #ffffff;
  --primary-soft: rgba(78, 3, 66, .07);
  /* Buttons with text use the deeper orange from the sign-in hover state: white on
     #EF4614 is 3.8:1 (below WCAG AA), on #D63C0F it is 4.65:1. #EF4614 stays for accents. */
  --cta: var(--tkm-orange-hover);
  --cta-hover: color-mix(in srgb, var(--tkm-orange-hover) 88%, #000);
  --on-cta: #ffffff;
  --accent-2: transparent;
  --accent-mark: var(--tkm-plum);
  --accent-text: var(--faint);
  --accent-soft: var(--surface-2);
  --focus-ring: rgba(78, 3, 66, .18);
  /* A workspace's colors never reach The Kiara Method's own screens. */
  --active: #1f8a70;
  --active-soft: #e7f5f0;
  --active-ring: rgba(31, 138, 112, 0.28);
  --active-edge: #1f8a70;
  --start: #1f8a70;
  --start-hover: #1a7862;
  --on-start: #ffffff;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  font-size: 15px;
  line-height: 1.5;
}
a { color: var(--primary); }
button, input, select, textarea { font: inherit; color: inherit; }
h1, h2, h3 { margin: 0; line-height: 1.2; color: var(--heading); }

.container { max-width: 1280px; margin: 0 auto; padding: var(--space-6) var(--space-4) 64px; outline: none; }

/* ---------- top bar ---------- */
.topbar { background: var(--surface); border-bottom: 1px solid var(--border); box-shadow: inset 0 -3px 0 var(--accent-2); position: sticky; top: 0; z-index: 10; }
.topbar__inner { max-width: 1280px; margin: 0 auto; padding: 0 16px; height: 60px; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--text); min-width: 0; }
.brand__mark { width: 34px; height: 34px; border-radius: 9px; background: var(--cta); color: var(--on-cta); display: grid; place-items: center; font-family: var(--font-display); font-weight: 700; font-size: 17px; flex: none; overflow: hidden; }
.brand__mark img { width: 100%; height: 100%; object-fit: contain; background: #fff; }
.brand__mark.has-logo { background: #fff; border: 1px solid var(--border); }
.brand__name { font-family: var(--font-display); font-weight: 650; font-size: 17px; letter-spacing: -0.005em; color: var(--heading); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.nav { display: flex; gap: 4px; flex: none; }
.nav a { text-decoration: none; color: var(--muted); padding: 8px 12px; border-radius: 8px; font-weight: 550; font-size: 14px; }
.nav a:hover { background: var(--surface-2); color: var(--text); }
.nav a.is-current { background: var(--primary-soft); color: var(--primary); box-shadow: inset 0 -2px 0 var(--primary); border-radius: 8px 8px 2px 2px; }

.prototype-banner { background: var(--warning-soft); color: var(--warning); font-size: 13px; text-align: center; padding: 6px 16px; border-bottom: 1px solid #f3e2b5; }

/* ---------- page header ---------- */
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: var(--space-4); flex-wrap: wrap; margin-bottom: var(--space-5); }
.eyebrow { font-family: var(--font-display); font-size: 12px; font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase; color: var(--accent-text); margin-bottom: 6px; }
.eyebrow a { color: inherit; }
.page-title { font-family: var(--font-display); font-size: 32px; font-weight: 700; letter-spacing: -0.01em; line-height: 1.1; color: var(--heading); }
.page-sub { color: var(--muted); margin-top: 6px; max-width: 720px; }
.actions { display: flex; gap: 8px; flex-wrap: wrap; }

/* ---------- buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 1px solid var(--border); background: var(--surface); color: var(--text); padding: 10px 16px; border-radius: var(--radius-sm); font-family: var(--font-display); font-weight: 600; font-size: 15px; letter-spacing: .01em; cursor: pointer; text-decoration: none; transition: background .15s, border-color .15s, box-shadow .15s; min-height: 42px; }
.btn:hover { background: var(--surface-2); }
.btn:focus-visible { outline: 3px solid var(--focus-ring); outline-offset: 2px; }
.btn[disabled], .btn[aria-disabled="true"] { opacity: .5; cursor: not-allowed; pointer-events: none; }
/* Main action: orange on The Kiara Method screens, the business color (or neutral) in workspaces. */
.btn--primary, .btn--brand { background: var(--cta); border-color: var(--cta); color: var(--on-cta); }
.btn--primary:hover, .btn--brand:hover { background: var(--cta-hover); border-color: var(--cta-hover); }
.btn--start { background: var(--start); border-color: var(--active-edge); color: var(--on-start); }
.btn--start:hover { background: var(--start-hover); border-color: var(--active-edge); }
.btn--pause { background: var(--surface); border-color: var(--active-edge); color: var(--active); }
.btn--pause:hover { background: var(--active-soft); }
.btn--danger { color: var(--danger); border-color: #f2c4bf; }
.btn--danger:hover { background: var(--danger-soft); }
.btn--ghost { border-color: transparent; background: transparent; color: var(--muted); }
.btn--ghost:hover { background: var(--surface-2); color: var(--text); }
.btn--lg { padding: 13px 20px; font-size: 15px; min-height: 48px; }
.btn--sm { padding: 6px 10px; min-height: 32px; font-size: 13px; }
.btn--block { width: 100%; justify-content: center; }
.icon { width: 18px; height: 18px; flex: none; }

/* ---------- stats ---------- */
.stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin-bottom: 20px; }
.stat { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px 18px; box-shadow: var(--shadow); min-width: 0; }
.stat__label { font-size: 12px; font-weight: 650; letter-spacing: .06em; text-transform: uppercase; color: var(--faint); }
.stat__value { font-size: 26px; font-weight: 700; letter-spacing: -0.02em; margin-top: 4px; font-variant-numeric: tabular-nums; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.stat__hint { color: var(--muted); font-size: 13px; font-variant-numeric: tabular-nums; }
.stat--active { border-color: var(--active-edge); background: var(--active-soft); }
.stat--active .stat__value { color: var(--active); }

/* ---------- client cards ---------- */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 16px; }
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 20px; box-shadow: var(--shadow); position: relative; display: flex; flex-direction: column; gap: 14px; transition: border-color .2s, box-shadow .2s; }
.card.is-active { border-color: var(--active-edge); box-shadow: 0 0 0 3px var(--active-ring), var(--shadow); }
.card__head { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 32px; }
.card__name { font-size: 18px; font-weight: 650; overflow-wrap: anywhere; }
.card__timer { font-family: var(--font-mono); font-size: clamp(40px, 9vw, 48px); font-weight: 600; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; line-height: 1; color: var(--text); }
.card.is-active .card__timer { color: var(--active); }
.card__meta { color: var(--muted); font-size: 13px; font-variant-numeric: tabular-nums; }
.card__edit { display: flex; gap: 6px; flex-wrap: wrap; }
.card__edit input { flex: 1 1 140px; min-width: 0; }
.card--add { border-style: dashed; box-shadow: none; background: transparent; align-items: center; justify-content: center; min-height: 200px; color: var(--muted); cursor: pointer; }
.card--add:hover { background: var(--surface); color: var(--primary); }

.pill { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: 999px; font-size: 12px; font-weight: 650; background: var(--surface-2); color: var(--muted); flex: none; }
.pill::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; opacity: .7; }
.pill--active { background: var(--active-soft); color: var(--active); }
.pill--active::before { opacity: 1; animation: pulse 1.6s ease-in-out infinite; }
.pill--ended { background: var(--surface-2); color: var(--muted); }
.pill--saved { background: var(--primary-soft); color: var(--primary); }
@keyframes pulse { 50% { transform: scale(1.5); opacity: .4; } }
@media (prefers-reduced-motion: reduce) { .pill--active::before { animation: none; } }

/* ---------- forms ---------- */
.input, .select, .textarea { width: 100%; border: 1px solid var(--border); background: var(--surface); border-radius: var(--radius-sm); padding: 10px 12px; min-height: 42px; }
.input:focus, .select:focus, .textarea:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px var(--focus-ring); }
.textarea { min-height: 140px; resize: vertical; line-height: 1.55; }
.field { display: grid; gap: 6px; }
.field label, .field .label { font-size: 13px; font-weight: 600; color: var(--muted); }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }

/* ---------- day summary ---------- */
.panel { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); }
.summary-list { display: grid; gap: 16px; }
.summary { padding: 20px; display: grid; gap: 12px; }
.summary__head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; flex-wrap: wrap; }
.summary__name { font-size: 18px; font-weight: 650; }
.summary__total { font-weight: 650; color: var(--primary); font-variant-numeric: tabular-nums; }
.summary__total small { color: var(--muted); font-weight: 500; }
.sticky-actions { position: sticky; bottom: 0; margin-top: 20px; padding: 12px 0; background: linear-gradient(to top, var(--bg) 70%, transparent); display: flex; gap: 8px; align-items: center; justify-content: flex-end; flex-wrap: wrap; }
.save-status { color: var(--muted); font-size: 13px; margin-right: auto; }
.save-status.is-dirty { color: var(--warning); font-weight: 600; }

.section { margin-top: 32px; }
.section > summary { cursor: pointer; font-weight: 650; font-size: 16px; padding: 4px 0; list-style: none; display: flex; align-items: center; gap: 8px; }
.section > summary::-webkit-details-marker { display: none; }
.section > summary::before { content: "▸"; color: var(--faint); transition: transform .15s; }
.section[open] > summary::before { transform: rotate(90deg); }
.section__body { margin-top: 12px; }
.section__hint { color: var(--muted); font-size: 13px; margin: 0 0 12px; }

.table-wrap { overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; font-size: 14px; font-variant-numeric: tabular-nums; }
.table th { text-align: left; font-size: 12px; text-transform: uppercase; letter-spacing: .05em; color: var(--faint); font-weight: 650; padding: 10px 12px; border-bottom: 1px solid var(--border); white-space: nowrap; }
.table td { padding: 10px 12px; border-bottom: 1px solid var(--border); white-space: nowrap; }
.table tr:last-child td { border-bottom: 0; }
.table .num { text-align: right; }
.tag { font-size: 11px; font-weight: 650; padding: 2px 8px; border-radius: 999px; background: var(--surface-2); color: var(--muted); }
.tag--edited { background: var(--warning-soft); color: var(--warning); }
.tag--running { background: var(--active-soft); color: var(--active); }

.log { list-style: none; margin: 0; padding: 0; }
.log li { padding: 12px 16px; border-bottom: 1px solid var(--border); font-size: 14px; }
.log li:last-child { border-bottom: 0; }
.log__time { color: var(--faint); font-size: 12px; font-variant-numeric: tabular-nums; }
.log__reason { color: var(--muted); font-style: italic; }

/* ---------- history ---------- */
.history-tools { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.history-tools .input { width: auto; }
.day-list { display: grid; gap: 10px; }
.day-row { display: grid; grid-template-columns: 1fr auto; gap: 4px 16px; align-items: center; padding: 16px 18px; text-decoration: none; color: var(--text); background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); }
.day-row:hover { border-color: var(--primary); }
.day-row__date { font-weight: 650; }
.day-row__meta { color: var(--muted); font-size: 13px; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.day-row__total { font-weight: 700; font-size: 18px; font-variant-numeric: tabular-nums; text-align: right; }

/* ---------- misc ---------- */
.notice { padding: 12px 16px; border-radius: var(--radius-sm); margin-bottom: 16px; display: flex; gap: 12px; align-items: center; justify-content: space-between; flex-wrap: wrap; }
.notice--warning { background: var(--warning-soft); color: var(--warning); border: 1px solid #f3e2b5; }
.notice--info { background: var(--active-soft); color: var(--active); border: 1px solid color-mix(in srgb, var(--active-edge) 35%, transparent); }
.empty { text-align: center; color: var(--muted); padding: 40px 16px; }
.muted { color: var(--muted); }
.loading { color: var(--faint); padding: 40px 0; text-align: center; }

.toasts { position: fixed; left: 50%; bottom: 20px; transform: translateX(-50%); display: grid; gap: 8px; z-index: 50; width: min(440px, calc(100% - 32px)); }
.toast { background: var(--text); color: #fff; padding: 12px 16px; border-radius: 10px; box-shadow: var(--shadow-lg); font-size: 14px; }
.toast--error { background: var(--danger); }

.dialog { border: 0; border-radius: var(--radius); padding: 0; width: min(480px, calc(100% - 32px)); box-shadow: var(--shadow-lg); color: var(--text); }
.dialog::backdrop { background: rgba(16, 24, 40, .45); }
.dialog form { padding: 22px; display: grid; gap: 14px; }
.dialog h2 { font-size: 18px; }
.dialog__actions { display: flex; gap: 8px; justify-content: flex-end; flex-wrap: wrap; margin-top: 4px; }
.dialog__actions .spacer { margin-right: auto; }
.dialog__error { color: var(--danger); font-size: 13px; min-height: 0; }

@media (max-width: 720px) {
  .container { padding-top: 16px; }
  .page-title { font-size: 22px; }
  .stats { grid-template-columns: 1fr 1fr; }
  .stat--active { grid-column: 1 / -1; order: -1; }
  .stat__value { font-size: 22px; }
  .page-head .actions { width: 100%; }
  .page-head .actions .btn { flex: 1; }
  .field-row { grid-template-columns: 1fr; }
  .brand__name { font-size: 14px; }
}
@media (max-width: 420px) {
  .nav a { padding: 8px 10px; font-size: 13px; white-space: nowrap; }
}

/* ---------- invoices & clients ---------- */
.pill--draft { background: var(--warning-soft); color: var(--warning); }
.pill--sent { background: var(--primary-soft); color: var(--primary); }
.pill--paid { background: var(--active-soft); color: var(--active); }
.pill--inactive { background: var(--surface-2); color: var(--faint); }
.tag--invoiced { background: var(--primary-soft); color: var(--primary); }

.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 16px; }
.form-grid .span-2 { grid-column: 1 / -1; }
.form-grid .field { align-content: start; }
.step { padding: var(--space-5); display: grid; gap: var(--space-4); }
.step__title { font-family: var(--font-display); font-size: 19px; font-weight: 650; color: var(--heading); display: flex; align-items: center; gap: 10px; }
.step__num { width: 24px; height: 24px; border-radius: 50%; background: var(--cta); color: var(--on-cta); display: grid; place-items: center; font-size: 12px; font-weight: 700; flex: none; }
.stack { display: grid; gap: 16px; }
.chips { display: flex; gap: 6px; flex-wrap: wrap; }
.chip { border: 1px solid var(--border); background: var(--surface); border-radius: 999px; padding: 4px 12px; font-size: 13px; font-weight: 550; cursor: pointer; color: var(--muted); }
.chip:hover { border-color: var(--primary); color: var(--primary); }
.hint { color: var(--muted); font-size: 13px; margin: 0; }
.input-prefix { position: relative; }
.input-prefix > span { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--muted); pointer-events: none; }
.input-prefix > .input { padding-left: 26px; }

.totals { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.totals .stat__value { font-size: 22px; }
.stat--money { background: var(--cta); border-color: var(--cta); }
.stat--money .stat__label, .stat--money .stat__hint, .stat--money .stat__value { color: var(--on-cta) !important; }
.stat--money .stat__label, .stat--money .stat__hint { color: rgba(255, 255, 255, .75); }
.stat--money .stat__value { color: #fff; }

.doc { padding: 28px; display: grid; gap: 22px; }
.doc__head { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.doc__issuer { color: var(--muted); font-size: 13px; white-space: pre-line; }
.doc__issuer strong { color: var(--primary); letter-spacing: .06em; text-transform: uppercase; font-size: 12px; display: block; margin-bottom: 4px; }
.doc__title { text-align: right; }
.doc__title h2 { font-size: 26px; letter-spacing: .02em; }
.doc__meta { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; background: var(--surface-2); border-radius: var(--radius-sm); padding: 16px; }
.doc__meta .stat__label { font-size: 11px; }
.doc__meta div > div:last-child { font-weight: 650; }
.doc__pay { white-space: pre-line; }
.doc__due { display: flex; justify-content: space-between; align-items: center; background: var(--cta); color: var(--on-cta); border-radius: var(--radius-sm); padding: 14px 18px; font-weight: 700; }
.doc__due span:last-child { font-size: 22px; font-variant-numeric: tabular-nums; }

.client-row { display: grid; grid-template-columns: 1fr auto auto; gap: 12px; align-items: center; padding: 14px 18px; border-bottom: 1px solid var(--border); }
.client-row:last-child { border-bottom: 0; }
.client-row__name { font-weight: 650; }
.client-row__rate { font-variant-numeric: tabular-nums; font-weight: 600; }
.client-row.is-inactive .client-row__name { color: var(--faint); }

.invoice-cards { display: none; }

@media (max-width: 720px) {
  .topbar__inner { height: auto; flex-wrap: wrap; padding-top: 10px; padding-bottom: 6px; row-gap: 6px; }
  .nav { width: 100%; overflow-x: auto; }
  .form-grid, .totals { grid-template-columns: 1fr; }
  .doc { padding: 18px; }
  .doc__meta { grid-template-columns: 1fr 1fr; }
  .doc__title { text-align: left; }
  .client-row { grid-template-columns: 1fr auto; }
  .client-row .client-row__rate { grid-column: 1; grid-row: 2; font-size: 13px; }
  .invoice-table { display: none; }
  .invoice-cards { display: grid; gap: 10px; }
}

/* ---------- billing options ---------- */
.options { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin-bottom: 28px; }
.option { display: grid; gap: 6px; align-content: start; padding: 18px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); text-decoration: none; color: var(--text); transition: border-color .15s; }
.option:hover { border-color: var(--primary); }
.option__title { font-weight: 650; font-size: 16px; color: var(--primary); display: flex; align-items: center; gap: 6px; }
.option__text { color: var(--muted); font-size: 13px; }
.option--primary { background: var(--cta); border-color: var(--cta); }
.option--primary .option__title, .option--primary .option__text { color: var(--on-cta); }
.option--primary .option__text { opacity: .82; }
.section-title { font-size: 18px; font-weight: 650; margin: 0 0 12px; }
@media (max-width: 720px) {
  .options { grid-template-columns: 1fr; }
}

/* ---------- card icon buttons (reset, edit) ---------- */
.card__head .actions { gap: 2px; align-items: center; }
.card__head .btn--ghost { padding: 6px; min-height: 30px; }
.card__head .btn--ghost .icon { width: 16px; height: 16px; }
.card__head .btn--ghost[disabled] { opacity: .3; pointer-events: auto; cursor: not-allowed; }

/* ---------- footer (outside #app, so it shows on every screen) ---------- */
body { min-height: 100vh; display: flex; flex-direction: column; }
#app { flex: 1 0 auto; width: 100%; }
.site-footer { flex-shrink: 0; border-top: 1px solid var(--border); background: var(--bg); }
.site-footer__inner { max-width: 1280px; margin: 0 auto; padding: 14px 16px 18px; text-align: center; }
.site-footer p { margin: 0; color: var(--faint); line-height: 1.5; }
.site-footer__main { font-size: 12px; font-weight: 600; color: var(--muted); }
.site-footer__legal { font-size: 11px; max-width: 640px; margin: 2px auto 0 !important; }
@media (max-width: 720px) {
  .site-footer__inner { padding: 12px 16px 16px; }
  .site-footer__legal { font-size: 10.5px; }
}

/* =====================================================================
   The Kiara Method screens: sign-in, recovery, invitations, setup and
   Super Admin. Colors come from the platform theme tokens at the top.
   ===================================================================== */
body.is-platform-screen .topbar,
body.is-platform-screen .prototype-banner { display: none; }
body.theme-platform .site-footer, body.is-platform-screen .site-footer { background: var(--tkm-cream); border-color: var(--border); }
body.theme-platform .site-footer p, body.is-platform-screen .site-footer p { color: var(--tkm-plum); opacity: .75; }
body.theme-platform .topbar { background: var(--tkm-cream); }
body.theme-platform .prototype-banner { background: rgba(78, 3, 66, .06); color: var(--tkm-plum); border-color: var(--border); }
body.theme-platform .panel, body.theme-platform .stat, body.theme-platform .card { box-shadow: none; }

.platform { max-width: 1040px; margin: 0 auto; padding: 56px 0 24px; color: var(--tkm-plum); }
.platform__eyebrow { font-family: var(--tkm-display); font-weight: 600; letter-spacing: .14em; text-transform: uppercase; font-size: 13px; margin: 0 0 14px; }
.platform__title { font-family: var(--tkm-display); font-weight: 700; font-size: clamp(30px, 4vw, 44px); line-height: 1.05; letter-spacing: -0.01em; margin: 0 0 14px; }
.platform__lead { font-size: 17px; max-width: 640px; margin: 0 0 32px; }
.platform__actions { display: flex; justify-content: flex-end; margin-top: 24px; }
.btn--brand[disabled] { opacity: .45; }
.platform .mode-card { background: var(--surface); border-color: var(--border); }
.platform .mode-card.is-selected { border-color: var(--tkm-plum); box-shadow: 0 0 0 2px var(--tkm-plum); }
.platform .mode-card__title { font-size: 21px; }
.platform .mode-card__list li::before { color: var(--tkm-orange); }
.method { list-style: none; display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin: 48px 0 0; padding: 20px 0 0; border-top: 1px solid rgba(78, 3, 66, .2); font-size: 14px; }
.method li { counter-increment: step; }
.method strong { font-family: var(--tkm-display); display: block; font-size: 15px; letter-spacing: .08em; text-transform: uppercase; }

/* ---------- workspace modes (setup and settings) ---------- */
.mode-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.mode-card { position: relative; display: grid; gap: 8px; align-content: start; padding: 22px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); cursor: pointer; transition: border-color .15s, box-shadow .15s; }
.mode-card:hover { border-color: var(--primary); }
.mode-card.is-selected { border-color: var(--primary); box-shadow: 0 0 0 2px var(--primary); }
.mode-card input { position: absolute; opacity: 0; pointer-events: none; }
.mode-card:focus-within { box-shadow: 0 0 0 3px var(--active-ring); }
.mode-card__title { font-size: 18px; font-weight: 700; }
.mode-card__text { color: var(--muted); font-size: 14px; }
.mode-card__list { list-style: none; margin: 6px 0 0; padding: 0; display: grid; gap: 4px; font-size: 14px; }
.mode-card__list li::before { content: "✓ "; color: var(--active); font-weight: 700; }

.module-list { display: grid; gap: 8px; }
.module-row { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 14px 16px; border: 1px solid var(--border); border-radius: var(--radius-sm); cursor: pointer; }
.module-row__title { display: block; font-weight: 650; }
.module-row__text { display: block; color: var(--muted); font-size: 13px; }
.switch { position: relative; flex: none; }
.switch input { position: absolute; inset: 0; opacity: 0; margin: 0; cursor: pointer; }
.switch__track { display: block; width: 44px; height: 24px; border-radius: 999px; background: var(--border); transition: background .15s; }
.switch__track::after { content: ""; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: #fff; box-shadow: var(--shadow); transition: transform .15s; }
.switch input:checked + .switch__track { background: var(--active); }
.switch input:checked + .switch__track::after { transform: translateX(20px); }
.switch input:focus-visible + .switch__track { outline: 3px solid var(--active-ring); outline-offset: 2px; }
.switch input:disabled { cursor: not-allowed; }

/* ---------- dashboard cards ---------- */
.card__kind { color: var(--faint); font-size: 12px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; margin-top: 2px; }
.card--add-menu { cursor: default; flex-direction: column; gap: 6px; }
.card--add-menu .btn { width: 100%; justify-content: flex-start; }

/* ---------- projects ---------- */
.projects-layout { display: grid; grid-template-columns: minmax(0, 2fr) minmax(300px, 1fr); gap: 20px; align-items: start; }
.project { padding: 18px 20px; }
.project.is-archived { opacity: .65; }
.project__head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; margin-bottom: 8px; }
.project__name { font-size: 18px; font-weight: 650; overflow-wrap: anywhere; }
.project__meta { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; color: var(--muted); font-size: 13px; margin-top: 4px; }
.rows { list-style: none; margin: 0; padding: 0; }
.row { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-top: 1px solid var(--border); min-height: 44px; }
.row__check { display: flex; align-items: center; gap: 10px; flex: 1; min-width: 0; cursor: pointer; }
.row__check input { width: 18px; height: 18px; accent-color: var(--active); flex: none; }
.row__name { overflow-wrap: anywhere; }
.row.is-done .row__name { color: var(--faint); text-decoration: line-through; }
.row.is-archived { opacity: .6; }
.row__time { color: var(--muted); font-size: 13px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.row__actions { display: flex; gap: 2px; align-items: center; }
.row--add { border-top: 1px dashed var(--border); }
.row--add .input { min-height: 36px; padding: 6px 10px; }
.btn--start-soft { color: var(--active); border-color: #bfe3d7; }
.btn--start-soft:hover { background: var(--active-soft); }
.inline-form { display: flex; gap: 10px; align-items: flex-end; flex-wrap: wrap; }
.inline-form .input, .inline-form .select { width: auto; flex: 1 1 200px; }
.inline-form .field { flex: 0 0 auto; }

/* ---------- reports ---------- */
.stats--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.report-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; margin-top: 4px; }
.bar-cell { width: 45%; }
.bar { display: block; height: 8px; border-radius: 999px; background: var(--surface-2); overflow: hidden; }
.bar span { display: block; height: 100%; background: var(--accent-mark); border-radius: 999px; }

/* Occasional use on phones: everything stacks; the desktop layout is the reference. */
@media (max-width: 980px) {
  .projects-layout, .report-grid { grid-template-columns: 1fr; }
  .stats--4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 720px) {
  .mode-grid, .method { grid-template-columns: 1fr; }
  .platform { padding-top: 24px; }
  .stats--4 { grid-template-columns: 1fr; }
}
.report-grid > *, .projects-layout > * { min-width: 0; }
.report-grid .table td { white-space: normal; }
@media (max-width: 720px) { .bar-cell { display: none; } }
.card__head { align-items: flex-start; }
.card__head > div { flex: 1; }
.card__head .actions { flex-wrap: nowrap; flex: none; }

/* ---------- language switcher: "Español | English", top right ----------
   Neutral in the app (inherits the business's text tokens, never its brand
   colors); The Kiara Method plum on platform screens. */
.topbar__lang { flex: none; }
.lang-switch { display: inline-flex; align-items: center; gap: 2px; font-size: 12.5px; color: var(--faint); white-space: nowrap; }
.lang-switch button { background: none; border: 0; padding: 4px 6px; border-radius: 6px; font: inherit; color: var(--muted); cursor: pointer; }
.lang-switch button:hover { color: var(--text); }
.lang-switch button[aria-pressed="true"] { color: var(--text); font-weight: 650; text-decoration: underline; text-underline-offset: 3px; }
.lang-switch button:focus-visible { outline: 2px solid currentColor; outline-offset: 1px; }
.platform__top { display: flex; justify-content: flex-end; margin: -32px 0 24px; }
.platform .lang-switch { color: var(--faint); font-family: var(--tkm-body); }
.platform .lang-switch button { color: var(--muted); }
.platform .lang-switch button:hover,
.platform .lang-switch button[aria-pressed="true"] { color: var(--tkm-plum); }
.settings__value { margin: 6px 0 0; font-weight: 600; }
@media (max-width: 720px) {
  .nav { order: 3; }
  .platform__top { margin: 0 0 16px; }
}

/* ---------- top bar: language + account menu ---------- */
.topbar__end { display: flex; align-items: center; gap: 10px; flex: none; }
.user-menu { position: relative; }
.user-menu summary { list-style: none; display: flex; align-items: center; gap: 8px; cursor: pointer; padding: 4px 6px; border-radius: 999px; }
.user-menu summary::-webkit-details-marker { display: none; }
.user-menu summary:hover { background: var(--surface-2); }
.user-menu summary:focus-visible { outline: 2px solid var(--text); outline-offset: 1px; }
.user-menu__avatar { width: 30px; height: 30px; border-radius: 50%; display: inline-grid; place-items: center; background: var(--surface-2); color: var(--text); font-size: 12px; font-weight: 700; border: 1px solid var(--border); }
.user-menu__name { font-size: 13.5px; font-weight: 600; color: var(--text); max-width: 160px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.user-menu__panel { position: absolute; right: 0; top: calc(100% + 6px); min-width: 240px; background: var(--surface); border: 1px solid var(--border); border-radius: 12px; box-shadow: 0 12px 32px rgba(15, 23, 42, .14); padding: 8px; display: flex; flex-direction: column; z-index: 30; }
.user-menu__panel a, .user-menu__panel button { text-align: left; background: none; border: 0; font: inherit; font-size: 14px; color: var(--text); padding: 9px 10px; border-radius: 8px; text-decoration: none; cursor: pointer; }
.user-menu__panel a:hover, .user-menu__panel button:hover { background: var(--surface-2); }
.user-menu__who { display: flex; flex-direction: column; gap: 2px; padding: 8px 10px 10px; margin-bottom: 4px; border-bottom: 1px solid var(--border); font-size: 13px; color: var(--muted); }
.user-menu__who strong { color: var(--text); font-size: 14px; }
.user-menu__group { display: flex; flex-direction: column; border-bottom: 1px solid var(--border); padding-bottom: 4px; margin-bottom: 4px; }
.user-menu__label { font-size: 11.5px; text-transform: uppercase; letter-spacing: .06em; color: var(--faint); padding: 6px 10px 2px; }

/* ---------- access screens (The Kiara Method identity) ---------- */
.platform--auth { max-width: 480px; padding-top: 48px; }
.platform--auth .platform__top { margin: -24px 0 24px; }
.auth__title { font-size: clamp(28px, 3.6vw, 36px); }
.auth__lead { color: var(--tkm-plum); font-size: 16px; margin: -4px 0 20px; }
.auth-card .notice { margin: 0; }
.auth__links { text-align: center; margin: 4px 0 0; font-size: 14px; }
.auth__links a, .auth-card .hint a { color: var(--tkm-plum); }
.auth__who { margin: 0 0 14px; color: var(--tkm-plum); }
.auth__product { margin: 18px 0 0; text-align: center; font-family: var(--tkm-display); letter-spacing: .14em; text-transform: uppercase; font-size: 11px; color: var(--faint); }
.select--sm { padding: 6px 10px; font-size: 13px; width: auto; }
@media (max-width: 720px) {
  .user-menu__name { display: none; }
  .platform--auth { padding-top: 16px; }
  .platform--auth .platform__top { margin: 0 0 16px; }
  .auth-card { padding: 18px; }
}
@media (max-width: 1500px) {
  .user-menu__name { display: none; }
  .nav a { padding: 8px 9px; }
  .brand { min-width: 120px; }
}

/* ---------- shared type: display font for names and section titles ---------- */
.card__name, .summary__name, .project__name, .section-title, .doc__title h2, .option__title, .mode-card__title, .dialog h2, .section > summary {
  font-family: var(--font-display); color: var(--heading); letter-spacing: -0.005em;
}
.card__name { font-size: 20px; }
.stat__value, .day-row__total { font-family: var(--font-display); }
.stat__label, .table th, .card__kind { font-family: var(--font-display); letter-spacing: .1em; }
.panel, .stat, .card, .day-row, .option { border-radius: var(--radius); }
.table th { font-size: 11.5px; }

/* =====================================================================
   Shared components (workspace and platform). Colors come from tokens only.
   ===================================================================== */

/* Page with a main column and a side column (forms). Desktop-first. */
.layout-aside { display: grid; grid-template-columns: minmax(0, 1fr) 380px; gap: var(--space-5); align-items: start; }
.layout-aside > aside { position: sticky; top: 84px; }

.panel__head { padding: 20px var(--space-5) 16px; border-bottom: 1px solid var(--border); display: grid; gap: 4px; }
.panel__title { font-family: var(--font-display); font-size: 20px; font-weight: 650; color: var(--heading); display: flex; align-items: center; gap: 10px; }
.panel__sub { margin: 0; color: var(--muted); font-size: 14px; }
.panel__body { padding: var(--space-5); }
.panel__empty { margin: 0; padding: var(--space-5); color: var(--muted); }
.panel--form .field label { color: var(--heading); }
.count { font-family: var(--font); font-size: 12px; font-weight: 650; min-width: 24px; height: 22px; padding: 0 8px; border-radius: 999px; display: inline-grid; place-items: center; background: var(--primary-soft); color: var(--primary); }

/* People and businesses lists */
.people { list-style: none; margin: 0; padding: 0; }
.person, .biz { display: grid; align-items: center; gap: var(--space-4); padding: 16px var(--space-5); border-top: 1px solid var(--border); }
.people > li:first-child { border-top: 0; }
.person { grid-template-columns: 40px minmax(0, 1.6fr) 170px minmax(0, 1fr) auto; }
.person__who, .biz__who { display: grid; min-width: 0; }
.person__name { font-weight: 600; color: var(--text); overflow-wrap: anywhere; }
.person__email { color: var(--muted); font-size: 13.5px; overflow-wrap: anywhere; }
.person__meta { color: var(--text); font-size: 13.5px; display: grid; }
.person__label { display: block; font-family: var(--font-display); font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: var(--faint); }
.person__actions { display: flex; gap: 6px; justify-content: flex-end; flex-wrap: wrap; }
.person__role .select--sm { width: 100%; }
.person--pending .person__name { color: var(--muted); }

.avatar { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; background: var(--primary-soft); color: var(--primary); font-family: var(--font-display); font-weight: 700; font-size: 15px; flex: none; }
.avatar--pending { background: transparent; border: 1.5px dashed var(--border); color: var(--faint); }
.avatar--square { border-radius: 10px; }

.badge { display: inline-flex; align-items: center; padding: 4px 10px; border-radius: 999px; font-size: 12.5px; font-weight: 600; background: var(--primary-soft); color: var(--primary); }
.badge--soft { background: var(--surface-2); color: var(--muted); }
.pill--ok { background: var(--primary-soft); color: var(--primary); }
.pill--off { background: var(--surface-2); color: var(--danger); }

.btn--ghost-danger { color: var(--danger); }
.btn--ghost-danger:hover { background: var(--danger-soft); color: var(--danger); }

/* Businesses (Super Admin) */
.biz { grid-template-columns: 40px minmax(0, 1.1fr) minmax(0, 1.2fr) minmax(0, 1.7fr) auto; align-items: start; }
.biz > .avatar, .biz > .person__actions { align-self: center; }
.biz__status { margin-top: 6px; }
.biz__owners { display: grid; gap: 2px; font-size: 13.5px; min-width: 0; }
.biz__owner { overflow-wrap: anywhere; }
.biz__facts { display: grid; grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); gap: 4px 16px; font-size: 13.5px; }
.biz__facts > span { min-width: 0; }
.biz.is-suspended .person__name { color: var(--muted); }
.biz--backup { grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr) auto; }
.biz__file { overflow-wrap: anywhere; }
.biz__owner-form { padding: 0 var(--space-5) 16px; background: var(--surface-2); border-top: 1px dashed var(--border); padding-top: 14px; }

/* Invitation link shown once after inviting */
.invite-link { display: grid; gap: 10px; padding: 16px; border-radius: var(--radius-sm); background: var(--primary-soft); border: 1px solid var(--border); }
.invite-link__title { margin: 0; color: var(--text); font-size: 14px; }
.invite-link__row { display: flex; gap: 8px; }
.invite-link__row .input { flex: 1; min-width: 0; font-size: 12.5px; background: var(--surface); }

/* Sign-in card follows the same panel language */
.auth-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: var(--space-5); color: var(--text); }
.auth-card .field label { color: var(--heading); }

@media (max-width: 1100px) {
  .layout-aside { grid-template-columns: 1fr; }
  .layout-aside > aside { position: static; order: -1; }
  .biz { grid-template-columns: 40px minmax(0, 1fr); }
  .biz__owners, .biz__facts, .biz .person__actions { grid-column: 2; justify-content: flex-start; }
  .biz--backup { grid-template-columns: minmax(0, 1fr); }
  .biz--backup .biz__facts, .biz--backup .person__actions { grid-column: 1; }
}
@media (max-width: 720px) {
  .person { grid-template-columns: 40px minmax(0, 1fr); gap: 8px 12px; }
  .person__role, .person__meta, .person__actions { grid-column: 2; justify-content: flex-start; }
  .person__role .select--sm { width: auto; }
  .biz__facts { grid-template-columns: 1fr 1fr; }
  .panel__head, .person, .biz, .panel__body, .panel__empty { padding-left: var(--space-4); padding-right: var(--space-4); }
  .page-title { font-size: 26px; }
}

/* Platform mark in plum; orange stays for actions (as on the sign-in screen). */
body.theme-platform .brand__mark { background: var(--tkm-plum); color: #fff; }

/* Card header: the name gets the full width; kind, status and icons share the next row. */
.card__head { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 4px 8px; }
.card__head > div:first-child { display: contents; }
.card__head .card__name { grid-column: 1 / -1; overflow-wrap: break-word; }
.card__head .card__kind { margin-top: 0; }
.card__head .actions { grid-column: 2; grid-row: 2; }

/* Top bar: room for the business name next to the full menu. */
.nav a { font-size: 14px; }
@media (min-width: 1101px) { .brand { min-width: 0; max-width: 260px; flex: 0 1 auto; } }
@media (max-width: 1500px) { .nav { gap: 0; } .nav a { padding: 8px 8px; } .topbar__end { gap: 6px; } }

/* =====================================================================
   Stopwatch, countdown and Focus Mode (workspace tokens; business colors apply)
   ===================================================================== */
.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; }
.is-over { color: var(--warning) !important; }

/* Today cards */
.card__more { display: flex; gap: 6px; align-items: center; margin-top: -4px; }
.card__more .btn { white-space: nowrap; }
.card__more .btn--icon { margin-left: auto; padding: 6px 8px; }
.card__mode { font-family: var(--font-display); font-size: 12px; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); margin-bottom: -8px; }
.card.is-paused { border-style: dashed; }

/* Stopwatch / Countdown choice */
.plan-picker { border: 0; margin: 0; padding: 0; display: grid; gap: var(--space-3); min-width: 0; }
.segmented { display: inline-grid; grid-template-columns: 1fr 1fr; background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 3px; }
.segmented__option { position: relative; cursor: pointer; }
.segmented__option input, .chip--choice input { position: absolute; opacity: 0; pointer-events: none; }
.segmented__option span { display: block; text-align: center; padding: 9px 14px; border-radius: 8px; font-family: var(--font-display); font-weight: 600; color: var(--muted); }
.segmented__option.is-selected span { background: var(--surface); color: var(--heading); box-shadow: 0 1px 2px rgba(16, 24, 40, .08); }
.segmented__option:focus-within span, .chip--choice:focus-within { outline: 3px solid var(--focus-ring); outline-offset: 1px; }
.plan-picker__durations { display: grid; gap: 8px; }
.chip--choice { position: relative; padding: 7px 14px; font-size: 14px; }
.chip--choice.is-selected { background: var(--cta); border-color: var(--cta); color: var(--on-cta); }
.plan-picker__custom { display: grid; gap: 6px; max-width: 220px; font-size: 13px; font-weight: 600; color: var(--muted); }

/* Figures: planned / real / difference */
.run-figures { display: flex; gap: var(--space-5); flex-wrap: wrap; font-variant-numeric: tabular-nums; }
.run-figures > span { display: grid; }
.run-figures--lg { font-family: var(--font-display); font-size: 22px; font-weight: 650; }

/* Work sessions in Daily History and Reports */
.run-row { display: grid; gap: 10px; padding: 16px var(--space-5); border-top: 1px solid var(--border); }
.people > .run-row:first-child { border-top: 0; }
.run-row__head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.run-row__results { display: grid; gap: 4px; padding: 12px 14px; background: var(--surface-2); border-radius: var(--radius-sm); }
.run-row__qty, .run-row__notes { margin: 0; }
.run-row__notes { white-space: pre-line; color: var(--text); }
.report-grid__wide { grid-column: 1 / -1; }
/* Reports: projects to include, breakdown by project, Time & Cost Report */
.report-select { margin-top: 16px; }
.report-select__head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; flex-wrap: wrap; }
.report-select__tools { align-items: flex-end; margin: 4px 0 10px; }
.report-select__list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 8px 16px; }
.report-select__list .check { font-weight: 500; align-items: flex-start; }
.report-select__list .check input { flex: none; margin-top: 2px; }
.report-select__list .check > .muted:last-child { margin-left: auto; white-space: nowrap; }
.report-project { padding: 10px 0; border-top: 1px solid var(--border); }
.report-project:first-of-type { border-top: 0; }
.report-project__head { display: flex; flex-wrap: wrap; gap: 4px 8px; align-items: baseline; }
.report-project__total { margin-left: auto; font-weight: 600; }
.report-project .table td:first-child { padding-left: 14px; }
.report-project__grand { display: flex; justify-content: space-between; gap: 12px; padding-top: 12px; border-top: 2px solid var(--border); }
.cost-report { min-width: 0; }
.cost-table-wrap { overflow-x: auto; }
.cost-table .input--rate { width: 110px; text-align: right; }
.cost-table tfoot th { padding-top: 10px; }
.cost-report .inline-form { align-items: flex-end; }
@media (max-width: 720px) {
  .cost-table { table-layout: fixed; width: 100%; }
  .cost-table th, .cost-table td { padding-left: 4px; padding-right: 4px; white-space: normal; overflow-wrap: anywhere; font-size: 13px; }
  .cost-table th { overflow-wrap: normal; font-size: 11px; }
  .cost-table th:nth-child(1) { width: 32%; }
  .cost-table th:nth-child(2) { width: 18%; }
  .cost-table th:nth-child(3) { width: 26%; }
  .cost-table .input--rate { width: 100%; min-width: 0; padding-left: 6px; padding-right: 6px; }
}
.dialog--wide { width: min(620px, calc(100% - 32px)); }

/* Focus Mode: only the session on screen; the business's top bar keeps its brand and language. */
body.is-focus .nav, body.is-focus .topbar__user, body.is-focus .prototype-banner, body.is-focus .site-footer { display: none; }
body.is-focus { background: var(--surface); }
body.is-focus .topbar { box-shadow: none; }
.focus { max-width: 760px; margin: 0 auto; padding: var(--space-7) 0 var(--space-6); display: grid; gap: var(--space-5); justify-items: center; text-align: center; }
.focus__context { display: grid; gap: 6px; }
.focus__context .eyebrow { margin: 0; }
.focus__title { font-family: var(--font-display); font-size: clamp(30px, 3.6vw, 44px); font-weight: 700; line-height: 1.08; color: var(--heading); overflow-wrap: anywhere; }
.focus__mode { margin: 0; color: var(--muted); }
.focus__timer { font-family: var(--font-mono); font-weight: 600; font-size: clamp(64px, 11vw, 132px); line-height: 1; letter-spacing: -0.03em; font-variant-numeric: tabular-nums; color: var(--heading); }
.focus__caption { margin: -12px 0 0; font-family: var(--font-display); letter-spacing: .14em; text-transform: uppercase; font-size: 12px; color: var(--muted); }
.focus__figures { display: flex; gap: var(--space-6); justify-content: center; font-variant-numeric: tabular-nums; }
.focus__figures > div { display: grid; gap: 2px; }
.focus__figures strong { font-family: var(--font-display); font-size: 20px; }
.focus__notice { padding: 12px 18px; border-radius: var(--radius-sm); background: var(--warning-soft); color: var(--warning); border: 1px solid #f3e2b5; font-weight: 600; }
.focus__actions { display: flex; gap: var(--space-3); flex-wrap: wrap; justify-content: center; }
.focus__actions .btn { min-width: 200px; }
.focus__secondary { display: flex; gap: var(--space-2); justify-content: center; flex-wrap: wrap; }
.focus__mode-panel { width: min(520px, 100%); padding: var(--space-5); text-align: left; display: grid; gap: var(--space-4); }
.focus--setup, .focus--done { text-align: left; justify-items: stretch; max-width: 620px; }
.focus--setup .focus__context, .focus--done .focus__context { text-align: center; }
.focus__setup { width: 100%; }
@media (max-width: 720px) {
  .focus { padding-top: var(--space-5); }
  .focus__actions .btn { min-width: 0; flex: 1 1 140px; }
  .focus__figures { gap: var(--space-4); }
}

/* =====================================================================
   Workspaces: selector, My Workspaces, branding editor, password toggle
   ===================================================================== */
.topbar__brand { min-width: 0; flex: 0 1 auto; }
.ws-menu { position: relative; min-width: 0; }
.ws-menu > summary { list-style: none; cursor: pointer; padding: 4px 8px 4px 4px; border-radius: 10px; }
.ws-menu > summary::-webkit-details-marker { display: none; }
.ws-menu > summary:hover, .ws-menu[open] > summary { background: var(--surface-2); }
.ws-menu > summary:focus-visible { outline: 3px solid var(--focus-ring); outline-offset: 1px; }
.ws-menu__caret { color: var(--muted); font-size: 12px; margin-left: 2px; }
.ws-menu__panel { position: absolute; left: 0; top: calc(100% + 6px); min-width: 280px; max-width: 360px; background: var(--surface); border: 1px solid var(--border); border-radius: 12px; box-shadow: var(--shadow-lg); padding: 8px; display: grid; gap: 2px; z-index: 30; }
.ws-menu__item { display: flex; align-items: center; gap: 10px; text-align: left; background: none; border: 0; font: inherit; font-size: 14px; color: var(--text); padding: 9px 10px; border-radius: 8px; cursor: pointer; }
.ws-menu__item:hover { background: var(--surface-2); }
.ws-menu__item.is-current { background: var(--primary-soft); font-weight: 600; }
.ws-menu__dot { width: 10px; height: 10px; border-radius: 50%; background: var(--border); flex: none; }
.ws-menu__name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ws-menu__role { font-size: 12px; color: var(--muted); }
.ws-menu__footer { display: grid; border-top: 1px solid var(--border); margin-top: 4px; padding-top: 4px; }
.ws-menu__footer a { font-size: 14px; color: var(--text); padding: 9px 10px; border-radius: 8px; text-decoration: none; }
.ws-menu__footer a:hover { background: var(--surface-2); }
.ws-row { grid-template-columns: 40px minmax(0, 1fr) auto 0 auto; }

/* Branding editor */
.brand-editor { display: grid; grid-template-columns: minmax(0, 1fr) 260px; gap: var(--space-5); align-items: start; }
.brand-editor__logo { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.brand-editor__logo .brand__mark { width: 48px; height: 48px; font-size: 22px; }
.color-field { display: flex; align-items: center; gap: 10px; }
.color-field input[type="color"] { width: 48px; height: 40px; padding: 2px; border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--surface); cursor: pointer; }
.color-field code { font-size: 13px; color: var(--muted); }
.brand-preview {
  --primary: var(--ws-link, #18212f); --cta: var(--ws-primary, #18212f); --cta-hover: var(--ws-primary-hover, #000);
  --on-cta: var(--ws-on-primary, #fff); --accent-2: var(--ws-secondary, var(--border));
  --start: var(--ws-primary, #1f8a70); --start-hover: var(--ws-primary-hover, #1a7862); --on-start: var(--ws-on-primary, #fff);
  --active-edge: var(--ws-primary-edge, #1f8a70);
  display: grid; gap: 12px; padding: 16px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface);
}
.brand-preview__bar { height: 6px; border-radius: 999px; background: var(--accent-2); }
.brand-preview__link { color: var(--primary); text-decoration: underline; font-weight: 600; }
.mode-card__example { font-size: 13px; color: var(--faint); font-style: italic; }

/* Password field with show / hide */
.password-field { position: relative; display: flex; }
.password-field .input { padding-right: 96px; }
.password-field__toggle { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); background: none; border: 0; font: inherit; font-size: 13px; font-weight: 600; color: var(--primary); padding: 6px 8px; border-radius: 6px; cursor: pointer; }
.password-field__toggle:focus-visible { outline: 3px solid var(--focus-ring); }

@media (max-width: 980px) { .brand-editor { grid-template-columns: 1fr; } }
@media (max-width: 720px) { .ws-menu__panel { position: fixed; left: 16px; right: 16px; max-width: none; top: 56px; } }

/* Stage 4: contracted time, activity status, admin tabs */
.check { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 600; color: var(--text); cursor: pointer; }
.check input { width: 18px; height: 18px; accent-color: var(--primary); }
.plan-picker__contracted { display: grid; gap: var(--space-3); padding-top: var(--space-3); border-top: 1px solid var(--border); }
.badge--status-pending { background: var(--surface-2); color: var(--muted); }
.badge--status-in_progress { background: var(--active-soft); color: var(--heading); }
.badge--status-partial { background: var(--warning-soft); color: var(--warning); }
.badge--status-completed { background: var(--primary-soft); color: var(--primary); }
.focus__contract { display: grid; gap: 2px; }
.focus__contract strong { font-family: var(--font-display); font-size: 20px; }
.focus__notice--contract { background: var(--active-soft); color: var(--heading); border-color: var(--active-ring); }
.focus__pending { max-width: 560px; margin: 0 auto; padding: 12px 18px; border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--surface); text-align: left; }
.focus__pending p { margin: 4px 0 0; white-space: pre-line; }
.admin-tabs { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--space-3); }
.admin-tabs .segmented { grid-template-columns: auto auto; }
button.segmented__option { appearance: none; border: 0; background: none; padding: 0; font: inherit; }
button.segmented__option:focus-visible span { outline: 3px solid var(--focus-ring); outline-offset: 1px; }

/* Billing screens grouped under one menu entry (inline on phones) */
.nav-group { position: relative; display: flex; }
.nav-group__toggle { appearance: none; border: 0; background: none; font: inherit; cursor: pointer; color: var(--muted); padding: 8px 12px; border-radius: 8px; font-weight: 550; font-size: 14px; white-space: nowrap; }
.nav-group__toggle:hover { background: var(--surface-2); color: var(--text); }
.nav-group__toggle.is-current { background: var(--primary-soft); color: var(--primary); box-shadow: inset 0 -2px 0 var(--primary); border-radius: 8px 8px 2px 2px; }
.nav-group__toggle:focus-visible { outline: 3px solid var(--focus-ring); outline-offset: 1px; }
.nav-group__panel { display: none; position: absolute; top: calc(100% + 6px); left: 0; z-index: 20; min-width: 220px; padding: 6px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-sm); box-shadow: 0 8px 24px rgba(16, 24, 40, .12); }
.nav-group.is-open .nav-group__panel { display: grid; gap: 2px; }
.nav-group__panel a { white-space: nowrap; }
@media (max-width: 720px) {
  .nav-group, .nav-group__panel, .nav-group.is-open .nav-group__panel { display: contents; }
  .nav-group__toggle { display: none; }
}

/* Contextual help: a small "?" that opens a short note */
.help-tip { display: inline-flex; align-items: center; justify-content: center; width: 20px; height: 20px; margin-left: 4px; padding: 0; vertical-align: middle;
  border: 1px solid var(--border); border-radius: 50%; background: var(--surface); color: var(--muted); font: 700 12px/1 var(--font-body, inherit); cursor: pointer; flex: none; }
.help-tip:hover, .help-tip[aria-expanded="true"] { color: var(--heading); border-color: var(--heading); }
.help-tip:focus-visible { outline: 3px solid var(--focus-ring); outline-offset: 2px; }
.help-pop { position: absolute; z-index: 60; width: min(340px, calc(100vw - 24px)); padding: 14px 16px; background: var(--surface); color: var(--text);
  border: 1px solid var(--border); border-radius: var(--radius-sm); box-shadow: 0 10px 30px rgba(16, 24, 40, .16); font-size: 14px; line-height: 1.5; text-align: left; letter-spacing: normal; text-transform: none; font-weight: 400; }
.help-pop p { margin: 8px 0 0; }
.help-pop__head { display: flex; align-items: center; justify-content: space-between; gap: 12px; color: var(--heading); }
.help-pop__close { appearance: none; border: 0; background: none; font-size: 20px; line-height: 1; color: var(--muted); cursor: pointer; padding: 2px 6px; border-radius: 6px; }
.help-pop__close:focus-visible { outline: 3px solid var(--focus-ring); }
.help-pop__example { padding: 8px 10px; background: var(--surface-2); border-radius: 8px; }
.help-pop__example span { font-weight: 650; color: var(--heading); }
.help-pop--sheet { position: fixed; left: 12px !important; right: 12px; bottom: 12px; top: auto !important; width: auto; }
.plan-picker__head { display: flex; align-items: center; gap: 2px; }

/* Phones: activity rows wrap their buttons instead of pushing the page sideways */
@media (max-width: 720px) {
  .row { flex-wrap: wrap; }
  .row__check { flex: 1 1 60%; }
  .row__actions { flex-wrap: wrap; justify-content: flex-end; margin-left: auto; }
  .project__head { flex-wrap: wrap; }
  .project__head > * { min-width: 0; }
}

/* Deleting and restoring workspaces */
.btn--danger-solid { background: var(--danger); border-color: var(--danger); color: #fff; }
.btn--danger-solid:hover { filter: brightness(.95); }
.btn--danger-solid:disabled { opacity: .45; cursor: not-allowed; filter: none; }
.dialog--danger h2 { color: var(--danger); }
.delete-list { margin: 6px 0 0; padding-left: 18px; display: grid; gap: 2px; }
.deleted-row { grid-template-columns: 40px minmax(0, 1fr) auto auto; }
.deleted-row__facts { display: flex; gap: var(--space-5); font-size: 13.5px; }
.deleted-row__facts > span { display: grid; }
.ws-row .person__actions { display: flex; flex-wrap: wrap; gap: 6px; justify-content: flex-end; }
@media (max-width: 720px) {
  .deleted-row { grid-template-columns: 40px minmax(0, 1fr); }
  .deleted-row__facts, .deleted-row .person__actions { grid-column: 2; }
}

/* Deleted workspaces: account menu entry with a discreet count, and its own page */
.user-menu__item { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.menu-count { min-width: 20px; height: 20px; padding: 0 6px; border-radius: 999px; display: inline-grid; place-items: center;
  background: var(--surface-2); color: var(--muted); border: 1px solid var(--border); font-size: 11.5px; font-weight: 700; line-height: 1; }
.empty-state { display: grid; justify-items: center; gap: 10px; padding: 48px 24px; text-align: center; }
.empty-state__mark { width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; background: var(--surface-2); color: var(--muted); font-weight: 700; }
.empty-state__title { font-size: 18px; margin: 4px 0 0; color: var(--heading); }
.empty-state__text { max-width: 440px; margin: 0 0 8px; color: var(--muted); }
.page-head .eyebrow a { color: inherit; text-decoration: none; }
.page-head .eyebrow a:hover { text-decoration: underline; }
@media (min-width: 721px) and (max-width: 1024px) {
  .deleted-row { grid-template-columns: 40px minmax(0, 1fr) auto; }
  .deleted-row .person__actions { grid-column: 2 / -1; justify-self: start; }
}

/* Today: project cards with a general timer and optional activities */
.project-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 380px), 1fr)); gap: var(--space-4); margin-bottom: var(--space-4); align-items: start; }
.project-card { gap: 12px; }
.project-card__now { display: flex; align-items: center; gap: 8px; font-size: 13.5px; color: var(--heading); background: var(--active-soft); border-radius: 8px; padding: 6px 10px; }
.project-card__now .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--accent-mark); flex: none; }
.project-card__general { display: grid; gap: 2px; }
.project-card__general .card__timer { margin: 0; }
.project-card__controls { display: grid; gap: 8px; }
.project-acts { border-top: 1px solid var(--border); padding-top: 8px; }
.project-acts__toggle { appearance: none; width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 8px; background: none; border: 0;
  padding: 8px 4px; font: inherit; font-weight: 650; color: var(--heading); cursor: pointer; border-radius: 8px; }
.project-acts__toggle:hover { background: var(--surface-2); }
.project-acts__toggle:focus-visible { outline: 3px solid var(--focus-ring); outline-offset: 1px; }
.project-acts__toggle[aria-expanded="true"] .project-acts__caret { transform: rotate(180deg); }
.project-acts__caret { transition: transform .15s ease; color: var(--muted); }
.project-acts__body { display: grid; gap: 8px; padding-top: 4px; }
.act-list { list-style: none; margin: 0; padding: 0; display: grid; }
.act-row { display: grid; grid-template-columns: 24px minmax(0, 1fr) auto auto; align-items: center; gap: 8px; padding: 8px 4px; border-top: 1px solid var(--border); min-height: 44px; }
.act-row:first-child { border-top: 0; }
.act-row.is-running { background: var(--active-soft); border-radius: 8px; }
.act-row__check input { width: 18px; height: 18px; accent-color: var(--active); }
.act-row__name { overflow-wrap: anywhere; font-size: 14px; }
.act-row.is-done .act-row__name { color: var(--faint); text-decoration: line-through; }
.act-row__time { font-variant-numeric: tabular-nums; font-size: 13.5px; color: var(--muted); }
.act-row.is-running .act-row__time { color: var(--heading); font-weight: 650; }
.act-row__actions { display: flex; gap: 4px; }
.act-row__actions .btn { min-width: 36px; min-height: 36px; justify-content: center; }
.act-empty { margin: 0; font-size: 13.5px; }
.act-add { display: flex; gap: 8px; }
.act-add .input { min-height: 38px; padding: 6px 10px; }
.act-done summary { cursor: pointer; font-size: 13.5px; font-weight: 600; color: var(--muted); padding: 6px 4px; }
@media (max-width: 720px) {
  .act-row { grid-template-columns: 24px minmax(0, 1fr) auto; }
  .act-row__actions { grid-column: 2 / -1; justify-content: flex-end; }
}
.project-card.is-active .card__timer { color: var(--text); }
.project-card__general.is-running .card__timer { color: var(--active); }

/* Projects: follow-up dashboard */
.project-new { margin-bottom: var(--space-4); }
.summary-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr)); gap: var(--space-4); margin-bottom: var(--space-4); }
.project-summary { padding: 18px 20px; display: grid; gap: 14px; position: relative; }
.project-summary.is-archived { opacity: .7; }
.project-summary__head { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; }
.project-summary__link { color: inherit; text-decoration: none; }
.project-summary__link:hover { text-decoration: underline; }
.project-summary__foot { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; font-size: 13.5px; }
.project-summary__foot .btn { margin-left: auto; }
.kpis { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin: 0; }
.kpis dt { font-size: 11.5px; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); font-weight: 600; }
.kpis dd { margin: 2px 0 0; font-weight: 650; color: var(--heading); font-size: 15px; }
.status-pill--not_started { background: var(--surface-2); color: var(--muted); }
.status-pill--in_progress { background: var(--active-soft); color: var(--heading); }
.status-pill--on_hold { background: var(--warning-soft); color: var(--warning); }
.status-pill--completed { background: var(--primary-soft); color: var(--primary); }
.more-menu { position: relative; }
.more-menu > summary { list-style: none; cursor: pointer; }
.more-menu > summary::-webkit-details-marker { display: none; }
.more-menu__panel { position: absolute; right: 0; top: calc(100% + 4px); z-index: 25; min-width: 180px; padding: 6px; display: grid; background: var(--surface);
  border: 1px solid var(--border); border-radius: 10px; box-shadow: 0 10px 28px rgba(15, 23, 42, .14); }
.more-menu__panel button { text-align: left; background: none; border: 0; font: inherit; font-size: 14px; color: var(--text); padding: 8px 10px; border-radius: 8px; cursor: pointer; }
.more-menu__panel button:hover, .more-menu__panel button:focus-visible { background: var(--surface-2); }
.project-head-actions { align-items: flex-end; flex-wrap: wrap; }
.status-select { display: grid; gap: 2px; }
.status-select .select { min-width: 170px; }
.status-auto { margin: -8px 0 12px; }
.stats--four { grid-template-columns: repeat(auto-fit, minmax(min(100%, 200px), 1fr)); }
.stat__value--text { font-size: 20px; line-height: 1.3; }
.detail-layout { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: var(--space-4); align-items: start; }
.detail-layout > * { min-width: 0; }
.panel__head--row { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.segmented--3 { grid-template-columns: repeat(3, auto); }
.notes-area { min-height: 180px; }
.history-table td { vertical-align: top; }
@media (max-width: 900px) { .detail-layout { grid-template-columns: 1fr; } }
@media (max-width: 520px) { .kpis { grid-template-columns: 1fr 1fr; } }

/* Time per day chart: one series in the workspace's main color, recessive grid */
.chart { position: relative; }
.chart__svg { width: 100%; height: 220px; display: block; overflow: visible; }
.chart__mark { fill: var(--accent-mark); }
.chart__hit { fill: transparent; }
.chart__bar { outline: none; cursor: default; }
.chart__bar:hover .chart__mark, .chart__bar:focus .chart__mark { fill: var(--heading); }
.chart__bar:focus-visible .chart__hit { stroke: var(--focus-ring); stroke-width: 2; }
.chart__grid { stroke: var(--border); stroke-dasharray: 3 4; vector-effect: non-scaling-stroke; }
.chart__base { stroke: var(--border); vector-effect: non-scaling-stroke; }
.chart__x { fill: var(--muted); font-size: 11px; }
.chart__scale { position: absolute; top: 0; right: 0; display: grid; gap: 70px; font-size: 11px; color: var(--muted); text-align: right; pointer-events: none; }
.chart__tip { position: absolute; top: -6px; padding: 6px 10px; border-radius: 8px; background: var(--heading); color: #fff; font-size: 12.5px; white-space: nowrap; pointer-events: none; }
.chart__table { margin-top: 10px; }
.chart__table summary { cursor: pointer; font-size: 13px; color: var(--muted); }

/* Super Admin: three tabs */
.admin-tabs .segmented--tabs { grid-template-columns: repeat(3, auto); }
.segmented__option span.count, .segmented--tabs .count { display: inline-grid; place-items: center; min-width: 20px; padding: 1px 6px; margin-left: 6px; border-radius: 999px; background: var(--surface-2); color: var(--muted); font-size: 11.5px; box-shadow: none; }
.admin-note { padding: 12px var(--space-5) 0; }
.admin-backups__actions { padding: 12px var(--space-5) 4px; margin: 0; }
@media (max-width: 720px) { .admin-backups__actions { padding-left: var(--space-4); padding-right: var(--space-4); } }
.admin-subhead { font-size: 14px; color: var(--muted); padding: 16px var(--space-5) 4px; margin: 0; border-top: 1px solid var(--border); }
@media (max-width: 720px) {
  .admin-tabs .segmented--tabs { grid-template-columns: 1fr; width: 100%; }
}
.detail-layout > .stack, .detail-layout .panel { min-width: 0; max-width: 100%; }
.table-scroll { overflow-x: auto; max-width: 100%; }
.chart__tip { max-width: 90%; overflow: hidden; text-overflow: ellipsis; }
.chart__label { position: absolute; right: 0; transform: translateY(-120%); font-size: 11px; color: var(--muted); background: var(--surface); padding: 0 4px; pointer-events: none; }
.chart__tip { z-index: 2; }

/* V9.1: the workspace's secondary color as a thin detail on top of cards and figures
   (transparent in the neutral theme, so nothing changes without colors). */
.card, .stat, .panel.step {
  background-image: linear-gradient(var(--accent-2), var(--accent-2));
  background-size: 100% 3px;
  background-repeat: no-repeat;
}
.stat--money { background-image: none; }
.card--add { background-image: none; }
/* Secondary selected elements (tabs inside a page) carry the secondary color. */
.segmented__option.is-selected span { box-shadow: 0 1px 2px rgba(16, 24, 40, .08), inset 0 -2px 0 var(--ws-secondary-edge, transparent); }

/* Focus alarm: a countdown block ended. Stays until the person answers it. */
.focus-alarm { position: fixed; right: 16px; bottom: 16px; z-index: 60; display: grid; gap: 10px; width: min(420px, calc(100vw - 32px)); }
.focus-alarm[hidden] { display: none; }
.focus-alarm__item { background: var(--surface); border: 1px solid var(--active-edge); border-radius: var(--radius); box-shadow: var(--shadow-lg); padding: 14px 16px; display: grid; gap: 8px; }
.focus-alarm__item p { margin: 0; }
.focus-alarm__head { display: flex; align-items: center; gap: 8px; color: var(--heading); }
.focus-alarm__dot { width: 10px; height: 10px; border-radius: 50%; background: var(--accent-mark); flex: none; }
.focus-alarm__item.is-ringing .focus-alarm__dot { animation: pulse 1.6s ease-in-out infinite; }
.focus-alarm__actions { display: flex; flex-wrap: wrap; gap: 8px; }
@media (prefers-reduced-motion: reduce) { .focus-alarm__item.is-ringing .focus-alarm__dot { animation: none; } }
@media (max-width: 640px) { .focus-alarm { right: 12px; left: 12px; bottom: 12px; width: auto; } }
.focus__notice--ended { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; }
