/* APP AM - Estilo Geral (Versão App Moderno) */

:root {
    --bg-topo: #020b1a;          /* Azul Profundo Quase Preto */
    --bg-base: #040d1f;          /* Azul Noite */
    --bg-card: rgba(8, 20, 45, 0.7); /* Azul translúcido */
    --accent-color: #00f2ff;     /* Ciano Neon */
    --secondary-color: #00ffaa;  /* Verde Esmeralda (Novo) */
    --text-primary: #ffffff;
    --text-secondary: #7a8ba3;
    --border-color: rgba(0, 242, 255, 0.15);
    --shadow: 0 0 20px rgba(0, 0, 0, 0.5);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Roboto, -apple-system, sans-serif;
}

body {
    /* Degradê Linear de 2 cores */
    background: linear-gradient(to bottom, var(--bg-topo) 0%, var(--bg-base) 100%);
    background-attachment: fixed;
    color: var(--text-primary);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.app-header {
    padding: 30px 20px;
    max-width: 1200px;
    margin: 0 auto;
    width: 100%;
    display: flex;
    align-items: center;
    border-bottom: 1px solid var(--border-color); /* Linha sutil para separar o topo */
    background: rgba(2, 11, 26, 0.5); /* Leve transparência */
    backdrop-filter: blur(10px);
}

/* Container de Login */
.login-container {
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 1;
    padding: 20px;
}

.login-card {
    background: var(--bg-card);
    padding: 45px 35px;
    border-radius: 28px; /* Cantos bem arredondados estilo App */
    width: 100%;
    max-width: 420px;
    box-shadow: var(--shadow);
    border: 1px solid var(--border-color);
    text-align: center;
}

.login-card h2 {
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 8px;
    color: var(--accent-color);
    letter-spacing: -0.5px;
}

/* Inputs Estilo App Moderno */
.input-group {
    margin-bottom: 18px;
    text-align: left;
}

.input-group label {
    display: block;
    margin-left: 15px;
    margin-bottom: 6px;
    color: var(--text-secondary);
    font-size: 13px;
    font-weight: 500;
}

.input-group input {
    width: 100%;
    padding: 14px 25px;
    background: rgba(0, 0, 0, 0.2); /* Fundo sutil */
    border: 1px solid var(--border-color);
    border-radius: 30px; /* Cantos totalmente arredondados */
    color: white;
    font-size: 16px;
    outline: none;
    transition: all 0.3s ease;
}

.input-group input:focus {
    border-color: var(--accent-color);
    background: rgba(0, 212, 255, 0.05);
    box-shadow: 0 0 12px rgba(0, 212, 255, 0.15);
}

/* Botão Estilo Pílula */
.btn-primary {
    width: 100%;
    padding: 15px;
    margin-top: 10px;
    background: var(--accent-color);
    border: none;
    border-radius: 30px; /* Estilo pílula */
    color: #050a14;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.btn-primary:hover {
    filter: brightness(1.1);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 212, 255, 0.3);
}

/* Container Principal para limitar largura em TVs/Monitores */
.dashboard-container {
    max-width: 1200px;
    margin: 0 auto;
    width: 100%;
    padding-bottom: 100px; /* Espaço para a barra mobile não cobrir conteúdo */
}

/* Dashboard Grid Responsivo */
@media (min-width: 1024px) {
    .dashboard-grid {
        display: grid;
        grid-template-columns: 300px 1fr 300px; /* Esquerda, Centro (Grande), Direita */
        grid-template-rows: auto auto;
        gap: 25px;
        align-items: start;
    }

    .card-central {
        grid-column: 2;
        grid-row: 1 / span 2; /* Ocupa as duas linhas no centro */
        min-height: 500px;
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        background: radial-gradient(circle, rgba(0, 242, 255, 0.05) 0%, transparent 70%);
        border: 1px solid var(--border-color);
        border-radius: 28px;
    }
}

/* HEADER DO APP */
.app-header {
    padding: 30px 20px;
    max-width: 1200px;
    margin: 0 auto;
    width: 100%;
}

/* BARRA DE NAVEGAÇÃO (MOBILE FIRST) */
.mobile-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background: var(--bg-card);
    display: flex;
    justify-content: space-around;
    padding: 15px 0;
    border-top: 1px solid var(--border-color);
    backdrop-filter: blur(15px);
    z-index: 998; /* Um nível abaixo da sidebar e do botão */
}

/* REGRA DE OURO: Esconder no Desktop */
@media (min-width: 768px) {
    .mobile-nav {
        display: none !important; /* Some completamente em telas maiores que 768px */
    }
}

.mobile-nav a {
    color: var(--text-secondary);
    font-size: 24px;
    transition: 0.3s;
}

.mobile-nav a.active, .mobile-nav a:hover {
    color: var(--accent-color);
}

/* AJUSTES PARA DESKTOP (Monitores e TVs) */
@media (min-width: 1024px) {
    .mobile-nav {
        top: 0;
        left: 0;
        bottom: auto;
        width: 80px;
        height: 100vh;
        flex-direction: column;
        justify-content: center;
        gap: 40px;
        border-top: none;
        border-right: 1px solid var(--border-color);
    }

    /* Empurra o conteúdo para o lado quando a barra lateral aparece no Desktop */
    body {
        padding-left: 80px;
    }
    
    .dashboard-grid {
        grid-template-columns: repeat(3, 1fr); /* Força 3 colunas em telas grandes */
    }
}

/* AJUSTE PARA SMARTPHONES */
@media (max-width: 600px) {
    body {
        padding-left: 0;
    }
    .dashboard-grid {
        grid-template-columns: 1fr; /* 1 coluna no celular */
    }
}

.card-modulo {
    background: var(--bg-card);
    border-radius: 12px; /* Menos arredondado para parecer mais técnico */
    padding: 20px;
    border: 1px solid var(--border-color);
    box-shadow: inset 0 0 15px rgba(0, 242, 255, 0.05);
    position: relative;
    overflow: hidden;
}

/* Detalhe de linha neon no topo do card */
.card-modulo::before {
    content: "";
    position: absolute;
    top: 0; left: 0;
    width: 30px; height: 2px;
    background: var(--accent-color);
}

/* Ajustes para Responsividade Celular */
@media (max-width: 480px) {
    .login-card {
        padding: 35px 20px;
        border-radius: 24px;
        border: none; /* Em telas muito pequenas, o card flutua melhor sem borda */
        background: transparent; /* Opcional: efeito Flat no mobile */
        box-shadow: none;
    }
}


/* ============================================================================= */

/* ============================================================================= */

/* ============================================================================= */

.mobile-nav i {
    transition: 0.3s;
}

.mobile-nav i:hover {
    color: var(--accent-color);
}

/* Esconder barra inferior em TVs e Desktops se preferir, ou manter como menu fixo */
@media (min-width: 1024px) {
    .mobile-nav {
        width: 80px;
        height: 100vh;
        flex-direction: column;
        left: 0;
        top: 0;
    }
}






/* --- SIDEBAR RETRÁTIL --- */

/* Esconde a barra mobile padrão e prepara a sidebar */
.sidebar {
    position: fixed;
    left: -100%; /* Garante que saia totalmente da tela no mobile */
    top: 0;
    width: 280px;
    height: 100vh;
    background: var(--bg-card);
    border-right: 1px solid var(--border-color);
    transition: all 0.4s ease-in-out;
    z-index: 1000;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    backdrop-filter: blur(20px);
}

.sidebar.active {
    left: 0; 
}

/* Botão Sanduíche Flutuante na Direita */
.menu-toggle {
    position: fixed;
    top: 20px;
    z-index: 1001;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    color: var(--accent-color);
    width: 50px;
    height: 50px;
    border-radius: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    cursor: pointer;
    box-shadow: var(--shadow);
    transition: all 0.3s ease;
    
    /* Padrão Mobile: Direita */
    right: 20px; 
}

/* Ajuste para Desktop (Notebook, PC, TV) */
@media (min-width: 1024px) {
    .menu-toggle {
        right: auto; /* Anula a posição da direita */
        left: 20px;  /* Posiciona na esquerda */
    }
}

/* Botões do Menu */
.nav-link {
    display: flex;
    align-items: center;
    padding: 15px 20px;
    color: var(--text-secondary);
    text-decoration: none;
    border-radius: 15px;
    transition: 0.3s;
    gap: 15px;
    font-weight: 500;
}

.nav-link i {
    font-size: 22px;
}

.nav-link:hover, .nav-link.active {
    background: rgba(0, 212, 255, 0.1);
    color: var(--accent-color);
}

/* Overlay para escurecer o fundo quando o menu abrir no mobile */
.sidebar-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.7);
    display: none;
    z-index: 999;
    backdrop-filter: blur(3px);
}

.sidebar-overlay.active {
    display: block;
}

/* Ajuste do conteúdo principal */
.dashboard-container {
    padding-top: 20px; /* Espaço para o botão de menu */
    transition: 0.4s;
}

/* No Mobile, manter os ícones embaixo se preferir, ou usar apenas a sidebar. 
   Para o visual que você pediu, vamos focar na Sidebar Retrátil */
@media (max-width: 600px) {
    .sidebar { width: 85%; }
}


/* Ajuste de Respiro para o Card Central no Mobile */
@media (max-width: 600px) {
    .card-central {
        margin: 20px 0; /* Cria margem em cima e embaixo */
        padding: 40px 20px; /* Aumenta o respiro interno */
        border-radius: 28px;
    }
    
    .card-central img {
        margin-bottom: 25px; /* Espaço entre a logo e o texto abaixo */
    }
}


/* Rodapé do Sistema */
.app-footer {
    text-align: center;
    padding: 40px 20px;
    margin-bottom: 80px; /* Espaço para não ficar atrás da mobile-nav */
    border-top: 1px solid var(--border-color);
}

.app-footer p {
    font-size: 12px;
    color: var(--text-secondary);
    letter-spacing: 1px;
}

/* Garante que o container principal tenha espaço no final */
.dashboard-container {
    padding-bottom: 120px; 
}





/* --- Estilo Swipe Up Banner --- */
.swipe-banner {
    position: fixed;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
    max-width: 500px; /* Alinha com a largura dos seus cards */
    background: var(--bg-card);
    padding: 15px;
    border-radius: 20px 20px 0 0;
    border: 1px solid var(--border-color);
    border-bottom: none;
    cursor: pointer;
    z-index: 2000;
    text-align: center;
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    backdrop-filter: blur(10px);
}

.swipe-banner p {
    color: var(--text-primary);
    font-size: 13px;
    font-weight: 500;
    letter-spacing: 1px;
    text-transform: uppercase;
}

#swipeIndicator {
    width: 40px;
    height: 4px;
    background-color: var(--accent-color);
    border-radius: 2px;
    margin: 0 auto 10px;
    animation: swipePulse 1.5s infinite;
}

@keyframes swipePulse {
    0%, 100% { opacity: 1; transform: translateY(0); }
    50% { opacity: 0.4; transform: translateY(-3px); }
}

/* Esconde no Desktop para não poluir a tela lateral */
@media (min-width: 1024px) {
    .swipe-banner { display: none; }
}