/* ── GLOBAL DESIGN SYSTEM ── */
:root {
  /* Colors */
  --bg-dark: #07070a;
  --bg-app: #0b0b10;
  --bg-surface: rgba(20, 20, 30, 0.45);
  --bg-surface-solid: #111119;
  --bg-surface-hover: rgba(255, 255, 255, 0.05);
  
  --border-glass: rgba(255, 255, 255, 0.06);
  --border-focus: rgba(139, 92, 246, 0.5);
  
  --primary: #8b5cf6; /* Neon Purple */
  --primary-glow: rgba(139, 92, 246, 0.35);
  --primary-tint: rgba(139, 92, 246, 0.08);
  
  --accent: #06b6d4; /* Neon Cyan */
  --accent-glow: rgba(6, 182, 212, 0.35);
  --accent-tint: rgba(6, 182, 212, 0.06);
  
  --success: #10b981; /* Neon Green */
  --success-glow: rgba(16, 185, 129, 0.2);
  --danger: #ef4444; /* Soft Red */
  --danger-glow: rgba(239, 68, 68, 0.25);
  --warning: #f59e0b; /* Bright Amber */
  
  --text-primary: #f3f4f6;
  --text-secondary: #9ca3af;
  --text-muted: #6b7280;
  
  /* Radii & Shadows */
  --radius-lg: 24px;
  --radius-md: 16px;
  --radius-sm: 10px;
  --shadow-lg: 0 16px 40px rgba(0, 0, 0, 0.5);
  --shadow-glow: 0 0 24px var(--primary-glow);
}

/* Base resets */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

body {
  font-family: 'Inter', -apple-system, sans-serif;
  background-color: var(--bg-dark);
  color: var(--text-primary);
  min-height: 100dvh;
  display: flex;
  justify-content: center;
  align-items: center;
  overflow: hidden;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  overscroll-behavior-y: none;
}

/* Ambient animated backdrop gradients */
body::before, body::after {
  content: '';
  position: absolute;
  width: 500px;
  height: 500px;
  border-radius: 50%;
  filter: blur(140px);
  opacity: 0.14;
  z-index: 0;
  pointer-events: none;
  animation: floatBackdrop 25s infinite alternate ease-in-out;
}

body::before {
  background: radial-gradient(circle, var(--primary) 0%, transparent 80%);
  top: -100px;
  left: -100px;
}

body::after {
  background: radial-gradient(circle, var(--accent) 0%, transparent 80%);
  bottom: -100px;
  right: -100px;
  animation-delay: -10s;
}

@keyframes floatBackdrop {
  0% { transform: translate(0, 0) scale(1); }
  100% { transform: translate(80px, 50px) scale(1.15); }
}

/* ── PHONE FRAME SIMULATOR (DESKTOP) ── */
.app-container {
  width: 100%;
  height: 100dvh;
  background-color: var(--bg-app);
  display: flex;
  flex-direction: column;
  position: relative;
  z-index: 1;
  overflow: hidden;
  transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

@media (min-width: 481px) {
  .app-container {
    width: 410px;
    height: 840px;
    border-radius: 40px;
    border: 8px solid #202028;
    box-shadow: var(--shadow-lg), 0 0 0 1px rgba(255, 255, 255, 0.05);
  }
}

/* ── SCREENS & ROUTING ── */
.screen {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  opacity: 0;
  pointer-events: none;
  transform: translateY(12px);
  transition: opacity 0.35s ease, transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
  z-index: 1;
}

.screen.active {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
  z-index: 2;
}

/* ── LOGIN VIEW ── */
#login-screen {
  padding-top: env(safe-area-inset-top, 24px) !important;
  box-sizing: border-box;
  justify-content: center;
  align-items: center;
  padding: 24px;
}

.login-box {
  width: 100%;
  padding: 32px 24px;
  background: rgba(255, 255, 255, 0.03) !important;
  backdrop-filter: blur(20px) !important;
  -webkit-backdrop-filter: blur(20px) !important;
  border: 1px solid rgba(255, 255, 255, 0.08) !important;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
}

.brand {
  text-align: center;
  margin-bottom: 32px;
}

.brand-logo {
  width: 64px;
  height: 64px;
  border-radius: 20px;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  display: flex;
  justify-content: center;
  align-items: center;
  margin: 0 auto 16px;
  box-shadow: 0 8px 24px rgba(139, 92, 246, 0.3);
}

.logo-icon {
  width: 32px;
  height: 32px;
  color: #fff;
}

.brand h1 {
  font-family: 'Outfit', sans-serif;
  font-size: 28px;
  font-weight: 700;
  letter-spacing: -0.5px;
  margin-bottom: 6px;
}

.brand p {
  color: var(--text-secondary);
  font-size: 14px;
}

.form-group {
  margin-bottom: 20px;
}

.form-group label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 8px;
}

.input-wrapper {
  position: relative;
  width: 100%;
}

.input-wrapper i {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  width: 18px;
  height: 18px;
  color: var(--text-muted);
  pointer-events: none;
  transition: color 0.2s;
}

.input-wrapper input {
  width: 100%;
  padding: 12px 14px 12px 42px;
  background: rgba(255, 255, 255, 0.03) !important;
  border: 1px solid rgba(255, 255, 255, 0.08) !important;
  color: var(--text-primary);
  border-radius: var(--radius-sm);
  font-size: 14px;
  outline: none;
  transition: border-color 0.2s, background-color 0.2s, box-shadow 0.2s;
}

.input-wrapper input:focus {
  border-color: var(--primary) !important;
  background: rgba(255, 255, 255, 0.08) !important;
  box-shadow: 0 0 12px rgba(139, 92, 246, 0.45) !important;
}

.input-wrapper input:focus + i {
  color: var(--primary);
}

/* WebKit Autofill Suppressor */
input:-webkit-autofill,
input:-webkit-autofill:hover, 
input:-webkit-autofill:focus, 
input:-webkit-autofill:active {
    -webkit-box-shadow: 0 0 0 30px #07070a inset !important; /* Matches background dark hex */
    -webkit-text-fill-color: white !important;
    transition: background-color 5000s ease-in-out 0s;
}

.error-msg {
  color: var(--danger);
  font-size: 12px;
  margin-top: -12px;
  margin-bottom: 16px;
  text-align: center;
}

.error-msg.hide {
  display: none;
}

.hide {
  display: none !important;
}

.btn {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  padding: 12px 24px;
  font-size: 14px;
  font-weight: 600;
  border-radius: var(--radius-sm);
  border: none;
  cursor: pointer;
  outline: none;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary), #a78bfa);
  color: #fff;
  box-shadow: 0 4px 16px rgba(139, 92, 246, 0.35);
}

.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(139, 92, 246, 0.5);
}

.btn-primary:active {
  transform: translateY(1px);
}

.btn-block {
  display: flex;
  width: 100%;
}

.login-footer {
  text-align: center;
  margin-top: 24px;
  font-size: 12px;
  color: var(--text-muted);
}

.login-footer a {
  color: var(--primary);
  text-decoration: none;
  font-weight: 500;
}

.login-footer a:hover {
  text-decoration: underline;
}

/* ── HEADER BARS ── */
.app-header {
  padding-top: env(safe-area-inset-top, 24px) !important;
  box-sizing: content-box;
  padding-left: 20px;
  padding-right: 20px;
  padding-bottom: 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid var(--border-glass);
  background: rgba(11, 11, 16, 0.6);
  backdrop-filter: blur(12px);
  z-index: 10;
}

/* Custom dark minimal audio player styling */
.minimal-audio {
  display: block;
  width: 100%;
  height: 36px;
  background-color: #0c0c14;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  outline: none;
}
.minimal-audio::-webkit-media-controls-enclosure {
  background-color: #0c0c14;
}
.minimal-audio::-webkit-media-controls-panel {
  background-color: #0c0c14;
}
.minimal-audio::-webkit-media-controls-play-button,
.minimal-audio::-webkit-media-controls-mute-button,
.minimal-audio::-webkit-media-controls-timeline,
.minimal-audio::-webkit-media-controls-current-time-display,
.minimal-audio::-webkit-media-controls-time-remaining-display {
  filter: invert(1) hue-rotate(180deg);
}

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

.avatar {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-glass);
  display: flex;
  justify-content: center;
  align-items: center;
  color: var(--primary);
}

.user-profile h3 {
  font-size: 14px;
  font-weight: 600;
}

.status-indicator-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  color: var(--text-secondary);
}

.pulse-dot {
  width: 6px;
  height: 6px;
  background-color: var(--success);
  border-radius: 50%;
  box-shadow: 0 0 8px var(--success);
  animation: pulseDot 1.5s infinite;
}

@keyframes pulseDot {
  0% { transform: scale(0.9); opacity: 0.6; }
  50% { transform: scale(1.1); opacity: 1; }
  100% { transform: scale(0.9); opacity: 0.6; }
}

.icon-btn {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-glass);
  color: var(--text-secondary);
  display: flex;
  justify-content: center;
  align-items: center;
  cursor: pointer;
  transition: all 0.2s;
}

.icon-btn:hover {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-primary);
}

/* ── LAYOUT SECTIONS ── */
.app-main {
  flex: 1;
  overflow-y: auto;
  padding: 20px;
  padding-bottom: 100px; /* space for tab bar */
  position: relative;
}

.tab-content {
  display: none;
  flex-direction: column;
  gap: 20px;
  animation: fadeInTab 0.4s ease forwards;
}

.tab-content.active {
  display: flex;
}

@keyframes fadeInTab {
  from { opacity: 0; transform: translateY(4px); }
  to { opacity: 1; transform: translateY(0); }
}

.section-header h2 {
  font-family: 'Outfit', sans-serif;
  font-size: 22px;
  font-weight: 700;
  margin-bottom: 4px;
}

.section-header p {
  font-size: 13px;
  color: var(--text-secondary);
}

/* ── STATS CARDS ── */
.stats-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.stat-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-md);
  padding: 14px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.stat-icon {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  display: flex;
  justify-content: center;
  align-items: center;
}

.stat-icon.spam {
  background: rgba(239, 68, 68, 0.1);
  color: var(--danger);
}

.stat-icon.minutes {
  background: rgba(6, 182, 212, 0.1);
  color: var(--accent);
}

.stat-info span {
  display: block;
  font-size: 16px;
  font-weight: 700;
}

.stat-info label {
  font-size: 10px;
  color: var(--text-muted);
  text-transform: uppercase;
}

/* ── CALL LOG ITEMS ── */
.calls-list-container {
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-height: 200px;
}

.calls-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.call-item {
  background: var(--bg-surface);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-md);
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  transition: border-color 0.25s, transform 0.2s;
  cursor: pointer;
}

.call-item:hover {
  border-color: rgba(255, 255, 255, 0.12);
  transform: translateY(-1px);
}

.call-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
}

.caller-info h4 {
  font-size: 14px;
  font-weight: 600;
}

.caller-info span {
  font-size: 11px;
  color: var(--text-secondary);
}

.badge {
  font-size: 10px;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: 100px;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

.badge-blocked {
  background: rgba(239, 68, 68, 0.12);
  color: var(--danger);
  border: 1px solid rgba(239, 68, 68, 0.2);
}

.badge-passed {
  background: rgba(16, 185, 129, 0.12);
  color: var(--success);
  border: 1px solid rgba(16, 185, 129, 0.2);
}

.call-transcript {
  font-size: 12px;
  color: var(--text-secondary);
  line-height: 1.5;
  background: rgba(0, 0, 0, 0.2);
  padding: 10px;
  border-radius: var(--radius-sm);
  border-left: 2px solid var(--primary);
  margin-top: 4px;
}

.call-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 4px;
}

.btn-sm {
  padding: 5px 12px;
  font-size: 11px;
  border-radius: var(--radius-sm);
}

.btn-outline-danger {
  background: transparent;
  color: var(--danger);
  border: 1px solid rgba(239, 68, 68, 0.3);
}

.btn-outline-danger:hover {
  background: rgba(239, 68, 68, 0.1);
}

.btn-outline-success {
  background: transparent;
  color: var(--success);
  border: 1px solid rgba(16, 185, 129, 0.3);
}

.btn-outline-success:hover {
  background: rgba(16, 185, 129, 0.1);
}

/* ── SMART ORB VIEW ── */
.orb-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  height: calc(100dvh - 170px);
  min-height: 520px;
  padding: 10px 0 20px;
}

.orb-status-text {
  text-align: center;
  margin-bottom: 20px;
}

.active-badge {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 1px;
  color: var(--accent);
  margin-bottom: 6px;
  display: inline-block;
}

.orb-status-text h1 {
  font-family: 'Outfit', sans-serif;
  font-size: 26px;
  font-weight: 800;
  margin-bottom: 4px;
}

.orb-status-text p {
  font-size: 13px;
  color: var(--text-secondary);
}

/* Orb breathing animations */
.orb-outer-wrapper {
  position: relative;
  width: 240px;
  height: 240px;
  display: flex;
  justify-content: center;
  align-items: center;
  margin: 10px 0;
}

.orb-progress-ring {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  transform: rotate(-90deg);
}

.ring-bg {
  fill: none;
  stroke: rgba(255, 255, 255, 0.03);
  stroke-width: 4;
}

.ring-active {
  fill: none;
  stroke: url(#orb-gradient);
  stroke-width: 4;
  stroke-linecap: round;
  stroke-dasharray: 691; /* 2 * PI * r (r=110) */
  stroke-dashoffset: 691;
  transition: stroke-dashoffset 0.1s linear;
}

/* Fallback stroke for standard browsers without gradient */
.ring-active {
  stroke: var(--primary);
}

.orb-core {
  width: 190px;
  height: 190px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, #a78bfa 0%, #7c3aed 50%, #4c1d95 100%);
  border: none;
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
  cursor: pointer;
  outline: none;
  box-shadow: 0 0 32px var(--primary-glow), inset 0 2px 8px rgba(255, 255, 255, 0.3);
  transition: transform 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.orb-core:hover {
  transform: scale(1.03);
}

.orb-core:active {
  transform: scale(0.97);
}

.orb-glow {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(6, 182, 212, 0.45) 0%, transparent 70%);
  opacity: 0.5;
  transition: opacity 0.3s;
}

.orb-pulse-ring {
  position: absolute;
  border: 1px solid var(--primary);
  border-radius: 50%;
  top: -15px;
  left: -15px;
  right: -15px;
  bottom: -15px;
  opacity: 0;
  pointer-events: none;
}

/* Pulsating animation for orb states */
.orb-core {
  animation: orbBreathe 4s infinite alternate ease-in-out;
}

@keyframes orbBreathe {
  0% { box-shadow: 0 0 24px rgba(139, 92, 246, 0.3), inset 0 2px 8px rgba(255, 255, 255, 0.2); }
  100% { box-shadow: 0 0 44px rgba(139, 92, 246, 0.6), inset 0 2px 12px rgba(255, 255, 255, 0.35); }
}

/* STATE: RECORDING */
.orb-container.recording .orb-core {
  background: radial-gradient(circle at 35% 35%, #f472b6 0%, #ec4899 50%, #be185d 100%);
  animation: orbRecordPulse 0.8s infinite alternate ease-in-out;
}

.orb-container.recording .orb-pulse-ring.ring-1 {
  animation: rippleRing 1.6s infinite linear;
}

.orb-container.recording .orb-pulse-ring.ring-2 {
  animation: rippleRing 1.6s infinite linear;
  animation-delay: 0.8s;
}

@keyframes orbRecordPulse {
  0% { box-shadow: 0 0 30px rgba(236, 72, 153, 0.5); transform: scale(1.02); }
  100% { box-shadow: 0 0 54px rgba(236, 72, 153, 0.8); transform: scale(1.06); }
}

@keyframes rippleRing {
  0% { transform: scale(0.9); opacity: 0.8; }
  100% { transform: scale(1.3); opacity: 0; }
}

/* STATE: PROCESSING */
.orb-container.processing .orb-core {
  animation: orbProcessBreathe 1.2s infinite alternate ease-in-out;
}

.orb-container.processing .orb-glow {
  animation: orbProcessSpin 2s infinite linear;
  background: linear-gradient(90deg, transparent, rgba(6, 182, 212, 0.6), transparent);
  opacity: 0.9;
}

@keyframes orbProcessBreathe {
  0% { box-shadow: 0 0 20px rgba(6, 182, 212, 0.4); transform: scale(1); }
  100% { box-shadow: 0 0 40px rgba(6, 182, 212, 0.7); transform: scale(1.03); }
}

@keyframes orbProcessSpin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

.orb-inner {
  position: relative;
  z-index: 2;
  color: #fff;
}

.orb-inner i {
  width: 48px;
  height: 48px;
  stroke-width: 1.5;
}

/* Recording audio visualizer */
.visualizer-container {
  width: 100%;
  height: 40px;
  display: flex;
  justify-content: center;
  align-items: center;
  margin-bottom: 10px;
}

#orb-visualizer {
  width: 100%;
  height: 100%;
  background: transparent;
}

.orb-action-hint {
  font-size: 11px;
  color: var(--text-muted);
  text-align: center;
}

/* Manual update text input */
.manual-input-box {
  width: 100%;
  background: var(--bg-surface);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-md);
  padding: 12px;
}

.manual-input-header {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-secondary);
  text-transform: uppercase;
  margin-bottom: 8px;
}

.text-input-row {
  display: flex;
  gap: 8px;
}

.text-input-row input {
  flex: 1;
  background: rgba(0, 0, 0, 0.2);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  font-size: 13px;
  color: var(--text-primary);
  outline: none;
}

.text-input-row input:focus {
  border-color: var(--primary);
}

.icon-btn-accent {
  width: 38px;
  height: 38px;
  border-radius: var(--radius-sm);
  background: var(--primary);
  color: #fff;
  border: none;
  display: flex;
  justify-content: center;
  align-items: center;
  cursor: pointer;
  transition: all 0.2s;
}

.icon-btn-accent:hover {
  background: #a78bfa;
}

/* Head up mini status display */
.hud-card {
  width: 100%;
  display: flex;
  justify-content: space-around;
  background: var(--bg-surface);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-md);
  padding: 12px;
}

.hud-item {
  display: flex;
  align-items: center;
  gap: 10px;
}

.hud-item i {
  color: var(--primary);
  width: 18px;
  height: 18px;
}

.hud-info label {
  display: block;
  font-size: 9px;
  color: var(--text-muted);
  text-transform: uppercase;
}

.hud-info span {
  font-size: 11px;
  font-weight: 600;
}

/* ── SETTINGS VIEW ── */
.card {
  background: var(--bg-surface);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-md);
  padding: 18px;
}

.bg-accent-tint {
  background-color: var(--accent-tint);
}

.border-accent-glow {
  border-color: rgba(6, 182, 212, 0.2);
  box-shadow: inset 0 0 12px rgba(6, 182, 212, 0.05);
}

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

.icon-box {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.05);
  color: var(--primary);
  display: flex;
  justify-content: center;
  align-items: center;
}

.icon-box-accent {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: rgba(6, 182, 212, 0.12);
  color: var(--accent);
  display: flex;
  justify-content: center;
  align-items: center;
}

.card-header h3 {
  font-size: 14px;
  font-weight: 600;
}

.card-body p {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.5;
}

.small-text {
  font-size: 12px !important;
  color: var(--text-muted) !important;
}

.copy-box {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: rgba(0, 0, 0, 0.25);
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-glass);
  margin-top: 10px;
}

.copy-box span {
  font-family: monospace;
  font-size: 14px;
  font-weight: 600;
  color: var(--accent);
}

.btn-outline-accent {
  background: transparent;
  color: var(--accent);
  border: 1px solid rgba(6, 182, 212, 0.4);
}

.btn-outline-accent:hover {
  background: rgba(6, 182, 212, 0.08);
}

.form-select {
  width: 100%;
  padding: 10px;
  background: rgba(0, 0, 0, 0.25);
  border: 1px solid var(--border-glass);
  color: var(--text-primary);
  border-radius: var(--radius-sm);
  outline: none;
}

.forwarding-command-display {
  margin-top: 12px;
  background: rgba(0, 0, 0, 0.15);
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-glass);
}

.forwarding-command-display p {
  font-size: 11px;
  color: var(--text-muted);
  margin-bottom: 4px;
}

.forwarding-command-display code {
  display: block;
  font-family: monospace;
  font-size: 13px;
  color: var(--accent);
  word-break: break-all;
  user-select: all;
}

.input-row {
  display: flex;
  gap: 8px;
}

.input-row input {
  flex: 1;
  background: rgba(0, 0, 0, 0.25);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-sm);
  padding: 10px;
  font-size: 13px;
  color: var(--text-primary);
  outline: none;
}

.input-row input:focus {
  border-color: var(--primary);
}

.input-group-row {
  display: flex;
  gap: 6px;
  width: 100%;
}

.input-group-row input {
  flex: 1;
  width: 50%;
  background: rgba(0, 0, 0, 0.25);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-sm);
  padding: 10px;
  font-size: 13px;
  color: var(--text-primary);
  outline: none;
}

.input-group-row input:focus {
  border-color: var(--primary);
}

.flex-col {
  flex-direction: column;
}

.margin-top-sm { margin-top: 10px; }
.margin-top-md { margin-top: 16px; }
.margin-top-xs { margin-top: 6px; }

/* Whitelist elements */
.whitelist-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 14px;
}

.whitelist-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
}

.vip-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--accent-tint);
  border: 1px solid rgba(6, 182, 212, 0.2);
  color: var(--accent);
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
}

.vip-meta {
  flex: 1;
  margin-left: 12px;
}

.vip-meta h4 {
  font-size: 13px;
  font-weight: 500;
}

.vip-meta span {
  font-size: 11px;
  color: var(--text-secondary);
}

.trash-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 4px;
  border-radius: 6px;
  transition: all 0.2s;
}

.trash-btn:hover {
  color: var(--danger);
  background: rgba(239, 68, 68, 0.08);
}

/* ── BOTTOM NAV BAR ── */
.app-nav {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 72px;
  background: rgba(11, 11, 16, 0.7);
  backdrop-filter: blur(24px);
  border-top: 1px solid var(--border-glass);
  display: flex;
  justify-content: space-around;
  align-items: center;
  padding-bottom: env(safe-area-inset-bottom);
  box-sizing: content-box;
  z-index: 10;
}

.nav-btn {
  background: transparent;
  border: none;
  outline: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.25s;
  flex: 1;
  position: relative;
  height: 100%;
  justify-content: center;
}

.nav-btn i {
  width: 22px;
  height: 22px;
  transition: transform 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.nav-btn span {
  font-size: 10px;
  font-weight: 500;
}

.nav-btn.active {
  color: var(--primary);
}

.nav-btn.active i {
  transform: translateY(-2px) scale(1.08);
}

/* Mini indicator for active state */
.nav-orb-indicator {
  position: absolute;
  top: 4px;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--primary);
  box-shadow: 0 0 6px var(--primary);
  opacity: 0;
  transition: opacity 0.25s;
}

.nav-btn.active .nav-orb-indicator {
  opacity: 1;
}

/* ── MODALS (ONBOARDING WIZARD) ── */
.modal-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(8px);
  display: flex;
  justify-content: center;
  align-items: flex-end;
  z-index: 100;
  transition: opacity 0.35s ease;
}

.modal-overlay.hide {
  opacity: 0;
  pointer-events: none;
}

.modal-card {
  width: 100%;
  background: var(--bg-surface-solid);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  padding: 24px;
  box-shadow: var(--shadow-lg);
  transform: translateY(100%);
  transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

.modal-overlay:not(.hide) .modal-card {
  transform: translateY(0);
}

.modal-header {
  margin-bottom: 16px;
}

.modal-badge {
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 1px;
  color: var(--accent);
  margin-bottom: 6px;
}

.modal-header h2 {
  font-family: 'Outfit', sans-serif;
  font-size: 20px;
  font-weight: 700;
}

.modal-body {
  min-height: 140px;
}

.onboard-step {
  display: none;
  animation: fadeInTab 0.3s ease;
}

.onboard-step.active {
  display: block;
}

.onboard-step p {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.5;
}

.onboard-vip-preview-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  max-height: 120px;
  overflow-y: auto;
  margin-top: 10px;
}

.modal-footer {
  display: flex;
  justify-content: space-between;
  margin-top: 24px;
  gap: 10px;
}

.modal-footer .btn {
  flex: 1;
}

/* ── LOADING SPINNER ── */
.loader-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px 20px;
  color: var(--text-secondary);
  gap: 12px;
}

.spinner {
  width: 32px;
  height: 32px;
  border: 3px solid rgba(255, 255, 255, 0.05);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 0.8s infinite linear;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 40px 20px;
  color: var(--text-muted);
  gap: 10px;
}

.empty-state i {
  width: 44px;
  height: 44px;
  stroke-width: 1.5;
}

.empty-state p {
  font-weight: 600;
  color: var(--text-secondary);
  font-size: 14px;
}

.empty-state span {
  font-size: 11px;
  line-height: 1.4;
  max-width: 240px;
}

.empty-state.hide, .loader-container.hide {
  display: none;
}

/* ── TOAST NOTIFICATIONS ── */
.toast-container {
  position: absolute;
  top: 20px;
  left: 20px;
  right: 20px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  z-index: 1000;
  pointer-events: none;
}

.toast {
  padding: 12px 16px;
  border-radius: var(--radius-md);
  background: rgba(20, 20, 30, 0.85);
  border: 1px solid var(--border-glass);
  backdrop-filter: blur(16px);
  color: var(--text-primary);
  font-size: 12px;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 10px;
  box-shadow: var(--shadow-lg);
  animation: slideInToast 0.35s cubic-bezier(0.16, 1, 0.3, 1), fadeOutToast 0.3s ease 2.7s forwards;
  pointer-events: auto;
}

.toast i {
  width: 16px;
  height: 16px;
}

.toast-success i { color: var(--success); }
.toast-error i { color: var(--danger); }
.toast-info i { color: var(--accent); }

@keyframes slideInToast {
  from { transform: translateY(-16px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

@keyframes fadeOutToast {
  to { transform: translateY(-8px); opacity: 0; }
}

/* Global forced 16px minimum font size for mobile keyboard zoom prevention */
input, textarea, select, .form-input, .form-select {
  font-size: 16px !important;
}

/* Premium Dark Dropdown Styling Overrides */
#ai-voice-select, #ai-tone-select {
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  background-color: rgba(255, 255, 255, 0.05);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%23ffffff' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  background-size: 16px;
  border: 1px solid transparent;
  border-radius: 12px;
  padding-right: 40px;
  color: var(--text-primary);
  outline: none;
  height: 44px;
  transition: all 0.2s ease;
}

#ai-voice-select:focus, #ai-tone-select:focus {
  border-color: var(--primary);
  background-color: rgba(255, 255, 255, 0.08);
  box-shadow: 0 0 0 2px var(--primary-glow);
}

/* Ensure select options inside dropdown are styled nicely in standard browsers */
#ai-voice-select option, #ai-tone-select option {
  background-color: #111119;
  color: var(--text-primary);
}

/* Instructions auto-save status visual */
#ai-instructions-status {
  font-size: 11px;
  color: var(--success);
  transition: opacity 0.2s ease;
}

/* Scrollbar tweaks */
::-webkit-scrollbar {
  width: 4px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.08);
  border-radius: 20px;
}

/* Danger Button & Disabled state overrides */
.btn-danger {
  background: var(--danger) !important;
  color: #fff !important;
  box-shadow: 0 4px 16px rgba(239, 68, 68, 0.35);
}
.btn-danger:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(239, 68, 68, 0.5);
}
.btn-danger:active {
  transform: translateY(1px);
}
.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  pointer-events: none;
}

/* ── OUTLINE BUTTON VARIANTS ── */
.btn-outline {
  background: transparent;
  color: var(--text-secondary);
  border: 1px solid var(--border-glass);
  transition: all 0.2s ease;
}
.btn-outline:hover {
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-primary);
  border-color: rgba(255, 255, 255, 0.15);
}

.btn-outline-primary {
  background: transparent;
  color: var(--primary);
  border: 1px solid rgba(139, 92, 246, 0.35);
  transition: all 0.2s ease;
}
.btn-outline-primary:hover {
  background: rgba(139, 92, 246, 0.1);
  border-color: rgba(139, 92, 246, 0.6);
}

.btn-outline-info {
  background: transparent;
  color: var(--accent);
  border: 1px solid rgba(6, 182, 212, 0.35);
  transition: all 0.2s ease;
}
.btn-outline-info:hover {
  background: rgba(6, 182, 212, 0.1);
  border-color: rgba(6, 182, 212, 0.6);
}

.btn-outline-danger {
  background: transparent;
  color: var(--danger);
  border: 1px solid rgba(239, 68, 68, 0.35);
  transition: all 0.2s ease;
}
.btn-outline-danger:hover {
  background: rgba(239, 68, 68, 0.1);
  border-color: rgba(239, 68, 68, 0.6);
}

/* ── MISSING COMPONENT STYLES ── */
.vip-preview-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  background: rgba(6, 182, 212, 0.08);
  border: 1px solid rgba(6, 182, 212, 0.2);
  border-radius: 20px;
  font-size: 12px;
  color: var(--accent);
}

.spin-loader {
  animation: spin 0.8s infinite linear;
}

.icon-box-danger {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: rgba(239, 68, 68, 0.12);
  color: var(--danger);
  display: flex;
  justify-content: center;
  align-items: center;
}

.form-input {
  width: 100%;
  padding: 10px 12px;
  background: rgba(0, 0, 0, 0.25);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  outline: none;
  transition: border-color 0.2s ease;
}
.form-input:focus {
  border-color: var(--primary);
}
