/* ============================================
   ESTILOS DO PAINEL ADMINISTRATIVO
   ============================================ */

:root {
    --sidebar-width: 260px;
    --primary-color: #2e7d32;
    --primary-dark: #1b5e20;
    --sidebar-bg: #1a1a2e;
    --sidebar-text: #a4b0be;
    --sidebar-active: #2e7d32;
}

* { box-sizing: border-box; }

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: #f0f2f5;
    margin: 0;
}

/* ============================================
   SIDEBAR
   ============================================ */
.sidebar {
    width: var(--sidebar-width);
    height: 100vh;
    background: var(--sidebar-bg);
    color: var(--sidebar-text);
    position: fixed;
    top: 0;
    left: 0;
    z-index: 1000;
    overflow-y: auto;
    transition: transform 0.3s ease;
}

.sidebar-header {
    padding: 20px;
    text-align: center;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.sidebar-logo {
    width: 80px;
    height: 80px;
    object-fit: contain;
    display: block;
    margin: 0 auto 10px;
}

.sidebar-header h3 {
    color: #fff;
    margin: 0;
    font-size: 1.2em;
}

.sidebar-nav {
    list-style: none;
    padding: 10px 0;
    margin: 0;
}

.sidebar-nav li a {
    display: flex;
    align-items: center;
    padding: 12px 20px;
    color: var(--sidebar-text);
    text-decoration: none;
    transition: all 0.3s;
    font-size: 0.95em;
}

.sidebar-nav li a:hover {
    background: rgba(255,255,255,0.1);
    color: #fff;
}

.sidebar-nav > li.active > a {
    background: var(--sidebar-active);
    color: #fff;
    border-left: 4px solid #fff;
}

.sidebar-nav .sidebar-submenu .sidebar-dropdown-sub li a {
    background: transparent !important;
    border-left: none !important;
}

.sidebar-nav .sidebar-submenu .sidebar-dropdown-sub li.active a {
    background: var(--sidebar-active) !important;
    border-left: 4px solid #fff !important;
}

.sidebar-nav li a i {
    margin-right: 10px;
    font-size: 1.1em;
    width: 24px;
    text-align: center;
}

.sidebar-divider {
    border-top: 1px solid rgba(255,255,255,0.1);
    margin: 10px 20px;
}

.sidebar-title {
    padding: 5px 20px;
    font-size: 0.75em;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: rgba(255,255,255,0.4);
}

/* ============================================
   CONTEÚDO PRINCIPAL
   ============================================ */
.content {
    margin-left: var(--sidebar-width);
    width: calc(100% - var(--sidebar-width));
    min-height: 100vh;
    transition: all 0.3s ease;
}

/* ============================================
   CARDS DO DASHBOARD
   ============================================ */
.stat-card {
    background: #fff;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.08);
    transition: transform 0.2s;
}

.stat-card:hover {
    transform: translateY(-2px);
}

.stat-card .stat-icon {
    width: 50px;
    height: 50px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5em;
    color: #fff;
}

.stat-card .stat-value {
    font-size: 1.8em;
    font-weight: bold;
    color: #333;
    margin: 10px 0 5px;
}

.stat-card .stat-label {
    color: #888;
    font-size: 0.9em;
}

.bg-success-custom { background: linear-gradient(135deg, #2e7d32, #4caf50); }
.bg-primary-custom { background: linear-gradient(135deg, #1565c0, #42a5f5); }
.bg-warning-custom { background: linear-gradient(135deg, #f57f17, #ffb74d); }
.bg-danger-custom { background: linear-gradient(135deg, #c62828, #ef5350); }
.bg-info-custom { background: linear-gradient(135deg, #00838f, #26c6da); }
.bg-purple-custom { background: linear-gradient(135deg, #6a1b9a, #ab47bc); }

/* ============================================
   TABELAS
   ============================================ */
.table-admin {
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0,0,0,0.08);
}

.table-admin .table {
    margin-bottom: 0;
}

.table-admin th {
    background: var(--sidebar-bg);
    color: #fff;
    border: none;
    font-weight: 500;
    font-size: 0.9em;
}

.table-admin td {
    vertical-align: middle;
    padding: 12px 15px;
}

/* ============================================
   FORMULÁRIOS
   ============================================ */
.form-card {
    background: #fff;
    border-radius: 12px;
    padding: 25px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.08);
}

.form-card .form-label {
    font-weight: 500;
    color: #555;
    font-size: 0.9em;
}

.form-card .form-control,
.form-card .form-select {
    border-radius: 8px;
    padding: 10px 15px;
    border: 1px solid #ddd;
}

.form-card .form-control:focus,
.form-card .form-select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(46, 125, 50, 0.15);
}

/* ============================================
   BOTÕES
   ============================================ */
.btn-primary {
    background: var(--primary-color);
    border-color: var(--primary-color);
}

.btn-primary:hover {
    background: var(--primary-dark);
    border-color: var(--primary-dark);
}

.btn-success {
    background: var(--primary-color);
    border-color: var(--primary-color);
}

.btn-outline-success {
    color: var(--primary-color);
    border-color: var(--primary-color);
}

.btn-outline-success:hover {
    background: var(--primary-color);
    color: #fff;
}

/* ============================================
   PÁGINA DE LOGIN
   ============================================ */
.login-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
}

.login-card {
    background: #fff;
    border-radius: 16px;
    padding: 25px 35px;
    width: 100%;
    max-width: 420px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.3);
}

.login-card h1 {
    text-align: center;
    color: var(--primary-color);
    margin-bottom: 5px;
    font-size: 1.8em;
}

.login-card .subtitle {
    text-align: center;
    color: #888;
    margin-bottom: 30px;
    font-size: 1.2em;
    white-space: nowrap;
}

.login-card .form-label {
    font-size: 1.05em;
    font-weight: 500;
}

.login-card .form-control {
    border-radius: 10px;
    padding: 14px 16px;
    border: 1px solid #e0e0e0;
    font-size: 1.05em;
}

.login-card .btn-login {
    background: var(--primary-color);
    border: none;
    padding: 14px;
    border-radius: 10px;
    font-weight: bold;
    font-size: 1.15em;
}

.login-card .btn-login:hover {
    background: var(--primary-dark);
}

/* ============================================
   RESPONSIVO
   ============================================ */
@media (max-width: 768px) {
    .sidebar {
        transform: translateX(-100%);
    }

    .sidebar.active {
        transform: translateX(0);
    }

    .content {
        margin-left: 0;
        width: 100%;
    }
}

/* ============================================
   BADGES E ETIQUETAS
   ============================================ */
.badge-situacao {
    font-size: 0.8em;
    padding: 5px 10px;
    border-radius: 20px;
}

.badge-ativo { background: #e8f5e9; color: #2e7d32; }
.badge-doente { background: #fff3e0; color: #e65100; }
.badge-acamado { background: #fce4ec; color: #c62828; }
.badge-discipulado { background: #e3f2fd; color: #1565c0; }
.badge-transferido { background: #e8eaf6; color: #283593; }
.badge-falecido { background: #f3e5f5; color: #6a1b9a; }
.badge-excluido { background: #ffebee; color: #b71c1c; }
.badge-disciplina { background: #fff8e1; color: #e65100; }
.badge-pendente { background: #fff3e0; color: #e65100; }
.badge-efetivada { background: #e8f5e9; color: #2e7d32; }

/* ============================================
   SIDEBAR DROPDOWN
   ============================================ */
.sidebar-dropdown > a {
    display: flex;
    align-items: center;
    justify-content: space-between;
    cursor: pointer;
}

.sidebar-dropdown > a .bi-chevron-down {
    transition: transform 0.3s;
    font-size: 0.8em;
}

.sidebar-dropdown.active > a .bi-chevron-down {
    transform: rotate(180deg);
}

.sidebar-dropdown.active > a {
    background: transparent !important;
    border-left: none !important;
    color: var(--sidebar-text) !important;
}

.sidebar-submenu {
    list-style: none;
    padding: 0;
    margin: 0;
    display: none;
    background: transparent;
}

.sidebar-dropdown.active > .sidebar-submenu {
    display: block;
}

.sidebar-submenu li a {
    padding: 10px 20px 10px 50px !important;
    font-size: 0.9em !important;
}

.sidebar-submenu li a i {
    font-size: 0.9em;
}

.sidebar-submenu li.active a {
    background: var(--sidebar-active) !important;
    border-left: 4px solid #fff !important;
}

.sidebar-submenu li a {
    background: transparent;
}

.sidebar-submenu .sidebar-dropdown-sub > a {
    padding-left: 40px !important;
    font-size: 0.85em !important;
    color: rgba(255,255,255,0.7) !important;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.sidebar-submenu .sidebar-dropdown-sub > a span {
    display: inline;
}

.sidebar-submenu .sidebar-dropdown-sub > a .bi-chevron-down {
    font-size: 0.7em;
}

.sidebar-submenu .sidebar-submenu .sidebar-submenu li a {
    padding-left: 65px !important;
    font-size: 0.85em !important;
    background: transparent !important;
}

.sidebar-submenu .sidebar-submenu .sidebar-submenu li.active a {
    background: var(--sidebar-active) !important;
}

.sidebar-dropdown-sub > .sidebar-submenu {
    display: none;
    background: transparent !important;
}

.sidebar-dropdown-sub.active > .sidebar-submenu {
    display: block;
    background: transparent !important;
}

/* ============================================
   UTILITÁRIOS
   ============================================ */
.page-title {
    font-size: 1.5em;
    font-weight: 600;
    color: #333;
    margin-bottom: 20px;
}

.card-header-custom {
    background: var(--primary-color);
    color: #fff;
    padding: 15px 20px;
    border-radius: 12px 12px 0 0;
}

.empty-state {
    text-align: center;
    padding: 40px;
    color: #aaa;
}

.empty-state i {
    font-size: 3em;
    margin-bottom: 15px;
}
