

*, *::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; } to { opacity: 1; } }


.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); }
[data-mgr-mass-notify][hidden] { display: none; }
.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-pull__display .number-pull__p1-time {
  color: var(--text-muted);
  font-size: var(--text-caption);
  font-weight: var(--fw-semibold);
  font-variant-numeric: tabular-nums;
  letter-spacing: 0;
  text-transform: 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; }
.full-info-panel {
  display: grid; gap: var(--space-10); margin-top: var(--space-10);
}
.full-info-panel[hidden] { display: none; }
.full-info-section {
  min-width: 0; overflow: hidden;
  border: 1px solid var(--border); border-radius: var(--radius-lg);
  background: var(--surface-code);
}
.full-info-section__title {
  margin: 0; padding: 9px var(--space-12);
  border-bottom: 1px solid var(--border);
  color: var(--text-dim); font-size: var(--text-caption); font-weight: var(--fw-bold);
  letter-spacing: .08em; text-transform: uppercase;
}
.full-info-section__meta {
  margin: 0; padding: 8px var(--space-12) 0;
  color: var(--text-muted); font-family: var(--font-mono); font-size: 11px;
}
.full-info-section__meta[hidden] { display: none; }
.full-info-section .full-info {
  margin: 0; max-height: 260px;
  border: 0; border-radius: 0; background: transparent;
}
.full-info-section[data-state="empty"] .full-info,
.full-info-section[data-state="unavailable"] .full-info { color: var(--text-muted); }
.full-info-section[data-state="error"] { border-color: rgba(240,84,92,.45); }
.full-info-section[data-state="error"] .full-info-section__title,
.full-info-section[data-state="error"] .full-info { color: var(--danger); }
.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(--p1-blue); }
.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(--p1-blue); } .kpi--p1::before { background: var(--p1-blue); }
.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(--p1-blue); }
.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;
}
.user-tag-controls {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  min-width: 0;
  max-width: 100%;
  margin-left: auto;
}
.user-tag-filter {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-width: 210px;
  color: var(--text-dim);
  font-size: 11px;
  font-weight: var(--fw-semibold);
  letter-spacing: .04em;
}
.user-tag-filter .select {
  flex: 1 1 auto;
  min-width: 145px;
  width: 180px;
  min-height: 28px;
  padding-top: 0;
  padding-bottom: 0;
  font-size: 12px;
}
.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: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: var(--surface-3);
  color: var(--text);
  font-size: 15px;
  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);
}

.user-cell__text small.user-cell__src {
  font-family: inherit;
  max-width: 220px;
  opacity: 0.92;
}
.field--user-tags { grid-column: span 2; }
.user-tags-cell {
  min-width: 150px;
  max-width: 280px;
}
.user-tag-list,
.detail-user-tags {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 5px;
}
.detail-user-tags {
  min-height: 34px;
  padding: 9px 10px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
}
.user-tag-chip {
  display: inline-flex;
  align-items: center;
  min-height: 22px;
  max-width: 180px;
  padding: 2px 8px;
  overflow: hidden;
  border: 1px solid var(--border-strong);
  border-radius: 999px;
  background: var(--surface-3);
  color: var(--text-muted);
  font: inherit;
  font-size: 11px;
  font-weight: var(--fw-semibold);
  line-height: 1.2;
  text-overflow: ellipsis;
  white-space: nowrap;
  cursor: pointer;
}
.user-tag-chip:hover,
.user-tag-chip:focus-visible {
  color: var(--accent);
  border-color: rgba(255, 200, 67, .42);
  outline: none;
}
.user-tag-empty {
  color: var(--text-dim);
  font-size: 12px;
}

.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; }
  to { opacity: 1; }
}
.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: 64px;
  height: 64px;
  font-size: 22px;
}
.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;
  }
  .field--user-tags { grid-column: auto; }
  .user-tag-controls {
    flex: 1 1 100%;
    margin-left: 0;
  }
  .user-tag-filter {
    flex: 1 1 100%;
    width: 100%;
    margin-left: 0;
  }
  .user-tag-filter .select { min-width: 0; }
  .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-row__source {
  grid-column: 1 / -1; display: grid; grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: start; gap: 10px; min-width: 0; padding-top: 6px;
  border-top: 1px solid var(--border);
}
.activity-row__source-label {
  color: var(--text-dim); font-family: var(--font-sen); font-size: 10px;
  font-weight: var(--fw-bold); letter-spacing: .07em; text-transform: uppercase;
}
.activity-row__source-value {
  min-width: 0; color: var(--text-muted); overflow-wrap: anywhere;
}
.call-correction__button { flex: none; min-height: 28px; white-space: nowrap; }
.activity-row__source .call-correction__button { align-self: center; justify-self: end; }
.call-correction__context {
  display: grid; gap: 7px; margin: 0 0 16px; padding: 12px;
  border: 1px solid var(--border); border-radius: var(--radius-md); background: var(--surface-2);
}
.call-correction__context > div { display: grid; grid-template-columns: 92px minmax(0, 1fr); align-items: center; gap: 10px; }
.call-correction__context dt { color: var(--text-dim); font-size: 10px; font-weight: var(--fw-bold); letter-spacing: .07em; text-transform: uppercase; }
.call-correction__context dd { min-width: 0; margin: 0; color: var(--text); overflow-wrap: anywhere; }
.activity-row__full { grid-column: 1 / -1; }
.call-full-info {
  display: grid; grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: start; gap: 6px 10px; width: 100%; min-width: 0;
  padding-top: 7px; border-top: 1px solid var(--border);
}
.call-full-info__label {
  color: var(--text-dim); font-family: var(--font-sen); font-size: 10px;
  font-weight: var(--fw-bold); letter-spacing: .07em; text-transform: uppercase;
}
.call-full-info__value, .activity-row__full-value {
  min-width: 0; color: var(--text-muted); font-family: var(--font-mono);
  font-size: 11px; line-height: 1.45; white-space: pre-wrap; overflow-wrap: anywhere;
}
.call-full-info__copy {
  padding: 1px 6px; border: 1px solid var(--border-strong); border-radius: 4px;
  background: var(--surface-2); color: var(--text-dim); font: inherit;
  font-size: 10px; cursor: pointer;
}
.call-full-info__copy:hover { color: var(--text); border-color: var(--ui-line); }
.call-full-info__copy.is-copied { color: var(--teal); border-color: var(--teal); }
.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 { background: rgba(88,181,224,.14); color: var(--p1-blue); }
.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); }
.activity-toolbar { display: flex; flex-wrap: wrap; align-items: end; gap: 8px; margin: 0 0 10px; }
.activity-toolbar__search { flex: 1 1 190px; min-width: 150px; }
.activity-filter-field { display: inline-flex; flex-direction: column; gap: 4px; min-width: 104px; color: var(--text-dim); font-size: 10px; font-weight: var(--fw-semibold); text-transform: uppercase; letter-spacing: .05em; }
.activity-filter-field .select, .activity-filter-field .input { min-height: 30px; height: 30px; padding-top: 4px; padding-bottom: 4px; font-size: 11px; text-transform: none; letter-spacing: 0; }
.activity-date-filter { width: 128px; color-scheme: dark; }
.activity-pager { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 9px; color: var(--text-dim); font-size: 11px; }
.activity-pager__actions { display: flex; gap: 6px; }


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


.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;
}
.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%;
}
.source-control__select:disabled { opacity: .55; cursor: not-allowed; }
.source-control__hint { color: var(--text-muted); font-style: italic; }


.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); }


html, body { background: var(--bg); }
body {
  background: var(--bg);
  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); }


.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 .nav__btn,
.rail .nav__notes,
.rail .nav__icon {
  width: 38px; height: 38px;
  min-height: 0;
  padding: 0;

  display: flex; align-items: center; justify-content: center;
  gap: 0;
  line-height: 0;
  font-size: 0;
  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; }

.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; }


.stage { margin-left: var(--rail-w); }
.support-page { margin-left: var(--rail-w); }


.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; }


.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;
}


.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,
    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);
}
.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); }


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


.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; }


.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); }


.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); }


.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--manager { background: #b794ff; color: #160a2e; border-color: #b794ff; }
.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-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 { 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__display strong, [data-current-number] { font-family: var(--font-mono); color: var(--ui); }
.number-pull__name, [data-current-name] { color: var(--text-dim); }

.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); }


.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__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-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); }


.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 { 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); }


.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-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; }
.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); }

.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); }

.kpi--total .kpi__value { color: var(--ui); }
.kpi--success .kpi__value { color: var(--teal); }
.kpi--p1 .kpi__value { color: var(--p1-blue); }
.kpi--dead .kpi__value { color: var(--danger); }
.kpi--hangup .kpi__value { color: var(--danger); }
.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); }


.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(--p1-blue); }
.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(--danger); }
.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(--p1-blue); }
.tnum--hit { color: var(--accent); }
.tnum--dead { color: var(--danger); }
.tnum--hangup { color: var(--danger); }
.tnum--voicemail { color: var(--amber); }
.tnum--instant { color: var(--accent-2); }


.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__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__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); }


.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: rgba(88,181,224,.14); color: var(--p1-blue); }
.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); }


.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__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); }


.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); }


.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 {
  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 { 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); }


.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-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); }


@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); }


.support-page { width: auto; }
.stage { width: auto; }

.sect .stats__meta { color: var(--text-dim); background: transparent; border: 0; padding: 0; font-family: var(--font-mono); }


.support-page .support-chat-panel__head { padding-right: 200px; }
@media (max-width: 720px) {
  .support-page .support-chat-panel__head { padding-right: 16px; }
}


.number-pull__display[hidden],
.number-actions[hidden] { display: none; }


.more-actions { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-8); padding-top: var(--space-8); }
.more-actions[hidden] { display: none; }
.more-actions__label { font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.08em; opacity: 0.6; }
.more-actions__btns { display: flex; flex-direction: column; gap: var(--space-16); }
.more-actions__row { display: flex; flex-wrap: wrap; gap: var(--space-8); }

.more-action { min-height: 36px; padding: 0 var(--space-12); font-weight: 700; }
.more-action.is-sent,
.more-action.is-sent:disabled {
  color: var(--teal);
  border-color: rgba(63, 185, 80, .42);
  background: rgba(63, 185, 80, .16);
  opacity: 1;
}


.number-pull .card__head { flex-wrap: wrap; }
.callback-p1__trigger {
  flex: none;
  border-color: rgba(63,185,80,.4);
  color: var(--teal);
}
.callback-p1__trigger:hover:not(:disabled) {
  border-color: var(--teal);
  color: var(--teal);
}
.callback-p1-modal { width: min(440px, 100%); }
.callback-p1-modal [data-callback-p1-number] {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
}
@media (max-width: 480px) {
  .callback-p1__trigger { width: 100%; justify-content: center; }
}

:focus-visible { outline: 2px solid var(--ui); outline-offset: 2px; }

.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);
}

.number-pull__display {
  background: var(--teal-soft); border: 1px solid rgba(63,185,80,.4);
  border-radius: var(--radius-md);
}

.data-table__nums.tnum--total { color: var(--ui); }
.data-table__nums.tnum--hangup { color: var(--danger); }

.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); }
.support-thread.is-needs-reply .support-thread__avatar { background: var(--amber); }

.check input[type="checkbox"] { accent-color: var(--ui); }

.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); }

.placeholder__icon { color: var(--text-dim); border-color: var(--border); background: var(--surface); }

.number-full:hover:not(:disabled) { background: var(--surface-3); }

.th-sort.is-sorted { color: var(--ui); }

.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); }

.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); }

.notice--tag { color: var(--text); }

.support-drawer__title svg, .notes__title svg { color: var(--text-dim); }

.call-notes__field--reminder input:not(:placeholder-shown) { animation: none; }

.fab.is-alert::after { box-shadow: 0 0 0 4px rgba(207,155,58,.16); }

.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); }


@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%; }
}


.tab-panel.is-active { animation: cp-tab-in var(--dur-base) var(--ease-out) both; }
@keyframes cp-tab-in {
  from { opacity: 0; }
  to   { opacity: 1; }
}


.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 .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); } }


.data-table tbody tr td { transition: background var(--dur-fast) var(--ease-out); }


.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);
}


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);
}


.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);
}


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


.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); }

.card__meta .select[data-pool-target] { min-height: 30px; max-width: 200px; font-size: 12px; }
.status-pool-scope, .pool-target-scope { display: inline-flex; align-items: center; gap: 7px; color: var(--text-dim); font-size: 10px; font-weight: var(--fw-semibold); text-transform: uppercase; letter-spacing: .06em; white-space: nowrap; }
.card__meta .status-pool-filter { min-height: 30px; width: 180px; max-width: 24vw; font-size: 12px; }
.status-date-scope { display: inline-flex; align-items: center; gap: 6px; color: var(--text-dim); font-size: 10px; font-weight: var(--fw-semibold); text-transform: uppercase; letter-spacing: .06em; white-space: nowrap; }
.status-date-filter { width: 132px; min-height: 30px; padding: 5px 7px; color-scheme: dark; }

@media (max-width: 1100px) {
  #tab-status .card__head { align-items: flex-start; flex-wrap: wrap; }
  #tab-status .card__meta { flex-wrap: wrap; justify-content: flex-end; }
  #tab-status .status-pool-filter { max-width: 220px; }
}


.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; }
.mgr-log__item { padding: 7px 8px; border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--surface-2); }
.mgr-log__meta { overflow-wrap: anywhere; }
.mgr-log__head { display: flex; align-items: flex-start; gap: 8px; }
.mgr-log__head .mgr-log__meta { flex: 1; min-width: 0; }
.mgr-log__actions { flex: none; }
.mgr-log__source { display: flex; align-items: baseline; gap: 7px; min-width: 0; margin-top: 5px; }
.mgr-log__source span { flex: none; color: var(--text-dim); font-size: 10px; font-weight: var(--fw-bold); letter-spacing: .07em; text-transform: uppercase; }
.mgr-log__source b { min-width: 0; color: var(--text-muted); font-weight: var(--fw-medium); overflow-wrap: anywhere; }
.mgr-log__full { margin-top: 7px; }
.mgr-log-search { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin: 12px 0 8px; }
.mgr-log-search .search { flex: 1 1 250px; }
.mgr-log-search__count, .mgr-log-search__hint { color: var(--text-dim); font-size: 11px; }
.mgr-log-search__hint { flex-basis: 100%; }

.manager-perms { display: grid; grid-template-columns: 1fr 1fr; gap: 6px 14px; margin-top: 6px; }


.call-notes__field select { width: 100%; min-height: 36px; padding: 0 34px 0 10px; 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; appearance: none; -webkit-appearance: none; cursor: pointer; }

.call-notes__field 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; }
.call-notes__field select[multiple] { min-height: 132px; padding: 6px; background-image: none; overflow: auto; }
.call-notes__field select[multiple] option { padding: 6px 8px; border-radius: 4px; }
.call-notes__field select[multiple] option:checked { background: var(--text); color: var(--bg); }
.call-notes__field select:focus-visible { outline: 1px solid var(--text); outline-offset: 1px; }


.lookup-card .lookup-body { display: grid; gap: var(--space-13); padding: var(--space-13); }
.lookup-form { display: flex; gap: 8px; }
.lookup-form input { flex: 1; min-height: 38px; padding: 0 12px; 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); }

.lookup-form input:focus { outline: 0; border-color: var(--ui-line); box-shadow: 0 0 0 3px rgba(255,255,255,.07); }
.lookup-result { border: 1px solid var(--border); border-radius: var(--radius-md); background: var(--surface-2); padding: 10px 12px; display: grid; gap: 8px; }

.lookup-result[hidden] { display: none; }
.lookup-result__head { display: flex; align-items: center; gap: 10px; }
.lookup-result__number { font-weight: var(--fw-bold); }
.lookup-result__status { color: var(--text-dim); font-size: var(--text-caption); }
.lookup-result__line { margin: 0; white-space: pre-wrap; word-break: break-all; font-size: var(--text-body-sm); color: var(--text); }
.lookup-history { list-style: none; margin: 0; padding: 0; }
.lookup-history__empty { padding: var(--space-13); color: var(--text-muted); font-size: var(--text-body-sm); }
.lookup-history__item { padding: 10px var(--space-13); border-top: 1px solid var(--border); display: grid; gap: 4px; }
.lookup-history__item:first-child { border-top: 0; }
.lookup-history__meta { display: flex; justify-content: space-between; gap: 10px; }
.lookup-history__number { font-weight: var(--fw-bold); }
.lookup-history__time { color: var(--text-dim); font-size: var(--text-caption); }
.lookup-history__line { color: var(--text-muted); font-size: var(--text-body-sm); word-break: break-all; }


.clear-warn { color: var(--danger); font-size: var(--text-caption); margin-top: 8px; }


.mgr-stats { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; }
.mgr-stat { display: inline-flex; align-items: baseline; gap: 5px; padding: 3px 9px; border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--surface-2); font-size: 11px; text-transform: uppercase; letter-spacing: .05em; color: var(--text-dim); }
.mgr-stat b { color: var(--text); font-weight: var(--fw-semibold); font-variant-numeric: tabular-nums; }
.mgr-stat--total { border-color: rgba(63,185,80,.4); color: var(--teal); }
.mgr-stat--total b { color: var(--teal); }
.mgr-logs__list { max-height: 320px; overflow: auto; }

@media (max-width: 600px) {
  .activity-row__source { grid-template-columns: auto minmax(0, 1fr); }
  .activity-row__source .call-correction__button { grid-column: 1 / -1; justify-self: start; }
  .call-full-info { grid-template-columns: minmax(0, 1fr) auto; }
  .call-full-info__value { grid-column: 1 / -1; grid-row: 2; }
}


.cp-progress { margin: 12px 0; }
.cp-progress__bar { height: 10px; border: 1px solid var(--border, #2a2a2a); background: var(--surface-2, #111); border-radius: 2px; overflow: hidden; }
.cp-progress__fill { height: 100%; background: var(--accent, #c8b568); transition: width .2s linear; }
.cp-progress__fill.is-indeterminate { animation: cp-progress-indeterminate 1.1s ease-in-out infinite; transform-origin: left center; }
@keyframes cp-progress-indeterminate {
  0% { transform: translateX(-80%) scaleX(.5); }
  50% { transform: translateX(40%) scaleX(1); }
  100% { transform: translateX(190%) scaleX(.5); }
}
.cp-progress__meta { display: flex; justify-content: space-between; font-size: 12px; margin-top: 6px; opacity: .85; }
.cp-progress__status { font-size: 12px; margin-top: 8px; opacity: .8; }
.cp-progress__status.is-error { color: var(--danger, #d9534f); }
.cp-check { display: inline-flex; gap: 6px; align-items: center; font-size: 12px; }


.notif__meta { margin-top: 8px; font-size: 11px; text-transform: uppercase; letter-spacing: .07em; color: var(--text-muted); font-variant-numeric: tabular-nums; }


.stats-range { display: flex; align-items: center; gap: 12px; }
.stats-range .seg { padding: 0; border-top: 0; }


.card__meta .search { width: clamp(180px, 20vw, 280px); }
@media (max-width: 760px) { .card__meta .search { width: 100%; } }


.gv-import-result { margin: 0 0 14px; padding: 12px 14px; border: 1px solid var(--border); border-radius: var(--radius-md, 8px); background: var(--surface-2); }
.gv-import-result__head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 10px; }
.gv-import-result__title { font-size: 12px; text-transform: uppercase; letter-spacing: .06em; color: var(--text-muted); }
.gv-import-result__dismiss { border: 0; background: transparent; color: var(--text-dim); font-size: 18px; line-height: 1; cursor: pointer; padding: 0 4px; }
.gv-import-result__dismiss:hover { color: var(--text); }
.gv-import-result__stats { display: flex; flex-wrap: wrap; gap: 8px; }
.gv-stat { display: inline-flex; align-items: baseline; gap: 5px; padding: 4px 10px; border: 1px solid var(--border); border-radius: var(--radius-sm, 6px); background: var(--surface-3, var(--surface)); font-size: 11px; text-transform: uppercase; letter-spacing: .05em; color: var(--text-dim); }
.gv-stat b { font-size: 14px; font-weight: var(--fw-semibold, 600); font-variant-numeric: tabular-nums; color: var(--text); }
.gv-stat--ok b { color: var(--teal, #3fb950); }
.gv-stat--ok { border-color: rgba(63,185,80,.4); }
.gv-stat--dup b { color: var(--accent, #c8b568); }
.gv-stat--dup { border-color: rgba(200,181,104,.4); }
.gv-stat--err b { color: var(--danger, #f0545c); }
.gv-stat--err { border-color: rgba(240,84,92,.4); }
.gv-import-result__detail { margin: 10px 0 0; font-size: 12px; color: var(--text-muted); }
.gv-import-result__warnings { margin-top: 10px; font-size: 12px; color: var(--text-muted); }
.gv-import-result__warnings summary { cursor: pointer; color: var(--text-dim); }
.gv-import-result__warnings ul { margin: 6px 0 0; padding-left: 18px; }
.gv-import-result__warnings li { margin: 2px 0; }


.bases__item--pick { cursor: pointer; }
.bases__item--pick:hover { background: rgba(255, 255, 255, .03); }
.bases__item--pick:hover .bases__label { color: var(--text); }
.bases__item.is-selected { border-left-color: var(--ui); background: var(--ui-soft); }
.bases__item.is-selected .bases__label { color: var(--text); }


.muted { color: var(--text-muted); font-size: var(--text-body-sm); }
.recycle-group { margin-bottom: var(--space-13); }
.recycle-group h4 { font-size: var(--text-body-sm); font-weight: var(--fw-semibold); color: var(--text-dim); margin: 0 0 6px; }


.card--ops .card__meta { gap: 12px; align-items: center; flex-wrap: wrap; }
.ops__work, .ops__sound { display: inline-flex; gap: 8px; align-items: center; }
.ops__label { font-size: var(--text-body-sm); color: var(--text-dim); margin-right: 4px; }
.ops__sound-status { font-size: var(--text-body-sm); color: var(--text-muted); }

[data-work-toggle] { min-width: 64px; font-weight: var(--fw-bold, 800); }
[data-work-toggle].is-stop { background: var(--danger); border-color: var(--danger); color: #2a0708; }
[data-work-toggle].is-start { background: var(--teal); border-color: var(--teal); color: #06210f; }
.ops__work-status { font-size: var(--text-body-sm); font-weight: var(--fw-bold, 800); letter-spacing: .04em; }
.ops__work-status.is-running { color: var(--teal); }
.ops__work-status.is-stopped { color: var(--danger); }


.stats-table-wrap { margin-top: var(--space-9, 16px); }
.tag-swatch { display: inline-block; width: 9px; height: 9px; border-radius: 2px; margin-right: 7px; vertical-align: middle; }


.bulk-bar { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; padding: 8px 0; }
.bulk-bar[hidden] { display: none; }
.bulk-bar__count { font-size: var(--text-body-sm); color: var(--text-dim); margin-right: 4px; }
.bulk-bar [data-bulk="matrix_dm"][hidden] { display: none; }
.data-table__check { width: 28px; text-align: center; }


.call-notes__checks { display: flex; flex-direction: column; gap: 3px; max-height: 150px; overflow-y: auto; width: 100%; border: 1px solid var(--border-strong); border-radius: var(--radius-md); background: var(--surface); padding: 6px 9px; box-sizing: border-box; text-transform: none; letter-spacing: 0; }
.call-notes__check { display: flex; align-items: center; gap: 8px; color: var(--text); font-size: var(--text-body-sm); font-weight: var(--fw-medium); text-transform: none; letter-spacing: 0; cursor: pointer; }
.call-notes__check input { width: auto !important; min-height: 0 !important; margin: 0; padding: 0; border: 0 !important; background: none !important; accent-color: var(--accent); -webkit-appearance: checkbox; appearance: auto; flex: none; cursor: pointer; }


.status-search { display: flex; align-items: center; gap: 10px; margin: 0 0 12px; }
.status-search .search { flex: 1 1 auto; max-width: 440px; }
.status-search__meta { color: var(--text-dim); font-size: 12px; white-space: nowrap; }


#notifyTransportCard .dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--text-muted); margin-left: 6px; vertical-align: middle; }
#notifyTransportCard .dot.on { background: var(--teal); }

.ops__notify { display: inline-flex; align-items: center; flex-wrap: wrap; gap: 16px; }
.ops__notify .check input[type="radio"] { width: auto !important; min-height: 0 !important; margin: 0; padding: 0; border: 0 !important; background: none !important; accent-color: var(--ui); -webkit-appearance: radio; appearance: auto; flex: none; cursor: pointer; }


.iconbtn--matrix { font-family: var(--font-mono, ui-monospace, monospace); font-weight: 700; font-size: 12px; line-height: 1; padding: 2px 4px; color: var(--text-dim); width: auto; min-height: 0; }
.iconbtn--matrix:hover { color: var(--accent); }

.iconbtn--matrix.is-linked { color: var(--teal); border-color: rgba(66, 217, 129, .55); background: var(--teal-soft); }
.iconbtn--matrix.is-linked:hover { color: var(--teal); border-color: var(--teal); }
.mxacc-creds { display: flex; flex-direction: column; gap: 10px; }
.mxacc-creds__k { display: inline-block; min-width: 96px; color: var(--text-dim); font-size: var(--text-body-sm); }
.mxacc-creds code { user-select: all; color: var(--text); }
.mxacc-progress { display: flex; flex-direction: column; gap: 6px; color: var(--text-muted); font-size: var(--text-body-sm); }
.mxacc-bar { height: 4px; border-radius: 2px; background: var(--surface-2, rgba(255,255,255,.08)); overflow: hidden; }
.mxacc-bar > i { display: block; height: 100%; width: 40%; background: var(--teal); border-radius: 2px; animation: mxaccslide 1.1s ease-in-out infinite; }
@keyframes mxaccslide { 0% { margin-left: -40%; } 100% { margin-left: 100%; } }

.mono-cell { font-family: var(--font-mono, ui-monospace, monospace); font-size: var(--text-body-sm); color: var(--text); cursor: pointer; border-bottom: 1px dashed transparent; transition: color .12s, border-color .12s; }
.mono-cell:hover { color: var(--accent); border-bottom-color: var(--border-strong, rgba(255,255,255,.25)); }
[data-copy] { cursor: pointer; }
[data-copy].is-copied { color: var(--teal) !important; border-bottom-color: var(--teal) !important; }
.nowrap { white-space: nowrap; }
.pill--soft { display: inline-block; background: var(--surface-2, rgba(255,255,255,.06)); color: var(--text-muted); border: 1px solid var(--border); padding: 1px 8px; border-radius: 999px; font-size: var(--text-body-sm); }
.mxacc-chips { display: inline-flex; flex-wrap: wrap; gap: 4px; }
.mxacc-chip { font-family: var(--font-mono, ui-monospace, monospace); font-size: 11px; line-height: 1.5; padding: 1px 6px; border-radius: 4px; background: var(--surface-2, rgba(255,255,255,.06)); color: var(--text-muted); border: 1px solid var(--border); }
.mxacc-chip--ok { color: var(--teal); border-color: color-mix(in srgb, var(--teal) 40%, transparent); }
.mxacc-chip--fail { color: var(--danger); border-color: color-mix(in srgb, var(--danger) 40%, transparent); }
.mxacc-card { margin-top: 10px; padding: 12px 14px; border: 1px solid var(--border); border-left: 2px solid var(--teal); border-radius: var(--radius-md, 8px); background: var(--surface, rgba(255,255,255,.03)); display: flex; flex-direction: column; gap: 8px; }
.mxacc-card--err { border-left-color: var(--danger); color: var(--danger); }
.mxacc-card__head { font-family: var(--font-mono, ui-monospace, monospace); font-size: var(--text-body-sm); color: var(--text-dim); letter-spacing: .04em; text-transform: uppercase; }
.mxacc-sigil { font-family: var(--font-mono, ui-monospace, monospace); font-weight: 700; color: var(--teal); }
.detail-empty { color: var(--text-dim); font-size: var(--text-body-sm); }
.iconbtn--danger:hover { color: var(--danger); }

.rail .nav__icon--matrix { font-family: var(--font-mono, ui-monospace, monospace); font-weight: 700; font-size: 11px; line-height: 1; letter-spacing: 0; color: var(--text); }
.rail .nav__icon--matrix.is-linked { color: var(--text); background: var(--teal-soft); box-shadow: inset 2px 0 var(--teal); }
.rail .nav__icon--matrix[data-state="error"] { color: var(--text); box-shadow: inset 2px 0 var(--danger); }
.rail .nav__icon--matrix:disabled { cursor: wait; color: var(--text-muted); opacity: 1; }
.rail .nav__icon--matrix:hover { color: var(--text); background: var(--ui-soft); border-color: transparent; }
.rail .nav__icon--strike { position: relative; color: var(--text); }
.rail .nav__icon--strike:hover { color: var(--danger); background: var(--danger-soft); border-color: transparent; }
.rail .nav__icon--strike[data-state="active"] { color: var(--danger); background: var(--danger-soft); box-shadow: inset 2px 0 var(--danger); }
.rail .nav__icon--strike[data-state="error"] { color: var(--amber); box-shadow: inset 2px 0 var(--amber); }
.rail .nav__icon--strike:disabled { cursor: wait; color: var(--text-muted); opacity: 1; }
.strike-button__sigil { font-family: var(--font-mono, ui-monospace, monospace); font-size: 11px; font-weight: 700; line-height: 1; }
.strike-button__count { position: absolute; top: -3px; right: -3px; display: grid; place-items: center; min-width: 16px; height: 16px; padding: 0 4px; border: 1px solid var(--surface); border-radius: 999px; background: var(--danger); color: #fff; font-family: var(--font-mono, ui-monospace, monospace); font-size: 9px; font-weight: 800; line-height: 1; }
.strike-button__count[hidden] { display: none; }
.strike-overlay__panel { width: min(520px, 100%); }
.strike-overlay .strike-overlay__panel { border-left-color: var(--danger); }
.strike-dialog__head { padding-right: 28px; }
.strike-dialog__sigil { color: var(--danger); font-family: var(--font-mono, ui-monospace, monospace); font-weight: 800; }
.strike-summary { display: flex; align-items: baseline; gap: 10px; padding: 12px 14px; border: 1px solid var(--border); border-left: 2px solid var(--danger); border-radius: var(--radius-md); background: var(--surface-2); }
.strike-summary strong { color: var(--danger); font-family: var(--font-mono, ui-monospace, monospace); font-size: 24px; line-height: 1; }
.strike-summary span { color: var(--text); font-size: var(--text-body-sm); font-weight: var(--fw-semibold); }
.strike-dialog__section { display: grid; gap: 8px; }
.strike-dialog__section h4 { margin: 0; color: var(--text-dim); font-size: var(--text-caption); font-weight: var(--fw-bold); letter-spacing: .06em; text-transform: uppercase; }
.strike-dialog__list { display: grid; gap: 8px; }
.strike-dialog__empty { margin: 0; padding: 11px 12px; border: 1px dashed var(--border); border-radius: var(--radius-md); color: var(--text-dim); font-size: var(--text-body-sm); }
.strike-entry { display: grid; gap: 7px; padding: 12px; border: 1px solid var(--border); border-radius: var(--radius-md); background: var(--surface-2); }
.strike-entry--active { border-left: 2px solid var(--danger); }
.strike-entry--resolved { border-left: 2px solid var(--text-dim); }
.strike-entry__reason { margin: 0; color: var(--text); font-size: var(--text-body-sm); line-height: var(--leading-base); overflow-wrap: anywhere; white-space: pre-wrap; }
.strike-entry__meta { margin: 0; color: var(--text-dim); font-size: var(--text-caption); overflow-wrap: anywhere; }
.strike-entry__removal { display: grid; gap: 4px; padding: 8px 10px; border-radius: var(--radius-sm); background: var(--surface); }
.strike-entry__removal span { color: var(--text-dim); font-size: 10px; font-weight: var(--fw-bold); letter-spacing: .06em; text-transform: uppercase; }
.strike-entry__removal p { margin: 0; color: var(--text-muted); font-size: var(--text-body-sm); line-height: var(--leading-base); overflow-wrap: anywhere; white-space: pre-wrap; }
.strike-dialog__actions { display: flex; justify-content: flex-end; }
.previous-call-launch { display: flex; flex-wrap: wrap; margin-top: var(--space-12); }
.previous-call-overlay { z-index: 210; }
.previous-call-overlay [hidden] { display: none; }
.previous-call-summary { display: grid; gap: 8px; font-size: var(--text-body-sm); }
.previous-call-summary[hidden] { display: none; }
.previous-call-summary p { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px; margin: 0; color: var(--text-muted); }
.previous-call-summary strong { color: var(--text); overflow-wrap: anywhere; }
.previous-call-field { display: grid; gap: 8px; }
.previous-call-field select { width: 100%; min-width: 0; }
.previous-call-overlay .modal__foot { flex-wrap: wrap; }
.mxacc-overlay { position: fixed; inset: 0; z-index: 200; display: flex; align-items: center; justify-content: center; padding: 12px; overflow-y: auto; background: rgba(0, 0, 0, .6); }
.mxacc-overlay__panel { position: relative; box-sizing: border-box; width: min(440px, 100%); max-height: calc(100dvh - 24px); overflow-y: auto; padding: 22px; border: 1px solid var(--border); border-left: 2px solid var(--teal); border-radius: var(--radius-md, 8px); background: var(--surface, #0c0d10); display: flex; flex-direction: column; gap: 12px; box-shadow: 0 18px 60px rgba(0, 0, 0, .5); }
.mxacc-overlay__close { position: absolute; top: 6px; right: 8px; display: grid; place-items: center; width: 32px; height: 32px; padding: 0; background: none; border: 0; color: var(--text-dim); font-size: 20px; line-height: 1; cursor: pointer; }
.mxacc-overlay__close:hover { color: var(--text); }
.mxacc-overlay .mxacc-sigil { color: var(--text); }
.mxacc-create-state { display: flex; flex-direction: column; gap: 14px; margin: 0; }
.mxacc-create-state .detail-empty { margin: 0; color: var(--text); }
.mxacc-create-actions { display: flex; justify-content: flex-end; }
.mxacc-create-state .modal__error { margin: 0; overflow-wrap: anywhere; }


.rail .nav__icon[data-api-key-button]:hover {
  color: var(--teal);
  background: var(--teal-soft);
  border-color: transparent;
}
.api-key-panel { min-width: 0; }
.api-key-panel [hidden] { display: none; }
.api-key-panel code {
  color: var(--text-muted);
  font-family: var(--font-mono);
  font-size: .92em;
  overflow-wrap: anywhere;
}
.api-key-status {
  display: flex;
  align-items: center;
  gap: 9px;
  min-height: 38px;
  margin: 0;
  padding: 9px 11px;
  color: var(--text-muted);
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  font-size: var(--text-body-sm);
  line-height: var(--leading-snug);
}
.api-key-status::before {
  content: "";
  width: 7px;
  height: 7px;
  flex: none;
  border-radius: 50%;
  background: var(--text-dim);
}
.api-key-status.is-active::before { background: var(--teal); box-shadow: 0 0 0 3px var(--teal-soft); }
.api-key-status.is-disabled::before { background: var(--danger); box-shadow: 0 0 0 3px var(--danger-soft); }
.api-key-current { display: grid; gap: 7px; }
.api-key-current[hidden] { display: none; }
.api-key-label {
  color: var(--text-dim);
  font-size: var(--text-caption);
  font-weight: var(--fw-semibold);
  letter-spacing: .05em;
  text-transform: uppercase;
}
.api-key-value-row { align-items: stretch; min-width: 0; }
.modal .api-key-value-row input {
  min-width: 0;
  color: var(--teal);
  font-family: var(--font-mono);
  user-select: all;
}
.api-key-updated {
  margin: 0;
  color: var(--text-dim);
  font-size: var(--text-caption);
}
.api-key-delete-confirm .modal__foot { margin-top: var(--space-12); }

@media (max-width: 520px) {
  .api-key-value-row { flex-wrap: wrap; }
  .api-key-value-row .btn { width: 100%; }
}
.mxacc-credentials { min-width: 0; }
.mxacc-credentials .cred-row { min-width: 0; justify-content: space-between; flex-wrap: wrap; padding: 10px 12px; border: 1px solid var(--border); border-radius: var(--radius-md); background: var(--surface-2); }
.mxacc-credentials .cred-row__value { min-width: 0; max-width: 100%; appearance: none; text-align: left; color: var(--text); overflow-wrap: anywhere; word-break: break-all; }
.mxacc-credentials .cred-row__value:focus-visible { outline: 2px solid var(--ui); outline-offset: 2px; }
.mxacc-credentials [data-copy].is-copied { color: var(--text) !important; border-color: var(--teal) !important; box-shadow: inset 2px 0 var(--teal); }
.mxacc-live { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
@media (max-width: 480px) {
  .mxacc-overlay__panel { padding: 20px 16px 16px; }
  .mxacc-create-actions .btn { width: 100%; }
}


.cp-file-hidden {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.btn.is-busy { pointer-events: none; opacity: .55; cursor: default; }

.op-avatar {
  width: 44px; height: 44px; flex: none;
  border-radius: 50%; object-fit: cover; cursor: pointer;
  vertical-align: middle;
  background: var(--surface-2); border: 1px solid var(--border);
  transition: border-color .12s;
  font-size: 0;
}
.op-avatar:hover { border-color: var(--accent); }

.op-avatar-label { display: inline-flex; vertical-align: middle; cursor: pointer; line-height: 0; }

.rank-badge-lg { display: inline-flex; align-items: center; justify-content: center; height: 44px; font-size: 34px; line-height: 1; vertical-align: middle; margin: 0 4px; }
.rank-badge-lg:empty { display: none; margin: 0; }

.op-avatar:not(.has-avatar) {
  border-style: dashed;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%238b9099' stroke-width='1.7' stroke-linecap='round'%3E%3Ccircle cx='12' cy='9' r='3.3'/%3E%3Cpath d='M5.3 19a6.7 6.7 0 0 1 13.4 0'/%3E%3C/svg%3E");
  background-size: 62%; background-position: center; background-repeat: no-repeat;
}
.op-avatar-del {
  margin-left: 6px; padding: 1px 7px; line-height: 1.4;
  background: transparent; border: 1px solid var(--border);
  color: var(--text-muted); border-radius: 6px; cursor: pointer; font-size: 14px;
}

.rank-badge { font-size: 1.45em; line-height: 1; vertical-align: -0.06em; }
.user-avatar, .detail-avatar { overflow: hidden; }
.user-avatar__img { width: 100%; height: 100%; object-fit: cover; border-radius: inherit; display: block; }


.live-controls { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin: 0 0 12px; }
.live-controls .search { flex: 1 1 auto; max-width: 320px; }
.live-controls .live-filterbar { padding: 0; border-bottom: 0; background: transparent; }
@media (max-width: 640px) { .live-controls .search { max-width: none; } }


.theme-toggle {
  position: fixed; top: 12px; right: 14px; z-index: 200;
  width: 34px; height: 34px; display: inline-flex; align-items: center; justify-content: center;
  border: 1px solid var(--border-strong); border-radius: var(--radius-lg);
  background: var(--surface-2); color: var(--text-muted); cursor: pointer;
  box-shadow: var(--shadow-sm);
  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);
}
.theme-toggle:hover { color: var(--ui); border-color: var(--ui-line); background: var(--surface-3); }
.theme-toggle:active { transform: scale(.94); }


html[data-theme="light"] .rail { background: var(--surface); }
html[data-theme="light"] .data-table { background: var(--surface); }
html[data-theme="light"] .data-table th { background: var(--surface-2); }
html[data-theme="light"] .data-table td { border-bottom-color: var(--border); }
html[data-theme="light"] .data-table tbody tr:hover td { background: var(--surface-2); }
html[data-theme="light"] .admin-filterbar { background: var(--surface-2); }
html[data-theme="light"] .code__bar { background: var(--surface-2); }
html[data-theme="light"] .iconbtn { background: var(--surface-2); }
html[data-theme="light"] .work-chip { background: var(--surface-2); }
html[data-theme="light"] .detail-drawer,
html[data-theme="light"] .support-drawer,
html[data-theme="light"] .support-sidebar { background: var(--surface); }
html[data-theme="light"] .detail-drawer__foot { background: var(--surface-2); }
html[data-theme="light"] .notes { background: var(--surface); }
html[data-theme="light"] .history__list li:hover { background: var(--surface-2); }


html[data-theme="light"] .full-info,
html[data-theme="light"] .code__body code { color: var(--text); }


html[data-theme="light"] ::-webkit-scrollbar-thumb { background: #c5ccd6; }
html[data-theme="light"] ::-webkit-scrollbar-thumb:hover { background: #aab2bd; }


.target-actions {
  width: 100%;
  max-width: var(--work-max);
  min-width: 0;
  margin: 0 auto;
  padding: var(--space-24) var(--space-24) var(--space-50);
  letter-spacing: 0;
}
.target-actions__head { margin-bottom: 0; }
.target-actions__titleline {
  min-width: 0;
  align-items: center;
  padding-right: 52px;
  letter-spacing: 0;
}
.target-actions__status {
  flex: none;
  min-width: 12ch;
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 7px;
  color: var(--text-muted);
  font-size: var(--text-caption);
  font-weight: var(--fw-medium);
  line-height: 1;
  letter-spacing: 0;
  text-transform: lowercase;
}
.target-actions__status-dot {
  width: 7px;
  height: 7px;
  flex: none;
  border-radius: 50%;
  background: var(--amber);
}
.target-actions__status[data-state="live"] { color: var(--teal); }
.target-actions__status[data-state="live"] .target-actions__status-dot { background: var(--teal); }
.target-actions__status[data-state="error"] { color: var(--danger); }
.target-actions__status[data-state="error"] .target-actions__status-dot { background: var(--danger); }
.target-notes {
  width: 100%;
  min-width: 0;
  margin: 0;
  padding: 0;
  list-style: none;
}
.target-note {
  width: 100%;
  min-width: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 8ch;
  align-items: start;
  gap: var(--space-24);
  padding: 13px 4px;
  border-bottom: 1px solid var(--border);
  letter-spacing: 0;
}
.target-note__text {
  min-width: 0;
  margin: 0;
  color: var(--text);
  line-height: var(--leading-base);
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  word-break: break-word;
  letter-spacing: 0;
}
.target-note__time {
  width: 8ch;
  justify-self: end;
  color: var(--text-dim);
  font-family: var(--font-mono);
  font-size: var(--text-mono-sm);
  font-variant-numeric: tabular-nums;
  line-height: var(--leading-base);
  white-space: nowrap;
  text-align: right;
  letter-spacing: 0;
}
.target-actions__empty {
  margin: 0;
  padding: var(--space-40) 4px;
  border-bottom: 1px solid var(--border);
  color: var(--text-dim);
  text-align: center;
  letter-spacing: 0;
}
.target-actions__empty[hidden] { display: none; }
.support-page .target-actions__titleline { padding-right: 220px; }

@media (max-width: 720px) {
  .target-actions { padding: var(--space-20) var(--space-13) var(--space-40); }
  .target-actions__titleline,
  .support-page .target-actions__titleline { padding-right: 52px; }
  .target-note { gap: var(--space-12); padding: 12px 2px; }
}


.mgr-page { width: min(100%, 1400px); }
.mgr-create-card .admin-form { border-top: 0; }
.mgr-create-fields { grid-template-columns: minmax(140px, .6fr) minmax(180px, 1fr); }
.mgr-create-card input,
.mgr-matrix-fields input {
  width: 100%; min-height: 40px; padding: 0 var(--space-13); box-sizing: border-box;
  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);
}
.mgr-create-card input:focus,
.mgr-matrix-fields input:focus { outline: 0; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.mgr-list > li { min-width: 0; }
.mgr-row {
  width: 100%; box-sizing: border-box; color: inherit; font: inherit; text-align: left;
}
.mgr-row:focus-visible { outline: 2px solid var(--ui); outline-offset: 2px; }
.mgr-state {
  margin: 0; padding: 14px 16px; color: var(--text-dim); font-size: var(--text-body-sm);
  overflow-wrap: anywhere;
}
.mgr-state[hidden] { display: none; }
.mgr-state--card { border: 1px solid var(--border); border-radius: var(--radius-md); background: var(--surface); }
.mgr-state[data-state="error"] { color: var(--danger); border-color: rgba(240,84,92,.35); }
.mgr-state[data-state="loading"]::before { content: ""; display: inline-block; width: 8px; height: 8px; margin-right: 8px; border: 2px solid var(--border-strong); border-top-color: var(--accent); border-radius: 50%; animation: mgr-spin .8s linear infinite; }
@keyframes mgr-spin { to { transform: rotate(360deg); } }
.mgr-stats-filters .select { min-width: 160px; }
.mgr-stats-filters > .btn { margin-left: auto; }
.mgr-matrix-fields { grid-template-columns: repeat(2, minmax(220px, 1fr)); }
.mgr-matrix-result { padding: 0 var(--space-20) var(--space-20); }
.mgr-matrix-result:empty { display: none; }
.mgr-matrix-result .mxacc-card { margin-top: 0; }
.mgr-credentials { display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.mgr-credentials .cred-row,
.mgr-matrix-result .cred-row {
  min-width: 0; justify-content: space-between; flex-wrap: wrap; padding: 10px 12px;
  border: 1px solid var(--border); border-radius: var(--radius-md); background: var(--surface-2);
}
.mgr-copy { appearance: none; max-width: 100%; border: 0; background: transparent; font: inherit; text-align: left; }
.cred-row__value.mgr-copy { color: var(--teal); border: 1px solid var(--border); background: var(--surface-code); }
.mgr-copy:focus-visible { outline: 2px solid var(--ui); outline-offset: 2px; }
.mgr-copy.is-copied { color: var(--teal) !important; border-color: var(--teal) !important; }
.mgr-copy-fallback { position: fixed; left: -10000px; top: 0; opacity: 0; }
.mgr-matrix-result .modal__warn { margin: 2px 0 0; }

@media (max-width: 880px) {
  .mgr-create-fields,
  .mgr-matrix-fields { grid-template-columns: 1fr; }
  .mgr-stats-filters { align-items: stretch; }
  .mgr-stats-filters .filters__group { flex-wrap: wrap; }
  .mgr-stats-filters > .btn { width: 100%; margin-left: 0; }
}
@media (max-width: 600px) {
  .mgr-create-card .admin-form,
  .mgr-matrix-result { padding-left: 14px; padding-right: 14px; }
  .mgr-row { align-items: flex-start; flex-wrap: wrap; }
  .mgr-row__badges { width: 100%; margin-left: 0; }
  .mgr-stats-filters .filters__group { width: 100%; align-items: flex-start; flex-direction: column; }
  .mgr-stats-filters .seg { width: 100%; }
  .mgr-stats-filters .select { width: 100%; }
  .mgr-matrix-result .cred-row { align-items: stretch; flex-direction: column; }
}


.stats-view__title { margin: 0; color: var(--text); font: inherit; font-weight: var(--fw-semibold); }
.card__title.stats-view__section-title { margin: 0; }
body.sv-modal-open > [inert]:not([data-sv-modal]) { pointer-events: none !important; }
body.sv-modal-open > .theme-toggle { z-index: 99; }
.source-stats__head { align-items: center; }
.source-stats__toolbar {
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 8px;
}
.source-stats__search { width: clamp(190px, 24vw, 320px); }
.source-stats__size {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--text-dim);
  font-size: var(--text-caption);
  font-weight: var(--fw-semibold);
  text-transform: uppercase;
  letter-spacing: .05em;
}
.source-stats__size .select { min-width: 68px; min-height: 34px; padding-right: 26px; }
.source-stats__state {
  margin: 0;
  padding: 18px var(--space-20);
  border-top: 1px solid var(--border);
  color: var(--text-dim);
  font-size: var(--text-body-sm);
  overflow-wrap: anywhere;
}
.source-stats__state[hidden] { display: none; }
.source-stats__state[data-state="error"] { color: var(--danger); }
.source-stats__state[data-state="loading"]::before {
  content: "";
  display: inline-block;
  width: 8px;
  height: 8px;
  margin-right: 8px;
  border: 2px solid var(--border-strong);
  border-top-color: var(--ui);
  border-radius: 50%;
  animation: mgr-spin .8s linear infinite;
}
.source-stats__table { min-width: 650px; }
.source-stats__sort {
  appearance: none;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  margin: -6px;
  padding: 6px;
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  letter-spacing: inherit;
  text-transform: inherit;
  cursor: pointer;
  white-space: nowrap;
}
.source-stats__sort:hover { color: var(--text); }
.source-stats__sort:focus-visible { outline: 2px solid var(--ui); outline-offset: 1px; }
.source-stats__sort.is-sorted { color: var(--ui); }
.source-stats__sort.is-sorted[data-dir="asc"]::after { content: "▲"; font-size: 9px; }
.source-stats__sort.is-sorted[data-dir="desc"]::after { content: "▼"; font-size: 9px; }
.source-stats__source { display: block; color: var(--text); }
.source-stats__source-meta {
  display: block;
  max-width: 420px;
  margin-top: 3px;
  overflow: hidden;
  color: var(--text-dim);
  font-size: 11px;
  font-weight: var(--fw-regular);
  line-height: 1.25;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.source-stats__date { color: var(--text-muted); font-variant-numeric: tabular-nums; white-space: nowrap; }
.source-stats__pager {
  min-height: 54px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-12);
  padding: 10px var(--space-20);
  border-top: 1px solid var(--border);
}
.source-stats__pager[hidden] { display: none; }
.source-stats__pager-info,
.source-stats__pager-page { color: var(--text-dim); font-size: var(--text-caption); font-variant-numeric: tabular-nums; }
.source-stats__pager-actions { display: flex; align-items: center; gap: 8px; }
.modal--wide { width: min(920px, 100%); }
.p1-export { min-width: 0; display: grid; gap: var(--space-16); }
.p1-export > .modal__sub,
.p1-export__state,
.p1-export__summary { margin: 0; }
.p1-export__state,
.p1-export__summary {
  color: var(--text-dim);
  font-size: var(--text-caption);
  font-variant-numeric: tabular-nums;
}
.p1-export__state.is-error { color: var(--danger); }
.p1-export__summary.is-error { color: var(--danger); }
.p1-export__retry { width: max-content; }
.p1-export__retry[hidden] { display: none; }
.p1-export__facets {
  min-width: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: var(--space-16);
}
.p1-export__facets[hidden] { display: none; }
.p1-export__facet {
  min-width: 0;
  display: grid;
  align-content: start;
  gap: 8px;
}
.p1-export__facet-head {
  min-height: 34px;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 10px;
}
.p1-export__facet-head h4 {
  margin: 0;
  color: var(--text);
  font-size: var(--text-body-sm);
  font-weight: var(--fw-semibold);
}
.p1-export__selected {
  display: block;
  margin-top: 2px;
  color: var(--text-dim);
  font-size: 11px;
  font-variant-numeric: tabular-nums;
}
.p1-export__facet-actions { display: flex; align-items: center; gap: 4px; }
.p1-export__choices { max-height: min(330px, 42vh); }
.p1-export-choice { grid-template-columns: 20px minmax(0, 1fr) auto; }
.p1-export-choice.is-missing .source-choice__text { color: var(--text-dim); font-style: italic; }
.p1-export-choice__count {
  min-width: 2ch;
  color: var(--text-dim);
  font-family: var(--font-mono);
  font-size: 11px;
  text-align: right;
  font-variant-numeric: tabular-nums;
}
.p1-export__foot { flex-wrap: wrap; }
.source-stats-detail { min-width: 0; display: grid; gap: var(--space-16); }
.source-stats-detail > .modal__sub { margin: 0; }
.source-stats-detail__toolbar { justify-content: flex-start; }
.source-stats-detail .table-wrap,
.source-stats-detail .source-stats__state,
.source-stats-detail .source-stats__pager { margin-right: calc(-1 * var(--space-20)); margin-left: calc(-1 * var(--space-20)); }

@media (max-width: 720px) {
  .source-stats__head { align-items: stretch; flex-direction: column; }
  .source-stats__toolbar { width: 100%; justify-content: stretch; }
  .source-stats__search { width: 100%; flex: 1 0 100%; }
  .source-stats__size { flex: 1 1 auto; }
  .source-stats__toolbar > .btn { flex: 1 1 auto; min-height: 38px; }
  .source-stats__pager { align-items: stretch; flex-direction: column; padding: 12px 14px; }
  .source-stats__pager-actions { justify-content: space-between; }
  .source-stats-detail .table-wrap,
  .source-stats-detail .source-stats__state,
  .source-stats-detail .source-stats__pager { margin-right: -14px; margin-left: -14px; }
  .modal-overlay { padding: 14px; }
  .modal--wide { width: 100%; max-height: calc(100vh - 28px); }
  .p1-export__facets { grid-template-columns: 1fr; }
  .p1-export__choices { max-height: min(210px, 28vh); }
  .p1-export__facet-head { align-items: flex-start; }
  .p1-export__foot { align-items: stretch; }
  .p1-export__foot .btn { flex: 1 1 calc(50% - 5px); min-height: 40px; }
  .p1-export__foot .btn--primary { flex-basis: 100%; }
}


.strike-count { font-weight: var(--fw-semibold); }
.strike-count--active { color: var(--danger); }
.pill--strike { color: var(--text-muted); background: var(--surface-3); border-color: var(--border); }
.pill--strike.has-strikes { color: var(--danger); background: var(--danger-soft); border-color: rgba(255, 99, 109, .28); }
.strike-modal__hint { margin-top: 6px; }
.strike-results {
  display: grid;
  gap: 10px;
  margin-top: var(--space-16);
}
.strike-results[hidden] { display: none; }
.strike-results__summary { margin: 0; }
.strike-results__list {
  display: grid;
  gap: 7px;
  max-height: 240px;
  overflow: auto;
  margin: 0;
  padding: 8px;
  list-style: none;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-md);
  background: var(--surface-2);
}
.strike-result {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr);
  gap: 12px;
  padding: 8px 9px;
  border-radius: var(--radius-sm);
  background: var(--surface);
  font-size: var(--text-body-sm);
}
.strike-result__target { min-width: 0; overflow: hidden; color: var(--text); font-weight: var(--fw-semibold); text-overflow: ellipsis; white-space: nowrap; }
.strike-result__outcome { min-width: 0; overflow-wrap: anywhere; }
.strike-result--ok .strike-result__outcome { color: var(--teal); }
.strike-result--error .strike-result__outcome { color: var(--danger); }


.strike-history__toolbar {
  min-width: 0;
  min-height: 58px;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  padding: 11px 14px;
  border-bottom: 1px solid var(--border);
}
.strike-history__filters { min-width: 0; }
.strike-history__filters .seg__btn { gap: 6px; white-space: nowrap; }
.strike-history__filters .seg__btn span {
  min-width: 20px;
  padding: 1px 5px;
  border-radius: 999px;
  background: var(--surface-3);
  font-family: var(--font-mono);
  font-size: 10px;
  font-variant-numeric: tabular-nums;
}
.strike-history__search {
  width: clamp(230px, 28vw, 390px);
  margin-left: auto;
}
.strike-history__live {
  min-height: 38px;
  margin: 0;
  display: flex;
  align-items: center;
  padding: 8px 14px;
  border-bottom: 1px solid var(--border);
  color: var(--text-dim);
  font-size: var(--text-caption);
  overflow-wrap: anywhere;
}
.strike-history__live[data-state="error"] { color: var(--danger); }
.strike-history__live[data-state="success"] { color: var(--teal); }
.strike-history__table-wrap[hidden],
.strike-history__cards[hidden],
.strike-history__empty[hidden] { display: none; }
.strike-history__table {
  min-width: 1640px;
  table-layout: fixed;
}
.strike-history__table th:nth-child(1) { width: 170px; }
.strike-history__table th:nth-child(2) { width: 90px; }
.strike-history__table th:nth-child(3) { width: 95px; }
.strike-history__table th:nth-child(4) { width: 250px; }
.strike-history__table th:nth-child(5) { width: 190px; }
.strike-history__table th:nth-child(6) { width: 155px; }
.strike-history__table th:nth-child(7) { width: 250px; }
.strike-history__table th:nth-child(8) { width: 190px; }
.strike-history__table th:nth-child(9) { width: 155px; }
.strike-history__table th:nth-child(10) { width: 135px; }
.strike-history__table td { vertical-align: top; }
.strike-history__user {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.strike-history__user strong {
  overflow: hidden;
  color: var(--text);
  text-overflow: ellipsis;
  white-space: nowrap;
}
.strike-history__user span,
.strike-history__actor,
.strike-history__date {
  color: var(--text-dim);
  font-size: var(--text-caption);
}
.strike-history__mono,
.strike-history__date {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
}
.strike-history__description {
  color: var(--text);
  line-height: var(--leading-base);
  overflow-wrap: anywhere;
  white-space: pre-wrap;
}
.strike-history__status.is-active {
  color: var(--danger);
  border-color: rgba(255, 99, 109, .3);
  background: var(--danger-soft);
}
.strike-history__status.is-removed {
  color: var(--text-muted);
  border-color: var(--border);
  background: var(--surface-3);
}
.strike-history__empty {
  margin: 0;
  padding: var(--space-32) var(--space-16);
  color: var(--text-dim);
  text-align: center;
}
.strike-history__pager {
  display: flex;
  justify-content: center;
  min-height: 1px;
  padding: 12px 14px;
  border-top: 1px solid var(--border);
}
.strike-history__pager:has([hidden]) { display: none; }
.strike-history__pager [hidden] { display: none; }
.strike-history__cards { display: none; }
.strike-history-card {
  min-width: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  padding: 14px;
  border: 1px solid var(--border);
  border-left: 2px solid var(--text-dim);
  border-radius: var(--radius-md);
  background: var(--surface-2);
}
.strike-history-card.is-active { border-left-color: var(--danger); }
.strike-history-card__head,
.strike-history-card__foot,
.strike-history-card__field--wide {
  grid-column: 1 / -1;
}
.strike-history-card__head {
  min-width: 0;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}
.strike-history-card__head > div {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.strike-history-card__head strong {
  overflow: hidden;
  color: var(--text);
  text-overflow: ellipsis;
  white-space: nowrap;
}
.strike-history-card__head div > span {
  color: var(--text-dim);
  font-family: var(--font-mono);
  font-size: var(--text-caption);
}
.strike-history-card__field { min-width: 0; }
.strike-history-card__label {
  color: var(--text-dim);
  font-size: 10px;
  font-weight: var(--fw-bold);
  letter-spacing: .06em;
  text-transform: uppercase;
}
.strike-history-card__field p {
  margin: 5px 0 0;
  color: var(--text);
  line-height: var(--leading-base);
  overflow-wrap: anywhere;
  white-space: pre-wrap;
}
.strike-history-card__foot {
  display: flex;
  justify-content: flex-end;
  padding-top: 2px;
}
.strike-history-remove__issued {
  display: grid;
  gap: 5px;
  margin-bottom: var(--space-16);
  padding: 11px 12px;
  border: 1px solid var(--border);
  border-left: 2px solid var(--danger);
  border-radius: var(--radius-md);
  background: var(--surface-2);
}
.strike-history-remove__issued span {
  color: var(--text-dim);
  font-size: 10px;
  font-weight: var(--fw-bold);
  letter-spacing: .06em;
  text-transform: uppercase;
}
.strike-history-remove__issued p {
  margin: 0;
  overflow-wrap: anywhere;
  white-space: pre-wrap;
}
.strike-history-remove__issued small { color: var(--text-dim); }

@media (max-width: 960px) {
  .strike-history__table-wrap { display: none; }
  .strike-history__cards {
    display: grid;
    gap: 10px;
    padding: 12px;
  }
  .strike-history__cards[hidden] { display: none; }
}

@media (max-width: 720px) {
  .strike-history__toolbar { align-items: stretch; flex-direction: column; }
  .strike-history__filters {
    width: 100%;
    overflow-x: auto;
    scrollbar-width: none;
  }
  .strike-history__filters::-webkit-scrollbar { display: none; }
  .strike-history__search { width: 100%; margin-left: 0; }
  .strike-history__toolbar > .btn { width: 100%; }
}

@media (max-width: 520px) {
  .strike-history-card { grid-template-columns: 1fr; }
  .strike-history-card__head,
  .strike-history-card__foot,
  .strike-history-card__field--wide { grid-column: 1; }
  .strike-history-card__foot .btn { width: 100%; }
}


.rail .nav__btn[data-tab="requests"] {
  position: relative;
  color: #c4b5fd;
  background: rgba(109, 80, 214, .13);
  border-color: rgba(139, 92, 246, .34);
}
.rail .nav__btn[data-tab="requests"]:hover:not(:disabled) {
  color: #ede9fe;
  background: rgba(109, 80, 214, .25);
  border-color: rgba(167, 139, 250, .72);
}
.rail .nav__btn[data-tab="requests"].is-active {
  color: #f5f3ff;
  background: linear-gradient(135deg, rgba(99, 102, 241, .38), rgba(139, 92, 246, .3));
  border-color: rgba(196, 181, 253, .78);
  box-shadow: 0 0 0 1px rgba(167, 139, 250, .16), 0 8px 20px rgba(76, 29, 149, .2);
}

.more-actions__open,
.more-actions__btns .more-action:not(.is-sent),
.action-requests__toolbar > .btn,
.action-requests__pager > .btn {
  color: #e9e4ff;
  background: linear-gradient(135deg, rgba(79, 70, 229, .7), rgba(124, 58, 237, .72));
  border-color: rgba(196, 181, 253, .64);
  box-shadow: 0 5px 16px rgba(76, 29, 149, .2);
}
.more-actions__open:hover:not(:disabled),
.more-actions__btns .more-action:not(.is-sent):hover:not(:disabled),
.action-requests__toolbar > .btn:hover:not(:disabled),
.action-requests__pager > .btn:hover:not(:disabled) {
  color: #fff;
  background: linear-gradient(135deg, rgba(99, 102, 241, .9), rgba(139, 92, 246, .9));
  border-color: #ddd6fe;
  filter: brightness(1.06);
}
.rail .nav__btn[data-tab="requests"]:focus-visible,
.more-actions__open:focus-visible,
.more-actions__btns .more-action:focus-visible,
.action-requests__toolbar > .btn:focus-visible,
.action-requests__pager > .btn:focus-visible {
  outline: 2px solid #c4b5fd;
  outline-offset: 2px;
}
.rail .nav__request-badge {
  position: absolute;
  top: -3px;
  right: -4px;
  min-width: 17px;
  height: 17px;
  display: inline-grid;
  place-items: center;
  padding: 0 4px;
  border: 2px solid var(--bg);
  border-radius: 999px;
  background: var(--danger);
  color: #fff;
  font-family: var(--font-mono);
  font-size: 9px;
  font-weight: var(--fw-bold);
  line-height: 1;
  font-variant-numeric: tabular-nums;
}
.rail .nav__request-badge[hidden] { display: none; }

.action-requests {
  width: min(100%, 1560px);
  min-width: 0;
  margin: 0 auto;
  padding: var(--space-24) var(--space-24) var(--space-50);
  letter-spacing: 0;
}
.action-requests__head { margin-bottom: var(--space-16); }
.action-requests__titleline {
  min-width: 0;
  align-items: center;
  padding-right: 52px;
  letter-spacing: 0;
}
.support-page .action-requests { padding-top: 0; }
.support-page .action-requests__titleline { padding-right: 220px; }
.action-requests__connection {
  flex: none;
  min-width: 12ch;
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 7px;
  color: var(--text-muted);
  font-size: var(--text-caption);
  font-weight: var(--fw-medium);
  line-height: 1;
  text-transform: lowercase;
}
.action-requests__connection-dot {
  width: 7px;
  height: 7px;
  flex: none;
  border-radius: 50%;
  background: var(--amber);
}
.action-requests__connection[data-state="live"] { color: var(--teal); }
.action-requests__connection[data-state="live"] .action-requests__connection-dot { background: var(--teal); }
.action-requests__connection[data-state="error"] { color: var(--danger); }
.action-requests__connection[data-state="error"] .action-requests__connection-dot { background: var(--danger); }

.action-requests__card { min-width: 0; }
.action-requests__toolbar {
  min-width: 0;
  min-height: 58px;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  padding: 11px 14px;
  border-bottom: 1px solid var(--border);
}
.action-requests__filters { min-width: 0; }
.action-requests__filters .seg__btn {
  gap: 6px;
  white-space: nowrap;
}
.action-requests__filters .seg__btn span {
  min-width: 20px;
  padding: 1px 5px;
  border-radius: 999px;
  background: var(--surface-3);
  font-family: var(--font-mono);
  font-size: 10px;
  font-variant-numeric: tabular-nums;
}
.action-requests__search { width: clamp(230px, 28vw, 390px); margin-left: auto; }
.action-requests__live {
  min-height: 38px;
  margin: 0;
  display: flex;
  align-items: center;
  padding: 8px 14px;
  border-bottom: 1px solid var(--border);
  color: var(--text-dim);
  font-size: var(--text-caption);
  overflow-wrap: anywhere;
}
.action-requests__live[data-state="error"] { color: var(--danger); }
.action-requests__live[data-state="success"] { color: var(--teal); }
.action-requests__live[data-state="warning"] { color: var(--amber); }

.action-requests__table-wrap { overflow-x: auto; }
.action-requests__table-wrap[hidden],
.action-request-cards[hidden],
.action-requests__empty[hidden] { display: none; }
.action-requests__table { min-width: 1280px; table-layout: fixed; }
.action-requests__table th:nth-child(1) { width: 150px; }
.action-requests__table th:nth-child(2) { width: 150px; }
.action-requests__table th:nth-child(3) { width: 360px; }
.action-requests__table th:nth-child(4) { width: 145px; }
.action-requests__table th:nth-child(5) { width: 95px; }
.action-requests__table th:nth-child(6) { width: 230px; }
.action-requests__table th:nth-child(7) { width: 150px; }
.action-requests__table td { vertical-align: top; }
.action-request__operator,
.action-request__action,
.action-request__task,
.action-request__audit {
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
}
.action-request__operator strong,
.action-request__action strong,
.action-request__task strong {
  max-width: 100%;
  color: var(--text);
  overflow-wrap: anywhere;
}
.action-request__role {
  padding: 2px 7px;
  color: var(--text-muted);
  background: var(--surface-3);
  border-color: var(--border);
  font-size: 10px;
  text-transform: uppercase;
}
.action-request__role[data-role="worker"] { color: var(--accent); }
.action-request__role[data-role="caller"] { color: var(--accent-2); }
.action-request__action code,
.action-request__task code {
  max-width: 100%;
  color: var(--text-muted);
  font-family: var(--font-mono);
  font-size: var(--text-mono-sm);
  overflow-wrap: anywhere;
}
.action-request__reference {
  max-width: 100%;
  color: var(--text-dim);
  font-family: var(--font-mono);
  font-size: 10px;
  line-height: 1.4;
  overflow-wrap: anywhere;
}
.action-request__full { min-width: 0; }
.action-request__full-info {
  width: 100%;
  max-height: 190px;
  overflow: auto;
  margin: 0 0 8px;
  padding: 9px 10px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface-code);
  color: var(--text);
  font-family: var(--font-mono);
  font-size: 11px;
  line-height: 1.5;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  word-break: break-word;
  tab-size: 2;
}
.action-request__copy { min-height: 26px; }
.action-request__copy-fallback {
  position: fixed;
  left: -10000px;
  top: 0;
  opacity: 0;
}
.action-request__time {
  color: var(--text-dim);
  font-family: var(--font-mono);
  font-size: 11px;
  line-height: 1.45;
  font-variant-numeric: tabular-nums;
}
.action-request__status {
  display: inline-flex;
  align-items: center;
  min-height: 25px;
  padding: 2px 9px;
  border: 1px solid var(--border);
  border-radius: 999px;
  color: var(--text-muted);
  background: var(--surface-2);
  font-size: 11px;
  font-weight: var(--fw-semibold);
}
.action-request__status[data-status="pending"] {
  color: var(--amber);
  border-color: rgba(255, 200, 67, .32);
  background: rgba(255, 200, 67, .10);
}
.action-request__status[data-status="claimed"] {
  color: var(--accent-2);
  border-color: rgba(125, 140, 255, .32);
  background: var(--accent-soft);
}
.action-request__status[data-status="done"] {
  color: var(--teal);
  border-color: rgba(66, 217, 129, .32);
  background: var(--teal-soft);
}
.action-request__case-state {
  min-width: 0;
  display: flex;
  align-items: flex-end;
  flex-direction: column;
  gap: 7px;
}
.action-request__claim-badge {
  max-width: 100%;
  display: inline-flex;
  align-items: center;
  min-height: 25px;
  padding: 2px 9px;
  border: 1px solid rgba(125, 140, 255, .32);
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent-2);
  font-size: 11px;
  font-weight: var(--fw-semibold);
  line-height: 1.35;
  overflow-wrap: anywhere;
  text-align: left;
}
.action-request__audit-line {
  min-width: 0;
  color: var(--text-muted);
  font-size: 11px;
  line-height: 1.45;
  overflow-wrap: anywhere;
}
.action-request__audit-line b { color: var(--text); }
.action-request__audit-line .action-request__time { display: inline; }
.action-request__claim-detail {
  min-width: 0;
  display: flex;
  align-items: flex-start;
  flex-direction: column;
  gap: 8px;
}
.action-request__lead-details {
  width: 100%;
  min-width: 0;
  margin: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 9px 16px;
}
.action-request__lead-details > div { min-width: 0; }
.action-request__lead-details dt {
  margin: 0 0 3px;
  color: var(--text-dim);
  font-size: 10px;
  font-weight: var(--fw-bold);
  letter-spacing: .04em;
  text-transform: uppercase;
}
.action-request__lead-details dd {
  min-width: 0;
  margin: 0;
  color: var(--text);
  font-family: var(--font-mono);
  font-size: 11px;
  line-height: 1.45;
  overflow-wrap: anywhere;
}
.action-request__buttons {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 7px;
}

.action-request-cards { display: none; }
.action-request-card {
  min-width: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0;
  border-bottom: 1px solid var(--border);
}
.action-request-card:last-child { border-bottom: 0; }
.action-request-card__head {
  grid-column: 1 / -1;
  min-width: 0;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 14px;
  border-bottom: 1px solid var(--border);
  background: var(--surface-2);
}
.action-request-card__title {
  min-width: 0;
  display: flex;
  align-items: flex-start;
  flex-direction: column;
  gap: 5px;
}
.action-request-card__title h2 {
  margin: 0;
  color: var(--text);
  font-size: var(--text-body);
  line-height: 1.35;
  overflow-wrap: anywhere;
}
.action-request-card__field {
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 7px;
  padding: 13px 14px;
  border-bottom: 1px solid var(--border);
}
.action-request-card__field:nth-child(even) { border-right: 1px solid var(--border); }
.action-request-card__field--wide { grid-column: 1 / -1; border-right: 0 !important; }
.action-request-card__label {
  color: var(--text-dim);
  font-size: 10px;
  font-weight: var(--fw-bold);
  letter-spacing: .06em;
  text-transform: uppercase;
}
.action-request-card > .action-request__buttons {
  grid-column: 1 / -1;
  padding: 13px 14px;
}
.support-page .action-requests--cases .action-requests__table-wrap { display: none; }
.support-page .action-requests--cases .action-request-cards {
  display: grid;
  gap: 12px;
  padding: 14px;
  background: var(--surface-2);
}
.support-page .action-requests--cases .action-request-cards[hidden] { display: none; }
.support-page .action-requests--cases .action-request-card {
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  overflow: hidden;
  background: var(--surface);
}
.action-requests__empty {
  margin: 0;
  padding: var(--space-40) 14px;
  color: var(--text-dim);
  text-align: center;
}
.action-requests__pager {
  display: flex;
  justify-content: center;
  min-height: 1px;
  padding: 12px 14px;
  border-top: 1px solid var(--border);
}
.action-requests__pager:has([hidden]) { display: none; }
.action-requests__pager [hidden] { display: none; }

@media (max-width: 960px) {
  .action-requests__table-wrap { display: none; }
  .action-request-cards { display: grid; }
  .action-request-cards[hidden] { display: none; }
}

@media (max-width: 720px) {
  .action-requests,
  .support-page .action-requests {
    padding: var(--space-20) var(--space-13) var(--space-40);
  }
  .action-requests__titleline,
  .support-page .action-requests__titleline { padding-right: 52px; }
  .action-requests__toolbar { align-items: stretch; flex-direction: column; }
  .action-requests__filters {
    width: 100%;
    overflow-x: auto;
    scrollbar-width: none;
  }
  .action-requests__filters::-webkit-scrollbar { display: none; }
  .action-requests__search { width: 100%; margin-left: 0; }
  .action-requests__toolbar > .btn { width: 100%; }
}

@media (max-width: 520px) {
  .action-request-card { grid-template-columns: 1fr; }
  .action-request__lead-details { grid-template-columns: 1fr; }
  .action-request-card__field,
  .action-request-card__field:nth-child(even),
  .action-request-card__field--wide {
    grid-column: auto;
    border-right: 0;
  }
  .action-request-card > .action-request__buttons {
    grid-column: auto;
    flex-direction: column;
  }
  .action-request-card > .action-request__buttons .btn { width: 100%; }
}


.callback-launch {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 12px;
  padding: 12px;
  border: 1px solid rgba(227, 179, 65, .4);
  border-radius: var(--radius-md);
  background: linear-gradient(135deg, rgba(227, 179, 65, .13), rgba(125, 140, 255, .07));
}
.callback-launch__button {
  min-width: 154px;
  border-color: var(--accent);
  background: var(--accent);
  color: #090a0c;
  font-weight: var(--fw-bold);
  box-shadow: 0 0 22px rgba(227, 179, 65, .14);
}
.callback-launch__button:hover:not(:disabled) {
  border-color: var(--accent-hover);
  background: var(--accent-hover);
  color: #090a0c;
}
.callback-launch__hint {
  color: var(--text-muted);
  font-size: var(--text-caption);
  line-height: var(--leading-snug);
}

body.callback-modal-open { overflow: hidden; }
.callback-modal { width: min(680px, 100%); }
.callback-modal__description {
  margin: 4px 0 0;
  color: var(--text-dim);
  font-size: var(--text-caption);
  line-height: var(--leading-snug);
}
.callback-modal > form {
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.callback-form__body { gap: 14px; }
.callback-form__grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 13px 16px;
}
.callback-form__field {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
  color: var(--text-muted);
  font-size: var(--text-caption);
  font-weight: var(--fw-semibold);
  letter-spacing: .04em;
  text-transform: uppercase;
}
.callback-form__field > span { color: var(--danger); }
.callback-form__field--wide { grid-column: 1 / -1; }
.callback-form__field .select {
  width: 100%;
  min-height: 40px;
  padding: 0 34px 0 var(--space-13);
  border: 1px solid var(--border);
  outline: none;
}
.callback-form__field .select:focus {
  border-color: var(--ui-line);
  background-color: var(--surface-3);
  box-shadow: 0 0 0 3px rgba(255, 255, 255, .07);
}
.callback-modal textarea.input {
  min-height: 78px;
  max-height: 180px;
  font-family: var(--font-sen);
  resize: vertical;
}
.callback-form__status {
  margin: 0;
  padding: 9px 11px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  color: var(--text-muted);
  background: var(--surface-2);
  font-size: var(--text-body-sm);
}
.callback-form__status[hidden] { display: none; }
.callback-form__status[data-state="error"] {
  border-color: rgba(240, 84, 92, .4);
  color: var(--danger);
  background: var(--danger-soft);
}
.callback-form__status[data-state="success"] {
  border-color: rgba(63, 185, 80, .4);
  color: var(--teal);
  background: var(--teal-soft);
}
.callback-form__foot { margin-top: 0; }


.external-launch {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 12px;
  padding: 12px;
  border: 1px solid rgba(125, 140, 255, .38);
  border-radius: var(--radius-md);
  background: linear-gradient(135deg, rgba(125, 140, 255, .12), rgba(63, 185, 80, .06));
}
.external-launch__button {
  min-width: 154px;
  border-color: var(--teal);
  background: var(--teal);
  color: #090a0c;
  font-weight: var(--fw-bold);
  box-shadow: 0 0 22px rgba(63, 185, 80, .16);
}
.external-launch__button:hover:not(:disabled) {
  border-color: #4fd165;
  background: #4fd165;
  color: #090a0c;
}
.external-launch__hint {
  color: var(--text-muted);
  font-size: var(--text-caption);
  line-height: var(--leading-snug);
}

body.external-info-modal-open { overflow: hidden; }
.external-info-modal { width: min(680px, 100%); }
.external-info-modal > form {
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.external-info-form__body { gap: 14px; }
.external-info-form__hint {
  margin: 0;
  color: var(--text-muted);
  font-size: var(--text-body-sm);
  line-height: var(--leading-snug);
}
.external-info-form__hint[hidden] { display: none; }
.external-info-result {
  margin: 0;
  padding: 10px 12px;
}
.external-info-result[hidden] { display: none; }
.external-info-result .full-info {
  max-height: 320px;
  margin: 0;
  overflow: auto;
}
.external-info-result[data-state="error"] .full-info { color: var(--danger); }
.external-info-result[data-state="timeout"] .full-info { color: var(--amber); }

.callback-log-card { overflow: hidden; }
.callback-log__state {
  margin: 0;
  padding: 36px 20px;
  color: var(--text-dim);
  text-align: center;
  font-size: var(--text-body-sm);
}
.callback-log__state[hidden] { display: none; }
.callback-log__state[data-state="loading"]::before {
  content: "";
  display: inline-block;
  width: 9px;
  height: 9px;
  margin-right: 9px;
  border: 2px solid var(--border-strong);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: mgr-spin .8s linear infinite;
}
.callback-log__state[data-state="error"] { color: var(--danger); }
.callback-log__pager {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 12px 14px;
  border-top: 1px solid var(--border);
  color: var(--text-muted);
  font-size: var(--text-caption);
  font-variant-numeric: tabular-nums;
}
.callback-log__pager[hidden] { display: none; }
.callback-log {
  display: grid;
  gap: 12px;
  margin: 0;
  padding: 14px;
  list-style: none;
  background: var(--surface-2);
}
.callback-log[hidden] { display: none; }
.callback-log__item {
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--surface);
}
.callback-log__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  border-bottom: 1px solid var(--border);
  background: var(--surface-code);
}
.callback-log__caller {
  min-width: 0;
  color: var(--text);
  font-weight: var(--fw-bold);
  overflow-wrap: anywhere;
}
.callback-log__caller::before {
  content: "Caller";
  margin-right: 8px;
  color: var(--text-dim);
  font-size: 10px;
  letter-spacing: .06em;
  text-transform: uppercase;
}
.callback-log__time {
  flex: none;
  color: var(--text-muted);
  font-size: 12px;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.callback-log__fields {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
}
.callback-log__field {
  min-width: 0;
  padding: 11px 14px;
  border-right: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}
.callback-log__field:nth-child(4n) { border-right: 0; }
.callback-log__field--wide {
  grid-column: span 2;
  border-bottom: 0;
}
.callback-log__field--full {
  grid-column: 1 / -1;
  border-right: 0;
}
.callback-log__field--wide:last-child { border-right: 0; }
.callback-log__label {
  display: block;
  margin-bottom: 5px;
  color: var(--text-dim);
  font-size: 10px;
  font-weight: var(--fw-bold);
  letter-spacing: .06em;
  text-transform: uppercase;
}
.callback-log__value {
  display: block;
  color: var(--text);
  font-size: var(--text-body-sm);
  line-height: var(--leading-snug);
  overflow-wrap: anywhere;
  white-space: pre-wrap;
}
.callback-log__value--number {
  color: var(--accent);
  font-family: var(--font-mono);
  font-weight: var(--fw-bold);
}
.callback-log__value.is-empty { color: var(--text-dim); }


.external-log__usage {
  margin: 0;
  color: var(--text-muted);
  font-size: var(--text-caption);
  line-height: var(--leading-snug);
}
.external-log__response .callback-log__value {
  max-height: 120px;
  overflow: hidden;
}
.external-log__view {
  margin-top: 6px;
  align-self: flex-start;
  box-shadow: none;
}
.external-log__pre {
  max-height: 420px;
  margin: 12px 0 0;
  padding: 12px;
  overflow: auto;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--surface-code);
  color: var(--text-muted);
  font: 12px/1.55 var(--font-mono);
  white-space: pre-wrap;
  word-break: break-word;
}

html[data-theme="light"] .callback-launch {
  border-color: rgba(169, 118, 15, .34);
  background: linear-gradient(135deg, rgba(169, 118, 15, .11), rgba(74, 89, 208, .05));
}
html[data-theme="light"] .callback-launch__button { color: #fff; }

@media (max-width: 900px) {
  .callback-log__fields { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .callback-log__field:nth-child(4n) { border-right: 1px solid var(--border); }
  .callback-log__field:nth-child(2n) { border-right: 0; }
}

@media (max-width: 620px) {
  .callback-launch { align-items: stretch; flex-direction: column; }
  .callback-launch__button { width: 100%; }
  .callback-form__grid { grid-template-columns: 1fr; }
  .callback-form__field--wide { grid-column: auto; }
  .callback-form__foot { align-items: stretch; flex-direction: column-reverse; }
  .callback-form__foot .btn { width: 100%; }
  .callback-log-page { padding: var(--space-20) var(--space-13) var(--space-40); }
  .callback-log__head { align-items: flex-start; flex-direction: column; }
  .callback-log__time { white-space: normal; }
  .callback-log__fields { grid-template-columns: 1fr; }
  .callback-log__field,
  .callback-log__field:nth-child(2n),
  .callback-log__field:nth-child(4n),
  .callback-log__field--full,
  .callback-log__field--wide {
    grid-column: auto;
    border-right: 0;
    border-bottom: 1px solid var(--border);
  }
  .callback-log__field:last-child { border-bottom: 0; }
}
