/* Minimalist Phone Styling (macOS inspired) */

:root {
  --bg-dark: #0f172a;
  --window-bg: #1e293b;
  --header-bg: #334155;
  --traffic-red: #ff5f56;
  --traffic-yellow: #ffbd2e;
  --traffic-green: #27c93f;
  --text-primary: #f1f5f9;
  --text-secondary: #94a3b8;
  --accent-ok: #22c55e;
  --accent-danger: #ef4444;
  --accent-blue: #3b82f6;
  --panel-light: #1e293b;
  --border-color: rgba(255, 255, 255, 0.1);
}

body.minimal-app {
  background: radial-gradient(circle at top, #1e293b 0%, #0f172a 45%, #020617 100%);
  height: 100vh;
  margin: 0;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding-top: 20px;
  font-family: 'Inter', -apple-system, blinkmacsystemfont, 'Segoe UI', roboto, oxygen, ubuntu, cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
}

.telephone-window {
  width: 300px;
  height: 530px;
  background: radial-gradient(circle at top, #1e293b 0%, #0f172a 100%);
  border-radius: 4px;
  overflow: hidden;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.6);
  display: flex;
  flex-direction: column;
  position: relative;
  border: 1px solid rgba(148, 163, 184, 0.15);
}

/* Header & Traffic Lights */
/* Header and Icons removed as per index.php change */
.btn-window-action {
    background: transparent !important;
    border: none !important;
    outline: none !important;
    box-shadow: none !important;
    padding: 0;
    cursor: pointer;
    line-height: 1;
}

.system-clock { display: none; }

/* Status Capsules */
.status-capsules {
    display: flex;
    justify-content: center;
    gap: 40px;
    padding: 12px 0;
    background: rgba(0, 0, 0, 0.1);
}

/* Status Capsules */
.badge-capsule {
    background: rgba(0, 0, 0, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 4px;
    padding: 3px 12px;
    font-size: 0.65rem;
    font-weight: 700;
    color: #ffffff;
    display: flex;
    align-items: center;
    gap: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.3);
    letter-spacing: 0.3px;
    height: 28px;
    transition: all 0.3s ease;
    
    /* Efeito Corrente Elétrica */
    position: relative;
    z-index: 1;
    overflow: hidden;
}

.badge-capsule::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 250%; /* Ligeiramente maior para cobrir melhor as quinas */
    height: 500%;
    /* Gradiente com a cor base fixa + raio de luz (highlight) */
    background: conic-gradient(
        from 0deg, 
        var(--status-color, #475569) 0deg 320deg, 
        var(--status-highlight, #94a3b8) 320deg 360deg
    );
    animation: electric-spin 3s linear infinite;
    z-index: -2;
    filter: blur(0.5px);
}

.badge-capsule::after {
    content: '';
    position: absolute;
    inset: 1px;
    background: #000;
    border-radius: 3px;
    z-index: -1;
}

.badge-capsule.online { 
    --status-color: #065f46; 
    --status-highlight: #065f46; 
    box-shadow: 0 0 1px rgba(16, 185, 129, 0.1); 
    animation: pulse-badge-green 5s infinite ease-in-out;
}
.badge-capsule.online::before {
    animation: none;
}

.badge-capsule.offline { 
    --status-color: #1e293b; 
    --status-highlight: #1e293b; 
    color: rgba(255, 255, 255, 0.4);
}
.badge-capsule.offline::before {
    animation: none; 
}

@keyframes pulse-badge-green {
    0% { box-shadow: 0 0 2px rgba(16, 185, 129, 0.15); }
    50% { box-shadow: 0 0 6px rgba(16, 185, 129, 0.45); }
    100% { box-shadow: 0 0 2px rgba(16, 185, 129, 0.15); }
}
.badge-capsule.failed { 
    --status-color: #7f1d1d; 
    --status-highlight: #ef4444; 
    box-shadow: 0 0 10px rgba(239, 68, 68, 0.05); 
}
.badge-capsule.ringing { 
    --status-color: #92400e; 
    --status-highlight: #fbbf24; 
    animation: pulse-border 1.5s infinite; 
}

.badge-capsule.ringing::before {
    animation: electric-spin 1.5s linear infinite; 
}


.badge-capsule.connecting {
    --status-color: #facc15; 
    --status-highlight: #713f12; 
}
.badge-capsule.connecting::before {
    animation: electric-spin 0.8s linear infinite; 
}

@keyframes electric-spin {
    from { transform: translate(-50%, -50%) rotate(0deg); }
    to { transform: translate(-50%, -50%) rotate(360deg); }
}

@keyframes pulse-border {
  0% { box-shadow: 0 0 0 0 rgba(245, 158, 11, 0.4); }
  70% { box-shadow: 0 0 0 6px rgba(245, 158, 11, 0); }
  100% { box-shadow: 0 0 0 0 rgba(245, 158, 11, 0); }
}



/* Novo: Botão de Power (Atalho Login) */
.btn-power-toggle {
    width: 27px;
    height: 27px;
    background: radial-gradient(circle at center, rgba(30, 41, 59, 0.9) 0%, rgba(15, 23, 42, 1) 100%);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 50%;
    color: #64748b;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.05rem;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.2);
    box-shadow: 0 2px 8px rgba(0,0,0,0.5), inset 0 1px 1px rgba(255,255,255,0.05);
    padding: 0;
    outline: none !important;
    position: relative;
    z-index: 10;
}

.btn-power-inner {
    position: absolute;
    inset: 0;
    border-radius: 50%;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1;
}

.btn-power-inner::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 200%;
    height: 400%;
    background: conic-gradient(from 0deg, transparent 0 340deg, var(--status-highlight, #3b82f6) 340deg 360deg);
    opacity: 0;
    z-index: -2;
    transition: opacity 0.3s ease;
}

.btn-power-toggle:hover .btn-power-inner::before {
    animation: electric-spin 1s linear infinite;
    opacity: 1;
}

.btn-power-inner::after {
    content: '';
    position: absolute;
    inset: 1px;
    background: #000;
    border-radius: 50%;
    z-index: -1;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.btn-power-toggle:hover .btn-power-inner::after {
    opacity: 1;
}

.btn-power-toggle:hover {
    color: #ffffff;
    border-color: rgba(59, 130, 246, 0.2);
    box-shadow: 0 0 15px rgba(59, 130, 246, 0.15), 0 2px 8px rgba(0,0,0,0.5);
    transform: scale(1.05);
    --status-highlight: #3b82f6;
}

.btn-power-toggle.connecting .btn-power-inner::before,
.btn-power-toggle.connecting .btn-power-inner::after {
    opacity: 0 !important;
    animation: none !important;
}

.btn-power-toggle.active {
    color: #10b981;
    border-color: #10b981;
    box-shadow: none !important;
    text-shadow: none !important;
    animation: none !important;
    transform: none !important;
    transition: none !important;
}

/* Desativa o giro e qualquer efeito interno quando logado */
.btn-power-toggle.active .btn-power-inner::before,
.btn-power-toggle.active .btn-power-inner::after {
    opacity: 0 !important;
    animation: none !important;
}

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

.btn-hint {
  position: absolute;
  bottom: 150%;
  left: 50%;
  transform: translateX(-50%) scale(0.9);
  background: #000000;
  color: #ffffff;
  padding: 4px 11px;
  border-radius: 5px;
  font-size: 0.60rem;
  font-weight: 800;
  text-transform: none;
  letter-spacing: 0.5px;
  white-space: nowrap;
  opacity: 0;
  visibility: hidden;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  pointer-events: none;
  z-index: 1000;
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 4px 12px rgba(0,0,0,0.8);
}

/* Tooltip Arrow */
.btn-hint::after {
  content: '';
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  border-width: 5px;
  border-style: solid;
  border-color: #000000 transparent transparent transparent;
}

.btn-power-toggle:hover .btn-hint {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) scale(1);
}

/* Modal Inativo no Histórico */
.history-overlay-inactive {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.05);
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: all;
  border: 1px solid rgba(255, 255, 255, 0.03);
}

/* Dialer Row Layout (Horizontal & Compact) */
.dialer-wrapper {
    background: transparent;
}

.dialer-row {
    max-width: 380px;
    margin: 0 auto;
}

.dial-subtitle {
    color: #ffffff !important;
    font-weight: 500;
    font-size: 0.54rem;
    opacity: 0.6;
    margin-top: 6px;
}

.dial-input-box {
    background: #020617;
    border: 1px solid #000;
    border-radius: 4px;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    padding-top: 25px;
    height: 90px;
    width: 100%;
}

.dial-input-box input {
    font-size: 1.4rem !important;
    font-weight: 700;
    width: 100%;
    z-index: 5 !important;
}

.dialer-action-btn {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    border: none;
    color: white;
    font-size: 0.77rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    box-shadow: 0 2px 5px rgba(0,0,0,0.4);
    z-index: 110 !important; /* Force priority over input and overlays */
}

.dialer-action-btn:hover {
    filter: brightness(1.3);
    box-shadow: 0 5px 12px rgba(0,0,0,0.6);
}

.dialer-action-btn:disabled {
    opacity: 0.2;
    filter: grayscale(1);
    cursor: default;
    pointer-events: none;
    box-shadow: none;
}

#destino::placeholder {
    color: rgba(255, 255, 255, 0.2) !important;
}

/* Call Dynamic Animations: Smooth Pulsing instead of Vibrate */
@keyframes pulsar-suave {
  0% { 
    transform: translateY(-50%) scale(1); 
    box-shadow: 0 0 0 0 rgba(74, 222, 128, 0.4); 
  }
  70% { 
    transform: translateY(-50%) scale(1.1); 
    box-shadow: 0 0 0 8px rgba(74, 222, 128, 0);
  }
  100% { 
    transform: translateY(-50%) scale(1); 
    box-shadow: 0 0 0 0 rgba(74, 222, 128, 0);
  }
}

@keyframes pulsar-azul {
  0% { 
    transform: translateY(-50%) scale(1); 
    box-shadow: 0 0 0 0 rgba(59, 130, 246, 0.4); 
  }
  70% { 
    transform: translateY(-50%) scale(1.1); 
    box-shadow: 0 0 0 10px rgba(59, 130, 246, 0);
  }
  100% { 
    transform: translateY(-50%) scale(1); 
    box-shadow: 0 0 0 0 rgba(59, 130, 246, 0);
  }
}

.pulsing-calling {
  animation: pulsar-suave 1.5s ease-out infinite !important;
  pointer-events: none !important;
}

.pulsar-alerta {
  animation: pulsar-suave 1.5s ease-out infinite !important;
  pointer-events: auto !important; /* Explicitly allow clicks */
}

.talking-state {
  background-color: #3b82f6 !important; 
  animation: pulsar-azul 2s ease-out infinite !important;
  pointer-events: none !important;
}

.talking-state i::before {
    content: "\f611" !important; /* bi-volume-up-fill (Bootstrap icon code) */
    font-family: "bootstrap-icons" !important;
}

/* Alternative: bi-waveform or similar if using custom glyphs, 
   for now we use bi-volume-up-fill via JS or CSS content swap */

/* PWA Standalone Mode Adjustments (Native Feel) */
@media (display-mode: standalone) {
  body.minimal-app {
    display: block; 
    background: var(--window-bg);
    overflow: hidden; /* Avoid body scroll */
    user-select: none; /* No text cursor */
    -webkit-user-select: none;
  }
  
  .telephone-window {
    width: 100vw !important;
    height: 100vh !important;
    border-radius: 0;
    margin: 0;
    max-width: none;
    max-height: none;
    border: none;
    box-shadow: none;
  }

  /* Make header draggable like a native window title bar */
  .window-header {
      -webkit-app-region: drag;
      cursor: default;
      height: 38px;
      padding-top: 4px;
  }
  
  /* Make buttons clickable again (exclude from drag) */
  .window-header button,
  .window-header .btn-close-settings {
      -webkit-app-region: no-drag;
  }

  .history-section {
      flex-grow: 1;
      overflow-y: auto;
  }
}

/* Video Overlay Styles */
.video-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(15, 23, 42, 0.85);
    backdrop-filter: blur(8px);
    z-index: 9998;
}

.video-overlay {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 600px;
    height: 480px;
    background: #000;
    z-index: 9999;
    border-radius: 4px;
    overflow: hidden;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.7);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.video-container {
    width: 100%;
    height: 100%;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.remote-video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.local-video-pip {
    position: absolute;
    bottom: 20px;
    right: 20px;
    width: 120px;
    height: 160px;
    border-radius: 4px;
    border: 2px solid rgba(255, 255, 255, 0.2);
    object-fit: cover;
    background: #222;
    z-index: 10000;
}

.video-controls-bottom {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 10001;
}

.btn-circle {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
}
#btnCall { background: rgba(39, 201, 63, 0.2); color: var(--traffic-green); border: 1px solid rgba(39, 201, 63, 0.3); }
#btnHangup { background: rgba(239, 68, 68, 0.2); color: var(--traffic-red); border: 1px solid rgba(239, 68, 68, 0.3); }

#btnCall:hover, #btnVideoCall:hover, #btnHangup:hover { 
    transform: translateY(-50%) scale(1.2) !important; 
}

.history-section {
    background: transparent;
}

.history-tabs-header {
  background: rgba(0, 0, 0, 0.5);
  border-bottom: 1px solid rgba(148, 163, 184, 0.1);
  display: flex;
}

.history-tab-btn {
  flex: 1;
  height: 30px;
  background: transparent;
  border: none;
  font-size: 0.68rem;
  color: rgba(255, 255, 255, 0.5);
  padding: 0;
  font-weight: 700;
  border-bottom: 2px solid transparent;
  transition: all 0.2s ease;
  outline: none !important;
  letter-spacing: 0.5px;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

.history-tab-btn.active {
  color: #ffffff;
  border-bottom-color: #3b82f6;
  background: rgba(0, 0, 0, 0.3);
}

.tab-icon-left, .tab-icon-right {
  position: absolute;
  font-size: 0.75rem;
  opacity: 0.8;
  color: #ffffff;
}
.tab-icon-left { left: 10px; }
.tab-icon-right { right: 10px; }

.history-tab-btn:hover:not(.active) {
  color: rgba(255, 255, 255, 0.8);
  background: rgba(255, 255, 255, 0.02);
}

.history-tab-btn:hover:not(.active) {
  color: #fff;
}

.history-card-wrapper {
  background: rgba(15, 23, 42, 0.4);
  border: 1px solid #000;
  border-radius: 4px;
  overflow: hidden;
  height: 100%;
}

.history-scroll-inner {
  height: 100%;
  overflow-y: auto;
  padding: 4px 8px; /* Adjustment for consistency */
}

.history-scroll-inner::-webkit-scrollbar { width: 1px; }
.history-scroll-inner::-webkit-scrollbar-thumb { background: #000; border-radius: 10px; }
.history-scroll-inner::-webkit-scrollbar-thumb:hover { background: #000; }

.history-list {
    display: flex;
    flex-direction: column;
}

.history-card {
  display: flex;
  align-items: center;
  gap: 7px;
  background: transparent;
  border: none;
  border-bottom: 1px solid rgba(148, 163, 184, 0.05);
  padding: 4px 2px;
  margin-bottom: 0;
  height: 25px;
  transition: all 0.2s ease;
  cursor: pointer;
}

.history-card:hover {
    background: rgba(255, 255, 255, 0.04);
    transform: translateX(4px);
}

.history-card-icon {
  width: 14px;
  height: 14px;
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.43rem;
  flex-shrink: 0;
  margin-left: 2px;
}

.history-card-icon.type-video { color: #3b82f6; background: rgba(59, 130, 246, 0.1); }
.history-card-icon.type-audio { color: #10b981; background: rgba(16, 185, 129, 0.1); }
.history-card-icon.missed { color: #ef4444 !important; background: rgba(239, 68, 68, 0.1) !important; }

.history-card-time {
  font-size: 0.5rem;
  color: rgba(255, 255, 255, 0.4);
  line-height: 1;
  white-space: nowrap;
  flex-shrink: 0;
}

.history-card-number {
  flex: 1;
  text-align: center;
  font-weight: 700;
  font-size: 0.62rem;
  color: #fff;
  letter-spacing: 0px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  min-width: 0;
}

.history-card-duration {
  color: rgba(255, 255, 255, 0.25);
  font-size: 0.48rem;
  font-family: monospace;
  flex-shrink: 0;
  margin-right: 2px;
}

/* Incoming Call Overlay */
.incoming-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.6);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 100;
}

.incoming-card {
    width: 280px;
    background: var(--header-bg);
    border-radius: 4px;
    color: var(--text-primary);
    border: 1px solid var(--border-color);
}

.avatar-sm {
    width: 40px;
    height: 40px;
    font-size: 18px;
}

/* Settings Overlay - Cinematic Smoothness */
.settings-panel {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(15, 23, 42, 0.85);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    z-index: 150;
    display: flex;
    flex-direction: column;
    border-radius: 6px; /* Ajuste para 6px solicitado */
    
    /* Animation Properties */
    opacity: 0;
    visibility: hidden;
    transform: translateY(15px);
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.settings-panel.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.settings-header {
    height: 48px;
    background: rgba(0, 0, 0, 0.2);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    flex-shrink: 0;
    border-top-left-radius: 6px;
    border-top-right-radius: 6px;
}

.settings-body {
    flex: 1;
    overflow: hidden !important; /* Remoção total de scroll conforme solicitado */
    padding: 16px 14px;
}

.settings-footer {
    flex-shrink: 0;
    padding-bottom: 20px;
    background: transparent;
}

/* Hide scrollbar completely */
.settings-body::-webkit-scrollbar {
    display: none !important;
}
.settings-body::-webkit-scrollbar {
    width: 2px;
}
.settings-body::-webkit-scrollbar-thumb {
    background: #3b82f6;
    border-radius: 10px;
}
.settings-body::-webkit-scrollbar-track {
    background: transparent;
}

.settings-panel h5 {
    font-size: 0.85rem;
    letter-spacing: -0.2px;
}

/* Section title styles consolidated below in floating-legend section */

.settings-panel label {
    font-size: 0.52rem;
    color: rgba(255, 255, 255, 0.5) !important;
    font-weight: 600 !important;
    display: block;
    margin-bottom: 4px;
    text-transform: none; /* Changed to none for sentence case (HTML) */
    letter-spacing: 0.4px;
}

.settings-panel .form-control-sm, 
.settings-panel .form-select-sm {
    background-color: rgba(0, 0, 0, 0.4) !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    color: #f1f5f9 !important;
    height: 30px;
    font-size: 0.68rem;
    padding: 0 10px;
    transition: all 0.2s ease;
    border-radius: 4px;
}

.settings-panel .form-control-sm:focus,
.settings-panel .form-select-sm:focus {
    background-color: rgba(0, 0, 0, 0.6) !important;
    border-color: rgba(255, 255, 255, 0.3) !important;
    box-shadow: 0 0 10px rgba(255, 255, 255, 0.05) !important;
    outline: none;
}

.settings-panel .form-check-input {
    background-color: transparent;
    border: 1px solid rgba(255, 255, 255, 0.3) !important;
    cursor: pointer;
    width: 9px;
    height: 9px;
}

.settings-panel .form-check-input:checked {
    background-color: #ffffff !important;
    border-color: #ffffff !important;
    background-image: none !important; /* Remove the blue check icon if it lingers */
}

/* Custom check icon as a white dot when checked */
.settings-panel .form-check-input:checked::after {
    display: none;
}

.settings-panel .form-check-label {
    color: rgba(255, 255, 255, 0.6) !important;
    font-size: 0.54rem !important;
    text-transform: none !important;
    margin: 0 !important;
    cursor: pointer;
    transition: color 0.2s ease;
}

.settings-panel .form-check-label:hover {
    color: #ffffff !important;
}

.settings-panel hr {
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    margin: 20px 0;
    opacity: 1;
}

.cursor-pointer {
    cursor: pointer;
    transition: transform 0.1s ease, opacity 0.1s ease;
}
.cursor-pointer:hover {
    transform: scale(1.1);
    opacity: 0.8;
}
.settings-group {
    position: relative;
    margin-top: 24px;
}

.settings-group:first-of-type {
    margin-top: 14px;
}

.settings-card {
    background: rgba(0, 0, 0, 0.25);
    border: 1px solid rgba(255, 255, 255, 0.03);
    border-radius: 6px;
    padding: 14px;
    transition: all 0.3s ease;
}

.settings-card:hover {
    background: rgba(0, 0, 0, 0.35);
    border-color: rgba(255, 255, 255, 0.1);
}

.settings-panel h6.section-title {
    position: absolute;
    top: 0;
    left: 50%;
    transform: translate(-50%, -50%);
    color: #ffffff !important; /* Branco 100% conforme solicitado */
    font-size: 0.65rem; 
    font-weight: 800;
    letter-spacing: 0.8px;
    text-transform: uppercase !important;
    margin-bottom: 0 !important;
    opacity: 1;
    z-index: 10;
    
    /* Geometria Refinada: Fundo preto e raio de 5px */
    background: #000000; /* Fundo preto solicitado */
    padding: 3px 11px;
    border: none;
    border-radius: 5px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
    
    width: auto;
    white-space: nowrap;
}

.cursor-pointer:active {
    transform: scale(0.95);
}

/* Specific buttons inside settings */
#btnRegister.btn-primary {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    border: none;
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
}


#btnUnregister.btn-outline-secondary {
    border-color: rgba(255, 255, 255, 0.2);
    background: transparent;
}

#btnUnregister.btn-outline-secondary:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.4);
}

#btnNotify {
    border: 1px solid #0ea5e9;
    color: #0ea5e9;
    background: rgba(14, 165, 233, 0.05);
}

#btnNotify:hover {
    background: rgba(14, 165, 233, 0.15);
}
.history-section::-webkit-scrollbar {
    width: 6px;
}
.history-section::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
}
.history-section::-webkit-scrollbar-track {
    background: transparent;
}
/* ANIMAÇÃO DA ROLDANA DE CONFIGURAÇÕES */
@keyframes gear-spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

#btnOpenSettings:hover i {
  display: inline-block;
  animation: icon-swing 0.8s ease-in-out infinite alternate;
  color: #fff !important;
  text-shadow: 0 0 8px rgba(255, 255, 255, 0.5);
}

#btnToggleDialPad:hover i {
  display: inline-block;
  color: #fff !important;
}

#btnToggleDialPad:hover i.bi-grid-3x3-gap-fill {
  animation: icon-swing 0.8s ease-in-out infinite alternate;
}

#btnToggleDialPad:hover i.bi-view-list {
  animation: icon-swing 0.8s ease-in-out infinite alternate;
}

@keyframes icon-swing {
  from { transform: rotate(-8deg) scale(1.1); }
  to { transform: rotate(8deg) scale(1.1); }
}

/* Numeric Pad (Dialpad) Styling */
.numeric-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
    justify-items: center;
    max-width: 260px;
    margin: 0 auto;
}

.num-key {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.06);
    color: #fff;
    font-size: 1.55rem;
    font-weight: 500;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    line-height: 1.1;
    transition: all 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    cursor: pointer;
    position: relative;
    padding: 0;
    outline: none !important;
}

.num-key:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.15);
    transform: scale(1.1);
    box-shadow: 0 4px 15px rgba(0,0,0,0.3);
}

.num-key:active {
    background: rgba(59, 130, 246, 0.3);
    border-color: rgba(59, 130, 246, 0.5);
    transform: scale(0.9);
}

.num-sub {
    font-size: 0.48rem;
    font-weight: 800;
    opacity: 0.4;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-top: -2px;
}

.dialpad-card-wrapper {
    background: rgba(15, 23, 42, 0.4);
    border: 1px solid #000;
    border-radius: 4px;
    height: 100%;
    box-shadow: inset 0 0 20px rgba(0,0,0,0.2);
    position: relative;
}

.dialpad-btn-clear {
    position: absolute;
    bottom: 0px;
    right: 3px;
    width: 32px;
    height: 32px;
    background: transparent;
    border: none;
    color: var(--traffic-red, #ff5f56);
    opacity: 0.5;
    font-size: 1.15rem;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    outline: none !important;
}

.dialpad-btn-clear:hover {
    opacity: 1;
    color: #ff5f56;
    transform: scale(1.15);
}
