html {
  font-size: 14px;
}

@media (min-width: 768px) {
  html {
    font-size: 16px;
  }
}

html {
  position: relative;
  min-height: 100%;
}

body {
  margin-bottom: 60px;
}

/* Estilos para a configura��o de meses */
.month-checkbox:checked + label .badge {
    background-color: #198754 !important;
    color: white !important;
}

/* Badges dos meses */
.badge-month {
    width: 30px;
    height: 30px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    font-weight: bold;
}

.btn-sm-custom {
    height: 30px;
    font-size: 12px;
    padding: 0 12px;
    border-radius: 4px;
    background: #0f1531;
    color: white;
    border: none;
    cursor: pointer;
}

    .btn-sm-custom:hover {
        background: #1a2342;
        color: white;
    }

.pre-enrollment-fab {
    position: fixed;
    right: 24px;
    bottom: 24px;
    z-index: 1030;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: #0f1531;
    color: white;
    padding: 14px 20px;
    border-radius: 50px;
    box-shadow: 0 4px 14px rgba(0,0,0,0.25);
    text-decoration: none;
    font-weight: 600;
    font-size: 14px;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

    .pre-enrollment-fab:hover {
        color: white;
        text-decoration: none;
        transform: translateY(-2px);
        box-shadow: 0 6px 18px rgba(0,0,0,0.3);
    }

    .pre-enrollment-fab i {
        font-size: 1.3rem;
    }

@media (max-width: 576px) {
    .pre-enrollment-fab-label {
        display: none;
    }

    .pre-enrollment-fab {
        padding: 14px;
        border-radius: 50%;
    }

        .pre-enrollment-fab i {
            margin: 0;
        }
}

/* Remove as margens laterais no mobile — o tema por defeito deixa 1.5rem + 15px de cada lado,
   o que desperdiça espaço precioso nas tabelas/cards em ecrãs pequenos */
html, body {
    max-width: 100%;
    overflow-x: hidden;
}

@media (max-width: 767px) {
    .container-fluid.page-body-wrapper {
        padding-left: 0 !important;
        padding-right: 0 !important;
    }

    .content-wrapper {
        padding-left: 0 !important;
        padding-right: 0 !important;
    }

    /* Cada secção/card da app usa "col-lg-12 grid-margin" sem um .row à volta, por isso o
       padding-left/right de 15px do Bootstrap fica visível como margem — remove-se só aqui,
       sem mexer nos pares col-md-6 lado a lado usados dentro de fieldsets */
    .grid-margin {
        padding-left: 0 !important;
        padding-right: 0 !important;
    }

    .card-body {
        padding-left: 0.75rem !important;
        padding-right: 0.75rem !important;
    }
}

/* Grupo de botões de acção da matrícula (Matricular / Matricular como repetente / Retificar) —
   sem isto ficavam com margin-left individual e sem espaçamento vertical ao quebrar linha,
   o que no telemóvel os deixava desalinhados/sobrepostos */
.enrollment-actions-bar {
    gap: 0.5rem;
    margin-bottom: 0.5rem;
}

    .enrollment-actions-bar > .btn {
        margin: 0 !important;
    }

@media (max-width: 480px) {
    .enrollment-actions-bar > .btn {
        flex: 1 1 100%;
    }
}

.bg-info {
    background-color: #0f1531 !important;
}

.clickable-row {
    cursor: pointer;
}

    .clickable-row:hover {
        background-color: rgba(15, 21, 49, 0.05);
    }

/* input[type=date] dentro de .form-row (que é flex) tem min-width:auto por defeito — como o
   calendário nativo do telemóvel tem um tamanho intrínseco relativamente grande, a coluna
   recusa-se a encolher para caber no modal e o campo sai para fora em vez de respeitar width:100% */
.form-row > [class*="col-"] {
    min-width: 0;
}

input[type="date"] {
    max-width: 100%;
    box-sizing: border-box;
}

/* A causa real: abaixo dos 576px o tema não define max-width nenhum no .modal-dialog (só
   "width: auto"), ou seja, o modal cresce (shrink-to-fit) até ao tamanho do seu descendente
   mais largo — e um input de data nativo tem um tamanho intrínseco suficiente para empurrar o
   modal inteiro para fora do ecrã. Isto, e não só o input, é o que "sai" no telemóvel. */
@media (max-width: 575.98px) {
    .modal-dialog {
        max-width: calc(100vw - 20px);
    }
}



/* Custom Scrollbar Global - Cor #0f1531 */
::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb {
    background: #0f1531;
    border-radius: 4px;
}

    ::-webkit-scrollbar-thumb:hover {
        background: #1a2347;
    }

/* Para Firefox */
* {
    scrollbar-width: thin;
    scrollbar-color: #0f1531 #f1f1f1;
}