* {
    box-sizing: border-box;
}

.form-section-card {
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--surface-2);
    padding: 14px;
    display: grid;
    gap: 12px;
}

.form-section-card h3 {
    margin: 0;
    font-size: 1rem;
}

.gestor-progress {
    display: grid;
    gap: 6px;
}

.gestor-progress > span {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.student-file-header h1 {
    font-size: 1.65rem;
}

.student-file-summary {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    align-items: stretch;
    gap: 12px;
    margin-bottom: 16px;
}

.student-file-summary-card {
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--surface);
    padding: 14px;
    display: grid;
    grid-template-rows: auto 1fr;
    gap: 6px;
    min-height: 96px;
    align-content: start;
}

.student-file-summary-card span {
    color: var(--muted);
    font-size: .82rem;
}

.student-file-summary-card strong {
    color: var(--ink);
}

.student-file-summary-card.manager-card {
    grid-template-rows: auto minmax(22px, 1fr) auto;
}

.student-file-summary-card.manager-card .compact {
    align-self: end;
    justify-self: start;
}

.student-file-workspace {
    min-height: 520px;
}

.student-file-cards {
    display: grid;
    gap: 14px;
}

.student-file-data-card {
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--surface);
    padding: 16px;
}

.student-file-data-card > header {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    align-items: start;
    margin-bottom: 14px;
}

.student-file-data-card h2 {
    margin: 0;
    font-size: 1.05rem;
}

.student-file-card-actions {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: flex-end;
}

.student-file-accordion {
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--surface);
    overflow: hidden;
}

.student-file-accordion > summary {
    align-items: center;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    gap: 12px;
    list-style: none;
    padding: 14px 16px;
}

.student-file-accordion > summary::-webkit-details-marker {
    display: none;
}

.student-file-accordion > summary h2 {
    font-size: 1.05rem;
    margin: 0;
}

.student-file-accordion > summary > span {
    color: var(--brand);
    font-size: .82rem;
    font-weight: 800;
}

.student-file-accordion[open] > summary {
    border-bottom: 1px solid var(--line);
}

.student-file-accordion > .student-data-grid {
    padding: 14px 16px 16px;
}

.fit-content {
    width: fit-content;
}

.student-manager-history {
    display: grid;
    gap: 10px;
}

.student-manager-history-item {
    border: 1px solid var(--line);
    border-left: 4px solid var(--line-strong);
    border-radius: 8px;
    background: var(--surface);
    padding: 12px;
    display: flex;
    justify-content: space-between;
    gap: 12px;
}

.student-manager-history-item.active {
    border-left-color: #0f8a5f;
    background: color-mix(in srgb, #0f8a5f 10%, var(--surface));
}

.student-manager-history-item div {
    display: grid;
    gap: 4px;
}

.student-manager-history-item span,
.student-manager-history-item small {
    color: var(--muted);
}

.document-review-queue {
    display: grid;
    gap: 14px;
}

.document-review-card {
    display: grid;
    gap: 14px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--surface);
    padding: 18px;
    box-shadow: 0 10px 28px rgba(16, 36, 58, .06);
}

.document-review-head,
.document-review-item-main,
.document-review-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.document-review-head {
    align-items: flex-start;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--line);
}

.document-review-head h2 {
    margin: 0;
    font-size: 1.15rem;
}

.document-review-head span,
.document-review-item-main span {
    color: var(--muted);
    font-size: .88rem;
}

.document-review-meta {
    display: grid;
    gap: 4px;
    text-align: right;
    min-width: max-content;
}

.document-review-meta span {
    color: var(--muted);
    font-size: .78rem;
    font-weight: 800;
    text-transform: uppercase;
}

.document-review-meta strong {
    color: var(--ink);
}

.document-review-meta small {
    color: var(--muted);
    font-size: .82rem;
    font-weight: 800;
}

.document-review-student-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 8px;
}

.document-review-student-meta span {
    display: inline-flex;
    align-items: center;
    min-height: 26px;
    padding: 4px 9px;
    border: 1px solid #d7e5f2;
    border-radius: 999px;
    color: var(--ink);
    background: #f8fbff;
    font-size: .78rem;
    font-weight: 850;
}

.document-review-list {
    display: grid;
    gap: 10px;
}

.document-review-item {
    display: grid;
    gap: 12px;
    padding: 12px;
    border: 1px solid #d7e5f2;
    border-radius: 8px;
    background: #f8fbff;
}

.document-review-item-main > div {
    display: grid;
    gap: 3px;
}

.document-review-item-main small {
    color: var(--muted);
    font-size: .8rem;
    font-weight: 750;
}

.document-review-actions {
    justify-content: flex-end;
    flex-wrap: wrap;
}

.document-review-comment {
    display: grid;
    gap: 10px;
    padding-top: 10px;
    border-top: 1px solid var(--line);
}

@media (max-width: 720px) {
    .document-review-head,
    .document-review-item-main {
        display: grid;
        align-items: stretch;
    }

    .document-review-meta {
        min-width: 0;
        text-align: left;
    }

    .document-review-actions {
        justify-content: flex-start;
    }
}

.review-reject-row td {
    background: color-mix(in srgb, #f6a20b 10%, var(--surface));
    border-top: 0;
}

.review-reject-row .form-field {
    margin-bottom: 10px;
}

.review-reject-panel {
    display: grid;
    gap: 10px;
    margin-top: 14px;
    padding: 14px;
    border: 1px solid color-mix(in srgb, #f6a20b 35%, var(--line));
    border-radius: var(--radius);
    background: color-mix(in srgb, #f6a20b 8%, var(--surface));
}

html,
body {
    min-height: 100%;
    margin: 0;
    font-family: Inter, "Segoe UI", Arial, sans-serif;
    color: var(--ink);
    background: var(--bg);
    letter-spacing: 0;
}

button,
input,
select,
textarea {
    font: inherit;
}

a {
    color: inherit;
}

h1,
h2,
p {
    margin: 0;
}

button {
    cursor: pointer;
}

.login-grid {
    display: grid;
    min-height: 100vh;
    grid-template-columns: minmax(460px, .98fr) minmax(460px, 1.02fr);
    background: var(--bg);
}

.login-brand-panel {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 32px;
    padding: 42px 48px;
    color: #f8fbff;
    background:
        radial-gradient(circle at 22% 18%, rgba(246, 162, 11, .18), transparent 28%),
        linear-gradient(145deg, rgba(2, 38, 85, .98), rgba(6, 52, 107, .95)),
        linear-gradient(90deg, rgba(255, 255, 255, .12) 1px, transparent 1px),
        linear-gradient(0deg, rgba(255, 255, 255, .12) 1px, transparent 1px);
    background-size: auto, 56px 56px, 56px 56px;
}

.login-brand-top {
    display: grid;
    gap: 28px;
    max-width: 520px;
}

.sega-lockup {
    display: flex;
    align-items: center;
    gap: 14px;
}

.sega-symbol {
    position: relative;
    display: grid;
    place-items: center;
    width: 58px;
    height: 58px;
    border-radius: 14px;
    color: #fff;
    background: var(--brand-accent);
    box-shadow: 0 16px 34px rgba(0, 0, 0, .18);
}

.sega-symbol span {
    position: relative;
    z-index: 1;
    font-size: 1.55rem;
    font-weight: 950;
}

.sega-symbol i {
    position: absolute;
    right: 9px;
    bottom: 10px;
    width: 18px;
    height: 8px;
    border-radius: 999px 999px 999px 0;
    background: rgba(6, 52, 107, .85);
    transform: rotate(-28deg);
}

.sega-wordmark {
    font-size: 1.75rem;
    font-weight: 950;
    line-height: 1;
}

.sega-submark {
    max-width: 320px;
    margin-top: 5px;
    color: rgba(248, 251, 255, .78);
    font-size: .88rem;
    font-weight: 700;
    line-height: 1.35;
}

.brand-lockup {
    display: flex;
    align-items: center;
    min-width: 0;
}

.brand-logo {
    display: block;
    width: min(320px, 100%);
    height: auto;
    padding: 12px;
    border: 1px solid rgba(255, 255, 255, .16);
    border-radius: 8px;
    background: rgba(255, 255, 255, .95);
    box-shadow: 0 18px 38px rgba(0, 0, 0, .16);
}

.brand-block {
    display: flex;
    align-items: center;
    gap: 12px;
}

.brand-mark {
    display: grid;
    width: 42px;
    height: 42px;
    flex: 0 0 auto;
    place-items: center;
    border-radius: 8px;
    color: #fff;
    background: var(--brand-accent);
    font-weight: 900;
    letter-spacing: 0;
}

.brand-name {
    font-weight: 850;
    line-height: 1.1;
}

.brand-subtitle,
.topbar-kicker,
.page-summary,
.user-role {
    color: var(--muted);
    font-size: .86rem;
}

.login-brand-panel .brand-subtitle,
.login-brand-panel .login-copy p {
    color: rgba(248, 251, 255, .8);
}

.login-copy {
    display: grid;
    max-width: 640px;
    gap: 16px;
}

.login-copy h1 {
    max-width: 680px;
    font-size: clamp(2.35rem, 3.65vw, 4rem);
    line-height: 1.03;
}

.login-kicker,
.eyebrow,
.form-heading p {
    color: var(--brand-primary);
    font-size: .72rem;
    font-weight: 850;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.login-brand-panel .login-kicker {
    color: #ffd88a;
}

.login-metrics {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.login-metrics span {
    min-height: 34px;
    padding: 8px 14px;
    border: 1px solid rgba(255, 255, 255, .22);
    border-radius: 999px;
    background: rgba(255, 255, 255, .09);
    font-size: .82rem;
    font-weight: 750;
}

.login-panel {
    display: grid;
    place-items: center;
    padding: 32px;
}

.login-card {
    width: min(100%, 460px);
    padding: 32px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--surface);
    box-shadow: var(--shadow);
}

.login-mobile-brand {
    display: none;
}

.login-mobile-logo {
    display: block;
    width: min(210px, 72vw);
    height: auto;
}

.form-heading {
    display: grid;
    gap: 6px;
    margin-bottom: 24px;
}

.form-heading h2 {
    color: var(--ink);
    font-size: 1.55rem;
}

.form-heading span,
.login-footnote {
    color: var(--muted);
    font-size: .9rem;
    line-height: 1.45;
}

.form-field {
    display: grid;
    gap: 7px;
    margin-bottom: 16px;
    color: #2e3945;
    font-size: .9rem;
    font-weight: 650;
}

.inline-check {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    color: var(--muted);
    font-size: .82rem;
    font-weight: 800;
}

.field {
    width: 100%;
    min-height: 42px;
    padding: 9px 11px;
    border: 1px solid var(--line-strong);
    border-radius: 6px;
    color: var(--ink);
    background: #fff;
    outline: none;
}

.form-input {
    width: 100%;
    min-height: 42px;
    padding: 9px 11px;
    border: 1px solid var(--line-strong);
    border-radius: 6px;
    color: var(--ink);
    background: #fff;
    outline: none;
}

.field:focus {
    border-color: var(--brand-primary);
    box-shadow: 0 0 0 3px rgba(6, 52, 107, .14);
}

.form-input:focus {
    border-color: var(--brand-primary);
    box-shadow: 0 0 0 3px rgba(6, 52, 107, .14);
}

.password-field {
    position: relative;
}

.password-field .field {
    padding-right: 76px;
}

.password-visibility-button {
    position: absolute;
    top: 50%;
    right: 6px;
    min-width: 58px;
    height: 30px;
    padding: 0 10px;
    border: 1px solid transparent;
    border-radius: 5px;
    color: var(--brand-primary);
    background: transparent;
    font-size: .78rem;
    font-weight: 850;
    line-height: 1;
    cursor: pointer;
    transform: translateY(-50%);
}

.password-visibility-button:hover,
.password-visibility-button:focus {
    background: rgba(6, 52, 107, .08);
    outline: none;
}

.login-recovery-link {
    display: inline-flex;
    justify-self: center;
    margin-top: 14px;
    color: var(--brand-primary);
    font-size: .88rem;
    font-weight: 850;
    text-decoration: none;
}

.login-recovery-link:hover {
    text-decoration: underline;
}

.primary-button,
.secondary-button,
.danger-button,
.icon-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 38px;
    border-radius: 6px;
    border: 1px solid transparent;
    font-weight: 800;
    text-decoration: none;
    transition: background .16s ease, border-color .16s ease, transform .16s ease;
}

.primary-button {
    padding: 0 16px;
    color: #fff;
    background: var(--brand-primary);
    border-color: var(--brand-primary);
}

.primary-button:hover {
    background: var(--brand-primary-strong);
}

.secondary-button {
    padding: 0 13px;
    color: var(--ink);
    background: var(--surface);
    border-color: var(--line-strong);
}

.secondary-button:hover {
    background: var(--surface-2);
}

.danger-button {
    padding: 0 13px;
    color: #991b1b;
    background: #fff7f7;
    border-color: #fecaca;
}

.danger-button:hover {
    background: #fee2e2;
}

.danger-button:disabled {
    cursor: not-allowed;
    opacity: .5;
}

.compact {
    min-height: 32px;
    padding: 0 10px;
    font-size: .82rem;
}

.segmented-tabs {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    margin: 0 0 16px;
    padding: 4px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--surface);
    box-shadow: 0 8px 22px rgba(21, 40, 63, .06);
}

.segmented-tabs button {
    min-height: 34px;
    padding: 0 14px;
    border: 1px solid transparent;
    border-radius: 6px;
    color: var(--muted);
    background: transparent;
    font-size: .88rem;
    font-weight: 850;
    cursor: pointer;
    transition: background .16s ease, border-color .16s ease, color .16s ease, box-shadow .16s ease;
}

.segmented-tabs button:hover {
    color: var(--ink);
    background: var(--surface-2);
}

.segmented-tabs button.active {
    color: var(--brand-primary);
    background: var(--brand-primary-soft);
    border-color: rgba(6, 52, 107, .18);
    box-shadow: 0 6px 14px rgba(6, 52, 107, .10);
}

.segmented-tabs button:focus-visible {
    outline: 2px solid var(--brand-accent);
    outline-offset: 2px;
}

.text-area {
    min-height: 86px;
    resize: vertical;
}

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

.unit-form-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
}

.unit-form-grid .span-2 {
    grid-column: span 2;
}

.element-form-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
}

.element-form-grid .span-2 {
    grid-column: span 2;
}

.form-switch-row {
    display: flex;
    flex-wrap: wrap;
    gap: 18px;
    margin-top: 12px;
}

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

.content-summary-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    min-width: 0;
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
}

.content-summary-card div {
    display: grid;
    min-width: 0;
    gap: 4px;
}

.content-summary-card span {
    color: var(--muted);
    font-size: .78rem;
    font-weight: 900;
    text-transform: uppercase;
}

.content-summary-card strong {
    overflow: hidden;
    color: var(--text);
    font-size: .9rem;
    font-weight: 800;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.content-editor-backdrop {
    z-index: 110;
}

.modal-panel.content-editor-modal {
    display: flex;
    flex-direction: column;
    z-index: 120;
    width: min(96vw, 1180px);
    max-height: 88vh;
    overflow: hidden;
}

.modal-panel.content-editor-modal.content-editor-modal-fullscreen {
    top: 16px;
    left: 16px;
    z-index: 140;
    width: calc(100vw - 32px);
    height: calc(100vh - 32px);
    max-height: calc(100vh - 32px);
    transform: none;
}

.modal-icon-actions {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.content-editor-body {
    min-height: 0;
    flex: 1 1 auto;
    overflow-y: auto;
    padding: 0;
}

.legal-document-editor-body {
    display: flex;
    flex-direction: column;
    gap: 14px;
    padding: 16px 20px 0;
}

.legal-document-editor-body .html-editor-shell {
    min-height: 0;
    flex: 1 1 auto;
}

.legal-document-editor-body .CodeMirror,
.legal-document-editor-body .html-code-area,
.legal-document-editor-body .html-preview {
    min-height: 0;
    height: min(48vh, 560px);
    max-height: min(48vh, 560px);
}

.content-editor-modal-fullscreen .legal-document-editor-body .CodeMirror,
.content-editor-modal-fullscreen .legal-document-editor-body .html-code-area,
.content-editor-modal-fullscreen .legal-document-editor-body .html-preview {
    min-height: 0;
    height: calc(100vh - 260px);
    max-height: calc(100vh - 260px);
}

.legal-title-field {
    flex: 0 0 auto;
}

.legal-editor-error {
    margin: 12px 20px 0;
}

.content-editor-body .html-editor-shell {
    border: 0;
    border-radius: 0;
}

.content-editor-body .CodeMirror,
.content-editor-body .html-code-area,
.content-editor-body .html-preview {
    min-height: 0;
    height: min(64vh, 720px);
    max-height: min(64vh, 720px);
}

.content-editor-modal-fullscreen .CodeMirror,
.content-editor-modal-fullscreen .html-code-area,
.content-editor-modal-fullscreen .html-preview {
    min-height: 0;
    height: calc(100vh - 190px);
    max-height: calc(100vh - 190px);
}

.content-editor-actions {
    margin: 0;
    padding: 14px 20px 18px;
    border-top: 1px solid var(--line);
}

.html-editor-shell {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #f8fafc;
}

.html-editor-shell-code-only {
    grid-template-columns: minmax(0, 1fr);
}

.html-editor-shell-code-only .html-editor-pane {
    border-right: 0;
}

.html-editor-pane,
.html-preview-pane {
    display: grid;
    grid-template-rows: auto minmax(0, 1fr);
    min-width: 0;
    min-height: 0;
}

.html-editor-pane {
    border-right: 1px solid var(--line);
}

.html-editor-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 38px;
    padding: 0 12px;
    border-bottom: 1px solid var(--line);
    color: #334151;
    font-size: .82rem;
    font-weight: 850;
}

.html-code-area {
    min-height: 220px;
    border: 0;
    border-radius: 0;
    font-family: Consolas, "Courier New", monospace;
    font-size: .9rem;
    resize: vertical;
}

.editor-format-help {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 8px 12px;
    border-top: 1px solid var(--line);
    color: var(--muted);
    background: #f8fafc;
    font-size: .78rem;
}

.html-preview {
    min-height: 220px;
    padding: 14px;
    overflow: auto;
    color: var(--ink);
    background: #fff;
}

.html-preview p {
    margin: 0 0 10px;
}

.CodeMirror {
    min-height: 220px;
    font-family: Consolas, "Courier New", monospace;
    font-size: .9rem;
}

.full {
    width: 100%;
}

.icon-button {
    width: 38px;
    height: 38px;
    color: var(--ink);
    background: var(--surface);
    border-color: var(--line);
}

.app-alert {
    display: flex;
    gap: 9px;
    align-items: center;
    margin-bottom: 16px;
    padding: 11px 12px;
    border-radius: 6px;
    font-weight: 650;
    overflow-wrap: anywhere;
}

.app-alert-error {
    color: #7a1b13;
    border: 1px solid #f0b7ad;
    background: #fff0ed;
}

.app-alert-success {
    color: #12613d;
    border: 1px solid #a7e4c0;
    background: #ecfdf3;
}

.app-alert-warning {
    color: #7a4a00;
    border: 1px solid #f5cf84;
    background: #fff8e8;
}

.login-footnote {
    margin-top: 16px;
}

.app-shell {
    display: grid;
    min-height: 100vh;
    grid-template-columns: auto 1fr;
    background: var(--bg);
}

.app-sidebar {
    position: sticky;
    top: 0;
    z-index: 20;
    display: grid;
    grid-template-rows: auto minmax(0, 1fr) auto;
    width: 276px;
    height: 100vh;
    min-height: 0;
    overflow: hidden;
    border-right: 1px solid #071c38;
    color: #eef6ff;
    background: #08294f;
    transition: width .18s ease, transform .18s ease;
}

.app-sidebar.collapsed {
    width: 82px;
}

.app-sidebar .brand-block {
    min-height: 78px;
    padding: 16px;
    border-bottom: 1px solid rgba(255, 255, 255, .08);
    background: #08294f;
}

.app-sidebar .brand-subtitle,
.app-sidebar .user-role {
    color: rgba(238, 246, 255, .66);
}

.sidebar-toggle {
    margin-left: auto;
}

.app-nav {
    display: grid;
    align-content: start;
    gap: 5px;
    min-height: 0;
    overflow-x: hidden;
    overflow-y: auto;
    padding: 14px 10px;
    scrollbar-color: rgba(255, 255, 255, .28) transparent;
    scrollbar-width: thin;
}

.app-nav::-webkit-scrollbar {
    width: 8px;
}

.app-nav::-webkit-scrollbar-thumb {
    border-radius: 999px;
    background: rgba(255, 255, 255, .22);
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 10px;
    min-height: 42px;
    padding: 0 10px;
    border-radius: 6px;
    color: rgba(238, 246, 255, .8);
    text-decoration: none;
    font-weight: 750;
}

.nav-item:hover,
.nav-item.active {
    color: #fff;
    background: rgba(255, 255, 255, .11);
}

.nav-item.disabled {
    opacity: .58;
    cursor: not-allowed;
}

.nav-icon {
    display: grid;
    width: 28px;
    height: 28px;
    place-items: center;
    border-radius: 6px;
    color: #08294f;
    background: #ffd48a;
    font-size: .78rem;
    font-weight: 900;
}

.nav-divider {
    height: 1px;
    margin: 8px 8px;
    background: rgba(255, 255, 255, .1);
}

.nav-section-label {
    padding: 8px 12px 4px;
    color: rgba(238, 246, 255, .52);
    font-size: .68rem;
    font-weight: 900;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.sidebar-user {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    gap: 10px;
    padding: 14px;
    border-top: 1px solid rgba(255, 255, 255, .08);
    background: #08294f;
}

.avatar {
    display: grid;
    width: 38px;
    height: 38px;
    flex: 0 0 auto;
    place-items: center;
    border-radius: 50%;
    color: #08294f;
    background: #ffd48a;
    font-weight: 900;
}

.user-copy {
    min-width: 0;
}

.user-name {
    display: block;
    max-width: 100%;
    overflow: hidden;
    font-weight: 850;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.app-main {
    min-width: 0;
}

.topbar {
    position: sticky;
    top: 0;
    z-index: 10;
    display: flex;
    align-items: center;
    gap: 14px;
    min-height: 70px;
    padding: 0 24px;
    border-bottom: 1px solid var(--line);
    background: rgba(255, 255, 255, .9);
    backdrop-filter: blur(14px);
}

.topbar-heading {
    min-width: 0;
}

.mobile-menu {
    display: none;
}

.topbar-kicker {
    font-size: .75rem;
    font-weight: 850;
    text-transform: uppercase;
}

.topbar-title {
    overflow: hidden;
    font-size: 1.05rem;
    font-weight: 850;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.topbar-spacer {
    flex: 1;
}

.notification-bell-wrap {
    position: relative;
}

.notification-bell-button {
    position: relative;
    display: inline-grid;
    place-items: center;
    width: 38px;
    height: 38px;
    border: 1px solid #c8d8e8;
    border-radius: 8px;
    background: #fff;
    color: var(--primary);
    font-weight: 950;
}

.notification-bell-button strong {
    position: absolute;
    top: -7px;
    right: -7px;
    display: inline-grid;
    place-items: center;
    min-width: 20px;
    height: 20px;
    padding: 0 5px;
    border-radius: 999px;
    background: #c92a2a;
    color: #fff;
    font-size: .68rem;
    line-height: 1;
}

.notification-bell-panel {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    z-index: 80;
    width: min(380px, calc(100vw - 24px));
    overflow: hidden;
    border: 1px solid #cfe0ef;
    border-radius: 8px;
    background: #fff;
    box-shadow: 0 18px 42px rgba(10, 34, 62, .18);
}

.notification-bell-panel header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 14px 16px;
    border-bottom: 1px solid #e2edf5;
}

.notification-bell-panel h3 {
    margin: 0;
    color: var(--ink);
    font-size: 1rem;
}

.notification-bell-list {
    display: grid;
    max-height: 360px;
    overflow-y: auto;
}

.notification-bell-item {
    display: grid;
    gap: 4px;
    width: 100%;
    padding: 12px 16px;
    border: 0;
    border-bottom: 1px solid #edf3f8;
    background: #fff;
    color: var(--ink);
    text-align: left;
}

.notification-bell-item.unread {
    border-left: 4px solid var(--primary);
    background: #f7fbff;
}

.notification-bell-item.read {
    color: var(--muted);
}

.notification-bell-item strong {
    font-size: .86rem;
    font-weight: 950;
}

.notification-bell-item span,
.notification-bell-empty {
    color: var(--muted);
    font-size: .78rem;
    font-weight: 700;
}

.notification-bell-empty {
    padding: 16px;
}

.notification-bell-footer {
    width: 100%;
    padding: 11px 16px;
    border: 0;
    background: #f5f9fd;
    color: var(--primary);
    font-size: .82rem;
    font-weight: 950;
}

.notification-inline-actions {
    display: flex;
    justify-content: flex-end;
    margin: 0 0 12px;
}

.topbar-account-wrap {
    position: relative;
    display: none;
}

.topbar-account-button {
    display: inline-grid;
    place-items: center;
    width: 38px;
    height: 38px;
    border: 1px solid #c8d8e8;
    border-radius: 8px;
    background: #fff;
    color: var(--primary);
    font-weight: 950;
    line-height: 1;
}

.topbar-account-panel {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    z-index: 85;
    display: grid;
    min-width: 190px;
    overflow: hidden;
    border: 1px solid #cfe0ef;
    border-radius: 8px;
    background: #fff;
    box-shadow: 0 18px 42px rgba(10, 34, 62, .18);
}

.topbar-account-panel button {
    width: 100%;
    padding: 12px 14px;
    border: 0;
    border-bottom: 1px solid #edf3f8;
    background: #fff;
    color: var(--ink);
    font: inherit;
    font-size: .86rem;
    font-weight: 850;
    text-align: left;
}

.topbar-account-panel form:last-child button {
    border-bottom: 0;
}

.notice-list {
    display: grid;
    gap: 8px;
}

.notice-card {
    display: grid;
    gap: 8px;
    padding: 10px 12px;
    border: 1px solid #d7e6f3;
    border-left: 4px solid var(--notice-accent, var(--primary));
    border-radius: 6px;
    background: var(--notice-bg, #fff);
    box-shadow: inset 0 0 0 1px rgba(10, 59, 112, .03);
}

.notice-card.notice-tone-all {
    --notice-accent: #0a3b70;
    --notice-bg: #f8fbff;
}

.notice-card.notice-tone-student {
    --notice-accent: #2f8eb5;
    --notice-bg: #f7fcff;
}

.notice-card.notice-tone-staff {
    --notice-accent: #c05621;
    --notice-bg: #fff8f3;
}

.notice-card header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.notice-card h3 {
    margin: 0;
    color: var(--ink);
    font-size: .98rem;
}

.notice-card header span {
    display: block;
    margin-top: 3px;
    color: var(--muted);
    font-size: .8rem;
    font-weight: 800;
}

.notice-summary {
    margin: 0;
    color: var(--muted);
    font-size: .86rem;
    font-weight: 750;
    line-height: 1.35;
}

.notice-content {
    min-height: 0;
    padding: 0;
    overflow: visible;
    background: transparent;
    font-size: .9rem;
    line-height: 1.42;
}

.notice-content p {
    margin: 0 0 5px;
}

.notice-content p:last-child {
    margin-bottom: 0;
}

.institutional-forum {
    align-items: start;
}

.page-frame {
    padding: 24px;
}

.access-denied-card {
    display: grid;
    gap: 10px;
    max-width: 760px;
    padding: 18px;
    border: 1px solid var(--line);
    border-left: 4px solid var(--brand-accent);
    border-radius: 8px;
    background: var(--surface);
}

.access-denied-card p {
    color: var(--ink);
    line-height: 1.55;
}

.access-denied-card span {
    color: var(--muted);
    font-size: .88rem;
    font-weight: 750;
}

.access-denied-card strong {
    color: var(--brand-primary);
}

.page-header {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 18px;
    margin-bottom: 18px;
}

.page-header h1 {
    margin-top: 3px;
    font-size: 2rem;
}

.page-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 10px;
}

.arelo-table-shell {
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--surface);
    box-shadow: 0 8px 28px rgba(21, 40, 63, .07);
}

.arelo-table-toolbar {
    padding: 16px;
    border-bottom: 1px solid var(--line);
    background: var(--surface-2);
}

.table-toolbar-main {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
}

.toolbar-title {
    font-weight: 850;
}

.toolbar-subtitle {
    color: var(--muted);
    font-size: .86rem;
}

.table-toolbar-title {
    display: grid;
    gap: 2px;
}

.table-toolbar-title strong {
    color: var(--ink);
    font-size: .96rem;
}

.table-toolbar-title span {
    color: var(--muted);
    font-size: .82rem;
    font-weight: 750;
}

.arelo-table-scroll {
    width: 100%;
    overflow-x: auto;
}

.arelo-table {
    width: 100%;
    min-width: 980px;
    border-collapse: separate;
    border-spacing: 0;
}

.arelo-table th,
.arelo-table td {
    padding: 12px;
    border-bottom: 1px solid var(--line);
    vertical-align: middle;
}

.arelo-table th {
    color: #40505f;
    background: #fbfcfd;
    font-size: .76rem;
    font-weight: 850;
    text-align: left;
    text-transform: uppercase;
}

.arelo-table tbody tr:hover {
    background: #f8fbfd;
}

.arelo-th-main {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    min-height: 28px;
}

.arelo-filter {
    margin-top: 8px;
}

.arelo-table-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 12px 16px;
    background: var(--surface);
}

.arelo-page-info,
.arelo-page-info label,
.arelo-pagination {
    display: flex;
    align-items: center;
    gap: 10px;
}

.arelo-page-info {
    color: var(--muted);
    font-size: .86rem;
    font-weight: 700;
}

.page-size-select {
    width: 74px;
}

.page-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    min-height: 34px;
    border: 1px solid var(--line);
    border-radius: 6px;
    color: var(--ink);
    background: var(--surface);
    font-weight: 800;
}

.page-button.active {
    color: #fff;
    background: var(--brand-primary);
    border-color: var(--brand-primary);
}

.page-ellipsis {
    color: var(--muted);
}

.key-cell {
    color: var(--brand-primary-strong);
    font-family: "Cascadia Mono", Consolas, monospace;
    font-weight: 850;
}

.description-cell {
    max-width: 540px;
    color: #26323f;
    font-weight: 650;
}

.muted-cell {
    color: var(--muted);
    font-size: .86rem;
}

.soft-badge,
.status-badge {
    display: inline-flex;
    align-items: center;
    min-height: 26px;
    padding: 0 9px;
    border-radius: 999px;
    font-size: .78rem;
    font-weight: 800;
    white-space: nowrap;
}

.soft-badge {
    color: #45515d;
    background: #eef2f5;
}

.role-badge-list {
    display: flex;
    max-width: 34rem;
    max-height: 5.9rem;
    flex-wrap: wrap;
    gap: 6px;
    overflow: hidden;
}

.role-badge-list .soft-badge {
    min-height: 24px;
    font-size: .72rem;
}

.status-badge.success {
    color: #12613d;
    background: #dcfce7;
}

.status-badge.draft {
    color: #5e4616;
    background: #fff4d8;
}

.status-badge.warning {
    color: #8a4b08;
    background: #ffedd5;
}

.status-badge.info {
    color: #0a3b70;
    background: #dbeafe;
}

.status-badge.delivery-draft {
    color: #4b5563;
    background: #f1f3f5;
}

.status-badge.danger {
    color: #991b1b;
    background: #fee2e2;
}

.status-badge.course-state-draft {
    color: #5e4616;
    background: #fff4d8;
}

.status-badge.course-state-ready {
    color: #075985;
    background: #e0f2fe;
}

.status-badge.course-state-open {
    color: #12613d;
    background: #dcfce7;
}

.status-badge.course-state-closed {
    color: #475569;
    background: #e8eef7;
}

.status-badge.course-state-cancelled {
    color: #991b1b;
    background: #fee2e2;
}

.status-badge.course-empty {
    color: #64748b;
    background: #eef2f7;
}

.status-badge.course-populated {
    color: #61420a;
    background: #ffe8a3;
}

.modal-message {
    padding: 16px 20px 2px;
    color: var(--muted);
    font-size: .96rem;
    font-weight: 650;
    line-height: 1.55;
}

.skeleton-line {
    width: 100%;
    height: 16px;
    border-radius: 999px;
    background: linear-gradient(90deg, #edf1f4, #f7f9fb, #edf1f4);
    background-size: 200% 100%;
    animation: shimmer 1.2s infinite linear;
}

@keyframes shimmer {
    to {
        background-position: -200% 0;
    }
}

.empty-cell {
    padding: 46px 20px;
    color: var(--muted);
    text-align: center;
}

.empty-icon {
    color: var(--line-strong);
    font-size: 2rem;
}

.empty-title {
    margin-top: 8px;
    color: var(--ink);
    font-size: 1.05rem;
    font-weight: 850;
}

.empty-message {
    margin-top: 4px;
}

.modal-backdrop-soft {
    position: fixed;
    inset: 0;
    z-index: 80;
    background: rgba(16, 31, 43, .45);
}

.modal-panel {
    position: fixed;
    top: 50%;
    left: 50%;
    z-index: 90;
    width: min(92vw, 640px);
    max-height: 88vh;
    overflow: auto;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--surface);
    box-shadow: var(--shadow);
    transform: translate(-50%, -50%);
}

.wide-modal {
    width: min(94vw, 820px);
}

.academic-modal {
    width: min(96vw, 1180px);
}

.period-modal-body {
    display: grid;
    gap: 14px;
}

.period-modal-section {
    display: grid;
    gap: 12px;
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fbfdff;
}

.period-section-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.period-main-grid,
.period-matricula-grid {
    gap: 12px 14px;
}

.period-active-switch {
    min-height: 30px;
    padding: 0 10px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: var(--surface);
}

.compact-note {
    margin: 0;
}

.small-modal {
    width: min(92vw, 460px);
}

.scholarship-modal {
    width: min(96vw, 980px);
}

.scholarship-form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
    padding: 16px 20px 0;
}

.scholarship-card {
    display: grid;
    align-content: start;
    gap: 13px;
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fbfdff;
}

.scholarship-card header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--line);
}

.scholarship-card h3 {
    margin: 2px 0 0;
    color: var(--ink);
    font-size: 1.02rem;
    line-height: 1.2;
}

.scholarship-card header > strong {
    flex: 0 0 auto;
    padding: 7px 10px;
    border-radius: 999px;
    color: #7c4d00;
    background: #fff4d8;
    font-size: .88rem;
    font-weight: 900;
}

.scholarship-data-row {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
}

.scholarship-data-row span {
    display: grid;
    gap: 3px;
    padding: 9px 10px;
    border: 1px solid var(--line);
    border-radius: 8px;
    color: var(--muted);
    background: #fff;
    font-size: .78rem;
    font-weight: 800;
}

.scholarship-data-row strong {
    color: var(--ink);
    font-size: .9rem;
}

.scholarship-note {
    padding: 11px 12px;
    border: 1px solid #f5cf84;
    border-radius: 8px;
    color: #7a4a00;
    background: #fff8e8;
    font-size: .88rem;
    font-weight: 750;
    line-height: 1.45;
}

.scholarship-note strong {
    display: block;
    margin-top: 4px;
    color: var(--ink);
}

.control-period-grid {
    grid-template-columns: minmax(300px, 0.9fr) minmax(360px, 1.1fr);
}

.control-period-config-grid {
    grid-template-columns: minmax(340px, 0.95fr) minmax(420px, 1.05fr);
}

.period-workspace {
    display: grid;
    grid-template-columns: minmax(280px, 360px) minmax(0, 1fr);
    gap: 16px;
    align-items: start;
}

.period-workspace.summary-collapsed {
    grid-template-columns: 56px minmax(0, 1fr);
}

.period-summary-panel,
.period-config-workspace,
.period-summary-rail {
    min-width: 0;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--surface);
}

.period-summary-rail {
    display: grid;
    grid-template-rows: auto minmax(0, 1fr);
    justify-items: center;
    gap: 14px;
    min-height: 190px;
    padding: 10px 8px;
    box-shadow: var(--shadow-soft);
}

.period-summary-rail span {
    writing-mode: vertical-rl;
    transform: rotate(180deg);
    color: var(--brand);
    font-size: .84rem;
    font-weight: 900;
    letter-spacing: 0;
    text-transform: uppercase;
}

.period-summary-panel {
    position: sticky;
    top: 84px;
    padding: 16px;
}

.period-summary-collapse-bar {
    display: flex;
    justify-content: flex-end;
    margin-bottom: 10px;
}

.period-config-workspace {
    overflow: hidden;
}

.period-summary-stack {
    display: grid;
    gap: 10px;
    margin-top: 14px;
}

.period-summary-stack > div {
    padding: 10px 12px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--surface-2);
}

.period-summary-stack span {
    display: block;
    color: var(--muted);
    font-size: .76rem;
}

.period-summary-stack strong {
    display: block;
    margin-top: 3px;
    overflow-wrap: anywhere;
}

.editor-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    padding: 12px 14px 0;
    border-bottom: 1px solid var(--line);
    background: var(--surface-2);
}

.mobile-tab-selector {
    display: none;
    gap: 6px;
    padding: 12px 14px;
    border-bottom: 1px solid var(--line);
    background: var(--surface-2);
    color: var(--muted);
    font-size: .78rem;
    font-weight: 850;
}

.mobile-tab-selector span {
    display: block;
}

.mobile-tab-selector .field {
    width: 100%;
    min-height: 42px;
    margin-top: 6px;
    color: var(--ink);
    font-weight: 850;
}

.mobile-tab-selector.compact-mobile-selector {
    padding: 10px 0;
    border-bottom: 0;
    background: transparent;
}

.editor-tab {
    min-height: 38px;
    padding: 0 14px;
    border: 1px solid transparent;
    border-bottom: 0;
    border-radius: 8px 8px 0 0;
    color: var(--muted);
    background: transparent;
    font-weight: 800;
    cursor: pointer;
}

.editor-tab:hover {
    color: var(--ink);
    background: rgba(255, 255, 255, .58);
}

.editor-tab.active {
    color: var(--brand);
    border-color: var(--line);
    background: var(--surface);
}

.editor-tab-body {
    padding: 16px;
    background: var(--surface);
}

.tab-section {
    display: grid;
    gap: 14px;
}

.tab-section-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 14px;
}

.tab-section-header h2 {
    margin-top: 3px;
    color: var(--text);
    font-size: 1.18rem;
}

@media (max-width: 760px) {
    .mobile-tab-selector {
        display: grid;
    }

    .responsive-tab-buttons {
        display: none;
    }
}

.section-mini-eyebrow {
    margin-top: 18px;
}

.period-config-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 16px;
}

.config-pill {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    padding: 0 10px;
    border: 1px solid var(--line);
    border-radius: 999px;
    color: var(--muted);
    background: var(--surface-2);
    font-size: 0.83rem;
    font-weight: 700;
}

.config-pill.active {
    border-color: color-mix(in srgb, var(--success) 38%, var(--line));
    color: #0f6841;
    background: color-mix(in srgb, var(--success) 14%, var(--surface));
}

.panel-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 14px;
}

.panel-head h2 {
    margin-top: 3px;
    color: var(--text);
    font-size: 1.12rem;
}

.info-strip {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    margin-top: 16px;
}

.info-strip > div {
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--surface-2);
}

.info-strip span {
    display: block;
    color: var(--muted);
    font-size: .78rem;
}

.info-strip strong {
    display: block;
    margin-top: 4px;
    overflow-wrap: anywhere;
}

.document-requirements {
    display: grid;
    gap: 10px;
    margin-top: 16px;
}

.document-requirements-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 10px 0;
}

.document-requirements-toolbar > div {
    display: grid;
    gap: 2px;
}

.document-requirements-toolbar strong {
    color: var(--ink);
    font-size: .95rem;
}

.document-requirements-toolbar span {
    color: var(--muted);
    font-size: .82rem;
    font-weight: 750;
}

.document-general-instructions {
    display: grid;
    gap: 12px;
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fbfdff;
}

.document-general-instructions h3 {
    margin: 3px 0 0;
    color: var(--text);
    font-size: 1.08rem;
}

.html-template-help {
    padding: 10px 12px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--surface);
}

.html-template-help summary {
    color: var(--muted);
    font-size: .84rem;
    font-weight: 850;
    cursor: pointer;
}

.html-template-help div {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
    margin-top: 10px;
}

.html-template-help-actions {
    align-items: center;
    justify-content: flex-start;
}

.html-template-help-actions span {
    color: var(--success);
    font-size: .82rem;
    font-weight: 850;
}

.html-template-help code {
    padding: 5px 7px;
    border: 1px solid var(--line);
    border-radius: 6px;
    color: var(--primary);
    background: #eef6ff;
    font-size: .78rem;
    font-weight: 850;
}

.document-requirement-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding: 12px 14px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--surface);
}

.toggle-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px 14px;
    margin: 0;
}

.toggle-grid label,
.left-actions {
    align-items: center;
}

.form-section-title {
    margin: 0;
    color: var(--brand);
    font-size: 0.82rem;
    font-weight: 800;
    text-transform: uppercase;
}

.left-actions {
    justify-content: flex-start;
    margin: 14px 0;
}

.sega-doc-card {
    display: grid;
    gap: 12px;
    padding: 18px;
    border: 1px solid var(--line);
    border-left: 4px solid var(--primary);
    border-radius: 8px;
    background: var(--surface);
    box-shadow: var(--shadow-soft);
}

.sega-doc-card.info {
    border-left-color: #2f80b8;
}

.sega-doc-card.warning {
    border-left-color: #f59e0b;
}

.sega-doc-title {
    margin: 0;
    color: var(--primary);
    font-size: 1.12rem;
}

.sega-doc-card p,
.sega-doc-card ul {
    margin-top: 0;
    line-height: 1.6;
}

.sega-doc-alert {
    padding: 12px 14px;
    border: 1px solid var(--line);
    border-radius: 8px;
    line-height: 1.55;
}

.sega-doc-alert.info {
    border-color: #b8daf2;
    color: #0b4f7d;
    background: #eef8ff;
}

.sega-doc-alert.warning {
    border-color: #f6d58f;
    color: #7a4a05;
    background: #fff7e6;
}

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

.sega-doc-note {
    padding: 10px 12px;
    border-radius: 8px;
    color: var(--muted);
    background: var(--surface-2);
    font-size: .9rem;
    font-weight: 700;
}

@media (max-width: 920px) {
    .control-period-grid,
    .control-period-config-grid,
    .period-workspace,
    .period-workspace.summary-collapsed,
    .toggle-grid {
        grid-template-columns: 1fr;
    }

    .period-summary-panel {
        position: static;
    }

    .document-requirement-card {
        align-items: flex-start;
        flex-direction: column;
    }

    .tab-section-header {
        flex-direction: column;
    }

    .sega-doc-grid {
        grid-template-columns: 1fr;
    }
}

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 18px 20px;
    border-bottom: 1px solid var(--line);
}

.modal-header h2 {
    margin-top: 3px;
    font-size: 1.35rem;
}

.modal-panel form,
.modal-body {
    padding: 20px;
}

.modal-body-stack {
    display: grid;
    gap: 16px;
}

.modal-copy {
    margin: 0;
    color: var(--muted);
    line-height: 1.55;
}

.modal-chip-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.chip {
    display: inline-flex;
    align-items: center;
    min-height: 26px;
    max-width: 100%;
    padding: 0 9px;
    border-radius: 999px;
    color: #415166;
    background: #eef4f8;
    font-size: .78rem;
    font-weight: 800;
    line-height: 1.25;
}

.chip.warning {
    color: #7a4b05;
    background: #fff4d8;
    border: 1px solid #f6c76a;
}

.institution-band {
    display: grid;
    gap: 18px;
    padding: 22px 0 28px;
    border-top: 1px solid var(--line);
}

.institution-summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 18px 0 22px;
    border-top: 1px solid var(--line);
}

.institution-identity {
    display: flex;
    align-items: center;
    gap: 14px;
    min-width: 0;
}

.institution-logo-frame {
    display: grid;
    place-items: center;
    width: 58px;
    height: 46px;
    flex: 0 0 auto;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
}

.institution-logo-frame.large {
    width: 150px;
    height: 92px;
}

.institution-logo-frame img {
    display: block;
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    padding: 6px;
}

.institution-mark {
    display: grid;
    place-items: center;
    width: 42px;
    height: 42px;
    border-radius: 8px;
    background: var(--accent-soft);
    color: var(--primary);
    font-size: 1.05rem;
    font-weight: 900;
}

.institution-name {
    font-size: 1.15rem;
    font-weight: 850;
    color: var(--text);
}

.institution-meta {
    margin-top: 2px;
    color: var(--muted);
    font-size: .86rem;
    font-weight: 700;
}

.logo-editor {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    gap: 16px;
    align-items: center;
    margin-bottom: 16px;
}

.file-field {
    padding: 8px 11px;
}

.compact-file-input {
    max-width: 210px;
    min-height: 34px;
    padding: 5px 8px;
    font-size: 12px;
}

.section-heading {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 16px;
}

.section-heading h2 {
    font-size: 1.1rem;
}

.section-heading p {
    margin-top: 3px;
    color: var(--muted);
    font-size: .88rem;
    font-weight: 650;
}

.inline-actions {
    display: flex;
    justify-content: flex-end;
    margin-top: 16px;
}

.campus-list {
    display: grid;
    gap: 10px;
}

.campus-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 170px auto auto;
    align-items: center;
    gap: 14px;
    padding: 14px 0;
    border-bottom: 1px solid var(--line);
}

.campus-main {
    min-width: 0;
}

.empty-state-soft {
    padding: 24px 0;
    color: var(--muted);
}

.empty-state-soft h3 {
    margin-bottom: 4px;
    color: var(--text);
    font-size: 1rem;
}

.textarea-field {
    min-height: 92px;
    resize: vertical;
}

.form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
}

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

.treasury-form-grid {
    grid-template-columns: minmax(0, 1.18fr) minmax(0, .82fr);
    gap: 10px 12px;
}

.treasury-form-grid .form-field {
    margin-bottom: 0;
}

.treasury-form-grid .compact-field {
    max-width: 220px;
}

.form-inline-checks {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    align-items: center;
}

.form-inline-checks label {
    display: inline-flex;
    gap: 8px;
    align-items: center;
    color: var(--muted);
    font-size: .9rem;
    font-weight: 800;
}

.treasury-workspace {
    display: grid;
    grid-template-columns: minmax(260px, 340px) minmax(0, 1fr);
    gap: 14px;
}

.treasury-workspace.summary-collapsed {
    grid-template-columns: 56px minmax(0, 1fr);
}

.treasury-workspace-wide {
    grid-template-columns: minmax(0, 1fr);
}

.treasury-period-panel {
    align-self: start;
    display: grid;
    gap: 14px;
}

.treasury-summary-stack {
    margin-top: 4px;
}

.treasury-selected-account {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px;
    margin-top: 12px;
}

.treasury-selected-account > div {
    min-width: 0;
    padding: 10px 12px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--soft-surface);
}

.treasury-selected-account span {
    display: block;
    color: var(--muted);
    font-size: .78rem;
    font-weight: 900;
}

.treasury-selected-account strong {
    display: block;
    margin-top: 3px;
    color: var(--text);
    font-size: .92rem;
    overflow-wrap: anywhere;
}

.treasury-form-card {
    display: grid;
    gap: 14px;
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fbfdff;
}

.treasury-form-card + .treasury-form-card,
.treasury-form-card + .document-general-instructions {
    margin-top: 2px;
}

.treasury-form-card .page-summary {
    margin-top: 3px;
}

.scholarship-review-list {
    display: grid;
    gap: 14px;
}

.scholarship-review-card {
    display: grid;
    gap: 14px;
    padding: 16px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
}

.scholarship-review-head,
.scholarship-review-actions {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
}

.scholarship-review-head h3 {
    margin: 2px 0 4px;
    font-size: 1.18rem;
}

.scholarship-review-head p {
    margin: 0;
    color: var(--muted);
    font-size: .9rem;
}

.scholarship-total {
    min-width: 180px;
    padding: 12px 14px;
    border-radius: 8px;
    color: #784600;
    background: #fff4d8;
    text-align: right;
}

.scholarship-total span,
.scholarship-money-grid span {
    display: block;
    color: var(--muted);
    font-size: .76rem;
    font-weight: 850;
    text-transform: uppercase;
}

.scholarship-total strong {
    display: block;
    margin-top: 3px;
    font-size: 1.35rem;
}

.scholarship-money-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
}

.scholarship-money-grid section {
    min-width: 0;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--surface);
}

.scholarship-money-grid strong {
    display: block;
    margin-top: 4px;
    font-size: 1.08rem;
}

.scholarship-money-grid small {
    display: block;
    margin-top: 2px;
    color: var(--muted);
    font-size: .78rem;
    font-weight: 750;
}

.scholarship-money-grid em {
    display: inline-flex;
    margin-top: 8px;
    padding: 4px 8px;
    border-radius: 999px;
    color: #7c4d00;
    background: #fff4d8;
    font-size: .72rem;
    font-style: normal;
    font-weight: 850;
}

.scholarship-note {
    margin: 0;
    padding: 10px 12px;
    border: 1px solid #d7e5f2;
    border-radius: 8px;
    color: #3a526d;
    background: #f8fbff;
    font-size: .88rem;
}

.student-registration-form {
    margin-top: 16px;
}

.inline-field-action {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 8px;
    align-items: center;
}

.readonly-field {
    background: #f4f8fb;
    color: var(--muted);
}

.registration-form-actions {
    margin-top: 18px;
    padding-top: 16px;
    border-top: 1px solid var(--line);
}

.registration-form-section {
    display: grid;
    gap: 12px;
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fbfdff;
}

.registration-form-section + .registration-form-section {
    margin-top: 14px;
}

.registration-switch-row {
    min-height: 42px;
    padding: 10px 0;
}

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

.reset-password-field {
    width: 100%;
    min-width: 0;
}

.field-hint {
    display: inline-block;
    margin-top: .35rem;
    color: var(--muted);
    font-size: .85rem;
    font-weight: 700;
}

.field-hint.success {
    color: #087f5b;
}

.field-hint.warning-text {
    color: #9a5b00;
}

.validation-message {
    color: #b42318;
    font-size: .82rem;
    font-weight: 800;
    line-height: 1.35;
}

.validation-errors {
    color: #b42318;
    font-size: .86rem;
    font-weight: 800;
    line-height: 1.45;
}

.switch-row {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--muted);
    font-size: .88rem;
    font-weight: 750;
}

.standalone-switch {
    margin-top: 14px;
}

.form-note {
    margin: 8px 0 18px;
    padding: 10px 12px;
    border: 1px solid #d7e5f2;
    border-left: 4px solid var(--primary);
    border-radius: 6px;
    color: var(--muted);
    background: #f8fbff;
    font-size: .86rem;
    font-weight: 700;
}

.label-with-help {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.help-dot {
    display: inline-grid;
    place-items: center;
    width: 24px;
    height: 24px;
    border: 1px solid #b8cce0;
    border-radius: 999px;
    color: var(--primary);
    background: #f8fbff;
    font-size: .82rem;
    font-weight: 900;
    cursor: pointer;
}

.format-help {
    display: grid;
    gap: 6px;
    margin-top: 10px;
    padding: 12px;
    border: 1px solid #d7e5f2;
    border-radius: 8px;
    color: var(--muted);
    background: #f8fbff;
    font-size: .86rem;
    line-height: 1.45;
}

.format-help strong {
    color: var(--primary);
}

.admin-switch {
    min-height: 42px;
    align-self: end;
    margin-bottom: 16px;
}

.academic-workspace {
    display: grid;
    grid-template-columns: minmax(260px, 340px) minmax(0, 1fr);
    gap: 18px;
    align-items: start;
}

.academic-workspace.programs-collapsed {
    grid-template-columns: 56px minmax(0, 1fr);
}

.academic-program-list,
.academic-detail {
    min-width: 0;
    border-top: 1px solid var(--line);
    background: rgba(255, 255, 255, .42);
}

.academic-program-list {
    padding-top: 16px;
}

.programs-collapsed .academic-program-list {
    padding-top: 12px;
}

.programs-collapsed .workspace-panel-head {
    justify-content: center;
}

.programs-collapsed .workspace-panel-head > div,
.programs-collapsed .workspace-search,
.programs-collapsed .program-stack,
.programs-collapsed .academic-program-list .empty-state-soft {
    display: none;
}

.program-collapse-button {
    flex: 0 0 auto;
    min-width: 34px;
}

.academic-detail {
    padding-top: 18px;
}

.workspace-panel-head,
.academic-detail-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 14px;
}

.workspace-panel-head h2,
.academic-detail-head h2 {
    margin: 0;
    color: var(--text);
    font-size: 1.08rem;
}

.workspace-panel-head p,
.academic-detail-head p {
    margin: 4px 0 0;
    color: var(--muted);
    font-size: .88rem;
}

.workspace-search {
    margin: 14px 0;
}

.program-stack {
    display: grid;
    gap: 8px;
}

.program-list-item {
    display: grid;
    gap: 5px;
    width: 100%;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 7px;
    color: var(--text);
    background: rgba(255, 255, 255, .72);
    text-align: left;
}

.program-list-item:hover,
.program-list-item.active {
    border-color: rgba(11, 61, 112, .35);
    background: #fff8e8;
}

.program-title {
    font-weight: 900;
}

.program-meta {
    color: var(--muted);
    font-size: .82rem;
    font-weight: 750;
}

.program-counters {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.program-counters span {
    padding: 2px 7px;
    border-radius: 999px;
    color: #0b3d70;
    background: #e8f2ff;
    font-size: .72rem;
    font-weight: 850;
}

.detail-actions {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.workspace-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 18px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--line);
}

.workspace-tab {
    min-height: 34px;
    padding: 0 12px;
    border: 1px solid var(--line);
    border-radius: 999px;
    color: var(--muted);
    background: #fff;
    font-size: .82rem;
    font-weight: 850;
}

.workspace-tab.active {
    border-color: rgba(11, 61, 112, .5);
    color: #0b3d70;
    background: #e8f2ff;
}

.workspace-section {
    padding-top: 16px;
}

.metric-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px;
}

.metric-tile {
    display: grid;
    gap: 6px;
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: 7px;
    background: #fff;
}

.metric-tile span {
    color: var(--muted);
    font-size: .78rem;
    font-weight: 850;
}

.metric-tile strong {
    color: var(--text);
    font-size: 1.45rem;
}

.data-strip {
    display: grid;
    grid-template-columns: 140px minmax(0, 1fr);
    gap: 12px;
    margin-top: 12px;
    padding: 12px 0;
    border-top: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
}

.data-strip span {
    color: var(--muted);
    font-size: .82rem;
    font-weight: 850;
}

.data-strip strong {
    min-width: 0;
    overflow-wrap: anywhere;
    color: var(--text);
}

.program-resource-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    margin-top: 14px;
}

.program-resource-card {
    display: grid;
    gap: 12px;
    min-width: 0;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 7px;
    background: #fff;
}

.program-resource-card div:first-child {
    display: grid;
    gap: 4px;
    min-width: 0;
}

.program-resource-card span {
    color: #0b3d70;
    font-size: .72rem;
    font-weight: 900;
    text-transform: uppercase;
}

.program-resource-card strong {
    min-width: 0;
    color: var(--text);
    font-size: .9rem;
    overflow-wrap: anywhere;
}

.program-resource-card small {
    color: var(--muted);
    font-weight: 650;
}

.study-program-modal {
    width: min(92vw, 620px);
}

.study-program-body {
    display: grid;
    gap: 14px;
    padding: 18px 20px 4px;
}

.study-program-status-card,
.study-program-rule-card,
.study-program-upload {
    display: grid;
    gap: 7px;
    min-width: 0;
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
}

.study-program-status-card {
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
}

.study-program-status-card div {
    display: grid;
    gap: 4px;
    min-width: 0;
}

.study-program-status-card span,
.study-program-rule-card span,
.study-program-upload > span {
    color: var(--brand-primary);
    font-size: .72rem;
    font-weight: 900;
    text-transform: uppercase;
}

.study-program-status-card strong,
.study-program-rule-card strong,
.study-program-upload strong {
    min-width: 0;
    color: var(--text);
    font-size: .98rem;
    overflow-wrap: anywhere;
}

.study-program-status-card small,
.study-program-rule-card small,
.study-program-upload small {
    color: var(--muted);
    font-weight: 650;
    line-height: 1.45;
}

.study-program-upload {
    cursor: pointer;
    background: var(--surface-2);
}

.study-program-upload .file-field {
    background: #fff;
}

.study-program-confirm {
    display: grid;
    gap: 6px;
}

.element-context-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    margin-bottom: 14px;
    padding: 12px 0;
    border-top: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
}

.element-context-bar div {
    display: grid;
    gap: 3px;
    min-width: 0;
}

.element-context-bar span {
    color: #0b3d70;
    font-size: .72rem;
    font-weight: 900;
    text-transform: uppercase;
}

.element-context-bar strong {
    color: var(--text);
    font-size: 1rem;
    overflow-wrap: anywhere;
}

.element-context-bar small {
    color: var(--muted);
    font-weight: 700;
}

.chip-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 28px;
    padding: 4px 10px;
    border: 1px solid rgba(11, 61, 112, .2);
    border-radius: 999px;
    color: #0b3d70;
    background: #eef6ff;
    font-weight: 850;
    cursor: pointer;
}

.chip-button:disabled {
    color: var(--muted);
    background: #f1f5f9;
    cursor: default;
}

.curriculum-map {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
}

.map-stage {
    display: grid;
    align-content: start;
    gap: 10px;
    min-height: 0;
    padding: 0;
}

.map-stage header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 10px;
    min-height: 42px;
    padding: 0 0 8px;
    border-bottom: 1px solid var(--line);
}

.map-stage header div {
    display: grid;
    gap: 2px;
    min-width: 0;
}

.map-stage header span {
    color: #0b3d70;
    font-size: .68rem;
    font-weight: 900;
}

.map-stage header strong {
    color: var(--text);
    font-size: .9rem;
    line-height: 1.2;
}

.map-stage header small {
    color: var(--muted);
    font-size: .7rem;
    font-weight: 850;
    white-space: nowrap;
}

.map-unit-list {
    display: grid;
    gap: 6px;
}

.map-unit {
    display: grid;
    gap: 4px;
    padding: 10px 12px;
    border: 1px solid rgba(11, 61, 112, .18);
    border-left: 3px solid var(--brand-primary);
    border-radius: 7px;
    background: rgba(255, 255, 255, .78);
}

.map-unit div {
    display: grid;
    gap: 2px;
    min-width: 0;
}

.map-unit strong {
    color: #0b3d70;
    font-size: .68rem;
    letter-spacing: .02em;
    text-transform: uppercase;
}

.map-unit span {
    min-width: 0;
    color: var(--text);
    font-size: .88rem;
    font-weight: 850;
    line-height: 1.28;
}

.map-unit small {
    color: var(--muted);
    font-size: .78rem;
    font-weight: 750;
    line-height: 1.35;
}

.map-empty {
    padding: 10px;
    border: 1px dashed var(--line);
    border-radius: 7px;
    background: rgba(255, 255, 255, .65);
    color: var(--muted);
    font-weight: 750;
}

.compact-list {
    display: grid;
}

.section-toolbar {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 14px;
    margin-bottom: 12px;
}

.section-toolbar h3 {
    margin: 0 0 4px;
    color: var(--text);
    font-size: 1rem;
}

.section-toolbar p {
    margin: 0;
    color: var(--muted);
}

.compact-selector {
    display: grid;
    gap: 6px;
    min-width: min(420px, 100%);
    color: #2e3945;
    font-size: .86rem;
    font-weight: 750;
}

.compact-chip-list {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.tag-editor {
    display: grid;
    gap: 10px;
}

.tag-chip-list {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
}

.tag-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-height: 28px;
    padding: 4px 8px 4px 10px;
    border-radius: 999px;
    color: var(--brand-primary);
    background: rgba(6, 52, 107, .08);
    font-size: .82rem;
    font-weight: 800;
}

.tag-chip button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 18px;
    border: 0;
    border-radius: 999px;
    color: var(--brand-primary);
    background: rgba(255, 255, 255, .74);
    line-height: 1;
    cursor: pointer;
}

.tag-chip button:hover {
    background: #fff;
}

.tag-add-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 8px;
    align-items: center;
}

.compact-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto auto auto;
    align-items: center;
    gap: 10px;
    padding: 12px 0;
    border-bottom: 1px solid var(--line);
}

.pending-panel {
    padding: 22px;
    border: 1px dashed rgba(11, 61, 112, .28);
    border-radius: 7px;
    background: #fff8e8;
}

.pending-panel h3 {
    margin: 0 0 6px;
    color: var(--text);
    font-size: 1rem;
}

.pending-panel p {
    margin: 0;
    color: var(--muted);
}

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

.import-panel {
    display: grid;
    gap: 14px;
    padding: 16px;
    border: 1px solid var(--line);
    border-radius: 7px;
    background: #fff;
}

.import-panel header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
}

.import-panel h3 {
    margin: 0 0 5px;
    color: var(--text);
    font-size: 1rem;
}

.import-panel p {
    margin: 0;
    color: var(--muted);
    font-size: .86rem;
}

.import-flow {
    display: grid;
    gap: 10px;
}

.import-result {
    display: grid;
    gap: 8px;
    padding: 11px;
    border-radius: 7px;
    font-size: .86rem;
}

.import-result.success {
    color: #087f5b;
    background: #dff8ea;
}

.import-result.error {
    color: #8a1f11;
    background: #ffe8de;
}

.import-errors {
    display: grid;
    gap: 4px;
    color: inherit;
    font-size: .8rem;
    font-weight: 750;
}

.role-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 9px;
    margin-top: 6px;
}

.role-chip {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 36px;
    padding: 0 11px;
    border: 1px solid var(--line-strong);
    border-radius: 999px;
    color: #45515d;
    background: #fff;
    font-size: .82rem;
    font-weight: 800;
}

.role-chip.active {
    color: #fff;
    border-color: var(--brand-primary);
    background: var(--brand-primary);
}

.role-chip.muted-option {
    opacity: .62;
}

.role-chip input {
    margin: 0;
}

.library-form-layout {
    max-width: 920px;
}

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

.library-form-grid .span-2 {
    grid-column: span 2;
}

.textarea-field {
    min-height: 96px;
    resize: vertical;
}

.soft-badge-button {
    border: 0;
    cursor: pointer;
    font: inherit;
}

.soft-badge-button:hover {
    color: var(--brand-primary);
    outline: 1px solid var(--line-strong);
}

.library-assign-modal {
    max-width: 920px;
}

.library-preview-modal {
    display: flex;
    flex-direction: column;
    width: min(96vw, 1180px);
    max-height: 92vh;
    overflow: hidden;
}

.library-preview-frame {
    width: 100%;
    height: min(76vh, 820px);
    border: 0;
    background: #f8fafc;
}

.library-preview-empty {
    padding: 44px 20px;
    text-align: center;
}

.document-viewer-shell {
    min-height: calc(100vh - 190px);
    border: 1px solid var(--line);
    border-radius: 7px;
    overflow: hidden;
    background: #fff;
}

.document-viewer-frame {
    display: block;
    width: 100%;
    height: calc(100vh - 190px);
    min-height: 620px;
    border: 0;
    background: #f8fafc;
}

.document-selector-bar {
    margin-bottom: 14px;
    padding: 12px 0;
    border-top: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
}

.document-selector-bar .form-field {
    max-width: 420px;
}

.assignment-summary {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 12px 18px;
    border-bottom: 1px solid var(--line);
    color: var(--muted);
}

.assignment-summary strong {
    color: var(--text);
}

.assignment-list,
.unit-pick-list {
    display: grid;
    gap: 8px;
    padding: 14px 18px;
    max-height: 260px;
    overflow: auto;
}

.assignment-row,
.unit-pick-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto auto;
    align-items: center;
    gap: 10px;
    padding: 10px;
    border: 1px solid var(--line);
    border-radius: 7px;
    background: #fff;
}

.unit-pick-row {
    grid-template-columns: auto minmax(0, 1fr);
    cursor: pointer;
}

.unit-pick-row input {
    margin: 0;
}

.unit-pick-row span {
    display: grid;
    gap: 2px;
}

.unit-pick-row small {
    color: var(--muted);
    font-size: .78rem;
}

.assignment-picker {
    border-top: 1px solid var(--line);
}

.compact-toolbar {
    padding: 14px 18px 0;
}

.assignment-picker .workspace-search {
    margin: 12px 18px 0;
    width: calc(100% - 36px);
}

.library-assignment-page {
    display: grid;
    gap: 14px;
}

.library-assignment-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding-bottom: 14px;
    border-bottom: 1px solid var(--line);
}

.library-assignment-header h2 {
    margin: 0;
    color: var(--ink);
    font-size: 1.35rem;
}

.library-assignment-header span {
    color: var(--muted);
    font-size: .85rem;
    font-weight: 750;
}

.library-assignment-count {
    display: grid;
    min-width: 150px;
    justify-items: center;
    gap: 2px;
    padding: 10px 14px;
    border: 1px solid #b9d3ea;
    border-radius: 8px;
    background: #f8fbff;
    color: var(--brand-primary);
}

.library-assignment-count strong {
    font-size: 1.45rem;
    line-height: 1;
}

.library-assignment-count span {
    color: var(--muted);
    font-size: .75rem;
    font-weight: 850;
}

.library-assignment-tools {
    display: grid;
    grid-template-columns: minmax(260px, 1fr) auto;
    gap: 12px;
    align-items: end;
}

.library-assignment-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 8px;
}

.unit-check-list {
    display: grid;
    gap: 8px;
}

.unit-check-card {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    border: 1px solid var(--line);
    border-left: 4px solid #c7d7e6;
    border-radius: 7px;
    background: #fff;
    cursor: pointer;
}

.unit-check-card.selected {
    border-color: #9ec3e8;
    border-left-color: var(--brand-primary);
    background: #f8fbff;
}

.unit-check-card input {
    width: 16px;
    height: 16px;
    margin: 0;
}

.unit-check-main {
    display: grid;
    gap: 2px;
    min-width: 0;
}

.unit-check-main strong {
    color: var(--ink);
    font-size: .92rem;
}

.unit-check-main small {
    color: var(--muted);
    font-size: .78rem;
    font-weight: 800;
}

@media (max-width: 760px) {
    .library-assignment-header,
    .library-assignment-tools {
        grid-template-columns: 1fr;
    }

    .library-assignment-header {
        display: grid;
    }

    .library-assignment-count,
    .library-assignment-actions {
        width: 100%;
        justify-content: stretch;
    }

    .library-assignment-actions > button {
        flex: 1 1 180px;
    }

    .unit-check-card {
        grid-template-columns: auto minmax(0, 1fr);
    }

    .unit-check-card .status-badge {
        grid-column: 2;
        justify-self: start;
    }
}

.row-actions {
    display: inline-flex;
    justify-content: flex-end;
    gap: 8px;
}

.table-action-group {
    display: inline-flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 6px;
    max-width: 100%;
}

.table-action-group .compact {
    flex: 0 0 auto;
}

.server-table-shell {
    width: 100%;
    overflow-x: auto;
}

.server-table {
    width: 100%;
    min-width: 820px;
    border-collapse: collapse;
}

.server-table th,
.server-table td {
    padding: 10px 12px;
    border-bottom: 1px solid var(--line);
    text-align: left;
    vertical-align: middle;
}

.server-table th {
    color: var(--muted);
    font-size: .78rem;
    font-weight: 900;
    text-transform: uppercase;
}

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

.server-table .amount-cell {
    white-space: nowrap;
}

.server-table td:last-child {
    width: 1%;
    white-space: nowrap;
}

.server-table td.text-end {
    text-align: right;
}

.treasury-concepts-table {
    table-layout: fixed;
}

.treasury-concepts-table th:nth-child(1),
.treasury-concepts-table td:nth-child(1) {
    width: 28%;
}

.treasury-concepts-table th:nth-child(2),
.treasury-concepts-table td:nth-child(2) {
    width: 18%;
}

.treasury-concepts-table th:nth-child(3),
.treasury-concepts-table th:nth-child(4),
.treasury-concepts-table th:nth-child(5),
.treasury-concepts-table td:nth-child(3),
.treasury-concepts-table td:nth-child(4),
.treasury-concepts-table td:nth-child(5) {
    width: 12%;
}

.treasury-concepts-table th:nth-child(6),
.treasury-concepts-table td:nth-child(6) {
    width: 18%;
}

.table-title-stack {
    display: grid;
    gap: 3px;
    min-width: 0;
}

.table-title-stack strong {
    color: var(--text);
    font-weight: 900;
    line-height: 1.2;
}

.table-title-stack small {
    display: block;
    color: var(--muted);
    font-size: .78rem;
    font-weight: 750;
    line-height: 1.25;
    overflow-wrap: anywhere;
}

.library-row-actions {
    position: relative;
    align-items: center;
}

.row-action-menu {
    position: relative;
}

.row-action-dropdown {
    position: absolute;
    top: calc(100% + 6px);
    right: 0;
    z-index: 30;
    display: grid;
    min-width: 190px;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 7px;
    background: #fff;
    box-shadow: 0 14px 34px rgba(21, 40, 63, .14);
    text-align: left;
}

.row-action-dropdown button {
    min-height: 36px;
    padding: 0 12px;
    border: 0;
    border-bottom: 1px solid var(--line);
    color: var(--text);
    background: #fff;
    font-size: .84rem;
    font-weight: 750;
    text-align: left;
}

.row-action-dropdown button:last-child {
    border-bottom: 0;
}

.row-action-dropdown button:hover {
    color: var(--brand-primary);
    background: var(--surface-2);
}

.modal-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 20px;
}

.modal-panel > .modal-actions {
    margin-top: 0;
    padding: 16px 20px 20px;
    border-top: 1px solid var(--line);
}

.section-panel {
    display: grid;
    gap: 16px;
    padding: 18px 0;
}

.section-panel-header,
.config-row,
.inline-editor-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.config-list {
    display: grid;
    gap: 10px;
}

.config-row,
.inline-editor-card,
.empty-card {
    padding: 16px 18px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--surface);
}

.template-variable-help {
    display: grid;
    gap: 12px;
    margin-top: 12px;
    padding: 14px 16px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--surface-2);
}

.template-variable-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
    gap: 8px;
}

.template-variable-chip {
    display: grid;
    gap: 4px;
    min-width: 0;
    padding: 9px 10px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--surface);
}

.template-variable-chip code {
    color: var(--brand-primary);
    font-size: .78rem;
    font-weight: 900;
}

.template-variable-chip span {
    color: var(--muted);
    font-size: .78rem;
    line-height: 1.35;
}

.template-editor-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(300px, 380px);
    gap: 16px;
    align-items: start;
}

.template-editor-main,
.template-editor-side {
    display: grid;
    gap: 16px;
    min-width: 0;
}

.template-editor-side {
    position: sticky;
    top: 88px;
}

.template-editor-card {
    padding: 18px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--surface);
}

.template-html-workbench .html-editor-shell {
    min-height: 560px;
}

.template-html-workbench .CodeMirror {
    min-height: 520px;
}

.template-html-workbench .html-preview {
    min-height: 520px;
}

.template-variable-grid.single {
    grid-template-columns: 1fr;
}

.template-variable-chip.as-button {
    width: 100%;
    text-align: left;
    cursor: pointer;
}

.template-variable-chip.as-button:hover {
    border-color: var(--brand-primary);
    background: #f8fbff;
}

.template-preview-title {
    margin: 6px 0 12px;
    font-size: 1rem;
}

.template-preview-summary {
    display: grid;
    gap: 4px;
    margin-top: 12px;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--surface-2);
}

.template-preview-summary span {
    color: var(--muted);
    font-size: .78rem;
    font-weight: 800;
}

.template-preview-summary strong {
    color: var(--ink);
    font-size: .9rem;
}

.email-preview-frame.compact {
    min-height: 520px;
}

@media (max-width: 1120px) {
    .template-editor-layout {
        grid-template-columns: 1fr;
    }

    .template-editor-side {
        position: static;
    }
}

.row-title {
    color: var(--ink);
    font-weight: 900;
}

.row-subtitle {
    margin-top: 2px;
    color: var(--brand-primary);
    font-size: .82rem;
    font-weight: 850;
}

.textarea-field {
    min-height: 94px;
    resize: vertical;
}

.css-editor-area {
    min-height: 260px;
    font-family: Consolas, Monaco, "Courier New", monospace;
    resize: vertical;
}

.css-editor-card {
    display: grid;
    gap: 12px;
    margin-top: 4px;
}

.css-editor-card .html-editor-shell {
    width: 100%;
}

.css-editor-card .CodeMirror,
.css-editor-card .html-code-area {
    min-height: 360px;
}

.email-preview-modal {
    width: min(96vw, 1040px);
}

.email-preview-frame {
    display: block;
    width: 100%;
    min-height: 620px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
}

.icon-dot {
    width: 8px;
    height: 8px;
    flex: 0 0 auto;
    border-radius: 50%;
    background: currentColor;
}

.text-end {
    text-align: right;
}

.shell-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 16px;
}

.module-card {
    display: grid;
    min-height: 164px;
    gap: 8px;
    align-content: start;
    padding: 18px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--surface);
    box-shadow: 0 10px 26px rgba(21, 40, 63, .07);
}

.module-card span {
    width: fit-content;
    padding: 5px 8px;
    border-radius: 999px;
    font-size: .76rem;
    font-weight: 900;
}

.module-card h2 {
    font-size: 1.12rem;
}

.module-card p {
    color: var(--muted);
    line-height: 1.45;
}

.content-workspace {
    display: grid;
    grid-template-columns: minmax(240px, 320px) minmax(0, 1fr);
    gap: 16px;
    align-items: start;
}

.content-context-panel {
    display: grid;
    gap: 12px;
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: 7px;
    background: var(--surface);
}

.content-context-panel div {
    display: grid;
    gap: 4px;
    min-width: 0;
}

.content-context-panel span {
    color: var(--brand-primary);
    font-size: .72rem;
    font-weight: 900;
    text-transform: uppercase;
}

.content-context-panel strong {
    color: var(--text);
    font-size: .92rem;
    overflow-wrap: anywhere;
}

.content-editor-panel {
    display: grid;
    gap: 14px;
    min-width: 0;
}

.content-summary-field {
    min-height: 110px;
    resize: vertical;
}

.content-editor-panel .html-editor-shell {
    min-height: min(72vh, 820px);
}

.content-editor-panel .CodeMirror,
.content-editor-panel .html-code-area,
.content-editor-panel .html-preview {
    min-height: min(62vh, 720px);
}

.content-resource-panel {
    display: grid;
    gap: 14px;
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: 7px;
    background: var(--surface);
}

.resource-section-toolbar {
    padding: 0 0 12px;
    border-bottom: 1px solid var(--line);
}

.resource-empty {
    padding: 22px;
}

.resource-list {
    display: grid;
    gap: 10px;
}

.resource-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto auto;
    gap: 12px;
    align-items: center;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 7px;
    background: #fff;
}

.resource-upload-box {
    display: grid;
    gap: 12px;
    padding: 14px;
    border: 1px dashed var(--line-strong);
    border-radius: 7px;
    background: var(--surface-2);
}

.resource-upload-box h4 {
    margin: 0;
    color: var(--text);
    font-size: 1rem;
}

.resource-upload-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 120px auto;
    gap: 12px;
    align-items: end;
}

.resource-active-switch {
    min-height: 42px;
    align-items: center;
}

.resource-upload-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
}

.route-hero {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    margin-bottom: 18px;
    padding: 18px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--surface);
    box-shadow: 0 10px 28px rgba(21, 40, 63, .08);
}

.route-hero h1 {
    margin-top: 4px;
    color: var(--ink);
    font-size: 1.75rem;
}

.route-hero p:not(.eyebrow) {
    margin-top: 6px;
    color: var(--muted);
}

.route-program-selector {
    display: grid;
    gap: 6px;
    min-width: min(360px, 100%);
    color: #2e3945;
    font-size: .84rem;
    font-weight: 800;
}

.route-hero-actions {
    display: grid;
    justify-items: end;
    gap: 12px;
    min-width: min(420px, 100%);
}

.route-summary-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
    margin-bottom: 18px;
}

.route-summary-grid-single {
    grid-template-columns: minmax(0, 1fr);
}

.route-summary-grid article,
.route-data-strip article {
    display: grid;
    gap: 5px;
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--surface);
}

.route-summary-grid span,
.route-data-strip span,
.route-info-card span,
.route-content-block > span,
.route-element-grid span,
.route-block-head span {
    color: var(--muted);
    font-size: .78rem;
    font-weight: 850;
}

.route-summary-grid strong {
    color: var(--ink);
    font-size: 1.25rem;
}

.route-summary-grid small {
    color: var(--muted);
}

.route-stage-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
}

.route-stage-card {
    --stage-bg: var(--route-stage-1);
    --stage-strong: var(--route-stage-1-strong);
    overflow: hidden;
    border: 1px solid color-mix(in srgb, var(--stage-strong) 28%, white);
    border-radius: 8px;
    background: var(--stage-bg);
    box-shadow: 0 14px 32px rgba(21, 40, 63, .08);
}

.route-stage-card header {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    padding: 14px 16px;
    color: #fff;
    background: var(--stage-strong);
}

.route-stage-card header span {
    display: block;
    margin-bottom: 5px;
    font-size: .72rem;
    font-weight: 900;
    text-transform: uppercase;
}

.route-stage-card header h2 {
    font-size: 1.08rem;
    line-height: 1.25;
}

.route-stage-card header strong {
    display: grid;
    width: 34px;
    height: 34px;
    place-items: center;
    border-radius: 50%;
    color: var(--stage-strong);
    background: rgba(255, 255, 255, .92);
}

.route-unit-stack {
    display: grid;
    gap: 8px;
    padding: 12px;
}

.route-unit-card {
    display: grid;
    gap: 4px;
    width: 100%;
    min-height: 72px;
    padding: 10px 12px;
    border: 1px solid rgba(255, 255, 255, .72);
    border-left: 4px solid var(--stage-strong);
    border-radius: 8px;
    color: var(--ink);
    background: rgba(255, 255, 255, .76);
    text-align: left;
}

.route-unit-card:hover {
    border-color: color-mix(in srgb, var(--stage-strong) 38%, white);
    background: rgba(255, 255, 255, .94);
    transform: translateY(-1px);
}

.route-unit-key {
    color: var(--stage-strong);
    font-size: .7rem;
    font-weight: 950;
    text-transform: uppercase;
}

.route-unit-card strong {
    overflow-wrap: anywhere;
    font-size: .92rem;
}

.route-unit-card small,
.route-stage-empty {
    color: var(--muted);
    font-size: .8rem;
    font-weight: 750;
}

.route-stage-empty {
    margin: 12px;
    padding: 16px;
    border-radius: 8px;
    background: rgba(255, 255, 255, .55);
}

.stage-color-1 { --stage-bg: var(--route-stage-1); --stage-strong: var(--route-stage-1-strong); }
.stage-color-2 { --stage-bg: var(--route-stage-2); --stage-strong: var(--route-stage-2-strong); }
.stage-color-3 { --stage-bg: var(--route-stage-3); --stage-strong: var(--route-stage-3-strong); }
.stage-color-4 { --stage-bg: var(--route-stage-4); --stage-strong: var(--route-stage-4-strong); }
.stage-color-5 { --stage-bg: var(--route-stage-5); --stage-strong: var(--route-stage-5-strong); }
.stage-color-6 { --stage-bg: var(--route-stage-6); --stage-strong: var(--route-stage-6-strong); }
.stage-color-7 { --stage-bg: var(--route-stage-7); --stage-strong: var(--route-stage-7-strong); }
.stage-color-8 { --stage-bg: var(--route-stage-8); --stage-strong: var(--route-stage-8-strong); }
.stage-color-9 { --stage-bg: var(--route-stage-9); --stage-strong: var(--route-stage-9-strong); }
.stage-color-10 { --stage-bg: var(--route-stage-10); --stage-strong: var(--route-stage-10-strong); }
.stage-color-11 { --stage-bg: var(--route-stage-11); --stage-strong: var(--route-stage-11-strong); }
.stage-color-12 { --stage-bg: var(--route-stage-12); --stage-strong: var(--route-stage-12-strong); }

.route-unit-detail {
    display: grid;
    gap: 16px;
}

.route-info-panels {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}

.route-info-card {
    display: grid;
    gap: 10px;
    min-height: 148px;
    padding: 18px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--surface);
    box-shadow: 0 12px 28px rgba(21, 40, 63, .08);
}

.route-info-card.objective {
    border-left: 4px solid var(--brand-primary);
    background: linear-gradient(90deg, rgba(220, 236, 255, .78), #fff);
}

.route-info-card.description {
    border-left: 4px solid var(--brand-accent);
    background: linear-gradient(90deg, rgba(255, 240, 204, .82), #fff);
}

.route-editorial-blocks {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 14px;
}

.route-editorial-card {
    overflow: hidden;
    padding: 18px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--surface);
    box-shadow: 0 12px 28px rgba(21, 40, 63, .08);
}

.route-html-content {
    max-width: 100%;
    overflow-wrap: anywhere;
    color: #26323f;
    line-height: 1.62;
}

.route-html-content :where(*) {
    max-width: 100%;
}

.route-html-content :where(h1, h2, h3, h4, h5, h6) {
    margin: 0 0 .55em;
    color: var(--ink);
    line-height: 1.18;
}

.route-html-content :where(p, ul, ol, blockquote, table, figure, pre) {
    margin-top: 0;
    margin-bottom: 1em;
}

.route-html-content :where(p:last-child, ul:last-child, ol:last-child, blockquote:last-child, table:last-child, figure:last-child, pre:last-child) {
    margin-bottom: 0;
}

.route-html-content :where(ul, ol) {
    padding-left: 1.25rem;
}

.route-html-content :where(img, video, iframe) {
    display: block;
    max-width: 100%;
    height: auto;
}

.route-html-content :where(table) {
    display: block;
    width: 100%;
    overflow-x: auto;
    border-collapse: collapse;
}

.route-html-content :where(th, td) {
    padding: 8px 10px;
    border: 1px solid var(--line);
    vertical-align: top;
}

.route-html-content :where(pre) {
    overflow-x: auto;
    padding: 12px;
    border-radius: 8px;
    background: var(--surface-2);
}

.route-html-content :where(a) {
    color: var(--brand-primary);
    font-weight: 800;
}

.route-info-card div,
.route-element-grid div,
.route-content-block div {
    color: #26323f;
    line-height: 1.58;
}

.route-unit-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
}

.route-element-summary-panel {
    display: grid;
    gap: 12px;
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--surface);
}

.route-element-summary-panel .section-toolbar {
    margin-bottom: 0;
}

.route-element-summary-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.route-element-summary-card {
    position: relative;
    display: grid;
    gap: 6px;
    min-height: 130px;
    padding: 14px;
    border: 1px solid var(--line);
    border-left: 4px solid var(--brand-primary);
    border-radius: 8px;
    color: var(--ink);
    background: var(--surface-2);
    text-align: left;
}

.route-element-summary-card:hover {
    border-color: var(--brand-primary);
    background: #fff;
    transform: translateY(-1px);
}

.route-element-summary-card span {
    color: var(--brand-primary);
    font-size: .72rem;
    font-weight: 950;
    text-transform: uppercase;
}

.route-element-summary-card strong {
    display: inline;
    color: var(--ink);
    font-size: 1rem;
    line-height: 1.25;
}

.route-element-summary-card strong span {
    margin-right: 6px;
    font-size: .78rem;
}

.route-element-summary-card small {
    display: -webkit-box;
    overflow: hidden;
    color: var(--muted);
    font-size: .86rem;
    font-weight: 650;
    line-height: 1.45;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3;
}

.route-element-summary-card em {
    width: fit-content;
    padding: 4px 8px;
    border-radius: 999px;
    color: var(--brand-primary);
    background: var(--brand-primary-soft);
    font-size: .76rem;
    font-style: normal;
    font-weight: 850;
}

.route-data-strip {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 10px;
}

.route-data-strip strong {
    color: var(--ink);
    overflow-wrap: anywhere;
}

.route-detail-layout {
    display: grid;
    grid-template-columns: minmax(240px, 330px) minmax(0, 1fr);
    gap: 16px;
    align-items: start;
}

.route-element-nav,
.route-element-detail,
.route-bibliography {
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--surface);
}

.route-element-nav {
    display: grid;
    gap: 8px;
    padding: 12px;
}

.route-tree-node {
    display: grid;
    gap: 4px;
}

.route-tree-row {
    display: grid;
    grid-template-columns: 26px minmax(0, 1fr);
    gap: 6px;
    align-items: stretch;
    padding-left: calc(var(--tree-depth, 0) * 16px);
}

.route-tree-row.active .route-tree-select {
    border-color: var(--brand-primary);
    background: var(--brand-primary-soft);
    box-shadow: inset 3px 0 0 var(--brand-primary);
}

.route-tree-toggle,
.route-tree-toggle-placeholder {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 26px;
    min-height: 42px;
    border-radius: 6px;
}

.route-tree-toggle {
    border: 1px solid var(--line);
    color: var(--brand-primary);
    background: #fff;
    font-weight: 950;
}

.route-tree-toggle:hover {
    border-color: var(--brand-primary);
    background: var(--brand-primary-soft);
}

.route-tree-select {
    display: grid;
    gap: 3px;
    width: 100%;
    min-height: 48px;
    padding: 9px 10px;
    border: 1px solid var(--line);
    border-radius: 8px;
    color: var(--ink);
    background: #fff;
    text-align: left;
}

.route-tree-select:hover {
    border-color: var(--brand-primary);
    background: #f8fbfd;
}

.route-tree-select strong span {
    margin-right: 6px;
    color: var(--brand-primary);
    font-size: .7rem;
    font-weight: 950;
    text-transform: uppercase;
}

.route-tree-select strong {
    overflow-wrap: anywhere;
    font-size: .86rem;
    line-height: 1.25;
}

.route-tree-select small {
    color: var(--muted);
    font-size: .74rem;
    font-weight: 800;
}

.route-tree-children {
    display: grid;
    gap: 4px;
}

.route-element-nav header,
.route-bibliography header,
.route-element-head,
.route-block-head {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    align-items: center;
}

.route-element-nav h2,
.route-bibliography h2,
.route-element-head h2 {
    color: var(--ink);
    font-size: 1rem;
}

.route-element-nav header span,
.route-bibliography header span {
    color: var(--muted);
    font-size: .78rem;
    font-weight: 800;
}

.route-element-button {
    display: grid;
    gap: 4px;
    width: 100%;
    padding: 10px;
    border: 1px solid var(--line);
    border-radius: 8px;
    color: var(--ink);
    background: #fff;
    text-align: left;
}

.route-element-button.active {
    border-color: var(--brand-primary);
    box-shadow: inset 3px 0 0 var(--brand-primary);
}

.route-element-button span {
    color: var(--brand-primary);
    font-size: .75rem;
    font-weight: 950;
}

.route-element-button strong {
    font-size: .88rem;
    line-height: 1.28;
}

.route-element-button small {
    color: var(--muted);
    font-size: .75rem;
    font-weight: 800;
}

.route-element-detail {
    display: grid;
    gap: 14px;
    padding: 16px;
}

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

.route-element-grid article,
.route-content-block {
    display: grid;
    gap: 8px;
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--surface-2);
}

.route-resource-list,
.route-child-list,
.route-bibliography {
    display: grid;
    gap: 8px;
}

.route-resource-list button,
.route-child-list button,
.route-bibliography button {
    display: grid;
    gap: 4px;
    width: 100%;
    padding: 10px 12px;
    border: 1px solid var(--line);
    border-radius: 8px;
    color: var(--ink);
    background: #fff;
    text-align: left;
}

.route-resource-list button:hover,
.route-child-list button:hover,
.route-bibliography button:hover {
    border-color: var(--brand-primary);
    background: #f8fbfd;
}

.route-resource-list span,
.route-bibliography span {
    font-weight: 850;
}

.route-resource-list small,
.route-bibliography small {
    color: var(--muted);
}

.route-bibliography {
    padding: 14px;
}

.accent-blue span {
    color: var(--brand-primary);
    background: var(--brand-primary-soft);
}

.accent-orange span {
    color: #875000;
    background: var(--brand-accent-soft);
}

.accent-mint span {
    color: #176040;
    background: var(--brand-mint);
}

.accent-coral span {
    color: #8c3a20;
    background: var(--brand-coral);
}

.mobile-backdrop {
    position: fixed;
    inset: 0;
    z-index: 15;
    border: 0;
    background: rgba(8, 22, 40, .45);
}

#blazor-error-ui {
    position: fixed;
    right: 16px;
    bottom: 16px;
    z-index: 2000;
    display: none;
    max-width: min(420px, calc(100vw - 32px));
    padding: 12px 14px;
    border: 1px solid #f0b7ad;
    border-radius: 8px;
    color: #7a1b13;
    background: #fff0ed;
    box-shadow: var(--shadow);
}

@media (max-width: 1100px) {
    .shell-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .curriculum-map {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .program-resource-grid {
        grid-template-columns: 1fr;
    }

    .route-stage-grid,
    .route-summary-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .route-data-strip {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

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

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

    .login-brand-panel {
        min-height: 48vh;
        padding: 28px;
    }

    .login-brand-top {
        gap: 20px;
    }

    .brand-logo {
        width: min(280px, 100%);
    }

    .login-copy h1 {
        font-size: clamp(2rem, 9vw, 3rem);
    }

    .app-shell {
        grid-template-columns: 1fr;
    }

    .app-sidebar {
        position: fixed;
        left: 0;
        transform: translateX(-105%);
    }

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

    .app-sidebar.collapsed {
        width: 276px;
    }

    .mobile-menu {
        display: inline-flex;
    }

    .topbar-desktop-action {
        display: none !important;
    }

    .topbar-account-wrap {
        display: block !important;
    }

    .route-hero,
    .route-detail-layout,
    .route-info-panels,
    .treasury-workspace {
        grid-template-columns: 1fr;
    }

    .route-hero {
        display: grid;
    }

    .route-detail-layout {
        display: grid;
    }
}

@media (max-width: 640px) {
    .login-grid {
        min-height: 100dvh;
        background: var(--surface);
    }

    .login-brand-panel {
        display: none;
    }

    .login-panel,
    .page-frame {
        padding: 18px;
    }

    .login-panel {
        align-content: start;
        place-items: stretch;
        padding-top: 28px;
    }

    .login-card {
        width: 100%;
        padding: 24px;
        border: 0;
        box-shadow: none;
    }

    .login-mobile-brand {
        display: grid;
        justify-items: center;
        gap: 8px;
        margin-bottom: 24px;
        text-align: center;
    }

    .login-mobile-brand p {
        color: var(--ink);
        font-size: 1.05rem;
        font-weight: 900;
    }

    .login-mobile-brand span {
        max-width: 280px;
        color: var(--muted);
        font-size: .88rem;
        font-weight: 700;
        line-height: 1.4;
    }

    .topbar {
        padding: 0 16px;
    }

    .topbar-desktop-action {
        display: none !important;
    }

    .topbar-account-wrap {
        display: block !important;
    }

    .notification-bell-panel {
        position: fixed;
        top: 66px;
        right: 12px;
        left: 12px;
        width: auto;
        max-height: calc(100dvh - 84px);
    }

    .notification-bell-list {
        max-height: min(360px, calc(100dvh - 210px));
    }

    .shell-grid {
        grid-template-columns: 1fr;
    }

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

    .page-actions {
        justify-content: flex-start;
    }

    .arelo-table-footer,
    .arelo-page-info,
    .arelo-pagination {
        align-items: flex-start;
        flex-direction: column;
    }

    .form-grid,
    .scholarship-form-grid,
    .treasury-form-grid,
    .library-form-grid,
    .element-form-grid,
    .unit-form-grid,
    .stage-form-grid,
    .content-field-grid,
    .password-tool-row {
        grid-template-columns: 1fr;
    }

    .element-form-grid .span-2,
    .library-form-grid .span-2,
    .unit-form-grid .span-2 {
        grid-column: auto;
    }

    .treasury-form-grid .compact-field {
        max-width: none;
    }

    .curriculum-map {
        grid-template-columns: 1fr;
    }

    .route-stage-grid,
    .route-summary-grid,
    .route-data-strip,
    .route-element-grid,
    .route-element-summary-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 900px) and (max-height: 520px) {
    .login-grid {
        min-height: 100dvh;
        grid-template-columns: 1fr;
        background: var(--surface);
    }

    .login-brand-panel {
        display: none;
    }

    .login-panel {
        align-content: start;
        place-items: stretch;
        padding: 16px;
    }

    .login-card {
        width: min(100%, 460px);
        justify-self: center;
        padding: 20px 24px;
        border: 0;
        box-shadow: none;
    }

    .login-mobile-brand {
        display: grid;
        justify-items: center;
        gap: 6px;
        margin-bottom: 16px;
        text-align: center;
    }

    .login-mobile-logo {
        width: min(170px, 46vw);
    }

    .login-mobile-brand p {
        color: var(--ink);
        font-size: 1rem;
        font-weight: 900;
    }

    .login-mobile-brand span {
        color: var(--muted);
        font-size: .82rem;
        font-weight: 700;
    }

    .login-card .form-heading {
        margin-bottom: 16px;
    }

    .topbar-desktop-action {
        display: none !important;
    }

    .topbar-account-wrap {
        display: block !important;
    }

    .notification-bell-panel {
        position: fixed;
        top: 66px;
        right: 12px;
        left: 12px;
        width: auto;
        max-height: calc(100dvh - 84px);
    }

    .notification-bell-list {
        max-height: min(240px, calc(100dvh - 210px));
    }
}

.crm-stats {
    display: grid;
    gap: 12px;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    margin-bottom: 16px;
}

.crm-stat {
    background: #fff;
    border: 1px solid var(--line);
    border-left: 4px solid var(--brand-primary);
    border-radius: 8px;
    padding: 16px;
}

.crm-stat span,
.crm-info-grid span {
    color: var(--muted);
    display: block;
    font-size: 13px;
    margin-bottom: 6px;
}

.crm-stat strong {
    color: var(--ink);
    display: block;
    font-size: 30px;
    line-height: 1;
}

.crm-stat.accent {
    border-left-color: var(--brand-accent);
}

.crm-stat.warning {
    border-left-color: #f2b84b;
}

.crm-stat.success {
    border-left-color: #56b88f;
}

.switch-inline {
    align-items: center;
    color: var(--muted);
    display: inline-flex;
    font-size: 14px;
    gap: 8px;
}

.row-main {
    display: grid;
    gap: 4px;
}

.row-main span {
    color: var(--muted);
    font-size: 13px;
}

.student-documents-list {
    display: grid;
    gap: 12px;
}

.student-document-row {
    background: var(--surface);
    border: 1px solid var(--line);
    border-left: 4px solid var(--line-strong);
    border-radius: 8px;
    display: grid;
    gap: 12px;
    grid-template-columns: minmax(0, 1fr) auto;
    padding: 14px;
}

.student-document-row.is-missing {
    border-left-color: #7aa7d9;
}

.student-document-row.is-review {
    border-left-color: #f2b84b;
    background: color-mix(in srgb, #f2b84b 8%, var(--surface));
}

.student-document-row.is-approved {
    border-left-color: #56b88f;
    background: color-mix(in srgb, #56b88f 8%, var(--surface));
}

.student-document-row.is-warning,
.student-document-row.is-rejected {
    border-left-color: var(--brand-accent);
    background: color-mix(in srgb, var(--brand-accent) 9%, var(--surface));
}

.student-document-row.is-rejected {
    box-shadow: inset 0 0 0 1px color-mix(in srgb, #d94f4f 35%, transparent);
}

.student-document-row .row-actions {
    align-items: flex-start;
    display: flex;
    gap: 8px;
}

.gestor-document-upload {
    border-top: 1px solid var(--line);
    display: grid;
    gap: 6px;
    grid-column: 1 / -1;
    padding-top: 12px;
}

.gestor-document-upload span,
.compact-note {
    color: var(--muted);
    font-size: 13px;
}

.payment-followup-row {
    align-items: center;
    grid-template-columns: minmax(0, 1fr) auto auto;
}

.payment-row-amount {
    display: grid;
    gap: 2px;
    min-width: 170px;
    padding: 8px 12px;
    border: 1px solid #ffd98f;
    border-radius: 8px;
    background: #fff8e7;
    color: #7c4d00;
    text-align: center;
}

.payment-row-amount span,
.bank-share-amount span {
    color: #7c4d00;
    font-size: .72rem;
    font-weight: 900;
    text-transform: uppercase;
}

.payment-row-amount strong {
    color: #0b3260;
    font-size: 1.25rem;
    line-height: 1.05;
}

.payment-followup-upload {
    border-top: 1px solid var(--line);
    display: grid;
    gap: 6px;
    grid-column: 1 / -1;
    padding-top: 12px;
}

.payment-followup-upload span {
    color: var(--muted);
    font-size: 13px;
}

.bank-share-panel {
    display: grid;
    gap: 14px;
    padding: 16px;
}

.bank-share-amount {
    display: grid;
    gap: 8px;
    justify-items: center;
    margin: 0 auto;
    min-width: min(100%, 360px);
    padding: 16px 20px;
    border: 1px solid #ffd98f;
    border-radius: 8px;
    background: #fff8e7;
    text-align: center;
}

.bank-share-amount strong {
    color: #0b3260;
    font-size: clamp(2rem, 5vw, 3.8rem);
    font-weight: 950;
    line-height: 1;
}

.bank-copy-item {
    align-content: start;
}

.bank-copy-item .compact {
    justify-self: start;
    margin-top: 4px;
}

.danger-text {
    color: #9b2424;
    font-weight: 700;
}

.interest-dots {
    display: inline-flex;
    gap: 4px;
}

.interest-dots span {
    background: #d9e4ef;
    border-radius: 999px;
    display: inline-block;
    height: 9px;
    width: 9px;
}

.interest-dots span.on {
    background: var(--brand-accent);
}

.crm-profile {
    display: grid;
    gap: 14px;
    grid-template-columns: 1.15fr 1fr;
    margin-bottom: 16px;
}

.crm-profile-card,
.crm-panel,
.crm-conversion-row {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 18px;
}

.crm-profile-card h2,
.crm-panel h3,
.crm-conversion-row h3 {
    margin: 0;
}

.crm-expediente-header h1,
.crm-profile-card h2 {
    font-size: 1.32rem;
    line-height: 1.18;
}

.crm-panel h3,
.crm-conversion-row h3 {
    font-size: 1.12rem;
    line-height: 1.2;
}

.crm-profile-card .eyebrow,
.crm-panel .eyebrow {
    font-size: .68rem;
}

.crm-profile-card p,
.crm-conversion-row p {
    color: var(--muted);
    margin: 6px 0 0;
}

.crm-profile-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 16px;
}

.crm-info-grid {
    display: grid;
    gap: 14px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    margin-top: 12px;
}

.crm-info-grid strong {
    color: var(--ink);
    display: block;
    font-size: 14px;
}

.crm-workspace {
    display: grid;
    gap: 14px;
    grid-template-columns: minmax(0, 1.35fr) minmax(280px, .8fr);
    margin-bottom: 16px;
}

.crm-panel-wide {
    grid-row: span 2;
}

.crm-panel header,
.crm-conversion-row {
    align-items: center;
    display: flex;
    gap: 16px;
    justify-content: space-between;
}

.temporary-password-box {
    align-items: center;
    background: #fff8e6;
    border: 1px solid #f4d28a;
    border-radius: 8px;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 12px;
    padding: 10px 12px;
}

.temporary-password-box span,
.temporary-password-box small {
    color: var(--muted);
    font-size: .78rem;
    font-weight: 800;
}

.temporary-password-box strong {
    color: var(--ink);
    display: block;
    font-size: 1rem;
}

.timeline-list {
    display: grid;
    gap: 12px;
    margin-top: 14px;
}

.timeline-item {
    display: grid;
    gap: 12px;
    grid-template-columns: auto 1fr;
}

.timeline-dot {
    background: var(--brand-primary);
    border-radius: 999px;
    height: 10px;
    margin-top: 7px;
    width: 10px;
}

.timeline-title {
    align-items: baseline;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: space-between;
}

.timeline-title span,
.timeline-item small {
    color: var(--muted);
    font-size: 12px;
}

.timeline-item p {
    margin: 4px 0;
}

.timeline-item small {
    display: block;
}

.compact-list {
    display: grid;
    gap: 10px;
    margin-top: 14px;
}

.compact-list article {
    align-items: flex-start;
    border: 1px solid var(--line);
    border-radius: 8px;
    display: flex;
    gap: 10px;
    justify-content: space-between;
    padding: 12px;
}

.compact-list article.ticket-card {
    border-left-width: 5px;
    box-shadow: 0 8px 18px rgba(15, 23, 42, .04);
}

.ticket-card-open {
    border-color: #bfd8f4;
    border-left-color: #2f80d1;
    background: linear-gradient(90deg, rgba(47, 128, 209, .1), #fff 48%);
}

.ticket-card-progress {
    border-color: #f7d99b;
    border-left-color: #f4a51c;
    background: linear-gradient(90deg, rgba(244, 165, 28, .14), #fff 48%);
}

.ticket-card-closed {
    border-color: #bfe5cf;
    border-left-color: #2fa66a;
    background: linear-gradient(90deg, rgba(47, 166, 106, .12), #fff 48%);
}

.compact-list article div {
    display: grid;
    gap: 4px;
}

.compact-list span {
    color: var(--muted);
    font-size: 13px;
}

.form-grid.single {
    grid-template-columns: 1fr;
}

@media (max-width: 980px) {
    .crm-stats,
    .crm-profile,
    .crm-workspace {
        grid-template-columns: 1fr;
    }

    .crm-panel-wide {
        grid-row: auto;
    }
}

.legal-editor-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
    justify-content: space-between;
    margin-top: 12px;
    color: var(--muted);
    font-size: .86rem;
    font-weight: 700;
}

.student-registration-shell {
    display: grid;
    gap: 18px;
}

.student-registration-header {
    display: grid;
    gap: 14px;
    padding-bottom: 18px;
    border-bottom: 1px solid var(--line);
}

.student-registration-header h1 {
    margin: 4px 0 6px;
    font-size: clamp(1.8rem, 2.4vw, 2.55rem);
}

.student-registration-header p {
    max-width: 780px;
    margin: 0;
    color: var(--muted);
    line-height: 1.55;
}

.student-registration-program {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 18px;
    padding: 14px 16px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fffaf0;
}

.student-registration-program-main {
    display: grid;
    gap: 3px;
    min-width: 220px;
}

.student-registration-program span,
.student-registration-program small {
    color: var(--muted);
    font-size: .82rem;
    font-weight: 750;
}

.student-registration-program strong {
    color: var(--ink);
    font-size: 1.05rem;
}

.student-registration-program-extra {
    flex: 1 1 520px;
    max-width: 760px;
}

.student-registration-layout {
    display: grid;
    grid-template-columns: minmax(230px, 300px) minmax(0, 1fr);
    gap: 18px;
}

.student-registration-steps {
    display: grid;
    align-content: start;
    gap: 10px;
}

.registration-step {
    display: grid;
    grid-template-columns: 34px minmax(0, 1fr);
    gap: 10px;
    width: 100%;
    padding: 13px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--surface);
    color: var(--ink);
    text-align: left;
    cursor: pointer;
}

.registration-step:disabled {
    cursor: not-allowed;
    opacity: .58;
}

.registration-step > span {
    display: inline-grid;
    place-items: center;
    width: 30px;
    height: 30px;
    border-radius: 8px;
    background: #eaf3fb;
    color: var(--primary);
    font-weight: 900;
}

.registration-step strong,
.registration-step small {
    display: block;
}

.registration-step strong {
    font-size: .92rem;
}

.registration-step small {
    margin-top: 3px;
    color: var(--muted);
    line-height: 1.35;
}

.registration-step.active {
    border-color: var(--primary);
    box-shadow: 0 0 0 2px rgba(23, 83, 157, .1);
}

.registration-step.done > span {
    background: #dff8e9;
    color: #096b39;
}

.registration-mini-timeline {
    display: grid;
    gap: 10px;
    margin-top: 8px;
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fbfdff;
}

.registration-mini-timeline > small {
    color: var(--muted);
    line-height: 1.45;
}

.registration-event {
    display: grid;
    gap: 3px;
    padding-left: 10px;
    border-left: 3px solid var(--accent);
}

.registration-event strong {
    color: var(--ink);
    font-size: .82rem;
}

.registration-event span,
.registration-event small {
    color: var(--muted);
    font-size: .78rem;
    line-height: 1.35;
}

.student-registration-content {
    min-width: 0;
}

.registration-document-card,
.registration-placeholder-card {
    display: grid;
    gap: 16px;
    padding: 18px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--surface);
}

.registration-document-card > header {
    display: flex;
    gap: 14px;
    align-items: flex-start;
    justify-content: space-between;
    padding-bottom: 14px;
    border-bottom: 1px solid var(--line);
}

.registration-document-card h2,
.registration-placeholder-card h2 {
    margin: 3px 0;
    font-size: 1.35rem;
}

.registration-document-card header span {
    color: var(--muted);
    font-size: .82rem;
    font-weight: 750;
}

.registration-document-html {
    max-height: 58vh;
    overflow: auto;
    padding: 18px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fbfdff;
    color: var(--ink);
    line-height: 1.65;
}

.registration-document-html h1,
.registration-document-html h2,
.registration-document-html h3 {
    margin-top: 0;
}

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

.student-data-item {
    display: grid;
    gap: 4px;
    min-height: 70px;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fbfdff;
}

.student-data-item span {
    color: var(--muted);
    font-size: .78rem;
    font-weight: 750;
}

.student-data-item strong {
    color: var(--ink);
    font-size: .92rem;
    line-height: 1.35;
    overflow-wrap: anywhere;
}

.registration-placeholder-card p {
    margin: 0;
    color: var(--muted);
    line-height: 1.55;
}

.registration-placeholder-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.registration-placeholder-list span {
    padding: 8px 10px;
    border-radius: 999px;
    background: #eaf3fb;
    color: var(--primary);
    font-size: .82rem;
    font-weight: 850;
}

.registration-documents-general {
    margin-bottom: 18px;
}

.registration-demo-period-picker {
    display: grid;
    gap: 8px;
}

.registration-demo-period-picker label {
    color: var(--primary);
    font-size: .76rem;
    font-weight: 900;
    text-transform: uppercase;
}

.registration-demo-period-picker .field {
    min-height: 38px;
    background: #fff;
    font-size: .86rem;
}

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

.registration-upload-card {
    display: grid;
    gap: 14px;
    padding: 16px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
    box-shadow: 0 10px 26px rgba(16, 36, 58, .05);
}

.registration-upload-card.uploaded {
    border-color: #a9d8c1;
    box-shadow: 0 10px 26px rgba(25, 135, 84, .08);
}

.registration-upload-card.rejected {
    border-color: #ef9a9a;
    border-left: 5px solid #c62828;
    background: #fff8f8;
    box-shadow: 0 14px 32px rgba(198, 40, 40, .13);
}

.registration-upload-card.rejected h3 {
    color: #8f1d1d;
}

.registration-upload-card > header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
}

.registration-upload-card h3 {
    margin: 0;
    color: var(--ink);
    font-size: 1rem;
    line-height: 1.25;
}

.registration-upload-card header span {
    display: block;
    margin-top: 3px;
    color: var(--muted);
    font-size: .78rem;
    font-weight: 800;
}

.registration-document-html.compact {
    max-height: 360px;
    overflow-y: auto;
    padding: 0;
    border: 0;
    background: transparent;
}

.registration-upload-rules {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.registration-upload-rules span,
.registration-upload-status {
    display: inline-flex;
    align-items: center;
    min-height: 26px;
    padding: 5px 9px;
    border-radius: 999px;
    background: #eef5fb;
    color: var(--primary);
    font-size: .76rem;
    font-weight: 850;
}

.registration-upload-status.status-pending {
    background: #fff4d8;
    color: #7c4d00;
}

.registration-upload-status.status-saved {
    background: #e7f4ff;
    color: #0a4f84;
}

.registration-upload-status.status-working {
    background: #dff2ff;
    color: #075985;
}

.registration-upload-status.status-ok {
    background: #dcf8e8;
    color: #106b3a;
}

.registration-upload-status.status-warning {
    background: #fff4d8;
    color: #7c4d00;
}

.registration-upload-status.status-error {
    background: #ffe1df;
    color: #9f1d16;
}

.registration-upload-status.status-muted {
    background: #edf1f5;
    color: #536172;
}

.registration-rejected-notice {
    display: grid;
    gap: 4px;
    padding: 12px 14px;
    border: 1px solid #efb4b4;
    border-radius: 8px;
    background: #fff0f0;
    color: #7f1d1d;
}

.registration-rejected-notice strong {
    font-size: .9rem;
}

.registration-rejected-notice span {
    font-size: .88rem;
    line-height: 1.45;
}

.registration-upload-selected {
    display: grid;
    gap: 3px;
    padding: 10px 12px;
    border: 1px solid #cfe0ef;
    border-radius: 8px;
    background: #f7fbff;
}

.registration-upload-selected span {
    color: var(--muted);
    font-size: .75rem;
    font-weight: 850;
    text-transform: uppercase;
}

.registration-upload-selected strong {
    overflow: hidden;
    color: var(--ink);
    font-size: .9rem;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.registration-upload-selected small {
    color: var(--muted);
    font-weight: 750;
}

.registration-review-submit {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 14px 16px;
    border: 1px solid #b9d8ef;
    border-radius: 8px;
    background: #f3faff;
}

.registration-review-submit div {
    display: grid;
    gap: 3px;
}

.registration-review-submit strong {
    color: var(--primary);
    font-size: .94rem;
}

.registration-review-submit span {
    color: var(--muted);
    font-size: .88rem;
    line-height: 1.45;
}

.registration-upload-current {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    gap: 10px 14px;
    align-items: center;
    padding-top: 12px;
    border-top: 1px solid var(--line);
}

.registration-upload-current > span {
    grid-column: 1 / -1;
    color: var(--muted);
    font-size: .82rem;
    font-weight: 800;
}

.registration-pdf-icon {
    display: grid;
    place-items: center;
    width: 58px;
    height: 66px;
    border-radius: 8px;
    background: #fff1f0;
    color: #d93c35;
    font-size: 1.05rem;
    font-weight: 950;
    border: 1px solid #ffc8c4;
}

.registration-image-preview-button {
    padding: 0;
    border: 0;
    background: transparent;
    cursor: pointer;
}

.registration-document-thumb {
    width: 76px;
    height: 76px;
    object-fit: cover;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
}

.registration-upload-actions {
    display: grid;
    gap: 4px;
    min-width: 0;
}

.registration-upload-actions strong {
    overflow: hidden;
    color: var(--ink);
    font-size: .88rem;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.registration-upload-actions small {
    color: var(--muted);
    font-weight: 750;
}

.registration-review-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    margin-top: 16px;
    padding: 16px;
    border: 1px solid #b8d9f4;
    border-radius: 8px;
    background: #f2f8fd;
}

.registration-review-actions strong {
    color: var(--primary);
    font-size: .98rem;
}

.registration-review-actions p {
    margin: 4px 0 0;
    color: var(--muted);
    line-height: 1.45;
}

.registration-payment-instructions {
    margin-bottom: 2px;
}

.registration-payment-bank {
    display: grid;
    gap: 14px;
    padding: 16px;
    border: 1px solid #cfe0ef;
    border-radius: 8px;
    background: #fbfdff;
}

.registration-payment-bank-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 14px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--line);
}

.registration-payment-bank-head h3 {
    margin: 3px 0 0;
    color: var(--ink);
    font-size: 1.08rem;
    line-height: 1.25;
}

.registration-payment-data-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
}

.registration-payment-data-item {
    display: grid;
    gap: 4px;
    min-width: 0;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
}

.registration-payment-data-item span {
    color: var(--muted);
    font-size: .76rem;
    font-weight: 850;
}

.registration-payment-data-item strong {
    overflow-wrap: anywhere;
    color: var(--ink);
    font-size: .9rem;
}

.registration-payment-upload {
    margin-top: 2px;
}

.registration-payment-amount {
    display: grid;
    place-items: center;
    gap: 4px;
    margin: 2px auto 0;
    min-width: min(100%, 360px);
    padding: 18px 24px;
    border: 1px solid #ffd98f;
    border-radius: 8px;
    background: #fff8e7;
    color: #7c4d00;
    text-align: center;
}

.registration-payment-amount span {
    color: #7c4d00;
    font-size: .78rem;
    font-weight: 900;
    text-transform: uppercase;
}

.registration-payment-amount strong {
    color: #0b3260;
    font-size: clamp(2.4rem, 5vw, 4.6rem);
    font-weight: 950;
    line-height: 1;
}

.field-error {
    margin: 0;
    color: #b42318;
    font-size: .84rem;
    font-weight: 800;
}

@media (max-width: 900px) {
    .student-registration-layout {
        grid-template-columns: 1fr;
    }

    .student-registration-program {
        display: grid;
    }

    .student-registration-steps {
        display: none;
    }

    .registration-document-card > header {
        display: grid;
    }

    .student-data-grid {
        grid-template-columns: 1fr;
    }

    .registration-documents-grid {
        grid-template-columns: 1fr;
    }

    .registration-review-actions {
        display: grid;
    }

    .registration-payment-bank-head {
        display: grid;
    }

    .registration-payment-data-grid {
        grid-template-columns: 1fr;
    }
}
.kardex-profile-card {
    display: grid;
    grid-template-columns: minmax(260px, .9fr) minmax(0, 1.6fr);
    gap: 16px;
    align-items: stretch;
    margin-bottom: 16px;
}

.kardex-profile-main,
.kardex-profile-stats article {
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--surface);
    box-shadow: 0 12px 28px rgba(21, 40, 63, .07);
}

.kardex-profile-main {
    display: grid;
    align-content: center;
    gap: 7px;
    padding: 18px;
    border-left: 4px solid var(--brand-primary);
    background: linear-gradient(90deg, rgba(220, 236, 255, .76), #fff);
}

.kardex-profile-main h2 {
    margin: 0;
    color: var(--ink);
    font-size: 1.85rem;
    line-height: 1.05;
}

.kardex-profile-main > span {
    color: var(--muted);
    font-size: .9rem;
    font-weight: 800;
}

.kardex-current-stage {
    display: inline-flex;
    align-items: center;
    width: fit-content;
    max-width: 100%;
    padding: 6px 10px;
    border: 1px solid rgba(6, 52, 107, .14);
    border-radius: 999px;
    color: var(--brand-primary);
    background: var(--brand-primary-soft);
    font-size: .78rem;
    font-weight: 900;
}

.kardex-profile-stats {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
}

.kardex-profile-stats article {
    display: grid;
    gap: 5px;
    min-height: 116px;
    padding: 14px;
}

.kardex-profile-stats span,
.kardex-stage-progress span {
    color: var(--muted);
    font-size: .74rem;
    font-weight: 900;
    text-transform: uppercase;
}

.kardex-profile-stats strong {
    color: var(--ink);
    font-size: 1.35rem;
    line-height: 1.1;
}

.kardex-profile-stats small {
    color: var(--muted);
    font-size: .78rem;
    font-weight: 750;
}

.form-grid.single-column {
    grid-template-columns: 1fr;
}

.kardex-map-panel {
    padding: 0;
    overflow: hidden;
}

.kardex-map-panel > .panel-heading {
    padding: 16px 18px;
    border-bottom: 1px solid var(--line);
    background: var(--surface);
}

.kardex-panel-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.kardex-stage-list {
    display: grid;
    gap: 16px;
    padding: 16px;
}

.kardex-stage {
    --stage-bg: var(--route-stage-1);
    --stage-strong: var(--route-stage-1-strong);
    overflow: hidden;
    border: 1px solid color-mix(in srgb, var(--stage-strong) 28%, white);
    border-radius: 8px;
    background: linear-gradient(180deg, color-mix(in srgb, var(--stage-bg) 72%, white), #fff);
    box-shadow: 0 14px 30px rgba(21, 40, 63, .08);
}

.kardex-stage > header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 14px 16px;
    color: #fff;
    background: var(--stage-strong);
}

.kardex-stage .eyebrow {
    color: rgba(255, 255, 255, .82);
}

.kardex-stage h3 {
    margin: 0;
    font-size: 1.04rem;
    line-height: 1.25;
}

.kardex-stage-progress {
    display: grid;
    justify-items: end;
    gap: 3px;
    flex: 0 0 auto;
}

.kardex-stage-progress strong {
    display: inline-flex;
    align-items: center;
    min-height: 30px;
    padding: 0 10px;
    border-radius: 999px;
    color: var(--stage-strong);
    background: rgba(255, 255, 255, .92);
    font-size: .86rem;
    font-weight: 950;
}

.kardex-stage-progress span {
    color: rgba(255, 255, 255, .78);
    text-transform: none;
}

.kardex-unit-list {
    display: grid;
    gap: 8px;
    padding: 12px;
}

.kardex-unit-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(82px, 120px) auto;
    gap: 16px;
    align-items: center;
    min-height: 68px;
    padding: 11px 12px;
    border: 1px solid rgba(255, 255, 255, .78);
    border-left: 4px solid var(--stage-strong);
    border-radius: 8px;
    background: rgba(255, 255, 255, .78);
}

.kardex-unit-row:hover {
    background: rgba(255, 255, 255, .94);
}

.kardex-unit-key {
    display: inline-flex;
    margin-right: 6px;
    color: var(--stage-strong);
    font-size: .72rem;
    font-weight: 950;
    text-transform: uppercase;
}

.kardex-unit-row .row-main strong {
    overflow-wrap: anywhere;
    font-size: .94rem;
}

.kardex-unit-row .row-main span {
    color: var(--muted);
    font-size: .8rem;
}

.kardex-unit-row .row-grade {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
}

.kardex-unit-row .row-grade strong {
    color: rgba(16, 36, 58, .64);
    font-size: 2.35rem;
    font-weight: 950;
    line-height: 1;
    letter-spacing: 0;
}

.kardex-unit-row .row-grade.failing strong {
    color: rgba(179, 38, 30, .82);
}

.kardex-unit-row .row-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

@media (max-width: 1100px) {
    .kardex-profile-card {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 760px) {
    .kardex-profile-stats {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .kardex-unit-row {
        grid-template-columns: 1fr auto;
    }

    .kardex-unit-row .row-grade {
        justify-content: flex-start;
        order: 3;
    }

    .kardex-unit-row .row-grade strong {
        font-size: 1.75rem;
    }

    .kardex-unit-row .row-actions {
        justify-content: flex-start;
    }
}

.lms-course-grid {
    display: grid;
    gap: 10px;
}

.lms-courses-workspace {
    display: grid;
    grid-template-columns: minmax(280px, 340px) minmax(0, 1fr);
    gap: 16px;
    align-items: start;
}

.lms-courses-workspace.summary-collapsed {
    grid-template-columns: 56px minmax(0, 1fr);
}

.lms-course-shell {
    display: grid;
    gap: 14px;
    min-width: 0;
    overflow: hidden;
}

.lms-course-summary-panel,
.lms-course-summary-rail {
    min-width: 0;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--surface);
    box-shadow: var(--shadow-soft);
}

.lms-course-summary-panel {
    position: sticky;
    top: 84px;
    padding: 16px;
}

.lms-course-summary-panel h2 {
    margin: 0 0 4px;
    color: var(--text);
    font-size: 1.12rem;
}

.lms-course-summary-rail {
    display: grid;
    grid-template-rows: auto minmax(0, 1fr);
    justify-items: center;
    gap: 14px;
    min-height: 190px;
    padding: 10px 8px;
}

.lms-course-summary-rail span {
    writing-mode: vertical-rl;
    transform: rotate(180deg);
    color: var(--brand);
    font-size: .84rem;
    font-weight: 900;
    letter-spacing: 0;
    text-transform: uppercase;
}

.lms-course-card {
    display: flex;
    flex-wrap: wrap;
    gap: 16px 22px;
    align-items: center;
    min-height: 92px;
    padding: 16px 18px;
    border: 1px solid var(--line);
    border-left: 4px solid #2f8eb5;
    border-radius: 8px;
    background: #fff;
}

.lms-course-main {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    flex: 1 1 330px;
    gap: 12px;
    align-items: center;
    min-width: 0;
}

.lms-course-code {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 58px;
    min-height: 28px;
    padding: 5px 10px;
    border-radius: 999px;
    background: #eef2f7;
    color: #314155;
    font-size: .78rem;
    font-weight: 900;
    text-transform: lowercase;
}

.lms-course-main h2,
.lms-course-summary h2 {
    margin: 0;
    color: var(--ink);
    font-size: 1.05rem;
    line-height: 1.18;
}

.lms-course-main p,
.lms-course-summary p {
    margin: 4px 0 0;
    color: var(--muted);
    font-size: .84rem;
    font-weight: 800;
}

.lms-course-data {
    display: grid;
    flex: 1 1 190px;
    gap: 3px;
    min-width: 0;
}

.lms-course-data span,
.lms-grade-chip span {
    display: block;
    color: var(--muted);
    font-size: .72rem;
    font-weight: 900;
    text-transform: uppercase;
}

.lms-course-data strong {
    display: block;
    color: var(--ink);
    font-size: .98rem;
    overflow-wrap: anywhere;
}

.lms-course-data small {
    display: block;
    color: var(--muted);
    font-size: .78rem;
    font-weight: 750;
}

.lms-grade-chip {
    justify-self: end;
    gap: 8px;
    background: #fff3d2;
    color: #6d4700;
}

.lms-grade-chip strong {
    font-size: 1.05rem;
}

.lms-course-actions {
    display: flex;
    flex: 0 1 auto;
    gap: 10px;
    flex-wrap: wrap;
    justify-content: flex-end;
    align-items: center;
    margin-left: auto;
}

.lms-pending-dot {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 28px;
    height: 28px;
    padding: 0 8px;
    border: 1px solid #e0b43a;
    border-radius: 999px;
    background: #fff3c4;
    color: #6d4700;
    font-size: .82rem;
    font-weight: 950;
    line-height: 1;
}

.lms-course-legend {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 12px;
    padding: 10px 12px;
    border: 1px solid #f1d995;
    border-radius: 8px;
    background: #fffaf0;
}

.lms-course-legend p {
    margin: 0;
    color: var(--muted);
    font-size: .78rem;
    font-weight: 850;
    line-height: 1.35;
}

.session-calendar-builder {
    margin-top: 14px;
}

.section-mini-header {
    display: flex;
    gap: 14px;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
}

.section-mini-header h3 {
    margin: 0;
    color: var(--ink);
    font-size: 1rem;
}

.inline-check.align-end {
    align-self: end;
    min-height: 42px;
}

.weekday-picker {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 12px 0;
}

.weekday-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: #fff;
    color: var(--muted);
    font-family: inherit;
    font-size: .94rem;
    font-weight: 950;
    cursor: pointer;
}

.weekday-pill:hover,
.weekday-pill.active {
    border-color: #0a3b70;
    background: #0a3b70;
    color: #fff;
}

.session-day-grid {
    display: grid;
    gap: 8px;
}

.session-day-row {
    display: grid;
    grid-template-columns: minmax(120px, .5fr) minmax(0, 1fr) minmax(0, 1fr);
    gap: 10px;
    align-items: end;
    padding: 10px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
}

.session-day-row strong {
    color: var(--ink);
}

.compact-label {
    gap: 4px;
}

.session-calendar-list {
    display: grid;
    gap: 16px;
}

.session-calendar-list.compact {
    gap: 12px;
}

.session-bulk-panel {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 14px;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #f8fbff;
}

.session-bulk-summary {
    display: grid;
    gap: 3px;
    min-width: min(100%, 280px);
}

.session-bulk-summary strong {
    color: var(--ink);
    font-size: .9rem;
}

.session-bulk-summary span {
    color: var(--muted);
    font-size: .78rem;
    font-weight: 800;
}

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

.session-focus-block {
    display: grid;
    gap: 10px;
    padding: 12px;
    border: 1px solid #bfd3e8;
    border-radius: 8px;
    background: #f8fbff;
}

.session-focus-block > header,
.session-month-group {
    display: grid;
    gap: 10px;
}

.session-focus-block > header {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
}

.session-month-group > header {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    padding: 0 2px 4px;
    border-bottom: 1px solid var(--line);
}

.session-month-group h3 {
    margin: 0;
    color: var(--ink);
    font-size: 1.05rem;
}

.session-month-inner {
    display: grid;
    gap: 8px;
}

.session-month-inner h4 {
    margin: 0;
    color: var(--muted);
    font-size: .86rem;
    font-weight: 950;
}

.session-card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 10px;
}

.session-card {
    position: relative;
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    gap: 12px;
    align-items: start;
    min-width: 0;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
    box-shadow: 0 8px 18px rgba(15, 35, 55, .07);
}

.session-select-check {
    position: absolute;
    top: 8px;
    right: 8px;
    display: inline-grid;
    place-items: center;
    width: 28px;
    height: 28px;
    border: 1px solid #c8d8e8;
    border-radius: 999px;
    background: rgba(255, 255, 255, .92);
    cursor: pointer;
}

.session-select-check input {
    width: 15px;
    height: 15px;
    margin: 0;
    accent-color: var(--brand);
}

.session-card.today {
    border-color: #75a9d8;
    background: #f3f9ff;
}

.session-card.next {
    border-color: #e6a846;
    background: #fffaf1;
}

.session-card.past {
    border-color: #c8e5d5;
    background: #f7fcf9;
    box-shadow: 0 5px 12px rgba(15, 35, 55, .04);
    cursor: pointer;
    transition: border-color .16s ease, box-shadow .16s ease, transform .16s ease;
}

.session-card.past:hover {
    border-color: #7dc99d;
    box-shadow: 0 10px 22px rgba(32, 94, 62, .12);
    transform: translateY(-1px);
}

.session-date-badge {
    display: inline-grid;
    place-items: center;
    width: 54px;
    height: 54px;
    border: 1px solid #c8d8e8;
    border-radius: 999px;
    background: #f8fbff;
    color: var(--ink);
    box-shadow: inset 0 0 0 3px rgba(255, 255, 255, .75);
}

.session-card.today .session-date-badge {
    border-color: #0a3b70;
    background: #0a3b70;
    color: #fff;
}

.session-card.next .session-date-badge {
    border-color: #d87912;
    background: #fff0dc;
    color: #d05f00;
}

.session-card.past .session-date-badge {
    border-color: #acd7bd;
    background: #eef9f2;
    color: #477456;
}

.session-date-badge strong {
    font-size: 1.24rem;
    line-height: 1;
}

.session-date-badge span {
    color: var(--muted);
    font-size: .68rem;
    font-weight: 900;
    text-transform: uppercase;
}

.session-card.today .session-date-badge span {
    color: rgba(255, 255, 255, .82);
}

.session-card.next .session-date-badge span {
    color: #8f4300;
}

.session-card.past .session-date-badge span {
    color: #5f8369;
}

.session-card-main {
    display: grid;
    gap: 4px;
    min-width: 0;
}

.session-card-main strong {
    color: var(--ink);
    font-size: .94rem;
}

.session-card-main span,
.session-card-main small {
    color: var(--muted);
    font-size: .78rem;
    font-weight: 800;
}

.session-card-main span {
    overflow-wrap: anywhere;
}

.session-card-main a {
    width: fit-content;
    color: var(--brand);
    font-size: .78rem;
    font-weight: 900;
    text-decoration: none;
}

.session-recording-panel {
    display: flex;
    gap: 14px;
    align-items: center;
    justify-content: space-between;
    padding: 14px 16px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #f8fbff;
}

.session-recording-panel.observations {
    align-items: flex-start;
    background: #fff;
}

.session-recording-panel > div {
    display: grid;
    gap: 5px;
    min-width: 0;
}

.session-recording-panel a,
.session-recording-panel strong,
.session-recording-panel p {
    margin: 0;
    overflow-wrap: anywhere;
}

.session-recording-panel a {
    color: var(--brand);
    font-weight: 900;
    text-decoration: none;
}

.compact-alert {
    margin: 0;
    padding: 9px 12px;
}

.session-card-actions {
    grid-column: 1 / -1;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: flex-end;
    padding-top: 8px;
    border-top: 1px solid #eef3f8;
}

.lms-tab-bell {
    display: inline-flex;
    align-items: center;
    min-height: 22px;
    margin-left: 8px;
    padding: 2px 7px;
    border-radius: 999px;
    background: #fff3d2;
    color: #6d4700;
    font-size: .72rem;
    font-weight: 950;
}

.lms-course-detail-shell {
    display: grid;
    grid-template-columns: minmax(240px, 300px) minmax(0, 1fr);
    gap: 16px;
    align-items: start;
}

.lms-course-summary {
    position: sticky;
    top: 14px;
}

.lms-course-workspace {
    min-width: 0;
}

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

.lms-content-block,
.lms-section-card {
    padding: 16px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
}

.lms-content-block h3,
.lms-section-card h3 {
    margin: 0 0 10px;
    color: var(--ink);
    font-size: 1rem;
}

.lms-html-content {
    max-height: 260px;
    overflow: auto;
}

.lms-section-card {
    display: grid;
    gap: 12px;
    margin-top: 14px;
}

.lms-section-card.no-margin {
    margin-top: 0;
}

.lms-section-card > header {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    align-items: center;
}

.lms-section-actions {
    display: inline-flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    justify-content: flex-end;
}

.lms-session-list {
    display: grid;
    gap: 10px;
}

.lms-activity-list {
    display: grid;
    gap: 10px;
}

.lms-activity-list.teacher-compact-list {
    gap: 6px;
}

.lms-session-item {
    display: grid;
    grid-template-columns: 64px minmax(0, 1fr);
    gap: 12px;
    align-items: center;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #f8fbff;
}

.lms-activity-item {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(110px, auto);
    gap: 14px;
    align-items: center;
    padding: 13px 14px;
    border: 1px solid var(--line);
    border-left: 4px solid #0a3b70;
    border-radius: 8px;
    background: #fbfdff;
}

.lms-activity-item.teacher-compact {
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 10px;
    padding: 8px 10px;
    border-left-width: 3px;
    background: #fff;
}

.lms-activity-item.teacher-compact .row-main {
    display: grid;
    grid-template-columns: minmax(260px, 1fr) auto;
    gap: 10px;
    align-items: center;
    min-width: 0;
}

.lms-activity-title-line {
    display: flex;
    flex-wrap: wrap;
    gap: 6px 12px;
    align-items: center;
    min-width: 0;
}

.lms-activity-title-line strong {
    min-width: min(320px, 100%);
    overflow: hidden;
    color: var(--ink);
    text-overflow: ellipsis;
    white-space: nowrap;
}

.lms-title-link {
    min-width: min(320px, 100%);
    overflow: hidden;
    border: 0;
    background: transparent;
    color: var(--ink);
    cursor: pointer;
    font: inherit;
    font-weight: 900;
    padding: 0;
    text-align: left;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.lms-title-link:hover {
    color: var(--primary);
    text-decoration: underline;
}

.lms-activity-title-line span {
    color: var(--muted);
    font-size: .78rem;
    font-weight: 800;
    white-space: nowrap;
}

.lms-activity-row-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    align-items: center;
    justify-content: flex-end;
}

.lms-activity-list.student-compact-list {
    gap: 7px;
}

.lms-activity-item.student-compact {
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 10px;
    align-items: center;
    padding: 10px 12px;
    border-left-width: 3px;
    background: #fff;
}

.lms-activity-item.student-compact.needs-correction {
    border-color: #f5b0aa;
    border-left-color: #d92d20;
    background: #fffafa;
    box-shadow: 0 10px 22px rgba(217, 45, 32, .08);
}

.lms-activity-item.student-compact.completed {
    border-color: #b7e3c6;
    border-left-color: #1f8f55;
    background: #f4fbf7;
    box-shadow: 0 10px 22px rgba(31, 143, 85, .07);
}

.lms-activity-item.student-compact .row-main {
    display: grid;
    grid-template-columns: minmax(260px, 1fr) auto;
    gap: 10px;
    align-items: center;
    min-width: 0;
}

.lms-student-activity-main {
    display: grid;
    gap: 4px;
    min-width: 0;
}

.lms-student-summary {
    overflow: hidden;
    color: var(--muted);
    font-size: .78rem;
    font-weight: 750;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.lms-activity-row-actions.student-actions {
    margin-top: 0;
}

.lms-completed-activities {
    margin-top: 12px;
    border: 1px solid #cfe9d8;
    border-radius: 8px;
    background: #fbfefc;
}

.lms-completed-activities > summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 10px 12px;
    color: var(--ink);
    cursor: pointer;
    font-weight: 950;
    list-style: none;
}

.lms-completed-activities > summary::-webkit-details-marker {
    display: none;
}

.lms-completed-activities > summary strong {
    min-width: 32px;
    padding: 3px 9px;
    border-radius: 999px;
    background: #dcfce7;
    color: #166534;
    font-size: .78rem;
    text-align: center;
}

.lms-completed-activities[open] > summary {
    border-bottom: 1px solid #cfe9d8;
}

.lms-completed-activities .lms-activity-list {
    padding: 10px;
}

.lms-table-action.delivery-file {
    border-color: #a7d4c0;
    background: #f5fffa;
}

.late-chip {
    display: inline-flex;
    align-items: center;
    min-height: 24px;
    padding: 3px 8px;
    border: 1px solid #f2c879;
    border-radius: 999px;
    background: #fff4d8;
    color: #7a4b00;
    font-size: .72rem;
    font-weight: 950;
}

.lms-grade-button {
    min-width: 52px;
    min-height: 38px;
    padding: 4px 10px;
    border: 1px solid #b9d7ff;
    border-radius: 9px;
    background: #eef6ff;
    color: #075aaa;
    font-family: inherit;
    font-size: 1.45rem;
    font-weight: 950;
    line-height: 1;
    cursor: pointer;
}

.lms-grade-button:hover {
    border-color: #0a6ecb;
    background: #fff;
}

.lms-correction-warning,
.lms-modal-note,
.lms-upload-panel {
    display: grid;
    gap: 4px;
    padding: 12px 14px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fbfdff;
}

.lms-correction-warning {
    border-color: #f5b0aa;
    background: #fff6f5;
    color: #8c1d18;
}

.lms-correction-warning strong {
    color: #7a1b14;
}

.lms-upload-panel {
    grid-template-columns: minmax(240px, 1fr) auto;
    align-items: center;
}

.lms-upload-panel span {
    color: var(--muted);
    font-size: .8rem;
    font-weight: 750;
}

.lms-grade-modal-score {
    justify-self: start;
    min-width: 86px;
    padding: 12px 18px;
    border: 1px solid #b9d7ff;
    border-radius: 12px;
    background: #eef6ff;
    color: #075aaa;
    font-size: 2.4rem;
    font-weight: 950;
    line-height: 1;
}

.lms-attachment-actions {
    display: inline-flex;
    flex-wrap: wrap;
    gap: 4px;
    align-items: center;
    justify-content: flex-end;
}

.lms-table-action,
.lms-table-muted {
    display: inline-flex;
    align-items: center;
    min-height: 30px;
    padding: 5px 9px;
    border: 1px solid #bfd3e8;
    border-radius: 7px;
    background: #f8fbff;
    color: var(--ink);
    font-size: .78rem;
    font-weight: 900;
}

.lms-table-action {
    cursor: pointer;
}

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

.lms-table-muted {
    color: var(--muted);
    background: #f6f8fb;
}

.lms-table-action.file-action {
    position: relative;
    overflow: hidden;
}

.lms-table-action.file-action input[type="file"] {
    position: absolute;
    inset: 0;
    cursor: pointer;
    opacity: 0;
}

.lms-activity-item .row-main p {
    margin: 7px 0 0;
    color: var(--muted);
    font-size: .86rem;
}

.lms-activity-status {
    display: grid;
    justify-items: end;
    gap: 5px;
}

.lms-activity-item.teacher-compact .lms-activity-status {
    align-content: center;
}

.lms-activity-status small {
    color: var(--muted);
    font-size: .76rem;
    font-weight: 800;
}

.lms-activity-traffic {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    align-items: center;
    justify-content: flex-end;
}

.traffic-dot {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    min-width: 32px;
    height: 32px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: #f8fafc;
    color: var(--ink);
    font-size: .86rem;
    font-weight: 950;
    box-shadow: 0 7px 14px rgba(15, 23, 42, .08);
    line-height: 1;
}

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

.traffic-dot.submitted {
    border-color: #bfdbfe;
    background: #eff6ff;
    color: #1d4ed8;
}

.traffic-dot.correction {
    border-color: #fecaca;
    background: #fff1f2;
    color: #be123c;
}

.traffic-dot.completed {
    border-color: #bbf7d0;
    background: #f0fdf4;
    color: #15803d;
}

.traffic-help-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 26px;
    min-width: 26px;
    height: 26px;
    border: 1px solid #bfd3e8;
    border-radius: 999px;
    background: #fff;
    color: var(--muted);
    cursor: pointer;
    font-size: .78rem;
    font-weight: 950;
}

.traffic-help-button:hover {
    border-color: var(--primary);
    color: var(--primary);
}

.modal-panel.traffic-help-modal {
    max-width: 460px;
}

.traffic-help-list {
    display: grid;
    gap: 10px;
}

.traffic-help-row {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    gap: 10px;
    align-items: center;
}

.traffic-help-row div {
    display: grid;
    gap: 2px;
}

.traffic-help-row strong {
    color: var(--ink);
    font-size: .92rem;
    font-weight: 950;
}

.traffic-help-row span:not(.traffic-dot) {
    color: var(--muted);
    font-size: .82rem;
    font-weight: 750;
}

.modal-panel.readable-modal {
    max-width: 860px;
}

.lms-instructions-modal-content {
    max-height: min(66vh, 680px);
    overflow: auto;
    padding: 16px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: #fff;
}

.lms-activity-delivery-page {
    padding: 0;
}

.lms-delivery-page-stack {
    display: grid;
    gap: 0;
    background: #fff;
}

.lms-activity-delivery-page .tab-section {
    gap: 0;
}

.lms-delivery-page-section {
    display: grid;
    gap: 10px;
    padding: 16px;
    background: #fff;
}

.lms-delivery-page-section + .lms-delivery-page-section {
    border-top: 1px solid var(--line);
}

.lms-delivery-page-section > header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
}

.lms-delivery-page-section h3 {
    margin: 0 0 6px;
    color: var(--ink);
    font-size: 1rem;
}

.lms-delivery-page-section header p:not(.eyebrow) {
    margin: 0;
    color: var(--muted);
    font-size: .88rem;
    font-weight: 750;
}

.lms-delivery-page-body {
    display: grid;
    gap: 12px;
}

.lms-activity-instructions-inline {
    max-height: none;
    overflow: visible;
    padding: 10px 12px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fbfdff;
}

.lms-activity-delivery-page .lms-modal-note {
    padding: 10px 12px;
}

.lms-activity-delivery-page .rich-editor-shell {
    margin-top: 0;
}

.lms-activity-delivery-page .rich-editor-box .ql-editor {
    min-height: 260px;
}

.lms-edit-warning {
    display: grid;
    gap: 4px;
    padding: 12px 14px;
    border: 1px solid #f2c879;
    border-radius: 8px;
    background: #fff8e6;
    color: #6f4507;
    font-size: .9rem;
}

.lms-edit-warning strong {
    color: #5c3600;
}

.lms-session-date {
    display: grid;
    justify-items: center;
    padding: 8px;
    border-radius: 8px;
    background: #0a3b70;
    color: #fff;
}

.lms-session-date strong {
    font-size: 1.25rem;
    line-height: 1;
}

.lms-session-date span {
    font-size: .76rem;
    font-weight: 850;
    text-transform: uppercase;
}

.student-course-summary {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
    margin-bottom: 12px;
}

.student-course-list {
    display: grid;
    gap: 8px;
}

.student-course-row {
    display: grid;
    grid-template-columns: minmax(260px, 1.5fr) minmax(160px, .8fr) minmax(180px, .8fr) auto auto;
    gap: 12px;
    align-items: center;
    padding: 12px 14px;
    border: 1px solid var(--line);
    border-left: 4px solid #2f8eb5;
    border-radius: 8px;
    background: #fff;
}

.student-course-main {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    gap: 10px;
    align-items: center;
    min-width: 0;
}

.student-course-main strong,
.student-course-meta strong {
    display: block;
    color: var(--ink);
}

.student-course-main span:not(.soft-badge),
.student-course-meta span {
    display: block;
    color: var(--muted);
    font-size: .82rem;
    font-weight: 750;
}

.student-course-status {
    display: grid;
    justify-items: end;
    gap: 4px;
}

.student-course-grade {
    color: #0a3b70;
    font-size: 1.25rem;
    line-height: 1;
}

@media (max-width: 900px) {
    .lms-courses-workspace,
    .lms-course-shell,
    .lms-dashboard-grid,
    .student-course-summary {
        grid-template-columns: 1fr;
    }

    .lms-courses-workspace.summary-collapsed {
        grid-template-columns: 1fr;
    }

    .lms-course-summary-panel {
        position: static;
    }

    .lms-course-summary-rail {
        min-height: 54px;
        grid-template-columns: auto minmax(0, 1fr);
        grid-template-rows: auto;
        justify-items: start;
        align-items: center;
    }

    .lms-course-summary-rail span {
        writing-mode: initial;
        transform: none;
    }

    .lms-course-card {
        grid-template-columns: 1fr;
    }

    .lms-grade-chip {
        justify-self: start;
    }

    .lms-course-actions {
        justify-content: flex-start;
        margin-left: 0;
    }

    .student-course-row {
        grid-template-columns: 1fr;
    }

    .student-course-status {
        justify-items: start;
    }
}

@media (max-width: 560px) {
    .lms-course-workspace {
        margin-inline: -8px;
        border-inline: 0;
        border-radius: 0;
        background: transparent;
        box-shadow: none;
    }

    .lms-course-workspace,
    .lms-course-shell {
        gap: 10px;
    }

    .lms-course-workspace .mobile-tab-selector {
        padding-inline: 8px;
    }

    .lms-course-workspace .editor-tab-body {
        padding: 10px 0 0;
        background: transparent;
    }

    .lms-course-workspace .lms-section-card {
        padding: 12px 8px;
        border-inline: 0;
        border-radius: 0;
        box-shadow: none;
    }

    .lms-course-workspace .lms-section-card > header {
        align-items: flex-start;
    }

    .lms-course-grid {
        grid-template-columns: 1fr;
    }

    .lms-course-main {
        display: grid;
    }

    .lms-session-item {
        grid-template-columns: 1fr;
    }

    .lms-activity-item {
        grid-template-columns: 1fr;
    }

    .lms-activity-item.student-compact {
        padding: 12px 10px;
        border-right-width: 0;
        border-radius: 0 8px 8px 0;
    }

    .lms-activity-item.teacher-compact .row-main {
        grid-template-columns: 1fr;
    }

    .lms-activity-item.student-compact .row-main,
    .lms-upload-panel {
        grid-template-columns: 1fr;
    }

    .lms-activity-row-actions {
        justify-content: flex-start;
    }

    .lms-activity-row-actions.student-actions {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, max-content));
        align-items: start;
        justify-content: start;
    }

    .lms-activity-title-line {
        gap: 5px 8px;
    }

    .lms-activity-title-line strong,
    .lms-title-link {
        min-width: 0;
        width: 100%;
    }

    .lms-student-summary {
        max-width: 100%;
    }

    .lms-activity-status {
        justify-items: start;
    }

    .lms-activity-traffic {
        justify-content: flex-start;
    }

    .lms-session-date {
        justify-items: start;
    }
}

.rich-editor-shell {
    display: grid;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
}

.rich-editor-shell.readonly {
    background: #f8fbff;
}

.rich-editor-head,
.rich-editor-foot {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    align-items: center;
    padding: 10px 12px;
    background: #f8fbff;
}

.rich-editor-head {
    border-bottom: 1px solid var(--line);
}

.rich-editor-head span {
    display: block;
    color: var(--ink);
    font-weight: 900;
}

.rich-editor-head small,
.rich-editor-foot span {
    color: var(--muted);
    font-size: .78rem;
    font-weight: 750;
}

.rich-editor-foot {
    justify-content: flex-end;
    border-top: 1px solid var(--line);
}

.rich-editor-token-panel {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding: 10px 12px;
    border-bottom: 1px solid var(--line);
    background: #fffdf8;
}

.token-chip {
    min-height: 28px;
    padding: 4px 9px;
    border: 1px solid #c8d8ea;
    border-radius: 999px;
    background: #fff;
    color: var(--ink);
    font-size: .78rem;
    font-weight: 850;
}

.token-chip:hover {
    border-color: #0a3b70;
    color: #0a3b70;
}

.rich-editor-box .ql-toolbar.ql-snow {
    border: 0;
    border-bottom: 1px solid var(--line);
    background: #fff;
}

.rich-editor-box .ql-container.ql-snow {
    border: 0;
    color: var(--ink);
    font-family: inherit;
    font-size: .95rem;
}

.rich-editor-box .ql-editor {
    line-height: 1.55;
}

.rich-editor-box .ql-editor.ql-blank::before {
    color: #8a9aac;
    font-style: normal;
}

.rich-editor-compact .ql-editor {
    min-height: 120px;
}

.rich-editor-normal .ql-editor {
    min-height: 210px;
}

.rich-editor-tall .ql-editor {
    min-height: 340px;
}

.rich-editor-full .ql-editor {
    min-height: 52vh;
}

.lms-activity-instructions {
    margin-top: 10px;
    max-height: 220px;
    overflow: auto;
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 12px;
    background: #fbfdff;
}

.lms-pdf-list,
.lms-delivery-box,
.lms-inline-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    margin-top: 10px;
}

.lms-inline-actions {
    gap: 10px;
}

.lms-pdf-chip {
    display: inline-flex;
    gap: 8px;
    align-items: center;
    min-height: 34px;
    padding: 6px 10px;
    border: 1px solid #bfd3e8;
    border-radius: 8px;
    background: #f8fbff;
    color: var(--ink);
    font-size: .86rem;
    font-weight: 850;
    text-decoration: none;
}

.lms-pdf-chip.button-chip {
    cursor: pointer;
    font-family: inherit;
}

.lms-pdf-chip::before {
    content: "PDF";
    display: inline-flex;
    align-items: center;
    min-height: 20px;
    padding: 2px 6px;
    border-radius: 5px;
    background: #fff1f1;
    color: #b42318;
    font-size: .68rem;
    letter-spacing: .02em;
}

.lms-pdf-chip span {
    color: var(--muted);
    font-size: .76rem;
    font-weight: 800;
}

.lms-pdf-chip:hover {
    border-color: var(--primary);
    background: #fff;
}

.lms-pdf-chip-group {
    display: inline-flex;
    flex-wrap: wrap;
    gap: 6px;
    align-items: center;
}

.lms-remove-file-button {
    min-height: 30px;
    padding: 4px 9px;
    border: 1px solid #f3b3ad;
    border-radius: 7px;
    background: #fffafa;
    color: #9f241b;
    font-family: inherit;
    font-size: .78rem;
    font-weight: 900;
    cursor: pointer;
}

.lms-remove-file-button:hover:not(:disabled) {
    border-color: #d92d20;
    background: #fff;
    color: #7a1b14;
}

.lms-remove-file-button:disabled {
    cursor: wait;
    opacity: .7;
}

.lms-upload-strip {
    display: inline-flex;
    gap: 10px;
    align-items: center;
    min-height: 36px;
    margin-top: 10px;
    padding: 6px 10px;
    border: 1px dashed #a8bfd9;
    border-radius: 8px;
    background: #fff;
    color: var(--ink);
    font-size: .86rem;
    font-weight: 850;
}

.lms-upload-strip input[type="file"] {
    max-width: 260px;
    color: var(--muted);
    font-size: .78rem;
    font-weight: 750;
}

.lms-delivery-form {
    display: grid;
    gap: 10px;
    width: 100%;
    margin-top: 10px;
}

.lms-notification-stack,
.lms-message-list {
    display: grid;
    gap: 6px;
}

.lms-notification-item {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    gap: 10px;
    align-items: center;
    padding: 12px 14px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fbfdff;
}

.lms-notification-item.timeline-alert {
    grid-template-columns: auto minmax(0, 1fr) auto;
}

.lms-notification-item.unread {
    background: #fffaf0;
}

.lms-notification-item strong,
.lms-message-item strong {
    color: var(--ink);
}

.lms-notification-item span,
.lms-message-item header span {
    color: var(--muted);
    font-size: .8rem;
    font-weight: 750;
}

.lms-timeline-list {
    display: grid;
    gap: 8px;
}

.lms-timeline-event {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
}

.lms-timeline-event.unread {
    background: #fffaf0;
    border-color: #f2d391;
}

.lms-timeline-event strong,
.lms-timeline-event span,
.lms-timeline-event small {
    display: block;
}

.lms-timeline-event strong {
    color: var(--ink);
}

.lms-timeline-event span {
    margin-top: 2px;
    color: var(--text);
    font-size: .9rem;
}

.lms-timeline-event small {
    margin-top: 3px;
    color: var(--muted);
    font-size: .78rem;
    font-weight: 750;
}

.lms-timeline-marker {
    width: 10px;
    height: 42px;
    border-radius: 999px;
    background: #8ea4bc;
}

.lms-timeline-marker.info {
    background: #2f8eb5;
}

.lms-timeline-marker.warning {
    background: #f2a51a;
}

.lms-timeline-marker.danger {
    background: #d74a4a;
}

.lms-message-list {
    margin-top: 4px;
}

.lms-forum-shell {
    display: grid;
    grid-template-columns: minmax(220px, 320px) minmax(0, 1fr);
    gap: 14px;
    align-items: start;
}

.lms-forum-topics {
    display: grid;
    gap: 8px;
}

.lms-forum-topic {
    display: grid;
    width: 100%;
    gap: 4px;
    padding: 10px 12px;
    border: 1px solid var(--line);
    border-left: 4px solid #bfd3e8;
    border-radius: 8px;
    background: #fff;
    color: var(--ink);
    text-align: left;
    cursor: pointer;
}

.lms-forum-topic.active {
    border-color: #0a3b70;
    border-left-color: #0a3b70;
    background: #f8fbff;
}

.lms-forum-topic.unread {
    border-color: #9ec3e8;
    border-left-color: var(--primary);
    background: #f7fbff;
    box-shadow: 0 8px 18px rgba(10, 59, 112, .07);
}

.lms-forum-topic-title {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    min-width: 0;
}

.lms-forum-topic strong {
    font-size: .9rem;
}

.lms-forum-topic-title em {
    flex: 0 0 auto;
    padding: 2px 7px;
    border-radius: 999px;
    background: #dcfce7;
    color: #166534;
    font-size: .68rem;
    font-style: normal;
    font-weight: 950;
}

.lms-forum-topic span,
.lms-forum-topic small {
    color: var(--muted);
    font-size: .76rem;
    font-weight: 800;
}

.lms-forum-thread {
    display: grid;
    gap: 8px;
    min-width: 0;
}

.lms-forum-mobile-back {
    display: none;
}

.lms-forum-thread-header {
    display: flex;
    gap: 12px;
    align-items: flex-start;
    justify-content: space-between;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--line);
}

.lms-forum-thread-header h4 {
    margin: 0;
    color: var(--ink);
    font-size: 1.2rem;
}

.lms-forum-description {
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fbfdff;
}

.lms-message-item {
    display: grid;
    gap: 4px;
    padding: 8px 10px;
    border: 1px solid var(--line);
    border-left: 4px solid var(--author-accent, var(--line));
    border-radius: 6px;
    background: var(--author-bg, #fff);
}

.lms-message-item.system {
    background: #f8fbff;
    border-style: dashed;
    border-left-color: #8ea4bc;
}

.lms-message-item.mine {
    --author-accent: #0a3b70;
    --author-bg: #f7fbff;
    box-shadow: inset 0 0 0 1px rgba(10, 59, 112, .08);
}

.lms-message-item.other.author-color-1 {
    --author-accent: #1f8f83;
    --author-bg: #f4fbfa;
}

.lms-message-item.other.author-color-2 {
    --author-accent: #b7791f;
    --author-bg: #fffaf0;
}

.lms-message-item.other.author-color-3 {
    --author-accent: #7c5cc4;
    --author-bg: #faf8ff;
}

.lms-message-item.other.author-color-4 {
    --author-accent: #c05621;
    --author-bg: #fff8f3;
}

.lms-message-item.other.author-color-5 {
    --author-accent: #2f6f9f;
    --author-bg: #f5faff;
}

.lms-message-item.other.author-color-6 {
    --author-accent: #9b2c2c;
    --author-bg: #fff7f7;
}

.lms-message-item.other.author-color-7 {
    --author-accent: #4d7c0f;
    --author-bg: #f8fbf0;
}

.lms-message-item.other.author-color-8 {
    --author-accent: #805ad5;
    --author-bg: #fbf8ff;
}

.lms-message-item header {
    display: flex;
    justify-content: space-between;
    gap: 8px;
    align-items: center;
}

.lms-message-item header strong {
    color: var(--author-accent, var(--ink));
}

.lms-message-item .html-preview {
    min-height: 0;
    padding: 0;
    overflow: visible;
    background: transparent;
}

.lms-message-item .lms-html-content {
    max-height: none;
    min-width: 0;
    overflow-wrap: anywhere;
    display: flow-root;
    font-size: .88rem;
    line-height: 1.42;
}

.lms-message-item .lms-html-content p {
    margin: 0 0 4px;
}

.lms-message-item .lms-html-content p:last-child {
    margin-bottom: 0;
}

.lms-message-editor {
    display: grid;
    gap: 10px;
    margin-top: 8px;
    padding-top: 12px;
    border-top: 1px solid var(--line);
}

.lms-review-modal .modal-body {
    max-height: min(72vh, 760px);
    overflow: auto;
}

.lms-review-list {
    display: grid;
    gap: 12px;
}

.lms-delivery-line-list {
    display: grid;
    gap: 6px;
}

.lms-delivery-line {
    display: flex;
    gap: 12px;
    align-items: center;
    justify-content: space-between;
    min-height: 54px;
    padding: 8px 10px 8px 12px;
    border: 1px solid var(--line);
    border-left: 4px solid #8ea4bc;
    border-radius: 8px;
    background: #fff;
}

.lms-delivery-line.needs-review {
    border-left-color: #f59e0b;
    background: #fffdf8;
}

.lms-delivery-line.reviewed {
    border-left-color: #0a7f55;
    background: #fbfffd;
}

.lms-delivery-student {
    display: grid;
    gap: 3px;
    min-width: 0;
}

.lms-delivery-student strong {
    overflow: hidden;
    color: var(--ink);
    font-size: .9rem;
    font-weight: 950;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.lms-delivery-student span {
    color: var(--muted);
    font-size: .78rem;
    font-weight: 850;
}

.lms-delivery-activity-title {
    min-width: 180px;
    overflow: hidden;
    color: var(--ink);
    font-size: .86rem;
    font-weight: 950;
    text-align: left;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.lms-delivery-actions {
    display: flex;
    flex: 0 0 auto;
    gap: 8px;
    align-items: center;
}

.lms-admin-list {
    gap: 8px;
}

.lms-attendance-row,
.lms-partial-row,
.lms-final-row {
    align-items: center;
    border-left: 4px solid #2f98bf;
    background: #fff;
    padding-left: 14px;
}

.lms-final-row {
    display: grid;
    grid-template-columns: minmax(220px, 1.2fr) minmax(260px, .9fr) 110px;
    gap: 12px;
}

.lms-final-support {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    align-items: center;
}

.lms-final-support span {
    display: inline-flex;
    align-items: center;
    min-height: 26px;
    padding: 4px 8px;
    border-radius: 999px;
    background: #eef5fb;
    color: var(--primary);
    font-size: .74rem;
    font-weight: 900;
}

.lms-attendance-list,
.lms-partial-grade-list {
    display: grid;
    gap: 8px;
}

.compact-tabs {
    margin: 0 0 12px;
    border-bottom: 1px solid var(--line);
}

.attendance-matrix-wrap {
    width: 100%;
    overflow-x: auto;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
}

.compact-pager {
    align-items: center;
    display: flex;
    gap: 10px;
    justify-content: flex-end;
    margin-top: 12px;
}

.compact-pager span {
    color: var(--muted);
    font-size: 0.82rem;
    font-weight: 800;
}

.attendance-matrix {
    width: 100%;
    min-width: 720px;
    border-collapse: collapse;
}

.attendance-matrix th,
.attendance-matrix td {
    padding: 9px 10px;
    border-bottom: 1px solid #e2edf5;
    text-align: center;
    vertical-align: middle;
}

.attendance-matrix th:first-child,
.attendance-matrix td:first-child {
    min-width: 260px;
    text-align: left;
}

.attendance-matrix th {
    color: var(--muted);
    font-size: .72rem;
    font-weight: 950;
    text-transform: uppercase;
    white-space: nowrap;
}

.attendance-matrix th span,
.attendance-matrix th small,
.attendance-matrix td:first-child strong,
.attendance-matrix td:first-child small {
    display: block;
}

.attendance-matrix th small,
.attendance-matrix td:first-child small {
    color: var(--muted);
    font-size: .68rem;
    font-weight: 850;
    text-transform: none;
}

.attendance-matrix td:first-child strong {
    color: var(--ink);
    font-size: .82rem;
    font-weight: 950;
}

.student-attendance-summary {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 10px;
}

.student-attendance-summary span {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    min-height: 30px;
    padding: 5px 10px;
    border: 1px solid #d7e6f3;
    border-radius: 999px;
    background: #f8fbff;
    color: var(--muted);
    font-size: .78rem;
    font-weight: 850;
}

.student-attendance-summary strong {
    color: var(--primary);
    font-size: .92rem;
}

.student-attendance-matrix {
    min-width: 640px;
}

.student-attendance-matrix th:first-child,
.student-attendance-matrix td:first-child {
    min-width: 180px;
}

.student-attendance-mobile-list {
    display: none;
}

.attendance-symbol {
    display: inline-grid;
    place-items: center;
    width: 28px;
    height: 28px;
    border: 1px solid #d4e2ee;
    border-radius: 999px;
    background: #f7fbff;
    color: var(--muted);
    font-size: .84rem;
    font-weight: 950;
    line-height: 1;
}

.attendance-symbol.present {
    border-color: #b8efd0;
    background: #eafff2;
    color: #08783b;
}

.attendance-symbol.absent {
    border-color: #ffc5c5;
    background: #fff0f0;
    color: #b42318;
}

.attendance-symbol.late {
    border-color: #f6cf83;
    background: #fff7e6;
    color: #9a5b00;
}

.attendance-symbol.justified {
    border-color: #b7d8f6;
    background: #eef7ff;
    color: #0a4d83;
}

.attendance-symbol.empty {
    background: #f4f6f8;
    color: #8a98a8;
}

.lms-grade-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 46px;
    min-height: 34px;
    padding: 5px 10px;
    border: 1px solid #9ec8ef;
    border-radius: 8px;
    background: #edf7ff;
    color: #063d73;
    font-size: 1.05rem;
    font-weight: 950;
}

.lms-attendance-item,
.lms-partial-grade-row {
    display: grid;
    grid-template-columns: minmax(220px, 1.2fr) minmax(130px, .45fr) minmax(220px, 1fr);
    gap: 10px;
    align-items: center;
    padding: 10px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
}

.lms-partial-grade-row {
    grid-template-columns: minmax(190px, .32fr) minmax(0, 1fr);
    align-items: start;
}

.lms-attendance-item > div,
.lms-partial-grade-row > div,
.lms-partial-student {
    display: grid;
    gap: 2px;
    min-width: 0;
}

.lms-partial-grade-fields {
    display: grid;
    grid-template-columns: 120px minmax(0, 1fr) minmax(0, 1fr);
    gap: 10px;
    align-items: start;
}

.lms-partial-grade-fields .form-field {
    gap: 5px;
}

.lms-partial-grade-fields textarea {
    min-height: 78px;
    resize: vertical;
}

.lms-partial-grade-fields .lms-partial-score-field {
    max-width: 120px;
}

.lms-attendance-item strong,
.lms-partial-grade-row strong {
    overflow: hidden;
    color: var(--ink);
    font-size: .88rem;
    font-weight: 950;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.lms-attendance-item span,
.lms-partial-grade-row span {
    color: var(--muted);
    font-size: .76rem;
    font-weight: 850;
}

.compact-select,
.grade-input {
    min-height: 38px;
}

.grade-input {
    font-weight: 950;
    text-align: center;
}

.treasury-stamped-list {
    gap: 8px;
}

.payment-request-shell {
    display: grid;
    gap: 14px;
}

.compact-request-shell {
    gap: 16px;
}

.payment-request-form {
    display: grid;
    grid-template-columns: minmax(220px, 1fr) minmax(220px, 1fr) minmax(220px, 1fr) minmax(170px, .75fr);
    gap: 12px;
    align-items: end;
    padding: 16px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: linear-gradient(180deg, #fbfdff 0%, #f6f9fc 100%);
    box-shadow: 0 8px 18px rgba(15, 76, 129, .05);
}

.payment-request-period,
.payment-request-concept,
.payment-request-title,
.payment-request-scope,
.payment-request-date,
.payment-request-student-search,
.payment-request-notes {
    margin: 0;
}

.payment-request-notes {
    grid-column: span 3;
}

.payment-request-date {
    max-width: 260px;
}

.payment-request-student-search {
    grid-column: span 2;
}

.payment-request-search-box {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 8px;
    align-items: center;
}

.payment-request-student-search small {
    color: var(--muted);
    font-size: .75rem;
    font-weight: 800;
}

.payment-request-actions {
    display: flex;
    align-items: end;
    justify-content: flex-end;
    gap: 8px;
    padding-top: 4px;
}

.payment-request-preview {
    display: grid;
    gap: 10px;
}

.payment-request-preview-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    padding: 2px 4px;
}

.payment-request-preview-head div {
    display: grid;
    gap: 2px;
}

.payment-request-preview-head strong {
    color: var(--primary);
    font-size: .92rem;
    font-weight: 950;
}

.payment-request-preview-head span {
    color: var(--muted);
    font-size: .8rem;
    font-weight: 800;
}

.payment-request-row {
    display: grid;
    grid-template-columns: auto minmax(260px, 1fr) minmax(180px, auto) auto;
    gap: 12px;
    align-items: center;
    border-left: 4px solid #0f4c81;
}

.payment-request-row.has-warning {
    border-left-color: #f59e0b;
    background: #fffaf0;
}

.payment-request-row.is-muted {
    opacity: .62;
}

.selection-check {
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.selection-check input {
    width: 18px;
    height: 18px;
    accent-color: var(--primary);
}

.warning-text {
    color: #9a3412 !important;
    font-weight: 900 !important;
}

.section-divider {
    height: 1px;
    margin: 16px 0;
    background: var(--border);
}

.compact-header {
    margin-top: 0;
}

.sweet-modal {
    max-width: 520px;
}

.enrollment-success-modal {
    max-width: 480px;
}

.enrollment-success-content {
    display: grid;
    gap: 16px;
    justify-items: center;
    text-align: center;
}

.enrollment-success-content h2 {
    margin: 0;
    color: var(--primary);
    font-size: 1.45rem;
    font-weight: 950;
}

.feedback-ok-modal {
    max-width: 440px;
}

.feedback-ok-content {
    display: grid;
    gap: 12px;
    justify-items: center;
    padding: 22px;
    text-align: center;
}

.feedback-ok-icon {
    display: grid;
    width: 52px;
    height: 52px;
    place-items: center;
    border-radius: 999px;
    background: #dcfce7;
    color: #166534;
    font-size: 1.7rem;
    font-weight: 950;
}

.feedback-ok-content h2 {
    margin: 0;
    color: var(--primary);
    font-size: 1.35rem;
    font-weight: 950;
}

.feedback-ok-content p:not(.eyebrow) {
    margin: 0;
    color: var(--muted);
    line-height: 1.45;
}

.enrollment-number-card {
    width: 100%;
    padding: 18px;
    border: 1px solid #bfdbfe;
    border-radius: 8px;
    background: #eff6ff;
}

.enrollment-number-card span {
    display: block;
    color: var(--muted);
    font-size: .78rem;
    font-weight: 900;
    text-transform: uppercase;
}

.enrollment-number-card strong {
    display: block;
    margin-top: 4px;
    color: var(--primary);
    font-size: clamp(1.8rem, 8vw, 2.6rem);
    font-weight: 950;
    letter-spacing: 0;
    overflow-wrap: anywhere;
}

.stacked-sections {
    display: grid;
    gap: 14px;
}

.subsection-card {
    border: 1px solid var(--border);
    border-radius: 8px;
    background: #fff;
    overflow: hidden;
}

.subsection-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    border-bottom: 1px solid var(--border);
    background: #f8fbfe;
}

.subsection-header h3 {
    margin: 0;
    color: var(--primary);
    font-size: .98rem;
    font-weight: 950;
}

.subsection-header p {
    margin: 2px 0 0;
    color: var(--muted);
    font-size: .82rem;
    font-weight: 800;
}

.treasury-stamped-row {
    display: grid;
    grid-template-columns: minmax(260px, 1.2fr) minmax(320px, 1fr) auto;
    gap: 12px;
    align-items: center;
    border-left: 4px solid #2f98bf;
    background: #fff;
}

.treasury-stamped-amounts {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
}

.treasury-stamped-amounts span,
.treasury-stamped-amounts strong {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    padding: 5px 9px;
    border-radius: 999px;
    background: #eef5fb;
    color: var(--primary);
    font-size: .78rem;
    font-weight: 900;
}

.treasury-stamped-amounts strong {
    background: #dbeafe;
    color: #0a3b70;
}

@media (max-width: 900px) {
    .lms-attendance-item,
    .lms-partial-grade-row,
    .lms-final-row,
    .treasury-stamped-row,
    .payment-request-form,
    .payment-request-row {
        grid-template-columns: 1fr;
    }

    .lms-partial-grade-fields {
        grid-template-columns: 1fr;
    }

    .lms-partial-grade-fields .lms-partial-score-field {
        max-width: none;
    }

    .payment-request-student-search,
    .payment-request-notes,
    .payment-request-title,
    .payment-request-date {
        grid-column: auto;
        max-width: none;
    }

    .payment-request-search-box {
        grid-template-columns: 1fr;
    }

    .payment-request-actions {
        justify-content: stretch;
    }

    .payment-request-actions > button {
        flex: 1;
    }
}

.lms-student-dashboard {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
    gap: 10px;
    margin-bottom: 12px;
}

.metric-tile.risk {
    border-color: #fecaca;
    background: #fff7f7;
}

.metric-tile.success-soft {
    border-color: #b7ead1;
    background: #f5fff9;
}

.metric-tile small {
    color: var(--muted);
    font-size: .76rem;
    font-weight: 850;
}

.lms-student-risk-note {
    display: grid;
    gap: 4px;
    margin-bottom: 12px;
    padding: 10px 12px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
}

.lms-student-risk-note strong {
    color: var(--ink);
    font-size: .9rem;
}

.lms-student-risk-note span {
    color: var(--muted);
    font-size: .82rem;
    font-weight: 800;
}

.lms-student-risk-note.warning {
    border-color: #f9c46b;
    background: #fffaf0;
}

.lms-student-risk-note.ok {
    border-color: #b7ead1;
    background: #f7fffb;
}

.lms-student-detail-section {
    display: grid;
    gap: 10px;
    margin-top: 14px;
    padding-top: 14px;
    border-top: 1px solid var(--line);
}

.lms-student-detail-section h3 {
    margin: 0;
    color: var(--ink);
    font-size: 1rem;
}

.lms-student-partials-list {
    display: grid;
    gap: 8px;
}

.lms-student-partial-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 12px;
    align-items: center;
    padding: 10px 12px;
    border: 1px solid var(--line);
    border-left: 4px solid #4aa3df;
    border-radius: 8px;
    background: #fff;
}

.lms-student-partial-row div {
    display: grid;
    gap: 3px;
    min-width: 0;
}

.lms-student-partial-row strong {
    color: var(--ink);
    font-size: .9rem;
}

.lms-student-partial-row span,
.lms-student-partial-row small {
    color: var(--muted);
    font-size: .78rem;
    font-weight: 800;
}

.student-partial-score {
    display: inline-grid;
    min-width: 46px;
    min-height: 36px;
    place-items: center;
    padding: 6px 10px;
    border: 1px solid #bfdbfe;
    border-radius: 8px;
    background: #eff6ff;
    color: #0f4c81 !important;
    font-size: 1rem !important;
    font-weight: 950 !important;
}

.lms-questionnaire-editor,
.lms-question-bank,
.questionnaire-question-stack {
    display: grid;
    gap: 14px;
}

.lms-question-bank > header,
.lms-question-editor-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.lms-question-bank h3 {
    margin: 0;
    color: var(--primary);
}

.lms-question-editor-card {
    display: grid;
    gap: 12px;
    padding: 14px;
    border: 1px solid var(--line);
    border-left: 4px solid #2f98bf;
    border-radius: 8px;
    background: #fff;
    box-shadow: 0 8px 22px rgba(10, 34, 62, .05);
}

.lms-question-options {
    display: grid;
    gap: 8px;
    padding: 10px;
    border: 1px dashed #c9d8e8;
    border-radius: 8px;
    background: #fbfdff;
}

.lms-option-editor-row {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) 120px auto;
    gap: 8px;
    align-items: center;
}

.questionnaire-player-page {
    display: grid;
    gap: 16px;
}

.questionnaire-player-hero {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    padding: 18px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
}

.questionnaire-player-hero h1 {
    margin: 0;
    color: var(--ink);
    font-size: clamp(1.6rem, 3vw, 2.35rem);
    line-height: 1.1;
}

.questionnaire-player-hero p {
    margin: 8px 0 0;
    color: var(--muted);
    font-weight: 750;
}

.questionnaire-player-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: flex-end;
}

.questionnaire-player-layout {
    display: grid;
    grid-template-columns: minmax(190px, 240px) minmax(0, 1fr);
    gap: 16px;
    align-items: start;
}

.questionnaire-status-panel {
    position: sticky;
    top: 86px;
    display: grid;
    gap: 8px;
}

.questionnaire-status-panel > div {
    display: grid;
    gap: 4px;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
}

.questionnaire-status-panel span,
.questionnaire-question-content > span {
    color: var(--muted);
    font-size: .78rem;
    font-weight: 850;
}

.questionnaire-status-panel strong {
    color: var(--ink);
    font-size: 1rem;
}

.questionnaire-score strong {
    color: var(--primary);
    font-size: 1.45rem;
}

.questionnaire-instructions {
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
}

.questionnaire-question-card,
.questionnaire-review-question {
    display: grid;
    grid-template-columns: 42px minmax(0, 1fr);
    gap: 14px;
    padding: 16px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
    box-shadow: 0 10px 24px rgba(10, 34, 62, .05);
}

.questionnaire-question-number {
    display: grid;
    place-items: center;
    width: 38px;
    height: 38px;
    border-radius: 999px;
    background: #eaf3fb;
    color: var(--primary);
    font-weight: 950;
}

.questionnaire-question-content {
    display: grid;
    gap: 10px;
    min-width: 0;
}

.questionnaire-question-content h2 {
    margin: 0;
    color: var(--ink);
    font-size: 1.15rem;
    line-height: 1.35;
}

.questionnaire-options {
    display: grid;
    gap: 8px;
}

.questionnaire-option {
    display: grid;
    grid-template-columns: 22px minmax(0, 1fr);
    gap: 10px;
    align-items: center;
    width: 100%;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
    color: var(--ink);
    text-align: left;
    cursor: pointer;
}

.questionnaire-option > span {
    width: 18px;
    height: 18px;
    border: 2px solid #a9bfd6;
    border-radius: 999px;
}

.questionnaire-option.selected {
    border-color: var(--primary);
    background: #f0f7ff;
    box-shadow: 0 0 0 2px rgba(15, 76, 129, .08);
}

.questionnaire-option.selected > span {
    border-color: var(--primary);
    background: radial-gradient(circle, var(--primary) 0 42%, transparent 45%);
}

.questionnaire-answer {
    min-height: 150px;
}

.questionnaire-feedback {
    display: grid;
    gap: 4px;
    padding: 10px 12px;
    border: 1px solid #bfdbfe;
    border-radius: 8px;
    background: #eff6ff;
}

.questionnaire-feedback span {
    color: var(--muted);
    font-weight: 800;
}

.final-feedback {
    margin-top: 4px;
}

.questionnaire-review-modal {
    width: min(1040px, calc(100vw - 32px));
}

.questionnaire-review-question {
    grid-template-columns: minmax(240px, .8fr) minmax(0, 1fr);
}

.questionnaire-review-question > div:first-child {
    display: grid;
    gap: 6px;
}

.questionnaire-review-question strong {
    color: var(--ink);
}

.questionnaire-review-question span {
    color: var(--muted);
    font-weight: 800;
    line-height: 1.4;
}

@media (max-width: 860px) {
    .lms-option-editor-row,
    .questionnaire-player-layout,
    .questionnaire-review-question {
        grid-template-columns: 1fr;
    }

    .questionnaire-player-hero {
        display: grid;
    }

    .questionnaire-player-actions {
        justify-content: flex-start;
    }

    .questionnaire-status-panel {
        position: static;
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .questionnaire-question-card {
        grid-template-columns: 1fr;
    }

    .questionnaire-question-number {
        width: 34px;
        height: 34px;
    }
}

.lms-review-chip {
    border: 1px solid #f0c36a;
    border-radius: 999px;
    background: #fff4d8;
    color: #7a4b00;
    cursor: pointer;
    font-size: .78rem;
    font-weight: 950;
    line-height: 1;
    padding: 8px 12px;
}

.lms-review-chip:hover {
    border-color: #d99500;
    background: #ffe8ab;
}

.lms-grade-button.line-grade {
    min-width: 58px;
    padding: 4px 10px;
    font-size: 1.45rem;
    line-height: 1;
}

.lms-delivery-modal-section {
    display: grid;
    gap: 8px;
}

.lms-activity-detail {
    display: grid;
    gap: 14px;
}

.lms-detail-header {
    display: flex;
    gap: 14px;
    align-items: flex-start;
    justify-content: space-between;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #f8fbff;
}

.lms-review-item {
    display: grid;
    gap: 12px;
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
}

.lms-review-item.compact-review {
    border-left: 4px solid #8ea4bc;
}

.lms-review-item.compact-review.needs-review {
    border-left-color: #f59e0b;
    background: #fffdf8;
}

.lms-review-item.compact-review.reviewed {
    background: #fbfdff;
}

.lms-review-item header {
    display: flex;
    gap: 12px;
    align-items: flex-start;
    justify-content: space-between;
}

.lms-review-item header div {
    display: grid;
    gap: 3px;
}

.lms-review-item header span:not(.status-badge),
.lms-review-comment {
    color: var(--muted);
    font-size: .86rem;
    font-weight: 750;
}

.lms-review-comment {
    margin: 0;
    padding: 10px 12px;
    border-left: 3px solid #8ea4bc;
    border-radius: 8px;
    background: #f8fbff;
}

.lms-review-comment.html-preview {
    min-height: 0;
}

.lms-review-readonly {
    display: grid;
    gap: 4px;
    padding: 10px 12px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #f8fbff;
    color: var(--muted);
    font-size: .86rem;
    font-weight: 800;
}

.lms-review-readonly strong {
    color: var(--ink);
}

@media (max-width: 760px) {
    .lms-forum-shell {
        grid-template-columns: 1fr;
        gap: 10px;
    }

    .lms-forum-shell.mobile-topic-list .lms-forum-thread,
    .lms-forum-shell.mobile-thread-open .lms-forum-topics {
        display: none;
    }

    .lms-forum-shell.mobile-thread-open .lms-forum-thread,
    .lms-forum-shell.mobile-topic-list .lms-forum-topics {
        display: grid;
    }

    .lms-forum-topic {
        padding: 12px;
    }

    .lms-forum-mobile-back {
        display: inline-flex;
        width: fit-content;
    }

    .lms-forum-thread-header {
        display: grid;
        gap: 10px;
        align-items: start;
    }

    .lms-message-list {
        display: grid;
        gap: 8px;
        max-height: none;
        overflow: visible;
    }

    .student-attendance-matrix-wrap {
        display: none;
    }

    .student-attendance-mobile-list {
        display: grid;
        gap: 8px;
    }

    .student-attendance-mobile-item {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 12px;
        width: 100%;
        min-width: 0;
        padding: 10px 12px;
        border: 1px solid var(--line);
        border-left: 4px solid #d7e6f3;
        border-radius: 8px;
        background: #fff;
        box-shadow: 0 8px 18px rgba(10, 34, 62, .05);
    }

    .student-attendance-mobile-item > div {
        display: grid;
        gap: 2px;
        min-width: 0;
    }

    .student-attendance-mobile-item strong {
        color: var(--ink);
        font-size: .92rem;
        font-weight: 950;
    }

    .student-attendance-mobile-item span,
    .student-attendance-mobile-item small {
        color: var(--muted);
        font-size: .76rem;
        font-weight: 800;
    }

    .student-attendance-mobile-item small {
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }
}

.lms-review-item .compact-field {
    max-width: 220px;
}

.danger-action {
    border-color: #f3b3ad;
    color: #9f241b;
}

.danger-action:hover {
    border-color: #d92d20;
    color: #7a1b14;
}

.lms-attachment-action-group {
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.lms-attachment-action-group .lms-table-action {
    margin: 0;
}

.lms-table-action.lms-attachment-remove {
    width: 30px;
    min-width: 30px;
    padding-inline: 0;
    border-color: #f3b3ad;
    color: #9f241b;
    font-size: 1rem;
    line-height: 1;
}

.lms-table-action.lms-attachment-remove:hover {
    border-color: #d92d20;
    color: #7a1b14;
}

@media (max-width: 720px) {
    .lms-student-dashboard {
        grid-template-columns: 1fr;
    }

    .lms-delivery-line {
        align-items: stretch;
        flex-direction: column;
    }

    .lms-delivery-actions {
        justify-content: space-between;
    }

    .lms-delivery-activity-title {
        min-width: 0;
    }

    .lms-review-item header {
        align-items: stretch;
        flex-direction: column;
    }
}

.status-badge.muted {
    color: #475569;
    background: #e8eef7;
}

.student-payments-workspace {
    display: grid;
    gap: 18px;
}

.student-payments-workspace .treasury-summary-stack {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    margin-top: 0;
}

.student-payments-workspace .treasury-summary-stack > div {
    background: #fff;
    min-height: 72px;
}

.single-line-list {
    display: grid;
    gap: 8px;
}

.single-line-card {
    display: grid;
    gap: 12px;
    padding: 12px 14px;
    border: 1px solid var(--border);
    border-left: 4px solid var(--primary);
    border-radius: 8px;
    background: #fff;
}

.single-line-card .row-main,
.single-line-card .row-meta {
    display: grid;
    gap: 3px;
    min-width: 0;
}

.single-line-card .row-main span,
.single-line-card .row-meta span {
    color: var(--muted);
    font-size: .78rem;
    font-weight: 800;
}

.payment-row {
    align-items: center;
    grid-template-columns: minmax(220px, 1fr) minmax(150px, auto) auto;
}

.payment-row.success {
    border-left-color: #16a34a;
    background: #f0fdf4;
}

.payment-row.warning {
    border-left-color: #f59e0b;
}

.payment-row.info {
    border-left-color: #2563eb;
}

.payment-row.danger {
    border-left-color: #dc2626;
    background: #fff7f7;
}

.payment-row.muted {
    border-left-color: #94a3b8;
}

.payment-amount {
    color: var(--primary);
    font-size: .98rem;
    white-space: nowrap;
}

.receipt-page {
    display: flex;
    flex-direction: column;
    gap: 16px;
    padding: 24px;
    background: #eef3f8;
}

.receipt-actions {
    display: flex;
    justify-content: flex-end;
}

.modal-panel.receipt-modal {
    width: min(1080px, calc(100vw - 32px));
    max-height: calc(100vh - 40px);
    overflow: auto;
}

.receipt-modal-body {
    padding: 16px;
    background: #f7f9fc;
}

.receipt-modal .receipt-sheet {
    width: 100%;
    box-shadow: 0 10px 30px rgba(15, 23, 42, .07);
}

.receipt-sheet {
    width: min(8.5in, 100%);
    min-height: 10.5in;
    margin: 0 auto;
    padding: 42px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: #fff;
    box-shadow: 0 16px 40px rgba(15, 23, 42, .08);
    color: var(--text);
}

.receipt-document-header,
.receipt-footer {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
}

.receipt-brand-block {
    display: flex;
    align-items: center;
    gap: 16px;
    min-width: 0;
}

.receipt-logo-mark {
    display: grid;
    place-items: center;
    width: 72px;
    height: 72px;
    border: 1px solid #99f6e4;
    border-radius: 6px;
    background: linear-gradient(135deg, #ecfeff, #f0fdfa);
    color: #0f766e;
    font-size: 1rem;
    font-weight: 900;
    letter-spacing: 0;
}

.receipt-document-header h1 {
    margin: 0;
    color: #172033;
    font-size: 1.95rem;
    line-height: 1.1;
}

.receipt-brand-block .eyebrow {
    margin-bottom: 4px;
    color: #0f766e;
}

.receipt-brand-block span {
    display: block;
    margin-top: 6px;
    color: var(--muted);
    font-size: .86rem;
    font-weight: 700;
}

.receipt-footer span,
.receipt-document-folio span,
.receipt-document-summary span,
.receipt-section-title span,
.receipt-total-panel span,
.receipt-notes span,
.receipt-validation-grid span {
    color: var(--muted);
    font-size: .8rem;
    font-weight: 800;
    text-transform: uppercase;
}

.receipt-document-folio {
    min-width: 210px;
    padding: 14px;
    border: 1px solid var(--border);
    border-radius: 6px;
    background: #f8fafc;
    text-align: right;
}

.receipt-document-folio strong {
    display: block;
    margin-top: 4px;
    color: #172033;
    font-size: 1.05rem;
}

.receipt-document-folio small {
    display: block;
    margin-top: 6px;
    color: var(--muted);
    font-size: .78rem;
}

.receipt-document-summary {
    display: grid;
    grid-template-columns: 1.4fr 1.2fr .9fr;
    gap: 12px;
    margin-top: 30px;
}

.receipt-document-summary div,
.receipt-validation-grid div,
.receipt-notes {
    padding: 14px;
    border: 1px solid var(--border);
    border-radius: 6px;
    background: #fbfdff;
}

.receipt-document-summary strong,
.receipt-validation-grid strong {
    display: block;
    margin-top: 5px;
    color: var(--text);
    font-size: 1rem;
}

.receipt-document-summary small,
.receipt-validation-grid small {
    display: block;
    margin-top: 5px;
    color: var(--muted);
    font-size: .82rem;
}

.receipt-section {
    margin-top: 24px;
}

.receipt-section-title {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 8px;
}

.receipt-lines-wrap {
    overflow-x: auto;
    border: 1px solid var(--border);
    border-radius: 6px;
}

.receipt-lines {
    width: 100%;
    min-width: 620px;
    border-collapse: collapse;
    background: #fff;
}

.receipt-lines th {
    padding: 10px 12px;
    border-bottom: 1px solid var(--border);
    background: #f1f5f9;
    color: #334155;
    font-size: .78rem;
    font-weight: 900;
    text-align: left;
    text-transform: uppercase;
}

.receipt-lines td {
    padding: 14px 12px;
    border-bottom: 1px solid #e5eef8;
    color: var(--text);
    font-size: .9rem;
    vertical-align: top;
}

.receipt-lines tbody tr:last-child td {
    border-bottom: 0;
}

.receipt-lines td strong,
.receipt-lines td span {
    display: block;
}

.receipt-lines td span {
    margin-top: 4px;
    color: var(--muted);
    font-size: .8rem;
}

.receipt-lines .amount {
    text-align: right;
    white-space: nowrap;
}

.receipt-total-panel {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 18px;
    padding: 18px 20px;
    border: 1px solid #bfdbfe;
    border-radius: 6px;
    background: linear-gradient(135deg, #eff6ff, #f8fafc);
}

.receipt-total-panel small {
    display: block;
    margin-top: 4px;
    color: var(--muted);
    font-weight: 700;
}

.receipt-total-panel strong {
    color: var(--primary);
    font-size: 2rem;
}

.receipt-notes {
    margin-top: 18px;
}

.receipt-notes p {
    margin: 6px 0 0;
    color: var(--text);
    line-height: 1.45;
}

.receipt-validation-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    margin-top: 20px;
}

.receipt-footer {
    margin-top: 32px;
    padding-top: 16px;
    border-top: 1px solid var(--border);
    color: var(--muted);
}

@media (max-width: 720px) {
    .student-payments-workspace {
        gap: 14px;
    }

    .student-payments-workspace .treasury-summary-stack {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .payment-row {
        grid-template-columns: 1fr;
    }

    .payment-row .row-actions {
        justify-content: flex-start;
    }

    .receipt-page {
        padding: 12px;
    }

    .modal-panel.receipt-modal {
        width: calc(100vw - 16px);
        max-height: calc(100vh - 16px);
    }

    .receipt-modal-body {
        padding: 8px;
    }

    .receipt-sheet {
        min-height: 0;
        padding: 18px;
    }

    .receipt-document-header,
    .receipt-footer {
        flex-direction: column;
    }

    .receipt-brand-block {
        align-items: flex-start;
    }

    .receipt-logo-mark {
        width: 56px;
        height: 56px;
        font-size: .82rem;
    }

    .receipt-document-header h1 {
        font-size: 1.45rem;
    }

    .receipt-document-folio {
        width: 100%;
        text-align: left;
    }

    .receipt-document-summary,
    .receipt-validation-grid {
        grid-template-columns: 1fr;
    }

    .receipt-total-panel {
        align-items: flex-start;
        flex-direction: column;
        gap: 8px;
    }

    .receipt-total-panel strong {
        font-size: 1.55rem;
    }
}

@media print {
    .no-print,
    .top-row,
    .sidebar {
        display: none !important;
    }

    .receipt-page {
        padding: 0;
        background: #fff;
    }

    .receipt-sheet {
        width: 100%;
        min-height: auto;
        padding: 0;
        border: 0;
        border-radius: 0;
        box-shadow: none;
    }

    .receipt-lines-wrap {
        overflow: visible;
    }
}
