/* 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;
  --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;
    --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;
  --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; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); 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 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; }
.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; }
.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); }
.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; }
.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(4, 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 { grid-template-columns: 1fr; }
  .side { display: none; }
  .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 { 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); } }
