/* ==========================================================================
   CONFIGURAÇÃO DE DESIGN SYSTEM E ESTILOS GERAIS
   ========================================================================== */
:root {
    --bg-dark: #070913;
    --panel-bg: rgba(20, 26, 46, 0.45);
    --panel-border: rgba(255, 255, 255, 0.08);
    --panel-border-glow: rgba(0, 242, 254, 0.15);
    
    --text-primary: #f3f4f6;
    --text-secondary: #9ca3af;
    --text-muted: #6b7280;
    
    --accent-blue: #00d2ff;
    --accent-purple: #9d4edd;
    --accent-green: #10b981;
    --accent-green-glow: rgba(16, 185, 129, 0.35);
    --accent-red: #f43f5e;
    --accent-red-glow: rgba(244, 63, 94, 0.35);
    --accent-warning: #fbbf24;
    
    --transition-fast: 0.15s ease;
    --transition-normal: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    
    --font-sans: 'Inter', system-ui, -apple-system, sans-serif;
}

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

body {
    font-family: var(--font-sans);
    background-color: var(--bg-dark);
    color: var(--text-primary);
    min-height: 100vh;
    overflow-x: hidden;
    display: flex;
    justify-content: center;
    align-items: center;
}

/* ==========================================================================
   GRADIENTES DE FUNDO ANIMADOS (Premium Visuals)
   ========================================================================== */
.bg-gradient-spheres {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    overflow: hidden;
    background: radial-gradient(circle at 50% 50%, #0c0f24 0%, #05060d 100%);
}

.sphere {
    position: absolute;
    border-radius: 50%;
    filter: blur(140px);
    opacity: 0.45;
    animation: rotateSpheres 25s infinite alternate ease-in-out;
}

.sphere-1 {
    top: -10%;
    left: -10%;
    width: 50vw;
    height: 50vw;
    background: radial-gradient(circle, var(--accent-blue) 0%, rgba(0, 210, 255, 0) 70%);
}

.sphere-2 {
    bottom: -15%;
    right: -5%;
    width: 60vw;
    height: 60vw;
    background: radial-gradient(circle, var(--accent-purple) 0%, rgba(157, 78, 221, 0) 70%);
    animation-delay: -5s;
}

.sphere-3 {
    top: 30%;
    right: 25%;
    width: 35vw;
    height: 35vw;
    background: radial-gradient(circle, rgba(16, 185, 129, 0.4) 0%, rgba(16, 185, 129, 0) 70%);
    animation-delay: -10s;
}

@keyframes rotateSpheres {
    0% {
        transform: translate(0, 0) scale(1);
    }
    50% {
        transform: translate(8%, 5%) scale(1.1);
    }
    100% {
        transform: translate(-5%, -8%) scale(0.9);
    }
}

/* ==========================================================================
   ESTRUTURA DA APLICAÇÃO (Grid Layout)
   ========================================================================== */
.app-container {
    width: 92vw;
    max-width: 1350px;
    height: 92vh;
    max-height: 900px;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

/* Header Estilos */
.app-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 5px 0;
}

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

.brand-icon {
    font-size: 2rem;
    background: linear-gradient(135deg, var(--accent-blue), var(--accent-purple));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    filter: drop-shadow(0 0 10px rgba(0, 210, 255, 0.3));
}

.brand-text h1 {
    font-size: 1.45rem;
    font-weight: 700;
    letter-spacing: -0.5px;
    background: linear-gradient(to right, #ffffff, #d1d5db);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

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

/* Controles de Conexão Híbridos */
.connection-controls {
    display: flex;
    align-items: center;
    gap: 12px;
}

.connection-mode-selector {
    display: flex;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--panel-border);
    border-radius: 12px;
    padding: 3px;
    gap: 2px;
}

.btn-mode {
    background: none;
    border: none;
    color: var(--text-secondary);
    padding: 6px 12px;
    border-radius: 9px;
    font-family: var(--font-sans);
    font-size: 0.78rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: var(--transition-fast);
}

.btn-mode:hover {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.02);
}

.btn-mode.active {
    background: linear-gradient(135deg, var(--accent-blue) 0%, var(--accent-purple) 100%);
    color: #ffffff;
    box-shadow: 0 4px 10px rgba(0, 210, 255, 0.15);
}

/* Botão de Download do APK Android */
.btn-download-apk {
    background: linear-gradient(135deg, #a4c639 0%, #76951c 100%) !important;
    color: #ffffff !important;
    border: none !important;
    border-radius: 12px !important;
    padding: 7px 14px !important;
    font-size: 0.78rem !important;
    font-weight: 600 !important;
    box-shadow: 0 4px 10px rgba(164, 198, 57, 0.25) !important;
    transition: all 0.2s ease !important;
    text-decoration: none !important;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.btn-download-apk:hover {
    background: linear-gradient(135deg, #b5db3f 0%, #76951c 100%) !important;
    box-shadow: 0 5px 14px rgba(164, 198, 57, 0.4) !important;
    transform: translateY(-1px);
}

/* Card de Status do Dispositivo */
.device-status-card {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--panel-border);
    backdrop-filter: blur(10px);
    border-radius: 12px;
    padding: 6px 14px;
    display: flex;
    align-items: center;
    gap: 10px;
    transition: var(--transition-normal);
}

.device-status-card:hover {
    border-color: var(--panel-border-glow);
    background: rgba(255, 255, 255, 0.06);
}

.status-indicator-ring {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    background: rgba(255, 255, 255, 0.03);
}

.status-dot {
    width: 9px;
    height: 9px;
    border-radius: 50%;
    display: inline-block;
    transition: var(--transition-normal);
}

.status-connected {
    background-color: var(--accent-green);
    box-shadow: 0 0 10px var(--accent-green);
}

.status-disconnected {
    background-color: var(--accent-red);
    box-shadow: 0 0 10px var(--accent-red);
}

.status-unauthorized {
    background-color: var(--accent-warning);
    box-shadow: 0 0 10px var(--accent-warning);
}

.device-info {
    display: flex;
    flex-direction: column;
}

.device-model {
    font-size: 0.85rem;
    font-weight: 600;
}

.device-status-text {
    font-size: 0.72rem;
    color: var(--text-secondary);
}

/* Main Layout */
.app-content {
    flex: 1;
    display: grid;
    grid-template-columns: 1.45fr 1fr;
    gap: 18px;
    min-height: 0;
}

/* Painéis de Vidro (Glassmorphism) */
.panel {
    border-radius: 20px;
    border: 1px solid var(--panel-border);
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 16px;
    min-height: 0;
    transition: var(--transition-normal);
}

.panel.glass {
    background: var(--panel-bg);
    backdrop-filter: blur(25px);
    -webkit-backdrop-filter: blur(25px);
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
}

.panel:hover {
    border-color: rgba(255, 255, 255, 0.12);
}

.panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.panel-header h2 {
    font-size: 1.1rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
    color: #ffffff;
}

.panel-header h2 i {
    color: var(--accent-blue);
}

.badge {
    background: rgba(0, 210, 255, 0.12);
    color: var(--accent-blue);
    border: 1px solid rgba(0, 210, 255, 0.2);
    padding: 3px 9px;
    border-radius: 20px;
    font-size: 0.72rem;
    font-weight: 600;
}

/* ==========================================================================
   ÁREA DE UPLOAD COMPACTA (Foco e prioridade nos números!)
   ========================================================================== */
.upload-area {
    border: 2px dashed rgba(255, 255, 255, 0.12);
    border-radius: 12px;
    padding: 16px;
    text-align: center;
    cursor: pointer;
    background: rgba(255, 255, 255, 0.01);
    transition: var(--transition-normal);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.upload-area.compact {
    padding: 10px 16px;
    width: 100%;
    align-items: flex-start;
}

.upload-compact-content {
    display: flex;
    align-items: center;
    gap: 15px;
    text-align: left;
    width: 100%;
}

.upload-compact-content h3 {
    font-size: 0.88rem;
    font-weight: 600;
    color: #ffffff;
}

.upload-compact-content p {
    font-size: 0.75rem;
    color: var(--text-secondary);
}

.upload-icon {
    font-size: 1.6rem;
    color: var(--text-secondary);
    transition: var(--transition-fast);
}

.upload-area:hover {
    border-color: var(--accent-blue);
    background: rgba(0, 210, 255, 0.03);
    box-shadow: inset 0 0 10px rgba(0, 210, 255, 0.05);
}

.upload-area:hover .upload-icon {
    color: var(--accent-blue);
    transform: translateY(-2px);
}

/* ==========================================================================
   PAINEL DO AUTO-DISCADOR SEMI-AUTOMÁTICO
   ========================================================================== */
.auto-dialer-panel {
    background: rgba(10, 15, 30, 0.6);
    border: 1px solid rgba(0, 242, 254, 0.12);
    border-radius: 14px;
    padding: 8px 12px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.25);
    transition: var(--transition-normal);
}

.auto-dialer-panel.active-counting {
    border-color: rgba(0, 242, 254, 0.35);
    box-shadow: 0 4px 20px rgba(0, 242, 254, 0.12);
}

.auto-dialer-panel.paused {
    border-color: rgba(244, 63, 94, 0.3);
    box-shadow: 0 4px 20px rgba(244, 63, 94, 0.08);
}

.auto-dialer-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.auto-dialer-title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.85rem;
    font-weight: 600;
    color: #ffffff;
}

.auto-dialer-title i {
    color: var(--accent-blue);
    font-size: 0.95rem;
}

.auto-dialer-toggle {
    display: flex;
    align-items: center;
    gap: 8px;
}

.toggle-status-label {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-muted);
    min-width: 70px;
    transition: var(--transition-fast);
}

.auto-dialer-panel.active-counting .toggle-status-label {
    color: var(--accent-blue);
}

.auto-dialer-panel.paused .toggle-status-label {
    color: var(--accent-red);
}

.auto-dialer-controls-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
}

/* Display de LED do Cronômetro */
.timer-display-box {
    background: rgba(0, 0, 0, 0.45);
    border: 1px solid rgba(255, 255, 255, 0.05);
    padding: 4px 10px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 60px;
    box-shadow: inset 0 0 10px rgba(0, 0, 0, 0.6);
}

.timer-countdown {
    font-family: monospace, var(--font-sans);
    font-size: 1.35rem;
    font-weight: 700;
    color: var(--text-muted);
    letter-spacing: -0.5px;
    transition: var(--transition-fast);
    line-height: 1;
}

.auto-dialer-panel.active-counting .timer-countdown {
    color: var(--accent-blue);
    text-shadow: 0 0 8px rgba(0, 210, 255, 0.6);
}

.auto-dialer-panel.paused .timer-countdown {
    color: var(--accent-red);
    text-shadow: 0 0 8px rgba(244, 63, 94, 0.6);
    animation: blinkPaused 1s infinite alternate;
}

@keyframes blinkPaused {
    0% { opacity: 0.3; }
    100% { opacity: 1; }
}

.timer-unit {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-muted);
    margin-left: 2px;
}

/* Botão de Pausa e Play */
.btn-pause-play {
    flex: 1;
    font-family: var(--font-sans);
    font-size: 0.82rem;
    font-weight: 600;
    border: none;
    border-radius: 8px;
    padding: 6px 12px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    transition: all 0.2s ease;
    color: #ffffff;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.btn-pause-play:disabled {
    opacity: 0.3;
    cursor: not-allowed;
    background: rgba(255, 255, 255, 0.01) !important;
    border-color: rgba(255, 255, 255, 0.02) !important;
    box-shadow: none !important;
}

/* Estilo quando pronto para pausar */
.btn-pause-play.active-pause {
    background: linear-gradient(135deg, var(--accent-red) 0%, #be123c 100%);
    box-shadow: 0 4px 12px var(--accent-red-glow);
}

.btn-pause-play.active-pause:hover {
    background: linear-gradient(135deg, #fb7185 0%, #be123c 100%);
    box-shadow: 0 4px 15px rgba(244, 63, 94, 0.5);
    transform: translateY(-1px);
}

/* Estilo quando pausado, pronto para retomar/despausar */
.btn-pause-play.active-resume {
    background: linear-gradient(135deg, var(--accent-green) 0%, #047857 100%);
    box-shadow: 0 4px 12px var(--accent-green-glow);
}

.btn-pause-play.active-resume:hover {
    background: linear-gradient(135deg, #34d399 0%, #047857 100%);
    box-shadow: 0 4px 15px rgba(16, 185, 129, 0.5);
    transform: translateY(-1px);
}

/* Input do Intervalo */
.interval-input-group {
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.interval-input-group label {
    font-size: 0.65rem;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.interval-input-wrapper {
    display: flex;
    align-items: center;
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 8px;
    padding: 4px 8px;
    width: 65px;
}

.interval-input-wrapper input {
    width: 100%;
    background: none;
    border: none;
    color: #ffffff;
    font-family: var(--font-sans);
    font-size: 0.85rem;
    font-weight: 600;
    outline: none;
    text-align: center;
}

/* Remove setas de número */
.interval-input-wrapper input::-webkit-outer-spin-button,
.interval-input-wrapper input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.interval-input-wrapper span {
    font-size: 0.72rem;
    color: var(--text-muted);
    font-weight: 600;
}

/* ==========================================================================
   CONTROLES E TABELA DE CONTATOS (Maximizada para Números)
   ========================================================================== */
.list-controls {
    display: flex;
    gap: 12px;
    align-items: center;
}

.search-bar {
    position: relative;
    flex: 1;
}

.search-bar i {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    font-size: 0.8rem;
}

.search-bar input {
    width: 100%;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 8px;
    padding: 7px 12px 7px 34px;
    color: var(--text-primary);
    font-family: var(--font-sans);
    font-size: 0.8rem;
    outline: none;
    transition: var(--transition-fast);
}

.search-bar input:focus {
    border-color: var(--accent-blue);
    background: rgba(255, 255, 255, 0.05);
    box-shadow: 0 0 6px rgba(0, 210, 255, 0.12);
}

.action-buttons {
    display: flex;
    gap: 8px;
}

/* Tabela de Contatos (Mais espaço vertical para focar na tabela!) */
.contacts-table-wrapper {
    flex: 1;
    overflow-y: auto;
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    background: rgba(0, 0, 0, 0.15);
}

/* Custom Scrollbar */
.contacts-table-wrapper::-webkit-scrollbar {
    width: 6px;
}

.contacts-table-wrapper::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.01);
}

.contacts-table-wrapper::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.08);
    border-radius: 10px;
}

.contacts-table-wrapper::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.16);
}

.contacts-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.82rem;
    text-align: left;
}

.contacts-table th {
    background: rgba(255, 255, 255, 0.03);
    padding: 10px 14px;
    font-weight: 600;
    color: var(--text-secondary);
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    position: sticky;
    top: 0;
    z-index: 1;
}

.contacts-table td {
    padding: 9px 14px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.02);
    vertical-align: middle;
}

.contacts-table tbody tr {
    transition: var(--transition-fast);
}

.contacts-table tbody tr:hover {
    background: rgba(255, 255, 255, 0.02);
}

/* Estados da linha de contatos */
.contacts-table tbody tr.row-called {
    background: rgba(16, 185, 129, 0.03);
}

.contacts-table tbody tr.row-calling {
    background: rgba(0, 210, 255, 0.06);
    animation: pulseRow 1.5s infinite ease-in-out;
}

@keyframes pulseRow {
    0% { background: rgba(0, 210, 255, 0.03); }
    50% { background: rgba(0, 210, 255, 0.08); }
    100% { background: rgba(0, 210, 255, 0.03); }
}

/* Indicadores de Status */
.status-pill {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 2px 7px;
    border-radius: 10px;
    font-size: 0.7rem;
    font-weight: 500;
}

.status-pending {
    background: rgba(255, 255, 255, 0.04);
    color: var(--text-secondary);
}

.status-called {
    background: rgba(16, 185, 129, 0.12);
    color: var(--accent-green);
    border: 1px solid rgba(16, 185, 129, 0.15);
}

.status-active {
    background: rgba(0, 210, 255, 0.12);
    color: var(--accent-blue);
    border: 1px solid rgba(0, 210, 255, 0.15);
}

/* Placeholder */
.table-placeholder {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    gap: 12px;
    color: var(--text-secondary);
    padding: 30px;
}

.placeholder-icon {
    font-size: 2.5rem;
    color: var(--text-muted);
}

.table-placeholder p {
    font-size: 0.8rem;
    max-width: 300px;
}

/* ==========================================================================
   PAINEL DIREITO - DISCADOR MANUAL E AJUDA
   ========================================================================== */
.dialer-wrapper {
    display: flex;
    flex-direction: column;
    gap: 15px;
    align-items: center;
    max-width: 290px;
    margin: 0 auto;
    width: 100%;
}

/* Visor de Digitação */
.dialer-display-container {
    width: 100%;
    position: relative;
    display: flex;
    align-items: center;
}

#dialerDisplay {
    width: 100%;
    background: rgba(0, 0, 0, 0.25);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 10px;
    padding: 10px 38px 10px 12px;
    font-family: var(--font-sans);
    font-size: 1.25rem;
    font-weight: 600;
    color: #ffffff;
    letter-spacing: 0.5px;
    text-align: left;
    outline: none;
    transition: var(--transition-fast);
}

#dialerDisplay:focus {
    border-color: var(--accent-blue);
    box-shadow: 0 0 8px rgba(0, 210, 255, 0.12);
}

.btn-clear-char {
    position: absolute;
    right: 10px;
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 1rem;
    cursor: pointer;
    padding: 4px;
    border-radius: 4px;
    transition: var(--transition-fast);
}

.btn-clear-char:hover {
    color: var(--accent-red);
}

/* HUD de Chamada Ativa Premium */
.active-call-hud {
    width: 100%;
    background: rgba(16, 185, 129, 0.08);
    border: 1px solid rgba(16, 185, 129, 0.25);
    border-radius: 12px;
    padding: 10px 14px;
    display: flex;
    align-items: center;
    gap: 12px;
    animation: slideDownFade 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 15px rgba(16, 185, 129, 0.08);
    margin-bottom: 5px;
}

@keyframes slideDownFade {
    from {
        opacity: 0;
        transform: translateY(-8px) scale(0.98);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.hud-avatar {
    position: relative;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(16, 185, 129, 0.2);
    display: flex;
    justify-content: center;
    align-items: center;
    color: var(--accent-green);
    font-size: 0.95rem;
    flex-shrink: 0;
}

.hud-avatar .pulse-ring {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    border: 2px solid var(--accent-green);
    animation: wavePulse 1.8s infinite ease-out;
    opacity: 0;
}

@keyframes wavePulse {
    0% {
        transform: scale(1);
        opacity: 0.5;
    }
    100% {
        transform: scale(1.6);
        opacity: 0;
    }
}

.hud-details {
    display: flex;
    flex-direction: column;
    gap: 2px;
    flex: 1;
    min-width: 0;
}

.hud-name {
    font-size: 0.88rem;
    font-weight: 600;
    color: #ffffff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.hud-phone {
    font-size: 0.72rem;
    color: var(--text-secondary);
}

/* Teclado Numérico */
.dialer-keypad {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    width: 100%;
}

.dial-key {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.04);
    border-radius: 50%;
    width: 58px;
    height: 58px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    outline: none;
    transition: all 0.12s cubic-bezier(0.4, 0, 0.2, 1);
    user-select: none;
}

.dial-key:hover {
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(255, 255, 255, 0.12);
    transform: scale(1.03);
}

.dial-key:active, .dial-key.active {
    background: rgba(0, 210, 255, 0.08);
    border-color: var(--accent-blue);
    box-shadow: inset 0 0 6px rgba(0, 210, 255, 0.2);
    transform: scale(0.97);
}

.dial-key span:first-child {
    font-size: 1.3rem;
    font-weight: 500;
    color: #ffffff;
    line-height: 1.1;
}

.dial-key .letters {
    font-size: 0.6rem;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-top: 1px;
}

/* Botões Globais */
.btn {
    font-family: var(--font-sans);
    font-size: 0.8rem;
    font-weight: 600;
    border: 1px solid transparent;
    border-radius: 8px;
    padding: 8px 14px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    transition: var(--transition-fast);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.03);
    border-color: rgba(255, 255, 255, 0.06);
    color: var(--text-primary);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(255, 255, 255, 0.12);
}

.btn-icon {
    background: none;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 5px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition-fast);
}

.btn-icon:hover {
    background: rgba(255, 255, 255, 0.06);
    color: #ffffff;
}

/* Botões de Ação do Discador */
.dialer-actions {
    width: 100%;
}

.btn-call {
    width: 100%;
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: #ffffff;
    font-size: 0.95rem;
    font-weight: 600;
    padding: 10px 18px;
    border-radius: 10px;
    border: none;
    box-shadow: 0 4px 12px var(--accent-green-glow);
}

.btn-call:hover {
    background: linear-gradient(135deg, #34d399 0%, #059669 100%);
    box-shadow: 0 5px 16px rgba(16, 185, 129, 0.45);
    transform: translateY(-1px);
}

/* Botão de ligar na tabela */
.btn-table-call {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    border: none;
    background: var(--accent-green);
    color: #ffffff;
    display: inline-flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    font-size: 0.72rem;
    transition: var(--transition-fast);
    box-shadow: 0 2px 5px var(--accent-green-glow);
}

.btn-table-call:hover {
    background: #34d399;
    box-shadow: 0 3px 8px rgba(16, 185, 129, 0.45);
    transform: scale(1.08);
}

/* Feedback visual: Botão vermelho para contatos já chamados */
.btn-table-call.called {
    background: var(--accent-red);
    box-shadow: 0 2px 5px var(--accent-red-glow);
}

.btn-table-call.called:hover {
    background: #fb7185;
    box-shadow: 0 3px 8px rgba(244, 63, 94, 0.45);
    transform: scale(1.08);
}

/* Toggle Switch de Som */
.sound-toggle-wrapper {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.72rem;
    color: var(--text-secondary);
}

.switch {
    position: relative;
    display: inline-block;
    width: 32px;
    height: 18px;
}

.switch input { 
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(255, 255, 255, 0.08);
    transition: .4s;
    border: 1px solid rgba(255, 255, 255, 0.04);
}

.slider:before {
    position: absolute;
    content: "";
    height: 10px;
    width: 10px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: .4s;
}

input:checked + .slider {
    background-color: var(--accent-blue);
}

input:checked + .slider:before {
    transform: translateX(14px);
}

.slider.round {
    border-radius: 34px;
}

.slider.round:before {
    border-radius: 50%;
}

/* ==========================================================================
   ACORDEÃO DE INSTRUÇÕES DE AJUDA
   ========================================================================== */
.adb-help-accordion {
    width: 100%;
    margin-top: 10px;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    padding-top: 10px;
}

.accordion-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 4px 0;
    user-select: none;
}

.accordion-header:hover {
    color: #ffffff;
}

.accordion-header i.arrow-icon {
    font-size: 0.65rem;
    transition: var(--transition-normal);
}

.accordion-header.active i.arrow-icon {
    transform: rotate(180deg);
}

.accordion-body {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s cubic-bezier(0, 1, 0, 1);
}

.accordion-body.open {
    max-height: 1000px;
    transition: max-height 0.4s cubic-bezier(1, 0, 1, 0);
    padding-top: 8px;
}

.help-steps {
    font-size: 0.7rem;
    color: var(--text-secondary);
    padding-left: 12px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    line-height: 1.4;
}

.help-steps li::marker {
    font-weight: 700;
    color: var(--accent-blue);
}

/* ==========================================================================
   ALERTAS E NOTIFICAÇÕES FLUTUANTES (Custom Toast)
   ========================================================================== */
.toast-notification {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background: rgba(20, 26, 46, 0.92);
    border: 1px solid var(--panel-border-glow);
    backdrop-filter: blur(10px);
    padding: 10px 18px;
    border-radius: 10px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    gap: 10px;
    z-index: 9999;
    transform: translateY(100px);
    opacity: 0;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.toast-notification.show {
    transform: translateY(0);
    opacity: 1;
}

.toast-icon {
    font-size: 1rem;
}

.toast-success { border-color: rgba(16, 185, 129, 0.35); }
.toast-success .toast-icon { color: var(--accent-green); }

.toast-error { border-color: rgba(244, 63, 94, 0.35); }
.toast-error .toast-icon { color: var(--accent-red); }

.toast-info { border-color: rgba(0, 210, 255, 0.35); }
.toast-info .toast-icon { color: var(--accent-blue); }

.toast-message {
    font-size: 0.78rem;
    font-weight: 500;
    color: var(--text-primary);
}

/* Botão de Desligar Chamada (Hangup) Premium */
.btn-hangup {
    background: linear-gradient(135deg, var(--accent-red) 0%, #be123c 100%) !important;
    color: #ffffff !important;
    border: 1px solid rgba(244, 63, 94, 0.2) !important;
    box-shadow: 0 4px 12px rgba(244, 63, 94, 0.35) !important;
    transition: all 0.2s ease !important;
}

.btn-hangup:hover {
    background: linear-gradient(135deg, #fb7185 0%, #be123c 100%) !important;
    box-shadow: 0 5px 16px rgba(244, 63, 94, 0.55) !important;
    transform: translateY(-1px) scale(1.02) !important;
}

.btn-hangup:active {
    transform: scale(0.96) !important;
}

/* Botão Continuar (Pular intervalo) Premium */
.btn-continue {
    background: linear-gradient(135deg, var(--accent-blue) 0%, #007799 100%) !important;
    color: #ffffff !important;
    border: 1px solid rgba(0, 210, 255, 0.2) !important;
    box-shadow: 0 4px 12px rgba(0, 210, 255, 0.25) !important;
    font-family: var(--font-sans);
    font-size: 0.82rem;
    font-weight: 600;
    border-radius: 8px;
    padding: 6px 12px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    transition: all 0.2s ease !important;
}

.btn-continue:hover {
    background: linear-gradient(135deg, #33e0ff 0%, #007799 100%) !important;
    box-shadow: 0 5px 16px rgba(0, 210, 255, 0.45) !important;
    transform: translateY(-1px) scale(1.02) !important;
}

.btn-continue:active {
    transform: scale(0.96) !important;
}

/* ==========================================================================
   RESPONSIVIDADE E ADAPTAÇÕES DE TELA
   ========================================================================== */
@media (max-width: 1024px) {
    .app-container {
        height: auto;
        max-height: none;
        width: 95vw;
        padding: 15px 0;
    }
    
    .app-content {
        grid-template-columns: 1fr;
        height: auto;
        min-height: auto;
    }
    
    .panel {
        height: 550px;
    }
}

/* Ajustes Mobile específicos */
@media (max-width: 768px) {
    .app-header {
        flex-direction: column;
        gap: 15px;
        align-items: center;
        text-align: center;
    }
    
    .connection-controls {
        flex-direction: column;
        width: 100%;
        gap: 10px;
    }
    
    .connection-mode-selector, 
    .btn-download-apk, 
    .device-status-card {
        width: 100%;
        justify-content: center;
    }
    
    .device-status-card {
        padding: 10px;
    }
    
    .panel {
        height: auto;
        min-height: 480px;
    }
    
    .dialer-wrapper {
        max-width: 100%;
    }
    
    .dial-key {
        width: 52px;
        height: 52px;
    }
}
