html, body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    color: #1f2937;
    background: #eef3f8;
}

a, .btn-link {
    color: #006bb7;
}

.btn-primary {
    color: #fff;
    background-color: #0b5fa5;
    border-color: #084b82;
}

.btn-primary:hover {
    background-color: #084b82;
    border-color: #073f6e;
}

.btn:focus, .btn:active:focus, .btn-link.nav-link:focus, .form-control:focus, .form-check-input:focus {
  box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem #258cfb;
}

.content {
    padding-top: 1.1rem;
}

h1:focus {
    outline: none;
}

.valid.modified:not([type=checkbox]) {
    outline: 1px solid #26b050;
}

.invalid {
    outline: 1px solid #e50000;
}

.validation-message {
    color: #e50000;
}

.blazor-error-boundary {
    background: url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNTYiIGhlaWdodD0iNDkiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIG92ZXJmbG93PSJoaWRkZW4iPjxkZWZzPjxjbGlwUGF0aCBpZD0iY2xpcDAiPjxyZWN0IHg9IjIzNSIgeT0iNTEiIHdpZHRoPSI1NiIgaGVpZ2h0PSI0OSIvPjwvY2xpcFBhdGg+PC9kZWZzPjxnIGNsaXAtcGF0aD0idXJsKCNjbGlwMCkiIHRyYW5zZm9ybT0idHJhbnNsYXRlKC0yMzUgLTUxKSI+PHBhdGggZD0iTTI2My41MDYgNTFDMjY0LjcxNyA1MSAyNjUuODEzIDUxLjQ4MzcgMjY2LjYwNiA1Mi4yNjU4TDI2Ny4wNTIgNTIuNzk4NyAyNjcuNTM5IDUzLjYyODMgMjkwLjE4NSA5Mi4xODMxIDI5MC41NDUgOTIuNzk1IDI5MC42NTYgOTIuOTk2QzI5MC44NzcgOTMuNTEzIDI5MSA5NC4wODE1IDI5MSA5NC42NzgyIDI5MSA5Ny4wNjUxIDI4OS4wMzggOTkgMjg2LjYxNyA5OUwyNDAuMzgzIDk5QzIzNy45NjMgOTkgMjM2IDk3LjA2NTEgMjM2IDk0LjY3ODIgMjM2IDk0LjM3OTkgMjM2LjAzMSA5NC4wODg2IDIzNi4wODkgOTMuODA3MkwyMzYuMzM4IDkzLjAxNjIgMjM2Ljg1OCA5Mi4xMzE0IDI1OS40NzMgNTMuNjI5NCAyNTkuOTYxIDUyLjc5ODUgMjYwLjQwNyA1Mi4yNjU4QzI2MS4yIDUxLjQ4MzcgMjYyLjI5NiA1MSAyNjMuNTA2IDUxWk0yNjMuNTg2IDY2LjAxODNDMjYwLjczNyA2Ni4wMTgzIDI1OS4zMTMgNjcuMTI0NSAyNTkuMzEzIDY5LjMzNyAyNTkuMzEzIDY5LjYxMDIgMjU5LjMzMiA2OS44NjA4IDI1OS4zNzEgNzAuMDg4N0wyNjEuNzk1IDg0LjAxNjEgMjY1LjM4IDg0LjAxNjEgMjY3LjgyMSA2OS43NDc1QzI2Ny44NiA2OS43MzA5IDI2Ny44NzkgNjkuNTg3NyAyNjcuODc5IDY5LjMxNzkgMjY3Ljg3OSA2Ny4xMTgyIDI2Ni40NDggNjYuMDE4MyAyNjMuNTg2IDY2LjAxODNaTTI2My41NzYgODYuMDU0N0MyNjEuMDQ5IDg2LjA1NDcgMjU5Ljc4NiA4Ny4zMDA1IDI1OS43ODYgODkuNzkyMSAyNTkuNzg2IDkyLjI4MzcgMjYxLjA0OSA5My41Mjk1IDI2My41NzYgOTMuNTI5NSAyNjYuMTE2IDkzLjUyOTUgMjY3LjM4NyA5Mi4yODM3IDI2Ny4zODcgODkuNzkyMSAyNjcuMzg3IDg3LjMwMDUgMjY2LjExNiA4Ni4wNTQ3IDI2My41NzYgODYuMDU0N1oiIGZpbGw9IiNGRkU1MDAiIGZpbGwtcnVsZT0iZXZlbm9kZCIvPjwvZz48L3N2Zz4=) no-repeat 1rem/1.8rem, #b32121;
    padding: 1rem 1rem 1rem 3.7rem;
    color: white;
}

    .blazor-error-boundary::after {
        content: "An error has occurred."
    }

.darker-border-checkbox.form-check-input {
    border-color: #929292;
}

.form-floating > .form-control-plaintext::placeholder, .form-floating > .form-control::placeholder {
    color: var(--bs-secondary-color);
    text-align: end;
}

.form-floating > .form-control-plaintext:focus::placeholder, .form-floating > .form-control:focus::placeholder {
    text-align: start;
}

h1, h2, h3 {
    color: #12213d;
}

.panel-card,
.hero-card,
.stat-card {
    border-radius: 0.5rem;
    border: 1px solid rgba(27, 36, 49, 0.08);
    background: #ffffff;
    box-shadow: 0 14px 36px rgba(15, 23, 42, 0.07);
}

.panel-card,
.hero-card {
    padding: 1.5rem;
}

.hero-card {
    margin-bottom: 1.5rem;
    background:
        linear-gradient(135deg, rgba(11, 95, 165, 0.1), transparent 42%),
        linear-gradient(135deg, rgba(199, 154, 34, 0.14), #ffffff 72%);
    border-top: 4px solid #c79a22;
}

.stats-grid {
    display: grid;
    gap: 1rem;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.stat-card {
    padding: 1.25rem;
}

.stat-label,
.section-kicker {
    display: inline-block;
    margin-bottom: 0.55rem;
    text-transform: uppercase;
    letter-spacing: 0.14em;
    font-size: 0.74rem;
    color: #b48a1f;
}

.app-content .card,
.panel-card,
.hero-card,
.stat-card,
.modal-card {
    border-radius: 0.5rem;
}

.app-content .card {
    border: 1px solid rgba(15, 23, 42, 0.08);
    box-shadow: 0 12px 32px rgba(15, 23, 42, 0.07);
}

.section-copy,
.muted {
    color: #6b7280;
}

.stack-lg,
.stack-form {
    display: grid;
    gap: 1rem;
}

.login-grid {
    display: grid;
    grid-template-columns: minmax(320px, 1fr) minmax(320px, 1fr);
    gap: 1.25rem;
}

.toolbar-row,
.toolbar-actions,
.inline-actions {
    display: flex;
    gap: 0.75rem;
    align-items: center;
    flex-wrap: wrap;
}

.toolbar-row {
    justify-content: space-between;
}

.search-field {
    position: relative;
    min-width: min(100%, 22rem);
}

.search-field .bi {
    position: absolute;
    top: 50%;
    left: 0.85rem;
    transform: translateY(-50%);
    color: #64748b;
    pointer-events: none;
}

.search-field .form-control {
    padding-left: 2.25rem;
}

.field {
    display: grid;
    gap: 0.45rem;
    font-weight: 600;
}

.field span {
    color: #344054;
}

.select2-like-field {
    position: relative;
    display: grid;
    gap: 0.45rem;
    min-width: 0;
}

.select2-like-control {
    position: relative;
    display: grid;
}

.select2-like-control .form-control {
    min-height: 2.65rem;
    padding-right: 4.5rem;
}

.select2-clear,
.select2-toggle {
    position: absolute;
    top: 50%;
    width: 2rem;
    height: 2rem;
    border: 0;
    border-radius: 999px;
    background: transparent;
    color: #667085;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transform: translateY(-50%);
}

.select2-clear {
    right: 2.3rem;
}

.select2-toggle {
    right: 0.35rem;
}

.select2-clear:hover,
.select2-toggle:hover {
    background: rgba(15, 23, 42, 0.06);
    color: #1f2937;
}

.select2-like-dropdown {
    position: absolute;
    z-index: 1120;
    top: calc(100% + 0.25rem);
    left: 0;
    right: 0;
    max-height: min(18rem, 45dvh);
    overflow: auto;
    border: 1px solid rgba(15, 23, 42, 0.12);
    border-radius: 0.5rem;
    background: #ffffff;
    box-shadow: 0 18px 38px rgba(15, 23, 42, 0.14);
    padding: 0.35rem;
}

.select2-like-option {
    width: 100%;
    border: 0;
    border-radius: 0.55rem;
    background: transparent;
    color: #344054;
    display: block;
    padding: 0.6rem 0.7rem;
    text-align: left;
}

.select2-like-option:hover,
.select2-like-option.selected {
    background: rgba(37, 99, 235, 0.1);
    color: #1d4ed8;
}

.select2-like-option small {
    display: block;
    margin-top: 0.15rem;
    color: #64748b;
    font-size: 0.78rem;
}

.select2-like-empty {
    padding: 0.75rem;
    color: #64748b;
    font-size: 0.9rem;
}

.smart-search {
    display: flex;
    gap: 0.6rem;
    align-items: center;
    min-width: min(100%, 27rem);
}

.smart-search .search-field {
    flex: 1 1 18rem;
}

.checkbox-field {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    min-height: 100%;
}

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

.field-span-2 {
    grid-column: 1 / -1;
}

.option-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.65rem;
}

.option-row {
    min-height: 2.5rem;
    padding: 0.55rem 0.7rem;
    border: 1px solid #d0d5dd;
    border-radius: 0.5rem;
    font-weight: 500;
}

.workspace-columns {
    display: grid;
    grid-template-columns: minmax(320px, 1fr) minmax(360px, 1fr);
    gap: 1rem;
}

.catalogs-workspace {
    grid-template-columns: minmax(240px, 0.35fr) minmax(0, 1fr);
}

.catalog-group-panel {
    align-content: start;
    display: grid;
    gap: 0.55rem;
}

.catalog-group-button {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 0.75rem;
    align-items: center;
    width: 100%;
    padding: 0.72rem 0.85rem;
    border: 1px solid rgba(15, 23, 42, 0.08);
    border-radius: 0.5rem;
    background: #ffffff;
    color: #334155;
    font-weight: 700;
    text-align: left;
}

.catalog-group-button span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.catalog-group-button strong {
    color: #64748b;
    font-size: 0.85rem;
}

.catalog-group-button.active {
    background: rgba(11, 95, 165, 0.1);
    border-color: rgba(11, 95, 165, 0.3);
    color: #0b5fa5;
}

.catalog-table {
    min-width: 880px;
}

.catalog-modal {
    width: min(780px, 100%);
}

.workspace-column {
    display: grid;
    gap: 1rem;
    align-content: start;
}

.page-stack {
    display: grid;
    gap: 1rem;
}

.import-hero {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    align-items: center;
}

.import-hero-actions {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.import-grid {
    display: grid;
    grid-template-columns: minmax(280px, 2fr) minmax(220px, 1fr) minmax(160px, 0.6fr);
    gap: 1rem;
    align-items: start;
}

.sicif-toast {
    position: sticky;
    top: 0.75rem;
    z-index: 20;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    width: min(100%, 48rem);
    margin-left: auto;
    padding: 0.85rem 1rem;
    border-radius: 0.5rem;
    box-shadow: 0 18px 40px rgba(15, 23, 42, 0.15);
}

.sicif-toast.success {
    color: #074f2c;
    background: #dcfce7;
    border: 1px solid #86efac;
}

.sicif-toast.error {
    color: #7f1d1d;
    background: #fee2e2;
    border: 1px solid #fca5a5;
}

.sicif-toast .btn-close {
    margin-left: auto;
}

.issue-list {
    display: grid;
    gap: 0.65rem;
    max-height: 34rem;
    overflow: auto;
    padding-right: 0.25rem;
}

.issue-item,
.match-item,
.template-card {
    display: grid;
    gap: 0.35rem;
    padding: 0.9rem;
    border: 1px solid rgba(15, 23, 42, 0.1);
    border-radius: 0.5rem;
    background: #fff;
}

.issue-item.warning {
    border-left: 4px solid #d97706;
}

.issue-item.error {
    border-left: 4px solid #dc2626;
}

.issue-item span,
.match-item small,
.template-card p,
.template-card small {
    color: #64748b;
}

.match-candidate {
    display: grid;
    gap: 0.25rem;
    padding: 0.55rem;
    border-radius: 0.45rem;
    background: #f8fafc;
}

.match-candidate .badge {
    width: fit-content;
}

.template-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 0.85rem;
    margin-top: 1rem;
}

.template-card {
    justify-content: space-between;
}

.template-card h3 {
    margin: 0 0 0.35rem;
    font-size: 1.05rem;
}

.template-card .btn {
    width: fit-content;
}

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

@media (max-width: 900px) {
    .import-hero,
    .import-grid {
        grid-template-columns: 1fr;
    }

    .catalogs-workspace,
    .workspace-columns {
        grid-template-columns: 1fr;
    }

    .import-hero {
        align-items: stretch;
        flex-direction: column;
    }
}

.role-select {
    min-height: 9rem;
}

.auth-grid {
    min-height: 100vh;
    display: grid;
    grid-template-columns: minmax(320px, 1.1fr) minmax(360px, 0.9fr);
}

.auth-showcase,
.auth-panel {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
}

.auth-visual {
    width: 100%;
    max-width: 820px;
    min-height: 760px;
    border-radius: 34px;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0.22)),
        url('/branding/login-hero.svg') center/cover no-repeat;
    box-shadow: 0 26px 72px rgba(31, 41, 55, 0.18);
    border: 1px solid rgba(255, 255, 255, 0.35);
}

.auth-showcase-card,
.auth-card {
    width: 100%;
    max-width: 640px;
    border-radius: 28px;
    background: rgba(255, 255, 255, 0.82);
    border: 1px solid rgba(15, 23, 42, 0.08);
    box-shadow: 0 24px 60px rgba(31, 41, 55, 0.12);
    backdrop-filter: blur(12px);
}

.auth-showcase-card {
    padding: 2.4rem;
    background:
        linear-gradient(160deg, rgba(37, 99, 235, 0.12), transparent 40%),
        linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(248, 250, 252, 0.9));
}

.auth-showcase-card h1 {
    font-size: clamp(2rem, 4vw, 3.4rem);
    line-height: 1.08;
    margin-bottom: 1rem;
}

.auth-bullets {
    display: grid;
    gap: 1rem;
    margin-top: 1.5rem;
}

.auth-bullets > div {
    padding: 1rem 1.1rem;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.72);
    border: 1px solid rgba(15, 23, 42, 0.06);
}

.auth-bullets p {
    margin: 0.25rem 0 0;
    color: #6b7280;
}

.auth-card {
    padding: 1.4rem;
}

.auth-logo {
    width: 190px;
    max-width: 100%;
    margin-bottom: 1rem;
}

.auth-card-header {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.auth-tab {
    border: 1px solid rgba(15, 23, 42, 0.08);
    background: #f3f4f6;
    border-radius: 16px;
    padding: 0.9rem 1rem;
    font-weight: 700;
    color: #334155;
}

.auth-tab.active {
    background: #1d4ed8;
    color: #ffffff;
}

.record-grid {
    overflow-x: auto;
}

.metric-strip {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
    gap: 0.75rem;
}

.metric-chip {
    display: grid;
    grid-template-columns: auto 1fr auto;
    gap: 0.65rem;
    align-items: center;
    padding: 0.85rem 0.95rem;
    border-radius: 0.5rem;
    border: 1px solid rgba(15, 23, 42, 0.08);
    background: #f8fafc;
    color: #334155;
}

.metric-chip .bi {
    color: #0b5fa5;
}

.metric-chip strong {
    color: #12213d;
    font-size: 1.1rem;
}

.empty-state {
    min-height: 13rem;
    display: grid;
    place-items: center;
    align-content: center;
    gap: 0.45rem;
    padding: 1.5rem;
    border-radius: 0.5rem;
    border: 1px dashed rgba(15, 23, 42, 0.18);
    background: #f8fafc;
    color: #64748b;
    text-align: center;
}

.empty-state .bi {
    color: #0b5fa5;
    font-size: 2rem;
}

.empty-state strong {
    color: #12213d;
}

.record-table {
    min-width: 1180px;
}

.record-table thead th,
.record-table .col-title {
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-size: 0.76rem;
    color: #64748b;
    border-bottom-width: 1px;
}

.record-table tbody tr {
    border-color: rgba(15, 23, 42, 0.06);
}

.record-table tbody td {
    vertical-align: middle;
}

.record-table .sort-indicator {
    color: #2563eb;
}

.quickgrid-pagination {
    display: flex;
    justify-content: flex-end;
    margin-top: 1rem;
}

.grid-pagination {
    display: flex;
    justify-content: space-between;
    gap: 0.75rem;
    align-items: center;
    flex-wrap: wrap;
    color: #64748b;
    font-size: 0.92rem;
}

.status-pill {
    display: inline-flex;
    align-items: center;
    padding: 0.35rem 0.75rem;
    border-radius: 999px;
    font-size: 0.78rem;
    font-weight: 700;
    margin-right: 0.4rem;
}

.status-pill.active {
    background: rgba(34, 197, 94, 0.14);
    color: #15803d;
}

.status-pill.inactive {
    background: rgba(100, 116, 139, 0.14);
    color: #475569;
}

.status-pill.warning {
    background: rgba(245, 158, 11, 0.15);
    color: #b45309;
}

.status-pill.draft,
.status-pill.neutral {
    background: rgba(37, 99, 235, 0.12);
    color: #1d4ed8;
}

.justify-end {
    justify-content: flex-end;
}

.account-card {
    padding: 1rem 1.1rem;
    border-radius: 20px;
    background: #f8fafc;
    border: 1px solid rgba(15, 23, 42, 0.08);
}

.profile-shell {
    max-width: 980px;
}

.profile-summary {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid rgba(15, 23, 42, 0.08);
}

.profile-avatar {
    width: 4rem;
    height: 4rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 0.75rem;
    background: rgba(11, 95, 165, 0.1);
    color: #0b5fa5;
    font-size: 1.6rem;
    flex: 0 0 auto;
}

.field-title {
    font-weight: 700;
    color: #344054;
}

.roles-picker {
    display: grid;
    gap: 0.8rem;
}

.roles-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 0.65rem;
}

.role-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.7rem 0.9rem;
    border-radius: 999px;
    border: 1px solid rgba(15, 23, 42, 0.12);
    background: #ffffff;
    font-weight: 600;
    cursor: pointer;
}

.role-chip.selected {
    border-color: #0057a8;
    background: rgba(0, 87, 168, 0.1);
    color: #0057a8;
}

.teacher-hero {
    border-top: 4px solid #d4af37;
    background:
        linear-gradient(135deg, rgba(0, 87, 168, 0.08), rgba(255, 255, 255, 0.95) 52%),
        linear-gradient(135deg, rgba(212, 175, 55, 0.16), transparent);
}

.teachers-workspace {
    grid-template-columns: minmax(420px, 0.95fr) minmax(520px, 1.35fr);
}

.teacher-table {
    min-width: 760px;
}

.teachers-empty-state {
    min-height: 260px;
    display: grid;
    align-content: center;
}

.teacher-profile-strip {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    align-items: center;
    padding: 1rem 1.15rem;
    border-radius: 20px;
    border: 1px solid rgba(15, 23, 42, 0.08);
    background:
        linear-gradient(90deg, color-mix(in srgb, var(--teacher-accent) 14%, white), #ffffff 58%),
        linear-gradient(180deg, rgba(212, 175, 55, 0.18), transparent);
    border-left: 6px solid var(--teacher-accent);
}

.teacher-profile-strip h2,
.teacher-profile-strip p {
    margin-bottom: 0;
}

.teacher-photo-thumb {
    width: 92px;
    height: 122px;
    object-fit: cover;
    border-radius: 12px;
    border: 3px solid rgba(255, 255, 255, 0.9);
    box-shadow: 0 12px 26px rgba(15, 23, 42, 0.16);
}

.teacher-section-tabs {
    display: flex;
    gap: 0.55rem;
    flex-wrap: wrap;
    border-bottom: 1px solid rgba(15, 23, 42, 0.08);
    padding-bottom: 0.75rem;
}

.teacher-tab {
    border: 1px solid rgba(15, 23, 42, 0.1);
    background: #ffffff;
    color: #334155;
    border-radius: 999px;
    padding: 0.55rem 0.85rem;
    font-weight: 700;
}

.teacher-tab.active {
    background: #0057a8;
    border-color: #0057a8;
    color: #ffffff;
}

.teacher-section,
.teacher-lines {
    display: grid;
    gap: 0.85rem;
}

.teacher-dossier-shell {
    max-width: 1280px;
}

.teacher-detail-table {
    min-width: 960px;
}

.teacher-modal {
    width: min(860px, 100%);
}

.teacher-line {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)) auto;
    gap: 0.65rem;
    align-items: center;
    padding: 0.85rem;
    border-radius: 18px;
    background: #f8fafc;
    border: 1px solid rgba(15, 23, 42, 0.08);
}

.checkbox-field.compact {
    min-height: auto;
    white-space: nowrap;
}

.modal-backdrop-blur {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.38);
    backdrop-filter: blur(4px);
    z-index: 1080;
}

.modal-shell {
    position: fixed;
    inset: 0;
    z-index: 1090;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: clamp(0.75rem, 3vw, 1.5rem);
    overflow: auto;
}

.modal-card {
    width: min(980px, 100%);
    max-width: 100%;
    max-height: calc(100dvh - clamp(1rem, 6vw, 3rem));
    overflow-y: auto;
    overscroll-behavior: contain;
    background: #ffffff;
    border-radius: 0.75rem;
    border: 1px solid rgba(15, 23, 42, 0.08);
    box-shadow: 0 32px 80px rgba(15, 23, 42, 0.28);
    padding: clamp(1rem, 3vw, 1.5rem);
}

.modal-card .grid-2,
.modal-card .field,
.modal-card .form-control,
.modal-card .form-select {
    min-width: 0;
}

.modal-header-row,
.modal-actions {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    align-items: center;
}

.modal-actions {
    margin-top: 0.5rem;
    justify-content: flex-end;
    position: sticky;
    bottom: -1px;
    padding-top: 0.75rem;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.88), #ffffff 42%);
}

.sidebar-logo,
.topbar-logo {
    display: block;
    height: auto;
}

.sidebar-logo {
    width: 168px;
    margin-bottom: 1rem;
}

.topbar-brand {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    min-width: 0;
}

.topbar-logo {
    width: 50px;
    flex: 0 0 auto;
}

.topbar-user {
    margin-left: auto;
}

.topbar-brand strong {
    display: block;
    line-height: 1.2;
    white-space: normal;
}

.form-section {
    padding-top: 0.65rem;
    border-top: 1px solid rgba(15, 23, 42, 0.08);
    display: grid;
    gap: 1rem;
}

.form-section-header {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    align-items: start;
}

.wizard-shell {
    padding: 1.75rem;
}

.wizard-header,
.wizard-section-header,
.wizard-actions,
.wizard-summary-row {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    align-items: center;
}

.wizard-steps {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 0.85rem;
}

.wizard-step {
    display: flex;
    gap: 0.85rem;
    align-items: center;
    padding: 1rem;
    border-radius: 20px;
    background: #f8fafc;
    border: 1px solid rgba(15, 23, 42, 0.08);
}

.wizard-step span {
    width: 2.25rem;
    height: 2.25rem;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(37, 99, 235, 0.12);
    color: #1d4ed8;
    font-weight: 800;
}

.wizard-step small {
    display: block;
    color: #6b7280;
}

.wizard-step.current {
    border-color: rgba(37, 99, 235, 0.3);
    background: rgba(219, 234, 254, 0.7);
}

.wizard-step.completed {
    border-color: rgba(34, 197, 94, 0.28);
    background: rgba(220, 252, 231, 0.72);
}

.wizard-step.completed span {
    background: rgba(34, 197, 94, 0.18);
    color: #15803d;
}

.wizard-content {
    display: grid;
    grid-template-columns: minmax(0, 1.8fr) minmax(280px, 0.8fr);
    gap: 1.25rem;
    align-items: start;
}

.wizard-main,
.wizard-side,
.wizard-section {
    display: grid;
    gap: 1rem;
}

.wizard-mode-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1rem;
}

.wizard-mode-card {
    text-align: left;
    padding: 1.1rem 1.15rem;
    border-radius: 22px;
    border: 1px solid rgba(15, 23, 42, 0.08);
    background: #ffffff;
    display: grid;
    gap: 0.45rem;
}

.wizard-mode-card.selected {
    border-color: rgba(37, 99, 235, 0.35);
    background: rgba(239, 246, 255, 0.92);
    box-shadow: 0 14px 36px rgba(37, 99, 235, 0.12);
}

.wizard-mode-card span,
.field-hint {
    color: #6b7280;
    font-size: 0.92rem;
}

.wizard-template-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 0.75rem;
    align-items: center;
}

.wizard-two-panels {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem;
}

.wizard-inline-card {
    padding: 1rem;
    border-radius: 18px;
    border: 1px solid rgba(15, 23, 42, 0.08);
    background: #ffffff;
    display: grid;
    gap: 0.85rem;
}

.wizard-toggle-row {
    padding-top: 0.15rem;
    align-items: center;
}

.editions-workspace {
    align-items: start;
}

.editions-detail-card,
.detail-block,
.editions-empty-state {
    background: rgba(255, 255, 255, 0.92);
}

.detail-block {
    padding: 1rem;
    border-radius: 20px;
    border: 1px solid rgba(15, 23, 42, 0.08);
    display: grid;
    gap: 0.85rem;
}

.detail-list {
    display: grid;
    gap: 0.75rem;
}

.detail-list-item {
    display: grid;
    gap: 0.18rem;
    padding: 0.85rem 0.95rem;
    border-radius: 16px;
    background: #f8fafc;
    border: 1px solid rgba(15, 23, 42, 0.06);
}

.wizard-module-list,
.wizard-level-list {
    display: grid;
    gap: 1rem;
}

.wizard-module-card {
    border-radius: 22px;
    border: 1px solid rgba(15, 23, 42, 0.08);
    background: #f8fafc;
    padding: 1rem;
    display: grid;
    gap: 1rem;
}

.wizard-module-card.active {
    background: rgba(255, 255, 255, 0.96);
}

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

.wizard-level-row {
    padding: 0.9rem;
    border-radius: 18px;
    border: 1px solid rgba(15, 23, 42, 0.08);
    background: #ffffff;
    display: grid;
    gap: 0.85rem;
}

.wizard-certificate-table {
    min-width: 920px;
}

.public-shell {
    min-height: 100vh;
    background: #f6f8fb;
}

.public-topbar {
    position: sticky;
    top: 0;
    z-index: 30;
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    align-items: center;
    padding: 0.9rem clamp(1rem, 4vw, 3rem);
    background: rgba(255, 255, 255, 0.94);
    border-bottom: 1px solid rgba(15, 23, 42, 0.08);
    backdrop-filter: blur(12px);
}

.public-brand,
.public-nav {
    display: flex;
    align-items: center;
    gap: 0.85rem;
}

.public-brand {
    color: #0f172a;
    font-weight: 800;
    text-decoration: none;
}

.public-brand img {
    width: 44px;
    height: auto;
}

.public-nav a {
    color: #334155;
    font-weight: 700;
    text-decoration: none;
}

.public-hero {
    min-height: 78vh;
    display: grid;
    grid-template-columns: minmax(0, 0.95fr) minmax(320px, 1.05fr);
    gap: 2rem;
    align-items: center;
    padding: clamp(2rem, 5vw, 4.5rem) clamp(1rem, 5vw, 4rem);
    background:
        linear-gradient(120deg, rgba(0, 87, 168, 0.96), rgba(0, 87, 168, 0.76)),
        linear-gradient(180deg, #ffffff, #eef4fb);
}

.public-hero h1,
.public-hero p,
.public-hero .section-kicker {
    color: #ffffff;
}

.public-hero h1 {
    max-width: 760px;
    font-size: clamp(2.4rem, 5vw, 5rem);
    line-height: 1.02;
    margin-bottom: 1rem;
}

.public-hero-copy p:not(.section-kicker) {
    max-width: 640px;
    font-size: 1.1rem;
}

.public-feature {
    display: grid;
    min-height: 420px;
    overflow: hidden;
    border-radius: 28px;
    background: #ffffff;
    color: #0f172a;
    text-decoration: none;
    box-shadow: 0 28px 72px rgba(15, 23, 42, 0.24);
}

.public-feature img,
.carousel-slide img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: center;
    background: #f8fafc;
}

.public-feature div,
.carousel-caption {
    padding: 1.2rem;
    display: grid;
    gap: 0.25rem;
}

.public-feature div {
    background: #ffffff;
}

.carousel-slide {
    min-height: 470px;
    overflow: hidden;
    border-radius: 28px;
    background: #ffffff;
    color: #0f172a;
    text-decoration: none;
    box-shadow: 0 28px 72px rgba(15, 23, 42, 0.24);
    position: relative;
}

.slide-placeholder {
    min-height: 330px;
    display: grid;
    place-items: center;
    background: linear-gradient(135deg, #e2e8f0, #cbd5e1);
    color: #0f172a;
    font-size: 1.35rem;
    font-weight: 700;
}

.public-carousel {
    position: relative;
}

.public-carousel .carousel-inner {
    min-height: 470px;
}

.public-carousel .carousel-indicators [data-bs-target] {
    background-color: rgba(255, 255, 255, 0.9);
}

.public-carousel .carousel-control-prev-icon,
.public-carousel .carousel-control-next-icon {
    filter: invert(1);
}

.carousel-caption {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(0deg, rgba(15, 23, 42, 0.75), rgba(15, 23, 42, 0.1));
    padding: 1.25rem 1.5rem;
    color: #ffffff;
    align-items: start;
}

.carousel-caption strong {
    font-size: clamp(1.8rem, 2.8vw, 2.4rem);
}

.public-feature span,
.public-feature small {
    color: #64748b;
}

.public-feature strong {
    font-size: 1.45rem;
}

.public-section {
    padding: clamp(1.5rem, 4vw, 3rem) clamp(1rem, 5vw, 4rem);
}

.public-course-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1rem;
}

.public-course-card {
    overflow: hidden;
    border-radius: 22px;
    background: #ffffff;
    border: 1px solid rgba(15, 23, 42, 0.08);
    box-shadow: 0 16px 42px rgba(15, 23, 42, 0.08);
}

.public-course-media {
    min-height: 220px;
    display: grid;
    place-items: center;
    background: linear-gradient(135deg, #0057a8, #d4af37);
    color: #ffffff;
    font-size: 1.8rem;
    font-weight: 800;
    text-decoration: none;
}

.public-course-media img {
    width: 100%;
    height: 220px;
    object-fit: cover;
}

.public-course-body {
    padding: 1.1rem;
    display: grid;
    gap: 0.75rem;
}

.public-course-body h3,
.public-course-body p {
    margin: 0;
}

.public-course-meta {
    display: grid;
    gap: 0.25rem;
    color: #64748b;
    font-size: 0.92rem;
}

.public-course-hero {
    position: relative;
    min-height: 58vh;
    display: grid;
    align-items: end;
    padding: clamp(2rem, 5vw, 4rem);
    background: linear-gradient(120deg, #0057a8, #0f2f5f);
    overflow: hidden;
}

.public-course-hero > img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.34;
}

.public-course-hero > div {
    position: relative;
    max-width: 900px;
}

.public-course-hero h1,
.public-course-hero p,
.public-course-hero .section-kicker {
    color: #ffffff;
}

.public-course-hero h1 {
    font-size: clamp(2rem, 4vw, 4.2rem);
    line-height: 1.05;
}

.public-detail-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.4fr) minmax(300px, 0.6fr);
    gap: 1rem;
    align-items: start;
}

.public-module-list,
.public-teacher-list {
    display: grid;
    gap: 0.75rem;
}

.public-module-list article,
.public-teacher-list article {
    display: flex;
    gap: 0.85rem;
    align-items: center;
    padding: 0.85rem;
    border-radius: 16px;
    background: #f8fafc;
    border: 1px solid rgba(15, 23, 42, 0.08);
}

.public-module-list article > span {
    width: 2.8rem;
    height: 2.8rem;
    border-radius: 999px;
    display: grid;
    place-items: center;
    background: rgba(0, 87, 168, 0.1);
    color: #0057a8;
    font-weight: 800;
}

.public-module-list small,
.public-teacher-list span,
.public-teacher-list small {
    display: block;
    color: #64748b;
}

.public-teacher-list img {
    width: 64px;
    height: 78px;
    object-fit: cover;
    border-radius: 12px;
}

.public-roster-image {
    width: 100%;
    border-radius: 18px;
    border: 1px solid rgba(15, 23, 42, 0.08);
}

.public-rates-page {
    display: grid;
    gap: 1.25rem;
}

.rates-hero {
    min-height: 24rem;
    display: grid;
    align-content: center;
    gap: 0.65rem;
    padding: clamp(2rem, 5vw, 4rem);
    border-radius: 26px;
    background:
        linear-gradient(120deg, rgba(0, 87, 168, 0.92), rgba(15, 47, 95, 0.82)),
        linear-gradient(180deg, #ffffff, #eef4fb);
    color: #ffffff;
    overflow: hidden;
}

.rates-hero h1,
.rates-hero p,
.rates-hero .section-kicker {
    color: #ffffff;
}

.rates-hero h1 {
    font-size: clamp(2.4rem, 5vw, 4.4rem);
    line-height: 1.02;
    margin: 0;
}

.rates-hero p {
    max-width: 760px;
    font-size: 1.08rem;
    margin: 0;
}

.rates-board {
    border-radius: 26px;
    background: #ffffff;
    border: 1px solid rgba(15, 23, 42, 0.08);
    box-shadow: 0 20px 48px rgba(15, 23, 42, 0.09);
    overflow: hidden;
}

.rates-board-header {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    align-items: center;
    padding: 1.35rem;
    background: #f8fafc;
    border-bottom: 1px solid rgba(15, 23, 42, 0.08);
}

.rates-board-header h2,
.rates-board-header p {
    margin: 0;
}

.rates-status {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 2rem;
    padding: 0.25rem 0.7rem;
    border-radius: 999px;
    background: rgba(22, 163, 74, 0.12);
    color: #15803d;
    font-weight: 800;
}

.rates-table-wrap {
    overflow-x: auto;
}

.rates-table {
    width: 100%;
    min-width: 920px;
    border-collapse: collapse;
}

.rates-table th,
.rates-table td {
    padding: 0.85rem 0.95rem;
    border-bottom: 1px solid rgba(15, 23, 42, 0.08);
    vertical-align: middle;
}

.rates-table thead th {
    background: #eaf2fb;
    color: #12213d;
    font-size: 0.94rem;
    text-align: center;
}

.rates-table thead th:first-child,
.rates-table tbody th {
    text-align: left;
}

.rates-table thead span,
.rates-table thead small,
.rates-table td strong,
.rates-table td small {
    display: block;
}

.rates-table thead small,
.rates-table td small {
    color: #64748b;
    font-weight: 700;
}

.rates-table td {
    text-align: center;
}

.rates-table tbody tr:hover:not(.rates-concept-row) {
    background: #f8fafc;
}

.rates-concept-row td {
    background: #f2e8f7;
    color: #e94575;
    text-transform: uppercase;
    letter-spacing: 0.14em;
    font-weight: 900;
}

.rates-note {
    margin: 0;
    padding: 1rem 1.35rem 1.35rem;
    color: #64748b;
}

.timeline-board {
    display: grid;
    gap: 0.8rem;
}

.timeline-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    align-items: center;
    color: #475569;
    font-size: 0.95rem;
}

.legend-pill {
    display: inline-block;
    width: 1rem;
    height: 1rem;
    border-radius: 999px;
    margin-right: 0.5rem;
    vertical-align: middle;
}

.timeline-header,
.timeline-row {
    display: grid;
    grid-template-columns: minmax(220px, 0.7fr) minmax(280px, 1fr) auto;
    gap: 1rem;
    align-items: center;
    padding: 1rem;
    border-radius: 18px;
    background: #f8fafc;
    border: 1px solid rgba(15, 23, 42, 0.08);
}

.timeline-header {
    background: transparent;
    border-color: transparent;
    color: #334155;
    font-size: 0.95rem;
    font-weight: 700;
}

.timeline-row-main h2,
.timeline-row-main p {
    margin: 0;
}

.timeline-track {
    position: relative;
    height: 3.2rem;
    border-radius: 999px;
    background: #e2e8f0;
    overflow: hidden;
}

.timeline-segment {
    position: absolute;
    top: 0.55rem;
    height: 2.1rem;
    display: inline-flex;
    align-items: center;
    padding: 0 0.8rem;
    border-radius: 999px;
    color: #ffffff;
    font-size: 0.8rem;
    font-weight: 800;
    white-space: nowrap;
}

.timeline-segment.enrollment {
    left: var(--enrollment-left);
    width: var(--enrollment-width);
    background: #d4af37;
}

.timeline-segment.classes {
    left: var(--classes-left);
    width: var(--classes-width);
    background: #0057a8;
}

@media (max-width: 1100px) {
    .wizard-content {
        grid-template-columns: 1fr;
    }

    .wizard-two-panels {
        grid-template-columns: 1fr;
    }

    .public-hero,
    .public-detail-grid,
    .timeline-row {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 900px) {
    .auth-grid,
    .login-grid,
    .grid-2,
    .workspace-columns {
        grid-template-columns: 1fr;
    }

    .auth-showcase,
    .auth-panel {
        padding: 1rem;
    }

    .auth-visual {
        min-height: 360px;
    }

    .public-topbar {
        align-items: flex-start;
        flex-direction: column;
    }

    .public-nav {
        flex-wrap: wrap;
    }
}

@media (max-width: 640px) {
    .modal-shell {
        align-items: stretch;
        justify-content: stretch;
        padding: 0.5rem;
    }

    .modal-card,
    .teacher-modal {
        width: 100%;
        max-height: calc(100dvh - 1rem);
    }

    .modal-header-row {
        align-items: flex-start;
    }

    .modal-header-row h2 {
        font-size: 1.35rem;
    }

    .modal-card .grid-2 {
        grid-template-columns: 1fr;
    }

    .modal-card .field-span-2 {
        grid-column: auto;
    }

    .modal-actions {
        display: grid;
        grid-template-columns: 1fr;
    }

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

    .toolbar-actions,
    .smart-search {
        width: 100%;
    }

    .smart-search {
        display: grid;
        grid-template-columns: 1fr;
    }

    .smart-search .search-field,
    .toolbar-actions .btn {
        width: 100%;
    }
}

.enrollment-payment-summary {
    background: #f8fafc;
    border-color: rgba(11, 95, 165, 0.16);
}

.payment-context-panel {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 0.75rem;
    padding: 0.9rem 1rem;
    border: 1px solid rgba(11, 95, 165, 0.14);
    border-radius: 0.75rem;
    background: #f8fafc;
}

.payment-context-panel div {
    display: grid;
    gap: 0.25rem;
}

.payment-context-panel span {
    color: #64748b;
    font-size: 0.78rem;
    font-weight: 700;
    text-transform: uppercase;
}

.payment-context-panel strong {
    color: #10213b;
    font-size: 0.95rem;
    line-height: 1.35;
}

.compact-stats {
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
}

.compact-stats .stat-card {
    padding: 0.9rem;
}
