:root {
  color-scheme: light;
  --ink: #15202b;
  --muted: #64748b;
  --line: #d8e0ea;
  --panel: #ffffff;
  --panel-soft: #f6f8fb;
  --nav: #6b7280;
  --accent: #ed1c24;
  --accent-2: #0b72e7;
  --accent-soft: #fff1f2;
  --blue-soft: #eff6ff;
  --success: #15803d;
  --warn: #b45309;
  --danger: #b91c1c;
  --shadow: 0 18px 55px rgba(15, 23, 42, 0.11);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-width: 320px;
  color: var(--ink);
  background: #edf2f7;
}

[hidden] {
  display: none !important;
}

button,
input,
select {
  font: inherit;
}

button {
  border: 0;
  cursor: pointer;
}

.app-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 248px minmax(0, 1fr);
}

.auth-screen {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.82), rgba(237, 242, 247, 0.94)),
    #edf2f7;
}

.auth-panel {
  width: min(460px, 100%);
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  box-shadow: var(--shadow);
}

.auth-brand {
  justify-content: space-between;
  margin-bottom: 18px;
  color: var(--ink);
}

.auth-brand span {
  color: var(--accent-2);
  font-weight: 800;
}

.auth-panel h2 {
  margin: 0 0 8px;
  font-size: 24px;
}

.auth-panel p {
  margin: 0 0 18px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}

.auth-fields {
  grid-template-columns: 1fr;
}

.auth-submit {
  width: 100%;
  margin-top: 14px;
}

.auth-error {
  min-height: 20px;
  margin-top: 12px;
  color: var(--danger);
  font-size: 13px;
  font-weight: 700;
}

.sidebar {
  color: #111827;
  background: #d1d5db;
  padding: 8px 16px 18px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand-logo {
  display: block;
  object-fit: contain;
}

.auth-logo {
  width: 420px;
  max-width: 100%;
  height: 116px;
}

.nav-logo {
  width: 380px;
  max-width: 100%;
  height: 104px;
  padding: 0;
  border-radius: 8px;
  background: transparent;
  object-position: left center;
}

.brand-mark {
  width: 38px;
  height: 38px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  background: var(--accent-2);
  box-shadow: inset 0 -8px 20px rgba(0, 0, 0, 0.18);
}

.brand h1 {
  margin: 0;
  font-size: 18px;
  line-height: 1.15;
}

.brand span,
.sidebar-label {
  color: #4b5563;
  font-size: 12px;
}

.nav-group {
  display: grid;
  gap: 4px;
}

.nav-button {
  min-height: 38px;
  width: 100%;
  display: flex;
  align-items: center;
  gap: 10px;
  color: #111827;
  background: transparent;
  border-radius: 8px;
  padding: 0 10px;
  text-align: left;
}

.nav-button.active,
.nav-button:hover {
  color: #ffffff;
  background: #6b7280;
}

.account-card {
  margin-top: auto;
  padding: 14px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.55);
}

.account-card strong {
  display: block;
  margin-bottom: 6px;
}

.main {
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.topbar {
  min-height: 72px;
  background: #ffffff;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 12px 26px;
}

.topbar h2 {
  margin: 0;
  font-size: 22px;
}

.topbar p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.top-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.segmented {
  display: inline-grid;
  grid-template-columns: repeat(2, 1fr);
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  background: #ffffff;
}

.segmented button {
  min-width: 86px;
  height: 38px;
  color: var(--muted);
  background: transparent;
}

.segmented button.active {
  color: #ffffff;
  background: var(--accent-2);
}

.content {
  width: min(1440px, 100%);
  padding: 24px 26px 36px;
}

.view {
  display: none;
}

.view.active {
  display: block;
}

.grid {
  display: grid;
  gap: 16px;
}

.dashboard-grid {
  grid-template-columns: 1.12fr 0.88fr;
  align-items: start;
}

.kpis {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.panel,
.card,
.modal {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.panel {
  padding: 18px;
}

.sync-strip {
  min-height: 48px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 11px 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--muted);
  background: #ffffff;
  box-shadow: var(--shadow);
  font-size: 13px;
}

.sync-strip span {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.sync-strip strong {
  flex: 0 0 auto;
  color: var(--ink);
}

.section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 14px;
}

.section-head h3,
.section-head h4 {
  margin: 0;
}

.section-head p {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.card {
  min-height: 128px;
  padding: 16px;
}

.metric {
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

.metric > div:first-child {
  min-width: 0;
}

.metric strong {
  display: block;
  font-size: 30px;
  margin-top: 12px;
}

.metric span {
  color: var(--muted);
  font-size: 13px;
}

.delta {
  align-self: start;
  max-width: 112px;
  color: var(--success);
  background: #dcfce7;
  border-radius: 999px;
  padding: 4px 8px;
  font-size: 12px;
  text-align: center;
  white-space: normal;
}

.dialer-layout {
  grid-template-columns: minmax(310px, 430px) minmax(0, 1fr);
  align-items: stretch;
}

.dial-card {
  padding: 18px;
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.field-grid {
  display: grid;
  gap: 12px;
}

label {
  display: grid;
  gap: 7px;
  color: #334155;
  font-size: 13px;
  font-weight: 700;
}

input,
select {
  width: 100%;
  height: 42px;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  padding: 0 11px;
  color: var(--ink);
  background: #ffffff;
  outline: none;
}

input:focus,
select:focus {
  border-color: var(--accent-2);
  box-shadow: 0 0 0 3px rgba(11, 114, 231, 0.14);
}

.button-row {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 14px;
}

.button-row.compact {
  margin-top: 2px;
}

.btn {
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  border-radius: 8px;
  padding: 0 13px;
  color: var(--ink);
  background: #e2e8f0;
}

.btn.primary {
  color: #ffffff;
  background: var(--accent);
}

.btn.blue {
  color: #ffffff;
  background: var(--accent-2);
}

.btn.ghost {
  background: #ffffff;
  border: 1px solid var(--line);
}

.btn.danger {
  color: #ffffff;
  background: var(--danger);
}

.btn:disabled {
  cursor: not-allowed;
  opacity: 0.54;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  border-radius: 999px;
  padding: 6px 10px;
  font-size: 12px;
  font-weight: 700;
  color: #065f46;
  background: #d1fae5;
}

.status-pill.warn {
  color: #92400e;
  background: #fef3c7;
}

.status-pill.bad {
  color: #991b1b;
  background: #fee2e2;
}

.route-visual {
  min-height: 336px;
  padding: 22px;
  display: grid;
  align-content: center;
  gap: 18px;
  background:
    linear-gradient(90deg, rgba(11, 114, 231, 0.1), transparent 38%),
    #ffffff;
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.call-lane {
  display: grid;
  grid-template-columns: 128px minmax(95px, 1fr) 128px;
  align-items: center;
  gap: 12px;
}

.node {
  min-height: 86px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-soft);
  display: grid;
  place-items: center;
  text-align: center;
  padding: 10px;
}

.node strong {
  display: block;
  margin-top: 6px;
}

.line {
  height: 8px;
  border-radius: 999px;
  background: #cbd5e1;
  position: relative;
  overflow: hidden;
}

.line.active::after {
  content: "";
  position: absolute;
  inset: 0;
  width: 45%;
  border-radius: inherit;
  background: var(--accent-2);
  animation: pulseRoute 1.2s linear infinite;
}

@keyframes pulseRoute {
  from { transform: translateX(-110%); }
  to { transform: translateX(240%); }
}

.timeline {
  display: grid;
  gap: 10px;
  margin: 16px 0 0;
  padding: 0;
  list-style: none;
}

.timeline li {
  display: grid;
  grid-template-columns: 26px 1fr;
  gap: 10px;
  align-items: start;
  color: var(--muted);
  font-size: 13px;
}

.timeline .dot {
  width: 26px;
  height: 26px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  color: #ffffff;
  background: #94a3b8;
  font-size: 12px;
}

.timeline li.done {
  color: var(--ink);
}

.timeline li.done .dot {
  background: var(--accent);
}

.table-tools {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
}

.table-wrap {
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
}

table {
  width: 100%;
  border-collapse: collapse;
  min-width: 900px;
}

th,
td {
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  font-size: 13px;
  vertical-align: middle;
}

th {
  color: #334155;
  background: #f8fafc;
  font-size: 12px;
  text-transform: uppercase;
}

tr:last-child td {
  border-bottom: 0;
}

.team-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.agent-card {
  min-height: 176px;
}

.agent-card .avatar {
  width: 42px;
  height: 42px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  color: #ffffff;
  background: var(--accent-2);
  font-weight: 800;
}

.agent-card header {
  display: flex;
  align-items: center;
  gap: 12px;
}

.agent-card h4 {
  margin: 0;
}

.agent-card p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.agent-card .invite-code-line {
  color: var(--ink);
}

.agent-card .invite-code-line strong {
  letter-spacing: 0;
}

.agent-controls {
  display: grid;
  gap: 8px;
  margin: 12px 0;
}

.agent-controls label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 12px;
}

.agent-controls select {
  height: 38px;
  font-size: 13px;
}

.stats-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-top: 16px;
}

.mini-stat {
  padding: 10px;
  border-radius: 8px;
  background: var(--panel-soft);
  text-align: center;
}

.mini-stat strong {
  display: block;
}

.mini-stat span {
  color: var(--muted);
  font-size: 12px;
}

.billing-band {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 16px;
  align-items: center;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
}

.billing-panel {
  margin-top: 16px;
}

.billing-alerts {
  display: grid;
  gap: 8px;
  margin-top: 16px;
}

.billing-alert {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  border: 1px solid #fde68a;
  border-radius: 8px;
  color: #92400e;
  background: #fffbeb;
  font-size: 13px;
  font-weight: 700;
}

.billing-alert.good {
  border-color: #bbf7d0;
  color: #15803d;
  background: #f0fdf4;
}

.billing-progress {
  height: 10px;
  border-radius: 999px;
  background: #dbe3ed;
  overflow: hidden;
}

.billing-progress span {
  display: block;
  min-width: 4px;
  max-width: 100%;
  height: 100%;
  border-radius: inherit;
  background: var(--accent);
}

.billing-breakdown {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-top: 14px;
}

.billing-breakdown div {
  padding: 12px;
  border-radius: 8px;
  background: var(--panel-soft);
}

.billing-breakdown span {
  display: block;
  color: var(--muted);
  font-size: 12px;
}

.billing-breakdown strong {
  display: block;
  margin-top: 5px;
}

.billing-note {
  margin: 12px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.good-text {
  color: #15803d;
}

.warn-text {
  color: #92400e;
}

.setup-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  align-items: start;
  margin-bottom: 16px;
}

.setup-status-grid,
.readiness-grid {
  display: grid;
  gap: 10px;
}

.setup-status-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.setup-status-card,
.readiness-item,
.check-item,
.setup-paths div {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-soft);
}

.setup-status-card {
  min-height: 108px;
  padding: 13px;
}

.setup-status-card span,
.setup-paths span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.setup-status-card strong {
  display: block;
  margin: 10px 0 6px;
  font-size: 20px;
}

.setup-status-card small,
.readiness-item small {
  display: block;
  color: var(--muted);
  font-size: 12px;
  overflow-wrap: anywhere;
}

.setup-status-card.good {
  border-color: #bbf7d0;
  background: #f0fdf4;
}

.setup-status-card.warn {
  border-color: #fde68a;
  background: #fffbeb;
}

.setup-status-card.bad {
  border-color: #fecaca;
  background: #fef2f2;
}

.checklist,
.setup-paths {
  display: grid;
  gap: 9px;
}

.setup-paths {
  margin-top: 14px;
}

.setup-paths div {
  padding: 12px;
}

.setup-paths strong {
  display: block;
  margin-top: 5px;
  color: var(--ink);
  font-size: 12px;
  overflow-wrap: anywhere;
}

.check-item,
.readiness-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 11px 12px;
}

.check-item > span,
.readiness-item > span {
  width: 22px;
  height: 22px;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  border-radius: 999px;
  color: #ffffff;
  background: var(--danger);
}

.check-item.done > span,
.readiness-item.done > span {
  background: var(--success);
}

.check-item strong,
.readiness-item strong {
  display: block;
  font-size: 13px;
}

.toast {
  position: fixed;
  right: 22px;
  bottom: 22px;
  min-width: min(360px, calc(100vw - 44px));
  background: #111827;
  color: #ffffff;
  border-radius: 8px;
  padding: 13px 15px;
  box-shadow: var(--shadow);
  opacity: 0;
  transform: translateY(10px);
  pointer-events: none;
  transition: 180ms ease;
  z-index: 10;
}

.toast.show {
  opacity: 1;
  transform: translateY(0);
}

.floating-dialer {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 8;
  width: 318px;
}

.floating-dialer.dragging,
.floating-dialer.dragging * {
  user-select: none;
}

.floating-card {
  overflow: hidden;
  border: 1px solid #9ca3af;
  border-radius: 8px;
  background: #e5e7eb;
  box-shadow: 0 18px 55px rgba(15, 23, 42, 0.22);
}

.floating-header {
  position: relative;
  min-height: 92px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 13px 10px 0;
  color: #111827;
  background: #d1d5db;
  cursor: move;
}

.floating-brand,
.floating-actions {
  display: flex;
  align-items: center;
  gap: 9px;
}

.floating-brand {
  position: absolute;
  left: 8px;
  top: 6px;
  max-width: 230px;
}

.floating-actions {
  position: relative;
  z-index: 1;
  margin-left: auto;
}

.floating-logo {
  width: 352px;
  max-width: 100%;
  height: 80px;
  object-fit: contain;
  object-position: left center;
  padding: 0;
  border-radius: 0;
  background: transparent;
}

.floating-brand span {
  color: #b7bcc5;
  font-size: 10px;
}

#floating-minimize,
#floating-restore,
#floating-history,
.danger-action {
  border-radius: 8px;
  color: #ffffff;
  background: #64748b;
  font-weight: 800;
  font-size: 12px;
}

#floating-minimize {
  width: 22px;
  height: 30px;
  line-height: 1;
  background: rgba(255, 255, 255, 0.42);
  color: #4b5563;
}

#floating-history,
.danger-action {
  height: 30px;
  padding: 0 10px;
}

.danger-action {
  background: var(--accent);
}

#floating-restore {
  width: 156px;
  height: 116px;
  padding: 0;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

#floating-restore img {
  width: 136px;
  height: 84px;
  object-fit: contain;
  filter: drop-shadow(0 8px 14px rgba(15, 23, 42, 0.22));
}

.floating-body {
  display: grid;
  gap: 0;
  padding: 12px;
  color: var(--ink);
  background: #ffffff;
}

.floating-panel {
  display: grid;
  gap: 11px;
}

.floating-panel[hidden] {
  display: none;
}

.floating-panel h3 {
  margin: 0;
  font-size: 18px;
}

.floating-body label {
  font-size: 12px;
  color: #334155;
}

.floating-body input,
.floating-body select {
  height: 44px;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  color: var(--ink);
  background: #ffffff;
  font-size: 14px;
  font-weight: 700;
}

.floating-body input::placeholder {
  color: #94a3b8;
}

.floating-status {
  min-height: 28px;
  display: flex;
  align-items: center;
  border-radius: 8px;
  justify-content: center;
  border: 1px solid #bfdbfe;
  padding: 5px 9px;
  color: var(--accent-2);
  background: var(--blue-soft);
  font-size: 11px;
  font-weight: 800;
}

.floating-wide {
  min-height: 44px;
  width: 100%;
  border-radius: 8px;
  color: #ffffff;
  font-weight: 900;
}

.floating-wide.red {
  background: var(--accent);
}

.floating-wide.neutral {
  border: 1px solid #cbd5e1;
  color: var(--ink);
  background: #f8fafc;
}

.floating-wide.slate {
  background: #64748b;
}

.mode-toggle {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.mode-toggle button {
  min-height: 42px;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  color: var(--ink);
  background: #f8fafc;
  font-weight: 900;
}

.mode-toggle button.active {
  color: #ffffff;
  border-color: var(--accent-2);
  background: var(--accent-2);
}

.session-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  border-radius: 7px;
  padding: 12px 8px;
  background: #f9fafb;
}

.session-stats div,
.report-grid div {
  text-align: center;
}

.session-stats span {
  display: block;
  color: var(--accent-2);
  font-size: 10px;
  font-weight: 900;
}

.session-stats strong {
  display: block;
  margin-top: 4px;
  color: var(--ink);
  font-size: 14px;
}

.floating-call-row {
  display: grid;
  grid-template-columns: 1fr 38px 38px 38px;
  gap: 7px;
}

.floating-call-row input {
  height: 30px;
  font-size: 11px;
}

.round-call,
.round-end,
.round-muted {
  width: 38px;
  height: 38px;
  border-radius: 999px;
  color: #ffffff;
  font-weight: 900;
}

.round-call {
  background: #22b14c;
}

.round-end {
  background: #ef4444;
}

.round-muted {
  background: #64748b;
}

.settings-toggle {
  min-height: 28px;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  color: #334155;
  background: #f8fafc;
}

.settings-shell[hidden] {
  display: none;
}

.settings-tabs {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  background: #e2e8f0;
  border-radius: 6px 6px 0 0;
  overflow: hidden;
}

.settings-tabs button {
  min-height: 28px;
  color: #64748b;
  background: transparent;
  border-bottom: 2px solid transparent;
  font-size: 10px;
  font-weight: 900;
  text-transform: uppercase;
}

.settings-tabs button.active {
  color: var(--accent-2);
  background: #ffffff;
  border-bottom-color: var(--accent);
}

.settings-panel {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px 8px;
  padding: 11px 8px;
  border-radius: 0 0 6px 6px;
  background: #f9fafb;
}

.settings-panel[hidden] {
  display: none;
}

.settings-panel label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 4px;
  font-size: 11px;
  font-weight: 900;
  color: #334155;
}

.settings-panel .check-row span {
  display: flex;
  align-items: center;
  min-width: 0;
}

.settings-panel input[type="checkbox"] {
  width: 13px;
  height: 13px;
  margin: 0 4px 0 0;
  accent-color: #94a3b8;
}

.settings-panel label i {
  width: 12px;
  height: 12px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  color: #bbbbbb;
  background: #cbd5e1;
  font-size: 8px;
  font-style: normal;
}

.number-settings,
.credits-row,
.ui-size-row {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  align-items: center;
}

.number-settings label {
  display: grid;
  grid-template-columns: 1fr 44px;
}

.number-settings input {
  height: 24px;
  padding: 0 6px;
  text-align: center;
  font-size: 12px;
}

.credits-row,
.ui-size-row {
  min-height: 35px;
  border-radius: 6px;
  padding: 0 8px;
  background: #ffffff;
  font-size: 12px;
}

.credits-row span {
  color: #64748b;
  text-transform: uppercase;
}

.ui-size-row {
  grid-template-columns: 1fr 28px 44px 28px;
}

.ui-size-row button {
  height: 24px;
  border-radius: 4px;
  color: #ffffff;
  background: var(--accent-2);
}

.report-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: -12px -12px 0;
  padding: 14px;
  color: #ffffff;
  background: #d1d5db;
  color: #111827;
}

.report-head h3 {
  margin: 0;
  font-size: 16px;
}

.report-head button {
  color: #111827;
  background: transparent;
  font-weight: 900;
}

.report-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.report-grid div {
  border-radius: 8px;
  padding: 12px 6px;
  background: #f1f5f9;
}

.report-grid strong {
  display: block;
  font-size: 20px;
}

.report-grid span,
.usage-row span {
  color: #64748b;
  font-size: 11px;
}

.usage-row {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  padding: 10px 8px 0;
}

.usage-row strong {
  font-size: 12px;
}

.usage-bar {
  height: 7px;
  border-radius: 999px;
  background: #dbe3ed;
  overflow: hidden;
}

.usage-bar span {
  display: block;
  width: 38%;
  height: 100%;
  background: var(--accent-2);
}

.results-label {
  margin: 4px 0 0;
  color: var(--accent);
  font-size: 12px;
  letter-spacing: 2px;
  text-transform: uppercase;
}

.empty {
  color: var(--muted);
  padding: 24px;
  text-align: center;
}

.icon {
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  display: none;
  place-items: center;
  padding: 24px;
  background: rgba(15, 23, 42, 0.45);
  z-index: 20;
}

.modal-backdrop.show {
  display: grid;
}

.modal {
  width: min(520px, 100%);
  padding: 18px;
}

.modal h3 {
  margin: 0 0 14px;
}

@media (max-width: 980px) {
  .app-shell {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: sticky;
    top: 0;
    z-index: 5;
    padding: 8px 14px 10px;
  }

  .nav-group {
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 5px;
    overflow-x: auto;
  }

  .nav-logo {
    height: 78px;
  }

  .nav-button {
    justify-content: center;
    white-space: nowrap;
  }

  .account-card {
    display: none;
  }

  .dashboard-grid,
  .dialer-layout,
  .team-grid,
  .setup-grid,
  .setup-status-grid,
  .billing-band,
  .billing-breakdown {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 680px) {
  .topbar {
    align-items: flex-start;
    flex-direction: column;
    padding: 16px;
  }

  .content {
    padding: 16px;
  }

  .kpis {
    grid-template-columns: 1fr;
  }

  .metric {
    display: grid;
    grid-template-columns: 1fr;
  }

  .delta {
    justify-self: start;
  }

  .call-lane {
    grid-template-columns: 1fr;
  }

  .line {
    height: 46px;
    width: 8px;
    justify-self: center;
  }

  .line.active::after {
    width: 100%;
    height: 45%;
    animation-name: pulseRouteVertical;
  }
}

@keyframes pulseRouteVertical {
  from { transform: translateY(-110%); }
  to { transform: translateY(240%); }
}
