:root {
  --bg-primary: #060810;
  --bg-secondary: #0c0f18;
  --bg-tertiary: #131724;
  --bg-elevated: #1a2035;
  --bg-hover: #212940;
  --bg-card: #0f1320;
  --text-primary: #e2e7f2;
  --text-secondary: #8692ae;
  --text-muted: #4a5570;
  --accent: #00e5a0;
  --accent-dim: rgba(0, 229, 160, 0.1);
  --accent-glow: rgba(0, 229, 160, 0.22);
  --blue: #38bdf8;
  --blue-dim: rgba(56, 189, 248, 0.1);
  --purple: #8b5cf6;
  --purple-dim: rgba(139, 92, 246, 0.1);
  --amber: #fb923c;
  --amber-dim: rgba(251, 146, 60, 0.1);
  --red: #ef4444;
  --red-dim: rgba(239, 68, 68, 0.1);
  --border: #161d2e;
  --border-light: #1f2940;
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.4);
  --shadow-md: 0 4px 16px rgba(0,0,0,0.5);
  --shadow-lg: 0 8px 40px rgba(0,0,0,0.6);
  --radius: 8px;
  --radius-lg: 12px;
  --radius-xl: 16px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html, body, #root { height: 100%; width: 100%; overflow: hidden; }

body {
  font-family: 'DM Sans', -apple-system, sans-serif;
  background: var(--bg-primary);
  color: var(--text-primary);
  -webkit-font-smoothing: antialiased;
}

::-webkit-scrollbar { width: 5px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--bg-elevated); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--text-muted); }

@keyframes fade-in { from { opacity: 0; } to { opacity: 1; } }
@keyframes slide-up { from { transform: translateY(12px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }
@keyframes slide-in { from { transform: translateX(20px); opacity: 0; } to { transform: translateX(0); opacity: 1; } }
@keyframes pulse-glow { 0%, 100% { box-shadow: 0 0 6px var(--accent-glow); } 50% { box-shadow: 0 0 20px var(--accent-glow); } }
@keyframes count-up { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: translateY(0); } }
@keyframes shimmer { 0% { background-position: -200% 0; } 100% { background-position: 200% 0; } }
@keyframes toast-progress { from { width: 100%; } to { width: 0%; } }

.mono { font-family: 'JetBrains Mono', monospace; }
.anim-fade { animation: fade-in 0.3s ease; }
.anim-slide-up { animation: slide-up 0.3s cubic-bezier(0.2, 0, 0, 1); }
.anim-slide-in { animation: slide-in 0.25s cubic-bezier(0.2, 0, 0, 1); }

/* ===== LAYOUT ===== */
.app-shell { display: flex; height: 100%; }
.sidebar {
  width: 240px; flex-shrink: 0; display: flex; flex-direction: column;
  background: var(--bg-secondary); border-right: 1px solid var(--border);
  overflow: hidden;
}
.sidebar-brand {
  padding: 20px 20px 16px; display: flex; align-items: center; gap: 12;
  border-bottom: 1px solid var(--border);
}
.sidebar-brand-icon {
  width: 36px; height: 36px; border-radius: 10px;
  background: linear-gradient(135deg, #00e5a0, #38bdf8);
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 2px 16px rgba(0, 229, 160, 0.3);
  font-size: 16px; color: #060810; font-weight: 700;
}
.sidebar-nav { flex: 1; padding: 12px 10px; overflow-y: auto; }
.nav-section { margin-bottom: 8px; }
.nav-section-label {
  font-size: 10px; font-weight: 700; text-transform: uppercase;
  letter-spacing: 1.5px; color: var(--text-muted); padding: 8px 12px 4px;
}
.nav-btn {
  width: 100%; display: flex; align-items: center; gap: 10; padding: 9px 12px;
  border-radius: var(--radius); border: none; background: transparent;
  color: var(--text-secondary); cursor: pointer; font-family: 'DM Sans', sans-serif;
  font-size: 13.5px; font-weight: 400; transition: all 0.15s; text-align: left;
}
.nav-btn:hover { background: var(--bg-tertiary); color: var(--text-primary); }
.nav-btn.active {
  background: var(--accent-dim); color: var(--accent);
  font-weight: 500;
}
.nav-btn.active svg { color: var(--accent); stroke-width: 2.2; }
.nav-badge {
  margin-left: auto; font-size: 11px; font-weight: 600;
  background: var(--accent-dim); color: var(--accent);
  padding: 1px 8px; border-radius: 10px;
}
.sidebar-footer {
  padding: 12px 16px; border-top: 1px solid var(--border);
  font-size: 11px; color: var(--text-muted); text-align: center; line-height: 1.6;
}
.sidebar-footer a { color: var(--accent); text-decoration: none; }
.sidebar-footer a:hover { text-decoration: underline; }

/* ===== MAIN AREA ===== */
.main-area {
  flex: 1; display: flex; flex-direction: column; overflow: hidden;
  background: var(--bg-primary);
}
.top-bar {
  height: 56px; display: flex; align-items: center; padding: 0 24px;
  border-bottom: 1px solid var(--border); flex-shrink: 0; gap: 16;
  background: rgba(15, 18, 25, 0.9); backdrop-filter: blur(12px);
}
.page-title { font-size: 18px; font-weight: 600; letter-spacing: -0.3px; }
.page-content { flex: 1; overflow-y: auto; padding: 24px; }

/* ===== STAT CARDS ===== */
.stats-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 16; margin-bottom: 28px;
}
.stat-card {
  padding: 20px; border-radius: var(--radius-lg);
  background: var(--bg-card); border: 1px solid var(--border);
  position: relative; overflow: hidden; transition: border-color 0.2s;
}
.stat-card:hover { border-color: var(--border-light); }
.stat-card::before {
  content: ''; position: absolute; top: 0; left: 0; right: 0; height: 2px;
}
.stat-card.green::before { background: linear-gradient(90deg, var(--accent), var(--accent-dim), transparent); }
.stat-card.blue::before { background: linear-gradient(90deg, var(--blue), var(--blue-dim), transparent); }
.stat-card.purple::before { background: linear-gradient(90deg, var(--purple), var(--purple-dim), transparent); }
.stat-card.amber::before { background: linear-gradient(90deg, var(--amber), var(--amber-dim), transparent); }
.stat-label { font-size: 12px; color: var(--text-muted); font-weight: 500; margin-bottom: 8px; text-transform: uppercase; letter-spacing: 0.8px; }
.stat-value { font-size: 32px; font-weight: 800; letter-spacing: -1px; animation: count-up 0.4s ease; }
.stat-sub { font-size: 12px; color: var(--text-muted); margin-top: 4px; }

/* ===== TABLE ===== */
.data-table { width: 100%; border-collapse: separate; border-spacing: 0; }
.data-table th {
  text-align: left; padding: 10px 14px; font-size: 11px; font-weight: 600;
  text-transform: uppercase; letter-spacing: 1px; color: var(--text-muted);
  border-bottom: 1px solid var(--border); background: var(--bg-secondary);
  position: sticky; top: 0; z-index: 1;
}
.data-table td {
  padding: 12px 14px; border-bottom: 1px solid var(--border);
  font-size: 13.5px; vertical-align: middle;
}
.data-table tbody tr { transition: background 0.12s; }
.data-table tbody tr:hover { background: var(--bg-tertiary); }

/* ===== BADGES ===== */
.badge {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 3px 10px; border-radius: 20px; font-size: 11px; font-weight: 600;
}
.badge.green { background: var(--accent-dim); color: var(--accent); }
.badge.blue { background: var(--blue-dim); color: var(--blue); }
.badge.purple { background: var(--purple-dim); color: var(--purple); }
.badge.amber { background: var(--amber-dim); color: var(--amber); }
.badge.red { background: var(--red-dim); color: var(--red); }
.badge.gray { background: rgba(79,88,114,0.15); color: var(--text-muted); }

.status-dot {
  width: 7px; height: 7px; border-radius: 50%; display: inline-block; flex-shrink: 0;
}
.status-dot.green { background: var(--accent); box-shadow: 0 0 6px var(--accent-glow); }
.status-dot.amber { background: var(--amber); box-shadow: 0 0 6px rgba(244,162,97,0.3); }
.status-dot.red { background: var(--red); box-shadow: 0 0 6px rgba(230,57,70,0.3); }
.status-dot.gray { background: var(--text-muted); }

/* ===== BUTTONS ===== */
.btn {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 8px 18px; border-radius: var(--radius); font-size: 13px;
  font-family: 'DM Sans', sans-serif; font-weight: 500;
  cursor: pointer; transition: all 0.15s; border: 1px solid var(--border);
  background: var(--bg-tertiary); color: var(--text-secondary);
}
.btn:hover { background: var(--bg-elevated); color: var(--text-primary); border-color: var(--border-light); }
.btn.primary {
  background: var(--accent); border-color: var(--accent); color: #0a0c10;
  font-weight: 600; box-shadow: 0 2px 12px var(--accent-glow);
}
.btn.primary:hover { box-shadow: 0 4px 20px var(--accent-glow); filter: brightness(1.1); }
.btn.danger { background: var(--red-dim); border-color: rgba(230,57,70,0.3); color: var(--red); }
.btn.danger:hover { background: rgba(230,57,70,0.2); }
.btn.sm { padding: 5px 12px; font-size: 12px; }
.btn.icon-only { padding: 6px; width: 32px; height: 32px; justify-content: center; }

/* ===== FORMS ===== */
.form-group { margin-bottom: 16px; }
.form-label {
  display: block; font-size: 12px; font-weight: 600; color: var(--text-muted);
  margin-bottom: 6px; text-transform: uppercase; letter-spacing: 0.5px;
}
.form-input {
  width: 100%; padding: 10px 14px; border-radius: var(--radius);
  background: var(--bg-tertiary); border: 1px solid var(--border);
  color: var(--text-primary); font-family: 'DM Sans', sans-serif;
  font-size: 14px; outline: none; transition: all 0.2s;
}
.form-input:focus {
  border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-dim);
}
.form-input::placeholder { color: var(--text-muted); }
.form-input.mono { font-family: 'JetBrains Mono', monospace; font-size: 13px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.form-select {
  width: 100%; padding: 10px 14px; border-radius: var(--radius);
  background: var(--bg-tertiary); border: 1px solid var(--border);
  color: var(--text-primary); font-family: 'DM Sans', sans-serif;
  font-size: 14px; outline: none; cursor: pointer; transition: all 0.2s;
  appearance: none; -webkit-appearance: none;
  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='%234f5872' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 12px center;
}
.form-select:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-dim); }

/* ===== TOGGLE ===== */
.toggle {
  width: 40px; height: 22px; border-radius: 11px;
  background: var(--bg-elevated); border: 1px solid var(--border);
  cursor: pointer; position: relative; transition: all 0.2s;
}
.toggle.on { background: var(--accent); border-color: var(--accent); box-shadow: 0 0 8px var(--accent-glow); }
.toggle::after {
  content: ''; width: 16px; height: 16px; border-radius: 50%;
  background: white; position: absolute; top: 2px; left: 2px;
  transition: transform 0.2s cubic-bezier(0.2, 0, 0, 1);
  box-shadow: 0 1px 3px rgba(0,0,0,0.3);
}
.toggle.on::after { transform: translateX(18px); }

/* ===== MODAL ===== */
.modal-overlay {
  position: fixed; inset: 0; background: rgba(0,0,0,0.7);
  backdrop-filter: blur(8px); z-index: 1000;
  display: flex; align-items: center; justify-content: center;
  animation: fade-in 0.2s ease;
}
.modal-panel {
  background: var(--bg-secondary); border: 1px solid var(--border);
  border-radius: var(--radius-xl); width: 90%; max-width: 600px;
  max-height: 85vh; display: flex; flex-direction: column;
  box-shadow: var(--shadow-lg); animation: slide-up 0.25s cubic-bezier(0.2, 0, 0, 1);
}
.modal-header {
  padding: 20px 24px 16px; border-bottom: 1px solid var(--border);
  display: flex; align-items: center; justify-content: space-between;
}
.modal-body { padding: 20px 24px; overflow-y: auto; flex: 1; }
.modal-footer {
  padding: 16px 24px; border-top: 1px solid var(--border);
  display: flex; justify-content: flex-end; gap: 8px;
}

/* ===== TOAST ===== */
.toast-container {
  position: fixed; bottom: 20px; right: 20px; z-index: 9999;
  display: flex; flex-direction: column; gap: 8px;
}
.toast {
  padding: 12px 16px; border-radius: var(--radius);
  font-size: 13px; min-width: 280px; max-width: 380px;
  animation: slide-up 0.3s cubic-bezier(0.2, 0, 0, 1);
  position: relative; overflow: hidden;
  background: var(--bg-elevated); border: 1px solid var(--border);
  box-shadow: var(--shadow-lg); display: flex; align-items: center; gap: 10;
}
.toast-progress {
  position: absolute; bottom: 0; left: 0; height: 2px;
  animation: toast-progress 4s linear forwards;
}

/* ===== SEARCH ===== */
.search-box {
  position: relative; max-width: 320px;
}
.search-box input {
  width: 100%; padding: 8px 14px 8px 36px; border-radius: var(--radius);
  background: var(--bg-tertiary); border: 1px solid var(--border);
  color: var(--text-primary); font-family: 'DM Sans', sans-serif;
  font-size: 13px; outline: none; transition: all 0.2s;
}
.search-box input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-dim); }
.search-box input::placeholder { color: var(--text-muted); }
.search-box svg {
  position: absolute; left: 11px; top: 50%; transform: translateY(-50%);
  color: var(--text-muted); pointer-events: none;
}

/* ===== TABS ===== */
.tab-bar { display: flex; gap: 2px; padding: 0 0 0; }
.tab-btn {
  padding: 8px 16px; border-radius: var(--radius) var(--radius) 0 0;
  font-size: 13px; font-weight: 500; cursor: pointer;
  border: none; background: transparent; color: var(--text-muted);
  font-family: 'DM Sans', sans-serif; transition: all 0.15s;
  border-bottom: 2px solid transparent;
}
.tab-btn.active { color: var(--accent); border-bottom-color: var(--accent); background: var(--accent-dim); }
.tab-btn:hover:not(.active) { color: var(--text-secondary); background: var(--bg-tertiary); }

/* ===== EMPTY STATE ===== */
.empty-state {
  text-align: center; padding: 60px 24px; color: var(--text-muted);
  display: flex; flex-direction: column; align-items: center; gap: 12;
}
.empty-state svg { opacity: 0.3; }

/* ===== DETAIL PANEL ===== */
.detail-panel {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius-lg); overflow: hidden;
}
.detail-header {
  padding: 20px 24px; border-bottom: 1px solid var(--border);
  display: flex; align-items: center; gap: 16;
}
.detail-body { padding: 20px 24px; }
.detail-section { margin-bottom: 24px; }
.detail-section-title {
  font-size: 12px; font-weight: 700; text-transform: uppercase;
  letter-spacing: 1px; color: var(--text-muted); margin-bottom: 12px;
  display: flex; align-items: center; gap: 8;
}

/* ===== SOFTPHONE ===== */
.softphone-call-screen {
  max-width: 500px; margin: 0 auto;
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius-xl); overflow: hidden;
  animation: slide-up 0.3s cubic-bezier(0.2, 0, 0, 1);
}
.video-call-area {
  position: relative; width: 100%; height: 280px;
  background: var(--bg-primary); border-bottom: 1px solid var(--border);
}
.video-remote {
  width: 100%; height: 100%;
  background: linear-gradient(135deg, #0a0e1a 0%, #1a1f2e 100%);
  display: flex; align-items: center; justify-content: center;
}
.video-self {
  position: absolute; bottom: 12px; right: 12px;
  width: 100px; height: 75px; border-radius: var(--radius);
  background: var(--bg-elevated); border: 2px solid var(--border);
  overflow: hidden;
}
.call-pulse {
  width: 12px; height: 12px; border-radius: 50%;
  background: var(--accent); margin: 16px auto 0;
  animation: pulse-glow 1.5s infinite;
}
.call-controls {
  display: flex; align-items: center; justify-content: center; gap: 12px;
  padding: 24px 20px; flex-wrap: wrap;
}
.call-btn {
  width: 52px; height: 52px; border-radius: 50%; border: none;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; transition: all 0.15s;
}
.call-btn.big { width: 60px; height: 60px; }
.call-btn.answer {
  background: linear-gradient(135deg, #00e5a0, #04b386);
  box-shadow: 0 4px 16px rgba(0, 229, 160, 0.3);
}
.call-btn.answer:hover { box-shadow: 0 4px 24px rgba(0, 229, 160, 0.5); transform: scale(1.05); }
.call-btn.answer:disabled { opacity: 0.4; cursor: not-allowed; transform: none; box-shadow: none; }
.call-btn.reject {
  background: linear-gradient(135deg, #e63946, #c0303c);
  box-shadow: 0 4px 16px rgba(230, 57, 70, 0.3);
}
.call-btn.reject:hover { box-shadow: 0 4px 24px rgba(230, 57, 70, 0.5); transform: scale(1.05); }
.call-btn.video-call {
  background: linear-gradient(135deg, #4cc9f0, #3ba8cc);
  box-shadow: 0 4px 16px rgba(76, 201, 240, 0.3);
}
.call-btn.video-call:hover { box-shadow: 0 4px 24px rgba(76, 201, 240, 0.5); transform: scale(1.05); }
.call-btn.video-call:disabled { opacity: 0.4; cursor: not-allowed; transform: none; box-shadow: none; }
.call-action-btn {
  display: flex; flex-direction: column; align-items: center; gap: 4;
  padding: 10px 14px; border-radius: var(--radius); border: none;
  background: var(--bg-tertiary); color: var(--text-secondary);
  cursor: pointer; font-family: 'DM Sans', sans-serif; font-size: 10px;
  transition: all 0.15s; min-width: 56px;
}
.call-action-btn:hover { background: var(--bg-elevated); color: var(--text-primary); }
.call-action-btn.active { background: var(--accent-dim); color: var(--accent); }

/* Softphone Dialer */
.softphone-dialer {
  width: 320px; flex-shrink: 0;
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius-xl); overflow: hidden; padding: 20px;
}
.dial-display {
  position: relative; margin-bottom: 20px;
}
.dial-input {
  width: 100%; padding: 14px 40px 14px 16px;
  background: var(--bg-tertiary); border: 1px solid var(--border);
  border-radius: var(--radius-lg); color: var(--text-primary);
  font-family: 'JetBrains Mono', monospace; font-size: 22px;
  font-weight: 600; text-align: center; outline: none;
  letter-spacing: 2px; transition: all 0.2s;
}
.dial-input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-dim); }
.dial-input::placeholder { font-size: 14px; letter-spacing: 0; font-weight: 400; }
.dial-pad {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px;
  margin-bottom: 20px;
}
.dial-key {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  height: 56px; border-radius: var(--radius); border: 1px solid var(--border);
  background: var(--bg-tertiary); cursor: pointer;
  transition: all 0.1s; font-family: 'DM Sans', sans-serif;
}
.dial-key:hover { background: var(--bg-elevated); border-color: var(--border-light); }
.dial-key:active { background: var(--accent-dim); border-color: var(--accent); transform: scale(0.95); }
.dial-key-num { font-size: 20px; font-weight: 700; color: var(--text-primary); line-height: 1; }
.dial-key-label { font-size: 8px; font-weight: 600; color: var(--text-muted); letter-spacing: 2px; margin-top: 1px; }
.dial-actions {
  display: flex; align-items: center; justify-content: center; gap: 16px;
}
.dial-backspace {
  width: 40px; height: 40px; border-radius: 50%; border: none;
  background: var(--bg-tertiary); color: var(--text-muted);
  cursor: pointer; display: flex; align-items: center; justify-content: center;
  transition: all 0.15s;
}
.dial-backspace:hover { background: var(--bg-elevated); color: var(--text-primary); }

/* ===== CHAT ===== */
.chat-layout {
  display: grid; grid-template-columns: 280px 1fr; gap: 0;
  height: calc(100vh - 200px); min-height: 500px;
  border: 1px solid var(--border); border-radius: var(--radius-xl);
  overflow: hidden; background: var(--bg-card);
}
.chat-contacts {
  border-right: 1px solid var(--border);
  display: flex; flex-direction: column; overflow: hidden;
  background: var(--bg-secondary);
}
.chat-contacts-list {
  flex: 1; overflow-y: auto;
}
.chat-contact-item {
  display: flex; align-items: center; gap: 10; padding: 10px 16px;
  cursor: pointer; transition: background 0.12s; border-bottom: 1px solid var(--border);
}
.chat-contact-item:hover { background: var(--bg-tertiary); }
.chat-contact-item.active { background: var(--accent-dim); }
.chat-area {
  display: flex; flex-direction: column; overflow: hidden;
}
.chat-area-header {
  display: flex; align-items: center; gap: 12; padding: 12px 20px;
  border-bottom: 1px solid var(--border); flex-shrink: 0;
  background: rgba(15, 18, 25, 0.5);
}
.chat-messages {
  flex: 1; overflow-y: auto; padding: 16px 20px;
  display: flex; flex-direction: column; gap: 8;
}
.chat-msg {
  display: flex; flex-direction: column; max-width: 70%;
}
.chat-msg.sent { align-self: flex-end; align-items: flex-end; }
.chat-msg.received { align-self: flex-start; align-items: flex-start; }
.chat-bubble {
  padding: 8px 14px; border-radius: 16px; font-size: 13.5px;
  line-height: 1.4; word-break: break-word;
}
.chat-msg.sent .chat-bubble {
  background: linear-gradient(135deg, var(--accent), #04b386);
  color: #0a0c10; border-bottom-right-radius: 4px;
}
.chat-msg.received .chat-bubble {
  background: var(--bg-elevated); color: var(--text-primary);
  border-bottom-left-radius: 4px;
}
.chat-time {
  font-size: 10px; color: var(--text-muted); margin-top: 2px; padding: 0 4px;
}
.chat-input-area {
  display: flex; align-items: center; gap: 8; padding: 12px 16px;
  border-top: 1px solid var(--border); flex-shrink: 0;
}
.chat-input {
  flex: 1; padding: 10px 16px; border-radius: 20px;
  background: var(--bg-tertiary); border: 1px solid var(--border);
  color: var(--text-primary); font-family: 'DM Sans', sans-serif;
  font-size: 13.5px; outline: none; transition: all 0.2s;
}
.chat-input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-dim); }
.chat-input::placeholder { color: var(--text-muted); }

@keyframes ring-pulse {
  0%, 100% { transform: rotate(0deg); }
  10%, 30%, 50%, 70%, 90% { transform: rotate(-8deg); }
  20%, 40%, 60%, 80% { transform: rotate(8deg); }
}

/* ===== RESPONSIVE ===== */
@media (max-width: 900px) {
  .sidebar { width: 64px; }
  .sidebar .nav-btn span:not(.nav-badge),
  .sidebar .sidebar-brand span,
  .sidebar .nav-section-label,
  .sidebar .sidebar-footer span { display: none; }
  .sidebar .nav-btn { justify-content: center; padding: 10px; }
  .sidebar .sidebar-brand { justify-content: center; padding: 16px 8px; }
  .sidebar .sidebar-footer { padding: 8px; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .form-row { grid-template-columns: 1fr; }
}
/* ===== DEBUG LOG ===== */
.debug-log {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11.5px; line-height: 1.7;
  background: #050709; border: 1px solid var(--border);
  border-radius: var(--radius); padding: 16px;
  max-height: 380px; overflow-y: auto;
  color: var(--text-secondary);
}
.debug-line { display: flex; gap: 8px; }
.debug-line .ts { color: var(--text-muted); flex-shrink: 0; }
.debug-line .lvl { font-weight: 700; flex-shrink: 0; min-width: 44px; }
.debug-line .lvl.info { color: var(--blue); }
.debug-line .lvl.warn { color: var(--amber); }
.debug-line .lvl.err { color: var(--red); }
.debug-line .lvl.ok { color: var(--accent); }
.debug-line .msg { color: var(--text-secondary); word-break: break-all; }

/* ===== SUBSCRIPTION BADGE ===== */
.sub-status {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 4px 12px; border-radius: 20px; font-size: 11px; font-weight: 700;
  letter-spacing: 0.3px;
}
.sub-status.active { background: var(--accent-dim); color: var(--accent); border: 1px solid rgba(0,229,160,0.2); }
.sub-status.trial { background: var(--blue-dim); color: var(--blue); border: 1px solid rgba(56,189,248,0.2); }
.sub-status.overdue { background: var(--amber-dim); color: var(--amber); border: 1px solid rgba(251,146,60,0.2); }
.sub-status.cancelled { background: var(--red-dim); color: var(--red); border: 1px solid rgba(239,68,68,0.2); }

@media (max-width: 600px) {
  .sidebar { display: none; }
  .page-content { padding: 16px; }
  .stats-grid { grid-template-columns: 1fr; }
  .top-bar { padding: 0 16px; }
  .data-table { font-size: 12px; }
  .data-table th, .data-table td { padding: 8px 10px; }
  .chat-layout { grid-template-columns: 1fr; height: calc(100vh - 180px); }
  .chat-contacts { display: none; }
  .softphone-dialer { width: 100%; }
}