/* =============================================================================
   v6.css: Pinoyaya Ops, direction B "Shopify on steroids" (approved 2026-11-01).
   Loads LAST. Two jobs:
     1. The v6 shell and components (every v6 class starts with x- so nothing in
        base/app/skin/today.css can leak into them, and nothing here leaks out).
     2. Re-points the tokens the older pages read (settings, team, audit log,
        full records), so they sit in the same palette in light and dark.
   Colour has one job each (same as the approved design):
     navy #211C3A  primary button, selection, the chart line, the top bar
     rose #C74558  the brand mark, late, safety; text-safe rose-ink #A3324A
     amber         waiting / paid with no pass;  green  good states only
   Contrast (WCAG 2.x, measured on the design's tokens, both themes, QA audit):
     ink #1B1730 on white 17.3, on ground #F3F2F7 15.6 · ink-2 #45405E on white 9.9
     muted #5D5976 on white 6.4, on ground 5.8, on side #EBEAF1 5.3, on hover 5.9
     rose-ink #A3324A on rose-soft #FBEDF0 5.6 · amber-ink #8A5200 on #FFF1D6 5.7
     green-ink #13702F on #E6F5EA 5.9 · peri-ink #3A3E8C on #ECEDFA 7.9
     dark: ink #F1EFF9 on #1B1729 15.2 · muted #A9A5C2 on #1B1729 7.3, on #151222 7.9
     dark rose-ink #F29AA8 on #3A1B27 6.6 · amber #F0C27E on #33270F 9.2 · green #7AD993 on #15301E 8.6
   ============================================================================= */
@font-face { font-family: 'PJS'; src: url(../fonts/PlusJakartaSans-Regular.ttf); font-weight: 400; font-display: swap; }
@font-face { font-family: 'PJS'; src: url(../fonts/PlusJakartaSans-Medium.ttf); font-weight: 500; font-display: swap; }
@font-face { font-family: 'PJS'; src: url(../fonts/PlusJakartaSans-SemiBold.ttf); font-weight: 600; font-display: swap; }
@font-face { font-family: 'PJS'; src: url(../fonts/PlusJakartaSans-Bold.ttf); font-weight: 700; font-display: swap; }
@font-face { font-family: 'PJS'; src: url(../fonts/PlusJakartaSans-ExtraBold.ttf); font-weight: 800; font-display: swap; }

html:root[data-theme="light"], html:root:not([data-theme]) {
  --ground: #F3F2F7; --side: #EBEAF1; --top: #211C3A; --surface: #FFFFFF; --surface-2: #FAF9FC; --hover: #F4F3F8; --sel: #F1F0F7;
  --line: #E3E1EB; --line-2: #EEEDF3; --ink: #1B1730; --ink-2: #45405E; --muted: #5D5976; --faint: #8E8AA6;
  --chart: #211C3A; --chart-prev: #A3A0B6; --spk-prev: #77738F; --grid: #E9E7F0;
  --rose: #C74558; --rose-ink: #A3324A; --rose-soft: #FBEDF0; --amber: #B26B00; --amber-ink: #8A5200; --amber-soft: #FFF1D6;
  --green: #1F9E3E; --green-ink: #13702F; --green-soft: #E6F5EA; --down-ink: #A3324A; --peri: #ECEDFA; --peri-ink: #3A3E8C;
  --note: #FFF8E4; --note-line: #F0DFAE; --fam-bg: #FFF1D6; --fam-ink: #8A5200;
  --kbd-bg: #F6F5F9; --btn: #FFFFFF; --btn-line: #D6D3E1; --pri: #211C3A; --on-pri: #FFFFFF; --sel-range: #ECEBF4; --fut: #B8B5C6;
  --card: 0 0 0 1px rgba(33,28,58,.07), 0 1px 2px rgba(33,28,58,.06), 0 2px 6px -2px rgba(33,28,58,.05);
  --pop-sh: 0 0 0 1px var(--line), 0 18px 50px rgba(27,23,48,.18);
  --scrim: rgba(17,14,28,.42);
  /* the older pages' names, pointed at the same palette */
  --shell: #F3F2F7; --canvas: #F3F2F7; --raised: #FAF9FC; --sunken: #F4F3F8; --surface2: #F4F3F8; --line-soft: #EEEDF3; --line-input: #8C88A3;
  --ink-3: #5D5976; --accent: #211C3A; --accent-2: #1B1730; --accent-wash: #ECEBF4; --accent-wash-h: #E3E1EF; --accent-ink: #FFFFFF;
  --accent-hi: #211C3A; --accent-lo: #211C3A; --pri-hi: #211C3A; --pri-lo: #211C3A; --pri-2: #1B1730; --info: #211C3A; --info-wash: #ECEBF4; --on-info: #FFFFFF;
  --focus: #211C3A; --lk-hover: #1B1730; --navy: #211C3A; --rose-wash: #FBEDF0;
  --ok: #13702F; --ok-wash: #E6F5EA; --ok-dot: #1F9E3E; --warn: #8A5200; --warn-wash: #FFF1D6; --warn-dot: #B26B00;
  --danger: #A3324A; --danger-wash: #FBEDF0; --bad-dot: #C74558; --dgr-line: #F2C9D0; --on-danger: #FFFFFF;
  --neu: #45405E; --neu-wash: #F4F3F8; --neu-dot: #8E8AA6; --coral: #C74558; --on-coral: #FFFFFF;
  --chart-bar: #211C3A; --chart-bar-h: #3A2E5E; --series-2: #A3A0B6; --pic-bg: #ECEDFA; --pic-ink: #3A3E8C;
  --scroll: #D3D0DE; --scroll-h: #B7B3C8;
  --r-xs: 6px; --r-sm: 8px; --r: 10px; --r-lg: 12px; --h-ctl: 32px;
  --sh-1: var(--card); --sh-2: var(--card); --sh-3: 0 0 0 1px rgba(33,28,58,.08), 0 30px 80px rgba(17,14,28,.35);
  --sh-ctl: none; --sh-ctl-h: none; --sh-action: none; --sh-pri: none;
  --font: 'PJS', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --t-meta: 12px; --t-body: 13px; --t-lead: 14px;
  color-scheme: light;
}
html:root[data-theme="dark"] {
  --ground: #110E1C; --side: #151222; --top: #0B0916; --surface: #1B1729; --surface-2: #1F1A2F; --hover: #241F36; --sel: #29233E;
  --line: #2F2945; --line-2: #262139; --ink: #F1EFF9; --ink-2: #D2CEE6; --muted: #A9A5C2; --faint: #6F6A8C;
  --chart: #C9C3F7; --chart-prev: #6F6A8C; --spk-prev: #9C98B8; --grid: #2A2540;
  --rose: #E3687C; --rose-ink: #F29AA8; --rose-soft: #3A1B27; --amber: #E5A94F; --amber-ink: #F0C27E; --amber-soft: #33270F;
  --green: #4CC46A; --green-ink: #7AD993; --green-soft: #15301E; --down-ink: #F29AA8; --peri: #26234A; --peri-ink: #C3C6FA;
  --note: #2C2617; --note-line: #4A3F1F; --fam-bg: #33270F; --fam-ink: #F0C27E;
  --kbd-bg: #221D33; --btn: #241F36; --btn-line: #393253; --pri: #F1EFF9; --on-pri: #1B1730; --sel-range: #2A2440; --fut: #4E4966;
  --card: 0 0 0 1px rgba(255,255,255,.09), inset 0 1px 0 rgba(255,255,255,.04), 0 1px 2px rgba(0,0,0,.4);
  --pop-sh: 0 0 0 1px var(--line), 0 18px 50px rgba(0,0,0,.6);
  --scrim: rgba(5,4,10,.62);
  --shell: #110E1C; --canvas: #110E1C; --raised: #1F1A2F; --sunken: #241F36; --surface2: #241F36; --line-soft: #262139; --line-input: #6A6683;
  --ink-3: #A9A5C2; --accent: #F1EFF9; --accent-2: #D2CEE6; --accent-wash: #2A2440; --accent-wash-h: #332C4C; --accent-ink: #1B1730;
  --accent-hi: #F1EFF9; --accent-lo: #F1EFF9; --pri-hi: #F1EFF9; --pri-lo: #F1EFF9; --pri-2: #D2CEE6; --info: #C3C6FA; --info-wash: #26234A; --on-info: #1B1730;
  --focus: #C9C3F7; --lk-hover: #FFFFFF; --navy: #0B0916; --rose-wash: #3A1B27;
  --ok: #7AD993; --ok-wash: #15301E; --ok-dot: #4CC46A; --warn: #F0C27E; --warn-wash: #33270F; --warn-dot: #E5A94F;
  --danger: #F29AA8; --danger-wash: #3A1B27; --bad-dot: #E3687C; --dgr-line: #5A2A3A; --on-danger: #1B1730;
  --neu: #D2CEE6; --neu-wash: #241F36; --neu-dot: #8C89A0; --coral: #E3687C; --on-coral: #1B1730;
  --chart-bar: #C9C3F7; --chart-bar-h: #DCD8FA; --series-2: #6F6A8C; --pic-bg: #26234A; --pic-ink: #C3C6FA;
  --scroll: #34313F; --scroll-h: #45415A;
  --sh-3: 0 0 0 1px rgba(255,255,255,.14), 0 30px 80px rgba(0,0,0,.7);
  color-scheme: dark;
}

/* ------------------------------------------------------------------ base -- */
html, body { background: var(--ground) !important; color: var(--ink); }
body { font: 500 13px/1.4 var(--font) !important; -webkit-font-smoothing: antialiased; }
body *:not(svg):not(path) { font-family: var(--font); }
.tn, .x-tn { font-variant-numeric: tabular-nums; }
.x-ic { display: inline-flex; width: 16px; height: 16px; flex: none; }
.x-ic svg { width: 100%; height: 100%; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.x-ic.sm { width: 14px; height: 14px; } .x-ic.xs { width: 12px; height: 12px; } .x-ic.lg { width: 18px; height: 18px; } .x-ic.xl { width: 26px; height: 26px; }
.x-sp { flex: 1; } .x-row { display: flex; align-items: center; } .x-ell { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.x-dim { color: var(--muted); } .x-ink2 { color: var(--ink-2); } .x-urg { color: var(--rose-ink); font-weight: 700; }
.x-up { color: var(--green-ink); font-weight: 700; } .x-down { color: var(--down-ink); font-weight: 700; }
.x-gt { color: var(--green-ink); } .x-at { color: var(--amber-ink); } .x-rt { color: var(--rose-ink); }
.v6app :focus-visible, .x-layer :focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
.x-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
button.x-plain { background: none; border: 0; padding: 0; color: inherit; font: inherit; cursor: pointer; text-align: inherit; }

/* ----------------------------------------------------------------- shell -- */
.app.v6app.t26 { display: block; height: 100vh; overflow: hidden; background: var(--ground); }
.x-top { position: fixed; left: 0; top: 0; right: 0; height: 52px; background: var(--top); display: flex; align-items: center; padding: 0 16px 0 18px; color: #fff; z-index: 30; gap: 10px; }
.x-brand { display: inline-flex; align-items: center; gap: 10px; color: #fff !important; text-decoration: none; }
.x-logo { width: 30px; height: 30px; border-radius: 8px; background: #C74558; display: inline-flex; align-items: center; justify-content: center; color: #fff; }
.x-logo svg { width: 18px; height: 18px; fill: none; stroke: #fff; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.x-wm { font-weight: 700; font-size: 14.5px; letter-spacing: -.01em; }
.x-env { font-size: 11.5px; font-weight: 700; color: #F0C27E; background: rgba(240,194,126,.14); border-radius: 6px; padding: 3px 8px; white-space: nowrap; }
.x-env[hidden] { display: none; }
.x-cmd { position: absolute; left: 50%; transform: translateX(-50%); width: min(560px, calc(100vw - 640px)); min-width: 300px; height: 34px; border-radius: 10px; background: rgba(255,255,255,.1); border: 0;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.12); display: flex; align-items: center; gap: 10px; padding: 0 8px 0 12px; color: rgba(255,255,255,.78); font: 500 13px var(--font); cursor: pointer; }
.x-cmd:hover { background: rgba(255,255,255,.14); color: #fff; }
.x-cmd .x-kbd { background: rgba(255,255,255,.1); border-color: rgba(255,255,255,.16); box-shadow: none; color: rgba(255,255,255,.85); }
.x-tr { margin-left: auto; display: flex; align-items: center; gap: 14px; font-size: 12.5px; color: rgba(255,255,255,.78); }
.x-sync { display: inline-flex; align-items: center; gap: 8px; white-space: nowrap; }
.x-live { width: 7px; height: 7px; border-radius: 50%; background: #4CC46A; box-shadow: 0 0 0 3px rgba(76,196,106,.22); display: inline-block; }
.x-live.off { background: #E5A94F; box-shadow: 0 0 0 3px rgba(229,169,79,.22); }
.x-tbtn { width: 32px; height: 32px; border-radius: 8px; display: inline-flex; align-items: center; justify-content: center; color: rgba(255,255,255,.85); background: none; border: 0; cursor: pointer; }
.x-tbtn:hover { background: rgba(255,255,255,.1); color: #fff; }
.v6app .me { width: 30px !important; height: 30px !important; border-radius: 8px !important; background: #E9E6F7 !important; color: #211C3A !important; font: 800 12.5px var(--font) !important; border: 0; cursor: pointer; box-shadow: none !important; }
.v6app .me-menu { top: 40px; border-radius: 12px; background: var(--surface); box-shadow: var(--pop-sh); color: var(--ink); }
.v6app .me-menu a, .v6app .me-menu button { color: var(--ink); font: 600 13px var(--font); border-radius: 8px; padding: 9px 10px; }
.v6app .me-menu a:hover, .v6app .me-menu button:hover { background: var(--hover); }
.v6app .me-h b { color: var(--ink); } .v6app .me-h span { color: var(--muted); }
.v6app .me-h .tier { background: var(--hover); }

.x-side { position: fixed; left: 0; top: 52px; bottom: 0; width: 232px; background: var(--side); padding: 12px 10px; display: flex; flex-direction: column; border-right: 1px solid var(--line); z-index: 20; overflow-y: auto; }
.x-ni { height: 32px; border-radius: 8px; display: flex; align-items: center; gap: 10px; padding: 0 10px; font-weight: 600; color: var(--ink-2) !important; font-size: 13.5px; text-decoration: none; flex: none; }
.x-ni .x-ic { color: var(--muted); }
.x-ni:hover { background: var(--hover); }
.x-ni.on { background: var(--surface); color: var(--ink) !important; box-shadow: var(--card); }
.x-ni.on .x-ic { color: var(--ink); }
.x-ni.sv { font-weight: 500; }
.x-pill { margin-left: auto; font-size: 11.5px; font-weight: 700; font-style: normal; min-width: 22px; height: 20px; border-radius: 6px; background: var(--surface); color: var(--ink); box-shadow: inset 0 0 0 1px var(--line); display: inline-flex; align-items: center; justify-content: center; padding: 0 6px; }
.x-pill.zero, .x-pill:empty { display: none; }
.x-sub { margin: 2px 0 2px 26px; height: 28px; display: flex; align-items: center; font-size: 12.5px; font-weight: 600; color: var(--muted) !important; padding: 0 0 0 10px; border-radius: 7px; text-decoration: none; flex: none; }
.x-sub em { margin-left: auto; margin-right: 10px; font-weight: 700; font-style: normal; color: var(--ink-2); }
.x-sub em.zero { display: none; }
.x-sub:hover { background: var(--hover); }
.x-sub.on { background: var(--surface); color: var(--ink) !important; box-shadow: var(--card); }
.x-sl { font-size: 11.5px; font-weight: 700; color: var(--muted); padding: 14px 10px 6px; letter-spacing: .02em; }
.x-side .x-grow { flex: 1; min-height: 12px; }

.v6app .body.x-main { position: fixed; left: 232px; top: 52px; right: 0; bottom: 0; overflow-y: auto; background: var(--ground); }
.v6app .page { max-width: 1240px; margin: 0 auto; padding: 22px 32px 48px; }
.v6app .page.v6on { max-width: none; margin: 0; padding: 0; min-height: 100%; display: flex; flex-direction: column; }
.x-tabs { display: none; }

/* ------------------------------------------------------------ page parts -- */
.x-pg { padding: 18px 24px 24px; display: flex; flex-direction: column; gap: 12px; min-height: calc(100vh - 52px); }
.x-pg.fit { height: calc(100vh - 52px); min-height: 0; }
.x-ph { display: flex; align-items: center; gap: 12px; min-height: 36px; flex-wrap: wrap; }
.x-h1 { font-size: 22px; font-weight: 800; letter-spacing: -.02em; margin: 0; color: var(--ink); }
.x-dt { font-size: 13px; color: var(--muted); font-weight: 600; margin-top: 3px; }
.x-card { background: var(--surface); border-radius: 12px; box-shadow: var(--card); }

/* ------------------------------------------------------------- controls -- */
.xb { display: inline-flex; align-items: center; justify-content: center; gap: 7px; height: 32px; padding: 0 12px; border-radius: 9px; background: var(--btn); color: var(--ink) !important; border: 0;
  font: 600 13px/1 var(--font); white-space: nowrap; box-shadow: inset 0 0 0 1px var(--btn-line), 0 1px 0 rgba(33,28,58,.05); cursor: pointer; text-decoration: none; flex: none; }
.xb:hover { background: var(--hover); }
.xb.pri { background: var(--pri); color: var(--on-pri) !important; box-shadow: inset 0 -1px 0 rgba(0,0,0,.25), 0 1px 2px rgba(33,28,58,.2); }
.xb.pri:hover { filter: brightness(1.15); }
html:root[data-theme="dark"] .xb.pri:hover { filter: brightness(.94); }
.xb.ghost { background: transparent; box-shadow: none; color: var(--ink-2) !important; }
.xb.ghost:hover { background: var(--hover); }
.xb.sm { height: 28px; padding: 0 10px; font-size: 12.5px; border-radius: 8px; }
.xb.ico { width: 32px; padding: 0; color: var(--muted) !important; } .xb.sm.ico { width: 28px; }
.xb.dgr { color: var(--rose-ink) !important; }
.xb.lg { height: 48px; justify-content: flex-start; padding: 0 14px; }
.xb[disabled], .xb.dis { opacity: .5; cursor: not-allowed; filter: none; }
.xb .x-kbd { margin-left: 2px; }
.xb.pri .x-kbd { background: rgba(255,255,255,.14); border-color: rgba(255,255,255,.2); box-shadow: none; color: var(--on-pri); }
html:root[data-theme="dark"] .xb.pri .x-kbd { background: rgba(27,23,48,.08); border-color: rgba(27,23,48,.18); }
.x-kbd { display: inline-flex; align-items: center; justify-content: center; min-width: 18px; height: 18px; padding: 0 4px; border-radius: 5px; font: 600 10.5px/1 var(--font); color: var(--muted); background: var(--kbd-bg); border: 1px solid var(--line); box-shadow: inset 0 -1px 0 var(--line); flex: none; }
.x-seg { display: inline-flex; height: 32px; border-radius: 9px; box-shadow: inset 0 0 0 1px var(--btn-line); background: var(--btn); overflow: hidden; }
.x-seg > button { display: inline-flex; align-items: center; gap: 6px; padding: 0 11px; font: 600 12.5px var(--font); color: var(--ink-2); border: 0; border-right: 1px solid var(--line); background: none; cursor: pointer; }
.x-seg > button:first-child { color: var(--ink); }
.x-seg > button:last-child { border-right: 0; }
.x-seg > button:hover { background: var(--hover); }
.x-act { box-shadow: inset 0 0 0 1.5px var(--ink), 0 0 0 3px rgba(33,28,58,.10) !important; }
html:root[data-theme="dark"] .x-act { box-shadow: inset 0 0 0 1.5px var(--ink), 0 0 0 3px rgba(241,239,249,.12) !important; }

/* views (saved-view tabs) and the filter row */
.x-views { display: flex; align-items: center; gap: 2px; flex-wrap: wrap; }
.x-v { display: inline-flex; align-items: center; gap: 7px; height: 30px; padding: 0 10px; border-radius: 8px; font: 600 13px var(--font); color: var(--ink-2); background: none; border: 0; cursor: pointer; }
.x-v .vc { font-size: 11.5px; font-weight: 700; color: var(--muted); }
.x-v:hover { background: var(--hover); }
.x-v.on { background: var(--surface); color: var(--ink); box-shadow: var(--card); }
.x-v.on .vc { color: var(--ink-2); }
.x-frow { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.x-dbtn, .x-addf, .x-sbtn, .x-fchip { display: inline-flex; align-items: center; gap: 7px; height: 30px; padding: 0 10px; border-radius: 8px; font: 600 12.5px var(--font); white-space: nowrap; cursor: pointer; }
.x-dbtn, .x-sbtn, .x-fchip { border: 0; background: var(--btn); box-shadow: inset 0 0 0 1px var(--btn-line); color: var(--ink); }
.x-dbtn:hover, .x-sbtn:hover, .x-fchip:hover { background: var(--hover); }
.x-addf { border: 1px dashed var(--btn-line); color: var(--ink-2); background: none; }
.x-addf:hover { background: var(--hover); }
.x-fchip { padding-right: 4px; cursor: default; }
.x-fchip .fk { color: var(--muted); font-weight: 600; }
.x-fchip .fx { width: 22px; height: 22px; border-radius: 6px; display: inline-flex; align-items: center; justify-content: center; color: var(--muted); background: none; border: 0; cursor: pointer; }
.x-fchip .fx:hover { background: var(--hover); color: var(--ink); }
.x-clr { font: 600 12.5px var(--font); color: var(--ink-2); text-decoration: underline; text-underline-offset: 3px; background: none; border: 0; cursor: pointer; }

/* pills, avatars, tiles */
.x-pl { display: inline-flex; align-items: center; gap: 5px; height: 22px; padding: 0 8px; border-radius: 6px; font-size: 12px; font-weight: 600; background: var(--hover); color: var(--ink-2); white-space: nowrap; }
.x-pl::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: var(--faint); }
.x-pl.nodot::before { display: none; }
.x-pl.rose { background: var(--rose-soft); color: var(--rose-ink); } .x-pl.rose::before { background: var(--rose); }
.x-pl.green { background: var(--green-soft); color: var(--green-ink); } .x-pl.green::before { background: var(--green); }
.x-pl.amber { background: var(--amber-soft); color: var(--amber-ink); } .x-pl.amber::before { background: var(--amber); }
.x-pl.peri { background: var(--peri); color: var(--peri-ink); } .x-pl.peri::before { background: var(--peri-ink); }
.x-av { display: inline-flex; align-items: center; justify-content: center; flex: none; font-weight: 700; letter-spacing: .01em; width: 24px; height: 24px; border-radius: 50%; font-size: 10px; }
.x-av.staff { background: var(--chart); color: var(--surface); }
.x-av.fam { background: var(--fam-bg); color: var(--fam-ink); border-radius: 6px; }
.x-av.hel { background: var(--peri); color: var(--peri-ink); border-radius: 6px; }
.x-av.un { background: transparent; box-shadow: inset 0 0 0 1.5px var(--faint); color: var(--muted); }
.x-av.md { width: 30px; height: 30px; border-radius: 8px; font-size: 11.5px; }
.x-av.lg { width: 44px; height: 44px; border-radius: 12px; font-size: 15px; }
.x-av.xl { width: 52px; height: 52px; border-radius: 14px; font-size: 18px; }
.x-kt { width: 28px; height: 28px; border-radius: 8px; display: inline-flex; align-items: center; justify-content: center; flex: none; background: var(--hover); color: var(--ink-2); }
.x-kt.money { background: var(--amber-soft); color: var(--amber-ink); } .x-kt.safety { background: var(--rose-soft); color: var(--rose-ink); }
.x-kt.hire { background: var(--green-soft); color: var(--green-ink); } .x-kt.lg { width: 40px; height: 40px; border-radius: 10px; }
.x-due { font-size: 12px; font-weight: 700; display: inline-flex; align-items: center; gap: 5px; height: 22px; padding: 0 8px; border-radius: 6px; white-space: nowrap; }
.x-due.late { background: var(--rose-soft); color: var(--rose-ink); } .x-due.soon { background: var(--amber-soft); color: var(--amber-ink); }
.x-due.ok { color: var(--ink-2); padding: 0; font-weight: 600; } .x-due.none { color: var(--muted); padding: 0; font-weight: 600; }
.x-cb { width: 16px; height: 16px; border-radius: 4px; border: 1.5px solid #B9B6C8; background: var(--surface); display: inline-flex; align-items: center; justify-content: center; flex: none; cursor: pointer; padding: 0; }
html:root[data-theme="dark"] .x-cb { border-color: #5A5478; }
.x-cb.on { background: var(--pri); border-color: var(--pri); color: var(--on-pri); }
.x-cb .x-ic { width: 12px; height: 12px; display: none; } .x-cb.on .x-ic { display: inline-flex; }
.x-cb.on .x-ic svg { stroke-width: 3; }

/* ---------------------------------------------------------------- Today -- */
.x-focus { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; flex: none; }
.x-ft { padding: 14px 16px; display: flex; flex-direction: column; position: relative; overflow: hidden; min-height: 154px; }
.x-ft-h { display: flex; align-items: center; gap: 8px; font-weight: 700; font-size: 13px; color: var(--ink-2); }
.x-ft-ic { width: 24px; height: 24px; border-radius: 7px; display: inline-flex; align-items: center; justify-content: center; }
.t-late .x-ft-ic { background: var(--rose); color: #fff; } .t-due .x-ft-ic { background: var(--amber-soft); color: var(--amber-ink); }
.t-screen .x-ft-ic { background: var(--peri); color: var(--peri-ink); } .t-safety .x-ft-ic { background: var(--rose-soft); color: var(--rose-ink); }
.x-ft-n { display: flex; align-items: baseline; gap: 10px; margin-top: 8px; }
.x-ft-c { font-size: 34px; font-weight: 800; letter-spacing: -.03em; line-height: 1; }
.t-late .x-ft-c { color: var(--rose); }
.x-ft-m { font-size: 12.5px; font-weight: 600; color: var(--muted); }
.t-late .x-ft-m { color: var(--rose-ink); }
.x-ft-x { font-size: 12.5px; color: var(--muted); margin-top: 8px; }
.x-ft-x b { color: var(--ink); font-weight: 700; }
.x-ft-a { margin-top: auto; padding-top: 10px; display: flex; align-items: center; gap: 8px; }
.x-lk { margin-left: auto; font: 600 12.5px var(--font); color: var(--muted) !important; display: inline-flex; align-items: center; gap: 4px; background: none; border: 0; cursor: pointer; text-decoration: none; }
.x-lk:hover { color: var(--ink) !important; }
.t-late.on::before { content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 3px; background: var(--rose); }
.x-mets { display: grid; grid-template-columns: repeat(4, 1fr) 136px; min-height: 76px; flex: none; }
.x-mc { padding: 11px 16px; position: relative; border-left: 1px solid var(--line-2); min-width: 0; }
.x-mc:first-child { border-left: 0; }
.x-mc-l { font-size: 12.5px; font-weight: 600; color: var(--muted); }
.x-mc-v { font-size: 21px; font-weight: 800; letter-spacing: -.02em; margin-top: 3px; line-height: 1.2; }
.x-mc-s { font-size: 11.5px; color: var(--muted); margin-top: 2px; }
.x-mc .x-spk { position: absolute; right: 18px; top: 18px; }
.x-dl { display: inline-flex; align-items: center; gap: 2px; font-size: 12px; font-weight: 700; margin-left: 8px; }
.x-dl.x-up { color: var(--green-ink); } .x-dl.x-down { color: var(--down-ink); } .x-dl.x-flat { color: var(--muted); }
.x-dl { background: none !important; padding: 0 !important; }
.x-mlg { border-left: 1px solid var(--line-2); display: flex; flex-direction: column; justify-content: center; gap: 6px; padding: 0 14px; font-size: 11px; font-weight: 600; color: var(--muted); }
.x-mlg span, .x-lgd span { white-space: nowrap; display: inline-flex; align-items: center; gap: 6px; }
.x-mlg i, .x-lgd i { width: 14px; height: 0; border-top: 2px solid var(--chart); } .x-mlg i.pv, .x-lgd i.pv { border-top: 2px dashed var(--chart-prev); }
.x-lgd { margin-left: auto; display: flex; gap: 12px; font-size: 11.5px; color: var(--muted); font-weight: 600; }
.x-bot { flex: 1; min-height: 0; display: grid; grid-template-columns: minmax(0, 1fr) 372px; gap: 14px; }
.x-col { display: flex; flex-direction: column; gap: 14px; min-height: 0; min-width: 0; }
.x-ch { display: flex; align-items: center; gap: 10px; min-height: 46px; padding: 0 14px 0 16px; border-bottom: 1px solid var(--line-2); flex: none; }
.x-ch h2 { font-size: 14px; font-weight: 700; margin: 0; }
.x-chips { display: flex; gap: 4px; margin-left: 6px; }
.x-chip { height: 26px; display: inline-flex; align-items: center; gap: 6px; padding: 0 9px; border-radius: 7px; font: 600 12px var(--font); color: var(--muted); background: none; border: 0; cursor: pointer; }
.x-chip b { color: var(--ink-2); }
.x-chip.on { background: var(--hover); color: var(--ink); box-shadow: inset 0 0 0 1px var(--line); }
.x-chip i.dot { width: 6px; height: 6px; border-radius: 50%; }
.x-hints { margin-left: auto; display: flex; align-items: center; gap: 5px; font-size: 11.5px; color: var(--muted); font-weight: 600; white-space: nowrap; }
.x-hints .g { margin-right: 8px; }
.x-wrows { flex: 1; min-height: 0; overflow-y: auto; }
.x-wr { display: grid; grid-template-columns: 28px minmax(0, 1fr) 128px 26px 156px; gap: 12px; align-items: center; height: 46px; padding: 0 12px 0 16px; border-bottom: 1px solid var(--line-2); position: relative; cursor: pointer; }
.x-wr:hover { background: var(--surface-2); }
.x-wr.sel { background: var(--sel); }
.x-wr.sel::before { content: ''; position: absolute; left: 0; top: 6px; bottom: 6px; width: 3px; border-radius: 0 3px 3px 0; background: var(--ink); }
.x-rt { font-weight: 700; font-size: 13px; color: var(--ink); } .x-rs { font-size: 12px; color: var(--muted); margin-top: 1px; }
.x-acts { display: flex; justify-content: flex-end; gap: 8px; }
.x-acts2 { grid-column: span 2; }
.x-foot { display: flex; align-items: center; min-height: 38px; padding: 0 12px 0 16px; font-size: 12px; color: var(--muted); font-weight: 600; flex: none; gap: 10px; }
.x-foot .x-lk { color: var(--ink) !important; font-weight: 700; }
.x-cc { padding: 14px 16px 12px; flex: none; }
.x-cc-h { display: flex; align-items: center; }
.x-cc-h h2 { font-size: 14px; font-weight: 700; margin: 0; }
.x-cc-v { display: flex; align-items: center; gap: 4px; margin: 4px 0 0; font-size: 12.5px; color: var(--muted); flex-wrap: wrap; }
.x-cc-v b { font-size: 22px; color: var(--ink); font-weight: 800; letter-spacing: -.02em; }
.x-cc-v .x-dl { margin: 0 4px 0 6px; }
.x-cc-f { font-size: 11.5px; color: var(--muted); margin: 1px 0 14px; }
.x-ax { font: 500 10.5px var(--font); fill: var(--muted); }
.x-spk-cur { fill: none; stroke: var(--chart); stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.x-spk-prev { fill: none; stroke: var(--spk-prev); stroke-width: 1.5; stroke-dasharray: 3 2.5; }
.x-spk-fill { fill: var(--chart); opacity: .07; }
.x-chartwrap { position: relative; }
.x-chartwrap svg { display: block; overflow: visible; }
.x-tip { position: absolute; background: var(--surface); border-radius: 8px; padding: 4px 7px; line-height: 1.2; box-shadow: 0 0 0 1px var(--line), 0 6px 18px rgba(20,16,40,.14); font-size: 11px; pointer-events: none; z-index: 2; white-space: nowrap; }
html:root[data-theme="dark"] .x-tip { box-shadow: 0 0 0 1px var(--line), 0 8px 22px rgba(0,0,0,.55); }
.x-tip-d { font-weight: 700; color: var(--ink); margin-bottom: 2px; }
.x-tip-r { display: flex; align-items: center; gap: 6px; color: var(--muted); font-weight: 600; height: 16px; }
.x-tip-r b { margin-left: auto; color: var(--ink); font-weight: 700; padding-left: 8px; }
.x-sw { width: 10px; height: 0; border-top: 2px solid var(--chart); display: inline-block; } .x-sw.pv { border-top: 2px dashed var(--chart-prev); }
.x-actv { flex: 1; min-height: 0; display: flex; flex-direction: column; overflow: hidden; }
.x-ar { display: grid; grid-template-columns: 22px minmax(0, 1fr) auto; gap: 10px; align-items: center; height: 30px; padding: 0 16px; font-size: 12.5px; }
.x-ar .t { color: var(--ink-2); } .x-ar .t b { color: var(--ink); font-weight: 700; }
.x-ar .tm { font-size: 11.5px; color: var(--muted); font-weight: 600; }
.x-ar .x-av { width: 22px; height: 22px; font-size: 9.5px; }
.x-livep { display: inline-flex; align-items: center; gap: 6px; font-size: 11.5px; font-weight: 700; color: var(--green-ink); }
.x-livep i { width: 6px; height: 6px; border-radius: 50%; background: var(--green); box-shadow: 0 0 0 3px var(--green-soft); }

/* ---------------------------------------------------------------- tables -- */
.x-grid { background: var(--surface); border-radius: 12px; box-shadow: var(--card); overflow: hidden; display: flex; flex-direction: column; flex: none; }
.x-grid.fill { flex: 1 1 auto; min-height: 220px; }
.x-gbody { flex: 1 1 auto; min-height: 0; overflow-y: auto; position: relative; }
.x-gr { display: grid; align-items: center; }
.x-gh { height: 36px; border-bottom: 1px solid var(--line); background: var(--surface-2); font-size: 12px; font-weight: 600; color: var(--muted); flex: none; }
.x-gh > span, .x-gh > button { display: inline-flex; align-items: center; gap: 5px; padding: 0 12px; height: 100%; background: none; border: 0; font: inherit; color: inherit; cursor: default; min-width: 0; white-space: nowrap; }
.x-gh > button[data-xsort] { cursor: pointer; }
.x-gh > button[data-xsort]:hover { color: var(--ink); }
.x-gh .on { color: var(--ink); }
.x-gh .r, .x-r .r { justify-content: flex-end; text-align: right; }
.x-gh .c, .x-r .c { justify-content: center; }
.x-r { min-height: 44px; border-bottom: 1px solid var(--line-2); font-size: 13px; flex: none; cursor: pointer; position: relative; }
.x-r:hover { background: var(--surface-2); }
.x-r > span { padding: 0 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; display: flex; align-items: center; gap: 8px; min-width: 0; }
.x-r.sel { background: var(--sel) !important; box-shadow: inset 3px 0 0 var(--ink); }
.x-r.picked { background: var(--sel); }
.x-r.dim > span { color: var(--muted); }
.x-r b { font-weight: 700; color: var(--ink); }
.x-grp { height: 36px; display: flex; align-items: center; gap: 10px; padding: 0 16px 0 18px; background: var(--surface); border-bottom: 1px solid var(--line-2); font-size: 13px; font-weight: 700; flex: none; cursor: pointer; user-select: none; }
.x-grp .gc { font-size: 12px; font-weight: 700; color: var(--muted); }
.x-grp .gm { margin-left: auto; font-size: 13px; font-weight: 600; }
.x-grp .gdot { width: 9px; height: 9px; border-radius: 3px; }
.x-grp .x-ic { color: var(--muted); transition: transform .15s; }
.x-grp.shut .x-ic { transform: rotate(-90deg); }
.x-gfoot { min-height: 40px; display: flex; align-items: center; gap: 12px; padding: 4px 18px; border-top: 1px solid var(--line-2); font-size: 12.5px; color: var(--muted); flex: none; margin-top: auto; }
.x-bulk { display: flex; align-items: center; gap: 10px; min-height: 50px; padding: 0 18px; border-bottom: 1px solid var(--line-2); background: var(--sel-range); font-size: 13.5px; flex: none; flex-wrap: wrap; }
.x-unas { color: var(--muted); font-size: 13px; }
.x-meter { width: 80px; height: 6px; border-radius: 3px; background: var(--line-2); overflow: hidden; display: inline-block; }
.x-meter i { display: block; height: 100%; background: var(--chart); opacity: .75; }
.x-empty { padding: 48px 24px; display: flex; flex-direction: column; align-items: center; gap: 10px; text-align: center; color: var(--muted); }
.x-empty b { font-size: 16px; color: var(--ink); }

/* -------------------------------------------------------- sheets, modals -- */
.x-layer { position: fixed; inset: 0; z-index: 60; font: 500 13px/1.4 var(--font); color: var(--ink); }
.x-scrim { position: absolute; inset: 0; background: var(--scrim); }
.x-sheet { position: absolute; left: max(24px, calc(50% - 560px)); right: max(24px, calc(50% - 560px)); top: 50%; transform: translateY(-50%); max-height: calc(100vh - 48px); height: min(820px, calc(100vh - 48px));
  background: var(--surface); border-radius: 16px; box-shadow: 0 0 0 1px rgba(33,28,58,.08), 0 30px 80px rgba(17,14,28,.35); display: flex; flex-direction: column; overflow: hidden; }
html:root[data-theme="dark"] .x-sheet { box-shadow: 0 0 0 1px rgba(255,255,255,.14), 0 30px 80px rgba(0,0,0,.7); }
.x-sh { padding: 18px 22px 14px 26px; border-bottom: 1px solid var(--line-2); flex: none; display: flex; align-items: center; gap: 12px; }
.x-sh .tt { font-size: 19px; font-weight: 800; letter-spacing: -.015em; margin: 0; }
.x-shm { display: flex; align-items: center; gap: 8px; margin-top: 6px; font-size: 13px; color: var(--ink-2); flex-wrap: wrap; }
.x-shm b { color: var(--ink); }
.x-sb2 { flex: 1; min-height: 0; display: grid; grid-template-columns: minmax(0, 1fr) 340px; }
.x-thread { padding: 20px 26px; display: flex; flex-direction: column; gap: 14px; overflow-y: auto; min-height: 0; }
.x-msg { display: flex; gap: 12px; max-width: 80%; }
.x-msg .bub { background: var(--surface-2); border: 1px solid var(--line-2); border-radius: 4px 16px 16px 16px; padding: 10px 14px; font-size: 13.5px; line-height: 1.5; white-space: pre-wrap; overflow-wrap: anywhere; }
.x-msg .m { font-size: 12.5px; color: var(--muted); margin-bottom: 5px; }
.x-msg .m b { color: var(--ink); }
.x-msg.out { align-self: flex-end; flex-direction: row-reverse; }
.x-msg.out .bub { border-radius: 16px 4px 16px 16px; background: var(--peri); border-color: transparent; }
html:root[data-theme="dark"] .x-msg.out .bub { background: #2E2850; }
.x-msg.out .m, .x-msg.note .m { text-align: right; }
.x-msg.note { align-self: flex-end; flex-direction: row-reverse; }
.x-msg.note .bub { background: var(--note); border-color: var(--note-line); border-radius: 16px 4px 16px 16px; }
.x-event { align-self: center; display: inline-flex; align-items: center; gap: 8px; font-size: 13px; color: var(--ink-2); text-align: center; }
.x-comp { margin-top: auto; border: 1px solid var(--line); border-radius: 14px; flex: none; background: var(--surface); }
.x-comp textarea { display: block; width: 100%; box-sizing: border-box; border: 0; background: transparent; resize: vertical; min-height: 92px; padding: 12px 16px; font: 500 13.5px/1.55 var(--font); color: var(--ink); border-radius: 14px 14px 0 0; }
.x-comp textarea:focus { outline: none; }
.x-comp:focus-within { box-shadow: 0 0 0 3px rgba(33,28,58,.10); border-color: var(--ink-2); }
.x-comp .cf { display: flex; align-items: center; gap: 10px; padding: 8px 10px 8px 14px; border-top: 1px solid var(--line-2); flex-wrap: wrap; }
.x-comp .x-chip { height: 24px; }
.x-side2 { border-left: 1px solid var(--line-2); padding: 18px 22px; display: flex; flex-direction: column; gap: 16px; background: var(--surface-2); min-height: 0; overflow-y: auto; }
.x-eb { font-size: 11.5px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--muted); padding: 0 0 8px; }
.x-flag { border-radius: 10px; background: var(--amber-soft); border: 1px solid var(--note-line); padding: 10px 12px; }
.x-flag.ok { background: var(--green-soft); border-color: transparent; }
.x-flag.bad { background: var(--rose-soft); border-color: transparent; }
.x-kv { display: grid; grid-template-columns: 96px minmax(0, 1fr); row-gap: 8px; column-gap: 8px; font-size: 13px; }
.x-kv .k { color: var(--muted); }
.x-kv > span { overflow-wrap: anywhere; }
.x-lrow { display: flex; align-items: center; gap: 10px; padding: 8px 0; font-size: 13px; border-bottom: 1px solid var(--line-2); }
.x-lrow:last-child { border-bottom: 0; }
.x-box { border: 1px solid var(--line); border-radius: 14px; padding: 12px 16px; }
.x-box-h { display: flex; align-items: center; gap: 8px; margin-bottom: 4px; }
.x-box-h b { font-size: 14px; }
.x-modal { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); width: min(560px, calc(100vw - 32px)); max-height: calc(100vh - 32px); overflow-y: auto; background: var(--surface); border-radius: 16px;
  box-shadow: 0 0 0 1px rgba(33,28,58,.08), 0 30px 80px rgba(17,14,28,.4); z-index: 2; }
html:root[data-theme="dark"] .x-modal { box-shadow: 0 0 0 1px rgba(255,255,255,.18), 0 30px 80px rgba(0,0,0,.7); }
.x-modal.wide { width: min(620px, calc(100vw - 32px)); }
.x-mhd { padding: 20px 24px 10px; display: flex; align-items: center; gap: 12px; }
.x-mhd .mt { font-size: 18px; font-weight: 800; margin: 0; }
.x-mb { padding: 6px 24px 16px; display: flex; flex-direction: column; gap: 14px; }
.x-mf { padding: 12px 24px; border-top: 1px solid var(--line-2); display: flex; align-items: center; gap: 10px; background: var(--surface-2); flex-wrap: wrap; }
.x-sum { display: grid; grid-template-columns: 100px minmax(0, 1fr); gap: 8px 12px; font-size: 13.5px; padding: 12px 14px; border-radius: 12px; background: var(--surface-2); border: 1px solid var(--line-2); }
.x-sum .k { color: var(--muted); }
.x-lab { font-weight: 700; font-size: 13.5px; margin-bottom: 6px; display: block; }
.x-inp { display: block; width: 100%; box-sizing: border-box; border: 1.5px solid var(--btn-line); border-radius: 9px; padding: 9px 12px; font: 500 13.5px/1.5 var(--font); color: var(--ink); background: var(--surface); }
.x-inp:focus { outline: none; border-color: var(--ink); box-shadow: 0 0 0 3px rgba(33,28,58,.10); }
textarea.x-inp { resize: vertical; min-height: 64px; }
.x-ftip { font-size: 12.5px; color: var(--muted); }
.x-check { display: flex; align-items: center; gap: 10px; min-height: 36px; font-size: 13.5px; cursor: pointer; }
.x-check input { position: absolute; opacity: 0; pointer-events: none; }
.x-check input:focus-visible + .x-cb { outline: 2px solid var(--focus); outline-offset: 2px; }

/* -------------------------------------------------------------- popovers -- */
.x-pop { position: fixed; z-index: 70; background: var(--surface); border-radius: 12px; box-shadow: var(--pop-sh); padding: 8px; font: 500 13px var(--font); color: var(--ink); }
.x-pop .x-eb { padding: 8px 10px 6px; }
.x-pi { display: flex; align-items: center; gap: 10px; min-height: 34px; padding: 0 10px; border-radius: 8px; font: 600 13px var(--font); color: var(--ink); background: none; border: 0; width: 100%; text-align: left; cursor: pointer; }
.x-pi .x-ic { color: var(--muted); }
.x-pi:hover, .x-pi.on { background: var(--hover); }
.x-pi.on .x-ic { color: var(--ink); }
.x-pi .cur { margin-left: auto; font-size: 11px; font-weight: 700; color: var(--muted); background: var(--hover); border-radius: 6px; padding: 2px 6px; }
.x-pi[disabled] { color: var(--muted); cursor: not-allowed; }
.x-pdiv { height: 1px; background: var(--line-2); margin: 6px 4px; }
.x-pfoot { display: flex; align-items: center; gap: 8px; padding: 10px 6px 4px; margin-top: 6px; border-top: 1px solid var(--line-2); flex-wrap: wrap; }
.x-fpop { width: 560px; max-width: calc(100vw - 24px); display: grid; grid-template-columns: 220px minmax(0, 1fr); padding: 0; }
.x-fpop .pl { padding: 8px; border-right: 1px solid var(--line-2); }
.x-fpop .pr { padding: 8px 12px; display: flex; flex-direction: column; max-height: 420px; overflow-y: auto; }
.x-radio { display: flex; align-items: center; gap: 10px; min-height: 36px; padding: 0 6px; font-size: 13px; font-weight: 500; cursor: pointer; border-radius: 8px; }
.x-radio:hover { background: var(--hover); }
.x-radio input { position: absolute; opacity: 0; pointer-events: none; }
.x-rd { width: 18px; height: 18px; border-radius: 50%; border: 1.5px solid #BDB7D0; flex: none; box-sizing: border-box; }
html:root[data-theme="dark"] .x-rd { border-color: #6A5C96; }
.x-radio.on .x-rd { border: 5.5px solid var(--pri); }
.x-radio.on { font-weight: 700; }
.x-radio input:focus-visible + .x-rd, .x-radio input:focus-visible + .x-cb { outline: 2px solid var(--focus); outline-offset: 2px; }
.x-minin { width: 64px; height: 30px; border: 1px solid var(--line); border-radius: 8px; font: 600 13px var(--font); padding: 0 8px; background: var(--surface); color: var(--ink); }
.x-spop { width: 260px; }
.x-dpop { display: grid; grid-template-columns: 170px minmax(0, 1fr); padding: 0; width: 720px; max-width: calc(100vw - 24px); }
.x-dpop .pres { padding: 10px 8px; border-right: 1px solid var(--line-2); }
.x-dpop .pres .x-pi.cus { margin-top: 13px; position: relative; overflow: visible; }
.x-dpop .pres .x-pi.cus::before { content: ''; position: absolute; left: 4px; right: 4px; top: -7px; height: 1px; background: var(--line-2); }
.x-dpop .cal { padding: 10px 16px; }
.x-calh { display: flex; align-items: center; margin-bottom: -30px; position: relative; z-index: 1; }
.x-mons { display: grid; grid-template-columns: 1fr 1fr; gap: 28px; }
.x-mh { text-align: center; font-weight: 700; font-size: 14px; height: 36px; line-height: 36px; }
.x-dow, .x-days { display: grid; grid-template-columns: repeat(7, 1fr); text-align: center; }
.x-dow span { font-size: 12px; font-weight: 700; color: var(--muted); height: 26px; line-height: 26px; }
.x-days > span { height: 36px; display: flex; align-items: center; justify-content: center; font-size: 13px; position: relative; }
.x-days button { font: 500 13px var(--font); width: 34px; height: 34px; border-radius: 10px; display: inline-flex; align-items: center; justify-content: center; position: relative; z-index: 1; border: 0; background: none; color: var(--ink); cursor: pointer; }
.x-days button:hover { background: var(--hover); }
.x-days button[disabled] { color: var(--fut); cursor: default; background: none; }
.x-days > span.c-in { background: var(--sel-range); }
.x-days > span.c-st { background: linear-gradient(90deg, transparent 50%, var(--sel-range) 50%); }
.x-days > span.c-en { background: linear-gradient(90deg, var(--sel-range) 50%, transparent 50%); }
.x-days > span.c-st.c-en { background: none; }
/* a range that wraps a week: no half-fill past the row's ends */
.x-days > span.c-st:nth-child(7n), .x-days > span.c-en:nth-child(7n+1) { background: none; }
.x-days > span.c-sel button { background: var(--pri); color: var(--on-pri); font-weight: 700; }
.x-days > span.c-tod button { box-shadow: inset 0 0 0 1.5px var(--rose); }
.x-days > span.c-sel.c-tod button { box-shadow: 0 0 0 2px var(--rose); }
.x-rng { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; }
.x-rbox { border: 1px solid var(--line); border-radius: 8px; padding: 5px 10px; font-weight: 600; }

/* links inside the v6 layers read as the ink, not the browser's blue */
.x-layer a:not(.xb):not(.x-pi), .x-pg a:not(.xb):not(.x-pi):not(.x-lk) { color: var(--ink); text-decoration: none; font-weight: 600; }
.x-layer a:not(.xb):not(.x-pi):hover, .x-pg a:not(.xb):not(.x-pi):not(.x-lk):hover { text-decoration: underline; text-underline-offset: 3px; }
.x-pi { text-decoration: none; }
.x-v { white-space: nowrap; }
.x-shm .sep { color: var(--muted); }

/* toast (the shared #toast element) */
.v6app ~ .toast, body > .toast { left: 50% !important; right: auto !important; transform: translateX(-50%); bottom: 22px !important; background: #211C3A !important; color: #fff !important; border-radius: 12px !important;
  font: 600 13px/1.4 var(--font) !important; padding: 12px 16px !important; box-shadow: 0 16px 40px rgba(15,11,30,.35) !important; max-width: min(820px, calc(100vw - 32px)); display: flex; align-items: center; gap: 12px; z-index: 90 !important; }
html:root[data-theme="dark"] body > .toast { background: #F1EFF9 !important; color: #1B1730 !important; }
.toast.on { pointer-events: auto !important; }
.toast .x-u { white-space: nowrap; flex: none; font-weight: 800; color: #F2B6C0; text-decoration: underline; text-underline-offset: 3px; background: none; border: 0; cursor: pointer; font: inherit; }
html:root[data-theme="dark"] .toast.on { pointer-events: auto !important; }
.toast .x-u { color: #A3324A; }

/* -------------------------------------------------------- states, misc -- */
.x-states { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; flex: 1; min-height: 0; }
.x-stc { background: var(--surface); border-radius: 12px; box-shadow: var(--card); display: flex; flex-direction: column; overflow: hidden; min-height: 300px; }
.x-stc .cap { display: flex; align-items: center; gap: 8px; padding: 12px 16px; border-bottom: 1px solid var(--line-2); font-weight: 800; font-size: 14px; }
.x-stc .in { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; gap: 10px; padding: 18px 24px; }
.x-state { display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; gap: 10px; padding: 36px 24px; }
.x-state .t { font-size: 18px; font-weight: 800; color: var(--ink); }
.x-state .d { color: var(--muted); max-width: 420px; }
.x-bigi { width: 56px; height: 56px; border-radius: 18px; display: inline-flex; align-items: center; justify-content: center; }
.x-bigi .x-ic { width: 26px; height: 26px; }
.x-sk { height: 12px; border-radius: 6px; background: var(--line-2); animation: xpulse 1.4s ease-in-out infinite; }
@keyframes xpulse { 50% { opacity: .55; } }
.x-ins { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.x-panel { background: var(--surface); border-radius: 12px; box-shadow: var(--card); padding: 14px 16px; min-width: 0; display: flex; flex-direction: column; }
.x-stat { display: grid; grid-template-columns: 1fr 1fr; border-top: 1px solid var(--line-2); margin-top: 10px; }
.x-stat > div { padding: 10px 0 0; } .x-stat .k { font-size: 12.5px; color: var(--muted); font-weight: 600; } .x-stat .v { font-size: 18px; font-weight: 800; }
.x-legacy { padding: 4px 24px 32px; }
.x-legacy-h { display: flex; align-items: center; gap: 10px; margin: 12px 0 10px; }
.x-legacy-h b { font-size: 15px; }
.x-note { background: var(--note); border: 1px solid var(--note-line); border-radius: 12px; padding: 10px 12px; font-size: 13.5px; white-space: pre-wrap; overflow-wrap: anywhere; }
.x-note2 { border: 1px solid var(--line-2); border-radius: 12px; padding: 10px 12px; font-size: 13.5px; white-space: pre-wrap; overflow-wrap: anywhere; }
.x-back { display: none; }
.x-mob, .x-earlier, .x-mbar, .x-m-only, .x-mob-inline { display: none; }
.x-m-only { color: var(--muted); margin-left: 4px; }
/* the sheet sits below the top bar, centred in the space left */
.x-sheet { top: calc(52px + (100vh - 52px) / 2); transform: translateY(-50%); height: auto; min-height: min(540px, calc(100vh - 84px)); max-height: min(860px, calc(100vh - 84px)); }
.x-sheet > .x-sb2 { min-height: 0; }
.x-modal-scrim-strong { background: rgba(17,14,28,.5); }
#xModal .x-scrim { background: rgba(17,14,28,.5); }
html:root[data-theme="dark"] #xModal .x-scrim { background: rgba(5,4,10,.66); }
.x-sheet:focus, .x-modal:focus { outline: none; }
.x-r:focus-visible, .x-wr:focus-visible { outline: 2px solid var(--focus); outline-offset: -2px; }
.x-tab-act { display: flex; align-items: center; gap: 10px; padding: 11px 12px; border-radius: 10px; font: 600 14px var(--font); color: var(--ink); background: none; border: 0; width: 100%; text-align: left; cursor: pointer; }

/* ------------------------------------------------- narrow screens, phone -- */
@media (max-width: 1180px) {
  .x-cmd { width: 300px; }
  .x-sync .w { display: none; }
  .x-focus { grid-template-columns: repeat(2, 1fr); }
  .x-mets { grid-template-columns: repeat(2, 1fr); }
  .x-mc:nth-child(3) { border-left: 0; } .x-mc:nth-child(n+3) { border-top: 1px solid var(--line-2); }
  .x-mlg { display: none; }
  .x-bot { grid-template-columns: 1fr; }
  .x-ins { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .x-sb2 { grid-template-columns: minmax(0, 1fr) 300px; }
  .x-states { grid-template-columns: repeat(2, 1fr); }
  .x-pg.fit { height: auto; min-height: calc(100vh - 52px); }
}
@media (max-width: 760px) {
  .x-top { height: 52px; padding: 0 12px; }
  .x-cmd { position: static; transform: none; width: 36px; min-width: 0; padding: 0; justify-content: center; margin-left: auto; }
  .x-cmd .t, .x-cmd .x-kbd { display: none; }
  .x-tr { margin-left: 0; gap: 6px; } .x-sync { display: none; }
  .x-side { display: none; }
  .v6app .body.x-main { left: 0; bottom: 66px; }
  .v6app .page { padding: 16px 16px 32px; }
  .x-tabs { display: flex; position: fixed; left: 0; right: 0; bottom: 0; height: 66px; background: var(--surface); border-top: 1px solid var(--line); z-index: 25; padding: 6px 8px 8px; gap: 4px; }
  .x-tab { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; border-radius: 12px; font: 600 11.5px var(--font); color: var(--muted) !important; text-decoration: none; position: relative; background: none; border: 0; cursor: pointer; }
  .x-tab .x-ic { width: 20px; height: 20px; }
  .x-tab.on { background: var(--hover); color: var(--ink) !important; }
  .x-tab em { position: absolute; top: 3px; left: calc(50% + 4px); font: 700 10.5px/1 var(--font); font-style: normal; background: var(--surface); color: var(--ink); box-shadow: inset 0 0 0 1px var(--line); border-radius: 999px; padding: 3px 5px; min-width: 18px; text-align: center; }
  .x-tab em.zero, .x-tab em:empty { display: none; }
  .x-tabs-sheet { display: none; position: absolute; right: 8px; bottom: calc(100% + 8px); background: var(--surface); border-radius: 14px; padding: 6px; box-shadow: var(--pop-sh); min-width: 210px; }
  .x-tabs.open .x-tabs-sheet { display: block; }
  .x-tabs-sheet a { display: flex; align-items: center; gap: 10px; padding: 11px 12px; border-radius: 10px; font: 600 14px var(--font); color: var(--ink) !important; text-decoration: none; }
  .x-tabs-sheet a:hover { background: var(--hover); }
  .x-pg { padding: 14px 16px 24px; min-height: 0; }
  .x-pg.fit { height: auto; }
  .x-h1 { font-size: 26px; }
  .x-focus { grid-template-columns: 1fr 1fr; gap: 10px; }
  .x-ft { min-height: 0; padding: 12px 14px; }
  .x-ft-c { font-size: 28px; }
  .x-ft-x, .x-ft-a { display: none; }
  .x-ft-n { flex-direction: column; align-items: flex-start; gap: 4px; margin-top: 6px; }
  .x-mets { display: none; }
  .x-wr { grid-template-columns: minmax(0, 1fr) auto; height: auto; min-height: 56px; padding: 8px 14px; }
  .x-wr > .x-kt, .x-wr > .x-due, .x-wr > .x-av { display: none; }
  .x-wr .x-acts .xb.ico, .x-wr .x-acts .x-av { display: none; }
  .x-wr .x-acts2 { grid-column: auto; }
  .x-hints, .x-chips { display: none; }
  .x-grid .x-gh { display: none; }
  .x-grid .x-r { display: flex; flex-wrap: wrap; align-items: center; padding: 10px 14px; gap: 2px 8px; min-height: 56px; }
  .x-grid .x-r > span { padding: 0; }
  .x-grid .x-r > span.m-hide { display: none; }
  .x-grid .x-r > span.m-main { flex: 1 1 60%; }
  .x-grid .x-r > span.m-right { margin-left: auto; }
  .x-grid .x-r > span.m-sub { flex-basis: 100%; order: 3; color: var(--muted); font-size: 12.5px; }
  .x-grid .x-r > span.m-cb { display: none; }
  .x-grid .x-r .m-nn { display: none; }
  .x-frow .x-sbtn .t, .x-frow .x-colbtn { display: none; }
  .x-views { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; }
  .x-sheet { left: 0; right: 0; top: 0; bottom: 0; transform: none; height: auto; max-height: none; border-radius: 0; }
  .x-sh { padding: 12px 16px; flex-wrap: wrap; }
  .x-sh .x-hide-m:not(.x-dim) { display: none; }
  .x-sb2 { grid-template-columns: 1fr; overflow-y: auto; }
  .x-side2 { border-left: 0; border-top: 1px solid var(--line-2); overflow: visible; }
  .x-thread { padding: 14px 16px; overflow: visible; }
  .x-msg { max-width: 92%; }
  .x-modal { top: auto; bottom: 0; transform: translateX(-50%); width: 100vw; border-radius: 16px 16px 0 0; max-height: 92vh; }
  .x-fpop, .x-dpop { grid-template-columns: 1fr; width: calc(100vw - 24px); }
  .x-fpop .pl, .x-dpop .pres { border-right: 0; border-bottom: 1px solid var(--line-2); }
  .x-mons { grid-template-columns: 1fr; } .x-mons .x-mon + .x-mon { display: none; }
  .x-ins, .x-states { grid-template-columns: 1fr; }
  .x-legacy { padding: 4px 16px 24px; }
  .v6app ~ .toast, body > .toast { bottom: 80px !important; }
  .x-cmd { width: 36px; height: 36px; flex: none; }
  .x-env { display: none; }
  .x-ph .x-seg { display: none; }
  .x-bot { display: flex; flex-direction: column; }
  .x-bot > .x-col:last-child { order: -1; }
  .x-actv { display: none; }
  .x-wr .x-gap { display: none; }
  .x-wr .x-acts:not(.x-acts2) { grid-column: 2; }
  .x-grid .x-r > span.m-act { flex-basis: 100%; order: 4; justify-content: flex-start; padding-top: 6px; }
  .x-sh > .x-kt { display: none; }
  .x-sh > div:nth-child(2) { order: 2; flex: 1 1 100% !important; }
  .x-sh .tt.x-ell { white-space: normal; font-size: 21px; }
  .x-shm { gap: 6px 10px; }
  .x-shm .sep { display: none; }
  .x-sb2 { display: flex; flex-direction: column; }
  .x-sb2 > .x-thread { flex: none; order: 1; }
  #xTkSide { display: contents; }
  #xTkSide > * { order: 3; padding: 0 16px; }
  #xTkSide > :first-child { order: 0; padding-top: 12px; }
  #xTkSide > :first-child .x-kv { display: none; }
  #xTkSide > a.xb { margin: 12px 16px 96px; }
  #xTkSide .x-eb { padding-top: 12px; }
  .x-comp .cf .xb, .x-comp .cf .x-hide-m { display: none; }
  .x-mbar { display: flex; gap: 10px; position: fixed; left: 0; right: 0; bottom: 0; padding: 12px 16px calc(12px + env(safe-area-inset-bottom)); background: var(--surface); border-top: 1px solid var(--line); z-index: 5; }
  .x-mbar .xb { height: 48px; flex: 1; font-size: 14px; } .x-mbar .xb.pri { flex: 1.8; }
  .x-thread:not(.all) .x-old { display: none; }
  .x-earlier { display: inline-flex; align-self: center; align-items: center; gap: 8px; height: 40px; padding: 0 16px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); font: 600 13.5px var(--font); color: var(--ink); cursor: pointer; }
  .x-top { display: none; }
  .v6app .body.x-main { top: 0; }
  .x-mob { display: inline-flex; width: 44px; height: 44px; border-radius: 12px; margin-left: auto; }
  .x-ph .xb:not(.x-mob), .x-ph .x-dbtn { display: none; }
  .x-ph .x-dt { order: 3; width: 100%; margin: -6px 0 0; }
  .x-ph.dt-top .x-dt { order: -1; margin: 0; }
  .x-m-only { display: inline; }
  .x-mob-inline { display: inline-flex; color: var(--ink) !important; font-weight: 700; }
  .x-sheet { top: 0; height: auto; min-height: 0; max-height: none; transform: none; }
  .x-pg { padding-top: 18px; }
  .x-event { display: block; text-align: center; }
  .x-event .x-ic { vertical-align: -2px; margin-right: 4px; }
  .x-thread > div[style*="grid-template-columns:repeat(4"] { grid-template-columns: 1fr 1fr !important; }
}
@media print { .x-top, .x-side, .x-tabs { display: none; } .v6app .body.x-main { position: static; } }

/* ---- the classic pages in dark: today.css painted their surfaces white (the 2026 console was one
   light theme). In dark they take the v6 surfaces, so text keeps its contrast. ---- */
html:root[data-theme="dark"] .t26 .card, html:root[data-theme="dark"] .dlg, html:root[data-theme="dark"] .pal,
html:root[data-theme="dark"] .t26 .finding, html:root[data-theme="dark"] .task, html:root[data-theme="dark"] .pulse,
html:root[data-theme="dark"] .t26 .lcard, html:root[data-theme="dark"] .t26 .pop, html:root[data-theme="dark"] .t26 .fpop,
html:root[data-theme="dark"] .t26 .chart-note, html:root[data-theme="dark"] .r26 .recnav .btn, html:root[data-theme="dark"] .mmenu,
html:root[data-theme="dark"] .r26 .pg-act .btn[data-moremenu], html:root[data-theme="dark"] .fact, html:root[data-theme="dark"] .recbar,
html:root[data-theme="dark"] .ibx-none, html:root[data-theme="dark"] .t26 .tk-reply textarea, html:root[data-theme="dark"] .t26 .kpi,
html:root[data-theme="dark"] .ins-sel, html:root[data-theme="dark"] .ins-more > .btn, html:root[data-theme="dark"] .t26 .lsearch:focus-within,
html:root[data-theme="dark"] .ibx-i.on .av, html:root[data-theme="dark"] .ibx-i.on .tagx { background: var(--surface) !important; color: var(--ink); }
html:root[data-theme="dark"] .task.done { background: var(--surface-2) !important; border-color: var(--line) !important; }
html:root[data-theme="dark"] .r26 .crumb:hover, html:root[data-theme="dark"] .td-more:hover { background: var(--hover) !important; }
html:root[data-theme="dark"] .t26 .btn.pri, html:root[data-theme="dark"] .btn.pri:hover { background: var(--pri) !important; color: var(--on-pri) !important; }
html:root[data-theme="dark"] .page a.btn.pri { color: var(--on-pri) !important; }
html:root[data-theme="dark"] .page a:not(.btn):not(.nav-a):not(.x-ni):not(.x-sub):not(.x-lk):not(.xb):not(.x-pi) { color: var(--rose-ink); }

/* one button height in the sheets and their composer (design approval note: ticket-panel buttons
   share one token) */
:root { --h-sheet-btn: 32px; }
.x-sh .xb, .x-comp .cf .xb, .x-mf .xb, .x-side2 > .xb, .x-box-h .xb { height: var(--h-sheet-btn); }
.x-sh .xb.ico, .x-comp .cf .xb.ico { width: var(--h-sheet-btn); }
@media (max-width: 760px) { :root { --h-sheet-btn: 40px; } .x-mbar .xb { height: 48px; } }

/* the ⌘K palette in the v6 palette: neutral selection, the same card and scrim */
.pal-wrap .pal { border-radius: 14px !important; box-shadow: var(--pop-sh) !important; background: var(--surface) !important; }
.pal-i { border-radius: 8px !important; }
.pal-i.on, .pal-i:hover { background: var(--hover) !important; color: var(--ink) !important; }
.pal-g { color: var(--muted) !important; }

/* ---------------------------------------------------------- audit log (2026-11-02) --
   Shopify-activity style: grouped by Manila day, one sentence a row, time on the left, the
   reason as a muted second line (two lines, then More; lines break between words), the result
   tag on the right. The day header sticks under the top bar while its rows scroll. */
.x-srch { display: inline-flex; align-items: center; gap: 7px; height: 30px; padding: 0 10px; border-radius: 8px; background: var(--btn); box-shadow: inset 0 0 0 1px var(--btn-line); color: var(--muted); width: 280px; max-width: 100%; box-sizing: border-box; }
.x-srch:focus-within { box-shadow: inset 0 0 0 1.5px var(--ink); }
.x-srch input { flex: 1; min-width: 0; border: 0; background: none; outline: none; font: 500 13px var(--font); color: var(--ink); }
.x-srch input::placeholder { color: var(--muted); }
.x-alcard { overflow: clip; }
.x-alist, .x-alrows { list-style: none; margin: 0; padding: 0; }
.x-alh { position: sticky; top: 0; z-index: 2; display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 0; height: 34px; padding: 0 16px;
  background: var(--surface-2); border-bottom: 1px solid var(--line-2); font-size: 12.5px; font-weight: 700; color: var(--ink); }
.x-alh .x-dim { font-weight: 600; font-size: 12px; }
.x-alday + .x-alday .x-alh { border-top: 1px solid var(--line-2); }
.x-alr { display: grid; grid-template-columns: 44px minmax(0, 1fr) auto; column-gap: 12px; align-items: start; padding: 8px 16px; border-bottom: 1px solid var(--line-2); cursor: pointer; }
.x-alrows .x-alr:last-child { border-bottom: 0; }
.x-alr:hover { background: var(--surface-2); }
.x-alr:focus-visible { outline: 2px solid var(--ink); outline-offset: -2px; }
.x-alr.sel { background: var(--sel); box-shadow: inset 3px 0 0 var(--ink); }
.x-altm { font-size: 12.5px; font-weight: 600; color: var(--muted); font-variant-numeric: tabular-nums; line-height: 20px; }
.x-alb { min-width: 0; }
.x-als { font-size: 13.5px; line-height: 20px; color: var(--ink-2); overflow-wrap: break-word; }
.x-als b { color: var(--ink); font-weight: 700; }
.x-als .x-ink { color: var(--ink); font-weight: 600; }
.x-alw { display: flex; align-items: flex-end; gap: 6px; margin-top: 1px; }
.x-alwt { font-size: 12.5px; line-height: 18px; color: var(--muted); max-height: 36px; overflow: hidden; overflow-wrap: break-word; white-space: pre-line; min-width: 0; flex: 0 1 auto; }
.x-alw.open .x-alwt { max-height: none; }
.x-almore { display: none; flex: none; border: 0; background: none; padding: 0; font: 700 12.5px/18px var(--font); color: var(--ink); cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }
.x-alw.cl .x-almore, .x-alw.open .x-almore { display: inline; }
.x-alt { line-height: 20px; display: flex; align-items: center; min-height: 20px; }
.x-altag { height: 20px; }
.x-alfoot { display: flex; align-items: center; gap: 12px; min-height: 44px; padding: 6px 16px; border-top: 1px solid var(--line-2); font-size: 12.5px; color: var(--muted); flex-wrap: wrap; }
.x-alnote { display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--muted); margin: 0; }
/* the side sheet: anchored right, full height */
.x-sheet.x-aside { left: auto; right: 0; top: 0; bottom: 0; transform: none; height: auto; max-height: none; width: min(520px, 100vw); border-radius: 14px 0 0 14px; }
.x-asb { flex: 1; min-height: 0; overflow-y: auto; padding: 18px 22px 24px; display: flex; flex-direction: column; gap: 18px; }
.x-alsent { margin: 0; font-size: 15px; line-height: 22px; color: var(--ink-2); }
.x-alsent b { color: var(--ink); }
.x-alfull { font-size: 13.5px; line-height: 20px; color: var(--ink); white-space: pre-line; overflow-wrap: break-word; background: var(--surface-2); border: 1px solid var(--line-2); border-radius: 10px; padding: 10px 12px; }
.x-alkv { grid-template-columns: 104px minmax(0, 1fr); row-gap: 10px; }
.x-mono { font: 500 12px/1.5 ui-monospace, SFMono-Regular, Menlo, monospace; color: var(--ink-2); overflow-wrap: anywhere; }
.x-json { margin: 0; font: 500 12px/1.55 ui-monospace, SFMono-Regular, Menlo, monospace; color: var(--ink); background: var(--surface-2); border: 1px solid var(--line-2); border-radius: 10px; padding: 10px 12px; white-space: pre-wrap; overflow-wrap: anywhere; max-height: 320px; overflow: auto; }
@media (max-width: 760px) {
  .x-audit .x-frow .x-sp { display: none; }
  .x-srch { width: 100%; height: 36px; }
  .x-alr { grid-template-columns: 40px minmax(0, 1fr) auto; column-gap: 10px; padding: 10px 14px; }
  .x-alh { padding: 0 14px; }
  .x-sheet.x-aside { width: auto; border-radius: 0; }
  .x-asb { padding: 14px 16px 24px; }
}
/* the sentence's names read as ink in both themes (dark mode's page-link rose is for prose links) */
html:root .x-als a[data-xalink], html:root .x-alsent a[data-xalink] { color: var(--ink) !important; }
/* the header brand: the Pinoyaya Y-mark, filled white on the brand tile (same as the sign-in card) */
.x-logo svg.x-ymark { width: 20px; height: 20px; stroke: none; }
.x-logo svg.x-ymark path { fill: #fff; stroke: none; }
/* phone: the shared sheet pattern (actions on the first line, title under them), tag and close at the right */
@media (max-width: 760px) { .x-sheet.x-aside .x-sh > .x-altag { margin-left: auto; } }

/* ---- reading a chat or ID papers (2026-11-02): a panel from the right, over the sheet ---- */
/* the shared action dialog (Open photo, View paper) sits above it */
body .dlg-scrim { z-index: 84; }
body .dlg { z-index: 85; }
.x-modal.x-view { left: auto; right: 0; top: 0; bottom: 0; transform: none; width: min(560px, 100vw); max-height: none; height: 100%; border-radius: 14px 0 0 14px; display: flex; flex-direction: column; overflow: hidden; }
.x-vh { padding: 16px 18px 12px 22px; border-bottom: 1px solid var(--line-2); display: flex; align-items: center; gap: 10px; flex: none; }
.x-vh .mt { font-size: 17px; font-weight: 800; margin: 0; letter-spacing: -.01em; }
.x-vb { flex: 1; min-height: 0; overflow-y: auto; padding: 16px 22px; display: flex; flex-direction: column; gap: 10px; }
.x-vb > .x-state { margin: auto 0; }
.x-vf { flex: none; display: flex; align-items: center; gap: 8px; padding: 10px 22px; border-top: 1px solid var(--line-2); background: var(--surface-2); font-size: 12.5px; color: var(--ink-2); flex-wrap: wrap; }
.x-cm { max-width: 82%; align-self: flex-start; display: flex; flex-direction: column; gap: 4px; }
.x-cm.hel { align-self: flex-end; align-items: flex-end; }
.x-cm.sys { align-self: center; align-items: center; }
.x-cmh { display: flex; gap: 6px; align-items: baseline; font-size: 12px; max-width: 100%; min-width: 0; }
.x-cmh b { color: var(--ink); font-size: 12.5px; }
.x-cm .bub { background: var(--surface-2); border: 1px solid var(--line-2); border-radius: 4px 14px 14px 14px; padding: 8px 12px; font-size: 13.5px; line-height: 1.5; white-space: pre-wrap; overflow-wrap: anywhere; color: var(--ink); }
.x-cm.hel .bub { background: var(--peri); border-color: transparent; border-radius: 14px 4px 14px 14px; }
html:root[data-theme="dark"] .x-cm.hel .bub { background: #2E2850; }
.x-cday { text-align: center; font-size: 12px; color: var(--muted); font-weight: 700; margin: 8px 0 0; }
.x-cmore { display: flex; align-items: center; justify-content: center; gap: 10px; font-size: 12.5px; padding-bottom: 2px; }
.x-cph { display: inline-flex; align-items: center; gap: 8px; white-space: nowrap; }
.x-why { display: flex; flex-direction: column; gap: 12px; padding-top: 4px; }
.x-whyc { display: flex; flex-wrap: wrap; gap: 8px; }
.x-wc { display: inline-flex; align-items: center; gap: 8px; min-height: 40px; padding: 0 14px 0 11px; border-radius: 10px; box-shadow: inset 0 0 0 1.5px var(--btn-line); background: var(--btn); font: 600 13px var(--font); color: var(--ink); cursor: pointer; }
.x-wc:hover { background: var(--hover); }
.x-wc.on { box-shadow: inset 0 0 0 2px var(--ink); background: var(--hover); }
.x-wc input { margin: 0; accent-color: var(--ink); }
.x-wc:focus-within { outline: 2px solid var(--focus); outline-offset: 2px; }
.x-wc input:focus-visible { outline: none; }
.x-err { color: var(--rose-ink); font-size: 12.5px; font-weight: 600; margin-top: 6px; }
.x-clist, .x-dlist { display: flex; flex-direction: column; }
.x-crow { display: flex; align-items: center; gap: 12px; min-height: 52px; padding: 8px 8px; border: 0; border-bottom: 1px solid var(--line-2); background: none; font: inherit; color: inherit; cursor: pointer; width: 100%; text-align: left; }
.x-crow:last-child { border-bottom: 0; }
.x-drow { display: flex; align-items: center; gap: 10px; padding: 12px 0; border-bottom: 1px solid var(--line-2); }
.x-drow:last-child { border-bottom: 0; }
.x-lbtn { width: 100%; min-height: 40px; background: none; border: 0; border-bottom: 1px solid var(--line-2); font: inherit; color: inherit; text-align: left; cursor: pointer; padding-left: 4px; padding-right: 4px; border-radius: 6px; }
.x-lbtn:last-child { border-bottom: 0; }
.x-crow:hover, .x-lbtn:hover { background: var(--hover); }
button.x-gr.x-apps { width: 100%; border: 0; border-bottom: 1px solid var(--line-2); background: none; font: inherit; color: inherit; text-align: left; cursor: pointer; padding: 0; }
button.x-gr.x-apps:last-child { border-bottom: 0; }
.x-appc { display: inline-flex; align-items: center; justify-content: flex-end; gap: 4px; padding-right: 14px; color: var(--ink-2); font-weight: 700; font-size: 12.5px; }
@media (max-width: 760px) {
  .x-modal.x-view { width: 100vw; border-radius: 0; }
  .x-vb, .x-vf { padding-left: 16px; padding-right: 16px; }
  .x-vh { padding-left: 12px; }
  .x-cm { max-width: 92%; }
  .x-gh.x-apps { display: none; }
  button.x-gr.x-apps { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; padding: 10px 14px; min-height: 56px; }
  button.x-gr.x-apps > span:first-child { flex: 1 1 100%; }
  button.x-gr.x-apps > span:nth-child(3), button.x-gr.x-apps > span:nth-child(4) { display: none; }
  .x-appc { margin-left: auto; padding-right: 0; }
}
.x-appc.none { color: var(--muted); font-weight: 600; }
/* phone: a sheet's side column keeps its height in the stacked layout (it used to shrink to nothing
   and its text ran over the cards below it, People > a helper, 2026-11-02) */
@media (max-width: 760px) { .x-sb2 > .x-side2 { flex: none; } }
/* hide a message, from inside the chat (message_hide); quiet until the row is hovered or focused */
.x-chide { font-size: 12px; color: var(--muted); opacity: 0; }
.x-cm:hover .x-chide, .x-chide:focus-visible { opacity: 1; }
@media (hover: none) { .x-chide { opacity: 1; } }
/* the classic records: ID papers rows and chat names open the audited viewers */
.rec-plist { display: flex; flex-direction: column; margin-bottom: 6px; }
.rec-prow { display: flex; align-items: center; gap: 10px; width: 100%; min-height: 40px; padding: 6px 8px; background: none; border: 0; border-bottom: 1px solid var(--line-2, var(--line)); font: inherit; color: var(--ink); text-align: left; cursor: pointer; border-radius: 6px; }
.rec-prow > span:first-child { flex: 1; font-weight: 600; }
.rec-prow:hover { background: var(--hover, rgba(0,0,0,.04)); }
.rec-pgo { font-weight: 700; font-size: 12.5px; color: var(--ink-2); }
/* a hire card with Open chat next to Confirm and Dispute: the actions take the room they need */
.rowc:has(.rc-a [data-xopenconv]) { grid-template-columns: 44px minmax(0, 1fr) auto auto; }
.rowc:has(.rc-a [data-xopenconv]) .rc-a { grid-column: auto; }
@media (max-width: 760px) {
  .rowc:has(.rc-a [data-xopenconv]) { grid-template-columns: 40px minmax(0, 1fr) auto; }
  .rowc:has(.rc-a [data-xopenconv]) .rc-a { grid-column: 2 / -1; flex-wrap: wrap; }
  .rowc .rc-a .btn[data-xopenconv] { padding: 0 14px; }
}
/* dark mode: a hovered or focused card row stays dark (it turned near white, its title unreadable) */
html:root[data-theme="dark"] .rowc:hover, html:root[data-theme="dark"] .rowc:focus-visible { background: rgba(255, 255, 255, .05); }

/* ===== Flagged chats (chat safety, approved 2026-11-03, mockups c1 to c4). Console tokens only. ===== */
.cs-q { min-width: 0; max-width: 100%; overflow: hidden; text-overflow: ellipsis; font-family: inherit; font-size: 12.5px; font-weight: 600; color: var(--ink-2); background: var(--surface-2); border: 1px solid var(--line-2); border-radius: 6px; padding: 1px 6px; white-space: nowrap; }
.cs-rule { font-weight: 700; }
.cs-dir { display: inline-flex; align-items: center; gap: 6px; min-width: 0; }
.cs-tier { display: inline-flex; align-items: center; justify-content: center; min-width: 22px; height: 20px; border-radius: 6px; font-size: 11.5px; font-weight: 800; padding: 0 5px; margin-right: 2px; flex: none; }
.cs-t3 { background: var(--rose-soft); color: var(--rose-ink); }
.cs-t2 { background: var(--amber-soft); color: var(--amber-ink); }
.cs-t1 { background: var(--surface-2); color: var(--ink-2); border: 1px solid var(--line-2); }
.x-sub.cs-sub2 { margin-left: 40px; }
.cs-match { display: flex; flex-direction: column; gap: 0; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; background: var(--card); }
.cs-match .row { display: flex; align-items: center; gap: 10px; padding: 10px 14px; border-top: 1px solid var(--line); font-size: 13.5px; min-width: 0; }
.cs-match .row:first-child { border-top: none; }
.cs-note { display: flex; gap: 8px; align-items: center; font-size: 12.5px; color: var(--muted); margin-top: 8px; }
.cs-held { display: flex; gap: 12px; align-items: flex-start; border-radius: 12px; padding: 12px 14px; background: var(--rose-soft); color: var(--rose-ink); font-size: 13.5px; line-height: 1.45; }
.cs-held b { display: block; font-size: 14px; }
.cs-held .x-ic { margin-top: 2px; }
.x-cm.cs-hit .bub { border: 1.5px solid var(--amber); box-shadow: 0 0 0 3px var(--amber-soft); }
.cs-hitlbl { white-space: nowrap; display: inline-flex; align-items: center; gap: 5px; font-size: 12px; font-weight: 700; color: var(--amber-ink); background: var(--amber-soft); border-radius: 6px; padding: 2px 7px; }
.x-cm.cs-hit.t3 .bub { border-color: var(--rose); box-shadow: 0 0 0 3px var(--rose-soft); }
.x-cm.cs-hit.t3 .cs-hitlbl { color: var(--rose-ink); background: var(--rose-soft); }
.cs-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.cs-lk { width: 100%; background: none; border: 0; border-bottom: 1px solid var(--line-2); font: inherit; color: inherit !important; text-align: left; text-decoration: none; cursor: pointer; }
.cs-lk:hover { background: var(--hover); }
.cs-tom { display: none; }
.cs-fn { font-weight: 600; margin-left: 10px; color: var(--ink-2); }
/* the reused chat viewer: on the helper side the quiet Hide sits before the name, so the name, time and tag end flush with the bubble */
.x-cm.hel .x-chide { order: -1; }
.x-cm.hel .x-cmh { justify-content: flex-end; }   /* a wrapped line (phone, a long tag) also ends on the right */
.xb.pri.cs-dfill { background: var(--rose); color: #fff !important; }
@media (max-width: 760px) {
  .cs-grid { grid-template-columns: 1fr; }
  .cs-page .x-views { padding-right: 28px; -webkit-mask-image: linear-gradient(90deg, #000 calc(100% - 36px), transparent); mask-image: linear-gradient(90deg, #000 calc(100% - 36px), transparent); }   /* more tabs to the right */
  .cs-sheet .x-sb2 > .x-side2 { order: 2; }   /* a flag: what matched and Decide come first on a phone, the person after */
  .cs-sheet .x-box-h { flex-wrap: wrap; row-gap: 8px; }
  .cs-sheet .x-box-h .cs-boxs { flex: 1 1 60%; min-width: 0; }
  .cs-sheet .x-box-h .x-sp { display: none; }
  .cs-sheet .x-box-h .xb { flex: 1 1 100%; justify-content: center; }
  .x-cm.cs-hit .x-cmh { flex-wrap: wrap; row-gap: 4px; }
  .x-grid .x-r > span.cs-mw { order: 2; flex-basis: auto; }
  .cs-tom { display: inline; margin-left: 4px; }
  .cs-match .row { flex-wrap: wrap; row-gap: 4px; }
  .cs-match .row .x-sp { display: none; }
  .cs-match .row .cs-cat { flex-basis: 100%; }
}
