:root {
    --sidebar-width: 270px;
    --sidebar-collapsed-width: 80px;
    --topbar-height: 72px;

    --primary: #2865d5;
    --primary-dark: #183d85;
    --sidebar-bg: #101f38;
    --sidebar-hover: #1c3454;
    --sidebar-text: #b7c8df;

    --body-bg: #f1f5f9;
    --text-primary: #172b4d;
    --text-secondary: #64748b;
    --border-color: #e2e8f0;
    --card-radius: 16px;

    --transition: 0.25s ease;
}

/* Configuração geral */

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    background: var(--body-bg);
    color: var(--text-primary);
    font-family: 'Inter', sans-serif;
    font-size: 14px;
}

a {
    text-decoration: none;
}

button,
a {
    -webkit-tap-highlight-color: transparent;
}

/* Estrutura principal */

.app-wrapper {
    min-height: 100vh;
}

.app-main {
    margin-left: var(--sidebar-width);
    min-height: 100vh;
    transition: margin-left var(--transition);
}

.app-content {
    padding: 28px;
}

/* Menu lateral */

.sidebar {
    position: fixed;
    inset: 0 auto 0 0;
    width: var(--sidebar-width);
    background: var(--sidebar-bg);
    color: white;
    display: flex;
    flex-direction: column;
    z-index: 1040;
    transition: width var(--transition),
                transform var(--transition);
}

.sidebar-brand {
    min-height: 88px;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 20px;
    border-bottom: 1px solid rgba(255,255,255,.08);
}

.brand-icon {
    width: 42px;
    height: 42px;
    min-width: 42px;
    border-radius: 12px;
    display: grid;
    place-items: center;
    background: linear-gradient(135deg, #2865d5, #60a5fa);
    font-size: 22px;
    color: white;
}

.brand-name {
    font-size: 17px;
    font-weight: 800;
    letter-spacing: .5px;
    white-space: nowrap;
}

.brand-subtitle {
    color: #9fb4d0;
    font-size: 10px;
    letter-spacing: 2px;
}

.sidebar-navigation {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 18px 12px;
}

.sidebar-label {
    color: #8195b4;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 1.3px;
    padding: 14px 12px 10px;
    white-space: nowrap;
}

.sidebar-link {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    padding: 13px 14px;
    margin-bottom: 5px;
    color: var(--sidebar-text);
    background: transparent;
    border: none;
    border-radius: 10px;
    text-align: left;
    font-weight: 500;
    white-space: nowrap;
    transition: background var(--transition);
}

.sidebar-link i {
    font-size: 19px;
    min-width: 22px;
    text-align: center;
}

.sidebar-link:hover {
    background: var(--sidebar-hover);
    color: white;
}

.sidebar-link.active {
    background: linear-gradient(135deg, #2865d5, #347bf0);
    color: white;
    box-shadow: 0 5px 14px rgba(40,101,213,.25);
}

.sidebar-chevron {
    margin-left: auto;
    font-size: 12px !important;
    transition: transform var(--transition);
}

.sidebar-link[aria-expanded="true"] .sidebar-chevron {
    transform: rotate(180deg);
}

/* Submenus */

.sidebar-submenu {
    padding: 4px 0 8px 26px;
    margin-left: 22px;
    border-left: 1px solid #304662;
}

.sidebar-submenu a {
    display: block;
    color: var(--sidebar-text);
    padding: 10px 12px;
    font-size: 13px;
    border-radius: 8px;
}

.sidebar-submenu a:hover,
.sidebar-submenu a.active {
    color: white;
    background: var(--sidebar-hover);
}

.sidebar-footer {
    padding: 12px;
    border-top: 1px solid rgba(255,255,255,.08);
}

/* Barra superior */

.topbar {
    height: var(--topbar-height);
    background: white;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 28px;
    position: sticky;
    top: 0;
    z-index: 1030;
}

.topbar-toggle {
    border: none;
    background: #f1f5f9;
    border-radius: 10px;
    width: 42px;
    height: 42px;
    font-size: 21px;
    color: var(--text-primary);
}

.topbar-toggle:hover {
    background: #e2e8f0;
}

.topbar-user {
    display: flex;
    align-items: center;
    gap: 12px;
}

.user-avatar {
    width: 42px;
    height: 42px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: #e3edff;
    color: var(--primary);
    font-weight: 700;
}

.user-name {
    font-weight: 600;
}

.user-role {
    color: var(--text-secondary);
    font-size: 11px;
}

/* Menu recolhido */

body.sidebar-collapsed .sidebar {
    width: var(--sidebar-collapsed-width);
}

body.sidebar-collapsed .app-main {
    margin-left: var(--sidebar-collapsed-width);
}

body.sidebar-collapsed .brand-text,
body.sidebar-collapsed .sidebar-text,
body.sidebar-collapsed .sidebar-label,
body.sidebar-collapsed .sidebar-chevron,
body.sidebar-collapsed .sidebar-submenu {
    display: none;
}

body.sidebar-collapsed .sidebar-brand,
body.sidebar-collapsed .sidebar-link {
    justify-content: center;
}

body.sidebar-collapsed .sidebar-link {
    padding: 14px 8px;
}

/* Cartões */

.app-card {
    background: white;
    border: 1px solid var(--border-color);
    border-radius: var(--card-radius);
    box-shadow: 0 3px 10px rgba(15,23,42,.025);
}

.stat-card {
    padding: 22px;
    height: 100%;
    transition: transform var(--transition),
                box-shadow var(--transition);
}

.stat-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 24px rgba(15,23,42,.07);
}

.stat-icon {
    width: 48px;
    height: 48px;
    border-radius: 13px;
    display: grid;
    place-items: center;
    font-size: 23px;
    margin-bottom: 18px;
}

.stat-value {
    font-size: 30px;
    font-weight: 800;
    line-height: 1.2;
}

.stat-label {
    color: var(--text-secondary);
    margin-top: 6px;
}

.icon-blue {
    background: #e8f0ff;
    color: #2563eb;
}

.icon-purple {
    background: #f1e8ff;
    color: #7c3aed;
}

.icon-green {
    background: #e3f7ef;
    color: #059669;
}

.icon-orange {
    background: #fff3dd;
    color: #d97706;
}

/* Cartão de boas-vindas */

.welcome-banner {
    position: relative;
    overflow: hidden;
    border-radius: 16px;
    padding: 24px 28px;
    color: var(--text-primary);
    background: #ffffff;
    border: 1px solid var(--border-color);
    border-left: 4px solid var(--primary);
    box-shadow: 0 3px 10px rgba(15, 23, 42, .025);
}

.welcome-banner::before,
.welcome-banner::after {
    content: '';
    position: absolute;
    border-radius: 50%;
    pointer-events: none;
}

.welcome-banner::before {
    width: 250px;
    height: 250px;
    right: -65px;
    top: -95px;
    background: #f1f5fc;
}

.welcome-banner::after {
    width: 180px;
    height: 180px;
    right: -30px;
    top: -60px;
    background: #e8effa;
}

.banner-content {
    position: relative;
    z-index: 2;
}

.banner-decoration {
    position: absolute;
    right: 45px;
    bottom: 5px;
    font-size: 85px;
    color: #91afd8;
    opacity: .45;
    z-index: 1;
    pointer-events: none;
}

.banner-eyebrow {
    text-transform: uppercase;
    letter-spacing: 1.5px;
    font-size: 10px;
    font-weight: 700;
    color: var(--text-secondary);
}

.welcome-banner h1 {
    font-size: 24px;
    font-weight: 700;
    margin: 8px 0;
}

.welcome-banner p {
    color: var(--text-secondary);
    margin-bottom: 0;
}

.welcome-banner .small {
    color: var(--text-secondary);
}

/* Sobreposição para dispositivos móveis */

.sidebar-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(15,23,42,.55);
    z-index: 1035;
}

/* Responsividade */

@media (max-width: 991.98px) {

    .sidebar,
    body.sidebar-collapsed .sidebar {
        width: var(--sidebar-width);
        transform: translateX(-100%);
    }

    .app-main,
    body.sidebar-collapsed .app-main {
        margin-left: 0;
    }

    body.sidebar-mobile-open .sidebar {
        transform: translateX(0);
    }

    body.sidebar-mobile-open .sidebar-overlay {
        display: block;
    }

    .app-content {
        padding: 20px;
    }

    .topbar {
        padding: 0 20px;
    }
}

@media (max-width: 575.98px) {

    .app-content {
        padding: 15px;
    }

    .welcome-banner {
        padding: 24px;
    }

    .welcome-banner h1 {
        font-size: 23px;
    }

    .banner-decoration {
        font-size: 80px;
        right: 15px;
    }

    .stat-card {
        padding: 16px;
    }

    .user-role {
        display: none;
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        transition: none !important;
    }
}

/* Logotipo institucional */

.sidebar-brand {
    justify-content: center;
    min-height: 100px;
    padding: 20px;
}

.sidebar-logo {
    display: block;
    width: 190px;
    max-width: 100%;
    max-height: 70px;
    object-fit: contain;
    transition: width var(--transition);
}

body.sidebar-collapsed .sidebar-brand {
    padding: 12px;
}

body.sidebar-collapsed .sidebar-logo {
    width: 54px;
}

/* ========================================
   MODAIS PADRONIZADOS
======================================== */

.app-modal .modal-content {
    border: none;
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(15, 23, 42, .18);
    overflow: hidden;
}

.app-modal .modal-body {
    padding: 32px;
    text-align: center;
}

.app-modal .modal-footer {
    border: none;
    padding: 0 32px 28px;
    display: flex;
    justify-content: center;
    gap: 10px;
}

.app-modal-icon {
    width: 78px;
    height: 78px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    margin: 0 auto 22px;
    font-size: 36px;
}

.modal-icon-success {
    background: #e3f7ef;
    color: #059669;
}

.modal-icon-error {
    background: #fee2e2;
    color: #dc2626;
}

.modal-icon-warning {
    background: #fff3dd;
    color: #d97706;
}

.modal-icon-info {
    background: #e8f0ff;
    color: #2563eb;
}

.app-modal-title {
    font-size: 21px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 12px;
}

.app-modal-message {
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.7;
    margin-bottom: 0;
    overflow-wrap: anywhere;
    white-space: pre-line;
}

.app-modal .btn {
    border-radius: 10px;
    padding: 11px 24px;
    font-weight: 600;
    font-size: 14px;
    min-width: 120px;
}

.app-modal .btn-primary {
    background: var(--primary);
    border-color: var(--primary);
}

.app-modal .btn-light {
    background: #f1f5f9;
    border-color: #e2e8f0;
    color: #475569;
}

.app-modal .btn-light:hover {
    background: #e2e8f0;
}

@media (max-width: 575.98px) {

    .app-modal .modal-body {
        padding: 24px;
    }

    .app-modal .modal-footer {
        padding: 0 20px 24px;
    }

    .app-modal .btn {
        min-width: 100px;
    }
}

/* ========================================
   FORMULÁRIOS ADMINISTRATIVOS
======================================== */

.page-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 25px;
}

.page-heading h1 {
    font-size: 25px;
    font-weight: 700;
    margin-bottom: 6px;
    color: var(--text-primary);
}

.page-heading p {
    font-size: 14px;
    color: var(--text-secondary);
    margin-bottom: 0;
}

.form-section {
    overflow: hidden;
}

.form-section-header {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 22px 25px;
    border-bottom: 1px solid #e2e8f0;
}

.form-section-icon {
    display: grid;
    place-items: center;
    flex-shrink: 0;
    width: 46px;
    height: 46px;
    border-radius: 12px;
    background: #e8f0ff;
    color: var(--primary);
    font-size: 21px;
}

.form-section-title {
    font-size: 16px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.form-section-description {
    font-size: 13px;
    color: var(--text-secondary);
    margin-bottom: 0;
}

.form-section-body {
    padding: 25px;
}

.form-section .form-label {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.form-section .form-control,
.form-section .form-select {
    min-height: 44px;
    border-radius: 8px;
    border-color: #dce3ec;
    font-size: 14px;
}

.form-section .form-control:focus,
.form-section .form-select:focus {
    border-color: #93b4ee;
    box-shadow: 0 0 0 3px rgba(40, 101, 213, .08);
}

.form-section .is-invalid {
    border-color: #dc3545;
}

.form-section .form-text {
    font-size: 12px;
    color: var(--text-secondary);
}

.btn-app-primary {
    background: var(--primary);
    border-color: var(--primary);
    color: #ffffff;
    padding: 11px 22px;
    border-radius: 9px;
    font-size: 14px;
    font-weight: 600;
}

.btn-app-primary:hover,
.btn-app-primary:focus {
    background: var(--primary-dark);
    border-color: var(--primary-dark);
    color: #ffffff;
}

.form-actions {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    padding: 10px 0 20px;
}

.company-logo-preview {
    background: #101f38;
    border-radius: 12px;
    min-height: 130px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 25px;
}

.company-logo-preview img {
    width: 200px;
    max-width: 100%;
    max-height: 100px;
    object-fit: contain;
}

@media (max-width: 575.98px) {

    .page-heading {
        align-items: flex-start;
        flex-direction: column;
    }

    .form-section-header {
        padding: 18px;
    }

    .form-section-body {
        padding: 18px;
    }

    .form-actions .btn {
        width: 100%;
    }
}

/* ========================================
   TABELAS ADMINISTRATIVAS
======================================== */

.table-card {
    padding: 0;
}

.table-toolbar {
    padding: 22px;
    border-bottom: 1px solid #e2e8f0;
}

.table-toolbar .form-control,
.table-toolbar .form-select {
    min-height: 42px;
    font-size: 13px;
    border-radius: 8px;
}

.app-table {
    margin-bottom: 0;
    vertical-align: middle;
}

.app-table thead th {
    background: #f8fafc;
    color: #64748b;
    font-size: 12px;
    font-weight: 600;
    padding: 16px 20px;
    white-space: nowrap;
    border-bottom: 1px solid #e2e8f0;
}

.app-table tbody td {
    padding: 18px 20px;
    font-size: 13px;
    color: var(--text-primary);
    border-bottom: 1px solid #edf2f7;
}

.app-table tbody tr:last-child td {
    border-bottom: 0;
}

.app-table tbody tr:hover td {
    background: #f8fafc;
}

.table-footer {
    padding: 20px 22px;
    border-top: 1px solid #e2e8f0;
}

.table-empty {
    padding: 55px 20px !important;
    text-align: center;
}

.table-empty-icon {
    display: grid;
    place-items: center;
    width: 70px;
    height: 70px;
    margin: 0 auto 18px;
    background: #e8f0ff;
    color: var(--primary);
    border-radius: 18px;
    font-size: 30px;
}

.table-empty h5 {
    font-size: 16px;
    font-weight: 600;
}

.table-empty p {
    color: var(--text-secondary);
    font-size: 13px;
}

.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 11px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 600;
    white-space: nowrap;
}

.status-active {
    background: #dcfce7;
    color: #15803d;
}

.status-inactive {
    background: #f1f5f9;
    color: #64748b;
}

.status-current {
    background: #dbeafe;
    color: #1d4ed8;
}

.table-action {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
    background: #ffffff;
    color: #64748b;
    text-decoration: none;
    transition: var(--transition);
}

.table-action:hover {
    background: #e8f0ff;
    border-color: #bfdbfe;
    color: var(--primary);
}

.table-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
}

.table-actions .dropdown-item {
    font-size: 13px;
    padding: 10px 16px;
}

.table-actions .dropdown-menu {
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    box-shadow: 0 8px 25px rgba(15, 23, 42, .08);
}

.pagination {
    margin-bottom: 0;
}

.pagination .page-link {
    font-size: 13px;
    color: var(--primary);
}

.pagination .active .page-link {
    background: var(--primary);
    border-color: var(--primary);
}

@media (max-width: 575.98px) {

    .table-toolbar,
    .table-footer {
        padding: 16px;
    }

    .app-table thead th,
    .app-table tbody td {
        padding: 14px;
    }
}



/* =====================================================
   MÓDULO DE PROFESSORES
===================================================== */

.teacher-avatar {
    width: 46px;
    height: 46px;
    min-width: 46px;
    border-radius: 50%;
    background: #e8f0ff;
    color: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: 700;
    overflow: hidden;
}

.teacher-avatar img,
.teacher-profile-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.teacher-photo-preview {
    width: 140px;
    height: 140px;
    border-radius: 16px;
    background: #f1f5f9;
    border: 2px dashed #cbd5e1;
    color: #94a3b8;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.teacher-photo-preview i {
    font-size: 64px;
}

.teacher-photo-preview img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.teacher-photo-preview img:not([src]),
.teacher-photo-preview img[src=""] {
    display: none;
}

.status-pending {
    background: #fff7e6;
    color: #a16207;
}

.teacher-profile-header {
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    gap: 28px;
    padding: 30px;
    border-left: 4px solid var(--primary);
}

.teacher-profile-header::after {
    content: "";
    position: absolute;
    width: 220px;
    height: 220px;
    border-radius: 50%;
    right: -70px;
    top: -100px;
    background: rgba(40, 101, 213, 0.05);
    pointer-events: none;
}

.teacher-profile-avatar {
    width: 112px;
    height: 112px;
    min-width: 112px;
    border-radius: 24px;
    background: #e8f0ff;
    color: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 36px;
    font-weight: 700;
    overflow: hidden;
}

.teacher-detail-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 22px;
}

.teacher-detail-grid > div {
    min-width: 0;
}

.teacher-detail-grid > div.w-100 {
    grid-column: 1 / -1;
}

.teacher-detail-grid span {
    display: block;
    font-size: 12px;
    color: #64748b;
    margin-bottom: 5px;
}

.teacher-detail-grid strong {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: #172b4d;
    overflow-wrap: anywhere;
}

.teacher-biography {
    white-space: pre-line;
    line-height: 1.8;
    color: #475569;
    overflow-wrap: anywhere;
}

@media (max-width: 575.98px) {

    .teacher-profile-header {
        flex-direction: column;
        align-items: flex-start;
        padding: 22px;
        gap: 20px;
    }

    .teacher-profile-avatar {
        width: 90px;
        height: 90px;
        min-width: 90px;
        font-size: 28px;
    }

    .teacher-detail-grid {
        grid-template-columns: 1fr;
        gap: 18px;
    }

}


/* =========================================================
   Plataforma pedagógica
   ========================================================= */

.pedagogical-banner {
    display: flex;
    align-items: center;
    gap: 24px;
    padding: 28px;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-left: 4px solid #2865d5;
    border-radius: 16px;
    color: #172b4d;
}

.pedagogical-banner p {
    color: #64748b;
    max-width: 760px;
    line-height: 1.7;
}

.pedagogical-banner-icon {
    width: 76px;
    height: 76px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 20px;
    background: #eaf1ff;
    color: #2865d5;
    font-size: 36px;
}

.pedagogical-status {
    display: flex;
    align-items: flex-start;
    gap: 18px;
    padding: 22px;
    border-radius: 12px;
    border: 1px solid transparent;
}

.pedagogical-status > i {
    font-size: 30px;
    flex-shrink: 0;
}

.pedagogical-status h3 {
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 8px;
}

.pedagogical-status p {
    font-size: 14px;
    line-height: 1.6;
    margin-bottom: 0;
}

.pedagogical-neutral {
    background: #f1f5f9;
    color: #475569;
    border-color: #e2e8f0;
}

.pedagogical-pending {
    background: #fffbeb;
    color: #92400e;
    border-color: #fde68a;
}

.pedagogical-approved {
    background: #ecfdf5;
    color: #166534;
    border-color: #bbf7d0;
}

.pedagogical-denied {
    background: #fef2f2;
    color: #991b1b;
    border-color: #fecaca;
}

.pedagogical-note {
    padding: 16px;
    background: #f8fafc;
    border-left: 3px solid #94a3b8;
    border-radius: 6px;
    font-size: 14px;
    overflow-wrap: anywhere;
}

.pedagogical-note p {
    white-space: pre-wrap;
    color: #475569;
}

.pedagogical-resource {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    padding-bottom: 20px;
    margin-bottom: 20px;
    border-bottom: 1px solid #e2e8f0;
}

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

.pedagogical-resource h3 {
    font-size: 15px;
    font-weight: 700;
    margin-bottom: 5px;
}

.pedagogical-resource p {
    font-size: 13px;
    line-height: 1.6;
    color: #64748b;
    margin-bottom: 0;
}

.pedagogical-history-details {
    min-width: 240px;
    max-width: 420px;
    overflow-wrap: anywhere;
    white-space: pre-wrap;
}

@media (max-width: 575.98px) {

    .pedagogical-banner {
        flex-direction: column;
        align-items: flex-start;
        padding: 20px;
    }

    .pedagogical-banner-icon {
        width: 60px;
        height: 60px;
        font-size: 28px;
    }

    .pedagogical-status {
        padding: 16px;
        gap: 12px;
    }

    .pedagogical-status > i {
        font-size: 24px;
    }
}

/* =====================================================
   MODALIDADES DE ENSINO
===================================================== */

.modality-icon {
    width: 46px;
    height: 46px;
    min-width: 46px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #eaf1ff;
    color: var(--primary);
    border-radius: 12px;
    font-size: 1.25rem;
}

.modality-type {
    display: inline-flex;
    align-items: center;
    padding: 6px 10px;
    border-radius: 7px;
    font-size: 0.75rem;
    font-weight: 600;
    line-height: 1.4;
}

.modality-type-subject {
    background: #eef2ff;
    color: #4338ca;
}

.modality-type-integrated {
    background: #ecfdf5;
    color: #047857;
}

/* =====================================================
   DISCIPLINAS
===================================================== */

.subject-icon {
    width: 44px;
    height: 44px;
    min-width: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #eaf1ff;
    color: var(--primary);
    border-radius: 12px;
    font-size: 1.2rem;
}

.subject-modality-tag {
    display: inline-flex;
    align-items: center;
    padding: 5px 10px;
    border-radius: 6px;
    background: #eef2ff;
    color: #4338ca;
    font-size: 0.75rem;
    font-weight: 600;
}

.subject-modality-tag-inactive {
    background: #f1f5f9;
    color: #64748b;
}

.subject-modality-option {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    padding: 18px;
    height: 100%;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    background: #ffffff;
    cursor: pointer;
    transition: border-color 0.2s ease,
                background-color 0.2s ease,
                box-shadow 0.2s ease;
}

.subject-modality-option:hover {
    border-color: #93b4f5;
    background: #f8faff;
}

.subject-modality-option:has(input:checked) {
    border-color: #2865d5;
    background: #f0f5ff;
    box-shadow: 0 0 0 1px rgba(40, 101, 213, 0.08);
}

.subject-modality-option:focus-within {
    outline: 2px solid #93b4f5;
    outline-offset: 2px;
}

.subject-modality-option .form-check-input {
    flex-shrink: 0;
    width: 19px;
    height: 19px;
    margin-top: 2px;
    cursor: pointer;
}

/* =====================================================
   AGRUPAMENTOS DE DISCIPLINAS
===================================================== */

.subject-group-icon {
    width: 46px;
    height: 46px;
    min-width: 46px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f3e8ff;
    color: #7c3aed;
    border-radius: 12px;
    font-size: 1.25rem;
}

/* =====================================================
   GERENCIAMENTO DE TURMAS
===================================================== */

.classroom-thumbnail {
    width: 72px;
    height: 52px;
    min-width: 72px;
    object-fit: cover;
    border-radius: 10px;
}

.classroom-thumbnail-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    background: #eaf1ff;
    color: #2865d5;
    font-size: 1.4rem;
}

.classroom-image-preview {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    border: 1px dashed #cbd5e1;
    border-radius: 14px;
    background: #f8fafc;
    overflow: hidden;
}

.classroom-image-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.classroom-image-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
    color: #64748b;
    font-size: 0.85rem;
}

.classroom-image-placeholder i {
    font-size: 2.8rem;
    color: #94a3b8;
}

.classroom-cover {
    display: block;
    width: 100%;
    aspect-ratio: 16 / 7;
    object-fit: cover;
}

.classroom-cover-placeholder {
    min-height: 240px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    background: linear-gradient(
        135deg,
        #eaf1ff,
        #dbeafe
    );
    color: #2865d5;
}

.classroom-cover-placeholder i {
    font-size: 4rem;
}

.classroom-cover-placeholder span {
    font-size: 1.15rem;
    font-weight: 600;
}

.classroom-description {
    white-space: pre-line;
    color: #475569;
    line-height: 1.8;
}

.classroom-teacher-avatar {
    width: 60px;
    height: 60px;
    min-width: 60px;
    border-radius: 50%;
    object-fit: cover;
}

.classroom-detail-list {
    display: flex;
    flex-direction: column;
}

.classroom-detail-list > div {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 13px 0;
    border-bottom: 1px solid #e2e8f0;
    font-size: 0.875rem;
}

.classroom-detail-list > div:last-child {
    border-bottom: 0;
    padding-bottom: 0;
}

.classroom-detail-list span {
    color: #64748b;
}

.classroom-detail-list strong {
    color: #172b4d;
    text-align: right;
}

@media (max-width: 575.98px) {

    .classroom-thumbnail {
        width: 56px;
        min-width: 56px;
        height: 44px;
    }

    .classroom-cover-placeholder {
        min-height: 180px;
    }

    .classroom-cover-placeholder i {
        font-size: 3rem;
    }

}

/* ========================================
   HORÁRIOS DAS OFERTAS ACADÊMICAS
======================================== */

.schedule-day {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-weight: 500;
    color: var(--text-primary);
}

.schedule-day i {
    color: var(--primary);
}

.schedule-time {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 6px 10px;
    border-radius: 8px;
    background: #eff6ff;
    color: #1d4ed8;
    font-size: 0.85rem;
    font-weight: 500;
    white-space: nowrap;
}

.schedule-time i {
    font-size: 0.85rem;
}

/* ========================================
   VERSÕES FINANCEIRAS
======================================== */

.financial-version-icon {
    width: 44px;
    height: 44px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    background: #eff6ff;
    color: #2563eb;
    font-size: 1.2rem;
}

.financial-version-icon-lg {
    width: 64px;
    height: 64px;
    border-radius: 16px;
    font-size: 1.8rem;
}

.financial-version-number {
    display: inline-flex;
    align-items: center;
    padding: 5px 10px;
    border-radius: 7px;
    background: #f1f5f9;
    color: #334155;
    font-size: 0.85rem;
    font-weight: 600;
    white-space: nowrap;
}

.financial-version-description {
    color: var(--text-primary);
    line-height: 1.7;
    white-space: pre-line;
    overflow-wrap: anywhere;
}

.commercial-table-card {
    display: flex;
    flex-direction: column;
}

.commercial-table-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    border-radius: 12px;
    background: #eff6ff;
    color: #2563eb;
    font-size: 1.4rem;
}

.commercial-table-pending {
    display: inline-flex;
    align-items: center;
    align-self: flex-start;
    padding: 6px 10px;
    border-radius: 7px;
    background: #fff7ed;
    color: #b45309;
    font-size: 0.8rem;
    font-weight: 500;
}

/* =========================================================
   RESPONSABILIDADES COMERCIAIS
   ========================================================= */

.commercial-responsibility-icon {
    width: 58px;
    height: 58px;
    min-width: 58px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 15px;
    background: #e8f0ff;
    color: #2865d5;
    font-size: 26px;
}

.commercial-responsibility-avatar {
    width: 38px;
    height: 38px;
    min-width: 38px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: #e8f0ff;
    color: #2865d5;
    font-size: 15px;
    font-weight: 600;
}

/* =========================================================
   TABELAS DE PREÇOS INDIVIDUAIS
   ========================================================= */

.individual-price-table {
    min-width: 800px;
}

.individual-price-table th:first-child {
    width: 28%;
}

.individual-price-table .input-group {
    min-width: 145px;
}

.individual-price-table .input-group-text {
    background: #f8fafc;
    color: #64748b;
    font-size: 13px;
}

.individual-price-table .price-input {
    text-align: right;
    font-variant-numeric: tabular-nums;
}

/* Etapa 15.06 — ajustes responsivos */
.app-main, .app-content, .app-card, .app-content .row > *, .topbar > * { min-width: 0; }
.app-content .table-responsive { max-width: 100%; }
.app-content .pagination { flex-wrap: wrap; gap: 3px; }
.app-content .form-actions { flex-wrap: wrap; }
.topbar-toggle, .user-avatar { flex-shrink: 0; }
.topbar .user-name { max-width: 220px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.topbar .dropdown-menu { max-width: calc(100vw - 24px); overflow-wrap: anywhere; }
.app-content h1, .app-content h2, .app-content h3, .app-content summary, .app-content .text-secondary { overflow-wrap: anywhere; }
.app-content :focus-visible, .sidebar :focus-visible, .topbar :focus-visible { outline: 2px solid #2865d5; outline-offset: 3px; }
.sidebar :focus-visible { outline-color: #ffc928; }
@media (max-width: 991.98px) {
    .sidebar, body.sidebar-collapsed .sidebar { max-width: calc(100vw - 24px); }
    body.sidebar-mobile-open { overflow: hidden; }
}
@media (max-width: 575.98px) {
    .app-content { padding: 12px; }
    .topbar { padding: 0 12px; }
    .form-actions { flex-direction: column; }
    .form-actions > * { width: 100%; }
    .app-content .form-control, .app-content .form-select { font-size: 16px; }
    .app-content .table-responsive { overscroll-behavior-x: contain; }
    .app-content .nav-tabs { flex-wrap: wrap; }
    .app-content .page-heading { gap: 12px; }
    .app-content .page-heading h1 { font-size: 22px; }
    .app-content .table-footer { overflow-wrap: anywhere; }
}
