/* ==================================================
   GOOGLE FONT
================================================== */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');


/* ==================================================
   VARIÁVEIS
================================================== */

:root {

    --bg-body: #f5f7fa;
    --bg-card: #ffffff;

    --text-primary: #374151;
    --text-secondary: #6b7280;

    --primary: #4b5563;
    --primary-hover: #374151;

    --success: #16a34a;
    --warning: #d97706;
    --danger: #dc2626;

    --border-color: #e5e7eb;

    --shadow-sm: 0 1px 2px rgba(0, 0, 0, .04);
    --shadow-md: 0 2px 6px rgba(0, 0, 0, .06);

    --header-height: 60px;

    --sidebar-width: 240px;
}


/* ==================================================
   RESET
================================================== */

*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    font-size: 15px;
}

body {

    margin: 0;
    padding: 0;

    font-family: 'Inter', sans-serif;
    font-size: .92rem;
    font-weight: 400;
    line-height: 1.5;

    background: var(--bg-body);

    color: var(--text-primary);

    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}


/* ==================================================
   TIPOGRAFIA
================================================== */

h1,
h2,
h3,
h4,
h5,
h6 {

    margin-bottom: 1rem;

    font-weight: 600;

    color: var(--text-primary);
}

h1 {
    font-size: 1.55rem;
}

h2 {
    font-size: 1.35rem;
}

h3 {
    font-size: 1.15rem;
}

h4 {
    font-size: 1rem;
}

p {

    margin-bottom: 1rem;

    color: var(--text-secondary);
}

a {

    text-decoration: none;

    color: var(--primary);

    transition: .2s;
}

a:hover {

    color: var(--primary-hover);
}


/* ==================================================
   CARDS
================================================== */

.card {

    border: 1px solid var(--border-color);

    border-radius: .75rem;

    background: var(--bg-card);

    box-shadow: var(--shadow-sm);
}

.card-header {

    background: #fff;

    font-weight: 600;

    border-bottom: 1px solid var(--border-color);
}


/* ==================================================
   TABELAS
================================================== */

.table {

    font-size: .88rem;

    color: var(--text-primary);
}

.table thead th {

    background: #f9fafb;

    font-size: .84rem;

    font-weight: 600;

    color: var(--text-primary);

    border-bottom: 1px solid var(--border-color);
}

.table tbody td {

    vertical-align: middle;

    color: var(--text-secondary);
}


/* ==================================================
   FORMULÁRIOS
================================================== */

.form-label {

    font-size: .85rem;

    font-weight: 500;

    color: var(--text-primary);
}

.form-control,
.form-select {

    min-height: 42px;

    font-size: .9rem;

    border: 1px solid var(--border-color);
}

.form-control:focus,
.form-select:focus {

    border-color: var(--primary);

    box-shadow:
        0 0 0 .15rem rgba(75, 85, 99, .15);
}


/* ==================================================
   LOGIN
================================================== */

.input-group-text {

    background: #fff;

    border-right: 0;
}

.input-group .form-control {

    border-left: 0;
}

.input-group .form-control:focus {

    box-shadow: none;
}

.input-group:focus-within {

    border-radius: .5rem;

    box-shadow:
        0 0 0 .15rem rgba(75, 85, 99, .15);
}


/* ==================================================
   BOTÕES
================================================== */

.btn {

    font-size: .88rem;

    font-weight: 500;
}

.btn-primary {

    background: var(--primary);

    border-color: var(--primary);
}

.btn-primary:hover {

    background: var(--primary-hover);

    border-color: var(--primary-hover);
}


/* ==================================================
   NAVBAR
================================================== */

.navbar {

    height: var(--header-height);

    box-shadow: var(--shadow-sm);
}


/* ==================================================
   SIDEBAR DESKTOP
================================================== */

.sidebar {

    width: var(--sidebar-width);

    min-width: var(--sidebar-width);

    min-height: calc(100vh - var(--header-height));

    padding: 1rem;

    background: #ffffff;

    border-right: 1px solid var(--border-color);
}

.sidebar .nav-link {

    padding: .75rem 1rem;

    margin-bottom: .2rem;

    border-radius: .5rem;

    font-weight: 600;

    color: #1f2937;

    cursor: pointer;
}

.sidebar .nav-link:hover {

    background: #f3f4f6;
}

.sidebar .nav-link.active {

    background: #374151;

    color: #ffffff;
}


/* ==================================================
   SUBMENUS
================================================== */

.submenu {

    list-style: none;

    padding-left: 1.25rem;

    margin: .50rem 0 1rem;
}

.submenu li {

    list-style: none;

    margin-bottom: .70rem;
}

.submenu a {

    display: block;

    padding: .25rem .10rem;

    font-size: .88rem;

    font-weight: 500;

    line-height: 1.6;

    color: #161616;

    text-decoration: none;

    transition: .2s;
}

.submenu a:hover {

    color: #1f2937;
    background-color: #f3f4f6;
}


/* ==================================================
   OFFCANVAS MOBILE
================================================== */

.offcanvas.offcanvas-start {

    width: 220px;
}

.offcanvas-header {

    border-bottom: 1px solid var(--border-color);
}

.offcanvas .nav-link {

    padding: .75rem 1rem;

    font-weight: 600;

    color: #1f2937;
}

.offcanvas .submenu {

    padding-left: 1.25rem;
}


/* ==================================================
   CONTEÚDO
================================================== */

@media (min-width: 992px) {

    main {

        width: calc(100% - var(--sidebar-width));
    }
}


/* ==================================================
   MOBILE
================================================== */

@media (max-width: 768px) {

    html {
        font-size: 14px;
    }

    .table {
        font-size: .85rem;
    }

    .btn {
        min-height: 42px;
    }
}

.layout-wrapper {

    display: flex;

    min-height: calc(100vh - var(--header-height));
}

.content-wrapper {

    flex: 1;

    padding: 1.5rem;
}

/* ==================================================
   FOOTER
================================================== */

.footer {

    background: #ffffff;

    border-top: 1px solid #e5e7eb;

    padding: .9rem 1.25rem;

    margin-top: 2rem;

    font-size: .85rem;

    color: #6b7280;
}

.footer-content {

    display: flex;

    justify-content: space-between;

    align-items: center;

    gap: 1rem;
}

@media (max-width: 768px) {

    .footer-content {

        flex-direction: column;

        text-align: center;
    }
}

/* =====================================================
   FREQUÊNCIA
===================================================== */

.frequencia-cards-mobile {
    display: none;
}

@media (max-width: 768px) {

    .page-header h1 {
        font-size: 1.6rem;
    }

    .row {
        display: flex;
        flex-direction: column;
        gap: 12px;
    }

    .col-md-2,
    .col-md-4 {
        width: 100%;
    }

    .card-body {
        padding: 12px;
    }

    .table-responsive-mobile {
        display: none;
    }

    .frequencia-cards-mobile {
        display: block;
    }

    .frequencia-item {
        background: #fff;
        border: 1px solid #dee2e6;
        border-radius: 10px;
        padding: 14px;
        margin-bottom: 12px;
    }

    .frequencia-item h6 {
        margin: 0 0 10px;
        font-size: 1rem;
        color: #334155;
    }

    .frequencia-info {
        margin-bottom: 8px;
        font-size: .92rem;
    }

    .frequencia-item .btn {
        width: 100%;
    }

    .card-body.text-center h2 {
        font-size: 2rem;
    }
}