

*, *::before, *::after { box-sizing: border-box; }
html, body { height: 100%; margin: 0; overflow-x: hidden; }

body {
  font-family: var(--font-sen);
  font-size: var(--text-body-sm);
  line-height: var(--leading-base);
  color: var(--text);
  background:
    radial-gradient(1100px 460px at 12% -8%, var(--bg-glow), transparent 60%),
    radial-gradient(900px 420px at 100% 0%, rgba(46,230,192,0.06), transparent 55%),
    var(--bg);
  background-attachment: fixed;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1, h2, h3, p, ul, ol { margin: 0; }
ul, ol { list-style: none; padding: 0; }
button { font-family: inherit; cursor: pointer; color: inherit; }
b { font-weight: var(--fw-semibold); }
em { font-style: normal; }

kbd {
  font-family: var(--font-mono); font-size: 11px;
  padding: 1px 6px; border-radius: 5px;
  background: var(--surface-2); border: 1px solid var(--border-strong);
  color: var(--text-muted);
}

:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: var(--radius-sm); }

* { scrollbar-width: thin; scrollbar-color: var(--border-strong) transparent; }
*::-webkit-scrollbar { width: 10px; height: 10px; }
*::-webkit-scrollbar-thumb { background: var(--border-strong); border-radius: var(--radius-full); border: 2px solid transparent; background-clip: padding-box; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; transition-duration: .001ms !important; }
}


.topbar {
  position: sticky; top: 0; z-index: 40;
  height: var(--topbar-h);
  display: flex; align-items: center; justify-content: space-between;
  gap: var(--space-16);
  padding: 0 var(--space-24);
  background: rgba(34, 42, 58, 0.72);
  backdrop-filter: blur(14px) saturate(140%);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  border-bottom: 1px solid var(--border);
  transition: margin-right var(--dur-base) var(--ease-out);
}
.topbar__left { display: flex; align-items: center; gap: var(--space-12); }

.ident { display: flex; align-items: center; gap: var(--space-12); background: none; border: 0; padding: 4px 8px 4px 4px; border-radius: var(--radius-lg); }
.ident:hover { background: var(--surface-2); }
.ident__avatar {
  display: grid; place-items: center; width: 40px; height: 40px;
  border-radius: var(--radius-md);
  background: var(--grad-accent); color: #fff;
  box-shadow: var(--shadow-glow);
}
.ident__text { display: flex; flex-direction: column; text-align: left; line-height: 1.25; }
.ident__name { font-size: var(--text-body-sm); color: var(--text); }
.ident__name b { font-weight: var(--fw-bold); }
.ident__meta { font-size: var(--text-caption); color: var(--text-dim); }


.nav { display: flex; align-items: center; gap: 3px; }
.nav__btn {
  display: flex; align-items: center; gap: 7px;
  padding: 8px 14px; border: 1px solid transparent; background: transparent;
  border-radius: var(--radius-full);
  color: var(--text-muted); font-size: var(--text-body-sm); font-weight: var(--fw-medium);
  transition: all var(--dur-fast) var(--ease-out);
}
.nav__btn svg { opacity: .8; }
.nav__btn:hover { color: var(--text); background: var(--surface-2); }
.nav__btn.is-active { color: var(--accent); background: var(--accent-soft); border-color: rgba(109,124,255,.35); }
.nav__btn.is-active svg { opacity: 1; }
.nav__div { width: 1px; height: 26px; background: var(--border); margin: 0 7px; }
.nav__notes {
  display: flex; align-items: center; gap: 7px;
  padding: 8px 14px; border: 1px solid var(--border); background: var(--surface-2);
  border-radius: var(--radius-full); color: var(--text-muted);
  font-size: var(--text-body-sm); font-weight: var(--fw-medium);
  transition: all var(--dur-fast) var(--ease-out);
}
.nav__notes:hover { color: var(--text); border-color: var(--border-strong); }
body.notes-open .nav__notes { color: #fff; background: var(--grad-accent); border-color: transparent; box-shadow: var(--shadow-glow); }
.nav__icon { display: grid; place-items: center; width: 38px; height: 38px; border: 0; background: transparent; border-radius: var(--radius-md); color: var(--text-dim); transition: all var(--dur-fast); }
.nav__icon:hover { color: var(--danger); background: var(--danger-soft); }


.stage { transition: margin-right var(--dur-base) var(--ease-out); }
.tab-panel { display: none; }
.tab-panel.is-active { display: block; }


.work {
  max-width: var(--work-max); margin: 0 auto;
  padding: var(--space-24) var(--space-24) var(--space-50);
  display: flex; flex-direction: column; gap: var(--space-16);
}
.work > * { animation: rise var(--dur-slow) var(--ease-out) both; }
.work > *:nth-child(2){ animation-delay: 40ms; }
.work > *:nth-child(3){ animation-delay: 80ms; }
.work > *:nth-child(4){ animation-delay: 120ms; }
.work > *:nth-child(5){ animation-delay: 160ms; }
.work > *:nth-child(6){ animation-delay: 200ms; }
@keyframes rise { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }


.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-xl); overflow: hidden; box-shadow: var(--shadow-sm); }
.card__head { display: flex; align-items: center; justify-content: space-between; gap: var(--space-12); padding: var(--space-16) var(--space-20); }
.card__title { display: flex; align-items: center; gap: 10px; font-size: var(--text-heading-sm); font-weight: var(--fw-semibold); color: var(--text); }
.card__title svg { color: var(--accent); }
.card__title .count { color: var(--text-dim); font-weight: var(--fw-medium); margin-left: 2px; }
.card__meta { display: flex; align-items: center; gap: var(--space-12); }
.hint { font-size: var(--text-caption); color: var(--text-dim); }
.hint kbd { margin: 0 1px; }


.number-pull__body { padding: 0 var(--space-20) var(--space-20); border-top: 1px solid var(--border); }

.gv-pull__body { padding: 0 var(--space-20) var(--space-20); border-top: 1px solid var(--border); }
.gv-pull__note { padding: var(--space-16) 0 var(--space-13); color: var(--text-muted); font-size: var(--text-body-sm); }
.gv-pull__main { display: flex; align-items: center; gap: var(--space-13); flex-wrap: wrap; }
.gv-pull__main .select { min-width: 150px; }
.gv-pull__main .got-number { flex: 0 0 auto; }
.gv-pull__avail { color: var(--text-dim); font-size: var(--text-caption); }
.gv-cred {
  margin-top: var(--space-16); padding: var(--space-16);
  border: 1px solid rgba(109,124,255,.4); border-radius: var(--radius-lg);
  background: linear-gradient(135deg, var(--accent-soft), rgba(46,230,192,.06)), var(--surface-2);
}
.gv-cred[hidden] { display: none; }
.gv-cred__rows { display: flex; flex-wrap: wrap; gap: var(--space-12) var(--space-24); }
.gv-cred__row { display: flex; align-items: center; gap: 10px; }
.gv-cred__label { font-size: var(--text-caption); font-weight: var(--fw-semibold); color: var(--text-dim); text-transform: uppercase; letter-spacing: .05em; }
.gv-cred__value { font-family: var(--font-mono); font-size: var(--text-body); color: var(--teal); background: var(--surface-code); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 4px 10px; user-select: all; word-break: break-all; }
.gv-cred__foot { display: flex; align-items: center; justify-content: space-between; gap: var(--space-13); margin-top: var(--space-13); flex-wrap: wrap; }
.gv-cred__status { color: var(--teal); font-size: var(--text-caption); font-weight: var(--fw-semibold); }
.number-pull__status { padding: var(--space-16) 0 var(--space-13); color: var(--text-muted); font-size: var(--text-body-sm); }
.number-pull__main { display: flex; align-items: stretch; gap: var(--space-13); }
.got-number {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 46px; padding: 0 var(--space-21); border: 0; border-radius: var(--radius-full);
  background: var(--grad-accent); color: #fff;
  font-size: var(--text-body-sm); font-weight: var(--fw-semibold);
  box-shadow: var(--shadow-glow);
  transition: transform var(--dur-fast) var(--ease-out), filter var(--dur-fast), opacity var(--dur-fast);
}
.got-number:hover:not(:disabled) { transform: translateY(-1px); filter: brightness(1.06); }
.got-number:disabled { cursor: not-allowed; opacity: .5; box-shadow: none; }
.number-pull__display {
  flex: 1; min-height: 46px;
  display: flex; align-items: center; gap: 9px;
  padding: 0 var(--space-16); border: 1px solid rgba(46,230,192,.35);
  border-radius: var(--radius-lg); background: var(--teal-soft);
}
.number-pull__display span { color: var(--text-muted); font-size: var(--text-caption); font-weight: var(--fw-semibold); text-transform: uppercase; letter-spacing: .05em; }
.number-pull__display strong { color: var(--teal); font-size: var(--text-heading-sm); font-weight: var(--fw-bold); font-variant-numeric: tabular-nums; letter-spacing: .02em; }
.number-pull__display .number-pull__name { color: var(--text); font-size: var(--text-body-sm); font-weight: var(--fw-semibold); text-transform: none; letter-spacing: 0; }
.number-pull__display .number-pull__name:empty { display: none; }
.number-full {
  margin-left: auto;
  min-height: 30px; padding: 0 12px; border: 1px solid rgba(46,230,192,.38);
  border-radius: var(--radius-md); background: rgba(46,230,192,.12); color: var(--teal);
  font-size: var(--text-caption); font-weight: var(--fw-bold); cursor: pointer;
  transition: transform var(--dur-fast), background var(--dur-fast), border-color var(--dur-fast);
}
.number-full:hover:not(:disabled) { transform: translateY(-1px); background: rgba(46,230,192,.18); border-color: rgba(46,230,192,.55); }
.number-full:disabled { opacity: .55; cursor: wait; }
.full-info {
  margin: 10px 0 0; max-height: 220px; overflow: auto;
  padding: var(--space-12); border: 1px solid var(--border); border-radius: var(--radius-lg);
  background: var(--surface-code); color: #c2cae0; font-family: var(--font-mono);
  font-size: 12px; line-height: 1.55; white-space: pre-wrap; word-break: break-word;
}
.full-info[hidden] { display: none; }
.number-actions { display: flex; flex-wrap: wrap; gap: var(--space-8); padding-top: var(--space-13); }
.number-action {
  min-height: 36px; padding: 0 var(--space-13);
  border: 1px solid var(--border-strong); border-radius: var(--radius-md);
  background: var(--surface-2); color: var(--text-muted);
  font-size: var(--text-caption); font-weight: var(--fw-semibold);
  transition: transform var(--dur-fast) var(--ease-out), background var(--dur-fast), color var(--dur-fast), border-color var(--dur-fast);
}
.number-action:hover { transform: translateY(-1px); color: var(--text); background: var(--surface-3); }
.number-action[data-number-action="p1"],
.number-action[data-number-action="hit"] { color: var(--accent); border-color: rgba(109,124,255,.42); background: var(--accent-soft); }
.number-action[data-number-action="dead"],
.number-action[data-number-action="hangup"],
.number-action[data-number-action="instant"] { color: var(--danger); border-color: rgba(255,107,120,.36); background: var(--danger-soft); }
.number-action[data-number-action="voicemail"] { color: var(--amber); border-color: rgba(245,185,69,.36); background: rgba(245,185,69,.12); }

.call-notes { margin-top: var(--space-13); padding: var(--space-13); border: 1px solid var(--border); border-radius: var(--radius-lg); background: var(--surface-2); }
.call-notes__grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.call-notes__field { display: flex; flex-direction: column; gap: 6px; color: var(--text-dim); font-size: var(--text-caption); font-weight: var(--fw-bold); text-transform: uppercase; letter-spacing: .06em; }
.call-notes__field--wide { grid-column: 1 / -1; }
.call-notes__field--reminder { grid-column: 1 / -1; }
.call-notes__field input,
.call-notes__field textarea { width: 100%; border: 1px solid var(--border-strong); border-radius: var(--radius-md); background: var(--surface); color: var(--text); font: inherit; font-size: var(--text-body-sm); font-weight: var(--fw-medium); letter-spacing: 0; text-transform: none; }
.call-notes__field--reminder input { border-color: rgba(109,124,255,.45); background: rgba(109,124,255,.09); transition: border-color var(--dur-fast), box-shadow var(--dur-fast), transform var(--dur-fast); }
.call-notes__field--reminder input:not(:placeholder-shown) { animation: reminderPulse 1.8s ease-in-out infinite; }
.call-notes__field input { min-height: 36px; padding: 0 10px; }
.call-notes__field textarea { min-height: 72px; padding: 9px 10px; resize: vertical; }
.call-notes__field input:focus,
.call-notes__field textarea:focus { outline: 0; border-color: rgba(109,124,255,.65); box-shadow: 0 0 0 3px rgba(109,124,255,.14); }
.call-notes__foot { display: flex; align-items: center; justify-content: flex-end; gap: 10px; margin-top: 10px; }
.call-notes__status { min-width: 74px; color: var(--text-dim); font-size: var(--text-caption); font-weight: var(--fw-semibold); text-align: right; }
.reminders__list:empty::before { content: "No scheduled calls."; display: block; padding: 12px var(--space-20); color: var(--text-dim); font-size: var(--text-caption); }
.reminder-meta { display: block; margin-top: 2px; color: var(--accent); font-size: 12px; font-weight: var(--fw-semibold); }
.h-note { display: block; margin-top: 2px; color: var(--text-dim); font-size: 12px; font-weight: var(--fw-regular); }

@keyframes reminderPulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(109,124,255,0); }
  50% { box-shadow: 0 0 0 3px rgba(109,124,255,.14); }
}

@media (max-width: 760px) {
  .call-notes__grid { grid-template-columns: 1fr; }
}


.history__head, .history__list li {
  display: grid; grid-template-columns: 1.5fr .8fr 1.1fr; gap: var(--space-12);
  align-items: center; padding: 11px var(--space-20);
}
.history__head { font-size: 11px; font-weight: var(--fw-semibold); letter-spacing: .06em; text-transform: uppercase; color: var(--text-dim); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.history__list li { border-bottom: 1px solid var(--border); font-size: var(--text-body-sm); transition: background var(--dur-fast); }
.history__list li:last-child { border-bottom: 0; }
.history__list li:hover { background: var(--surface-2); }
.history__list .h-num { font-weight: var(--fw-semibold); font-variant-numeric: tabular-nums; color: var(--text); }
.history__list .h-name { color: var(--text); }
.history__list .h-mail { color: var(--link); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.history__list .h-time { color: var(--text-dim); }
.history__list .h-sub { display: block; margin-top: 2px; color: var(--text-dim); font-size: 12px; font-weight: var(--fw-regular); }


.bases { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: var(--space-13); align-items: start; }
.bases__group { background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: var(--space-12) 14px var(--space-8); }
.bases__group-title { margin: 0 0 var(--space-8); font-size: var(--text-caption); font-weight: var(--fw-bold); text-transform: uppercase; letter-spacing: .09em; color: var(--text-dim); }
.bases__list { list-style: none; margin: 0; padding: 0; }
.bases__item { display: flex; align-items: baseline; justify-content: space-between; gap: var(--space-12); padding: 7px 0 7px 10px; border-left: 2px solid transparent; }
.bases__item + .bases__item { border-top: 1px solid var(--border); }
.bases__label { color: var(--text-muted); font-size: var(--text-body-sm); }
.bases__num { color: var(--text); font-weight: var(--fw-bold); font-variant-numeric: tabular-nums; }
.bases__item--success { border-left-color: var(--teal); }
.bases__item--success .bases__label { color: var(--text); }
.bases__item--success .bases__num { color: var(--teal); }
.history__pager {
  display: flex; align-items: center; justify-content: space-between; gap: var(--space-12);
  padding: 12px var(--space-20); border-top: 1px solid var(--border);
}
.history__pager-info { color: var(--text-dim); font-size: var(--text-caption); font-weight: var(--fw-semibold); }
.history__pager-actions { display: flex; gap: var(--space-8); }
.history__pager button {
  min-width: 36px; min-height: 32px; padding: 0 var(--space-12);
  border: 1px solid var(--border-strong); border-radius: var(--radius-md);
  background: var(--surface-2); color: var(--text-muted);
  font-size: var(--text-caption); font-weight: var(--fw-semibold); cursor: pointer;
}
.history__pager button:hover:not(:disabled) { background: var(--surface-3); color: var(--text); }
.history__pager button:disabled { opacity: .45; cursor: not-allowed; }
.res { justify-self: start; font-size: 12px; font-weight: var(--fw-semibold); padding: 3px 11px; border-radius: var(--radius-full); }
.res--sale { color: var(--teal); background: var(--teal-soft); }
.res--callback { color: var(--accent); background: var(--accent-soft); }
.res--noans, .res--busy { color: var(--text-muted); background: var(--surface-2); }
.res--dnc { color: var(--danger); background: var(--danger-soft); }
.res--pending { color: var(--text-muted); background: var(--surface-2); }
.res--p1 { color: var(--accent); background: var(--accent-soft); }
.res--dead, .res--hangup, .res--instant { color: var(--danger); background: var(--danger-soft); }
.res--voicemail { color: var(--amber); background: rgba(245,185,69,.12); }


.script__lead { padding: 0 var(--space-20) var(--space-13); color: var(--text-muted); font-size: var(--text-body-sm); }
.script__lead b { color: var(--text); }
.code { margin: 0 var(--space-20) var(--space-20); border: 1px solid var(--border); border-radius: var(--radius-lg); background: var(--surface-code); overflow: hidden; }
.code__bar { display: flex; align-items: center; gap: var(--space-12); padding: 10px var(--space-13); border-bottom: 1px solid var(--border); background: rgba(0,0,0,.18); }
.code__dots { display: inline-flex; gap: 6px; }
.code__dots i { width: 11px; height: 11px; border-radius: 50%; background: var(--border-strong); }
.code__dots i:nth-child(1){ background: #ff6b78; }
.code__dots i:nth-child(2){ background: #f5b945; }
.code__dots i:nth-child(3){ background: #2ee6c0; }
.code__lang { font-family: var(--font-mono); font-size: var(--text-caption); color: var(--text-dim); }
.code__copy {
  margin-left: auto; display: flex; align-items: center; gap: 6px;
  padding: 6px 11px; border: 1px solid var(--border-strong); background: var(--surface-2);
  border-radius: var(--radius-sm); color: var(--text-muted);
  font-size: var(--text-caption); font-weight: var(--fw-medium);
  transition: all var(--dur-fast) var(--ease-out);
}
.code__copy:hover { color: var(--text); border-color: var(--text-dim); }
.code__copy.is-done { color: var(--teal); border-color: rgba(46,230,192,.45); background: var(--teal-soft); }
.code__body { display: flex; margin: 0; padding: var(--space-16) 0; max-height: 300px; overflow: auto; font-family: var(--font-mono); font-size: 12.5px; line-height: 1.75; }
.code__gutter { flex: none; padding: 0 14px 0 16px; text-align: right; color: var(--text-dim); user-select: none; white-space: pre; border-right: 1px solid var(--border); }
.code__body code { display: block; padding: 0 18px; color: #c2cae0; white-space: pre; }
.code__body code .c { color: var(--text-dim); }


.faq__list { counter-reset: faq; padding: var(--space-16) var(--space-20) var(--space-20); border-top: 1px solid var(--border); }
.faq__list li { counter-increment: faq; position: relative; padding: 8px 0 8px 36px; color: var(--text-muted); font-size: var(--text-body-sm); }
.faq__list li b { color: var(--text); }
.faq__list li::before {
  content: counter(faq); position: absolute; left: 0; top: 5px;
  width: 24px; height: 24px; display: grid; place-items: center;
  border-radius: var(--radius-full); background: var(--accent-soft); color: var(--accent);
  font-size: 11px; font-weight: var(--fw-bold); border: 1px solid rgba(109,124,255,.3);
}


.stats {
  max-width: var(--work-max);
  margin: 0 auto;
  padding: var(--space-24) var(--space-24) var(--space-50);
}
.stats__head {
  display: flex; align-items: flex-end; justify-content: space-between; gap: var(--space-16);
  margin-bottom: var(--space-16);
  padding: var(--space-16) var(--space-20);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  background: linear-gradient(135deg, rgba(109,124,255,.14), rgba(46,230,192,.07)), var(--surface);
  box-shadow: var(--shadow-sm);
}
.stats__title { font-size: var(--text-heading-lg); font-weight: var(--fw-bold); line-height: var(--leading-tight); color: var(--text); }
.stats__sub { margin-top: 6px; color: var(--text-muted); font-size: var(--text-body-sm); }
.stats__meta {
  flex: none;
  padding: 5px 11px; border: 1px solid rgba(46,230,192,.32); border-radius: var(--radius-full);
  background: var(--teal-soft); color: var(--teal);
  font-size: var(--text-caption); font-weight: var(--fw-semibold);
}
.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: var(--space-13);
}
.stat-card {
  position: relative;
  min-height: 118px;
  display: flex; flex-direction: column; justify-content: space-between;
  padding: var(--space-16);
  border: 1px solid var(--border); border-radius: var(--radius-xl);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  transition: transform var(--dur-fast) var(--ease-out), border-color var(--dur-fast), background var(--dur-fast);
}
.stat-card:hover { transform: translateY(-1px); border-color: var(--border-strong); }
.stat-card::before {
  content: "";
  position: absolute; left: 0; right: 0; top: 0; height: 4px;
  background: var(--border-strong);
}
.stat-card--total {
  grid-column: span 2;
  border-color: rgba(109,124,255,.38);
  background: linear-gradient(135deg, rgba(109,124,255,.24), rgba(46,230,192,.13)), var(--surface);
}
.stat-card--total::before { background: var(--grad-accent); }
.stat-card__label {
  color: var(--text-muted);
  font-size: var(--text-caption); font-weight: var(--fw-semibold);
  text-transform: uppercase; letter-spacing: .06em;
}
.stat-card__value {
  color: var(--text);
  font-size: 36px; line-height: 1; font-weight: var(--fw-bold);
  font-variant-numeric: tabular-nums;
}
.stat-card--total .stat-card__value { color: var(--teal); font-size: 46px; }
.stat-card--p1 { border-color: rgba(109,124,255,.35); background: linear-gradient(135deg, rgba(109,124,255,.18), rgba(109,124,255,.05)), var(--surface); }
.stat-card--p1::before { background: var(--accent); }
.stat-card--p1 .stat-card__value { color: var(--accent); }
.stat-card--pending { border-color: rgba(124,138,163,.35); background: linear-gradient(135deg, rgba(124,138,163,.13), rgba(124,138,163,.04)), var(--surface); }
.stat-card--pending::before { background: var(--text-dim); }
.stat-card--pending .stat-card__value { color: var(--text-muted); }
.stat-card--dead,
.stat-card--hangup {
  border-color: rgba(255,107,120,.35);
  background: linear-gradient(135deg, rgba(255,107,120,.16), rgba(255,107,120,.04)), var(--surface);
}
.stat-card--dead::before,
.stat-card--hangup::before { background: var(--danger); }
.stat-card--dead .stat-card__value,
.stat-card--hangup .stat-card__value { color: var(--danger); }
.stat-card--voicemail { border-color: rgba(245,185,69,.35); background: linear-gradient(135deg, rgba(245,185,69,.16), rgba(245,185,69,.04)), var(--surface); }
.stat-card--voicemail::before { background: var(--amber); }
.stat-card--voicemail .stat-card__value { color: var(--amber); }
.stat-card--instant { border-color: rgba(157,123,255,.35); background: linear-gradient(135deg, rgba(157,123,255,.18), rgba(255,107,120,.05)), var(--surface); }
.stat-card--instant::before { background: linear-gradient(135deg, var(--accent-2), var(--danger)); }
.stat-card--instant .stat-card__value { color: var(--accent-2); }


.placeholder { min-height: calc(100vh - var(--topbar-h) - 80px); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: var(--space-13); text-align: center; padding: var(--space-40); }
.placeholder__icon { display: grid; place-items: center; width: 66px; height: 66px; border-radius: var(--radius-xl); border: 1px solid var(--border); background: var(--surface); color: var(--accent); box-shadow: var(--shadow-sm); }
.placeholder__title { font-size: var(--text-heading-lg); font-weight: var(--fw-bold); letter-spacing: -.02em; }
.placeholder__text { font-size: var(--text-body-sm); color: var(--text-muted); max-width: 420px; }


.notes {
  position: fixed; top: 0; right: 0; bottom: 0; z-index: 50;
  width: var(--notes-w);
  display: flex; flex-direction: column;
  background: var(--surface); border-left: 1px solid var(--border);
  box-shadow: var(--shadow-md);
  transform: translateX(100%);
  transition: transform var(--dur-base) var(--ease-out);
}
body.notes-open .notes { transform: none; }
body.notes-open .topbar, body.notes-open .stage { margin-right: var(--notes-w); }
.notes__head { display: flex; align-items: center; justify-content: space-between; padding: var(--space-16) var(--space-20); border-bottom: 1px solid var(--border); }
.notes__title { display: flex; align-items: center; gap: 9px; font-size: var(--text-heading-sm); font-weight: var(--fw-semibold); }
.notes__title svg { color: var(--accent); }
.notes__hide { display: flex; align-items: center; gap: 5px; padding: 6px 11px; border: 1px solid var(--border); background: var(--surface-2); border-radius: var(--radius-md); color: var(--text-muted); font-size: var(--text-caption); font-weight: var(--fw-medium); transition: all var(--dur-fast); }
.notes__hide:hover { color: var(--text); border-color: var(--border-strong); }
.notes__sub { padding: var(--space-12) var(--space-20) 0; color: var(--text-dim); font-size: var(--text-caption); }
.notes__add { padding: var(--space-12) var(--space-20); display: flex; flex-direction: column; gap: 8px; }
.notes__add textarea { width: 100%; resize: none; padding: 11px 13px; border-radius: var(--radius-md); border: 1px solid var(--border); background: var(--surface-2); color: var(--text); font-family: inherit; font-size: var(--text-body-sm); outline: none; transition: border-color var(--dur-fast); }
.notes__add textarea:focus { border-color: var(--accent); }
.notes__add textarea::placeholder { color: var(--text-dim); }
.notes__save { align-self: flex-end; padding: 8px 17px; border: 0; border-radius: var(--radius-full); background: var(--grad-accent); color: #fff; font-size: var(--text-caption); font-weight: var(--fw-semibold); box-shadow: var(--shadow-glow); transition: transform var(--dur-fast); }
.notes__save:hover { transform: translateY(-1px); }
.notes__list { flex: 1; overflow-y: auto; padding: var(--space-8) var(--space-20) var(--space-20); display: flex; flex-direction: column; gap: var(--space-12); }
.notes__pad { flex: 1; min-height: 160px; margin: var(--space-16) var(--space-20) var(--space-20); resize: vertical; padding: 12px 14px; border-radius: var(--radius-md); border: 1px solid var(--border); background: var(--surface-2); color: var(--text); font-family: inherit; font-size: var(--text-body-sm); line-height: 1.55; outline: none; transition: border-color var(--dur-fast); }
.notes__pad:focus { border-color: var(--accent); }
.notes__pad::placeholder { color: var(--text-dim); }
.note { padding: var(--space-13); border: 1px solid var(--border); border-radius: var(--radius-lg); background: var(--surface-2); transition: border-color var(--dur-fast); }
.note:hover { border-color: var(--border-strong); }
.note__rec { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 6px; }
.note__who { font-size: var(--text-caption); font-weight: var(--fw-semibold); color: var(--text); }
.note__time { font-size: 11px; color: var(--text-dim); }
.note__body { font-size: var(--text-body-sm); color: var(--text-muted); line-height: var(--leading-base); }


.fab {
  position: fixed; right: 24px; bottom: 24px; z-index: 45;
  width: 54px; height: 54px; border: 0; border-radius: var(--radius-full);
  display: grid; place-items: center;
  background: var(--grad-accent); color: #fff;
  box-shadow: var(--shadow-glow);
  transition: transform var(--dur-fast) var(--ease-out), margin-right var(--dur-base) var(--ease-out);
}
.fab:hover { transform: translateY(-3px) scale(1.04); }
.fab.is-alert::after {
  content: "";
  position: absolute; right: 8px; top: 8px;
  width: 12px; height: 12px; border-radius: var(--radius-full);
  background: var(--amber); border: 2px solid var(--surface);
  box-shadow: 0 0 0 4px rgba(245,185,69,.14);
  animation: supportPulse 1.4s ease-in-out infinite;
}
body.notes-open .fab { margin-right: var(--notes-w); }
body.notes-open .support-drawer { margin-right: var(--notes-w); }

.support-drawer {
  position: fixed; right: 24px; bottom: 92px; z-index: 46;
  width: min(390px, calc(100vw - 32px));
  max-height: min(560px, calc(100vh - 124px));
  display: flex; flex-direction: column; overflow: hidden;
  border: 1px solid var(--border-strong); border-radius: var(--radius-xl);
  background: rgba(34, 42, 58, .96); box-shadow: var(--shadow-md);
  opacity: 0; pointer-events: none; transform: translateY(12px) scale(.98);
  transition: opacity var(--dur-base) var(--ease-out), transform var(--dur-base) var(--ease-out), margin-right var(--dur-base) var(--ease-out);
}
body.support-open .support-drawer { opacity: 1; pointer-events: auto; transform: none; }
.support-drawer__head {
  display: flex; align-items: center; justify-content: space-between; gap: var(--space-12);
  padding: var(--space-13) var(--space-16); border-bottom: 1px solid var(--border);
}
.support-drawer__title { display: flex; align-items: center; gap: 9px; font-size: var(--text-heading-sm); font-weight: var(--fw-semibold); color: var(--text); }
.support-drawer__title svg { color: var(--accent); }
.support-drawer__close {
  min-height: 30px; padding: 0 var(--space-12); border: 1px solid var(--border);
  border-radius: var(--radius-md); background: var(--surface-2); color: var(--text-muted);
  font-size: var(--text-caption); font-weight: var(--fw-semibold);
}
.support-drawer__close:hover { color: var(--text); border-color: var(--border-strong); }
.support-drawer__messages {
  min-height: 220px; max-height: 360px; overflow-y: auto;
  padding: var(--space-13) var(--space-16); display: flex; flex-direction: column; gap: 10px;
}
.support-bubble {
  width: fit-content; max-width: 86%;
  padding: 9px 11px; border: 1px solid var(--border); border-radius: var(--radius-lg);
  background: var(--surface-2); color: var(--text-muted);
  animation: rise var(--dur-base) var(--ease-out) both;
}
.support-bubble.is-own { align-self: flex-end; background: var(--accent-soft); border-color: rgba(109,124,255,.36); color: var(--text); }
.support-bubble.is-support { align-self: flex-start; background: var(--teal-soft); border-color: rgba(46,230,192,.28); }
.support-bubble__meta { display: flex; align-items: center; justify-content: space-between; gap: var(--space-12); margin-bottom: 4px; font-size: 11px; font-weight: var(--fw-semibold); color: var(--text-dim); }
.support-bubble p { white-space: pre-wrap; word-break: break-word; line-height: var(--leading-snug); }
.support-empty { padding: var(--space-16); color: var(--text-dim); text-align: center; font-size: var(--text-body-sm); }
.support-empty--center { margin: auto; }
.support-drawer__form { display: flex; gap: 10px; padding: var(--space-13) var(--space-16); border-top: 1px solid var(--border); background: rgba(0,0,0,.08); }
.support-drawer__form textarea {
  flex: 1; min-width: 0; resize: none; padding: 10px 12px; border: 1px solid var(--border);
  border-radius: var(--radius-md); background: var(--surface-2); color: var(--text);
  font: inherit; font-size: var(--text-body-sm); outline: none;
}
.support-drawer__form textarea:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }

@keyframes supportPulse {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.22); opacity: .72; }
}

.toast {
  position: fixed; left: 50%; bottom: 28px; transform: translateX(-50%) translateY(12px);
  z-index: 60; padding: 12px 20px;
  background: var(--surface-3); border: 1px solid var(--border-strong);
  border-radius: var(--radius-full); color: var(--text);
  font-size: var(--text-body-sm); font-weight: var(--fw-medium);
  box-shadow: var(--shadow-md);
  opacity: 0; pointer-events: none; transition: opacity var(--dur-base) var(--ease-out), transform var(--dur-base) var(--ease-out);
}
.toast.is-show { opacity: 1; transform: translateX(-50%) translateY(0); }
.toast .toast__dot { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--teal); margin-right: 9px; vertical-align: middle; box-shadow: 0 0 0 3px var(--teal-soft); }


.quota {
  display: flex; align-items: center; flex-wrap: wrap; gap: var(--space-8);
  padding: var(--space-8) 0 var(--space-13);
  font-size: var(--text-caption); font-variant-numeric: tabular-nums;
}
.quota__item { display: inline-flex; align-items: baseline; gap: 5px; }
.quota__label { color: var(--text-dim); font-weight: var(--fw-semibold); text-transform: uppercase; letter-spacing: .05em; }
.quota__val { color: var(--text); font-weight: var(--fw-bold); }
.quota__item.is-exhausted .quota__val { color: var(--danger); }
.quota__sep { color: var(--text-dim); }

.work-timer {
  display: flex; align-items: center; gap: var(--space-12); flex-wrap: wrap;
  padding: var(--space-13) 0 var(--space-8);
  border-bottom: 1px solid var(--border);
  margin-bottom: var(--space-8);
}
.work-timer__btn {
  min-height: 36px; padding: 0 var(--space-16);
  border: 1px solid rgba(46,230,192,.38); border-radius: var(--radius-full);
  background: var(--teal-soft); color: var(--teal);
  font-size: var(--text-caption); font-weight: var(--fw-bold);
  transition: transform var(--dur-fast) var(--ease-out), opacity var(--dur-fast);
}
.work-timer__btn:hover:not(:disabled) { transform: translateY(-1px); }
.work-timer__btn:disabled { opacity: .52; cursor: not-allowed; }
.work-timer.is-active .work-timer__btn {
  color: var(--danger); background: var(--danger-soft);
  border-color: rgba(255,107,120,.42);
}
.work-timer__status { color: var(--text-muted); font-size: var(--text-caption); font-weight: var(--fw-semibold); }
.work-timer__time {
  margin-left: auto; color: var(--text); font-size: var(--text-heading-sm);
  font-variant-numeric: tabular-nums; letter-spacing: .02em;
}
.work-chip {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 86px; padding: 3px 10px; border-radius: var(--radius-full);
  color: var(--text-muted); background: var(--surface-3);
  font-size: 12px; font-weight: var(--fw-semibold); font-variant-numeric: tabular-nums;
}
.work-chip.is-active { color: var(--teal); background: var(--teal-soft); }


.take-cause {
  margin-top: var(--space-12);
  font-size: var(--text-caption); font-weight: var(--fw-semibold);
  color: var(--text-muted);
}
.take-cause[hidden] { display: none; }


.notice {
  margin-top: var(--space-13);
  padding: var(--space-12) var(--space-13);
  border: 1px solid var(--border-strong); border-radius: var(--radius-md);
  background: var(--surface-2); color: var(--text-muted);
  font-size: var(--text-body-sm); line-height: var(--leading-snug);
  white-space: normal; word-break: break-word;
}
.notice[hidden] { display: none; }
.notice--limited { border-color: rgba(245,185,69,.42); background: rgba(245,185,69,.12); color: var(--amber); }
.notice--empty { border-color: var(--border-strong); background: var(--surface-2); color: var(--text-muted); }
.notice--disabled { border-color: rgba(255,107,120,.42); background: var(--danger-soft); color: var(--danger); }
.notice--tag { border-color: rgba(109,124,255,.42); background: var(--accent-soft); color: var(--accent); }
.notice__title { display: block; font-weight: var(--fw-bold); color: inherit; margin-bottom: 2px; }
.notice__detail { display: block; color: inherit; opacity: .92; }


.admin {
  max-width: var(--admin-max); margin: 0 auto;
  padding: var(--space-24) var(--space-24) var(--space-50);
  display: flex; flex-direction: column; gap: var(--space-16);
}
.admin > * { animation: rise var(--dur-slow) var(--ease-out) both; }
.admin > *:nth-child(2) { animation-delay: 40ms; }
.admin > *:nth-child(3) { animation-delay: 80ms; }
.admin .stats__head { margin-bottom: 0; }


.support-page {
  width: min(1560px, calc(100vw - 48px)); margin: 0 auto;
  padding: var(--space-24) 0 var(--space-40);
}
.support-shell {
  height: calc(100vh - var(--topbar-h) - 72px); min-height: 640px; max-height: 980px;
  display: grid; grid-template-columns: 340px minmax(0, 1fr);
  border: 1px solid var(--border); border-radius: var(--radius-xl);
  background: var(--surface); box-shadow: var(--shadow-sm); overflow: hidden;
  animation: rise var(--dur-slow) var(--ease-out) both;
}
.support-sidebar {
  min-width: 0; border-right: 1px solid var(--border);
  background: rgba(0,0,0,.07); display: flex; flex-direction: column;
}
.support-sidebar__head {
  min-height: 64px; display: flex; align-items: center; justify-content: space-between;
  gap: var(--space-12); padding: 0 18px 0 var(--space-20);
  border-bottom: 1px solid var(--border);
}
.support-sidebar__title {
  min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  line-height: 1; font-size: var(--text-heading-sm); font-weight: var(--fw-semibold); color: var(--text);
}
.support-sidebar__count {
  flex: none; min-width: 30px; height: 30px; display: grid; place-items: center;
  border-radius: var(--radius-full); background: var(--surface-3); color: var(--text-muted);
  font-size: var(--text-caption); font-weight: var(--fw-bold);
}
.support-thread-list {
  flex: 1; min-height: 0; overflow-y: auto; padding: var(--space-12);
  display: flex; flex-direction: column; gap: var(--space-8);
}
.support-thread {
  width: 100%; min-height: 66px; display: grid; grid-template-columns: 40px minmax(0, 1fr) auto;
  align-items: center; gap: 10px; padding: var(--space-12);
  border: 1px solid transparent; border-radius: var(--radius-lg);
  background: transparent; color: var(--text-muted); text-align: left;
  transition: transform var(--dur-fast) var(--ease-out), background var(--dur-fast), border-color var(--dur-fast);
}
.support-thread:hover { transform: translateY(-1px); background: var(--surface-2); border-color: var(--border); }
.support-thread.is-active { background: var(--accent-soft); border-color: rgba(109,124,255,.36); }
.support-thread.is-needs-reply { background: rgba(245,185,69,.13); border-color: rgba(245,185,69,.38); }
.support-thread.is-needs-reply.is-active { box-shadow: inset 3px 0 0 var(--amber); }
.support-thread__avatar {
  width: 40px; height: 40px; display: grid; place-items: center;
  border-radius: var(--radius-md); background: var(--surface-3); color: var(--text);
  font-size: var(--text-caption); font-weight: var(--fw-bold);
}
.support-thread.is-needs-reply .support-thread__avatar { background: rgba(245,185,69,.18); color: var(--amber); }
.support-thread__main { min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.support-thread__top { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.support-thread__top b { min-width: 0; color: var(--text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.support-thread__top time { flex: none; color: var(--text-dim); font-size: 11px; }
.support-thread__body { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--text-muted); font-size: var(--text-caption); }
.support-thread__badge {
  flex: none; min-width: 22px; height: 22px; display: grid; place-items: center;
  border-radius: var(--radius-full); background: var(--amber); color: #121722;
  font-size: 11px; font-weight: var(--fw-bold);
}
.support-chat-panel { min-width: 0; display: flex; flex-direction: column; background: var(--surface); }
.support-chat-panel__head {
  min-height: 72px; display: flex; align-items: center; justify-content: space-between; gap: var(--space-16);
  padding: 0 22px; border-bottom: 1px solid var(--border);
}
.support-chat-panel__head > div { min-width: 0; }
.support-chat-panel__role {
  display: block; margin-bottom: 5px; color: var(--text-dim);
  font-size: var(--text-caption); font-weight: var(--fw-bold);
  text-transform: uppercase; letter-spacing: .08em;
}
.support-chat-panel__head h1 {
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  color: var(--text); font-size: 28px;
  line-height: var(--leading-tight); font-weight: var(--fw-bold);
}
.support-chat-panel__status {
  flex: none; padding: 6px 12px; border-radius: var(--radius-full);
  background: var(--teal-soft); color: var(--teal);
  font-size: var(--text-caption); font-weight: var(--fw-semibold);
}
.support-chat-panel__status.is-hot {
  background: rgba(245,185,69,.16); color: var(--amber);
  animation: supportPulse 1.6s ease-in-out infinite;
}
.support-chat-panel__messages {
  flex: 1; min-height: 0; overflow-y: auto;
  padding: var(--space-20); display: flex; flex-direction: column; gap: var(--space-12);
}
.support-chat-panel__messages > .support-empty--center {
  flex: 1; min-height: 100%; display: grid; place-items: center; margin: 0;
}
.support-message {
  max-width: min(680px, 82%); padding: var(--space-12) var(--space-13);
  border: 1px solid var(--border); border-radius: var(--radius-lg);
  background: var(--surface-2); color: var(--text-muted);
  animation: rise var(--dur-base) var(--ease-out) both;
}
.support-message.is-own {
  align-self: flex-end; background: var(--accent-soft);
  border-color: rgba(109,124,255,.36); color: var(--text);
}
.support-message.is-user { align-self: flex-start; }
.support-message__meta {
  display: flex; align-items: center; justify-content: space-between; gap: var(--space-12);
  margin-bottom: 5px; color: var(--text-dim); font-size: 11px; font-weight: var(--fw-semibold);
}
.support-message p { white-space: pre-wrap; word-break: break-word; line-height: var(--leading-snug); }
.support-chat-panel__form {
  min-height: 112px; display: flex; align-items: stretch; gap: var(--space-12);
  padding: var(--space-16) var(--space-20); border-top: 1px solid var(--border); background: rgba(0,0,0,.07);
}
.support-chat-panel__form textarea {
  flex: 1; min-width: 0; height: 80px; resize: none; padding: 12px 14px;
  border: 1px solid var(--border); border-radius: var(--radius-md);
  background: var(--surface-2); color: var(--text);
  font: inherit; font-size: var(--text-body-sm); line-height: var(--leading-base); outline: none;
}
.support-chat-panel__form textarea:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.support-chat-panel__form .btn {
  width: 112px; min-height: 80px; padding: 0 var(--space-16); white-space: normal; line-height: var(--leading-snug);
}


.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  min-height: 38px; padding: 0 var(--space-16);
  border: 1px solid var(--border-strong); border-radius: var(--radius-md);
  background: var(--surface-2); color: var(--text-muted);
  font-family: inherit; font-size: var(--text-body-sm); font-weight: var(--fw-semibold);
  white-space: nowrap; cursor: pointer;
  transition: transform var(--dur-fast) var(--ease-out), background var(--dur-fast),
              color var(--dur-fast), border-color var(--dur-fast), filter var(--dur-fast);
}
.btn svg { flex: none; }
.btn:hover:not(:disabled) { transform: translateY(-1px); color: var(--text); border-color: var(--text-dim); }
.btn:disabled { opacity: .5; cursor: not-allowed; box-shadow: none; }
.btn--primary { border: 0; background: var(--grad-accent); color: #fff; box-shadow: var(--shadow-glow); }
.btn--primary:hover:not(:disabled) { filter: brightness(1.06); }
.btn--primary:disabled { filter: grayscale(.3); }
.btn--soft { background: var(--surface-2); color: var(--text-muted); }
.btn--soft.is-done { color: var(--teal); border-color: rgba(46,230,192,.45); background: var(--teal-soft); }
.btn--ghost { background: transparent; }
.btn--ghost:hover:not(:disabled) { background: var(--surface-2); }
.btn--danger { color: var(--danger); border-color: rgba(255,107,120,.4); background: var(--danger-soft); }
.btn--danger:hover:not(:disabled) { color: #fff; background: var(--danger); border-color: var(--danger); }
.btn--sm { min-height: 32px; padding: 0 var(--space-12); font-size: var(--text-caption); }
.btn--xs { min-height: 28px; padding: 0 10px; font-size: 12px; border-radius: var(--radius-sm); }


.admin input,
.limits-edit input {
  width: 100%; min-height: 40px; padding: 0 var(--space-13);
  border: 1px solid var(--border); border-radius: var(--radius-md);
  background: var(--surface-2); color: var(--text);
  font-family: inherit; font-size: var(--text-body-sm); outline: none;
  transition: border-color var(--dur-fast), box-shadow var(--dur-fast);
}
.admin input::placeholder { color: var(--text-dim); }
.admin input:focus,
.limits-edit input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.admin input[type="number"] { font-variant-numeric: tabular-nums; }


.admin-form { padding: var(--space-16) var(--space-20) var(--space-20); border-top: 1px solid var(--border); }
.field-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: var(--space-13) var(--space-16);
}
.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.field label {
  font-size: var(--text-caption); font-weight: var(--fw-semibold); color: var(--text-muted);
  text-transform: uppercase; letter-spacing: .04em;
}
.field__opt { color: var(--text-dim); font-weight: var(--fw-medium); text-transform: none; letter-spacing: 0; }
.admin-form__foot { display: flex; align-items: center; gap: var(--space-16); margin-top: var(--space-17); flex-wrap: wrap; }
.admin-form__error { color: var(--danger); font-size: var(--text-body-sm); font-weight: var(--fw-medium); }
.admin-form__error[hidden] { display: none; }


.cred-panel {
  margin-top: var(--space-16); padding: var(--space-16);
  border: 1px solid rgba(109,124,255,.4); border-radius: var(--radius-lg);
  background: linear-gradient(135deg, var(--accent-soft), rgba(46,230,192,.06)), var(--surface-2);
}
.cred-panel[hidden] { display: none; }
.cred-panel__head { display: flex; align-items: center; justify-content: space-between; gap: var(--space-12); margin-bottom: var(--space-13); }
.cred-panel__title { display: flex; align-items: center; gap: 8px; font-size: var(--text-heading-sm); font-weight: var(--fw-semibold); color: var(--text); }
.cred-panel__title svg { color: var(--accent); }
.cred-panel__close { display: grid; place-items: center; width: 30px; height: 30px; border: 0; background: transparent; border-radius: var(--radius-sm); color: var(--text-dim); cursor: pointer; transition: all var(--dur-fast); }
.cred-panel__close:hover { color: var(--text); background: var(--surface-3); }
.cred-panel__rows { display: flex; flex-wrap: wrap; gap: var(--space-12) var(--space-24); }
.cred-row { display: flex; align-items: center; gap: 10px; }
.cred-row__label { font-size: var(--text-caption); font-weight: var(--fw-semibold); color: var(--text-dim); text-transform: uppercase; letter-spacing: .05em; }
.cred-row__value { font-family: var(--font-mono); font-size: var(--text-body); color: var(--teal); background: var(--surface-code); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 4px 10px; user-select: all; word-break: break-all; }
.cred-panel__foot { display: flex; align-items: center; justify-content: space-between; gap: var(--space-13); margin-top: var(--space-13); flex-wrap: wrap; }
.cred-panel__warn { color: var(--amber); font-size: var(--text-caption); font-weight: var(--fw-semibold); }


.table-wrap { overflow-x: auto; border-top: 1px solid var(--border); }
.data-table { width: 100%; border-collapse: collapse; font-size: var(--text-body-sm); }
.data-table th {
  text-align: left; white-space: nowrap; padding: 11px var(--space-13);
  font-size: 11px; font-weight: var(--fw-semibold); letter-spacing: .05em; text-transform: uppercase;
  color: var(--text-dim); background: var(--surface); border-bottom: 1px solid var(--border);
}
.data-table td { padding: 11px var(--space-13); border-bottom: 1px solid var(--border); vertical-align: middle; color: var(--text-muted); }
.data-table tbody tr:last-child td { border-bottom: 0; }
.data-table tbody tr:hover td { background: var(--surface-2); }
.data-table__strong { color: var(--text); font-weight: var(--fw-semibold); }

.cell-trunc { display: inline-block; max-width: 200px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; vertical-align: middle; }
.data-table__nums { font-variant-numeric: tabular-nums; white-space: nowrap; }
.data-table__actions-col { text-align: right; }
.data-table__actions > span { display: inline-flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.data-table__actions > span[hidden] { display: none; }
.tag-db {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 2px 10px 2px 0;
  white-space: nowrap;
}
.tag-db__label {
  font-family: var(--font-mono);
  color: var(--text-muted);
}


.pill { display: inline-flex; align-items: center; padding: 3px 10px; border-radius: var(--radius-full); font-size: 12px; font-weight: var(--fw-semibold); white-space: nowrap; }
.pill--role { color: var(--text-muted); background: var(--surface-3); }
.pill--on { color: var(--teal); background: var(--teal-soft); }
.pill--off { color: var(--danger); background: var(--danger-soft); }


.limits { font-variant-numeric: tabular-nums; color: var(--text-muted); white-space: nowrap; }
.limits[hidden] { display: none; }
.limits__n { color: var(--text); }
.limits-edit { display: inline-flex; gap: 6px; }
.limits-edit[hidden] { display: none; }
.limits-edit input { width: 62px; min-height: 32px; text-align: center; padding: 0 6px; }


.seg { display: flex; flex-wrap: wrap; gap: 6px; padding: var(--space-13) var(--space-20); border-top: 1px solid var(--border); }
.seg__btn {
  padding: 7px 13px; border: 1px solid var(--border); border-radius: var(--radius-full);
  background: var(--surface-2); color: var(--text-muted);
  font-family: inherit; font-size: var(--text-caption); font-weight: var(--fw-semibold); cursor: pointer;
  transition: all var(--dur-fast) var(--ease-out);
}
.seg__btn:hover { color: var(--text); border-color: var(--border-strong); }
.seg__btn.is-active { color: var(--accent); background: var(--accent-soft); border-color: rgba(109,124,255,.4); }


.empty-state { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: var(--space-12); padding: var(--space-40) var(--space-20); text-align: center; }
.empty-state[hidden] { display: none; }
.empty-state__icon { display: grid; place-items: center; width: 52px; height: 52px; border-radius: var(--radius-lg); border: 1px solid var(--border); background: var(--surface-2); color: var(--text-dim); }
.empty-state__text { color: var(--text-muted); font-size: var(--text-body-sm); }


.inv-line { display: flex; flex-wrap: wrap; gap: var(--space-12); }
.inv-line__item { display: inline-flex; align-items: baseline; gap: 8px; padding: 10px var(--space-16); border: 1px solid var(--border); border-radius: var(--radius-lg); background: var(--surface); box-shadow: var(--shadow-sm); font-variant-numeric: tabular-nums; }
.inv-line__item b { color: var(--text); font-size: var(--text-heading-sm); font-weight: var(--fw-bold); }
.inv-line__label { color: var(--text-dim); font-size: var(--text-caption); font-weight: var(--fw-semibold); text-transform: uppercase; letter-spacing: .05em; }


@media (max-width: 720px) {
  .admin { padding: var(--space-20) var(--space-13) var(--space-40); }
  .support-page { width: calc(100vw - 26px); padding: var(--space-13) 0 var(--space-32); }
  .support-shell { height: auto; min-height: calc(100vh - 112px); max-height: none; grid-template-columns: 1fr; }
  .support-sidebar { max-height: 260px; border-right: 0; border-bottom: 1px solid var(--border); }
  .support-sidebar__head { min-height: 56px; }
  .support-chat-panel__head { min-height: 64px; padding: 0 var(--space-16); }
  .support-chat-panel__head h1 { font-size: 22px; }
  .support-chat-panel__messages { min-height: 320px; }
  .support-chat-panel__form { min-height: auto; flex-direction: column; }
  .support-chat-panel__form textarea { height: 96px; }
  .support-chat-panel__form .btn { width: 100%; min-height: 44px; white-space: nowrap; }
  .field-grid { grid-template-columns: 1fr; }
  .data-table__actions > span { justify-content: flex-start; }
}


@media (max-width: 1080px) {
  .ident__meta { display: none; }
  .nav__btn span, .nav__btn { font-size: var(--text-caption); }
}
@media (max-width: 920px) {
  body.notes-open .topbar, body.notes-open .stage, body.notes-open .fab, body.notes-open .support-drawer { margin-right: 0; }
  .notes { width: min(86vw, var(--notes-w)); }
  .stats-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 720px) {
  .topbar { flex-wrap: wrap; height: auto; padding: 10px var(--space-13); gap: 8px; }
  .nav { flex-wrap: wrap; }
  .nav__btn { padding: 7px 10px; }
  .stats { padding: var(--space-20) var(--space-13) var(--space-40); }
  .stats__head { align-items: flex-start; flex-direction: column; }
  .stats-grid { grid-template-columns: 1fr; }
  .stat-card--total { grid-column: auto; }
  .number-pull__main { flex-direction: column; }
  .got-number { width: 100%; }
  .number-pull__display { flex: none; }
  .support-drawer { right: 13px; bottom: 82px; width: calc(100vw - 26px); }
  .support-drawer__form { flex-direction: column; }
  .history__head, .history__list li { grid-template-columns: 1.25fr .7fr 1fr; }
}


.modal-overlay {
  position: fixed; inset: 0; z-index: 100;
  display: grid; place-items: center; padding: var(--space-20);
  background: rgba(10, 13, 20, 0.62);
  backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px);
  animation: overlay-in var(--dur-base) var(--ease-out) both;
}
.modal-overlay[hidden] { display: none; }
@keyframes overlay-in { from { opacity: 0; } to { opacity: 1; } }
.modal {
  width: min(460px, 100%); max-height: calc(100vh - 2 * var(--space-20));
  display: flex; flex-direction: column; overflow: hidden;
  background: var(--surface); border: 1px solid var(--border-strong);
  border-radius: var(--radius-xl); box-shadow: var(--shadow-md);
  animation: modal-in var(--dur-base) var(--ease-out) both;
}
@keyframes modal-in { from { opacity: 0; transform: translateY(10px) scale(.985); } to { opacity: 1; transform: none; } }
.modal__head { display: flex; align-items: center; justify-content: space-between; gap: var(--space-12); padding: var(--space-16) var(--space-20); border-bottom: 1px solid var(--border); }
.modal__title { font-size: var(--text-heading-sm); font-weight: var(--fw-semibold); color: var(--text); }
.modal__close { display: grid; place-items: center; width: 32px; height: 32px; border: 0; background: transparent; border-radius: var(--radius-sm); color: var(--text-dim); cursor: pointer; transition: all var(--dur-fast); }
.modal__close:hover { color: var(--text); background: var(--surface-2); }
.modal__body { padding: var(--space-20); display: flex; flex-direction: column; gap: var(--space-16); overflow-y: auto; }
.modal__sub { color: var(--text-muted); font-size: var(--text-body-sm); line-height: var(--leading-snug); }
.modal__sub b { color: var(--text); }
.modal__fields { display: grid; gap: var(--space-13); }
.modal__inline { display: flex; gap: 8px; }
.modal__inline input { flex: 1; }
.modal__foot { display: flex; align-items: center; justify-content: flex-end; gap: 10px; margin-top: var(--space-8); padding-top: var(--space-16); border-top: 1px solid var(--border); }
.modal__foot .btn { box-shadow: none; }
.modal__error { color: var(--danger); font-size: var(--text-body-sm); font-weight: var(--fw-medium); margin-right: auto; }
.modal__error[hidden] { display: none; }
.modal__warn { color: var(--amber); font-size: var(--text-body-sm); font-weight: var(--fw-medium); line-height: var(--leading-snug); }
.modal__warn[hidden] { display: none; }
.check { display: flex; align-items: center; gap: 8px; color: var(--text-muted); font-size: var(--text-body-sm); font-weight: var(--fw-medium); cursor: pointer; user-select: none; }
.check[hidden] { display: none; }
.check input[type="checkbox"] { width: auto; min-height: 0; margin: 0; flex: none; accent-color: var(--accent); cursor: pointer; }
.source-checklist {
  display: grid;
  gap: 8px;
  max-height: 250px;
  overflow: auto;
  padding: 8px;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-md);
  background: var(--surface-2);
}
.source-checklist.is-disabled { opacity: .55; }
.source-checklist__group { display: grid; gap: 4px; }
.source-checklist__group + .source-checklist__group {
  padding-top: 8px;
  border-top: 1px solid var(--border);
}
.source-checklist__title {
  padding: 0 4px;
  color: var(--text-dim);
  font-size: 11px;
  font-weight: var(--fw-bold);
  text-transform: uppercase;
  letter-spacing: .04em;
}
.source-checklist__empty {
  padding: 12px;
  color: var(--text-dim);
  font-size: var(--text-caption);
  text-align: center;
}
.source-choice {
  position: relative;
  display: grid;
  grid-template-columns: 20px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  min-height: 34px;
  padding: 6px 8px;
  border-radius: 7px;
  color: var(--text-muted);
  font-size: var(--text-body-sm);
  font-weight: var(--fw-medium);
  cursor: pointer;
  user-select: none;
  transition: background var(--dur-fast), color var(--dur-fast);
}
.source-choice:hover { background: var(--surface-3); color: var(--text); }
.source-checklist.is-disabled .source-choice { cursor: not-allowed; }
.source-choice input {
  position: absolute;
  width: 18px;
  min-height: 18px;
  margin: 0;
  padding: 0;
  opacity: 0;
  pointer-events: none;
}
.source-choice__mark {
  position: relative;
  width: 18px;
  height: 18px;
  border: 1px solid var(--border-strong);
  border-radius: 5px;
  background: var(--surface);
  transition: background var(--dur-fast), border-color var(--dur-fast), box-shadow var(--dur-fast);
}
.source-choice input:focus-visible + .source-choice__mark {
  box-shadow: 0 0 0 3px var(--accent-soft);
}
.source-choice input:checked + .source-choice__mark {
  border-color: var(--accent);
  background: var(--accent);
}
.source-choice input:checked + .source-choice__mark::after {
  content: "";
  position: absolute;
  left: 4px;
  top: 4px;
  width: 9px;
  height: 5px;
  border-left: 2px solid #101115;
  border-bottom: 2px solid #101115;
  transform: rotate(-45deg);
}
.source-choice__text {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.modal input {
  width: 100%; min-height: 40px; padding: 0 var(--space-13);
  border: 1px solid var(--border); border-radius: var(--radius-md);
  background: var(--surface-2); color: var(--text);
  font-family: inherit; font-size: var(--text-body-sm); outline: none;
  transition: border-color var(--dur-fast), box-shadow var(--dur-fast);
}
.modal input::placeholder { color: var(--text-dim); }
.modal input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.modal textarea.input {
  width: 100%;
  min-height: 180px;
  padding: 10px var(--space-13);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--surface-2);
  color: var(--text);
  font-family: var(--font-mono);
  font-size: var(--text-body-sm);
  line-height: var(--leading-snug);
  resize: vertical;
  outline: none;
  transition: border-color var(--dur-fast), box-shadow var(--dur-fast);
}
.modal textarea.input::placeholder { color: var(--text-dim); }
.modal textarea.input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.modal .cred-row { justify-content: space-between; background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--radius-md); padding: 10px var(--space-13); }
.modal .cred-warn { color: var(--amber); font-size: var(--text-caption); font-weight: var(--fw-semibold); }


.dash { display: grid; grid-template-columns: minmax(260px, 1fr) minmax(0, 1.5fr); gap: var(--space-16); align-items: start; }
.pool { display: flex; align-items: center; gap: var(--space-24); padding: var(--space-21) var(--space-20); flex-wrap: wrap; }
.pool__metric { display: flex; flex-direction: column; }
.pool__num { font-size: 46px; line-height: 1; font-weight: var(--fw-bold); color: var(--teal); font-variant-numeric: tabular-nums; }
.pool__label { margin-top: 6px; color: var(--text-dim); font-size: var(--text-caption); font-weight: var(--fw-semibold); text-transform: uppercase; letter-spacing: .06em; }
.pool__bar-wrap { flex: 1; min-width: 180px; display: flex; flex-direction: column; gap: 10px; }
.pool__bar { height: 12px; border-radius: var(--radius-full); background: var(--surface-3); overflow: hidden; }
.pool__fill { display: block; height: 100%; border-radius: var(--radius-full); background: var(--grad-accent); transition: width var(--dur-slow) var(--ease-out); }
.pool__legend { display: flex; gap: var(--space-16); flex-wrap: wrap; font-size: var(--text-caption); color: var(--text-dim); font-variant-numeric: tabular-nums; }
.pool__legend b { color: var(--text); font-weight: var(--fw-bold); }
.dist { list-style: none; margin: 0; padding: var(--space-16) var(--space-20) var(--space-20); border-top: 1px solid var(--border); display: flex; flex-direction: column; gap: 12px; }
.dist__row { display: grid; grid-template-columns: 132px 1fr 78px; align-items: center; gap: var(--space-13); }
.dist__label { display: flex; align-items: center; gap: 8px; font-size: var(--text-body-sm); color: var(--text-muted); }
.dist__dot { width: 9px; height: 9px; border-radius: 50%; flex: none; background: var(--text-dim); }
.dist__bar { height: 8px; border-radius: var(--radius-full); background: var(--surface-3); overflow: hidden; }
.dist__fill { display: block; height: 100%; border-radius: var(--radius-full); background: var(--text-dim); transition: width var(--dur-slow) var(--ease-out); }
.dist__val { text-align: right; font-variant-numeric: tabular-nums; font-weight: var(--fw-bold); color: var(--text); }
.dist__val small { color: var(--text-dim); font-weight: var(--fw-medium); margin-left: 5px; font-size: 11px; }
.dist--p1 .dist__dot, .dist--p1 .dist__fill { background: var(--accent); }
.dist--dead .dist__dot, .dist--dead .dist__fill,
.dist--hangup .dist__dot, .dist--hangup .dist__fill { background: var(--danger); }
.dist--voicemail .dist__dot, .dist--voicemail .dist__fill { background: var(--amber); }
.dist--instant .dist__dot, .dist--instant .dist__fill { background: var(--accent-2); }
.dist--pending .dist__dot, .dist--pending .dist__fill { background: var(--text-dim); }

@media (max-width: 920px) { .dash { grid-template-columns: 1fr; } }
@media (max-width: 720px) {
  .dist__row { grid-template-columns: 104px 1fr 64px; }
  .pool__num { font-size: 38px; }
}


.iconbtn {
  display: grid; place-items: center; width: 34px; height: 32px;
  border: 1px solid var(--border-strong); border-radius: var(--radius-md);
  background: var(--surface-2); color: var(--text-muted); cursor: pointer;
  transition: color var(--dur-fast), border-color var(--dur-fast), background var(--dur-fast);
}
.iconbtn:hover { color: var(--text); border-color: var(--text-dim); background: var(--surface-3); }

.rowmenu {
  position: fixed; z-index: 80; min-width: 172px;
  display: flex; flex-direction: column; gap: 2px; padding: 6px;
  background: var(--surface-3); border: 1px solid var(--border-strong);
  border-radius: var(--radius-lg); box-shadow: var(--shadow-md);
  animation: modal-in var(--dur-fast) var(--ease-out) both;
}
.rowmenu[hidden] { display: none; }
.rowmenu__item {
  text-align: left; padding: 8px 11px; border: 0; background: transparent;
  color: var(--text-muted); border-radius: var(--radius-sm);
  font-family: inherit; font-size: var(--text-body-sm); font-weight: var(--fw-medium);
  cursor: pointer; white-space: nowrap; transition: background var(--dur-fast), color var(--dur-fast);
}
.rowmenu__item:hover { background: var(--surface-2); color: var(--text); }
.rowmenu__item--danger { color: var(--danger); }
.rowmenu__item--danger:hover { background: var(--danger-soft); color: var(--danger); }

.data-table__nums.is-zero { color: var(--text-dim); opacity: .5; }


.filters { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-16) var(--space-24); padding: var(--space-16) var(--space-20); overflow: visible; }
.filters__group { display: flex; align-items: center; gap: var(--space-12); }
.filters__label { font-size: var(--text-caption); font-weight: var(--fw-semibold); color: var(--text-dim); text-transform: uppercase; letter-spacing: .05em; }
.filters .seg { padding: 0; border-top: 0; }

.select {
  min-height: 36px; padding: 0 var(--space-32) 0 var(--space-13);
  border: 1px solid var(--border-strong); border-radius: var(--radius-md);
  color: var(--text); font-family: inherit; font-size: var(--text-body-sm);
  cursor: pointer; appearance: none; -webkit-appearance: none;
  background-color: var(--surface-2);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%237c8aa3' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 11px center;
}
.select:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }

.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(132px, 1fr)); gap: var(--space-12); }
.kpi {
  position: relative; overflow: hidden;
  display: flex; flex-direction: column; gap: 6px;
  padding: var(--space-12) var(--space-13); border: 1px solid var(--border); border-radius: var(--radius-lg);
  background: var(--surface); box-shadow: var(--shadow-sm);
}
.kpi::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 3px; background: var(--border-strong); }
.kpi__label { font-size: 11px; font-weight: var(--fw-semibold); color: var(--text-muted); text-transform: uppercase; letter-spacing: .04em; }
.kpi__value { font-size: 23px; line-height: 1; font-weight: var(--fw-bold); color: var(--text); font-variant-numeric: tabular-nums; }
.kpi--total .kpi__value { color: var(--accent); } .kpi--total::before { background: var(--grad-accent); }
.kpi--success .kpi__value { color: var(--teal); } .kpi--success::before { background: var(--teal); }
.kpi--p1 .kpi__value { color: var(--accent); } .kpi--p1::before { background: var(--accent); }
.kpi--pending .kpi__value { color: var(--text-muted); } .kpi--pending::before { background: var(--text-dim); }
.kpi--dead .kpi__value, .kpi--hangup .kpi__value { color: var(--danger); }
.kpi--dead::before, .kpi--hangup::before { background: var(--danger); }
.kpi--voicemail .kpi__value { color: var(--amber); } .kpi--voicemail::before { background: var(--amber); }
.kpi--instant .kpi__value { color: var(--accent-2); } .kpi--instant::before { background: var(--accent-2); }

.chart-wrap { position: relative; height: 340px; padding: var(--space-16) var(--space-20) var(--space-20); border-top: 1px solid var(--border); }
@media (max-width: 720px) { .chart-wrap { height: 280px; } .filters { gap: var(--space-13) var(--space-16); } }


.data-table__nums.tnum--total { color: var(--teal); }
.data-table__nums.tnum--success { color: var(--teal); font-weight: var(--fw-bold); }
.data-table__nums.tnum--p1 { color: var(--accent); }
.data-table__nums.tnum--pending { color: var(--text-muted); }
.data-table__nums.tnum--dead, .data-table__nums.tnum--hangup { color: var(--danger); }
.data-table__nums.tnum--voicemail { color: var(--amber); }
.data-table__nums.tnum--instant { color: var(--accent-2); }


.th-sort { cursor: pointer; user-select: none; white-space: nowrap; }
.th-sort:hover { color: var(--text-muted); }
.th-sort.is-sorted { color: var(--accent); }
.th-sort.is-sorted[data-dir="desc"]::after { content: " ▼"; font-size: 9px; }
.th-sort.is-sorted[data-dir="asc"]::after { content: " ▲"; font-size: 9px; }


.data-table tbody tr.is-clickable { cursor: pointer; }


.combo { position: relative; }
.combo__btn {
  display: inline-flex; align-items: center; justify-content: space-between; gap: 10px;
  min-width: 168px; min-height: 36px; padding: 0 var(--space-12);
  border: 1px solid var(--border-strong); border-radius: var(--radius-md);
  background: var(--surface-2); color: var(--text);
  font-family: inherit; font-size: var(--text-body-sm); cursor: pointer;
  transition: border-color var(--dur-fast);
}
.combo__btn:hover { border-color: var(--text-dim); }
.combo__btn svg { color: var(--text-dim); flex: none; }
.combo__pop {
  position: fixed; z-index: 90; min-width: 224px;
  background: var(--surface-3); border: 1px solid var(--border-strong); border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md); padding: 8px; animation: modal-in var(--dur-fast) var(--ease-out) both;
}
.combo__pop[hidden] { display: none; }
.combo__search {
  width: 100%; min-height: 34px; padding: 0 var(--space-12); margin-bottom: 6px;
  border: 1px solid var(--border); border-radius: var(--radius-sm);
  background: var(--surface-2); color: var(--text); font-family: inherit; font-size: var(--text-body-sm); outline: none;
}
.combo__search:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.combo__list { list-style: none; margin: 0; padding: 0; max-height: 240px; overflow-y: auto; display: flex; flex-direction: column; gap: 1px; }
.combo__item {
  width: 100%; text-align: left; padding: 8px 10px; border: 0; background: transparent;
  color: var(--text-muted); border-radius: var(--radius-sm);
  font-family: inherit; font-size: var(--text-body-sm); cursor: pointer;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.combo__item:hover { background: var(--surface-2); color: var(--text); }


body {
  background: var(--bg);
  color: var(--text);
}

.topbar {
  height: var(--topbar-h);
  padding: 0 14px;
  background: rgba(5, 6, 7, .94);
  border-bottom: 1px solid var(--border);
  box-shadow: none;
}
.topbar__left { gap: 10px; }
.ident { min-height: 38px; padding: 0 8px; border-radius: var(--radius-md); }
.ident:hover { background: var(--surface-2); }
.ident__avatar {
  width: 32px; height: 32px;
  border-radius: 8px;
  background: var(--grad-accent);
  color: #111316;
  box-shadow: none;
}
.ident__name { font-size: 14px; font-weight: var(--fw-bold); }
.ident__meta { font-size: 12px; color: var(--text-dim); }
.nav { gap: 4px; }
.nav__btn,
.nav__notes {
  min-height: 32px;
  padding: 0 11px;
  border-radius: var(--radius-md);
  border: 1px solid transparent;
  background: transparent;
  color: var(--text-muted);
  font-size: 13px;
}
.nav__btn:hover,
.nav__notes:hover { background: var(--surface-2); color: var(--text); border-color: var(--border); }
.nav__btn.is-active,
body.notes-open .nav__notes {
  color: var(--accent);
  background: var(--accent-soft);
  border-color: rgba(255, 200, 67, .28);
  box-shadow: none;
}
.nav__div { height: 28px; background: var(--border); margin: 0 5px; }
.nav__icon {
  width: 34px; height: 34px;
  border: 1px solid transparent;
  border-radius: var(--radius-md);
}
.nav__icon:hover { border-color: rgba(255, 99, 109, .32); }

.admin,
.work,
.stats {
  width: min(100%, 1840px);
  max-width: none;
  padding: 18px 24px 36px;
  gap: 14px;
}
.work {
  width: min(100%, 1180px);
  display: flex;
  flex-direction: column;
}

.card {
  background: var(--surface);
  border-color: var(--border);
  border-radius: 8px;
  box-shadow: none;
}
.card__head {
  min-height: 48px;
  padding: 11px 14px;
  border-bottom: 1px solid var(--border);
}
.card__title {
  gap: 8px;
  font-size: 15px;
  letter-spacing: 0;
}
.card__title svg { color: var(--accent); }
.card__meta { gap: 8px; }
.hint { font-size: 12px; }

.admin-form { padding: 14px; }
.field-grid { grid-template-columns: repeat(6, minmax(130px, 1fr)); gap: 10px; }
.field label,
.call-notes__field,
.filters__label,
.stat-card__label,
.kpi__label,
.quota__label,
.pool__label,
.bases__group-title {
  letter-spacing: .04em;
  font-size: 11px;
}
.admin input,
.limits-edit input,
.modal input,
.select,
.combo__btn {
  min-height: 34px;
  border-color: var(--border);
  border-radius: 7px;
  background-color: var(--surface-2);
}
.admin input:focus,
.limits-edit input:focus,
.modal input:focus,
.select:focus,
.combo__search:focus,
.support-chat-panel__form textarea:focus,
.support-drawer__form textarea:focus,
.call-notes__field input:focus,
.call-notes__field textarea:focus {
  border-color: rgba(255, 200, 67, .55);
  box-shadow: 0 0 0 3px rgba(255, 200, 67, .12);
}

.btn {
  min-height: 34px;
  border-radius: 7px;
  border-color: var(--border);
  background: var(--surface-2);
  font-size: 13px;
  box-shadow: none;
}
.btn--primary {
  color: #101115;
  background: var(--accent);
  border-color: var(--accent);
  box-shadow: none;
}
.btn--primary:hover:not(:disabled) { filter: brightness(1.06); color: #101115; }
.btn--soft,
.btn--ghost { background: var(--surface-2); }
.btn--sm { min-height: 30px; padding: 0 10px; font-size: 12px; }

.admin-filterbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  padding: 10px 12px;
  border-bottom: 1px solid var(--border);
  background: #0c0d10;
}
.filter-chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 28px;
  padding: 0 10px;
  border: 1px solid var(--border);
  border-radius: 7px;
  background: var(--surface);
  color: var(--text-muted);
  font-size: 12px;
  font-weight: var(--fw-semibold);
  transition: background var(--dur-fast), color var(--dur-fast), border-color var(--dur-fast);
}
.filter-chip:hover { color: var(--text); border-color: var(--border-strong); }
.filter-chip.is-active {
  color: var(--accent);
  background: var(--accent-soft);
  border-color: rgba(255, 200, 67, .34);
}
.filter-chip span {
  min-width: 20px;
  height: 18px;
  display: inline-grid;
  place-items: center;
  padding: 0 5px;
  border-radius: 999px;
  background: rgba(255,255,255,.06);
  color: inherit;
  font-size: 11px;
  font-variant-numeric: tabular-nums;
}

.table-wrap { border-top: 0; }
.data-table {
  font-size: 13px;
  background: #0d0e11;
}
.data-table th {
  padding: 10px 12px;
  background: #151619;
  border-bottom-color: var(--border);
  color: var(--text-dim);
  font-size: 11px;
}
.data-table td {
  padding: 9px 12px;
  border-bottom-color: #202227;
}
.data-table tbody tr:hover td { background: #15171b; }
.data-table tbody tr.is-clickable { cursor: pointer; }
.data-table__strong { color: var(--text); }
.cell-trunc { max-width: 240px; }

.user-cell {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}
.user-avatar,
.detail-avatar {
  flex: none;
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: var(--surface-3);
  color: var(--text);
  font-size: 11px;
  font-weight: var(--fw-bold);
}
.user-avatar--worker,
.detail-avatar--worker { background: #ffc843; color: #101115; }
.user-avatar--caller,
.detail-avatar--caller { background: #7d8cff; color: #fff; }
.user-avatar--support,
.detail-avatar--support { background: #42d981; color: #07110b; }
.user-cell__text {
  min-width: 0;
  display: flex;
  flex-direction: column;
  line-height: 1.25;
}
.user-cell__text small {
  color: var(--text-dim);
  font-size: 11px;
  font-weight: var(--fw-medium);
}
/* Active-source chip under the login: a label (not a number), so revert the
   mono treatment and constrain width — the drawer shows the full value. */
.user-cell__text small.user-cell__src {
  font-family: inherit;
  max-width: 220px;
  opacity: 0.92;
}

.pill,
.work-chip {
  border: 1px solid transparent;
  border-radius: 999px;
  font-size: 12px;
  line-height: 1;
}
button.pill,
button.work-chip {
  font-family: inherit;
  cursor: pointer;
}
.filter-link:hover,
.work-chip:hover { filter: brightness(1.08); }
.pill--role { background: var(--surface-3); color: var(--text-muted); }
.pill--worker { background: rgba(255, 200, 67, .12); color: var(--accent); border-color: rgba(255, 200, 67, .28); }
.pill--caller { background: rgba(125, 140, 255, .13); color: #9ba6ff; border-color: rgba(125, 140, 255, .28); }
.pill--support { background: rgba(66, 217, 129, .12); color: var(--teal); border-color: rgba(66, 217, 129, .28); }
.pill--on { background: var(--teal-soft); color: var(--teal); border-color: rgba(66, 217, 129, .28); }
.pill--off { background: var(--danger-soft); color: var(--danger); border-color: rgba(255, 99, 109, .28); }
.work-chip {
  min-width: 82px;
  min-height: 24px;
  padding: 0 9px;
  background: #25282f;
  color: var(--text-muted);
}
.work-chip.is-active {
  color: var(--teal);
  background: var(--teal-soft);
  border-color: rgba(66, 217, 129, .28);
}
.iconbtn {
  width: 30px;
  height: 28px;
  border-color: var(--border);
  background: #0c0d10;
}

.stats__head {
  min-height: 64px;
  margin-bottom: 0;
  padding: 14px 16px;
  background: var(--surface);
  border-radius: 8px;
}
.stats__title { font-size: 22px; letter-spacing: 0; }
.stats__sub { margin-top: 4px; font-size: 13px; }
.stats__meta {
  border-radius: 999px;
  border-color: rgba(66, 217, 129, .28);
}
.stats-grid,
.kpis { gap: 10px; }
.stat-card,
.kpi,
.inv-line__item,
.bases__group {
  border-radius: 8px;
  background: var(--surface);
}
.stat-card {
  min-height: 94px;
  padding: 13px;
}
.stat-card__value { font-size: 30px; }
.stat-card--total .stat-card__value { font-size: 38px; color: var(--accent); }
.kpi__value { font-size: 22px; }
.chart-wrap { height: 300px; padding: 14px; }
.dash { gap: 14px; }
.pool { padding: 16px; }
.pool__num { font-size: 38px; color: var(--accent); }

.number-pull__body {
  padding: 0 14px 14px;
  border-top: 0;
}

.gv-pull__body {
  padding: 0 14px 14px;
  border-top: 0;
}
.work-timer {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 10px;
  padding: 12px 0;
}
.work-timer__btn {
  min-height: 32px;
  border-radius: 7px;
  border-color: rgba(66, 217, 129, .35);
}
.work-timer__time { font-size: 18px; }
.quota { padding: 4px 0 12px; }
.number-pull__main {
  display: grid;
  grid-template-columns: minmax(150px, 220px) minmax(0, 1fr);
}
.got-number {
  min-height: 42px;
  border-radius: 7px;
  background: var(--accent);
  color: #101115;
  box-shadow: none;
}
.number-pull__display {
  min-height: 42px;
  border-radius: 7px;
  border-color: rgba(66, 217, 129, .28);
  background: rgba(66, 217, 129, .08);
}
.number-pull__display strong { color: var(--teal); font-size: 17px; }
.number-pull__display .number-pull__name { font-size: 13px; }
.number-full {
  border-radius: 6px;
  border-color: rgba(255, 200, 67, .35);
  background: var(--accent-soft);
  color: var(--accent);
}
.number-actions {
  gap: 7px;
  padding-top: 12px;
}
.number-action {
  min-height: 32px;
  border-radius: 7px;
  background: var(--surface-2);
}
.number-action[data-number-action="p1"],
.number-action[data-number-action="hit"] {
  color: var(--accent);
  border-color: rgba(255, 200, 67, .32);
  background: var(--accent-soft);
}
.call-notes {
  margin-top: 12px;
  padding: 12px;
  border-radius: 8px;
}
.call-notes__grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 9px;
}
.call-notes__field--wide { grid-column: span 2; }
.call-notes__field--reminder { grid-column: span 2; }
.call-notes__field input { min-height: 34px; }
.call-notes__field textarea { min-height: 66px; }
.full-info,
.code,
.notes__pad,
.support-drawer,
.modal,
.rowmenu,
.combo__pop {
  border-radius: 8px;
}
.notice {
  border-radius: 7px;
  background: var(--surface-2);
}
.notice--tag {
  border-color: rgba(255, 200, 67, .42);
  background: var(--accent-soft);
  color: var(--accent);
}
.history__head,
.history__list li {
  padding: 9px 14px;
}
.history__list li:hover { background: #15171b; }
.history__pager { padding: 10px 14px; }

.notes {
  background: #0b0c0f;
  border-left-color: var(--border);
}
.notes__head { min-height: 50px; padding: 10px 14px; }
.notes__add,
.notes__list { padding-left: 14px; padding-right: 14px; }
.notes__pad { margin: 14px; }
.fab {
  width: 48px;
  height: 48px;
  right: 18px;
  bottom: 18px;
  background: var(--accent);
  color: #101115;
}
.support-drawer {
  right: 18px;
  bottom: 78px;
  background: #0c0d10;
}

.support-page {
  width: min(1760px, calc(100vw - 32px));
  padding: 16px 0 28px;
}
.support-shell {
  height: calc(100vh - var(--topbar-h) - 44px);
  min-height: 580px;
  grid-template-columns: 360px minmax(0, 1fr);
  border-radius: 8px;
  background: var(--surface);
}
.support-sidebar {
  background: #0c0d10;
}
.support-sidebar__head,
.support-chat-panel__head {
  min-height: 58px;
  padding: 0 14px;
}
.support-thread-list { padding: 10px; gap: 6px; }
.support-thread {
  min-height: 58px;
  border-radius: 8px;
  grid-template-columns: 34px minmax(0, 1fr) auto;
  padding: 9px;
}
.support-thread__avatar {
  width: 34px;
  height: 34px;
  border-radius: 8px;
}
.support-thread.is-active { background: var(--accent-soft); border-color: rgba(255, 200, 67, .28); }
.support-thread.is-needs-reply { background: rgba(255, 200, 67, .12); border-color: rgba(255, 200, 67, .32); }
.support-chat-panel { background: var(--surface); }
.support-chat-panel__head h1 { font-size: 24px; }
.support-chat-panel__role { margin-bottom: 3px; font-size: 11px; }
.support-chat-panel__messages { padding: 14px; gap: 10px; }
.support-message {
  border-radius: 8px;
  background: var(--surface-2);
}
.support-message.is-own {
  background: rgba(255, 200, 67, .12);
  border-color: rgba(255, 200, 67, .28);
}
.support-chat-panel__form {
  min-height: 92px;
  padding: 12px 14px;
}
.support-chat-panel__form textarea {
  height: 68px;
  border-radius: 8px;
}
.support-chat-panel__form .btn {
  width: 104px;
  min-height: 68px;
}

.drawer-scrim {
  position: fixed;
  inset: 0;
  z-index: 70;
  background: rgba(0, 0, 0, .54);
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
}
.drawer-scrim[hidden],
.detail-drawer[hidden] { display: none; }
.detail-drawer {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  z-index: 75;
  width: min(520px, 100vw);
  display: flex;
  flex-direction: column;
  background: #0c0d10;
  border-left: 1px solid var(--border);
  box-shadow: var(--shadow-md);
  animation: detail-in var(--dur-base) var(--ease-out) both;
}
@keyframes detail-in {
  from { opacity: 0; transform: translateX(18px); }
  to { opacity: 1; transform: none; }
}
.detail-drawer__head {
  min-height: 76px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
}
.detail-drawer__identity {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 12px;
}
.detail-avatar {
  width: 44px;
  height: 44px;
  font-size: 16px;
}
.detail-drawer__identity h2 {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 18px;
  line-height: 1.2;
}
.detail-drawer__identity p {
  margin-top: 3px;
  color: var(--text-dim);
  font-size: 12px;
}
.detail-drawer__close {
  flex: none;
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
  color: var(--text-muted);
}
.detail-drawer__close:hover { color: var(--text); border-color: var(--border-strong); }
.detail-tabs {
  display: flex;
  gap: 22px;
  padding: 0 16px;
  min-height: 40px;
  align-items: end;
  border-bottom: 1px solid var(--border);
}
.detail-tabs__item {
  height: 40px;
  display: inline-flex;
  align-items: center;
  border-bottom: 2px solid transparent;
  color: var(--text-dim);
  font-size: 13px;
  font-weight: var(--fw-semibold);
}
.detail-tabs__item.is-active {
  color: var(--text);
  border-bottom-color: var(--accent);
}
.detail-drawer__body {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding: 14px 16px 18px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.detail-section {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.detail-section h3 {
  color: var(--text-dim);
  font-size: 11px;
  font-weight: var(--fw-bold);
  text-transform: uppercase;
  letter-spacing: .06em;
}
.detail-status {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}
.detail-metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}
.detail-metric {
  min-width: 0;
  padding: 10px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
}
.detail-metric span {
  display: block;
  color: var(--text-dim);
  font-size: 11px;
  font-weight: var(--fw-semibold);
  white-space: nowrap;
}
.detail-metric strong {
  display: block;
  margin-top: 8px;
  color: var(--text);
  font-size: 22px;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}
.detail-metric--total strong { color: var(--accent); }
.detail-metric--success strong { color: var(--teal); }
.detail-metric--muted strong { color: var(--text-muted); }
.detail-info {
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
  background: var(--surface);
}
.detail-info--grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
.detail-info__row {
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px;
  border-bottom: 1px solid var(--border);
}
.detail-info--grid .detail-info__row:nth-last-child(-n+2),
.detail-info:not(.detail-info--grid) .detail-info__row:last-child { border-bottom: 0; }
.detail-info--grid .detail-info__row:nth-child(odd) { border-right: 1px solid var(--border); }
.detail-info__row span {
  color: var(--text-dim);
  font-size: 12px;
}
.detail-info__row b {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--text);
  font-size: 12px;
  font-weight: var(--fw-semibold);
  font-variant-numeric: tabular-nums;
}
.detail-raw {
  max-height: 220px;
  overflow: auto;
  margin: 0;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface-code);
  color: #b8bec8;
  font-family: var(--font-mono);
  font-size: 12px;
  line-height: 1.55;
  white-space: pre-wrap;
  word-break: break-word;
}
.detail-drawer__foot {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 12px 16px;
  border-top: 1px solid var(--border);
  background: #0a0b0d;
}

@media (max-width: 1100px) {
  .work { grid-template-columns: 1fr; }
  .field-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .call-notes__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 720px) {
  .topbar {
    height: auto;
    padding: 8px 10px;
    align-items: flex-start;
  }
  .topbar__left,
  .nav {
    flex: 1 1 100%;
  }
  .nav {
    flex-wrap: nowrap;
    max-width: 100%;
    overflow-x: auto;
    scrollbar-width: none;
  }
  .nav::-webkit-scrollbar { display: none; }
  .nav__btn,
  .nav__notes,
  .nav__icon,
  .nav__div {
    flex: 0 0 auto;
  }
  .admin,
  .work,
  .stats {
    padding: 12px 10px 28px;
  }
  .field-grid,
  .call-notes__grid,
  .detail-metrics,
  .detail-info--grid {
    grid-template-columns: 1fr;
  }
  .call-notes__field--wide,
  .call-notes__field--reminder { grid-column: auto; }
  .number-pull__main { grid-template-columns: 1fr; }
  .support-page { width: calc(100vw - 20px); padding-top: 10px; }
  .support-shell {
    height: auto;
    min-height: 0;
    grid-template-columns: 1fr;
  }
  .support-sidebar { max-height: 160px; }
  .support-chat-panel__messages { min-height: 190px; }
  .support-chat-panel__form textarea { height: 64px; }
  .support-chat-panel__head h1 { font-size: 20px; }
  .support-chat-panel__form .btn {
    width: 100%;
    min-height: 40px;
  }
  .detail-drawer { width: 100vw; }
  .detail-info--grid .detail-info__row:nth-child(odd) { border-right: 0; }
  .detail-info--grid .detail-info__row:nth-last-child(-n+2) { border-bottom: 1px solid var(--border); }
  .detail-info--grid .detail-info__row:last-child { border-bottom: 0; }
}



.topbar__right { display: flex; align-items: center; gap: 10px; margin-left: auto; }
.search {
  display: inline-flex; align-items: center; gap: 8px;
  width: clamp(200px, 22vw, 300px); height: 32px; padding: 0 10px;
  border: 1px solid var(--border); border-radius: 7px; background: var(--surface-2);
  color: var(--text-dim); transition: border-color var(--dur-fast), box-shadow var(--dur-fast);
}
.search:focus-within { border-color: rgba(255, 200, 67, .5); box-shadow: 0 0 0 3px rgba(255, 200, 67, .1); }
.search__icon { flex: none; color: var(--text-dim); }
.search input { flex: 1; min-width: 0; border: 0; background: transparent; color: var(--text); font: inherit; font-size: 13px; outline: none; }
.search input::placeholder { color: var(--text-dim); }
.search__kbd {
  flex: none; font-family: var(--font-mono); font-size: 11px; padding: 1px 6px;
  border-radius: 5px; background: var(--surface-3); border: 1px solid var(--border-strong); color: var(--text-dim);
}
.livepill {
  display: inline-flex; align-items: center; gap: 7px; height: 32px; padding: 0 11px;
  border: 1px solid var(--border); border-radius: 999px; background: var(--surface-2);
  font-family: var(--font-mono); font-size: var(--text-mono-sm); color: var(--text-muted); white-space: nowrap;
}
.livepill__dot { width: 8px; height: 8px; border-radius: 50%; background: var(--text-dim); transition: background var(--dur-fast), box-shadow var(--dur-fast); }
.livepill.is-live .livepill__dot { background: var(--teal); box-shadow: 0 0 0 3px var(--teal-soft); animation: livePulse 2.4s ease-in-out infinite; }
.livepill.is-down .livepill__dot { background: var(--danger); box-shadow: 0 0 0 3px var(--danger-soft); }
.livepill.is-down .livepill__text { color: var(--danger); }
.livepill__clock { color: var(--text-dim); }
@keyframes livePulse { 0%, 100% { box-shadow: 0 0 0 3px var(--teal-soft); } 50% { box-shadow: 0 0 0 5px rgba(66, 217, 129, .04); } }


.statusbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 35;
  display: flex; align-items: center; gap: 18px; height: 26px; padding: 0 14px;
  border-top: 1px solid var(--border); background: rgba(5, 6, 7, .96);
  font-family: var(--font-mono); font-size: 11.5px; color: var(--text-dim);
}
.statusbar__seg { display: inline-flex; align-items: center; gap: 7px; min-width: 0; }
.statusbar__seg--mid { color: var(--text-muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.statusbar__seg--mono { margin-left: auto; }
.statusbar__dot { flex: none; width: 7px; height: 7px; border-radius: 50%; background: var(--text-dim); }
.statusbar.is-live .statusbar__dot { background: var(--teal); box-shadow: 0 0 0 3px var(--teal-soft); }
.statusbar.is-down .statusbar__dot { background: var(--danger); }
.statusbar.is-down [data-status-live] { color: var(--danger); }
.statusbar__latency { color: var(--text-dim); }
.admin { padding-bottom: 48px; }


.data-table__nums, .user-cell__text small { font-family: var(--font-mono); }


.detail-tabs__item { background: transparent; border: 0; border-bottom: 2px solid transparent; cursor: pointer; font-family: inherit; }
.detail-tabs__item:hover { color: var(--text-muted); }
.detail-tab-panel { display: none; flex-direction: column; gap: 14px; }
.detail-tab-panel.is-active { display: flex; }
.activity-sub { margin: 4px 0 0; color: var(--text-dim); font-size: 11px; font-weight: var(--fw-bold); text-transform: uppercase; letter-spacing: .06em; }
.activity-group { display: flex; flex-direction: column; }
.activity-empty { padding: 14px 12px; color: var(--text-dim); font-size: 12px; text-align: center; border: 1px dashed var(--border); border-radius: 8px; background: var(--surface); }
.activity-row {
  display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, .9fr) auto auto;
  align-items: center; gap: 10px; padding: 8px 11px;
  border: 1px solid var(--border); border-top: 0; background: var(--surface);
  font-family: var(--font-mono); font-size: var(--text-mono-sm);
}
.activity-row:first-child { border-top: 1px solid var(--border); border-radius: 8px 8px 0 0; }
.activity-row:last-child { border-radius: 0 0 8px 8px; }
.activity-row__num { color: var(--text); font-weight: var(--fw-semibold); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.activity-row__name { color: var(--text-dim); font-family: var(--font-sen); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.activity-row__time { color: var(--text-dim); white-space: nowrap; }
.activity-tag { justify-self: end; padding: 2px 8px; border-radius: 999px; font-family: var(--font-sen); font-size: 11px; font-weight: var(--fw-semibold); white-space: nowrap; background: var(--surface-3); color: var(--text-muted); }
.activity-tag--p1, .activity-tag--hit { background: var(--accent-soft); color: var(--accent); }
.activity-tag--dead, .activity-tag--hangup, .activity-tag--instant { background: var(--danger-soft); color: var(--danger); }
.activity-tag--voicemail { background: rgba(255, 200, 67, .12); color: var(--amber); }
.activity-tag--pending { background: var(--surface-3); color: var(--text-dim); }
.activity-row--session { grid-template-columns: minmax(0, 1fr) auto; }
.activity-row__dur { justify-self: end; color: var(--text-muted); }
.activity-row--session.is-active .activity-row__dur { color: var(--teal); }



.history__list .h-num,
.history__list .h-time { font-family: var(--font-mono); }
.history__list .h-time { font-size: var(--text-mono-sm); }

/* Source picker — single-line "Source:" control in the work-tab header (§4.5a).
   Read-only by default (static label); a <select> appears when can_pick_source. */
.source-control {
  display: flex; align-items: center; flex-wrap: wrap; gap: var(--space-6);
  margin-top: var(--space-9); font-size: var(--text-caption); color: var(--text-dim);
  min-width: 0;   /* allow the control to shrink within the pull row instead of
                     pushing a long source label past the card edge (clipped by
                     .card overflow:hidden) */
}
.source-control__label { font-weight: var(--fw-semibold); color: var(--text-dim); flex: none; }
.source-control__static {
  color: var(--text); font-weight: var(--fw-medium);
  min-width: 0; max-width: 100%;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.source-control__select {
  min-height: 30px; padding: 0 var(--space-9);
  border: 1px solid var(--border-strong); border-radius: var(--radius-md);
  background: var(--surface-2); color: var(--text); font-size: var(--text-caption);
  min-width: 0; max-width: 100%;   /* truncate a long option label, never overflow */
}
.source-control__select:disabled { opacity: .55; cursor: not-allowed; }
.source-control__hint { color: var(--text-muted); font-style: italic; }

/* Neutral fallback styling for registry-driven custom tags that ship no
   per-key colour class (design §4.6a — readable default, never invisible). */
.number-action--default {
  color: var(--text-muted); border-color: var(--border-strong); background: var(--surface-2);
}
.stat-card--default { border-color: var(--border-strong); }
.stat-card--default::before { background: var(--text-dim); }
.stat-card--default .stat-card__value { color: var(--text); }
.res--default { color: var(--text-muted); background: var(--surface-2); }


/* ============================================================
   LAYER 3 — YACHT CLUB terminal redesign
   Authoritative re-skin. Reuses every existing class / data-attr
   / [hidden] rule / @keyframes / grid-column-count from Layers 1-2
   so app.js / admin.js / caller.js / support.js keep working.
   Only appearance + the new rail/section/bracket chrome change.
   ============================================================ */

/* ---- global ground -------------------------------------------------- */
html, body { background: #000; }
body {
  background: #000;
  color: var(--text);
  font-family: var(--font-sen);
  font-feature-settings: "liga" 0, "calt" 0;
  letter-spacing: -0.01em;
  -webkit-font-smoothing: antialiased;
}
::selection { background: rgba(255,255,255,.85); color: #000; }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: #20242b; border-radius: 0; }
::-webkit-scrollbar-thumb:hover { background: #2c313a; }
b, strong { font-weight: var(--fw-semibold); }

/* ---- left icon rail ------------------------------------------------- */
.rail {
  position: fixed;
  left: 0; top: 0; bottom: 0;
  width: var(--rail-w);
  z-index: 60;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 16px 0 14px;
  background: #050506;
  border-right: 1px solid var(--border);
}
.rail__brand {
  display: grid; place-items: center;
  width: 38px; height: 38px;
  color: var(--ui);
  margin-bottom: 10px;
  text-decoration: none;
}
.rail__brand svg { width: 26px; height: 26px; display: block; }
.rail__nav {
  display: flex; flex-direction: column; align-items: center; gap: 6px;
  width: 100%;
}
.rail__foot {
  margin-top: auto;
  display: flex; flex-direction: column; align-items: center; gap: 12px;
  width: 100%;
}
/* rail buttons — icon only, square; active = white bracketed box */
.rail .nav__btn,
.rail .nav__notes,
.rail .nav__icon {
  width: 38px; height: 38px;
  min-height: 0;
  padding: 0;
  /* flex centering of the lone <svg>. The button also holds a trailing text
     label (kept for a11y, mirrored in aria-label); font-size:0 + line-height:0
     collapse it to a zero box. gap:0 is essential — the base .nav__btn sets
     gap:7px, which otherwise survives as a phantom 7px flex item beside the
     icon and shifts it ~3.5px off-centre under justify-content:center. */
  display: flex; align-items: center; justify-content: center;
  gap: 0;
  line-height: 0;
  font-size: 0;                 /* hide the text label, keep the svg */
  letter-spacing: 0;
  color: var(--text-dim);
  background: transparent;
  border: 1px solid transparent;
  border-radius: var(--radius-md);
  transition: color var(--dur-fast), border-color var(--dur-fast), background var(--dur-fast);
}
.rail .nav__btn svg,
.rail .nav__notes svg,
.rail .nav__icon svg { width: 18px; height: 18px; display: block; }
.rail .nav__btn:hover,
.rail .nav__notes:hover,
.rail .nav__icon:hover { color: var(--text); background: var(--ui-soft); border-color: transparent; }
.rail .nav__btn.is-active,
body.notes-open .rail .nav__notes {
  color: var(--ui);
  background: transparent;
  border-color: var(--ui-line);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.04);
}
.rail .nav__icon[data-logout]:hover { color: var(--danger); }
.rail .nav__div { display: none; }
/* livepill collapses to a single status dot inside the rail */
.rail .livepill {
  width: 38px; height: 22px;
  padding: 0; gap: 0;
  background: transparent; border: 0;
  justify-content: center;
}
.rail .livepill__text,
.rail .livepill__clock { display: none; }
.rail .livepill__dot { width: 7px; height: 7px; }

/* content shifts right of the rail */
.stage { margin-left: var(--rail-w); }
.support-page { margin-left: var(--rail-w); }

/* admin floating search (was in topbar__right) */
.topstrip {
  position: fixed; top: 16px; right: 22px; z-index: 55;
  display: flex; align-items: center; gap: 10px;
}
.topstrip .search {
  min-height: 34px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
}
.topstrip .search:focus-within { border-color: var(--ui-line); }
.statusbar { display: none; }   /* rail dot replaces the bottom status bar */

/* ---- numbered section headers + dotted rulers ----------------------- */
.sect { margin: 0 0 var(--space-20); }
.sect__row {
  display: flex; align-items: baseline; gap: 16px;
  font-size: 15px; line-height: 1.4; color: var(--text);
  font-weight: var(--fw-regular);
  padding: 4px 0;
}
.sect__row + .sect__row { margin-top: 2px; }
.sect__idx { color: var(--text-dim); font-variant-numeric: tabular-nums; }
.sect__row b, .sect__row [data-operator-name],
.sect__row [data-admin-name], .sect__row [data-support-name] {
  color: var(--text); font-weight: var(--fw-semibold);
}
.sect__row .muted, .sect__sub { color: var(--text-dim); }
.ruler {
  height: 9px;
  margin: 8px 0 18px;
  background: repeating-linear-gradient(90deg,
    rgba(255,255,255,.13) 0 1px, transparent 1px 8px);
  background-position: 0 bottom;
  background-repeat: repeat-x;
  background-size: auto 9px;
}

/* ---- cards: flat black panels w/ corner registration brackets ------- */
.card {
  background-color: var(--surface);
  background-image:
    linear-gradient(var(--ui-line), var(--ui-line)),
    linear-gradient(var(--ui-line), var(--ui-line)),
    linear-gradient(var(--ui-line), var(--ui-line)),
    linear-gradient(var(--ui-line), var(--ui-line)),
    linear-gradient(var(--ui-line), var(--ui-line)),
    linear-gradient(var(--ui-line), var(--ui-line)),
    linear-gradient(var(--ui-line), var(--ui-line)),
    linear-gradient(var(--ui-line), var(--ui-line));
  background-repeat: no-repeat;
  background-size:
    9px 1px, 1px 9px,   /* top-left  */
    9px 1px, 1px 9px,   /* top-right */
    9px 1px, 1px 9px,   /* bottom-left */
    9px 1px, 1px 9px;   /* bottom-right */
  background-position:
    top left, top left,
    top right, top right,
    bottom left, bottom left,
    bottom right, bottom right;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
}
.card__head {
  min-height: 46px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  background: transparent;
}
.card__title {
  gap: 9px;
  font-size: 12px;
  font-weight: var(--fw-semibold);
  text-transform: uppercase;
  letter-spacing: .12em;
  color: var(--text-muted);
}
.card__title svg { color: var(--text-dim); }
.card__title .count { color: var(--text-dim); letter-spacing: 0; }
.hint { font-size: 11px; text-transform: uppercase; letter-spacing: .1em; color: var(--text-dim); }

/* page width wrappers */
.work, .stats { width: min(100%, 1200px); padding: 30px 32px 56px; }
.admin { width: min(100%, 1860px); padding: 30px 32px 56px; }

/* ---- buttons -------------------------------------------------------- */
.btn {
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  background: var(--surface-2);
  color: var(--text);
  font-family: var(--font-sen);
  font-size: 13px;
  font-weight: var(--fw-medium);
  transition: border-color var(--dur-fast), background var(--dur-fast), color var(--dur-fast), box-shadow var(--dur-fast);
}
.btn:hover:not(:disabled) { border-color: var(--ui-line); background: var(--surface-3); }
.btn--primary {
  background: var(--ui);
  color: #000;
  border-color: var(--ui);
}
.btn--primary:hover:not(:disabled) {
  background: #fff; color: #000;
  box-shadow: var(--shadow-glow);
}
.btn--soft, .btn--ghost { background: var(--surface-2); color: var(--text); }
.btn--ghost { background: transparent; }
.btn--danger { background: var(--danger-soft); color: var(--danger); border-color: rgba(240,84,92,.4); }
.btn--danger:hover:not(:disabled) { background: rgba(240,84,92,.2); border-color: var(--danger); }
.btn:disabled { opacity: .45; cursor: not-allowed; box-shadow: none; }
.btn--sm { min-height: 30px; padding: 0 11px; font-size: 12px; }
.btn--xs { min-height: 26px; padding: 0 9px; font-size: 11px; }

/* outline "action" buttons (Get Number / Get GV / Start Work) */
.got-number, .work-timer__btn {
  background: var(--surface-2);
  border: 1px solid var(--ui-line);
  color: var(--text);
  border-radius: var(--radius-md);
  font-family: var(--font-sen);
  font-weight: var(--fw-medium);
  box-shadow: none;
}
.got-number svg { color: var(--text-muted); }
.got-number:hover:not(:disabled), .work-timer__btn:hover:not(:disabled) {
  border-color: var(--ui); color: var(--ui); box-shadow: var(--shadow-glow);
}
.got-number:hover:not(:disabled) svg { color: var(--ui); }
.got-number:disabled, .work-timer__btn:disabled { opacity: .4; border-color: var(--border); box-shadow: none; }
.work-timer.is-active .work-timer__btn { border-color: rgba(240,84,92,.5); color: var(--danger); }
.number-full { background: transparent; border: 1px solid var(--border); color: var(--text-muted); border-radius: var(--radius-sm); }
.number-full:hover:not(:disabled) { border-color: var(--ui-line); color: var(--text); }

/* ---- inputs / selects / textareas ----------------------------------- */
.admin input, .limits-edit input, .modal input, .modal textarea,
.select, .combo__btn, .source-control__select,
.call-notes__field input, .call-notes__field textarea,
.support-chat-panel__form textarea, .support-drawer__form textarea,
.notes__pad {
  border-color: var(--border);
  border-radius: var(--radius-md);
  background-color: var(--surface-2);
  color: var(--text);
  font-family: var(--font-sen);
}
.admin input::placeholder, .modal input::placeholder, textarea::placeholder,
.search input::placeholder { color: var(--text-dim); }
.admin input:focus, .limits-edit input:focus, .modal input:focus, .modal textarea:focus,
.select:focus, .combo__btn:focus, .combo__search:focus, .source-control__select:focus,
.support-chat-panel__form textarea:focus, .support-drawer__form textarea:focus,
.call-notes__field input:focus, .call-notes__field textarea:focus,
.search input:focus, .notes__pad:focus {
  outline: none;
  border-color: var(--ui-line);
  background-color: var(--surface-3);
  box-shadow: 0 0 0 3px rgba(255,255,255,.07);
}
.select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%238b9099' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  background-size: 12px;
  padding-right: 34px;
}
.check input, input[type="checkbox"] { accent-color: var(--ui); }

/* ---- pills / chips -------------------------------------------------- */
.pill {
  border-radius: var(--radius-full);
  font-size: 11px; letter-spacing: .04em; text-transform: uppercase;
  padding: 3px 10px; font-weight: var(--fw-semibold); border: 1px solid transparent;
}
.pill--role { background: var(--surface-3); color: var(--text-muted); border-color: var(--border); }
.pill--worker { background: var(--accent); color: #000; border-color: var(--accent); }
.pill--caller { background: var(--accent-2); color: #06070d; border-color: var(--accent-2); }
.pill--support { background: var(--teal); color: #04130a; border-color: var(--teal); }
.pill--on { background: var(--teal-soft); color: var(--teal); border-color: rgba(63,185,80,.45); }
.pill--off { background: var(--surface-3); color: var(--text-dim); border-color: var(--border); }
.work-chip {
  border-radius: var(--radius-full); font-size: 11px; padding: 3px 10px;
  background: var(--surface-3); color: var(--text-dim); border: 1px solid var(--border);
  text-transform: uppercase; letter-spacing: .04em;
}
.work-chip.is-active { background: var(--teal-soft); color: var(--teal); border-color: rgba(63,185,80,.45); }

/* ---- data tables --------------------------------------------------- */
.data-table { font-size: 13px; }
.data-table th {
  padding: 11px 12px; border-bottom: 1px solid var(--border);
  font-size: 10.5px; font-weight: var(--fw-semibold); text-transform: uppercase;
  letter-spacing: .1em; color: var(--text-dim); background: transparent;
}
.data-table td { padding: 12px; border-bottom: 1px solid rgba(255,255,255,.045); color: var(--text); vertical-align: middle; }
.data-table tbody tr:hover { background: rgba(255,255,255,.025); }
.data-table__nums { font-family: var(--font-mono); }
.is-zero, .data-table__nums.is-zero { color: var(--text-dim); }
.data-table__strong { color: var(--text); font-weight: var(--fw-semibold); }
tr.is-clickable { cursor: pointer; }
.cell-trunc { color: var(--text-muted); }
.user-avatar, .detail-avatar {
  border-radius: var(--radius-md); font-weight: var(--fw-bold); color: #000; font-family: var(--font-mono);
}
.user-avatar--worker, .detail-avatar--worker { background: var(--accent); }
.user-avatar--caller, .detail-avatar--caller { background: var(--accent-2); }
.user-avatar--support, .detail-avatar--support { background: var(--teal); }
.user-cell__src { color: var(--text-dim); }

/* ---- quota / work timer (operator) --------------------------------- */
.quota { font-family: var(--font-mono); color: var(--text-muted); }
.quota__label { color: var(--text-dim); text-transform: uppercase; letter-spacing: .08em; }
.quota__val { color: var(--text); }
.quota__item.is-exhausted .quota__val { color: var(--danger); }
.work-timer__status { color: var(--text-dim); }
.work-timer__time { font-family: var(--font-mono); color: var(--text); }
.work-timer.is-active .work-timer__time { color: var(--teal); }

/* ---- number pull / current number ---------------------------------- */
.number-pull__display strong, [data-current-number] { font-family: var(--font-mono); color: var(--ui); }
.number-pull__name, [data-current-name] { color: var(--text-dim); }
/* Keep the current-number row readable when its grid track (.number-pull__main)
   is squeezed: the number stays intact, a long lead name truncates with an
   ellipsis, and the name/Full wrap to a second line only as a last resort
   instead of jamming/overflowing past the box edge. */
.number-pull__display { flex-wrap: wrap; row-gap: 6px; }
.number-pull__name, [data-current-name] {
  min-width: 0; flex: 0 1 auto;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.source-control__static { color: var(--text); }
.full-info { background: var(--surface-code); border: 1px solid var(--border); color: var(--text-muted); border-radius: var(--radius-md); }

/* ---- disposition buttons (success=green, neg=red, vm=amber) -------- */
.number-action {
  background: var(--surface-2); border: 1px solid var(--border); color: var(--text-muted);
  border-radius: var(--radius-md); font-family: var(--font-sen); font-weight: var(--fw-medium);
  transition: border-color var(--dur-fast), background var(--dur-fast), color var(--dur-fast);
}
.number-action:hover { border-color: var(--ui-line); color: var(--text); }
.number-action--p1, .number-action--hit,
.number-action[data-number-action="p1"], .number-action[data-number-action="hit"] {
  background: var(--teal-soft); color: var(--teal); border-color: rgba(63,185,80,.4);
}
.number-action--dead, .number-action--hangup, .number-action--instant,
.number-action[data-number-action="dead"], .number-action[data-number-action="hangup"],
.number-action[data-number-action="instant"] {
  background: var(--danger-soft); color: var(--danger); border-color: rgba(240,84,92,.32);
}
.number-action--voicemail, .number-action[data-number-action="voicemail"] {
  background: rgba(207,155,58,.13); color: var(--amber); border-color: rgba(207,155,58,.34);
}
.number-action--pending, .number-action[data-number-action="pending"] { color: var(--text-dim); }

/* ---- history + result chips ---------------------------------------- */
.history__head span { color: var(--text-dim); text-transform: uppercase; letter-spacing: .1em; font-size: 10.5px; }
.history__list li { border-bottom: 1px solid rgba(255,255,255,.045); }
.h-num { font-family: var(--font-mono); color: var(--text); }
.h-sub, .h-note, .reminder-meta { color: var(--text-dim); }
.h-time { font-family: var(--font-mono); color: var(--text-muted); }
.res { border-radius: var(--radius-sm); font-size: 11px; padding: 3px 9px; font-weight: var(--fw-medium); }
.res--p1 { background: var(--teal-soft); color: var(--teal); }
.res--dead, .res--hangup, .res--instant { background: var(--danger-soft); color: var(--danger); }
.res--voicemail { background: rgba(207,155,58,.13); color: var(--amber); }
.res--pending { background: var(--surface-3); color: var(--text-dim); }
.reminders__list:empty::before { color: var(--text-dim); }

/* ---- GV credentials ------------------------------------------------ */
.gv-pull__note { color: var(--text-dim); }
.gv-cred { background: var(--surface-code); border: 1px solid var(--border); border-radius: var(--radius-md); }
.gv-cred__label { color: var(--text-dim); text-transform: uppercase; letter-spacing: .08em; font-size: 11px; }
.gv-cred__value { font-family: var(--font-mono); color: var(--teal); }
.gv-cred__status, .call-notes__status, [data-gv-copy-status] { color: var(--teal); }
.gv-pull__avail { font-family: var(--font-mono); color: var(--text-muted); }

/* ---- notices ------------------------------------------------------- */
.notice { border-radius: var(--radius-md); border: 1px solid var(--border); background: var(--surface-2); }
.notice__title { color: var(--text); }
.notice__detail { color: var(--text-muted); }
.notice--limited { border-color: rgba(207,155,58,.4); background: rgba(207,155,58,.1); }
.notice--limited .notice__title { color: var(--amber); }
.notice--disabled { border-color: rgba(240,84,92,.4); background: var(--danger-soft); }
.notice--disabled .notice__title { color: var(--danger); }
.notice--empty { color: var(--text-dim); }
.notice--tag { border-color: var(--ui-line); background: var(--ui-soft); }
.notice--tag .notice__title { color: var(--ui); }
.take-cause { color: var(--text-dim); font-family: var(--font-mono); }

/* ---- call notes ---------------------------------------------------- */
.call-notes { background: var(--surface-code); border: 1px solid var(--border); border-radius: var(--radius-md); }
.call-notes__field { color: var(--text-dim); text-transform: uppercase; letter-spacing: .06em; font-size: 11px; }
.call-notes__field input, .call-notes__field textarea { text-transform: none; letter-spacing: 0; color: var(--text); }

/* ---- code / script block ------------------------------------------- */
.script__lead { color: var(--text-muted); }
.script__lead b { color: var(--ui); }
.code { background: var(--surface-code); border: 1px solid var(--border); border-radius: var(--radius-md); }
.code__bar { background: #08090c; border-bottom: 1px solid var(--border); }
.code__lang { color: var(--text-dim); font-family: var(--font-mono); }
.code__copy { color: var(--text-muted); }
.code__copy:hover { color: var(--text); }
.code__copy.is-done, .is-done { color: var(--teal); }
.code__gutter { color: var(--text-dim); }
.code__body code { color: var(--text-muted); font-family: var(--font-mono); }
.code__body code .c { color: #4a5161; }

/* ---- stat cards (operator) + KPI cards (admin) ---------------------- */
.stat-card, .kpi {
  background-color: var(--surface);
  background-image:
    linear-gradient(var(--ui-line),var(--ui-line)), linear-gradient(var(--ui-line),var(--ui-line)),
    linear-gradient(var(--ui-line),var(--ui-line)), linear-gradient(var(--ui-line),var(--ui-line)),
    linear-gradient(var(--ui-line),var(--ui-line)), linear-gradient(var(--ui-line),var(--ui-line)),
    linear-gradient(var(--ui-line),var(--ui-line)), linear-gradient(var(--ui-line),var(--ui-line));
  background-repeat: no-repeat;
  background-size: 9px 1px,1px 9px, 9px 1px,1px 9px, 9px 1px,1px 9px, 9px 1px,1px 9px;
  background-position: top left,top left, top right,top right, bottom left,bottom left, bottom right,bottom right;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
}
.stats-grid .stat-card::before, .kpi::before { display: none; }   /* drop the old colour bar */
.stat-card__label, .kpi__label {
  color: var(--text-dim); text-transform: uppercase; letter-spacing: .1em; font-size: 11px;
}
.stat-card__value, .kpi__value { font-family: var(--font-mono); color: var(--text); font-weight: var(--fw-semibold); }
/* operator success (p1/hit) = green */
.stat-card--total .stat-card__value { color: var(--ui); }
.stat-card--p1 .stat-card__value { color: var(--teal); }
.stat-card--dead .stat-card__value, .stat-card--hangup .stat-card__value { color: var(--danger); }
.stat-card--instant .stat-card__value { color: var(--accent-2); }
.stat-card--voicemail .stat-card__value { color: var(--amber); }
.stat-card--pending .stat-card__value { color: var(--text-muted); }
/* admin: P1 series = gold, success = green */
.kpi--total .kpi__value { color: var(--ui); }
.kpi--success .kpi__value { color: var(--teal); }
.kpi--p1 .kpi__value { color: var(--accent); }
.kpi--dead .kpi__value { color: var(--danger); }
.kpi--hangup .kpi__value { color: var(--teal); }
.kpi--hit .kpi__value { color: var(--accent); }
.kpi--instant .kpi__value { color: var(--accent-2); }
.kpi--voicemail .kpi__value { color: var(--amber); }
.kpi--pending .kpi__value { color: var(--text-muted); }

/* ---- dispositions distribution + per-worker nums ------------------- */
.dist__row { border-bottom: 1px solid rgba(255,255,255,.04); }
.dist__label { color: var(--text-muted); }
.dist__val { font-family: var(--font-mono); color: var(--text-dim); }
.dist__bar { background: var(--surface-3); border-radius: var(--radius-full); }
.dist__dot, .dist__fill { background: var(--text-dim); }
.dist--p1 .dist__dot, .dist--p1 .dist__fill { background: var(--accent); }
.dist--hit .dist__dot, .dist--hit .dist__fill { background: var(--accent); }
.dist--dead .dist__dot, .dist--dead .dist__fill { background: var(--danger); }
.dist--voicemail .dist__dot, .dist--voicemail .dist__fill { background: var(--amber); }
.dist--hangup .dist__dot, .dist--hangup .dist__fill { background: var(--teal); }
.dist--instant .dist__dot, .dist--instant .dist__fill { background: var(--accent-2); }
.dist--pending .dist__dot, .dist--pending .dist__fill { background: var(--text-dim); }
.tnum--total { color: var(--ui); }
.tnum--success { color: var(--teal); }
.tnum--p1 { color: var(--accent); }
.tnum--hit { color: var(--accent); }
.tnum--dead { color: var(--danger); }
.tnum--hangup { color: var(--teal); }
.tnum--voicemail { color: var(--amber); }
.tnum--instant { color: var(--accent-2); }

/* ---- pool usage ---------------------------------------------------- */
.pool__num { font-family: var(--font-mono); color: var(--ui); }
.pool__label { color: var(--text-dim); }
.pool__bar { background: var(--surface-3); border-radius: var(--radius-full); }
.pool__fill { background: linear-gradient(90deg, var(--ui-dim), #8a8f97); }
.pool__legend { color: var(--text-muted); }
.pool__legend b { color: var(--text); font-family: var(--font-mono); }

/* ---- filters / segmented toggles / filter chips -------------------- */
.filters__label { color: var(--text-dim); text-transform: uppercase; letter-spacing: .1em; font-size: 11px; }
.seg { background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--radius-md); padding: 3px; }
.seg__btn { color: var(--text-muted); background: transparent; border: 1px solid transparent; border-radius: var(--radius-sm); font-family: var(--font-sen); }
.seg__btn:hover { color: var(--text); }
.seg__btn.is-active { color: var(--ui); background: var(--ui-soft); border-color: var(--ui-line); box-shadow: none; }
.admin-filterbar { background: #08090c; border-bottom: 1px solid var(--border); }
.filter-chip { background: var(--surface); border: 1px solid var(--border); color: var(--text-muted); border-radius: var(--radius-md); font-family: var(--font-sen); }
.filter-chip:hover { border-color: var(--ui-line); color: var(--text); }
.filter-chip.is-active { color: var(--ui); border-color: var(--ui-line); background: var(--ui-soft); }
.filter-chip span { color: var(--text-dim); }
.filter-chip.is-active span { color: var(--text-muted); }

/* ---- combo box / row menu ------------------------------------------ */
.combo__btn { color: var(--text); }
.combo__pop, .rowmenu {
  background: var(--surface-3); border: 1px solid var(--border-strong);
  border-radius: var(--radius-md); box-shadow: var(--shadow-md);
}
.combo__search { background: var(--surface-2); }
.combo__item, .rowmenu__item { color: var(--text-muted); background: transparent; border-radius: var(--radius-sm); }
.combo__item:hover, .rowmenu__item:hover { background: var(--ui-soft); color: var(--text); }
.rowmenu__item--danger { color: var(--danger); }
.rowmenu__item--danger:hover { background: var(--danger-soft); color: var(--danger); }
.iconbtn { color: var(--text-dim); border-radius: var(--radius-sm); }
.iconbtn:hover { color: var(--text); background: var(--ui-soft); }

/* ---- worker detail drawer ----------------------------------------- */
.drawer-scrim { background: rgba(0,0,0,.62); }
.detail-drawer { background: var(--surface); border-left: 1px solid var(--border-strong); box-shadow: var(--shadow-md); }
.detail-drawer__head { border-bottom: 1px solid var(--border); }
.detail-drawer__close { color: var(--text-dim); }
.detail-drawer__close:hover { color: var(--danger); }
.detail-tabs { border-bottom: 1px solid var(--border); }
.detail-tabs__item { color: var(--text-dim); background: transparent; border: 0; border-bottom: 2px solid transparent; font-family: var(--font-sen); }
.detail-tabs__item:hover { color: var(--text); }
.detail-tabs__item.is-active { color: var(--ui); border-bottom-color: var(--ui); }
.detail-section { border-top: 1px solid var(--border); }
.detail-section__title, .detail-info__row span:first-child { color: var(--text-dim); text-transform: uppercase; letter-spacing: .08em; font-size: 11px; }
.detail-metric {
  background-color: var(--surface-2); border: 1px solid var(--border); border-radius: var(--radius-md);
  background-image:
    linear-gradient(var(--ui-line),var(--ui-line)),linear-gradient(var(--ui-line),var(--ui-line)),
    linear-gradient(var(--ui-line),var(--ui-line)),linear-gradient(var(--ui-line),var(--ui-line)),
    linear-gradient(var(--ui-line),var(--ui-line)),linear-gradient(var(--ui-line),var(--ui-line)),
    linear-gradient(var(--ui-line),var(--ui-line)),linear-gradient(var(--ui-line),var(--ui-line));
  background-repeat: no-repeat;
  background-size: 8px 1px,1px 8px,8px 1px,1px 8px,8px 1px,1px 8px,8px 1px,1px 8px;
  background-position: top left,top left,top right,top right,bottom left,bottom left,bottom right,bottom right;
}
.detail-metric strong, .detail-metric b, .detail-metric__value { font-family: var(--font-mono); color: var(--text); }
.detail-metric--total strong, .detail-metric--total .detail-metric__value { color: var(--accent); }
.detail-metric--success strong, .detail-metric--success .detail-metric__value { color: var(--teal); }
.detail-metric--muted strong, .detail-metric--muted .detail-metric__value { color: var(--text-muted); }
.detail-info__row { border-bottom: 1px solid rgba(255,255,255,.04); }
.detail-raw, .detail-raw pre { background: var(--surface-code); border: 1px solid var(--border); border-radius: var(--radius-md); color: var(--text-muted); font-family: var(--font-mono); }
.activity-row { border-bottom: 1px solid rgba(255,255,255,.04); }
.activity-row__num { font-family: var(--font-mono); color: var(--text); }
.activity-row__name { color: var(--text-muted); }
.activity-row__time, .activity-row__dur { font-family: var(--font-mono); color: var(--text-dim); }
.activity-row--session.is-active { color: var(--teal); }
.activity-empty, .activity-sub { color: var(--text-dim); }
.activity-tag { border-radius: var(--radius-sm); font-size: 10.5px; padding: 2px 8px; text-transform: uppercase; letter-spacing: .04em; background: var(--surface-3); color: var(--text-muted); }
.activity-tag--p1 { background: var(--accent-soft); color: var(--accent); }
.activity-tag--hit { background: var(--accent-soft); color: var(--accent); }
.activity-tag--dead, .activity-tag--hangup, .activity-tag--instant { background: var(--danger-soft); color: var(--danger); }
.activity-tag--voicemail { background: rgba(207,155,58,.13); color: var(--amber); }
.activity-tag--pending { background: var(--surface-3); color: var(--text-dim); }

/* ---- modals -------------------------------------------------------- */
.modal-overlay { background: rgba(0,0,0,.66); }
.modal {
  background-color: var(--surface); border: 1px solid var(--border-strong); border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  background-image:
    linear-gradient(var(--ui-line),var(--ui-line)),linear-gradient(var(--ui-line),var(--ui-line)),
    linear-gradient(var(--ui-line),var(--ui-line)),linear-gradient(var(--ui-line),var(--ui-line)),
    linear-gradient(var(--ui-line),var(--ui-line)),linear-gradient(var(--ui-line),var(--ui-line)),
    linear-gradient(var(--ui-line),var(--ui-line)),linear-gradient(var(--ui-line),var(--ui-line));
  background-repeat: no-repeat;
  background-size: 11px 1px,1px 11px,11px 1px,1px 11px,11px 1px,1px 11px,11px 1px,1px 11px;
  background-position: top left,top left,top right,top right,bottom left,bottom left,bottom right,bottom right;
}
.modal__head { border-bottom: 1px solid var(--border); }
.modal__title { color: var(--text); font-size: 15px; }
.modal__close { color: var(--text-dim); background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--radius-sm); }
.modal__close:hover { color: var(--danger); border-color: rgba(240,84,92,.4); }
.modal__sub { color: var(--text-dim); }
.modal__error { color: var(--danger); }
.modal__warn { color: var(--amber); }
.field label, .field__opt, .filters__group .filters__label { color: var(--text-dim); }
.field__opt { color: var(--text-dim); opacity: .8; }
.check { color: var(--text-muted); }
.cred-row__label { color: var(--text-dim); }
.cred-row__value { font-family: var(--font-mono); color: var(--teal); }
.cred-panel { background: var(--surface); border: 1px solid var(--border-strong); box-shadow: var(--shadow-md); }
.cred-panel__warn { color: var(--amber); }
.source-choice__text { color: var(--text-muted); }
.source-checklist__title { color: var(--text-dim); text-transform: uppercase; letter-spacing: .08em; font-size: 11px; }

/* ---- bases (DB / GV overview) -------------------------------------- */
.bases__group-title { color: var(--text-dim); text-transform: uppercase; letter-spacing: .1em; font-size: 11px; }
.bases__item { border-bottom: 1px solid rgba(255,255,255,.04); }
.bases__label { color: var(--text-muted); }
.bases__num { font-family: var(--font-mono); color: var(--text); }
.bases__item--success .bases__num, .bases__item--success .bases__label { color: var(--teal); }

/* ---- placeholders / empty states ----------------------------------- */
.placeholder { color: var(--text-dim); }
.placeholder__title { color: var(--text-muted); }
.empty-state { color: var(--text-dim); }
.empty-state__text { color: var(--text-dim); }
.tag-db__label { font-family: var(--font-mono); color: var(--text-muted); }

/* ---- live pill (shared) -------------------------------------------- */
.livepill {
  background: var(--surface-2); border: 1px solid var(--border);
  border-radius: var(--radius-full); color: var(--text-muted);
}
.livepill__dot { background: var(--text-dim); }
.livepill.is-live .livepill__dot { background: var(--teal); box-shadow: 0 0 0 3px var(--teal-soft); }
.livepill.is-down .livepill__dot { background: var(--danger); }
.livepill.is-down { color: var(--danger); }
.livepill__text { text-transform: uppercase; letter-spacing: .12em; font-size: 10.5px; }
.livepill__clock { font-family: var(--font-mono); color: var(--text-dim); }

/* ---- toast --------------------------------------------------------- */
.toast {
  background: var(--surface-3); border: 1px solid var(--border-strong); color: var(--text);
  box-shadow: var(--shadow-md); border-radius: var(--radius-md); font-family: var(--font-sen);
}
.toast__dot { background: var(--teal); }

/* ---- notes drawer -------------------------------------------------- */
.notes { background: var(--surface); border-left: 1px solid var(--border-strong); }
.notes__head { border-bottom: 1px solid var(--border); }
.notes__title { color: var(--text-muted); text-transform: uppercase; letter-spacing: .1em; font-size: 12px; }
.notes__hide { color: var(--text-dim); }
.notes__hide:hover { color: var(--text); }
.notes__pad { background: var(--surface-code); color: var(--text); }

/* ---- support FAB + customer drawer --------------------------------- */
.fab { background: var(--ui); color: #000; box-shadow: var(--shadow-md); border: 0; }
.fab:hover { box-shadow: var(--shadow-glow); }
.fab.is-alert::after { background: var(--amber); }
.support-drawer { background: var(--surface); border: 1px solid var(--border-strong); box-shadow: var(--shadow-md); border-radius: var(--radius-lg); }
.support-drawer__head { border-bottom: 1px solid var(--border); }
.support-drawer__title { color: var(--text-muted); text-transform: uppercase; letter-spacing: .1em; font-size: 12px; }
.support-drawer__close { color: var(--text-dim); background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--radius-sm); }
.support-drawer__close:hover { color: var(--text); }
.support-bubble, .support-message { border-radius: var(--radius-md); }
.support-bubble.is-own, .support-message.is-own {
  background: var(--ui-soft); border: 1px solid var(--ui-line); color: var(--text);
}
.support-bubble.is-support {
  background: var(--teal-soft); border: 1px solid rgba(63,185,80,.32); color: var(--text);
}
.support-message.is-user {
  background: var(--surface-2); border: 1px solid var(--border); color: var(--text-muted);
}
.support-bubble__meta, .support-message__meta { color: var(--text-dim); }
.support-empty { color: var(--text-dim); }

/* ---- support console (two-pane) ------------------------------------ */
.support-sidebar { background: var(--surface); border-right: 1px solid var(--border); }
.support-sidebar__head { border-bottom: 1px solid var(--border); }
.support-sidebar__title { color: var(--text-dim); text-transform: uppercase; letter-spacing: .12em; font-size: 12px; }
.support-sidebar__count { font-family: var(--font-mono); color: var(--text-muted); }
.support-thread { border-bottom: 1px solid var(--border); color: var(--text-muted); border-left: 2px solid transparent; background: transparent; }
.support-thread:hover { background: var(--ui-soft); }
.support-thread.is-active { background: var(--ui-soft); color: var(--text); border-left-color: var(--ui); }
.support-thread.is-needs-reply { background: rgba(207,155,58,.08); }
.support-thread.is-needs-reply.is-active { border-left-color: var(--amber); }
.support-thread__avatar { background: var(--surface-3); color: var(--text-muted); border-radius: var(--radius-md); font-family: var(--font-mono); }
.support-thread.is-needs-reply .support-thread__avatar { background: var(--accent); color: #000; }
.support-thread__top b { color: var(--text); }
.support-thread__top time, .support-thread__body { color: var(--text-dim); }
.support-thread__badge { background: var(--amber); color: #000; border-radius: var(--radius-full); font-family: var(--font-mono); }
.support-chat-panel { background: var(--surface); }
.support-chat-panel__head { border-bottom: 1px solid var(--border); }
.support-chat-panel__role { color: var(--text-dim); text-transform: uppercase; letter-spacing: .1em; font-size: 11px; }
.support-chat-panel__head h1 { color: var(--text); font-size: 17px; font-weight: var(--fw-semibold); }
.support-chat-panel__status { border-radius: var(--radius-full); background: var(--teal-soft); color: var(--teal); font-size: 11px; text-transform: uppercase; letter-spacing: .06em; padding: 3px 10px; border: 1px solid rgba(63,185,80,.35); }
.support-chat-panel__status.is-hot { background: rgba(207,155,58,.14); color: var(--amber); border-color: rgba(207,155,58,.4); }
.support-chat-panel__form { border-top: 1px solid var(--border); }
.support-empty--center { color: var(--text-dim); }

/* ---- responsive ---------------------------------------------------- */
@media (max-width: 980px) {
  .work, .admin, .stats { padding: 24px 20px 48px; }
  .topstrip { right: 14px; top: 12px; }
  .topstrip .search { min-height: 32px; }
}
@media (max-width: 720px) {
  :root { --rail-w: 52px; }
  .rail { width: 52px; padding: 12px 0 10px; }
  .rail__brand { width: 32px; height: 32px; }
  .rail .nav__btn, .rail .nav__notes, .rail .nav__icon { width: 34px; height: 34px; }
  .work, .admin, .stats { padding: 20px 14px 44px; }
  .sect__row { font-size: 14px; gap: 12px; }
}

.topstrip .support-who { color: var(--text-muted); font-size: 12px; font-family: var(--font-mono); }
.topstrip .support-who b { color: var(--text); }

/* keep rail-offset content from overflowing the viewport horizontally */
.support-page { width: auto; }
.stage { width: auto; }
/* numbered-header meta = plain dim text (not a pill) */
.sect .stats__meta { color: var(--text-dim); background: transparent; border: 0; padding: 0; font-family: var(--font-mono); }

/* clear the fixed top-right strip so the chat status pill never slides under it */
.support-page .support-chat-panel__head { padding-right: 200px; }
@media (max-width: 720px) {
  .support-page .support-chat-panel__head { padding-right: 16px; }
}

/* ============================================================
   LAYER 3 — review fixes (multi-agent QA pass)
   Each item out-specifies or post-orders the old Layer-1/2 rule
   it corrects. Comments reference the QA finding id.
   ============================================================ */

/* B1 — restore the [hidden] contract on the two boxes that have an
   author display rule beating UA [hidden] (empty Number box + actions). */
.number-pull__display[hidden],
.number-actions[hidden] { display: none; }

/* H1 — keyboard focus rings = white (was global gold at line 33). */
:focus-visible { outline: 2px solid var(--ui); outline-offset: 2px; }

/* H2 — modal <textarea class="input"> kept the old gold focus (0,3,1). */
.modal textarea.input:focus {
  outline: none; border-color: var(--ui-line);
  background-color: var(--surface-3); box-shadow: 0 0 0 3px rgba(255,255,255,.07);
}

/* H3 — current-number box bled old #42d981 teal; use the new green token. */
.number-pull__display {
  background: var(--teal-soft); border: 1px solid rgba(63,185,80,.4);
  border-radius: var(--radius-md);
}

/* H4 / H5 — per-worker table compound selectors out-specified Layer 3. */
.data-table__nums.tnum--total { color: var(--ui); }
.data-table__nums.tnum--hangup { color: var(--teal); }

/* H6 / H7 / L6 — support thread borders bled old gold/purple (shorthand
   on transparent base edges); reset the whole border per state. */
.support-thread:hover { transform: none; border-color: transparent; }
.support-thread.is-active {
  background: var(--ui-soft); color: var(--text);
  border-color: transparent; border-left-color: var(--ui);
}
.support-thread.is-needs-reply { background: rgba(207,155,58,.08); border-color: transparent; }
.support-thread.is-needs-reply.is-active { box-shadow: none; border-left-color: var(--amber); }
/* M6 — unify the needs-reply state on amber (avatar matched the badge/tint). */
.support-thread.is-needs-reply .support-thread__avatar { background: var(--amber); }

/* H9 — modal checkboxes kept gold accent (0,2,1). */
.check input[type="checkbox"] { accent-color: var(--ui); }

/* H10 — admin source-checklist custom marks were gold when checked/focused. */
.source-choice input:checked + .source-choice__mark { border-color: var(--ui); background: var(--ui); }
.source-choice input:checked + .source-choice__mark::after { border-color: #000; }
.source-choice input:focus-visible + .source-choice__mark { box-shadow: 0 0 0 3px rgba(255,255,255,.07); }

/* M3 — placeholder icon stayed gold. */
.placeholder__icon { color: var(--text-dim); border-color: var(--border); background: var(--surface); }

/* M4 — "Full" button hover bled old cyan-teal. */
.number-full:hover:not(:disabled) { background: var(--surface-3); }

/* M5 — sorted table header stayed gold. */
.th-sort.is-sorted { color: var(--ui); }

/* M7 — raise persistent micro-labels to a WCAG-AA-passing role; retarget
   the detail-section title to the real <h3> Layer 3 should own. */
.detail-section h3,
.detail-info__row span:first-child,
.detail-metric span,
.field label { color: var(--text-muted); }
.rail .nav__btn, .rail .nav__notes, .rail .nav__icon { color: var(--text-muted); }
.rail .nav__btn.is-active, body.notes-open .rail .nav__notes { border-color: rgba(255,255,255,.42); color: var(--ui); }

/* L1 — code-window "traffic light" dots used the old palette literals. */
.code__dots i:nth-child(1) { background: var(--danger); }
.code__dots i:nth-child(2) { background: var(--amber); }
.code__dots i:nth-child(3) { background: var(--teal); }

/* L3 — .notice--tag container kept a stray gold color. */
.notice--tag { color: var(--text); }

/* L4 — drawer/notes title icons stayed gold (card titles were neutralized). */
.support-drawer__title svg, .notes__title svg { color: var(--text-dim); }

/* L5 — caller reminder-field pulse injected periwinkle into operator notes. */
.call-notes__field--reminder input:not(:placeholder-shown) { animation: none; }

/* L6 — customer FAB alert dot kept an old-gold halo. */
.fab.is-alert::after { box-shadow: 0 0 0 4px rgba(207,155,58,.16); }

/* L8 — neutral polish: translucent row hover, group/drawer radii. */
.data-table tbody tr:hover td { background: rgba(255,255,255,.025); }
.bases__group { background: var(--surface); border-radius: var(--radius-md); }
.detail-info { border-radius: var(--radius-md); }
.detail-drawer__close { border-radius: var(--radius-sm); }
.activity-empty { border-radius: var(--radius-md); }

/* M1 — keep the admin search reachable at <=720 (was display:none on the
   whole topstrip, killing the input + Cmd/Ctrl-K); M2 — stack the pull row. */
@media (max-width: 720px) {
  .topstrip { position: static; margin: 10px 0 0 calc(var(--rail-w) + 12px); }
  .topstrip .support-who { display: none; }
  .number-pull__main { display: flex; flex-direction: column; align-items: stretch; }
  .number-pull__main .got-number { width: 100%; }
}

/* ==LAYER3-REVIEW-FIXES-END== */


/* ============================================================
   LAYER 4 — motion polish
   Appended AFTER the Layer-3 review-fix block on purpose: every rule here
   sets ONLY motion properties (transition / transform / animation), never
   color / background-image / layout, so it cannot override any of Layer 3's
   cascade-critical decisions. The whole layer auto-neutralizes under the
   prefers-reduced-motion block near the top of this file.
   ============================================================ */

/* --- every tab switch eases the incoming panel in --- */
.tab-panel.is-active { animation: cp-tab-in var(--dur-base) var(--ease-out) both; }
@keyframes cp-tab-in {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: none; }
}

/* --- press feedback: interactive controls dip on click --- */
.btn:active:not(:disabled) { transform: translateY(0) scale(.975); transition-duration: var(--dur-fast); }
.seg__btn {
  transition: color var(--dur-fast) var(--ease-out), background var(--dur-fast) var(--ease-out),
              border-color var(--dur-fast) var(--ease-out), transform var(--dur-fast) var(--ease-out);
}
.seg__btn:active { transform: scale(.97); }
.work-chip {
  transition: color var(--dur-fast) var(--ease-out), background var(--dur-fast) var(--ease-out),
              border-color var(--dur-fast) var(--ease-out), filter var(--dur-fast) var(--ease-out),
              transform var(--dur-fast) var(--ease-out);
}
.work-chip:active { transform: scale(.96); }

/* --- rail icons: smooth press + a gentle pop when a tab becomes active --- */
.rail .nav__btn, .rail .nav__notes, .rail .nav__icon {
  transition: color var(--dur-fast) var(--ease-out), background var(--dur-fast) var(--ease-out),
              border-color var(--dur-base) var(--ease-out), box-shadow var(--dur-base) var(--ease-out),
              transform var(--dur-fast) var(--ease-out);
}
.rail .nav__btn:active, .rail .nav__notes:active, .rail .nav__icon:active { transform: scale(.9); }
.rail .nav__btn.is-active { animation: cp-rail-pop var(--dur-base) var(--ease-out) both; }
@keyframes cp-rail-pop { from { transform: scale(.84); } to { transform: scale(1); } }

/* --- table rows: wash the hover background in instead of snapping --- */
.data-table tbody tr td { transition: background var(--dur-fast) var(--ease-out); }

/* --- stat cards: smooth the existing hover lift --- */
.stat-card {
  transition: transform var(--dur-base) var(--ease-out), border-color var(--dur-base) var(--ease-out),
              box-shadow var(--dur-base) var(--ease-out);
}

/* --- form fields: ease the focus ring in --- */
input, select, textarea, .input {
  transition: border-color var(--dur-fast) var(--ease-out), box-shadow var(--dur-fast) var(--ease-out),
              background var(--dur-fast) var(--ease-out);
}

/* --- status pills / badges: fade colour flips (live<->down etc.) --- */
.livepill, .pill, .badge {
  transition: color var(--dur-base) var(--ease-out), background var(--dur-base) var(--ease-out),
              border-color var(--dur-base) var(--ease-out);
}

/* --- links --- */
a { transition: color var(--dur-fast) var(--ease-out); }

/* admin — named raw pools: the × delete affordance on a pool overview row */
.pool-del {
  margin-left: 6px;
  padding: 0 5px;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--text-dim);
  font: inherit;
  font-size: 13px;
  line-height: 1;
  cursor: pointer;
}
.pool-del:hover { color: var(--danger); border-color: rgba(240, 84, 92, .4); background: var(--danger-soft); }
/* header target-pool picker sits inline with the Upload/Delete buttons */
.card__meta .select[data-pool-target] { min-height: 30px; max-width: 200px; font-size: 12px; }

/* ============================================================
   Manager panel (F5) + admin manager-config controls
   ============================================================ */
.mgr-grid { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 16px; align-items: start; }
@media (max-width: 880px) { .mgr-grid { grid-template-columns: 1fr; } }
.mgr-list { list-style: none; margin: 0; padding: 6px; display: flex; flex-direction: column; gap: 4px; }
.mgr-row { display: flex; align-items: center; gap: 10px; padding: 9px 12px; border: 1px solid var(--border); border-radius: var(--radius-md); background: var(--surface-2); cursor: pointer; }
.mgr-row:hover { border-color: var(--ui-line); }
.mgr-row.is-sel { border-color: var(--ui-line); box-shadow: inset 0 0 0 1px rgba(255,255,255,.05); }
.mgr-row__login { font-weight: var(--fw-semibold); color: var(--text); }
.mgr-row__role { color: var(--text-dim); font-size: 11px; text-transform: uppercase; letter-spacing: .08em; }
.mgr-row__badges { margin-left: auto; display: flex; gap: 6px; }
.mgr-badge { font-size: 10px; text-transform: uppercase; letter-spacing: .06em; padding: 2px 7px; border-radius: var(--radius-sm); border: 1px solid var(--border); color: var(--text-dim); }
.mgr-badge.is-on { color: var(--teal); border-color: rgba(63,185,80,.4); }
.mgr-badge.is-off { color: var(--danger); border-color: rgba(240,84,92,.4); }
.mgr-empty, .mgr-detail .muted { color: var(--text-dim); padding: 12px; display: block; }
.mgr-detail { padding: 14px 16px; }
.mgr-kvs { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; }
.mgr-kv { display: flex; justify-content: space-between; gap: 12px; font-size: 13px; }
.mgr-kv span { color: var(--text-dim); }
.mgr-kv b { color: var(--text); font-weight: var(--fw-medium); }
.mgr-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.mgr-logs { margin-top: 14px; }
.mgr-logs__h { font-size: 11px; text-transform: uppercase; letter-spacing: .1em; color: var(--text-dim); margin: 10px 0 4px; }
.mgr-logs__list { list-style: none; margin: 0; padding: 0; font-size: 12px; color: var(--text-muted); display: flex; flex-direction: column; gap: 3px; }
/* admin: manager permission checkboxes grid (create form + edit modal) */
.manager-perms { display: grid; grid-template-columns: 1fr 1fr; gap: 6px 14px; margin-top: 6px; }
