
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap');

:root {
    --primary: #d982a5;
    --primary-dark: #bd648a;
    --background: #fff7fa;
    --white: #ffffff;
    --text: #493541;
    --muted: #a18b98;
    --border: #f3dce6;
    --green: #6baf8a;
    --orange: #d6a05f;
    --red: #d97985;
    --sidebar-width: 250px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', Arial, sans-serif;
    background: var(--background);
    color: var(--text);
    min-height: 100vh;
}

button, input, select {
    font: inherit;
}

button {
    cursor: pointer;
}

/* MENU LATERAL */

.sidebar {
    width: var(--sidebar-width);
    height: 100vh;
    position: fixed;
    left: 0;
    top: 0;
    background: #ffffff;
    border-right: 1px solid var(--border);
    padding: 28px 18px;
    display: flex;
    flex-direction: column;
    z-index: 10;
}

.brand {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 0 8px;
    margin-bottom: 48px;
}

.brand-icon {
    width: 44px;
    height: 44px;
    background: var(--primary);
    color: white;
    border-radius: 13px;
    display: grid;
    place-items: center;
    font-size: 25px;
    font-weight: 800;
}

.brand h2 {
    font-size: 20px;
    color: var(--primary-dark);
}

.brand small {
    color: var(--muted);
    font-size: 11px;
}

nav {
    display: flex;
    flex-direction: column;
    gap: 9px;
}

.nav-link {
    padding: 14px 15px;
    text-decoration: none;
    color: #987f8c;
    border-radius: 9px;
    font-size: 13px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 13px;
    transition: .2s;
}

.nav-link span {
    font-size: 19px;
}

.nav-link:hover,
.nav-link.active {
    background: #fce8f0;
    color: var(--primary-dark);
}

.sidebar-footer {
    margin-top: auto;
    color: var(--green);
    font-size: 12px;
    font-weight: 600;
    padding: 15px 8px;
}

.sidebar-footer small {
    display: block;
    color: var(--muted);
    margin-top: 8px;
    font-weight: 400;
}

.status-dot {
    display: inline-block;
    width: 8px;
    height: 8px;
    background: #83c7a0;
    border-radius: 50%;
    margin-right: 7px;
}

/* CONTEÚDO PRINCIPAL */

.main-content {
    margin-left: var(--sidebar-width);
    padding: 30px 38px;
    min-height: 100vh;
    max-width: 1700px;
}

.topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 30px;
    gap: 15px;
}

.topbar h1 {
    font-size: 25px;
    margin-bottom: 7px;
    color: #604354;
}

.topbar p {
    font-size: 13px;
    color: var(--muted);
}

.user-info {
    display: flex;
    align-items: center;
    gap: 11px;
    font-size: 12px;
}

.user-info strong,
.user-info small {
    display: block;
}

.user-info small {
    color: var(--muted);
    margin-top: 4px;
}

.avatar {
    width: 42px;
    height: 42px;
    background: #fce5ee;
    color: var(--primary-dark);
    display: grid;
    place-items: center;
    border-radius: 50%;
    font-weight: 800;
}

/* NAVEGAÇÃO */

.page {
    display: none;
    animation: appear .25s ease;
}

.page.active {
    display: block;
}

@keyframes appear {
    from {
        opacity: 0;
        transform: translateY(5px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* PAINEL DE BOAS-VINDAS */

.welcome-card {
    background: linear-gradient(115deg, #d982a5, #edb0c8);
    color: white;
    padding: 32px;
    border-radius: 17px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    min-height: 190px;
    box-shadow: 0 8px 25px #d982a520;
}

.welcome-label {
    font-size: 10px;
    letter-spacing: 2px;
    opacity: .9;
    font-weight: 700;
}

.welcome-card h2 {
    font-size: 25px;
    margin: 13px 0 9px;
}

.welcome-card p {
    font-size: 12px;
    opacity: .95;
    margin-bottom: 20px;
    max-width: 480px;
    line-height: 1.7;
}

.welcome-icon {
    font-size: 75px;
    opacity: .9;
    padding-right: 25px;
}

/* BOTÕES */

.btn {
    border: 0;
    padding: 12px 18px;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 700;
    transition: .2s;
}

.btn:hover {
    transform: translateY(-1px);
    filter: brightness(.96);
}

.btn-primary {
    background: var(--primary);
    color: white;
}

.btn-outline {
    background: white;
    color: var(--primary-dark);
    border: 1px solid var(--border);
}

.btn-light {
    background: white;
    color: var(--primary-dark);
}

/* INDICADORES */

.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 17px;
    margin-bottom: 25px;
}

.stat-card,
.content-card {
    background: white;
    border: 1px solid var(--border);
    border-radius: 13px;
}

.stat-card {
    padding: 20px;
    min-width: 0;
    box-shadow: 0 3px 15px #d982a508;
}

.stat-card > span {
    font-size: 12px;
    color: #987f8c;
}

.stat-card h2 {
    font-size: 29px;
    margin: 12px 0 5px;
    color: #604354;
}

.stat-card small {
    color: var(--muted);
    font-size: 10px;
}

.stat-icon {
    width: 39px;
    height: 39px;
    display: grid;
    place-items: center;
    border-radius: 10px;
    font-size: 21px;
    margin-bottom: 15px;
}

.blue {
    background: #fce5ee;
    color: #cf7298;
}

.purple {
    background: #f3eafa;
    color: #a27ac5;
}

.green {
    background: #e8f6ed;
    color: #6baf8a;
}

.orange {
    background: #fff2e5;
    color: #d6a05f;
}

/* CARTÕES E TABELAS */

.content-card {
    padding: 25px;
    margin-bottom: 22px;
    min-width: 0;
    box-shadow: 0 3px 15px #d982a508;
}

.section-heading {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 23px;
    gap: 15px;
}

.section-heading h3 {
    font-size: 16px;
    margin-bottom: 7px;
    color: #604354;
}

.section-heading p {
    font-size: 11px;
    color: var(--muted);
}

.table-wrapper {
    width: 100%;
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
    min-width: 570px;
}

thead {
    background: #fff3f7;
}

th {
    color: #a17e90;
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: .5px;
    padding: 15px 12px;
    font-weight: 700;
}

td {
    padding: 15px 12px;
    border-bottom: 1px solid #f7eaf0;
    font-size: 12px;
    color: #796371;
}

tbody tr:hover {
    background: #fff9fb;
}

.table-footer {
    color: var(--muted);
    font-size: 11px;
    margin-top: 15px;
}

/* PESQUISA */

.search-box {
    border: 1px solid var(--border);
    background: #fffafd;
    padding: 0 14px;
    border-radius: 9px;
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 20px;
}

.search-box span {
    font-size: 23px;
    color: var(--primary);
}

.search-box input {
    border: none;
    outline: none;
    background: transparent;
    padding: 14px 0;
    width: 100%;
    font-size: 12px;
}

/* FORMULÁRIOS */

.form-card {
    max-width: 850px;
}

.form-icon {
    background: #fce8f0;
    color: var(--primary-dark);
    width: 45px;
    height: 45px;
    border-radius: 12px;
    display: grid;
    place-items: center;
    font-size: 24px;
}

.form-grid,
.grades-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 9px;
    margin-bottom: 18px;
}

.full-width {
    grid-column: 1 / -1;
}

.form-group label {
    font-size: 12px;
    font-weight: 700;
    color: #775b6b;
}

.form-group input,
.form-group select {
    border: 1px solid #efdce5;
    background: #fffafd;
    border-radius: 8px;
    padding: 14px;
    outline: none;
    font-size: 12px;
    width: 100%;
    color: var(--text);
}

.form-group input:focus,
.form-group select:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px #d982a520;
}

.form-actions {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    margin-top: 15px;
}

/* NOTAS */

.grade-select {
    max-width: 500px;
}

.grades-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
    margin-top: 20px;
}

.average-preview {
    background: #fff1f6;
    border: 1px solid #f5dce7;
    border-radius: 12px;
    padding: 22px;
    margin: 5px 0 22px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 15px;
}

.average-preview span {
    color: #987b8b;
    font-size: 11px;
}

.average-preview h2 {
    color: var(--primary-dark);
    font-size: 28px;
    margin-top: 8px;
}

.average-preview strong {
    display: block;
    margin-top: 10px;
    font-size: 13px;
    color: var(--primary-dark);
}

/* SITUAÇÕES */

.badge {
    display: inline-block;
    padding: 6px 9px;
    border-radius: 20px;
    font-size: 10px;
    font-weight: 700;
    white-space: nowrap;
}

.badge.aprovado {
    color: #548f6d;
    background: #e5f5ea;
}

.badge.recuperacao {
    color: #b27b3e;
    background: #fff0db;
}

.badge.reprovado {
    color: #bd6473;
    background: #fde7eb;
}

.badge.pendente {
    color: #927d8a;
    background: #f2edf0;
}

/* AÇÕES */

.action-buttons {
    display: flex;
    gap: 7px;
}

.action-btn {
    border: 0;
    background: #fce8f0;
    color: #bd648a;
    padding: 7px 9px;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 700;
}

.action-btn.delete {
    background: #fff0f0;
    color: #ce737e;
}

/* ESTADO VAZIO */

.empty-state {
    text-align: center;
    padding: 35px 15px;
    color: var(--muted);
    font-size: 12px;
}

.empty-state strong {
    display: block;
    color: #775b6b;
    font-size: 14px;
    margin-bottom: 7px;
}

/* RODAPÉ */

footer {
    padding: 25px 0 10px;
    text-align: center;
    color: var(--muted);
    font-size: 11px;
    line-height: 1.8;
}

/* NOTIFICAÇÕES */

.toast {
    position: fixed;
    right: 25px;
    bottom: 25px;
    background: #a94f76;
    color: white;
    padding: 15px 22px;
    border-radius: 9px;
    font-size: 12px;
    box-shadow: 0 5px 20px #0002;
    opacity: 0;
    pointer-events: none;
    transform: translateY(15px);
    transition: .25s;
    z-index: 30;
    max-width: calc(100% - 30px);
}

.toast.show {
    opacity: 1;
    transform: translateY(0);
}

/* RESPONSIVIDADE */

@media (max-width: 1050px) {
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .main-content {
        padding: 25px;
    }
}

@media (max-width: 700px) {
    :root {
        --sidebar-width: 0px;
    }

    .sidebar {
        width: 100%;
        height: auto;
        position: relative;
        padding: 14px;
    }

    .brand {
        margin-bottom: 15px;
    }

    nav {
        flex-direction: row;
        overflow-x: auto;
        gap: 5px;
    }

    .nav-link {
        white-space: nowrap;
        padding: 11px;
        font-size: 11px;
    }

    .nav-link span {
        font-size: 15px;
    }

    .sidebar-footer {
        display: none;
    }

    .main-content {
        margin-left: 0;
        padding: 20px 14px;
    }

    .topbar h1 {
        font-size: 20px;
    }

    .topbar p {
        font-size: 11px;
    }

    .user-info {
        display: none;
    }

    .welcome-card {
        padding: 23px;
        min-height: 175px;
    }

    .welcome-card h2 {
        font-size: 20px;
    }

    .welcome-icon {
        font-size: 45px;
        padding: 0;
    }

    .stats-grid {
        gap: 10px;
    }

    .stat-card {
        padding: 14px;
    }

    .stat-card h2 {
        font-size: 24px;
    }

    .content-card {
        padding: 17px;
    }

    .section-heading {
        align-items: flex-start;
    }

    .section-heading .btn {
        padding: 10px;
        font-size: 10px;
    }

    .form-grid,
    .grades-grid {
        grid-template-columns: 1fr;
        gap: 0;
    }

    .average-preview {
        flex-wrap: wrap;
    }
}

@media (max-width: 380px) {
    .stats-grid {
        grid-template-columns: 1fr;
    }

    .welcome-icon {
        display: none;
    }
}
