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

:root {
  --bg-space: #030712;
  --bg-deep: #060b18;
  
  /* Cyber Glassmorphic Chassis */
  --card-bg: linear-gradient(180deg, rgba(13, 20, 38, 0.85) 0%, rgba(6, 10, 24, 0.96) 100%);
  --card-border: rgba(56, 189, 248, 0.22);
  --card-border-glow: rgba(0, 240, 255, 0.4);
  
  /* Neon Palette */
  --neon-cyan: #00f0ff;
  --neon-blue: #38bdf8;
  --neon-emerald: #00e676;
  --neon-emerald-glow: rgba(0, 230, 118, 0.45);
  --neon-purple: #a855f7;
  --neon-magenta: #ec4899;
  --neon-orange: #f59e0b;
  --neon-red: #ef4444;
  
  --text-main: #f8fafc;
  --text-muted: #94a3b8;
  --text-dim: #64748b;
  
  /* Typography */
  --font-ui: 'Outfit', 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-mono: 'JetBrains Mono', monospace;
  --font-heading: 'Space Grotesk', 'Outfit', sans-serif;
  
  /* Shadows & Depth */
  --shadow-cyber: 0 30px 80px -15px rgba(0, 0, 0, 0.95), 0 0 50px rgba(0, 240, 255, 0.08), inset 0 1px 0 rgba(255, 255, 255, 0.15);
  --shadow-glow-cyan: 0 0 25px rgba(0, 240, 255, 0.35);
  --shadow-glow-green: 0 0 25px rgba(0, 230, 118, 0.45);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  user-select: none;
}

body {
  background-color: var(--bg-space);
  background: radial-gradient(circle at 50% 10%, rgba(56, 189, 248, 0.14) 0%, transparent 45%),
              radial-gradient(circle at 15% 85%, rgba(168, 85, 247, 0.12) 0%, transparent 40%),
              radial-gradient(circle at 85% 90%, rgba(0, 230, 118, 0.09) 0%, transparent 40%),
              #030712;
  color: var(--text-main);
  font-family: var(--font-ui);
  min-height: 100vh;
  overflow-x: hidden;
  display: flex;
  justify-content: center;
  align-items: center;
  position: relative;
}

/* 3D Canvas Background */
#bg-canvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: 0;
  pointer-events: none;
}

/* App Viewport Container */
.app-container {
  position: relative;
  z-index: 10;
  width: 100%;
  max-width: 430px;
  margin: 16px auto;
  padding: 10px;
}

/* ========================================================
   DIALER CARD (High-End Cyber Glassmorphic Chassis)
======================================================== */
.dialer-card {
  background: var(--card-bg);
  backdrop-filter: blur(32px);
  -webkit-backdrop-filter: blur(32px);
  border: 1px solid var(--card-border);
  border-radius: 28px;
  padding: 18px 20px;
  box-shadow: var(--shadow-cyber);
  display: flex;
  flex-direction: column;
  gap: 13px;
  position: relative;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Top User Header Bar */
.user-header-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  background: rgba(13, 22, 42, 0.75);
  border: 1px solid rgba(56, 189, 248, 0.18);
  border-radius: 18px;
  padding: 8px 12px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.user-profile-left {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.user-avatar-badge {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: linear-gradient(135deg, #0ea5e9, #6366f1);
  color: #ffffff;
  font-weight: 800;
  font-size: 13px;
  font-family: var(--font-heading);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 14px rgba(14, 165, 233, 0.5);
  border: 2px solid rgba(255, 255, 255, 0.35);
  letter-spacing: 0.5px;
  flex-shrink: 0;
}

.user-meta-stack {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.user-main-name {
  font-weight: 700;
  font-size: 13.5px;
  color: var(--text-main);
  letter-spacing: 0.3px;
  font-family: var(--font-heading);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.user-provider-chip {
  font-size: 9px;
  font-family: var(--font-mono);
  font-weight: 700;
  color: var(--neon-cyan);
  background: rgba(0, 240, 255, 0.1);
  border: 1px solid rgba(0, 240, 255, 0.22);
  padding: 1px 5px;
  border-radius: 5px;
  width: fit-content;
  text-transform: uppercase;
  letter-spacing: 0.4px;
}

.user-header-right {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

.online-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background-color: var(--neon-emerald);
  box-shadow: 0 0 10px var(--neon-emerald);
  display: inline-block;
  animation: pulse-dot 2s infinite;
  flex-shrink: 0;
}

@keyframes pulse-dot {
  0%, 100% { transform: scale(1); opacity: 1; box-shadow: 0 0 8px var(--neon-emerald); }
  50% { transform: scale(1.3); opacity: 0.7; box-shadow: 0 0 16px var(--neon-emerald); }
}

.status-badge-registered {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 10.5px;
  font-family: var(--font-mono);
  font-weight: 700;
  color: var(--neon-emerald);
  background: rgba(0, 230, 118, 0.12);
  border: 1px solid rgba(0, 230, 118, 0.35);
  padding: 3px 8px;
  border-radius: 10px;
  box-shadow: 0 0 10px rgba(0, 230, 118, 0.2);
  white-space: nowrap;
  flex-shrink: 0;
}

.btn-logout-pill {
  background: rgba(239, 68, 68, 0.1);
  border: 1px solid rgba(239, 68, 68, 0.4);
  color: #fca5a5;
  font-size: 10.5px;
  font-family: var(--font-mono);
  font-weight: 700;
  padding: 3px 9px;
  border-radius: 10px;
  cursor: pointer;
  white-space: nowrap;
  flex-shrink: 0;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.btn-logout-pill:hover {
  background: rgba(239, 68, 68, 0.25);
  border-color: var(--neon-red);
  color: #ffffff;
  box-shadow: 0 0 12px rgba(239, 68, 68, 0.45);
  transform: translateY(-1px);
}

.btn-expand-icon {
  background: transparent;
  border: none;
  color: var(--text-dim);
  cursor: pointer;
  font-size: 13px;
  padding: 2px 4px;
  flex-shrink: 0;
  transition: color 0.2s, transform 0.2s;
}
.btn-expand-icon:hover {
  color: var(--neon-cyan);
  transform: scale(1.15);
}

/* ========================================================
   MIC PERMISSION BANNER
======================================================== */
.mic-banner-box {
  display: none;
  background: rgba(56, 189, 248, 0.1);
  border: 1px solid rgba(56, 189, 248, 0.3);
  border-radius: 14px;
  padding: 8px 12px;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.mic-banner-left {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 11.5px;
  color: #38bdf8;
  font-family: var(--font-mono);
}

.mic-icon-pulse {
  font-size: 14px;
  animation: pulse-dot 1.5s infinite;
}

.btn-allow-mic {
  background: linear-gradient(135deg, #00e676, #059669);
  border: none;
  color: #042f1d;
  padding: 4px 10px;
  border-radius: 8px;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.2s;
}

.btn-allow-mic:hover {
  box-shadow: 0 0 12px rgba(0, 230, 118, 0.5);
  transform: scale(1.04);
}

/* ========================================================
   QUICK ACTION PILLS ROW (LOGS | IVR | CONFIG | DEBUG)
======================================================== */
.action-pills-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 7px;
}

.pill-action-btn {
  background: linear-gradient(145deg, rgba(22, 33, 54, 0.8) 0%, rgba(12, 19, 36, 0.9) 100%);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  padding: 8px 4px;
  color: var(--text-main);
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.5px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.pill-action-btn svg {
  transition: transform 0.2s, stroke 0.2s;
}

.pill-action-btn.call-log-btn {
  border-color: rgba(244, 63, 94, 0.35);
  color: #fb7185;
}
.pill-action-btn.call-log-btn:hover {
  background: linear-gradient(145deg, rgba(244, 63, 94, 0.2) 0%, rgba(13, 20, 38, 0.95) 100%);
  border-color: #f43f5e;
  box-shadow: 0 0 16px rgba(244, 63, 94, 0.35);
  transform: translateY(-2px);
}

.pill-action-btn.ivr-btn {
  border-color: rgba(245, 158, 11, 0.35);
  color: #fbbf24;
}
.pill-action-btn.ivr-btn:hover {
  background: linear-gradient(145deg, rgba(245, 158, 11, 0.2) 0%, rgba(13, 20, 38, 0.95) 100%);
  border-color: #f59e0b;
  box-shadow: 0 0 16px rgba(245, 158, 11, 0.35);
  transform: translateY(-2px);
}

.pill-action-btn.settings-btn {
  border-color: rgba(56, 189, 248, 0.35);
  color: #38bdf8;
}
.pill-action-btn.settings-btn:hover {
  background: linear-gradient(145deg, rgba(56, 189, 248, 0.2) 0%, rgba(13, 20, 38, 0.95) 100%);
  border-color: #38bdf8;
  box-shadow: 0 0 16px rgba(56, 189, 248, 0.35);
  transform: translateY(-2px);
}

.pill-action-btn.debug-btn {
  border-color: rgba(245, 158, 11, 0.35);
  color: #fbbf24;
}
.pill-action-btn.debug-btn:hover {
  background: linear-gradient(145deg, rgba(245, 158, 11, 0.2) 0%, rgba(13, 20, 38, 0.95) 100%);
  border-color: #fbbf24;
  box-shadow: 0 0 16px rgba(245, 158, 11, 0.35);
  transform: translateY(-2px);
}

/* ========================================================
   CALLER ID (CID) ROW
======================================================= */
.cid-bar-container {
  display: flex;
  align-items: center;
  background: rgba(11, 18, 35, 0.85);
  border: 1px solid rgba(245, 158, 11, 0.35);
  border-radius: 14px;
  padding: 7px 12px;
  gap: 10px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05);
  transition: border-color 0.2s, box-shadow 0.2s;
}

.cid-bar-container:focus-within {
  border-color: var(--neon-orange);
  box-shadow: 0 0 16px rgba(245, 158, 11, 0.3);
}

.cid-label-badge {
  font-family: var(--font-mono);
  font-size: 10.5px;
  font-weight: 800;
  color: #f59e0b;
  letter-spacing: 1px;
  background: rgba(245, 158, 11, 0.12);
  padding: 2px 6px;
  border-radius: 6px;
  flex-shrink: 0;
}

.cid-input-field {
  background: transparent;
  border: none;
  outline: none;
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 600;
  color: #fef08a;
  width: 100%;
  letter-spacing: 0.5px;
}

.cid-input-field::placeholder {
  color: rgba(245, 158, 11, 0.45);
}

/* ========================================================
   STATUS INDICATOR LINE & VISUALIZER
======================================================== */
.status-visualizer-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 2px;
}

.status-indicator-line {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 11.5px;
  font-weight: 600;
  color: var(--neon-emerald);
}

.status-indicator-line.in-call {
  color: #38bdf8;
}

.status-indicator-line.ringing {
  color: #f59e0b;
}

.status-indicator-line.held {
  color: #a855f7;
}

.live-wave-container {
  display: flex;
  align-items: center;
  gap: 3px;
  height: 16px;
}

.wave-bar {
  width: 3px;
  border-radius: 2px;
}
.wb-1 { height: 8px; background: #00e676; animation: wave-anim 0.8s infinite 0.1s; }
.wb-2 { height: 16px; background: #00f0ff; animation: wave-anim 0.8s infinite 0.3s; }
.wb-3 { height: 12px; background: #a855f7; animation: wave-anim 0.8s infinite 0.2s; }
.wb-4 { height: 6px; background: #00e676; animation: wave-anim 0.8s infinite 0.4s; }

@keyframes wave-anim {
  0%, 100% { transform: scaleY(0.4); opacity: 0.6; }
  50% { transform: scaleY(1.2); opacity: 1; }
}

/* ========================================================
   LCD NUMBER DISPLAY & BACKSPACE
======================================================== */
.dialer-display-box {
  background: linear-gradient(180deg, #020614 0%, #060e22 100%);
  border: 1px solid rgba(0, 240, 255, 0.28);
  border-radius: 18px;
  padding: 10px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  position: relative;
  min-height: 58px;
  box-shadow: inset 0 2px 12px rgba(0, 0, 0, 0.9), 0 0 18px rgba(0, 240, 255, 0.06);
}

.dial-number-input {
  background: transparent;
  border: none;
  outline: none;
  font-family: var(--font-mono);
  font-size: 24px;
  font-weight: 700;
  color: #ffffff;
  width: 100%;
  letter-spacing: 1.5px;
  text-shadow: 0 0 10px rgba(255, 255, 255, 0.35);
}

.dial-number-input::placeholder {
  color: rgba(255, 255, 255, 0.18);
  font-weight: 400;
  font-size: 18px;
}

.btn-backspace {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 10px;
  color: var(--text-muted);
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
  transition: all 0.2s;
}

.btn-backspace:hover {
  background: rgba(239, 68, 68, 0.2);
  border-color: var(--neon-red);
  color: #ffffff;
  box-shadow: 0 0 12px rgba(239, 68, 68, 0.4);
}

/* DTMF Indicator Bar */
.dtmf-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(4, 11, 24, 0.85);
  border: 1px solid rgba(0, 230, 118, 0.25);
  border-radius: 12px;
  padding: 5px 12px;
  font-family: var(--font-mono);
  font-size: 10.5px;
  color: var(--neon-emerald);
  box-shadow: inset 0 1px 4px rgba(0, 0, 0, 0.6);
}

.dtmf-bar strong {
  color: #ffffff;
  margin-left: 6px;
}

.dtmf-right-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.dtmf-dot {
  width: 5px;
  height: 5px;
}

.dtmf-copy-btn,
.dtmf-clear-btn {
  background: transparent;
  border: none;
  color: var(--text-dim);
  cursor: pointer;
  font-size: 11.5px;
  line-height: 1;
  padding: 2px 4px;
  border-radius: 4px;
  transition: all 0.15s ease;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}
.dtmf-copy-btn:hover {
  color: var(--neon-cyan);
  background: rgba(0, 240, 255, 0.1);
}
.dtmf-clear-btn:hover {
  color: var(--neon-red);
  background: rgba(239, 68, 68, 0.1);
}

/* ========================================================
   KEYPAD MATRIX (3x4)
======================================================== */
.keypad-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(6px, 1.2vh, 10px);
}

.key-btn {
  height: clamp(48px, 6.6vh, 60px);
  background: linear-gradient(180deg, rgba(28, 39, 62, 0.75) 0%, rgba(14, 21, 38, 0.9) 100%);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-bottom: 2px solid rgba(0, 240, 255, 0.2);
  border-radius: clamp(12px, 2vh, 16px);
  padding: 3px 6px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  transition: all 0.15s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.1);
  position: relative;
  overflow: hidden;
}

.key-btn:hover {
  background: linear-gradient(180deg, rgba(56, 189, 248, 0.2) 0%, rgba(15, 24, 44, 0.95) 100%);
  border-color: var(--neon-cyan);
  border-bottom: 2px solid var(--neon-cyan);
  box-shadow: 0 0 16px rgba(0, 240, 255, 0.35);
  transform: translateY(-2px);
}

.key-btn:active, .key-btn.active-press {
  background: rgba(0, 240, 255, 0.25);
  border-color: var(--neon-cyan);
  box-shadow: 0 0 22px rgba(0, 240, 255, 0.55), inset 0 2px 6px rgba(0, 240, 255, 0.4);
  transform: translateY(2px) scale(0.97);
}

.key-digit {
  font-size: 21px;
  font-weight: 700;
  color: #ffffff;
  line-height: 1.1;
  font-family: var(--font-mono);
}

.key-sub {
  font-size: 9px;
  font-weight: 700;
  color: #38bdf8;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  margin-top: 1px;
  font-family: var(--font-mono);
  height: 11px;
  line-height: 11px;
}

/* ========================================================
   GIANT CALL BUTTON
======================================================== */
.call-btn-container {
  margin-top: 2px;
}

.btn-main-call {
  width: 100%;
  background: linear-gradient(135deg, #00e676, #059669);
  border: none;
  border-radius: 16px;
  padding: 15px 20px;
  color: #042f1d;
  font-family: var(--font-mono);
  font-size: 15px;
  font-weight: 800;
  letter-spacing: 2px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  cursor: pointer;
  box-shadow: 0 6px 25px rgba(0, 230, 118, 0.45), inset 0 1px 1px rgba(255, 255, 255, 0.6);
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
  overflow: hidden;
}

.btn-main-call:hover {
  background: linear-gradient(135deg, #10b981, #00e676);
  box-shadow: 0 8px 32px rgba(0, 230, 118, 0.65);
  transform: translateY(-2px);
}

.btn-main-call:active {
  transform: translateY(1px) scale(0.98);
}

/* Active In-Call End Button Mode */
.btn-main-call.in-call-active {
  background: linear-gradient(135deg, #ef4444, #b91c1c) !important;
  color: #ffffff !important;
  box-shadow: 0 8px 30px rgba(239, 68, 68, 0.65), inset 0 1px 1px rgba(255, 255, 255, 0.4) !important;
  animation: pulse-end-btn 1.6s infinite;
}

.btn-main-call.in-call-active:hover {
  background: linear-gradient(135deg, #f87171, #dc2626) !important;
  color: #ffffff !important;
  box-shadow: 0 10px 40px rgba(239, 68, 68, 0.9) !important;
  transform: translateY(-2px);
}

@keyframes pulse-end-btn {
  0%, 100% { box-shadow: 0 0 20px rgba(239, 68, 68, 0.5); }
  50% { box-shadow: 0 0 42px rgba(239, 68, 68, 0.95); transform: scale(1.02); }
}

/* ========================================================
   IN-CALL CONTROLS BAR (HOLD | MUTE | TRANSFER)
======================================================== */
.in-call-controls-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 2px;
}

.in-call-action-btn {
  background: rgba(14, 22, 40, 0.7);
  border: 1px solid rgba(56, 189, 248, 0.18);
  border-radius: 14px;
  padding: 9px 4px;
  color: var(--text-muted);
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.5px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  cursor: pointer;
  transition: all 0.2s;
}

.in-call-action-btn:hover {
  background: rgba(56, 189, 248, 0.15);
  color: var(--neon-cyan);
  border-color: var(--neon-cyan);
  box-shadow: 0 0 12px rgba(0, 240, 255, 0.25);
}

.in-call-action-btn.active {
  background: rgba(168, 85, 247, 0.25);
  border-color: var(--neon-purple);
  color: #c084fc;
  box-shadow: 0 0 16px rgba(168, 85, 247, 0.45);
}

/* Footer Tag */
.dialer-footer-tag {
  text-align: center;
  font-family: var(--font-mono);
  font-size: 10px;
  color: rgba(0, 230, 118, 0.75);
  letter-spacing: 0.5px;
  margin-top: 2px;
  text-shadow: 0 0 8px rgba(0, 230, 118, 0.25);
}

/* ========================================================
   MODAL DIALOGS (SETTINGS, IVR, CALL LOGS, DIAGNOSTICS)
======================================================== */
.modal-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(3, 7, 18, 0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}

.modal-backdrop.open {
  opacity: 1;
  pointer-events: auto;
}

.cyber-modal-card {
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.95) 0%, rgba(6, 11, 26, 0.98) 100%);
  border: 1px solid rgba(0, 240, 255, 0.35);
  border-radius: 24px;
  width: 100%;
  max-width: 480px;
  max-height: 90vh;
  overflow-y: auto;
  padding: 24px;
  box-shadow: 0 25px 70px rgba(0, 0, 0, 0.9), 0 0 40px rgba(0, 240, 255, 0.15);
  display: flex;
  flex-direction: column;
  gap: 16px;
  animation: modal-pop 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes modal-pop {
  from { transform: scale(0.92) translateY(10px); opacity: 0; }
  to { transform: scale(1) translateY(0); opacity: 1; }
}

.modal-header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  padding-bottom: 12px;
}

.modal-title {
  font-family: var(--font-heading);
  font-size: 15px;
  font-weight: 700;
  color: var(--neon-cyan);
  letter-spacing: 0.5px;
}

.modal-close-btn {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 50%;
  width: 30px;
  height: 30px;
  color: var(--text-muted);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
}
.modal-close-btn:hover {
  background: rgba(239, 68, 68, 0.2);
  border-color: var(--neon-red);
  color: #fff;
}

/* Form controls inside settings & auth */
.form-group-item {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.form-label-row {
  display: flex;
  justify-content: space-between;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-muted);
}

.auth-input-wrapper {
  display: flex;
  align-items: center;
  background: rgba(10, 15, 30, 0.85);
  border: 1px solid rgba(56, 189, 248, 0.22);
  border-radius: 12px;
  padding: 8px 12px;
  gap: 8px;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.auth-input-wrapper:focus-within {
  border-color: var(--neon-cyan);
  box-shadow: 0 0 15px rgba(0, 240, 255, 0.25);
}

.auth-text-field {
  background: transparent;
  border: none;
  outline: none;
  color: #ffffff;
  font-family: var(--font-mono);
  font-size: 13px;
  width: 100%;
}

.btn-auth-submit {
  width: 100%;
  background: linear-gradient(135deg, #0284c7, #00f0ff);
  border: none;
  border-radius: 14px;
  padding: 12px 16px;
  color: #041727;
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 1px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  box-shadow: 0 6px 20px rgba(0, 240, 255, 0.35);
  transition: all 0.2s;
}
.btn-auth-submit:hover {
  box-shadow: 0 8px 25px rgba(0, 240, 255, 0.6);
  transform: translateY(-1px);
}

/* Form controls inside settings & auth */
.cyber-input {
  background: rgba(10, 15, 30, 0.85);
  border: 1px solid rgba(56, 189, 248, 0.22);
  border-radius: 12px;
  padding: 8px 12px;
  color: #ffffff;
  font-family: var(--font-mono);
  font-size: 13px;
  outline: none;
  transition: all 0.2s;
  width: 100%;
}
.cyber-input:focus {
  border-color: var(--neon-cyan);
  box-shadow: 0 0 15px rgba(0, 240, 255, 0.25);
}

.cyber-select {
  background: #0b1124;
  border: 1px solid rgba(56, 189, 248, 0.22);
  border-radius: 12px;
  padding: 8px 12px;
  color: #ffffff;
  font-family: var(--font-mono);
  font-size: 12px;
  outline: none;
  width: 100%;
  cursor: pointer;
}
.cyber-select:focus {
  border-color: var(--neon-cyan);
}

.cyber-range-slider {
  -webkit-appearance: none;
  width: 100%;
  height: 6px;
  border-radius: 4px;
  background: rgba(56, 189, 248, 0.2);
  outline: none;
}
.cyber-range-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--neon-cyan);
  cursor: pointer;
  box-shadow: 0 0 10px var(--neon-cyan);
}

/* Switches & Toggles (Matching Screenshot 2) */
.switch-toggle-wrapper {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.switch {
  position: relative;
  display: inline-block;
  width: 44px;
  height: 24px;
}
.switch input {
  opacity: 0;
  width: 0;
  height: 0;
}
.slider-round {
  position: absolute;
  cursor: pointer;
  top: 0; left: 0; right: 0; bottom: 0;
  background-color: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 24px;
  transition: .3s;
}
.slider-round:before {
  position: absolute;
  content: "";
  height: 16px;
  width: 16px;
  left: 3px;
  bottom: 3px;
  background-color: white;
  border-radius: 50%;
  transition: .3s;
}
input:checked + .slider-round {
  background-color: var(--neon-emerald);
  border-color: var(--neon-emerald);
  box-shadow: 0 0 12px rgba(0, 230, 118, 0.4);
}
input:checked + .slider-round:before {
  transform: translateX(20px);
  background-color: #042f1d;
}

/* Audio Test Row & VU Meter */
.audio-test-row {
  display: flex;
  align-items: center;
  gap: 10px;
  background: rgba(10, 15, 30, 0.6);
  border: 1px solid rgba(56, 189, 248, 0.15);
  border-radius: 14px;
  padding: 10px;
}

.btn-test-audio {
  background: rgba(56, 189, 248, 0.12);
  border: 1px solid rgba(56, 189, 248, 0.35);
  color: var(--neon-cyan);
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  padding: 6px 12px;
  border-radius: 10px;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.2s;
}
.btn-test-audio:hover {
  background: rgba(56, 189, 248, 0.25);
  box-shadow: 0 0 12px rgba(0, 240, 255, 0.3);
}

.vu-meter-bar {
  flex: 1;
  height: 8px;
  background: rgba(0, 0, 0, 0.6);
  border-radius: 4px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.vu-meter-fill {
  width: 0%;
  height: 100%;
  background: linear-gradient(90deg, #00e676, #f59e0b, #ef4444);
  transition: width 0.08s ease;
}

/* IVR Upload Dropzone */
.upload-drop-zone {
  border: 2px dashed rgba(0, 240, 255, 0.35);
  border-radius: 18px;
  background: rgba(10, 15, 30, 0.5);
  padding: 24px 16px;
  text-align: center;
  cursor: pointer;
  transition: all 0.2s;
}
.upload-drop-zone:hover, .upload-drop-zone.dragover {
  border-color: var(--neon-cyan);
  background: rgba(0, 240, 255, 0.08);
  box-shadow: 0 0 25px rgba(0, 240, 255, 0.2);
}

/* Track list cards in IVR */
.track-item-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(15, 23, 42, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  padding: 10px 14px;
  transition: all 0.2s;
}
.track-item-card.active {
  border-color: var(--neon-emerald);
  background: rgba(0, 230, 118, 0.08);
  box-shadow: 0 0 15px rgba(0, 230, 118, 0.18);
}

/* ========================================================
   AUTH & REGISTRATION PORTAL (MATCHING SCREENSHOT 3)
======================================================== */
.auth-page-container {
  position: relative;
  z-index: 10;
  width: 100%;
  max-width: 440px;
  margin: 20px auto;
  padding: 12px;
}

.auth-glass-card {
  background: var(--card-bg);
  backdrop-filter: blur(32px);
  -webkit-backdrop-filter: blur(32px);
  border: 1px solid var(--card-border);
  border-radius: 30px;
  padding: 28px 24px;
  box-shadow: var(--shadow-cyber);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  position: relative;
}

.auth-phone-badge {
  width: 58px;
  height: 58px;
  border-radius: 20px;
  background: linear-gradient(135deg, #0ea5e9 0%, #6366f1 100%);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 25px rgba(14, 165, 233, 0.6), inset 0 1px 1px rgba(255, 255, 255, 0.4);
  border: 2px solid rgba(255, 255, 255, 0.3);
}

.auth-header-block {
  text-align: center;
}

.auth-brand-title {
  font-family: var(--font-heading);
  font-size: 26px;
  font-weight: 800;
  color: #ffffff;
  letter-spacing: 0.5px;
  line-height: 1.1;
}

.auth-brand-subtitle {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--neon-cyan);
  margin-top: 4px;
  letter-spacing: 1px;
}

.auth-tabs-pill {
  width: 100%;
  display: grid;
  grid-template-columns: 1fr 1fr;
  background: rgba(10, 15, 30, 0.85);
  border: 1px solid rgba(56, 189, 248, 0.2);
  border-radius: 16px;
  padding: 4px;
  gap: 4px;
}

.auth-tab-btn {
  background: transparent;
  border: none;
  border-radius: 12px;
  padding: 8px 10px;
  color: var(--text-muted);
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.5px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  cursor: pointer;
  transition: all 0.2s;
}

.auth-tab-btn.active {
  background: linear-gradient(135deg, rgba(56, 189, 248, 0.25), rgba(14, 165, 233, 0.35));
  color: #ffffff;
  border: 1px solid rgba(0, 240, 255, 0.4);
  box-shadow: 0 0 15px rgba(0, 240, 255, 0.3);
}

.auth-sub-desc {
  font-size: 12px;
  color: var(--text-muted);
  text-align: center;
  line-height: 1.4;
}

.auth-providers-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-top: 14px;
  margin-bottom: 4px;
  width: 100%;
}

.provider-pill-badge {
  display: flex;
  align-items: center;
  gap: 6px;
  background: rgba(15, 23, 42, 0.75);
  border: 1px solid rgba(56, 189, 248, 0.2);
  padding: 6px 12px;
  border-radius: 14px;
  font-family: var(--font-mono);
  font-size: 10.5px;
  font-weight: 700;
  color: var(--text-muted);
  letter-spacing: 0.5px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
}

/* Diagnostic Terminal */
.diagnostic-terminal-window {
  background: #020617;
  border: 1px solid rgba(0, 240, 255, 0.3);
  border-radius: 16px;
  padding: 16px;
  font-family: var(--font-mono);
  font-size: 11px;
  line-height: 1.6;
  max-height: 240px;
  overflow-y: auto;
  color: #38bdf8;
  box-shadow: inset 0 0 20px rgba(0, 0, 0, 0.8);
}

.diag-log-entry {
  display: flex;
  gap: 8px;
  word-break: break-all;
}
.diag-log-entry.success { color: #00e676; }
.diag-log-entry.error { color: #ef4444; }
.diag-log-entry.warning { color: #f59e0b; }
.diag-log-entry.header { color: #a855f7; font-weight: 700; }
.diag-log-entry.step { color: #00f0ff; font-weight: 600; }

/* Responsive Constraints & Multi-Device Fluid Adaptation */
@media (max-width: 480px) {
  .app-container {
    max-width: 100%;
    margin: 4px auto;
    padding: 6px;
  }
  .dialer-card {
    padding: 14px 16px;
    border-radius: 24px;
    gap: 10px;
  }
  .user-header-bar {
    padding: 6px 10px;
  }
  .user-avatar-badge {
    width: 32px;
    height: 32px;
    font-size: 12px;
  }
  .user-main-name {
    font-size: 12.5px;
  }
  .action-pills-row {
    gap: 6px;
  }
  .pill-action-btn {
    padding: 6px 2px;
    font-size: 9.5px;
  }
  .dial-number-input {
    font-size: 20px;
  }
  .key-btn {
    height: 52px;
    border-radius: 13px;
  }
  .key-digit {
    font-size: 19px;
  }
  .key-sub {
    font-size: 8px;
  }
  .btn-main-call {
    padding: 13px 18px;
    font-size: 14px;
  }
  .in-call-action-btn {
    padding: 8px 3px;
    font-size: 9.5px;
  }
  .auth-glass-card {
    padding: 22px 18px;
    border-radius: 24px;
    gap: 12px;
  }
}

/* Very compact viewports & mobile devices in landscape */
@media (max-height: 720px) {
  .app-container {
    margin: 2px auto;
    padding: 4px;
  }
  .dialer-card {
    padding: 10px 14px;
    gap: 7px;
    border-radius: 20px;
  }
  .user-header-bar {
    padding: 4px 8px;
  }
  .user-avatar-badge {
    width: 28px;
    height: 28px;
    font-size: 11px;
  }
  .action-pills-row {
    gap: 5px;
  }
  .pill-action-btn {
    padding: 4px 2px;
  }
  .cid-bar-container {
    padding: 4px 8px;
  }
  .dialer-display-box {
    padding: 2px 8px;
  }
  .dial-number-input {
    font-size: 18px;
  }
  .dtmf-bar {
    padding: 3px 8px;
    font-size: 9.5px;
  }
  .key-btn {
    height: 44px;
    padding: 2px 4px;
    border-radius: 11px;
  }
  .key-digit {
    font-size: 17px;
  }
  .key-sub {
    display: none;
  }
  .btn-main-call {
    padding: 10px 16px;
    font-size: 13px;
    border-radius: 12px;
  }
  .in-call-action-btn {
    padding: 6px 2px;
  }
  .dialer-footer-tag {
    font-size: 9px;
    margin-top: 0;
  }
}

/* Modal Responsive Sizing for Mobile & Tablets */
.cyber-modal-card {
  width: min(94vw, 560px);
  max-height: min(88vh, 740px);
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: rgba(56, 189, 248, 0.4) transparent;
}

.cyber-modal-card::-webkit-scrollbar {
  width: 6px;
}
.cyber-modal-card::-webkit-scrollbar-track {
  background: transparent;
}
.cyber-modal-card::-webkit-scrollbar-thumb {
  background: rgba(56, 189, 248, 0.3);
  border-radius: 6px;
}
.cyber-modal-card::-webkit-scrollbar-thumb:hover {
  background: rgba(0, 240, 255, 0.6);
}

@keyframes wave-anim {
  0%, 100% { transform: scaleY(0.3); opacity: 0.5; }
  50% { transform: scaleY(1.3); opacity: 1; }
}
