/* ===========================================================================
 * Obbify CRM — Design System
 * Built on the Obbify Precision tokens (src/styles/index.css): teal primary,
 * Inter, tabular financial numerals, 12px cards. Dark is canonical for the
 * admin console (trading-terminal legibility); light toggle included.
 * ========================================================================= */

:root {
  /* Brand */
  --teal:           #2dd4bf;
  --teal-deep:      #006b5f;
  --teal-dim:       #14b8a6;
  --teal-soft:      rgba(45, 212, 191, 0.12);
  --indigo:         #6366f1;
  --gold:           #fcd34d;

  /* Status */
  --success:        #10b981;
  --danger:         #ef4444;
  --warning:        #f59e0b;
  --info:           #3b82f6;

  /* Dark surfaces (canonical) */
  --bg:             #0a0c10;
  --bg-grad-1:      #0d1117;
  --surface:        #12161d;
  --surface-2:      #161b24;
  --surface-3:      #1b2230;
  --surface-hover:  #1e2633;
  --border:         #232b38;
  --border-soft:    #1b222e;

  --text:           #e8edf2;
  --text-2:         #aab4c2;
  --text-3:         #6b7888;
  --text-faint:     #495362;

  --radius:         12px;
  --radius-sm:      8px;
  --radius-lg:      16px;
  --radius-pill:    9999px;
  --sidebar-w:      256px;
  --shadow:         0 1px 2px rgba(0,0,0,.4), 0 8px 24px rgba(0,0,0,.25);
  --shadow-lg:      0 24px 60px -12px rgba(0,0,0,.7);

  --font: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
}

html.light {
  --bg:            #f7f9fc;
  --bg-grad-1:     #eef2f8;
  --surface:       #ffffff;
  --surface-2:     #f8fafc;
  --surface-3:     #eef2f7;
  --surface-hover: #f1f5fa;
  --border:        #e6ebf2;
  --border-soft:   #eef2f7;
  --text:          #0d1726;
  --text-2:        #475467;
  --text-3:        #8793a3;
  --text-faint:    #b3bdc9;
  --teal:          #0d9488;
  --teal-deep:     #006b5f;
  --teal-soft:     rgba(13, 148, 136, 0.1);
  --indigo:        #4f46e5;
  --shadow:        0 1px 2px rgba(15,23,42,.04), 0 4px 16px rgba(15,23,42,.05);
  --shadow-lg:     0 24px 60px -12px rgba(15,23,42,.2);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; }
body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-size: 14px;
  line-height: 1.45;
}
.tnum, .mono { font-variant-numeric: tabular-nums; font-feature-settings: "tnum"; }
.pos { color: var(--success); }
.neg { color: var(--danger); }
a { color: inherit; text-decoration: none; }
::-webkit-scrollbar { width: 9px; height: 9px; }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 6px; }
::-webkit-scrollbar-thumb:hover { background: var(--text-faint); }
::-webkit-scrollbar-track { background: transparent; }

/* ---------------------------------------------------------------- Layout -- */
.app { display: grid; grid-template-columns: var(--sidebar-w) 1fr; min-height: 100vh; }
/* Safe default size for any inline icon; specific rules below override. */
.app svg { width: 16px; height: 16px; flex-shrink: 0; }

.sidebar {
  background: var(--surface);
  border-right: 1px solid var(--border);
  display: flex; flex-direction: column;
  position: sticky; top: 0; height: 100vh; overflow-y: auto;
}
.brand {
  display: flex; align-items: center; gap: 11px;
  padding: 20px 20px 16px;
}
.brand svg.brand-mark { width: 34px; height: 34px; flex-shrink: 0; }
.brand-name { font-weight: 800; font-size: 18px; letter-spacing: -.02em; line-height: 1; }
.brand-name span { color: #2541B2; }
.brand-sub { font-size: 11px; color: var(--text-3); letter-spacing: .04em; text-transform: uppercase; font-weight: 600; }

.nav-group-label {
  font-size: 10.5px; font-weight: 700; letter-spacing: .09em; text-transform: uppercase;
  color: var(--text-faint); padding: 16px 22px 7px;
}
.nav { padding: 4px 12px; display: flex; flex-direction: column; gap: 2px; }
.nav-item {
  display: flex; align-items: center; gap: 11px;
  padding: 9px 12px; border-radius: 9px; cursor: pointer;
  color: var(--text-2); font-weight: 500; font-size: 13.5px;
  transition: background .12s, color .12s;
  border: 1px solid transparent;
}
.nav-item svg { width: 18px; height: 18px; flex-shrink: 0; opacity: .85; }
.nav-item:hover { background: var(--surface-hover); color: var(--text); }
.nav-item.active {
  background: var(--teal-soft); color: var(--teal);
  border-color: rgba(45,212,191,.18);
}
.nav-item.active svg { opacity: 1; }
.nav-badge {
  margin-left: auto; font-size: 11px; font-weight: 700;
  background: var(--surface-3); color: var(--text-2);
  padding: 1px 7px; border-radius: 9999px; min-width: 20px; text-align: center;
}
.nav-item.active .nav-badge { background: var(--teal); color: #06231f; }
.nav-badge.alert { background: rgba(239,68,68,.16); color: var(--danger); }

.sidebar-foot { margin-top: auto; padding: 14px; border-top: 1px solid var(--border); }
.env-pill {
  display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--text-3);
  padding: 8px 12px; background: var(--surface-2); border-radius: 9px; border: 1px solid var(--border);
}
.env-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--warning); box-shadow: 0 0 8px var(--warning); }

/* ----------------------------------------------------------------- Main -- */
.main { min-width: 0; display: flex; flex-direction: column; }
.topbar {
  position: sticky; top: 0; z-index: 30;
  display: flex; align-items: center; gap: 16px;
  padding: 14px 28px;
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
}
.topbar h1 { font-size: 19px; font-weight: 700; letter-spacing: -.02em; }
.topbar .crumb { color: var(--text-3); font-weight: 500; font-size: 13px; }
.search {
  margin-left: auto; position: relative; width: 320px; max-width: 38vw;
}
.search input {
  width: 100%; padding: 9px 12px 9px 36px; border-radius: 10px;
  background: var(--surface-2); border: 1px solid var(--border);
  color: var(--text); font-size: 13.5px; font-family: var(--font);
}
.search input::placeholder { color: var(--text-faint); }
.search input:focus { outline: 2px solid var(--teal); outline-offset: 0; border-color: transparent; }
.search svg { position: absolute; left: 11px; top: 50%; transform: translateY(-50%); width: 16px; height: 16px; color: var(--text-3); }

.iconbtn {
  width: 38px; height: 38px; border-radius: 10px; display: grid; place-items: center;
  background: var(--surface-2); border: 1px solid var(--border); color: var(--text-2); cursor: pointer;
  transition: .12s;
}
.iconbtn:hover { background: var(--surface-hover); color: var(--text); }
.iconbtn svg { width: 18px; height: 18px; }

.content { padding: 26px 28px 60px; max-width: 1560px; width: 100%; }
.search-result {
  position: absolute; top: 46px; left: 0; right: 0; background: var(--surface); border: 1px solid var(--border);
  border-radius: 12px; box-shadow: var(--shadow-lg); overflow: hidden; z-index: 50; max-height: 60vh; overflow-y: auto;
}
.search-result .row { padding: 10px 14px; display: flex; gap: 10px; align-items: center; cursor: pointer; }
.search-result .row:hover { background: var(--surface-hover); }
.search-result .empty { padding: 16px; color: var(--text-3); font-size: 13px; }

/* --------------------------------------------------------------- Pieces -- */
.page-head { display: flex; align-items: flex-end; justify-content: space-between; margin-bottom: 20px; gap: 16px; flex-wrap: wrap; }
.page-head h2 { font-size: 24px; font-weight: 700; letter-spacing: -.02em; }
.page-head p { color: var(--text-3); font-size: 13.5px; margin-top: 3px; }

.card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); box-shadow: var(--shadow);
}
.card-pad { padding: 18px 20px; }
.card-head { display: flex; align-items: center; justify-content: space-between; padding: 16px 20px; border-bottom: 1px solid var(--border-soft); }
.card-head h3 { font-size: 14.5px; font-weight: 650; letter-spacing: -.01em; }
.card-head .sub { font-size: 12px; color: var(--text-3); }

.grid { display: grid; gap: 16px; }
.kpi-grid { grid-template-columns: repeat(4, 1fr); }
.grid-2 { grid-template-columns: 1fr 1fr; }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.cols-2-1 { grid-template-columns: 2fr 1fr; }
.cols-1-2 { grid-template-columns: 1fr 2fr; }
@media (max-width: 1180px) { .kpi-grid { grid-template-columns: repeat(2,1fr); } .grid-2,.cols-2-1,.cols-1-2,.grid-3 { grid-template-columns: 1fr; } }

/* KPI cards */
.kpi {
  padding: 18px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--border);
  position: relative; overflow: hidden; box-shadow: var(--shadow);
}
.kpi::after { content: ""; position: absolute; inset: 0 0 auto 0; height: 2px; background: linear-gradient(90deg, var(--teal), transparent 70%); opacity: .6; }
.kpi .label { font-size: 12px; color: var(--text-3); font-weight: 600; display: flex; align-items: center; gap: 7px; }
.kpi .label svg { width: 15px; height: 15px; color: var(--teal); }
.kpi .val { font-size: 27px; font-weight: 750; letter-spacing: -.02em; margin-top: 9px; }
.kpi .delta { font-size: 12px; margin-top: 7px; display: flex; align-items: center; gap: 5px; font-weight: 600; }
.kpi .delta .muted { color: var(--text-3); font-weight: 500; }

/* Chips & badges */
.chip {
  display: inline-flex; align-items: center; gap: 5px; font-size: 11.5px; font-weight: 600;
  padding: 3px 9px; border-radius: 9999px; border: 1px solid transparent; white-space: nowrap; line-height: 1.4;
}
.chip svg { width: 12px; height: 12px; }
.chip-dot { width: 6px; height: 6px; border-radius: 50%; }
.chip.teal   { background: var(--teal-soft); color: var(--teal); border-color: rgba(45,212,191,.2); }
.chip.green  { background: rgba(16,185,129,.13); color: var(--success); border-color: rgba(16,185,129,.22); }
.chip.red    { background: rgba(239,68,68,.13); color: var(--danger); border-color: rgba(239,68,68,.22); }
.chip.amber  { background: rgba(245,158,11,.13); color: var(--warning); border-color: rgba(245,158,11,.22); }
.chip.blue   { background: rgba(59,130,246,.13); color: var(--info); border-color: rgba(59,130,246,.22); }
.chip.gold   { background: rgba(252,211,77,.14); color: var(--gold); border-color: rgba(252,211,77,.25); }
.chip.violet { background: rgba(99,102,241,.14); color: var(--indigo); border-color: rgba(99,102,241,.24); }
.chip.gray   { background: var(--surface-3); color: var(--text-2); border-color: var(--border); }
.chip.lg { font-size: 12.5px; padding: 5px 12px; }

/* Avatars */
.av {
  border-radius: 50%; display: grid; place-items: center; font-weight: 700; color: #fff; flex-shrink: 0;
  font-size: 13px; letter-spacing: -.01em; position: relative;
}
.av.sm { width: 30px; height: 30px; font-size: 11.5px; }
.av.md { width: 38px; height: 38px; font-size: 14px; }
.av.lg { width: 64px; height: 64px; font-size: 23px; }
.av.xl { width: 84px; height: 84px; font-size: 30px; }
.av-teal{background:linear-gradient(135deg,#2dd4bf,#0d9488);} .av-indigo{background:linear-gradient(135deg,#818cf8,#4f46e5);}
.av-amber{background:linear-gradient(135deg,#fbbf24,#d97706);} .av-rose{background:linear-gradient(135deg,#fb7185,#e11d48);}
.av-emerald{background:linear-gradient(135deg,#34d399,#059669);} .av-violet{background:linear-gradient(135deg,#a78bfa,#7c3aed);}
.av-cyan{background:linear-gradient(135deg,#22d3ee,#0891b2);} .av-orange{background:linear-gradient(135deg,#fb923c,#ea580c);}
.av-blue{background:linear-gradient(135deg,#60a5fa,#2563eb);} .av-pink{background:linear-gradient(135deg,#f472b6,#db2777);}
.av .pro-ring { position: absolute; inset: -3px; border-radius: 50%; border: 2px solid var(--gold); }
.av svg { width: 52%; height: 52%; }
.kpi .delta svg { width: 14px; height: 14px; }
.kpi .label svg { width: 15px; height: 15px; }

.uc { display: flex; align-items: center; gap: 10px; min-width: 0; }
.uc .meta { min-width: 0; }
.uc .nm { font-weight: 600; font-size: 13.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; display: flex; align-items: center; gap: 6px; }
.uc .un { font-size: 12px; color: var(--text-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* Tables */
.tbl-wrap { overflow-x: auto; }
table.tbl { width: 100%; border-collapse: collapse; font-size: 13px; }
.tbl thead th {
  text-align: left; font-size: 11px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase;
  color: var(--text-3); padding: 11px 16px; border-bottom: 1px solid var(--border); white-space: nowrap;
  position: sticky; top: 0; background: var(--surface); cursor: pointer; user-select: none;
}
.tbl thead th.no-sort { cursor: default; }
.tbl thead th .arr { opacity: .5; margin-left: 3px; font-size: 9px; }
.tbl thead th .arr.on { opacity: 1; color: var(--teal); }
.tbl tbody td { padding: 11px 16px; border-bottom: 1px solid var(--border-soft); white-space: nowrap; }
.tbl tbody tr { transition: background .1s; }
.tbl tbody tr.clickable { cursor: pointer; }
.tbl tbody tr.clickable:hover { background: var(--surface-hover); }
.tbl .num { text-align: right; font-variant-numeric: tabular-nums; }
.tbl .center { text-align: center; }
.tbl tfoot td { padding: 11px 16px; font-weight: 700; }

.t-empty { padding: 40px; text-align: center; color: var(--text-3); }

/* Filter bar */
.filters { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-bottom: 14px; }
.seg { display: inline-flex; background: var(--surface-2); border: 1px solid var(--border); border-radius: 10px; padding: 3px; gap: 2px; }
.seg button { padding: 6px 12px; border-radius: 7px; border: none; background: transparent; color: var(--text-2); font-weight: 600; font-size: 12.5px; cursor: pointer; font-family: var(--font); }
.seg button.on { background: var(--teal-soft); color: var(--teal); }
.flt-count { margin-left: auto; color: var(--text-3); font-size: 12.5px; }
select.flt, input.flt {
  padding: 8px 11px; border-radius: 9px; background: var(--surface-2); border: 1px solid var(--border);
  color: var(--text); font-size: 12.5px; font-family: var(--font); cursor: pointer;
}
select.flt:focus, input.flt:focus { outline: 2px solid var(--teal); border-color: transparent; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; gap: 7px; padding: 8px 14px; border-radius: 9px;
  font-weight: 600; font-size: 13px; cursor: pointer; border: 1px solid var(--border);
  background: var(--surface-2); color: var(--text); font-family: var(--font); transition: .12s;
}
.btn:hover { background: var(--surface-hover); }
.btn svg { width: 15px; height: 15px; }
.btn.primary { background: var(--teal); color: #06231f; border-color: transparent; }
.btn.primary:hover { background: var(--teal-dim); }
.btn.danger { color: var(--danger); border-color: rgba(239,68,68,.3); }
.btn.danger:hover { background: rgba(239,68,68,.1); }
.btn.sm { padding: 6px 11px; font-size: 12px; }

/* Bars / mini visualisations */
.bars { display: flex; align-items: stretch; gap: 8px; height: 180px; padding-top: 8px; }
.bar-col { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.bar-group { flex: 1; display: flex; align-items: flex-end; justify-content: center; gap: 3px; }
.bar { width: 8px; border-radius: 3px 3px 0 0; min-height: 2px; transition: filter .12s; }
.bar.dep { background: var(--teal); }
.bar.wd  { background: var(--indigo); }
.bar-x { font-size: 9.5px; color: var(--text-faint); white-space: nowrap; text-align: center; margin-top: 7px; }
.bar-col:hover .bar { filter: brightness(1.2); }
.spark { width: 100%; height: 54px; display: block; }

.legend { display: flex; gap: 16px; align-items: center; }
.legend span { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; color: var(--text-2); }
.legend i { width: 10px; height: 10px; border-radius: 3px; display: inline-block; }

/* Progress / gauge */
.meter { height: 7px; border-radius: 9999px; background: var(--surface-3); overflow: hidden; }
.meter > i { display: block; height: 100%; border-radius: 9999px; }
.gauge { display: flex; align-items: center; gap: 10px; }
.trust-ring { --v: 100; width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center;
  background: conic-gradient(var(--c) calc(var(--v)*1%), var(--surface-3) 0); position: relative; }
.trust-ring::before { content: ""; position: absolute; inset: 4px; border-radius: 50%; background: var(--surface); }
.trust-ring b { position: relative; font-size: 13px; font-weight: 750; }

/* Definition rows */
.dl { display: grid; grid-template-columns: 1fr auto; gap: 10px 16px; }
.dl dt { color: var(--text-3); font-size: 12.5px; }
.dl dd { text-align: right; font-weight: 600; font-size: 13px; font-variant-numeric: tabular-nums; }

.stat-row { display: flex; flex-wrap: wrap; gap: 12px; }
.stat-mini { flex: 1; min-width: 120px; padding: 14px 16px; border-radius: 10px; background: var(--surface-2); border: 1px solid var(--border-soft); }
.stat-mini .l { font-size: 11.5px; color: var(--text-3); font-weight: 600; }
.stat-mini .v { font-size: 20px; font-weight: 700; margin-top: 4px; letter-spacing: -.01em; }
.stat-mini .s { font-size: 11px; color: var(--text-faint); margin-top: 2px; }

/* Player detail header */
.profile-hero { display: flex; gap: 20px; align-items: flex-start; padding: 22px; flex-wrap: wrap; }
.profile-hero .id { display: flex; gap: 18px; align-items: center; }
.profile-hero h2 { font-size: 24px; font-weight: 750; letter-spacing: -.02em; display: flex; align-items: center; gap: 10px; }
.profile-hero .sub { color: var(--text-3); font-size: 13px; margin-top: 3px; display: flex; gap: 12px; flex-wrap: wrap; }
.profile-hero .badges { display: flex; gap: 7px; margin-top: 11px; flex-wrap: wrap; }
.hero-actions { margin-left: auto; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }

.back-link { display: inline-flex; align-items: center; gap: 6px; color: var(--text-3); font-size: 13px; font-weight: 600; cursor: pointer; margin-bottom: 14px; }
.back-link:hover { color: var(--teal); }
.back-link svg { width: 15px; height: 15px; }

/* Timeline */
.timeline { position: relative; padding-left: 22px; }
.timeline::before { content: ""; position: absolute; left: 6px; top: 4px; bottom: 4px; width: 2px; background: var(--border); }
.tl-item { position: relative; padding: 0 0 16px; }
.tl-item::before { content: ""; position: absolute; left: -22px; top: 4px; width: 12px; height: 12px; border-radius: 50%; background: var(--surface); border: 2px solid var(--teal); }
.tl-item.muted::before { border-color: var(--text-faint); }
.tl-item .tl-t { font-size: 13px; font-weight: 600; }
.tl-item .tl-d { font-size: 11.5px; color: var(--text-faint); margin-top: 1px; }

/* RG risk panel */
.rg-list { display: flex; flex-direction: column; gap: 8px; }
.rg-row { display: flex; gap: 10px; align-items: center; padding: 9px 12px; border-radius: 9px; background: var(--surface-2); font-size: 12.5px; }
.rg-row .sev { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; }
.sev-high { background: var(--danger); } .sev-medium { background: var(--warning); } .sev-low { background: var(--info); } .sev-ok { background: var(--success); }

/* Modal */
.modal-back { position: fixed; inset: 0; background: rgba(2,4,8,.7); backdrop-filter: blur(3px); z-index: 100; display: grid; place-items: center; padding: 24px; }
.modal { background: var(--surface); border: 1px solid var(--border); border-radius: 16px; box-shadow: var(--shadow-lg); width: 100%; max-width: 640px; max-height: 86vh; overflow-y: auto; }
.modal-head { display: flex; align-items: center; justify-content: space-between; padding: 18px 22px; border-bottom: 1px solid var(--border-soft); position: sticky; top: 0; background: var(--surface); }
.modal-head h3 { font-size: 16px; font-weight: 700; }

/* Tabs (player detail) */
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--border); margin: 4px 0 20px; overflow-x: auto; }
.tabs button { padding: 11px 16px; background: none; border: none; border-bottom: 2px solid transparent; color: var(--text-3); font-weight: 600; font-size: 13.5px; cursor: pointer; font-family: var(--font); white-space: nowrap; }
.tabs button:hover { color: var(--text); }
.tabs button.on { color: var(--teal); border-bottom-color: var(--teal); }

.section-gap { margin-top: 16px; }
.muted { color: var(--text-3); }
.flex { display: flex; } .between { justify-content: space-between; } .center-y { align-items: center; }
.gap-8 { gap: 8px; } .gap-12 { gap: 12px; } .gap-16 { gap: 16px; }
.wrap { flex-wrap: wrap; }
.mt-8{margin-top:8px;} .mt-16{margin-top:16px;} .mt-24{margin-top:24px;}
.hint { font-size: 12px; color: var(--text-faint); }
.divider { height: 1px; background: var(--border-soft); margin: 14px 0; }

/* Toast */
.toast { position: fixed; bottom: 22px; left: 50%; transform: translateX(-50%); background: var(--surface-3); border: 1px solid var(--border); color: var(--text); padding: 11px 18px; border-radius: 10px; box-shadow: var(--shadow-lg); z-index: 200; font-size: 13px; font-weight: 600; display: flex; align-items: center; gap: 9px; animation: toastIn .2s ease; }
@keyframes toastIn { from { opacity: 0; transform: translate(-50%, 10px); } }

/* Sparkline svg */
.spark { width: 100%; height: 40px; display: block; }

@media (max-width: 820px) {
  .app { grid-template-columns: 1fr; }
  .sidebar { display: none; }
}

/* ----------------------------------------------- Live / operator console -- */
.env-pill.live { color: var(--success); border-color: rgba(16,185,129,.25); background: rgba(16,185,129,.08); }
.env-pill.live .env-dot { background: var(--success); box-shadow: 0 0 8px var(--success); animation: livePulse 2s infinite; }
@keyframes livePulse { 0%,100% { opacity: 1; } 50% { opacity: .4; } }

.op-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 8px; }
.op-email { display: flex; align-items: center; gap: 6px; font-size: 11.5px; color: var(--text-3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.op-email svg { width: 12px; height: 12px; flex: none; }
.op-logout { display: grid; place-items: center; width: 30px; height: 30px; flex: none; border: 1px solid var(--border); background: var(--surface-2); border-radius: 8px; color: var(--text-3); cursor: pointer; }
.op-logout:hover { color: var(--danger); border-color: rgba(239,68,68,.3); background: rgba(239,68,68,.08); }
.op-logout svg { width: 15px; height: 15px; }

.sync-pill { font-size: 11px; color: var(--text-3); padding: 4px 9px; background: var(--surface-2); border: 1px solid var(--border); border-radius: 9999px; white-space: nowrap; }
.iconbtn.spin svg { animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

.btn.ok { color: var(--success); border-color: rgba(16,185,129,.3); }
.btn.ok:hover { background: rgba(16,185,129,.1); }

.modal.sm { max-width: 440px; }

.status-banner { display: flex; align-items: center; gap: 8px; margin-top: 12px; padding: 10px 14px; border-radius: 10px; font-size: 13px; font-weight: 600; }
.status-banner svg { width: 15px; height: 15px; flex: none; }
.status-banner.suspended { background: rgba(239,68,68,.1); color: var(--danger); border: 1px solid rgba(239,68,68,.25); }
.status-banner.closed { background: var(--surface-3); color: var(--text-2); border: 1px solid var(--border); }

.op-note { display: flex; gap: 8px; margin-top: 12px; padding: 10px 12px; background: rgba(252,211,77,.08); border: 1px solid rgba(252,211,77,.22); border-radius: 9px; font-size: 12.5px; color: var(--text-2); line-height: 1.5; }
.op-note svg { width: 14px; height: 14px; flex: none; margin-top: 2px; color: var(--gold); }

/* Modal form fields (operator action modal) */
.login-field label { display: block; font-size: 12px; font-weight: 600; color: var(--text-2); margin-bottom: 6px; }
.login-field { margin-bottom: 13px; }
.login-field input, .login-field select, .login-field textarea {
  width: 100%; box-sizing: border-box; padding: 10px 12px; border: 1px solid var(--border);
  border-radius: 8px; background: var(--surface-2); color: var(--text); font-size: 14px; font-family: var(--font);
}
.login-field textarea { resize: vertical; }
.login-field input:focus, .login-field select:focus, .login-field textarea:focus {
  outline: none; border-color: var(--teal); box-shadow: 0 0 0 3px var(--teal-soft);
}
.login-err { color: var(--danger); font-size: 12.5px; margin-top: 8px; min-height: 14px; }
