/* Rockford beta. SVC Fintech palette (svc-logo.png and the govfunds SVC concept): charcoal ink,
   and the logo's three slashes, green / aqua / teal; teal is the action colour.
   Every colour is a token: light below, dark in the two blocks after it (system setting, or
   the header toggle, which sets <html data-theme>). */
:root {
  --bg: #f5f7f8;
  --panel: #ffffff;
  --panel-2: #f8fafb;      /* table heads, sidebar */
  --hover: #f2f7f8;
  --ink: #323335;
  --ink-2: #3d4650;        /* form labels */
  --muted: #5d666b;
  --line: #dce3e5;
  --line-2: #edf1f3;       /* row rules */
  --input: #ffffff;
  --input-line: #cdd5da;
  --pill: #eef1f3;
  --brand-2: #146270;      /* links */
  --accent: #1b7b8a;
  --accent-dark: #146270;
  --accent-soft: #e8f3f5;
  --accent-line: #b9dbe1;
  --accent-ink: #0f5560;
  --focus: #9fd0d8;
  --svc-green: #7ab648;
  --svc-aqua: #2bb5a9;
  --svc-teal: #1b7b8a;
  --warn: #8a5a00;
  --warn-soft: #fff7e6;
  --warn-line: #f1dfbd;
  --danger: #b4232c;
  --danger-soft: #fdecec;
  --danger-line: #f3c2c5;
  --danger-ink: #7c1219;
  --info-soft: #eef5fc;
  --info-line: #d3e4f5;
  --info-ink: #24486e;
  --violet-soft: #f0eaff;
  --violet-line: #ddd0fb;
  --violet-ink: #4b2f99;
  --ok-soft: #ecf6e4; --ok-line: #c3e0ab; --ok-ink: #2f5d12;   /* training: passed, practice strip (logo green) */
  --st-open-bg: #e3effc;   --st-open-ink: #154e8a;
  --st-wait-bg: #fff3dc;   --st-wait-ink: #8a4a00;
  --st-done-bg: #e8f5ec;   --st-done-ink: #23683a;
  --note: #fff7e6;
  --note-edge: #e7b65c;
  --rnote: #eaf5f2;
  --comment: #edf4fb;
  --comment-edge: #6aa5e0;
  --tl-edge: #c7d0db;
  --temp: #fff8db;
  --temp-line: #ecd98a;
  --shadow: 0 1px 2px rgba(20, 40, 50, .06), 0 1px 1px rgba(20, 40, 50, .04);
  --radius: 10px;
  --stripe: linear-gradient(90deg, var(--svc-green) 0 33.3%, var(--svc-aqua) 33.3% 66.6%, var(--svc-teal) 66.6% 100%);
  --logo: url("svc-logo.png");
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #14191b; --panel: #1c2326; --panel-2: #192023; --hover: #222b2f;
    --ink: #e6eaeb; --ink-2: #c9d1d4; --muted: #9aa6ab; --line: #2e383c; --line-2: #263034;
    --input: #151b1e; --input-line: #3a464b; --pill: #2a3438;
    --brand-2: #6fc3cf; --accent: #2a9aaa; --accent-dark: #4fb3c2; --accent-soft: #17343a; --accent-line: #24545c; --accent-ink: #9fdbe3; --focus: #2f7d88;
    --warn: #f0c27a; --warn-soft: #2e2615; --warn-line: #4d3f1f;
    --danger: #ff8a8f; --danger-soft: #3a1c1e; --danger-line: #5c2a2e; --danger-ink: #ffb7ba;
    --info-soft: #162533; --info-line: #23384d; --info-ink: #a9c9ea;
    --violet-soft: #241d38; --violet-line: #3a2f5c; --violet-ink: #c9b8ff;
    --ok-soft: #1b2a14; --ok-line: #34501f; --ok-ink: #b5dc92;
    --st-open-bg: #1b3149; --st-open-ink: #a7cbf2; --st-wait-bg: #3a2c12; --st-wait-ink: #f4c983; --st-done-bg: #18321f; --st-done-ink: #9fd8ae;
    --note: #2a2414; --note-edge: #b88a35; --rnote: #15302b; --comment: #172636; --comment-edge: #4f86bf; --tl-edge: #3d484d;
    --temp: #2e2814; --temp-line: #5b4d22;
    --shadow: 0 1px 2px rgba(0, 0, 0, .35);
    --logo: url("svc-logo-dark.png");
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #14191b; --panel: #1c2326; --panel-2: #192023; --hover: #222b2f;
  --ink: #e6eaeb; --ink-2: #c9d1d4; --muted: #9aa6ab; --line: #2e383c; --line-2: #263034;
  --input: #151b1e; --input-line: #3a464b; --pill: #2a3438;
  --brand-2: #6fc3cf; --accent: #2a9aaa; --accent-dark: #4fb3c2; --accent-soft: #17343a; --accent-line: #24545c; --accent-ink: #9fdbe3; --focus: #2f7d88;
  --warn: #f0c27a; --warn-soft: #2e2615; --warn-line: #4d3f1f;
  --danger: #ff8a8f; --danger-soft: #3a1c1e; --danger-line: #5c2a2e; --danger-ink: #ffb7ba;
  --info-soft: #162533; --info-line: #23384d; --info-ink: #a9c9ea;
  --violet-soft: #241d38; --violet-line: #3a2f5c; --violet-ink: #c9b8ff;
  --ok-soft: #1b2a14; --ok-line: #34501f; --ok-ink: #b5dc92;
  --st-open-bg: #1b3149; --st-open-ink: #a7cbf2; --st-wait-bg: #3a2c12; --st-wait-ink: #f4c983; --st-done-bg: #18321f; --st-done-ink: #9fd8ae;
  --note: #2a2414; --note-edge: #b88a35; --rnote: #15302b; --comment: #172636; --comment-edge: #4f86bf; --tl-edge: #3d484d;
  --temp: #2e2814; --temp-line: #5b4d22;
  --shadow: 0 1px 2px rgba(0, 0, 0, .35);
  --logo: url("svc-logo-dark.png");
  color-scheme: dark;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }   /* label/div display rules must never un-hide a hidden field */
html, body { margin: 0; }
body { background: var(--bg); color: var(--ink); font: 14px/1.45 Roboto, -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif; }
a { color: var(--brand-2); text-decoration: none; }
a:hover { text-decoration: underline; }
h1 { font-size: 21px; margin: 0; letter-spacing: -.01em; font-weight: 700; color: var(--ink); }
h3 { font-size: 13px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); margin: 0 0 10px; font-weight: 650; }
h3 em, summary em, .side em { font-style: normal; font-weight: 600; background: var(--pill); color: var(--muted); border-radius: 99px; padding: 0 7px; font-size: 11px; margin-left: 6px; }
.muted { color: var(--muted); }
.small { font-size: 12px; }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 13px; }
.warn { color: var(--warn); }

/* top bar: the SVC site's white header, with the logo's three slashes as a thin stripe */
.top { position: sticky; top: 0; z-index: 10; display: flex; align-items: center; gap: 18px; padding: 10px 20px 12px; background: var(--panel); color: var(--ink); border-bottom: 1px solid var(--line); }
.top::after { content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 3px; background: var(--stripe); }
.brand { display: flex; align-items: center; gap: 12px; color: var(--ink); }
.brand:hover { text-decoration: none; }
.logo { display: block; width: 84px; height: 28px; background: var(--logo) left center / contain no-repeat; }
.brand .sep { width: 1px; height: 28px; background: var(--line); }
.brand span { display: flex; flex-direction: column; line-height: 1.1; }
.brand b { font-size: 18px; font-weight: 700; letter-spacing: .01em; color: var(--ink); }
.brand small { font-size: 11px; color: var(--muted); }
.search { flex: 1; max-width: 560px; }
.search input { width: 100%; border: 1px solid var(--line); border-radius: 8px; padding: 9px 12px; font-size: 14px; background: var(--panel-2); color: var(--ink); margin: 0; }
.search input::placeholder { color: var(--muted); }
.search input:focus { outline: 2px solid var(--focus); background: var(--input); border-color: var(--accent); }
.me { width: 32px; height: 32px; border-radius: 50%; background: var(--accent); color: #fff; display: grid; place-items: center; font-weight: 700; flex-shrink: 0; }
.iconbtn { width: 34px; height: 34px; display: grid; place-items: center; border-radius: 8px; border: 1px solid var(--line); background: var(--panel); color: var(--ink); cursor: pointer; font-size: 16px; line-height: 1; padding: 0; }
.iconbtn:hover { background: var(--accent-soft); border-color: var(--accent-line); text-decoration: none; }
.iconbtn svg { width: 17px; height: 17px; }
.theme-dark-icon { display: none; }
:root[data-theme="dark"] .theme-dark-icon { display: block; }
:root[data-theme="dark"] .theme-light-icon { display: none; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .theme-dark-icon { display: block; }
  :root:not([data-theme="light"]) .theme-light-icon { display: none; }
}
.beta { background: var(--warn-soft); color: var(--warn); font-size: 12px; padding: 6px 20px; border-bottom: 1px solid var(--warn-line); margin-top: 2px; }

/* layout */
.shell { display: grid; grid-template-columns: 220px minmax(0, 1fr); min-height: calc(100vh - 86px); }
.side { padding: 18px 12px; border-right: 1px solid var(--line); background: var(--panel-2); }
/* The nav stays put while the page scrolls: it sticks under the header (whose height app.js measures into
   --top-h) and scrolls on its own if it is taller than the window. */
.side { position: sticky; top: var(--top-h, 64px); align-self: start; height: calc(100vh - var(--top-h, 64px)); overflow-y: auto; overscroll-behavior: contain; }
.side h4 { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--accent);   /* the logo teal; lighter teal in dark mode */ margin: 16px 8px 6px; }
.side h4:first-child { margin-top: 0; }
.navgroup summary { list-style: none; display: flex; align-items: center; gap: 6px; cursor: pointer; border-radius: 6px; margin: 16px 0 6px; padding: 2px 8px; user-select: none; }
.navgroup summary::-webkit-details-marker { display: none; }
.navgroup summary h4 { margin: 0; }                       /* lines up with the VIEWS heading */
.navgroup summary em { margin-left: auto; }
.navgroup summary::after { content: "▸"; color: var(--muted); font-size: 15px; line-height: 1; width: 14px; text-align: center; transition: transform .15s; }
.navgroup summary:not(:has(em))::after { margin-left: auto; }
.navgroup[open] summary::after { transform: rotate(90deg); }
.navgroup[open] summary em { display: none; }
.navgroup[open] summary::after { margin-left: auto; }
.navgroup summary:hover { background: var(--hover); }
.side > .navgroup:first-child summary { margin-top: 0; }
.navgroup summary em.hotem { background: var(--danger); color: #fff; }
/* ☰ hides the menu on wide screens (remembered in the cg_nav cookie, so the page loads that way) and opens it as a
   slide-over panel on narrow ones. */
.navbtn { flex: none; margin-right: -6px; }
.navbtn svg { width: 20px; height: 20px; }
body.nav-hidden .shell { grid-template-columns: minmax(0, 1fr); }
body.nav-hidden .side { display: none; }
.navscrim { position: fixed; inset: var(--top-h, 64px) 0 0 0; background: rgba(0, 0, 0, .35); z-index: 8; }
.side a { display: flex; justify-content: space-between; align-items: center; padding: 6px 8px; border-radius: 6px; color: var(--ink); }
.side a:hover { background: var(--hover); text-decoration: none; }
.side a.on { background: var(--accent-soft); color: var(--accent-ink); font-weight: 600; box-shadow: inset 3px 0 0 var(--accent); }
main { padding: 20px 24px 60px; min-width: 0; }
.head { display: flex; align-items: baseline; gap: 12px; margin-bottom: 14px; flex-wrap: wrap; }
.count { color: var(--muted); }
.crumbs { color: var(--muted); font-size: 12px; margin-bottom: 6px; }
.hint { background: var(--info-soft); border: 1px solid var(--info-line); padding: 8px 12px; border-radius: 8px; color: var(--info-ink); }
.flash { background: var(--accent-soft); border: 1px solid var(--accent-line); color: var(--accent-ink); padding: 8px 12px; border-radius: 8px; margin-bottom: 14px; }
.alert { background: var(--danger-soft); border: 1px solid var(--danger-line); color: var(--danger-ink); padding: 10px 14px; border-radius: 8px; margin-bottom: 14px; }
.alert ul { margin: 4px 0 0; padding-left: 18px; }
.alert.info { background: var(--ok-soft); border-color: var(--ok-line); color: var(--ok-ink); }
.empty { color: var(--muted); padding: 30px; text-align: center; background: var(--panel); border-radius: var(--radius); border: 1px solid var(--line); }

/* buttons, forms */
.btn { display: inline-block; border: 1px solid var(--line); background: var(--panel); color: var(--ink); padding: 8px 14px; border-radius: 8px; font-weight: 600; cursor: pointer; font-size: 14px; font-family: inherit; }
.btn:hover { text-decoration: none; background: var(--hover); }
.btn.primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn.primary:hover { background: var(--accent-dark); border-color: var(--accent-dark); }
.btn.wide { width: 100%; margin-top: 12px; padding: 11px; }
.btn.small { padding: 4px 9px; font-size: 12px; font-weight: 600; }
label { display: block; font-weight: 600; font-size: 12.5px; color: var(--ink-2); margin-bottom: 10px; }
label.check { display: flex; align-items: center; gap: 8px; font-weight: 500; font-size: 14px; color: var(--ink); margin-bottom: 6px; }
input, select, textarea { font: inherit; color: var(--ink); accent-color: var(--accent); }
input:not([type=checkbox]):not([type=radio]), select, textarea { display: block; width: 100%; margin-top: 4px; padding: 8px 10px; border: 1px solid var(--input-line); border-radius: 7px; background: var(--input); font-weight: 400; }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--focus); border-color: var(--accent); }
textarea { resize: vertical; min-height: 90px; }
.narrow { max-width: 110px; display: inline-block !important; }
.inline { display: flex; gap: 8px; align-items: end; }
.inline select.narrow { max-width: 210px; }
fieldset { border: 0; padding: 0; margin: 0 0 10px; }
legend { font-weight: 600; font-size: 12.5px; color: var(--ink-2); margin-bottom: 6px; padding: 0; }
.req { color: var(--danger); }
.grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 16px; }
.span2 { grid-column: span 2; }

/* cards and columns */
.card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; margin-bottom: 14px; box-shadow: var(--shadow); }
.cols { display: grid; grid-template-columns: minmax(0, 1fr) 330px; gap: 16px; align-items: start; }
.cols.even { grid-template-columns: 1fr 1fr; margin-top: 16px; }
.sticky { position: sticky; top: calc(var(--top-h, 64px) + 12px); }
dl { display: grid; grid-template-columns: 105px minmax(0, 1fr); gap: 6px 10px; margin: 0; }
dt { color: var(--muted); font-size: 12.5px; }
dd { margin: 0; overflow-wrap: anywhere; }

/* filter bar */
.filters { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 14px 4px; margin-bottom: 12px; box-shadow: var(--shadow); }
.filters .frow { display: flex; flex-wrap: wrap; gap: 4px 12px; align-items: end; }
.filters label { margin-bottom: 8px; font-size: 11.5px; color: var(--muted); }
.filters select, .filters input[type=date] { width: auto; min-width: 130px; max-width: 220px; padding: 6px 8px; font-size: 13px; }
.filters input[type=date] { min-width: 0; }
.filters label.check { font-size: 13px; color: var(--ink); margin-bottom: 14px; }
.filters .factions { display: flex; gap: 8px; align-items: center; margin: 0 0 8px auto; }
.filters .on-count { background: var(--accent); color: #fff; border-radius: 99px; padding: 0 7px; font-size: 11px; font-weight: 700; margin-left: 4px; }
.filters details summary { cursor: pointer; font-size: 12.5px; font-weight: 600; color: var(--brand-2); margin: 2px 0 8px; }
.fpanel > summary { list-style: none; display: flex; align-items: center; gap: 6px; cursor: pointer; user-select: none; font-size: 12.5px; font-weight: 600; color: var(--brand-2); margin: 0 0 8px; }
.fpanel > summary::-webkit-details-marker { display: none; }
.fpanel > summary::before { content: "▸"; color: var(--muted); font-size: 14px; width: 12px; transition: transform .15s; }
.fpanel[open] > summary::before { transform: rotate(90deg); }
.fpanel[open] > summary em { display: none; }        /* the chips below say which filters are on */
.quick { display: flex; gap: 10px; align-items: center; margin: 0 0 8px; }
.quick input { max-width: 320px; margin: 0; padding: 7px 10px; font-size: 13px; }
.quick span { color: var(--muted); font-size: 12px; }
.fchips { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 10px; }
.fchip { background: var(--accent-soft); color: var(--accent-ink); border: 1px solid var(--accent-line); border-radius: 99px; padding: 2px 4px 2px 10px; font-size: 12px; display: inline-flex; gap: 6px; align-items: center; }
.fchip a { color: inherit; font-weight: 700; padding: 0 5px; border-radius: 99px; }
.fchip a:hover { background: var(--accent-line); text-decoration: none; }

/* ticket table */
.tablewrap { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); overflow-x: auto; box-shadow: var(--shadow); }
table { width: 100%; border-collapse: collapse; }
th { text-align: left; font-size: 12px; color: var(--muted); font-weight: 650; padding: 9px 10px; border-bottom: 1px solid var(--line); background: var(--panel-2); white-space: nowrap; position: sticky; top: 0; }
td { padding: 9px 10px; border-bottom: 1px solid var(--line-2); vertical-align: top; }
tbody tr:last-child td { border-bottom: 0; }
table.tickets tbody tr { cursor: pointer; }
table.tickets tbody tr:hover { background: var(--hover); }
td.subj { min-width: 240px; }
table.tickets td:nth-child(n+5), table.tickets td:first-child { white-space: nowrap; }
td.subj small { display: block; color: var(--muted); font-size: 11.5px; }
table.compact td, table.compact th { padding: 6px 8px; }
table.sortable th { cursor: pointer; user-select: none; }
table.sortable th::after { content: ""; margin-left: 4px; color: var(--accent); }
table.sortable th.sorted-asc::after { content: "▲"; font-size: 9px; }
table.sortable th.sorted-desc::after { content: "▼"; font-size: 9px; }
.badge { display: inline-block; font-size: 11.5px; font-weight: 650; padding: 2px 8px; border-radius: 99px; background: var(--pill); color: var(--muted); white-space: nowrap; }
.st-new, .st-open { background: var(--st-open-bg); color: var(--st-open-ink); }
.st-in-progress, .st-pending, .st-on-hold, .st-info-requested { background: var(--st-wait-bg); color: var(--st-wait-ink); }
.st-solved, .st-closed { background: var(--st-done-bg); color: var(--st-done-ink); }
.pr-emergency, .pr-urgent { background: var(--danger-soft); color: var(--danger); }
.pr-high { background: var(--st-wait-bg); color: var(--st-wait-ink); }
.tag { display: inline-block; font-size: 10.5px; font-weight: 700; padding: 1px 6px; border-radius: 4px; margin-left: 6px; text-transform: uppercase; letter-spacing: .03em; vertical-align: 1px; }
.tag.new { background: var(--accent-soft); color: var(--accent-ink); }
.tag.cont { background: var(--violet-soft); color: var(--violet-ink); }
.tag.src { background: var(--pill); color: var(--muted); }
.flag.esc { color: var(--danger); margin-right: 6px; font-size: 12px; }

/* ticket page */
.tickethead { display: flex; justify-content: space-between; gap: 16px; align-items: start; margin-bottom: 16px; }
.tickethead .meta { color: var(--muted); margin-top: 4px; }
.badges { display: flex; gap: 6px; flex-shrink: 0; }
.timeline { list-style: none; margin: 0 0 14px; padding: 0; }
.timeline li { background: var(--panel); border: 1px solid var(--line); border-left: 4px solid var(--tl-edge); border-radius: 8px; padding: 12px 14px; margin-bottom: 10px; box-shadow: var(--shadow); }
.timeline .tl-desc { border-left-color: var(--svc-teal); }
.timeline .tl-comment { border-left-color: var(--comment-edge); background: var(--comment); }
.timeline .tl-note { border-left-color: var(--note-edge); background: var(--note); }
.timeline .tl-rnote { border-left-color: var(--svc-aqua); background: var(--rnote); }
/* Feature note #31: what came from outside (cardholder emails, web forms, replies) vs what staff sent */
.timeline li.inbound { border-left-color: var(--info-ink); background: var(--info-soft); }
.timeline li.outbound { border-left-color: var(--violet-ink); background: var(--violet-soft); }
.tl-head .tag.ext { background: var(--info-ink); color: var(--panel); font-size: 11px; }
.tl-head .tag.staff { background: transparent; border: 1px solid var(--line); color: var(--muted); font-size: 11px; }
.tl-head { display: flex; gap: 8px; align-items: baseline; flex-wrap: wrap; margin-bottom: 6px; }
.tl-kind { color: var(--muted); font-size: 12px; }
.tl-head time { margin-left: auto; color: var(--muted); font-size: 12px; }
.tl-body { overflow-wrap: anywhere; }
/* Edit / Remove / History under a Concierge note, for supervisors and up (feature note #3) */
.noteadmin { display: flex; flex-wrap: wrap; gap: 4px 14px; margin-top: 8px; padding-top: 6px; border-top: 1px dashed var(--line); font-size: 12.5px; }
.noteadmin details { flex: 0 1 auto; }
.noteadmin details[open] { flex-basis: 100%; }
.noteadmin summary { cursor: pointer; color: var(--brand-2); font-weight: 600; }
.noteadmin form { margin: 6px 0 2px; }
.noteadmin textarea { width: 100%; box-sizing: border-box; font: inherit; font-size: 14px; margin-bottom: 6px; }
.noterevs { margin: 6px 0 0; padding-left: 18px; }
.noterevs li { margin-bottom: 6px; }
.timeline li.removed { opacity: .75; border-left-style: dashed; }
.notetext summary { cursor: pointer; color: var(--muted); font-size: 12.5px; }
.noteform .row { display: flex; gap: 16px; align-items: center; flex-wrap: wrap; margin-top: 10px; }
.noteform .row label { margin: 0; }
.noteform .row .btn { margin-left: auto; }
.events summary { cursor: pointer; font-weight: 650; color: var(--muted); font-size: 13px; text-transform: uppercase; letter-spacing: .05em; }
.events table { margin-top: 10px; font-size: 13px; }
.hist, .files { list-style: none; margin: 0; padding: 0; }
.hist li { display: grid; grid-template-columns: auto auto 1fr; gap: 2px 8px; align-items: center; padding: 7px 0; border-bottom: 1px solid var(--line-2); }
.hist li span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hist li small { grid-column: 1 / -1; color: var(--muted); }
.files li { padding: 6px 0; border-bottom: 1px solid var(--line-2); overflow-wrap: anywhere; }
.files small { display: block; color: var(--muted); }

/* new ticket */
.dispos { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0 12px; }
.help { background: var(--panel-2); border: 1px solid var(--line-2); border-radius: 8px; padding: 8px 12px; color: var(--ink-2); margin: 0 0 10px; }
.rule { border: 1px solid var(--accent-line); background: var(--accent-soft); border-radius: 8px; padding: 8px 12px; margin-bottom: 12px; color: var(--accent-ink); }
.rule .esc { color: var(--danger); font-weight: 700; }
.repeat { background: var(--violet-soft); border: 1px solid var(--violet-line); border-radius: 8px; padding: 10px 12px; margin-bottom: 12px; color: var(--violet-ink); font-weight: 400; }
.repeat ul { margin: 6px 0 0; padding-left: 18px; }

/* dashboard */
.tiles { display: grid; grid-template-columns: repeat(5, 1fr); gap: 12px; margin-bottom: 14px; }
.tile { background: var(--panel); border: 1px solid var(--line); border-top: 3px solid var(--accent); border-radius: var(--radius); padding: 14px 16px; box-shadow: var(--shadow); }
.tile b { display: block; font-size: 26px; color: var(--accent-dark); }
.tile span { color: var(--muted); }
.bars { display: grid; grid-template-columns: repeat(14, 1fr); gap: 6px; height: 180px; align-items: end; }
.bar { display: flex; flex-direction: column; align-items: center; justify-content: end; height: 100%; font-size: 11px; color: var(--muted); }
.bar i { display: block; width: 100%; height: var(--h); min-height: 2px; background: linear-gradient(var(--svc-aqua), var(--svc-teal)); border-radius: 4px 4px 0 0; order: 2; }
.bar b { order: 1; color: var(--ink); font-weight: 600; }
.bar span { order: 3; margin-top: 4px; white-space: nowrap; }
.hbars { list-style: none; margin: 0; padding: 0; }
.hbars li { display: grid; grid-template-columns: 170px 1fr 40px; gap: 8px; align-items: center; padding: 4px 0; }
.hbars span, .hbars a { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hbars i { display: block; height: 12px; width: var(--w); background: var(--accent); border-radius: 3px; }
.hbars b { text-align: right; }

/* signed-in user */
.who { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.whoname { display: flex; flex-direction: column; line-height: 1.15; font-weight: 600; font-size: 13px; }
.whoname small { font-weight: 400; color: var(--muted); font-size: 11px; }
.who form { margin: 0; }
.signout { background: var(--panel); border: 1px solid var(--line); color: var(--ink); border-radius: 7px; padding: 7px 10px; font: inherit; font-size: 12.5px; cursor: pointer; }
.signout:hover { background: var(--accent-soft); border-color: var(--accent-line); }
.inlineform { display: inline-block; margin: 0 4px 4px 0; }
.inlineform select { margin: 0; padding: 4px 6px; width: auto; }
td.actions { white-space: nowrap; }
.tempbox { background: var(--temp); border: 1px solid var(--temp-line); border-radius: 10px; padding: 12px 16px; margin-bottom: 14px; display: grid; gap: 6px; }
code.secret { font: 600 18px/1.3 ui-monospace, SFMono-Regular, Menlo, monospace; letter-spacing: .06em; background: var(--input); color: var(--ink); border: 1px dashed var(--temp-line); border-radius: 6px; padding: 6px 10px; display: inline-block; user-select: all; }

/* help page (FEATURES.md) */
.helpdoc { max-width: 860px; }
.helpdoc h1 { margin-bottom: 6px; }
.helpdoc h2 { font-size: 17px; margin: 26px 0 8px; padding-top: 14px; border-top: 1px solid var(--line); }
.helpdoc h3 { margin-top: 18px; }
.helpdoc p, .helpdoc li { line-height: 1.6; }
.helpdoc ul, .helpdoc ol { padding-left: 22px; }
.helpdoc table { margin: 8px 0 14px; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; }
.helpdoc td, .helpdoc th { font-size: 13.5px; }
.helpdoc code { background: var(--pill); border-radius: 4px; padding: 1px 5px; font-size: 12.5px; }
.helpdoc .toc { columns: 2; font-size: 13.5px; }

/* tags: Mojo's colours, but labelled (Mojo shows unlabelled colour bars) */
.chips { display: flex; flex-wrap: wrap; gap: 4px; margin-bottom: 3px; }
.chip { display: inline-flex; align-items: center; gap: 3px; font-size: 10.5px; font-weight: 700; line-height: 1; padding: 3px 7px; border-radius: 99px; white-space: nowrap; letter-spacing: .01em; }
a.chip:hover { text-decoration: none; filter: brightness(.95); }
.chip.auto { outline: 1px dashed rgba(0,0,0,.3); outline-offset: -1px; }
.tickethead .chips { margin: 6px 0 0; }
.tickethead .chip { font-size: 11.5px; padding: 4px 9px; }

/* sign-in card, after StarView's showLogin.tpl */
body.authpage { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 24px 16px;
  background: linear-gradient(135deg, #146270 0%, #1b7b8a 40%, #2bb5a9 75%, #7ab648 100%); }
:root[data-theme="dark"] body.authpage { background: linear-gradient(135deg, #0b2f35 0%, #0f4048 45%, #145a55 75%, #34531f 100%); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) body.authpage { background: linear-gradient(135deg, #0b2f35 0%, #0f4048 45%, #145a55 75%, #34531f 100%); } }
.authcard { position: relative; overflow: hidden; background: var(--panel); width: 100%; max-width: 380px; padding: 32px 34px 24px; border-radius: 12px; box-shadow: 0 14px 34px rgba(0,0,0,.28); }
.authcard::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 4px; background: var(--stripe); }
.authlogo { display: block; margin: 0 auto 12px; width: 121px; height: 40px; background: var(--logo) center / contain no-repeat; }
.authcard h1 { text-align: center; color: var(--ink); font-size: 24px; margin: 0 0 2px; }
.authcard .subtitle { text-align: center; color: var(--muted); font-size: 13px; margin: 0 0 20px; }
.authcard label { font-size: 13px; color: var(--ink-2); margin: 12px 0 5px; }
.authcard input[type=submit] { display: block; width: 100%; margin-top: 20px; padding: 11px; font: 700 14px/1 inherit; color: #fff; background: var(--accent); border: 0; border-radius: 7px; cursor: pointer; }
.authcard input[type=submit]:hover { background: var(--accent-dark); }
.authcard .pw { position: relative; display: block; }
.authcard .pw input { padding-right: 40px; }
.authcard .eye { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); margin-top: 2px; border: 0; background: transparent; cursor: pointer; font-size: 16px; opacity: .7; }
.auththeme { position: absolute; top: 12px; right: 12px; }
.autherr { color: var(--danger-ink); background: var(--danger-soft); border: 1px solid var(--danger-line); border-radius: 6px; padding: 8px 10px; margin: 0 0 8px; font-size: 13px; }
.authnote { color: var(--accent-ink); background: var(--accent-soft); border: 1px solid var(--accent-line); border-radius: 6px; padding: 8px 10px; margin: 0 0 8px; font-size: 13px; }
.authtext { font-size: 13.5px; color: var(--ink-2); margin: 0 0 6px; }
.authhint { font-size: 12px; color: var(--muted); margin: 12px 0 0; text-align: center; }
.authsteps { padding-left: 18px; margin: 8px 0; font-size: 13.5px; }
.authsteps li { margin-bottom: 8px; }
.authsteps code.secret { font-size: 14px; margin-top: 4px; word-break: break-all; }
.btnlink { display: inline-block; background: var(--accent-soft); color: var(--accent-ink); border: 1px solid var(--accent-line); border-radius: 6px; padding: 6px 10px; font-weight: 600; }
.authcancel { margin: 14px 0 0; text-align: center; }
.authcancel button { background: none; border: 0; color: var(--brand-2); cursor: pointer; font: inherit; font-size: 12.5px; }

@media (max-width: 1000px) {
  .shell, body.nav-hidden .shell { grid-template-columns: 1fr; }
  /* align-self back to auto: Chrome aligns a fixed grid child by it, and "start" pinned the panel under the header */
  .side, body.nav-hidden .side { display: block; position: fixed; align-self: auto; top: var(--top-h, 64px); left: 0; bottom: 0; height: auto; width: 280px; max-width: 85vw;
    z-index: 9; transform: translateX(-100%); visibility: hidden; transition: transform .2s ease, visibility .2s; box-shadow: var(--shadow); }
  body.nav-open .side { transform: none; visibility: visible; }
  .cols, .cols.even { grid-template-columns: 1fr; }
  .tiles { grid-template-columns: repeat(2, 1fr); }
  .sticky { position: static; }
  .whoname { display: none; }
}
@media (max-width: 640px) {
  .top { flex-wrap: wrap; padding: 10px 16px; }
  .search { order: 3; flex-basis: 100%; max-width: none; }
  main { padding: 16px; }
  .grid, .dispos { grid-template-columns: 1fr; }
  .span2 { grid-column: auto; }
  .tickethead { flex-direction: column; }
  .brand small, .brand .sep { display: none; }
  .filters select { max-width: none; flex: 1 1 140px; }
  .helpdoc .toc { columns: 1; }
}

/* time spent + call timer */
.timefield { margin-bottom: 10px; }
.timefield label { margin-bottom: 0; }
.timerow { display: flex; gap: 8px; align-items: center; margin-top: 4px; flex-wrap: wrap; }
.timerow input.timeinput { width: 96px; margin: 0; text-align: center; font-size: 15px; }
.timerbtn { min-width: 118px; }
.timerbtn.running { background: var(--danger-soft); color: var(--danger); border-color: var(--danger-line); }
.timerbtn.running::before { content: ""; display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--danger); margin-right: 6px; vertical-align: 1px; animation: blink 1.2s infinite; }
@keyframes blink { 50% { opacity: .25; } }
.timefield.running input.timeinput { border-color: var(--danger-line); color: var(--danger); font-weight: 600; }
.timefield small { display: block; margin-top: 4px; }
.linkbtn { background: none; border: 0; color: var(--brand-2); cursor: pointer; font: inherit; font-size: 12.5px; padding: 0 4px; }
.noteform .row .timefield { margin: 0; }

/* new-ticket call bar: first on the page and kept in view while the form scrolls */
.timefield.callbar { position: sticky; top: calc(var(--top-h, 64px) + 6px); z-index: 5; display: flex; align-items: center; gap: 6px 14px; flex-wrap: wrap;
  background: var(--panel); border: 1px solid var(--line); border-left: 4px solid var(--accent); border-radius: var(--radius); padding: 10px 14px; margin-bottom: 14px; box-shadow: var(--shadow); }
.timefield.callbar label { font-size: 13px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); }
.timefield.callbar .timerow { margin-top: 0; }
.timefield.callbar input.timeinput { width: 110px; font-size: 20px; padding: 6px 8px; }
.timefield.callbar small { margin: 0; flex: 1 1 260px; }
.timefield.callbar.running { border-left-color: var(--danger); }
.timefield.callbar { position: sticky; overflow: hidden; }
.callprog { position: absolute; left: 0; right: 0; bottom: 0; height: 4px; background: var(--line-2); }
.callprog i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--svc-aqua), var(--svc-teal)); transition: width 1s linear, background-color .3s; }
.callprog.over i { background: #e0a030; }
.callprog.long i { background: var(--danger); }
.callprog.paused i { background: var(--muted); opacity: .55; }
@media (prefers-reduced-motion: reduce) { .callprog i, .side, .navgroup summary::after { transition: none; } }

/* agents area */
.tiles.six { grid-template-columns: repeat(6, 1fr); }
a.tile { color: inherit; }
a.tile:hover { text-decoration: none; border-color: var(--accent-line); background: var(--hover); }
.tile span { font-size: 12.5px; }
@media (max-width: 1000px) { .tiles.six { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 640px) { .tiles.six { grid-template-columns: repeat(2, 1fr); } }

/* new-ticket form tabs and note tools */
.formtabs { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 12px; }
.formtabs a { padding: 7px 14px; border-radius: 99px; border: 1px solid var(--line); background: var(--panel); color: var(--ink); font-weight: 600; font-size: 13px; }
.formtabs a:hover { text-decoration: none; background: var(--hover); }
.formtabs a.on { background: var(--accent); border-color: var(--accent); color: #fff; }
.notetools { display: flex; gap: 10px; align-items: baseline; margin: -4px 0 6px; }
.ini { display: inline-grid; place-items: center; min-width: 26px; height: 22px; padding: 0 5px; border-radius: 6px; background: var(--accent-soft); color: var(--accent-ink); font-size: 11px; font-weight: 700; letter-spacing: .03em; }
.alertpill { background: var(--danger); color: #fff; font-weight: 700; font-size: 12.5px; padding: 7px 12px; border-radius: 99px; white-space: nowrap; }
.alertpill:hover { text-decoration: none; filter: brightness(1.08); }
.side a.hot { color: var(--danger); font-weight: 700; }
.side a.hot em { background: var(--danger); color: #fff; }
.side em.late { background: var(--danger-soft); color: var(--danger); }
a.late { color: var(--danger); font-weight: 700; }
.reasons li { grid-template-columns: 1fr; }
form[data-dispo-cascade] details summary { display: inline-block; margin: 6px 0 8px; list-style: none; }
form[data-dispo-cascade] details summary::-webkit-details-marker { display: none; }

/* ---- public web forms (forms/) ---- */
.pubcard { max-width: 620px; }
.pubcard h1 { margin-top: 4px; }
.pubcard label { margin: 10px 0 4px; }
.pubcard input:not([type=checkbox]):not([type=submit]), .pubcard select, .pubcard textarea { width: 100%; }
.pubcard .alert { font-size: 13.5px; }
.hp { position: absolute !important; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.fieldhelp { font-size: 12px; color: var(--muted); margin: 2px 0 6px; }
.grid3 { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 0 12px; }
fieldset.addr { border: 1px solid var(--line, #dde3ea); border-radius: 8px; padding: 4px 12px 8px; margin: 10px 0; }
fieldset.addr legend { font-size: 12.5px; font-weight: 600; color: var(--ink-2); padding: 0 4px; }
.formlist { list-style: none; padding: 0; margin: 8px 0 0; }
.formlist li { padding: 10px 0; border-top: 1px solid var(--line, #dde3ea); display: flex; flex-direction: column; gap: 2px; }
.formlist li span { font-size: 13px; color: var(--muted); }
.formlist li.later b { color: var(--muted); font-weight: 500; }
.refbox { text-align: center; font-size: 17px; background: var(--accent-soft); border: 1px solid var(--accent-line); color: var(--accent-ink); border-radius: 8px; padding: 12px; margin: 8px 0 14px; }
.pubfoot { text-align: center; font-size: 12px; color: var(--muted); margin: 20px 0 0; }
@media (max-width: 640px) { .grid3 { grid-template-columns: 1fr 1fr; } .pubcard .grid { grid-template-columns: 1fr; } }

/* Office closed notice (agents work 24/7; the Numi office doesn't) */
.officeclosed { background: var(--warn-soft); color: var(--warn); border-bottom: 1px solid var(--warn-line); padding: 6px 16px; font-size: 13px; }
.officeclosed a { color: inherit; text-decoration: underline; margin-left: 6px; }

/* Feature notes (lib/fnotes.php) */
.fnlink { display: inline-flex; align-items: center; gap: 2px; white-space: nowrap; }
@media (max-width: 900px) { .fnlink .fnlabel { display: none; } }
.fnchip { display: inline-block; font-size: 11px; font-weight: 700; padding: 2px 8px; border-radius: 99px; white-space: nowrap; background: var(--pill); color: var(--muted); }
.fn-feature_request { background: var(--accent-soft); color: var(--accent-ink); }
.fn-bug { background: var(--danger-soft); color: var(--danger); }
.fn-question { background: var(--violet-soft); color: var(--violet-ink); }
.fs-open { background: var(--st-open-bg); color: var(--st-open-ink); }
.fs-in_progress, .fs-on_hold { background: var(--st-wait-bg); color: var(--st-wait-ink); }
.fs-complete { background: var(--st-done-bg); color: var(--st-done-ink); }
.fnstar { color: #e0a100; }
.fndrop { border: 1.5px dashed var(--line); border-radius: 8px; padding: 10px; margin: 8px 0 12px; }
.fndrop.over { border-color: var(--accent); background: var(--accent-soft); }
.fndrop input[type=file] { max-width: 100%; }
.fnthumbs { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 6px; }
.fnthumbs span { position: relative; font-size: 12px; border: 1px solid var(--line); border-radius: 6px; padding: 3px; background: var(--panel); }
.fnthumbs img { display: block; height: 64px; max-width: 120px; object-fit: cover; border-radius: 4px; }
.fnthumbs button { position: absolute; top: -8px; right: -8px; width: 20px; height: 20px; border-radius: 50%; border: 1px solid var(--line); background: var(--panel); color: var(--muted); cursor: pointer; font-size: 12px; line-height: 1; padding: 0; }
.fnfiles { display: flex; flex-wrap: wrap; gap: 10px; align-items: flex-start; }
.fnimg { display: block; max-width: 100%; }
.fnimg img { display: block; width: auto; height: auto; max-height: 220px; max-width: 100%; border: 1px solid var(--line); border-radius: 6px; }
.fndoc { display: inline-block; border: 1px solid var(--line); border-radius: 6px; padding: 8px 12px; }
.fnbody { white-space: normal; overflow-wrap: anywhere; }
.fntable { overflow-x: auto; }
.fntable td:nth-child(2) { min-width: 160px; }
@media (max-width: 1000px) { .fncols aside { order: -1; } }
.fncols > * { min-width: 0; }

/* New ticket: details filled in from the cardholder's earlier tickets, until the agent changes them */
.newticket input.prefilled:not([type=checkbox]):not([type=radio]) { background: var(--violet-soft); border-color: var(--violet-line); }
.repeat .fillnote { margin: 8px 0 0; padding-top: 8px; border-top: 1px solid var(--violet-line); }
.repeat .fillnote .linkbtn { color: var(--brand-2); font-weight: 600; }

/* ---- Training (lib/training.php) ---- */
.trainquiet { background: var(--info-soft); border: 1px dashed var(--info-line); color: var(--info-ink); border-radius: 8px; padding: 6px 12px; font-size: 12.5px; margin: 0 0 12px; }
.trainhero { position: relative; overflow: hidden; display: grid; grid-template-columns: 1fr auto; gap: 20px; align-items: center; background: var(--panel); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 22px 20px 18px; box-shadow: var(--shadow); margin-bottom: 16px; }
.trainhero::before { content: ""; position: absolute; inset: 0 0 auto 0; height: 4px; background: var(--stripe); }
.trainhero h1 { margin: 0 0 6px; }
.trainhero p { margin: 0 0 10px; max-width: 60ch; }
.tprog { height: 10px; background: var(--pill); border-radius: 99px; overflow: hidden; max-width: 420px; }
.tprog i { display: block; height: 100%; background: linear-gradient(90deg, var(--svc-green), var(--svc-aqua), var(--svc-teal)); border-radius: 99px; }
.badgeshelf { display: grid; grid-template-columns: repeat(5, 40px); gap: 8px; }
.tbadge { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; font-size: 20px; background: var(--pill); filter: grayscale(1); opacity: .35; }
.tbadge.got { filter: none; opacity: 1; background: var(--ok-soft); box-shadow: 0 0 0 2px var(--ok-line); }
.tgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 12px; }
.tmod { display: flex; flex-direction: column; gap: 6px; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; color: var(--ink); box-shadow: var(--shadow); }
.tmod:hover { border-color: var(--accent-line); text-decoration: none; background: var(--hover); }
.tmod .tnum { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent-ink); font-weight: 700; font-size: 16px; }
.tmod.done { border-color: var(--ok-line); }
.tmod.done .tnum { background: var(--ok-soft); }
.tmod.locked { opacity: .65; }
.tmod .tmeta { margin-top: auto; font-size: 12.5px; font-weight: 600; color: var(--brand-2); }
.tmod.done .tmeta { color: var(--ok-ink); }
.tsteps { display: flex; gap: 8px; list-style: none; padding: 0; margin: 0 0 14px; flex-wrap: wrap; }
.tsteps a { display: inline-block; padding: 5px 12px; border-radius: 99px; background: var(--pill); color: var(--ink-2); font-weight: 600; font-size: 13px; }
.tsteps li.done a { background: var(--ok-soft); color: var(--ok-ink); }
.tsteps li.done a::after { content: " ✓"; }
.tcard { min-height: 150px; }
.tcard h4 { font-size: 18px; margin: 4px 0 10px; }
.tcard ul { padding-left: 20px; }
.tcard li { margin-bottom: 4px; }
.tcard .tip, .callscript .task { background: var(--accent-soft); border-left: 3px solid var(--accent); padding: 8px 12px; border-radius: 0 6px 6px 0; color: var(--accent-ink); }
.tcardnav { display: flex; gap: 8px; justify-content: flex-end; margin-top: 12px; }
.tcardnav form { margin: 0; }
.tpractice { list-style: none; padding: 0; margin: 0; }
.tpractice li { display: grid; grid-template-columns: 28px 1fr auto auto; gap: 10px; align-items: center; padding: 10px 0; border-top: 1px solid var(--line); }
.tpractice li:first-child { border-top: 0; }
.tquiz fieldset.tq, .tpform fieldset.tq { border: 1px solid var(--line); border-radius: 8px; padding: 10px 14px; margin: 0 0 10px; }
.tq legend { font-weight: 600; padding: 0 4px; }
.tq.right { border-color: var(--ok-line); background: var(--ok-soft); }
.tq.wrong { border-color: var(--danger-line); background: var(--danger-soft); }
.tq .why { margin: 6px 0 0; color: var(--ink-2); }
.tok { color: var(--ok-ink); font-weight: 700; }
.tno { color: var(--danger); font-weight: 700; }
.tspot { display: flex; gap: 10px; align-items: flex-start; border: 1px solid var(--line); border-radius: 8px; padding: 10px 12px; margin: 0 0 8px; }
.troute { padding-left: 20px; }
.troute li { display: grid; grid-template-columns: 1fr 220px; gap: 10px; align-items: center; padding: 6px 0; }
.troute select { margin-top: 0; }
.troutetime { font: 600 18px/1 ui-monospace, SFMono-Regular, Menlo, monospace; color: var(--accent-ink); }
.tresult.pass { border-color: var(--ok-line); border-top: 4px solid var(--svc-green); }
.tresult.fail { border-top: 4px solid var(--warn-line); }
.tchecks { list-style: none; padding: 0; margin: 0 0 10px; }
.tchecks li { display: grid; grid-template-columns: 24px 1fr; gap: 8px; padding: 7px 0; border-top: 1px solid var(--line); }
.tchecks li:first-child { border-top: 0; }
.tchecks li.ok > span { color: var(--ok-ink); font-weight: 700; }
.tchecks li.no > span { color: var(--danger); font-weight: 700; }
.practicestrip { background: var(--ok-soft); border: 1px solid var(--ok-line); color: var(--ok-ink); border-radius: 8px; padding: 8px 14px; margin-bottom: 12px; }
.callscript p { margin: 0 0 8px; }
.callscript .caller { background: var(--panel-2); border: 1px solid var(--line); border-radius: 12px 12px 12px 2px; padding: 8px 12px; max-width: 70ch; }
.callscript .aside { color: var(--muted); font-style: italic; padding-left: 4px; }
.newticket.practice .callbar { border-left-color: var(--svc-green); }
.tcert { max-width: 680px; margin: 10px auto; text-align: center; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 40px 30px;
  box-shadow: var(--shadow); border-top: 6px solid var(--svc-teal); }
.tcert-k { text-transform: uppercase; letter-spacing: .12em; font-size: 12px; color: var(--accent); font-weight: 700; }
.tcert h1 { font-size: 32px; margin: 8px 0 12px; }
.tcert-badges { font-size: 26px; letter-spacing: 6px; }
@media print { header.top, nav.side, .crumbs, .trainquiet, [data-print], .officeclosed { display: none !important; } .shell { display: block; } .tcert { box-shadow: none; border: 2px solid #1b7b8a; } }
@media (max-width: 700px) {
  .trainhero { grid-template-columns: 1fr; }
  .tpractice li { grid-template-columns: 28px 1fr; }
  .tpractice li .btn { grid-column: 2; justify-self: start; }
  .troute li { grid-template-columns: 1fr; }
}

/* ---- Training player: one step at a time (lib/training.php page_train_player) ---- */
.tplayer { max-width: 980px; }
.tptop { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-bottom: 8px; }
.tpbadge { font-size: 22px; vertical-align: -3px; }
.tpdone { margin-left: 8px; font-size: 12.5px; font-weight: 600; color: var(--ok-ink); background: var(--ok-soft); border-radius: 99px; padding: 2px 10px; }
.tpbar { height: 8px; background: var(--pill); border-radius: 99px; overflow: hidden; }
.tpbar i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--svc-green), var(--svc-aqua), var(--svc-teal)); border-radius: 99px; transition: width .3s; }
.tpbar.thin { height: 5px; margin: 6px 0 14px; }
.tpdots { display: flex; gap: 6px; list-style: none; padding: 0; margin: 10px 0 16px; flex-wrap: wrap; }
.tpdots button { width: 28px; height: 28px; border-radius: 50%; border: 1px solid var(--line); background: var(--panel); color: var(--muted); font: 600 12px/1 inherit; cursor: pointer; }
.tpdots button.seen { background: var(--ok-soft); border-color: var(--ok-line); color: var(--ok-ink); }
.tpdots button.on { background: var(--accent); border-color: var(--accent); color: #fff; }
.tpstep { background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 22px 24px; box-shadow: var(--shadow); min-height: 340px; }
.tpstep h2 { margin: 0 0 6px; font-size: 22px; }
.tplead { color: var(--ink-2); margin: 0 0 16px; max-width: 70ch; font-size: 15px; }
.tpchecklist { list-style: none; padding: 0; margin: 14px 0 0; display: grid; gap: 10px; }
.tpchecklist li { background: var(--accent-soft); color: var(--accent-ink); border-radius: 10px; padding: 12px 14px; font-weight: 600; }
.tpchecklist li::before { content: "→ "; }
.tpnav { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-top: 14px; }
.tpnav .btn[disabled] { opacity: .45; cursor: not-allowed; }
.tpkeys { text-align: center; margin-top: 6px; }
/* tours */
.tptour { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 18px; align-items: start; }
.tmock { background: var(--bg); border: 1px dashed var(--line-2); border-radius: 12px; padding: 12px; }
.tmock .card { margin-bottom: 0; }
.tmock input, .tmock select, .tmock textarea { pointer-events: none; }
.tmock .hs { position: relative; border-radius: 8px; transition: box-shadow .2s, background .2s; }
.tmock .hs::after { content: attr(data-n); position: absolute; top: -8px; right: -8px; width: 20px; height: 20px; border-radius: 50%; background: var(--accent); color: #fff;
  font: 700 11px/20px inherit; text-align: center; box-shadow: 0 0 0 2px var(--panel); }
.tmock .hs.lit { box-shadow: 0 0 0 3px var(--svc-aqua), 0 0 0 7px var(--accent-soft); background: var(--accent-soft); }
.tmock .hs.lit::after { background: var(--svc-green); }
.tmock .timefield.callbar { position: static; margin-bottom: 10px; }
.tpspots { display: grid; gap: 8px; }
.tpspot { display: grid; grid-template-columns: 26px 1fr; gap: 10px; text-align: left; background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; cursor: pointer; font: inherit; color: var(--ink); }
.tpspot:hover { border-color: var(--accent-line); background: var(--hover); }
.tpspot .hsn { width: 24px; height: 24px; border-radius: 50%; background: var(--accent); color: #fff; display: grid; place-items: center; font-weight: 700; font-size: 12px; }
.tpspot.seen .hsn { background: var(--svc-green); }
.tpspot .tpspotb { display: none; margin-top: 4px; color: var(--ink-2); font-size: 13.5px; }
.tpspot.on { border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent-soft); }
.tpspot.on .tpspotb { display: block; }
/* labs */
.tplab { max-width: 620px; }
.tpask { font-size: 15px; background: var(--violet-soft); color: var(--violet-ink); border: 1px solid var(--violet-line); border-radius: 8px; padding: 10px 12px; }
.tplabmsg { min-height: 1.4em; font-weight: 600; margin: 10px 0 0; }
.tplabmsg.good { color: var(--ok-ink); }
.tplabmsg.bad { color: var(--danger); }
.tplabgoals { list-style: none; padding: 0; margin: 12px 0 0; display: flex; gap: 8px; flex-wrap: wrap; }
.tplabgoals li { background: var(--pill); border-radius: 99px; padding: 4px 12px; font-size: 13px; }
.tplabgoals li::before { content: "○ "; }
.tplabgoals li.ok { background: var(--ok-soft); color: var(--ok-ink); }
.tplabgoals li.ok::before { content: "✓ "; }
/* flip cards */
.tpflip { max-width: 560px; margin: 0 auto; }
.flipcard { display: block; width: 100%; height: 220px; perspective: 1000px; background: none; border: 0; padding: 0; cursor: pointer; font: inherit; color: var(--ink); }
.flipin { position: relative; display: block; width: 100%; height: 100%; transition: transform .5s; transform-style: preserve-3d; }
.flipcard.flipped .flipin { transform: rotateY(180deg); }
.flipface { position: absolute; inset: 0; backface-visibility: hidden; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; padding: 24px;
  border-radius: 14px; border: 1px solid var(--line); background: var(--panel); box-shadow: 0 4px 14px rgba(20, 40, 50, .08); font-size: 18px; text-align: center; }
.flipface small { color: var(--muted); font-size: 12px; }
.flipback { transform: rotateY(180deg); background: var(--accent-soft); border-color: var(--accent-line); color: var(--accent-ink); }
.tpflipnav { display: flex; justify-content: space-between; align-items: center; margin-top: 12px; }
/* quiz */
.tpquiz { max-width: 680px; }
.tqhead { display: flex; justify-content: space-between; font-size: 13px; color: var(--muted); }
.streak { color: #c2410c; font-weight: 700; }
.tqq { font-size: 19px; margin: 4px 0 14px; }
.tqopts { display: grid; gap: 8px; }
.tqopt { display: flex; align-items: center; gap: 12px; text-align: left; width: 100%; padding: 12px 14px; border-radius: 10px; border: 1px solid var(--line); background: var(--panel); cursor: pointer; font: inherit; color: var(--ink); }
.tqopt:hover:not([disabled]) { background: var(--hover); border-color: var(--accent-line); }
.tqopt .tqn { width: 22px; height: 22px; border-radius: 6px; background: var(--pill); color: var(--muted); display: grid; place-items: center; font-size: 12px; flex-shrink: 0; }
.tqopt .tqmark { margin-left: auto; font-weight: 700; }
.tqopt.right { background: var(--ok-soft); border: 2px solid var(--svc-green); }
.tqopt.wrong { background: var(--danger-soft); border: 2px solid var(--danger-line); }
.tqopt.dim { opacity: .55; }
.tqwhy { margin-top: 14px; border-radius: 10px; padding: 12px 14px; }
.tqwhy.good { background: var(--ok-soft); color: var(--ok-ink); }
.tqwhy.bad { background: var(--warn-soft); color: var(--warn); }
.tqwhy .btn { margin-top: 10px; }
.tqend { text-align: center; }
.tqscore { font-size: 56px; font-weight: 800; }
.tqscore.good { color: var(--svc-green); }
.tqscore.bad { color: var(--warn); }
.tqreview { text-align: left; list-style: none; padding: 0; display: grid; gap: 8px; }
.tqreview li { background: var(--panel-2); border-radius: 8px; padding: 10px 12px; font-size: 13.5px; }
/* practice-call coach */
.coach-on { outline: 3px solid var(--svc-aqua) !important; outline-offset: 3px; border-radius: 6px; box-shadow: 0 0 0 9px rgba(42, 154, 170, .15) !important; }
.coachbub { position: absolute; z-index: 30; max-width: 320px; background: #1f2a2e; color: #fff; border-radius: 10px; padding: 10px 14px; box-shadow: 0 8px 24px rgba(0, 0, 0, .25); font-size: 14px; }
.coachbub p { margin: 4px 0 8px; }
.coachbub .coachk { font-size: 11px; text-transform: uppercase; letter-spacing: .06em; color: #9fdbe3; font-weight: 700; }
.coachbub .linkbtn { color: #9fdbe3; font-weight: 600; padding: 0; margin-right: 10px; }
@media (max-width: 760px) {
  .tptour { grid-template-columns: 1fr; }
  .tpstep { padding: 16px; }
  .flipface { font-size: 16px; }
}
@media (prefers-reduced-motion: reduce) { .flipin, .tpbar i { transition: none; } }

/* Training mock-ups: the top bar, the left menu and small pieces of the ticket page */
.tmock .mocktop { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: 8px 10px; margin-bottom: 10px; }
.tmock .mocktop .grow { flex: 1 1 200px; }
.tmock .mocktop input { margin: 0; }
.tmock .mockbrand { font-size: 15px; }
.tmock .iconbtn { display: inline-flex; width: auto; padding: 0 10px; }
.tmock .mockside { position: static; height: auto; overflow: visible; background: var(--panel); border-radius: 10px; padding: 10px; display: block; width: auto; }
.tmock .mockside a { display: flex; justify-content: space-between; padding: 5px 8px; border-radius: 6px; color: var(--ink); }
.tmock .mockside .hs { padding: 2px 0 6px; }
.tmock .badge.late { background: var(--danger-soft); color: var(--danger-ink); }
.tmock .formtabs { margin-bottom: 10px; }
.tmock .officeclosed { margin-bottom: 10px; }
.tpmaskout { font: 14px/1.5 ui-monospace, SFMono-Regular, Menlo, monospace; background: var(--panel-2); border: 1px solid var(--line); border-radius: 8px; padding: 10px 12px; white-space: pre-wrap; min-height: 2.6em; }
.tplab[data-lab-tmpl] textarea, .tplab[data-lab-mask] textarea { width: 100%; }
.tpgame { max-width: 760px; }
.tpgame [data-game-result] .tresult { border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px; margin-bottom: 14px; }

/* Several customer numbers on a ticket (Feature note #7) */
.morecust { display: flex; flex-direction: column; gap: 8px; align-items: flex-start; }
.morecust .morerow { display: flex; flex-wrap: wrap; gap: 12px; align-items: flex-end; width: 100%; }
.morecust .morerow label { flex: 1 1 180px; }
.noteform .aboutcust { display: block; margin-bottom: 8px; }
.addcust form { display: grid; gap: 8px; margin-top: 8px; }

/* Verified with (Feature note #12) */
.verify .vboxes { display: flex; flex-wrap: wrap; gap: 4px 16px; }
.verify .na { margin-top: 6px; }
.verify .verifywarn { margin: 8px 0 0; }
/* Edit caller info and Change tags (Feature notes #19, #24) */
.calleredit form, .tagedit form { display: grid; gap: 8px; margin-top: 8px; }
.calleredit fieldset, .tagedit fieldset { display: grid; gap: 6px; }
.calleredit .verify .vboxes { flex-direction: column; }
details.edits { margin-top: 8px; }
details.edits ol { margin: 6px 0; padding-left: 18px; }
details.edits ol ul { margin: 2px 0 6px; padding-left: 16px; overflow-wrap: anywhere; }

/* Canned responses (Feature note #23) and merging (Feature note #25) */
.cannedpick { margin-bottom: 8px; }
.cannedpick select { max-width: 100%; }
.cannededit { display: grid; gap: 8px; }
table.canned td.pre { white-space: pre-wrap; overflow-wrap: anywhere; }
td.nowrap { white-space: nowrap; }
form.inline { display: inline; }
.mergebox form { display: grid; gap: 8px; margin-top: 8px; }
.alert.merged form { margin-left: 8px; }
