:root {
    --ink: #1d2834;
    --muted: #6c7785;
    --line: #dfe5ec;
    --panel: #ffffff;
    --page: #f3f6f9;
    --nav: #13242f;
    --nav-soft: #203542;
    --primary: #1d5f8f;
    --primary-dark: #164d74;
    --accent: #b5832d;
    --success: #247a52;
    --danger: #b43d3d;
    --radius: 8px;
}

* {
    box-sizing: border-box;
}

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

a {
    text-decoration: none;
}

.login-body {
    background:
        linear-gradient(90deg, rgba(19, 36, 47, 0.96) 0%, rgba(19, 36, 47, 0.92) 42%, rgba(243, 246, 249, 1) 42%),
        #f3f6f9;
}

.login-wrap {
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 32px 16px;
}

.login-panel {
    width: min(960px, 100%);
    display: grid;
    grid-template-columns: 1fr 420px;
    align-items: center;
    gap: 48px;
}

.login-brand {
    color: #ffffff;
    display: flex;
    align-items: center;
    gap: 16px;
}

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

.login-brand strong {
    display: block;
    font-size: 32px;
    line-height: 1.1;
}

.login-brand small {
    color: rgba(255, 255, 255, 0.78);
}

.login-card {
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 32px;
    box-shadow: 0 24px 70px rgba(24, 37, 50, 0.18);
}

.login-card h1 {
    margin: 0 0 8px;
    font-size: 28px;
    font-weight: 700;
}

.login-card p {
    margin: 0 0 24px;
    color: var(--muted);
}

.login-card-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 14px;
    margin-bottom: 20px;
}

.login-card-head p {
    margin-bottom: 0;
}

.btn {
    border-radius: 7px;
}

.btn-primary {
    --bs-btn-bg: var(--primary);
    --bs-btn-border-color: var(--primary);
    --bs-btn-hover-bg: var(--primary-dark);
    --bs-btn-hover-border-color: var(--primary-dark);
}

.app-shell {
    min-height: 100vh;
    display: grid;
    grid-template-columns: 280px minmax(0, 1fr);
}

.sidebar {
    position: sticky;
    top: 0;
    height: 100vh;
    overflow-y: auto;
    background: var(--nav);
    color: #ffffff;
    padding: 18px 14px;
}

.brand {
    min-height: 72px;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px;
    color: #ffffff;
}

.brand:hover {
    color: #ffffff;
}

.brand .brand-mark {
    width: 48px;
    height: 48px;
}

.brand strong,
.brand small {
    display: block;
}

.brand small {
    color: rgba(255, 255, 255, 0.66);
    font-size: 12px;
}

.sidebar-nav {
    margin-top: 18px;
    display: grid;
    gap: 4px;
}

.nav-link {
    width: 100%;
    min-height: 42px;
    border: 0;
    border-radius: 7px;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    color: rgba(255, 255, 255, 0.82);
    background: transparent;
    text-align: left;
}

.nav-link:hover,
.nav-link.active {
    color: #ffffff;
    background: var(--nav-soft);
}

.nav-link i {
    width: 20px;
    text-align: center;
}

.nav-submenu {
    padding: 2px 0 8px 42px;
}

.nav-submenu a {
    display: block;
    color: rgba(255, 255, 255, 0.68);
    padding: 7px 10px;
    border-left: 2px solid rgba(255, 255, 255, 0.14);
}

.nav-submenu a:hover,
.nav-submenu a.active {
    color: #ffffff;
    border-left-color: var(--accent);
}

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

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

.topbar-search {
    height: 42px;
    width: min(520px, 100%);
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 0 14px;
    border: 1px solid var(--line);
    border-radius: 7px;
    background: #f8fafc;
}

.topbar-search input {
    width: 100%;
    border: 0;
    outline: 0;
    background: transparent;
}

.topbar-actions {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 10px;
}

.icon-button {
    width: 42px;
    height: 42px;
    border: 1px solid var(--line);
    border-radius: 7px;
    display: inline-grid;
    place-items: center;
    color: var(--ink);
    background: #ffffff;
}

.icon-button:hover {
    color: var(--primary);
    border-color: #c7d8e7;
}

.sidebar-toggle {
    display: none;
}

.user-chip {
    min-height: 42px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 0 12px;
    border: 1px solid var(--line);
    border-radius: 7px;
    background: #ffffff;
    color: var(--muted);
}

.language-link {
    min-height: 42px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 0 12px;
    border: 1px solid var(--line);
    border-radius: 7px;
    background: #ffffff;
    color: var(--ink);
    white-space: nowrap;
}

.language-link:hover {
    color: var(--primary);
    border-color: #c7d8e7;
}

.content-wrap {
    padding: 28px 24px 42px;
}

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

.page-heading h1 {
    margin: 0;
    font-size: 26px;
    font-weight: 700;
}

.page-heading p {
    margin: 6px 0 0;
    color: var(--muted);
}

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

.metric-card,
.section-card,
.table-card,
.blocked-panel {
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--panel);
}

.metric-card {
    padding: 18px;
}

.metric-card span {
    color: var(--muted);
    font-size: 13px;
}

.metric-card strong {
    display: block;
    margin-top: 8px;
    font-size: 28px;
    line-height: 1;
}

.section-card {
    padding: 20px;
    margin-bottom: 20px;
}

.section-card h2 {
    margin: 0 0 16px;
    font-size: 18px;
}

.import-panel {
    margin-top: 18px;
    padding-top: 18px;
    border-top: 1px solid var(--line);
}

.import-panel h3 {
    margin: 0 0 14px;
    font-size: 15px;
    font-weight: 800;
}

.import-help-text {
    min-height: 38px;
    display: flex;
    align-items: end;
}

.bulk-grade-selector .btn i,
.bulk-grade-footer .btn i,
.page-heading .btn i {
    margin-right: 6px;
}

.bulk-grade-summary {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
    margin-bottom: 16px;
}

.bulk-grade-summary > div {
    min-height: 76px;
    padding: 13px 15px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: #f8fafc;
}

.bulk-grade-summary span {
    display: block;
    color: var(--muted);
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
}

.bulk-grade-summary strong {
    display: block;
    margin-top: 6px;
    overflow-wrap: anywhere;
    font-size: 17px;
}

.bulk-grade-table .table {
    min-width: 620px;
}

.bulk-mark-input {
    width: 140px;
    max-width: 100%;
}

.bulk-grade-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-top: 16px;
}

.bulk-grade-empty {
    min-height: 180px;
    display: grid;
    place-items: center;
    text-align: center;
    color: var(--muted);
}

.bulk-grade-empty i {
    color: var(--primary);
    font-size: 34px;
}

.bulk-grade-empty h2 {
    margin: 4px 0 0;
    color: var(--ink);
}

.bulk-grade-empty p {
    margin: 0;
}

html[dir="rtl"] .bulk-grade-selector .btn i,
html[dir="rtl"] .bulk-grade-footer .btn i,
html[dir="rtl"] .page-heading .btn i {
    margin-right: 0;
    margin-left: 6px;
}

.metric-tile {
    min-height: 92px;
    padding: 16px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: #f8fafc;
}

.metric-tile span {
    display: block;
    color: var(--muted);
    font-size: 13px;
    font-weight: 700;
}

.metric-tile strong {
    display: block;
    margin-top: 8px;
    font-size: 28px;
    line-height: 1;
}

.table-card {
    overflow: hidden;
}

.table-card .table {
    margin: 0;
}

.table thead th {
    color: var(--muted);
    background: #f8fafc;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
}

.table td,
.table th {
    vertical-align: middle;
}

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

.badge {
    border-radius: 6px;
    font-weight: 600;
}

.student-title {
    display: flex;
    flex-direction: column;
}

.student-title small {
    color: var(--muted);
}

.student-title strong a {
    color: var(--ink);
}

.student-title strong a:hover {
    color: var(--primary);
}

.student-profile-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    margin-bottom: 20px;
    padding: 22px;
    border-top: 4px solid var(--primary);
    border-bottom: 1px solid var(--line);
    background: #ffffff;
}

.student-profile-identity {
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 16px;
}

.student-profile-avatar {
    width: 72px;
    height: 72px;
    display: grid;
    place-items: center;
    flex: 0 0 auto;
    border-radius: 8px;
    color: #ffffff;
    background: var(--primary);
    font-size: 24px;
    font-weight: 800;
}

.student-profile-identity h2 {
    margin: 0;
    font-size: 25px;
}

.student-profile-identity p {
    margin: 5px 0 10px;
    color: var(--muted);
}

.student-profile-statuses,
.student-profile-actions {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
}

.student-profile-actions {
    justify-content: flex-end;
}

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

.student-profile-grid .profile-section-wide {
    grid-column: 1 / -1;
}

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

.profile-details > div {
    min-width: 0;
    padding: 11px 0;
    border-bottom: 1px solid #edf0f3;
}

.profile-details dt {
    margin-bottom: 4px;
    color: var(--muted);
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
}

.profile-details dd {
    margin: 0;
    overflow-wrap: anywhere;
    font-weight: 600;
}

.profile-notes {
    margin-top: 18px;
    padding-top: 16px;
    border-top: 1px solid var(--line);
}

.profile-notes strong {
    font-size: 13px;
}

.profile-notes p {
    margin: 7px 0 0;
    color: var(--muted);
}

.profile-metrics {
    margin-top: 0;
}

.profile-document-list {
    border-top: 1px solid var(--line);
}

.profile-document-row {
    min-height: 64px;
    display: grid;
    grid-template-columns: 38px minmax(0, 1fr) auto;
    align-items: center;
    gap: 12px;
    padding: 12px 0;
    border-bottom: 1px solid var(--line);
}

.profile-document-copy {
    min-width: 0;
    display: flex;
    flex-direction: column;
}

.profile-document-copy small {
    overflow: hidden;
    color: var(--muted);
    text-overflow: ellipsis;
    white-space: nowrap;
}

.profile-document-actions {
    display: flex;
    align-items: center;
    gap: 6px;
}

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

.profile-section-heading h2 {
    margin: 0;
    font-size: 19px;
}

.profile-section-heading p {
    margin: 4px 0 0;
    color: var(--muted);
    font-size: 13px;
}

.profile-table {
    overflow-x: auto;
}

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

.academic-standing-panel {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 20px;
    margin: 24px 0 10px;
    padding: 20px;
    border: 1px solid var(--line);
    border-left: 5px solid var(--muted);
    background: #ffffff;
}

.academic-standing-success {
    border-left-color: var(--success);
}

.academic-standing-warning {
    border-left-color: #c88719;
}

.academic-standing-danger {
    border-left-color: var(--danger);
}

.academic-standing-label {
    color: var(--muted);
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
}

.academic-standing-panel h2 {
    margin: 5px 0 7px;
    font-size: 23px;
}

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

.academic-rule-note {
    display: flex;
    align-items: flex-start;
    gap: 9px;
    margin-bottom: 16px;
    padding: 11px 13px;
    border: 1px solid #d8e5ee;
    background: #f6fafc;
    color: #50606c;
    font-size: 13px;
}

.academic-rule-note i {
    color: var(--primary);
}

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

.academic-year-summary {
    border: 1px solid var(--line);
    background: #ffffff;
}

.academic-year-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 13px 15px;
    border-bottom: 1px solid var(--line);
    background: #f8fafc;
}

.academic-year-heading h3 {
    margin: 0;
    font-size: 17px;
}

.academic-year-heading span {
    color: var(--muted);
    font-size: 13px;
}

.academic-year-summary dl {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    margin: 0;
}

.academic-year-summary dl div {
    padding: 14px 15px;
    border-right: 1px solid var(--line);
}

.academic-year-summary dl div:last-child {
    border-right: 0;
}

.academic-year-summary dt {
    color: var(--muted);
    font-size: 12px;
}

.academic-year-summary dd {
    margin: 5px 0 0;
    font-size: 21px;
    font-weight: 800;
}

.academic-outcomes-heading {
    margin-top: 22px;
}

.academic-rules-summary {
    margin-bottom: 16px;
}

.academic-rule-items {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px 18px;
    color: #4e5d68;
    font-size: 14px;
}

.academic-rule-items span {
    display: inline-flex;
    align-items: center;
    gap: 7px;
}

.academic-rule-items i {
    color: var(--primary);
}

.profile-search {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 16px;
}

.profile-search {
    position: relative;
}

.profile-search > i {
    position: absolute;
    left: 13px;
    color: var(--muted);
}

.profile-search .form-control {
    max-width: 520px;
    padding-left: 38px;
}

.profile-search .form-select {
    max-width: 320px;
}

html[dir="rtl"] .academic-standing-panel {
    border-right: 5px solid var(--muted);
    border-left-width: 1px;
}

html[dir="rtl"] .academic-standing-success {
    border-right-color: var(--success);
}

html[dir="rtl"] .academic-standing-warning {
    border-right-color: #c88719;
}

html[dir="rtl"] .academic-standing-danger {
    border-right-color: var(--danger);
}

html[dir="rtl"] .academic-year-summary dl div {
    border-right: 0;
    border-left: 1px solid var(--line);
}

html[dir="rtl"] .academic-year-summary dl div:last-child {
    border-left: 0;
}

html[dir="rtl"] .profile-search > i {
    right: 13px;
    left: auto;
}

html[dir="rtl"] .profile-search .form-control {
    padding-right: 38px;
    padding-left: 12px;
}

.blocked-panel {
    padding: 28px;
    border-left: 4px solid var(--danger);
}

.blocked-panel h2 {
    font-size: 20px;
    margin-bottom: 8px;
}

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

.form-hint {
    color: var(--muted);
    font-size: 13px;
}

.field-label-note {
    color: var(--muted);
    font-size: 0.78em;
    font-weight: 500;
}

.form-group-heading {
    margin-top: 8px;
    padding-top: 20px;
    border-top: 1px solid var(--line);
}

.form-group-heading h3 {
    margin: 0;
    font-size: 17px;
}

.profile-details .profile-detail-wide {
    grid-column: 1 / -1;
}

.student-picker {
    position: relative;
}

.student-picker-control {
    position: relative;
    display: flex;
    align-items: center;
}

.student-picker-control > i {
    position: absolute;
    left: 13px;
    z-index: 1;
    color: var(--muted);
    pointer-events: none;
}

.student-picker-input {
    padding-left: 38px;
    padding-right: 38px;
}

.student-picker-input::-webkit-search-cancel-button {
    display: none;
}

.student-picker-clear {
    position: absolute;
    right: 7px;
    width: 30px;
    height: 30px;
    border: 0;
    display: none;
    place-items: center;
    color: var(--muted);
    background: transparent;
}

.student-picker-clear.visible {
    display: grid;
}

.student-picker-clear:hover {
    color: var(--danger);
}

.student-picker-results {
    position: absolute;
    z-index: 30;
    top: calc(100% + 6px);
    left: 0;
    right: 0;
    max-height: 320px;
    overflow-y: auto;
    border: 1px solid #cfd8e2;
    border-radius: 6px;
    background: #ffffff;
    box-shadow: 0 14px 32px rgba(24, 37, 50, 0.16);
}

.student-picker-results[hidden],
.student-picker-option[hidden],
.student-picker-empty[hidden] {
    display: none;
}

.student-picker-option {
    width: 100%;
    min-height: 58px;
    border: 0;
    border-bottom: 1px solid #edf0f3;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 10px 13px;
    color: var(--ink);
    background: #ffffff;
    text-align: left;
}

.student-picker-option:last-of-type {
    border-bottom: 0;
}

.student-picker-option:hover,
.student-picker-option.selected {
    background: #eef6fb;
}

.student-picker-option span {
    min-width: 0;
    display: flex;
    flex-direction: column;
}

.student-picker-option strong,
.student-picker-option small {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.student-picker-option small {
    color: var(--muted);
}

.student-picker-option > i {
    flex: 0 0 auto;
    color: transparent;
}

.student-picker-option.selected > i {
    color: var(--success);
}

.student-picker-empty {
    padding: 18px 13px;
    color: var(--muted);
    text-align: center;
}

html[dir="rtl"] .student-picker-control > i {
    right: 13px;
    left: auto;
}

html[dir="rtl"] .student-picker-input {
    padding-right: 38px;
    padding-left: 38px;
}

html[dir="rtl"] .student-picker-clear {
    right: auto;
    left: 7px;
}

html[dir="rtl"] .student-picker-option {
    text-align: right;
}

.student-documents-section {
    margin-top: 28px;
    padding-top: 24px;
    border-top: 1px solid var(--line);
}

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

.section-subheading h2 {
    margin-bottom: 4px;
}

.section-subheading p {
    margin: 0;
    color: var(--muted);
    font-size: 14px;
}

.document-upload-list {
    border-top: 1px solid var(--line);
}

.document-upload-row {
    display: grid;
    grid-template-columns: minmax(230px, 0.85fr) minmax(300px, 1.15fr);
    align-items: center;
    gap: 20px;
    padding: 18px 0;
    border-bottom: 1px solid var(--line);
}

.document-upload-copy {
    min-width: 0;
    display: flex;
    align-items: flex-start;
    gap: 12px;
}

.document-type-icon {
    width: 38px;
    height: 38px;
    display: grid;
    place-items: center;
    flex: 0 0 auto;
    border-radius: 6px;
    color: var(--primary);
    background: #edf5fa;
    font-size: 18px;
}

.document-upload-copy .form-label {
    margin-bottom: 2px;
    font-weight: 700;
}

.current-document {
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 7px;
    margin-top: 8px;
    color: var(--success);
    font-size: 13px;
}

.current-document span {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.document-upload-actions {
    min-width: 0;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
}

.document-file-input {
    min-width: 220px;
}

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

    .student-profile-header {
        align-items: flex-start;
        flex-direction: column;
    }

    .student-profile-actions {
        justify-content: flex-start;
    }
}

@media (max-width: 860px) {
    .login-body {
        background: #f3f6f9;
    }

    .login-panel {
        grid-template-columns: 1fr;
        gap: 22px;
    }

    .login-brand {
        color: var(--ink);
    }

    .login-brand small {
        color: var(--muted);
    }

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

    .sidebar {
        position: fixed;
        inset: 0 auto 0 0;
        width: 280px;
        transform: translateX(-100%);
        transition: transform 160ms ease;
        z-index: 20;
    }

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

    .sidebar-toggle {
        display: inline-grid;
    }

    .topbar {
        padding: 12px;
    }

    .user-chip {
        display: none;
    }

    .content-wrap {
        padding: 20px 14px 32px;
    }

    .page-heading {
        flex-direction: column;
    }

    .student-profile-grid {
        grid-template-columns: 1fr;
    }

    .academic-year-grid {
        grid-template-columns: 1fr;
    }

    .profile-details {
        grid-template-columns: 1fr;
    }

    .document-upload-row {
        grid-template-columns: 1fr;
        gap: 12px;
    }

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

    .document-file-input {
        width: 100%;
        min-width: 0;
    }
}

@media (max-width: 560px) {
    .student-profile-header {
        padding: 18px 14px;
    }

    .student-profile-identity {
        align-items: flex-start;
    }

    .student-profile-avatar {
        width: 58px;
        height: 58px;
        font-size: 20px;
    }

    .student-profile-identity h2 {
        font-size: 21px;
    }

    .student-profile-actions {
        width: 100%;
    }

    .student-profile-actions .btn {
        flex: 1 1 calc(50% - 8px);
    }

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

    .academic-standing-panel {
        flex-direction: column;
    }

    .academic-year-summary dl {
        grid-template-columns: 1fr;
    }

    .academic-year-summary dl div,
    html[dir="rtl"] .academic-year-summary dl div {
        border-right: 0;
        border-left: 0;
        border-bottom: 1px solid var(--line);
    }

    .academic-year-summary dl div:last-child {
        border-bottom: 0;
    }

    .profile-search {
        align-items: stretch;
        flex-wrap: wrap;
    }

    .profile-search .form-control {
        max-width: none;
        flex: 1 1 100%;
    }

    .profile-search .form-select {
        max-width: none;
        flex: 1 1 220px;
    }
}

html[dir="rtl"] body {
    font-family: "Segoe UI", Tahoma, Arial, sans-serif;
}

@media (min-width: 861px) {
    html[dir="rtl"] .login-panel {
        direction: ltr;
        grid-template-columns: 1fr 420px;
    }

    html[dir="rtl"] .login-brand {
        direction: ltr;
        text-align: left;
        color: #ffffff;
    }

    html[dir="rtl"] .login-brand small {
        color: rgba(255, 255, 255, 0.78);
    }

    html[dir="rtl"] .login-card {
        direction: rtl;
        text-align: right;
    }

    html[dir="rtl"] .login-card .form-control {
        text-align: right;
    }

    html[dir="rtl"] .login-card .language-link {
        direction: ltr;
    }
}

html[dir="rtl"] .app-shell {
    grid-template-columns: minmax(0, 1fr) 280px;
}

html[dir="rtl"] .sidebar {
    grid-column: 2;
}

html[dir="rtl"] .main-panel {
    grid-column: 1;
    grid-row: 1;
}

html[dir="rtl"] .nav-link {
    text-align: right;
}

html[dir="rtl"] .nav-submenu {
    padding: 2px 42px 8px 0;
}

html[dir="rtl"] .nav-submenu a {
    border-left: 0;
    border-right: 2px solid rgba(255, 255, 255, 0.14);
}

html[dir="rtl"] .nav-submenu a:hover,
html[dir="rtl"] .nav-submenu a.active {
    border-right-color: var(--accent);
}

html[dir="rtl"] .topbar-actions {
    margin-left: 0;
    margin-right: auto;
}

html[dir="rtl"] .actions {
    justify-content: flex-start;
}

html[dir="rtl"] .text-end {
    text-align: left !important;
}

html[dir="rtl"] .page-heading,
html[dir="rtl"] .section-card,
html[dir="rtl"] .section-subheading,
html[dir="rtl"] .student-profile-header,
html[dir="rtl"] .profile-section-heading,
html[dir="rtl"] .table,
html[dir="rtl"] .profile-details,
html[dir="rtl"] .profile-notes {
    text-align: right;
}

html[dir="rtl"] .form-control,
html[dir="rtl"] .form-select,
html[dir="rtl"] textarea,
html[dir="rtl"] .topbar-search input {
    text-align: right;
}

html[dir="rtl"] .form-select {
    padding-right: 0.75rem;
    padding-left: 2.25rem;
    background-position: left 0.75rem center;
}

html[dir="rtl"] input[type="date"],
html[dir="rtl"] input[type="number"] {
    direction: ltr;
    text-align: right;
}

html[dir="rtl"] .student-profile-actions,
html[dir="rtl"] .section-subheading,
html[dir="rtl"] .profile-section-heading {
    direction: rtl;
}

html[dir="rtl"] .ms-auto {
    margin-right: auto !important;
    margin-left: 0 !important;
}

html[dir="rtl"] .blocked-panel {
    border-left: 1px solid var(--line);
    border-right: 4px solid var(--danger);
}

@media (max-width: 860px) {
    html[dir="rtl"] .app-shell {
        grid-template-columns: minmax(0, 1fr);
    }

    html[dir="rtl"] .sidebar {
        grid-column: auto;
        inset: 0 0 0 auto;
        transform: translateX(100%);
    }

    html[dir="rtl"] body.sidebar-open .sidebar {
        transform: translateX(0);
    }
}

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

    .login-card {
        padding: 24px;
    }

    .topbar-search {
        max-width: 100%;
    }
}

.login-body {
    background: #f4f8fb;
}

.login-wrap {
    min-height: 100vh;
    align-items: start;
    place-items: start center;
    padding: 44px 16px 24px;
}

.university-login {
    width: min(500px, 100%);
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 22px;
}

.login-logo-row {
    display: grid;
    grid-template-columns: 112px minmax(0, 1fr);
    align-items: center;
    gap: 22px;
    width: 100%;
    min-height: 142px;
    background: #ffffff;
    border-top: 5px solid #263f8f;
    border-bottom: 5px solid #263f8f;
    padding: 12px 18px;
    direction: ltr;
}

.login-centered-logo {
    width: 108px;
    height: 108px;
    display: grid;
    place-items: center;
    overflow: hidden;
    background: #ffffff;
    padding: 4px;
}

.login-centered-logo img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.login-brand-name {
    min-width: 0;
    display: grid;
    gap: 4px;
    color: #263f8f;
    font-size: 27px;
    font-weight: 800;
    line-height: 1.45;
    text-align: right;
    letter-spacing: 0;
}

.login-brand-name span {
    display: block;
    white-space: nowrap;
}

.university-login-card {
    width: 100%;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
    padding: 0;
}

.university-login-card .alert {
    border-radius: 4px;
    margin-bottom: 14px;
}

.login-label {
    display: block;
    margin: 0 0 7px;
    color: #3f4b55;
    font-size: 16px;
    font-weight: 700;
}

.user-group-tabs {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    margin-bottom: 28px;
    border-radius: 3px;
    overflow: hidden;
}

.user-group-tabs label {
    height: 66px;
    display: grid;
    place-items: center;
    margin: 0;
    color: #ffffff;
    background: #aeb8c1;
    font-size: 19px;
    font-weight: 800;
    cursor: pointer;
    user-select: none;
}

.user-group-tabs input:checked + label {
    background: #3d4852;
}

.user-group-tabs label:last-of-type {
    background: #2098dc;
}

.user-group-tabs input:last-of-type:checked + label {
    background: #1788ca;
}

.login-input {
    width: 100%;
    height: 58px;
    margin-bottom: 22px;
    border: 0;
    border-radius: 3px;
    background: #ffffff;
    padding: 0 16px;
    color: var(--ink);
    font-size: 18px;
    outline: 0;
    box-shadow: inset 0 0 0 1px rgba(120, 140, 155, 0.08);
}

.login-input:focus {
    box-shadow: inset 0 0 0 2px #8fc6e8;
}

.password-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 54px;
    align-items: center;
    gap: 12px;
}

.password-row .login-input {
    margin-bottom: 24px;
}

.password-toggle,
.security-refresh {
    width: 54px;
    height: 54px;
    border: 0;
    display: grid;
    place-items: center;
    color: #667783;
    background: transparent;
    font-size: 30px;
}

.security-head {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 54px;
    align-items: center;
}

.security-row {
    display: grid;
    grid-template-columns: 150px minmax(0, 1fr);
    align-items: center;
    gap: 16px;
    margin-bottom: 22px;
}

.security-row .login-input {
    margin-bottom: 0;
}

.security-code {
    height: 58px;
    display: block;
    width: 100%;
    border-radius: 3px;
    background: #ffffff;
    border: 1px solid rgba(38, 55, 70, 0.16);
    object-fit: contain;
}

.login-submit {
    width: 100%;
    height: 68px;
    border: 0;
    border-radius: 5px;
    color: #ffffff;
    background: #4caf72;
    font-size: 18px;
    font-weight: 800;
}

.login-submit:hover {
    background: #429b64;
}

.login-links {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 18px;
    margin-top: 26px;
    color: #46545d;
    font-size: 16px;
    font-weight: 700;
}

.login-links a {
    color: #46545d;
}

.language-block {
    display: grid;
    gap: 10px;
    justify-items: end;
}

.language-buttons {
    display: flex;
    align-items: center;
    gap: 4px;
}

.language-buttons a {
    min-width: 40px;
    height: 38px;
    display: grid;
    place-items: center;
    color: #ffffff;
    background: #9aa6b0;
    border-radius: 2px;
    font-size: 16px;
    font-weight: 800;
}

.language-buttons a.active {
    background: #3e515f;
}

html[dir="rtl"] .university-login,
html[dir="rtl"] .university-login-card {
    direction: rtl;
    text-align: right;
}

html[dir="rtl"] .login-input {
    text-align: right;
}

html[dir="rtl"] .language-block {
    justify-items: start;
}

html[dir="rtl"] .login-links {
    direction: rtl;
}

@media (max-width: 640px) {
    .login-wrap {
        padding-top: 30px;
    }

    .login-logo-row {
        grid-template-columns: 82px minmax(0, 1fr);
        gap: 12px;
        min-height: 112px;
        padding: 10px 12px;
        border-top-width: 4px;
        border-bottom-width: 4px;
    }

    .login-centered-logo {
        width: 78px;
        height: 78px;
    }

    .login-brand-name {
        font-size: 20px;
        line-height: 1.4;
    }

    .user-group-tabs label {
        height: 56px;
        font-size: 16px;
    }

    .security-row {
        grid-template-columns: 132px minmax(0, 1fr);
        gap: 10px;
    }

    .login-links {
        font-size: 14px;
    }
}

.address-body {
    min-height: 100vh;
    background:
        radial-gradient(circle at 50% 5%, rgba(255, 255, 255, 0.96), rgba(242, 247, 251, 0.88) 34%, rgba(218, 229, 239, 0.68) 72%),
        #eef4f8;
}

.address-wrap {
    min-height: 100vh;
    display: grid;
    place-items: start center;
    padding: 70px 16px 32px;
}

.address-panel {
    width: min(560px, 100%);
    display: grid;
    justify-items: center;
    text-align: center;
}

.address-logo {
    width: min(420px, 88vw);
    height: 138px;
    object-fit: contain;
    opacity: 0.28;
    margin-bottom: 34px;
}

.address-panel h1 {
    margin: 0 0 34px;
    color: #5b6770;
    font-size: 26px;
    font-weight: 800;
    letter-spacing: 0;
    text-transform: uppercase;
}

.address-panel p {
    margin: 0 0 28px;
    color: #6d7780;
    font-size: 30px;
    font-weight: 400;
}

.address-image {
    width: 314px;
    max-width: 82vw;
    aspect-ratio: 1.62;
    object-fit: cover;
    margin-bottom: 48px;
    box-shadow: 0 1px 0 rgba(20, 36, 48, 0.08);
}

.address-continue {
    min-width: 176px;
    height: 66px;
    border: 0;
    border-radius: 7px;
    color: #ffffff;
    background: #27333f;
    padding: 0 30px;
    font-size: 22px;
    font-weight: 800;
}

.address-continue:hover {
    background: #1c2630;
}

html[dir="rtl"] .address-panel {
    direction: rtl;
}

@media (max-width: 640px) {
    .address-wrap {
        padding-top: 44px;
    }

    .address-logo {
        height: 104px;
        margin-bottom: 26px;
    }

    .address-panel h1 {
        font-size: 22px;
        margin-bottom: 26px;
    }

    .address-panel p {
        font-size: 24px;
    }

    .address-continue {
        height: 58px;
        font-size: 19px;
    }
}

.student-portal-body {
    background: #e9eff3;
}

.student-portal-body .app-shell {
    grid-template-columns: 58px minmax(0, 1fr);
}

.student-portal-body .sidebar {
    width: 58px;
    padding: 10px 7px;
    background: #344650;
}

.student-portal-body .brand {
    min-height: 48px;
    justify-content: center;
    padding: 4px 0;
}

.student-portal-body .brand .brand-mark {
    width: 38px;
    height: 38px;
    font-size: 12px;
    background: #76bd73;
}

.student-portal-body .brand span:not(.brand-mark),
.student-portal-body .nav-link span,
.student-portal-body .nav-toggle .bi-chevron-down,
.student-portal-body .nav-submenu {
    display: none !important;
}

.student-portal-body .sidebar-nav {
    margin-top: 8px;
    gap: 8px;
}

.student-portal-body .nav-link {
    width: 44px;
    height: 44px;
    min-height: 44px;
    justify-content: center;
    padding: 0;
    border-radius: 6px;
    background: #6fbd82;
    color: #ffffff;
}

.student-portal-body .nav-link:hover,
.student-portal-body .nav-link.active {
    background: #87cf98;
}

.student-portal-body .topbar {
    height: 66px;
    gap: 18px;
    padding: 8px 18px;
    background: #344650;
    border-bottom: 0;
}

.student-top-brand {
    min-width: 245px;
    display: flex;
    align-items: center;
    gap: 12px;
    color: #ffffff;
}

.student-top-brand:hover {
    color: #ffffff;
}

.student-top-brand img {
    width: 86px;
    height: 45px;
    object-fit: contain;
    filter: brightness(0) invert(1);
    opacity: 0.92;
}

.student-top-brand strong,
.student-top-brand small {
    display: block;
    line-height: 1.1;
}

.student-top-brand strong {
    font-size: 15px;
    letter-spacing: 0;
    text-transform: uppercase;
}

.student-top-brand small {
    margin-top: 4px;
    font-size: 12px;
    opacity: 0.82;
}

.student-portal-body .topbar-search {
    max-width: 520px;
    height: 44px;
    margin-left: auto;
    margin-right: auto;
    background: #ffffff;
    border-color: rgba(255, 255, 255, 0.34);
    box-shadow: 0 1px 6px rgba(0, 0, 0, 0.18);
}

.student-portal-body .topbar-actions {
    margin-left: 0;
    gap: 12px;
}

.student-portal-body .language-link {
    min-height: 38px;
    color: #ffffff;
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.18);
}

.student-portal-body .icon-button {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.16);
}

.student-portal-body .content-wrap {
    min-height: calc(100vh - 66px);
    padding: 26px 34px 42px;
    background: #e9eff3;
}

.student-home {
    min-height: 330px;
    display: grid;
    grid-template-columns: minmax(280px, 410px) minmax(0, 1fr);
    gap: 28px;
}

.announcements-panel {
    width: 100%;
    max-height: 410px;
    overflow: hidden;
    background: #ffffff;
    border: 1px solid #d2dce4;
    border-radius: 2px;
    box-shadow: 0 1px 2px rgba(20, 36, 48, 0.04);
}

.announcements-panel header {
    height: 54px;
    display: grid;
    place-items: center;
    color: #ffffff;
    background: #3f4b55;
    font-weight: 800;
}

.announcements-list {
    max-height: 356px;
    overflow-y: auto;
    padding: 18px 22px;
}

.announcement-item {
    padding: 0 0 23px;
    color: #54626d;
}

.announcement-item + .announcement-item {
    padding-top: 5px;
}

.announcement-title {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    margin-bottom: 8px;
    font-size: 14px;
    line-height: 1.45;
}

.announcement-title i {
    color: #65727b;
    font-size: 16px;
    margin-top: 2px;
}

.announcement-title strong {
    color: #3f4b55;
    white-space: nowrap;
}

.announcement-item p {
    margin: 0;
    padding-left: 24px;
    color: #596873;
    font-size: 13px;
    line-height: 1.65;
}

.empty-announcements {
    min-height: 230px;
    display: grid;
    place-items: center;
    color: #8a96a0;
    font-size: 15px;
}

.student-home-block {
    max-width: 760px;
    margin-top: 22px;
}

html[dir="rtl"] .student-portal-body .app-shell {
    grid-template-columns: minmax(0, 1fr) 58px;
}

html[dir="rtl"] .student-portal-body .topbar-actions {
    margin-right: 0;
}

html[dir="rtl"] .student-top-brand {
    direction: ltr;
}

html[dir="rtl"] .announcement-title {
    flex-direction: row-reverse;
}

html[dir="rtl"] .announcement-item p {
    padding-left: 0;
    padding-right: 24px;
}

@media (max-width: 980px) {
    .student-top-brand {
        min-width: auto;
    }

    .student-top-brand span {
        display: none;
    }

    .student-home {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 640px) {
    .student-portal-body .app-shell {
        grid-template-columns: 1fr;
    }

    .student-portal-body .sidebar {
        width: 280px;
    }

    .student-portal-body .brand span:not(.brand-mark),
    .student-portal-body .nav-link span {
        display: inline !important;
    }

    .student-portal-body .nav-link {
        width: 100%;
        justify-content: flex-start;
        padding: 0 12px;
    }

    .student-portal-body .content-wrap {
        padding: 20px 14px 32px;
    }

}
