body {
    min-height: 100vh;
    overflow-x: hidden;
    font-family: "Segoe UI", sans-serif;
}

/* Sidebar */
.sidebar {
    height: 100vh;
    width: 250px;
    position: fixed;
    top: 0;
    left: 0;
    background-color: #0d6efd;
    color: white;
    transition: width 0.3s;
    padding-top: 60px;
}
.sidebar.collapsed {
    width: 80px;
}
.sidebar .nav-link {
    color: white;
    padding: 12px 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}
.sidebar .nav-link i {
    width: 20px;
    text-align: center;
}
.sidebar.collapsed .nav-link span {
    display: none;
}
.sidebar .nav-link:hover {
    background-color: rgba(255,255,255,0.2);
}
.sidebar .toggle-btn {
    position: absolute;
    top: 10px;
    right: -20px;
    background-color: #0d6efd;
    border-radius: 50%;
    width: 35px;
    height: 35px;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    color: white;
    font-size: 18px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.3);
    transition: all 0.3s;
}

/* Content */
.content {
    margin-left: 250px;
    transition: margin-left 0.3s;
    padding: 20px;
}

.content.auth-content {
    margin-left: 0;
}

.navbar-custom {
    background-color: #f8f9fa;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}
/* Authentication premium layout */
.auth-content {
    margin-left: 0;
    padding: 0;
    min-height: 100vh;
    background: #f4f7fb;
}

.auth-shell {
    min-height: 100vh;
    display: grid;
    grid-template-columns: minmax(360px, 1.05fr) minmax(440px, 0.95fr);
}

.auth-visual {
    position: relative;
    min-height: 100vh;
    overflow: hidden;
    padding: 42px 56px 34px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    color: #fff;
    background:
        radial-gradient(circle at 80% 20%, rgba(79, 141, 255, 0.35), transparent 35%),
        linear-gradient(145deg, #102b55 0%, #0b5fbc 55%, #1677e6 100%);
}

.auth-visual::before,
.auth-visual::after {
    content: "";
    position: absolute;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 50%;
}

.auth-visual::before {
    width: 520px;
    height: 520px;
    right: -260px;
    top: -210px;
}

.auth-visual::after {
    width: 340px;
    height: 340px;
    left: -190px;
    bottom: -170px;
}

.auth-visual__glow {
    position: absolute;
    width: 280px;
    height: 280px;
    right: 5%;
    bottom: 12%;
    border-radius: 50%;
    background: rgba(95, 193, 255, 0.18);
    filter: blur(20px);
}

.auth-brand {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 1.35rem;
    font-weight: 700;
    letter-spacing: -0.02em;
}

.auth-brand__mark {
    width: 42px;
    height: 42px;
    display: grid;
    place-items: center;
    border-radius: 14px;
    color: #0b5fbc;
    background: #fff;
    box-shadow: 0 12px 30px rgba(4, 28, 75, 0.25);
}

.auth-visual__content {
    position: relative;
    z-index: 1;
    max-width: 620px;
    margin: 60px 0;
}

.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.1);
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.auth-visual h1 {
    margin: 22px 0 18px;
    font-size: clamp(2.4rem, 4.5vw, 4.3rem);
    line-height: 1.04;
    letter-spacing: -0.055em;
    font-weight: 750;
}

.auth-visual h1 span {
    color: #a9d8ff;
}

.auth-visual__content > p {
    max-width: 570px;
    margin: 0;
    color: rgba(255, 255, 255, 0.78);
    font-size: 1.05rem;
    line-height: 1.75;
}

.auth-feature-list {
    display: grid;
    gap: 13px;
    margin-top: 34px;
}

.auth-feature-list div {
    display: flex;
    align-items: center;
    gap: 11px;
    font-size: 0.94rem;
    color: rgba(255, 255, 255, 0.9);
}

.auth-feature-list i {
    color: #92dcff;
}

.auth-visual__footer {
    position: relative;
    z-index: 1;
    display: flex;
    justify-content: space-between;
    gap: 20px;
    color: rgba(255, 255, 255, 0.62);
    font-size: 0.78rem;
}

.auth-panel {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 48px;
    background:
        radial-gradient(circle at 100% 0, rgba(17, 101, 224, 0.08), transparent 35%),
        #f7f9fc;
}

.auth-form-card {
    width: min(100%, 520px);
    padding: 44px;
    border: 1px solid rgba(15, 87, 176, 0.1);
    border-radius: 26px;
    background: rgba(255, 255, 255, 0.95);
    box-shadow: 0 30px 80px rgba(28, 72, 126, 0.13);
    animation: authReveal 0.55s ease-out both;
}

@keyframes authReveal {
    from { opacity: 0; transform: translateY(12px); }
    to { opacity: 1; transform: translateY(0); }
}

.auth-form-card__heading {
    display: flex;
    align-items: flex-start;
    gap: 18px;
    margin-bottom: 34px;
}

.auth-form-card__icon {
    width: 50px;
    height: 50px;
    flex: 0 0 50px;
    display: grid;
    place-items: center;
    border-radius: 16px;
    color: #fff;
    background: linear-gradient(135deg, #176edb, #3c9bf2);
    box-shadow: 0 12px 28px rgba(20, 113, 219, 0.25);
}

.auth-kicker {
    margin: 0 0 5px;
    color: #0b6fd7;
    font-size: 0.76rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.auth-form-card h2 {
    margin: 0;
    color: #102b55;
    font-size: 1.9rem;
    font-weight: 750;
    letter-spacing: -0.035em;
}

.auth-form-card__heading p:last-child {
    margin: 7px 0 0;
    color: #718099;
    font-size: 0.9rem;
}

.auth-form {
    display: grid;
    gap: 21px;
}

.form-alert {
    padding: 12px 14px;
    border: 1px solid #f3c7c7;
    border-radius: 12px;
    color: #a43b3b;
    background: #fff4f4;
    font-size: 0.88rem;
}

.form-field {
    display: grid;
    gap: 8px;
}

.form-field label,
.label-row label {
    color: #273b58;
    font-size: 0.84rem;
    font-weight: 650;
}

.label-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.label-row a {
    color: #0b6fd7;
    font-size: 0.78rem;
    font-weight: 600;
    text-decoration: none;
}

.input-shell {
    position: relative;
    display: flex;
    align-items: center;
    min-height: 52px;
    border: 1px solid #d8e1ed;
    border-radius: 13px;
    background: #fff;
    transition: border-color 0.2s, box-shadow 0.2s, transform 0.2s;
}

.input-shell:focus-within {
    border-color: #2b86e4;
    box-shadow: 0 0 0 4px rgba(43, 134, 228, 0.11);
}

.input-shell > i {
    margin-left: 16px;
    color: #7590b0;
}

.input-shell input {
    width: 100%;
    min-width: 0;
    height: 50px;
    padding: 0 13px;
    border: 0;
    outline: 0;
    color: #17283d;
    background: transparent;
}

.input-shell input::placeholder {
    color: #a3afbf;
}

.password-toggle {
    width: 44px;
    height: 44px;
    margin-right: 4px;
    border: 0;
    color: #718099;
    background: transparent;
}

.field-error {
    color: #c13c3c;
    font-size: 0.78rem;
}

.remember-me {
    display: flex;
    align-items: center;
    gap: 9px;
    color: #62738b;
    font-size: 0.82rem;
    cursor: pointer;
}

.remember-me input {
    accent-color: #0b6fd7;
}

.auth-submit {
    min-height: 54px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    border: 0;
    border-radius: 14px;
    color: #fff;
    background: linear-gradient(135deg, #0b64c6, #217ee3);
    box-shadow: 0 14px 30px rgba(14, 105, 207, 0.24);
    font-weight: 700;
    transition: transform 0.2s, box-shadow 0.2s;
}

.auth-submit:hover {
    transform: translateY(-2px);
    box-shadow: 0 18px 34px rgba(14, 105, 207, 0.3);
}

.auth-form-card__footer {
    display: flex;
    justify-content: center;
    gap: 7px;
    margin-top: 28px;
    padding-top: 25px;
    border-top: 1px solid #e7edf5;
    color: #718099;
    font-size: 0.84rem;
}

.auth-form-card__footer a {
    color: #0b6fd7;
    font-weight: 650;
    text-decoration: none;
}

@media (max-width: 900px) {
    .auth-shell {
        grid-template-columns: 1fr;
    }

    .auth-visual {
        min-height: 330px;
        padding: 30px;
    }

    .auth-visual__content {
        margin: 50px 0 30px;
    }

    .auth-visual h1 {
        font-size: 2.6rem;
    }

    .auth-feature-list {
        display: none;
    }

    .auth-panel {
        padding: 30px;
    }
}

@media (max-width: 520px) {
    .auth-visual {
        min-height: 270px;
    }

    .auth-visual h1 {
        font-size: 2.15rem;
    }

    .auth-visual__footer {
        display: none;
    }

    .auth-panel {
        padding: 18px;
    }

    .auth-form-card {
        padding: 28px 22px;
        border-radius: 20px;
    }

    .auth-form-card__heading {
        margin-bottom: 26px;
    }

    .auth-form-card h2 {
        font-size: 1.65rem;
    }
}
/* Submenu para Bootstrap 5 */
/* submenu fica colado ao item pai */
.dropdown-submenu {
  position: relative;
}

.dropdown-submenu > .dropdown-menu {
  position: absolute;
  top: 0;
  left: 100%;
  margin-top: -1px; /* cola no item pai sem gap */
  display: none;
  min-width: 200px;
  z-index: 2000;
}

/* quando show, exibir */
.dropdown-submenu.show > .dropdown-menu {
  display: block;
}

/* =========================================================
   Sistema Escolar — tema global do aplicativo
   ========================================================= */

:root {
    --app-primary: #1769d9;
    --app-primary-dark: #0c4da8;
    --app-primary-soft: #eaf3ff;
    --app-indigo: #5b5ce6;
    --app-surface: #ffffff;
    --app-background: #f4f7fb;
    --app-text: #17233a;
    --app-muted: #6f7f96;
    --app-border: #e2e9f3;
    --app-shadow: 0 12px 35px rgba(22, 54, 98, 0.09);
}

.app-body {
    min-height: 100vh;
    color: var(--app-text);
    background:
        radial-gradient(circle at 85% 0%, rgba(91, 92, 230, 0.055), transparent 28%),
        var(--app-background);
    font-family: "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

.app-body::before {
    content: "";
    position: fixed;
    inset: 0;
    z-index: -1;
    pointer-events: none;
    background-image: linear-gradient(rgba(23, 105, 217, 0.018) 1px, transparent 1px),
        linear-gradient(90deg, rgba(23, 105, 217, 0.018) 1px, transparent 1px);
    background-size: 44px 44px;
}

.app-sidebar {
    position: fixed;
    inset: 0 auto 0 0;
    z-index: 2000 !important;
    width: 260px;
    padding: 24px 16px 18px;
    overflow: hidden;
    color: #fff;
    background:
        radial-gradient(circle at 20% 0%, rgba(91, 180, 255, 0.3), transparent 30%),
        linear-gradient(180deg, #0e4f9d 0%, #1167c7 55%, #0b59ae 100%);
    box-shadow: 12px 0 40px rgba(14, 70, 134, 0.16);
    transform: translateX(-105%);
    transition: width 0.3s ease, transform 0.3s ease;
}

.app-sidebar.sidebar-open {
    transform: translateX(0);
}

.app-sidebar .sidebar-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    min-height: 48px;
    padding: 0 9px 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.13);
}

.sidebar-brand__mark,
.app-topbar__mark {
    display: grid;
    place-items: center;
    width: 40px;
    height: 40px;
    flex: 0 0 40px;
    border-radius: 13px;
    color: var(--app-primary-dark);
    background: #fff;
    box-shadow: 0 9px 22px rgba(4, 42, 103, 0.22);
}

.sidebar-brand__text {
    font-size: 1rem;
    font-weight: 750;
    letter-spacing: -0.02em;
    white-space: nowrap;
}

.app-sidebar .sidebar-nav {
    display: grid;
    gap: 7px;
    margin-top: 22px;
}

.app-sidebar .nav-link {
    position: relative;
    min-height: 46px;
    padding: 11px 14px;
    border-radius: 13px;
    color: rgba(255, 255, 255, 0.82);
    font-size: 0.92rem;
    font-weight: 600;
    transition: color 0.2s, background 0.2s, transform 0.2s;
}

.app-sidebar .nav-link::before {
    content: "";
    position: absolute;
    left: -16px;
    width: 4px;
    height: 24px;
    border-radius: 0 5px 5px 0;
    background: #fff;
    opacity: 0;
    transform: scaleY(0.4);
    transition: opacity 0.2s, transform 0.2s;
}

.app-sidebar .nav-link:hover,
.app-sidebar .nav-link:focus {
    color: #fff;
    background: rgba(255, 255, 255, 0.13);
    transform: translateX(2px);
}

.app-sidebar .nav-link:hover::before,
.app-sidebar .nav-link:focus::before {
    opacity: 1;
    transform: scaleY(1);
}

.app-sidebar .sidebar-footer {
    position: absolute;
    left: 16px;
    right: 16px;
    bottom: 18px;
    display: flex;
    align-items: center;
    gap: 9px;
    padding: 12px 13px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 13px;
    color: rgba(255, 255, 255, 0.66);
    background: rgba(255, 255, 255, 0.08);
    font-size: 0.76rem;
    font-weight: 600;
}

.app-sidebar .sidebar-divider {
    height: 1px;
    margin: 13px 8px;
    border-color: rgba(255, 255, 255, 0.12);
}

.app-sidebar .toggle-btn {
    position: absolute;
    top: 25px;
    right: 14px;
    z-index: 1100;
    width: 36px;
    height: 36px;
    display: grid;
    place-items: center;
    border: 1px solid rgba(255, 255, 255, 0.22);
    border-radius: 11px;
    color: #fff;
    background: rgba(255, 255, 255, 0.12);
    box-shadow: 0 6px 15px rgba(17, 78, 150, 0.3);
    cursor: pointer;
}

.sidebar-overlay {
    position: fixed;
    inset: 0;
    z-index: 1900;
    background: rgba(8, 24, 48, 0.48);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s ease;
}

.sidebar-overlay--visible {
    opacity: 1;
    pointer-events: auto;
}

.app-topbar {
    position: sticky;
    top: 0;
    z-index: 1020;
    min-height: 74px;
    padding: 10px 24px;
    border: 1px solid rgba(224, 231, 241, 0.85);
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.92);
    box-shadow: 0 8px 28px rgba(24, 58, 102, 0.08);
    backdrop-filter: blur(16px);
}

.app-topbar .navbar-nav .nav-link {
    min-height: 40px;
    padding: 8px 12px;
    border-radius: 11px;
    color: #53657d;
    font-size: 0.86rem;
    font-weight: 600;
}

.app-topbar .navbar-nav .nav-link:hover,
.app-topbar .navbar-nav .nav-link:focus {
    color: var(--app-primary);
    background: var(--app-primary-soft);
}

.app-topbar__brand {
    display: flex;
    align-items: center;
    gap: 9px;
    color: #18345c;
    font-weight: 750;
}

.app-topbar__brand .app-topbar__mark {
    width: 34px;
    height: 34px;
    flex-basis: 34px;
    border-radius: 10px;
    font-size: 0.78rem;
}

.app-mobile-toggle {
    width: 42px;
    height: 42px;
    border: 0;
    border-radius: 12px;
    color: #fff;
    background: linear-gradient(135deg, var(--app-primary), var(--app-indigo));
    box-shadow: 0 8px 20px rgba(23, 105, 217, 0.22);
}

.content {
    position: relative;
    z-index: 0;
    width: 100%;
    margin-left: 0;
    padding: 22px;
    transition: margin-left 0.3s ease;
}

.content.auth-content {
    margin-left: 0;
    padding: 0;
}

.content > .container,
.content > .container-fluid {
    width: 100%;
    max-width: none;
}

.content > .container,
.content > .container-fluid {
    animation: appPageReveal 0.38s ease-out both;
}

@keyframes appPageReveal {
    from { opacity: 0; transform: translateY(7px); }
    to { opacity: 1; transform: translateY(0); }
}

.app-page-heading {
    margin-bottom: 20px;
}

.app-page-heading h2,
.app-page-heading h3 {
    margin: 0;
    color: var(--app-text);
    font-weight: 760;
    letter-spacing: -0.025em;
}

.app-page-heading p {
    margin: 7px 0 0;
    color: var(--app-muted);
    font-size: 0.9rem;
}

.app-page-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.content > .container > .d-flex.justify-content-between.align-items-center {
    margin-bottom: 18px;
    padding: 17px 20px;
    border: 1px solid rgba(221, 230, 241, 0.9);
    border-radius: 18px;
    background: linear-gradient(135deg, #ffffff 0%, #f8fbff 100%);
    box-shadow: 0 10px 28px rgba(22, 54, 98, 0.075);
}

.content > .container > .d-flex.justify-content-between.align-items-center > h2,
.content > .container > .d-flex.justify-content-between.align-items-center > h3 {
    margin: 0;
    color: #24364f;
    font-weight: 750;
    letter-spacing: -0.02em;
}

.content > .container > .d-flex.justify-content-between.align-items-center > h2 i,
.content > .container > .d-flex.justify-content-between.align-items-center > h3 i {
    color: var(--app-primary);
}

.content > .container > .d-flex.justify-content-between.align-items-center .btn {
    min-height: 40px;
    border-radius: 11px;
    font-size: 0.84rem;
    font-weight: 700;
}

.card {
    border: 1px solid var(--app-border);
    border-radius: 18px;
    background: var(--app-surface);
    box-shadow: 0 10px 28px rgba(22, 54, 98, 0.075);
}

.card .card-header,
.card .card-footer {
    border-color: var(--app-border);
}

.card .card-header {
    padding: 17px 20px;
    color: #24364f;
    background: #fff;
    border-bottom: 1px solid var(--app-border);
    font-weight: 700;
}

.card .card-body {
    padding: 20px;
}

.card .card-header.bg-primary,
.card .card-header.bg-info,
.card .card-header.bg-dark {
    color: #fff;
    border: 0;
    background: linear-gradient(135deg, #1769d9, #4d79e6);
    box-shadow: 0 9px 22px rgba(23, 105, 217, 0.13);
}

.card .card-header.bg-danger {
    background: linear-gradient(135deg, #d94b5a, #ef6f7c);
}

.app-table-card {
    overflow: hidden;
    border: 1px solid var(--app-border);
    border-radius: 18px;
    background: #fff;
    box-shadow: var(--app-shadow);
}

.app-table-card .table {
    margin: 0;
    color: #34465f;
    font-size: 0.88rem;
}

.app-table-card .table > :not(caption) > * > * {
    padding: 14px 16px;
}

.app-table-card .table thead th {
    padding: 14px 16px;
    border-bottom: 1px solid #dce5ef;
    color: #52657c;
    background: #f8fafc;
    font-size: 0.76rem;
    font-weight: 750;
    letter-spacing: 0.02em;
    text-transform: uppercase;
}

.app-table-card .table tbody tr {
    transition: background 0.18s;
}

.app-table-card .table tbody tr:hover {
    background: #f7faff;
}

.app-table-card .table .table-action {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    margin: 0 3px;
    border-radius: 10px;
    color: #fff;
    text-decoration: none;
    transition: transform 0.18s, box-shadow 0.18s;
}

.app-table-card .table .table-action:hover {
    transform: translateY(-2px);
}

.app-form-control,
.form-control,
.form-select {
    min-height: 46px;
    border-color: #d8e2ed;
    border-radius: 12px;
    color: #263a52;
    background-color: #fff;
    box-shadow: none;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.app-form-control:focus,
.form-control:focus,
.form-select:focus {
    border-color: #2e83e3;
    box-shadow: 0 0 0 4px rgba(46, 131, 227, 0.11);
}

.app-form-group {
    margin-bottom: 18px;
}

.app-form-group label,
.app-form-group .form-label {
    margin-bottom: 8px;
    color: #33485f;
    font-size: 0.82rem;
    font-weight: 700;
}

.btn {
    min-height: 42px;
    padding: 9px 15px;
    border-radius: 11px;
    font-size: 0.86rem;
    font-weight: 650;
}

.btn-primary,
.btn-info,
.btn-success,
.btn-danger,
.btn-warning {
    border: 0;
    box-shadow: 0 8px 18px rgba(23, 105, 217, 0.15);
}

.btn-primary {
    background: linear-gradient(135deg, #1769d9, #3d84e5);
}

.btn-success {
    background: linear-gradient(135deg, #168b66, #28a97e);
}

.btn-danger {
    background: linear-gradient(135deg, #d94b5a, #e96e79);
}

.btn-info {
    background: linear-gradient(135deg, #2885c1, #4aa4d8);
}

.btn-warning {
    color: #3c3211;
    background: linear-gradient(135deg, #f4c95d, #f7d98b);
}

.btn-lg {
    min-height: 50px;
    padding-inline: 20px;
}

.app-alert {
    border: 1px solid #dbe7f3;
    border-radius: 14px;
    background: #f7faff;
}

.app-alert .alert-heading {
    color: #1f4b80;
    font-weight: 750;
}

.page-item .page-link {
    min-width: 38px;
    height: 38px;
    display: grid;
    place-items: center;
    border-color: #dce5ef;
    border-radius: 10px !important;
    color: #52657c;
}

.page-item.active .page-link {
    border-color: var(--app-primary);
    background: var(--app-primary);
}

.badge {
    padding: 6px 9px;
    border-radius: 999px;
    font-size: 0.72rem;
    font-weight: 700;
}

@media (max-width: 991.98px) {
    .content {
        margin-left: 0;
        padding: 16px;
    }
}

@media (max-width: 575.98px) {
    .app-topbar {
        min-height: 62px;
        padding: 8px 12px;
        border-radius: 14px;
    }

    .app-topbar .navbar-nav {
        align-items: stretch !important;
    }

    .app-topbar .navbar-nav .nav-link {
        padding: 9px 10px;
    }

    .content {
        padding: 12px;
    }

    .card .card-body,
    .app-table-card .table > :not(caption) > * > * {
        padding: 13px;
    }

    .app-table-card .table {
        min-width: 760px;
    }
}
