/* ============================================================
   ESTILOS ESPECÍFICOS - Painel Administrativo
   ============================================================ */

.painel-wrapper {
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px;
}

.painel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 0;
    border-bottom: 3px solid var(--dourado);
    margin-bottom: 30px;
    flex-wrap: wrap;
    gap: 15px;
}

.painel-header h1 {
    font-size: 28px;
    font-weight: 800;
    color: var(--verde-escuro);
}

.painel-header h1 i {
    color: var(--dourado);
    margin-right: 10px;
}

/* ===== USER BAR ===== */
.user-bar-global {
    display: flex;
    align-items: center;
    gap: 12px;
    background: rgba(255, 255, 255, 0.1);
    padding: 4px 16px 4px 12px;
    border-radius: 50px;
    border: 1px solid rgba(255, 255, 255, 0.15);
}

.user-bar-global .user-bar-avatar {
    width: 36px;
    height: 36px;
    background: var(--dourado);
    color: var(--verde-escuro);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 16px;
    flex-shrink: 0;
}

.user-bar-global .user-bar-info {
    display: flex;
    flex-direction: column;
    line-height: 1.2;
}

.user-bar-global .user-bar-name {
    color: white;
    font-weight: 600;
    font-size: 13px;
}

.user-bar-global .user-bar-role {
    color: rgba(255, 255, 255, 0.7);
    font-size: 10px;
    font-weight: 400;
}

.btn-sair-global {
    background: rgba(255, 255, 255, 0.15);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.2);
    padding: 4px 14px;
    border-radius: 50px;
    font-weight: 600;
    font-size: 11px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: 'Montserrat', Arial, sans-serif;
    display: flex;
    align-items: center;
    gap: 6px;
}

.btn-sair-global:hover {
    background: #dc3545;
    border-color: #dc3545;
    transform: scale(1.05);
}

/* ===== ABAS ===== */
.tabs-container {
    background: white;
    border-radius: var(--raio);
    box-shadow: var(--sombra);
    overflow: hidden;
}

.tabs {
    display: flex;
    gap: 0;
    background: var(--cinza-claro);
    border-bottom: 2px solid var(--cinza-borda);
    overflow-x: auto;
}

.tabs .tab {
    padding: 15px 25px;
    border: none;
    background: transparent;
    font-family: 'Montserrat', Arial, sans-serif;
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s ease;
    color: var(--texto-muted);
    display: flex;
    align-items: center;
    gap: 8px;
    border-bottom: 3px solid transparent;
    white-space: nowrap;
}

.tabs .tab:hover {
    background: rgba(13, 74, 42, 0.05);
    color: var(--verde-escuro);
}

.tabs .tab.active {
    color: var(--verde-escuro);
    border-bottom-color: var(--dourado);
    background: white;
}

.tab-content {
    display: none;
    padding: 25px;
}

.tab-content.active {
    display: block;
}

.tab-header-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    flex-wrap: wrap;
    gap: 15px;
}

.tab-header-actions h3 {
    font-size: 18px;
    color: var(--verde-escuro);
    display: flex;
    align-items: center;
    gap: 10px;
}

.tab-header-actions h3 i {
    color: var(--dourado);
}

.btn-add-admin,
.btn-add-proposta {
    padding: 10px 24px;
    border: none;
    border-radius: 50px;
    font-weight: 600;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: 'Montserrat', Arial, sans-serif;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: var(--verde-claro);
    color: white;
}

.btn-add-admin:hover,
.btn-add-proposta:hover {
    background: var(--verde-escuro);
    transform: scale(1.02);
}

/* ============================================================
   MODAL LATERAL
   ============================================================ */
.modal-lateral {
    position: fixed;
    top: 0;
    right: -500px;
    width: 450px;
    height: 100%;
    background: white;
    box-shadow: -4px 0 30px rgba(0,0,0,0.15);
    z-index: 9999;
    transition: right 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    overflow-y: auto;
}

.modal-lateral.aberto {
    right: 0;
}

.modal-lateral-content {
    display: flex;
    flex-direction: column;
    height: 100%;
}

.modal-lateral-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 25px;
    background: var(--verde-escuro);
    color: white;
    flex-shrink: 0;
}

.modal-lateral-header h2 {
    font-size: 20px;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 10px;
}

.modal-lateral-header h2 i {
    color: var(--dourado);
}

.modal-close {
    background: none;
    border: none;
    color: white;
    font-size: 32px;
    cursor: pointer;
    transition: all 0.3s ease;
    line-height: 1;
}

.modal-close:hover {
    color: var(--dourado);
    transform: rotate(90deg);
}

.modal-lateral-body {
    padding: 25px;
    flex: 1;
    overflow-y: auto;
}

.modal-lateral-body .form-group {
    margin-bottom: 20px;
}

.modal-lateral-body .form-group label {
    display: block;
    font-weight: 600;
    color: var(--verde-escuro);
    font-size: 13px;
    margin-bottom: 6px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.modal-lateral-body .form-group label i {
    color: var(--dourado);
    margin-right: 5px;
}

.modal-lateral-body .form-group input,
.modal-lateral-body .form-group select {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid var(--cinza-borda);
    border-radius: 8px;
    font-size: 15px;
    font-family: 'Montserrat', Arial, sans-serif;
    transition: all 0.3s ease;
    background: white;
}

.modal-lateral-body .form-group input:focus,
.modal-lateral-body .form-group select:focus {
    outline: none;
    border-color: var(--dourado);
    box-shadow: 0 0 0 3px rgba(255, 179, 0, 0.15);
}

.modal-lateral-body .form-group input:disabled {
    background: #f0f0f0;
    cursor: not-allowed;
}

.modal-lateral-body .form-group small {
    display: block;
    color: var(--texto-muted);
    font-size: 11px;
    margin-top: 4px;
}

.btn-salvar-admin,
.btn-salvar-senha {
    width: 100%;
    padding: 14px;
    border: none;
    border-radius: 50px;
    font-weight: 700;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: 'Montserrat', Arial, sans-serif;
    background: linear-gradient(90deg, var(--verde-escuro), var(--verde-medio));
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-top: 10px;
}

.btn-salvar-admin:hover,
.btn-salvar-senha:hover {
    background: linear-gradient(90deg, var(--dourado), var(--dourado-claro));
    color: var(--verde-escuro);
    transform: scale(1.02);
}

/* ============================================================
   TABELA DE ADMINISTRADORES
   ============================================================ */
.tabela-administradores {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

.tabela-administradores thead th {
    background: var(--verde-escuro);
    color: white;
    padding: 12px 15px;
    text-align: left;
    font-weight: 600;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.tabela-administradores tbody td {
    padding: 12px 15px;
    border-bottom: 1px solid var(--cinza-borda);
    vertical-align: middle;
}

.tabela-administradores tbody tr:hover {
    background: var(--cinza-claro);
}

/* ============================================================
   BADGES DE NÍVEL
   ============================================================ */
.badge-master {
    background: #dc3545;
    color: white;
    padding: 3px 12px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 600;
    display: inline-block;
}

.badge-cadastrador {
    background: #0d6efd;
    color: white;
    padding: 3px 12px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 600;
    display: inline-block;
}

.badge-editor {
    background: #ffc107;
    color: #212529;
    padding: 3px 12px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 600;
    display: inline-block;
}

/* ✅ NOVO: Badge do Visualizador (cinza, somente leitura) */
.badge-visualizador {
    background: #6c757d;
    color: white;
    padding: 3px 12px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 600;
    display: inline-block;
}

.badge-active {
    background: #198754;
    color: white;
    padding: 3px 12px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 600;
}

.badge-inactive {
    background: #6c757d;
    color: white;
    padding: 3px 12px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 600;
}

.btn-edit-password {
    background: var(--dourado);
    color: white;
    border: none;
    padding: 5px 10px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 12px;
    transition: all 0.3s ease;
    margin-right: 5px;
}

.btn-edit-password:hover {
    background: var(--dourado-claro);
    transform: scale(1.05);
}

.btn-delete {
    background: #dc3545;
    color: white;
    border: none;
    padding: 5px 10px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 12px;
    transition: all 0.3s ease;
}

.btn-delete:hover {
    background: #c82333;
    transform: scale(1.05);
}

/* ============================================================
   CONFIGURAÇÕES
   ============================================================ */
.config-group {
    margin-bottom: 25px;
}

.config-group label {
    display: block;
    font-weight: 600;
    color: var(--verde-escuro);
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 10px;
    border-bottom: 2px solid var(--cinza-borda);
    padding-bottom: 8px;
}

.config-item {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 10px 0;
    border-bottom: 1px solid var(--cinza-borda);
    flex-wrap: wrap;
}

.config-item span:first-child {
    min-width: 180px;
    font-weight: 500;
    color: var(--texto-muted);
}

.config-item .config-value {
    font-weight: 600;
    color: var(--texto);
    flex: 1;
}

.btn-edit-config {
    background: var(--cinza-claro);
    border: 1px solid var(--cinza-borda);
    padding: 5px 12px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 12px;
    transition: all 0.3s ease;
    color: var(--texto-muted);
}

.btn-edit-config:hover {
    background: var(--dourado);
    color: white;
    border-color: var(--dourado);
}

.btn-action {
    padding: 12px 30px;
    border: none;
    border-radius: 50px;
    font-weight: 600;
    font-family: 'Montserrat', Arial, sans-serif;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: var(--verde-escuro);
    color: white;
    font-size: 14px;
}

.btn-action:hover {
    background: var(--dourado);
    color: var(--verde-escuro);
    transform: scale(1.02);
}

/* ============================================================
   RESPONSIVIDADE
   ============================================================ */
@media (max-width: 768px) {
    .modal-lateral {
        width: 100%;
        right: -100%;
    }

    .modal-lateral.aberto {
        right: 0;
    }

    .modal-lateral-header {
        padding: 15px 20px;
    }

    .modal-lateral-body {
        padding: 20px;
    }

    .tabs .tab {
        padding: 12px 16px;
        font-size: 12px;
    }

    .tab-header-actions {
        flex-direction: column;
        align-items: flex-start;
    }

    .btn-add-admin,
    .btn-add-proposta {
        width: 100%;
        justify-content: center;
    }

    .tabela-administradores {
        font-size: 12px;
    }

    .tabela-administradores thead th,
    .tabela-administradores tbody td {
        padding: 8px 10px;
    }
}

@media (max-width: 576px) {
    .painel-header h1 {
        font-size: 20px;
    }

    .user-bar-global {
        padding: 4px 10px;
    }

    .user-bar-global .user-bar-info {
        display: none;
    }

    .tabs .tab {
        padding: 10px 12px;
        font-size: 11px;
    }

    .tab-content {
        padding: 15px;
    }

    .tabela-administradores {
        font-size: 10px;
    }

    .tabela-administradores thead th,
    .tabela-administradores tbody td {
        padding: 5px 6px;
    }

    .badge-master,
    .badge-cadastrador,
    .badge-editor,
    .badge-visualizador,
    .badge-active,
    .badge-inactive {
        font-size: 9px;
        padding: 2px 8px;
    }

    .btn-edit-password,
    .btn-delete {
        padding: 3px 6px;
        font-size: 10px;
    }
}