/* =========================================================
   Gestão Académica — Sistema Odysseia 2.0
   Ficheiro: htdocs/gtecodysseia.com/assets/css/style.css
   ========================================================= */

/* =========================================================
   1. VARIÁVEIS DA MARCA
   ========================================================= */
:root {
    /* Paleta principal — Azul Odysseia */
    --azul-odysseia:        #1E9BD7;
    --azul-odysseia-escuro: #1578A8;
    --azul-odysseia-claro:  #38B0E5;
    --azul-profundo:        #0B3A5C;

    /* Paleta de destaque — Ouro Académico */
    --ouro:                 #E8B339;
    --ouro-escuro:          #B8881E;
    --ouro-claro:           #F5D77A;

    /* Neutros */
    --branco:               #FFFFFF;
    --branco-suave:         #F7FAFC;
    --branco-gelo:          #E8F4FA;

    --cinza-claro:          #CBD5E1;
    --cinza-medio:          #64748B;
    --cinza-escuro:         #0F172A;

    /* Estados académicos */
    --verde:                #16A34A;
    --verde-escuro:         #15803D;
    --vermelho:             #DC2626;
    --vermelho-escuro:      #B91C1C;

    --amarelo:              var(--ouro);
    --amarelo-escuro:       var(--ouro-escuro);

    /* Dimensões */
    --radius-padrao:        12px;
    --radius-pequeno:       10px;
    --radius-grande:        16px;

    --sidebar-width:        280px;
    --sidebar-mini-width:   64px;
    --topbar-height:        70px;

    /* Sombras */
    --sombra-suave:         0 4px 12px rgba(11, 58, 92, .06);
    --sombra-media:         0 12px 25px rgba(11, 58, 92, .12);
    --sombra-forte:         0 20px 45px rgba(11, 58, 92, .18);
}

/* =========================================================
   2. RESET / BASE
   ========================================================= */
*,
*::before,
*::after {
    box-sizing: border-box;
}

html,
body {
    overflow-x: hidden;
    margin: 0;
    padding: 0;
}

body {
    background-color: #f1f5f9;
    font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

/* =========================================================
   3. LAYOUT PRINCIPAL — Topbar / Sidebar / Conteúdo
   ========================================================= */

/* --- TOPBAR --- */
.app-topbar {
    height: var(--topbar-height);
    background: linear-gradient(135deg, var(--azul-odysseia) 0%, var(--azul-odysseia-escuro) 100%);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 1.5rem;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1040;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.15);
}

/* --- SIDEBAR --- */
.app-sidebar {
    width: var(--sidebar-width);
    background-color: #1e293b;
    color: #cbd5e1;
    position: fixed;
    top: var(--topbar-height);
    bottom: 0;
    left: 0;
    z-index: 1030;
    overflow-y: auto;
    overflow-x: hidden;
    border-right: 1px solid #334155;
    scrollbar-width: thin;
    scrollbar-color: #475569 #1e293b;
}

.app-sidebar::-webkit-scrollbar {
    width: 6px;
}

.app-sidebar::-webkit-scrollbar-track {
    background: #1e293b;
}

.app-sidebar::-webkit-scrollbar-thumb {
    background: #475569;
    border-radius: 3px;
}

/* Cabeçalho da sidebar (visível apenas em mobile) */
.sidebar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.5rem;
    border-bottom: 1px solid #334155;
    background: rgba(0, 0, 0, 0.15);
}

/* Navegação principal */
.sidebar-nav {
    list-style: none;
    padding: 1rem 0;
    margin: 0;
}

.sidebar-item {
    margin-bottom: 0.15rem;
}

/* --- LINK PRINCIPAL DO MÓDULO --- */
.sidebar-link {
    display: flex;
    align-items: center;
    padding: 0.85rem 1.5rem;
    color: #cbd5e1;
    text-decoration: none;
    font-size: 0.95rem;
    font-weight: 500;
    transition: all 0.2s ease;
    border-left: 3px solid transparent;
}

.sidebar-link:hover {
    background-color: rgba(255, 255, 255, 0.05);
    color: #fff;
    border-left-color: var(--azul-odysseia-claro);
}

.sidebar-link > i:first-child,
.sidebar-link i.bi:first-child {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem !important;
    width: 24px !important;
    min-width: 24px !important;
    height: 24px;
    margin-right: 0.85rem !important;
    text-align: center;
    color: var(--azul-odysseia-claro) !important;
    flex-shrink: 0;
    transition: color 0.2s;
    visibility: visible !important;
    opacity: 1 !important;
}

.sidebar-link:hover > i:first-child {
    color: var(--ouro) !important;
}

.sidebar-link > i[class*="bi-"]::before {
    display: inline-block !important;
    visibility: visible !important;
    opacity: 1 !important;
    font-family: "bootstrap-icons" !important;
    font-style: normal;
    font-weight: normal;
    line-height: 1;
}

/* Seta (chevron) */
.sidebar-link .sidebar-arrow {
    font-size: 0.8rem !important;
    width: auto !important;
    min-width: auto !important;
    margin-left: auto !important;
    margin-right: 0 !important;
    color: #64748b !important;
    transition: transform 0.3s ease;
}

.sidebar-link[aria-expanded="true"] {
    background-color: rgba(30, 155, 215, 0.1);
    color: #fff;
    border-left-color: var(--azul-odysseia);
}

.sidebar-link[aria-expanded="true"] .sidebar-arrow {
    transform: rotate(180deg);
    color: var(--azul-odysseia-claro) !important;
}

/* --- SUBMENUS --- */
.sidebar-submenu {
    list-style: none;
    padding: 0;
    margin: 0;
    background-color: rgba(0, 0, 0, 0.25);
}

.sidebar-sublink {
    display: flex;
    align-items: center;
    padding: 0.6rem 1.5rem 0.6rem 3.5rem;
    color: #94a3b8;
    text-decoration: none;
    font-size: 0.88rem;
    transition: all 0.2s ease;
    position: relative;
    border-left: 3px solid transparent;
}

.sidebar-sublink > i {
    margin-right: 0.5rem;
    font-size: 0.9rem;
    width: 16px;
    min-width: 16px;
    text-align: center;
    color: #64748b;
    transition: color 0.2s ease;
    flex-shrink: 0;
}

.sidebar-sublink:hover,
.sidebar-sublink.active {
    color: #fff;
    background-color: rgba(255, 255, 255, 0.03);
    border-left-color: var(--ouro);
}

.sidebar-sublink:hover > i,
.sidebar-sublink.active > i {
    color: var(--ouro);
}

/* Sub-cabeçalhos dentro dos módulos */
.sidebar-subheader {
    display: flex;
    align-items: center;
    gap: .35rem;
    padding: 0.9rem 1.5rem 0.4rem 1.5rem;
    font-size: 0.68rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.2px;
    color: #64748b;
    margin-top: 0.35rem;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    background: rgba(0, 0, 0, 0.15);
    list-style: none;
}

.sidebar-subheader i {
    font-size: .85rem;
    opacity: .7;
}

.sidebar-subheader:first-child {
    border-top: none;
    margin-top: 0;
}

/* --- CONTEÚDO PRINCIPAL --- */
.app-content {
    margin-left: var(--sidebar-width);
    margin-top: var(--topbar-height);
    padding: 2rem;
    min-height: calc(100vh - var(--topbar-height));
}

/* --- OVERLAY MOBILE --- */
.sidebar-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1029;
    opacity: 0;
    visibility: hidden;
    transition: opacity .3s ease, visibility .3s ease;
    pointer-events: none;
}

.sidebar-overlay.show {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

/* =========================================================
   4. BOTÕES DA MARCA
   ========================================================= */
.btn-odysseia {
    background-color: var(--azul-odysseia);
    border-color:     var(--azul-odysseia);
    color: #fff;
}

.btn-odysseia:hover,
.btn-odysseia:focus,
.btn-odysseia:active {
    background-color: var(--azul-odysseia-escuro);
    border-color:     var(--azul-odysseia-escuro);
    color: #fff;
}

/* =========================================================
   5. LOGIN
   ========================================================= */
.login-bg {
    min-height: 100vh;
    min-height: 100dvh;
    display: flex;
    align-items: flex-end;
    justify-content: flex-end;
    padding: 2.5rem;
    position: relative;
    overflow-x: hidden;
    background-color: var(--azul-odysseia);
    background-image: url("/img/baner.jpg");
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-attachment: fixed;
}

.login-bg::before {
    content: "";
    position: fixed;
    inset: 0;
    background: linear-gradient(
        135deg,
        rgba(15, 23, 42, .65) 0%,
        rgba(30, 155, 215, .55) 50%,
        rgba(15, 23, 42, .85) 100%
    );
    z-index: 0;
    pointer-events: none;
}

.login-card {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 420px;
    border-radius: var(--radius-grande);
    overflow: hidden;
    box-shadow:
        0 25px 60px rgba(0, 0, 0, .50),
        0 10px 25px rgba(0, 0, 0, .30) !important;
    animation: entrarCartao .55s cubic-bezier(.22, 1, .36, 1);
    background: #fff;
}

@keyframes entrarCartao {
    from { opacity: 0; transform: translate(30px, 30px); }
    to   { opacity: 1; transform: translate(0, 0); }
}

.login-logo {
    max-height: 90px;
    max-width: 100%;
    width: auto;
    object-fit: contain;
}

.login-card-footer {
    background: #f8fafc !important;
    border-top: 1px solid #e2e8f0 !important;
    padding: .7rem .75rem !important;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: .35rem .5rem;
    font-size: .75rem;
    color: var(--cinza-medio);
    text-align: center;
    line-height: 1.4;
}

.login-footer-item {
    display: inline-flex;
    align-items: center;
    gap: .2rem;
    white-space: nowrap;
}

.login-footer-item i {
    font-size: .72rem;
}

.login-footer-link {
    color: var(--azul-odysseia);
    text-decoration: none;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: .2rem;
    white-space: nowrap;
    transition: color .15s;
}

.login-footer-link:hover {
    color: var(--azul-odysseia-escuro);
    text-decoration: underline;
}

.login-footer-sep {
    color: var(--cinza-claro);
    font-weight: 300;
}

/* =========================================================
   6. HERO / BANNER DO DASHBOARD
   ========================================================= */
.hero-dashboard {
    position: relative;
    width: 100%;
    aspect-ratio: 1600 / 847;
    min-height: 260px;
    max-height: 420px;
    border-radius: 20px;
    overflow: hidden;
    margin-bottom: 2rem;
    background-color: var(--branco-gelo);
    background-image: url("/img/baner.jpg");
    background-size: cover;
    background-position: center 10%;
    background-repeat: no-repeat;
    box-shadow:
        0 20px 45px rgba(11, 58, 92, .25),
        0 8px 20px  rgba(11, 58, 92, .15);
}

.hero-dashboard .hero-overlay {
    position: relative;
    z-index: 1;
    height: 100%;
    padding: 2.5rem;
    background: linear-gradient(
        115deg,
        rgba(15, 23, 42, .92)  0%,
        rgba(30, 155, 215, .75) 45%,
        rgba(30, 155, 215, .35) 100%
    );
    color: #fff;
    display: flex;
    flex-direction: column;
    justify-content: center;
    text-shadow: 0 2px 4px rgba(0, 0, 0, .45);
}

.hero-meta {
    display: flex;
    align-items: center;
    gap: .5rem;
    font-size: .85rem;
    color: rgba(255, 255, 255, .85);
    margin-bottom: 1rem;
    text-transform: capitalize;
    letter-spacing: .3px;
}

.hero-meta-item {
    display: inline-flex;
    align-items: center;
    gap: .35rem;
}

.hero-meta-item i {
    font-size: .9rem;
    opacity: .9;
}

.hero-meta-sep {
    opacity: .5;
}

.hero-titulo {
    font-size: 2.5rem;
    font-weight: 800;
    line-height: 1.15;
    margin: 0 0 .75rem 0;
    letter-spacing: -.5px;
}

.hero-destaque {
    color: var(--ouro);
    position: relative;
}

.hero-subtitulo {
    font-size: 1.05rem;
    font-weight: 400;
    opacity: .92;
    margin: 0;
    max-width: 620px;
    line-height: 1.6;
}

.hero-empresa {
    display: inline-block;
    margin-top: .25rem;
    font-weight: 600;
    letter-spacing: .3px;
    color: #93c5fd;
}

/* =========================================================
   7. LOGO DO CABEÇALHO
   ========================================================= */
.header-brand {
    display: flex;
    align-items: center;
    gap: .85rem;
    color: #fff;
    transition: opacity .2s ease;
}

.header-brand:hover {
    color: #fff;
    opacity: .92;
}

.header-logo-wrap {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    background: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 5px;
    box-shadow: 0 3px 10px rgba(0, 0, 0, .25);
    flex-shrink: 0;
    transition: transform .2s ease;
}

.header-brand:hover .header-logo-wrap {
    transform: scale(1.05);
}

.header-logo {
    height: 100%;
    width: auto;
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    background: #ffffff;
    border-radius: 8px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, .15);
    flex-shrink: 0;
    display: block;
}

.header-brand-text {
    line-height: 1.15;
}

.header-titulo {
    font-size: 1.15rem;
    font-weight: 800;
    margin: 0;
    letter-spacing: -.2px;
    color: #fff;
}

.header-subtitulo {
    font-size: .72rem;
    font-weight: 500;
    margin: 0;
    opacity: .8;
    text-transform: uppercase;
    letter-spacing: 1.2px;
    color: #fff;
}

.header-meta {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.header-relogio {
    display: flex;
    align-items: center;
    gap: .4rem;
    font-size: .82rem;
    color: rgba(255, 255, 255, .85);
    font-variant-numeric: tabular-nums;
}

.header-relogio i {
    font-size: .9rem;
    opacity: .85;
}

/* --- Badge de edifício / filial --- */
.header-badge-no-edificio {
    display: inline-flex;
    align-items: center;
    gap: .35rem;
    padding: .35rem .75rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, .15);
    color: #fff;
    font-size: .75rem;
    font-weight: 600;
    text-decoration: none;
    border: 1px solid rgba(255, 255, 255, .25);
    transition: all .2s ease;
}

.header-badge-no-edificio:hover {
    background: rgba(255, 255, 255, .22);
    color: #fff;
}

.header-badge-no-edificio i {
    color: #fbbf24;
}

/* --- Botão do utilizador --- */
.header-user-btn {
    display: flex;
    align-items: center;
    gap: .55rem;
    padding: .35rem .65rem .35rem .35rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, .12);
    border: 1px solid rgba(255, 255, 255, .18);
    color: #fff;
    font-size: .85rem;
    font-weight: 600;
    cursor: pointer;
    transition: all .2s ease;
}

.header-user-btn:hover,
.header-user-btn:focus {
    background: rgba(255, 255, 255, .20);
    color: #fff;
    outline: none;
    border-color: rgba(255, 255, 255, .35);
}

.header-user-btn::after {
    color: rgba(255, 255, 255, .7);
    margin-left: .25rem;
}

.header-user-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: linear-gradient(135deg, #fbbf24 0%, var(--amarelo) 100%);
    color: var(--azul-odysseia);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: .78rem;
    font-weight: 800;
    letter-spacing: .5px;
    flex-shrink: 0;
}

.header-user-nome {
    white-space: nowrap;
    max-width: 140px;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* --- Dropdown do utilizador --- */
.user-dropdown-header {
    padding: .75rem 1rem;
    background: #f8fafc;
    border-bottom: 1px solid #e2e8f0;
}

.user-dropdown-info {
    display: flex;
    flex-direction: column;
    gap: .35rem;
}

.user-dropdown-linha {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .5rem;
    font-size: .78rem;
}

.user-dropdown-label {
    display: inline-flex;
    align-items: center;
    gap: .35rem;
    color: #64748b;
    font-weight: 500;
}

.user-dropdown-label i {
    color: var(--azul-odysseia);
    font-size: .85rem;
}

.user-dropdown-valor {
    color: #0f172a;
    font-weight: 600;
    text-align: right;
}

.user-dropdown-nome {
    max-width: 180px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.user-dropdown-filial {
    color: var(--azul-odysseia-escuro);
}

.user-tipo-badge {
    display: inline-block;
    padding: .2rem .55rem;
    border-radius: 999px;
    font-size: .68rem;
    font-weight: 700;
    letter-spacing: .3px;
    text-transform: uppercase;
}

.tipo-admin       { background: #fee2e2; color: #991b1b; }
.tipo-secretaria  { background: #dbeafe; color: #1e40af; }
.tipo-tecnico     { background: #dcfce7; color: #14532d; }
.tipo-operador    { background: #fef3c7; color: #92400e; }
.tipo-seguranca   { background: #f3e8ff; color: #6b21a8; }

/* =========================================================
   8. CARDS DE ESTATÍSTICA
   ========================================================= */
.card-stat {
    border-left: 4px solid var(--cinza-claro);
}

.card-stat.border-azul     { border-left-color: var(--azul-odysseia-claro); }
.card-stat.border-verde    { border-left-color: var(--verde-escuro); }
.card-stat.border-amarelo  { border-left-color: #ca8a04; }
.card-stat.border-vermelho { border-left-color: var(--vermelho-escuro); }

.card-stat-moderno {
    background: #fff;
    border: none;
    border-left: 4px solid var(--cinza-claro);
    border-radius: 14px;
    box-shadow: var(--sombra-suave);
    transition: transform .2s ease, box-shadow .2s ease;
    overflow: hidden;
}

.card-stat-moderno:hover {
    transform: translateY(-3px);
    box-shadow: var(--sombra-media);
}

.card-stat-moderno.border-azul     { border-left-color: var(--azul-odysseia-claro); }
.card-stat-moderno.border-verde    { border-left-color: var(--verde); }
.card-stat-moderno.border-amarelo  { border-left-color: var(--amarelo); }
.card-stat-moderno.border-vermelho { border-left-color: var(--vermelho); }

.card-stat-moderno .card-body {
    padding: 1.15rem 1.25rem;
}

.stat-icon {
    width: 52px;
    height: 52px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    flex-shrink: 0;
}

.stat-icon-azul     { background: rgba(30, 155, 215, .12); color: var(--azul-odysseia-claro); }
.stat-icon-verde    { background: rgba(22, 163, 74, .12);  color: var(--verde); }
.stat-icon-amarelo  { background: rgba(245, 158, 11, .15); color: var(--amarelo-escuro); }
.stat-icon-vermelho { background: rgba(220, 38, 38, .12);  color: var(--vermelho); }

.stat-label {
    font-size: .78rem;
    color: var(--cinza-medio);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .5px;
    margin: 0;
}

.stat-valor {
    font-size: 2rem;
    font-weight: 800;
    color: var(--cinza-escuro);
    line-height: 1.1;
    margin: .1rem 0 0 0;
}

.section-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--cinza-escuro);
    letter-spacing: .2px;
}

/* =========================================================
   9. CARDS DE AÇÃO RÁPIDA
   ========================================================= */
.acao-card {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1.15rem 1.25rem;
    background: #fff;
    border-radius: 14px;
    border-left: 4px solid var(--cinza-claro);
    text-decoration: none;
    color: inherit;
    box-shadow: var(--sombra-suave);
    transition: transform .22s ease, box-shadow .22s ease, border-left-color .22s ease;
    position: relative;
    overflow: hidden;
    height: 100%;
}

.acao-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 14px 28px rgba(15, 23, 42, .14);
    color: inherit;
}

.acao-azul     { border-left-color: var(--azul-odysseia-claro); }
.acao-verde    { border-left-color: var(--verde); }
.acao-cinza    { border-left-color: var(--cinza-medio); }
.acao-amarelo  { border-left-color: #ca8a04; }
.acao-vermelho { border-left-color: var(--vermelho); }

.acao-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    flex-shrink: 0;
}

.acao-azul .acao-icon     { background: rgba(30, 155, 215, .12); color: var(--azul-odysseia-claro); }
.acao-verde .acao-icon    { background: rgba(22, 163, 74, .12);  color: var(--verde); }
.acao-cinza .acao-icon    { background: rgba(100, 116, 139, .12); color: #475569; }
.acao-amarelo .acao-icon  { background: rgba(245, 158, 11, .15); color: #92400e; }
.acao-vermelho .acao-icon { background: rgba(220, 38, 38, .12);  color: var(--vermelho); }

.acao-texto {
    flex-grow: 1;
    min-width: 0;
}

.acao-titulo {
    font-size: 1rem;
    font-weight: 700;
    color: var(--cinza-escuro);
    margin: 0 0 .15rem 0;
    letter-spacing: -.2px;
}

.acao-descricao {
    font-size: .8rem;
    color: var(--cinza-medio);
    margin: 0;
    line-height: 1.4;
}

.acao-seta {
    font-size: 1.1rem;
    color: var(--cinza-claro);
    transition: all .2s ease;
    flex-shrink: 0;
}

.acao-card:hover .acao-seta {
    color: var(--azul-odysseia);
    transform: translateX(4px);
}

/* =========================================================
   10. PÁGINAS INTERNAS — Page Hero
   ========================================================= */
.page-hero {
    background: linear-gradient(135deg, var(--azul-odysseia) 0%, var(--azul-odysseia-escuro) 100%);
    border-radius: var(--radius-grande);
    box-shadow: 0 12px 30px rgba(15, 23, 42, .18);
    overflow: hidden;
    position: relative;
}

.page-hero::before {
    content: "";
    position: absolute;
    inset: 0;
    background-image: url("/img/baner.jpg");
    background-size: cover;
    background-position: center;
    opacity: .12;
    z-index: 0;
}

.page-hero-inner {
    position: relative;
    z-index: 1;
    padding: 1.75rem 2rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
    flex-wrap: wrap;
}

.page-hero-content {
    color: #fff;
    min-width: 0;
}

.page-hero-breadcrumb {
    display: flex;
    align-items: center;
    gap: .5rem;
    font-size: .78rem;
    color: rgba(255, 255, 255, .75);
    margin-bottom: .6rem;
}

.page-hero-breadcrumb a {
    color: rgba(255, 255, 255, .85);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: .3rem;
    transition: color .15s;
}

.page-hero-breadcrumb a:hover {
    color: #fff;
    text-decoration: underline;
}

.page-hero-breadcrumb i {
    font-size: .7rem;
    opacity: .7;
}

.page-hero-titulo {
    font-size: 1.6rem;
    font-weight: 800;
    margin: 0 0 .25rem 0;
    letter-spacing: -.3px;
    display: flex;
    align-items: center;
    gap: .6rem;
}

.page-hero-titulo i {
    color: #fbbf24;
}

.page-hero-subtitulo {
    font-size: .88rem;
    opacity: .85;
    margin: 0;
}

.page-hero-actions {
    display: flex;
    gap: .5rem;
    flex-wrap: wrap;
}

.btn-hero-outline {
    display: inline-flex;
    align-items: center;
    gap: .4rem;
    padding: .6rem 1rem;
    background: rgba(255, 255, 255, .12);
    border: 1px solid rgba(255, 255, 255, .25);
    color: #fff;
    font-size: .85rem;
    font-weight: 600;
    text-decoration: none;
    border-radius: var(--radius-pequeno);
    transition: all .2s ease;
    white-space: nowrap;
}

.btn-hero-outline:hover {
    background: rgba(255, 255, 255, .22);
    color: #fff;
    border-color: rgba(255, 255, 255, .4);
    transform: translateY(-1px);
}

/* =========================================================
   11. CONTENT CARD
   ========================================================= */
.content-card {
    background: #fff;
    border-radius: var(--radius-grande);
    box-shadow: var(--sombra-suave);
    overflow: hidden;
    border: 1px solid #f1f5f9;
}

.content-card-header {
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid #f1f5f9;
    background: #fafbfc;
}

.content-card-header-flex {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
}

.content-card-titulo {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--cinza-escuro);
    margin: 0 0 .2rem 0;
    display: flex;
    align-items: center;
    gap: .5rem;
}

.content-card-titulo i {
    color: var(--azul-odysseia);
}

.content-card-subtitulo {
    font-size: .8rem;
    color: var(--cinza-medio);
    margin: 0;
}

.content-card-body {
    padding: 1.5rem;
}

.badge-total {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 26px;
    height: 22px;
    padding: 0 .55rem;
    background: #d9f0fa;
    color: var(--azul-odysseia);
    font-size: .78rem;
    font-weight: 700;
    border-radius: 999px;
    margin-left: .35rem;
}

/* =========================================================
   12. FORMULÁRIO MODERNO
   ========================================================= */
.form-label-moderno {
    display: flex;
    align-items: center;
    gap: .4rem;
    font-size: .8rem;
    font-weight: 600;
    color: #334155;
    margin-bottom: .35rem;
    text-transform: uppercase;
    letter-spacing: .3px;
}

.form-label-moderno i {
    color: var(--azul-odysseia);
    font-size: .95rem;
}

.form-control-moderno {
    border: 1.5px solid #e2e8f0;
    border-radius: var(--radius-pequeno);
    padding: .65rem .85rem;
    font-size: .92rem;
    background: #f8fafc;
    transition: border-color .18s ease, box-shadow .18s ease, background .18s ease;
}

.form-control-moderno:focus {
    background: #fff;
    border-color: var(--azul-odysseia);
    box-shadow: 0 0 0 4px rgba(30, 155, 215, .10);
    outline: none;
}

.form-control-moderno::placeholder {
    color: #94a3b8;
}

/* =========================================================
   13. BOTÕES DE AÇÃO
   ========================================================= */
.btn-acao {
    display: inline-flex;
    align-items: center;
    gap: .5rem;
    padding: .7rem 1.25rem;
    border: none;
    border-radius: var(--radius-pequeno);
    font-size: .9rem;
    font-weight: 600;
    letter-spacing: .2px;
    cursor: pointer;
    text-decoration: none;
    transition: transform .2s ease, box-shadow .2s ease, background .2s ease;
    white-space: nowrap;
}

.btn-acao-azul {
    background: linear-gradient(135deg, var(--azul-odysseia) 0%, var(--azul-odysseia-claro) 100%);
    color: #fff;
    box-shadow: 0 4px 12px rgba(30, 155, 215, .30);
}

.btn-acao-azul:hover {
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(30, 155, 215, .40);
}

.btn-acao-verde {
    background: linear-gradient(135deg, var(--verde-escuro) 0%, var(--verde) 100%);
    color: #fff;
    box-shadow: 0 4px 12px rgba(21, 128, 61, .30);
}

.btn-acao-verde:hover {
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(21, 128, 61, .40);
}

.btn-acao-vermelho {
    background: linear-gradient(135deg, var(--vermelho-escuro) 0%, var(--vermelho) 100%);
    color: #fff;
    box-shadow: 0 4px 12px rgba(185, 28, 28, .30);
}

.btn-acao-vermelho:hover {
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(185, 28, 28, .40);
}

.btn-acao-cinza {
    background: #f1f5f9;
    color: #475569;
    border: 1px solid #e2e8f0;
}

.btn-acao-cinza:hover {
    background: #e2e8f0;
    color: #1e293b;
}

.btn-sm-acao {
    padding: .5rem .9rem;
    font-size: .82rem;
}

/* =========================================================
   14. PESQUISA INLINE
   ========================================================= */
.search-inline {
    max-width: 320px;
    width: 100%;
}

.search-inline .form-control {
    border-left: 0;
    box-shadow: none;
    background: #f8fafc;
}

.search-inline .form-control:focus {
    box-shadow: none;
    background: #fff;
}

.search-inline .input-group-text {
    background: #f8fafc;
    border: 1px solid #dee2e6;
    border-right: 0;
}

/* =========================================================
   15. TABELAS
   ========================================================= */
.table-moderna {
    width: 100%;
    table-layout: auto;
    white-space: nowrap;
    border-collapse: collapse;
    font-size: .88rem;
    min-width: max-content;
}

.table-moderna thead th,
.table-moderna tbody td,
.table-moderna tfoot td {
    white-space: nowrap !important;
    word-break: keep-all !important;
    overflow-wrap: normal !important;
    vertical-align: middle;
}

.table-moderna thead th {
    background: #f8fafc;
    border-bottom: 1px solid #e2e8f0;
    font-size: .72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .5px;
    color: var(--cinza-medio);
    padding: .85rem 1rem;
}

.table-moderna tbody td {
    padding: .85rem 1rem;
    border-bottom: 1px solid #f1f5f9;
    vertical-align: middle;
}

.table-moderna tbody tr {
    transition: background-color .15s;
}

.table-moderna tbody tr:hover {
    background: #e5e7eb !important;
    color: var(--cinza-escuro);
}

.table-moderna tbody tr:hover td {
    background: transparent !important;
    color: var(--cinza-escuro) !important;
    border-bottom-color: var(--cinza-claro);
}

.table-moderna tbody tr:hover a {
    color: var(--azul-odysseia) !important;
}

.table-moderna tbody tr:hover i {
    color: inherit !important;
}

.table-moderna tbody tr:last-child td {
    border-bottom: none;
}

/* Scroll horizontal moderno */
.table-responsive,
.tabela-scroll-h {
    display: block;
    width: 100%;
    max-width: 100%;
    overflow-x: auto !important;
    overflow-y: visible;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
    scrollbar-color: var(--cinza-claro) #f1f5f9;
}

.table-responsive::-webkit-scrollbar,
.tabela-scroll-h::-webkit-scrollbar {
    height: 12px;
    width: 12px;
}

.table-responsive::-webkit-scrollbar-track,
.tabela-scroll-h::-webkit-scrollbar-track {
    background: #f1f5f9;
    border-radius: 6px;
}

.table-responsive::-webkit-scrollbar-thumb,
.tabela-scroll-h::-webkit-scrollbar-thumb {
    background: var(--cinza-claro);
    border-radius: 6px;
    border: 2px solid #f1f5f9;
}

.table-responsive::-webkit-scrollbar-thumb:hover,
.tabela-scroll-h::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

/* =========================================================
   16. CÉLULAS ESPECIAIS
   ========================================================= */
.visitante-cell {
    display: flex;
    align-items: center;
    gap: .65rem;
}

.visitante-avatar {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--azul-odysseia) 0%, var(--azul-odysseia-claro) 100%);
    color: #fff;
    font-size: .72rem;
    font-weight: 800;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    letter-spacing: .3px;
}

.visitante-nome {
    font-weight: 600;
    color: var(--cinza-escuro);
    white-space: nowrap !important;
    overflow: visible !important;
    text-overflow: clip !important;
    max-width: none !important;
}

/* =========================================================
   17. BADGES
   ========================================================= */
.dept-badge {
    display: inline-block;
    padding: .25rem .65rem;
    background: #e6f6fc;
    color: var(--azul-odysseia-escuro);
    font-size: .75rem;
    font-weight: 600;
    border-radius: 6px;
    border: 1px solid #cceefa;
    white-space: nowrap !important;
}

.ref-badge {
    display: inline-flex;
    align-items: center;
    gap: .2rem;
    padding: .25rem .6rem;
    background: #f1f5f9;
    color: var(--azul-odysseia);
    font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
    font-size: .74rem;
    font-weight: 700;
    border-radius: 6px;
    border: 1px solid #e2e8f0;
    white-space: nowrap !important;
    letter-spacing: .3px;
}

.ref-badge i {
    color: #94a3b8;
    font-size: .7rem;
}

.status-badge {
    display: inline-flex;
    align-items: center;
    gap: .35rem;
    padding: .3rem .7rem;
    font-size: .74rem;
    font-weight: 600;
    border-radius: 999px;
    white-space: nowrap !important;
}

.status-ativo {
    background: #dcfce7;
    color: var(--verde-escuro);
    border: 1px solid #bbf7d0;
}

.status-ativo i {
    animation: pulse 1.8s ease-in-out infinite;
}

.status-saida {
    background: #f1f5f9;
    color: var(--cinza-medio);
    border: 1px solid #e2e8f0;
}

.status-pendente {
    background: #fef3c7;
    color: #92400e;
    border: 1px solid #fde68a;
}

.status-pendente i {
    animation: pulse 1.8s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50%      { opacity: .35; }
}

.badge-total-table {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 36px;
    height: 28px;
    padding: 0 .7rem;
    background: #e6f6fc;
    color: var(--azul-odysseia-escuro);
    font-size: .85rem;
    font-weight: 700;
    border-radius: 8px;
    border: 1px solid #cceefa;
    font-variant-numeric: tabular-nums;
}

/* =========================================================
   18. NOTAS / ESTADOS ACADÉMICOS
   ========================================================= */
.nota-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 42px;
    padding: .25rem .6rem;
    border-radius: 8px;
    font-weight: 700;
    font-size: .85rem;
    font-variant-numeric: tabular-nums;
}

.nota-excelente  { background: #dcfce7; color: #14532d; border: 1px solid #bbf7d0; }
.nota-bom        { background: #e6f6fc; color: var(--azul-odysseia-escuro); border: 1px solid #cceefa; }
.nota-suficiente { background: #fef3c7; color: #92400e; border: 1px solid #fde68a; }
.nota-negativa   { background: #fee2e2; color: #991b1b; border: 1px solid #fecaca; }

.estado-matriculado { background: #dcfce7; color: var(--verde-escuro); border: 1px solid #bbf7d0; }
.estado-pendente    { background: #fef3c7; color: #92400e; border: 1px solid #fde68a; }
.estado-transferido { background: #e6f6fc; color: var(--azul-odysseia-escuro); border: 1px solid #cceefa; }
.estado-desistente  { background: #fee2e2; color: #991b1b; border: 1px solid #fecaca; }

/* Tabela de pautas — sticky header */
.tabela-pautas thead th {
    position: sticky;
    top: 0;
    z-index: 2;
    background: #f8fafc;
}

.tabela-pautas .col-media {
    background: #f1f5f9;
    font-weight: 700;
    color: var(--azul-odysseia-escuro);
}

/* =========================================================
   19. PAGINAÇÃO
   ========================================================= */
.paginacao-wrapper {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 1rem;
    padding: 1.15rem 1.5rem;
    border-top: 1px solid #f1f5f9;
    background: #fafbfc;
}

.paginacao-info {
    font-size: .85rem;
    color: var(--cinza-medio);
}

.paginacao-info strong {
    color: var(--azul-odysseia);
    font-weight: 700;
}

.paginacao {
    display: flex;
    align-items: center;
    gap: .3rem;
    flex-wrap: wrap;
}

.paginacao-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 38px;
    height: 38px;
    padding: 0 .65rem;
    background: #fff;
    border: 1.5px solid #e2e8f0;
    border-radius: 9px;
    color: #475569;
    font-size: .88rem;
    font-weight: 600;
    cursor: pointer;
    transition: background .18s ease, border-color .18s ease, color .18s ease, transform .18s ease;
    user-select: none;
}

.paginacao-btn:hover:not(:disabled):not(.ativo) {
    background: #e6f6fc;
    border-color: #93c5fd;
    color: var(--azul-odysseia-escuro);
    transform: translateY(-1px);
}

.paginacao-btn.ativo {
    background: linear-gradient(135deg, var(--azul-odysseia) 0%, var(--azul-odysseia-claro) 100%);
    border-color: var(--azul-odysseia);
    color: #fff;
    box-shadow: 0 4px 12px rgba(30, 155, 215, .30);
    cursor: default;
}

/* =========================================================
   20. SWEETALERT2
   ========================================================= */
.swal-popup-odysseia {
    border-radius: var(--radius-grande) !important;
    padding: 2rem 1.5rem !important;
    box-shadow: 0 25px 60px rgba(15, 23, 42, .30) !important;
    font-family: inherit !important;
}

.swal-popup-odysseia .swal2-title {
    font-size: 1.3rem !important;
    font-weight: 800 !important;
    color: var(--cinza-escuro) !important;
    letter-spacing: -.2px;
    font-family: inherit !important;
}

.swal-popup-odysseia .swal2-html-container {
    font-size: .92rem !important;
    color: #475569 !important;
    line-height: 1.6 !important;
    font-family: inherit !important;
}

.swal-popup-odysseia .swal2-confirm,
.swal-popup-odysseia .swal2-cancel,
.swal-popup-odysseia .swal2-deny {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: .45rem !important;
    padding: .7rem 1.4rem !important;
    border-radius: var(--radius-pequeno) !important;
    font-size: .9rem !important;
    font-weight: 600 !important;
    letter-spacing: .2px !important;
    cursor: pointer !important;
    transition: transform .2s ease, box-shadow .2s ease, background .2s ease !important;
    border: none !important;
    margin: 0 .35rem !important;
    font-family: inherit !important;
}

.swal-popup-odysseia .swal2-confirm,
.swal-popup-odysseia .btn-swal-confirm {
    background: linear-gradient(135deg, var(--azul-odysseia) 0%, var(--azul-odysseia-claro) 100%) !important;
    color: #fff !important;
    box-shadow: 0 4px 12px rgba(30, 155, 215, .30) !important;
}

.swal-popup-odysseia .swal2-confirm:hover,
.swal-popup-odysseia .btn-swal-confirm:hover {
    transform: translateY(-2px) !important;
    box-shadow: 0 8px 20px rgba(30, 155, 215, .40) !important;
}

.swal-popup-odysseia .swal2-cancel,
.swal-popup-odysseia .btn-swal-cancel {
    background: #f1f5f9 !important;
    color: #475569 !important;
    border: 1px solid #e2e8f0 !important;
}

.swal-popup-odysseia .swal2-cancel:hover,
.swal-popup-odysseia .btn-swal-cancel:hover {
    background: #e2e8f0 !important;
    color: #1e293b !important;
}

.swal-popup-odysseia .swal2-deny,
.swal-popup-odysseia .btn-swal-danger {
    background: linear-gradient(135deg, var(--vermelho-escuro) 0%, var(--vermelho) 100%) !important;
    color: #fff !important;
    box-shadow: 0 4px 12px rgba(185, 28, 28, .30) !important;
}

.swal-popup-odysseia .swal2-timer-progress-bar {
    background: linear-gradient(90deg, var(--verde) 0%, #22c55e 100%) !important;
    height: 4px !important;
}

/* =========================================================
   21. PWA — BOTÃO INSTALAR
   ========================================================= */
.header-instalar-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: .4rem;
    background: linear-gradient(135deg, #e6f6fc 0%, #cceefa 100%);
    color: var(--azul-odysseia);
    border: 1px solid #bfdbfe;
    border-radius: 999px;
    padding: .4rem .85rem;
    font-size: .82rem;
    font-weight: 600;
    line-height: 1;
    white-space: nowrap;
    cursor: pointer;
    transition: background .15s ease, color .15s ease, transform .1s ease, box-shadow .15s ease;
    box-shadow: 0 1px 2px rgba(30, 155, 215, .05);
    margin-right: .5rem;
}

.header-instalar-btn i {
    font-size: 1rem;
    line-height: 1;
}

.header-instalar-btn:hover {
    background: linear-gradient(135deg, #cceefa 0%, #bfdbfe 100%);
    color: var(--azul-odysseia-escuro);
    box-shadow: 0 2px 6px rgba(30, 155, 215, .12);
}

.header-instalar-btn:active {
    transform: scale(.97);
}

.login-instalar-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: .5rem;
    width: 100%;
    margin-top: 1rem;
    background: transparent;
    color: var(--azul-odysseia);
    border: 1.5px dashed #93c5fd;
    border-radius: var(--radius-pequeno);
    padding: .65rem 1rem;
    font-size: .9rem;
    font-weight: 600;
    cursor: pointer;
    transition: background .15s ease, border-color .15s ease, color .15s ease;
}

.login-instalar-btn i {
    font-size: 1.05rem;
}

.login-instalar-btn:hover {
    background: #e6f6fc;
    border-color: var(--azul-odysseia);
    color: var(--azul-odysseia-escuro);
}

.login-instalar-btn:active {
    transform: scale(.985);
}

.dropdown-item .bi-download {
    color: var(--azul-odysseia);
}

.pwa-standalone .header-instalar-btn,
.pwa-standalone .login-instalar-btn,
.pwa-standalone #btnInstalarPWADropdown {
    display: none !important;
}

/* =========================================================
   22. SPLASH SCREEN — PWA
   ========================================================= */
.epn-splash {
    position: fixed;
    inset: 0;
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(160deg, #0B3A5C 0%, #1578A8 50%, #1E9BD7 100%);
    opacity: 0;
    visibility: hidden;
    transition: opacity .35s ease, visibility .35s ease;
}

.epn-splash.ativo {
    opacity: 1;
    visibility: visible;
}

.epn-splash.sair {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.epn-splash-conteudo {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    text-align: center;
    padding: 2rem;
    max-width: 420px;
}

.epn-splash-logo {
    width: 110px;
    height: 110px;
    object-fit: contain;
    background: #fff;
    padding: 12px;
    border-radius: 24px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, .35), 0 8px 20px rgba(0, 0, 0, .20);
    animation: epnSplashEntrar .8s cubic-bezier(.22, 1, .36, 1);
}

.epn-splash-nome {
    font-size: 1.25rem;
    font-weight: 800;
    color: #fff;
    margin: 0;
    line-height: 1.3;
    letter-spacing: .3px;
    text-shadow: 0 3px 12px rgba(0, 0, 0, .4);
}

.epn-splash-subtitulo {
    font-size: .95rem;
    font-weight: 500;
    color: rgba(255, 255, 255, .92);
    margin: 0;
    letter-spacing: .5px;
    text-transform: uppercase;
}

.epn-splash-loader {
    display: flex;
    gap: .45rem;
    margin-top: 1.5rem;
}

.epn-splash-loader span {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #E8B339;
    animation: epnSplashPulse 1.4s ease-in-out infinite;
}

.epn-splash-loader span:nth-child(2) { animation-delay: .2s; }
.epn-splash-loader span:nth-child(3) { animation-delay: .4s; }

@keyframes epnSplashEntrar {
    from { opacity: 0; transform: translateY(20px) scale(.92); }
    to   { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes epnSplashPulse {
    0%, 100% { opacity: .3; transform: scale(.85); }
    50%      { opacity: 1;  transform: scale(1.15); }
}

/* =========================================================
   23. BOTÃO TOGGLE SIDEBAR
   ========================================================= */
.btn-toggle-sidebar {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.25);
    background: rgba(255, 255, 255, 0.10);
    color: #ffffff;
    cursor: pointer;
    transition: background .2s ease, border-color .2s ease, transform .2s ease;
    padding: 0;
    margin-right: 4px;
    position: relative;
    outline: none;
}

.btn-toggle-sidebar i {
    font-size: 1.15rem;
    transition: transform .25s ease;
    line-height: 1;
}

.btn-toggle-sidebar:hover {
    background: rgba(255, 255, 255, 0.22);
    border-color: rgba(255, 255, 255, 0.45);
    transform: scale(1.05);
}

.btn-toggle-sidebar:active {
    transform: scale(0.95);
}

.btn-toggle-sidebar:focus-visible {
    outline: 2px solid var(--ouro);
    outline-offset: 2px;
}

.btn-toggle-sidebar::after {
    content: '';
    position: absolute;
    top: 4px;
    right: 4px;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #4ade80;
    border: 1.5px solid rgba(30, 58, 138, 0.9);
    opacity: 0;
    transition: opacity .2s ease;
}

body.sidebar-mini .btn-toggle-sidebar::after {
    opacity: 1;
}

body.sidebar-mini .btn-toggle-sidebar i {
    transform: rotate(180deg);
}

/* Desktop: visível */
@media (min-width: 992px) {
    .btn-toggle-sidebar {
        display: inline-flex !important;
    }
}

/* Mobile: escondido */
@media (max-width: 991.98px) {
    .btn-toggle-sidebar {
        display: none !important;
    }
}

/* =========================================================
   24. SIDEBAR MINI — MODO COMPACTO
   ========================================================= */

/* Pré-carregamento (evita flash antes do JS aplicar .sidebar-mini) */
html.sidebar-mini-preload .app-sidebar {
    width: var(--sidebar-mini-width) !important;
}

html.sidebar-mini-preload .app-content {
    margin-left: var(--sidebar-mini-width) !important;
}

html.sidebar-mini-preload .app-topbar {
    padding-left: calc(var(--sidebar-mini-width) + 1rem) !important;
}

/* Estado ativo — controlado por JS via body.sidebar-mini */
body.sidebar-mini .app-sidebar {
    width: var(--sidebar-mini-width) !important;
    overflow: visible;
}

body.sidebar-mini .app-sidebar .sidebar-nav {
    overflow: visible;
}

body.sidebar-mini .sidebar-link > span,
body.sidebar-mini .sidebar-link .sidebar-arrow,
body.sidebar-mini .sidebar-subheader,
body.sidebar-mini .sidebar-sublink > span {
    display: none !important;
}

body.sidebar-mini .sidebar-link {
    justify-content: center;
    padding: 14px 0;
    text-align: center;
}

body.sidebar-mini .sidebar-link i {
    font-size: 1.25rem;
    margin: 0;
}

body.sidebar-mini .sidebar-submenu {
    display: none !important;
}

body.sidebar-mini .sidebar-item {
    position: relative;
}

body.sidebar-mini .sidebar-item:hover > .sidebar-submenu {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    position: absolute;
    top: 0;
    left: 100%;
    width: 240px;
    background: #1e293b;
    border-radius: 0 8px 8px 0;
    box-shadow: 4px 0 16px rgba(0, 0, 0, .25);
    z-index: 1060;
    padding: 6px 0;
    max-height: 70vh;
    overflow-y: auto;
}

body.sidebar-mini .sidebar-item:hover > .sidebar-submenu .sidebar-subheader,
body.sidebar-mini .sidebar-item:hover > .sidebar-submenu .sidebar-sublink > span {
    display: block !important;
}

body.sidebar-mini .sidebar-item:hover > .sidebar-submenu .sidebar-sublink {
    justify-content: flex-start;
    padding: 8px 14px;
}

body.sidebar-mini .app-content {
    margin-left: var(--sidebar-mini-width) !important;
}

body.sidebar-mini .app-topbar {
    padding-left: calc(var(--sidebar-mini-width) + 1rem) !important;
}

/* Transições suaves (inclui transform para mobile) */
.app-sidebar,
.app-content,
.app-topbar {
    transition:
        width .25s ease,
        margin-left .25s ease,
        padding-left .25s ease,
        transform .3s ease;
}

/* =========================================================
   25. TABPAGES DO DASHBOARD
   ========================================================= */
.tabpages-wrapper {
    background: transparent;
    margin-bottom: 2rem;
}

.tabpages-nav {
    display: flex;
    flex-wrap: nowrap;
    gap: .35rem;
    border-bottom: 2px solid #e2e8f0;
    padding: 0 .25rem;
    margin-bottom: 1.75rem;
    overflow-x: auto;
    overflow-y: hidden;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.tabpages-nav::-webkit-scrollbar {
    display: none;
}

.tabpages-link {
    display: inline-flex;
    align-items: center;
    gap: .5rem;
    padding: .85rem 1.25rem;
    background: transparent;
    border: none;
    border-bottom: 3px solid transparent;
    color: #64748b;
    font-size: .92rem;
    font-weight: 600;
    letter-spacing: .1px;
    cursor: pointer;
    transition: color .2s ease, background .2s ease, border-color .2s ease;
    white-space: nowrap;
    position: relative;
    margin-bottom: -2px;
    border-radius: 8px 8px 0 0;
}

.tabpages-link i {
    font-size: 1.05rem;
    transition: transform .2s ease;
}

.tabpages-link:hover {
    color: var(--azul-odysseia);
    background: rgba(30, 155, 215, .05);
}

.tabpages-link.active {
    color: var(--azul-odysseia-escuro);
    border-bottom-color: var(--azul-odysseia);
    background: rgba(30, 155, 215, .06);
}

.tabpages-link.active i {
    transform: scale(1.1);
}

.tabpages-link-ouro.active {
    color: var(--ouro-escuro);
    border-bottom-color: var(--ouro);
    background: rgba(232, 179, 57, .08);
}

.tabpages-link-verde.active {
    color: var(--verde-escuro);
    border-bottom-color: var(--verde);
    background: rgba(22, 163, 74, .06);
}

.tabpages-link-azul.active {
    color: var(--azul-odysseia-escuro);
    border-bottom-color: var(--azul-odysseia);
}

.tabpages-content {
    animation: tabFade .35s ease;
}

@keyframes tabFade {
    from { opacity: 0; transform: translateY(8px); }
    to   { opacity: 1; transform: translateY(0); }
}

.tabpage-section {
    margin-bottom: 2rem;
}

.tabpage-section:last-child {
    margin-bottom: 0;
}

.tabpage-section-titulo {
    display: flex;
    align-items: center;
    gap: .55rem;
    font-size: .82rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.2px;
    color: var(--cinza-medio);
    margin: 0 0 1.1rem 0;
    padding-bottom: .65rem;
    border-bottom: 1px solid #f1f5f9;
}

.tabpage-section-titulo i {
    color: var(--azul-odysseia);
    font-size: 1.05rem;
}

/* =========================================================
   26. BREADCRUMBS
   ========================================================= */
.app-breadcrumb {
    margin-bottom: 1.25rem;
}

.app-breadcrumb .breadcrumb {
    background: transparent;
    padding: 0;
    font-size: .85rem;
}

.app-breadcrumb .breadcrumb-item {
    color: var(--cinza-medio);
    font-weight: 500;
}

.app-breadcrumb .breadcrumb-item a {
    color: var(--azul-odysseia);
    text-decoration: none;
    transition: color .15s;
    display: inline-flex;
    align-items: center;
    gap: .3rem;
}

.app-breadcrumb .breadcrumb-item a:hover {
    color: var(--azul-odysseia-escuro);
    text-decoration: underline;
}

.app-breadcrumb .breadcrumb-item.active {
    color: var(--cinza-escuro);
    font-weight: 600;
}

.app-breadcrumb .breadcrumb-item + .breadcrumb-item::before {
    content: "›";
    color: var(--cinza-claro);
    font-weight: 700;
    padding: 0 .5rem;
}

/* =========================================================
   27. NOTIFICAÇÕES — Topbar
   ========================================================= */
.header-notif-dropdown {
    position: relative;
}

.header-notif-btn {
    position: relative;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255, 255, 255, .12);
    border: 1px solid rgba(255, 255, 255, .18);
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background .2s ease, border-color .2s ease;
}

.header-notif-btn:hover {
    background: rgba(255, 255, 255, .22);
    border-color: rgba(255, 255, 255, .35);
}

.header-notif-btn:focus-visible {
    outline: 2px solid var(--ouro);
    outline-offset: 2px;
}

.header-notif-btn i {
    font-size: 1.1rem;
}

.header-notif-badge {
    position: absolute;
    top: -2px;
    right: -2px;
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    background: var(--vermelho);
    color: #fff;
    font-size: .68rem;
    font-weight: 700;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 2px solid var(--azul-odysseia-escuro);
    animation: notifPulse 2s ease-in-out infinite;
}

@keyframes notifPulse {
    0%, 100% { transform: scale(1); }
    50%      { transform: scale(1.1); }
}

.notif-menu {
    width: 360px;
    max-width: 92vw;
    padding: 0;
    border-radius: 14px;
    border: 1px solid #e2e8f0;
    box-shadow: 0 15px 40px rgba(15, 23, 42, .18);
    overflow: hidden;
    margin-top: 8px;
}

.notif-menu-header {
    padding: .85rem 1rem;
    background: #f8fafc;
    border-bottom: 1px solid #e2e8f0;
    font-size: .88rem;
    color: var(--cinza-escuro);
}

.notif-link-pequeno {
    font-size: .75rem;
    color: var(--azul-odysseia);
    text-decoration: none;
    font-weight: 500;
}

.notif-link-pequeno:hover {
    text-decoration: underline;
}

.notif-vazio {
    padding: 2rem 1rem;
    text-align: center;
    color: var(--cinza-medio);
}

.notif-vazio i {
    font-size: 2rem;
    opacity: .3;
    display: block;
    margin-bottom: .5rem;
}

.notif-vazio p {
    margin: 0;
    font-size: .85rem;
}

.notif-item {
    display: flex;
    gap: .75rem;
    padding: .85rem 1rem;
    text-decoration: none;
    color: inherit;
    border-bottom: 1px solid #f1f5f9;
    transition: background .15s;
}

.notif-item:hover {
    background: #f8fafc;
    color: inherit;
}

.notif-item.notif-nao-lida {
    background: #e6f6fc;
}

.notif-item.notif-nao-lida:hover {
    background: #cceefa;
}

.notif-icone {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: 1rem;
}

.notif-icone-info    { background: rgba(30, 155, 215, .12); color: var(--azul-odysseia); }
.notif-icone-success { background: rgba(22, 163, 74, .12); color: var(--verde); }
.notif-icone-warning { background: rgba(245, 158, 11, .15); color: var(--ouro-escuro); }
.notif-icone-danger  { background: rgba(220, 38, 38, .12); color: var(--vermelho); }

.notif-conteudo {
    flex: 1;
    min-width: 0;
}

.notif-titulo {
    font-weight: 600;
    font-size: .85rem;
    margin: 0 0 .15rem 0;
    color: var(--cinza-escuro);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.notif-mensagem {
    font-size: .78rem;
    color: var(--cinza-medio);
    margin: 0 0 .25rem 0;
    line-height: 1.4;
}

.notif-data {
    font-size: .7rem;
    color: #94a3b8;
    display: inline-flex;
    align-items: center;
    gap: .25rem;
}

.notif-menu-footer {
    padding: .75rem 1rem;
    text-align: center;
    background: #f8fafc;
    border-top: 1px solid #e2e8f0;
}

.notif-menu-footer a {
    font-size: .85rem;
    color: var(--azul-odysseia);
    font-weight: 600;
    text-decoration: none;
}

.notif-menu-footer a:hover {
    text-decoration: underline;
}

/* =========================================================
   28. RESPONSIVO
   ========================================================= */
@media (max-width: 1200px) {
    .hero-dashboard {
        height: 280px;
    }
}

@media (max-width: 991.98px) {
    .login-bg {
        padding: 2rem;
    }

    .login-card {
        max-width: 400px;
    }

    /* Sidebar mobile — escondida por padrão */
    .app-sidebar {
        position: fixed !important;
        transform: translateX(-100%) !important;
        width: 280px !important;
        max-width: 85vw !important;
        height: calc(100vh - var(--topbar-height)) !important;
        top: var(--topbar-height) !important;
        left: 0 !important;
        z-index: 1050 !important;
        box-shadow: 4px 0 25px rgba(0, 0, 0, .35) !important;
        visibility: visible !important;
        opacity: 1 !important;
    }

    .app-sidebar.show {
        transform: translateX(0) !important;
    }

    .app-content {
        margin-left: 0 !important;
        padding: 1rem !important;
        margin-top: var(--topbar-height) !important;
        width: 100% !important;
    }

    .sidebar-overlay {
        z-index: 1040 !important;
        background: rgba(0, 0, 0, .55) !important;
    }

    .app-topbar {
        z-index: 1060 !important;
    }

    /* Hamburger mobile */
    #btnToggleSidebar {
        display: inline-flex !important;
        align-items: center;
        justify-content: center;
        color: #fff !important;
        padding: 0 !important;
        margin-right: .5rem;
        font-size: 1.5rem;
        background: transparent !important;
        border: none !important;
        box-shadow: none !important;
    }

    #btnToggleSidebar:hover,
    #btnToggleSidebar:focus {
        color: var(--ouro) !important;
        opacity: 1 !important;
    }

    .header-instalar-btn {
        display: none !important;
    }

    .sidebar-header {
        display: flex !important;
    }

    .hero-dashboard {
        height: 260px;
        background-position: center 42%;
    }

    .hero-dashboard .hero-overlay {
        padding: 2rem;
    }

    .hero-titulo {
        font-size: 2rem;
    }
}

@media (min-width: 992px) {
    #btnToggleSidebar {
        display: none !important;
    }

    .sidebar-header {
        display: none !important;
    }

    .app-sidebar {
        transform: none !important;
    }

    .sidebar-overlay {
        display: none !important;
    }
}

@media (max-width: 768px) {
    .login-bg {
        align-items: center;
        justify-content: center;
        padding: 1rem;
        background-attachment: scroll;
    }

    .login-card {
        max-width: 340px;
        border-radius: 14px;
    }

    .hero-dashboard {
        height: 220px;
    }

    .hero-dashboard .hero-overlay {
        padding: 1.75rem 1.5rem;
    }

    .hero-titulo {
        font-size: 1.6rem;
    }

    .hero-subtitulo {
        font-size: .92rem;
    }

    .stat-valor {
        font-size: 1.7rem;
    }

    .stat-icon {
        width: 46px;
        height: 46px;
        font-size: 1.2rem;
    }

    .header-logo-wrap {
        width: 42px;
        height: 42px;
        padding: 4px;
    }

    .header-titulo {
        font-size: 1rem;
    }

    .header-subtitulo {
        font-size: .65rem;
    }

    .content-card-body {
        padding: 1.15rem;
    }

    .content-card-header {
        padding: 1rem 1.15rem;
    }

    .table-moderna thead th,
    .table-moderna tbody td {
        padding: .65rem .75rem;
    }

    .paginacao-wrapper {
        flex-direction: column;
        align-items: stretch;
        padding: 1rem;
    }

    .paginacao {
        justify-content: center;
    }

    .paginacao-btn {
        min-width: 34px;
        height: 34px;
        padding: 0 .5rem;
        font-size: .82rem;
    }

    /* Tabpages compactas */
    .tabpages-link {
        padding: .7rem .9rem;
        font-size: .85rem;
    }

    .tabpages-link i {
        font-size: 1rem;
    }

    .tabpages-link-texto {
        display: none;
    }

    .tabpages-link.active .tabpages-link-texto {
        display: inline;
    }

    .tabpage-section-titulo {
        font-size: .75rem;
    }
}

@media (max-width: 480px) {
    .hero-dashboard {
        height: 190px;
    }

    .hero-dashboard .hero-overlay {
        padding: 1.5rem 1.25rem;
    }

    .hero-titulo {
        font-size: 1.35rem;
    }

    .hero-subtitulo {
        font-size: .82rem;
    }

    .hero-empresa {
        font-size: .8rem;
    }

    .hero-meta {
        font-size: .72rem;
    }

    .login-card {
        max-width: 100%;
    }

    .login-card .card-body {
        padding: .9rem 1rem !important;
    }

    .login-logo {
        max-height: 55px;
    }

    .stat-icon {
        width: 42px;
        height: 42px;
        font-size: 1.1rem;
    }

    .stat-valor {
        font-size: 1.5rem;
    }

    .stat-label {
        font-size: .7rem;
    }

    .acao-card {
        padding: 1rem 1.1rem;
    }

    .acao-titulo {
        font-size: .95rem;
    }

    .acao-descricao {
        font-size: .75rem;
    }

    .epn-splash-logo {
        width: 90px;
        height: 90px;
        padding: 10px;
    }

    .epn-splash-nome {
        font-size: 1.1rem;
    }

    .epn-splash-subtitulo {
        font-size: .85rem;
    }

    .tabpages-nav {
        gap: .2rem;
    }

    .tabpages-link {
        padding: .6rem .75rem;
    }

    .notif-menu {
        width: 300px;
    }
}

/* =========================================================
   29. IMPRESSÃO
   ========================================================= */
@media print {
    header, nav, footer,
    .btn, .no-print,
    .hero-dashboard, .acao-card,
    .content-card-header, .page-hero-actions,
    .app-sidebar, .app-topbar,
    .sidebar-overlay,
    .tabpages-nav,
    .header-notif-dropdown {
        display: none !important;
    }

    body {
        background: #fff !important;
    }

    .card {
        border: 1px solid #dee2e6 !important;
        box-shadow: none !important;
    }

    main,
    .app-content {
        padding: 0 !important;
        margin: 0 !important;
    }

    .content-card {
        break-inside: avoid;
        box-shadow: none !important;
        border: 1px solid #dee2e6 !important;
        margin-bottom: 1rem !important;
    }

    .tabpages-content > .tab-pane {
        display: block !important;
        opacity: 1 !important;
        page-break-inside: avoid;
    }

    @page {
        size: A4;
        margin: 12mm 10mm 14mm 10mm;
    }
}

/* =========================================================
   30. ACESSIBILIDADE — Movimento reduzido
   ========================================================= */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}

.sidebar-sublink .badge-passo {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    margin-left: 6px;
    border-radius: 999px;
    background: rgba(255, 255, 255, .15);
    color: rgba(255, 255, 255, .85);
    font-size: .65rem;
    font-weight: 700;
    line-height: 1;
}

/* SweetAlert2 — Tema Odysseia */
.swal-popup-odysseia {
    border-radius: 1rem;
    font-family: inherit;
}

.swal-popup-odysseia .swal2-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: #0f172a;
}

.swal-popup-odysseia .swal2-html-container {
    font-size: .95rem;
    color: #475569;
}

.swal-popup-odysseia .btn-swal-confirm,
.swal-popup-odysseia .btn-swal-cancel,
.swal-popup-odysseia .btn-swal-danger {
    padding: .55rem 1.1rem;
    border-radius: 999px;
    font-weight: 600;
    font-size: .9rem;
    border: none;
    cursor: pointer;
    transition: transform .15s ease, box-shadow .15s ease;
}

.swal-popup-odysseia .btn-swal-confirm {
    background: #1E9BD7;
    color: #fff;
}
.swal-popup-odysseia .btn-swal-confirm:hover {
    background: #1578A8;
    transform: translateY(-1px);
}

.swal-popup-odysseia .btn-swal-danger {
    background: #dc3545;
    color: #fff;
}
.swal-popup-odysseia .btn-swal-danger:hover {
    background: #b02a37;
}

.swal-popup-odysseia .btn-swal-cancel {
    background: #e2e8f0;
    color: #334155;
}
.swal-popup-odysseia .btn-swal-cancel:hover {
    background: #cbd5e1;
}

body.embed-mode .main-header,
body.embed-mode .btn-back-ultra,
body.embed-mode footer,
body.embed-mode #menuLateral,
body.embed-mode #professor:first-of-type {
    display: none !important;
}
body.embed-mode .main-content { padding-top: 0 !important; }