/* ==================================================================
    ARQUIVO DE ESTILO OTIMIZADO (v7.2)
    - CORRIGIDO o botão <a> que não pegava width: 100% (display: block)
    - REMOVIDO o "lixo residual" (regras .table-admin-entities)
    - CORRIGIDO o dropdown "feio" no mobile (min-width)
   ================================================================== */

/* =================================
    1. VARIÁVEIS DE TEMA (RAIZ)
   ================================= */
/* ... (todo o código de :root e [data-theme="dark"] permanece o mesmo) ... */
:root,
[data-theme="light"] {
    /* Cores do Tema Claro (Padrão) */
    --bg-primary: #f4f7fa;
    --bg-card: #ffffff;
    --bg-input: #f0f3f5;
    --bg-hover: #f9f9f9;
    --bg-backdrop: rgba(0, 0, 0, 0.4);

    --text-primary: #2c3e50;
    --text-secondary: #7a8b99;
    --text-label: #5a6a79;
    --text-on-accent: #ffffff;
    --text-placeholder: #90a0ad;

    --border-color: #e1e8ed;
    --border-focus: var(--accent-color);

    --accent-color: #e94560;
    --accent-color-hover: #d73c54;

    --success-color: #198754;
    --danger-color: #dc3545;
    --warning-color: #ffc107;
    --warning-color-hover: #ffca2c; /* Novo hover p/ botão amarelo */

    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.08);
}

[data-theme="dark"] {
    /* Cores do Tema Escuro */
    --bg-primary: #1a1a2e;
    --bg-card: #16213e;
    --bg-input: rgba(0, 0, 0, 0.2);
    --bg-hover: #1f2a49;
    --bg-backdrop: rgba(0, 0, 0, 0.5);

    --text-primary: #e0e0e0;
    --text-secondary: #a0a0a0;
    --text-label: #b0b0b0;
    --text-on-accent: #ffffff;
    --text-placeholder: #a0a0a0;

    --border-color: rgba(255, 255, 255, 0.2);
    --border-focus: var(--accent-color);
    
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.1);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.2);
}

/* =================================
    2. ESTILOS GLOBAIS
   ================================= */
/* ... (todo o código de Estilos Globais permanece o mesmo) ... */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Poppins', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    background-color: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    transition: background-color 0.2s ease, color 0.2s ease;
    padding-top: 85px; 
}

h1, h2, h3, h4, h5, h6 {
    color: var(--text-primary);
    font-weight: 600;
    margin-bottom: 0.75rem;
}

h2 { font-size: 1.5rem; }
p { margin-bottom: 1rem; }
code {
    background-color: var(--bg-input);
    color: var(--text-secondary);
    padding: 0.2em 0.4em;
    border-radius: 4px;
    font-size: 0.9em;
}
a {
    color: var(--accent-color);
    text-decoration: none;
}

/* =================================
    3. LAYOUT & UTILITÁRIOS
   ================================= */
/* ... (todo o código de Layout permanece o mesmo) ... */
.container-fluid {
    width: 100%;
    max-width: 1600px;
    margin: 0 auto;
    padding: 0 25px;
}

.row {
    display: flex;
    flex-wrap: wrap;
    margin-left: -12px;
    margin-right: -12px;
}

.col-xl-5, .col-xl-7, .col-lg-12 {
    padding-left: 12px;
    padding-right: 12px;
    width: 100%;
}

@media (min-width: 1200px) {
    .col-xl-5 { flex: 0 0 41.66667%; max-width: 41.66667%; }
    .col-xl-7 { flex: 0 0 58.33333%; max-width: 58.33333%; }
}

/* =================================
    4. HEADER (CABEÇALHO)
   ================================= */
/* ... (todo o código de Header permanece o mesmo) ... */
.main-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background-color: var(--bg-card);
    box-shadow: var(--shadow-md);
    padding: 15px 25px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--border-color);
    height: 70px;
}

.main-header h1 {
    font-size: 1.25rem;
    margin: 0;
}

.main-header > div {
    display: flex;
    align-items: center;
    gap: 15px; 
}

/* ... (todo o código de btn-logout e btn-profile permanece o mesmo) ... */
.btn-logout {
    /* PADRÃO AMARELO */
    background: var(--warning-color); 
    color: #000; 
    border: 1px solid var(--warning-color); 
    font-weight: 600;
    border-radius: 8px;
    padding: 8px 16px;
    transition: background-color 0.2s ease, border-color 0.2s ease;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}
.btn-logout:hover {
    background-color: var(--warning-color-hover);
    border-color: var(--warning-color-hover);
    color: #000;
}
/* =================================
    FIM - CORREÇÃO v1.8
   ================================= */

/* =================================
    INÍCIO - NOVO BOTÃO PERFIL (Etapa 4)
   ================================= */
.btn-profile {
    /* Padrão Azul (baseado no .btn-edit) */
    background: #0d6efd; 
    color: white; 
    border: 1px solid #0d6efd; 
    font-weight: 600;
    border-radius: 8px;
    padding: 8px 16px;
    transition: background-color 0.2s ease, border-color 0.2s ease;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none; /* Garante que não fique sublinhado */
}
.btn-profile:hover {
    background-color: #0b5ed7;
    border-color: #0a58ca;
    color: white;
}
/* =================================
    FIM - NOVO BOTÃO PERFIL
   ================================= */

.btn-logout .fas {
    margin-right: 6px; 
}

.btn-profile .fas {
    margin-right: 6px; 
}


/* =================================
    5. CARD (PAINEL)
   ================================= */
/* ... (todo o código de Card permanece o mesmo) ... */
.card {
    background-color: var(--bg-card);
    border-radius: 12px;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-color);
    padding: 25px;
    margin-bottom: 25px;
}

.card h2 {
    font-size: 1.4rem;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 15px;
    margin-bottom: 25px;
}

.limit-info {
    background: var(--bg-input);
    padding: 10px 15px;
    border-radius: 8px;
    text-align: center;
    font-weight: 500;
    color: var(--text-secondary);
    margin-bottom: 25px;
}

/* =================================
    6. FORMULÁRIOS
   ================================= */

/* ... (todo o código de Formulários permanece o mesmo ATÉ .btn) ... */
.form-group {
    position: relative;
    margin-bottom: 5px; 
}

.form-icon {
    position: absolute;
    top: 15px;
    left: 18px;
    color: var(--accent-color);
    font-size: 1.1em;
    pointer-events: none;
    z-index: 3;
}

.form-control,
.form-select {
    background-color: var(--bg-input);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    height: 50px;
    padding-left: 50px; 
    border-radius: 10px;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    width: 100%;
    font-family: inherit;
    font-size: 1rem;
}
.form-select {
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    padding-right: 15px;
    background-image: url("data:image/svg%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath fill='none' stroke='%2390a0ad' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='m2 5 6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    background-size: 1em;
}

.form-control.no-icon,
textarea.form-control {
    padding-left: 15px;
}
textarea.form-control {
    height: auto;
    padding-top: 12px;
}

.form-control:focus,
.form-select:focus,
textarea.form-control:focus {
    background-color: var(--bg-card);
    border-color: var(--border-focus);
    box-shadow: 0 0 0 3px rgba(233, 69, 96, 0.15);
    outline: none;
}

.form-control::placeholder {
    color: var(--text-placeholder);
    opacity: 1;
}

.hint {
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-bottom: 20px; 
    padding-left: 5px; 
}

/* Botões */
.btn {
    padding: 12px 20px;
    font-size: 1rem;
    font-weight: 600;
    border: none;
    border-radius: 10px;
    transition: all 0.2s ease;
    cursor: pointer;
    width: 100%;
    text-align: center;
    /* ============================================= */
    /* CORREÇÃO (v7.2) - Adicionada esta linha */
    display: block; 
    /* ============================================= */
}
.btn-submit {
    background-color: var(--accent-color);
    color: var(--text-on-accent);
    margin-top: 10px;
}
/* ... (código de .btn-submit:hover, :disabled, .btn-secondary, etc. continua) ... */
.btn-submit:hover {
    background-color: var(--accent-color-hover);
}
.btn-submit:disabled {
    background: var(--text-secondary);
    opacity: 0.7;
    cursor: not-allowed;
}

.btn-secondary {
    background-color: var(--warning-color);
    color: #000; 
    border: 1px solid var(--warning-color);
}
.btn-secondary:hover {
    background-color: var(--warning-color-hover);
    border-color: var(--warning-color-hover);
    color: #000;
}

.btn-sm {
    padding: 6px 12px;
    font-size: 0.85rem;
    font-weight: 500;
    border-radius: 6px;
    width: auto;
    display: inline-block;
}
.btn-edit { background: #0d6efd; color: white; }
.btn-danger { background: var(--danger-color); color: white; }
.btn-reload { background: #0dcaf0; color: #000; }

.form-actions {
    margin-top: 15px;
    display: flex;
    flex-direction: column;
    gap: 10px; 
}
.form-actions .btn-secondary {
    margin-top: 0; 
}

/* Grupo de Input (Subdomínio) */
.subdomain-input-group {
    display: flex;
    position: relative; 
}
.form-control.with-suffix {
    border-top-right-radius: 0;
    border-bottom-right-radius: 0;
    border-right: 0;
}
.subdomain-suffix {
    height: 50px;
    padding: 0 15px;
    display: flex;
    align-items: center;
    background: var(--bg-input);
    border: 1px solid var(--border-color);
    border-left: 0;
    border-top-right-radius: 10px;
    border-bottom-right-radius: 10px;
    color: var(--text-secondary);
}
.form-control.with-suffix:focus + .subdomain-suffix {
    border-color: var(--border-focus);
}

/* Checkbox (Switch) */
.form-check.form-switch {
    padding-left: 3.5em; 
    margin-bottom: 5px;
    position: relative;
    min-height: 24px;
}
.form-check-label {
    font-size: 0.95em; 
    font-weight: 500; 
    color: var(--text-label);
    cursor: pointer;
}
.form-check-input {
    height: 1.5em; 
    width: 3em; 
    margin-left: -3.5em; 
    cursor: pointer;
    vertical-align: top;
    position: relative;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    background-color: var(--bg-input);
    border: 1px solid var(--border-color);
    border-radius: 1.5em;
    transition: background-color 0.2s ease;
}
.form-check-input::before {
    content: '';
    position: absolute;
    top: 2px;
    left: 2px;
    width: 1.2em;
    height: 1.2em;
    background-color: var(--text-secondary);
    border-radius: 50%;
    transition: transform 0.2s ease;
}
.form-check-input:checked {
    background-color: var(--warning-color); 
    border-color: var(--warning-color);
}
.form-check-input:checked::before {
    background-color: var(--bg-card);
    transform: translateX(1.5em);
}

/* =================================
    INÍCIO - BOTÃO COLAR M3U
   ================================= */
.btn-paste-m3u {
    position: absolute;
    right: 5px;
    top: 5px;
    bottom: 5px;
    width: 40px;
    background-color: var(--bg-input);
    border: 1px solid var(--border-color);
    color: var(--accent-color);
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    transition: all 0.2s ease;
    z-index: 3; /* Para ficar acima do input */
}
.btn-paste-m3u:hover {
    background-color: var(--bg-hover);
    border-color: var(--accent-color-hover);
}
.form-control:focus + .btn-paste-m3u {
    border-color: var(--border-focus);
}

/* Ajuste no padding do input para não sobrepor o botão */
.form-control#target_url {
    padding-right: 55px; /* 40px (botão) + 15px (padding) */
}
/* =================================
    FIM - BOTÃO COLAR M3U
   ================================= */


/* =================================
    7. TABELAS
   ================================= */
/* ... (todo o código de Tabelas permanece o mesmo) ... */
.table-responsive {
    overflow-x: auto;
    width: 100%;
    margin-bottom: 20px;
    border: 1px solid var(--border-color);
    border-radius: 10px;
}

.table {
    width: 100%;
    border-collapse: collapse;
    background-color: var(--bg-card);
}

.table thead th:first-child { border-top-left-radius: 9px; }
.table thead th:last-child { border-top-right-radius: 9px; }
.table tbody tr:last-child td:first-child { border-bottom-left-radius: 9px; }
.table tbody tr:last-child td:last-child { border-bottom-right-radius: 9px; }

.table thead th {
    background-color: var(--bg-input);
    color: var(--text-label);
    border-bottom: 2px solid var(--border-color); 
    padding: 12px 15px;
    text-align: left;
    font-weight: 600;
    font-size: 0.9rem;
}
.table tbody tr {
    border-bottom: 1px solid var(--border-color); 
}
.table tbody tr:last-child {
    border-bottom: none; 
}
.table tbody td {
    padding: 12px 15px;
    vertical-align: middle;
    word-break: break-all;
    color: var(--text-primary);
}
.table tbody tr:hover {
    background-color: var(--bg-hover);
}

.table .badge {
    display: inline-block;
    padding: 0.3em 0.6em;
    font-size: 0.8em;
    font-weight: 600;
    border-radius: 6px;
}
.badge.bg-redirect {
    background-color: var(--success-color); color: white;
}
.badge.bg-direct-ip {
    background-color: var(--warning-color); color: #000;
}
.badge.bg-success { background-color: var(--success-color); color: white; }
.badge.bg-danger { background-color: var(--danger-color); color: white; }
.badge.bg-warning { background-color: var(--warning-color); color: #000; }
.badge.bg-secondary { background: var(--text-secondary); color: var(--bg-card); }

.table-title-h3 {
    font-size: 1.25rem;
    color: var(--text-primary);
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--border-color);
}

/* =================================
    8. ALERTAS (Mensagens Flash)
   ================================= */
/* ... (todo o código de Alertas permanece o mesmo) ... */
@keyframes slideDown {
    from { opacity: 0; transform: translateY(-15px); }
    to { opacity: 1; transform: translateY(0); }
}

.alert {
    animation: slideDown 0.4s ease-out;
    padding: 1rem 1.25rem;
    margin-bottom: 1.5rem;
    border: 1px solid transparent;
    border-radius: 10px;
    position: relative;
    font-weight: 500;
}
.alert-success {
    background-color: #d1e7dd;
    color: #0f5132;
    border-color: #badbcc;
}
.alert-danger {
    background-color: #f8d7da;
    color: #842029;
    border-color: #f5c2c7;
}

[data-theme="dark"] .alert-success {
    background-color: rgba(25, 135, 84, 0.3);
    color: #a3cfbb;
    border: 1px solid rgba(25, 135, 84, 0.7);
}
[data-theme="dark"] .alert-danger {
    background-color: rgba(233, 69, 96, 0.2);
    color: #ffc2d1;
    border: 1px solid var(--accent-color);
}

.alert .btn-close {
    position: absolute;
    top: 0;
    right: 0;
    z-index: 2;
    padding: 1rem 1.25rem;
    color: inherit;
    background: none;
    border: 0;
    font-size: 1.2rem;
    cursor: pointer;
    opacity: 0.7;
}
.alert .btn-close:hover {
    opacity: 1;
}

/* =================================
    9. MODAIS
   ================================= */
/* ... (todo o código de Modais permanece o mesmo) ... */
.modal-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: var(--bg-backdrop);
    z-index: 1040;
    display: none; 
    opacity: 0;
    transition: opacity 0.2s ease;
}
.modal-backdrop.show {
    opacity: 1;
}

.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1050;
    display: none; 
    overflow-x: hidden;
    overflow-y: auto;
    outline: 0;
}

.modal-dialog {
    position: relative;
    width: auto;
    max-width: 500px;
    margin: 1.75rem auto;
    pointer-events: none;
    transform: translateY(-50px);
    transition: transform 0.2s ease-out;
}
.modal-dialog.modal-dialog-centered {
    display: flex;
    align-items: center;
    min-height: calc(100% - 3.5rem);
}

.modal.show .modal-dialog {
    transform: translateY(0);
}

.modal-content {
    position: relative;
    display: flex;
    flex-direction: column;
    width: 100%;
    pointer-events: auto;
    background-color: var(--bg-card);
    background-clip: padding-box;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    outline: 0;
    box-shadow: var(--shadow-md);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.5rem;
    border-bottom: 1px solid var(--border-color);
}
.modal-title {
    font-size: 1.25rem;
    margin: 0;
    line-height: 1.5;
}
.modal-header .btn-close {
    padding: 0.5rem;
    margin: -0.5rem -0.5rem -0.5rem auto;
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--text-secondary);
    cursor: pointer;
    opacity: 0.8;
}
.modal-header .btn-close:hover { opacity: 1; }

.modal-body {
    position: relative;
    flex: 1 1 auto;
    padding: 1.5rem;
}
.modal-body .form-group {
    margin-bottom: 15px; 
}

.modal-footer {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-end;
    padding: 1rem 1.5rem;
    border-top: 1px solid var(--border-color);
}
.modal-footer .btn {
    width: auto;
    margin-left: 0.5rem;
}

/* =================================
    10.5. NOVO: COMPONENTES (Assinatura Compacta)
   ================================= */
.status-container {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 10px; /* Espaço entre os blocos */
    text-align: center;
}

.status-item {
    flex: 1; /* Faz os dois blocos terem larguras iguais */
}

/* Títulos (Créditos, Vencimento) */
.status-item p.status-title {
    font-size: 1.1rem; 
    color: var(--text-secondary); 
    margin-bottom: 5px;
}

/* Valor grande (Créditos) */
.status-item h3.status-value-credit {
    font-size: 2.5rem; 
    margin-bottom: 10px;
    line-height: 1.1;
}
.status-value-credit.danger { color: var(--danger-color); }
.status-value-credit.success { color: var(--success-color); }

/* Valor grande (Data) */
.status-item h4.status-value-date {
    font-size: 1.5rem; 
    margin-bottom: 10px;
    color: var(--text-primary);
    line-height: 1.4; /* Alinha melhor com o H3 */
    padding-top: 10px; /* Ajuste para centralizar verticalmente com o H3 */
}
.status-value-date.danger { color: var(--danger-color); }
.status-value-date.warning { color: var(--warning-color); }

/* Esconde o <hr> do meio */
.status-container + hr {
    display: none;
}
/* Estilo para o hint "1 crédito = 1 mês" */
.card > .hint-full-width {
    text-align: center;
    margin-top: 15px; 
    margin-bottom: 0; 
}

/* Ajustes específicos para mobile */
@media (max-width: 767px) {
    .status-container {
        gap: 5px; /* Menos espaço ainda */
    }
    .status-item p.status-title {
        font-size: 0.9rem; /* Um pouco menor no mobile */
    }
    .status-item h3.status-value-credit {
        font-size: 2rem; /* Menor no mobile */
        margin-bottom: 5px;
    }
    .status-item h4.status-value-date {
        font-size: 1.2rem; /* Menor no mobile */
        padding-top: 5px; /* Ajuste mobile */
        margin-bottom: 5px;
    }
}
/* =================================
    FIM - NOVO COMPONENTE
   ================================= */


/* =================================
    11. RESPONSIVIDADE (MOBILE)
   ================================= */
/* ... (todo o código de Responsividade permanece o mesmo) ... */
@media (max-width: 767px) {
    body {
        padding-top: 70px; 
    }
    .container-fluid {
        padding: 0 15px;
    }
    .main-header {
        padding: 15px;
    }
    .main-header h1 {
        font-size: 1.1rem;
    }
    
    .main-header > div {
        gap: 8px; 
    }

    /* =================================
        CORREÇÃO v1.8 (Botão Sair Mobile)
       ================================= */
    /* Este estilo agora se aplica a TODOS os .btn-logout E .btn-profile */
    .btn-logout,
    .btn-profile {
        padding: 0;
        width: 38px;  
        height: 38px; 
        font-size: 1.1rem; 
        border-radius: 8px;
    }
    .btn-logout .fas,
    .btn-profile .fas {
        margin-right: 0; 
    }
    .btn-logout span,
    .btn-profile span {
        display: none; 
    }
    /* =================================
        FIM - CORREÇÃO v1.8
       ================================= */

    .card {
        padding: 20px;
    }

    .table-responsive {
        overflow-x: visible;
        border: none; 
        border-radius: 0;
    }
    
    .table {
        /* display: table; <-- REGRA REMOVIDA */
        overflow-x: unset;
        border: none; 
        border-radius: 0;
    }

    .table-responsive-cards thead { 
        display: none; 
    }
    
    .table-responsive-cards tbody tr {
        display: block;
        border-radius: 10px;
        margin-bottom: 15px;
        background: var(--bg-card);
        border: 1px solid var(--border-color);
        box-shadow: var(--shadow-sm);
        border-bottom: 1px solid var(--border-color); 
    }
    
    .table-responsive-cards tbody td {
        display: block; 
        padding: 10px 15px;
        text-align: left;
        border-bottom: 1px solid var(--border-color);
        word-break: break-all;
    }
    .table-responsive-cards tbody td:last-child {
        border-bottom: none; 
    }
    
    .table-responsive-cards td[data-label]::before {
        content: attr(data-label); 
        font-weight: 600;
        color: var(--text-label);
        display: block;
        font-size: 0.8em;
        text-transform: uppercase;
        margin-bottom: 4px;
    }

    .table-responsive-cards td[data-label="Ações"] {
        padding: 10px; 
        background-color: transparent; 
        text-align: right; 
    }
    .table-responsive-cards td[data-label="Ações"] .btn {
        display: inline-block;
        width: auto;
        margin: 0;
    }

    /* =================================
        (LIXO .table-admin-entities... FOI REMOVIDO DAQUI)
       ================================= */

    .modal-dialog {
        margin: 0.5rem;
    }
    .modal-dialog.modal-dialog-centered {
        min-height: calc(100% - 1rem);
    }
    .modal-content {
        min-height: 100px;
    }
    
    #termsModal .modal-content {
        height: 90vh; 
        max-height: 90vh;
    }
    #termsModal .modal-dialog {
        margin: 0.5rem; 
        max-width: none; 
        width: calc(100% - 1rem); 
    }

    /* =================================
        INÍCIO - CORREÇÃO v7.1 (Menu "Feio")
       ================================= */
    .actions-dropdown-menu {
        /* Remove o min-width de 160px do desktop */
        min-width: auto; 
        /* Define uma largura mais agradável para o mobile */
        width: 140px; 
    }

    .actions-dropdown-menu .dropdown-item,
    .actions-dropdown-menu .dropdown-item-form .btn {
        /* Reduz o padding para caber na nova largura */
        padding-left: 12px;
        padding-right: 12px;
    }
    /* =================================
        FIM - CORREÇÃO v7.1
       ================================= */
}

/* =================================
    11. LOGIN (Tela de Login)
   ================================= */
/* ... (todo o código de Login permanece o mesmo) ... */
body.login-body {
    padding-top: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
}
.login-container {
    background-color: var(--bg-card);
    padding: 40px 35px;
    border-radius: 20px;
    box-shadow: var(--shadow-md);
    width: 100%;
    max-width: 420px;
    text-align: center;
    border: 1px solid var(--border-color);
}
.logo-image {
    width: 100%;
    max-width: 250px;
    height: auto;
    margin-bottom: 20px;
    object-fit: contain;
}
.form-title {
    font-size: 1.75rem;
    font-weight: 600;
    margin-bottom: 25px;
    color: var(--text-primary);
}
.login-container .form-group {
    margin-bottom: 20px; 
}
.g-recaptcha {
    display: flex;
    justify-content: center;
    margin-bottom: 20px;
    transform: scale(0.9); 
    transform-origin: center;
}
@media (max-width: 400px) {
    .g-recaptcha {
        transform: scale(0.8);
    }
}
.password-toggle-icon {
    position: absolute;
    top: 50%;
    right: 15px;
    transform: translateY(-50%);
    cursor: pointer;
    color: var(--text-secondary);
    transition: color 0.2s ease;
}
.password-toggle-icon:hover {
    color: var(--text-primary);
}

/* Posição do Theme Switcher no Login */
.login-body .theme-switch-wrapper {
    position: absolute;
    top: 20px;
    right: 20px;
    z-index: 10;
}


/* =================================
    11.5. MODAL DE TERMOS (Login)
   ================================= */
/* ... (todo o código de Modal Termos permanece o mesmo) ... */
#termsModal .modal-dialog {
    max-width: 800px;
}

#termsModal .modal-content {
    display: flex;
    flex-direction: column;
    max-height: 90vh; 
    height: 700px; 
}

#termsModal .modal-header {
    flex-shrink: 0;
}

#termsModal .modal-body {
    flex-grow: 1;
    overflow-y: auto; 
}

#termsModal .modal-footer {
    flex-shrink: 0;
}

.terms-checkbox-container {
    width: 100%;
    text-align: left;
    margin-bottom: 0.75rem; 
    padding-right: 1.5em; 
}

.terms-checkbox-container .form-check {
    min-height: 1.5em; 
}

/* =================================
    12. BOTÃO THEME-SWITCHER
   ================================= */
/* ... (todo o código de Theme-Switcher permanece o mesmo) ... */
.theme-switch-wrapper {
    display: flex;
    align-items: center;
}

.theme-switch {
    display: inline-block;
    height: 26px;
    position: relative;
    width: 50px;
}

.theme-switch input {
    display: none;
}

.slider {
    background-color: var(--bg-input);
    border: 1px solid var(--border-color);
    bottom: 0;
    cursor: pointer;
    left: 0;
    position: absolute;
    right: 0;
    top: 0;
    transition: .3s;
    border-radius: 26px;
}

.slider:before {
    content: "\f186"; 
    font-family: "Font Awesome 5 Free";
    font-weight: 900;
    font-size: 14px;
    line-height: 20px;
    text-align: center;
    color: var(--text-secondary);
    
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    bottom: 2px;
    height: 20px;
    width: 20px;
    left: 2px;
    position: absolute;
    transition: .3s;
    border-radius: 50%;
}

input:checked + .slider {
    background-color: var(--accent-color);
    border-color: var(--accent-color);
}
input:checked + .slider:before {
    content: "\f185"; 
    font-family: "Font Awesome 5 Free";
    font-weight: 900;
    font-size: 14px;
    line-height: 20px;
    text-align: center;
    color: var(--warning-color); 

    transform: translateX(24px);
    background-color: var(--bg-card);
    border-color: var(--border-color);
}


/* =================================
    13. DROPDOWN DE AÇÕES (ADMIN)
   ================================= */
/* ... (todo o código de Dropdown permanece o mesmo) ... */
.actions-dropdown {
    position: relative; 
    display: inline-block; 
}

.btn-actions-trigger {
    background-color: #0dcaf0; 
    color: #000;
}
.btn-actions-trigger .fas {
    margin-left: 6px; 
    transition: transform 0.2s ease;
}

.actions-dropdown.show .btn-actions-trigger .fas {
    transform: rotate(180deg);
}

.actions-dropdown-menu {
    display: none; 
    position: fixed;   
    z-index: 1010;     
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    box-shadow: var(--shadow-md);
    min-width: 160px; 
    padding: 8px 0;
    margin-top: 4px;
}

.actions-dropdown-menu.show {
    display: block; 
}

.actions-dropdown-menu .dropdown-item {
    display: block;
    width: 100%;
    padding: 10px 15px;
    text-align: left;
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-primary);
    background: none;
    border: none;
    cursor: pointer;
    white-space: nowrap; 
}
.actions-dropdown-menu .dropdown-item:hover {
    background-color: var(--bg-hover);
    color: var(--text-primary);
}

.actions-dropdown-menu .dropdown-item-form {
    padding: 0;
    margin: 0;
    display: block;
    width: 100%;
}
.actions-dropdown-menu .dropdown-item-form .btn {
    display: block;
    width: 100%;
    padding: 10px 15px;
    text-align: left;
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-primary);
    background: none;
    border: none;
    cursor: pointer;
    border-radius: 0; 
    white-space: nowrap;
}
.actions-dropdown-menu .dropdown-item-form .btn:hover {
    background-color: var(--bg-hover);
    color: var(--text-primary);
}

.actions-dropdown-menu .dropdown-item.text-danger,
.actions-dropdown-menu .dropdown-item-form .btn.text-danger {
    color: var(--danger-color);
}
.actions-dropdown-menu .dropdown-item.text-danger:hover,
.actions-dropdown-menu .dropdown-item-form .btn.text-danger:hover {
    color: var(--danger-color);
    background-color: rgba(220, 53, 69, 0.1);
}