/* ==========================================================================
   VOIP SOFTPHONE PRO - MODERN DESIGN SYSTEM (VANILLA CSS)
   ========================================================================== */

:root {
  /* Color Palette - Premium Dark Theme */
  --bg-main: #0a0e17;
  --bg-card: rgba(17, 24, 39, 0.75);
  --bg-card-hover: rgba(30, 41, 59, 0.85);
  --bg-input: rgba(15, 23, 42, 0.9);
  --bg-glass: rgba(255, 255, 255, 0.03);
  --border-color: rgba(255, 255, 255, 0.08);
  --border-focus: #3b82f6;

  /* Brand Accents */
  --primary: #3b82f6;
  --primary-hover: #2563eb;
  --primary-glow: rgba(59, 130, 246, 0.25);
  
  --success: #10b981;
  --success-hover: #059669;
  --success-glow: rgba(16, 185, 129, 0.3);

  --danger: #ef4444;
  --danger-hover: #dc2626;
  --danger-glow: rgba(239, 68, 68, 0.35);

  --warning: #f59e0b;
  --warning-glow: rgba(245, 158, 11, 0.25);

  /* Typography */
  --text-main: #f8fafc;
  --text-muted: #94a3b8;
  --text-dim: #64748b;
  
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-mono: 'JetBrains Mono', monospace;

  /* Shadows & Effects */
  --shadow-lg: 0 20px 25px -5px rgba(0, 0, 0, 0.5), 0 8px 10px -6px rgba(0, 0, 0, 0.5);
  --shadow-glow: 0 0 25px var(--primary-glow);
  --blur-glass: blur(16px);
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 20px;
  --radius-full: 9999px;
  --transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Reset & Base Setup */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--font-sans);
  background-color: var(--bg-main);
  background-image: 
    radial-gradient(circle at 15% 15%, rgba(59, 130, 246, 0.12) 0%, transparent 40%),
    radial-gradient(circle at 85% 85%, rgba(16, 185, 129, 0.08) 0%, transparent 45%),
    radial-gradient(circle at 50% 50%, rgba(99, 102, 241, 0.05) 0%, transparent 60%);
  background-attachment: fixed;
  color: var(--text-main);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 20px;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

/* App Container */
.softphone-wrapper {
  width: 100%;
  max-width: 1220px;
  display: grid;
  grid-template-columns: 460px 1fr;
  gap: 32px;
  background: var(--bg-card);
  backdrop-filter: var(--blur-glass);
  -webkit-backdrop-filter: var(--blur-glass);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  padding: 32px;
  position: relative;
  overflow: hidden;
}

/* Header Section */
.app-header {
  grid-column: 1 / -1;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--border-color);
}

.brand-logo-column {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
}

.brand-logo-wrapper {
  background: #ffffff;
  padding: 4px 10px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.4);
  border: 1px solid rgba(255, 255, 255, 0.3);
  height: 42px;
  transition: var(--transition);
}

.brand-logo-wrapper:hover {
  transform: scale(1.02);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.5);
}

.brand-logo-img {
  height: 32px;
  max-width: 130px;
  width: auto;
  object-fit: contain;
  display: block;
}

.brand-slogan-text {
  font-size: 0.68rem;
  color: var(--text-muted);
  font-weight: 400;
  line-height: 1.2;
  margin: 0;
}

.brand-meta-column {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 6px;
}

.brand-header-top {
  display: flex;
  align-items: center;
  gap: 8px;
}

.brand-main-title {
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text-main);
  display: flex;
  align-items: center;
  gap: 6px;
  line-height: 1.2;
  margin: 0;
}

.badge-reseller {
  font-size: 0.62rem;
  text-transform: uppercase;
  background: rgba(59, 130, 246, 0.15);
  color: var(--primary);
  padding: 2px 6px;
  border-radius: 4px;
  border: 1px solid rgba(59, 130, 246, 0.3);
  font-weight: 600;
}

.brand-status-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.user-extension-sub {
  font-size: 0.72rem;
  color: var(--text-dim);
  font-family: var(--font-mono);
  margin: 0;
  white-space: nowrap;
}

/* Status Indicator */
.connection-status-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 4px 10px;
  background: var(--bg-input);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-full);
  font-size: 0.75rem;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: var(--transition);
}

.connection-status-pill:hover {
  border-color: rgba(255, 255, 255, 0.2);
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: var(--text-dim);
  transition: var(--transition);
}

.status-dot.registered {
  background-color: var(--success);
  box-shadow: 0 0 8px var(--success-glow);
}

.status-dot.connecting {
  background-color: var(--warning);
  box-shadow: 0 0 8px var(--warning-glow);
  animation: pulse-dot 1.5s infinite;
}

.status-dot.error {
  background-color: var(--danger);
  box-shadow: 0 0 8px var(--danger-glow);
}

@keyframes pulse-dot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.4; transform: scale(1.15); }
}

/* ==========================================================================
   LEFT COLUMN - PHONE DIALER
   ========================================================================== */
.dialer-section {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

/* Seletor de Modo: Nacional vs Internacional */
.dialer-mode-selector {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  background: var(--bg-input);
  padding: 4px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
}

.btn-mode-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 8px 12px;
  background: transparent;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
}

.btn-mode-toggle:hover {
  color: var(--text-main);
  background: rgba(255, 255, 255, 0.04);
}

.btn-mode-toggle.active {
  background: var(--primary);
  color: #ffffff;
  border-color: rgba(255, 255, 255, 0.15);
  box-shadow: 0 2px 8px var(--primary-glow);
}

.mode-flag {
  font-size: 1.1rem;
  line-height: 1;
}

/* Display Number Input */
.dialer-screen {
  background: var(--bg-input);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 12px 16px;
  display: flex;
  flex-direction: column;
  position: relative;
  transition: var(--transition);
}

.dialer-screen:focus-within {
  border-color: var(--border-focus);
  box-shadow: 0 0 0 3px var(--primary-glow);
}

.screen-top-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 4px;
}

.country-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(255, 255, 255, 0.06);
  padding: 3px 8px;
  border-radius: 4px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--text-main);
  transition: var(--transition);
}

.country-flag {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.95rem;
  line-height: 1;
}

.flag-img {
  width: 18px;
  height: 13px;
  object-fit: cover;
  border-radius: 2px;
  display: inline-block;
  vertical-align: middle;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

.mode-flag {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  line-height: 1;
}

.mode-flag .flag-img {
  width: 20px;
  height: 14px;
}

.screen-extension {
  font-size: 0.7rem;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-weight: 600;
}

.screen-input-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 4px;
}

.dialer-input {
  background: transparent;
  border: none;
  color: var(--text-main);
  font-family: var(--font-mono);
  font-size: 1.45rem;
  font-weight: 600;
  width: 100%;
  outline: none;
  letter-spacing: 0.04em;
}

.dialer-input::placeholder {
  color: var(--text-dim);
  font-size: 1.1rem;
}

.btn-backspace {
  background: transparent;
  border: none;
  color: var(--text-dim);
  cursor: pointer;
  padding: 6px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
}

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

/* Dialpad Grid */
.dialpad-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}

.dial-key {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 14px 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: var(--text-main);
  cursor: pointer;
  user-select: none;
  transition: var(--transition);
  position: relative;
  overflow: hidden;
}

.dial-key:hover {
  background: var(--bg-card-hover);
  border-color: rgba(255, 255, 255, 0.25);
  transform: translateY(-2px);
}

.dial-key:active {
  transform: translateY(1px) scale(0.97);
  background: rgba(59, 130, 246, 0.2);
  border-color: var(--primary);
}

.dial-key .key-num {
  font-size: 1.45rem;
  font-weight: 700;
  line-height: 1;
}

.dial-key .key-sub {
  font-size: 0.68rem;
  color: var(--text-dim);
  letter-spacing: 0.12em;
  margin-top: 3px;
  font-weight: 600;
}

/* Call Actions (Big Buttons) */
.dial-actions {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
  margin-top: 4px;
}

.btn-call {
  background: linear-gradient(135deg, #10b981, #059669);
  color: #ffffff;
  border: none;
  border-radius: var(--radius-md);
  padding: 14px 20px;
  font-size: 1.05rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  cursor: pointer;
  box-shadow: 0 4px 14px var(--success-glow);
  transition: var(--transition);
}

.btn-call:hover {
  background: linear-gradient(135deg, #059669, #047857);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px var(--success-glow);
}

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

.btn-redial {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  color: var(--text-muted);
  border-radius: var(--radius-md);
  padding: 14px 18px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
}

.btn-redial:hover {
  background: var(--bg-card-hover);
  color: var(--primary);
  border-color: var(--primary);
}

/* ==========================================================================
   RIGHT COLUMN - TABS (HISTORY, SETTINGS, AUDIO)
   ========================================================================== */
.panels-section {
  display: flex;
  flex-direction: column;
  background: var(--bg-input);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  overflow: hidden;
  height: 520px;
}

/* Tabs Navigation */
.tabs-nav {
  display: flex;
  background: rgba(15, 23, 42, 0.95);
  border-bottom: 1px solid var(--border-color);
  padding: 6px;
  gap: 4px;
}

.tab-btn {
  flex: 1;
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 0.8rem;
  font-weight: 600;
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: var(--transition);
}

.tab-btn:hover {
  color: var(--text-main);
  background: rgba(255, 255, 255, 0.05);
}

.tab-btn.active {
  background: var(--bg-card);
  color: var(--primary);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
}

/* Tab Contents */
.tab-content {
  flex: 1;
  padding: 16px;
  overflow-y: auto;
  display: none;
}

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

/* Call History Tab */
.history-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.history-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100%;
  color: var(--text-dim);
  text-align: center;
  gap: 8px;
  padding: 40px 0;
}

.history-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 12px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  transition: var(--transition);
}

.history-item:hover {
  border-color: rgba(255, 255, 255, 0.15);
  background: var(--bg-card-hover);
}

.history-info {
  display: flex;
  align-items: center;
  gap: 12px;
}

.call-icon {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.call-icon.outbound {
  background: rgba(59, 130, 246, 0.15);
  color: var(--primary);
}

.call-icon.inbound {
  background: rgba(16, 185, 129, 0.15);
  color: var(--success);
}

.call-icon.missed {
  background: rgba(239, 68, 68, 0.15);
  color: var(--danger);
}

.history-details .history-num {
  font-family: var(--font-mono);
  font-size: 0.9rem;
  font-weight: 600;
}

.history-details .history-meta {
  font-size: 0.72rem;
  color: var(--text-dim);
}

.btn-history-call {
  background: transparent;
  border: 1px solid var(--border-color);
  color: var(--success);
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--transition);
}

.btn-history-call:hover {
  background: var(--success);
  color: #ffffff;
  border-color: var(--success);
}

/* Forms & Settings Tab */
.settings-group {
  margin-bottom: 16px;
}

.settings-label {
  display: block;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 6px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.settings-input, .settings-select {
  width: 100%;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  color: var(--text-main);
  padding: 10px 12px;
  font-size: 0.88rem;
  font-family: inherit;
  outline: none;
  transition: var(--transition);
}

.settings-input:focus, .settings-select:focus {
  border-color: var(--border-focus);
  box-shadow: 0 0 0 2px var(--primary-glow);
}

.settings-hint {
  font-size: 0.72rem;
  color: var(--text-dim);
  margin-top: 4px;
}

.btn-save-settings {
  width: 100%;
  background: var(--primary);
  color: #ffffff;
  border: none;
  padding: 12px;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 0.9rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: var(--transition);
}

.btn-save-settings:hover {
  background: var(--primary-hover);
}

/* Audio Diagnostics Tab */
.audio-meter-box {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 14px;
  margin-bottom: 16px;
}

.meter-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
  font-size: 0.8rem;
  color: var(--text-muted);
}

.vu-meter-bar {
  width: 100%;
  height: 10px;
  background: var(--bg-main);
  border-radius: 5px;
  overflow: hidden;
  position: relative;
}

.vu-meter-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, #10b981 60%, #f59e0b 85%, #ef4444 100%);
  border-radius: 5px;
  transition: width 0.05s ease-out;
}

.btn-test-audio {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  color: var(--text-main);
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  font-size: 0.82rem;
  font-weight: 500;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: var(--transition);
}

.btn-test-audio:hover {
  background: var(--bg-card-hover);
  border-color: var(--primary);
  color: var(--primary);
}

/* ==========================================================================
   CALL OVERLAYS (ACTIVE CALL & INCOMING CALL)
   ========================================================================== */

/* Active Call Overlay */
.active-call-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(10, 14, 23, 0.95);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  z-index: 100;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  padding: 40px 24px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.active-call-overlay.active {
  opacity: 1;
  pointer-events: all;
}

.call-header-info {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.caller-avatar {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: linear-gradient(135deg, #1e293b, #334155);
  border: 2px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 16px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
  position: relative;
}

.caller-avatar.calling::after {
  content: '';
  position: absolute;
  top: -6px;
  left: -6px;
  right: -6px;
  bottom: -6px;
  border-radius: 50%;
  border: 2px solid var(--primary);
  animation: ripple-avatar 1.8s infinite;
}

@keyframes ripple-avatar {
  0% { transform: scale(0.95); opacity: 1; }
  100% { transform: scale(1.3); opacity: 0; }
}

.caller-name {
  font-size: 1.4rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.caller-number {
  font-family: var(--font-mono);
  font-size: 1rem;
  color: var(--text-muted);
  margin-top: 4px;
}

.call-timer {
  font-family: var(--font-mono);
  font-size: 1.25rem;
  color: var(--success);
  margin-top: 8px;
  font-weight: 600;
  background: rgba(16, 185, 129, 0.1);
  padding: 4px 12px;
  border-radius: var(--radius-full);
}

.call-status-label {
  font-size: 0.85rem;
  color: var(--warning);
  margin-top: 8px;
}

/* Call Control Buttons */
.call-controls-grid {
  display: flex;
  gap: 20px;
  align-items: center;
}

.btn-call-control {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  color: var(--text-main);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--transition);
}

.btn-call-control:hover {
  background: var(--bg-card-hover);
  transform: translateY(-2px);
}

.btn-call-control.active {
  background: var(--primary);
  color: #ffffff;
  border-color: var(--primary);
}

.btn-hangup {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: linear-gradient(135deg, #ef4444, #dc2626);
  border: none;
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 4px 20px var(--danger-glow);
  transition: var(--transition);
}

.btn-hangup:hover {
  transform: scale(1.08);
  box-shadow: 0 6px 25px var(--danger-glow);
}

.btn-hangup:active {
  transform: scale(0.95);
}

/* In-call DTMF Keypad Drawer */
.incall-keypad {
  display: none;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  width: 240px;
  margin: 12px 0;
}

.incall-keypad.visible {
  display: grid;
}

.incall-key {
  background: rgba(30, 41, 59, 0.8);
  border: 1px solid var(--border-color);
  color: #ffffff;
  font-weight: 700;
  padding: 10px 0;
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-size: 1.1rem;
}

.incall-key:active {
  background: var(--primary);
}

/* Incoming Call Modal */
.incoming-call-modal {
  position: fixed;
  top: 24px;
  right: 24px;
  background: rgba(17, 24, 39, 0.95);
  backdrop-filter: var(--blur-glass);
  -webkit-backdrop-filter: var(--blur-glass);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.6);
  padding: 20px 24px;
  width: 340px;
  z-index: 200;
  display: none;
  animation: slide-in-top 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.incoming-call-modal.active {
  display: block;
}

@keyframes slide-in-top {
  from { transform: translateY(-40px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

.incoming-header {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 20px;
}

.incoming-avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--success-glow);
  border: 2px solid var(--success);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--success);
  animation: pulse-ring 1.5s infinite;
}

@keyframes pulse-ring {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.08); }
}

.incoming-caller h4 {
  font-size: 1.05rem;
  font-weight: 700;
}

.incoming-caller p {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.incoming-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.btn-accept-call {
  background: var(--success);
  color: #ffffff;
  border: none;
  border-radius: var(--radius-sm);
  padding: 10px;
  font-weight: 600;
  font-size: 0.9rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: var(--transition);
}

.btn-accept-call:hover {
  background: var(--success-hover);
}

.btn-reject-call {
  background: var(--danger);
  color: #ffffff;
  border: none;
  border-radius: var(--radius-sm);
  padding: 10px;
  font-weight: 600;
  font-size: 0.9rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: var(--transition);
}

.btn-reject-call:hover {
  background: var(--danger-hover);
}

/* Toast Notifications */
.toast-container {
  position: fixed;
  bottom: 20px;
  right: 20px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  z-index: 300;
}

.toast {
  background: var(--bg-card);
  backdrop-filter: var(--blur-glass);
  border: 1px solid var(--border-color);
  padding: 12px 18px;
  border-radius: var(--radius-md);
  color: var(--text-main);
  font-size: 0.85rem;
  display: flex;
  align-items: center;
  gap: 10px;
  box-shadow: var(--shadow-lg);
  animation: fade-in-toast 0.3s ease;
}

@keyframes fade-in-toast {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

.toast.success { border-left: 4px solid var(--success); }
.toast.error { border-left: 4px solid var(--danger); }
.toast.info { border-left: 4px solid var(--primary); }

/* Footer / Branding Note */
.app-footer {
  margin-top: 16px;
  font-size: 0.75rem;
  color: var(--text-dim);
  text-align: center;
}

/* Responsive Design */
@media (max-width: 820px) {
  .softphone-wrapper {
    grid-template-columns: 1fr;
    max-width: 440px;
    padding: 16px;
    gap: 16px;
  }
  
  .panels-section {
    height: 360px;
  }
  
  .incoming-call-modal {
    top: 12px;
    right: 12px;
    left: 12px;
    width: auto;
  }
}

@media (max-width: 520px) {
  body {
    padding: 8px 6px;
    align-items: flex-start;
  }

  .softphone-wrapper {
    padding: 12px;
    gap: 12px;
    border-radius: var(--radius-md);
  }

  .app-header {
    padding-bottom: 10px;
    gap: 8px;
  }

  .brand-logo-wrapper {
    height: 36px;
    padding: 3px 8px;
  }

  .brand-logo-img {
    height: 26px;
    max-width: 105px;
  }

  .brand-slogan-text {
    font-size: 0.62rem;
    max-width: 140px;
    line-height: 1.1;
  }

  .brand-main-title {
    font-size: 0.92rem;
  }

  .badge-reseller {
    font-size: 0.58rem;
    padding: 1px 4px;
  }

  .brand-status-row {
    gap: 6px;
  }

  .user-extension-sub {
    font-size: 0.65rem;
  }

  .connection-status-pill {
    padding: 3px 8px;
    font-size: 0.7rem;
    gap: 5px;
  }

  .dialer-section {
    gap: 10px;
  }

  .dialer-mode-selector {
    padding: 2px;
    gap: 4px;
  }

  .btn-mode-toggle {
    padding: 6px 6px;
    font-size: 0.75rem;
    gap: 5px;
  }

  .dialer-screen {
    padding: 8px 12px;
  }

  .dialer-input {
    font-size: 1.25rem;
  }

  .dialpad-grid {
    gap: 6px;
  }

  .dial-key {
    padding: 10px 0;
  }

  .key-num {
    font-size: 1.3rem;
  }

  .key-sub {
    font-size: 0.55rem;
  }

  .dial-actions {
    gap: 8px;
  }

  .btn-call {
    padding: 10px;
    font-size: 0.92rem;
  }

  .btn-redial {
    width: 44px;
    height: 44px;
  }

  .app-footer {
    margin-top: 10px;
    font-size: 0.7rem;
  }
}

/* ==========================================================================
   10 ESTILOS VISUAIS E EFEITOS 3D DO SISTEMA (COMPLETO E ROBUSTO)
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. DOSTER DARK PRO (Padrão Sofisticado)
   -------------------------------------------------------------------------- */
[data-theme="theme-doster-dark"],
html[data-theme="theme-doster-dark"],
body[data-theme="theme-doster-dark"] {
  --bg-main: #0a0e17;
  --bg-card: rgba(17, 24, 39, 0.85);
  --bg-card-hover: rgba(30, 41, 59, 0.95);
  --bg-input: rgba(15, 23, 42, 0.95);
  --border-color: rgba(255, 255, 255, 0.1);
  --border-focus: #3b82f6;
  --primary: #3b82f6;
  --primary-hover: #2563eb;
  --primary-glow: rgba(59, 130, 246, 0.35);
  --success: #10b981;
  --success-hover: #059669;
  --danger: #ef4444;
  --text-main: #f8fafc;
  --text-muted: #94a3b8;
  --text-dim: #64748b;
  --shadow-lg: 0 20px 25px -5px rgba(0, 0, 0, 0.6);
}
body[data-theme="theme-doster-dark"] {
  background-color: #0a0e17;
  background-image: 
    radial-gradient(circle at 15% 15%, rgba(59, 130, 246, 0.15) 0%, transparent 40%),
    radial-gradient(circle at 85% 85%, rgba(16, 185, 129, 0.1) 0%, transparent 45%),
    radial-gradient(circle at 50% 50%, rgba(99, 102, 241, 0.08) 0%, transparent 60%);
}
[data-theme="theme-doster-dark"] .dial-key {
  background: rgba(30, 41, 59, 0.8);
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
}

/* --------------------------------------------------------------------------
   2. 3D SKEUOMORPHIC TACTILE (Física de Botões Reais 3D)
   -------------------------------------------------------------------------- */
[data-theme="theme-3d-skeuomorphic"],
html[data-theme="theme-3d-skeuomorphic"],
body[data-theme="theme-3d-skeuomorphic"] {
  --bg-main: #070a12;
  --bg-card: #131a29;
  --bg-card-hover: #1b253a;
  --bg-input: #0a0f1a;
  --border-color: rgba(255, 255, 255, 0.14);
  --border-focus: #38bdf8;
  --primary: #0284c7;
  --primary-hover: #0369a1;
  --primary-glow: rgba(2, 132, 199, 0.5);
  --success: #059669;
  --success-hover: #047857;
  --danger: #dc2626;
  --text-main: #ffffff;
  --text-muted: #94a3b8;
  --text-dim: #64748b;
  --shadow-lg: 0 25px 40px rgba(0, 0, 0, 0.9), inset 0 1px 0 rgba(255, 255, 255, 0.15);
}
body[data-theme="theme-3d-skeuomorphic"] {
  background-color: #070a12;
  background-image: 
    radial-gradient(circle at 50% 10%, rgba(2, 132, 199, 0.22) 0%, transparent 50%),
    linear-gradient(180deg, #070a12 0%, #030508 100%);
}
[data-theme="theme-3d-skeuomorphic"] .softphone-wrapper,
[data-theme="theme-3d-skeuomorphic"] .admin-container,
[data-theme="theme-3d-skeuomorphic"] .live-preview-box {
  background: #131a29;
  border: 1px solid rgba(255, 255, 255, 0.15);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.8), inset 0 1px 0 rgba(255, 255, 255, 0.15);
}
[data-theme="theme-3d-skeuomorphic"] .dial-key {
  background: linear-gradient(180deg, #26334d 0%, #151e30 100%);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-bottom: 4px solid #080c14;
  box-shadow: 0 5px 0 #05080e, 0 10px 18px rgba(0, 0, 0, 0.7), inset 0 1px 0 rgba(255, 255, 255, 0.25);
  transform: translateY(0);
  transition: all 0.08s ease-out;
}
[data-theme="theme-3d-skeuomorphic"] .dial-key:hover {
  background: linear-gradient(180deg, #2f3e5c 0%, #1a253b 100%);
  transform: translateY(-2px);
  box-shadow: 0 7px 0 #05080e, 0 14px 22px rgba(0, 0, 0, 0.8), inset 0 1px 0 rgba(255, 255, 255, 0.3);
}
[data-theme="theme-3d-skeuomorphic"] .dial-key:active {
  transform: translateY(4px);
  border-bottom-width: 1px;
  box-shadow: 0 1px 0 #05080e, 0 3px 6px rgba(0, 0, 0, 0.5), inset 0 2px 4px rgba(0, 0, 0, 0.5);
}
[data-theme="theme-3d-skeuomorphic"] .btn-call {
  background: linear-gradient(180deg, #10b981 0%, #047857 100%);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-bottom: 4px solid #064e3b;
  box-shadow: 0 5px 0 #022c22, 0 10px 20px rgba(16, 185, 129, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.35);
}
[data-theme="theme-3d-skeuomorphic"] .btn-call:active {
  transform: translateY(4px);
  border-bottom-width: 1px;
  box-shadow: 0 1px 0 #022c22, 0 3px 6px rgba(0, 0, 0, 0.5);
}

/* --------------------------------------------------------------------------
   3. CYBERPUNK NEON 3D (OLED Futurista com Laser Glow)
   -------------------------------------------------------------------------- */
[data-theme="theme-cyberpunk-neon"],
html[data-theme="theme-cyberpunk-neon"],
body[data-theme="theme-cyberpunk-neon"] {
  --bg-main: #020206;
  --bg-card: rgba(8, 8, 18, 0.92);
  --bg-card-hover: rgba(18, 18, 36, 0.98);
  --bg-input: #04040a;
  --border-color: rgba(6, 182, 212, 0.45);
  --border-focus: #ec4899;
  --primary: #06b6d4;
  --primary-hover: #0891b2;
  --primary-glow: rgba(6, 182, 212, 0.6);
  --success: #10e891;
  --danger: #ff0055;
  --text-main: #ffffff;
  --text-muted: #67e8f9;
  --text-dim: #38bdf8;
  --shadow-lg: 0 0 35px rgba(6, 182, 212, 0.3), 0 25px 50px rgba(0, 0, 0, 0.95);
}
body[data-theme="theme-cyberpunk-neon"] {
  background-color: #020206;
  background-image: 
    radial-gradient(circle at 10% 20%, rgba(236, 72, 153, 0.22) 0%, transparent 45%),
    radial-gradient(circle at 90% 80%, rgba(6, 182, 212, 0.22) 0%, transparent 45%),
    linear-gradient(rgba(6, 182, 212, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(6, 182, 212, 0.05) 1px, transparent 1px);
  background-size: 100% 100%, 100% 100%, 30px 30px, 30px 30px;
}
[data-theme="theme-cyberpunk-neon"] .softphone-wrapper,
[data-theme="theme-cyberpunk-neon"] .admin-container,
[data-theme="theme-cyberpunk-neon"] .live-preview-box {
  background: rgba(8, 8, 18, 0.92);
  border: 1px solid rgba(6, 182, 212, 0.5);
  box-shadow: 0 0 30px rgba(6, 182, 212, 0.25), inset 0 0 20px rgba(236, 72, 153, 0.12);
}
[data-theme="theme-cyberpunk-neon"] .dial-key {
  background: #090916;
  border: 1px solid rgba(6, 182, 212, 0.4);
  box-shadow: 0 0 12px rgba(6, 182, 212, 0.2), inset 0 0 10px rgba(6, 182, 212, 0.08);
}
[data-theme="theme-cyberpunk-neon"] .dial-key:hover {
  border-color: #ec4899;
  box-shadow: 0 0 20px rgba(236, 72, 153, 0.6), inset 0 0 12px rgba(236, 72, 153, 0.25);
  color: #ffffff;
}
[data-theme="theme-cyberpunk-neon"] .dial-key .key-num {
  text-shadow: 0 0 10px rgba(6, 182, 212, 0.8);
}
[data-theme="theme-cyberpunk-neon"] .btn-call {
  background: linear-gradient(135deg, #06b6d4, #10e891);
  box-shadow: 0 0 25px rgba(16, 232, 145, 0.6);
  border: none;
}

/* --------------------------------------------------------------------------
   4. TITANIUM LUXURY & CHROME (Metálico & Aço Escovado com Dourado)
   -------------------------------------------------------------------------- */
[data-theme="theme-titanium-luxury"],
html[data-theme="theme-titanium-luxury"],
body[data-theme="theme-titanium-luxury"] {
  --bg-main: #0a0d13;
  --bg-card: rgba(20, 25, 34, 0.9);
  --bg-card-hover: rgba(30, 38, 50, 0.95);
  --bg-input: #0e1219;
  --border-color: rgba(245, 158, 11, 0.3);
  --border-focus: #f59e0b;
  --primary: #f59e0b;
  --primary-hover: #d97706;
  --primary-glow: rgba(245, 158, 11, 0.4);
  --success: #10b981;
  --danger: #ef4444;
  --text-main: #f1f5f9;
  --text-muted: #cbd5e1;
  --text-dim: #94a3b8;
  --shadow-lg: 0 25px 50px rgba(0, 0, 0, 0.9), 0 0 20px rgba(245, 158, 11, 0.15);
}
body[data-theme="theme-titanium-luxury"] {
  background-color: #0a0d13;
  background-image: 
    radial-gradient(circle at 50% 0%, rgba(245, 158, 11, 0.18) 0%, transparent 60%),
    radial-gradient(circle at 100% 100%, rgba(148, 163, 184, 0.1) 0%, transparent 40%);
}
[data-theme="theme-titanium-luxury"] .softphone-wrapper,
[data-theme="theme-titanium-luxury"] .admin-container,
[data-theme="theme-titanium-luxury"] .live-preview-box {
  border: 1px solid rgba(245, 158, 11, 0.35);
  box-shadow: 0 20px 45px rgba(0, 0, 0, 0.85), inset 0 1px 0 rgba(255, 255, 255, 0.15);
}
[data-theme="theme-titanium-luxury"] .dial-key {
  background: linear-gradient(145deg, #222b3a, #131924);
  border: 1px solid rgba(255, 255, 255, 0.14);
  box-shadow: 3px 3px 8px rgba(0, 0, 0, 0.6), -1px -1px 3px rgba(255, 255, 255, 0.06), inset 0 1px 0 rgba(255, 255, 255, 0.2);
}
[data-theme="theme-titanium-luxury"] .dial-key:hover {
  border-color: rgba(245, 158, 11, 0.6);
  box-shadow: 0 4px 16px rgba(245, 158, 11, 0.25), inset 0 1px 0 rgba(255, 255, 255, 0.35);
}

/* --------------------------------------------------------------------------
   5. CLAYMORPHISM SOFT 3D (Argila Suave e Toque Macio 3D)
   -------------------------------------------------------------------------- */
[data-theme="theme-claymorphism-soft"],
html[data-theme="theme-claymorphism-soft"],
body[data-theme="theme-claymorphism-soft"] {
  --bg-main: #0c1424;
  --bg-card: #142036;
  --bg-card-hover: #1b2a47;
  --bg-input: #0e182b;
  --border-color: rgba(255, 255, 255, 0.1);
  --border-focus: #818cf8;
  --primary: #6366f1;
  --primary-hover: #4f46e5;
  --primary-glow: rgba(99, 102, 241, 0.45);
  --success: #10b981;
  --danger: #ef4444;
  --text-main: #f8fafc;
  --text-muted: #a5b4fc;
  --text-dim: #64748b;
  --radius-md: 16px;
  --radius-lg: 24px;
}
body[data-theme="theme-claymorphism-soft"] {
  background-color: #0c1424;
  background-image: 
    radial-gradient(circle at 20% 20%, rgba(99, 102, 241, 0.2) 0%, transparent 50%),
    radial-gradient(circle at 80% 80%, rgba(165, 180, 252, 0.1) 0%, transparent 50%);
}
[data-theme="theme-claymorphism-soft"] .softphone-wrapper,
[data-theme="theme-claymorphism-soft"] .admin-container,
[data-theme="theme-claymorphism-soft"] .live-preview-box {
  background: #142036;
  box-shadow: 18px 18px 36px rgba(0, 0, 0, 0.7), -8px -8px 24px rgba(255, 255, 255, 0.03), inset 2px 2px 4px rgba(255, 255, 255, 0.1);
}
[data-theme="theme-claymorphism-soft"] .dial-key {
  background: #192742;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 14px;
  box-shadow: 6px 6px 14px rgba(0, 0, 0, 0.5), -4px -4px 10px rgba(255, 255, 255, 0.04), inset 1px 1px 2px rgba(255, 255, 255, 0.15);
}
[data-theme="theme-claymorphism-soft"] .dial-key:hover {
  background: #203152;
  transform: translateY(-2px);
  box-shadow: 8px 8px 18px rgba(0, 0, 0, 0.6), -5px -5px 14px rgba(255, 255, 255, 0.06);
}
[data-theme="theme-claymorphism-soft"] .dial-key:active {
  box-shadow: inset 5px 5px 10px rgba(0, 0, 0, 0.6), inset -2px -2px 6px rgba(255, 255, 255, 0.06);
  transform: scale(0.97);
}

/* --------------------------------------------------------------------------
   6. GLASSMORPHISM HOLOGRÁFICO (Cristal Translúcido e Aurora Prismática)
   -------------------------------------------------------------------------- */
[data-theme="theme-glass-hologram"],
html[data-theme="theme-glass-hologram"],
body[data-theme="theme-glass-hologram"] {
  --bg-main: #060913;
  --bg-card: rgba(18, 24, 48, 0.65);
  --bg-card-hover: rgba(28, 38, 72, 0.75);
  --bg-input: rgba(10, 14, 30, 0.8);
  --border-color: rgba(255, 255, 255, 0.22);
  --border-focus: #38bdf8;
  --primary: #38bdf8;
  --primary-hover: #0284c7;
  --primary-glow: rgba(56, 189, 248, 0.45);
  --success: #34d399;
  --danger: #f43f5e;
  --text-main: #ffffff;
  --text-muted: #cbd5e1;
  --text-dim: #94a3b8;
  --blur-glass: blur(28px);
}
body[data-theme="theme-glass-hologram"] {
  background-color: #060913;
  background-image: 
    radial-gradient(circle at 20% 15%, rgba(56, 189, 248, 0.25) 0%, transparent 45%),
    radial-gradient(circle at 80% 80%, rgba(168, 85, 247, 0.25) 0%, transparent 45%),
    radial-gradient(circle at 50% 50%, rgba(236, 72, 153, 0.15) 0%, transparent 55%);
}
[data-theme="theme-glass-hologram"] .softphone-wrapper,
[data-theme="theme-glass-hologram"] .admin-container,
[data-theme="theme-glass-hologram"] .live-preview-box {
  background: rgba(18, 24, 48, 0.65);
  border: 1px solid rgba(255, 255, 255, 0.25);
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.8), 0 0 35px rgba(56, 189, 248, 0.2);
}
[data-theme="theme-glass-hologram"] .dial-key {
  background: rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid rgba(255, 255, 255, 0.15);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.25);
}
[data-theme="theme-glass-hologram"] .dial-key:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(56, 189, 248, 0.6);
  box-shadow: 0 6px 22px rgba(56, 189, 248, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.5);
}

/* --------------------------------------------------------------------------
   7. EMERALD MATRIX TELECOM (NOC / Central de Telecom Verde Esmeralda)
   -------------------------------------------------------------------------- */
[data-theme="theme-emerald-matrix"],
html[data-theme="theme-emerald-matrix"],
body[data-theme="theme-emerald-matrix"] {
  --bg-main: #030a08;
  --bg-card: rgba(8, 26, 20, 0.9);
  --bg-card-hover: rgba(14, 42, 32, 0.98);
  --bg-input: rgba(5, 18, 14, 0.95);
  --border-color: rgba(16, 185, 129, 0.3);
  --border-focus: #10b981;
  --primary: #10b981;
  --primary-hover: #059669;
  --primary-glow: rgba(16, 185, 129, 0.5);
  --success: #10b981;
  --danger: #f43f5e;
  --text-main: #ecfdf5;
  --text-muted: #6ee7b7;
  --text-dim: #34d399;
  --shadow-lg: 0 20px 35px rgba(0, 0, 0, 0.95), 0 0 30px rgba(16, 185, 129, 0.2);
}
body[data-theme="theme-emerald-matrix"] {
  background-color: #030a08;
  background-image: 
    radial-gradient(circle at 50% 20%, rgba(16, 185, 129, 0.2) 0%, transparent 50%),
    linear-gradient(rgba(16, 185, 129, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(16, 185, 129, 0.04) 1px, transparent 1px);
  background-size: 100% 100%, 25px 25px, 25px 25px;
}
[data-theme="theme-emerald-matrix"] .softphone-wrapper,
[data-theme="theme-emerald-matrix"] .admin-container,
[data-theme="theme-emerald-matrix"] .live-preview-box {
  background: rgba(8, 26, 20, 0.9);
  border: 1px solid rgba(16, 185, 129, 0.35);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.9), 0 0 25px rgba(16, 185, 129, 0.2);
}
[data-theme="theme-emerald-matrix"] .dial-key {
  background: rgba(11, 35, 26, 0.95);
  border: 1px solid rgba(16, 185, 129, 0.3);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.6), inset 0 1px 0 rgba(16, 185, 129, 0.25);
}
[data-theme="theme-emerald-matrix"] .dial-key:hover {
  border-color: #10b981;
  box-shadow: 0 0 18px rgba(16, 185, 129, 0.45);
}

/* --------------------------------------------------------------------------
   8. SUNSET CRIMSON 3D (Gradiente Fogo & Rubi)
   -------------------------------------------------------------------------- */
[data-theme="theme-sunset-crimson"],
html[data-theme="theme-sunset-crimson"],
body[data-theme="theme-sunset-crimson"] {
  --bg-main: #11060a;
  --bg-card: rgba(32, 14, 22, 0.9);
  --bg-card-hover: rgba(48, 20, 32, 0.98);
  --bg-input: rgba(22, 8, 14, 0.95);
  --border-color: rgba(249, 115, 22, 0.3);
  --border-focus: #f97316;
  --primary: #f97316;
  --primary-hover: #ea580c;
  --primary-glow: rgba(249, 115, 22, 0.45);
  --success: #10b981;
  --danger: #e11d48;
  --text-main: #fff1f2;
  --text-muted: #fecdd3;
  --text-dim: #fb7185;
  --shadow-lg: 0 20px 35px rgba(0, 0, 0, 0.85), 0 0 30px rgba(249, 115, 22, 0.2);
}
body[data-theme="theme-sunset-crimson"] {
  background-color: #11060a;
  background-image: 
    radial-gradient(circle at 20% 20%, rgba(249, 115, 22, 0.22) 0%, transparent 50%),
    radial-gradient(circle at 80% 80%, rgba(225, 29, 72, 0.22) 0%, transparent 50%);
}
[data-theme="theme-sunset-crimson"] .softphone-wrapper,
[data-theme="theme-sunset-crimson"] .admin-container,
[data-theme="theme-sunset-crimson"] .live-preview-box {
  background: rgba(32, 14, 22, 0.9);
  border: 1px solid rgba(249, 115, 22, 0.35);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.85), 0 0 25px rgba(249, 115, 22, 0.2);
}
[data-theme="theme-sunset-crimson"] .dial-key {
  background: linear-gradient(180deg, #30141f, #1e0b14);
  border: 1px solid rgba(249, 115, 22, 0.25);
  border-bottom: 3px solid #881337;
  box-shadow: 0 4px 0 #4c0519, 0 8px 16px rgba(0, 0, 0, 0.65);
}
[data-theme="theme-sunset-crimson"] .dial-key:hover {
  border-color: #f97316;
  box-shadow: 0 6px 0 #4c0519, 0 12px 20px rgba(249, 115, 22, 0.3);
  transform: translateY(-2px);
}
[data-theme="theme-sunset-crimson"] .dial-key:active {
  transform: translateY(3px);
  border-bottom-width: 1px;
  box-shadow: 0 1px 0 #4c0519, 0 2px 4px rgba(0, 0, 0, 0.5);
}

/* --------------------------------------------------------------------------
   9. COSMIC NEBULA & VIOLET (Púrpura Estelar 3D)
   -------------------------------------------------------------------------- */
[data-theme="theme-cosmic-purple"],
html[data-theme="theme-cosmic-purple"],
body[data-theme="theme-cosmic-purple"] {
  --bg-main: #0b0515;
  --bg-card: rgba(26, 14, 46, 0.9);
  --bg-card-hover: rgba(40, 22, 68, 0.98);
  --bg-input: rgba(16, 8, 28, 0.95);
  --border-color: rgba(168, 85, 247, 0.3);
  --border-focus: #a855f7;
  --primary: #8b5cf6;
  --primary-hover: #7c3aed;
  --primary-glow: rgba(139, 92, 246, 0.45);
  --success: #10b981;
  --danger: #ef4444;
  --text-main: #faf5ff;
  --text-muted: #d8b4fe;
  --text-dim: #a855f7;
  --shadow-lg: 0 20px 35px rgba(0, 0, 0, 0.9), 0 0 35px rgba(139, 92, 246, 0.25);
}
body[data-theme="theme-cosmic-purple"] {
  background-color: #0b0515;
  background-image: 
    radial-gradient(circle at 15% 20%, rgba(139, 92, 246, 0.25) 0%, transparent 45%),
    radial-gradient(circle at 85% 85%, rgba(192, 132, 252, 0.18) 0%, transparent 50%),
    radial-gradient(circle at 50% 50%, rgba(76, 29, 149, 0.25) 0%, transparent 60%);
}
[data-theme="theme-cosmic-purple"] .softphone-wrapper,
[data-theme="theme-cosmic-purple"] .admin-container,
[data-theme="theme-cosmic-purple"] .live-preview-box {
  background: rgba(26, 14, 46, 0.9);
  border: 1px solid rgba(168, 85, 247, 0.35);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.9), 0 0 30px rgba(139, 92, 246, 0.25);
}
[data-theme="theme-cosmic-purple"] .dial-key {
  background: linear-gradient(180deg, #281544, #190c2c);
  border: 1px solid rgba(168, 85, 247, 0.3);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.55), inset 0 1px 0 rgba(255, 255, 255, 0.18);
}
[data-theme="theme-cosmic-purple"] .dial-key:hover {
  border-color: #c084fc;
  box-shadow: 0 0 20px rgba(192, 132, 252, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.3);
}

/* --------------------------------------------------------------------------
   10. CLEAN MINIMALIST LIGHT 3D (Modo Claro Corporativo 3D)
   -------------------------------------------------------------------------- */
[data-theme="theme-light-corporate"],
html[data-theme="theme-light-corporate"],
body[data-theme="theme-light-corporate"] {
  --bg-main: #edf2f7;
  --bg-card: rgba(255, 255, 255, 0.96);
  --bg-card-hover: #ffffff;
  --bg-input: #f8fafc;
  --border-color: rgba(15, 23, 42, 0.12);
  --border-focus: #2563eb;
  --primary: #2563eb;
  --primary-hover: #1d4ed8;
  --primary-glow: rgba(37, 99, 235, 0.25);
  --success: #059669;
  --danger: #dc2626;
  --text-main: #0f172a;
  --text-muted: #475569;
  --text-dim: #64748b;
  --shadow-lg: 0 20px 40px -10px rgba(15, 23, 42, 0.18), 0 2px 6px rgba(15, 23, 42, 0.08);
}
body[data-theme="theme-light-corporate"] {
  background-color: #edf2f7;
  background-image: 
    radial-gradient(circle at 10% 15%, rgba(37, 99, 235, 0.1) 0%, transparent 40%),
    radial-gradient(circle at 90% 85%, rgba(16, 185, 129, 0.08) 0%, transparent 45%),
    radial-gradient(circle at 50% 50%, rgba(99, 102, 241, 0.06) 0%, transparent 60%);
  color: #0f172a;
}
[data-theme="theme-light-corporate"] .softphone-wrapper,
[data-theme="theme-light-corporate"] .admin-container,
[data-theme="theme-light-corporate"] .live-preview-box {
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid rgba(15, 23, 42, 0.12);
  box-shadow: 0 25px 50px -12px rgba(15, 23, 42, 0.2);
  color: #0f172a;
}
[data-theme="theme-light-corporate"] .dial-key {
  background: #ffffff;
  border: 1px solid #cbd5e1;
  border-bottom: 3px solid #94a3b8;
  box-shadow: 0 4px 0 #64748b, 0 6px 12px rgba(0, 0, 0, 0.08);
  color: #0f172a;
}
[data-theme="theme-light-corporate"] .dial-key:hover {
  background: #f8fafc;
  transform: translateY(-2px);
  box-shadow: 0 6px 0 #64748b, 0 10px 16px rgba(0, 0, 0, 0.1);
}
[data-theme="theme-light-corporate"] .dial-key:active {
  transform: translateY(3px);
  border-bottom-width: 1px;
  box-shadow: 0 1px 0 #64748b, 0 2px 4px rgba(0, 0, 0, 0.06);
}
[data-theme="theme-light-corporate"] .tabs-nav {
  background: #f1f5f9;
}
[data-theme="theme-light-corporate"] .tab-btn.active {
  background: #ffffff;
  color: #0f172a;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
}
[data-theme="theme-light-corporate"] .btn-admin-nav {
  background: #f8fafc;
  border-color: #cbd5e1;
  color: #334155;
}
[data-theme="theme-light-corporate"] .btn-admin-nav:hover {
  color: #0f172a;
  background: #e2e8f0;
}
[data-theme="theme-light-corporate"] .admin-card-block {
  background: #f8fafc;
  border-color: #cbd5e1;
}
[data-theme="theme-light-corporate"] .preview-box {
  background: #ffffff;
}
[data-theme="theme-light-corporate"] .active-call-overlay {
  background: rgba(248, 250, 252, 0.98);
  color: #0f172a;
}
[data-theme="theme-light-corporate"] .active-call-overlay .caller-name {
  color: #0f172a;
}


/* ==========================================================================
   ADMIN - GRID DE SELEÇÃO DOS 10 ESTILOS VISUAIS E SIMULADOR AO VIVO
   ========================================================================== */
.admin-grid-layout {
  display: grid;
  grid-template-columns: 1fr 400px;
  gap: 28px;
  align-items: start;
}

@media (max-width: 1080px) {
  .admin-grid-layout {
    grid-template-columns: 1fr;
  }
}

.admin-main-col {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.admin-preview-col {
  position: sticky;
  top: 24px;
}

.live-preview-box {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 20px;
  box-shadow: var(--shadow-lg);
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.live-preview-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border-color);
}

.live-preview-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(16, 185, 129, 0.15);
  color: var(--success);
  border: 1px solid rgba(16, 185, 129, 0.3);
  padding: 4px 10px;
  border-radius: var(--radius-full);
  font-size: 0.75rem;
  font-weight: 700;
}

.live-preview-softphone {
  background: var(--bg-main);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  box-shadow: inset 0 2px 10px rgba(0, 0, 0, 0.4);
}

.themes-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  margin-top: 12px;
}

@media (max-width: 680px) {
  .themes-grid {
    grid-template-columns: 1fr;
  }
}

.theme-card-option {
  position: relative;
  border: 2px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 14px;
  background: var(--bg-card);
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap: 10px;
  user-select: none;
  transition: border-color 0.15s ease, background 0.15s ease, box-shadow 0.15s ease;
}

.theme-card-option:hover {
  border-color: rgba(255, 255, 255, 0.35);
  background: var(--bg-card-hover);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.3);
}

.theme-card-option.selected {
  border-color: var(--primary);
  background: var(--bg-card-hover);
  box-shadow: 0 0 0 2px var(--primary), 0 6px 18px rgba(0, 0, 0, 0.4);
}

.theme-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.theme-card-title {
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--text-main);
  display: flex;
  align-items: center;
  gap: 8px;
}

.theme-custom-radio {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 2px solid var(--text-dim);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
  flex-shrink: 0;
}

.theme-card-option.selected .theme-custom-radio {
  border-color: var(--primary);
  background: var(--primary);
  box-shadow: 0 0 8px var(--primary-glow);
}

.theme-custom-radio::after {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #ffffff;
  display: none;
}

.theme-card-option.selected .theme-custom-radio::after {
  display: block;
}

.theme-card-badge {
  font-size: 0.65rem;
  font-weight: 600;
  text-transform: uppercase;
  padding: 2px 6px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-muted);
}

.theme-card-option.selected .theme-card-badge {
  background: var(--primary);
  color: #ffffff;
}

.theme-preview-strip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(0, 0, 0, 0.25);
  border-radius: var(--radius-sm);
  padding: 8px 12px;
  gap: 10px;
  pointer-events: none;
}

.theme-dots-palette {
  display: flex;
  gap: 5px;
}

.theme-color-dot {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.theme-mini-btn {
  font-size: 0.72rem;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 6px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.theme-card-desc {
  font-size: 0.75rem;
  color: var(--text-muted);
  line-height: 1.35;
  pointer-events: none;
}

.theme-radio-native {
  position: absolute;
  opacity: 0;
  width: 100%;
  height: 100%;
  top: 0;
  left: 0;
  margin: 0;
  cursor: pointer;
  z-index: 2;
}

