/* =================================================================== *
 *                                                                     *
 *   sisaprendiz-bootstrap.css                                         *
 *                                                                     *
 *   Autoria:   Plataforma SisAprendiz                                 *
 *              Centro de Educação para o Trabalho (CET)               *
 *                                                                     *
 *   Propósito: Substituir o CSS do Bootstrap 4.6 (EOL 2024) por uma   *
 *              implementação própria, compatível com a API de classes *
 *              do Bootstrap 4, mas visualmente alinhada ao Design     *
 *              System v2 (tokens CSS, fonte Inter, paleta CET).       *
 *                                                                     *
 *   Referência arquitetural: ADR-025 — CSS Shim do Bootstrap 4        *
 *                            docs/diretrizes/frontend/                *
 *                            ADR-025-css-shim-bootstrap-4.md          *
 *                                                                     *
 *   Importante:                                                       *
 *     - Este arquivo NÃO é um fork do Bootstrap. É código original.   *
 *     - Mantém os nomes de classe do Bootstrap 4 por compatibilidade  *
 *       com o JS do Bootstrap (bootstrap.bundle.min.js) e com o       *
 *       markup das ~350 views existentes, que não precisam mudar.     *
 *     - bootstrap.min.css deve ser removido da ordem de carregamento. *
 *     - Dark mode via [data-theme="dark"] (ADR-010).                  *
 *                                                                     *
 *   Índice interno:                                                   *
 *     1.  Tokens                                                      *
 *     2.  Reboot                                                      *
 *     3.  Grid e container                                            *
 *     4.  Utilities — display, flex, spacing, text, bg, border        *
 *     5.  Forms                                                       *
 *     6.  Buttons                                                     *
 *     7.  Cards                                                       *
 *     8.  Modals                                                      *
 *     9.  Tables                                                      *
 *     10. Alerts                                                      *
 *     11. Badges                                                      *
 *     12. Dropdowns                                                   *
 *     13. Collapse                                                    *
 *     14. Nav / Tabs / Pills                                          *
 *     15. Close button                                                *
 *     16. Spinner                                                     *
 *     17. Input group                                                 *
 *     18. Navbar                                                      *
 *     19. Pagination                                                  *
 *     20. Progress                                                    *
 *     21. List group                                                  *
 *     22. Breadcrumb                                                  *
 *     23. Toast                                                       *
 *     24. Tooltip                                                     *
 *     25. Popover                                                     *
 *     26. Dark mode overrides                                         *
 *                                                                     *
 * =================================================================== */


/* =================================================================== *
 *  1. TOKENS                                                          *
 *  Fonte de verdade dos tokens do DS v2. Mantidos aqui para que o     *
 *  arquivo seja auto-suficiente mesmo se site.css não carregar.       *
 * =================================================================== */
:root {
    /* Cores institucionais */
    --sis-blue: #263868;
    --sis-blue-hover: #1E2D54;
    --sis-green: #2CB738;
    --sis-amber: #D97706;

    /* Superfícies */
    --surface-page: #F8F9FB;
    --surface-card: #FFFFFF;
    --surface-elevated: #F3F4F6;
    --surface-hover: #EEF0F4;

    /* Texto */
    --text-primary: #111827;
    --text-secondary: #6B7280;
    --text-tertiary: #9CA3AF;
    --text-inverse: #FFFFFF;

    /* Bordas */
    --border-default: rgba(0, 0, 0, 0.08);
    --border-subtle: rgba(0, 0, 0, 0.04);
    --border-emphasis: rgba(0, 0, 0, 0.15);

    /* Raios */
    --radius-sm: 6px;
    --radius-md: 8px;
    --radius-lg: 12px;
    --radius-xl: 16px;
    --radius-full: 9999px;

    /* Estados semânticos */
    --color-danger-bg: #FEF2F2;
    --color-danger-text: #991B1B;
    --color-danger-border: #FCA5A5;
    --color-success-bg: #ECFDF5;
    --color-success-text: #065F46;
    --color-success-border: #86EFAC;
    --color-warning-bg: #FFFBEB;
    --color-warning-text: #92400E;
    --color-warning-border: #FCD34D;
    --color-info-bg: #EFF6FF;
    --color-info-text: #1E40AF;
    --color-info-border: #93C5FD;

    /* Sombras */
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, .04);
    --shadow-md: 0 2px 8px rgba(0, 0, 0, .06);
    --shadow-lg: 0 4px 12px rgba(0, 0, 0, .08);
    --shadow-modal: 0 20px 60px rgba(0, 0, 0, .20);

    /* Foco */
    --focus-ring: 0 0 0 3px rgba(38, 56, 104, .10);
    --focus-ring-danger: 0 0 0 3px rgba(153, 27, 27, .12);
    --focus-ring-success: 0 0 0 3px rgba(6, 95, 70, .12);

    /* Transições */
    --transition-fast: 150ms ease;
    --transition-base: 150ms ease;
    --transition-slow: 250ms ease;

    /* Tipografia */
    --font-sans: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    --font-size-xs: 11px;
    --font-size-sm: 12px;
    --font-size-base: 13px;
    --font-size-md: 14px;
    --font-size-lg: 16px;
    --font-weight-regular: 400;
    --font-weight-medium: 500;
    --font-weight-semibold: 600;
}


/* =================================================================== *
 *  2. REBOOT                                                          *
 *  Equivalente ao _reboot.scss do Bootstrap, com Inter + tokens v2.   *
 * =================================================================== */
*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    font-family: var(--font-sans);
    font-size: var(--font-size-base);
    line-height: 1.5;
    -webkit-text-size-adjust: 100%;
    -webkit-tap-highlight-color: rgba(0, 0, 0, 0);
}

body {
    margin: 0;
    font-family: var(--font-sans);
    font-size: var(--font-size-base);
    font-weight: var(--font-weight-regular);
    line-height: 1.5;
    color: var(--text-primary);
    background-color: var(--surface-page);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
    font-feature-settings: 'cv02', 'cv03', 'cv04', 'cv11';
}

[tabindex="-1"]:focus:not(:focus-visible) { outline: 0 !important; }

hr {
    margin: 1rem 0;
    color: inherit;
    background-color: var(--border-default);
    border: 0;
    opacity: .6;
    height: 1px;
}

h1, h2, h3, h4, h5, h6 {
    margin-top: 0;
    margin-bottom: .5rem;
    font-weight: var(--font-weight-semibold);
    line-height: 1.25;
    color: var(--text-primary);
}

h1 { font-size: 28px; }
h2 { font-size: 22px; }
h3 { font-size: 18px; }
h4 { font-size: 16px; }
h5 { font-size: 14px; }
h6 { font-size: 13px; }

p {
    margin-top: 0;
    margin-bottom: 1rem;
}

small, .small {
    font-size: var(--font-size-sm);
    font-weight: inherit;
}

strong, b { font-weight: var(--font-weight-semibold); }

a {
    color: var(--sis-blue);
    text-decoration: none;
    background-color: transparent;
    transition: color var(--transition-base);
}
a:hover { color: var(--sis-blue-hover); text-decoration: underline; }

img, svg { vertical-align: middle; }

label { display: inline-block; margin-bottom: .25rem; }

button {
    border-radius: 0;
    font-family: inherit;
}

button:focus:not(:focus-visible) { outline: 0; }

input, button, select, optgroup, textarea {
    margin: 0;
    font-family: inherit;
    font-size: inherit;
    line-height: inherit;
}

button, [type="button"], [type="reset"], [type="submit"] {
    -webkit-appearance: button;
    cursor: pointer;
}

button:disabled, [type="button"]:disabled, [type="reset"]:disabled, [type="submit"]:disabled {
    cursor: not-allowed;
}

textarea { resize: vertical; }

/* Reset de listas dentro de componentes */
ul, ol { padding-left: 1.25rem; }


/* =================================================================== *
 *  3. GRID E CONTAINER                                                *
 *  Reimplementação do grid Bootstrap 4 com breakpoints idênticos:     *
 *  xs:0 | sm:576 | md:768 | lg:992 | xl:1200                          *
 * =================================================================== */
.container,
.container-fluid,
.container-sm,
.container-md,
.container-lg,
.container-xl {
    width: 100%;
    padding-right: 15px;
    padding-left: 15px;
    margin-right: auto;
    margin-left: auto;
}

@media (min-width: 576px) { .container, .container-sm { max-width: 540px; } }
@media (min-width: 768px) { .container, .container-sm, .container-md { max-width: 720px; } }
@media (min-width: 992px) { .container, .container-sm, .container-md, .container-lg { max-width: 960px; } }
@media (min-width: 1200px) { .container, .container-sm, .container-md, .container-lg, .container-xl { max-width: 1140px; } }

.row {
    display: flex;
    flex-wrap: wrap;
    margin-right: -15px;
    margin-left: -15px;
}
.no-gutters { margin-right: 0; margin-left: 0; }
.no-gutters > .col,
.no-gutters > [class*="col-"] { padding-right: 0; padding-left: 0; }

.col,
.col-1, .col-2, .col-3, .col-4, .col-5, .col-6,
.col-7, .col-8, .col-9, .col-10, .col-11, .col-12,
.col-auto,
.col-sm, .col-sm-1, .col-sm-2, .col-sm-3, .col-sm-4, .col-sm-5, .col-sm-6,
.col-sm-7, .col-sm-8, .col-sm-9, .col-sm-10, .col-sm-11, .col-sm-12, .col-sm-auto,
.col-md, .col-md-1, .col-md-2, .col-md-3, .col-md-4, .col-md-5, .col-md-6,
.col-md-7, .col-md-8, .col-md-9, .col-md-10, .col-md-11, .col-md-12, .col-md-auto,
.col-lg, .col-lg-1, .col-lg-2, .col-lg-3, .col-lg-4, .col-lg-5, .col-lg-6,
.col-lg-7, .col-lg-8, .col-lg-9, .col-lg-10, .col-lg-11, .col-lg-12, .col-lg-auto,
.col-xl, .col-xl-1, .col-xl-2, .col-xl-3, .col-xl-4, .col-xl-5, .col-xl-6,
.col-xl-7, .col-xl-8, .col-xl-9, .col-xl-10, .col-xl-11, .col-xl-12, .col-xl-auto {
    position: relative;
    width: 100%;
    padding-right: 15px;
    padding-left: 15px;
}

.col { flex-basis: 0; flex-grow: 1; max-width: 100%; }
.col-auto { flex: 0 0 auto; width: auto; max-width: 100%; }

.col-1  { flex: 0 0 8.3333%;  max-width: 8.3333%;  }
.col-2  { flex: 0 0 16.6667%; max-width: 16.6667%; }
.col-3  { flex: 0 0 25%;      max-width: 25%;      }
.col-4  { flex: 0 0 33.3333%; max-width: 33.3333%; }
.col-5  { flex: 0 0 41.6667%; max-width: 41.6667%; }
.col-6  { flex: 0 0 50%;      max-width: 50%;      }
.col-7  { flex: 0 0 58.3333%; max-width: 58.3333%; }
.col-8  { flex: 0 0 66.6667%; max-width: 66.6667%; }
.col-9  { flex: 0 0 75%;      max-width: 75%;      }
.col-10 { flex: 0 0 83.3333%; max-width: 83.3333%; }
.col-11 { flex: 0 0 91.6667%; max-width: 91.6667%; }
.col-12 { flex: 0 0 100%;     max-width: 100%;     }

@media (min-width: 576px) {
    .col-sm { flex-basis: 0; flex-grow: 1; max-width: 100%; }
    .col-sm-auto { flex: 0 0 auto; width: auto; max-width: 100%; }
    .col-sm-1  { flex: 0 0 8.3333%;  max-width: 8.3333%;  }
    .col-sm-2  { flex: 0 0 16.6667%; max-width: 16.6667%; }
    .col-sm-3  { flex: 0 0 25%;      max-width: 25%;      }
    .col-sm-4  { flex: 0 0 33.3333%; max-width: 33.3333%; }
    .col-sm-5  { flex: 0 0 41.6667%; max-width: 41.6667%; }
    .col-sm-6  { flex: 0 0 50%;      max-width: 50%;      }
    .col-sm-7  { flex: 0 0 58.3333%; max-width: 58.3333%; }
    .col-sm-8  { flex: 0 0 66.6667%; max-width: 66.6667%; }
    .col-sm-9  { flex: 0 0 75%;      max-width: 75%;      }
    .col-sm-10 { flex: 0 0 83.3333%; max-width: 83.3333%; }
    .col-sm-11 { flex: 0 0 91.6667%; max-width: 91.6667%; }
    .col-sm-12 { flex: 0 0 100%;     max-width: 100%;     }
}

@media (min-width: 768px) {
    .col-md { flex-basis: 0; flex-grow: 1; max-width: 100%; }
    .col-md-auto { flex: 0 0 auto; width: auto; max-width: 100%; }
    .col-md-1  { flex: 0 0 8.3333%;  max-width: 8.3333%;  }
    .col-md-2  { flex: 0 0 16.6667%; max-width: 16.6667%; }
    .col-md-3  { flex: 0 0 25%;      max-width: 25%;      }
    .col-md-4  { flex: 0 0 33.3333%; max-width: 33.3333%; }
    .col-md-5  { flex: 0 0 41.6667%; max-width: 41.6667%; }
    .col-md-6  { flex: 0 0 50%;      max-width: 50%;      }
    .col-md-7  { flex: 0 0 58.3333%; max-width: 58.3333%; }
    .col-md-8  { flex: 0 0 66.6667%; max-width: 66.6667%; }
    .col-md-9  { flex: 0 0 75%;      max-width: 75%;      }
    .col-md-10 { flex: 0 0 83.3333%; max-width: 83.3333%; }
    .col-md-11 { flex: 0 0 91.6667%; max-width: 91.6667%; }
    .col-md-12 { flex: 0 0 100%;     max-width: 100%;     }
}

@media (min-width: 992px) {
    .col-lg { flex-basis: 0; flex-grow: 1; max-width: 100%; }
    .col-lg-auto { flex: 0 0 auto; width: auto; max-width: 100%; }
    .col-lg-1  { flex: 0 0 8.3333%;  max-width: 8.3333%;  }
    .col-lg-2  { flex: 0 0 16.6667%; max-width: 16.6667%; }
    .col-lg-3  { flex: 0 0 25%;      max-width: 25%;      }
    .col-lg-4  { flex: 0 0 33.3333%; max-width: 33.3333%; }
    .col-lg-5  { flex: 0 0 41.6667%; max-width: 41.6667%; }
    .col-lg-6  { flex: 0 0 50%;      max-width: 50%;      }
    .col-lg-7  { flex: 0 0 58.3333%; max-width: 58.3333%; }
    .col-lg-8  { flex: 0 0 66.6667%; max-width: 66.6667%; }
    .col-lg-9  { flex: 0 0 75%;      max-width: 75%;      }
    .col-lg-10 { flex: 0 0 83.3333%; max-width: 83.3333%; }
    .col-lg-11 { flex: 0 0 91.6667%; max-width: 91.6667%; }
    .col-lg-12 { flex: 0 0 100%;     max-width: 100%;     }
}

@media (min-width: 1200px) {
    .col-xl { flex-basis: 0; flex-grow: 1; max-width: 100%; }
    .col-xl-auto { flex: 0 0 auto; width: auto; max-width: 100%; }
    .col-xl-1  { flex: 0 0 8.3333%;  max-width: 8.3333%;  }
    .col-xl-2  { flex: 0 0 16.6667%; max-width: 16.6667%; }
    .col-xl-3  { flex: 0 0 25%;      max-width: 25%;      }
    .col-xl-4  { flex: 0 0 33.3333%; max-width: 33.3333%; }
    .col-xl-5  { flex: 0 0 41.6667%; max-width: 41.6667%; }
    .col-xl-6  { flex: 0 0 50%;      max-width: 50%;      }
    .col-xl-7  { flex: 0 0 58.3333%; max-width: 58.3333%; }
    .col-xl-8  { flex: 0 0 66.6667%; max-width: 66.6667%; }
    .col-xl-9  { flex: 0 0 75%;      max-width: 75%;      }
    .col-xl-10 { flex: 0 0 83.3333%; max-width: 83.3333%; }
    .col-xl-11 { flex: 0 0 91.6667%; max-width: 91.6667%; }
    .col-xl-12 { flex: 0 0 100%;     max-width: 100%;     }
}

.form-row { display: flex; flex-wrap: wrap; margin-right: -5px; margin-left: -5px; }
.form-row > .col,
.form-row > [class*="col-"] { padding-right: 5px; padding-left: 5px; }


/* =================================================================== *
 *  4. UTILITIES                                                       *
 *  Subset do que é usado na base. Não reimplementa utilidades sem uso.*
 * =================================================================== */

/* Display */
.d-none         { display: none !important; }
.d-inline       { display: inline !important; }
.d-inline-block { display: inline-block !important; }
.d-block        { display: block !important; }
.d-flex         { display: flex !important; }
.d-inline-flex  { display: inline-flex !important; }
.d-table        { display: table !important; }
.d-table-row    { display: table-row !important; }
.d-table-cell   { display: table-cell !important; }

@media (min-width: 576px) {
    .d-sm-none { display: none !important; } .d-sm-inline { display: inline !important; }
    .d-sm-inline-block { display: inline-block !important; } .d-sm-block { display: block !important; }
    .d-sm-flex { display: flex !important; } .d-sm-inline-flex { display: inline-flex !important; }
}
@media (min-width: 768px) {
    .d-md-none { display: none !important; } .d-md-inline { display: inline !important; }
    .d-md-inline-block { display: inline-block !important; } .d-md-block { display: block !important; }
    .d-md-flex { display: flex !important; } .d-md-inline-flex { display: inline-flex !important; }
}
@media (min-width: 992px) {
    .d-lg-none { display: none !important; } .d-lg-inline { display: inline !important; }
    .d-lg-inline-block { display: inline-block !important; } .d-lg-block { display: block !important; }
    .d-lg-flex { display: flex !important; } .d-lg-inline-flex { display: inline-flex !important; }
}
@media (min-width: 1200px) {
    .d-xl-none { display: none !important; } .d-xl-inline { display: inline !important; }
    .d-xl-inline-block { display: inline-block !important; } .d-xl-block { display: block !important; }
    .d-xl-flex { display: flex !important; } .d-xl-inline-flex { display: inline-flex !important; }
}

/* Flex */
.flex-row         { flex-direction: row !important; }
.flex-column      { flex-direction: column !important; }
.flex-row-reverse { flex-direction: row-reverse !important; }
.flex-wrap        { flex-wrap: wrap !important; }
.flex-nowrap      { flex-wrap: nowrap !important; }
.flex-fill        { flex: 1 1 auto !important; }
.flex-grow-0      { flex-grow: 0 !important; }
.flex-grow-1      { flex-grow: 1 !important; }
.flex-shrink-0    { flex-shrink: 0 !important; }
.flex-shrink-1    { flex-shrink: 1 !important; }

.justify-content-start   { justify-content: flex-start !important; }
.justify-content-end     { justify-content: flex-end !important; }
.justify-content-center  { justify-content: center !important; }
.justify-content-between { justify-content: space-between !important; }
.justify-content-around  { justify-content: space-around !important; }

.align-items-start    { align-items: flex-start !important; }
.align-items-end      { align-items: flex-end !important; }
.align-items-center   { align-items: center !important; }
.align-items-baseline { align-items: baseline !important; }
.align-items-stretch  { align-items: stretch !important; }

.align-self-start   { align-self: flex-start !important; }
.align-self-end     { align-self: flex-end !important; }
.align-self-center  { align-self: center !important; }
.align-self-stretch { align-self: stretch !important; }

/* Spacing — escala Bootstrap 4: 0,1,2,3,4,5 → 0/.25/.5/1/1.5/3 rem */
.m-0 { margin: 0 !important; }           .p-0 { padding: 0 !important; }
.m-1 { margin: .25rem !important; }      .p-1 { padding: .25rem !important; }
.m-2 { margin: .5rem !important; }       .p-2 { padding: .5rem !important; }
.m-3 { margin: 1rem !important; }        .p-3 { padding: 1rem !important; }
.m-4 { margin: 1.5rem !important; }      .p-4 { padding: 1.5rem !important; }
.m-5 { margin: 3rem !important; }        .p-5 { padding: 3rem !important; }
.m-auto { margin: auto !important; }

.mt-0 { margin-top: 0 !important; }      .pt-0 { padding-top: 0 !important; }
.mt-1 { margin-top: .25rem !important; } .pt-1 { padding-top: .25rem !important; }
.mt-2 { margin-top: .5rem !important; }  .pt-2 { padding-top: .5rem !important; }
.mt-3 { margin-top: 1rem !important; }   .pt-3 { padding-top: 1rem !important; }
.mt-4 { margin-top: 1.5rem !important; } .pt-4 { padding-top: 1.5rem !important; }
.mt-5 { margin-top: 3rem !important; }   .pt-5 { padding-top: 3rem !important; }
.mt-auto { margin-top: auto !important; }

.mb-0 { margin-bottom: 0 !important; }      .pb-0 { padding-bottom: 0 !important; }
.mb-1 { margin-bottom: .25rem !important; } .pb-1 { padding-bottom: .25rem !important; }
.mb-2 { margin-bottom: .5rem !important; }  .pb-2 { padding-bottom: .5rem !important; }
.mb-3 { margin-bottom: 1rem !important; }   .pb-3 { padding-bottom: 1rem !important; }
.mb-4 { margin-bottom: 1.5rem !important; } .pb-4 { padding-bottom: 1.5rem !important; }
.mb-5 { margin-bottom: 3rem !important; }   .pb-5 { padding-bottom: 3rem !important; }
.mb-auto { margin-bottom: auto !important; }

.ml-0 { margin-left: 0 !important; }      .pl-0 { padding-left: 0 !important; }
.ml-1 { margin-left: .25rem !important; } .pl-1 { padding-left: .25rem !important; }
.ml-2 { margin-left: .5rem !important; }  .pl-2 { padding-left: .5rem !important; }
.ml-3 { margin-left: 1rem !important; }   .pl-3 { padding-left: 1rem !important; }
.ml-4 { margin-left: 1.5rem !important; } .pl-4 { padding-left: 1.5rem !important; }
.ml-5 { margin-left: 3rem !important; }   .pl-5 { padding-left: 3rem !important; }
.ml-auto { margin-left: auto !important; }

.mr-0 { margin-right: 0 !important; }      .pr-0 { padding-right: 0 !important; }
.mr-1 { margin-right: .25rem !important; } .pr-1 { padding-right: .25rem !important; }
.mr-2 { margin-right: .5rem !important; }  .pr-2 { padding-right: .5rem !important; }
.mr-3 { margin-right: 1rem !important; }   .pr-3 { padding-right: 1rem !important; }
.mr-4 { margin-right: 1.5rem !important; } .pr-4 { padding-right: 1.5rem !important; }
.mr-5 { margin-right: 3rem !important; }   .pr-5 { padding-right: 3rem !important; }
.mr-auto { margin-right: auto !important; }

.mx-0 { margin-left: 0 !important;      margin-right: 0 !important; }
.mx-1 { margin-left: .25rem !important; margin-right: .25rem !important; }
.mx-2 { margin-left: .5rem !important;  margin-right: .5rem !important; }
.mx-3 { margin-left: 1rem !important;   margin-right: 1rem !important; }
.mx-4 { margin-left: 1.5rem !important; margin-right: 1.5rem !important; }
.mx-5 { margin-left: 3rem !important;   margin-right: 3rem !important; }
.mx-auto { margin-left: auto !important; margin-right: auto !important; }

.my-0 { margin-top: 0 !important;      margin-bottom: 0 !important; }
.my-1 { margin-top: .25rem !important; margin-bottom: .25rem !important; }
.my-2 { margin-top: .5rem !important;  margin-bottom: .5rem !important; }
.my-3 { margin-top: 1rem !important;   margin-bottom: 1rem !important; }
.my-4 { margin-top: 1.5rem !important; margin-bottom: 1.5rem !important; }
.my-5 { margin-top: 3rem !important;   margin-bottom: 3rem !important; }

.px-0 { padding-left: 0 !important;      padding-right: 0 !important; }
.px-1 { padding-left: .25rem !important; padding-right: .25rem !important; }
.px-2 { padding-left: .5rem !important;  padding-right: .5rem !important; }
.px-3 { padding-left: 1rem !important;   padding-right: 1rem !important; }
.px-4 { padding-left: 1.5rem !important; padding-right: 1.5rem !important; }
.px-5 { padding-left: 3rem !important;   padding-right: 3rem !important; }

.py-0 { padding-top: 0 !important;      padding-bottom: 0 !important; }
.py-1 { padding-top: .25rem !important; padding-bottom: .25rem !important; }
.py-2 { padding-top: .5rem !important;  padding-bottom: .5rem !important; }
.py-3 { padding-top: 1rem !important;   padding-bottom: 1rem !important; }
.py-4 { padding-top: 1.5rem !important; padding-bottom: 1.5rem !important; }
.py-5 { padding-top: 3rem !important;   padding-bottom: 3rem !important; }

/* Text */
.text-left    { text-align: left !important; }
.text-right   { text-align: right !important; }
.text-center  { text-align: center !important; }
.text-justify { text-align: justify !important; }
.text-nowrap  { white-space: nowrap !important; }
.text-truncate {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.text-uppercase  { text-transform: uppercase !important; }
.text-lowercase  { text-transform: lowercase !important; }
.text-capitalize { text-transform: capitalize !important; }

.text-primary   { color: var(--sis-blue) !important; }
.text-secondary { color: var(--text-secondary) !important; }
.text-success   { color: var(--color-success-text) !important; }
.text-danger    { color: var(--color-danger-text) !important; }
.text-warning   { color: var(--color-warning-text) !important; }
.text-info      { color: var(--color-info-text) !important; }
.text-light     { color: var(--surface-elevated) !important; }
.text-dark      { color: var(--text-primary) !important; }
.text-muted     { color: var(--text-tertiary) !important; }
.text-white     { color: #fff !important; }
.text-body      { color: var(--text-primary) !important; }

.font-weight-light    { font-weight: 300 !important; }
.font-weight-normal   { font-weight: var(--font-weight-regular) !important; }
.font-weight-bold     { font-weight: var(--font-weight-semibold) !important; }

.font-italic { font-style: italic !important; }

/* Background */
.bg-primary     { background-color: var(--sis-blue) !important; color: #fff; }
.bg-secondary   { background-color: var(--surface-elevated) !important; }
.bg-success     { background-color: var(--color-success-bg) !important; color: var(--color-success-text); }
.bg-danger      { background-color: var(--color-danger-bg) !important; color: var(--color-danger-text); }
.bg-warning     { background-color: var(--color-warning-bg) !important; color: var(--color-warning-text); }
.bg-info        { background-color: var(--color-info-bg) !important; color: var(--color-info-text); }
.bg-light       { background-color: var(--surface-elevated) !important; }
.bg-dark        { background-color: var(--text-primary) !important; color: #fff; }
.bg-white       { background-color: #fff !important; }
.bg-transparent { background-color: transparent !important; }
.bg-body        { background-color: var(--surface-page) !important; }

/* Border */
.border        { border: .5px solid var(--border-default) !important; }
.border-top    { border-top: .5px solid var(--border-default) !important; }
.border-right  { border-right: .5px solid var(--border-default) !important; }
.border-bottom { border-bottom: .5px solid var(--border-default) !important; }
.border-left   { border-left: .5px solid var(--border-default) !important; }
.border-0        { border: 0 !important; }
.border-top-0    { border-top: 0 !important; }
.border-right-0  { border-right: 0 !important; }
.border-bottom-0 { border-bottom: 0 !important; }
.border-left-0   { border-left: 0 !important; }
.border-primary  { border-color: var(--sis-blue) !important; }
.border-success  { border-color: var(--color-success-border) !important; }
.border-danger   { border-color: var(--color-danger-border) !important; }
.border-warning  { border-color: var(--color-warning-border) !important; }
.border-info     { border-color: var(--color-info-border) !important; }

.rounded         { border-radius: var(--radius-md) !important; }
.rounded-sm      { border-radius: var(--radius-sm) !important; }
.rounded-lg      { border-radius: var(--radius-lg) !important; }
.rounded-circle  { border-radius: 50% !important; }
.rounded-pill    { border-radius: var(--radius-full) !important; }
.rounded-0       { border-radius: 0 !important; }

/* Sizing */
.w-25   { width: 25% !important; }
.w-50   { width: 50% !important; }
.w-75   { width: 75% !important; }
.w-100  { width: 100% !important; }
.w-auto { width: auto !important; }
.h-25   { height: 25% !important; }
.h-50   { height: 50% !important; }
.h-75   { height: 75% !important; }
.h-100  { height: 100% !important; }
.h-auto { height: auto !important; }
.mw-100 { max-width: 100% !important; }
.mh-100 { max-height: 100% !important; }
.vw-100 { width: 100vw !important; }
.vh-100 { height: 100vh !important; }

/* Overflow */
.overflow-auto   { overflow: auto !important; }
.overflow-hidden { overflow: hidden !important; }

/* Position */
.position-static   { position: static !important; }
.position-relative { position: relative !important; }
.position-absolute { position: absolute !important; }
.position-fixed    { position: fixed !important; }
.position-sticky   { position: sticky !important; }
.fixed-top    { position: fixed; top: 0; right: 0; left: 0; z-index: 1030; }
.fixed-bottom { position: fixed; right: 0; bottom: 0; left: 0; z-index: 1030; }

/* Visibility / screenreader */
.visible   { visibility: visible !important; }
.invisible { visibility: hidden !important; }
.sr-only {
    position: absolute !important;
    width: 1px; height: 1px;
    padding: 0; margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* Shadows */
.shadow-none { box-shadow: none !important; }
.shadow-sm   { box-shadow: var(--shadow-sm) !important; }
.shadow      { box-shadow: var(--shadow-md) !important; }
.shadow-lg   { box-shadow: var(--shadow-lg) !important; }


/* =================================================================== *
 *  5. FORMS                                                           *
 *  Coração desta ADR: é aqui que o ganho visual mais pesa.            *
 *  Compatível com:                                                    *
 *    - jQuery Validate (.is-invalid / .invalid-feedback / .was-validated) *
 *    - ADR-022 (Bootstrap Validation)                                 *
 * =================================================================== */
.form-group {
    margin-bottom: 1rem;
}

.form-control {
    display: block;
    width: 100%;
    height: 40px;
    padding: 0 12px;
    font-family: var(--font-sans);
    font-size: var(--font-size-base);
    font-weight: var(--font-weight-regular);
    line-height: 1.4;
    color: var(--text-primary);
    background-color: var(--surface-card);
    background-clip: padding-box;
    border: .5px solid var(--border-default);
    border-radius: var(--radius-md);
    outline: none;
    transition: border-color var(--transition-base), box-shadow var(--transition-base);
}

.form-control::placeholder { color: var(--text-tertiary); opacity: 1; }

.form-control:focus {
    border-color: var(--sis-blue);
    box-shadow: var(--focus-ring);
}

.form-control:disabled,
.form-control[readonly] {
    background-color: var(--surface-elevated);
    color: var(--text-secondary);
    cursor: not-allowed;
    opacity: 1;
}

.form-control-sm { height: 32px; padding: 0 10px; font-size: var(--font-size-sm); border-radius: var(--radius-sm); }
.form-control-lg { height: 48px; padding: 0 14px; font-size: var(--font-size-md); border-radius: var(--radius-lg); }

/* textarea precisa quebrar height fixo */
textarea.form-control {
    height: auto;
    min-height: 80px;
    padding: 10px 12px;
    resize: vertical;
    line-height: 1.5;
}

/* select nativo — seta própria em SVG embutido */
select.form-control {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 16 16'%3E%3Cpath fill='%236B7280' d='M1.646 4.646a.5.5 0 0 1 .708 0L8 10.293l5.646-5.647a.5.5 0 0 1 .708.708l-6 6a.5.5 0 0 1-.708 0l-6-6a.5.5 0 0 1 0-.708'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 32px;
}
select.form-control[multiple],
select.form-control[size] { height: auto; padding: 8px 12px; }

.form-control-plaintext {
    display: block;
    width: 100%;
    padding: 8px 0;
    margin-bottom: 0;
    line-height: 1.5;
    color: var(--text-primary);
    background-color: transparent;
    border: solid transparent;
    border-width: 1px 0;
}

.form-text {
    display: block;
    margin-top: .25rem;
    font-size: var(--font-size-xs);
    color: var(--text-tertiary);
}

.form-label {
    display: inline-block;
    margin-bottom: .25rem;
    font-size: var(--font-size-base);
    font-weight: var(--font-weight-medium);
    color: var(--text-primary);
}

.form-inline {
    display: flex;
    flex-flow: row wrap;
    align-items: center;
}
.form-inline .form-check { width: 100%; }
@media (min-width: 576px) {
    .form-inline label {
        display: flex;
        align-items: center;
        justify-content: center;
        margin-bottom: 0;
    }
    .form-inline .form-group {
        display: flex;
        flex: 0 0 auto;
        flex-flow: row wrap;
        align-items: center;
        margin-bottom: 0;
    }
    .form-inline .form-control { display: inline-block; width: auto; vertical-align: middle; }
    .form-inline .form-control-plaintext { display: inline-block; }
    .form-inline .input-group,
    .form-inline .custom-select { width: auto; }
    .form-inline .form-check {
        display: flex;
        align-items: center;
        justify-content: center;
        width: auto;
        padding-left: 0;
    }
    .form-inline .form-check-input {
        position: relative;
        flex-shrink: 0;
        margin-top: 0;
        margin-right: .25rem;
        margin-left: 0;
    }
    .form-inline .custom-control { align-items: center; justify-content: center; }
    .form-inline .custom-control-label { margin-bottom: 0; }
}

/* Validation states — precisa preservar seletores exatos para ADR-022 */
.form-control.is-invalid,
.was-validated .form-control:invalid {
    border-color: var(--color-danger-text);
    padding-right: calc(1em + .75rem);
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='%23991B1B' viewBox='0 0 16 16'%3E%3Cpath d='M8 15A7 7 0 1 1 8 1a7 7 0 0 1 0 14zm0 1A8 8 0 1 0 8 0a8 8 0 0 0 0 16z'/%3E%3Cpath d='M7.002 11a1 1 0 1 1 2 0 1 1 0 0 1-2 0zM7.1 4.995a.905.905 0 1 1 1.8 0l-.35 3.507a.552.552 0 0 1-1.1 0L7.1 4.995z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right calc(.375em + .1875rem) center;
    background-size: calc(.75em + .375rem) calc(.75em + .375rem);
}
.form-control.is-invalid:focus,
.was-validated .form-control:invalid:focus {
    border-color: var(--color-danger-text);
    box-shadow: var(--focus-ring-danger);
}

.form-control.is-valid,
.was-validated .form-control:valid {
    border-color: var(--color-success-text);
}
.form-control.is-valid:focus,
.was-validated .form-control:valid:focus {
    border-color: var(--color-success-text);
    box-shadow: var(--focus-ring-success);
}

.invalid-feedback {
    display: none;
    width: 100%;
    margin-top: .25rem;
    font-size: var(--font-size-xs);
    color: var(--color-danger-text);
}
.form-control.is-invalid ~ .invalid-feedback,
.was-validated .form-control:invalid ~ .invalid-feedback {
    display: block;
}

.valid-feedback {
    display: none;
    width: 100%;
    margin-top: .25rem;
    font-size: var(--font-size-xs);
    color: var(--color-success-text);
}
.form-control.is-valid ~ .valid-feedback,
.was-validated .form-control:valid ~ .valid-feedback {
    display: block;
}

/* form-check — checkbox/radio nativos com label */
.form-check {
    position: relative;
    display: block;
    padding-left: 1.5rem;
    min-height: 1.25rem;
}
.form-check-input {
    position: absolute;
    margin-top: .25rem;
    margin-left: -1.5rem;
    accent-color: var(--sis-blue);
}
.form-check-label {
    font-size: var(--font-size-base);
    color: var(--text-primary);
    cursor: pointer;
}
.form-check-inline {
    display: inline-flex;
    align-items: center;
    padding-left: 0;
    margin-right: 1rem;
}
.form-check-inline .form-check-input {
    position: static;
    margin-top: 0;
    margin-right: .5rem;
    margin-left: 0;
}

/* custom-control (switch, checkbox, radio estilizados) */
.custom-control {
    position: relative;
    display: block;
    min-height: 1.25rem;
    padding-left: 1.75rem;
}
.custom-control-inline {
    display: inline-flex;
    margin-right: 1rem;
}
.custom-control-input {
    position: absolute;
    left: 0;
    z-index: -1;
    width: 1rem;
    height: 1.25rem;
    opacity: 0;
}
.custom-control-label {
    position: relative;
    margin-bottom: 0;
    cursor: pointer;
    font-size: var(--font-size-base);
    color: var(--text-primary);
}
.custom-control-label::before {
    content: "";
    position: absolute;
    top: .15rem;
    left: -1.75rem;
    display: block;
    width: 1rem;
    height: 1rem;
    background: var(--surface-card);
    border: .5px solid var(--border-emphasis);
    border-radius: var(--radius-sm);
    transition: background var(--transition-base), border-color var(--transition-base);
}
.custom-control-label::after {
    content: "";
    position: absolute;
    top: .15rem;
    left: -1.75rem;
    display: block;
    width: 1rem;
    height: 1rem;
    background-repeat: no-repeat;
    background-position: center;
    background-size: 50% 50%;
}
.custom-control-input:checked ~ .custom-control-label::before {
    background: var(--sis-blue);
    border-color: var(--sis-blue);
}
.custom-checkbox .custom-control-input:checked ~ .custom-control-label::after {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='8' height='8' viewBox='0 0 8 8'%3E%3Cpath fill='%23fff' d='M6.564.75l-3.59 3.612-1.538-1.55L0 4.26 2.974 7.25 8 2.193z'/%3E%3C/svg%3E");
}
.custom-radio .custom-control-label::before {
    border-radius: 50%;
}
.custom-radio .custom-control-input:checked ~ .custom-control-label::after {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Ccircle r='3' fill='%23fff' cx='6' cy='6'/%3E%3C/svg%3E");
}
.custom-switch {
    padding-left: 2.25rem;
}
.custom-switch .custom-control-label::before {
    left: -2.25rem;
    width: 1.75rem;
    pointer-events: all;
    border-radius: var(--radius-full);
}
.custom-switch .custom-control-label::after {
    top: calc(.15rem + 2px);
    left: calc(-2.25rem + 2px);
    width: calc(1rem - 4px);
    height: calc(1rem - 4px);
    background: var(--border-emphasis);
    border-radius: var(--radius-full);
    transition: transform var(--transition-base);
}
.custom-switch .custom-control-input:checked ~ .custom-control-label::after {
    transform: translateX(.75rem);
    background: #fff;
}

.custom-select {
    display: inline-block;
    width: 100%;
    height: 40px;
    padding: 0 32px 0 12px;
    font-family: var(--font-sans);
    font-size: var(--font-size-base);
    color: var(--text-primary);
    background: var(--surface-card) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 16 16'%3E%3Cpath fill='%236B7280' d='M1.646 4.646a.5.5 0 0 1 .708 0L8 10.293l5.646-5.647a.5.5 0 0 1 .708.708l-6 6a.5.5 0 0 1-.708 0l-6-6a.5.5 0 0 1 0-.708'/%3E%3C/svg%3E") right 12px center no-repeat;
    border: .5px solid var(--border-default);
    border-radius: var(--radius-md);
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    outline: none;
    transition: border-color var(--transition-base), box-shadow var(--transition-base);
}
.custom-select:focus {
    border-color: var(--sis-blue);
    box-shadow: var(--focus-ring);
}
.custom-select:disabled {
    background-color: var(--surface-elevated);
    color: var(--text-secondary);
}


/* =================================================================== *
 *  6. BUTTONS                                                         *
 * =================================================================== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 8px 16px;
    font-family: var(--font-sans);
    font-size: var(--font-size-base);
    font-weight: var(--font-weight-medium);
    line-height: 1.2;
    text-align: center;
    text-decoration: none;
    vertical-align: middle;
    white-space: nowrap;
    user-select: none;
    border: .5px solid transparent;
    border-radius: var(--radius-md);
    background: transparent;
    color: var(--text-primary);
    cursor: pointer;
    transition: background var(--transition-base), color var(--transition-base), border-color var(--transition-base), box-shadow var(--transition-base);
}
.btn:hover { text-decoration: none; }
.btn:focus,
.btn.focus { outline: 0; box-shadow: var(--focus-ring); }
.btn:disabled,
.btn.disabled {
    opacity: .55;
    cursor: not-allowed;
    pointer-events: none;
}

.btn-sm { padding: 6px 12px; font-size: var(--font-size-sm); border-radius: var(--radius-sm); }
.btn-lg { padding: 10px 20px; font-size: var(--font-size-md); border-radius: var(--radius-lg); }
.btn-block {
    display: flex;
    width: 100%;
}

/* Variantes sólidas */
.btn-primary {
    background: var(--sis-blue);
    color: var(--text-inverse);
    border-color: var(--sis-blue);
}
.btn-primary:hover { background: var(--sis-blue-hover); border-color: var(--sis-blue-hover); color: #fff; }

.btn-secondary {
    background: var(--surface-card);
    color: var(--text-primary);
    border-color: var(--border-default);
}
.btn-secondary:hover { background: var(--surface-hover); border-color: var(--border-emphasis); }

.btn-success {
    background: var(--color-success-text);
    color: #fff;
    border-color: var(--color-success-text);
}
.btn-success:hover { filter: brightness(.92); color: #fff; }

.btn-danger {
    background: var(--color-danger-text);
    color: #fff;
    border-color: var(--color-danger-text);
}
.btn-danger:hover { filter: brightness(.92); color: #fff; }

.btn-warning {
    background: var(--sis-amber);
    color: var(--text-primary);
    border-color: var(--sis-amber);
}
.btn-warning:hover { filter: brightness(.94); }

.btn-info {
    background: var(--color-info-text);
    color: #fff;
    border-color: var(--color-info-text);
}
.btn-info:hover { filter: brightness(.92); color: #fff; }

.btn-light {
    background: var(--surface-elevated);
    color: var(--text-primary);
    border-color: var(--border-default);
}
.btn-light:hover { background: var(--surface-hover); }

.btn-dark {
    background: var(--text-primary);
    color: #fff;
    border-color: var(--text-primary);
}
.btn-dark:hover { filter: brightness(1.15); color: #fff; }

.btn-link {
    background: transparent;
    color: var(--sis-blue);
    border-color: transparent;
    padding: 6px 8px;
}
.btn-link:hover { color: var(--sis-blue-hover); text-decoration: underline; background: transparent; }

/* Variantes outline */
.btn-outline-primary   { color: var(--sis-blue);            border-color: var(--sis-blue); }
.btn-outline-primary:hover   { background: var(--sis-blue); color: #fff; }
.btn-outline-secondary { color: var(--text-primary);        border-color: var(--border-default); }
.btn-outline-secondary:hover { background: var(--surface-hover); }
.btn-outline-success   { color: var(--color-success-text);  border-color: var(--color-success-text); }
.btn-outline-success:hover   { background: var(--color-success-text); color: #fff; }
.btn-outline-danger    { color: var(--color-danger-text);   border-color: var(--color-danger-text); }
.btn-outline-danger:hover    { background: var(--color-danger-text); color: #fff; }
.btn-outline-warning   { color: var(--color-warning-text);  border-color: var(--sis-amber); }
.btn-outline-warning:hover   { background: var(--sis-amber); color: var(--text-primary); }
.btn-outline-info      { color: var(--color-info-text);     border-color: var(--color-info-text); }
.btn-outline-info:hover      { background: var(--color-info-text); color: #fff; }
.btn-outline-light     { color: var(--text-secondary);      border-color: var(--border-default); }
.btn-outline-light:hover     { background: var(--surface-hover); }
.btn-outline-dark      { color: var(--text-primary);        border-color: var(--text-primary); }
.btn-outline-dark:hover      { background: var(--text-primary); color: #fff; }

/* Button group */
.btn-group,
.btn-group-vertical {
    position: relative;
    display: inline-flex;
    vertical-align: middle;
}
.btn-group > .btn {
    position: relative;
    flex: 1 1 auto;
}
.btn-group > .btn:not(:first-child) {
    margin-left: -.5px;
    border-top-left-radius: 0;
    border-bottom-left-radius: 0;
}
.btn-group > .btn:not(:last-child):not(.dropdown-toggle) {
    border-top-right-radius: 0;
    border-bottom-right-radius: 0;
}
.btn-toolbar {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-start;
    gap: 8px;
}


/* =================================================================== *
 *  7. CARDS                                                           *
 * =================================================================== */
.card {
    position: relative;
    display: flex;
    flex-direction: column;
    min-width: 0;
    word-wrap: break-word;
    background-color: var(--surface-card);
    background-clip: border-box;
    border: .5px solid var(--border-default);
    border-radius: var(--radius-lg);
}
.card-body {
    flex: 1 1 auto;
    padding: 1rem 1.25rem;
    color: var(--text-primary);
}
.card-title {
    margin-bottom: .5rem;
    font-size: 16px;
    font-weight: var(--font-weight-semibold);
    color: var(--text-primary);
}
.card-subtitle {
    margin-top: -.25rem;
    margin-bottom: .5rem;
    color: var(--text-secondary);
    font-size: var(--font-size-sm);
}
.card-text { margin-bottom: .75rem; }
.card-text:last-child { margin-bottom: 0; }

.card-header {
    padding: .75rem 1.25rem;
    margin-bottom: 0;
    background-color: var(--surface-elevated);
    border-bottom: .5px solid var(--border-default);
    font-weight: var(--font-weight-semibold);
    font-size: var(--font-size-md);
    color: var(--text-primary);
}
.card-header:first-child {
    border-radius: calc(var(--radius-lg) - .5px) calc(var(--radius-lg) - .5px) 0 0;
}

.card-footer {
    padding: .75rem 1.25rem;
    background-color: var(--surface-elevated);
    border-top: .5px solid var(--border-default);
}
.card-footer:last-child {
    border-radius: 0 0 calc(var(--radius-lg) - .5px) calc(var(--radius-lg) - .5px);
}

.card-img-top {
    width: 100%;
    border-top-left-radius: calc(var(--radius-lg) - .5px);
    border-top-right-radius: calc(var(--radius-lg) - .5px);
}
.card-img-bottom {
    width: 100%;
    border-bottom-left-radius: calc(var(--radius-lg) - .5px);
    border-bottom-right-radius: calc(var(--radius-lg) - .5px);
}

.card-deck {
    display: flex;
    flex-flow: row wrap;
    margin-right: -15px;
    margin-left: -15px;
}
.card-deck .card {
    flex: 1 0 0%;
    margin-right: 15px;
    margin-left: 15px;
    margin-bottom: 15px;
}


/* =================================================================== *
 *  8. MODALS                                                          *
 *                                                                     *
 *  Compatibilidade crítica com bootstrap.bundle.js:                   *
 *    - O plugin define `display:block` inline na abertura.            *
 *    - Adiciona `.show` + `.fade` para transição.                     *
 *    - Injeta `<div class="modal-backdrop fade show">` no body.       *
 *    - Adiciona `.modal-open` no body.                                *
 *                                                                     *
 *  Por isso NUNCA usamos `display` em `.modal` no CSS. Deixamos o JS  *
 *  controlar display via inline style; animamos com opacity.          *
 * =================================================================== */
.modal-open { overflow: hidden; }
.modal-open .modal { overflow-x: hidden; overflow-y: auto; }

.modal {
    position: fixed;
    top: 0;
    left: 0;
    z-index: 1050;
    display: none; /* o JS do Bootstrap sobrescreve para block ao abrir */
    width: 100%;
    height: 100%;
    overflow: hidden;
    outline: 0;
}
.modal.fade .modal-dialog {
    transition: transform .25s ease-out;
    transform: translate(0, -20px);
}
.modal.show .modal-dialog {
    transform: none;
}

.modal-dialog {
    position: relative;
    width: auto;
    margin: .5rem;
    pointer-events: none;
}
.modal-dialog-centered {
    display: flex;
    align-items: center;
    min-height: calc(100% - 1rem);
}
.modal-dialog-scrollable {
    display: flex;
    max-height: calc(100% - 1rem);
}
.modal-dialog-scrollable .modal-content {
    max-height: calc(100vh - 1rem);
    overflow: hidden;
}
.modal-dialog-scrollable .modal-body {
    overflow-y: auto;
}

@media (min-width: 576px) {
    .modal-dialog { max-width: 500px; margin: 1.75rem auto; }
    .modal-dialog-centered { min-height: calc(100% - 3.5rem); }
    .modal-sm { max-width: 300px; }
}
@media (min-width: 992px) {
    .modal-lg,
    .modal-xl { max-width: 800px; }
}
@media (min-width: 1200px) {
    .modal-xl { max-width: 1140px; }
}

.modal-content {
    position: relative;
    display: flex;
    flex-direction: column;
    width: 100%;
    pointer-events: auto;
    background-color: var(--surface-card);
    background-clip: padding-box;
    border: .5px solid var(--border-default);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-modal);
    outline: 0;
    overflow: hidden;
}

.modal-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    z-index: 1040;
    width: 100vw;
    height: 100vh;
    background-color: #000;
    -webkit-backdrop-filter: blur(2px);
    backdrop-filter: blur(2px);
}
.modal-backdrop.fade { opacity: 0; transition: opacity .25s ease; }
.modal-backdrop.show { opacity: .45; }

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    border-bottom: .5px solid var(--border-default);
    border-top-left-radius: calc(var(--radius-lg) - .5px);
    border-top-right-radius: calc(var(--radius-lg) - .5px);
    gap: 12px;
}
.modal-header .close {
    padding: 8px;
    margin: -8px -8px -8px auto;
    background: transparent;
    border: 0;
    font-size: 20px;
    line-height: 1;
    color: var(--text-secondary);
    cursor: pointer;
    opacity: .7;
    transition: opacity var(--transition-base);
}
.modal-header .close:hover { opacity: 1; }

.modal-title {
    margin: 0;
    line-height: 1.3;
    font-size: 15px;
    font-weight: var(--font-weight-semibold);
    color: var(--text-primary);
}

.modal-body {
    position: relative;
    flex: 1 1 auto;
    padding: 20px;
    color: var(--text-primary);
}

.modal-footer {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-end;
    padding: 12px 20px;
    border-top: .5px solid var(--border-default);
    gap: 8px;
    border-bottom-right-radius: calc(var(--radius-lg) - .5px);
    border-bottom-left-radius: calc(var(--radius-lg) - .5px);
}

.fade {
    transition: opacity .2s linear;
}
.fade:not(.show) { opacity: 0; }


/* =================================================================== *
 *  9. TABLES                                                          *
 * =================================================================== */
.table {
    width: 100%;
    margin-bottom: 1rem;
    color: var(--text-primary);
    background-color: transparent;
    border-collapse: collapse;
    font-size: var(--font-size-base);
}
.table th,
.table td {
    padding: 10px 12px;
    vertical-align: middle;
    border-top: .5px solid var(--border-default);
    text-align: left;
}
.table thead th {
    vertical-align: bottom;
    border-bottom: .5px solid var(--border-default);
    border-top: 0;
    font-weight: var(--font-weight-semibold);
    text-transform: uppercase;
    font-size: var(--font-size-xs);
    letter-spacing: .04em;
    color: var(--text-secondary);
    background: var(--surface-elevated);
}
.table tbody + tbody { border-top: .5px solid var(--border-default); }

.table-sm th, .table-sm td { padding: 6px 8px; }

.table-bordered,
.table-bordered th,
.table-bordered td {
    border: .5px solid var(--border-default);
}

.table-borderless th,
.table-borderless td,
.table-borderless thead th,
.table-borderless tbody + tbody {
    border: 0;
}

.table-striped tbody tr:nth-of-type(odd) {
    background-color: var(--surface-hover);
}

.table-hover tbody tr:hover {
    background-color: var(--surface-elevated);
}

.thead-light th {
    color: var(--text-secondary);
    background-color: var(--surface-elevated);
    border-color: var(--border-default);
}
.thead-dark th {
    color: #fff;
    background-color: var(--text-primary);
    border-color: var(--text-primary);
}

.table-responsive {
    display: block;
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}


/* =================================================================== *
 *  10. ALERTS                                                         *
 * =================================================================== */
.alert {
    position: relative;
    padding: 12px 16px;
    margin-bottom: 1rem;
    border: .5px solid transparent;
    border-radius: var(--radius-md);
    font-size: var(--font-size-base);
}
.alert-heading {
    color: inherit;
    font-weight: var(--font-weight-semibold);
    margin-bottom: .25rem;
}
.alert-link { font-weight: var(--font-weight-semibold); }
.alert-dismissible { padding-right: 48px; }
.alert-dismissible .close {
    position: absolute;
    top: 0;
    right: 0;
    padding: 12px 16px;
    color: inherit;
    background: transparent;
    border: 0;
    font-size: 20px;
    cursor: pointer;
    opacity: .6;
}
.alert-dismissible .close:hover { opacity: 1; }

.alert-primary   { color: var(--sis-blue);           background: var(--color-info-bg);    border-color: var(--color-info-border); }
.alert-secondary { color: var(--text-secondary);     background: var(--surface-elevated); border-color: var(--border-default); }
.alert-success   { color: var(--color-success-text); background: var(--color-success-bg); border-color: var(--color-success-border); }
.alert-danger    { color: var(--color-danger-text);  background: var(--color-danger-bg);  border-color: var(--color-danger-border); }
.alert-warning   { color: var(--color-warning-text); background: var(--color-warning-bg); border-color: var(--color-warning-border); }
.alert-info      { color: var(--color-info-text);    background: var(--color-info-bg);    border-color: var(--color-info-border); }
.alert-light     { color: var(--text-primary);       background: var(--surface-elevated); border-color: var(--border-default); }
.alert-dark      { color: var(--text-inverse);       background: var(--text-primary);     border-color: var(--text-primary); }


/* =================================================================== *
 *  11. BADGES                                                         *
 * =================================================================== */
.badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 2px 8px;
    font-size: var(--font-size-xs);
    font-weight: var(--font-weight-medium);
    line-height: 1.4;
    text-align: center;
    white-space: nowrap;
    vertical-align: baseline;
    border-radius: var(--radius-sm);
}
.badge-pill { border-radius: var(--radius-full); padding-right: 10px; padding-left: 10px; }

.badge-primary   { background: var(--color-info-bg);    color: var(--sis-blue); }
.badge-secondary { background: var(--surface-elevated); color: var(--text-secondary); }
.badge-success   { background: var(--color-success-bg); color: var(--color-success-text); }
.badge-danger    { background: var(--color-danger-bg);  color: var(--color-danger-text); }
.badge-warning   { background: var(--color-warning-bg); color: var(--color-warning-text); }
.badge-info      { background: var(--color-info-bg);    color: var(--color-info-text); }
.badge-light     { background: var(--surface-elevated); color: var(--text-primary); }
.badge-dark      { background: var(--text-primary);     color: #fff; }


/* =================================================================== *
 *  12. DROPDOWNS                                                      *
 *  O JS do Bootstrap adiciona `.show` na `.dropdown-menu`.            *
 * =================================================================== */
.dropdown,
.dropup,
.dropright,
.dropleft {
    position: relative;
}
.dropdown-toggle {
    white-space: nowrap;
}
.dropdown-toggle::after {
    display: inline-block;
    margin-left: .4em;
    vertical-align: .15em;
    content: "";
    border-top: .3em solid;
    border-right: .3em solid transparent;
    border-bottom: 0;
    border-left: .3em solid transparent;
}

.dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    z-index: 1000;
    display: none;
    float: left;
    min-width: 10rem;
    padding: 6px 0;
    margin: .125rem 0 0;
    font-size: var(--font-size-base);
    color: var(--text-primary);
    text-align: left;
    list-style: none;
    background-color: var(--surface-card);
    background-clip: padding-box;
    border: .5px solid var(--border-default);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
}
.dropdown-menu.show { display: block; }
.dropdown-menu-right { right: 0; left: auto; }

.dropdown-item {
    display: block;
    width: 100%;
    padding: 8px 16px;
    clear: both;
    font-weight: var(--font-weight-regular);
    color: var(--text-primary);
    text-align: inherit;
    white-space: nowrap;
    background: transparent;
    border: 0;
    cursor: pointer;
    font-size: var(--font-size-base);
    text-decoration: none;
}
.dropdown-item:hover,
.dropdown-item:focus {
    color: var(--sis-blue);
    background-color: var(--surface-hover);
    text-decoration: none;
}
.dropdown-item.active,
.dropdown-item:active {
    color: #fff;
    background-color: var(--sis-blue);
}
.dropdown-item.disabled,
.dropdown-item:disabled {
    color: var(--text-tertiary);
    pointer-events: none;
    background: transparent;
}

.dropdown-divider {
    height: 0;
    margin: .5rem 0;
    overflow: hidden;
    border-top: .5px solid var(--border-default);
}

.dropdown-header {
    display: block;
    padding: .5rem 1rem .25rem;
    margin-bottom: 0;
    font-size: var(--font-size-xs);
    color: var(--text-tertiary);
    text-transform: uppercase;
    letter-spacing: .05em;
    white-space: nowrap;
    font-weight: var(--font-weight-semibold);
}


/* =================================================================== *
 *  13. COLLAPSE                                                       *
 *  Classes que o JS manipula: .collapse, .collapse.show, .collapsing  *
 * =================================================================== */
.collapse:not(.show) { display: none; }
.collapse.show       { display: block; }

.collapsing {
    position: relative;
    height: 0;
    overflow: hidden;
    transition: height .35s ease;
}


/* =================================================================== *
 *  14. NAV / TABS / PILLS                                             *
 * =================================================================== */
.nav {
    display: flex;
    flex-wrap: wrap;
    padding-left: 0;
    margin-bottom: 0;
    list-style: none;
}
.nav-link {
    display: block;
    padding: 8px 16px;
    color: var(--text-secondary);
    text-decoration: none;
    font-size: var(--font-size-base);
    font-weight: var(--font-weight-medium);
    transition: color var(--transition-base), border-color var(--transition-base), background var(--transition-base);
    cursor: pointer;
}
.nav-link:hover { color: var(--text-primary); }
.nav-link.disabled { color: var(--text-tertiary); pointer-events: none; cursor: default; }

.nav-tabs {
    border-bottom: .5px solid var(--border-default);
}
.nav-tabs .nav-item {
    margin-bottom: -.5px;
}
.nav-tabs .nav-link {
    border: .5px solid transparent;
    border-top-left-radius: var(--radius-md);
    border-top-right-radius: var(--radius-md);
    background: transparent;
}
.nav-tabs .nav-link:hover {
    background: var(--surface-hover);
    border-color: transparent;
}
.nav-tabs .nav-link.active,
.nav-tabs .nav-item.show .nav-link {
    color: var(--sis-blue);
    background-color: var(--surface-card);
    border-color: var(--border-default) var(--border-default) var(--surface-card);
    font-weight: var(--font-weight-semibold);
}

.nav-pills .nav-link {
    border-radius: var(--radius-md);
}
.nav-pills .nav-link.active,
.nav-pills .show > .nav-link {
    color: #fff;
    background-color: var(--sis-blue);
}

.nav-fill .nav-item { flex: 1 1 auto; text-align: center; }
.nav-justified .nav-item { flex-basis: 0; flex-grow: 1; text-align: center; }

.tab-content > .tab-pane { display: none; }
.tab-content > .active { display: block; }


/* =================================================================== *
 *  15. CLOSE BUTTON                                                   *
 * =================================================================== */
.close {
    float: right;
    font-size: 20px;
    font-weight: var(--font-weight-semibold);
    line-height: 1;
    color: var(--text-secondary);
    text-shadow: none;
    opacity: .6;
    background: transparent;
    border: 0;
    cursor: pointer;
    padding: 0;
}
.close:hover { opacity: 1; color: var(--text-primary); }


/* =================================================================== *
 *  16. SPINNER                                                        *
 * =================================================================== */
.spinner-border {
    display: inline-block;
    width: 2rem;
    height: 2rem;
    vertical-align: text-bottom;
    border: .25em solid currentColor;
    border-right-color: transparent;
    border-radius: 50%;
    animation: spinner-border .75s linear infinite;
}
.spinner-border-sm {
    width: 1rem;
    height: 1rem;
    border-width: .2em;
}
@keyframes spinner-border {
    to { transform: rotate(360deg); }
}

.spinner-grow {
    display: inline-block;
    width: 2rem;
    height: 2rem;
    vertical-align: text-bottom;
    background-color: currentColor;
    border-radius: 50%;
    opacity: 0;
    animation: spinner-grow .75s linear infinite;
}
.spinner-grow-sm { width: 1rem; height: 1rem; }
@keyframes spinner-grow {
    0%   { transform: scale(0); }
    50%  { opacity: 1; transform: none; }
}


/* =================================================================== *
 *  17. INPUT GROUP                                                    *
 * =================================================================== */
.input-group {
    position: relative;
    display: flex;
    flex-wrap: wrap;
    align-items: stretch;
    width: 100%;
}
.input-group > .form-control,
.input-group > .custom-select {
    position: relative;
    flex: 1 1 auto;
    width: 1%;
    min-width: 0;
    margin-bottom: 0;
}
.input-group > .form-control:not(:first-child),
.input-group > .custom-select:not(:first-child) {
    border-top-left-radius: 0;
    border-bottom-left-radius: 0;
}
.input-group > .form-control:not(:last-child),
.input-group > .custom-select:not(:last-child) {
    border-top-right-radius: 0;
    border-bottom-right-radius: 0;
}

.input-group-prepend,
.input-group-append {
    display: flex;
}
.input-group-prepend .btn,
.input-group-append .btn {
    position: relative;
    z-index: 2;
}
.input-group-text {
    display: flex;
    align-items: center;
    padding: 0 12px;
    margin-bottom: 0;
    font-size: var(--font-size-base);
    font-weight: var(--font-weight-regular);
    line-height: 1.4;
    color: var(--text-secondary);
    text-align: center;
    white-space: nowrap;
    background-color: var(--surface-elevated);
    border: .5px solid var(--border-default);
    border-radius: var(--radius-md);
}
.input-group-prepend .input-group-text {
    border-top-right-radius: 0;
    border-bottom-right-radius: 0;
}
.input-group-append .input-group-text {
    border-top-left-radius: 0;
    border-bottom-left-radius: 0;
}


/* =================================================================== *
 *  18. NAVBAR                                                         *
 *  Usado por _Layout.cshtml (legado), _LayoutLogin.cshtml e           *
 *  _LayoutAllowAnonymous.cshtml. _LayoutV2 usa `.navbar-v2` próprio,  *
 *  definido em site.css — não conflita com estas regras.              *
 * =================================================================== */
.navbar {
    position: relative;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    padding: 8px 16px;
}
.navbar > .container,
.navbar > .container-fluid {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
}

.navbar-brand {
    display: inline-block;
    padding-top: 4px;
    padding-bottom: 4px;
    margin-right: 16px;
    font-size: 18px;
    line-height: inherit;
    white-space: nowrap;
    text-decoration: none;
    color: inherit;
}
.navbar-brand:hover,
.navbar-brand:focus { text-decoration: none; }

.navbar-nav {
    display: flex;
    flex-direction: column;
    padding-left: 0;
    margin-bottom: 0;
    list-style: none;
}
.navbar-nav .nav-link {
    padding-right: 0;
    padding-left: 0;
}
.navbar-nav .dropdown-menu {
    position: static;
    float: none;
}

.navbar-text {
    display: inline-block;
    padding-top: 8px;
    padding-bottom: 8px;
}

.navbar-collapse {
    flex-basis: 100%;
    flex-grow: 1;
    align-items: center;
}

.navbar-toggler {
    padding: 4px 10px;
    font-size: 18px;
    line-height: 1;
    background-color: transparent;
    border: 1px solid transparent;
    border-radius: var(--radius-sm);
    cursor: pointer;
}
.navbar-toggler:hover,
.navbar-toggler:focus { text-decoration: none; outline: 0; box-shadow: var(--focus-ring); }

.navbar-toggler-icon {
    display: inline-block;
    width: 1.5em;
    height: 1.5em;
    vertical-align: middle;
    content: "";
    background: no-repeat center center;
    background-size: 100% 100%;
}

/* Expand responsive */
@media (max-width: 575.98px) {
    .navbar-expand-sm > .container,
    .navbar-expand-sm > .container-fluid { padding-right: 0; padding-left: 0; }
}
@media (min-width: 576px) {
    .navbar-expand-sm { flex-flow: row nowrap; justify-content: flex-start; }
    .navbar-expand-sm .navbar-nav { flex-direction: row; }
    .navbar-expand-sm .navbar-nav .dropdown-menu { position: absolute; }
    .navbar-expand-sm .navbar-nav .nav-link { padding-right: .5rem; padding-left: .5rem; }
    .navbar-expand-sm > .container,
    .navbar-expand-sm > .container-fluid { flex-wrap: nowrap; }
    .navbar-expand-sm .navbar-collapse { display: flex !important; flex-basis: auto; }
    .navbar-expand-sm .navbar-toggler { display: none; }
}

@media (max-width: 767.98px) {
    .navbar-expand-md > .container,
    .navbar-expand-md > .container-fluid { padding-right: 0; padding-left: 0; }
}
@media (min-width: 768px) {
    .navbar-expand-md { flex-flow: row nowrap; justify-content: flex-start; }
    .navbar-expand-md .navbar-nav { flex-direction: row; }
    .navbar-expand-md .navbar-nav .dropdown-menu { position: absolute; }
    .navbar-expand-md .navbar-nav .nav-link { padding-right: .5rem; padding-left: .5rem; }
    .navbar-expand-md > .container,
    .navbar-expand-md > .container-fluid { flex-wrap: nowrap; }
    .navbar-expand-md .navbar-collapse { display: flex !important; flex-basis: auto; }
    .navbar-expand-md .navbar-toggler { display: none; }
}

@media (max-width: 991.98px) {
    .navbar-expand-lg > .container,
    .navbar-expand-lg > .container-fluid { padding-right: 0; padding-left: 0; }
}
@media (min-width: 992px) {
    .navbar-expand-lg { flex-flow: row nowrap; justify-content: flex-start; }
    .navbar-expand-lg .navbar-nav { flex-direction: row; }
    .navbar-expand-lg .navbar-nav .dropdown-menu { position: absolute; }
    .navbar-expand-lg .navbar-nav .nav-link { padding-right: .5rem; padding-left: .5rem; }
    .navbar-expand-lg > .container,
    .navbar-expand-lg > .container-fluid { flex-wrap: nowrap; }
    .navbar-expand-lg .navbar-collapse { display: flex !important; flex-basis: auto; }
    .navbar-expand-lg .navbar-toggler { display: none; }
}

@media (max-width: 1199.98px) {
    .navbar-expand-xl > .container,
    .navbar-expand-xl > .container-fluid { padding-right: 0; padding-left: 0; }
}
@media (min-width: 1200px) {
    .navbar-expand-xl { flex-flow: row nowrap; justify-content: flex-start; }
    .navbar-expand-xl .navbar-nav { flex-direction: row; }
    .navbar-expand-xl .navbar-nav .dropdown-menu { position: absolute; }
    .navbar-expand-xl .navbar-nav .nav-link { padding-right: .5rem; padding-left: .5rem; }
    .navbar-expand-xl > .container,
    .navbar-expand-xl > .container-fluid { flex-wrap: nowrap; }
    .navbar-expand-xl .navbar-collapse { display: flex !important; flex-basis: auto; }
    .navbar-expand-xl .navbar-toggler { display: none; }
}

/* Temas de cor */
.navbar-light .navbar-brand { color: var(--text-primary); }
.navbar-light .navbar-brand:hover,
.navbar-light .navbar-brand:focus { color: var(--sis-blue); }
.navbar-light .navbar-nav .nav-link { color: var(--text-secondary); }
.navbar-light .navbar-nav .nav-link:hover,
.navbar-light .navbar-nav .nav-link:focus { color: var(--sis-blue); }
.navbar-light .navbar-nav .nav-link.disabled { color: var(--text-tertiary); }
.navbar-light .navbar-nav .show > .nav-link,
.navbar-light .navbar-nav .active > .nav-link,
.navbar-light .navbar-nav .nav-link.show,
.navbar-light .navbar-nav .nav-link.active { color: var(--sis-blue); }
.navbar-light .navbar-toggler { color: var(--text-secondary); border-color: var(--border-default); }
.navbar-light .navbar-toggler-icon { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='30' height='30' viewBox='0 0 30 30'%3E%3Cpath stroke='rgba(71, 85, 105, .8)' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3E%3C/svg%3E"); }
.navbar-light .navbar-text { color: var(--text-secondary); }
.navbar-light .navbar-text a { color: var(--sis-blue); }

.navbar-dark .navbar-brand { color: #fff; }
.navbar-dark .navbar-brand:hover,
.navbar-dark .navbar-brand:focus { color: #fff; }
.navbar-dark .navbar-nav .nav-link { color: rgba(255, 255, 255, .75); }
.navbar-dark .navbar-nav .nav-link:hover,
.navbar-dark .navbar-nav .nav-link:focus { color: #fff; }
.navbar-dark .navbar-nav .nav-link.disabled { color: rgba(255, 255, 255, .4); }
.navbar-dark .navbar-nav .show > .nav-link,
.navbar-dark .navbar-nav .active > .nav-link,
.navbar-dark .navbar-nav .nav-link.show,
.navbar-dark .navbar-nav .nav-link.active { color: #fff; }
.navbar-dark .navbar-toggler { color: rgba(255, 255, 255, .75); border-color: rgba(255, 255, 255, .2); }
.navbar-dark .navbar-toggler-icon { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='30' height='30' viewBox='0 0 30 30'%3E%3Cpath stroke='rgba(255, 255, 255, .75)' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3E%3C/svg%3E"); }
.navbar-dark .navbar-text { color: rgba(255, 255, 255, .75); }
.navbar-dark .navbar-text a { color: #fff; }


/* =================================================================== *
 *  19. PAGINATION                                                     *
 *  Crítico para DataTables Bootstrap 4 theme.                         *
 * =================================================================== */
.pagination {
    display: flex;
    padding-left: 0;
    list-style: none;
    border-radius: var(--radius-md);
}
.page-link {
    position: relative;
    display: block;
    padding: 7px 12px;
    margin-left: -.5px;
    line-height: 1.25;
    color: var(--sis-blue);
    background-color: var(--surface-card);
    border: .5px solid var(--border-default);
    text-decoration: none;
    font-size: var(--font-size-base);
    cursor: pointer;
    transition: background var(--transition-base), color var(--transition-base);
}
.page-link:hover {
    z-index: 2;
    color: var(--sis-blue-hover);
    background-color: var(--surface-hover);
    border-color: var(--border-emphasis);
    text-decoration: none;
}
.page-link:focus {
    z-index: 3;
    outline: 0;
    box-shadow: var(--focus-ring);
}
.page-item:first-child .page-link {
    margin-left: 0;
    border-top-left-radius: var(--radius-md);
    border-bottom-left-radius: var(--radius-md);
}
.page-item:last-child .page-link {
    border-top-right-radius: var(--radius-md);
    border-bottom-right-radius: var(--radius-md);
}
.page-item.active .page-link {
    z-index: 3;
    color: #fff;
    background-color: var(--sis-blue);
    border-color: var(--sis-blue);
}
.page-item.disabled .page-link {
    color: var(--text-tertiary);
    pointer-events: none;
    cursor: auto;
    background-color: var(--surface-card);
    border-color: var(--border-default);
}

.pagination-sm .page-link { padding: 4px 10px; font-size: var(--font-size-sm); }
.pagination-lg .page-link { padding: 10px 14px; font-size: var(--font-size-md); }


/* =================================================================== *
 *  20. PROGRESS                                                       *
 *  Usado pelo Progress Banner v2 (ADR-006 §10.19) e por dashboards.   *
 * =================================================================== */
.progress {
    display: flex;
    height: 8px;
    overflow: hidden;
    font-size: 10px;
    background-color: var(--surface-elevated);
    border-radius: var(--radius-full);
}
.progress-bar {
    display: flex;
    flex-direction: column;
    justify-content: center;
    overflow: hidden;
    color: #fff;
    text-align: center;
    white-space: nowrap;
    background-color: var(--sis-blue);
    transition: width .6s ease;
}
.progress-bar-striped {
    background-image: linear-gradient(45deg, rgba(255, 255, 255, .15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, .15) 50%, rgba(255, 255, 255, .15) 75%, transparent 75%, transparent);
    background-size: 1rem 1rem;
}
.progress-bar-animated {
    animation: progress-bar-stripes 1s linear infinite;
}
@keyframes progress-bar-stripes {
    from { background-position: 1rem 0; }
    to   { background-position: 0 0; }
}


/* =================================================================== *
 *  21. LIST GROUP                                                     *
 * =================================================================== */
.list-group {
    display: flex;
    flex-direction: column;
    padding-left: 0;
    margin-bottom: 0;
    border-radius: var(--radius-md);
}
.list-group-item-action {
    width: 100%;
    color: var(--text-secondary);
    text-align: inherit;
    cursor: pointer;
}
.list-group-item-action:hover,
.list-group-item-action:focus {
    z-index: 1;
    color: var(--text-primary);
    text-decoration: none;
    background-color: var(--surface-hover);
}
.list-group-item-action:active {
    color: var(--text-primary);
    background-color: var(--surface-elevated);
}
.list-group-item {
    position: relative;
    display: block;
    padding: 12px 16px;
    background-color: var(--surface-card);
    border: .5px solid var(--border-default);
    font-size: var(--font-size-base);
    color: var(--text-primary);
}
.list-group-item:first-child {
    border-top-left-radius: inherit;
    border-top-right-radius: inherit;
}
.list-group-item:last-child {
    border-bottom-right-radius: inherit;
    border-bottom-left-radius: inherit;
}
.list-group-item.disabled,
.list-group-item:disabled {
    color: var(--text-tertiary);
    pointer-events: none;
    background-color: var(--surface-card);
}
.list-group-item.active {
    z-index: 2;
    color: #fff;
    background-color: var(--sis-blue);
    border-color: var(--sis-blue);
}
.list-group-item + .list-group-item {
    border-top-width: 0;
}
.list-group-item + .list-group-item.active {
    margin-top: -.5px;
    border-top-width: .5px;
}

.list-group-flush {
    border-radius: 0;
}
.list-group-flush > .list-group-item {
    border-width: 0 0 .5px;
}
.list-group-flush > .list-group-item:last-child {
    border-bottom-width: 0;
}

.list-group-horizontal {
    flex-direction: row;
}
.list-group-horizontal > .list-group-item {
    border-top-width: .5px;
    border-right-width: 0;
}
.list-group-horizontal > .list-group-item + .list-group-item {
    border-left-width: 0;
}


/* =================================================================== *
 *  22. BREADCRUMB                                                     *
 *  Usado em Educador/CriarConteudo, EditarConteudoPage,               *
 *  AvaliacoesPendentes, Aluno/VerCurso.                               *
 * =================================================================== */
.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    padding: 8px 16px;
    margin-bottom: 1rem;
    list-style: none;
    background-color: var(--surface-elevated);
    border-radius: var(--radius-md);
    font-size: var(--font-size-base);
}
.breadcrumb-item {
    color: var(--text-secondary);
}
.breadcrumb-item + .breadcrumb-item {
    padding-left: .5rem;
}
.breadcrumb-item + .breadcrumb-item::before {
    display: inline-block;
    padding-right: .5rem;
    color: var(--text-tertiary);
    content: "/";
}
.breadcrumb-item.active {
    color: var(--text-tertiary);
}
.breadcrumb-item a {
    color: var(--sis-blue);
    text-decoration: none;
}
.breadcrumb-item a:hover {
    text-decoration: underline;
}


/* =================================================================== *
 *  23. TOAST                                                          *
 *  Usado em _StatusMessage.cshtml. Bootstrap 4.6 tem toasts nativos   *
 *  via JS do plugin; o shim mantém o visual.                          *
 * =================================================================== */
.toast {
    max-width: 350px;
    overflow: hidden;
    font-size: var(--font-size-sm);
    background-color: var(--surface-card);
    background-clip: padding-box;
    border: .5px solid var(--border-default);
    box-shadow: var(--shadow-lg);
    border-radius: var(--radius-md);
    opacity: 0;
}
.toast:not(:last-child) { margin-bottom: 12px; }
.toast.showing { opacity: 1; }
.toast.show      { display: block; opacity: 1; }
.toast.hide      { display: none; }

.toast-header {
    display: flex;
    align-items: center;
    padding: 8px 12px;
    color: var(--text-secondary);
    background-color: var(--surface-card);
    background-clip: padding-box;
    border-bottom: .5px solid var(--border-default);
    border-top-left-radius: calc(var(--radius-md) - .5px);
    border-top-right-radius: calc(var(--radius-md) - .5px);
    font-weight: var(--font-weight-semibold);
}
.toast-body {
    padding: 12px;
    word-wrap: break-word;
    color: var(--text-primary);
}


/* =================================================================== *
 *  24. TOOLTIP                                                        *
 *                                                                     *
 *  O JS do Bootstrap INJETA o HTML do tooltip no DOM no momento do    *
 *  show. Não precisamos do markup estático nas views — só do CSS      *
 *  visual. Seletores `.bs-tooltip-{top,right,bottom,left}` são os     *
 *  que o plugin aplica.                                               *
 * =================================================================== */
.tooltip {
    position: absolute;
    z-index: 1070;
    display: block;
    margin: 0;
    font-family: var(--font-sans);
    font-size: var(--font-size-sm);
    font-weight: var(--font-weight-regular);
    line-height: 1.4;
    text-align: left;
    text-decoration: none;
    text-shadow: none;
    text-transform: none;
    letter-spacing: normal;
    word-break: normal;
    word-spacing: normal;
    white-space: normal;
    line-break: auto;
    opacity: 0;
    pointer-events: none;
}
.tooltip.show { opacity: .95; }

.tooltip .arrow {
    position: absolute;
    display: block;
    width: .8rem;
    height: .4rem;
}
.tooltip .arrow::before {
    position: absolute;
    content: "";
    border-color: transparent;
    border-style: solid;
}

.bs-tooltip-top,
.bs-tooltip-auto[x-placement^="top"] { padding: .4rem 0; }
.bs-tooltip-top .arrow,
.bs-tooltip-auto[x-placement^="top"] .arrow { bottom: 0; }
.bs-tooltip-top .arrow::before,
.bs-tooltip-auto[x-placement^="top"] .arrow::before {
    top: 0;
    border-width: .4rem .4rem 0;
    border-top-color: var(--text-primary);
}

.bs-tooltip-right,
.bs-tooltip-auto[x-placement^="right"] { padding: 0 .4rem; }
.bs-tooltip-right .arrow,
.bs-tooltip-auto[x-placement^="right"] .arrow {
    left: 0;
    width: .4rem;
    height: .8rem;
}
.bs-tooltip-right .arrow::before,
.bs-tooltip-auto[x-placement^="right"] .arrow::before {
    right: 0;
    border-width: .4rem .4rem .4rem 0;
    border-right-color: var(--text-primary);
}

.bs-tooltip-bottom,
.bs-tooltip-auto[x-placement^="bottom"] { padding: .4rem 0; }
.bs-tooltip-bottom .arrow,
.bs-tooltip-auto[x-placement^="bottom"] .arrow { top: 0; }
.bs-tooltip-bottom .arrow::before,
.bs-tooltip-auto[x-placement^="bottom"] .arrow::before {
    bottom: 0;
    border-width: 0 .4rem .4rem;
    border-bottom-color: var(--text-primary);
}

.bs-tooltip-left,
.bs-tooltip-auto[x-placement^="left"] { padding: 0 .4rem; }
.bs-tooltip-left .arrow,
.bs-tooltip-auto[x-placement^="left"] .arrow {
    right: 0;
    width: .4rem;
    height: .8rem;
}
.bs-tooltip-left .arrow::before,
.bs-tooltip-auto[x-placement^="left"] .arrow::before {
    left: 0;
    border-width: .4rem 0 .4rem .4rem;
    border-left-color: var(--text-primary);
}

.tooltip-inner {
    max-width: 220px;
    padding: .3rem .6rem;
    color: #fff;
    text-align: center;
    background-color: var(--text-primary);
    border-radius: var(--radius-sm);
    font-family: var(--font-sans);
}


/* =================================================================== *
 *  25. POPOVER                                                        *
 *  Injetado pelo JS do Bootstrap. Mesma ideia do tooltip.             *
 * =================================================================== */
.popover {
    position: absolute;
    top: 0;
    left: 0;
    z-index: 1060;
    display: block;
    max-width: 276px;
    font-family: var(--font-sans);
    font-size: var(--font-size-sm);
    font-weight: var(--font-weight-regular);
    line-height: 1.4;
    text-align: left;
    text-decoration: none;
    text-shadow: none;
    text-transform: none;
    letter-spacing: normal;
    word-break: normal;
    word-spacing: normal;
    white-space: normal;
    line-break: auto;
    background-color: var(--surface-card);
    background-clip: padding-box;
    border: .5px solid var(--border-default);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
}

.popover .arrow {
    position: absolute;
    display: block;
    width: 1rem;
    height: .5rem;
    margin: 0 var(--radius-sm);
}
.popover .arrow::before,
.popover .arrow::after {
    position: absolute;
    display: block;
    content: "";
    border-color: transparent;
    border-style: solid;
}

.bs-popover-top,
.bs-popover-auto[x-placement^="top"] { margin-bottom: .5rem; }
.bs-popover-top > .arrow,
.bs-popover-auto[x-placement^="top"] > .arrow { bottom: calc(-.5rem - .5px); }
.bs-popover-top > .arrow::before,
.bs-popover-auto[x-placement^="top"] > .arrow::before {
    bottom: 0;
    border-width: .5rem .5rem 0;
    border-top-color: var(--border-default);
}
.bs-popover-top > .arrow::after,
.bs-popover-auto[x-placement^="top"] > .arrow::after {
    bottom: .5px;
    border-width: .5rem .5rem 0;
    border-top-color: var(--surface-card);
}

.bs-popover-right,
.bs-popover-auto[x-placement^="right"] { margin-left: .5rem; }
.bs-popover-right > .arrow,
.bs-popover-auto[x-placement^="right"] > .arrow {
    left: calc(-.5rem - .5px);
    width: .5rem;
    height: 1rem;
    margin: var(--radius-sm) 0;
}
.bs-popover-right > .arrow::before,
.bs-popover-auto[x-placement^="right"] > .arrow::before {
    left: 0;
    border-width: .5rem .5rem .5rem 0;
    border-right-color: var(--border-default);
}
.bs-popover-right > .arrow::after,
.bs-popover-auto[x-placement^="right"] > .arrow::after {
    left: .5px;
    border-width: .5rem .5rem .5rem 0;
    border-right-color: var(--surface-card);
}

.bs-popover-bottom,
.bs-popover-auto[x-placement^="bottom"] { margin-top: .5rem; }
.bs-popover-bottom > .arrow,
.bs-popover-auto[x-placement^="bottom"] > .arrow { top: calc(-.5rem - .5px); }
.bs-popover-bottom > .arrow::before,
.bs-popover-auto[x-placement^="bottom"] > .arrow::before {
    top: 0;
    border-width: 0 .5rem .5rem .5rem;
    border-bottom-color: var(--border-default);
}
.bs-popover-bottom > .arrow::after,
.bs-popover-auto[x-placement^="bottom"] > .arrow::after {
    top: .5px;
    border-width: 0 .5rem .5rem .5rem;
    border-bottom-color: var(--surface-card);
}
.bs-popover-bottom .popover-header::before {
    position: absolute;
    top: 0;
    left: 50%;
    display: block;
    width: 1rem;
    margin-left: -.5rem;
    content: "";
    border-bottom: .5px solid var(--border-default);
}

.bs-popover-left,
.bs-popover-auto[x-placement^="left"] { margin-right: .5rem; }
.bs-popover-left > .arrow,
.bs-popover-auto[x-placement^="left"] > .arrow {
    right: calc(-.5rem - .5px);
    width: .5rem;
    height: 1rem;
    margin: var(--radius-sm) 0;
}
.bs-popover-left > .arrow::before,
.bs-popover-auto[x-placement^="left"] > .arrow::before {
    right: 0;
    border-width: .5rem 0 .5rem .5rem;
    border-left-color: var(--border-default);
}
.bs-popover-left > .arrow::after,
.bs-popover-auto[x-placement^="left"] > .arrow::after {
    right: .5px;
    border-width: .5rem 0 .5rem .5rem;
    border-left-color: var(--surface-card);
}

.popover-header {
    padding: 8px 12px;
    margin-bottom: 0;
    font-size: var(--font-size-base);
    font-weight: var(--font-weight-semibold);
    color: var(--text-primary);
    background-color: var(--surface-elevated);
    border-bottom: .5px solid var(--border-default);
    border-top-left-radius: calc(var(--radius-md) - .5px);
    border-top-right-radius: calc(var(--radius-md) - .5px);
}
.popover-header:empty { display: none; }

.popover-body {
    padding: 12px;
    color: var(--text-primary);
    font-size: var(--font-size-sm);
    line-height: 1.5;
}


/* =================================================================== *
 *  26. DARK MODE OVERRIDES                                            *
 *  Ativado por [data-theme="dark"] no <body> (ver ADR-010).           *
 *  A maioria dos componentes já usa var(--surface-*) e var(--text-*), *
 *  então herdam o dark mode automaticamente via :root redefinido em   *
 *  site.css / dark-mode.css. Aqui ficam apenas ajustes específicos.   *
 * =================================================================== */
[data-theme="dark"] {
    --surface-page: #0F1117;
    --surface-card: #1A1D27;
    --surface-elevated: #242731;
    --surface-hover: #2D303B;

    /* Azul institucional clareado para dark mode — o #263868 padrão */
    /* fica com contraste ~1.8:1 contra o fundo e zera a legibilidade */
    /* de links, logo e .text-primary. Ver ADR-010.                  */
    --sis-blue: #6EA0FF;
    --sis-blue-hover: #93C5FD;

    --text-primary: #F3F4F6;
    --text-secondary: #9CA3AF;
    --text-tertiary: #6B7280;

    --border-default: rgba(255, 255, 255, 0.08);
    --border-subtle: rgba(255, 255, 255, 0.04);
    --border-emphasis: rgba(255, 255, 255, 0.15);

    --color-success-bg: #064E3B;
    --color-success-text: #6EE7B7;
    --color-danger-bg: #450A0A;
    --color-danger-text: #FCA5A5;
    --color-warning-bg: #451A03;
    --color-warning-text: #FCD34D;
    --color-info-bg: #1E3A5F;
    --color-info-text: #93C5FD;

    --shadow-sm: 0 1px 2px rgba(0, 0, 0, .25);
    --shadow-md: 0 2px 8px rgba(0, 0, 0, .35);
    --shadow-lg: 0 4px 12px rgba(0, 0, 0, .45);
    --shadow-modal: 0 20px 60px rgba(0, 0, 0, .60);

    --focus-ring: 0 0 0 3px rgba(100, 149, 237, .18);
}

[data-theme="dark"] .modal-backdrop { background-color: #000; }
[data-theme="dark"] .modal-backdrop.show { opacity: .7; }

[data-theme="dark"] .btn-primary { background: #3B5BDB; border-color: #3B5BDB; }
[data-theme="dark"] .btn-primary:hover { background: #304BB0; border-color: #304BB0; }

/* =================================================================== *
 *  FIM — sisaprendiz-bootstrap.css                                    *
 *  Roadmap: ver ADR-025 (Fases 0 a 5)                                 *
 * =================================================================== */
