/* Poppins: the same font as strsuperva.com (served from /fonts, SIL Open Font License). */
@font-face { font-family: 'Poppins'; font-style: normal; font-weight: 400; font-display: swap; src: url('/fonts/poppins-latin-ext-400-normal.woff2') format('woff2'); unicode-range: U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF; }
@font-face { font-family: 'Poppins'; font-style: normal; font-weight: 400; font-display: swap; src: url('/fonts/poppins-latin-400-normal.woff2') format('woff2'); unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD; }
@font-face { font-family: 'Poppins'; font-style: normal; font-weight: 500; font-display: swap; src: url('/fonts/poppins-latin-ext-500-normal.woff2') format('woff2'); unicode-range: U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF; }
@font-face { font-family: 'Poppins'; font-style: normal; font-weight: 500; font-display: swap; src: url('/fonts/poppins-latin-500-normal.woff2') format('woff2'); unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD; }
@font-face { font-family: 'Poppins'; font-style: normal; font-weight: 600; font-display: swap; src: url('/fonts/poppins-latin-ext-600-normal.woff2') format('woff2'); unicode-range: U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF; }
@font-face { font-family: 'Poppins'; font-style: normal; font-weight: 600; font-display: swap; src: url('/fonts/poppins-latin-600-normal.woff2') format('woff2'); unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD; }
@font-face { font-family: 'Poppins'; font-style: normal; font-weight: 700; font-display: swap; src: url('/fonts/poppins-latin-ext-700-normal.woff2') format('woff2'); unicode-range: U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF; }
@font-face { font-family: 'Poppins'; font-style: normal; font-weight: 700; font-display: swap; src: url('/fonts/poppins-latin-700-normal.woff2') format('woff2'); unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD; }


/* ===== Colours =====
   Brand: logo teal and charcoal. The app sits in a soft teal frame; the work sits on a clean sheet.
   Light is the base; dark is used when the person picks Dark, or picks System and their device is dark. */
:root {
  --teal: #1d9d86;           /* logo teal: highlights, badges, focus */
  --primary: #167f6c;        /* deeper teal so white text on buttons stays readable */
  --primary-hover: #116a5a;
  --frame: #e7f0ed;          /* the tinted frame around the app (menu + top bar) */
  --bg: #f6f8f7;             /* page background (client portal, sign-in side) */
  --panel: #ffffff;          /* the sheet, cards, inputs */
  --panel-2: #f5f8f7;        /* quiet fills */
  --hover: #f2f7f5;
  --active: #e0efea;         /* selected row */
  --text: #141a18;
  --muted: #5d6b66;
  --nav-fg: #33403b;
  --line: #e3eae7;
  --line-soft: #eef3f1;
  --bubble: #eff4f2;         /* other people's messages */
  --mine: var(--primary);
  --mine-text: #ffffff;
  --track: #e8efec;
  --danger: #c0392b;
  --warn-bg: #fff4dc;
  --warn-text: #7a4a05;
  --ok: #1e7b4f;
  --link: #167f6c;
  --t-teal-bg: #e0f2ed; --t-teal-fg: #0f5a4c;
  --t-green-bg: #dcf5e6; --t-green-fg: #17694a;
  --t-red-bg: #ffeceb; --t-red-fg: #9a2c20;
  --t-purple-bg: #efe9fb; --t-purple-fg: #5a3a9a;
  --t-grey-bg: #edf0ef; --t-grey-fg: #3a4743;
  --t-ink-bg: #1b1b1b; --t-ink-fg: #ffffff;
  --bar-1: #bfe3d9; --bar-2: #d9e4f4; --mline: #9cc9bd;
  --radius: 12px;
  --shadow: 0 1px 2px rgba(10,30,25,.06), 0 8px 24px -12px rgba(10,30,25,.18);
  --ease-out: cubic-bezier(.23, 1, .32, 1);
  color-scheme: light;
}
/* Dark (two selectors because "System" follows the device). Keep both blocks the same. */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --teal: #2bb59b; --primary: #178a75; --primary-hover: #1d9d86;
    --frame: #111715; --bg: #111715; --panel: #192220; --panel-2: #1f2926; --hover: #1e2825; --active: #1c3a32;
    --text: #e7efec; --muted: #94a49f; --nav-fg: #b8c6c1; --line: #26312d; --line-soft: #202a27;
    --bubble: #24302c; --mine: #178a75; --track: #26322e; --danger: #ff8a80; --warn-bg: #3a2c10; --warn-text: #f5cf85; --ok: #4fc98a; --link: #5fd0b8;
    --t-teal-bg: #173c35; --t-teal-fg: #a6e6d8; --t-green-bg: #123826; --t-green-fg: #8fe0b3; --t-red-bg: #3d1a1a; --t-red-fg: #ffb3ae;
    --t-purple-bg: #33284d; --t-purple-fg: #d4c4f5; --t-grey-bg: #26302d; --t-grey-fg: #c9d4d0; --t-ink-bg: #e7efec; --t-ink-fg: #141a18;
    --bar-1: #1f5c4e; --bar-2: #26405f; --mline: #2f5c51;
    --shadow: 0 1px 2px rgba(0,0,0,.4), 0 8px 24px -12px rgba(0,0,0,.6); color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --teal: #2bb59b; --primary: #178a75; --primary-hover: #1d9d86;
  --frame: #111715; --bg: #111715; --panel: #192220; --panel-2: #1f2926; --hover: #1e2825; --active: #1c3a32;
  --text: #e7efec; --muted: #94a49f; --nav-fg: #b8c6c1; --line: #26312d; --line-soft: #202a27;
  --bubble: #24302c; --mine: #178a75; --track: #26322e; --danger: #ff8a80; --warn-bg: #3a2c10; --warn-text: #f5cf85; --ok: #4fc98a; --link: #5fd0b8;
  --t-teal-bg: #173c35; --t-teal-fg: #a6e6d8; --t-green-bg: #123826; --t-green-fg: #8fe0b3; --t-red-bg: #3d1a1a; --t-red-fg: #ffb3ae;
  --t-purple-bg: #33284d; --t-purple-fg: #d4c4f5; --t-grey-bg: #26302d; --t-grey-fg: #c9d4d0; --t-ink-bg: #e7efec; --t-ink-fg: #141a18;
  --bar-1: #1f5c4e; --bar-2: #26405f; --mline: #2f5c51;
  --shadow: 0 1px 2px rgba(0,0,0,.4), 0 8px 24px -12px rgba(0,0,0,.6); color-scheme: dark;
}
/* Switching appearance: colours cross-fade instead of flashing. */
.theming, .theming * { transition: background-color 260ms ease, color 260ms ease, border-color 260ms ease, fill 260ms ease !important; }

* { box-sizing: border-box; }
html, body { height: 100%; margin: 0; }
body { font: 15px/1.5 "Poppins", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif; background: var(--frame); color: var(--text); -webkit-font-smoothing: antialiased; }
button, input, select, textarea { font: inherit; color: inherit; }
a { color: var(--link); }
.boot { display: grid; place-items: center; height: 100vh; color: var(--muted); }
.hidden { display: none !important; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.num, .card .num, .clocks b, .time, .stamp { font-variant-numeric: tabular-nums; }

/* ===== Buttons & inputs ===== */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; border: 1px solid var(--line); background: var(--panel); padding: 8px 14px; border-radius: 10px; cursor: pointer; text-decoration: none; color: var(--text); min-height: 38px; font-weight: 500; white-space: nowrap; transition: transform 160ms var(--ease-out), background-color 150ms ease, border-color 150ms ease; }
.btn.primary { background: var(--primary); border-color: var(--primary); color: #fff; }
.btn.danger { color: var(--danger); }
.btn.ghost { border-color: transparent; background: transparent; }
.btn.sm { padding: 4px 10px; min-height: 30px; font-size: 13px; }
.btn:disabled { opacity: .55; cursor: default; }
.btn svg { width: 16px; height: 16px; flex-shrink: 0; }
/* Pressing anything gives instant feedback. */
.btn:active:not(:disabled), .icon-btn:active:not(:disabled), .quick-card:active, .opt:active { transform: scale(.97); }
@media (hover: hover) and (pointer: fine) {
  .btn:hover { background: var(--hover); }
  .btn.primary:hover { background: var(--primary-hover); border-color: var(--primary-hover); }
  .btn.ghost:hover { background: var(--hover); }
}
.field { display: grid; gap: 6px; margin-bottom: 14px; }
.field label { font-size: 13px; font-weight: 500; }
.input, select.input, textarea.input { width: 100%; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--panel); transition: border-color 150ms ease, box-shadow 150ms ease; }
.input:focus { outline: none; border-color: var(--teal); box-shadow: 0 0 0 3px color-mix(in srgb, var(--teal) 22%, transparent); }
:focus-visible { outline: 2px solid var(--teal); outline-offset: 2px; }
.check { display: flex; gap: 8px; align-items: flex-start; margin-bottom: 10px; }
.check input { margin-top: 3px; accent-color: var(--primary); }
.error { color: var(--danger); font-size: 14px; min-height: 1em; }
.row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.spacer { flex: 1; }

/* ===== Sign-in pages: a photo of the work, and the form ===== */
.auth { min-height: 100vh; min-height: 100dvh; display: grid; grid-template-columns: 1.1fr 1fr; background: var(--panel); }
.auth-photo { position: relative; overflow: hidden; background: #1b2421; color: #fff; }
.auth-photo img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 62% 50%; }
.auth-photo::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(10,16,14,0) 40%, rgba(10,16,14,.8) 100%); }
.auth-cap { position: absolute; z-index: 1; left: 40px; right: 40px; bottom: 36px; display: grid; gap: 18px; }
.auth-cap h2 { margin: 0; font-size: clamp(30px, 3.4vw, 42px); line-height: 1.08; letter-spacing: -.02em; max-width: 14ch; font-weight: 600; }
.zones { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; max-width: 520px; }
.zone { display: grid; gap: 2px; }
.zone > span { font-size: 12px; letter-spacing: .06em; text-transform: uppercase; opacity: .75; }
.zone b { font-size: clamp(26px, 2.6vw, 34px); font-weight: 500; font-variant-numeric: tabular-nums; letter-spacing: -.01em; }
.zone-pick { position: relative; display: inline-flex; align-items: center; gap: 4px; width: max-content; cursor: pointer; font-size: 12px; letter-spacing: .06em; text-transform: uppercase; }
.zone-pick span { opacity: .75; }
.zone-pick svg { width: 14px; height: 14px; opacity: .75; }
.zone-pick:hover span, .zone-pick:hover svg { opacity: 1; }
.zone-pick select { position: absolute; inset: 0; opacity: 0; cursor: pointer; font-size: 16px; }
.zone-pick:focus-within { outline: 2px solid currentColor; outline-offset: 3px; border-radius: 4px; }
.zone small { font-size: 13px; opacity: .8; }
.desk { max-width: 520px; display: grid; gap: 6px; font-size: 12px; }
.desk .bar24 { position: relative; height: 10px; border-radius: 99px; background: rgba(255,255,255,.18); }
.desk .open { position: absolute; top: 0; bottom: 0; border-radius: 99px; background: #5fd3bb; }
.desk .now { position: absolute; top: -4px; width: 2px; height: 18px; background: #fff; border-radius: 2px; }
.desk .lbl { display: flex; justify-content: space-between; gap: 8px; opacity: .8; }
.auth-side { display: flex; flex-direction: column; justify-content: center; padding: 48px clamp(24px, 6vw, 80px); background: var(--panel); }
.auth-card { width: 100%; max-width: 420px; }
.auth-brand { display: flex; align-items: center; gap: 12px; font-weight: 600; font-size: 17px; margin-bottom: 26px; }
.auth-brand img { width: 44px; height: 44px; }
.auth-brand small { display: block; font-weight: 400; font-size: 12px; color: var(--muted); margin-top: -2px; }
.auth-card h1 { font-size: 30px; margin: 0 0 6px; font-weight: 600; letter-spacing: -.02em; }
.auth-card .btn.primary { width: 100%; margin-top: 4px; min-height: 48px; font-size: 15px; font-weight: 600; }
.auth-card .input { padding: 12px 14px; }
.divider { display: flex; align-items: center; gap: 10px; color: var(--muted); font-size: 13px; margin: 18px 0; }
.divider::before, .divider::after { content: ""; flex: 1; height: 1px; background: var(--line); }
#google-btn { display: flex; justify-content: center; min-height: 44px; }
.auth-legal { margin: 28px 0 0; font-size: 13px; display: flex; gap: 16px; }
.auth-legal a { color: var(--muted); }
.consent-list { padding-left: 18px; font-size: 14px; }
.consent-list li { margin: 6px 0; }
.auth-card .check { font-size: 14px; }
.demo-box { margin-top: 18px; padding: 12px; border-radius: 12px; background: color-mix(in srgb, var(--teal) 10%, transparent); border: 1px dashed var(--teal); font-size: 13px; }
.demo-roles { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; margin-top: 8px; }
.demo-roles .btn { justify-content: flex-start; white-space: normal; text-align: left; min-width: 0; line-height: 1.25; }
@media (max-width: 860px) {
  .auth { grid-template-columns: 1fr; grid-template-rows: auto 1fr; }
  .auth-photo { min-height: 300px; }
  .auth-cap { left: 20px; right: 20px; bottom: 18px; gap: 12px; }
  .auth-cap h2 { font-size: 26px; }
  .auth-side { padding: 28px 20px calc(28px + env(safe-area-inset-bottom)); justify-content: flex-start; }
  .auth-brand { display: none; }
}

/* ===== Team app: a tinted frame (menu + top bar) holding a clean sheet ===== */
.shell { display: grid; grid-template-columns: 232px minmax(0, 1fr); grid-template-rows: 56px minmax(0, 1fr); height: 100vh; height: 100dvh; background: var(--frame); }
.rail { grid-row: 1 / 3; display: flex; flex-direction: column; gap: 2px; padding: 14px 12px; min-height: 0; overflow-y: auto; }
.rail-brand { display: flex; align-items: center; gap: 10px; font-weight: 600; font-size: 15px; padding: 2px 8px 18px; text-decoration: none; color: var(--text); }
.rail-brand img { width: 34px; height: 34px; }
.rail-brand small { display: block; font-weight: 400; font-size: 11px; color: var(--muted); margin-top: -2px; }
.rail button { display: flex; align-items: center; gap: 12px; width: 100%; border: 0; background: transparent; color: var(--nav-fg); border-radius: 10px; padding: 9px 12px; cursor: pointer; font-size: 14px; font-weight: 500; text-align: left; position: relative; transition: background-color 150ms ease, color 150ms ease; }
.rail button svg { width: 19px; height: 19px; flex-shrink: 0; }
.rail button.active { background: var(--panel); color: var(--text); box-shadow: 0 0 0 1px var(--line); }
@media (hover: hover) and (pointer: fine) { .rail button:not(.active):hover { background: color-mix(in srgb, var(--panel) 55%, transparent); color: var(--text); } }
.rail .dot { margin-left: auto; min-width: 20px; height: 20px; border-radius: 10px; background: var(--teal); color: #fff; font-size: 11px; font-weight: 600; display: grid; place-items: center; padding: 0 6px; }
.rail .me { margin-top: auto; }
.rail .desk-hours { padding: 10px 12px 2px; font-size: 12px; color: var(--muted); display: grid; }
.rail .desk-hours b { color: var(--text); font-weight: 500; }
.topbar { grid-column: 2; display: flex; align-items: center; gap: 16px; padding: 0 16px 0 4px; min-width: 0; }
.topbar .spacer { flex: 1; }
.clocks { display: flex; gap: 16px; font-size: 13px; color: var(--muted); white-space: nowrap; }
.clocks b { color: var(--text); font-weight: 500; }
.topbar .desk-state { font-size: 13px; color: var(--muted); display: flex; align-items: center; gap: 6px; white-space: nowrap; }
.live-dot { width: 8px; height: 8px; border-radius: 50%; background: #22a565; display: inline-block; flex-shrink: 0; }
.live-dot.off { background: var(--muted); opacity: .6; }
.top-me { border: 0; background: none; padding: 0; cursor: pointer; border-radius: 50%; }
.sheet { grid-column: 2; grid-row: 2; margin: 0 8px 8px 0; background: var(--panel); border: 1px solid var(--line); border-radius: 16px; overflow: hidden; display: grid; grid-template-columns: 340px minmax(0, 1fr); min-height: 0; }
.list-pane { background: var(--panel); border-right: 1px solid var(--line-soft); display: flex; flex-direction: column; min-width: 0; min-height: 0; }
.pane-head { padding: 16px 20px; border-bottom: 1px solid var(--line-soft); display: flex; align-items: center; gap: 10px; min-height: 66px; }
.pane-head h2 { margin: 0; font-size: 20px; font-weight: 600; letter-spacing: -.01em; flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pane-body { overflow-y: auto; flex: 1; }
.search { margin: 12px 16px; width: calc(100% - 32px); }
.main-pane { display: flex; flex-direction: column; min-width: 0; min-height: 0; background: var(--panel); }
.page { overflow-y: auto; padding: 24px 28px; flex: 1; }
.page-inner { max-width: 1040px; margin: 0 auto; }
.empty { display: grid; place-items: center; height: 100%; color: var(--muted); text-align: center; padding: 24px; }
.shell.no-list .sheet { grid-template-columns: minmax(0, 1fr); }
.shell.no-list .list-pane { display: none; }

/* conversation list: two-line rows, selected row filled */
.conv { display: flex; gap: 12px; padding: 12px 20px; cursor: pointer; border-bottom: 1px solid var(--line-soft); align-items: center; min-height: 72px; transition: background-color 150ms ease; }
@media (hover: hover) and (pointer: fine) { .conv:not(.active):hover { background: var(--hover); } }
.conv.active { background: var(--active); }
.conv .meta { flex: 1; min-width: 0; }
.conv .top { display: flex; gap: 6px; align-items: baseline; }
.conv .name { font-weight: 600; flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.conv .time { font-size: 12px; color: var(--muted); flex-shrink: 0; }
.conv .preview { font-size: 13px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; flex: 1; min-width: 0; }
.conv.unread .preview { color: var(--text); font-weight: 500; }
.badge { background: var(--teal); color: #fff; border-radius: 10px; font-size: 11px; font-weight: 600; padding: 1px 7px; }
.avatar { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; color: #fff; font-weight: 600; font-size: 14px; flex-shrink: 0; }
.avatar.group { border-radius: 12px; }
.avatar.sm { width: 32px; height: 32px; font-size: 12px; }
.avatar.xs { width: 22px; height: 22px; font-size: 9px; }
img.avatar { object-fit: cover; background: var(--panel-2); display: block; }
.avatar-lg .avatar { width: 64px; height: 64px; font-size: 22px; }

/* tags */
.tag { font-size: 11px; padding: 2px 8px; border-radius: 999px; background: var(--t-grey-bg); color: var(--t-grey-fg); white-space: nowrap; font-weight: 500; max-width: 240px; overflow: hidden; text-overflow: ellipsis; display: inline-block; vertical-align: middle; border: 0; }
.conv .top .tag { flex-shrink: 0; max-width: 130px; }
.tag.manager, .tag.admin, .tag.in_progress { background: var(--t-teal-bg); color: var(--t-teal-fg); }
.tag.founder { background: var(--t-ink-bg); color: var(--t-ink-fg); }
.tag.trainee { background: var(--t-purple-bg); color: var(--t-purple-fg); }
.tag.at_risk, .tag.flag, .tag.open, .tag.tier2 { background: var(--warn-bg); color: var(--warn-text); }
.tag.cancelled, .tag.inactive, .tag.tier3 { background: var(--t-red-bg); color: var(--t-red-fg); }
.tag.active, .tag.resolved { background: var(--t-green-bg); color: var(--t-green-fg); }
.tag.certified { background: transparent; color: var(--t-teal-fg); box-shadow: inset 0 0 0 1px var(--teal); }
.tag.paired { background: var(--primary); color: #fff; }

/* chat */
.chat-head .sub { font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.chat-head .titles { flex: 1; min-width: 0; }
.chat-head .titles h2 { flex: none; font-size: 16px; }
.banner { background: var(--warn-bg); color: var(--warn-text); padding: 9px 20px; font-size: 13px; }
.messages { flex: 1; overflow-y: auto; padding: 20px 24px; display: flex; flex-direction: column; gap: 2px; }
.day { align-self: center; font-size: 12px; color: var(--muted); background: var(--panel-2); border-radius: 999px; padding: 2px 12px; margin: 14px 0 8px; }
.msg { display: flex; flex-direction: column; max-width: min(72%, 560px); align-self: flex-start; align-items: flex-start; margin-top: 8px; }
.msg.cont { margin-top: 2px; }
.msg.mine { align-self: flex-end; align-items: flex-end; }
.msg .who { font-size: 12px; font-weight: 600; color: var(--muted); margin: 0 4px 3px; display: flex; gap: 6px; align-items: center; }
.msg .who .avatar.xs { display: inline-grid; }
.bubble { background: var(--bubble); padding: 10px 14px; border-radius: 18px; border-bottom-left-radius: 6px; white-space: pre-wrap; overflow-wrap: anywhere; }
.msg.cont:not(.mine) .bubble { border-top-left-radius: 6px; }
.msg.mine .bubble { background: var(--mine); color: var(--mine-text); border-radius: 18px; border-bottom-right-radius: 6px; }
.msg.mine.cont .bubble { border-top-right-radius: 6px; }
.msg.mine .bubble a { color: #fff; }
.msg .stamp { font-size: 11px; color: var(--muted); margin: 3px 6px 0; }
/* A new message arrives: short and quiet (people see this hundreds of times a day). */
.msg.in { animation: msgIn 240ms var(--ease-out) both; }
.msg.mine.in { transform-origin: 100% 100%; }
@keyframes msgIn { from { opacity: 0; transform: translateY(8px) scale(.97); } }
.atts { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 4px; }
.msg.mine .atts { justify-content: flex-end; }
.atts img { max-width: 240px; max-height: 240px; border-radius: 12px; display: block; cursor: zoom-in; background: var(--panel-2); }
.file-chip { display: inline-flex; gap: 10px; align-items: center; padding: 10px 14px; background: var(--panel); border: 1px solid var(--line); border-radius: 12px; text-decoration: none; color: var(--text); max-width: 280px; }
.file-chip svg { width: 18px; height: 18px; color: var(--primary); flex-shrink: 0; }
.file-chip span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.flag-note { font-size: 12px; color: var(--warn-text); background: var(--warn-bg); border-radius: 8px; padding: 2px 8px; margin-top: 3px; }
.composer { background: var(--panel); padding: 10px 20px calc(14px + env(safe-area-inset-bottom)); }
.composer .row { flex-wrap: nowrap; align-items: flex-end; border: 1px solid var(--line); border-radius: 16px; padding: 6px; gap: 6px; transition: border-color 150ms ease, box-shadow 150ms ease; }
.composer .row:focus-within { border-color: var(--teal); box-shadow: 0 0 0 3px color-mix(in srgb, var(--teal) 18%, transparent); }
.composer textarea { resize: none; max-height: 160px; min-height: 40px; border: 0; padding: 9px 6px; box-shadow: none !important; background: transparent; }
.composer .icon-btn { border: 0; }
.pending { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 8px; }
.pending .file-chip { padding: 4px 8px; font-size: 13px; }
.pending button { border: 0; background: none; cursor: pointer; color: var(--muted); }
.icon-btn { width: 40px; height: 40px; border-radius: 10px; border: 1px solid var(--line); background: var(--panel); display: grid; place-items: center; cursor: pointer; flex-shrink: 0; color: var(--text); transition: transform 160ms var(--ease-out), background-color 150ms ease; }
.icon-btn svg { width: 20px; height: 20px; }
.icon-btn.ghost { border-color: transparent; background: transparent; }
.icon-btn.primary { background: var(--primary); color: #fff; border-color: var(--primary); }
@media (hover: hover) and (pointer: fine) { .icon-btn:not(.primary):hover { background: var(--hover); } .icon-btn.primary:hover { background: var(--primary-hover); } }
.readonly-note { text-align: center; color: var(--muted); font-size: 13px; padding: 10px; }
.back { display: none; }
.lightbox { position: fixed; inset: 0; background: rgba(0,0,0,.85); display: grid; place-items: center; z-index: 60; cursor: zoom-out; padding: 16px; }
.lightbox img { max-width: 100%; max-height: 100%; border-radius: 8px; }

/* ===== Dashboard, lists and sections ===== */
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; margin-bottom: 24px; background: var(--panel); }
.card { background: var(--panel); padding: 14px 18px; display: grid; gap: 2px; align-content: start; box-shadow: 1px 0 0 var(--line-soft), 0 1px 0 var(--line-soft); }
.card .num { font-size: 28px; font-weight: 400; letter-spacing: -.01em; order: 2; }
.card .lbl { font-size: 12px; font-weight: 500; color: var(--muted); order: 1; }
.card.warn .num { color: var(--warn-text); }
a.card { text-decoration: none; color: inherit; }
.section { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); margin-bottom: 20px; overflow: hidden; }
.section h3 { margin: 0; padding: 14px 18px; font-size: 15px; font-weight: 600; letter-spacing: -.01em; border-bottom: 1px solid var(--line-soft); display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.section h3 .muted { font-weight: 400; }
.item { padding: 12px 18px; border-bottom: 1px solid var(--line-soft); display: flex; gap: 12px; align-items: center; }
.item:last-child { border-bottom: 0; }
.item .grow { flex: 1; min-width: 0; }
.item .quote { font-size: 14px; overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.item.click { cursor: pointer; transition: background-color 150ms ease; }
@media (hover: hover) and (pointer: fine) { .item.click:hover { background: var(--hover); } }
.none { padding: 16px 18px; color: var(--muted); font-size: 14px; }
.filters { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 8px; margin-bottom: 12px; }
.filters .input { width: 100%; min-width: 0; }

/* Placement timeline: one line per VA from their start date to today, with the milestone marks. */
.timeline { padding: 14px 18px 10px; display: grid; gap: 10px; }
.finding { font-size: 14px; background: var(--panel-2); border-radius: 10px; padding: 10px 14px; }
.tl { display: grid; grid-template-columns: minmax(110px, 170px) minmax(0, 1fr) 96px; column-gap: 12px; align-items: center; font-size: 13px; }
.tl .nm { height: 32px; display: flex; align-items: center; gap: 8px; min-width: 0; cursor: pointer; border: 0; background: none; padding: 0; text-align: left; }
.tl .nm span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tl .nm i { width: 7px; height: 7px; border-radius: 50%; flex-shrink: 0; background: var(--teal); }
.tl .nm i.flagged { background: var(--danger); }
.tl .lane { position: relative; height: 32px; border-bottom: 1px solid var(--line-soft); }
.tl .bar { position: absolute; left: 0; top: 11px; height: 10px; border-radius: 6px; background: var(--bar-1); transform-origin: 0 50%; animation: grow 520ms var(--ease-out) both; }
.tl .end { position: absolute; top: 9px; width: 14px; height: 14px; margin-left: -7px; border-radius: 50%; background: var(--teal); box-shadow: 0 0 0 2px var(--panel); }
.tl .end.flagged { background: var(--panel); box-shadow: inset 0 0 0 2px var(--danger), 0 0 0 2px var(--panel); }
.tl .mline { position: absolute; top: 0; bottom: 0; border-left: 1px dashed var(--mline); }
.tl .st { font-size: 12px; color: var(--muted); text-align: right; white-space: nowrap; }
.tl .axis { position: relative; height: 22px; font-size: 11px; color: var(--muted); }
.tl .axis span { position: absolute; top: 4px; transform: translateX(-50%); white-space: nowrap; }
.tl .axis span:first-child { transform: none; }
@keyframes grow { from { transform: scaleX(.02); } }

/* ===== Modal & toast ===== */
.modal-back { position: fixed; inset: 0; background: rgba(8,14,12,.45); display: grid; place-items: center; padding: 16px; z-index: 50; animation: fade 180ms ease both; }
.modal { background: var(--panel); border-radius: 18px; width: 100%; max-width: 540px; max-height: 90vh; display: flex; flex-direction: column; box-shadow: 0 24px 64px rgba(0,0,0,.3); animation: pop 220ms var(--ease-out) both; }
@keyframes fade { from { opacity: 0; } }
@keyframes pop { from { opacity: 0; transform: translateY(8px) scale(.97); } }
.modal header { padding: 16px 20px; border-bottom: 1px solid var(--line-soft); display: flex; align-items: center; }
.modal header h3 { margin: 0; flex: 1; font-size: 17px; font-weight: 600; }
.modal .body { padding: 16px 20px; overflow-y: auto; }
.modal footer { padding: 12px 20px; border-top: 1px solid var(--line-soft); display: flex; gap: 8px; justify-content: flex-end; flex-wrap: wrap; }
.secret { font: 600 18px/1.4 ui-monospace, Menlo, Consolas, monospace; background: var(--panel-2); border: 1px dashed var(--line); padding: 10px 12px; border-radius: 10px; user-select: all; }
#toast { position: fixed; bottom: calc(24px + env(safe-area-inset-bottom)); left: 50%; transform: translate(-50%, 8px); background: #1b1b1b; color: #fff; padding: 10px 16px; border-radius: 12px; font-size: 14px; opacity: 0; pointer-events: none; transition: opacity 200ms ease, transform 200ms var(--ease-out); z-index: 70; max-width: calc(100% - 32px); }
#toast.show { opacity: 1; transform: translate(-50%, 0); }

/* ===== Phones: one pane at a time, the menu becomes a bottom tab bar ===== */
@media (max-width: 760px) {
  .shell { grid-template-columns: 1fr; grid-template-rows: minmax(0, 1fr) auto; background: var(--panel); }
  .topbar { display: none; }
  .sheet { grid-row: 1; grid-column: 1; margin: 0; border: 0; border-radius: 0; grid-template-columns: 1fr; }
  .rail { grid-row: 2; grid-column: 1; flex-direction: row; justify-content: space-around; gap: 0; padding: 4px 4px calc(4px + env(safe-area-inset-bottom)); background: var(--panel); border-top: 1px solid var(--line); overflow: visible; }
  .rail-brand, .rail .desk-hours, .rail .desk-only { display: none; }
  .rail .me { margin-top: 0; }
  .rail button { flex-direction: column; gap: 2px; font-size: 11px; padding: 6px 0; flex: 1; max-width: 80px; justify-content: center; align-items: center; text-align: center; }
  .rail button svg { width: 22px; height: 22px; }
  .rail button.active { background: none; box-shadow: none; color: var(--primary); font-weight: 600; }
  .rail .dot { position: absolute; top: 2px; left: calc(50% + 4px); margin: 0; min-width: 16px; height: 16px; font-size: 10px; padding: 0 4px; }
  .list-pane, .main-pane { grid-row: 1; grid-column: 1; min-height: 0; border-right: 0; }
  .shell.show-main .list-pane { display: none; }
  .shell:not(.show-main) .main-pane { display: none; }
  .shell.show-main.in-chat .rail { display: none; }
  .back { display: grid; }
  .msg { max-width: 86%; }
  .messages { padding: 14px; }
  .page { padding: 16px; }
  .pane-head { padding: 12px 14px; min-height: 60px; }
  .conv { padding: 12px 14px; }
  .composer { padding: 8px 10px calc(10px + env(safe-area-inset-bottom)); }
}
.rail .me .avatar.xs { width: 22px; height: 22px; }

.push-banner { display: flex; gap: 8px; align-items: flex-start; }
.link-x { margin-left: auto; border: 0; background: none; color: inherit; cursor: pointer; opacity: .7; padding: 0 2px; }

/* ===== Tickets ===== */
.seg { display: flex; gap: 4px; margin: 0 16px 10px; background: var(--panel-2); border-radius: 10px; padding: 3px; }
.seg button { flex: 1; border: 0; background: none; padding: 6px 10px; border-radius: 8px; cursor: pointer; font-size: 13px; color: var(--muted); white-space: nowrap; font-weight: 500; transition: background-color 150ms ease, color 150ms ease; }
.seg button.on { background: var(--panel); color: var(--text); box-shadow: 0 0 0 1px var(--line); }
.page .seg { margin-left: 0; margin-right: 0; display: inline-flex; }
.ticket-bar { display: flex; gap: 12px; flex-wrap: wrap; padding: 8px 20px; background: var(--panel-2); font-size: 13px; }
.ticket-bar label { display: flex; align-items: center; gap: 6px; color: var(--muted); }
.ticket-bar .input { width: auto; padding: 4px 8px; }
.ticket-bar select:disabled { opacity: .8; }
.cat-list { display: grid; gap: 6px; }
.cat { display: flex; gap: 10px; align-items: flex-start; padding: 10px 12px; border: 1px solid var(--line); border-radius: 12px; cursor: pointer; transition: border-color 150ms ease, background-color 150ms ease; }
.cat:has(input:checked) { border-color: var(--teal); background: color-mix(in srgb, var(--teal) 8%, transparent); }
.cat span { display: grid; gap: 2px; }
.cat input { margin-top: 4px; accent-color: var(--primary); }
.cat-edit { display: grid; grid-template-columns: 1.1fr 1.4fr 1fr 0.9fr auto auto; gap: 6px; margin-bottom: 6px; align-items: center; }
@media (max-width: 760px) { .cat-edit { grid-template-columns: 1fr; padding-bottom: 8px; border-bottom: 1px solid var(--line); } }

/* ===== Updates (VAs and trainees) ===== */
.greet { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; flex-wrap: wrap; margin-bottom: 18px; }
.greet h2 { margin: 0; font-size: 24px; font-weight: 600; letter-spacing: -.01em; }
.greet p { margin: 2px 0 0; color: var(--muted); font-size: 14px; }
.home-grid { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 24px; align-items: start; }
.home-side { display: grid; gap: 20px; }
.feature { display: grid; grid-template-columns: 1.1fr 1fr; border: 1px solid var(--line); border-radius: 16px; overflow: hidden; margin-bottom: 18px; background: var(--panel); }
.feature .ph { position: relative; overflow: hidden; min-height: 260px; }
.feature .ph img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.feature .tx { padding: 22px 24px; display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.feature h3 { margin: 0; font-size: 21px; font-weight: 600; line-height: 1.25; letter-spacing: -.01em; }
.feature p { margin: 0; white-space: pre-wrap; }
.kicker { font-size: 12px; color: var(--muted); }
.updates { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px; margin-bottom: 24px; }
.update { background: var(--panel); border: 1px solid var(--line); border-radius: 14px; overflow: hidden; display: flex; flex-direction: column; }
.update .ph { height: 120px; overflow: hidden; }
.update .ph img { width: 100%; height: 100%; object-fit: cover; display: block; }
.update .tx { padding: 14px 16px; display: grid; gap: 6px; }
.update.pinned { box-shadow: inset 0 0 0 1px var(--teal); border-color: var(--teal); }
.update h4 { margin: 0; font-size: 15px; font-weight: 600; line-height: 1.3; }
.update p { margin: 0; white-space: pre-wrap; font-size: 14px; color: var(--muted); }
.update .btn { justify-self: start; }
.h-sec { font-size: 16px; font-weight: 600; margin: 0 0 12px; }
.panel { border: 1px solid var(--line); border-radius: 14px; padding: 16px 18px; display: grid; gap: 10px; }
.panel h3 { margin: 0; font-size: 12px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.ring { display: flex; gap: 16px; align-items: center; }
.ring svg { width: 92px; height: 92px; flex-shrink: 0; }
.ring .trk { stroke: var(--track); }
.ring .arc { stroke: var(--teal); animation: ring 900ms var(--ease-out) both; }
.ring text { fill: var(--text); font: 600 18px Poppins, system-ui, sans-serif; }
.ring b { display: block; font-size: 15px; font-weight: 600; }
.ring span { font-size: 13px; color: var(--muted); }
@keyframes ring { from { stroke-dashoffset: 238.8; } }
.contact-list { display: grid; gap: 6px; font-size: 13px; }
.contact-list div { display: flex; justify-content: space-between; gap: 10px; }
.contact-list span { color: var(--muted); text-align: right; }
.res-row { text-decoration: none; color: inherit; }
.res-row svg, .section h3 svg, .item > svg { width: 18px; height: 18px; flex-shrink: 0; color: var(--primary); }
button.res-row { width: 100%; border: 0; background: none; text-align: left; font: inherit; color: inherit; }
.danger-row, .danger-row svg { color: var(--danger) !important; }
.faq { border-bottom: 1px solid var(--line-soft); padding: 0 18px; }
.faq summary { cursor: pointer; padding: 13px 0; font-weight: 500; }
.faq div { padding: 0 0 12px; white-space: pre-wrap; color: var(--muted); }
.faq-cat { padding: 12px 18px 0; font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); }
.support { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 1px; background: var(--line-soft); }
.support-item { display: grid; gap: 2px; padding: 12px 18px; background: var(--panel); text-decoration: none; color: var(--text); }
.team-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 1px; background: var(--line-soft); }
.team-card { display: flex; gap: 12px; padding: 14px 18px; background: var(--panel); align-items: flex-start; }
.team-card .row a { display: inline-flex; gap: 4px; align-items: center; text-decoration: none; }
.team-card .row svg { width: 14px; height: 14px; }
.team-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 14px; }
.team-card.full { border: 1px solid var(--line); border-radius: 14px; padding: 18px 20px; }
.team-card.full .avatar { width: 56px; height: 56px; font-size: 20px; }
.duties { margin: 4px 0 8px; padding-left: 18px; font-size: 14px; }
.duties li { margin: 2px 0; }
@media (max-width: 1100px) { .home-grid { grid-template-columns: 1fr; } .home-side { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); } }
@media (max-width: 640px) { .feature { grid-template-columns: 1fr; } .feature .ph { min-height: 180px; } }

/* ===== Appearance picker (Me) ===== */
.opts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; padding: 16px 18px; }
.opt { border: 1px solid var(--line); border-radius: 14px; padding: 10px; display: grid; gap: 10px; cursor: pointer; background: var(--panel); text-align: left; transition: transform 160ms var(--ease-out), border-color 150ms ease, box-shadow 150ms ease; }
.opt[aria-checked="true"] { border-color: var(--teal); box-shadow: 0 0 0 3px color-mix(in srgb, var(--teal) 22%, transparent); }
.opt .lab { display: flex; gap: 10px; align-items: center; font-weight: 500; font-size: 14px; }
.opt .lab i { width: 18px; height: 18px; border-radius: 50%; border: 2px solid var(--line); display: grid; place-items: center; flex-shrink: 0; }
.opt[aria-checked="true"] .lab i { border-color: var(--teal); }
.opt[aria-checked="true"] .lab i::after { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--teal); }
.opt .lab small { display: block; font-size: 12px; color: var(--muted); font-weight: 400; }
.mini { display: block; height: 84px; border-radius: 9px; position: relative; overflow: hidden; }
.mini > div { position: absolute; inset: 0; display: grid; grid-template-columns: 30% 1fr; }
.mini .l { background: #e7f0ed; } .mini .d { background: #111715; }
.mini.split .d { clip-path: inset(0 0 0 50%); }
.mini .s { margin: 5px 5px 5px 0; border-radius: 6px; padding: 7px; display: grid; gap: 5px; align-content: start; }
.mini .l .s { background: #fff; } .mini .d .s { background: #192220; }
.mini .s b { height: 6px; border-radius: 3px; width: 60%; }
.mini .s u { height: 14px; border-radius: 6px; width: 70%; }
.mini .s u.m { justify-self: end; width: 50%; background: #167f6c !important; }
.mini .l .s b { background: #cfd9d5; } .mini .l .s u { background: #eef3f1; }
.mini .d .s b { background: #33403c; } .mini .d .s u { background: #24302c; }
@media (max-width: 560px) { .opts { grid-template-columns: 1fr; } .mini { height: 64px; } }

/* ===== Client portal: its own layout (top bar + tabs), different from the team app ===== */
.shell.portal { grid-template-columns: 340px minmax(0, 1fr); grid-template-rows: auto minmax(0, 1fr); background: var(--bg); }
.shell.portal.no-list { grid-template-columns: minmax(0, 1fr); }
.shell.portal .list-pane, .shell.portal .main-pane { grid-row: 2; min-height: 0; }
.shell.portal .list-pane { border-right: 1px solid var(--line); }
.shell.portal .main-pane { background: transparent; }
.shell.portal.no-list .list-pane { display: none; }
.portal-top { grid-column: 1 / -1; display: flex; align-items: center; gap: 16px; padding: 0 32px; min-height: 68px; background: var(--panel); border-bottom: 1px solid var(--line); }
.portal-brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--text); }
.portal-brand img { width: 38px; height: 38px; }
.portal-brand span { display: grid; line-height: 1.2; }
.portal-brand b { font-weight: 600; }
.portal-brand small { color: var(--muted); font-size: 12px; }
.portal-nav { display: flex; gap: 4px; margin: 0 auto; align-self: stretch; }
.portal-nav button { position: relative; display: flex; align-items: center; gap: 8px; border: 0; background: none; padding: 0 14px; cursor: pointer; color: var(--muted); font-weight: 500; transition: color 150ms ease; }
.portal-nav button svg { width: 18px; height: 18px; }
.portal-nav button .s { display: none; }
.portal-nav button.active { color: var(--text); box-shadow: inset 0 -2px 0 var(--teal); }
@media (hover: hover) and (pointer: fine) { .portal-nav button:not(.active):hover { color: var(--text); } }
.portal-nav .dot { position: absolute; top: 12px; right: 0; min-width: 16px; height: 16px; border-radius: 8px; background: var(--teal); color: #fff; font-size: 10px; font-weight: 600; display: grid; place-items: center; padding: 0 4px; }
.portal-me { display: flex; align-items: center; gap: 8px; border: 1px solid var(--line); background: var(--panel); border-radius: 999px; padding: 3px 12px 3px 3px; cursor: pointer; color: var(--text); }
.portal-me.active { border-color: var(--teal); }
.shell.portal .page { padding: 24px 32px; }
.shell.portal .page-inner { max-width: 1120px; }
.shell.portal .list-pane .pane-head h2 { font-size: 22px; }
.shell.portal .chat-head { background: var(--panel); }
.shell.portal.show-main.in-chat .main-pane { background: var(--panel); }
/* the welcome: a rental at twilight */
.phero { position: relative; min-height: 300px; border-radius: 20px; overflow: hidden; color: #fff; margin-bottom: 20px; display: flex; align-items: center; }
.phero img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 50% 62%; }
.phero::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(6,14,18,.8) 0%, rgba(6,14,18,.4) 55%, rgba(6,14,18,.05) 100%); }
.phero .tx { position: relative; z-index: 1; padding: 36px 40px; display: grid; gap: 14px; max-width: 560px; }
.phero h2 { margin: 0; font-size: clamp(28px, 3.4vw, 40px); font-weight: 600; letter-spacing: -.02em; line-height: 1.1; }
.phero p { margin: 0; font-size: 15px; opacity: .9; }
.glass { display: inline-flex; align-items: center; gap: 10px; background: rgba(255,255,255,.14); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); border: 1px solid rgba(255,255,255,.22); border-radius: 14px; padding: 10px 16px; width: max-content; max-width: 100%; font-size: 14px; }
.phero .actions { display: flex; gap: 10px; flex-wrap: wrap; }
.phero .btn:not(.primary) { background: rgba(255,255,255,.92); color: #141a18; border-color: transparent; }
.quick { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 14px; margin-bottom: 20px; }
.quick-card { display: grid; gap: 4px; padding: 16px 18px; background: var(--panel); border: 1px solid var(--line); border-radius: 14px; text-decoration: none; color: var(--text); transition: border-color 150ms ease, transform 160ms var(--ease-out); }
@media (hover: hover) and (pointer: fine) { .quick-card:hover { border-color: var(--teal); } }
.quick-card svg { width: 22px; height: 22px; color: var(--primary); margin-bottom: 4px; }
.quick-card span { font-size: 13px; color: var(--muted); }
@media (max-width: 760px) {
  .shell.portal { grid-template-columns: 1fr; grid-template-rows: auto minmax(0, 1fr); }
  .shell.portal .list-pane, .shell.portal .main-pane { grid-row: 2; grid-column: 1; }
  .portal-top { padding: 8px 14px; gap: 10px; min-height: 56px; }
  .portal-me span { display: none; }
  .portal-me { padding: 3px; margin-left: auto; }
  .portal-nav { position: fixed; bottom: 0; left: 0; right: 0; z-index: 20; margin: 0; background: var(--panel); border-top: 1px solid var(--line); padding: 4px 4px calc(4px + env(safe-area-inset-bottom)); justify-content: space-around; }
  .portal-nav button { flex-direction: column; gap: 2px; padding: 6px 4px; font-size: 11px; flex: 1; }
  .portal-nav button.active { box-shadow: none; color: var(--primary); font-weight: 600; }
  .portal-nav button .l { display: none; }
  .portal-nav button .s { display: inline; }
  .portal-nav .dot { top: 2px; right: calc(50% - 20px); }
  .shell.portal .main-pane, .shell.portal .list-pane { padding-bottom: 64px; }
  .shell.portal.show-main.in-chat .portal-nav { display: none; }
  .shell.portal.show-main.in-chat .main-pane { padding-bottom: 0; }
  .shell.portal .page { padding: 14px; }
  .phero { min-height: 260px; border-radius: 16px; }
  .phero .tx { padding: 24px 20px; }
}

/* ===== Welcome motion: sign-in and the client welcome only (seen about once a day) ===== */
.rise { animation: rise 480ms var(--ease-out) both; }
.rise.d1 { animation-delay: 50ms; } .rise.d2 { animation-delay: 100ms; } .rise.d3 { animation-delay: 150ms; } .rise.d4 { animation-delay: 200ms; }
@keyframes rise { from { opacity: 0; transform: translateY(8px); } }
.settle { animation: settle 1.6s var(--ease-out) both; }
@keyframes settle { from { transform: scale(1.06); } }
/* "Reduce motion": movement stops, gentle fades stay. */
@media (prefers-reduced-motion: reduce) {
  .rise, .msg.in, .modal { animation: fade 200ms ease both; }
  .settle, .tl .bar, .ring .arc { animation: none; }
  .btn:active, .icon-btn:active, .quick-card:active, .opt:active { transform: none !important; }
}

/* ===== Certificate of Employment (clients) ===== */
.cert-cta { display: flex; margin-bottom: 20px; }
.cert-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); gap: 24px; align-items: start; }
.cert-form { margin: 0; }
.cert-fields { padding: 14px 18px 4px; }
.sig-mode { margin: 0 0 10px; display: inline-flex; }
.sig-box { position: relative; height: 150px; border: 1px dashed var(--line); border-radius: 12px; background: #fff; margin-bottom: 6px; }
.sig-box canvas { position: absolute; inset: 0; width: 100%; height: 100%; touch-action: none; cursor: crosshair; border-radius: 12px; }
.sig-hint { position: absolute; left: 16px; bottom: 12px; font-size: 12px; color: #8a9893; pointer-events: none; border-top: 1px solid #c9d6d1; padding-top: 4px; width: 60%; }
.sig-typed { font: italic 22px Georgia, "Times New Roman", serif; }
.cert-preview-wrap { position: sticky; top: 0; }
.cert-preview { aspect-ratio: 11 / 8.5; max-width: 100%; }
/* A small HTML copy of the PDF, so clients see what they're signing. Paper colours on purpose, in both themes. */
.cp { height: 100%; background: #fbfaf6; color: #1b1b1b; border: 2px solid #1b1b1b; outline: 1px solid #167f6c; outline-offset: -7px; border-radius: 4px; padding: 5% 7%; display: flex; flex-direction: column; align-items: center; text-align: center; gap: 1.2%; font: 13px/1.3 Georgia, "Times New Roman", serif; box-shadow: var(--shadow); container-type: inline-size; }
.cp > div { font-size: clamp(9px, 2.1cqi, 15px); }
.cp .cp-co { border-bottom: 1px solid #b9c9c3; padding: 0 12% 2px; }
.cp .cp-title { font-size: clamp(16px, 5.6cqi, 40px); font-weight: 700; margin-top: 2%; }
.cp .cp-it { font-style: italic; color: #5d6b66; }
.cp .cp-name { font-size: clamp(13px, 3.8cqi, 28px); font-weight: 700; border-bottom: 1px solid #1b1b1b; padding: 0 10% 1px; min-width: 60%; }
.cp .cp-pos { border-bottom: 1px solid #b9c9c3; padding: 0 6% 1px; }
.cp-foot { margin-top: auto; width: 100%; display: flex; justify-content: space-between; text-align: left; gap: 8%; }
.cp-foot > div { flex: 1; display: grid; font: clamp(8px, 1.6cqi, 12px)/1.3 "Poppins", system-ui, sans-serif; }
.cp-foot span { color: #5d6b66; font-size: .85em; border-top: 1px solid #b9c9c3; padding-top: 2px; }
.cp-foot b { font-weight: 500; }
.cp-sig { height: clamp(22px, 6cqi, 44px); border-bottom: 1px solid #1b1b1b; display: flex; align-items: flex-end; justify-content: center; }
.cp-sig img { max-height: 100%; max-width: 100%; }
.cp-sig i { font: italic clamp(12px, 3cqi, 22px) Georgia, serif; color: #1d3557; }
@media (max-width: 980px) { .cert-grid { grid-template-columns: 1fr; } .cert-preview-wrap { position: static; order: -1; } }

/* ===== Milestone celebration (confetti) ===== */
.celebrate { position: fixed; inset: 0; z-index: 80; display: grid; place-items: center; padding: 16px; background: rgba(8,14,12,.5); animation: fade 200ms ease both; }
.celebrate.out { opacity: 0; transition: opacity 200ms ease; }
.celebrate canvas { position: fixed; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.celebrate-card { position: relative; background: var(--panel); border-radius: 22px; padding: 28px 28px 24px; max-width: 380px; text-align: center; display: grid; gap: 10px; justify-items: center; box-shadow: 0 30px 80px rgba(0,0,0,.35); animation: pop 320ms var(--ease-out) both; }
.celebrate-num { width: 84px; height: 84px; border-radius: 50%; display: grid; place-items: center; background: var(--t-teal-bg); color: var(--t-teal-fg); font-size: 38px; font-weight: 700; letter-spacing: -.03em; }
.celebrate-card h3 { margin: 4px 0 0; font-size: 22px; font-weight: 600; letter-spacing: -.01em; }
.celebrate-card p { margin: 0 0 8px; color: var(--muted); }

/* Time clock */
.punch { display: flex; align-items: center; gap: 24px; flex-wrap: wrap; justify-content: space-between; padding: 24px; margin-bottom: 20px; border-radius: var(--radius); border: 1px solid var(--line); background: var(--panel); }
.punch.on { border-color: color-mix(in srgb, var(--teal) 45%, var(--line)); background: color-mix(in srgb, var(--teal) 6%, var(--panel)); }
.punch.break { background: var(--warn-bg); border-color: color-mix(in srgb, var(--warn-text) 25%, var(--line)); }
.punch-main { display: grid; gap: 4px; }
.punch-state { display: flex; align-items: center; gap: 8px; font-weight: 600; font-size: 15px; }
.punch-timer { font-size: clamp(36px, 6vw, 52px); font-weight: 500; letter-spacing: -.02em; font-variant-numeric: tabular-nums; line-height: 1.1; }
.punch-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.btn.lg { padding: 14px 22px; font-size: 16px; min-height: 52px; }
.btn.lg svg { width: 20px; height: 20px; }
.clock-pill { display: inline-flex; align-items: center; gap: 6px; border: 0; border-radius: 999px; padding: 5px 12px; font: inherit; font-size: 13px; background: var(--panel); color: var(--muted); cursor: pointer; white-space: nowrap; }
.clock-pill[hidden] { display: none; }
.clock-pill b { color: var(--text); font-weight: 600; font-variant-numeric: tabular-nums; }
.item.shift { display: grid; grid-template-columns: 150px 110px 1fr auto; }
.item.shift:has(.who) { grid-template-columns: 32px 160px 150px 110px 1fr auto; }
.item.shift .who, .item.shift .when { display: grid; gap: 1px; min-width: 0; }
.item.shift .who b, .item.shift .who span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hrs { font-variant-numeric: tabular-nums; font-weight: 600; white-space: nowrap; }
.now-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
.now-chip { display: flex; align-items: center; gap: 10px; padding: 12px 18px; box-shadow: 1px 0 0 var(--line-soft), 0 1px 0 var(--line-soft); }
.now-chip > span { flex: 1; display: grid; min-width: 0; }
.ts-bar { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; align-items: center; margin-bottom: 8px; }
.cards.three { grid-template-columns: repeat(3, 1fr); }
.ts-week { font-size: 16px; min-width: 190px; text-align: center; }
@media (max-width: 760px) {
  .punch { padding: 18px; }
  .cards.three .num { font-size: 22px; }
  .punch-actions, .punch-actions .btn { width: 100%; }
  .punch-actions .btn { flex: 1; justify-content: center; }
  .item.shift, .item.shift:has(.who) { grid-template-columns: 1fr auto; row-gap: 4px; }
  .item.shift > .avatar, .item.shift .brk { display: none; }
  .item.shift .grow:empty { display: none; }
}
.va-hours { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 12px; margin-bottom: 20px; }
.va-hour { display: flex; align-items: center; gap: 12px; padding: 16px 18px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--panel); }
.va-hour .grow { display: grid; gap: 2px; min-width: 0; }
.va-hour .grow .muted { display: flex; align-items: center; gap: 6px; }
.va-total { display: grid; justify-items: end; }
.va-total .hrs { font-size: 20px; }
.item.shift.client-shift { grid-template-columns: 200px 120px 1fr auto; }
.item.shift.client-shift:has(.who) { grid-template-columns: 150px 200px 120px 1fr auto; }
@media (max-width: 760px) { .item.shift.client-shift, .item.shift.client-shift:has(.who) { grid-template-columns: 1fr auto; } }
