@charset "UTF-8";

:root {
    --erp-primary: #3156d3;
    --erp-primary-rgb: 49, 86, 211;
    --erp-primary-dark: #2444b3;
    --erp-secondary: #64748b;
    --erp-success: #17a673;
    --erp-warning: #d98e16;
    --erp-danger: #dc4c64;
    --erp-info: #2786b8;
    --erp-ink: #172033;
    --erp-muted: #667085;
    --erp-border: #e4e9f2;
    --erp-surface: #ffffff;
    --erp-surface-soft: #f7f9fc;
    --erp-canvas: #f2f5fa;
    --erp-sidebar: #10233e;
    --erp-sidebar-deep: #0a192c;
    --erp-sidebar-text: #dce6f4;
    --erp-sidebar-muted: #8fa4bd;
    --erp-sidebar-width: 286px;
    --erp-sidebar-collapsed: 84px;
    --erp-header-height: 76px;
    --erp-radius-sm: 8px;
    --erp-radius: 12px;
    --erp-radius-lg: 18px;
    --erp-shadow-sm: 0 1px 3px rgba(18, 38, 63, 0.06), 0 1px 2px rgba(18, 38, 63, 0.04);
    --erp-shadow: 0 12px 30px rgba(18, 38, 63, 0.08);
    --erp-shadow-lg: 0 24px 60px rgba(8, 23, 45, 0.18);
    --erp-ease: 180ms cubic-bezier(0.2, 0, 0, 1);
}

[data-erp-theme="dark"] {
    color-scheme: dark;
    --erp-ink: #edf3fb;
    --erp-muted: #9eabc0;
    --erp-border: #2b3c52;
    --erp-surface: #17263a;
    --erp-surface-soft: #1c2d43;
    --erp-canvas: #0f1c2d;
    --erp-sidebar: #0b1728;
    --erp-sidebar-deep: #07111f;
    --erp-shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.24);
    --erp-shadow: 0 16px 36px rgba(0, 0, 0, 0.24);
}

html {
    min-height: 100%;
    background: var(--erp-canvas);
}

body.school-erp {
    min-height: 100vh;
    margin: 0;
    overflow-x: hidden;
    background: var(--erp-canvas);
    color: var(--erp-ink);
    font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    font-size: 14px;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}

.school-erp a {
    color: var(--erp-primary);
    text-decoration: none;
}

.school-erp a:hover {
    color: var(--erp-primary-dark);
}

.school-erp button,
.school-erp input,
.school-erp select,
.school-erp textarea {
    font: inherit;
}

.school-erp :focus-visible {
    outline: 3px solid rgba(var(--erp-primary-rgb), 0.28);
    outline-offset: 2px;
}

.erp-skip-link {
    position: fixed;
    top: 12px;
    left: 12px;
    z-index: 2000;
    padding: 10px 14px;
    transform: translateY(-150%);
    border-radius: var(--erp-radius-sm);
    background: var(--erp-ink);
    color: var(--erp-surface) !important;
    font-weight: 700;
    transition: transform var(--erp-ease);
}

.erp-skip-link:focus {
    transform: translateY(0);
}

.erp-brand {
    display: inline-flex;
    min-width: 0;
    align-items: center;
    gap: 11px;
    color: inherit !important;
}

.erp-brand-mark {
    display: inline-grid;
    width: 42px;
    height: 42px;
    flex: 0 0 42px;
    place-items: center;
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 13px;
    background: linear-gradient(145deg, #5b78e8, #2d50cb 68%, #1c3da7);
    box-shadow: 0 8px 18px rgba(28, 61, 167, 0.32);
    color: #fff;
    font-size: 19px;
}

.erp-brand-copy {
    display: flex;
    min-width: 0;
    flex-direction: column;
    line-height: 1.25;
}

.erp-brand-copy strong {
    overflow: hidden;
    color: #fff;
    font-size: 15px;
    font-weight: 750;
    letter-spacing: -0.01em;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.erp-brand-copy small {
    margin-top: 2px;
    color: var(--erp-sidebar-muted);
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.erp-icon-button {
    position: relative;
    display: inline-grid;
    width: 40px;
    height: 40px;
    flex: 0 0 40px;
    place-items: center;
    border: 1px solid var(--erp-border);
    border-radius: 11px;
    background: var(--erp-surface);
    color: var(--erp-muted);
    cursor: pointer;
    transition: border-color var(--erp-ease), background var(--erp-ease), color var(--erp-ease), transform var(--erp-ease);
}

.erp-icon-button:hover {
    border-color: rgba(var(--erp-primary-rgb), 0.26);
    background: rgba(var(--erp-primary-rgb), 0.07);
    color: var(--erp-primary);
}

.erp-icon-button:active {
    transform: scale(0.96);
}

/* Sidebar */
.erp-sidebar {
    position: fixed;
    z-index: 1040;
    inset: 0 auto 0 0;
    display: flex;
    width: var(--erp-sidebar-width);
    flex-direction: column;
    overflow: hidden;
    background:
        radial-gradient(circle at 18% -8%, rgba(88, 123, 221, 0.22), transparent 30%),
        linear-gradient(180deg, var(--erp-sidebar) 0%, var(--erp-sidebar-deep) 100%);
    box-shadow: 10px 0 32px rgba(8, 22, 42, 0.08);
    color: var(--erp-sidebar-text);
    transition: width var(--erp-ease), transform var(--erp-ease);
}

.erp-sidebar-brand {
    display: flex;
    min-height: var(--erp-header-height);
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 16px 18px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.erp-sidebar-close {
    display: none;
    border-color: rgba(255, 255, 255, 0.12);
    background: rgba(255, 255, 255, 0.06);
    color: #fff;
}

.erp-sidebar-search {
    position: relative;
    display: flex;
    height: 40px;
    align-items: center;
    gap: 9px;
    margin: 14px 16px 6px;
    padding: 0 10px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.055);
    color: var(--erp-sidebar-muted);
    transition: border-color var(--erp-ease), background var(--erp-ease);
}

.erp-sidebar-search:focus-within {
    border-color: rgba(126, 158, 245, 0.62);
    background: rgba(255, 255, 255, 0.09);
}

.erp-sidebar-search input {
    width: 100%;
    min-width: 0;
    border: 0;
    outline: 0;
    background: transparent;
    color: #fff;
    font-size: 12px;
}

.erp-sidebar-search input::placeholder {
    color: #8ea2bb;
}

.erp-sidebar-search kbd {
    padding: 1px 5px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 5px;
    background: rgba(0, 0, 0, 0.14);
    color: #aebdd0;
    font-size: 10px;
    font-weight: 600;
}

.erp-sidebar-nav {
    flex: 1 1 auto;
    overflow-x: hidden;
    overflow-y: auto;
    padding: 4px 12px 20px;
    overscroll-behavior: contain;
    scrollbar-color: rgba(255, 255, 255, 0.18) transparent;
    scrollbar-width: thin;
}

.erp-sidebar-nav::-webkit-scrollbar {
    width: 5px;
}

.erp-sidebar-nav::-webkit-scrollbar-thumb {
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.18);
}

.erp-nav-list,
.erp-nav-list ul {
    margin: 0;
    padding: 0;
    list-style: none;
}

.erp-nav-category {
    margin-top: 15px;
}

.erp-nav-caption {
    display: block;
    padding: 0 10px 7px;
    color: #7f93ab;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    white-space: nowrap;
}

.erp-nav-item {
    position: relative;
    margin: 2px 0;
}

.erp-nav-link {
    display: flex;
    width: 100%;
    min-height: 43px;
    align-items: center;
    gap: 10px;
    padding: 7px 10px;
    border: 0;
    border-radius: 9px;
    background: transparent;
    color: #b9c8da !important;
    font-size: 12.5px;
    font-weight: 560;
    text-align: left;
    cursor: pointer;
    transition: background var(--erp-ease), color var(--erp-ease), transform var(--erp-ease);
}

.erp-nav-link:hover {
    background: rgba(255, 255, 255, 0.07);
    color: #fff !important;
}

.erp-nav-link.active {
    background: linear-gradient(100deg, rgba(75, 109, 215, 0.34), rgba(75, 109, 215, 0.13));
    box-shadow: inset 3px 0 0 #7c9af1;
    color: #fff !important;
}

.erp-nav-icon {
    display: inline-grid;
    width: 27px;
    height: 27px;
    flex: 0 0 27px;
    place-items: center;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.055);
    color: #aebed1;
    font-size: 14px;
    transition: background var(--erp-ease), color var(--erp-ease);
}

.erp-nav-link.active .erp-nav-icon,
.erp-nav-link:hover .erp-nav-icon {
    background: rgba(124, 154, 241, 0.15);
    color: #dce6ff;
}

.erp-nav-text {
    min-width: 0;
    flex: 1 1 auto;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.erp-nav-chevron {
    flex: 0 0 auto;
    font-size: 13px;
    transition: transform var(--erp-ease);
}

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

.erp-nav-submenu {
    position: relative;
    margin: 4px 0 7px 37px !important;
    padding-left: 12px !important;
}

.erp-nav-submenu::before {
    position: absolute;
    inset: 3px auto 3px 0;
    width: 1px;
    background: rgba(255, 255, 255, 0.11);
    content: "";
}

.erp-nav-submenu[hidden] {
    display: none;
}

.erp-nav-sublink {
    position: relative;
    display: flex;
    min-height: 32px;
    align-items: center;
    gap: 9px;
    padding: 5px 7px;
    border-radius: 7px;
    color: #91a4ba !important;
    font-size: 11.5px;
    transition: color var(--erp-ease), background var(--erp-ease);
}

.erp-nav-sublink > span {
    width: 5px;
    height: 5px;
    flex: 0 0 5px;
    border-radius: 50%;
    background: #60758d;
}

.erp-nav-sublink:hover,
.erp-nav-sublink.active {
    background: rgba(255, 255, 255, 0.055);
    color: #fff !important;
}

.erp-nav-sublink.active > span {
    background: #82a0fa;
    box-shadow: 0 0 0 4px rgba(130, 160, 250, 0.12);
}

.erp-nav-empty,
.erp-nav-filter-empty {
    margin: 18px 7px;
    padding: 16px 12px;
    border: 1px dashed rgba(255, 255, 255, 0.13);
    border-radius: 10px;
    color: #8fa3ba;
    font-size: 11px;
    text-align: center;
}

.erp-nav-empty i {
    display: block;
    margin-bottom: 8px;
    font-size: 19px;
}

.erp-sidebar-footer {
    display: flex;
    min-height: 68px;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 11px 15px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(0, 0, 0, 0.08);
}

.erp-system-indicator {
    display: flex;
    min-width: 0;
    align-items: center;
    gap: 9px;
}

.erp-system-indicator > span:last-child {
    display: flex;
    min-width: 0;
    flex-direction: column;
}

.erp-system-indicator strong {
    color: #d7e1ed;
    font-size: 10.5px;
    font-weight: 650;
}

.erp-system-indicator small {
    color: #72879f;
    font-size: 9px;
}

.erp-status-dot {
    width: 8px;
    height: 8px;
    flex: 0 0 8px;
    border: 2px solid rgba(39, 199, 139, 0.25);
    border-radius: 50%;
    background: #27c78b;
    box-shadow: 0 0 0 4px rgba(39, 199, 139, 0.1);
}

.erp-sidebar-collapse {
    width: 34px;
    height: 34px;
    flex-basis: 34px;
    border-color: rgba(255, 255, 255, 0.1);
    background: rgba(255, 255, 255, 0.055);
    color: #9fb1c6;
}

.erp-sidebar-backdrop {
    position: fixed;
    z-index: 1035;
    inset: 0;
    display: none;
    border: 0;
    background: rgba(5, 15, 29, 0.55);
    opacity: 0;
    backdrop-filter: blur(2px);
}

/* Collapsed desktop navigation */
html[data-erp-sidebar="collapsed"] .erp-sidebar {
    width: var(--erp-sidebar-collapsed);
}

html[data-erp-sidebar="collapsed"] .erp-sidebar-brand {
    justify-content: center;
    padding-inline: 10px;
}

html[data-erp-sidebar="collapsed"] .erp-brand-copy,
html[data-erp-sidebar="collapsed"] .erp-sidebar-search input,
html[data-erp-sidebar="collapsed"] .erp-sidebar-search kbd,
html[data-erp-sidebar="collapsed"] .erp-nav-caption,
html[data-erp-sidebar="collapsed"] .erp-nav-text,
html[data-erp-sidebar="collapsed"] .erp-nav-chevron,
html[data-erp-sidebar="collapsed"] .erp-nav-submenu,
html[data-erp-sidebar="collapsed"] .erp-system-indicator > span:last-child {
    display: none;
}

html[data-erp-sidebar="collapsed"] .erp-sidebar-search {
    width: 42px;
    margin-inline: auto;
    justify-content: center;
    padding: 0;
}

html[data-erp-sidebar="collapsed"] .erp-nav-category {
    margin-top: 8px;
}

html[data-erp-sidebar="collapsed"] .erp-nav-link {
    justify-content: center;
    padding-inline: 8px;
}

html[data-erp-sidebar="collapsed"] .erp-nav-icon {
    width: 31px;
    height: 31px;
    flex-basis: 31px;
}

html[data-erp-sidebar="collapsed"] .erp-sidebar-footer {
    justify-content: center;
}

html[data-erp-sidebar="collapsed"] .erp-sidebar-collapse i {
    transform: rotate(180deg);
}

/* Header */
.erp-header {
    position: fixed;
    z-index: 1030;
    inset: 0 0 auto var(--erp-sidebar-width);
    display: flex;
    height: var(--erp-header-height);
    align-items: center;
    gap: 18px;
    padding: 0 24px;
    border-bottom: 1px solid var(--erp-border);
    background: color-mix(in srgb, var(--erp-surface) 94%, transparent);
    box-shadow: 0 4px 18px rgba(17, 35, 59, 0.035);
    backdrop-filter: blur(14px);
    transition: left var(--erp-ease);
}

html[data-erp-sidebar="collapsed"] .erp-header {
    left: var(--erp-sidebar-collapsed);
}

.erp-header-left,
.erp-header-actions {
    display: flex;
    align-items: center;
}

.erp-header-left {
    min-width: 135px;
    gap: 12px;
}

.erp-menu-toggle {
    display: none;
}

.erp-header-page {
    display: flex;
    min-width: 0;
    flex-direction: column;
    line-height: 1.22;
}

.erp-header-page span {
    color: var(--erp-muted);
    font-size: 9px;
    font-weight: 700;
    letter-spacing: 0.09em;
    text-transform: uppercase;
}

.erp-header-page strong {
    max-width: 180px;
    overflow: hidden;
    color: var(--erp-ink);
    font-size: 12.5px;
    font-weight: 700;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.erp-context-form {
    display: flex;
    min-width: 0;
    max-width: 670px;
    height: 42px;
    flex: 1 1 auto;
    align-items: center;
    justify-content: center;
    margin-inline: auto;
    padding: 0 8px;
    border: 1px solid var(--erp-border);
    border-radius: 12px;
    background: var(--erp-surface-soft);
}

.erp-context-field {
    display: flex;
    min-width: 110px;
    flex: 1 1 150px;
    align-items: center;
    gap: 7px;
    padding: 0 7px;
    color: var(--erp-muted);
}

.erp-context-field.erp-context-school {
    min-width: 150px;
    flex-grow: 1.3;
}

.erp-context-field i {
    flex: 0 0 auto;
    color: var(--erp-primary);
    font-size: 13px;
}

.erp-context-field select {
    width: 100%;
    min-width: 0;
    padding: 4px 18px 4px 0;
    overflow: hidden;
    border: 0;
    outline: 0;
    background-color: transparent;
    color: var(--erp-ink);
    font-size: 11.5px;
    font-weight: 650;
    text-overflow: ellipsis;
    cursor: pointer;
}

.erp-context-divider {
    width: 1px;
    height: 20px;
    flex: 0 0 1px;
    background: var(--erp-border);
}

.erp-header-actions {
    justify-content: flex-end;
    gap: 8px;
}

.erp-context-toggle {
    display: none;
}

.erp-search-trigger {
    display: inline-flex;
    height: 40px;
    align-items: center;
    gap: 8px;
    padding: 0 9px 0 12px;
    border: 1px solid var(--erp-border);
    border-radius: 11px;
    background: var(--erp-surface-soft);
    color: var(--erp-muted);
    cursor: pointer;
    transition: border-color var(--erp-ease), background var(--erp-ease), color var(--erp-ease);
}

.erp-search-trigger:hover {
    border-color: rgba(var(--erp-primary-rgb), 0.26);
    background: rgba(var(--erp-primary-rgb), 0.06);
    color: var(--erp-primary);
}

.erp-search-trigger > span {
    font-size: 11.5px;
    font-weight: 600;
}

.erp-search-trigger kbd {
    padding: 2px 5px;
    border: 1px solid var(--erp-border);
    border-radius: 5px;
    background: var(--erp-surface);
    color: var(--erp-muted);
    font-size: 8.5px;
    box-shadow: 0 1px 1px rgba(0, 0, 0, 0.04);
}

.erp-theme-icon-light {
    display: none;
}

[data-erp-theme="dark"] .erp-theme-icon-dark {
    display: none;
}

[data-erp-theme="dark"] .erp-theme-icon-light {
    display: inline;
}

.erp-notification-badge {
    position: absolute;
    top: -4px;
    right: -5px;
    display: grid;
    min-width: 18px;
    height: 18px;
    place-items: center;
    padding: 0 4px;
    border: 2px solid var(--erp-surface);
    border-radius: 9px;
    background: var(--erp-danger);
    color: #fff;
    font-size: 8px;
    font-weight: 800;
}

.erp-user-trigger {
    display: flex;
    min-width: 0;
    height: 44px;
    align-items: center;
    gap: 9px;
    padding: 3px 7px 3px 4px;
    border: 1px solid transparent;
    border-radius: 12px;
    background: transparent;
    color: var(--erp-ink);
    cursor: pointer;
    transition: border-color var(--erp-ease), background var(--erp-ease);
}

.erp-user-trigger:hover,
.erp-user-trigger[aria-expanded="true"] {
    border-color: var(--erp-border);
    background: var(--erp-surface-soft);
}

.erp-avatar {
    display: inline-grid;
    width: 36px;
    height: 36px;
    flex: 0 0 36px;
    place-items: center;
    border: 1px solid rgba(var(--erp-primary-rgb), 0.18);
    border-radius: 11px;
    background: linear-gradient(145deg, rgba(var(--erp-primary-rgb), 0.16), rgba(var(--erp-primary-rgb), 0.08));
    color: var(--erp-primary);
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.02em;
}

.erp-avatar-lg {
    width: 43px;
    height: 43px;
    flex-basis: 43px;
    border-radius: 13px;
    font-size: 12px;
}

.erp-user-copy {
    display: flex;
    min-width: 0;
    max-width: 120px;
    flex-direction: column;
    line-height: 1.25;
    text-align: left;
}

.erp-user-copy strong,
.erp-user-copy small {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.erp-user-copy strong {
    color: var(--erp-ink);
    font-size: 11.5px;
    font-weight: 700;
}

.erp-user-copy small {
    margin-top: 2px;
    color: var(--erp-muted);
    font-size: 9.5px;
}

.erp-user-trigger > i {
    color: var(--erp-muted);
    font-size: 11px;
}

.school-erp .dropdown-menu {
    border: 1px solid var(--erp-border);
    border-radius: 13px;
    background: var(--erp-surface);
    box-shadow: var(--erp-shadow-lg);
    color: var(--erp-ink);
}

.school-erp .dropdown-divider {
    border-color: var(--erp-border);
}

.school-erp .dropdown-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 14px;
    color: var(--erp-ink);
    font-size: 11.5px;
}

.school-erp .dropdown-item:hover,
.school-erp .dropdown-item:focus {
    background: var(--erp-surface-soft);
    color: var(--erp-primary);
}

.school-erp .dropdown-item i {
    width: 16px;
    color: var(--erp-muted);
    text-align: center;
}

.erp-profile-menu {
    width: min(285px, calc(100vw - 24px));
    padding: 8px;
}

.erp-profile-menu form {
    margin: 0;
}

.erp-profile-menu form .dropdown-item {
    width: 100%;
    border: 0;
    background: transparent;
    text-align: left;
}

.erp-profile-summary {
    display: flex;
    align-items: center;
    gap: 11px;
    padding: 8px 9px 5px;
}

.erp-profile-summary > div {
    display: flex;
    min-width: 0;
    flex-direction: column;
}

.erp-profile-summary strong,
.erp-profile-summary span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.erp-profile-summary strong {
    color: var(--erp-ink);
    font-size: 12px;
}

.erp-profile-summary span {
    margin-top: 2px;
    color: var(--erp-muted);
    font-size: 10px;
}

.erp-notification-menu {
    width: min(360px, calc(100vw - 24px));
    padding: 0;
    overflow: hidden;
}

.erp-dropdown-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 14px 15px;
    border-bottom: 1px solid var(--erp-border);
}

.erp-dropdown-heading > div {
    display: flex;
    flex-direction: column;
}

.erp-dropdown-heading strong {
    color: var(--erp-ink);
    font-size: 12.5px;
}

.erp-dropdown-heading span,
.erp-dropdown-heading a {
    color: var(--erp-muted);
    font-size: 9.5px;
}

.erp-dropdown-heading a {
    color: var(--erp-primary);
    font-weight: 700;
}

.erp-notification-list {
    max-height: 360px;
    overflow-y: auto;
}

.erp-notification-item {
    display: flex;
    gap: 11px;
    padding: 12px 15px;
    border-bottom: 1px solid var(--erp-border);
    color: inherit !important;
}

.erp-notification-item:hover {
    background: var(--erp-surface-soft);
}

.erp-notification-icon {
    display: grid;
    width: 34px;
    height: 34px;
    flex: 0 0 34px;
    place-items: center;
    border-radius: 10px;
    background: rgba(var(--erp-primary-rgb), 0.09);
    color: var(--erp-primary);
}

.erp-notification-item > span:last-child {
    display: flex;
    min-width: 0;
    flex-direction: column;
}

.erp-notification-item strong {
    color: var(--erp-ink);
    font-size: 11px;
}

.erp-notification-item small {
    display: -webkit-box;
    margin-top: 2px;
    overflow: hidden;
    color: var(--erp-muted);
    font-size: 9.5px;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

.erp-notification-item time {
    margin-top: 4px;
    color: var(--erp-muted);
    font-size: 8.5px;
}

.erp-notification-empty {
    display: flex;
    min-height: 190px;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    padding: 22px;
    text-align: center;
}

.erp-notification-empty > span {
    display: grid;
    width: 52px;
    height: 52px;
    margin-bottom: 12px;
    place-items: center;
    border-radius: 17px;
    background: rgba(23, 166, 115, 0.1);
    color: var(--erp-success);
    font-size: 20px;
}

.erp-notification-empty strong {
    color: var(--erp-ink);
    font-size: 12px;
}

.erp-notification-empty small {
    margin-top: 4px;
    color: var(--erp-muted);
    font-size: 10px;
}

/* Main content */
.erp-main {
    display: flex;
    min-height: 100vh;
    margin-left: var(--erp-sidebar-width);
    padding-top: var(--erp-header-height);
    flex-direction: column;
    transition: margin-left var(--erp-ease);
}

html[data-erp-sidebar="collapsed"] .erp-main {
    margin-left: var(--erp-sidebar-collapsed);
}

.erp-content {
    width: 100%;
    max-width: 1800px;
    flex: 1 1 auto;
    margin: 0 auto;
    padding: 25px 28px 36px;
}

.erp-page-heading {
    display: flex;
    min-height: 52px;
    align-items: flex-end;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 20px;
}

.erp-page-title {
    margin: 5px 0 0;
    color: var(--erp-ink);
    font-size: clamp(19px, 2vw, 25px);
    font-weight: 760;
    letter-spacing: -0.035em;
    line-height: 1.2;
}

.erp-breadcrumb {
    display: flex;
    align-items: center;
    gap: 0;
    margin: 0;
    padding: 0;
    list-style: none;
}

.erp-breadcrumb-item {
    display: inline-flex;
    align-items: center;
    color: var(--erp-muted);
    font-size: 10px;
    font-weight: 600;
}

.erp-breadcrumb-item + .erp-breadcrumb-item::before {
    margin: 0 7px;
    color: #a8b1c0;
    content: "/";
}

.erp-breadcrumb-item a {
    color: var(--erp-muted);
}

.erp-breadcrumb-item a:hover {
    color: var(--erp-primary);
}

.erp-page-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.erp-page-content {
    min-width: 0;
}

.erp-footer {
    display: flex;
    min-height: 58px;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 15px 28px;
    border-top: 1px solid var(--erp-border);
    background: var(--erp-surface);
    color: var(--erp-muted);
    font-size: 10px;
}

.erp-footer-status {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.erp-footer-status i {
    color: var(--erp-success);
}

/* Refined Duralux components */
.school-erp .card {
    border-color: var(--erp-border);
    border-radius: var(--erp-radius);
    background: var(--erp-surface);
    box-shadow: var(--erp-shadow-sm);
    color: var(--erp-ink);
}

.school-erp .card-header,
.school-erp .card-footer {
    border-color: var(--erp-border);
    background: transparent;
}

.school-erp .card-header {
    min-height: 60px;
}

.school-erp .table {
    --bs-table-bg: transparent;
    --bs-table-color: var(--erp-ink);
    --bs-table-border-color: var(--erp-border);
    color: var(--erp-ink);
}

.school-erp .table > thead th {
    border-bottom-width: 1px;
    background: var(--erp-surface-soft);
    color: var(--erp-muted);
    font-size: 9.5px;
    font-weight: 750;
    letter-spacing: 0.045em;
    text-transform: uppercase;
}

.school-erp .input-group-text,
.school-erp .list-group-item,
.school-erp .page-link {
    border-color: var(--erp-border);
    background-color: var(--erp-surface);
    color: var(--erp-ink);
}

.school-erp .list-group-item-action:hover,
.school-erp .list-group-item-action:focus,
.school-erp .page-link:hover {
    background-color: var(--erp-surface-soft);
    color: var(--erp-primary);
}

.school-erp .form-control,
.school-erp .form-select {
    min-height: 42px;
    border-color: var(--erp-border);
    border-radius: 9px;
    background-color: var(--erp-surface);
    color: var(--erp-ink);
    font-size: 12px;
}

.school-erp .form-control:focus,
.school-erp .form-select:focus {
    border-color: rgba(var(--erp-primary-rgb), 0.55);
    background-color: var(--erp-surface);
    color: var(--erp-ink);
    box-shadow: 0 0 0 3px rgba(var(--erp-primary-rgb), 0.1);
}

.school-erp .form-label {
    color: var(--erp-ink);
    font-size: 11px;
    font-weight: 650;
}

.school-erp .btn {
    border-radius: 9px;
    font-size: 11.5px;
    font-weight: 650;
}

.school-erp .btn-primary {
    border-color: var(--erp-primary);
    background: var(--erp-primary);
    box-shadow: 0 6px 14px rgba(var(--erp-primary-rgb), 0.17);
}

.school-erp .btn-primary:hover,
.school-erp .btn-primary:focus {
    border-color: var(--erp-primary-dark);
    background: var(--erp-primary-dark);
}

.school-erp .text-muted {
    color: var(--erp-muted) !important;
}

/* Flash messages */
.erp-flash-stack {
    display: grid;
    gap: 10px;
    margin-bottom: 18px;
}

.erp-alert {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin: 0;
    padding: 13px 14px;
    border-width: 1px;
    border-radius: 11px;
    box-shadow: var(--erp-shadow-sm);
}

.erp-alert-icon {
    display: grid;
    width: 31px;
    height: 31px;
    flex: 0 0 31px;
    place-items: center;
    border-radius: 9px;
    background: rgba(255, 255, 255, 0.55);
}

.erp-alert-content {
    min-width: 0;
    flex: 1 1 auto;
}

.erp-alert-content strong {
    display: block;
    margin-bottom: 2px;
    color: inherit;
    font-size: 11.5px;
}

.erp-alert-content p,
.erp-alert-content ul {
    margin: 0;
    font-size: 10.5px;
}

.erp-alert-content ul {
    padding-left: 17px;
}

.erp-alert .btn-close {
    margin: 1px 0 0 8px;
    font-size: 9px;
}

.erp-alert.erp-flash-leaving {
    overflow: hidden;
    opacity: 0;
    transform: translateY(-5px);
    transition: opacity 220ms ease, transform 220ms ease;
}

/* Global search */
.erp-search-modal .modal-content {
    overflow: hidden;
    border: 1px solid var(--erp-border);
    border-radius: 17px;
    background: var(--erp-surface);
    box-shadow: 0 30px 90px rgba(7, 21, 42, 0.25);
    color: var(--erp-ink);
}

.erp-eyebrow {
    color: var(--erp-primary);
    font-size: 9px;
    font-weight: 800;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.erp-global-search-field {
    display: flex;
    height: 58px;
    align-items: center;
    gap: 11px;
    padding: 0 14px;
    border: 1px solid var(--erp-border);
    border-radius: 13px;
    background: var(--erp-surface-soft);
    color: var(--erp-muted);
}

.erp-global-search-field:focus-within {
    border-color: rgba(var(--erp-primary-rgb), 0.52);
    box-shadow: 0 0 0 4px rgba(var(--erp-primary-rgb), 0.08);
}

.erp-global-search-field > i {
    color: var(--erp-primary);
    font-size: 18px;
}

.erp-global-search-field .form-control {
    height: auto;
    min-height: 0;
    padding: 0;
    border: 0;
    background: transparent;
    box-shadow: none;
    font-size: 14px;
}

.erp-global-search-field kbd {
    padding: 3px 7px;
    border: 1px solid var(--erp-border);
    border-radius: 6px;
    background: var(--erp-surface);
    color: var(--erp-muted);
    font-size: 9px;
}

.erp-search-results {
    margin-top: 12px;
}

.erp-search-hint {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 8px 3px 2px;
    color: var(--erp-muted);
    font-size: 9.5px;
}

.erp-search-hint span {
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.erp-search-match {
    display: flex;
    align-items: center;
    gap: 11px;
    padding: 10px 11px;
    border-radius: 10px;
    color: var(--erp-ink) !important;
}

.erp-search-match:hover,
.erp-search-match:focus {
    background: var(--erp-surface-soft);
}

.erp-search-match i {
    display: grid;
    width: 32px;
    height: 32px;
    place-items: center;
    border-radius: 9px;
    background: rgba(var(--erp-primary-rgb), 0.09);
    color: var(--erp-primary);
}

.erp-search-match span {
    display: flex;
    min-width: 0;
    flex-direction: column;
}

.erp-search-match strong {
    color: var(--erp-ink);
    font-size: 11.5px;
}

.erp-search-match small {
    color: var(--erp-muted);
    font-size: 9px;
}

.erp-search-no-match {
    padding: 22px 10px 12px;
    color: var(--erp-muted);
    font-size: 10.5px;
    text-align: center;
}

/* Authentication */
.erp-auth {
    background: var(--erp-surface);
}

.erp-auth-shell {
    display: grid;
    min-height: 100vh;
    grid-template-columns: minmax(390px, 46%) 1fr;
}

.erp-auth-showcase {
    position: relative;
    display: flex;
    min-height: 100vh;
    padding: clamp(30px, 4vw, 62px);
    overflow: hidden;
    flex-direction: column;
    justify-content: space-between;
    background:
        linear-gradient(135deg, rgba(49, 86, 211, 0.96), rgba(21, 49, 93, 0.98)),
        var(--erp-sidebar);
    color: #fff;
    isolation: isolate;
}

.erp-auth-showcase::before {
    position: absolute;
    z-index: -1;
    inset: 0;
    opacity: 0.16;
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.16) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.16) 1px, transparent 1px);
    background-size: 38px 38px;
    mask-image: linear-gradient(to bottom right, black, transparent 76%);
    content: "";
}

.erp-auth-brand {
    position: relative;
    z-index: 2;
    align-self: flex-start;
}

.erp-auth-orb {
    position: absolute;
    z-index: -1;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.05);
}

.erp-auth-orb-one {
    top: -150px;
    right: -110px;
    width: 420px;
    height: 420px;
}

.erp-auth-orb-two {
    right: 8%;
    bottom: -180px;
    width: 380px;
    height: 380px;
}

.erp-auth-pitch {
    position: relative;
    z-index: 2;
    max-width: 590px;
    margin: clamp(70px, 12vh, 130px) 0 auto;
}

.erp-auth-pill {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 7px 10px;
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.08);
    color: #dfe8ff;
    font-size: 10px;
    font-weight: 650;
    backdrop-filter: blur(8px);
}

.erp-auth-pitch h1 {
    max-width: 560px;
    margin: 20px 0 16px;
    color: #fff;
    font-size: clamp(34px, 4vw, 58px);
    font-weight: 770;
    letter-spacing: -0.055em;
    line-height: 1.02;
}

.erp-auth-pitch > p {
    max-width: 520px;
    margin: 0;
    color: #c8d7ee;
    font-size: clamp(13px, 1.2vw, 16px);
    line-height: 1.75;
}

.erp-auth-capabilities {
    display: grid;
    margin-top: 34px;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
}

.erp-auth-capabilities > div {
    display: flex;
    min-height: 76px;
    align-items: flex-start;
    gap: 10px;
    padding: 14px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 13px;
    background: rgba(255, 255, 255, 0.06);
    color: #e7effc;
    font-size: 10.5px;
    font-weight: 620;
    backdrop-filter: blur(7px);
}

.erp-auth-capabilities i {
    color: #9fb7ff;
    font-size: 16px;
}

.erp-auth-showcase-footer {
    position: relative;
    z-index: 2;
    display: flex;
    align-items: center;
    gap: 7px;
    margin: 40px 0 0;
    color: #9fb0c8;
    font-size: 9.5px;
}

.erp-auth-panel {
    display: flex;
    min-height: 100vh;
    align-items: center;
    justify-content: center;
    padding: 34px;
    background: var(--erp-surface);
}

.erp-auth-panel-inner {
    width: min(100%, 460px);
}

.erp-auth-mobile-brand {
    display: none;
    align-items: center;
    gap: 11px;
    margin-bottom: 34px;
}

.erp-auth-mobile-brand > div {
    display: flex;
    flex-direction: column;
}

.erp-auth-mobile-brand strong {
    color: var(--erp-ink);
    font-size: 14px;
}

.erp-auth-mobile-brand small {
    color: var(--erp-muted);
    font-size: 9px;
    text-transform: uppercase;
}

.erp-auth-content .auth-brand {
    display: flex;
    align-items: center;
    gap: 12px;
}

.erp-auth-content .auth-brand-mark {
    display: grid;
    width: 46px;
    height: 46px;
    flex: 0 0 46px;
    place-items: center;
    border-radius: 14px;
    background: linear-gradient(145deg, #5b78e8, #2d50cb 68%, #1c3da7);
    box-shadow: 0 9px 20px rgba(var(--erp-primary-rgb), 0.24);
    color: #fff;
    font-size: 19px;
}

.erp-auth-content .demo-access {
    border: 1px solid rgba(var(--erp-primary-rgb), 0.14);
    background: rgba(var(--erp-primary-rgb), 0.055);
}

.erp-auth-content .password-toggle {
    border-color: var(--erp-border);
    background: var(--erp-surface);
}

.erp-auth-content h1,
.erp-auth-content h2 {
    color: var(--erp-ink);
    font-weight: 760;
    letter-spacing: -0.035em;
}

.erp-auth-content .form-control {
    min-height: 48px;
}

.erp-auth-content .btn-primary {
    min-height: 46px;
}

.erp-auth-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 15px;
    margin-top: 38px;
    padding-top: 18px;
    border-top: 1px solid var(--erp-border);
    color: var(--erp-muted);
    font-size: 9.5px;
}

.erp-auth-footer span:last-child {
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.erp-auth-footer i {
    color: var(--erp-success);
}

/* School product components */
.school-erp .metric-card {
    min-height: 118px;
    overflow: hidden;
    transition: transform var(--erp-ease), box-shadow var(--erp-ease), border-color var(--erp-ease);
}

.school-erp a.metric-card:hover,
.school-erp .metric-card:hover {
    transform: translateY(-2px);
    border-color: rgba(var(--erp-primary-rgb), 0.18) !important;
    box-shadow: var(--erp-shadow);
}

.school-erp .metric-icon,
.school-erp .feature-icon,
.school-erp .file-icon,
.school-erp .empty-state-icon {
    display: inline-grid;
    width: 46px;
    height: 46px;
    flex: 0 0 46px;
    place-items: center;
    border-radius: 13px;
    font-size: 18px;
}

.school-erp .metric-icon-sm {
    width: 36px;
    height: 36px;
    flex-basis: 36px;
    border-radius: 10px;
    font-size: 14px;
}

.school-erp .feature-icon,
.school-erp .file-icon,
.school-erp .empty-state-icon {
    background: rgba(var(--erp-primary-rgb), 0.09);
    color: var(--erp-primary);
}

.school-erp .feature-icon-lg {
    width: 54px;
    height: 54px;
    flex-basis: 54px;
    border-radius: 15px;
    font-size: 21px;
}

.school-erp .empty-state-icon {
    width: 58px;
    height: 58px;
    border-radius: 18px;
    font-size: 23px;
}

.school-erp .status-dot {
    width: 9px;
    height: 9px;
    flex: 0 0 9px;
    margin-top: 5px;
    border-radius: 999px;
    box-shadow: 0 0 0 5px rgba(100, 116, 139, 0.09);
}

/* Dashboard */
.school-erp .dashboard-welcome {
    position: relative;
    min-height: 260px;
    isolation: isolate;
    background:
        radial-gradient(circle at 84% 12%, rgba(255, 255, 255, 0.22), transparent 25%),
        linear-gradient(125deg, #2446b7 0%, #3156d3 48%, #5978e5 100%);
    color: #fff;
    box-shadow: 0 18px 44px rgba(36, 68, 179, 0.2);
}

.school-erp .dashboard-welcome::before,
.school-erp .dashboard-welcome::after,
.school-erp .portal-hero::before,
.school-erp .ai-hero::before {
    position: absolute;
    z-index: -1;
    border: 1px solid rgba(255, 255, 255, 0.13);
    border-radius: 50%;
    content: "";
    pointer-events: none;
}

.school-erp .dashboard-welcome::before {
    top: -180px;
    right: -75px;
    width: 430px;
    height: 430px;
}

.school-erp .dashboard-welcome::after {
    right: 168px;
    bottom: -115px;
    width: 235px;
    height: 235px;
    background: rgba(255, 255, 255, 0.025);
}

.school-erp .dashboard-welcome .card-body {
    display: flex;
    min-height: 260px;
    align-items: center;
}

.school-erp .dashboard-welcome .text-white-50,
.school-erp .portal-hero .text-white-50,
.school-erp .ai-hero .text-white-50 {
    color: rgba(255, 255, 255, 0.76) !important;
}

.school-erp .dashboard-welcome .btn-outline-light,
.school-erp .portal-hero .btn-outline-light,
.school-erp .ai-hero .btn-outline-light {
    border-color: rgba(255, 255, 255, 0.74);
    color: #fff;
}

.school-erp .dashboard-welcome .btn-outline-light:hover,
.school-erp .portal-hero .btn-outline-light:hover,
.school-erp .ai-hero .btn-outline-light:hover {
    border-color: #fff;
    background: #fff;
    color: var(--erp-primary);
}

.school-erp .welcome-orbit {
    position: relative;
    display: grid;
    width: 150px;
    height: 150px;
    place-items: center;
    border: 1px solid rgba(255, 255, 255, 0.25);
    border-radius: 50%;
    color: #fff;
    font-size: 38px;
}

.school-erp .welcome-orbit::before,
.school-erp .welcome-orbit::after {
    position: absolute;
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 0 20px rgba(255, 255, 255, 0.55);
    content: "";
}

.school-erp .welcome-orbit::before {
    top: 18px;
    left: 11px;
    width: 8px;
    height: 8px;
}

.school-erp .welcome-orbit::after {
    right: 17px;
    bottom: 18px;
    width: 6px;
    height: 6px;
}

.school-erp .dashboard-chart {
    min-height: 290px;
}

.school-erp .event-date {
    display: grid;
    width: 48px;
    height: 52px;
    flex: 0 0 48px;
    place-items: center;
    align-content: center;
    border: 1px solid rgba(var(--erp-primary-rgb), 0.14);
    border-radius: 12px;
    background: rgba(var(--erp-primary-rgb), 0.07);
    color: var(--erp-primary);
    line-height: 1.05;
}

.school-erp .event-date strong {
    font-size: 17px;
}

.school-erp .event-date span {
    margin-top: 3px;
    font-size: 9px;
    font-weight: 750;
    letter-spacing: 0.07em;
    text-transform: uppercase;
}

/* Module and workflow surfaces */
.school-erp .module-hero {
    position: relative;
    overflow: hidden;
    border-top: 4px solid var(--module-accent, var(--erp-primary)) !important;
    background:
        radial-gradient(circle at 92% 5%, rgba(var(--erp-primary-rgb), 0.12), transparent 31%),
        var(--erp-surface);
}

.school-erp .module-hero-icon {
    display: grid;
    width: 58px;
    height: 58px;
    place-items: center;
    border-radius: 17px;
    background: linear-gradient(145deg, rgba(var(--erp-primary-rgb), 0.14), rgba(var(--erp-primary-rgb), 0.06));
    color: var(--erp-primary);
    font-size: 24px;
}

.school-erp .module-stat {
    display: flex;
    min-height: 105px;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    padding: 16px;
    border: 1px solid var(--erp-border);
    border-radius: 14px;
    background: color-mix(in srgb, var(--erp-surface-soft) 86%, transparent);
    text-align: center;
}

.school-erp .module-stat strong {
    color: var(--erp-primary);
    font-size: 27px;
    line-height: 1;
}

.school-erp .module-stat span {
    margin-top: 7px;
    color: var(--erp-muted);
    font-size: 10px;
    font-weight: 650;
}

.school-erp .module-stat-wide {
    min-height: 52px;
    flex-direction: row;
    gap: 8px;
}

.school-erp .module-stat-wide span {
    margin: 0;
}

.school-erp .module-feature-search kbd {
    border: 1px solid var(--erp-border);
    background: var(--erp-surface-soft);
    color: var(--erp-muted);
}

.school-erp .feature-card {
    border: 1px solid transparent !important;
    transition: transform var(--erp-ease), box-shadow var(--erp-ease), border-color var(--erp-ease);
}

.school-erp .feature-card:hover {
    transform: translateY(-3px);
    border-color: rgba(var(--erp-primary-rgb), 0.2) !important;
    box-shadow: var(--erp-shadow);
}

.school-erp .line-clamp-2 {
    display: -webkit-box;
    overflow: hidden;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

.school-erp .record-detail-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    margin: 0;
}

.school-erp .record-detail-grid > div {
    min-width: 0;
    padding: 14px 15px;
    border: 1px solid var(--erp-border);
    border-radius: 11px;
    background: var(--erp-surface-soft);
}

.school-erp .record-detail-grid dt,
.school-erp .small-details dt {
    margin-bottom: 5px;
    color: var(--erp-muted);
    font-size: 9px;
    font-weight: 750;
    letter-spacing: 0.055em;
    text-transform: uppercase;
}

.school-erp .record-detail-grid dd,
.school-erp .small-details dd {
    margin: 0;
    overflow-wrap: anywhere;
    color: var(--erp-ink);
    font-size: 12px;
}

.school-erp .small-details {
    display: grid;
    gap: 12px;
    margin: 0;
}

.school-erp .small-details > div {
    padding-bottom: 11px;
    border-bottom: 1px solid var(--erp-border);
}

.school-erp .small-details > div:last-child {
    padding-bottom: 0;
    border: 0;
}

.school-erp .attachment-card,
.school-erp .learning-item {
    display: flex;
    align-items: center;
    gap: 13px;
    padding: 14px;
    border: 1px solid var(--erp-border);
    border-radius: 12px;
    color: var(--erp-ink);
    transition: border-color var(--erp-ease), background var(--erp-ease);
}

.school-erp .attachment-card:hover,
.school-erp .learning-item:hover {
    border-color: rgba(var(--erp-primary-rgb), 0.3);
    background: rgba(var(--erp-primary-rgb), 0.04);
}

.school-erp .attachment-card strong,
.school-erp .attachment-card span,
.school-erp .learning-item strong,
.school-erp .learning-item span {
    display: block;
}

.school-erp .attachment-card span,
.school-erp .learning-item span {
    margin-top: 3px;
    color: var(--erp-muted);
    font-size: 10px;
}

.school-erp .mini-timeline,
.school-erp .timeline-list {
    display: grid;
    gap: 0;
}

.school-erp .mini-timeline-item,
.school-erp .timeline-item {
    position: relative;
    display: flex;
    gap: 12px;
    padding-bottom: 18px;
}

.school-erp .mini-timeline-item:not(:last-child)::before,
.school-erp .timeline-item:not(:last-child)::before {
    position: absolute;
    top: 14px;
    bottom: 0;
    left: 5px;
    width: 1px;
    background: var(--erp-border);
    content: "";
}

.school-erp .mini-timeline-item > i {
    z-index: 1;
    margin-top: 2px;
    color: var(--erp-primary);
    font-size: 11px;
}

.school-erp .mini-timeline-item strong,
.school-erp .mini-timeline-item span {
    display: block;
}

.school-erp .mini-timeline-item strong {
    font-size: 11px;
}

.school-erp .mini-timeline-item span {
    margin-top: 2px;
    color: var(--erp-muted);
    font-size: 9px;
}

/* Student profile */
.school-erp .student-profile-hero {
    overflow: visible;
    border-top: 4px solid var(--erp-primary) !important;
    background:
        radial-gradient(circle at 96% 0, rgba(var(--erp-primary-rgb), 0.12), transparent 28%),
        var(--erp-surface);
}

.school-erp .profile-photo,
.school-erp .profile-avatar-lg {
    display: grid;
    width: 84px;
    height: 84px;
    flex: 0 0 84px;
    place-items: center;
    border: 4px solid var(--erp-surface);
    border-radius: 22px;
    background: linear-gradient(145deg, #5778e6, #2749bd);
    box-shadow: 0 10px 24px rgba(var(--erp-primary-rgb), 0.2);
    color: #fff;
    font-size: 25px;
    font-weight: 800;
    object-fit: cover;
}

.school-erp .profile-avatar-lg {
    border-radius: 50%;
}

.school-erp .profile-tabs .nav-link {
    padding: 15px 13px;
    border-bottom: 2px solid transparent;
    color: var(--erp-muted);
    font-size: 11px;
    font-weight: 650;
}

.school-erp .profile-tabs .nav-link.active {
    border-color: var(--erp-primary);
    color: var(--erp-primary);
}

.school-erp .section-title {
    margin-bottom: 14px;
    color: var(--erp-ink);
    font-size: 14px;
    font-weight: 750;
}

.school-erp .profile-details dt,
.school-erp .profile-details dd {
    padding-block: 9px;
    border-bottom: 1px solid var(--erp-border);
    font-size: 11px;
}

.school-erp .profile-details dt {
    color: var(--erp-muted);
    font-weight: 650;
}

.school-erp .contact-card {
    padding: 15px;
    border: 1px solid var(--erp-border);
    border-radius: 12px;
    background: var(--erp-surface-soft);
}

.school-erp .avatar-text,
.school-erp .avatar-sm,
.school-erp .avatar-md,
.school-erp .avatar-lg,
.school-erp .avatar-xl {
    display: inline-grid;
    flex: 0 0 auto;
    place-items: center;
    font-weight: 750;
}

.school-erp .avatar-sm { width: 32px; height: 32px; }
.school-erp .avatar-md { width: 40px; height: 40px; }
.school-erp .avatar-lg { width: 52px; height: 52px; }
.school-erp .avatar-xl { width: 68px; height: 68px; }

.school-erp .attendance-ring {
    display: grid;
    width: 76px;
    height: 76px;
    flex: 0 0 76px;
    place-items: center;
    border: 8px solid rgba(23, 166, 115, 0.16);
    border-top-color: var(--erp-success);
    border-radius: 50%;
    color: var(--erp-success);
    font-size: 13px;
}

.school-erp .timeline-dot {
    z-index: 1;
    width: 11px;
    height: 11px;
    flex: 0 0 11px;
    margin-top: 4px;
    border: 2px solid var(--erp-surface);
    border-radius: 50%;
    box-shadow: 0 0 0 2px var(--erp-border);
}

.school-erp .timeline-content {
    min-width: 0;
    flex: 1 1 auto;
    padding: 0 0 2px 2px;
}

/* Portals and AI */
.school-erp .portal-hero,
.school-erp .ai-hero {
    position: relative;
    overflow: hidden;
    isolation: isolate;
    background:
        radial-gradient(circle at 88% 12%, rgba(255, 255, 255, 0.19), transparent 27%),
        linear-gradient(125deg, #2446b7, #3156d3 55%, #677de0);
    color: #fff;
    box-shadow: 0 16px 38px rgba(36, 68, 179, 0.18);
}

.school-erp .portal-hero.student-theme {
    background: linear-gradient(125deg, #126b70, #168c8a 52%, #36a99e);
}

.school-erp .portal-hero.teacher-theme {
    background: linear-gradient(125deg, #42328f, #5f4bbb 52%, #7363ce);
}

.school-erp .ai-hero {
    background:
        radial-gradient(circle at 85% 13%, rgba(255, 255, 255, 0.2), transparent 26%),
        linear-gradient(125deg, #36256f, #4b3aa2 50%, #3156d3);
}

.school-erp .portal-hero::before,
.school-erp .ai-hero::before {
    top: -155px;
    right: -80px;
    width: 390px;
    height: 390px;
}

.school-erp .ai-spark {
    display: grid;
    width: 50px;
    height: 50px;
    place-items: center;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 15px;
    background: rgba(255, 255, 255, 0.12);
    color: #fff;
    font-size: 21px;
    backdrop-filter: blur(8px);
}

.school-erp .ai-orbit {
    position: relative;
    display: grid;
    width: 160px;
    height: 160px;
    margin-left: auto;
    place-items: center;
    border: 1px solid rgba(255, 255, 255, 0.22);
    border-radius: 50%;
    color: #fff;
    font-size: 38px;
}

.school-erp .ai-orbit::before {
    position: absolute;
    inset: 28px;
    border: 1px dashed rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    content: "";
}

.school-erp .ai-orbit span {
    position: absolute;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 0 18px rgba(255, 255, 255, 0.65);
}

.school-erp .ai-orbit span:first-child { top: 18px; left: 31px; }
.school-erp .ai-orbit span:nth-child(2) { right: 18px; bottom: 38px; width: 7px; height: 7px; }

.school-erp .ai-output {
    min-height: 270px;
    padding: 20px;
    border: 1px solid var(--erp-border);
    border-left: 4px solid var(--erp-primary);
    border-radius: 12px;
    background: var(--erp-surface-soft);
    color: var(--erp-ink);
    font-size: 12px;
    line-height: 1.75;
    white-space: normal;
}

.school-erp .portal-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

.school-erp .portal-actions a {
    display: flex;
    min-height: 88px;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 8px;
    padding: 12px;
    border: 1px solid var(--erp-border);
    border-radius: 12px;
    background: var(--erp-surface-soft);
    color: var(--erp-ink);
    text-align: center;
    transition: transform var(--erp-ease), border-color var(--erp-ease);
}

.school-erp .portal-actions a:hover {
    transform: translateY(-2px);
    border-color: rgba(var(--erp-primary-rgb), 0.3);
    color: var(--erp-primary);
}

.school-erp .portal-actions i {
    color: var(--erp-primary);
    font-size: 20px;
}

.school-erp .today-schedule {
    display: grid;
}

.school-erp .today-schedule > div {
    display: grid;
    grid-template-columns: 54px 13px minmax(0, 1fr);
    gap: 12px;
    align-items: start;
    padding: 12px 0;
}

.school-erp .today-schedule time {
    color: var(--erp-muted);
    font-size: 10px;
    font-weight: 700;
}

.school-erp .schedule-dot {
    position: relative;
    width: 10px;
    height: 10px;
    margin-top: 3px;
    border: 2px solid var(--erp-surface);
    border-radius: 50%;
    background: var(--erp-primary);
    box-shadow: 0 0 0 2px rgba(var(--erp-primary-rgb), 0.2);
}

.school-erp .today-schedule strong,
.school-erp .today-schedule small {
    display: block;
}

.school-erp .today-schedule small {
    margin-top: 3px;
    color: var(--erp-muted);
    font-size: 10px;
}

.school-erp .learning-item {
    min-height: 88px;
    border: 0;
    border-radius: 0;
}

.school-erp .subject-progress {
    margin-bottom: 16px;
}

.school-erp .subject-progress .progress {
    margin-top: 7px;
}

/* Attendance and timetable */
.school-erp .integration-list {
    display: grid;
    gap: 5px;
}

.school-erp .integration-list > div {
    display: grid;
    grid-template-columns: 32px minmax(0, 1fr) auto;
    gap: 9px;
    align-items: center;
    padding: 10px;
    border-radius: 10px;
    background: var(--erp-surface-soft);
}

.school-erp .integration-list i {
    display: grid;
    width: 30px;
    height: 30px;
    place-items: center;
    border-radius: 9px;
    background: rgba(var(--erp-primary-rgb), 0.08);
    color: var(--erp-primary);
}

.school-erp .integration-list span {
    color: var(--erp-ink);
    font-size: 11px;
    font-weight: 650;
}

.school-erp .integration-list small {
    color: var(--erp-muted);
    font-size: 9px;
}

.school-erp .timetable-wrap {
    overscroll-behavior-inline: contain;
}

.school-erp .timetable-grid {
    min-width: 980px;
    table-layout: fixed;
}

.school-erp .timetable-grid .period-column,
.school-erp .timetable-grid tbody th {
    width: 120px;
}

.school-erp .timetable-grid td,
.school-erp .timetable-grid th {
    padding: 9px;
    vertical-align: top;
}

.school-erp .lesson-card {
    position: relative;
    min-height: 90px;
    padding: 11px;
    overflow: hidden;
    border: 1px solid rgba(var(--erp-primary-rgb), 0.15);
    border-left: 3px solid var(--erp-primary);
    border-radius: 10px;
    background: linear-gradient(145deg, rgba(var(--erp-primary-rgb), 0.08), rgba(var(--erp-primary-rgb), 0.025));
}

.school-erp .lesson-subject {
    padding-right: 19px;
    color: var(--erp-ink);
    font-size: 10.5px;
    font-weight: 750;
}

.school-erp .lesson-meta {
    display: grid;
    gap: 3px;
    margin-top: 8px;
    color: var(--erp-muted);
    font-size: 8.5px;
}

.school-erp .lesson-meta span {
    display: flex;
    align-items: center;
    gap: 4px;
}

.school-erp .lesson-remove {
    position: absolute;
    top: 5px;
    right: 5px;
}

.school-erp .lesson-remove button,
.school-erp .empty-slot {
    border: 0;
    background: transparent;
    color: var(--erp-muted);
}

.school-erp .lesson-remove button {
    display: grid;
    width: 22px;
    height: 22px;
    place-items: center;
    border-radius: 7px;
}

.school-erp .lesson-remove button:hover {
    background: rgba(220, 76, 100, 0.1);
    color: var(--erp-danger);
}

.school-erp .empty-slot {
    display: grid;
    width: 100%;
    min-height: 90px;
    place-items: center;
    align-content: center;
    border: 1px dashed var(--erp-border);
    border-radius: 10px;
    font-size: 9px;
}

.school-erp .empty-slot:hover {
    border-color: rgba(var(--erp-primary-rgb), 0.35);
    background: rgba(var(--erp-primary-rgb), 0.04);
    color: var(--erp-primary);
}

.school-erp .timetable-break td,
.school-erp .timetable-break th {
    background: var(--erp-surface-soft);
}

.school-erp .break-label {
    display: grid;
    min-height: 34px;
    place-items: center;
    color: var(--erp-muted);
    font-size: 9px;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

/* Data-entry helpers */
.school-erp .mark-sheet,
.school-erp .workflow-summary,
.school-erp .security-note {
    border: 1px solid var(--erp-border);
    border-radius: 12px;
    background: var(--erp-surface-soft);
}

.school-erp .mark-input {
    width: 82px;
    min-height: 36px;
    text-align: right;
}

.school-erp .grade-preview {
    display: inline-grid;
    min-width: 38px;
    height: 30px;
    place-items: center;
    border-radius: 8px;
    background: rgba(var(--erp-primary-rgb), 0.08);
    color: var(--erp-primary);
    font-weight: 750;
}

.school-erp .form-switch-lg .form-check-input {
    width: 2.6rem;
    height: 1.35rem;
}

.school-erp .required::after {
    margin-left: 3px;
    color: var(--erp-danger);
    content: "*";
}

.school-erp .mw-700 { max-width: 700px; }
.school-erp .mw-300 { max-width: 300px; }
.school-erp .min-w-0 { min-width: 0; }
.school-erp .whitespace-nowrap { white-space: nowrap; }

@media (max-width: 767.98px) {
    .school-erp .dashboard-welcome,
    .school-erp .dashboard-welcome .card-body {
        min-height: 0;
    }

    .school-erp .dashboard-welcome .card-body,
    .school-erp .portal-hero .card-body,
    .school-erp .ai-hero .card-body,
    .school-erp .module-hero .card-body {
        padding: 25px !important;
    }

    .school-erp .dashboard-welcome h1,
    .school-erp .portal-hero h1,
    .school-erp .ai-hero h1 {
        font-size: 24px !important;
    }

    .school-erp .dashboard-chart {
        min-height: 240px;
    }

    .school-erp .record-detail-grid {
        grid-template-columns: 1fr;
    }

    .school-erp .portal-actions {
        grid-template-columns: 1fr 1fr;
    }

    .school-erp .profile-photo {
        width: 72px;
        height: 72px;
        flex-basis: 72px;
        border-radius: 19px;
    }

    .school-erp .module-stat {
        min-height: 88px;
    }
}

@media (max-width: 479.98px) {
    .school-erp .dashboard-welcome .btn {
        width: 100%;
    }

    .school-erp .portal-actions {
        grid-template-columns: 1fr;
    }

    .school-erp .record-detail-grid > div {
        padding: 12px;
    }

    .school-erp .today-schedule > div {
        grid-template-columns: 44px 11px minmax(0, 1fr);
        gap: 9px;
    }
}

/* Dark theme adjustments for Bootstrap/Duralux */
[data-erp-theme="dark"] .school-erp .modal-content,
[data-erp-theme="dark"] .school-erp .card,
[data-erp-theme="dark"] .school-erp .dropdown-menu {
    color: var(--erp-ink);
}

[data-erp-theme="dark"] .school-erp .btn-close {
    filter: invert(1) grayscale(100%) brightness(180%);
}

[data-erp-theme="dark"] .school-erp .alert-success,
[data-erp-theme="dark"] .school-erp .alert-info,
[data-erp-theme="dark"] .school-erp .alert-primary,
[data-erp-theme="dark"] .school-erp .alert-warning,
[data-erp-theme="dark"] .school-erp .alert-danger {
    color: var(--erp-ink);
}

[data-erp-theme="dark"] .school-erp .form-control::placeholder {
    color: #7f8ea4;
}

[data-erp-theme="dark"] .school-erp .text-dark {
    color: var(--erp-ink) !important;
}

[data-erp-theme="dark"] .school-erp .bg-white,
[data-erp-theme="dark"] .school-erp .bg-light {
    background-color: var(--erp-surface) !important;
}

/* Responsive */
@media (max-width: 1399.98px) {
    .erp-header {
        gap: 12px;
        padding-inline: 18px;
    }

    .erp-header-page {
        display: none;
    }

    .erp-header-left {
        min-width: 40px;
    }

    .erp-search-trigger > span,
    .erp-search-trigger kbd,
    .erp-user-copy {
        display: none;
    }

    .erp-search-trigger {
        width: 40px;
        justify-content: center;
        padding: 0;
    }
}

@media (max-width: 1199.98px) {
    html[data-erp-sidebar="collapsed"] .erp-sidebar,
    .erp-sidebar {
        width: min(var(--erp-sidebar-width), calc(100vw - 48px));
        transform: translateX(-105%);
    }

    html[data-erp-sidebar="collapsed"] .erp-brand-copy,
    html[data-erp-sidebar="collapsed"] .erp-sidebar-search input,
    html[data-erp-sidebar="collapsed"] .erp-sidebar-search kbd,
    html[data-erp-sidebar="collapsed"] .erp-nav-caption,
    html[data-erp-sidebar="collapsed"] .erp-nav-text,
    html[data-erp-sidebar="collapsed"] .erp-nav-chevron,
    html[data-erp-sidebar="collapsed"] .erp-system-indicator > span:last-child {
        display: initial;
    }

    html[data-erp-sidebar="collapsed"] .erp-sidebar-brand {
        justify-content: space-between;
        padding-inline: 18px;
    }

    html[data-erp-sidebar="collapsed"] .erp-sidebar-search {
        width: auto;
        margin-inline: 16px;
        justify-content: flex-start;
        padding: 0 10px;
    }

    html[data-erp-sidebar="collapsed"] .erp-nav-link {
        justify-content: flex-start;
        padding-inline: 10px;
    }

    html[data-erp-sidebar="collapsed"] .erp-nav-submenu:not([hidden]) {
        display: block;
    }

    html[data-erp-sidebar="collapsed"] .erp-sidebar-footer {
        justify-content: space-between;
    }

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

    body.erp-sidebar-open .erp-sidebar-backdrop {
        display: block;
        opacity: 1;
    }

    .erp-sidebar-close {
        display: inline-grid;
    }

    .erp-sidebar-collapse {
        display: none;
    }

    html[data-erp-sidebar="collapsed"] .erp-header,
    .erp-header {
        left: 0;
    }

    html[data-erp-sidebar="collapsed"] .erp-main,
    .erp-main {
        margin-left: 0;
    }

    .erp-menu-toggle {
        display: inline-grid;
    }
}

@media (max-width: 991.98px) {
    .erp-context-toggle {
        display: inline-grid;
    }

    .erp-context-form {
        position: absolute;
        top: calc(100% + 8px);
        right: 14px;
        left: 14px;
        display: none;
        width: auto;
        max-width: none;
        height: auto;
        min-height: 56px;
        padding: 7px;
        background: var(--erp-surface);
        box-shadow: var(--erp-shadow);
    }

    body.erp-context-open .erp-context-form {
        display: flex;
    }

    .erp-header-actions {
        flex: 1 1 auto;
    }

    .erp-header-actions .erp-context-toggle {
        margin-left: auto;
    }

    .erp-auth-shell {
        grid-template-columns: minmax(320px, 42%) 1fr;
    }

    .erp-auth-showcase {
        padding: 34px;
    }

    .erp-auth-pitch h1 {
        font-size: 38px;
    }

    .erp-auth-capabilities {
        grid-template-columns: 1fr;
    }

    .erp-auth-capabilities > div {
        min-height: 0;
    }
}

@media (max-width: 767.98px) {
    :root {
        --erp-header-height: 66px;
    }

    .erp-header {
        gap: 8px;
        padding-inline: 12px;
    }

    .erp-header-actions {
        gap: 5px;
    }

    .erp-header-actions .erp-icon-button,
    .erp-search-trigger {
        width: 37px;
        height: 37px;
        flex-basis: 37px;
    }

    .erp-user-trigger {
        width: 39px;
        height: 39px;
        padding: 2px;
    }

    .erp-user-trigger > i {
        display: none;
    }

    .erp-avatar {
        width: 34px;
        height: 34px;
        flex-basis: 34px;
    }

    .erp-content {
        padding: 19px 16px 30px;
    }

    .erp-page-heading {
        min-height: 44px;
        align-items: flex-start;
        flex-direction: column;
        margin-bottom: 16px;
    }

    .erp-page-actions {
        width: 100%;
        overflow-x: auto;
        padding-bottom: 2px;
    }

    .erp-footer {
        padding-inline: 16px;
    }

    .erp-footer-status {
        display: none;
    }

    .erp-context-form {
        align-items: stretch;
        flex-direction: column;
        gap: 2px;
        padding: 10px;
    }

    .erp-context-field,
    .erp-context-field.erp-context-school {
        width: 100%;
        min-height: 36px;
        flex: 0 0 auto;
    }

    .erp-context-divider {
        width: 100%;
        height: 1px;
    }

    .erp-auth-shell {
        display: block;
    }

    .erp-auth-showcase {
        display: none;
    }

    .erp-auth-panel {
        min-height: 100vh;
        padding: 26px 22px;
    }

    .erp-auth-mobile-brand {
        display: flex;
    }

    .erp-auth-content .auth-brand {
        display: none;
    }
}

@media (max-width: 479.98px) {
    .erp-header-actions > [data-theme-toggle] {
        display: none;
    }

    .erp-search-hint {
        align-items: flex-start;
        flex-direction: column;
    }

    .erp-global-search-field {
        height: 52px;
    }

    .erp-global-search-field kbd {
        display: none;
    }

    .erp-auth-panel {
        align-items: flex-start;
        padding-top: 36px;
    }

    .erp-auth-footer {
        align-items: flex-start;
        flex-direction: column;
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        scroll-behavior: auto !important;
        transition-duration: 0.01ms !important;
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
    }
}

@media print {
    .erp-sidebar,
    .erp-header,
    .erp-sidebar-backdrop,
    .erp-footer,
    .erp-page-actions {
        display: none !important;
    }

    .erp-main {
        margin: 0 !important;
        padding: 0 !important;
    }

    .erp-content {
        max-width: none;
        padding: 0;
    }

    body.school-erp {
        background: #fff;
        color: #000;
    }

    .school-erp .card {
        break-inside: avoid;
        box-shadow: none;
    }
}
