/* Vridam Healthcare — Complaint Management System. One stylesheet, served
   locally: no CDN and no web font, so it loads fast on any connection.

   Direction: quiet enterprise software. Charcoal and white carry the page;
   Vridam orange (sampled from the logo) is reserved for the one primary
   action on a screen, the active navigation item and chart marks. Status
   colours appear only in status badges, so colour always means something. */

:root {
  --bg:         #f4f4f2;
  --surface:    #ffffff;
  --surface-2:  #fafaf9;
  --line:       #e4e3df;
  --line-2:     #efeeeb;
  --ink:        #18181b;
  --ink-2:      #4f4f57;
  --ink-3:      #85858e;
  --brand:      #f27a00;   /* logo orange: marks, accents, focus */
  --brand-ink:  #b4500a;   /* orange text and filled buttons: white on it passes 4.5:1 */
  --brand-hov:  #9c4508;
  --brand-soft: #fff3e6;
  --brand-line: #f9d3aa;
  --side:       #17171a;
  --side-2:     #232327;
  --side-ink:   #b9b9c1;
  --green: #17693a;  --green-bg: #e8f5ed;
  --teal:  #0f6b6b;  --teal-bg:  #e5f4f3;
  --amber: #8a5300;  --amber-bg: #fdf3dc;
  --orange:#a34a06;  --orange-bg:#fdeede;
  --red:   #b3261e;  --red-bg:   #fdecea;
  --blue:  #1f4fb8;  --blue-bg:  #ebf1fd;
  --grey:  #52525b;  --grey-bg:  #efefed;
  --dark:  #ffffff;  --dark-bg:  #3a3a40;
  --r: 8px;
  --r-sm: 6px;
  --shadow: 0 1px 2px rgba(24,24,27,.04);
  --shadow-lg: 0 12px 32px rgba(24,24,27,.14), 0 2px 6px rgba(24,24,27,.06);
  --side-w: 236px;
  --font: "Segoe UI Variable Text", "Segoe UI", system-ui, -apple-system, BlinkMacSystemFont, Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: "Cascadia Mono", Consolas, "SF Mono", Menlo, monospace;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 14px/1.55 var(--font); font-synthesis: none; }
a { color: var(--brand-ink); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3 { margin: 0; font-weight: 600; letter-spacing: -.01em; }
p { margin: 0 0 10px; }
.muted { color: var(--ink-3); }
.pad { padding: 16px 18px; margin: 0; }
.num, td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.right { text-align: right; }
.nowrap { white-space: nowrap; }
.mono { font-family: var(--mono); font-size: 12.5px; letter-spacing: -.01em; }
.strong { font-weight: 600; color: var(--ink); }
.sm { font-size: 12.5px; color: var(--ink-3); }
.ic { flex: 0 0 auto; vertical-align: middle; }
.req { color: var(--red); font-weight: 600; }
.opt { color: var(--ink-3); font-weight: 400; font-size: 12px; }
.t-bad { color: var(--red); font-weight: 600; }
.hidden, [hidden] { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.center { justify-content: center; text-align: center; }
.js .noscript-only { display: none; }

/* ------------------------------------------------------------------ staff / admin shell */

.shell { display: flex; min-height: 100vh; }
.side {
  width: var(--side-w); flex: 0 0 var(--side-w); background: var(--side); color: var(--side-ink);
  display: flex; flex-direction: column; position: sticky; top: 0; height: 100vh; overflow-y: auto; z-index: 40;
}
.side-brand { display: flex; flex-direction: column; gap: 6px; padding: 20px 20px 16px; text-decoration: none !important; border-bottom: 1px solid #2a2a2f; }
.side-brand img { width: 92px; height: auto; display: block; }
.side-brand span { font-size: 11px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: #8e8e98; }
.nav { flex: 1; padding: 12px 10px 16px; }
.nav-h { font-size: 10.5px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: #6f6f78; padding: 18px 12px 6px; }
.nav-a {
  display: flex; align-items: center; gap: 11px; padding: 8px 12px; border-radius: 6px; margin-bottom: 1px;
  color: var(--side-ink); font-weight: 500; text-decoration: none !important; position: relative;
}
.nav-a .ic { color: #7c7c86; }
.nav-a:hover { background: var(--side-2); color: #fff; }
.nav-a:hover .ic { color: #b9b9c1; }
.nav-a.on { background: var(--side-2); color: #fff; }
.nav-a.on .ic { color: var(--brand); }
.nav-a.on::before { content: ""; position: absolute; left: -10px; top: 7px; bottom: 7px; width: 3px; border-radius: 0 3px 3px 0; background: var(--brand); }
.nav-n { margin-left: auto; background: var(--brand); color: #1a1208; font-size: 11px; font-weight: 700; border-radius: 10px; padding: 0 7px; line-height: 18px; }
.side-foot { padding: 14px 16px; border-top: 1px solid #2a2a2f; }
.side-who { display: flex; gap: 10px; align-items: center; }
.side-who b { display: block; color: #ececf0; font-weight: 600; font-size: 13px; line-height: 1.25; }
.side-who small { color: #8e8e98; font-size: 12px; }

.main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.top {
  height: 58px; background: var(--surface); border-bottom: 1px solid var(--line);
  display: flex; align-items: center; gap: 14px; padding: 0 28px; position: sticky; top: 0; z-index: 30;
}
.gsearch { flex: 1; max-width: 560px; position: relative; display: flex; align-items: center; }
.gsearch .ic { position: absolute; left: 12px; color: var(--ink-3); }
.gsearch input[type=search] { width: 100%; height: 36px; border: 1px solid var(--line); background: var(--surface-2); border-radius: 7px; padding: 0 12px 0 36px; font: inherit; color: var(--ink); }
.gsearch input:focus { outline: none; border-color: var(--brand); background: #fff; box-shadow: 0 0 0 3px var(--brand-soft); }
.top-r { margin-left: auto; display: flex; align-items: center; gap: 6px; }
.page { padding: 26px 32px 72px; width: 100%; max-width: 1440px; }

/* ------------------------------------------------------------------ customer shell */

.cbar { background: var(--surface); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 30; }
.cbar-in { max-width: 1200px; margin: 0 auto; height: 66px; display: flex; align-items: center; gap: 28px; padding: 0 24px; }
.cbar-logo { display: flex; align-items: center; gap: 12px; text-decoration: none !important; }
.cbar-logo img { height: 40px; width: auto; display: block; }
.cbar-sub { font-size: 11px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-3); border-left: 1px solid var(--line); padding-left: 12px; line-height: 1.2; }
.cnav { display: flex; gap: 4px; }
.cnav a { padding: 8px 12px; border-radius: 6px; color: var(--ink-2); font-weight: 500; text-decoration: none; }
.cnav a:hover { background: var(--surface-2); color: var(--ink); }
.cnav a.on { color: var(--ink); background: var(--grey-bg); font-weight: 600; }
.cbar-r { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.cnav-m { display: none; }
.cmain { max-width: 1200px; margin: 0 auto; padding: 28px 24px 64px; }
.cfoot { max-width: 1200px; margin: 0 auto; padding: 18px 24px 32px; display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; color: var(--ink-3); font-size: 12.5px; border-top: 1px solid var(--line); }

/* ------------------------------------------------------------------ top-right: bell + avatar menu */

.icon-btn {
  position: relative; width: 36px; height: 36px; display: grid; place-items: center; border-radius: 7px;
  border: 1px solid transparent; background: none; color: var(--ink-2); cursor: pointer; text-decoration: none !important;
}
.icon-btn:hover { background: var(--surface-2); border-color: var(--line); }
.dot-n { position: absolute; top: 2px; right: 1px; background: var(--brand-ink); color: #fff; font-size: 10px; font-weight: 700; border-radius: 9px; padding: 0 5px; line-height: 16px; border: 2px solid #fff; }
.av {
  width: 34px; height: 34px; border-radius: 50%; background: var(--ink); color: #fff; display: grid; place-items: center;
  font-weight: 600; font-size: 12.5px; letter-spacing: .02em; user-select: none; flex: 0 0 auto;
}
.av-sm { width: 28px; height: 28px; font-size: 11px; background: #3a3a40; }
.av-lg { width: 42px; height: 42px; font-size: 14px; background: var(--brand-soft); color: var(--brand-ink); }
summary.av { cursor: pointer; list-style: none; }
summary::-webkit-details-marker { display: none; }
.menu { position: relative; }
.menu > summary { list-style: none; }
.menu-list {
  position: absolute; top: calc(100% + 6px); right: 0; min-width: 240px; background: #fff; border: 1px solid var(--line);
  border-radius: 8px; box-shadow: var(--shadow-lg); padding: 6px; z-index: 50;
}
.menu-list a, .menu-list button {
  display: flex; align-items: center; gap: 9px; padding: 8px 10px; border-radius: 6px; color: var(--ink); text-decoration: none;
  width: 100%; border: 0; background: none; font: inherit; cursor: pointer; text-align: left;
}
.menu-list a:hover, .menu-list button:hover { background: var(--surface-2); }
.menu-list form { margin: 0; }
.menu-who { padding: 8px 10px 10px; border-bottom: 1px solid var(--line-2); margin-bottom: 4px; }
.menu-who b { display: block; }
.menu-who span { display: block; color: var(--ink-3); font-size: 12px; overflow-wrap: anywhere; }

/* ------------------------------------------------------------------ page header */

.page-h { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; margin-bottom: 20px; flex-wrap: wrap; }
.page-h h1 { font-size: 22px; line-height: 1.25; overflow-wrap: anywhere; }
.sub { margin: 4px 0 0; color: var(--ink-3); }
.page-actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.back { display: inline-flex; align-items: center; gap: 5px; font-size: 13px; color: var(--ink-3); margin-bottom: 6px; font-weight: 500; }
.back:hover { color: var(--ink); text-decoration: none; }
.ticket-meta { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin: -8px 0 20px; }
.ticket-chip { background: var(--surface); border: 1px solid var(--line); border-radius: 5px; padding: 2px 8px; color: var(--ink); font-weight: 600; }

/* ------------------------------------------------------------------ buttons */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px; height: 36px; padding: 0 14px; border-radius: 6px;
  font: 500 14px/1 var(--font); cursor: pointer; border: 1px solid transparent; white-space: nowrap;
  text-decoration: none !important; transition: background .12s, border-color .12s, color .12s;
}
.btn-primary { background: var(--brand-ink); color: #fff; }
.btn-primary:hover { background: var(--brand-hov); }
.btn-dark { background: var(--ink); color: #fff; }
.btn-dark:hover { background: #2e2e33; }
.btn-ghost { background: #fff; border-color: var(--line); color: var(--ink); }
.btn-ghost:hover { background: var(--surface-2); border-color: #d2d0cb; }
.btn-danger { background: #fff; border-color: #efc5c1; color: var(--red); }
.btn-danger:hover { background: var(--red-bg); }
.btn-ok { background: var(--green); color: #fff; }
.btn-ok:hover { background: #125630; }
.btn-link { background: none; color: var(--ink-2); padding: 0 6px; }
.btn-link:hover { color: var(--ink); }
.btn-sm { height: 30px; padding: 0 10px; font-size: 13px; }
.btn-block { width: 100%; }
.btn[disabled], .btn.is-disabled { opacity: .5; cursor: default; pointer-events: none; }
.btn.is-loading::before {
  content: ""; width: 13px; height: 13px; border-radius: 50%; border: 2px solid currentColor; border-right-color: transparent;
  animation: spin .7s linear infinite;
}
.btn.is-loading .ic { display: none; }
@keyframes spin { to { transform: rotate(360deg); } }
.btn:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible, summary:focus-visible, button:focus-visible {
  outline: 2px solid var(--brand); outline-offset: 2px;
}
form.inline { display: inline-flex; margin: 0; }
.btn-row { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.actions { display: flex; gap: 6px; justify-content: flex-end; flex-wrap: wrap; }
.chip { display: inline-flex; align-items: center; height: 28px; padding: 0 11px; border: 1px solid var(--line); border-radius: 14px; color: var(--ink-2); font-size: 13px; background: #fff; }
.chip:hover { text-decoration: none; border-color: #cfccc6; color: var(--ink); }
.chip.on { background: var(--ink); border-color: var(--ink); color: #fff; }

/* ------------------------------------------------------------------ cards & tiles */

.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); box-shadow: var(--shadow); margin-bottom: 20px; min-width: 0; }
.card-h { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 18px; border-bottom: 1px solid var(--line-2); flex-wrap: wrap; }
.card-h h2 { font-size: 15px; display: flex; align-items: center; gap: 8px; }
.card-h > .muted, .card-h > a { font-size: 12.5px; }
.card-b { padding: 18px; }
.pb0 { padding-bottom: 0; }
.cols { display: grid; gap: 20px; grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: start; margin-bottom: 20px; }
.cols > .card, .cols > form.card, .cols > div > .card:last-child, .cols > aside > .card:last-child { margin-bottom: 0; }
.cols-21 { grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); }
.cols-main { grid-template-columns: minmax(0, 1fr) 340px; }
.cols-main > .col-main > .card:last-child, .cols-main > .col-side > .card:last-child { margin-bottom: 0; }
.cols-side-l { grid-template-columns: 340px minmax(0, 1fr); }

.kpis { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); margin-bottom: 20px; }
.kpis-7 { grid-template-columns: repeat(7, minmax(0, 1fr)); }
.kpis-8 { grid-template-columns: repeat(8, minmax(0, 1fr)); }
.kpis-5 { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.kpis-6 { grid-template-columns: repeat(6, minmax(0, 1fr)); }
.kpi {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 13px 15px; box-shadow: var(--shadow);
  color: var(--ink); text-decoration: none !important; display: block; position: relative; min-width: 0;
}
a.kpi:hover { border-color: #cfccc6; }
.kpi-l { font-size: 12.5px; color: var(--ink-2); font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.kpi-v { font-size: 24px; font-weight: 650; margin-top: 2px; font-variant-numeric: tabular-nums; letter-spacing: -.02em; line-height: 1.25; }
.kpi-s { font-size: 12px; color: var(--ink-3); }
.kpi-bad   { box-shadow: inset 3px 0 0 var(--red); }
.kpi-bad .kpi-v { color: var(--red); }
.kpi-warn  { box-shadow: inset 3px 0 0 #d99a10; }
.kpi-good  { box-shadow: inset 3px 0 0 var(--green); }
.kpi-brand { box-shadow: inset 3px 0 0 var(--brand); }
.kpi-f.is-on { border-color: var(--ink); box-shadow: inset 0 0 0 1px var(--ink); }
.kpi-strip { display: flex; gap: 10px 24px; flex-wrap: wrap; margin: -6px 0 20px; color: var(--ink-2); font-size: 13px; }
.kpi-strip a, .kpi-strip span { display: inline-flex; align-items: center; gap: 6px; color: var(--ink-2); }

/* ------------------------------------------------------------------ badges */

.badge {
  display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 600; padding: 2px 9px 2px 8px;
  border-radius: 4px; white-space: nowrap; line-height: 18px;
}
.badge .dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; flex: 0 0 auto; }
.b-green  { color: var(--green);  background: var(--green-bg); }
.b-teal   { color: var(--teal);   background: var(--teal-bg); }
.b-amber  { color: var(--amber);  background: var(--amber-bg); }
.b-orange { color: var(--orange); background: var(--orange-bg); }
.b-red    { color: var(--red);    background: var(--red-bg); }
.b-blue   { color: var(--blue);   background: var(--blue-bg); }
.b-grey   { color: var(--grey);   background: var(--grey-bg); }
.b-dark   { color: var(--dark);   background: var(--dark-bg); }
.prio { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 500; color: var(--ink-2); white-space: nowrap; }
.prio i { width: 8px; height: 8px; border-radius: 2px; background: #b9b9bf; }
.p-medium i { background: #6b8fd6; }
.p-high i { background: #e0a000; }
.p-critical { color: var(--red); font-weight: 700; }
.p-critical i { background: var(--red); }
.over-t { color: var(--red); font-size: 11.5px; font-weight: 600; margin-top: 3px; display: flex; align-items: center; gap: 3px; }
.ping { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--brand); margin-left: 6px; vertical-align: middle; box-shadow: 0 0 0 3px var(--brand-soft); }

/* ------------------------------------------------------------------ flashes */

.flash { display: flex; gap: 10px; align-items: flex-start; padding: 11px 14px; border-radius: 7px; margin-bottom: 16px; border: 1px solid; font-weight: 500; }
.flash > span { flex: 1; padding-top: 1px; }
.flash .ic { margin-top: 1px; }
.flash.ok   { background: var(--green-bg); border-color: #c1e2cd; color: #0f4f2a; }
.flash.warn { background: var(--amber-bg); border-color: #f0dca9; color: #6d4200; }
.flash.bad  { background: var(--red-bg);   border-color: #f2c6c1; color: #8c1c15; }
.flash-x { border: 0; background: none; color: inherit; opacity: .6; cursor: pointer; padding: 2px; border-radius: 4px; }
.flash-x:hover { opacity: 1; }
.note { background: var(--surface-2); border: 1px dashed var(--line); border-radius: 7px; padding: 10px 14px; color: var(--ink-2); font-size: 12.5px; }
.mx { margin: 0 18px 18px; }

/* ------------------------------------------------------------------ tabs */

.tabs { display: flex; gap: 2px; border-bottom: 1px solid var(--line); padding: 0 12px; overflow-x: auto; scrollbar-width: none; }
.tabs a { padding: 12px 12px 11px; color: var(--ink-2); font-weight: 500; border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap; text-decoration: none; }
.tabs a:hover { color: var(--ink); }
.tabs a.on { color: var(--ink); border-bottom-color: var(--brand); font-weight: 600; }
.tab-n { background: var(--grey-bg); color: var(--ink-2); border-radius: 10px; font-size: 11.5px; padding: 0 7px; margin-left: 4px; font-weight: 600; }
.tabs a.on .tab-n { background: var(--brand-soft); color: var(--brand-ink); }

/* ------------------------------------------------------------------ forms */

.form-grid { display: grid; gap: 16px 18px; grid-template-columns: repeat(4, minmax(0, 1fr)); }
.form-grid.g3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.form-grid.g2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.form-grid.nest { gap: 18px; }
.fld { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.fld.span2 { grid-column: span 2; } .fld.span3 { grid-column: span 3; } .fld.span4 { grid-column: 1 / -1; }
.fld > label { font-size: 13px; font-weight: 600; color: var(--ink-2); }
.help { color: var(--ink-3); font-size: 12px; line-height: 1.45; }
input[type=text], input[type=number], input[type=date], input[type=email], input[type=password], input[type=search], input[type=tel], input:not([type]),
select, textarea {
  font: inherit; color: var(--ink); background: #fff; border: 1px solid #d6d4cf; border-radius: var(--r-sm);
  padding: 0 11px; height: 38px; width: 100%; min-width: 0;
}
textarea { padding: 9px 11px; height: auto; resize: vertical; line-height: 1.5; }
select { padding-right: 30px; appearance: none; cursor: pointer;
  background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%2385858e' stroke-width='2.5'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") no-repeat right 10px center; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-soft); }
input[readonly] { background: var(--surface-2); color: var(--ink-2); }
input[readonly]:focus { border-color: #d6d4cf; box-shadow: none; }
.fld.has-err input, .fld.has-err select, .fld.has-err textarea, input:user-invalid, select:user-invalid, textarea:user-invalid { border-color: #dc867e; }
.fld-err { color: var(--red); font-size: 12px; font-weight: 500; }
.fld-check { justify-content: center; }
.check { display: inline-flex; gap: 8px; align-items: center; font-weight: 500 !important; color: var(--ink) !important; cursor: pointer; }
.check input { width: 16px; height: 16px; accent-color: var(--brand-ink); margin: 0; }
.form-foot { display: flex; gap: 10px; justify-content: flex-end; align-items: center; padding: 14px 18px; border-top: 1px solid var(--line-2); background: var(--surface-2); border-radius: 0 0 var(--r) var(--r); flex-wrap: wrap; }
.form-foot .muted { margin-right: auto; font-size: 13px; }
.form-card.narrow { max-width: 760px; }
.form-sec { display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: 24px; padding: 22px 18px; border-bottom: 1px solid var(--line-2); }
.form-sec:last-of-type { border-bottom: 0; }
.form-sec-h h2 { font-size: 14.5px; margin-bottom: 4px; }
.form-sec-h p { color: var(--ink-3); font-size: 13px; margin: 0; }
.side-form { display: grid; gap: 14px; }
.role-help { margin-top: 18px; display: grid; gap: 8px; font-size: 13px; color: var(--ink-2); background: var(--surface-2); border: 1px solid var(--line-2); border-radius: 7px; padding: 12px 14px; }
.preview { margin: 14px 0 0; color: var(--ink-2); font-size: 13px; }

/* file picker */
.file-drop { position: relative; border: 1px dashed #cfccc6; border-radius: var(--r-sm); background: var(--surface-2); transition: border-color .12s, background .12s; }
.file-drop input[type=file] { position: absolute; inset: 0; opacity: 0; cursor: pointer; width: 100%; height: 100%; }
.file-drop-t { display: flex; align-items: center; gap: 7px; padding: 10px 12px; color: var(--ink-2); font-weight: 500; pointer-events: none; }
.file-drop-t small { color: var(--ink-3); font-weight: 400; }
.file-drop:hover, .file-drop.drag { border-color: var(--brand); background: var(--brand-soft); }
.file-drop:focus-within { border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-soft); }
.file-list { list-style: none; margin: 0; padding: 0 12px 10px; display: grid; gap: 4px; position: relative; }
.file-list li { display: flex; justify-content: space-between; gap: 10px; font-size: 12.5px; background: #fff; border: 1px solid var(--line-2); border-radius: 5px; padding: 5px 9px; }
.file-list li.bad { border-color: #f2c6c1; color: var(--red); }
.file-list small { color: var(--ink-3); white-space: nowrap; }

/* ------------------------------------------------------------------ tables */

.toolbar { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; padding: 12px 14px; border-bottom: 1px solid var(--line-2); }
.toolbar select, .toolbar input[type=date] { height: 34px; width: auto; min-width: 128px; font-size: 13.5px; }
.tb-search { position: relative; display: flex; align-items: center; flex: 1 1 240px; max-width: 360px; }
.tb-search .ic { position: absolute; left: 10px; color: var(--ink-3); }
.tb-search input[type=search] { padding-left: 32px; height: 34px; font-size: 13.5px; }
.tb-dates { display: flex; align-items: center; gap: 6px; }
.tb-l { font-size: 13px; color: var(--ink-2); font-weight: 500; }
.tb-spacer { flex: 1; }
.tbl-wrap { overflow-x: auto; }
.tbl { width: 100%; border-collapse: collapse; }
.tbl th {
  text-align: left; font-size: 11.5px; font-weight: 600; color: var(--ink-3); text-transform: uppercase; letter-spacing: .05em;
  padding: 10px 14px; background: var(--surface-2); border-bottom: 1px solid var(--line); white-space: nowrap;
}
.tbl th a { color: inherit; text-decoration: none; }
.tbl th a:hover { color: var(--ink); }
.tbl th a.sorted { color: var(--ink); }
.tbl th a.sorted.asc::after { content: " ↑"; }
.tbl th a.sorted.desc::after { content: " ↓"; }
.tbl td { padding: 11px 14px; border-bottom: 1px solid var(--line-2); vertical-align: middle; }
.tbl tbody tr:last-child td { border-bottom: 0; }
.tbl tfoot td { font-weight: 700; background: var(--surface-2); border-top: 1px solid var(--line); padding: 10px 14px; }
.tbl tr.row-link { cursor: pointer; }
.tbl tbody tr:hover { background: #fbfaf8; }
.tbl tr.is-over td:first-child { box-shadow: inset 3px 0 0 var(--red); }
.tbl tr.is-off td { color: var(--ink-3); }
.tbl tr.is-editing { background: var(--brand-soft); }
.tbl .cell-subject { min-width: 180px; max-width: 340px; overflow-wrap: anywhere; }
.tbl-queue td, .tbl-queue th { padding-left: 10px; padding-right: 10px; }
.tbl-queue td:nth-child(2) { min-width: 150px; }
.tbl.plain td { padding: 8px 18px; }
.tbl-compact td, .tbl-compact th { padding: 7px 10px; }
.who { display: flex; align-items: center; gap: 10px; }
.pager { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 11px 14px; border-top: 1px solid var(--line-2); flex-wrap: wrap; font-size: 13px; }
.pager-btns { display: flex; gap: 10px; align-items: center; }

.empty { text-align: center; padding: 48px 20px; color: var(--ink-2); }
.empty-ic { width: 52px; height: 52px; border-radius: 12px; background: var(--grey-bg); color: var(--ink-3); display: grid; place-items: center; margin: 0 auto 14px; }
.empty h3 { font-size: 15px; margin-bottom: 4px; color: var(--ink); }
.empty p { margin: 0 auto 16px; color: var(--ink-3); max-width: 420px; }

/* detail lists */
.dl { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 14px 20px; margin: 0; padding: 16px 18px; }
.dl div { min-width: 0; }
.dl dt { font-size: 12px; color: var(--ink-3); font-weight: 500; margin-bottom: 2px; }
.dl dd { margin: 0; font-weight: 500; overflow-wrap: anywhere; }
.dl-stack { grid-template-columns: 1fr; gap: 0; padding: 4px 18px 8px; }
.dl-stack div { display: flex; justify-content: space-between; gap: 16px; padding: 9px 0; border-bottom: 1px solid var(--line-2); }
.dl-stack div:last-child { border-bottom: 0; }
.dl-stack dt { margin: 0; font-size: 13px; }
.dl-stack dd { text-align: right; font-size: 13.5px; }
.dl-center { max-width: 520px; margin: 0 auto 22px; background: var(--surface-2); border: 1px solid var(--line-2); border-radius: 7px; text-align: left; }

/* attachments */
.files { list-style: none; margin: 10px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.files li { display: inline-flex; align-items: center; gap: 8px; border: 1px solid var(--line); border-radius: 6px; padding: 5px 10px; background: #fff; max-width: 100%; }
.files a { display: inline-flex; align-items: center; gap: 6px; color: var(--ink); font-weight: 500; font-size: 13px; min-width: 0; }
.files a span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 240px; }
.files a .ic { color: var(--ink-3); }
.files small { color: var(--ink-3); font-size: 11.5px; }

/* ------------------------------------------------------------------ conversation */

.thread { list-style: none; margin: 0; padding: 18px; display: grid; gap: 16px; }
.msg { display: grid; grid-template-columns: 34px minmax(0, 1fr); gap: 12px; }
.msg-av { width: 34px; height: 34px; border-radius: 50%; background: var(--grey-bg); color: var(--ink-2); display: grid; place-items: center; font-size: 12px; font-weight: 600; }
.msg-av.av-team { background: var(--ink); color: #fff; }
.msg-b { border: 1px solid var(--line); border-radius: var(--r); padding: 12px 14px; background: #fff; min-width: 0; }
.msg.from-team .msg-b { background: #fcfbf9; border-color: #e8e5df; }
.msg.mine .msg-b { border-color: var(--brand-line); background: #fffaf4; }
.msg-origin .msg-b { border-left: 3px solid var(--brand); }
.msg-h { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-bottom: 6px; }
.msg-h b { font-size: 13.5px; }
.msg-t { margin-left: auto; color: var(--ink-3); font-size: 12px; white-space: nowrap; }
.msg-sub { font-weight: 600; margin-bottom: 4px; }
.msg-text { overflow-wrap: anywhere; color: #27272a; }
.role-chip { font-size: 11px; font-weight: 600; color: var(--ink-3); background: var(--grey-bg); padding: 0 7px; border-radius: 3px; line-height: 18px; }
.role-chip.chip-team { background: var(--brand-soft); color: var(--brand-ink); }
.reply { border-top: 1px solid var(--line-2); padding: 16px 18px 18px; display: grid; gap: 12px; background: var(--surface-2); border-radius: 0 0 var(--r) var(--r); }
.reply-foot { display: flex; gap: 14px; align-items: flex-end; justify-content: space-between; flex-wrap: wrap; }
.reply-foot > .fld { flex: 1 1 280px; }
.reply-send { display: flex; flex-direction: column; align-items: flex-end; gap: 10px; }
.reply-send .check small { font-weight: 400; }
.reply-closed { display: flex; gap: 10px; align-items: center; border-top: 1px solid var(--line-2); padding: 14px 18px; color: var(--ink-2); background: var(--surface-2); border-radius: 0 0 var(--r) var(--r); }

/* internal notes — deliberately different from the customer conversation */
.card-internal { border-color: #d9d6cf; background: #f7f6f2; }
.card-internal > .card-h { background: #2b2b30; color: #fff; border-radius: var(--r) var(--r) 0 0; border-bottom: 0; }
.card-internal > .card-h h2 { color: #fff; }
.internal-tag { font-size: 12px; color: #f6c48f; font-weight: 500; }
.card-internal .reply { background: transparent; border-top: 0; border-bottom: 1px solid var(--line); border-radius: 0; }
.notes { list-style: none; margin: 0; padding: 14px 18px 18px; display: grid; gap: 10px; }
.notes li { background: #fff; border: 1px solid #e6e2da; border-left: 3px solid #3a3a40; border-radius: 6px; padding: 10px 14px; }
.note-h { display: flex; gap: 8px; align-items: baseline; flex-wrap: wrap; margin-bottom: 4px; font-size: 13px; }
.note-t { margin-left: auto; color: var(--ink-3); font-size: 12px; }

/* resolution */
.res-card { border-color: #bfe0cb; }
.res-card.is-closed { border-color: var(--line); }
.res-h { display: flex; gap: 12px; align-items: flex-start; padding: 16px 18px; background: var(--green-bg); border-radius: var(--r) var(--r) 0 0; color: var(--green); }
.res-card.is-closed .res-h { background: var(--grey-bg); color: var(--ink-2); }
.res-h h2 { font-size: 15.5px; color: var(--ink); }
.res-h p { margin: 2px 0 0; }
.res-b { padding: 16px 18px; }
.res-label { font-size: 11.5px; font-weight: 600; letter-spacing: .05em; text-transform: uppercase; color: var(--ink-3); margin-bottom: 4px; }
.res-text { font-size: 14.5px; overflow-wrap: anywhere; }
.res-actions { border-top: 1px solid var(--line-2); padding: 14px 18px; display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; background: var(--surface-2); border-radius: 0 0 var(--r) var(--r); }
.res-actions p { margin: 0; font-weight: 600; }

/* history lists */
.hist { list-style: none; margin: 0; padding: 12px 18px 14px 22px; }
.hist li { position: relative; padding: 2px 0 14px 18px; border-left: 2px solid var(--line); }
.hist li:last-child { border-left-color: transparent; padding-bottom: 2px; }
.hist li::before { content: ""; position: absolute; left: -6px; top: 5px; width: 10px; height: 10px; border-radius: 50%; background: #fff; border: 2px solid #b5b3ad; }
.hist li.now::before { border-color: var(--brand); background: var(--brand); }
.hist .when { font-size: 12px; color: var(--ink-3); margin-top: 3px; }
.hist-t { font-size: 13px; overflow-wrap: anywhere; }
.hist-q { font-size: 12.5px; color: var(--ink-2); background: var(--surface-2); border-radius: 5px; padding: 5px 8px; margin-top: 5px; overflow-wrap: anywhere; }
.timeline { list-style: none; margin: 0; padding: 4px 0; }
.timeline li { display: grid; grid-template-columns: 96px minmax(0, 1fr); gap: 12px; padding: 9px 18px; border-bottom: 1px solid var(--line-2); font-size: 13px; }
.timeline li:last-child { border-bottom: 0; }
.timeline .t { color: var(--ink-3); font-size: 12px; font-variant-numeric: tabular-nums; line-height: 1.4; }
.timeline .w { color: var(--ink-3); font-size: 12px; }

/* customer side card */
.cust-card { display: flex; gap: 12px; align-items: center; padding: 16px 18px 8px; }
.contact { list-style: none; margin: 0; padding: 4px 18px 14px; display: grid; gap: 7px; font-size: 13px; }
.contact li { display: flex; gap: 9px; align-items: flex-start; overflow-wrap: anywhere; }
.contact .ic { color: var(--ink-3); margin-top: 2px; }
.side-sub { font-size: 11.5px; font-weight: 600; text-transform: uppercase; letter-spacing: .05em; color: var(--ink-3); padding: 12px 18px 4px; border-top: 1px solid var(--line-2); }
.mini-list { list-style: none; margin: 0; padding: 4px 18px 12px; }
.mini-list li { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 10px; align-items: center; padding: 7px 0; border-bottom: 1px solid var(--line-2); font-size: 13px; }
.mini-list li:last-child { border-bottom: 0; }
.mini-s { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--ink-2); }
.mini-list-lg .mini-s b { display: block; font-weight: 500; color: var(--ink); overflow: hidden; text-overflow: ellipsis; }
.mini-list-lg .mini-s small { color: var(--ink-3); font-size: 12px; }

/* customer dashboard */
.card-attn { border-color: var(--brand-line); }
.card-attn > .card-h { background: var(--brand-soft); border-radius: var(--r) var(--r) 0 0; }
.card-attn > .card-h h2 { color: var(--brand-ink); }
.attn { list-style: none; margin: 0; padding: 0; }
.attn li { display: flex; justify-content: space-between; gap: 12px; align-items: center; padding: 12px 18px; border-bottom: 1px solid var(--line-2); flex-wrap: wrap; }
.attn li:last-child { border-bottom: 0; }
.attn-s { color: var(--ink-2); margin-left: 8px; }
.attn-r { display: flex; gap: 12px; align-items: center; font-size: 13px; }

/* progress steps */
.steps { list-style: none; display: flex; margin: 0 0 22px; padding: 16px 20px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); }
.steps li { flex: 1; display: flex; align-items: center; gap: 8px; position: relative; font-size: 13px; color: var(--ink-3); font-weight: 500; }
.steps li:not(:last-child)::after { content: ""; flex: 1; height: 2px; background: var(--line); margin: 0 10px; border-radius: 2px; }
.steps li.done:not(:last-child)::after { background: var(--brand); }
.step-dot { width: 20px; height: 20px; border-radius: 50%; border: 2px solid #cfccc6; background: #fff; display: grid; place-items: center; flex: 0 0 auto; color: #fff; }
.steps li.done .step-dot { background: var(--brand); border-color: var(--brand); }
.steps li.now .step-dot { border-color: var(--brand); box-shadow: 0 0 0 4px var(--brand-soft); }
.steps li.now, .steps li.done { color: var(--ink); }
.steps li.now .step-l { font-weight: 650; }

/* success page */
.success-card { text-align: center; padding: 44px 24px 36px; max-width: 720px; margin: 20px auto; }
.success-ic { width: 60px; height: 60px; border-radius: 50%; background: var(--green-bg); color: var(--green); display: grid; place-items: center; margin: 0 auto 18px; }
.success-card h1 { font-size: 22px; margin-bottom: 18px; }
.ticket-label { margin: 0; font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: .1em; color: var(--ink-3); }
.ticket-no { font-size: 28px; font-weight: 700; margin: 2px 0 16px; letter-spacing: .01em; }
.success-t { max-width: 520px; margin: 0 auto 22px; color: var(--ink-2); }

/* notifications */
.notif { list-style: none; margin: 0; padding: 0; }
.notif li a { display: grid; grid-template-columns: 34px minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 12px 18px; border-bottom: 1px solid var(--line-2); color: var(--ink); text-decoration: none; }
.notif li:last-child a { border-bottom: 0; }
.notif li a:hover { background: var(--surface-2); }
.notif-ic { width: 32px; height: 32px; border-radius: 8px; background: var(--grey-bg); color: var(--ink-3); display: grid; place-items: center; }
.notif li.unread .notif-ic { background: var(--brand-soft); color: var(--brand-ink); }
.notif-b b { display: block; font-weight: 500; }
.notif li.unread .notif-b b { font-weight: 650; }
.notif-b small { color: var(--ink-3); display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.notif-t { color: var(--ink-3); font-size: 12px; white-space: nowrap; }

/* temporary password panel */
.temp-pw { display: flex; gap: 14px; align-items: flex-start; background: #fffaf2; border: 1px solid var(--brand-line); border-radius: var(--r); padding: 14px 18px; margin-bottom: 20px; color: var(--ink); }
.temp-pw > .ic { color: var(--brand-ink); margin-top: 2px; }
.temp-pw-v { display: flex; gap: 10px; align-items: center; margin: 6px 0; }
.temp-pw code { font-family: var(--mono); font-size: 17px; font-weight: 700; background: #fff; border: 1px solid var(--line); border-radius: 5px; padding: 3px 10px; }
.temp-pw small { color: var(--ink-2); }

/* audit */
.tbl-audit td { vertical-align: top; font-size: 13px; }
.audit-d { max-width: 460px; overflow-wrap: anywhere; }
.diff summary { cursor: pointer; color: var(--ink-3); font-size: 12px; margin-top: 4px; }
.diff div { font-size: 12px; margin-top: 3px; }
.diff del { color: var(--red); text-decoration: line-through; }
.diff ins { color: var(--green); text-decoration: none; font-weight: 500; }

/* ------------------------------------------------------------------ charts */

.chart { width: 100%; height: auto; max-height: 280px; display: block; }
.chart .grid { stroke: var(--line-2); stroke-width: 1; }
.chart .axis { stroke: #cfccc6; stroke-width: 1; }
.chart .tick { fill: var(--ink-3); font-size: 11px; font-variant-numeric: tabular-nums; }
.chart .bar { fill: var(--brand); }
.chart .hit:hover .bar { fill: var(--brand-ink); }
.chart .line { fill: none; stroke: var(--ink); stroke-width: 1.8; stroke-linejoin: round; }
.chart .pt { fill: #fff; stroke: var(--ink); stroke-width: 1.6; }
.legend { display: flex; gap: 18px; margin-top: 8px; font-size: 12px; color: var(--ink-2); }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.lg-bar { width: 10px; height: 10px; border-radius: 2px; background: var(--brand); }
.lg-line { width: 14px; height: 2px; background: var(--ink); }
.hbars { padding: 14px 18px 18px; display: grid; gap: 10px; }
.hb { display: grid; grid-template-columns: 150px minmax(0, 1fr); gap: 12px; align-items: center; }
.hb-l { font-size: 13px; color: var(--ink-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hb-t { display: flex; align-items: center; gap: 8px; }
.hb-b { height: 12px; background: var(--brand); border-radius: 0 3px 3px 0; min-width: 3px; }
.hb-v { font-size: 12.5px; font-weight: 600; font-variant-numeric: tabular-nums; }
.tip { position: fixed; z-index: 90; background: var(--ink); color: #fff; font-size: 12.5px; padding: 6px 10px; border-radius: 6px; pointer-events: none; white-space: nowrap; box-shadow: var(--shadow-lg); }

/* ------------------------------------------------------------------ dialogs */

.dlg { border: 0; border-radius: 10px; padding: 0; width: min(440px, calc(100vw - 32px)); box-shadow: var(--shadow-lg); color: var(--ink); }
.dlg-wide { width: min(620px, calc(100vw - 32px)); }
.dlg::backdrop { background: rgba(24,24,27,.45); }
.dlg form { padding: 22px 22px 18px; display: grid; gap: 14px; }
.dlg h3 { font-size: 17px; }
.dlg p { color: var(--ink-2); margin: -6px 0 0; white-space: pre-line; }
.dlg-btns { display: flex; justify-content: flex-end; gap: 8px; padding-top: 4px; }

/* ------------------------------------------------------------------ sign-in pages */

body.is-bare { background: var(--surface); }
.auth { min-height: 100vh; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); }
.auth-art { background: var(--side); color: #e4e4e8; padding: 44px 52px; display: flex; flex-direction: column; justify-content: space-between; gap: 32px; position: relative; overflow: hidden; }
.auth-art-logo { width: 150px; height: auto; }
.eyebrow { font-size: 11.5px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--brand); margin-bottom: 14px; }
.auth-art h2 { font-size: 30px; line-height: 1.2; max-width: 440px; letter-spacing: -.02em; color: #fff; margin-bottom: 14px; }
.auth-art p { color: #a9a9b3; max-width: 440px; }
.auth-art ul { list-style: none; padding: 0; margin: 24px 0 0; display: grid; gap: 10px; color: #d6d6dc; }
.auth-art li { display: flex; gap: 10px; align-items: center; }
.auth-art li .ic { color: var(--brand); }
.auth-art-foot { font-size: 12px; color: #6f6f78 !important; margin: 0; }
.auth-form { display: grid; place-items: center; padding: 40px 20px; }
.auth-box { width: 100%; max-width: 380px; display: grid; gap: 14px; }
.auth-box-wide { max-width: 560px; }
.auth-logo { width: 140px; height: auto; margin-bottom: 6px; }
.auth-box h1 { font-size: 23px; }
.auth-box > .muted { margin: -8px 0 4px; }
.auth-alt { text-align: center; margin: 0; color: var(--ink-2); }
.auth-help { font-size: 12.5px; color: var(--ink-3); text-align: center; margin: 4px 0 0; }
.auth-box .btn-block { height: 42px; margin-top: 4px; }

/* ------------------------------------------------------------------ responsive */

.only-mobile { display: none; }
.scrim { display: none; }
@media (max-width: 1280px) {
  .kpis-7, .kpis-8 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .kpis-6 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .cols-main { grid-template-columns: minmax(0, 1fr) 300px; }
}
@media (max-width: 1100px) {
  .form-sec { grid-template-columns: 1fr; gap: 12px; }
  .cols-21, .cols-side-l { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 960px) {
  .only-mobile { display: grid; }
  .side { position: fixed; left: 0; top: 0; bottom: 0; transform: translateX(-100%); transition: transform .2s; box-shadow: var(--shadow-lg); }
  body.side-open .side { transform: none; }
  body.side-open .scrim { display: block; position: fixed; inset: 0; background: rgba(24,24,27,.4); z-index: 35; }
  .cols, .cols-main { grid-template-columns: minmax(0, 1fr); }
  .top { padding: 0 16px; }
  .page { padding: 20px 16px 56px; }
  .auth { grid-template-columns: 1fr; }
  .auth-art { display: none; }
  .cnav { display: none; }
  .cnav-m { display: flex; gap: 2px; border-top: 1px solid var(--line-2); padding: 0 12px; overflow-x: auto; }
  .cnav-m a { padding: 10px 12px; color: var(--ink-2); font-weight: 500; border-bottom: 2px solid transparent; white-space: nowrap; }
  .cnav-m a.on { color: var(--ink); border-bottom-color: var(--brand); }
  .cbar-in { gap: 12px; padding: 0 16px; height: 60px; }
  .cmain { padding: 20px 16px 48px; }
  .cfoot { padding: 16px; }
  .kpis-5 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 640px) {
  body { font-size: 14.5px; }
  .hide-xs { display: none !important; }
  .cbar-sub { display: none; }
  .cbar-logo img { height: 34px; }
  .form-grid, .form-grid.g3, .form-grid.g2 { grid-template-columns: minmax(0, 1fr); }
  .fld.span2, .fld.span3 { grid-column: auto; }
  .kpis, .kpis-5, .kpis-6, .kpis-7, .kpis-8 { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .kpi-v { font-size: 20px; }
  .page-h h1 { font-size: 19px; }
  .page-actions { width: 100%; }
  .page-actions .btn { flex: 1; }
  .gsearch input[type=search], input, select, textarea { font-size: 16px !important; }    /* stops iOS zooming on focus */
  .toolbar { gap: 8px; }
  .toolbar select, .toolbar input[type=date] { min-width: 0; flex: 1 1 140px; }
  .tb-search { max-width: none; flex-basis: 100%; }
  .tb-dates { flex: 1 1 100%; }
  .toolbar .tb-dates input[type=date] { flex: 1 1 0; width: 0; min-width: 0; }
  /* Tables become stacked cards: each cell shows its column name. */
  .tbl thead { display: none; }
  .tbl, .tbl tbody, .tbl tr, .tbl td, .tbl tfoot { display: block; width: 100%; }
  .tbl tr { border-bottom: 1px solid var(--line); padding: 10px 4px; }
  /* Label on the left, the cell's content stacked on the right (a cell may hold two lines). */
  .tbl td { border: 0; padding: 3px 12px; display: grid; grid-template-columns: 104px minmax(0, 1fr); column-gap: 14px; text-align: right; justify-items: end; align-items: start; }
  .tbl td[data-label]::before { content: attr(data-label); color: var(--ink-3); font-size: 12px; text-align: left; grid-column: 1; grid-row: 1 / span 4; justify-self: start; padding-top: 1px; }
  .tbl td > * { grid-column: 2; }
  .tbl td:not([data-label]) { display: flex; justify-content: flex-end; gap: 6px; flex-wrap: wrap; }
  .tbl td.right, .tbl td.actions { justify-content: flex-end; }
  .tbl .cell-subject { max-width: none; }
  .tbl tr.is-over td:first-child { box-shadow: none; }
  .tbl tr.is-over { box-shadow: inset 3px 0 0 var(--red); }
  .tbl-compact { display: none; }
  .steps { padding: 12px; }
  .steps li { flex-direction: column; gap: 4px; text-align: center; font-size: 11px; }
  .steps li:not(:last-child)::after { position: absolute; top: 9px; left: calc(50% + 14px); right: calc(-50% + 14px); margin: 0; }
  .thread { padding: 14px 12px; }
  .msg { grid-template-columns: minmax(0, 1fr); }
  .msg-av { display: none; }
  .msg-t { margin-left: 0; width: 100%; }
  .reply-send { align-items: stretch; width: 100%; }
  .reply-send .btn { width: 100%; }
  .res-actions .btn-row { width: 100%; }
  .res-actions .btn-row > * { flex: 1; }
  .res-actions .btn-row form .btn { width: 100%; }
  .timeline li { grid-template-columns: 1fr; gap: 2px; }
  .hb { grid-template-columns: 110px minmax(0, 1fr); }
  .success-card { padding: 32px 16px 28px; }
  .ticket-no { font-size: 23px; }
  .attn-r { width: 100%; justify-content: space-between; }
}
@media print {
  .side, .top, .cbar, .toolbar, .pager, .page-actions, .btn, .scrim, .reply, .cfoot { display: none !important; }
  .page, .cmain { padding: 0; max-width: none; }
  .card { box-shadow: none; break-inside: avoid; }
  body { background: #fff; }
}
