/* ============================================================
   Unavoidable Call System
   Theme: Dark Navy — matches Unavoidable CRM
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600&family=JetBrains+Mono:wght@400;500&display=swap');

:root {
  --bg:          #0f1117;
  --bg-2:        #13151e;
  --surface:     #191c28;
  --surface-2:   #1e2130;
  --surface-3:   #252840;
  --border:      rgba(255,255,255,0.07);
  --border-2:    rgba(255,255,255,0.12);

  --teal:        #2dd4bf;
  --teal-dim:    rgba(45,212,191,0.10);
  --teal-text:   #2dd4bf;
  --teal-dark:   #0d9488;

  --purple:      #7c6fcd;
  --purple-dim:  rgba(124,111,205,0.15);

  --green:       #4ade80;
  --green-dim:   rgba(74,222,128,0.10);
  --amber:       #fbbf24;
  --amber-dim:   rgba(251,191,36,0.10);
  --red:         #f87171;
  --red-dim:     rgba(248,113,113,0.10);
  --blue:        #60a5fa;
  --blue-dim:    rgba(96,165,250,0.10);

  --text:        #e8eaf0;
  --text-2:      #9ca3b8;
  --text-3:      #5a6080;
  --text-4:      #2e3248;

  --sans:        'Inter', system-ui, sans-serif;
  --mono:        'JetBrains Mono', monospace;

  --radius-sm:   4px;
  --radius:      6px;
  --radius-lg:   8px;
  --radius-xl:   12px;

  --shadow:      0 1px 3px rgba(0,0,0,0.3);
  --shadow-lg:   0 8px 32px rgba(0,0,0,0.4);
  --t:           0.13s ease;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 14px; -webkit-font-smoothing: antialiased; }
body { background: var(--bg); color: var(--text); font-family: var(--sans); font-size: 0.875rem; line-height: 1.5; min-height: 100vh; }
a { color: var(--teal); text-decoration: none; transition: opacity var(--t); }
a:hover { opacity: 0.8; }
button { cursor: pointer; font-family: var(--sans); }
input, select, textarea { font-family: var(--sans); }
::selection { background: var(--teal-dim); }
::-webkit-scrollbar { width: 4px; height: 4px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--surface-3); border-radius: 4px; }

/* ── Layout ── */
.app-wrapper { display: flex; min-height: 100vh; }

/* ── Sidebar ── */
.sidebar {
  width: 220px;
  min-width: 220px;
  background: var(--bg-2);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0; left: 0;
  height: 100vh;
  z-index: 100;
  overflow-y: auto;
}
.sidebar-logo {
  padding: 16px 14px 14px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 10px;
}
.logo-icon {
  width: 28px; height: 28px;
  background: var(--purple);
  border-radius: var(--radius-sm);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.logo-icon svg { width: 14px; height: 14px; stroke: #fff; fill: none; stroke-width: 2; }
.logo-name { font-size: 0.82rem; font-weight: 600; color: var(--text); letter-spacing: -0.01em; line-height: 1.2; }
.logo-sub  { font-family: var(--mono); font-size: 0.55rem; color: var(--text-3); letter-spacing: 0.06em; margin-top: 1px; }

.sidebar-nav { flex: 1; padding: 8px 8px; }
.nav-section-label {
  font-size: 0.6rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-3);
  padding: 10px 8px 4px;
  display: flex;
  align-items: center;
  gap: 5px;
}
.nav-section-label::before { content: '+'; color: var(--teal); font-size: 0.7rem; }

.nav-item {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 7px 8px;
  border-radius: var(--radius-sm);
  font-size: 0.8rem;
  font-weight: 400;
  color: var(--text-2);
  transition: background var(--t), color var(--t);
  margin-bottom: 1px;
}
.nav-item:hover { background: var(--surface); color: var(--text); }
.nav-item.active { background: var(--purple-dim); color: var(--text); }
.nav-item .ni-icon { width: 15px; height: 15px; stroke: currentColor; fill: none; stroke-width: 1.5; flex-shrink: 0; opacity: 0.6; }
.nav-item.active .ni-icon { opacity: 1; color: var(--purple); }
.nav-badge {
  margin-left: auto;
  background: var(--teal-dim);
  color: var(--teal);
  font-family: var(--mono);
  font-size: 0.58rem;
  font-weight: 500;
  padding: 1px 5px;
  border-radius: 10px;
  min-width: 18px;
  text-align: center;
}
.nav-badge.neutral { background: var(--surface-3); color: var(--text-3); }

.sidebar-footer {
  padding: 8px 8px 12px;
  border-top: 1px solid var(--border);
}
.agent-row {
  display: flex; align-items: center; gap: 9px;
  padding: 7px 8px; border-radius: var(--radius-sm);
  transition: background var(--t);
}
.agent-row:hover { background: var(--surface); }
.agent-avatar {
  width: 26px; height: 26px; border-radius: 50%;
  background: var(--purple-dim);
  border: 1px solid var(--purple);
  display: flex; align-items: center; justify-content: center;
  font-size: 0.58rem; font-weight: 600; color: var(--purple);
  flex-shrink: 0; font-family: var(--mono);
}
.agent-name { font-size: 0.76rem; font-weight: 500; color: var(--text); line-height: 1.2; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.agent-role { font-size: 0.6rem; color: var(--text-3); font-family: var(--mono); }
.agent-logout { color: var(--text-3); transition: color var(--t); flex-shrink: 0; margin-left: auto; }
.agent-logout:hover { color: var(--red); opacity: 1; }

/* ── Main ── */
.main-content { margin-left: 220px; flex: 1; min-height: 100vh; display: flex; flex-direction: column; }
.topbar {
  height: 48px;
  border-bottom: 1px solid var(--border);
  background: var(--bg-2);
  padding: 0 24px;
  display: flex; align-items: center; justify-content: space-between;
  position: sticky; top: 0; z-index: 50;
}
.topbar-title { font-size: 0.78rem; font-weight: 500; color: var(--text-2); letter-spacing: 0.02em; text-transform: uppercase; }
.topbar-right { display: flex; align-items: center; gap: 10px; }
.live-indicator { display: flex; align-items: center; gap: 5px; font-family: var(--mono); font-size: 0.62rem; color: var(--text-3); }
.live-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--green); animation: pulse-dot 2s infinite; }
@keyframes pulse-dot { 0%,100%{opacity:1}50%{opacity:0.3} }

.page-body { padding: 24px; flex: 1; }

/* ── Stat cards ── */
.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 10px; margin-bottom: 20px; }
.stat-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 16px;
  position: relative;
  transition: border-color var(--t);
}
.stat-card:hover { border-color: var(--border-2); }
.stat-label {
  font-size: 0.6rem; font-weight: 600;
  letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--text-3); margin-bottom: 8px;
  display: flex; align-items: center; gap: 4px;
}
.stat-label::before { content: '+'; color: var(--teal); }
.stat-value { font-size: 2rem; font-weight: 300; color: var(--text); letter-spacing: -0.03em; line-height: 1; }
.stat-card.featured .stat-value { color: var(--teal); }
.stat-sub { font-size: 0.66rem; color: var(--text-3); margin-top: 5px; font-family: var(--mono); }

/* ── Buttons ── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  padding: 6px 12px; border-radius: var(--radius-sm);
  font-size: 0.78rem; font-weight: 500; border: none;
  transition: all var(--t); white-space: nowrap; line-height: 1;
}
.btn svg { width: 13px; height: 13px; stroke: currentColor; fill: none; stroke-width: 1.75; flex-shrink: 0; }
.btn-primary   { background: var(--purple); color: #fff; }
.btn-primary:hover { background: #8b7fe0; }
.btn-secondary { background: var(--surface-2); color: var(--text-2); border: 1px solid var(--border-2); }
.btn-secondary:hover { background: var(--surface-3); color: var(--text); }
.btn-ghost     { background: transparent; color: var(--text-3); border: 1px solid transparent; }
.btn-ghost:hover { background: var(--surface-2); color: var(--text-2); border-color: var(--border); }
.btn-success   { background: var(--teal-dark); color: #fff; }
.btn-success:hover { background: var(--teal); color: #0f1117; }
.btn-danger    { background: var(--red-dim); color: var(--red); border: 1px solid rgba(248,113,113,0.2); }
.btn-danger:hover { background: rgba(248,113,113,0.2); }
.btn-teal      { background: var(--teal-dim); color: var(--teal); border: 1px solid rgba(45,212,191,0.2); }
.btn-teal:hover { background: rgba(45,212,191,0.2); }
.btn-sm  { padding: 4px 9px; font-size: 0.72rem; }
.btn-lg  { padding: 9px 18px; font-size: 0.84rem; }
.btn-xl  { padding: 11px 20px; font-size: 0.88rem; border-radius: var(--radius); }
.btn-icon { width: 30px; height: 30px; padding: 0; }
.btn:disabled { opacity: 0.35; cursor: not-allowed; }
.w-full  { width: 100%; }

/* ── Badges ── */
.badge {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 2px 7px; border-radius: 20px;
  font-size: 0.62rem; font-weight: 500;
  white-space: nowrap; font-family: var(--mono);
  letter-spacing: 0.02em;
}
.badge-dot { width: 4px; height: 4px; border-radius: 50%; background: currentColor; flex-shrink: 0; }
.badge-queued         { background: var(--surface-3); color: var(--text-3); }
.badge-calling        { background: var(--blue-dim); color: var(--blue); }
.badge-interested     { background: var(--teal-dim); color: var(--teal); }
.badge-booked         { background: var(--green-dim); color: var(--green); }
.badge-not_interested { background: var(--surface-3); color: var(--text-3); }
.badge-no_answer      { background: var(--amber-dim); color: var(--amber); }
.badge-voicemail      { background: var(--amber-dim); color: var(--amber); }
.badge-dnc            { background: var(--red-dim); color: var(--red); }
.badge-failed         { background: var(--red-dim); color: var(--red); }
.badge-active         { background: var(--green-dim); color: var(--green); }
.badge-paused         { background: var(--amber-dim); color: var(--amber); }
.badge-draft          { background: var(--surface-3); color: var(--text-3); }
.badge-complete       { background: var(--teal-dim); color: var(--teal); }
.badge-admin          { background: var(--purple-dim); color: var(--purple); }
.badge-agent          { background: var(--surface-3); color: var(--text-2); }
.badge-suspended      { background: var(--red-dim); color: var(--red); }

/* ── Tables ── */
.table-wrap { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); overflow: hidden; }
table.data-table { width: 100%; border-collapse: collapse; }
table.data-table thead th {
  padding: 9px 14px;
  text-align: left;
  font-size: 0.6rem; font-weight: 600;
  letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--text-3);
  background: var(--surface-2);
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}
table.data-table tbody tr { border-bottom: 1px solid var(--border); transition: background var(--t); }
table.data-table tbody tr:last-child { border-bottom: none; }
table.data-table tbody tr:hover { background: var(--surface-2); }
table.data-table td { padding: 10px 14px; font-size: 0.8rem; color: var(--text-2); vertical-align: middle; }
table.data-table td.mono { font-family: var(--mono); font-size: 0.74rem; color: var(--text-3); }
.t-primary { font-weight: 500; color: var(--text); font-size: 0.8rem; }
.t-secondary { font-size: 0.7rem; color: var(--text-3); margin-top: 1px; }

/* ── Cards ── */
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); overflow: hidden; }
.card-header {
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  min-height: 44px;
}
.card-title { font-size: 0.72rem; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: var(--text-2); }
.card-subtitle { font-size: 0.66rem; color: var(--text-3); font-family: var(--mono); }
.card-body { padding: 16px; }
.card-flush { padding: 0; }

/* ── Forms ── */
.form-group { margin-bottom: 14px; }
.form-label { display: block; font-size: 0.7rem; font-weight: 500; color: var(--text-2); margin-bottom: 5px; }
.form-control {
  width: 100%; background: var(--surface-2);
  border: 1px solid var(--border-2); border-radius: var(--radius-sm);
  padding: 8px 10px; font-size: 0.8rem; color: var(--text);
  font-family: var(--sans); outline: none;
  transition: border-color var(--t), box-shadow var(--t); appearance: none;
}
.form-control:hover { border-color: var(--text-4); }
.form-control:focus { border-color: var(--teal-dark); box-shadow: 0 0 0 3px rgba(13,148,136,0.15); }
.form-control::placeholder { color: var(--text-3); }
textarea.form-control { resize: vertical; min-height: 80px; line-height: 1.5; font-size: 0.78rem; }
select.form-control {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath d='M1 1l4 4 4-4' stroke='%235a6080' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 10px center; padding-right: 28px; cursor: pointer;
}
.form-hint { font-size: 0.68rem; color: var(--text-3); margin-top: 4px; font-family: var(--mono); }
.form-row   { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.form-row-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 12px; }

/* ── Alerts ── */
.alert { padding: 10px 14px; border-radius: var(--radius); font-size: 0.78rem; margin-bottom: 16px; border: 1px solid; }
.alert-success { background: var(--green-dim); color: var(--green); border-color: rgba(74,222,128,0.2); }
.alert-error   { background: var(--red-dim);   color: var(--red);   border-color: rgba(248,113,113,0.2); }
.alert-info    { background: var(--teal-dim);  color: var(--teal);  border-color: rgba(45,212,191,0.2); }
.alert-warning { background: var(--amber-dim); color: var(--amber); border-color: rgba(251,191,36,0.2); }

/* ── Modals ── */
.modal-overlay {
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.6);
  z-index: 999; display: flex; align-items: center; justify-content: center; padding: 20px;
  opacity: 0; pointer-events: none; transition: opacity 0.15s;
  backdrop-filter: blur(4px);
}
.modal-overlay.open { opacity: 1; pointer-events: all; }
.modal {
  background: var(--surface); border: 1px solid var(--border-2);
  border-radius: var(--radius-xl); width: 100%; max-width: 520px; max-height: 90vh; overflow-y: auto;
  transform: translateY(8px); transition: transform 0.15s ease;
  box-shadow: var(--shadow-lg);
}
.modal-overlay.open .modal { transform: translateY(0); }
.modal-header { padding: 16px 20px; border-bottom: 1px solid var(--border); display: flex; align-items: center; justify-content: space-between; }
.modal-title { font-size: 0.85rem; font-weight: 600; }
.modal-body { padding: 20px; }
.modal-footer { padding: 12px 20px; border-top: 1px solid var(--border); display: flex; gap: 8px; justify-content: flex-end; background: var(--surface-2); }

/* ── Tabs ── */
.tabs { display: flex; border-bottom: 1px solid var(--border); margin-bottom: 20px; }
.tab-btn {
  padding: 8px 14px; font-size: 0.76rem; font-weight: 400;
  color: var(--text-3); background: none; border: none;
  border-bottom: 2px solid transparent; margin-bottom: -1px;
  transition: color var(--t), border-color var(--t); cursor: pointer;
}
.tab-btn:hover { color: var(--text-2); }
.tab-btn.active { color: var(--teal); border-bottom-color: var(--teal); font-weight: 500; }
.tab-panel { display: none; }
.tab-panel.active { display: block; }

/* ── Toasts ── */
#toast-container { position: fixed; bottom: 18px; right: 18px; z-index: 9999; display: flex; flex-direction: column; gap: 6px; }
.toast {
  background: var(--surface-3); border: 1px solid var(--border-2);
  border-radius: var(--radius); padding: 10px 14px;
  font-size: 0.78rem; color: var(--text);
  box-shadow: var(--shadow-lg); display: flex; align-items: center; gap: 8px;
  animation: toast-in 0.16s ease; max-width: 300px;
}
.toast.success { border-left: 2px solid var(--green); }
.toast.error   { border-left: 2px solid var(--red); }
.toast.info    { border-left: 2px solid var(--teal); }
@keyframes toast-in { from { transform: translateX(8px); opacity: 0; } to { transform: translateX(0); opacity: 1; } }

/* ── Filter bar ── */
.filter-bar { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 14px; }
.filter-bar .form-control { max-width: 200px; padding: 6px 9px; font-size: 0.76rem; }

/* ── Empty state ── */
.empty-state { text-align: center; padding: 48px 24px; color: var(--text-3); }
.empty-state-icon { width: 36px; height: 36px; margin: 0 auto 12px; background: var(--surface-2); border-radius: var(--radius); display: flex; align-items: center; justify-content: center; }
.empty-state-icon svg { width: 18px; height: 18px; stroke: var(--text-3); fill: none; stroke-width: 1.5; }
.empty-state h3 { font-size: 0.82rem; font-weight: 500; color: var(--text-2); margin-bottom: 4px; }
.empty-state p { font-size: 0.76rem; }

/* ── Grids ── */
.grid-2       { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.grid-sidebar { display: grid; grid-template-columns: 1fr 300px; gap: 16px; }
.grid-sidebar-lg { display: grid; grid-template-columns: 1fr 340px; gap: 16px; }
.divider { border: none; border-top: 1px solid var(--border); margin: 14px 0; }

/* ── Leaderboard ── */
.lb-row { display: flex; align-items: center; gap: 10px; padding: 9px 14px; border-bottom: 1px solid var(--border); transition: background var(--t); }
.lb-row:last-child { border-bottom: none; }
.lb-row:hover { background: var(--surface-2); }
.lb-pos    { font-family: var(--mono); font-size: 0.65rem; color: var(--text-3); width: 14px; text-align: right; flex-shrink: 0; }
.lb-name   { font-size: 0.78rem; font-weight: 500; color: var(--text-2); flex: 1; }
.lb-calls  { font-family: var(--mono); font-size: 0.7rem; color: var(--text-3); }
.lb-booked { font-family: var(--mono); font-size: 0.7rem; color: var(--green); font-weight: 500; margin-left: 8px; min-width: 40px; text-align: right; }

/* ── Activity feed ── */
.activity-item { display: flex; align-items: center; gap: 10px; padding: 9px 16px; border-bottom: 1px solid var(--border); transition: background var(--t); }
.activity-item:last-child { border-bottom: none; }
.activity-item:hover { background: var(--surface-2); }
.activity-name { font-size: 0.78rem; font-weight: 500; color: var(--text); }
.activity-biz  { font-size: 0.68rem; color: var(--text-3); margin-top: 1px; }
.activity-time { font-family: var(--mono); font-size: 0.64rem; color: var(--text-3); flex-shrink: 0; margin-left: auto; }

/* ── Bar chart ── */
.bar-row { display: flex; align-items: center; gap: 10px; padding: 7px 14px; border-bottom: 1px solid var(--border); }
.bar-row:last-child { border-bottom: none; }
.bar-label { font-size: 0.72rem; color: var(--text-2); width: 90px; flex-shrink: 0; }
.bar-track { flex: 1; background: var(--surface-3); border-radius: 2px; height: 3px; overflow: hidden; }
.bar-fill  { height: 100%; border-radius: 2px; transition: width 0.5s ease; }
.bar-count { font-family: var(--mono); font-size: 0.65rem; color: var(--text-3); width: 20px; text-align: right; flex-shrink: 0; }

/* ── Dialler ── */
.dialler-grid { display: grid; grid-template-columns: 1fr 320px; gap: 16px; align-items: start; }
.dialler-main { display: flex; flex-direction: column; gap: 14px; }
.dialler-sidebar { display: flex; flex-direction: column; gap: 12px; }

.lead-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 18px; transition: border-color var(--t); }
.lead-card.on-call { border-color: rgba(45,212,191,0.3); box-shadow: 0 0 0 3px rgba(45,212,191,0.05); }
.lead-name { font-size: 1.3rem; font-weight: 300; color: var(--text); letter-spacing: -0.02em; margin-bottom: 2px; }
.lead-biz  { font-size: 0.8rem; color: var(--teal); font-weight: 500; margin-bottom: 12px; }
.lead-meta { display: flex; gap: 14px; flex-wrap: wrap; margin-bottom: 14px; }
.lead-meta-item { display: flex; align-items: center; gap: 5px; font-size: 0.74rem; color: var(--text-3); }
.lead-meta-item svg { width: 12px; height: 12px; stroke: currentColor; fill: none; stroke-width: 1.5; opacity: 0.5; }

.call-status-bar { background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--radius); padding: 10px 14px; display: flex; align-items: center; gap: 10px; font-size: 0.76rem; margin-bottom: 12px; }
.call-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--surface-3); flex-shrink: 0; transition: background var(--t); }
.call-dot.live    { background: var(--green); animation: pulse-dot 1.5s infinite; }
.call-dot.ringing { background: var(--amber); animation: pulse-dot 0.8s infinite; }
.call-status-text { color: var(--text-3); flex: 1; font-size: 0.76rem; }
.call-timer { font-family: var(--mono); font-size: 0.8rem; font-weight: 500; color: var(--teal); margin-left: auto; display: none; }

.call-controls { display: flex; gap: 8px; flex-wrap: wrap; }

.outcome-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 6px; }
.outcome-btn {
  padding: 9px 6px; border-radius: var(--radius-sm);
  font-size: 0.71rem; font-weight: 500; text-align: center;
  border: 1px solid var(--border-2); background: var(--surface-2);
  color: var(--text-3); cursor: pointer; transition: all var(--t); line-height: 1.3;
}
.outcome-btn:hover { border-color: var(--text-4); color: var(--text-2); background: var(--surface-3); }
.outcome-btn.sel-booked          { border-color: rgba(74,222,128,0.4); background: var(--green-dim); color: var(--green); }
.outcome-btn.sel-interested      { border-color: rgba(45,212,191,0.4); background: var(--teal-dim); color: var(--teal); }
.outcome-btn.sel-no_answer       { border-color: rgba(251,191,36,0.4); background: var(--amber-dim); color: var(--amber); }
.outcome-btn.sel-voicemail       { border-color: rgba(251,191,36,0.3); background: var(--amber-dim); color: var(--amber); }
.outcome-btn.sel-not_interested  { border-color: var(--border-2); background: var(--surface-3); color: var(--text-3); }
.outcome-btn.sel-dnc             { border-color: rgba(248,113,113,0.4); background: var(--red-dim); color: var(--red); }

.queue-item { display: flex; align-items: center; gap: 9px; padding: 8px 10px; border-radius: var(--radius-sm); cursor: pointer; transition: background var(--t); margin-bottom: 1px; }
.queue-item:hover { background: var(--surface-2); }
.queue-item.current { background: var(--purple-dim); }
.queue-num { font-family: var(--mono); font-size: 0.62rem; color: var(--text-3); width: 16px; text-align: right; flex-shrink: 0; }
.queue-item-name { font-size: 0.76rem; font-weight: 500; color: var(--text-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.queue-item-meta { font-size: 0.65rem; color: var(--text-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.sms-tpl-btn { width: 100%; text-align: left; background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 8px 10px; cursor: pointer; transition: all var(--t); margin-bottom: 5px; }
.sms-tpl-btn:hover { border-color: var(--border-2); background: var(--surface-3); }
.sms-tpl-name    { font-size: 0.74rem; font-weight: 500; color: var(--text-2); display: block; margin-bottom: 2px; }
.sms-tpl-preview { font-size: 0.65rem; color: var(--text-3); font-family: var(--mono); display: block; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }

/* ── Login ── */
.login-wrapper { min-height: 100vh; background: var(--bg); display: flex; align-items: center; justify-content: center; padding: 24px; position: relative; overflow: hidden; }
.login-wrapper::before { content: ''; position: absolute; inset: 0; background-image: linear-gradient(var(--border) 1px, transparent 1px), linear-gradient(90deg, var(--border) 1px, transparent 1px); background-size: 48px 48px; pointer-events: none; }
.login-wrapper::after { content: ''; position: absolute; width: 500px; height: 500px; border-radius: 50%; background: radial-gradient(circle, rgba(124,111,205,0.08) 0%, transparent 65%); top: -100px; right: -100px; pointer-events: none; }
.login-card { background: var(--surface); border: 1px solid var(--border-2); border-radius: var(--radius-xl); padding: 32px; width: 100%; max-width: 360px; box-shadow: var(--shadow-lg); position: relative; z-index: 1; }
.login-logo { display: flex; align-items: center; gap: 10px; margin-bottom: 24px; }
.login-logo-icon { width: 32px; height: 32px; background: var(--purple); border-radius: var(--radius-sm); display: flex; align-items: center; justify-content: center; }
.login-logo-icon svg { width: 16px; height: 16px; stroke: #fff; fill: none; stroke-width: 2; }
.login-logo-name { font-size: 0.88rem; font-weight: 600; color: var(--text); line-height: 1.2; }
.login-logo-sub  { font-family: var(--mono); font-size: 0.58rem; color: var(--text-3); }
.login-heading { font-size: 1.1rem; font-weight: 500; color: var(--text); letter-spacing: -0.02em; margin-bottom: 4px; }
.login-sub { font-size: 0.76rem; color: var(--text-3); margin-bottom: 22px; }
.login-divider { border: none; border-top: 1px solid var(--border); margin: 0 -32px 22px; }
.login-status { display: flex; align-items: center; gap: 6px; font-size: 0.66rem; color: var(--text-3); font-family: var(--mono); margin-top: 18px; justify-content: center; }
.login-status-dot { width: 5px; height: 5px; border-radius: 50%; background: var(--green); }

/* ── Utilities ── */
.text-teal  { color: var(--teal); }
.text-green { color: var(--green); }
.text-red   { color: var(--red); }
.text-amber { color: var(--amber); }
.text-muted { color: var(--text-3); }
.text-mono  { font-family: var(--mono); }
.text-xs { font-size: 0.68rem; }
.text-sm { font-size: 0.76rem; }
.font-500 { font-weight: 500; }
.mt-8  { margin-top: 8px; }
.mt-12 { margin-top: 12px; }
.mt-16 { margin-top: 16px; }
.mb-8  { margin-bottom: 8px; }
.mb-12 { margin-bottom: 12px; }
.mb-16 { margin-bottom: 16px; }
.flex  { display: flex; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.gap-6  { gap: 6px; }
.gap-8  { gap: 8px; }
.gap-10 { gap: 10px; }
.gap-12 { gap: 12px; }
.truncate { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.hidden   { display: none !important; }

@media (max-width: 960px) {
  .sidebar { transform: translateX(-100%); transition: transform 0.2s ease; }
  .sidebar.open { transform: translateX(0); }
  .main-content { margin-left: 0; }
  .dialler-grid, .grid-sidebar, .grid-sidebar-lg, .grid-2 { grid-template-columns: 1fr; }
  .form-row, .form-row-3 { grid-template-columns: 1fr; }
}
