/* Batey console. Light is the default; dark is html[data-theme="dark"].
   A navy icon rail on the left, a blue band across the top with the search
   bar sitting on its lower edge, and white cards on a pale lavender page. */
:root {
  --bg: #eceef8; --panel: #ffffff; --panel2: #f3f5fc; --line: #e1e5f2;
  --text: #1f2a4d; --muted: #6b7594; --accent: #3d5af1; --accent2: #2f49d8; --on-accent: #ffffff; --accent-soft: #e7ebff;
  --crit: #d92d4f; --high: #d9660f; --med: #94700a; --low: #12805c; --info: #5b6685; --ok: #12805c;
  --shadow: 0 1px 2px rgba(31,42,77,.05), 0 8px 24px rgba(31,42,77,.07);
  --side: #1c2845; --side-text: #c5cce3; --side-muted: #8590b3; --side-line: rgba(255,255,255,.10);
  --head1: #3454e6; --head2: #4a73f5; --head-shape: rgba(255,255,255,.10);
  font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}
html[data-theme="dark"] {
  --bg: #0e1426; --panel: #171f38; --panel2: #1d2745; --line: #2a3558;
  --text: #e7ebf8; --muted: #93a0c4; --accent: #6f8bff; --accent2: #8aa0ff; --on-accent: #0e1426; --accent-soft: #232f57;
  --crit: #ff5f7a; --high: #ff9650; --med: #f1c453; --low: #4fd0a5; --info: #8f9bc0; --ok: #4fd0a5;
  --shadow: none; --side: #0a0f1f; --head1: #1d2f86; --head2: #2a47b3; --head-shape: rgba(255,255,255,.06);
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--text); font-size: 14.5px; line-height: 1.45; }
.hidden { display: none !important; }
button, input, select, textarea { font: inherit; color: inherit; }
button { background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: 7px 14px; cursor: pointer; font-weight: 500; }
button:hover { border-color: var(--accent); }
button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
button.primary { background: var(--accent); border-color: var(--accent); color: var(--on-accent); font-weight: 650; }
button.primary:hover { background: var(--accent2); border-color: var(--accent2); }
button.ghost { background: transparent; border-color: transparent; color: var(--muted); }
button.big { padding: 13px 24px; font-size: 16px; border-radius: 999px; }
button:disabled { opacity: .6; cursor: default; }
input, select { background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: 8px 11px; }
input:focus, select:focus { outline: none; border-color: var(--accent); }
textarea { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; resize: vertical; width: 100%; }
textarea:focus { outline: none; border-color: var(--accent); }
code { font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace; font-size: 12.5px; background: var(--panel2); border-radius: 5px; padding: 1px 5px; }
.muted { color: var(--muted); }
.small { font-size: 12.5px; }
.err { color: var(--crit); min-height: 1.2em; }
a { color: var(--accent); }
.nowrap { white-space: nowrap; }
.grow { flex: 1; min-width: 120px; }

/* ---- sign-in ---- */
.login { min-height: 100vh; display: grid; place-items: center; padding: 20px; background: radial-gradient(1100px 620px at 78% -8%, var(--head-shape), transparent 62%), linear-gradient(135deg, var(--head1), var(--head2)); }
.login-card { width: 380px; max-width: 100%; display: flex; flex-direction: column; gap: 14px; padding: 30px; border-radius: 20px; margin: 0; }
.login-card h3 { margin: 0; }
.login-card label { display: flex; flex-direction: column; gap: 5px; color: var(--muted); font-size: 13px; }
.login-card input { color: var(--text); font-size: 15px; padding: 10px 12px; }
.login-card button { padding: 12px; font-size: 15.5px; border-radius: 999px; }
.brand { font-weight: 750; display: flex; align-items: center; gap: 12px; color: var(--text); font-size: 24px; letter-spacing: -.3px; }
.logo { width: 44px; height: 44px; }

/* ---- shell: icon rail + page ---- */
#app { display: flex; min-height: 100vh; }
.side { width: 92px; flex: none; background: var(--side); color: var(--side-text); display: flex; flex-direction: column; align-items: stretch; padding: 14px 8px 8px; position: sticky; top: 0; height: 100vh; }
.side .brand { justify-content: center; padding-bottom: 10px; }
.side .brand .logo { width: 42px; height: 42px; }
nav { display: flex; flex-direction: column; gap: 8px; padding-top: 8px; flex: 1; overflow-y: auto; scrollbar-width: none; }
nav::-webkit-scrollbar { display: none; }
.navhead { height: 1px; flex: none; background: var(--side-line); margin: 5px 14px; font-size: 0; }
nav button { position: relative; background: transparent; border: 0; border-radius: 12px; color: var(--side-text); display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 4px 2px 8px; font-size: 11.5px; font-weight: 500; line-height: 1.2; }
nav button:hover { background: transparent; color: #fff; }
.navic { width: 46px; height: 46px; padding: 11px; border-radius: 50%; flex: none; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; transition: background .12s; }
nav button:hover .navic { background: rgba(255,255,255,.09); }
nav button.active { color: #fff; font-weight: 650; }
nav button.active .navic { background: #3f5ff2; stroke: #fff; }
.navlabel { text-align: center; }
.navdot { position: absolute; top: 4px; right: 16px; width: 10px; height: 10px; border-radius: 50%; background: #ff5d6c; box-shadow: 0 0 0 2px var(--side); }
.sidefoot { border-top: 1px solid var(--side-line); padding-top: 8px; display: flex; flex-direction: column; align-items: center; gap: 2px; font-size: 11px; color: var(--side-muted); text-align: center; }
.sidefoot button { color: var(--side-text); padding: 4px 2px; font-size: 11px; }
.sidefoot button:hover { color: #fff; }
/* Dark mode: a switch in the rail, above the user's initials. */
.sidefoot .themeswitch { background: transparent; border: 0; display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 4px 2px 8px; margin-bottom: 4px; }
.themeswitch .track { position: relative; width: 44px; height: 24px; border-radius: 999px; background: rgba(255,255,255,.16); transition: background .15s; }
.themeswitch .knob { position: absolute; top: 2px; left: 2px; width: 20px; height: 20px; border-radius: 50%; background: #fff; display: grid; place-items: center; transition: transform .15s; }
.themeswitch .knob svg { width: 14px; height: 14px; fill: none; stroke: #1c2845; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.themeswitch .moon { display: none; }
.themeswitch[aria-checked="true"] .track { background: #3f5ff2; }
.themeswitch[aria-checked="true"] .knob { transform: translateX(20px); }
.themeswitch[aria-checked="true"] .sun { display: none; }
.themeswitch[aria-checked="true"] .moon { display: block; }
.themeswitch:hover .track { background: rgba(255,255,255,.26); }
.themeswitch[aria-checked="true"]:hover .track { background: #5673f5; }
.avatar { width: 34px; height: 34px; border-radius: 50%; background: #3f5ff2; color: #fff; display: grid; place-items: center; font-weight: 700; font-size: 14px; margin-bottom: 2px; }
.verline { font-size: 10.5px; color: var(--side-muted); }
.page { flex: 1; min-width: 0; }

/* ---- the blue band and the search bar on its edge ---- */
header { position: relative; overflow: hidden; display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; padding: 30px 36px 62px; color: #fff; background: linear-gradient(120deg, var(--head1), var(--head2)); }
header::before { content: ""; position: absolute; right: -8%; top: -190%; width: 62%; aspect-ratio: 1; border-radius: 50%; background: var(--head-shape); }
header::after { content: ""; position: absolute; right: -22%; top: -120%; width: 52%; aspect-ratio: 1; border-radius: 50%; background: var(--head-shape); }
header > * { position: relative; z-index: 1; }
header h1 { margin: 0; font-size: 32px; font-weight: 750; letter-spacing: -.4px; }
#pageSub { margin-top: 2px; font-size: 14px; color: rgba(255,255,255,.82); }
.who { display: flex; align-items: center; gap: 8px; }
.searchbar { position: relative; z-index: 2; display: flex; align-items: center; gap: 10px; margin: -31px 36px 0; padding: 8px 8px 8px 22px; min-height: 62px; background: var(--panel); border-radius: 999px; box-shadow: 0 10px 30px rgba(31,42,77,.14); }
.searchbar > svg { width: 21px; height: 21px; flex: none; fill: none; stroke: var(--muted); stroke-width: 1.8; stroke-linecap: round; }
.searchbar input { flex: 1; min-width: 80px; border: 0; background: transparent; font-size: 16px; padding: 8px 4px; }
.searchbar input:focus-visible { outline: none; }
.searchbar .sdiv { width: 1px; align-self: stretch; margin: 8px 2px; background: var(--line); }
.searchbar select { border: 0; background: transparent; font-weight: 600; max-width: 200px; padding: 8px 6px; cursor: pointer; }
#newTicket { border-radius: 999px; padding: 12px 22px; font-size: 15px; white-space: nowrap; }

main { padding: 24px 36px 56px; }
.toolbar { display: flex; gap: 8px; align-items: center; margin-bottom: 14px; flex-wrap: wrap; }
.toolbar select, .toolbar > button { border-radius: 999px; padding: 8px 14px; background: var(--panel); font-weight: 550; }
.card { background: var(--panel); border: 1px solid transparent; border-radius: 18px; padding: 20px 24px; margin-bottom: 16px; box-shadow: var(--shadow); }
html[data-theme="dark"] .card, html[data-theme="dark"] table.grid, html[data-theme="dark"] .stat { border-color: var(--line); }
.card h3 { margin: 0 0 8px; font-size: 16.5px; }

.stat { background: var(--panel); border: 1px solid transparent; border-radius: 18px; padding: 16px 18px; box-shadow: var(--shadow); }
.stat .n { font-size: 30px; font-weight: 750; line-height: 1.1; letter-spacing: -.5px; }
.stat .l { color: var(--muted); font-size: 12.5px; margin-top: 4px; }
.stat.alert .n { color: var(--crit); }
.tile { text-align: left; cursor: pointer; color: inherit; font: inherit; }
.tile:hover { border-color: var(--accent); }
.tile:disabled { cursor: default; opacity: 1; }
.tile:disabled:hover { border-color: transparent; }

table.grid { width: 100%; border-collapse: separate; border-spacing: 0; background: var(--panel); border: 1px solid transparent; border-radius: 18px; overflow: hidden; box-shadow: var(--shadow); }
.grid th { text-align: left; font-weight: 600; color: var(--muted); font-size: 12.5px; padding: 13px 16px; border-bottom: 1px solid var(--line); }
.grid td { padding: 12px 16px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.grid tr:last-child td { border-bottom: none; }
.grid tbody tr.click { cursor: pointer; }
.grid tbody tr.click:hover { background: var(--panel2); }
.grid td.num, .grid th.num { text-align: right; font-variant-numeric: tabular-nums; }
table.grid.compact { box-shadow: none; border: 0; border-radius: 0; }
table.grid.compact td, table.grid.compact th { padding: 9px 6px; }
.trunc { max-width: 520px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.empty { text-align: center; color: var(--muted); padding: 34px !important; }
.host, .subj { font-weight: 600; }
.sub2 { color: var(--muted); font-size: 12.5px; }
.tnum { font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 12.5px; color: var(--muted); white-space: nowrap; }
.off td { opacity: .55; }

/* A ticket in a list: icon tile, title, and a line of details under it. */
.trow { display: flex; align-items: center; gap: 16px; width: 100%; text-align: left; background: none; border: 0; border-radius: 14px; padding: 10px 8px; color: inherit; cursor: pointer; }
.trow:hover { background: var(--panel2); }
.tic { width: 46px; height: 46px; flex: none; border-radius: 12px; background: var(--accent-soft); display: grid; place-items: center; }
.tic svg { width: 24px; height: 24px; fill: none; stroke: var(--accent); stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.trow.urgent .tic { background: color-mix(in srgb, var(--crit) 13%, transparent); }
.trow.urgent .tic svg { stroke: var(--crit); }
.tmain { min-width: 0; flex: 1; }
.ttitle { font-size: 15.5px; font-weight: 550; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tmeta { display: flex; align-items: center; gap: 7px; flex-wrap: wrap; color: var(--muted); font-size: 13px; margin-top: 3px; }
.tmeta .dot::before { content: "•"; }

.badge, .st { display: inline-block; padding: 2px 9px; border-radius: 7px; font-size: 12px; font-weight: 600; white-space: nowrap; }
.sev-high, .st-open { background: color-mix(in srgb, var(--high) 13%, transparent); color: var(--high); }
.sev-medium, .st-waiting { background: color-mix(in srgb, var(--med) 15%, transparent); color: var(--med); }
.sev-low, .sev-now, .st-resolved { background: color-mix(in srgb, var(--low) 13%, transparent); color: var(--low); }
.st-in_progress { background: var(--accent-soft); color: var(--accent); }
.st-closed, .pr-normal { background: color-mix(in srgb, var(--info) 13%, transparent); color: var(--info); }
.pr-urgent { background: color-mix(in srgb, var(--crit) 13%, transparent); color: var(--crit); }
.pr-high { background: color-mix(in srgb, var(--high) 13%, transparent); color: var(--high); }
.pr-low { background: color-mix(in srgb, var(--low) 13%, transparent); color: var(--low); }
.badge { text-transform: capitalize; min-width: 64px; text-align: center; }
.st-on { color: var(--ok); font-weight: 600; }
.flag { color: var(--high); font-weight: 600; }
.tag { display: inline-block; background: var(--panel2); border-radius: 7px; padding: 2px 8px; margin: 1px 4px 1px 0; font-size: 12px; color: var(--muted); }
.pill { display: inline-block; background: var(--accent-soft); color: var(--accent); border-radius: 999px; padding: 1px 9px; font-size: 11.5px; font-weight: 600; margin-left: 7px; }

/* ---- dashboard ---- */
.dash { display: flex; flex-direction: column; gap: 16px; }
.dash .card { margin-bottom: 0; }
.attn { display: flex; flex-direction: column; }
.attn-row { display: flex; align-items: center; gap: 12px; width: 100%; text-align: left; background: none; border: 0; border-top: 1px solid var(--line); border-radius: 0; padding: 11px 4px; color: inherit; cursor: pointer; }
.attn-row:first-child { border-top: 0; }
.attn-row:hover { background: var(--panel2); }
.attn-text { flex: 1; }
.attn-go { color: var(--accent); white-space: nowrap; font-weight: 600; font-size: 13px; }
.attn-none { padding: 4px 0; }
.dash-tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 14px; }
.dash-cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(380px, 1fr)); gap: 16px; align-items: start; }

/* ---- one ticket (drawer) ---- */
.drawer { position: fixed; top: 0; right: 0; bottom: 0; width: min(780px, 100vw); background: var(--bg); box-shadow: -16px 0 50px rgba(15,22,48,.28); z-index: 10; display: flex; flex-direction: column; }
.drawer-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; padding: 22px 26px 24px; color: #fff; background: linear-gradient(120deg, var(--head1), var(--head2)); }
.drawer-head h3 { margin: 3px 0 0; font-size: 21px; font-weight: 700; }
.drawer-head .tnum { color: rgba(255,255,255,.82); font-size: 13px; }
#dClose { color: #fff; border: 1px solid rgba(255,255,255,.35); border-radius: 999px; padding: 6px 14px; }
#dClose:hover { background: rgba(255,255,255,.14); }
#dBody { padding: 18px 26px 28px; overflow-y: auto; }
.meta { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 12px 16px; margin: 0 0 16px; background: var(--panel); border-radius: 18px; padding: 16px 18px; box-shadow: var(--shadow); }
.meta label { display: flex; flex-direction: column; gap: 4px; color: var(--muted); font-size: 12.5px; }
.meta label > * { font-size: 14.5px; color: var(--text); }
.meta label > .st { align-self: flex-start; font-size: 12px; }
.meta select { width: 100%; }
.section-title { color: var(--muted); font-size: 12.5px; font-weight: 600; margin: 4px 2px 8px; }
.thread { display: flex; flex-direction: column; gap: 10px; margin: 0 0 16px; }
.msg { border-radius: 16px; padding: 13px 16px; background: var(--panel); box-shadow: var(--shadow); }
.msg.staff { border-left: 4px solid var(--accent); }
.msg.note { background: color-mix(in srgb, var(--med) 10%, var(--panel)); border-left: 4px solid var(--med); }
.msg-head { display: flex; justify-content: space-between; gap: 10px; font-size: 12.5px; color: var(--muted); margin-bottom: 6px; }
.msg-head b { color: var(--text); font-size: 14px; }
.msg-body { white-space: pre-wrap; word-break: break-word; }
.msg.system { background: none; box-shadow: none; padding: 0 4px; color: var(--muted); font-size: 12.5px; text-align: center; }
.replybox { border-radius: 18px; padding: 14px; background: var(--panel); box-shadow: var(--shadow); display: flex; flex-direction: column; gap: 10px; }
.replybox textarea { min-height: 110px; }
.replybox.note textarea { background: color-mix(in srgb, var(--med) 9%, var(--panel)); }
.seg { display: inline-flex; align-self: flex-start; background: var(--panel2); border-radius: 999px; padding: 3px; }
.seg button { border: 0; border-radius: 999px; background: transparent; padding: 6px 16px; }
.seg button.on { background: var(--accent); color: var(--on-accent); font-weight: 650; }
.replyrow { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.replyrow button.primary, .modal-card button.primary, .card form > button.primary { border-radius: 999px; padding: 9px 20px; }
.actions { display: flex; gap: 8px; flex-wrap: wrap; margin: 8px 0 16px; }
.kv { display: grid; grid-template-columns: 170px 1fr; gap: 8px 12px; margin: 12px 0 16px; align-items: center; }
.kv .k { color: var(--muted); font-size: 12.5px; }

/* ---- forms, dialogs ---- */
.formgrid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px 16px; margin: 12px 0; }
.formgrid label, .field { display: flex; flex-direction: column; gap: 5px; color: var(--muted); font-size: 13px; }
.formgrid input, .formgrid select, .formgrid textarea, .card > textarea { color: var(--text); font-size: 14.5px; }
.formgrid .wide { grid-column: 1 / -1; }
.checks { display: flex; gap: 16px; flex-wrap: wrap; align-items: center; }
.checks label { flex-direction: row; align-items: center; gap: 6px; color: var(--text); font-size: 14px; }
.checks input, td input[type=checkbox], .switch input { width: 17px; height: 17px; accent-color: var(--accent); }
.perm { display: flex; gap: 12px; white-space: nowrap; }
.perm label { display: inline-flex; align-items: center; gap: 4px; font-size: 13px; }
.rowactions { display: flex; gap: 6px; justify-content: flex-end; }
.rowactions button { padding: 4px 12px; font-size: 12.5px; border-radius: 999px; }
.switch { display: flex; align-items: center; gap: 10px; margin: 10px 0; }
.soon { opacity: .78; }
.modal { position: fixed; inset: 0; z-index: 20; background: rgba(15,22,48,.5); display: grid; place-items: center; padding: 20px; }
.modal-card { background: var(--panel); border-radius: 22px; box-shadow: 0 24px 70px rgba(15,22,48,.4); width: min(640px, 100%); max-height: 92vh; overflow-y: auto; padding: 26px 28px; }
.modal-card h3 { margin: 0 0 4px; font-size: 20px; }
.modal-card .actions { justify-content: flex-end; margin: 16px 0 0; }
.modal-card .actions button { border-radius: 999px; padding: 9px 20px; }
.secret { font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 17px; background: var(--panel2); border-radius: 10px; padding: 10px 12px; letter-spacing: .5px; user-select: all; }
.banner { background: var(--accent-soft); border-radius: 16px; padding: 12px 16px; margin-bottom: 14px; }
.banner.ok { background: color-mix(in srgb, var(--ok) 11%, var(--panel)); }
.btnlink { display: inline-block; border: 1px solid var(--line); border-radius: 999px; padding: 8px 16px; text-decoration: none; color: var(--text); font-weight: 550; background: var(--panel); }
.btnlink:hover { border-color: var(--accent); }
.toast { position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%); background: #1c2845; color: #fff; padding: 12px 22px; border-radius: 999px; z-index: 40; box-shadow: 0 10px 30px rgba(0,0,0,.28); }
.mailbody { white-space: pre-wrap; background: var(--panel2); border-radius: 12px; padding: 10px 12px; margin-top: 6px; font-size: 13.5px; }

/* ---- reports ---- */
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 14px; margin-bottom: 16px; }
.repgrid { display: grid; grid-template-columns: repeat(auto-fit, minmax(340px, 1fr)); gap: 16px; }
.repgrid .card { margin-bottom: 0; }
.bars { display: grid; grid-template-columns: minmax(90px, max-content) 1fr max-content; gap: 9px 12px; align-items: center; }
.bars .bar { height: 10px; border-radius: 5px; background: var(--accent); min-width: 2px; }
.bars .lbl { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 260px; }
.bars .val { font-variant-numeric: tabular-nums; font-weight: 600; }
.trend { display: flex; align-items: flex-end; gap: 4px; height: 150px; padding-top: 8px; }
.trend .col { flex: 1; display: flex; align-items: flex-end; gap: 2px; height: 100%; min-width: 0; }
.trend .b { flex: 1; border-radius: 4px 4px 0 0; min-height: 2px; }
.trend .b.o { background: var(--accent); }
.trend .b.r { background: var(--low); }
.trendx { display: flex; justify-content: space-between; color: var(--muted); font-size: 11.5px; margin-top: 4px; }
.legend { display: flex; gap: 16px; color: var(--muted); font-size: 12.5px; margin-bottom: 4px; }
.legend i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 5px; }

/* ---- tabs, chips, and the simpler ticket view ---- */
.tabbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; }
.tabs { display: flex; gap: 4px; flex-wrap: wrap; }
.tabs button { background: transparent; border: 0; border-bottom: 3px solid transparent; border-radius: 0; padding: 8px 12px 9px; color: var(--muted); font-size: 15px; font-weight: 550; }
.tabs button:hover { color: var(--text); }
.tabs button.on { color: var(--accent); border-bottom-color: var(--accent); font-weight: 650; }
.count { display: inline-block; min-width: 22px; margin-left: 7px; padding: 0 7px; border-radius: 999px; background: var(--line); color: var(--muted); font-size: 12px; font-weight: 650; text-align: center; }
.tabs button.on .count.has, .count.has { background: var(--accent); color: var(--on-accent); }
.tabs button:not(.on) .count.has { background: var(--accent-soft); color: var(--accent); }
.chip { border-radius: 999px; padding: 7px 16px; background: var(--panel); font-weight: 550; }
.chip.on { background: var(--accent-soft); border-color: var(--accent-soft); color: var(--accent); }
.pillbtn { border-radius: 999px; padding: 9px 20px; }
.listcard { padding: 10px 12px; }
.listcard .trow + .trow { border-top: 1px solid var(--line); border-radius: 0; }
.listcard .trow { padding: 12px 10px; }
.tmain { display: flex; flex-direction: column; }
.ttitle { display: block; }
.tassign { flex: none; font-size: 13.5px; text-align: right; max-width: 150px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.statusline { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; background: var(--panel); border-radius: 18px; padding: 12px 16px; margin-bottom: 16px; box-shadow: var(--shadow); }
.statusline button { border-radius: 999px; }
.meta { grid-template-columns: 1fr 1fr auto; align-items: end; }
.detailsbtn { align-self: end; color: var(--accent); font-weight: 600; padding: 8px 6px; white-space: nowrap; }
.meta:has(#mPriority) { grid-template-columns: 1fr 1fr; align-items: start; }
.meta:has(#mPriority) .detailsbtn { grid-column: 1 / -1; justify-self: start; }
.notecheck { display: flex; align-items: center; gap: 7px; color: var(--muted); font-size: 14px; cursor: pointer; }
.notecheck input { width: 17px; height: 17px; accent-color: var(--med); }
.replyrow button { border-radius: 999px; padding: 9px 20px; }
.dash-tiles { grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); }

@media (max-width: 900px) {
  #app { flex-direction: column; }
  .side { width: auto; height: auto; position: static; flex-direction: row; align-items: center; padding: 8px; gap: 8px; }
  .side .brand { padding: 0 4px; }
  nav { flex-direction: row; overflow-x: auto; }
  nav button { min-width: 66px; }
  .navhead { display: none; }
  .sidefoot { border: 0; padding: 0; flex-direction: row; }
  .sidefoot .verline, .sidefoot .avatar, .themelabel { display: none; }
  header { padding: 20px 18px 52px; }
  header h1 { font-size: 25px; }
  .searchbar { margin: -28px 12px 0; flex-wrap: wrap; border-radius: 26px; padding: 8px 12px; }
  .searchbar .sdiv { display: none; }
  main { padding: 18px 12px 40px; }
  .drawer { width: 100vw; }
  .grid th, .grid td { padding: 10px; }
}
@media print {
  .side, header, .searchbar, .noprint, .drawer, .toast { display: none !important; }
  body { background: #fff; }
  main { padding: 0; }
  .card, table.grid, .stat { box-shadow: none; border: 1px solid #ddd; break-inside: avoid; }
}
