/* ===========================
   Base global
   =========================== */

@import url("https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap");

body {
    font-family: "Inter", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    background-color: #f3f4f6;
}

/* Área de conteúdo interna (onde entram os components/*) */
.content-section {
    padding: 1rem 0 2rem;
}

/* ===========================
   Sidebar
   =========================== */

#sidebar {
    background: #111827;            /* cinza bem escuro */
    color: #e5e7eb;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

#sidebar .sidebar-header h4 {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 0.25rem;
}

#sidebar .sidebar-header small {
    color: #9ca3af;
}

#sidebar .components {
    padding-left: 0;
    margin: 0;
}

#sidebar .components li a {
    border-radius: 0.5rem;
    color: #d1d5db;
    font-size: 0.95rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.18s ease;
}

#sidebar .components li a i {
    width: 18px;
    text-align: center;
}

#sidebar .components li a:hover,
#sidebar .components li a.active {
    background: rgba(255, 255, 255, 0.08);
    color: #ffffff;
    transform: translateX(2px);
}

#sidebar #logout_btn {
    border-radius: 999px;
    font-size: 0.9rem;
}

/* Sidebar em telas pequenas: ocupa largura total */
@media (max-width: 768px) {
    #sidebar {
        width: 100%;
        min-height: auto;
    }
}

/* ===========================
   Dashboard / Home
   =========================== */

#home-view h2 {
    font-weight: 600;
}

/* Cards principais do dashboard */
.dashboard-card {
    border: 0;
    border-radius: 1rem;
    box-shadow: 0 12px 24px rgba(15, 23, 42, 0.08);
}

.dashboard-card .card-body {
    padding: 1.1rem 1.25rem;
}

.dashboard-card-icon {
    width: 44px;
    height: 44px;
    border-radius: 999px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

/* Cores “soft” para fundos dos ícones */
.bg-soft-primary {
    background: rgba(13, 110, 253, 0.12);
    color: #0d6efd;
}

.bg-soft-success {
    background: rgba(25, 135, 84, 0.14);
    color: #198754;
}

.bg-soft-info {
    background: rgba(13, 202, 240, 0.14);
    color: #0dcaf0;
}

.dashboard-card h6 {
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #6b7280;
    margin-bottom: 0.15rem;
}

.dashboard-card h3 {
    font-weight: 700;
}

/* Card de boas-vindas */
.card-welcome {
    border: 0;
    border-radius: 1rem;
    box-shadow: 0 10px 22px rgba(15, 23, 42, 0.06);
}

.card-welcome h5 {
    font-weight: 600;
}

.card-welcome ul {
    padding-left: 1.1rem;
}

.card-welcome li + li {
    margin-top: 0.25rem;
}

/* Em telas menores, espaço um pouco maior entre cards */
@media (max-width: 768px) {
    .dashboard-card {
        margin-bottom: 0.5rem;
    }
}


/* ====== SIDEBAR: DESKTOP x MOBILE ====== */

/* largura fixa da sidebar no desktop */
#sidebar-container {
    width: 240px;
    flex-shrink: 0;
    transition: transform 0.3s ease;
}

/* estado normal da sidebar (desktop) */
@media (min-width: 769px) {
    #sidebar-container {
        display: block;
        position: static;
        box-shadow: none;
    }
}

/* comportamento no MOBILE */
@media (max-width: 768px) {
    /* por padrão some no mobile */
    #sidebar-container {
        display: none;
        position: fixed;
        inset: 0 auto 0 0;       /* top:0; left:0; bottom:0 */
        z-index: 1050;
        width: 240px;
        max-width: 80%;
        box-shadow: 0 0 20px rgba(0, 0, 0, 0.35);
    }

    /* quando tiver essa classe, aparece */
    #sidebar-container.sidebar-open {
        display: block;
    }

    /* fundo escuro atrás da sidebar */
    #app-wrapper.sidebar-backdrop::after {
        content: "";
        position: fixed;
        inset: 0;
        background: rgba(0, 0, 0, 0.4);
        z-index: 1040;
    }
}

/* Remover linhas embaixo dos menus da sidebar */
#sidebar ul.components {
    margin: 0;
    padding: 0;
}

#sidebar ul.components li {
    border-bottom: none !important;
}
/* ===========================
   TABELAS – DESKTOP (padrão)
   =========================== */

/* Já é o padrão do Bootstrap, mas garantimos: */
.table-responsive {
    width: 100%;
    overflow-x: auto;
}

.table-responsive > table {
    width: 100%;
    border-collapse: collapse;
}

/* ===========================
   TABELAS – MOBILE (<= 576px)
   =========================== */

@media (max-width: 576px) {

    /* Deixar a fonte menor e mais compacta */
    .table-responsive > table {
        font-size: 0.80rem;
    }

    .table-responsive > table th,
    .table-responsive > table td {
        padding: 0.25rem 0.6rem;
    }

    /* -------- Alunos e Usuários → viram "cards" -------- */

    #alunos-view .table thead,
    #usuarios-view .table thead {
        display: none; /* esconde cabeçalho da tabela */
    }

    #alunos-view .table tbody tr,
    #usuarios-view .table tbody tr {
        display: block;                 /* cada linha vira um bloco */
        margin-bottom: 0.75rem;
        background: #ffffff;
        border-radius: 0.75rem;
        box-shadow: 0 6px 16px rgba(15, 23, 42, 0.10);
        overflow: hidden;
    }

    #alunos-view .table tbody td,
    #usuarios-view .table tbody td {
        display: flex;                  /* label à esquerda, valor à direita */
        justify-content: space-between;
        align-items: center;
        padding: 0.45rem 0.75rem;
        border-top: 1px solid #e5e7eb;
        font-size: 0.82rem;
    }

    #alunos-view .table tbody tr td:first-child,
    #usuarios-view .table tbody tr td:first-child {
        border-top: none;
        padding-top: 0.6rem;
    }

    /* Label do campo (usa o data-label do TD) */
    #alunos-view .table tbody td::before,
    #usuarios-view .table tbody td::before {
        content: attr(data-label);
        font-weight: 600;
        color: #6b7280;
        margin-right: 0.75rem;
        flex-shrink: 0;
    }

    /* Ações → só os botões à direita, sem label */
    #alunos-view .table tbody td[data-label="Ações"],
    #usuarios-view .table tbody td[data-label="Ações"] {
        justify-content: flex-end;
        gap: 0.25rem;
    }

    #alunos-view .table tbody td[data-label="Ações"]::before,
    #usuarios-view .table tbody td[data-label="Ações"]::before {
        content: "";
        margin-right: 0;
    }

    /* -------- Presenças → continua tabela, mas com scroll -------- */

    #tabela-presencas {
        min-width: 900px;   /* a tabela pode ficar maior que a tela */
    }
}

/* Forçar remoção total das linhas do menu */
#sidebar ul.components li,
#sidebar ul.components li a {
    border: none !important;
    border-bottom: none !important;
    box-shadow: none !important;
}

#sidebar .components li a {
    padding: 0.75rem 1rem;
    display: flex;
    align-items: center;
    border-radius: 0.5rem;
    margin-bottom: 0.25rem;
}

#sidebar .components li a:hover {
    background: rgba(255,255,255,0.08);
    transform: translateX(2px);
}

#logout_btn {
    border-radius: 999px !important;
    padding: 0.65rem 1rem;
    border: 1px solid #ffffff33 !important;
    background: transparent !important;
    transition: all .2s ease;
}

#logout_btn:hover {
    background: rgba(255,255,255,0.1) !important;
}
#sidebar {
    background: #0f172a; /* Azul/Preto moderno */
}

/* Remover sublinhado dos links do menu */
#sidebar .components li a,
#sidebar .components li a:hover,
#sidebar .components li a:focus,
#sidebar .components li a:active {
    text-decoration: none !important;
}

/* Remover a linha separadora acima do botão Sair */
#sidebar .border-top {
    border-top: none !important;
}
