/* ============================================================
   NexoPBX — Design System
   Aesthetic: Industrial-Futuristic / Dark Command Center
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Space+Mono:ital,wght@0,400;0,700;1,400&family=DM+Sans:opsz,wght@9..40,300;9..40,400;9..40,500;9..40,600&display=swap');

:root {
  --bg-base:       #0a0c10;
  --bg-surface:    #111520;
  --bg-elevated:   #181d2a;
  --bg-card:       #1c2133;
  --bg-hover:      #222840;

  --accent-primary: #00d4ff;
  --accent-blue:    #3b82f6;
  --accent-green:   #10d48a;
  --accent-amber:   #f59e0b;
  --accent-red:     #ef4444;
  --accent-purple:  #8b5cf6;

  --text-primary:   #e8eaf2;
  --text-secondary: #8892a4;
  --text-muted:     #4a5568;
  --text-accent:    #00d4ff;

  --border-subtle:  rgba(255,255,255,0.06);
  --border-medium:  rgba(255,255,255,0.12);
  --border-accent:  rgba(0,212,255,0.3);

  --radius-sm:  4px;
  --radius-md:  8px;
  --radius-lg:  12px;
  --radius-xl:  18px;

  --font-mono:  'Space Mono', monospace;
  --font-body:  'DM Sans', system-ui, sans-serif;

  --shadow-card: 0 4px 24px rgba(0,0,0,0.4);
  --shadow-glow: 0 0 20px rgba(0,212,255,0.15);

  --sidebar-width: 240px;
  --header-height: 60px;
}

/* Reset */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 15px; scroll-behavior: smooth; }
body {
  background: var(--bg-base);
  color: var(--text-primary);
  font-family: var(--font-body);
  font-weight: 400;
  line-height: 1.6;
  min-height: 100vh;
  overflow-x: hidden;
}

/* Scrollbar */
::-webkit-scrollbar { width: 5px; height: 5px; }
::-webkit-scrollbar-track { background: var(--bg-surface); }
::-webkit-scrollbar-thumb { background: var(--border-medium); border-radius: 99px; }
::-webkit-scrollbar-thumb:hover { background: var(--accent-primary); }

/* ── Layout ─────────────────────────────────────────────── */
.app-layout {
  display: grid;
  grid-template-columns: var(--sidebar-width) 1fr;
  grid-template-rows: var(--header-height) 1fr;
  min-height: 100vh;
}

/* ── Header ─────────────────────────────────────────────── */
.app-header {
  grid-column: 1 / -1;
  background: var(--bg-surface);
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  padding: 0 1.5rem;
  gap: 1rem;
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(10px);
}

.app-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  width: calc(var(--sidebar-width) - 1.5rem);
}
.app-logo .logo-icon {
  width: 32px; height: 32px;
  background: linear-gradient(135deg, var(--accent-primary), var(--accent-blue));
  border-radius: var(--radius-md);
  display: flex; align-items: center; justify-content: center;
  font-size: 16px; color: #000;
  font-weight: 700; font-family: var(--font-mono);
}
.app-logo .logo-text {
  font-family: var(--font-mono);
  font-size: 1.1rem;
  color: var(--text-primary);
  letter-spacing: 1px;
}
.app-logo .logo-text span { color: var(--accent-primary); }

.header-center { flex: 1; }

.header-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.header-btn {
  background: transparent;
  border: 1px solid var(--border-medium);
  color: var(--text-secondary);
  border-radius: var(--radius-md);
  padding: 0.4rem 0.75rem;
  cursor: pointer;
  font-size: 0.85rem;
  font-family: var(--font-body);
  transition: all 0.2s;
  display: flex; align-items: center; gap: 6px;
}
.header-btn:hover { border-color: var(--accent-primary); color: var(--accent-primary); background: rgba(0,212,255,0.05); }

.user-badge {
  background: var(--bg-elevated);
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-xl);
  padding: 0.3rem 0.75rem 0.3rem 0.3rem;
  display: flex; align-items: center; gap: 8px;
  cursor: pointer;
}
.user-avatar {
  width: 28px; height: 28px;
  background: linear-gradient(135deg, var(--accent-purple), var(--accent-blue));
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 11px; font-weight: 700; color: #fff;
}
.user-name { font-size: 0.85rem; font-weight: 500; color: var(--text-primary); }

/* Live status */
.live-badge {
  display: flex; align-items: center; gap: 6px;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--accent-green);
  background: rgba(16,212,138,0.1);
  border: 1px solid rgba(16,212,138,0.3);
  border-radius: var(--radius-xl);
  padding: 0.25rem 0.6rem;
}
.live-dot {
  width: 6px; height: 6px;
  background: var(--accent-green);
  border-radius: 50%;
  animation: pulse 1.5s infinite;
}
@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.5; transform: scale(0.8); }
}

/* ── Sidebar ─────────────────────────────────────────────── */
.app-sidebar {
  background: var(--bg-surface);
  border-right: 1px solid var(--border-subtle);
  padding: 1.5rem 0;
  overflow-y: auto;
  position: sticky;
  top: var(--header-height);
  height: calc(100vh - var(--header-height));
}

.nav-section {
  padding: 0 0.75rem;
  margin-bottom: 1.5rem;
}
.nav-section-label {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--text-muted);
  padding: 0 0.75rem;
  margin-bottom: 0.4rem;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0.55rem 0.75rem;
  border-radius: var(--radius-md);
  text-decoration: none;
  color: var(--text-secondary);
  font-size: 0.88rem;
  font-weight: 400;
  transition: all 0.15s;
  cursor: pointer;
  border: 1px solid transparent;
  margin-bottom: 2px;
}
.nav-item:hover {
  background: var(--bg-hover);
  color: var(--text-primary);
  border-color: var(--border-subtle);
}
.nav-item.active {
  background: rgba(0,212,255,0.08);
  color: var(--accent-primary);
  border-color: var(--border-accent);
}
.nav-item .nav-icon {
  width: 20px; height: 20px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1rem;
  flex-shrink: 0;
}
.nav-badge {
  margin-left: auto;
  background: var(--accent-red);
  color: #fff;
  font-size: 0.65rem;
  font-weight: 700;
  padding: 1px 6px;
  border-radius: 99px;
  font-family: var(--font-mono);
}
.nav-badge.green { background: var(--accent-green); color: #000; }

/* ── Main content ────────────────────────────────────────── */
.app-main {
  padding: 1.75rem 2rem;
  overflow-y: auto;
  background: var(--bg-base);
}

.page-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 1.75rem;
  gap: 1rem;
}
.page-title {
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--text-primary);
  font-family: var(--font-mono);
  letter-spacing: -0.5px;
}
.page-subtitle {
  font-size: 0.85rem;
  color: var(--text-secondary);
  margin-top: 0.2rem;
}

/* ── Cards ───────────────────────────────────────────────── */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 1.25rem 1.5rem;
  box-shadow: var(--shadow-card);
}
.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.25rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--border-subtle);
}
.card-title {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-primary);
  display: flex; align-items: center; gap: 8px;
}
.card-title .icon { color: var(--accent-primary); }

/* ── Stat Cards ──────────────────────────────────────────── */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 1rem;
  margin-bottom: 1.5rem;
}
.stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 1.25rem;
  position: relative;
  overflow: hidden;
  transition: border-color 0.2s;
}
.stat-card:hover { border-color: var(--border-accent); }
.stat-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: var(--accent-color, var(--accent-primary));
}
.stat-card.green  { --accent-color: var(--accent-green); }
.stat-card.amber  { --accent-color: var(--accent-amber); }
.stat-card.red    { --accent-color: var(--accent-red); }
.stat-card.purple { --accent-color: var(--accent-purple); }

.stat-label {
  font-size: 0.75rem;
  font-family: var(--font-mono);
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.8px;
  margin-bottom: 0.5rem;
}
.stat-value {
  font-size: 2rem;
  font-weight: 600;
  font-family: var(--font-mono);
  color: var(--text-primary);
  line-height: 1;
}
.stat-sub {
  font-size: 0.75rem;
  color: var(--text-secondary);
  margin-top: 0.4rem;
}
.stat-icon {
  position: absolute;
  right: 1.25rem; top: 50%;
  transform: translateY(-50%);
  font-size: 2.5rem;
  opacity: 0.08;
}

/* ── Grid layouts ────────────────────────────────────────── */
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 1.25rem; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.25rem; }
.grid-main-aside { display: grid; grid-template-columns: 1fr 340px; gap: 1.25rem; }

/* ── Table ───────────────────────────────────────────────── */
.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.875rem;
}
.data-table th {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  color: var(--text-muted);
  padding: 0.6rem 1rem;
  text-align: left;
  border-bottom: 1px solid var(--border-subtle);
  font-weight: 400;
}
.data-table td {
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--border-subtle);
  color: var(--text-primary);
  vertical-align: middle;
}
.data-table tr:last-child td { border-bottom: none; }
.data-table tr:hover td { background: var(--bg-hover); }

/* ── Status badges ───────────────────────────────────────── */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 0.72rem;
  font-weight: 500;
  font-family: var(--font-mono);
  padding: 0.2rem 0.6rem;
  border-radius: 99px;
  border: 1px solid;
}
.badge.online  { background: rgba(16,212,138,0.1); color: var(--accent-green); border-color: rgba(16,212,138,0.3); }
.badge.offline { background: rgba(74,85,104,0.2);  color: var(--text-muted); border-color: var(--border-subtle); }
.badge.ringing { background: rgba(245,158,11,0.1); color: var(--accent-amber); border-color: rgba(245,158,11,0.3); }
.badge.busy    { background: rgba(239,68,68,0.1);  color: var(--accent-red); border-color: rgba(239,68,68,0.3); }
.badge.info    { background: rgba(0,212,255,0.1);  color: var(--accent-primary); border-color: rgba(0,212,255,0.3); }
.badge-dot     { width: 5px; height: 5px; border-radius: 50%; background: currentColor; }

/* ── Buttons ─────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 0.5rem 1rem;
  border-radius: var(--radius-md);
  font-size: 0.875rem;
  font-weight: 500;
  font-family: var(--font-body);
  cursor: pointer;
  border: 1px solid transparent;
  transition: all 0.2s;
  text-decoration: none;
  white-space: nowrap;
}
.btn-primary {
  background: var(--accent-primary);
  color: #000;
  font-weight: 600;
}
.btn-primary:hover { background: #00b8d9; box-shadow: 0 0 16px rgba(0,212,255,0.3); }

.btn-secondary {
  background: transparent;
  border-color: var(--border-medium);
  color: var(--text-secondary);
}
.btn-secondary:hover { border-color: var(--accent-primary); color: var(--accent-primary); background: rgba(0,212,255,0.05); }

.btn-danger {
  background: transparent;
  border-color: rgba(239,68,68,0.4);
  color: var(--accent-red);
}
.btn-danger:hover { background: rgba(239,68,68,0.1); }

.btn-sm { padding: 0.3rem 0.65rem; font-size: 0.8rem; }
.btn-icon { padding: 0.4rem; border-radius: var(--radius-md); }

/* ── Forms ───────────────────────────────────────────────── */
.form-group { margin-bottom: 1.1rem; }
.form-label {
  display: block;
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--text-secondary);
  margin-bottom: 0.4rem;
  font-family: var(--font-mono);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.form-input, .form-select, .form-textarea {
  width: 100%;
  background: var(--bg-elevated);
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-md);
  padding: 0.6rem 0.9rem;
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: 0.9rem;
  transition: border-color 0.2s, box-shadow 0.2s;
  outline: none;
}
.form-input:focus, .form-select:focus, .form-textarea:focus {
  border-color: var(--accent-primary);
  box-shadow: 0 0 0 3px rgba(0,212,255,0.1);
}
.form-input::placeholder { color: var(--text-muted); }
.form-select { cursor: pointer; }
.form-select option { background: var(--bg-card); }
.form-textarea { resize: vertical; min-height: 80px; }

/* Toggle */
.toggle {
  position: relative;
  display: inline-block;
  width: 40px; height: 22px;
}
.toggle input { display: none; }
.toggle-slider {
  position: absolute; inset: 0;
  background: var(--bg-elevated);
  border: 1px solid var(--border-medium);
  border-radius: 99px;
  cursor: pointer;
  transition: 0.3s;
}
.toggle-slider::before {
  content: '';
  position: absolute;
  width: 16px; height: 16px;
  left: 2px; top: 2px;
  background: var(--text-muted);
  border-radius: 50%;
  transition: 0.3s;
}
.toggle input:checked + .toggle-slider { background: rgba(0,212,255,0.2); border-color: var(--accent-primary); }
.toggle input:checked + .toggle-slider::before { transform: translateX(18px); background: var(--accent-primary); }

/* ── Alerts ──────────────────────────────────────────────── */
.alert {
  padding: 0.75rem 1rem;
  border-radius: var(--radius-md);
  font-size: 0.875rem;
  display: flex; align-items: center; gap: 8px;
  border: 1px solid;
}
.alert-success { background: rgba(16,212,138,0.08); color: var(--accent-green); border-color: rgba(16,212,138,0.25); }
.alert-error   { background: rgba(239,68,68,0.08);  color: var(--accent-red);   border-color: rgba(239,68,68,0.25); }
.alert-info    { background: rgba(0,212,255,0.08);  color: var(--accent-primary); border-color: var(--border-accent); }

/* ── Modals ──────────────────────────────────────────────── */
.modal-overlay {
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.7);
  backdrop-filter: blur(4px);
  z-index: 1000;
  display: flex; align-items: center; justify-content: center;
  opacity: 0; pointer-events: none;
  transition: opacity 0.2s;
}
.modal-overlay.open { opacity: 1; pointer-events: all; }
.modal {
  background: var(--bg-card);
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-xl);
  padding: 1.75rem;
  width: 90%;
  max-width: 520px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.5);
  transform: translateY(20px);
  transition: transform 0.2s;
}
.modal-overlay.open .modal { transform: translateY(0); }
.modal-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 1.25rem; }
.modal-title { font-size: 1rem; font-weight: 600; font-family: var(--font-mono); }
.modal-close { background: none; border: none; color: var(--text-muted); cursor: pointer; font-size: 1.25rem; line-height: 1; padding: 4px; }
.modal-close:hover { color: var(--text-primary); }
.modal-footer { display: flex; gap: 0.75rem; justify-content: flex-end; margin-top: 1.5rem; padding-top: 1rem; border-top: 1px solid var(--border-subtle); }

/* ── Softphone widget ────────────────────────────────────── */
.softphone {
  position: fixed;
  bottom: 1.5rem; right: 1.5rem;
  z-index: 500;
}
.softphone-fab {
  width: 52px; height: 52px;
  background: linear-gradient(135deg, var(--accent-green), #059669);
  border-radius: 50%;
  border: none;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.3rem;
  box-shadow: 0 4px 20px rgba(16,212,138,0.4);
  transition: all 0.2s;
  color: #fff;
}
.softphone-fab:hover { transform: scale(1.08); }
.softphone-fab.active {
  background: linear-gradient(135deg, var(--accent-red), #dc2626);
  box-shadow: 0 4px 20px rgba(239,68,68,0.4);
}

.softphone-panel {
  position: absolute;
  bottom: 64px; right: 0;
  width: 280px;
  background: var(--bg-card);
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-xl);
  overflow: hidden;
  box-shadow: 0 16px 48px rgba(0,0,0,0.6);
  display: none;
}
.softphone-panel.open { display: block; }
.phone-header {
  background: var(--bg-elevated);
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--border-subtle);
}
.phone-display {
  font-family: var(--font-mono);
  font-size: 1.6rem;
  color: var(--text-primary);
  text-align: center;
  padding: 1.25rem;
  letter-spacing: 3px;
  min-height: 64px;
  display: flex; align-items: center; justify-content: center;
}
.phone-display.calling { color: var(--accent-amber); animation: blink 1s infinite; }
.phone-display.active  { color: var(--accent-green); }
@keyframes blink { 50% { opacity: 0.5; } }

.phone-keypad {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--border-subtle);
}
.key {
  background: var(--bg-card);
  border: none;
  padding: 0.9rem;
  cursor: pointer;
  text-align: center;
  font-size: 1.1rem;
  font-family: var(--font-mono);
  color: var(--text-primary);
  transition: background 0.15s;
  display: flex; flex-direction: column; align-items: center; gap: 2px;
}
.key:hover { background: var(--bg-hover); }
.key .sub { font-size: 0.55rem; color: var(--text-muted); letter-spacing: 1px; }
.phone-actions {
  display: grid; grid-template-columns: 1fr 1fr 1fr;
  gap: 8px;
  padding: 0.75rem;
  background: var(--bg-elevated);
}
.phone-action-btn {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  color: var(--text-secondary);
  cursor: pointer;
  padding: 0.5rem;
  font-size: 0.75rem;
  display: flex; flex-direction: column; align-items: center; gap: 3px;
  transition: all 0.15s;
}
.phone-action-btn:hover { border-color: var(--accent-primary); color: var(--accent-primary); }
.phone-call-btn {
  background: var(--accent-green);
  color: #000; border: none;
  border-radius: var(--radius-md);
  padding: 0.75rem;
  font-size: 1.1rem;
  cursor: pointer;
  transition: all 0.2s;
  width: 100%;
  margin: 0.5rem 0.75rem;
  width: calc(100% - 1.5rem);
  font-weight: 700;
}
.phone-call-btn:hover { background: #0cbb7a; }
.phone-call-btn.end { background: var(--accent-red); color: #fff; }

/* ── AI Chat ─────────────────────────────────────────────── */
.ai-panel {
  display: flex;
  flex-direction: column;
  height: calc(100vh - var(--header-height) - 3.5rem);
}
.ai-messages {
  flex: 1;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  padding-bottom: 1rem;
}
.ai-msg {
  display: flex;
  gap: 10px;
  max-width: 85%;
}
.ai-msg.user { margin-left: auto; flex-direction: row-reverse; }
.ai-avatar {
  width: 32px; height: 32px; flex-shrink: 0;
  border-radius: var(--radius-md);
  display: flex; align-items: center; justify-content: center;
  font-size: 0.85rem; font-weight: 700;
}
.ai-avatar.nexo {
  background: linear-gradient(135deg, var(--accent-primary), var(--accent-purple));
  color: #000;
}
.ai-avatar.user-av {
  background: var(--bg-elevated);
  border: 1px solid var(--border-medium);
  color: var(--text-secondary);
}
.ai-bubble {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 0.75rem 1rem;
  font-size: 0.875rem;
  line-height: 1.6;
  color: var(--text-primary);
}
.ai-msg.user .ai-bubble {
  background: rgba(0,212,255,0.08);
  border-color: var(--border-accent);
}
.ai-bubble pre {
  background: var(--bg-base);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 0.75rem;
  margin-top: 0.5rem;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  overflow-x: auto;
  white-space: pre-wrap;
}
.ai-input-area {
  display: flex;
  gap: 0.75rem;
  align-items: flex-end;
  padding-top: 1rem;
  border-top: 1px solid var(--border-subtle);
}
.ai-input-area .form-textarea { min-height: 48px; max-height: 140px; resize: none; }

/* ── Charts placeholder ──────────────────────────────────── */
.chart-container {
  position: relative;
  width: 100%;
  height: 250px;
}

/* ── Tabs ────────────────────────────────────────────────── */
.tabs { display: flex; gap: 2px; border-bottom: 1px solid var(--border-subtle); margin-bottom: 1.25rem; }
.tab-btn {
  background: none; border: none;
  padding: 0.6rem 1rem;
  font-size: 0.875rem;
  color: var(--text-secondary);
  cursor: pointer;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  font-family: var(--font-body);
  transition: all 0.15s;
}
.tab-btn:hover { color: var(--text-primary); }
.tab-btn.active { color: var(--accent-primary); border-bottom-color: var(--accent-primary); }
.tab-panel { display: none; }
.tab-panel.active { display: block; }

/* ── Progress ────────────────────────────────────────────── */
.progress-bar {
  height: 4px;
  background: var(--bg-elevated);
  border-radius: 99px;
  overflow: hidden;
}
.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--accent-primary), var(--accent-purple));
  border-radius: 99px;
  transition: width 0.4s ease;
}

/* ── Call activity feed ──────────────────────────────────── */
.call-feed { display: flex; flex-direction: column; gap: 0.6rem; }
.call-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0.65rem 0.85rem;
  background: var(--bg-elevated);
  border-radius: var(--radius-md);
  border: 1px solid var(--border-subtle);
  font-size: 0.83rem;
  transition: border-color 0.2s;
}
.call-item:hover { border-color: var(--border-medium); }
.call-dot { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; }
.call-dot.answered { background: var(--accent-green); }
.call-dot.missed   { background: var(--accent-red); }
.call-dot.voicemail{ background: var(--accent-amber); }
.call-info { flex: 1; }
.call-parties { font-weight: 500; color: var(--text-primary); }
.call-meta { color: var(--text-muted); font-size: 0.75rem; font-family: var(--font-mono); }
.call-duration { font-family: var(--font-mono); font-size: 0.78rem; color: var(--text-secondary); }

/* ── Toast notifications ─────────────────────────────────── */
#toast-container {
  position: fixed;
  bottom: 1.5rem; left: 50%; transform: translateX(-50%);
  z-index: 9999;
  display: flex; flex-direction: column; gap: 0.5rem;
  pointer-events: none;
}
.toast {
  background: var(--bg-card);
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-lg);
  padding: 0.75rem 1.25rem;
  font-size: 0.875rem;
  color: var(--text-primary);
  box-shadow: 0 8px 32px rgba(0,0,0,0.4);
  display: flex; align-items: center; gap: 8px;
  animation: slideUp 0.3s ease;
  pointer-events: all;
}
.toast.success { border-color: rgba(16,212,138,0.4); }
.toast.error   { border-color: rgba(239,68,68,0.4); }
@keyframes slideUp { from { transform: translateY(20px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }

/* ── Utility ─────────────────────────────────────────────── */
.text-muted   { color: var(--text-muted) !important; }
.text-success { color: var(--accent-green) !important; }
.text-danger  { color: var(--accent-red) !important; }
.text-warning { color: var(--accent-amber) !important; }
.text-info    { color: var(--accent-primary) !important; }
.text-mono    { font-family: var(--font-mono); }
.mt-1 { margin-top: 0.5rem; } .mt-2 { margin-top: 1rem; } .mt-3 { margin-top: 1.5rem; }
.mb-1 { margin-bottom: 0.5rem; } .mb-2 { margin-bottom: 1rem; }
.flex { display: flex; } .items-center { align-items: center; } .gap-1 { gap: 0.5rem; } .gap-2 { gap: 1rem; }
.w-full { width: 100%; }
.hidden { display: none !important; }

/* ── Login page ──────────────────────────────────────────── */
.login-page {
  min-height: 100vh;
  display: flex; align-items: center; justify-content: center;
  background: var(--bg-base);
  position: relative;
  overflow: hidden;
}
.login-page::before {
  content: '';
  position: absolute; inset: 0;
  background: radial-gradient(ellipse at 30% 50%, rgba(0,212,255,0.06) 0%, transparent 60%),
              radial-gradient(ellipse at 70% 20%, rgba(139,92,246,0.06) 0%, transparent 50%);
  pointer-events: none;
}
.login-box {
  background: var(--bg-card);
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-xl);
  padding: 2.5rem;
  width: 100%;
  max-width: 400px;
  position: relative;
  box-shadow: 0 24px 64px rgba(0,0,0,0.5);
}
.login-logo {
  display: flex; align-items: center; gap: 12px;
  margin-bottom: 2rem; justify-content: center;
}
.login-logo .icon {
  width: 44px; height: 44px;
  background: linear-gradient(135deg, var(--accent-primary), var(--accent-blue));
  border-radius: var(--radius-md);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.3rem; font-weight: 700; font-family: var(--font-mono); color: #000;
}
.login-logo .name {
  font-family: var(--font-mono);
  font-size: 1.4rem;
  color: var(--text-primary);
  letter-spacing: 1px;
}
.login-logo .name span { color: var(--accent-primary); }

/* ── Responsive ──────────────────────────────────────────── */
@media (max-width: 900px) {
  .app-layout { grid-template-columns: 1fr; }
  .app-sidebar { display: none; }
  .grid-2, .grid-3, .grid-main-aside { grid-template-columns: 1fr; }
}
