/* ============================================================
   KINORE SUPPORT — dark, dense, engineering-grade design system
   Vibe: Vercel/GitHub dark · Type: Geist + Geist Mono · Density 9
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Geist:wght@300;400;500;600;700&family=Geist+Mono:wght@400;500;600&display=swap');

:root {
  /* surfaces */
  --bg:        #09090b;
  --bg-2:      #0e0e11;
  --panel:     #111114;
  --panel-2:   #161619;
  --raised:    #1b1b1f;
  --hover:     rgba(255,255,255,.035);
  --active:    rgba(123,131,235,.10);

  /* borders */
  --line:      rgba(255,255,255,.07);
  --line-2:    rgba(255,255,255,.11);
  --line-3:    rgba(255,255,255,.16);

  /* text */
  --t-0:       #f4f4f5;
  --t-1:       #ededed;
  --t-2:       #9b9ba4;
  --t-3:       #6a6a73;
  --t-4:       #4a4a52;

  /* accent (Kinore periwinkle) */
  --accent:        #7b83eb;
  --accent-hi:     #9197f0;
  --accent-dim:    rgba(123,131,235,.14);
  --accent-line:   rgba(123,131,235,.40);
  --on-accent:     #0a0a0f;

  /* semantic */
  --green:   #3fb950;  --green-bg:  rgba(63,185,80,.13);
  --amber:   #d29922;  --amber-bg:  rgba(210,153,34,.14);
  --red:     #f7656b;  --red-bg:    rgba(247,101,107,.13);
  --blue:    #589bf5;  --blue-bg:   rgba(88,155,245,.13);
  --violet:  #a371f7;  --violet-bg: rgba(163,113,247,.14);
  --teal:    #2bb6a3;  --teal-bg:   rgba(43,182,163,.13);

  /* metrics */
  --r-sm: 5px;  --r: 7px;  --r-lg: 10px;  --r-xl: 14px;
  --sb-w: 224px;
  --top-h: 48px;
  --mono: 'Geist Mono', ui-monospace, 'SF Mono', Menlo, monospace;
  --sans: 'Geist', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

  --shadow: 0 1px 2px rgba(0,0,0,.4), 0 8px 24px -12px rgba(0,0,0,.6);
  --shadow-lg: 0 12px 40px -8px rgba(0,0,0,.7);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { -webkit-text-size-adjust: 100%; }

body {
  font-family: var(--sans);
  background: var(--bg);
  color: var(--t-1);
  font-size: 13px;
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  font-feature-settings: 'cv01','cv03','ss03';
}

a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; }
input, textarea, select { font-family: inherit; }
::selection { background: var(--accent-dim); }

/* scrollbars */
* { scrollbar-width: thin; scrollbar-color: var(--line-3) transparent; }
*::-webkit-scrollbar { width: 9px; height: 9px; }
*::-webkit-scrollbar-thumb { background: var(--line-2); border-radius: 6px; border: 2px solid transparent; background-clip: content-box; }
*::-webkit-scrollbar-thumb:hover { background: var(--line-3); background-clip: content-box; }

.mono { font-family: var(--mono); font-feature-settings: 'tnum'; }

/* ============================================================
   APP LAYOUT — sidebar + topbar + main
   ============================================================ */
.app { display: flex; min-height: 100vh; }

.sidebar {
  width: var(--sb-w);
  flex: 0 0 var(--sb-w);
  background: var(--bg-2);
  border-right: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  position: sticky;
  top: 0;
  height: 100vh;
  z-index: 40;
}
.sb-brand {
  height: var(--top-h);
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 0 14px;
  border-bottom: 1px solid var(--line);
  flex: 0 0 auto;
}
.sb-brand img.mark { height: 16px; width: auto; }
.sb-brand .wordmark { height: 15px; width: auto; }
.sb-brand .ctx {
  margin-left: auto;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: var(--t-3);
  border: 1px solid var(--line-2);
  border-radius: 4px;
  padding: 2px 6px;
}
.sb-brand .ctx-toggle { margin-left: auto; display: flex; background: var(--panel); border: 1px solid var(--line-2); border-radius: 5px; padding: 2px; gap: 1px; flex: 0 0 auto; }
.sb-brand .ctx-toggle a { font-size: 10.5px; font-weight: 600; letter-spacing: .02em; color: var(--t-3); padding: 2px 8px; border-radius: 3px; line-height: 1.5; transition: background .12s, color .12s; }
.sb-brand .ctx-toggle a.on { background: var(--accent-dim); color: var(--accent-hi); }
.sb-brand .ctx-toggle a:hover:not(.on) { color: var(--t-1); }

.sb-scroll { flex: 1 1 auto; overflow-y: auto; padding: 8px; }
.sb-search {
  display: flex; align-items: center; gap: 7px;
  height: 30px; padding: 0 9px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  color: var(--t-3);
  font-size: 12px;
  margin-bottom: 10px;
}
.sb-search svg { width: 13px; height: 13px; flex: 0 0 auto; }
.sb-search .kbd {
  margin-left: auto; font-family: var(--mono); font-size: 10px;
  color: var(--t-4); border: 1px solid var(--line-2); border-radius: 3px; padding: 1px 4px;
}

.sb-group { margin-bottom: 4px; }
.sb-label {
  font-size: 10px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase;
  color: var(--t-4); padding: 10px 9px 5px;
}
.nav-item {
  display: flex; align-items: center; gap: 9px;
  height: 30px; padding: 0 9px; border-radius: var(--r-sm);
  color: var(--t-2); font-size: 13px; font-weight: 450;
  position: relative; transition: background .12s, color .12s; white-space: nowrap;
}
.nav-item:hover { background: var(--hover); color: var(--t-1); }
.nav-item.active { background: var(--active); color: var(--t-0); font-weight: 500; }
.nav-item.active::before {
  content: ''; position: absolute; left: -8px; top: 50%; transform: translateY(-50%);
  width: 3px; height: 16px; background: var(--accent); border-radius: 0 3px 3px 0;
}
.nav-item svg { width: 15px; height: 15px; flex: 0 0 auto; opacity: .85; }
.nav-item .count {
  margin-left: auto; font-family: var(--mono); font-size: 11px; color: var(--t-3);
  background: var(--panel-2); border-radius: 4px; padding: 1px 6px; min-width: 20px; text-align: center;
}
.nav-item.active .count { color: var(--accent-hi); background: var(--accent-dim); }

.sb-foot { flex: 0 0 auto; border-top: 1px solid var(--line); padding: 8px; }
.sb-user { display: flex; align-items: center; gap: 9px; padding: 6px; border-radius: var(--r-sm); }
.sb-user:hover { background: var(--hover); }
.sb-user .meta { min-width: 0; }
.sb-user .nm { font-size: 12.5px; font-weight: 500; color: var(--t-1); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sb-user .rl { font-size: 11px; color: var(--t-3); }

.avatar {
  flex: 0 0 auto; border-radius: 50%; display: grid; place-items: center;
  font-weight: 600; color: #fff; font-size: 11px; letter-spacing: .02em; overflow: hidden;
}
.avatar.sm { width: 24px; height: 24px; font-size: 10px; }
.avatar.md { width: 28px; height: 28px; }
.avatar.lg { width: 36px; height: 36px; font-size: 13px; }

/* main column */
.main { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; }

.topbar {
  height: var(--top-h);
  flex: 0 0 auto;
  display: flex; align-items: center; gap: 12px;
  padding: 0 16px;
  border-bottom: 1px solid var(--line);
  background: rgba(9,9,11,.78);
  backdrop-filter: blur(12px);
  position: sticky; top: 0; z-index: 30;
}
.topbar .crumbs { display: flex; align-items: center; gap: 7px; font-size: 13px; color: var(--t-2); min-width: 0; white-space: nowrap; flex: 0 1 auto; }
.topbar .crumbs .here { color: var(--t-0); font-weight: 500; }
.topbar .crumbs .sep { color: var(--t-4); }
.topbar .crumbs .here { color: var(--t-0); font-weight: 500; }
.topbar .spacer { flex: 1 1 auto; }
.hamburger { display: none; width: 32px; height: 32px; border: 1px solid var(--line-2); background: var(--panel); border-radius: var(--r-sm); color: var(--t-1); align-items: center; justify-content: center; }
.hamburger svg { width: 16px; height: 16px; }

.content { flex: 1 1 auto; min-width: 0; }
.wrap { max-width: 1400px; margin: 0 auto; padding: 20px; }
.wrap.narrow { max-width: 880px; }
.wrap.flush { padding: 0; max-width: none; }

/* ============================================================
   BUTTONS
   ============================================================ */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  height: 30px; padding: 0 12px; border-radius: var(--r-sm);
  border: 1px solid var(--line-2); background: var(--panel-2); color: var(--t-1);
  font-size: 12.5px; font-weight: 500; white-space: nowrap;
  transition: background .12s, border-color .12s, color .12s, box-shadow .12s;
}
.btn:hover { background: var(--raised); border-color: var(--line-3); }
.btn svg { width: 14px; height: 14px; }
.btn.sm { height: 26px; padding: 0 9px; font-size: 12px; gap: 5px; }
.btn.sm svg { width: 13px; height: 13px; }
.btn.lg { height: 36px; padding: 0 16px; font-size: 13.5px; }
.btn.icon { padding: 0; width: 30px; }
.btn.icon.sm { width: 26px; }
.btn.block { width: 100%; }
.btn.primary { background: var(--accent); border-color: transparent; color: var(--on-accent); font-weight: 600; }
.btn.primary:hover { background: var(--accent-hi); }
.btn.ghost { background: transparent; border-color: transparent; color: var(--t-2); }
.btn.ghost:hover { background: var(--hover); color: var(--t-1); }
.btn.outline { background: transparent; }
.btn.danger { color: var(--red); border-color: rgba(247,101,107,.3); background: var(--red-bg); }
.btn.danger:hover { background: rgba(247,101,107,.2); }
.btn[disabled] { opacity: .45; pointer-events: none; }

.btn-group { display: inline-flex; }
.btn-group .btn { border-radius: 0; border-right-width: 0; }
.btn-group .btn:first-child { border-radius: var(--r-sm) 0 0 var(--r-sm); }
.btn-group .btn:last-child { border-radius: 0 var(--r-sm) var(--r-sm) 0; border-right-width: 1px; }

/* ============================================================
   BADGES / PILLS / STATUS
   ============================================================ */
.badge {
  display: inline-flex; align-items: center; gap: 5px;
  height: 20px; padding: 0 8px; border-radius: 100px;
  font-size: 11px; font-weight: 500; line-height: 1; white-space: nowrap;
  border: 1px solid transparent;
}
.badge .dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; flex: 0 0 auto; }
.badge.open    { color: var(--green); background: var(--green-bg); border-color: rgba(63,185,80,.25); }
.badge.answered{ color: var(--blue);  background: var(--blue-bg);  border-color: rgba(88,155,245,.25); }
.badge.overdue { color: var(--red);   background: var(--red-bg);   border-color: rgba(247,101,107,.28); }
.badge.closed  { color: var(--t-2);   background: var(--panel-2);  border-color: var(--line-2); }
.badge.pending { color: var(--amber); background: var(--amber-bg); border-color: rgba(210,153,34,.25); }
.badge.accent  { color: var(--accent-hi); background: var(--accent-dim); border-color: var(--accent-line); }
.badge.neutral { color: var(--t-2); background: var(--panel-2); border-color: var(--line-2); }
.badge.sq { border-radius: 5px; height: 19px; padding: 0 6px; font-family: var(--mono); font-size: 10.5px; }

.prio { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; white-space: nowrap; }
.prio .bar { width: 3px; height: 12px; border-radius: 2px; }
.prio.emergency .bar { background: var(--red); }
.prio.high .bar { background: var(--amber); }
.prio.normal .bar { background: var(--blue); }
.prio.low .bar { background: var(--t-4); }

/* ============================================================
   CARDS / PANELS
   ============================================================ */
.card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
}
.card-h {
  display: flex; align-items: center; gap: 10px;
  padding: 11px 14px; border-bottom: 1px solid var(--line);
}
.card-h h3 { font-size: 13px; font-weight: 600; color: var(--t-0); letter-spacing: -.005em; }
.card-h .sub { font-size: 11.5px; color: var(--t-3); }
.card-b { padding: 14px; }
.card-b.flush { padding: 0; }

.kgrid { display: grid; gap: 12px; }

/* stat tiles */
.stat {
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--r-lg);
  padding: 14px 15px; position: relative; overflow: hidden;
}
.stat .lbl { font-size: 11.5px; color: var(--t-3); display: flex; align-items: center; gap: 6px; }
.stat .lbl svg { width: 14px; height: 14px; opacity: .7; }
.stat .val { font-size: 26px; font-weight: 600; letter-spacing: -.02em; color: var(--t-0); margin-top: 7px; font-family: var(--mono); }
.stat .delta { font-size: 11.5px; margin-top: 4px; display: flex; align-items: center; gap: 4px; }
.stat .delta.up { color: var(--green); }
.stat .delta.down { color: var(--red); }
.stat .delta.flat { color: var(--t-3); }

/* ============================================================
   TABLES (the dense queue)
   ============================================================ */
.tbl-wrap { width: 100%; overflow-x: auto; }
table.tbl { width: 100%; border-collapse: collapse; font-size: 12.5px; }
table.tbl thead th {
  text-align: left; font-weight: 500; color: var(--t-3); font-size: 11px;
  text-transform: uppercase; letter-spacing: .04em;
  padding: 8px 12px; border-bottom: 1px solid var(--line); white-space: nowrap;
  position: sticky; top: 0; background: var(--bg); z-index: 1;
}
table.tbl thead th.sortable { cursor: pointer; }
table.tbl thead th.sortable:hover { color: var(--t-1); }
table.tbl tbody td { padding: 0 12px; height: 38px; border-bottom: 1px solid var(--line); color: var(--t-1); vertical-align: middle; }
table.tbl tbody tr { transition: background .1s; }
table.tbl tbody tr:hover { background: var(--hover); cursor: pointer; }
table.tbl tbody tr.unread td { background: rgba(123,131,235,.035); }
table.tbl tbody tr.unread .subj { font-weight: 600; color: var(--t-0); }
table.tbl .num { font-family: var(--mono); color: var(--t-2); font-size: 12px; }
table.tbl .subj { color: var(--t-0); }
table.tbl .muted { color: var(--t-3); }
table.tbl td.shrink { width: 1px; white-space: nowrap; }
.unread-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--accent); display: inline-block; }

.ck { appearance: none; width: 15px; height: 15px; border: 1px solid var(--line-3); border-radius: 4px; background: var(--panel); position: relative; flex: 0 0 auto; transition: .12s; }
.ck:hover { border-color: var(--accent); }
.ck:checked { background: var(--accent); border-color: var(--accent); }
.ck:checked::after { content: ''; position: absolute; left: 4.5px; top: 1.5px; width: 4px; height: 8px; border: solid var(--on-accent); border-width: 0 2px 2px 0; transform: rotate(45deg); }

/* ============================================================
   FORMS
   ============================================================ */
.field { margin-bottom: 14px; }
.field > label { display: block; font-size: 12px; font-weight: 500; color: var(--t-1); margin-bottom: 6px; }
.field .hint { font-size: 11.5px; color: var(--t-3); margin-top: 5px; }
.req { color: var(--red); }

.input, .select, textarea.input {
  width: 100%; height: 32px; padding: 0 10px;
  background: var(--panel); border: 1px solid var(--line-2); border-radius: var(--r-sm);
  color: var(--t-0); font-size: 13px; transition: border-color .12s, box-shadow .12s;
}
textarea.input { height: auto; padding: 9px 10px; resize: vertical; line-height: 1.5; }
.input::placeholder, textarea.input::placeholder { color: var(--t-4); }
.input:focus, .select:focus, textarea.input:focus {
  outline: none; border-color: var(--accent-line); box-shadow: 0 0 0 3px var(--accent-dim);
}
.select { appearance: none; background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%236a6a73' stroke-width='2.5'><path d='M6 9l6 6 6-6'/></svg>"); background-repeat: no-repeat; background-position: right 9px center; padding-right: 28px; }
.input.sm, .select.sm { height: 28px; font-size: 12.5px; }

.toggle { width: 34px; height: 20px; border-radius: 100px; background: var(--line-3); border: none; position: relative; transition: background .15s; flex: 0 0 auto; }
.toggle::after { content: ''; position: absolute; left: 2px; top: 2px; width: 16px; height: 16px; border-radius: 50%; background: #fff; transition: transform .15s; }
.toggle.on { background: var(--accent); }
.toggle.on::after { transform: translateX(14px); }

/* segmented control / tabs */
.seg { display: inline-flex; background: var(--panel); border: 1px solid var(--line); border-radius: var(--r); padding: 2px; gap: 2px; }
.seg button { height: 26px; padding: 0 11px; border: none; background: transparent; color: var(--t-2); font-size: 12.5px; font-weight: 500; border-radius: var(--r-sm); display: inline-flex; align-items: center; gap: 6px; }
.seg button:hover { color: var(--t-0); }
.seg button.on { background: var(--raised); color: var(--t-0); box-shadow: 0 1px 2px rgba(0,0,0,.3); }
.seg button .count { font-family: var(--mono); font-size: 10.5px; color: var(--t-3); }
.seg button.on .count { color: var(--accent-hi); }

.tabs { display: flex; gap: 2px; border-bottom: 1px solid var(--line); }
.tabs a { padding: 9px 12px; font-size: 13px; color: var(--t-2); font-weight: 450; border-bottom: 2px solid transparent; margin-bottom: -1px; display: inline-flex; gap: 7px; align-items: center; }
.tabs a:hover { color: var(--t-0); }
.tabs a.on { color: var(--t-0); border-bottom-color: var(--accent); font-weight: 500; }
.tabs a .count { font-family: var(--mono); font-size: 11px; color: var(--t-3); background: var(--panel-2); padding: 0 6px; border-radius: 4px; }

.toolbar { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }

/* utility */
.row { display: flex; align-items: center; gap: 8px; }
.col { display: flex; flex-direction: column; }
.gap4{gap:4px}.gap6{gap:6px}.gap8{gap:8px}.gap10{gap:10px}.gap12{gap:12px}.gap16{gap:16px}
.wrap-flex { flex-wrap: wrap; }
.spacer { flex: 1 1 auto; }
.muted { color: var(--t-3); }
.t2 { color: var(--t-2); }
.t0 { color: var(--t-0); }
.hr { height: 1px; background: var(--line); border: none; }
.nowrap { white-space: nowrap; }
.right { text-align: right; }
.hide-mobile { }
.only-mobile { display: none !important; }

/* density tweak */
body[data-density="compact"] { font-size: 12.5px; --top-h: 44px; }
body[data-density="compact"] table.tbl tbody td { height: 32px; }
body[data-density="compact"] .nav-item { height: 28px; }
body[data-density="compact"] .btn { height: 28px; }
body[data-density="compact"] .card-b { padding: 11px; }

/* tweaks panel (vanilla, injected by shell.js) */
#kt-panel { position: fixed; right: 16px; bottom: 16px; z-index: 90; width: 270px;
  background: var(--panel); border: 1px solid var(--line-2); border-radius: var(--r-lg);
  box-shadow: var(--shadow-lg); display: none; overflow: hidden; }
body.kt-open #kt-panel { display: block; }
#kt-panel .kt-h { display: flex; align-items: center; gap: 8px; padding: 11px 13px; border-bottom: 1px solid var(--line); }
#kt-panel .kt-h h4 { font-size: 12.5px; font-weight: 600; color: var(--t-0); }
#kt-panel .kt-b { padding: 13px; display: flex; flex-direction: column; gap: 14px; }
#kt-panel .kt-lbl { font-size: 11px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; color: var(--t-3); margin-bottom: 8px; }
#kt-panel .kt-sw { display: flex; gap: 8px; }
#kt-panel .kt-sw button { width: 30px; height: 30px; border-radius: 50%; border: 2px solid transparent; cursor: pointer; padding: 0; position: relative; }
#kt-panel .kt-sw button.on { border-color: var(--t-0); }

/* tooltip-ish meta list */
.dl { display: grid; grid-template-columns: auto 1fr; gap: 9px 14px; align-items: center; font-size: 12.5px; }
.dl dt { color: var(--t-3); white-space: nowrap; }
.dl dd { color: var(--t-1); text-align: right; }

/* ============================================================
   SHARED CRUD PRIMITIVES — drawer, modal, drag-rows, builders
   ============================================================ */
/* slide-in drawer (right) — used by all edit/create flows */
.scrim { position: fixed; inset: 0; background: rgba(0,0,0,.5); z-index: 50; opacity: 0; pointer-events: none; transition: opacity .2s; }
body.drawer-open .scrim { opacity: 1; pointer-events: auto; }
.drawer { position: fixed; top: 0; right: 0; bottom: 0; width: 460px; max-width: 94vw; background: var(--bg-2); border-left: 1px solid var(--line);
  z-index: 51; transform: translateX(100%); transition: transform .24s cubic-bezier(.4,0,.2,1); display: flex; flex-direction: column; box-shadow: var(--shadow-lg); }
body.drawer-open .drawer { transform: translateX(0); }
.drawer.wide { width: 560px; }
.drawer-h { display: flex; align-items: center; gap: 11px; padding: 14px 16px; border-bottom: 1px solid var(--line); flex: 0 0 auto; }
.drawer-h h2 { font-size: 15px; font-weight: 600; color: var(--t-0); }
.drawer-b { flex: 1 1 auto; overflow-y: auto; padding: 16px; }
.drawer-f { flex: 0 0 auto; display: flex; gap: 8px; padding: 12px 16px; border-top: 1px solid var(--line); background: var(--bg-2); }
.section-label { font-size: 11px; font-weight: 600; letter-spacing: .05em; text-transform: uppercase; color: var(--t-4); margin: 18px 0 8px; }
.section-label:first-child { margin-top: 0; }

/* centered modal / confirm dialog */
.modal-scrim { position: fixed; inset: 0; background: rgba(0,0,0,.6); z-index: 70; display: grid; place-items: center; padding: 20px;
  opacity: 0; pointer-events: none; transition: opacity .16s; }
body.modal-open .modal-scrim { opacity: 1; pointer-events: auto; }
#reauth-scrim { transition: opacity .16s; }
body.reauth-open #reauth-scrim { opacity: 1; pointer-events: auto; }
body.reauth-open #reauth-scrim .modal { transform: none; }
.modal { width: 420px; max-width: 100%; background: var(--panel); border: 1px solid var(--line-2); border-radius: var(--r-xl);
  box-shadow: var(--shadow-lg); overflow: hidden; transform: scale(.96) translateY(6px); transition: transform .16s; }
body.modal-open .modal { transform: none; }
.modal-b { padding: 18px; display: flex; gap: 13px; }
.modal-b .ic { width: 38px; height: 38px; border-radius: 10px; display: grid; place-items: center; flex: 0 0 auto; }
.modal-b .ic svg { width: 19px; height: 19px; }
.modal-b .ic.danger { background: var(--red-bg); color: var(--red); }
.modal-b .ic.warn { background: var(--amber-bg); color: var(--amber); }
.modal-b h3 { font-size: 14.5px; font-weight: 600; color: var(--t-0); }
.modal-b p { font-size: 12.5px; color: var(--t-2); margin-top: 5px; line-height: 1.5; }
.modal-b p b { color: var(--t-0); font-weight: 600; }
.modal-f { display: flex; gap: 8px; justify-content: flex-end; padding: 12px 16px; border-top: 1px solid var(--line); background: var(--bg-2); }
@media (prefers-reduced-motion: no-preference) { body.modal-open .modal { animation: kt-pop .16s ease-out; } }

/* toasts (mounted by shell.js as #kt-toasts) */
#kt-toasts { position: fixed; bottom: 16px; left: 50%; transform: translateX(-50%); z-index: 95;
  display: flex; flex-direction: column; gap: 8px; align-items: center; pointer-events: none; width: max-content; max-width: calc(100vw - 24px); }
.kt-toast { display: flex; align-items: center; gap: 10px; padding: 9px 13px 9px 11px; border-radius: var(--r-lg);
  background: var(--raised); border: 1px solid var(--line-2); box-shadow: var(--shadow-lg); color: var(--t-0);
  font-size: 12.5px; font-weight: 450; pointer-events: auto; max-width: 100%; }
.kt-toast .ti { width: 20px; height: 20px; border-radius: 6px; display: grid; place-items: center; flex: 0 0 auto; }
.kt-toast .ti svg { width: 13px; height: 13px; }
.kt-toast.ok .ti { background: var(--green-bg); color: var(--green); }
.kt-toast.info .ti { background: var(--accent-dim); color: var(--accent-hi); }
.kt-toast.del .ti { background: var(--red-bg); color: var(--red); }
.kt-toast .undo { margin-left: 4px; color: var(--accent-hi); font-weight: 600; background: none; border: none; font-size: 12px; }
.kt-toast .undo:hover { text-decoration: underline; }
.kt-toast b { font-weight: 600; }
@media (prefers-reduced-motion: no-preference) {
  @keyframes kt-toast-in { from { opacity: 0; transform: translateY(8px) scale(.97); } to { opacity: 1; transform: none; } }
  @keyframes kt-toast-out { to { opacity: 0; transform: translateY(6px); } }
  .kt-toast { animation: kt-toast-in .18s cubic-bezier(.2,.7,.3,1); }
  .kt-toast.leaving { animation: kt-toast-out .16s ease forwards; }
}

/* settings-style row (label/desc + control) reused across admin */
.set-row { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.set-row:last-child { border-bottom: none; }
.set-row .info { min-width: 0; flex: 1; }
.set-row .info .lbl { font-size: 13px; color: var(--t-0); font-weight: 500; }
.set-row .info .dsc { font-size: 11.5px; color: var(--t-3); margin-top: 3px; line-height: 1.45; }
.set-row .ctrl { flex: 0 0 auto; display: flex; align-items: center; gap: 8px; }

/* draggable list rows (form fields, queue columns) */
.drag-row { display: flex; align-items: center; gap: 11px; padding: 9px 11px; background: var(--panel); border: 1px solid var(--line); border-radius: var(--r); transition: border-color .12s, background .12s; }
.drag-row + .drag-row { margin-top: 7px; }
.drag-row:hover { border-color: var(--line-3); }
.drag-row.dragging { opacity: .5; }
.drag-handle { color: var(--t-4); cursor: grab; display: flex; flex: 0 0 auto; }
.drag-handle:active { cursor: grabbing; }
.drag-handle svg { width: 15px; height: 15px; }
.drag-row .grow { flex: 1 1 auto; min-width: 0; }
.drag-row .r-acts { display: flex; gap: 3px; flex: 0 0 auto; opacity: 0; transition: opacity .12s; }
.drag-row:hover .r-acts { opacity: 1; }

/* field-type badge */
.ftype { display: inline-flex; align-items: center; gap: 5px; height: 19px; padding: 0 7px; border-radius: 5px; font-size: 10.5px; font-weight: 600;
  font-family: var(--mono); letter-spacing: .02em; color: var(--t-2); background: var(--panel-2); border: 1px solid var(--line-2); white-space: nowrap; }
.ftype svg { width: 11px; height: 11px; opacity: .8; }
.ftype.text { color: var(--blue); border-color: rgba(88,155,245,.28); background: var(--blue-bg); }
.ftype.choice { color: var(--violet); border-color: rgba(163,113,247,.28); background: var(--violet-bg); }
.ftype.date { color: var(--teal); border-color: rgba(43,182,163,.28); background: var(--teal-bg); }
.ftype.bool { color: var(--amber); border-color: rgba(210,153,34,.28); background: var(--amber-bg); }
.ftype.section { color: var(--t-3); }

/* condition / criteria builder rows */
.cond { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.cond + .cond { margin-top: 8px; }
.cond .join { font-family: var(--mono); font-size: 10.5px; font-weight: 600; color: var(--accent-hi); background: var(--accent-dim);
  border: 1px solid var(--accent-line); border-radius: 4px; padding: 2px 7px; flex: 0 0 auto; }
.cond .select, .cond .input { height: 30px; }
.cond .x { color: var(--t-4); flex: 0 0 auto; display: flex; cursor: pointer; }
.cond .x:hover { color: var(--red); }

/* ============================================================
   MOTION — subtle, attention-guiding, reduced-motion safe
   ============================================================ */
/* notification badge on bell */
.has-notif { position: relative; }
.has-notif::after { content: ''; position: absolute; top: 4px; right: 4px; width: 7px; height: 7px;
  border-radius: 50%; background: var(--red); border: 1.5px solid var(--bg); }
.has-notif.cleared::after { display: none; }
.has-notif.cleared::before { display: none; animation: none; }

/* notifications dropdown (injected by shell.js) */
#notif-panel { position: fixed; top: calc(var(--top-h) + 6px); right: 12px; width: 372px; max-width: calc(100vw - 20px);
  background: var(--panel); border: 1px solid var(--line-2); border-radius: var(--r-lg); box-shadow: var(--shadow-lg);
  z-index: 60; display: none; overflow: hidden; transform-origin: top right; }
body.notif-open #notif-panel { display: block; }
#notif-backdrop { position: fixed; inset: 0; z-index: 55; display: none; }
body.notif-open #notif-backdrop { display: block; }
.nf-h { display: flex; align-items: center; gap: 8px; padding: 11px 13px; border-bottom: 1px solid var(--line); }
.nf-h h4 { font-size: 13px; font-weight: 600; color: var(--t-0); }
.nf-h .seg { margin-left: 2px; }
.nf-h .mark { margin-left: auto; font-size: 11.5px; color: var(--accent-hi); background: none; border: none; white-space: nowrap; }
.nf-h .mark:hover { text-decoration: underline; }
.nf-list { max-height: min(460px, 66vh); overflow-y: auto; }
.nf-empty { padding: 34px 14px; text-align: center; color: var(--t-3); font-size: 12.5px; display: none; }
.nf-item { display: flex; gap: 11px; padding: 11px 13px 11px 18px; border-bottom: 1px solid var(--line); position: relative; cursor: pointer; transition: background .1s; }
.nf-item:last-child { border-bottom: none; }
.nf-item:hover { background: var(--hover); }
.nf-item.unread { background: rgba(123,131,235,.045); }
.nf-item.unread::before { content: ''; position: absolute; left: 7px; top: 17px; width: 6px; height: 6px; border-radius: 50%; background: var(--accent); }
.nf-item.urgent.unread::before { background: var(--red); }
.nf-ic { width: 30px; height: 30px; border-radius: 8px; display: grid; place-items: center; flex: 0 0 auto; }
.nf-ic svg { width: 15px; height: 15px; }
.nf-tx { font-size: 12.5px; color: var(--t-2); line-height: 1.45; min-width: 0; }
.nf-tx b { color: var(--t-0); font-weight: 500; }
.nf-tx .num { font-family: var(--mono); color: var(--t-1); }
.nf-tx .tm { display: block; font-size: 10.5px; color: var(--t-4); font-family: var(--mono); margin-top: 3px; }
.nf-item.urgent .nf-tx b:first-child { color: var(--red); }
.nf-f { padding: 9px 13px; border-top: 1px solid var(--line); }
.nf-f a { display: flex; align-items: center; justify-content: center; gap: 6px; font-size: 12.5px; color: var(--t-2); }
.nf-f a:hover { color: var(--t-0); }

@media (prefers-reduced-motion: no-preference) {
  @keyframes kt-pop { from { opacity: 0; transform: scale(.97) translateY(-4px); } to { opacity: 1; transform: none; } }
  body.notif-open #notif-panel { animation: kt-pop .14s ease-out; }
}

/* live dot used in feeds/headers */
.live-dot { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--green); flex: 0 0 auto; }

@media (prefers-reduced-motion: no-preference) {
  @keyframes kt-fade-up { from { opacity: 0; transform: translateY(7px); } to { opacity: 1; transform: none; } }
  @keyframes kt-fade-in { from { opacity: 0; } to { opacity: 1; } }
  @keyframes kt-grow-y { from { transform: scaleY(0); } to { transform: scaleY(1); } }
  /* urgent: slow ring glow */
  @keyframes kt-urgent { 0%, 100% { box-shadow: 0 0 0 0 rgba(247,101,107,0); } 50% { box-shadow: 0 0 0 3px rgba(247,101,107,.16); } }
  @keyframes kt-urgent-amber { 0%, 100% { box-shadow: 0 0 0 0 rgba(210,153,34,0); } 50% { box-shadow: 0 0 0 3px rgba(210,153,34,.18); } }
  /* gentle opacity breathe */
  @keyframes kt-breathe { 0%, 100% { opacity: 1; } 50% { opacity: .45; } }
  /* expanding live ring */
  @keyframes kt-ping { 0% { box-shadow: 0 0 0 0 rgba(63,185,80,.5); } 70% { box-shadow: 0 0 0 6px rgba(63,185,80,0); } 100% { box-shadow: 0 0 0 0 rgba(63,185,80,0); } }
  @keyframes kt-notif-ping { 0% { transform: scale(1); opacity: .7; } 70%, 100% { transform: scale(2.6); opacity: 0; } }

  .anim-in { animation: kt-fade-up .42s cubic-bezier(.2,.7,.3,1) both; }
  .anim-fade { animation: kt-fade-in .5s ease both; }

  /* urgency cues */
  .badge.overdue.pulse { animation: kt-urgent 2.6s ease-in-out infinite; }
  .sla-chip.urgent { animation: kt-urgent-amber 2.6s ease-in-out infinite; }
  .sla-mini.over { animation: kt-breathe 2s ease-in-out infinite; }
  .unread-dot { animation: kt-breathe 2.4s ease-in-out infinite; }

  /* live dot ping */
  .live-dot { animation: kt-ping 2s ease-out infinite; }

  /* notification badge ping */
  .has-notif::before { content: ''; position: absolute; top: 4px; right: 4px; width: 7px; height: 7px;
    border-radius: 50%; background: var(--red); animation: kt-notif-ping 2.4s ease-out infinite; }

  /* hover lift affordance for clickable cards already handled per-page; add press feedback */
  .btn:active { transform: translateY(.5px); }

  /* toast check-icon draws itself in */
  .kt-toast.ok .ti svg path { stroke-dasharray: 22; stroke-dashoffset: 22; animation: kt-draw .4s .05s ease forwards; }
  @keyframes kt-draw { to { stroke-dashoffset: 0; } }

  /* button ripple on primary actions */
  .btn.primary { position: relative; overflow: hidden; }
  .btn.primary .ripple { position: absolute; border-radius: 50%; transform: translate(-50%,-50%) scale(0);
    background: rgba(255,255,255,.4); pointer-events: none; animation: kt-ripple .55s ease-out forwards; }
  @keyframes kt-ripple { to { transform: translate(-50%,-50%) scale(1); opacity: 0; } }

  /* row collapse-out (resolve/delete from a list) */
  @keyframes kt-collapse { 0% { opacity: 1; } 40% { opacity: 0; transform: translateX(14px); } 100% { opacity: 0; transform: translateX(14px); } }
  .kt-removing { animation: kt-collapse .42s cubic-bezier(.4,0,.2,1) forwards; }

  /* resolved stamp on a status pill */
  @keyframes kt-stamp { 0% { transform: scale(1.6); opacity: 0; } 55% { transform: scale(.92); opacity: 1; } 100% { transform: scale(1); } }
  .badge.just-resolved, .q-stat.just-resolved { animation: kt-stamp .4s cubic-bezier(.2,.8,.3,1.2); }

  /* sliding tab/segment underline */
  .seg .seg-glider, .tabs .tab-glider { position: absolute; bottom: 0; height: 2px; background: var(--accent); border-radius: 2px;
    transition: left .26s cubic-bezier(.4,0,.2,1), width .26s cubic-bezier(.4,0,.2,1); }

  /* respect compact: nothing extra */
}

/* ============================================================
   MOTION SAFETY NET — entrance animations must never trap content
   hidden if the animation timeline stalls (e.g. slow/stalled load).
   A JS timeout adds .anim-ready; we then drop entrance animations so
   elements fall back to their visible base state. Pulses are untouched.
   ============================================================ */
html.anim-ready .anim-in,
html.anim-ready .dash > *,
html.anim-ready .thread > *,
html.anim-ready .bars .bar,
html.anim-ready .hero,
html.anim-ready .qa-card,
html.anim-ready .tkt-list .tkt-item { animation: none !important; opacity: 1 !important; transform: none !important; }

/* ============================================================
   MOBILE
   ============================================================ */
.sb-backdrop { display: none; }

@media (max-width: 900px) {
  :root { --sb-w: 250px; }
  .sidebar {
    position: fixed; left: 0; top: 0; bottom: 0; height: 100dvh;
    transform: translateX(-100%); transition: transform .22s cubic-bezier(.4,0,.2,1);
    box-shadow: var(--shadow-lg);
  }
  body.nav-open .sidebar { transform: translateX(0); }
  .sb-backdrop { position: fixed; inset: 0; background: rgba(0,0,0,.55); z-index: 35; opacity: 0; pointer-events: none; transition: opacity .2s; }
  body.nav-open .sb-backdrop { display: block; opacity: 1; pointer-events: auto; }
  .hamburger { display: inline-flex; }
  .wrap { padding: 14px; }
  .hide-mobile { display: none !important; }
  .only-mobile { display: revert !important; }
}

/* ============================================================
   STATES KIT — empty / loading / error
   ============================================================ */
.empty-state { display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center;
  padding: 48px 24px; gap: 4px; }
.empty-state .es-ic { width: 52px; height: 52px; border-radius: 14px; display: grid; place-items: center; margin-bottom: 12px;
  background: var(--panel-2); border: 1px solid var(--line-2); color: var(--t-3); }
.empty-state .es-ic svg { width: 24px; height: 24px; }
.empty-state.accent .es-ic { background: var(--accent-dim); border-color: var(--accent-line); color: var(--accent-hi); }
.empty-state.danger .es-ic { background: var(--red-bg); border-color: rgba(247,101,107,.3); color: var(--red); }
.empty-state h3 { font-size: 15px; font-weight: 600; color: var(--t-0); letter-spacing: -.01em; }
.empty-state p { font-size: 13px; color: var(--t-3); max-width: 360px; line-height: 1.5; margin-top: 2px; }
.empty-state .es-acts { display: flex; gap: 8px; margin-top: 14px; flex-wrap: wrap; justify-content: center; }

/* skeleton loaders */
.skeleton { position: relative; overflow: hidden; background: var(--panel-2); border-radius: var(--r-sm); }
.skeleton::after { content: ''; position: absolute; inset: 0; transform: translateX(-100%);
  background: linear-gradient(90deg, transparent, rgba(255,255,255,.045), transparent); }
@media (prefers-reduced-motion: no-preference) {
  @keyframes kt-shimmer { 100% { transform: translateX(100%); } }
  .skeleton::after { animation: kt-shimmer 1.3s infinite; }
}
.sk-line { height: 10px; border-radius: 4px; }
.sk-line.sh { height: 8px; }
.sk-circle { border-radius: 50%; flex: 0 0 auto; }
.sk-row { display: flex; align-items: center; gap: 12px; padding: 11px 12px; border-bottom: 1px solid var(--line); }
.sk-row .sk-grow { flex: 1; display: flex; flex-direction: column; gap: 7px; }

/* inline connection / error banner */
.conn-banner { display: flex; align-items: center; gap: 10px; padding: 9px 14px; font-size: 12.5px; font-weight: 450;
  border-bottom: 1px solid transparent; }
.conn-banner svg { width: 15px; height: 15px; flex: 0 0 auto; }
.conn-banner.offline { background: var(--amber-bg); color: var(--amber); border-bottom-color: rgba(210,153,34,.25); }
.conn-banner.error { background: var(--red-bg); color: var(--red); border-bottom-color: rgba(247,101,107,.25); }
.conn-banner .spacer { flex: 1; }
.conn-banner button { background: none; border: 1px solid currentColor; color: inherit; border-radius: 5px; height: 24px; padding: 0 9px; font-size: 11.5px; font-weight: 600; opacity: .9; }
.conn-banner button:hover { opacity: 1; }

/* ============================================================
   COMMAND PALETTE (⌘K) — injected by shell.js
   ============================================================ */
#cmdk-scrim { position: fixed; inset: 0; background: rgba(0,0,0,.55); z-index: 80; display: none;
  align-items: flex-start; justify-content: center; padding: 72px 16px 16px; backdrop-filter: blur(2px); }
body.cmdk-open #cmdk-scrim { display: flex; }
.cmdk { width: 100%; max-width: 600px; background: var(--panel); border: 1px solid var(--line-2); border-radius: var(--r-xl);
  box-shadow: var(--shadow-lg); overflow: hidden; display: flex; flex-direction: column; max-height: min(560px, 80vh); }
.cmdk-in { display: flex; align-items: center; gap: 11px; padding: 14px 16px; border-bottom: 1px solid var(--line); flex: 0 0 auto; }
.cmdk-in svg { width: 17px; height: 17px; color: var(--t-3); flex: 0 0 auto; }
.cmdk-in input { flex: 1; border: none; background: transparent; color: var(--t-0); font-size: 15px; outline: none; }
.cmdk-in input::placeholder { color: var(--t-4); }
.cmdk-in .esc { font-family: var(--mono); font-size: 10.5px; color: var(--t-4); border: 1px solid var(--line-2); border-radius: 4px; padding: 2px 6px; }
.cmdk-list { overflow-y: auto; padding: 6px; flex: 1 1 auto; }
.cmdk-grp { font-size: 10px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--t-4); padding: 9px 10px 4px; }
.cmdk-item { display: flex; align-items: center; gap: 11px; padding: 8px 10px; border-radius: var(--r-sm); cursor: pointer; }
.cmdk-item .ci { width: 26px; height: 26px; border-radius: 7px; display: grid; place-items: center; flex: 0 0 auto;
  background: var(--panel-2); border: 1px solid var(--line-2); color: var(--t-2); }
.cmdk-item .ci svg { width: 14px; height: 14px; }
.cmdk-item.ticket .ci { font-family: var(--mono); font-size: 9px; color: var(--accent-hi); background: var(--accent-dim); border-color: var(--accent-line); }
.cmdk-item .ctx { min-width: 0; flex: 1; }
.cmdk-item .ct { font-size: 13.5px; color: var(--t-0); font-weight: 450; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cmdk-item .cs { font-size: 11.5px; color: var(--t-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cmdk-item .ck { font-family: var(--mono); font-size: 10.5px; color: var(--t-4); border: 1px solid var(--line-2); border-radius: 4px; padding: 1px 6px; flex: 0 0 auto; }
.cmdk-item.sel { background: var(--active); }
.cmdk-item.sel .ct { color: var(--t-0); font-weight: 500; }
.cmdk-item.sel .ci { border-color: var(--accent-line); }
.cmdk-empty { padding: 34px 16px; text-align: center; color: var(--t-3); font-size: 13px; }
.cmdk-foot { display: flex; align-items: center; gap: 14px; padding: 8px 14px; border-top: 1px solid var(--line); flex: 0 0 auto; font-size: 11px; color: var(--t-4); }
.cmdk-foot .k { font-family: var(--mono); border: 1px solid var(--line-2); border-radius: 3px; padding: 0 5px; color: var(--t-3); margin-right: 4px; }
@media (prefers-reduced-motion: no-preference) { body.cmdk-open .cmdk { animation: kt-pop .15s ease-out; } }

/* ============================================================
   KEYBOARD SHORTCUTS OVERLAY (?) — injected by shell.js
   ============================================================ */
#kbd-scrim { position: fixed; inset: 0; background: rgba(0,0,0,.6); z-index: 80; display: none; place-items: center; padding: 16px; }
body.kbd-open #kbd-scrim { display: grid; }
.kbd-card { width: 100%; max-width: 580px; background: var(--panel); border: 1px solid var(--line-2); border-radius: var(--r-xl); box-shadow: var(--shadow-lg); overflow: hidden; }
.kbd-h { display: flex; align-items: center; gap: 9px; padding: 13px 16px; border-bottom: 1px solid var(--line); }
.kbd-h h3 { font-size: 14px; font-weight: 600; color: var(--t-0); }
.kbd-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 0 28px; padding: 8px 16px 16px; }
.kbd-sec { padding-top: 12px; }
.kbd-sec .st { font-size: 10px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--t-4); padding: 6px 0 3px; }
.kbd-line { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 6px 0; border-bottom: 1px solid var(--line); font-size: 12.5px; color: var(--t-1); }
.kbd-line:last-child { border-bottom: none; }
.kbd-line .keys { display: flex; gap: 4px; flex: 0 0 auto; }
.kbd-line .keys kbd { font-family: var(--mono); font-size: 10.5px; color: var(--t-2); background: var(--panel-2); border: 1px solid var(--line-2); border-bottom-width: 2px; border-radius: 4px; padding: 1px 6px; min-width: 18px; text-align: center; }
@media (max-width: 560px) { .kbd-cols { grid-template-columns: 1fr; } }
@media (prefers-reduced-motion: no-preference) { body.kbd-open .kbd-card { animation: kt-pop .15s ease-out; } }

/* ============================================================
   LIGHTBOX (attachment preview) — injected by shell.js
   ============================================================ */
#lightbox { position: fixed; inset: 0; background: rgba(0,0,0,.85); z-index: 85; display: none; flex-direction: column; }
body.lb-open #lightbox { display: flex; }
.lb-bar { display: flex; align-items: center; gap: 12px; padding: 12px 16px; color: var(--t-1); flex: 0 0 auto; }
.lb-bar .nm { font-size: 13px; font-weight: 500; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lb-bar .sz { font-family: var(--mono); font-size: 11px; color: var(--t-3); flex: 0 0 auto; }
.lb-bar .spacer { flex: 1; }
.lb-stage { flex: 1 1 auto; display: grid; place-items: center; padding: 0 16px 20px; min-height: 0; }
.lb-stage .ph { width: min(760px, 90vw); height: min(70vh, 540px); border-radius: var(--r-lg); border: 1px solid var(--line-2);
  background: repeating-linear-gradient(45deg, #16161a, #16161a 12px, #131316 12px, #131316 24px); display: grid; place-items: center; color: var(--t-4); }
.lb-stage .ph svg { width: 60px; height: 60px; }
.lb-nav { position: absolute; top: 50%; transform: translateY(-50%); width: 40px; height: 40px; border-radius: 50%; background: rgba(255,255,255,.08);
  border: 1px solid var(--line-2); color: #fff; display: grid; place-items: center; }
.lb-nav:hover { background: rgba(255,255,255,.16); }
.lb-nav.prev { left: 14px; } .lb-nav.next { right: 14px; }

/* ============================================================
   COLLISION / COLLAB PRESENCE (ticket view) — injected inline
   ============================================================ */
.collab-banner { display: flex; align-items: center; gap: 9px; padding: 8px 14px; font-size: 12.5px;
  background: var(--amber-bg); color: var(--amber); border-bottom: 1px solid rgba(210,153,34,.25); }
.collab-banner svg { width: 14px; height: 14px; flex: 0 0 auto; }
.collab-banner b { font-weight: 600; }
.collab-banner .spacer { flex: 1; }
.live-reply-bar { position: sticky; bottom: 0; display: flex; align-items: center; gap: 9px; margin: 12px; padding: 9px 13px;
  background: var(--accent); color: var(--on-accent); border-radius: var(--r-lg); box-shadow: var(--shadow-lg); font-size: 12.5px; font-weight: 500; cursor: pointer; z-index: 14; }
.live-reply-bar svg { width: 15px; height: 15px; }
.viewers { display: flex; }
.viewers .avatar { margin-left: -7px; border: 2px solid var(--bg-2); }
.viewers .avatar:first-child { margin-left: 0; }
@media (prefers-reduced-motion: no-preference) {
  .live-reply-bar { animation: kt-fade-up .3s cubic-bezier(.2,.7,.3,1); }
  .collab-banner .live-dot { animation: kt-breathe 2s ease-in-out infinite; box-shadow: none; }
}
