/* OVISION SLA — Design tokens
 * Industrial operational tool — dense, dark-first.
 */

:root {
  /* Surface — deep warm-black */
  --bg:           #080a0d;
  --bg-2:         #0c1015;
  --card:         #11151b;
  --card-2:       #161b23;
  --elev:         #1a2028;
  --elev-2:       #232b36;
  --border:       #1f2733;
  --border-2:     #2a3340;
  --border-soft:  #16202c;

  /* Text */
  --text:         #e4e8ee;
  --text-2:       #aab2bf;
  --text-3:       #7c8694;
  --text-4:       #5b6371;
  --text-mute:    #444c58;

  /* Severity — tier */
  --t1:           #ff5733;
  --t1-glow:      rgba(255,87,51,.35);
  --t1-bg:        rgba(255,87,51,.10);
  --t2:           #ffb600;
  --t2-bg:        rgba(255,182,0,.10);
  --t3:           #00d4ff;
  --t3-bg:        rgba(0,212,255,.09);
  --resolved:     #7eb902;
  --resolved-bg:  rgba(126,185,2,.10);

  /* Brand */
  --mint:         #3ddc97;
  --mint-2:       #2bb27a;
  --mint-bg:      rgba(61,220,151,.10);

  /* Sentiment */
  --angry:        #ff2d6f;
  --urgent:       #ff8500;
  --positive:     #7eb902;
  --neutral:      #6e7681;

  /* State */
  --warn:         #ffb600;
  --info:         #00d4ff;
  --ok:           #7eb902;
  --err:          #ff5733;
  --snooze:       #6ab4ff;

  /* Radius */
  --r-xs: 4px;
  --r-sm: 6px;
  --r-md: 8px;
  --r-lg: 12px;
  --r-xl: 16px;

  /* Shadow */
  --shadow-sm: 0 1px 0 rgba(255,255,255,.02), 0 1px 2px rgba(0,0,0,.40);
  --shadow-md: 0 1px 0 rgba(255,255,255,.03), 0 8px 24px -8px rgba(0,0,0,.60);
  --shadow-glow-t1: 0 0 0 1px rgba(255,87,51,.45), 0 0 24px -4px rgba(255,87,51,.45);

  /* Type */
  --font-ui: "Geist", "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
  --font-mono: "JetBrains Mono", "Geist Mono", ui-monospace, "SF Mono", Menlo, monospace;

  /* Layout */
  --sidebar: 232px;
  --topbar:  56px;
  --kpi:     88px;
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  font-family: var(--font-ui);
  font-size: 13.5px;
  line-height: 1.45;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  font-feature-settings: "ss01", "cv11";
  background-image:
    radial-gradient(ellipse 1200px 600px at 88% -10%, rgba(61,220,151,.07), transparent 60%),
    radial-gradient(ellipse 900px 500px at -5% 110%, rgba(0,212,255,.04), transparent 60%);
  background-attachment: fixed;
}
body::before {
  content: "";
  position: fixed; inset: 0;
  background-image: radial-gradient(circle at 1px 1px, rgba(255,255,255,.035) 1px, transparent 0);
  background-size: 24px 24px;
  pointer-events: none;
  z-index: 0;
}

a { color: inherit; text-decoration: none; }
button { font-family: inherit; }
input, select, textarea { font-family: inherit; color: inherit; }

/* Default icon size (defensive — icons sized larger by specific scopes) */
.ic { width: 14px; height: 14px; flex: 0 0 14px; }
.kpi .lbl .ic { width: 12px; height: 12px; flex: 0 0 12px; opacity: .85; }

/* Mono utility */
.mono { font-family: var(--font-mono); font-feature-settings: "tnum","zero"; }
.tnum { font-variant-numeric: tabular-nums; }

/* Headings */
h1,h2,h3,h4 { margin: 0; font-weight: 600; letter-spacing: -0.01em; }
h1 { font-size: 22px; }
h2 { font-size: 17px; }
h3 { font-size: 14px; }
h4 { font-size: 12px; text-transform: uppercase; letter-spacing: .08em; color: var(--text-3); font-weight: 600;}

/* ============ LAYOUT ============ */
.app {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: var(--sidebar) 1fr;
  min-height: 100vh;
}
.sidebar {
  position: sticky; top: 0;
  height: 100vh;
  background: linear-gradient(180deg, #0a0d12 0%, #080a0d 100%);
  border-right: 1px solid var(--border);
  display: flex; flex-direction: column;
  padding: 14px 12px;
  gap: 4px;
}
.brand {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 8px 16px;
  border-bottom: 1px solid var(--border-soft);
  margin-bottom: 10px;
}
.brand-mark {
  width: 28px; height: 28px;
  border-radius: 6px;
  background:
    conic-gradient(from 220deg, var(--mint) 0deg, var(--t3) 120deg, var(--mint) 360deg);
  position: relative;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.10), 0 0 16px -4px rgba(61,220,151,.5);
}
.brand-mark::after {
  content: ""; position: absolute; inset: 6px;
  border-radius: 3px;
  background: #080a0d;
}
.brand-mark::before {
  content: ""; position: absolute; inset: 11px;
  border-radius: 50%;
  background: var(--mint);
  box-shadow: 0 0 8px var(--mint);
}
.brand-text {
  display: flex; flex-direction: column; line-height: 1.1;
}
.brand-text .b1 { font-weight: 700; font-size: 14px; letter-spacing: .02em; }
.brand-text .b2 { font-family: var(--font-mono); font-size: 10px; color: var(--text-3); letter-spacing: .08em; text-transform: uppercase; }

.nav-group {
  display: flex; flex-direction: column; gap: 1px;
  margin-top: 4px;
}
.nav-label {
  font-size: 10px; text-transform: uppercase; letter-spacing: .1em;
  color: var(--text-4); padding: 12px 10px 4px;
  font-weight: 600;
}
.nav-item {
  display: flex; align-items: center; gap: 10px;
  padding: 7px 10px;
  border-radius: 6px;
  color: var(--text-2);
  font-size: 13px;
  cursor: pointer;
  border: 1px solid transparent;
  transition: background .12s ease, color .12s ease;
}
.nav-item:hover { background: rgba(255,255,255,.03); color: var(--text); }
.nav-item.active {
  background: var(--card);
  color: var(--text);
  border-color: var(--border);
  box-shadow: inset 2px 0 0 var(--mint);
}
.nav-item .ic { width: 16px; height: 16px; flex: 0 0 16px; opacity: .85; }
.nav-item .count {
  margin-left: auto;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-3);
  background: rgba(255,255,255,.04);
  border-radius: 99px;
  padding: 1px 7px;
  min-width: 18px;
  text-align: center;
}
.nav-item .count.alert { color: var(--t1); background: var(--t1-bg); }
.nav-item .count.warn { color: var(--t2); background: var(--t2-bg); }

.sidebar-foot {
  margin-top: auto;
  padding-top: 10px;
  border-top: 1px solid var(--border-soft);
  display: flex; align-items: center; gap: 10px;
}
.user-chip {
  display: flex; align-items: center; gap: 9px;
  padding: 6px 8px;
  flex: 1;
  border-radius: 6px;
  cursor: pointer;
}
.user-chip:hover { background: rgba(255,255,255,.03); }
.avatar {
  width: 28px; height: 28px; border-radius: 50%;
  display: grid; place-items: center;
  font-family: var(--font-mono); font-size: 11px; font-weight: 600;
  color: #0a0d12; letter-spacing: -.02em;
  flex: 0 0 28px;
}
.avatar.a-1 { background: linear-gradient(135deg, #3ddc97, #2bb27a); }
.avatar.a-2 { background: linear-gradient(135deg, #ffb600, #ff8500); }
.avatar.a-3 { background: linear-gradient(135deg, #00d4ff, #2a7df0); }
.avatar.a-4 { background: linear-gradient(135deg, #ff5733, #c8351a); }
.avatar.a-5 { background: linear-gradient(135deg, #b46fff, #6d3bd6); }
.avatar.a-6 { background: linear-gradient(135deg, #ff2d6f, #b81b4a); }
.avatar.a-7 { background: linear-gradient(135deg, #7eb902, #4f7a00); color:#080a0d; }
.avatar.a-8 { background: linear-gradient(135deg, #6e7681, #444c58); color:#fff; }
.avatar.lg { width: 40px; height: 40px; font-size: 14px; flex-basis: 40px; }
.avatar.xs { width: 20px; height: 20px; font-size: 9px; flex-basis: 20px; }
.avatar.ghost {
  background: transparent;
  border: 1px dashed var(--border-2);
  color: var(--text-3);
}

.user-chip .meta { line-height: 1.15; }
.user-chip .meta .n { font-size: 13px; font-weight: 500; }
.user-chip .meta .r { font-size: 10px; color: var(--text-3); text-transform: uppercase; letter-spacing: .08em; font-family: var(--font-mono); }

/* ============ MAIN ============ */
.main {
  min-width: 0;
  display: flex; flex-direction: column;
}
.topbar {
  height: var(--topbar);
  position: sticky; top: 0; z-index: 20;
  background: rgba(8,10,13,.78);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
  display: flex; align-items: center;
  padding: 0 22px;
  gap: 14px;
}
.crumbs {
  display: flex; align-items: center; gap: 8px;
  font-size: 13px; color: var(--text-3);
}
.crumbs .sep { color: var(--text-mute); }
.crumbs .here { color: var(--text); font-weight: 500; }

.search {
  flex: 1;
  max-width: 460px;
  position: relative;
}
.search input {
  width: 100%;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 7px 12px 7px 34px;
  font-size: 13px;
  outline: none;
  transition: border-color .12s ease, background .12s ease;
}
.search input:focus { border-color: var(--mint); background: var(--card-2); }
.search .ic {
  position: absolute; left: 11px; top: 50%; transform: translateY(-50%);
  width: 14px; height: 14px; color: var(--text-3);
}
.search .kbd {
  position: absolute; right: 8px; top: 50%; transform: translateY(-50%);
  font-family: var(--font-mono); font-size: 10px; color: var(--text-3);
  border: 1px solid var(--border); padding: 1px 5px; border-radius: 4px;
  background: var(--bg-2);
}
.topbar .right { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.live-pill {
  display: flex; align-items: center; gap: 6px;
  padding: 4px 10px;
  border-radius: 99px;
  background: var(--mint-bg);
  color: var(--mint);
  font-family: var(--font-mono);
  font-size: 10px; text-transform: uppercase; letter-spacing: .08em;
}
.live-pill .dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--mint);
  box-shadow: 0 0 8px var(--mint);
  animation: pulse 1.6s ease-in-out infinite;
}
@keyframes pulse { 0%,100% { opacity: 1;} 50% {opacity: .35;} }

.icon-btn {
  width: 32px; height: 32px;
  display: grid; place-items: center;
  border-radius: 6px;
  border: 1px solid var(--border);
  background: var(--card);
  color: var(--text-2);
  cursor: pointer;
  position: relative;
}
.icon-btn:hover { color: var(--text); background: var(--card-2); }
.icon-btn .ic { width: 15px; height: 15px; }
.icon-btn .dot {
  position: absolute; top: 4px; right: 4px;
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--t1); box-shadow: 0 0 6px var(--t1);
}

/* ============ CONTENT ============ */
.content {
  padding: 22px 22px 60px;
  max-width: 1480px;
  width: 100%;
  margin: 0 auto;
}
.page-head {
  display: flex; align-items: flex-end; justify-content: space-between; gap: 16px;
  margin-bottom: 18px;
}
.page-head .title h1 { font-size: 22px; font-weight: 600; letter-spacing: -.015em; }
.page-head .title .sub {
  margin-top: 4px;
  font-size: 12px; color: var(--text-3);
  font-family: var(--font-mono);
}
.page-head .actions { display: flex; gap: 8px; align-items: center; }

/* ============ BUTTONS ============ */
.btn {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 6px 11px;
  border-radius: 6px;
  border: 1px solid var(--border);
  background: var(--card);
  color: var(--text);
  font-size: 12.5px; font-weight: 500;
  cursor: pointer;
  transition: all .12s ease;
  white-space: nowrap;
}
.btn:hover { border-color: var(--border-2); background: var(--card-2); transform: translateY(-1px); }
.btn .ic { width: 13px; height: 13px; }
.btn.primary {
  background: var(--mint);
  border-color: var(--mint);
  color: #051710;
  font-weight: 600;
}
.btn.primary:hover { background: #4be7a7; border-color: #4be7a7; }
.btn.danger {
  background: var(--t1);
  border-color: var(--t1);
  color: #1a0500;
  font-weight: 600;
}
.btn.warn {
  background: var(--t2);
  border-color: var(--t2);
  color: #1a1000;
  font-weight: 600;
}
.btn.ghost { background: transparent; }
.btn.ghost:hover { background: var(--card); }
.btn.sm { padding: 4px 8px; font-size: 11.5px; gap: 5px; }
.btn.lg { padding: 9px 16px; font-size: 14px; }
.btn.icon-only { padding: 6px; }

/* ============ CARDS ============ */
.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  overflow: hidden;
}
.card-h {
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px;
}
.card-h h3 { font-size: 13.5px; }
.card-b { padding: 14px 16px; }
.card-b.tight { padding: 0; }

/* ============ KPI ============ */
.kpi-strip {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 10px;
  margin-bottom: 18px;
}
.kpi {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 12px 14px;
  position: relative;
  overflow: hidden;
  cursor: pointer;
  transition: border-color .12s ease, transform .12s ease;
}
.kpi:hover { border-color: var(--border-2); transform: translateY(-1px); }
.kpi .lbl {
  font-size: 10.5px; color: var(--text-3);
  text-transform: uppercase; letter-spacing: .08em;
  font-family: var(--font-mono); font-weight: 600;
  display: flex; align-items: center; gap: 6px;
}
.kpi .val {
  font-family: var(--font-mono);
  font-size: 30px; font-weight: 600;
  letter-spacing: -.02em;
  font-variant-numeric: tabular-nums;
  color: var(--text);
  line-height: 1.1;
  margin-top: 6px;
}
.kpi .delta {
  display: inline-flex; align-items: center; gap: 3px;
  font-family: var(--font-mono);
  font-size: 11px;
  margin-top: 6px;
  color: var(--text-3);
}
.kpi .delta.up { color: var(--ok); }
.kpi .delta.down { color: var(--t1); }
.kpi.alert .val { color: var(--t1); }
.kpi.alert::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(180deg, rgba(255,87,51,.10), transparent 60%);
}
.kpi.warn .val { color: var(--t2); }
.kpi.ok .val { color: var(--ok); }

.kpi-spark {
  position: absolute; right: 10px; bottom: 8px;
  opacity: .45;
}

/* ============ BADGES / CHIPS ============ */
.badge {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 2px 7px;
  border-radius: 4px;
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: .08em;
  text-transform: uppercase;
  white-space: nowrap;
  line-height: 1.5;
}
.badge.t1 { background: var(--t1-bg); color: var(--t1); border: 1px solid rgba(255,87,51,.30); }
.badge.t2 { background: var(--t2-bg); color: var(--t2); border: 1px solid rgba(255,182,0,.30); }
.badge.t3 { background: var(--t3-bg); color: var(--t3); border: 1px solid rgba(0,212,255,.30); }
.badge.resolved { background: var(--resolved-bg); color: var(--resolved); border: 1px solid rgba(126,185,2,.30); }
.badge.alerted { background: var(--t1-bg); color: var(--t1); border: 1px solid rgba(255,87,51,.30); }
.badge.pending { background: rgba(255,255,255,.04); color: var(--text-2); border: 1px solid var(--border); }
.badge.answered { background: var(--t3-bg); color: var(--t3); border: 1px solid rgba(0,212,255,.30); }
.badge.snoozed { background: rgba(106,180,255,.10); color: var(--snooze); border: 1px solid rgba(106,180,255,.30); }
.badge.angry { background: rgba(255,45,111,.10); color: var(--angry); border: 1px solid rgba(255,45,111,.30); }
.badge.urgent { background: rgba(255,133,0,.10); color: var(--urgent); border: 1px solid rgba(255,133,0,.30); }
.badge.positive { background: var(--resolved-bg); color: var(--resolved); border: 1px solid rgba(126,185,2,.30); }
.badge.neutral { background: rgba(110,118,129,.10); color: var(--neutral); border: 1px solid rgba(110,118,129,.30); }
.badge.ours { background: var(--t1-bg); color: var(--t1); border: 1px solid rgba(255,87,51,.30); }
.badge.client { background: rgba(106,180,255,.10); color: var(--snooze); border: 1px solid rgba(106,180,255,.30); }
.badge.third { background: rgba(180,111,255,.10); color: #b46fff; border: 1px solid rgba(180,111,255,.30); }

.chip {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 3px 8px;
  border-radius: 99px;
  background: rgba(255,255,255,.04);
  border: 1px solid var(--border);
  color: var(--text-2);
  font-size: 11px;
  font-family: var(--font-mono);
}
.chip .x { color: var(--text-4); cursor: pointer; }

/* ============ TABLE ============ */
.tbl {
  width: 100%;
  border-collapse: collapse;
  font-size: 12.5px;
}
.tbl th, .tbl td {
  padding: 10px 14px;
  text-align: left;
  border-bottom: 1px solid var(--border-soft);
}
.tbl th {
  font-size: 10.5px; text-transform: uppercase; letter-spacing: .08em;
  color: var(--text-3); font-weight: 600;
  font-family: var(--font-mono);
  background: var(--card);
  position: sticky; top: 0;
}
.tbl tr:hover td { background: rgba(255,255,255,.015); }
.tbl td.num { font-family: var(--font-mono); font-variant-numeric: tabular-nums; }

/* ============ TICKET CARD ============ */
.tcard {
  position: relative;
  display: grid;
  grid-template-columns: 4px 1fr auto;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  overflow: hidden;
  transition: border-color .12s ease, transform .12s ease;
  cursor: pointer;
}
.tcard + .tcard { margin-top: 8px; }
.tcard:hover { border-color: var(--border-2); transform: translateY(-1px); }
.tcard .rail { width: 4px; align-self: stretch; }
.tcard .rail.pending  { background: linear-gradient(180deg, #404a5a, #2a3340); }
.tcard .rail.warning  { background: var(--t2); }
.tcard .rail.alert    { background: var(--t2); opacity: .9; }
.tcard .rail.alerted  { background: var(--t1); box-shadow: 0 0 14px var(--t1-glow); animation: railPulse 1.4s ease-in-out infinite; }
.tcard .rail.snoozed  { background: var(--snooze); opacity: .55; }
.tcard .rail.answered { background: var(--t3); }
.tcard .rail.resolved { background: var(--resolved); }
@keyframes railPulse { 0%,100% { opacity: 1;} 50% { opacity: .4;} }

.tcard.alerted { border-color: rgba(255,87,51,.30); }
.tcard.alerted::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(90deg, rgba(255,87,51,.06), transparent 40%);
}

.tcard .body {
  padding: 12px 14px;
  min-width: 0;
  display: flex; flex-direction: column; gap: 6px;
}
.tcard .row1 {
  display: flex; align-items: center; gap: 8px;
  flex-wrap: wrap;
}
.tcard .id {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-3);
  letter-spacing: .02em;
}
.tcard .client {
  font-size: 13px; font-weight: 600;
  color: var(--text);
}
.tcard .dot-sep { color: var(--text-mute); }
.tcard .topic {
  font-size: 12px; color: var(--text-2);
}
.tcard .summary {
  font-size: 13px;
  color: var(--text-2);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-wrap: pretty;
  line-height: 1.4;
}
.tcard .row3 {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  margin-top: 2px;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-3);
}
.tcard .row3 .due.over { color: var(--t1); font-weight: 600; }
.tcard .row3 .due.warn { color: var(--t2); font-weight: 600; }

.tcard .aside {
  display: flex; flex-direction: column;
  align-items: flex-end;
  padding: 12px 14px;
  border-left: 1px solid var(--border-soft);
  gap: 6px;
  min-width: 130px;
}
.tcard .aside .assignee {
  display: flex; align-items: center; gap: 7px;
}
.tcard .aside .assignee .nm {
  font-size: 12px; color: var(--text-2);
}
.tcard .aside .due-ring {
  display: flex; align-items: center; gap: 8px;
}

/* SLA progress bar */
.sla-bar {
  width: 100%;
  height: 4px;
  border-radius: 2px;
  background: rgba(255,255,255,.05);
  overflow: hidden;
  position: relative;
}
.sla-bar > i {
  display: block;
  height: 100%;
  border-radius: 2px;
}
.sla-bar > i.ok { background: var(--ok); }
.sla-bar > i.warn { background: var(--t2); }
.sla-bar > i.alert { background: var(--t1); animation: pulse 1.4s ease-in-out infinite; }

/* SLA ring (small) */
.ring {
  --pct: 50;
  --col: var(--t2);
  width: 30px; height: 30px;
  border-radius: 50%;
  background:
    conic-gradient(var(--col) calc(var(--pct) * 1%), rgba(255,255,255,.06) 0);
  display: grid; place-items: center;
  position: relative;
}
.ring::before {
  content: ""; position: absolute; inset: 3px;
  background: var(--card);
  border-radius: 50%;
}
.ring span {
  position: relative;
  font-family: var(--font-mono);
  font-size: 9px;
  font-weight: 600;
  color: var(--text-2);
}

/* ============ TABS ============ */
.tabs {
  display: flex; align-items: center;
  border-bottom: 1px solid var(--border);
  gap: 2px;
  margin-bottom: 14px;
}
.tab {
  padding: 9px 14px;
  font-size: 13px;
  color: var(--text-3);
  cursor: pointer;
  border-bottom: 2px solid transparent;
  display: inline-flex; align-items: center; gap: 7px;
  margin-bottom: -1px;
}
.tab .n {
  font-family: var(--font-mono); font-size: 10.5px;
  background: rgba(255,255,255,.04);
  padding: 1px 6px; border-radius: 4px; color: var(--text-3);
}
.tab:hover { color: var(--text-2); }
.tab.active {
  color: var(--text);
  border-bottom-color: var(--mint);
  font-weight: 500;
}
.tab.active .n { color: var(--mint); background: var(--mint-bg); }
.tab.alert.active { border-bottom-color: var(--t1); }
.tab.alert.active .n { color: var(--t1); background: var(--t1-bg); }

/* ============ TOOLBAR / FILTERS ============ */
.toolbar {
  display: flex; align-items: center; gap: 8px;
  margin-bottom: 12px;
  flex-wrap: wrap;
}
.filter-pill {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 5px 10px;
  border-radius: 6px;
  border: 1px solid var(--border);
  background: var(--card);
  color: var(--text-2);
  font-size: 12px;
  cursor: pointer;
}
.filter-pill .lbl { color: var(--text-3); font-family: var(--font-mono); font-size: 10.5px; text-transform: uppercase; letter-spacing: .07em; }
.filter-pill:hover { border-color: var(--border-2); color: var(--text); }
.filter-pill.active { border-color: var(--mint); color: var(--mint); background: var(--mint-bg); }

/* ============ ACTIVITY FEED ============ */
.feed { display: flex; flex-direction: column; }
.feed-item {
  display: grid;
  grid-template-columns: 30px 1fr auto;
  gap: 10px;
  padding: 10px 16px;
  border-bottom: 1px solid var(--border-soft);
  align-items: flex-start;
}
.feed-item:last-child { border-bottom: none; }
.feed-item .ic {
  width: 24px; height: 24px;
  border-radius: 50%;
  display: grid; place-items: center;
  background: rgba(255,255,255,.04);
  color: var(--text-2);
  font-size: 11px;
}
.feed-item .ic.take { color: var(--t3); background: var(--t3-bg); }
.feed-item .ic.resolve { color: var(--resolved); background: var(--resolved-bg); }
.feed-item .ic.alert { color: var(--t1); background: var(--t1-bg); }
.feed-item .ic.create { color: var(--mint); background: var(--mint-bg); }
.feed-item .ic.escalate { color: var(--urgent); background: rgba(255,133,0,.10); }
.feed-item .ic.comment { color: var(--text-2); }

.feed-item .txt { font-size: 12.5px; color: var(--text-2); line-height: 1.4; }
.feed-item .txt b { color: var(--text); font-weight: 600; }
.feed-item .txt .id { font-family: var(--font-mono); color: var(--mint); font-size: 11.5px; }
.feed-item .when {
  font-family: var(--font-mono); font-size: 10.5px; color: var(--text-3);
  white-space: nowrap;
  margin-top: 3px;
}

/* ============ CHART placeholder ============ */
.chart-placeholder {
  position: relative;
  width: 100%;
  background:
    linear-gradient(180deg, transparent 0%, transparent 100%),
    linear-gradient(90deg, rgba(255,255,255,.025) 1px, transparent 1px) 0 0/40px 100%,
    linear-gradient(180deg, rgba(255,255,255,.025) 1px, transparent 1px) 0 0/100% 25%;
  border-radius: var(--r-md);
  border: 1px solid var(--border-soft);
}

/* ============ MISC ============ */
.divider { height: 1px; background: var(--border-soft); margin: 12px 0; }
.spacer { flex: 1; }
.kbd {
  font-family: var(--font-mono);
  font-size: 10.5px;
  border: 1px solid var(--border);
  border-bottom-width: 2px;
  background: var(--bg-2);
  padding: 1px 5px;
  border-radius: 4px;
  color: var(--text-2);
}

.dl { display: grid; grid-template-columns: 130px 1fr; gap: 6px 16px; font-size: 12.5px;}
.dl dt { color: var(--text-3); font-family: var(--font-mono); font-size: 11px; text-transform: uppercase; letter-spacing: .07em; }
.dl dd { margin: 0; color: var(--text); }

/* Side icon set (responsibility) */
.side-icon { display: inline-flex; align-items: center; gap: 5px; font-size: 11.5px; }
.side-icon .blob {
  width: 18px; height: 18px; border-radius: 4px;
  display: grid; place-items: center;
  font-size: 10px;
}
.side-icon.ours .blob { background: var(--t1-bg); color: var(--t1); }
.side-icon.client .blob { background: rgba(106,180,255,.12); color: var(--snooze); }
.side-icon.third .blob { background: rgba(180,111,255,.12); color: #b46fff; }
.side-icon.resolved .blob { background: var(--resolved-bg); color: var(--resolved); }

/* Form */
.form-field { display: flex; flex-direction: column; gap: 5px; }
.form-field label {
  font-size: 11px;
  color: var(--text-3);
  text-transform: uppercase; letter-spacing: .07em;
  font-family: var(--font-mono); font-weight: 600;
}
.input, .select, .textarea {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 8px 12px;
  font-size: 13px;
  color: var(--text);
  outline: none;
  transition: border-color .12s ease;
  width: 100%;
}
.input:focus, .select:focus, .textarea:focus { border-color: var(--mint); }
.textarea { resize: vertical; min-height: 80px; }

.switch {
  width: 32px; height: 18px;
  background: var(--elev);
  border-radius: 99px;
  position: relative;
  cursor: pointer;
  border: 1px solid var(--border-2);
  flex: 0 0 32px;
}
.switch::after {
  content: ""; position: absolute;
  width: 12px; height: 12px;
  border-radius: 50%;
  background: var(--text-3);
  top: 2px; left: 2px;
  transition: all .15s ease;
}
.switch.on { background: var(--mint-bg); border-color: var(--mint); }
.switch.on::after { background: var(--mint); left: 16px; }

/* utilities */
.row { display: flex; align-items: center; gap: 8px; }
.col { display: flex; flex-direction: column; gap: 8px; }
.muted { color: var(--text-3); }
.faint { color: var(--text-4); }
.right { margin-left: auto; }
.text-mono { font-family: var(--font-mono); font-variant-numeric: tabular-nums; }
.text-xs { font-size: 11px; }
.text-sm { font-size: 12px; }

/* grid helpers */
.grid-2 { display: grid; grid-template-columns: 1.7fr 1fr; gap: 14px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }

/* scroll */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #1c232d; border-radius: 99px; border: 2px solid var(--bg); }
::-webkit-scrollbar-thumb:hover { background: #2a3340; }

/* responsive */
@media (max-width: 1100px) {
  .kpi-strip { grid-template-columns: repeat(3, 1fr); }
  .grid-2 { grid-template-columns: 1fr; }
}
@media (max-width: 800px) {
  :root { --sidebar: 0px; }
  .sidebar { display: none; }
  .kpi-strip { grid-template-columns: repeat(2, 1fr); }
  .content { padding: 14px 14px 60px; }
  .tcard { grid-template-columns: 4px 1fr; }
  .tcard .aside { border-left: none; border-top: 1px solid var(--border-soft); grid-column: 2; padding: 8px 14px 12px;}
  .topbar { padding: 0 14px; }
  .search { max-width: none; }
}
