/* =========================================
   RESET BÁSICO E FONTES
========================================= */
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@400;500;600;700&display=swap');

* { 
    margin: 0; 
    padding: 0; 
    box-sizing: border-box; 
    font-family: 'Poppins', sans-serif; 
}

body { 
    background-color: #f0f2f5; 
    color: #2c3e50; 
}

/* =========================================
   LAYOUT DO PAINEL DE CONTROLE (DASHBOARD)
========================================= */
.dashboard-container { 
    display: flex; 
    height: 100vh; 
    overflow: hidden; 
}

.sidebar { 
    width: 260px; 
    background-color: #2c3e50; 
    color: white; 
    padding: 30px 20px; 
    display: flex; 
    flex-direction: column; 
    box-shadow: 2px 0 10px rgba(0,0,0,0.1);
    z-index: 10;
}

.sidebar h2 { 
    margin-bottom: 40px; 
    text-align: center; 
    font-size: 1.2rem; 
    font-weight: 700; 
    color: #ecf0f1; 
    border-bottom: 1px solid #34495e; 
    padding-bottom: 15px;
}

.nav-btn { 
    background: none; 
    border: none; 
    color: #bdc3c7; 
    padding: 15px; 
    text-align: left; 
    width: 100%; 
    cursor: pointer; 
    font-size: 1rem; 
    border-radius: 8px; 
    margin-bottom: 10px; 
    transition: all 0.3s ease; 
    font-weight: 500; 
}

.nav-btn:hover, .nav-btn.active { 
    background-color: #34495e; 
    color: #fff; 
    transform: translateX(5px);
}

/* BOTÃO DE SAIR (LOGOUT) */
.btn-sair {
    margin-top: 40px; 
    color: #ff7675; 
    border: 1px solid #ff7675;
}

.btn-sair:hover {
    background-color: #ff7675;
    color: #fff;
}

/* ÁREA PRINCIPAL DO PAINEL */
.content-area { 
    flex: 1; 
    padding: 40px; 
    overflow-y: auto; 
    width: 100%;
}

.content-section { 
    background: white; 
    padding: 40px; 
    border-radius: 12px; 
    box-shadow: 0 5px 20px rgba(0,0,0,0.05); 
    margin-bottom: 20px; 
    animation: fadeIn 0.4s ease; 
}

.content-section h3 { 
    margin-bottom: 25px; 
    color: #2c3e50; 
    font-size: 1.4rem; 
    font-weight: 700; 
    border-bottom: 2px solid #f1f2f6; 
    padding-bottom: 10px; 
}

@keyframes fadeIn { 
    from { opacity: 0; transform: translateY(10px); } 
    to { opacity: 1; transform: translateY(0); } 
}

/* =========================================
   FORMULÁRIOS E INPUTS
========================================= */
.form-group { margin-bottom: 20px; }

label { 
    display: block; 
    margin-bottom: 8px; 
    font-weight: 600; 
    color: #34495e; 
    font-size: 0.95rem; 
}

input[type="text"], input[type="number"], input[type="email"], input[type="password"], textarea, .input-select {
    width: 100%; 
    padding: 14px; 
    border: 2px solid #ecf0f1; 
    border-radius: 8px; 
    background-color: #fff; 
    font-size: 1rem; 
    color: #2c3e50; 
    transition: border-color 0.3s;
}

input:focus, textarea:focus, .input-select:focus { 
    border-color: #3498db; 
    outline: none; 
}

.input-select optgroup { 
    font-weight: 700; 
    color: #e74c3c; 
    background: #fdfdfd; 
}

/* =========================================
   UPLOAD DE FOTO
========================================= */
.file-upload-wrapper { margin-bottom: 10px; }

.input-foto { 
    border: 2px dashed #bdc3c7; 
    background: #f8fafc; 
    padding: 20px; 
    text-align: center; 
    width: 100%; 
    border-radius: 8px; 
    cursor: pointer; 
    transition: all 0.3s; 
    color: #7f8c8d; 
}

.input-foto:hover { 
    background: #edf2f7; 
    border-color: #3498db; 
}

/* =========================================
   BOTÕES PREMIUM & QR CODE
========================================= */
.btn-salvar { 
    width: 100%; 
    background-color: #27ae60; 
    color: white; 
    padding: 18px; 
    border: none; 
    border-radius: 8px; 
    font-size: 1.1rem; 
    font-weight: 700; 
    text-transform: uppercase; 
    cursor: pointer; 
    transition: 0.3s; 
    box-shadow: 0 4px 10px rgba(39, 174, 96, 0.3); 
    margin-top: 10px; 
}

.btn-salvar:hover { 
    background-color: #2ecc71; 
    transform: translateY(-2px); 
    box-shadow: 0 6px 15px rgba(39, 174, 96, 0.4); 
}

.btn-qr, .btn-renovar { 
    background-color: #3498db; 
    color: white; 
    padding: 12px 20px; 
    border: none; 
    border-radius: 6px; 
    font-weight: 600; 
    cursor: pointer; 
    transition: 0.3s; 
    margin-top: 10px; 
}

.btn-qr:hover, .btn-renovar:hover { background-color: #2980b9; }

/* BOTÃO DE DOWNLOAD DO QR CODE */
.btn-download-qr {
    background-color: #27ae60;
    color: white;
    padding: 10px 15px;
    border: none;
    border-radius: 6px;
    font-weight: 600;
    cursor: pointer;
    transition: 0.3s;
    margin-top: 15px;
    display: inline-block;
}

.btn-download-qr:hover { background-color: #219653; }

.qr-link-box input { 
    background-color: #f1f2f6; 
    color: #7f8c8d; 
    font-weight: 500; 
}

.qr-display { 
    margin-top: 25px; 
    padding: 20px; 
    background: white; 
    display: inline-block; 
    border-radius: 12px; 
    box-shadow: 0 4px 15px rgba(0,0,0,0.08); 
    border: 1px solid #f1f2f6; 
}

/* =========================================
   NOVAS ÁREAS: ASSINATURA, SUPORTE E PERIGO
========================================= */
.card-assinatura-premium { 
    background: #fff; 
    border: 1px solid #ddd; 
    padding: 25px; 
    border-radius: 12px; 
    box-shadow: 0 4px 12px rgba(0,0,0,0.05); 
}

.btn-mercadopago {
    background: #009ee3; 
    color: white; 
    border: none; 
    padding: 15px 30px; 
    border-radius: 8px; 
    font-weight: bold; 
    font-size: 1.1rem; 
    cursor: pointer; 
    display: flex; 
    align-items: center; 
    gap: 12px; 
    width: 100%; 
    justify-content: center; 
    transition: 0.3s;
}

.btn-mercadopago:hover { background: #007eb5; }

.tabela-pagamentos {
    background: white; 
    border-radius: 8px; 
    border: 1px solid #eee; 
    overflow: hidden;
    width: 100%; 
    border-collapse: collapse;
}

.tabela-pagamentos th { padding: 12px; text-align: left; background: #f8f9fa; border-bottom: 1px solid #eee; }
.tabela-pagamentos td { padding: 12px; border-bottom: 1px solid #eee; }

.suporte-box {
    margin-top: 30px; 
    padding: 20px; 
    background: #f1f2f6; 
    border-radius: 8px; 
    border-left: 5px solid #2d3436;
}

.zona-perigo {
    margin-top: 40px; 
    padding: 25px; 
    border: 1px solid #ffcccc; 
    border-radius: 8px; 
    background-color: #fff5f5;
}

.btn-deletar-alerta {
    background: transparent; 
    color: #e74c3c; 
    border: 1px solid #e74c3c; 
    padding: 10px 20px; 
    border-radius: 6px; 
    font-weight: bold; 
    cursor: pointer; 
    transition: 0.3s;
}

.btn-deletar-alerta:hover { background: #e74c3c; color: white; }

.btn-confirmar-exclusao { background: #e74c3c; color: white; border: none; padding: 10px 15px; border-radius: 4px; cursor: pointer; font-weight: bold; }
.btn-cancelar { background: #95a5a6; color: white; border: none; padding: 10px 15px; border-radius: 4px; cursor: pointer; font-weight: bold; }

/* =========================================
   SISTEMA DE BLOQUEIO
========================================= */
.hidden { display: none !important; }

.banner-bloqueio { 
    background-color: #e74c3c; 
    color: white; 
    padding: 15px; 
    text-align: center; 
    border-radius: 8px; 
    margin-bottom: 25px; 
    font-weight: 700; 
    box-shadow: 0 4px 10px rgba(231, 76, 60, 0.2); 
}

.bloqueado input, .bloqueado textarea, .bloqueado select, .bloqueado .btn-salvar { 
    pointer-events: none; 
    opacity: 0.6; 
    background-color: #ecf0f1; 
}
.bloqueado .btn-salvar { background-color: #95a5a6; box-shadow: none; }


/* =========================================
   RESPONSIVIDADE (CELULARES E TABLETS)
========================================= */
@media screen and (max-width: 768px) {
    /* Muda a direção de lado a lado para um embaixo do outro */
    .dashboard-container { 
        flex-direction: column; 
        height: auto; 
    }

    /* Barra lateral vai pro topo e fica com 100% de largura */
    .sidebar { 
        width: 100%; 
        padding: 15px; 
        box-shadow: 0 2px 10px rgba(0,0,0,0.1); 
    }

    .sidebar h2 { 
        margin-bottom: 15px; 
        font-size: 1.1rem; 
    }

    /* Coloca os botões do menu lado a lado pra não ocupar a tela toda */
    #menu-nav {
        display: flex;
        flex-wrap: wrap;
        gap: 8px;
    }

    .nav-btn {
        flex: 1 1 45%; /* Cada botão pega metade da tela */
        margin-bottom: 0;
        padding: 10px;
        font-size: 0.85rem;
        text-align: center;
        border-radius: 6px;
    }

    .nav-btn:hover, .nav-btn.active {
        transform: translateY(0); /* Remove aquele efeitinho de pular pro lado que no mobile fica feio */
    }

    /* O botão de sair pega a largura inteira embaixo dos outros */
    .btn-sair {
        margin-top: 5px;
        flex: 1 1 100%;
    }

    /* Área de conteúdo ajusta as bordas e preenchimento */
    .content-area { 
        padding: 15px; 
        overflow-y: visible;
    }

    .content-section { 
        padding: 20px; 
    }

    .content-section h3 {
        font-size: 1.2rem;
    }

    /* Ajuste fino nas caixas de assinatura para não quebrar a tela */
    .card-assinatura-premium {
        padding: 15px;
    }
    
    .card-assinatura-premium > div {
        flex-direction: column;
        gap: 15px;
    }

    .btn-mercadopago {
        font-size: 0.9rem;
        padding: 15px 10px;
    }
}