﻿:root {
    --app-topbar-height: 64px;
}

/* Paleta compartilhada do tema azul (home/visitante/admin) */
.admin-body {
    --admin-primary: #0b2f63;
    --admin-primary-2: #1d4f9b;
    --admin-line: #d6deea;
}

/* Garante que o corpo da pÃ¡gina possa ocupar toda a altura da tela */
body, html {
    height: 100%;
}

/* Classe para centralizar conteÃºdo vertical e horizontalmente */
.container-center-vh {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* --- Estilos do Painel Administrativo --- */
.sidebar { 
    position: fixed; top: 0; bottom: 0; left: 0; z-index: 100; 
    padding: 0; box-shadow: inset -1px 0 0 rgba(0, 0, 0, .1); 
}
.sidebar-scroll {
    overflow-y: auto;
    overflow-x: hidden;
    min-height: 0;
    scrollbar-gutter: auto;
}

.admin-body .sidebar-shell {
    height: 100%;
    min-height: 0;
}

.admin-body .sidebar-shell .sidebar-scroll {
    flex: 1 1 auto;
    min-height: 0;
}

/* Scroll da sidebar: ativo, mas com visual discreto */
.admin-body .sidebar-scroll {
    scrollbar-width: thin;
    scrollbar-color: transparent transparent;
}

.admin-body .sidebar-scroll:hover {
    scrollbar-color: rgba(29, 79, 155, 0.36) transparent;
}

.admin-body .sidebar-scroll::-webkit-scrollbar {
    width: 8px;
}

.admin-body .sidebar-scroll::-webkit-scrollbar-track {
    background: transparent;
}

.admin-body .sidebar-scroll::-webkit-scrollbar-thumb {
    background: transparent;
    border-radius: 999px;
    border: 2px solid transparent;
    background-clip: padding-box;
}

.admin-body .sidebar-scroll:hover::-webkit-scrollbar-thumb {
    background: rgba(29, 79, 155, 0.36);
}

.admin-body .sidebar-scroll::-webkit-scrollbar-thumb:active {
    background: rgba(11, 47, 99, 0.52);
}
.main-content { 
    margin-left: 0; padding-top: 24px; 
}
@media (min-width: 768px) {
    .main-content { margin-left: 250px; }
}
@media (max-width: 767.98px) {
    /* Em telas pequenas, a sidebar colapsa e vira conteÃºdo normal ao abrir */
    .sidebar { position: static; height: auto; padding: .5rem 0; width: 100%; }
    /* Quando aberta, a sidebar vira um overlay que ocupa a tela abaixo da navbar */
    #sidebarMenu.show {
        position: fixed;
        top: var(--app-topbar-height); /* altura da navbar fixed-top */
        left: 0; right: 0; bottom: 0;
        width: 100%;
        height: calc(100vh - var(--app-topbar-height));
        overflow: hidden;
        z-index: 1050; /* acima do conteÃºdo */
        background-color: #f5f8fe; /* fundo claro do menu */
        box-shadow: inset -1px 0 0 rgba(0,0,0,.1);
    }
    #sidebarMenu.show .sidebar-shell {
        height: 100% !important;
    }
    #sidebarMenu.show .sidebar-scroll {
        padding-bottom: 0.85rem;
    }
}

/* Topbar unificada (Admin + Dev), no mesmo padrao visual da home */
.admin-body .navbar.topbar-admin {
    height: var(--app-topbar-height);
    min-height: var(--app-topbar-height);
    padding: 0 !important;
    background: linear-gradient(90deg, #071a37 0%, #0b2f63 100%) !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}

.admin-body .navbar.topbar-admin .container-fluid {
    height: 100%;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.7rem 1.25rem;
    position: relative;
}

.topbar-brand {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    min-width: 0;
    margin-right: 0;
    text-decoration: none;
    flex-shrink: 0;
    position: relative;
    z-index: 2;
}

.topbar-brand-logo {
    height: 36px;
    width: auto;
    object-fit: contain;
    flex-shrink: 0;
    border: 1px solid rgba(255, 255, 255, 0.4);
    border-radius: 999px;
    padding: 2px 6px;
    background: rgba(255, 255, 255, 0.12);
}

.topbar-title {
    color: #eef4ff;
    font-size: 1.02rem;
    font-weight: 700;
    line-height: 1.2;
    letter-spacing: 0.1px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.topbar-title-centered {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    color: #eef4ff;
    font-size: 1.04rem;
    font-weight: 700;
    line-height: 1.2;
    letter-spacing: 0.1px;
    text-decoration: none;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 52%;
    text-align: center;
}
.topbar-title-full {
    display: inline;
}
.topbar-title-short {
    display: none;
}

.admin-body.is-diretor-escolar {
    --admin-primary: #0b2f63;
    --admin-primary-2: #1d4f9b;
    --admin-line: #d6deea;
}

.admin-body.is-diretor-escolar .navbar.topbar-admin {
    background: linear-gradient(90deg, #071a37 0%, #0b2f63 100%) !important;
}

.admin-body.is-diretor-escolar .topbar-brand-logo {
    border-color: rgba(255, 255, 255, 0.4);
    background: rgba(255, 255, 255, 0.16);
    box-shadow: none;
}

.admin-body.is-diretor-escolar .topbar-title-centered {
    position: relative;
    color: transparent;
    letter-spacing: 0.02em;
    text-shadow: none;
}

.admin-body.is-diretor-escolar .topbar-title-centered::before {
    content: "Sistema de Gestão Escolar Prisional";
    color: #eef4ff;
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.admin-body .navbar.topbar-admin .navbar-toggler {
    border-color: rgba(255, 255, 255, 0.35);
}

.admin-body .navbar.topbar-admin .navbar-toggler:focus {
    box-shadow: 0 0 0 0.2rem rgba(232, 240, 255, 0.3);
}

.topbar-admin-right {
    min-width: 0;
    margin-left: auto;
    position: relative;
    z-index: 2;
}

.topbar-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.35rem 0.7rem;
    border-radius: 999px;
    font-size: 0.8rem;
    font-weight: 600;
    color: #dce9ff;
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.18);
    white-space: nowrap;
}

.topbar-pill-primary {
    color: #0b2f63;
    background: #e8f0ff;
    border-color: rgba(232, 240, 255, 0.9);
}

.topbar-user {
    color: #dce9ff;
    font-size: 0.86rem;
    font-weight: 600;
    white-space: nowrap;
}

.topbar-profile-link {
    color: #dce9ff;
    font-size: 1.05rem;
    line-height: 1;
    align-items: center;
    gap: 0.35rem;
    text-decoration: none;
    opacity: 0.94;
    transition: color 0.2s ease, opacity 0.2s ease, transform 0.2s ease;
}

.topbar-profile-link:hover,
.topbar-profile-link:focus {
    color: #ffffff;
    opacity: 1;
    transform: translateY(-1px);
}

.topbar-profile-link:hover .topbar-user,
.topbar-profile-link:focus .topbar-user {
    color: #ffffff;
}

.admin-body .admin-page-title {
    color: var(--admin-primary);
    font-weight: 700;
    letter-spacing: 0.15px;
    line-height: 1.2;
}

.admin-body .admin-page-title + .text-muted,
.admin-body .admin-page-title + p.text-muted {
    color: #5f748f !important;
}

.admin-body .ficha-escolar-header {
    row-gap: 1rem;
}

.admin-body .ficha-escolar-header-main {
    min-width: min(100%, 520px);
}

.admin-body .ficha-escolar-header-kicker {
    letter-spacing: 0.08em;
    color: #5f748f !important;
}

.admin-body .ficha-escolar-header-meta {
    row-gap: 0.35rem;
}

.admin-body .ficha-escolar-header-meta > span:not(.badge) {
    display: inline-flex;
    align-items: center;
}

.admin-body .ficha-escolar-header-alerta {
    font-weight: 600;
}

.admin-body .ficha-escolar-header-actions {
    align-self: center;
}

.admin-body .ficha-escolar-header-return {
    margin-left: 1.35rem;
}

@media (max-width: 767.98px) {
    .admin-body .ficha-escolar-header-actions {
        width: 100%;
        justify-content: flex-start !important;
    }

    .admin-body .ficha-escolar-header-return {
        margin-left: 0;
    }
}

.admin-body .main-content { margin-top: var(--app-topbar-height); padding-top: 0; }
@media (min-width: 768px) {
    .admin-body .main-content { margin-top: var(--app-topbar-height); padding-top: 0; }
}

.admin-body .sidebar {
    top: var(--app-topbar-height);
    padding-top: 0;
    background: #f5f8fe;
    box-shadow: inset -1px 0 0 var(--admin-line);
}

.admin-body #sidebarMenu .sidebar-scroll {
    padding-top: 0.85rem !important;
    padding-bottom: 0.55rem;
}

.admin-body .btn-primary {
    background: linear-gradient(135deg, var(--admin-primary) 0%, var(--admin-primary-2) 100%);
    border-color: var(--admin-primary-2);
    box-shadow: 0 8px 18px rgba(11, 47, 99, 0.18);
}

.admin-body .btn-primary:hover,
.admin-body .btn-primary:focus,
.admin-body .btn-primary:active,
.admin-body .btn-check:checked + .btn-primary {
    background: linear-gradient(135deg, #0a2854 0%, #1a478c 100%);
    border-color: #1a478c;
}

.admin-body .btn-outline-primary {
    color: var(--admin-primary-2);
    border-color: #9fb8de;
}

.admin-body .btn-outline-primary:hover,
.admin-body .btn-outline-primary:focus,
.admin-body .btn-outline-primary:active,
.admin-body .btn-check:checked + .btn-outline-primary {
    background-color: #eef4ff;
    color: var(--admin-primary);
    border-color: var(--admin-primary-2);
}

.admin-body .sidebar .sidebar-heading {
    color: #355784 !important;
    font-size: 0.72rem;
    letter-spacing: 0.08em;
    font-weight: 700;
}

.admin-body .sidebar .sidebar-section-toggle {
    width: calc(100% - 0.96rem);
    margin-left: 0.48rem;
    margin-right: 0.48rem;
    background: transparent;
    border: 0;
    border-bottom: 1px solid #d9e4f3;
    border-radius: 0;
    cursor: pointer;
    padding-top: 0.5rem !important;
    padding-bottom: 0.5rem !important;
    text-align: left;
    box-shadow: none;
    transition: color 0.2s ease, border-color 0.2s ease, opacity 0.2s ease;
}

.admin-body .sidebar .sidebar-section-toggle:hover,
.admin-body .sidebar .sidebar-section-toggle:focus {
    background: transparent;
    color: #143f73 !important;
    border-color: #b8cde9;
    outline: none;
    opacity: 1;
}

.admin-body .sidebar .sidebar-section-toggle[aria-expanded="true"] {
    background: transparent;
    border-color: #9ebde7;
    color: #113766 !important;
    box-shadow: none;
}

.admin-body .sidebar .sidebar-section-toggle .section-icon {
    width: 1.55rem;
    height: 1.55rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    font-size: 0.8rem;
    color: #1f4f89;
    background: #e9f1ff;
    border: 1px solid #d3e0f5;
}

.admin-body .sidebar .sidebar-section-toggle .section-chevron {
    font-size: 0.72rem;
    color: #5f7da6;
    transition: transform 0.2s ease;
}

.admin-body .sidebar .sidebar-section-toggle[aria-expanded="true"] .section-chevron {
    transform: rotate(180deg);
}

.admin-body .sidebar .sidebar-section-menu {
    position: relative;
    margin-left: 1.45rem;
    margin-right: 0.5rem;
    margin-bottom: 0.95rem !important;
    padding-left: 0.95rem;
    padding-top: 0.35rem;
}

.admin-body .sidebar .sidebar-section-menu::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0.3rem;
    bottom: 0.25rem;
    width: 1px;
    background: #d6e0ee;
}

.admin-body .sidebar .sidebar-section-menu .nav-link {
    margin-left: 0;
    margin-right: 0;
    padding: 0.32rem 0.5rem 0.32rem 0.72rem;
    font-size: 0.85rem;
    border-radius: 0.58rem;
    border: 1px solid transparent;
}

.admin-body .sidebar .nav-link {
    font-weight: 500;
    font-size: 0.88rem;
    display: flex;
    align-items: center;
    color: #274772;
    border-radius: 0.62rem;
    margin: 0.08rem 0.48rem;
    padding: 0.38rem 0.58rem;
    transition: background-color 0.2s ease, color 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.admin-body .sidebar .nav-link .bi {
    margin-right: 7px;
    width: 18px;
    font-size: 0.92rem;
}

.admin-body .sidebar .nav-link:hover {
    color: #204c84 !important;
    background: #f4f8ff;
}

.admin-body .sidebar .nav-link.active {
    color: #143d72 !important;
    background: #f8fbff;
    border-color: #dde7f5;
    box-shadow: inset 2px 0 0 #2f68c5;
}

.admin-body .admin-sidebar-footer {
    border-top: 1px solid #dbe5f3;
    padding-top: 0.4rem;
    margin-top: 0;
    flex: 0 0 auto;
    background: #f5f8fe;
}

.admin-body .admin-sidebar-footer-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.35rem;
    padding: 0 0.42rem;
}

.admin-body .admin-sidebar-footer-row.is-dev-only {
    justify-content: flex-end;
}

.admin-body .sidebar .admin-footer-link {
    width: auto;
    margin: 0;
    padding: 0.34rem 0.52rem;
    font-size: 0.83rem;
    border-radius: 0.58rem;
    white-space: nowrap;
}

.admin-body .sidebar .admin-footer-link .bi {
    width: auto;
    margin-right: 6px;
}

.admin-body .sidebar .admin-footer-logout {
    color: #3b5679;
}

.admin-body .sidebar .admin-footer-logout:hover {
    color: #173b6c !important;
}

.admin-body .sidebar .nav-link.nav-link-sub {
    padding-left: 2.1rem;
    font-size: 0.84rem;
}

.admin-body .sidebar .sidebar-nested-submenu {
    margin-left: 0.5rem;
    padding-left: 0.55rem;
    border-left: 1px dashed #d9e3f1;
}
.collapse.show { visibility: visible; }
#admin-logout-btn { cursor: pointer; }

@media (max-width: 767.98px) {
    .admin-body .navbar.topbar-admin .container-fluid {
        padding: 0.6rem 0.75rem;
        gap: 0.5rem;
    }

    .topbar-brand {
        max-width: none;
        gap: 0.4rem;
    }

    .topbar-brand-logo {
        height: 29px;
    }

    .topbar-title-centered {
        position: static;
        left: auto;
        transform: none;
        flex: 1 1 auto;
        min-width: 0;
        font-size: 0.86rem;
        max-width: none;
        text-align: left;
    }
    .topbar-title-full {
        display: none;
    }
    .topbar-title-short {
        display: inline;
    }

    .topbar-admin-right {
        display: none !important;
    }

    .admin-body.is-diretor-escolar .topbar-title-centered::before {
        content: "Gestão Escolar";
        justify-content: flex-start;
    }

}

/* --- Estilos para PÃ¡ginas de AutenticaÃ§Ã£o --- */
.auth-card {
    border-radius: 1rem; max-width: 550px; width: 100%;
}
.form-control:focus {
    box-shadow: none; border-color: #0d6efd;
}

/* --- Estilos para ValidaÃ§Ã£o de Senha --- */
#password-requirements { font-size: 0.875rem; }
#password-requirements ul { list-style-type: none; padding-left: 0; margin-bottom: 0; }
#password-requirements .valid { color: #198754; }
#password-requirements .invalid { color: #dc3545; }
#password-requirements .valid::before { content: "\2713\0020"; font-weight: bold; }
#password-requirements .invalid::before { content: "\2717\0020"; font-weight: bold; }

/* --- Estilos da PÃ¡gina NotificaÃ§Ãµes --- */
.request-card {
    border-left: 5px solid #ffc107; transition: background-color 0.2s ease;
}
.request-card.status-resolvido { border-left-color: #198754; }
.request-card.is-selected { background-color: #eef2ff; }
.notifications-toolbar {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}
.notification-item {
    border: 1px solid #d9e2ef;
    border-radius: 0.85rem;
    background: #fff;
    overflow: hidden;
}
.notification-summary {
    list-style: none;
    cursor: pointer;
    padding: 0.8rem 0.9rem;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.75rem;
}
.notification-summary::-webkit-details-marker { display: none; }
.notification-summary-main { min-width: 0; flex: 1; }
.notification-title-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    margin-bottom: 0.25rem;
}
.notification-title {
    color: #0b3a78;
    font-weight: 600;
    font-size: 1rem;
}
.notification-preview {
    color: #495057;
    font-size: 0.92rem;
    line-height: 1.35;
    word-break: break-word;
}
.notification-datetime {
    display: inline-block;
    font-size: 0.85rem;
}
.notification-chevron {
    color: #6c757d;
    font-size: 0.85rem;
    transition: transform 0.2s ease;
    margin-top: 0.25rem;
}
.notification-item[open] .notification-chevron {
    transform: rotate(180deg);
}
.notification-item[open] {
    border-color: #b9cde9;
    box-shadow: 0 0 0 1px rgba(13, 110, 253, 0.08);
}
.notification-details {
    border-top: 1px solid #edf1f6;
    padding: 0.75rem 0.9rem 0.9rem;
    background: #fbfcfe;
}
.notification-block {
    border: 1px solid #e8eef7;
    border-radius: 0.6rem;
    background: #fff;
    padding: 0.55rem 0.65rem;
}
.notification-block-title {
    font-size: 0.82rem;
    font-weight: 600;
    color: #495057;
    margin-bottom: 0.3rem;
}
.notification-block-text {
    white-space: pre-wrap;
    color: #1f2d3d;
}
.btn .spinner-border { display: none; }
.btn.loading { position: relative; }
.btn.loading .spinner-border {
    display: inline-block !important;
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
}

/* --- Estilos PadrÃ£o de CabeÃ§alho de PÃ¡gina (User) --- */
.card-header-custom {
    display: flex; justify-content: center; align-items: center;
    position: relative; width: 100%; margin-bottom: 1.5rem;
    padding-bottom: 1rem; border-bottom: 1px solid #dee2e6;
}
.btn-back {
    position: absolute; right: 0; font-size: 1.5rem;
    color: #0d6efd; text-decoration: none; transition: color 0.2s ease-in-out;
}
.btn-back:hover { color: #0b5ed7; }

/* --- Estilos da PÃ¡gina de Perfil --- */
.section-title { 
    border-bottom: 1px solid #dee2e6; 
    padding-bottom: 10px; 
    margin-bottom: 20px; 
}
.btn.loading .button-text { visibility: hidden; }
.file-upload-status { font-weight: bold; }
.status-pendente { color: #ffc107; }
.status-aprovado { color: #198754; }
.status-rejeitado { color: #dc3545; }

/* Padrao de abas do app (mesmo modelo de "Meus Agendamentos") */
.ui-tabs {
    gap: 0.5rem;
    border: 1px solid #e2e8f0;
    padding: 0.4rem;
    background: #f1f5f9;
    border-radius: 0.9rem;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
}

.ui-tabs-no-border {
    border: none;
    box-shadow: none;
}

.ui-tabs-nowrap {
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.ui-tabs-tight {
    gap: 0.25rem;
    padding: 0.3rem;
}

.ui-tabs-tight .nav-link {
    font-size: 0.82rem;
    padding: 0.32rem 0.55rem;
}

.ui-tabs .nav-item {
    display: flex;
    align-items: center;
}

.ui-tabs .nav-link {
    border: none;
    background: transparent;
    color: #2563eb;
    font-weight: 600;
    padding: 0.5rem 0.95rem;
    border-radius: 0.75rem;
    line-height: 1.1;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 0.4rem;
    white-space: nowrap;
}

.ui-tabs .nav-link:hover {
    background: rgba(255, 255, 255, 0.8);
}

.ui-tabs .nav-link.active,
.ui-tabs .show > .nav-link {
    background: #fff;
    color: var(--vs-primary, #1d4f9b) !important;
    box-shadow: 0 6px 14px rgba(15, 23, 42, 0.12);
}

.ui-tabs-compact .nav-link {
    font-size: 0.88rem;
    padding: 0.4rem 0.8rem;
}

.ui-tabs.nav,
.ui-tabs.nav-pills {
    border-bottom: none !important;
    box-shadow: none !important;
}

/* Ajuste especifico: abas da pagina Meu Perfil */
#myProfileTabs {
    flex-wrap: nowrap;
}

#myProfileTabs .nav-item {
    flex: 1 1 0;
    min-width: 0;
}

#myProfileTabs .nav-link {
    width: 100%;
    justify-content: center;
    text-align: center;
    white-space: normal;
    padding: 0.45rem 0.4rem;
    font-size: 0.9rem;
    line-height: 1.15;
}

#myProfileTabsContent {
    margin-top: 1.15rem;
}

#documentProfileTabs.profile-subtabs {
    justify-content: flex-start;
    width: fit-content;
    max-width: 100%;
    margin-left: auto;
    margin-right: auto;
    padding: 0.32rem;
    gap: 0.3rem;
    background: linear-gradient(180deg, #f5f8fe 0%, #edf3ff 100%);
    border-color: #d9e4f4;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.75);
}

#documentProfileTabs.profile-subtabs .nav-item {
    flex: 0 0 auto;
}

#documentProfileTabs.profile-subtabs .nav-link {
    min-width: 0;
    padding: 0.5rem 0.95rem;
    font-size: 0.92rem;
    font-weight: 600;
    color: #295ea8;
    border: 1px solid transparent;
    border-radius: 0.72rem;
}

#documentProfileTabs.profile-subtabs .nav-link:hover,
#documentProfileTabs.profile-subtabs .nav-link:focus {
    background: rgba(255, 255, 255, 0.92);
    color: #163b6d;
    border-color: rgba(159, 184, 222, 0.7);
}

#documentProfileTabs.profile-subtabs .nav-link.active,
#documentProfileTabs.profile-subtabs .show > .nav-link {
    background: linear-gradient(135deg, #1d4f9b 0%, #0b2f63 100%);
    color: #ffffff !important;
    border-color: #204b8c;
    box-shadow: 0 8px 18px rgba(11, 47, 99, 0.22);
}

/* Estilos para o sistema de abas da pÃ¡gina de perfil */
.nav-tabs {
    border-bottom: 2px solid #dee2e6; margin-bottom: 1.5rem;
}
.nav-tabs .nav-item { flex-grow: 1; text-align: center; }
.nav-tabs .nav-link {
    width: 100%; border: none; border-bottom: 2px solid transparent;
    color: #6c757d; padding: 0.75rem 0.5rem; font-size: 0.9rem;
}
.nav-tabs .nav-link.active {
    color: #0d6efd; background-color: transparent;
    border-bottom: 2px solid #0d6efd; font-weight: 600;
}

/* --- Estilos da PÃ¡gina Associar Interno --- */
.hidden {
    display: none !important;
}
.form-control[readonly] {
    background-color: #e9ecef;
    opacity: 1;
}

/* --- Estilos do Dashboard de UsuÃ¡rio --- */
.button-card { 
    background-color: #fff; border: 1px solid #e9ecef; border-radius: 0.75rem; 
    padding: 15px 10px; text-align: center; transition: all 0.2s ease-in-out; 
    display: flex; flex-direction: column; justify-content: center; 
    align-items: center; height: 100%; position: relative;
}
.button-card:hover { 
    transform: translateY(-5px); box-shadow: 0 8px 25px rgba(0,0,0,0.08); 
}
.button-card .bi { 
    font-size: 2rem; color: #0d6efd; margin-bottom: 8px;
}
.button-card h5 { 
    margin-bottom: 5px; color: #343a40; font-weight: 600; font-size: 1rem;
}
.button-card small { 
    color: #6c757d; font-size: 0.8rem;
}
.logout-btn {
    padding: 6px 16px; font-size: 14px; border-radius: 20px;
    background-color: transparent; color: #dc3545; border: 1px solid #dc3545;
    vertical-align: middle; transition: all 0.2s ease-in-out;
}
.logout-btn:hover { 
    background-color: #dc3545; color: white; transform: scale(1.05);
}

/* --- Estilos da PÃ¡gina Meus Agendamentos --- */
.list-group-item .btn {
    padding: .25rem .5rem; font-size: .875rem;
}
.list-group-item {
    padding-top: 1rem; padding-bottom: 1rem;
}

.escolar-busca-resultados {
    max-height: 240px;
    overflow-y: auto;
}

.escolar-col-interno {
    width: 24rem;
}

th.escolar-col-infopen {
    text-align: left;
    padding-left: 0.4rem !important;
}

td.escolar-col-infopen {
    width: 8.75rem;
    min-width: 8.75rem;
    text-align: left;
    padding-left: 0.4rem !important;
    padding-right: 0.4rem !important;
}

.escolar-col-turma {
    min-width: 25rem;
    padding-left: 1.1rem !important;
}

.escolar-infopen-cell {
    display: inline-flex;
    align-items: center;
    justify-content: flex-start;
    white-space: nowrap;
    margin: 0;
}

.escolar-copy-inline {
    border: 0;
    background: transparent;
    color: inherit;
    padding: 0;
    margin: 0;
    line-height: inherit;
    text-decoration: none;
    cursor: pointer;
    transition: color 0.15s ease, text-decoration-color 0.15s ease;
}

.escolar-copy-inline:hover,
.escolar-copy-inline:focus-visible {
    color: #0d6efd;
    text-decoration: underline;
    outline: none;
}

.escolar-copy-inline.escolar-copy-working {
    color: #0d6efd;
}

.escolar-copy-inline.escolar-copy-success {
    color: #198754;
}

.escolar-copy-inline.escolar-copy-error {
    color: #dc3545;
}

.escolar-professores-table {
    table-layout: fixed;
    min-width: 72rem;
}

.escolar-prof-filtros-form {
    width: min(100%, 46rem);
}

.escolar-prof-filtros-inputs {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    align-items: center;
    justify-content: flex-start;
}

.escolar-prof-filtros-inputs .form-control {
    flex: 1 1 26rem;
    min-width: 20rem;
}

.escolar-prof-tabs .nav-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
}

.escolar-prof-header-actions {
    justify-content: flex-end;
}

.escolar-prof-resumo .h5 {
    color: var(--admin-primary);
}

.escolar-professores-table th,
.escolar-professores-table td {
    padding-top: 0.75rem;
    padding-bottom: 0.75rem;
    vertical-align: top;
}

.escolar-professores-table th {
    white-space: nowrap;
}

.escolar-prof-col-professor {
    width: 26%;
}

.escolar-prof-col-area {
    width: 12%;
}

.escolar-prof-col-contato {
    width: 14%;
}

.escolar-prof-col-conta {
    width: 20%;
}

.escolar-prof-col-turmas {
    width: 20%;
}

.escolar-prof-col-obs {
    width: 5rem;
}

.escolar-prof-col-acoes {
    width: 7.5rem;
}

.escolar-prof-col-contato,
.escolar-prof-col-conta,
.escolar-prof-col-turmas,
.escolar-prof-col-obs {
    padding-left: 1rem !important;
}

.escolar-prof-col-obs,
.escolar-prof-col-acoes {
    white-space: nowrap;
}

.escolar-prof-cell-action {
    display: flex;
    align-items: flex-start;
    min-height: 2rem;
}

.escolar-prof-cell-action-center {
    justify-content: center;
}

.escolar-prof-cell-action-end {
    justify-content: flex-end;
}

.escolar-prof-cell-text {
    word-break: break-word;
    overflow-wrap: anywhere;
}

.escolar-prof-turma-badge {
    white-space: normal;
    text-align: left;
    line-height: 1.25;
}

.escolar-prof-obs-btn {
    width: 2rem;
    height: 2rem;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.escolar-prof-edit-btn {
    min-width: 4.5rem;
}

.escolar-prof-obs-texto {
    white-space: pre-wrap;
    word-break: break-word;
}

@media (max-width: 1399.98px) {
    .escolar-prof-col-professor {
        width: 24%;
    }

    .escolar-prof-col-area {
        width: 12%;
    }

    .escolar-prof-col-contato {
        width: 14%;
    }

    .escolar-prof-col-conta {
        width: 20%;
    }

    .escolar-prof-col-turmas {
        width: 22%;
    }

    .escolar-prof-col-obs {
        width: 5rem;
    }

    .escolar-prof-col-acoes {
        width: 7.5rem;
    }
}

@media (max-width: 767.98px) {
    .escolar-professores-table {
        min-width: 66rem;
    }

    .escolar-prof-filtros-form {
        width: 100%;
    }

    .escolar-prof-filtros-inputs {
        justify-content: stretch;
    }

    .escolar-prof-filtros-inputs .form-control,
    .escolar-prof-filtros-inputs .btn {
        width: 100%;
        flex: 1 1 100%;
    }
}

.escolar-dashboard-filters .form-label {
    white-space: nowrap;
}

.escolar-dashboard-filters {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    margin-left: 0;
    margin-right: 0;
}

.escolar-dashboard-filters > .escolar-filter-field {
    padding-left: 0;
    padding-right: 0;
    max-width: none;
    min-width: 0;
}

.escolar-filter-field-search {
    flex: 2.4 1 18rem;
}

.escolar-filter-field-pavilhao {
    flex: 1 1 8rem;
}

.escolar-filter-field-turma {
    flex: 1.45 1 13rem;
}

.escolar-filter-field-status {
    flex: 1 1 10rem;
}

.escolar-filter-actions-col {
    flex: 0 1 auto;
    min-width: 0;
    margin-left: auto;
}

.escolar-filter-actions {
    justify-content: flex-end;
    flex-wrap: nowrap;
}

.escolar-filter-btn {
    white-space: nowrap;
}

@media (max-width: 1399.98px) {
    .escolar-filter-actions-col {
        flex: 0 0 100%;
        max-width: 100%;
        margin-left: 0;
    }

    .escolar-filter-actions {
        width: 100%;
        justify-content: stretch;
    }

    .escolar-filter-actions .escolar-filter-btn {
        flex: 1 1 0;
        text-align: center;
    }
}

@media (max-width: 720px) {
    .escolar-filter-field-search,
    .escolar-filter-field-pavilhao,
    .escolar-filter-field-turma,
    .escolar-filter-field-status {
        flex: 1 1 100%;
    }
}

@media (max-width: 575.98px) {
    .admin-body.is-diretor-escolar .topbar-title-centered {
        font-size: 0.82rem;
    }

    .escolar-dashboard-filters {
        row-gap: 0.55rem;
    }

    .escolar-filter-actions {
        flex-wrap: wrap;
    }

    .escolar-filter-actions .escolar-filter-btn {
        width: 100%;
        flex-basis: 100%;
    }
}

/* --- Estilos para o FullCalendar --- */
#calendar { 
    max-width: 800px; margin: 1rem auto 0;
}
.fc .fc-scrollgrid { border: none; }
.fc-theme-standard th, .fc-theme-standard td { border: none; }
.fc .fc-toolbar.fc-header-toolbar {
    margin-bottom: 1.5rem; display: flex; justify-content: center;
}
.fc .fc-toolbar-title {
    font-size: 1.6rem; font-weight: 600; color: #111827;
}
.fc .fc-button { display: none !important; }
.fc .fc-col-header-cell-cushion {
    text-transform: uppercase; font-weight: 500; color: #6b7280;
    text-decoration: none; font-size: 0.9rem;
}
.fc .fc-col-header {
    border-bottom: 1px solid #e5e7eb; padding-bottom: 0.5rem;
}
.fc-daygrid-body tr { border-bottom: 1px solid #e5e7eb; }
.fc-daygrid-body tr:last-child { border-bottom: none; }
.fc .fc-daygrid-day-frame {
    display: flex; justify-content: center; align-items: center; height: 100%;
}
.fc .fc-daygrid-day { height: 32px; }
.fc .fc-daygrid-day-number {
    text-decoration: none; color: #374151; width: 26px; height: 26px;
    line-height: 26px; font-size: 0.8rem; text-align: center; border-radius: 50%;
}
.fc .fc-day-today .fc-daygrid-day-number {
    background-color: #ef4444; color: white;
}
.fc-daygrid-day.disponivel .fc-daygrid-day-number {
    color: #22c55e; font-weight: 600;
}
.fc-daygrid-day.disponivel {
    cursor: pointer; background-color: transparent !important;
}
 .fc-daygrid-day.disponivel:hover .fc-daygrid-day-number {
    background-color: #f0f0f0;
}
.fc-daygrid-day.selected-date .fc-daygrid-day-number {
    background-color: #0d6efd !important; color: white !important; font-weight: 600 !important;
}

/* --- Estilos da PÃ¡gina Solicitar Agendamento --- */
.info-block {
    background-color: #e9f7fe; border-left: 5px solid #0d6efd; border-radius: .5rem;
    padding: 1.5rem; margin-bottom: 2rem; line-height: 1.6;
}
.info-block h4 {
    color: #0a58ca; margin-bottom: 1rem; font-weight: 600;
}
.info-block ol { padding-left: 1.5rem; margin-bottom: 0.5rem; }
.info-block li { margin-bottom: 0.5rem; }
.form-section { 
    border-top: 1px solid #dee2e6; padding-top: 1.5rem; margin-top: 1.5rem; 
}
.form-section h4 { 
    font-size: 1.5rem; margin-bottom: 1.5rem; font-weight: 600; 
}
.form-label { font-weight: 600; }

/* --- Estilos da PÃ¡gina de VerificaÃ§Ã£o de SessÃ£o --- */
.loader-container {
    display: flex; justify-content: center; align-items: center;
    height: 100vh; width: 100vw; flex-direction: column;
}

/* --- Bloco Unificado de Estilos Responsivos (Mobile) --- */
@media (max-width: 767.98px) {
    /* Abas do Perfil */
    .nav-tabs { display: flex; }
    .tab-pane:not(.active) { display: none !important; }
    #profile-content hr.desktop-only { display: none; }
    
    /* Ajustes Gerais em Telas Pequenas */
    .section-title { display: none; } /* Esconde tÃ­tulos de seÃ§Ã£o genÃ©ricos */
    /* ExceÃ§Ãµes onde precisamos exibir conteÃºdo em mobile */
    #visitado-info-display .section-title { display: block; }
    .card.p-4 { padding: 1rem !important; }
    .card-title { font-size: 1.5rem; }
    .form-control-lg { font-size: 1rem; padding: 0.5rem 1rem; height: auto; }
    .btn-lg { font-size: 1rem; padding: 0.75rem 1.25rem; }
    
    /* Dashboard */
    .card-body .border-bottom.mb-4 { margin-bottom: 1rem !important; }
    .row.g-3 { --bs-gutter-y: 0.75rem; }
    .section-title.dashboard-title {
        display: block; /* Garante que o tÃ­tulo especÃ­fico do dashboard apareÃ§a */
        text-align: center; margin-top: 1.25rem !important; margin-bottom: 0.75rem !important;
    }
    #next-appointment-summary { padding: 0.6rem; font-size: 0.85rem; }
    #next-appointment-summary hr { margin-top: 0.4rem !important; margin-bottom: 0.4rem !important; }

    /* PÃ¡gina de SolicitaÃ§Ã£o */
    .info-block {
        padding: 1rem; margin-bottom: 1rem; line-height: 1.4; font-size: 0.9rem;
    }
    .info-block h4 { font-size: 1.1rem; margin-bottom: 0.75rem; }
    .info-block ol { padding-left: 1.2rem; }
    .form-section { margin-top: 1rem; padding-top: 1rem; }
    .form-section h4 { font-size: 1.2rem; margin-bottom: 1rem; }

    #myProfileTabs .nav-link {
        font-size: 0.84rem;
        padding: 0.4rem 0.3rem;
    }

    #myProfileTabsContent {
        margin-top: 1rem;
    }

    #documentProfileTabs.profile-subtabs {
        width: 100%;
        justify-content: center;
        padding: 0.28rem;
    }

    #documentProfileTabs.profile-subtabs .nav-item {
        flex: 1 1 0;
        min-width: 0;
    }

    #documentProfileTabs.profile-subtabs .nav-link {
        width: 100%;
        justify-content: center;
        text-align: center;
        white-space: normal;
        font-size: 0.84rem;
        line-height: 1.2;
        padding: 0.45rem 0.5rem;
    }
}

/* --- Estilos da PÃ¡gina Detalhes do Visitante (Admin) --- */
.alert-container-fixed {
    position: fixed;
    top: 4rem;
    right: 1rem;
    z-index: 1050;
    width: 350px;
}

/* Alertas flutuantes padrao para telas do usuario */
.alert-container-user-floating {
    position: fixed;
    top: 1rem;
    right: 1rem;
    z-index: 1080;
    width: min(360px, calc(100vw - 2rem));
    pointer-events: none;
}

.alert-container-user-floating .alert {
    margin: 0 0 0.75rem 0;
    pointer-events: auto;
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.18);
}

/* Padrao global para containers internos de alerta: agora flutuantes */
#alert-container {
    position: fixed;
    top: 1rem;
    right: 1rem;
    z-index: 1085;
    width: min(420px, calc(100vw - 1rem));
    pointer-events: none;
}

#alert-container .alert {
    margin: 0 0 0.75rem 0;
    pointer-events: auto;
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.18);
}

/* Alertas da tela de login no mesmo padrao flutuante */
#login-alert-container {
    position: fixed;
    top: 1rem;
    right: 1rem;
    z-index: 1085;
    width: min(420px, calc(100vw - 1rem));
    pointer-events: none;
}

#login-alert-container .alert {
    margin: 0 0 0.75rem 0;
    pointer-events: auto;
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.18);
}

body.admin-body #alert-container {
    top: calc(var(--app-topbar-height) + 8px);
    width: min(460px, calc(100vw - 1rem));
}

@media (max-width: 768px) {
    #alert-container {
        right: 0.5rem;
        left: 0.5rem;
        width: auto;
    }

    #login-alert-container {
        right: 0.5rem;
        left: 0.5rem;
        width: auto;
    }
}

@media print {
    #alert-container,
    #login-alert-container,
    .alert-container-fixed,
    .alert-container-user-floating,
    .admin-flash-container {
        display: none !important;
    }
}

/* --- Estilos da PÃ¡gina de GestÃ£o (Admin) --- */
.table-col-shrink {
    width: 1%;
    white-space: nowrap;
}

/* Evita que o container fixo de flashes bloqueie cliques no conteudo atras dele. */
.admin-flash-container {
    pointer-events: none;
}

.admin-flash-container .alert {
    pointer-events: auto;
}



