/* ============================================================
   1. BASE & VARIÁVEIS (ODS Smart Global)
   ============================================================ */
:root {
    --bg-dark: #0a0e17;
    --surface: #111827;
    --accent-blue: #3b82f6;
    --accent-amber: #f59e0b;
    --accent-red: #dc2626;
    --glass-border: rgba(255, 255, 255, 0.05);
    --sab: env(safe-area-inset-bottom, 0px);
    --sat: env(safe-area-inset-top, 0px);
}

* { margin: 0; padding: 0; box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

body {
    background-color: var(--bg-dark);
    color: #fff;
    font-family: 'Inter', system-ui, sans-serif;
    padding-bottom: calc(90px + var(--sab));
    overflow-x: hidden;
    line-height: 1.5;
}

/* ============================================================
   2. INFRAESTRUTURA DE MODAIS (Unificada)
   ============================================================ */

/* Fundo Genérico para Modais (WiFi/Adicionar) */
.modal-native, .modal-overlay-lux {
    position: fixed; inset: 0; z-index: 10000;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(15px); -webkit-backdrop-filter: blur(15px);
    display: none; /* Escondido por padrão */
    align-items: center; justify-content: center;
    padding: 20px;
    opacity: 0; transition: opacity 0.3s ease;
}

.modal-native.active, .modal-overlay-lux.active {
    display: flex; opacity: 1;
}

/* Container de Vidro (Padrão Luxo) */
.modal-glass-content, .modal-danger-lux {
    width: 100%; max-width: 400px;
    background: #111827;
    border: 1px solid var(--glass-border);
    border-radius: 35px;
    padding: 30px;
    display: flex; flex-direction: column;
    box-shadow: 0 25px 50px -12px rgba(0,0,0,0.5);
    animation: slideUp 0.3s ease-out;
}

/* Específico para o Modal de Reset (Danger) */
.modal-danger-lux {
    background: #000;
    border: 2px solid var(--accent-red);
    text-align: center;
}

/* ============================================================
   3. COMPONENTES DE INTERAÇÃO (Botões & Inputs)
   ============================================================ */

/* Input de Confirmação ODS */
.input-reset-confirm, .ods-input {
    width: 100%;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--glass-border);
    border-radius: 15px;
    padding: 15px;
    color: #fff;
    text-align: center;
    font-weight: 900;
    font-size: 16px;
    outline: none;
    transition: 0.3s;
}

.input-reset-confirm:focus { border-color: var(--accent-red); }

/* Botões de Ação Modal */
.btn-omega-main {
    background: var(--accent-red); color: #fff;
    font-weight: 900; text-transform: uppercase;
    padding: 14px; border-radius: 12px; border: none;
    box-shadow: 0 4px 15px rgba(220, 38, 38, 0.3);
}

.btn-omega-outline {
    background: transparent; border: 2px solid var(--accent-amber);
    color: var(--accent-amber); font-weight: 900;
    text-transform: uppercase; padding: 14px; border-radius: 12px;
}

.btn-omega-main:active, .btn-omega-outline:active { transform: scale(0.95); opacity: 0.8; }

/* ============================================================
   4. LISTAGEM & SCROLL (Fix WiFi Wizard)
   ============================================================ */
#network-list {
    flex: 1; overflow-y: auto;
    margin: 15px 0; padding-right: 5px;
    -webkit-overflow-scrolling: touch;
}

.network-item-lux {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--glass-border);
    border-radius: 20px; padding: 18px; margin-bottom: 10px;
    display: flex; align-items: center; gap: 12px;
}

/* ============================================================
   5. UTILS & ANIMAÇÕES
   ============================================================ */
@keyframes slideUp {
    from { transform: translateY(20px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

@keyframes pulseRed {
    0%, 100% { transform: scale(1); filter: drop-shadow(0 0 5px rgba(220, 38, 38, 0.5)); }
    50% { transform: scale(1.05); filter: drop-shadow(0 0 15px rgba(220, 38, 38, 0.8)); }
}

.danger-icon-pulse {
    font-size: 50px; color: var(--accent-red);
    margin-bottom: 15px; animation: pulseRed 2s infinite;
}

.hidden { display: none !important; }