:root {
    --blue: #330066;
    --blue-dark: #240047;
    --accent-blue: #1d7ed0;
    --accent-mint: #169b79;
    --accent-gold: #b98212;
    --accent-rose: #b44174;
    --ink: #13283d;
    --muted: #607386;
    --line: #d6dee8;
    --bg: #eef2f6;
    --soft: #e7eef6;
    --card: #ffffff;
}

* {
    box-sizing: border-box;
}

body {
    background: var(--bg);
    color: var(--ink);
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    margin: 0;
}

body.dialog-open {
    overflow: hidden;
}

a {
    color: inherit;
    text-decoration: none;
}

.login-page {
    align-items: center;
    display: flex;
    min-height: 100vh;
    justify-content: center;
    padding: 20px;
}

.public-landing {
    background: #eef2f6;
    min-height: 100vh;
    padding: 24px;
}

.public-topbar {
    align-items: center;
    display: flex;
    justify-content: space-between;
    margin: 0 auto 18px;
    max-width: 1180px;
}

.public-topbar nav {
    align-items: center;
    display: flex;
    gap: 10px;
}

.public-topbar strong {
    color: #102f45;
    font-size: 22px;
}

.public-topbar nav a,
.public-topbar nav button {
    background: #102f45;
    border: 0;
    border-radius: 8px;
    color: #ffffff;
    cursor: pointer;
    font-family: inherit;
    font-weight: 800;
    min-height: 40px;
    padding: 9px 14px;
}

.public-topbar .ghost-link,
.public-topbar nav button {
    background: #ffffff;
    border: 1px solid var(--line);
    color: #102f45;
}

.public-footer {
    background: #ffffff;
    border: 1px solid var(--line);
    border-radius: 8px;
    display: grid;
    gap: 12px;
    margin: 18px auto 0;
    max-width: 1180px;
    padding: 18px;
    text-align: center;
}

.public-footer nav {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
}

.public-footer a {
    background: #f8fafc;
    border: 1px solid var(--line);
    border-radius: 8px;
    color: #102f45;
    font-weight: 800;
    min-height: 38px;
    padding: 8px 12px;
}

.public-footer p {
    color: var(--muted);
    font-size: 14px;
    font-weight: 650;
    margin: 0;
}

.public-hero {
    align-items: center;
    background: #102f45;
    border: 1px solid #102f45;
    border-radius: 8px;
    box-shadow: 0 18px 48px rgba(16, 47, 69, 0.16);
    display: grid;
    gap: 24px;
    grid-template-columns: 1.2fr 0.8fr;
    margin: 0 auto;
    max-width: 1180px;
    min-height: 420px;
    overflow: hidden;
    padding: 42px;
}

.compact-hero {
    min-height: 360px;
}

.public-hero span {
    background: rgba(255, 255, 255, 0.12);
    border-radius: 999px;
    color: #ffffff;
    display: inline-flex;
    font-weight: 800;
    margin-bottom: 14px;
    padding: 8px 14px;
}

.public-page-head {
    background: #ffffff;
    border: 1px solid var(--line);
    border-radius: 8px;
    box-shadow: 0 18px 48px rgba(16, 47, 69, 0.08);
    margin: 0 auto;
    max-width: 1180px;
    padding: 34px;
}

.public-page-head > span {
    background: #e7eef6;
    border-radius: 999px;
    color: #102f45;
    display: inline-flex;
    font-weight: 800;
    padding: 8px 14px;
}

.public-page-head h1 {
    color: #102f45;
    font-size: 36px;
    line-height: 1.12;
    margin: 16px 0 12px;
    max-width: 820px;
}

.public-page-head p {
    color: var(--muted);
    font-size: 18px;
    line-height: 1.5;
    max-width: 820px;
}

.public-hero h1 {
    color: #ffffff;
    font-size: 42px;
    line-height: 1.1;
    margin: 0 0 14px;
    max-width: 760px;
}

.public-hero p {
    color: rgba(255, 255, 255, 0.78);
    font-size: 19px;
    line-height: 1.5;
    max-width: 760px;
}

.public-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 20px;
}

.public-actions a,
.public-feature-grid article {
    border-radius: 8px;
}

.public-actions a {
    background: #287f86;
    color: #ffffff;
    font-weight: 800;
    min-height: 44px;
    padding: 11px 16px;
}

.public-actions a + a {
    background: #ffffff;
    color: #102f45;
}

.public-notice {
    border-radius: 8px;
    font-weight: 750;
    margin: 0 auto 18px;
    max-width: 1180px;
    padding: 12px 14px;
}

.public-notice.success {
    background: #ecfdf3;
    border: 1px solid #abefc6;
    color: #067647;
}

.public-notice.error {
    background: #fff1f0;
    border: 1px solid #ffc9c4;
    color: #b42318;
}

.public-feature-grid,
.public-role-grid,
.public-short-grid {
    display: grid;
    gap: 12px;
    margin: 18px auto 0;
    max-width: 1180px;
}

.public-short-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.public-short-grid article {
    background: #ffffff;
    border: 1px solid var(--line);
    border-radius: 8px;
    display: grid;
    gap: 8px;
    overflow: hidden;
    padding: 18px;
    position: relative;
}

.public-short-grid article::before {
    content: "";
    height: 4px;
    left: 0;
    position: absolute;
    right: 0;
    top: 0;
}

.public-short-grid article:nth-child(1) {
    background: #ffffff;
}

.public-short-grid article:nth-child(1)::before {
    background: #102f45;
}

.public-short-grid article:nth-child(2) {
    background: #ffffff;
}

.public-short-grid article:nth-child(2)::before {
    background: var(--accent-blue);
}

.public-short-grid article:nth-child(3) {
    background: #ffffff;
}

.public-short-grid article:nth-child(3)::before {
    background: var(--accent-mint);
}

.public-short-grid i {
    align-items: center;
    border-radius: 8px;
    display: inline-flex;
    font-size: 12px;
    font-style: normal;
    font-weight: 900;
    height: 38px;
    justify-content: center;
    width: 38px;
}

.public-short-grid i::before {
    content: attr(data-icon);
}

.public-short-grid article:nth-child(1) i {
    background: #102f45;
    color: #ffffff;
}

.public-short-grid article:nth-child(2) i {
    background: #1d7ed0;
    color: #ffffff;
}

.public-short-grid article:nth-child(3) i {
    background: #287f86;
    color: #ffffff;
}

.public-short-grid span {
    color: var(--muted);
}

.public-feature-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.feature-page-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.public-role-grid {
    align-items: start;
    background: #ffffff;
    border: 1px solid var(--line);
    border-radius: 8px;
    grid-template-columns: minmax(320px, 0.9fr) minmax(420px, 1.1fr);
    padding: 22px;
}

.public-feature-grid article {
    border: 1px solid var(--line);
    display: grid;
    gap: 8px;
    overflow: hidden;
    padding: 18px;
    position: relative;
}

.public-feature-grid article::before {
    content: "";
    height: 4px;
    left: 0;
    position: absolute;
    right: 0;
    top: 0;
}

.public-feature-grid article:nth-child(4n + 1) {
    background: #ffffff;
}

.public-feature-grid article:nth-child(4n + 1)::before {
    background: #102f45;
}

.public-feature-grid article:nth-child(4n + 2) {
    background: #ffffff;
}

.public-feature-grid article:nth-child(4n + 2)::before {
    background: var(--accent-blue);
}

.public-feature-grid article:nth-child(4n + 3) {
    background: #ffffff;
}

.public-feature-grid article:nth-child(4n + 3)::before {
    background: var(--accent-mint);
}

.public-feature-grid article:nth-child(4n) {
    background: #ffffff;
}

.public-feature-grid article:nth-child(4n)::before {
    background: var(--accent-gold);
}

.public-feature-grid i,
.role-matrix i {
    align-items: center;
    border-radius: 8px;
    display: inline-flex;
    font-size: 12px;
    font-style: normal;
    font-weight: 900;
    height: 38px;
    justify-content: center;
    width: 38px;
}

.public-feature-grid i::before {
    content: attr(data-icon);
}

.public-feature-grid article:nth-child(4n + 1) i {
    background: #102f45;
    color: #ffffff;
}

.public-feature-grid article:nth-child(4n + 2) i {
    background: #1d7ed0;
    color: #ffffff;
}

.public-feature-grid article:nth-child(4n + 3) i {
    background: #287f86;
    color: #ffffff;
}

.public-feature-grid article:nth-child(4n) i {
    background: #7a4f07;
    color: #ffffff;
}

.public-feature-grid span {
    color: var(--muted);
}

.public-role-grid > div > span {
    background: var(--soft);
    border-radius: 999px;
    color: var(--blue);
    display: inline-flex;
    font-weight: 800;
    padding: 7px 12px;
}

.public-role-grid h2 {
    color: var(--blue);
    font-size: 30px;
    line-height: 1.15;
    margin: 14px 0 10px;
}

.public-role-grid p {
    color: var(--muted);
    font-size: 17px;
    line-height: 1.5;
}

.role-highlights {
    display: grid;
    gap: 10px;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    margin-top: 22px;
}

.role-highlights article {
    background: #ffffff;
    border: 1px solid var(--line);
    border-radius: 8px;
    display: grid;
    gap: 4px;
    min-height: 88px;
    padding: 12px;
}

.role-highlights strong {
    color: var(--blue);
    font-size: 24px;
}

.role-highlights small {
    color: var(--muted);
    font-weight: 750;
}

.role-flow {
    display: grid;
    gap: 9px;
    margin-top: 12px;
}

.role-flow span {
    background: #ffffff;
    border: 1px solid var(--line);
    border-radius: 8px;
    color: var(--ink);
    font-weight: 850;
    padding: 11px 12px;
}

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

.role-matrix article {
    border: 1px solid var(--line);
    border-radius: 8px;
    display: flex;
    gap: 12px;
    padding: 12px;
}

.role-matrix article:nth-child(4n + 1) {
    background: #ffffff;
}

.role-matrix article:nth-child(4n + 2) {
    background: #f5f9ff;
}

.role-matrix article:nth-child(4n + 3) {
    background: #f3fbf8;
}

.role-matrix article:nth-child(4n) {
    background: #fffaf0;
}

.role-matrix i {
    background: var(--soft);
    color: var(--blue);
    flex: 0 0 auto;
    margin-top: 2px;
}

.role-icon-matrix i {
    height: 44px;
    max-height: 44px;
    max-width: 44px;
    min-height: 44px;
    min-width: 44px;
    overflow: hidden;
    padding: 8px;
    width: 44px;
}

.role-icon-matrix svg {
    display: block;
    fill: none !important;
    height: 22px !important;
    max-height: 22px;
    max-width: 22px;
    min-height: 22px;
    min-width: 22px;
    stroke: currentColor !important;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 1.8;
    width: 22px !important;
}

.role-icon-matrix svg * {
    fill: none !important;
    stroke: currentColor !important;
    vector-effect: non-scaling-stroke;
}

.role-page-grid {
    margin-top: 18px;
}

.role-matrix article:nth-child(4n + 2) i {
    background: #dcecff;
    color: #10538f;
}

.role-matrix article:nth-child(4n + 3) i {
    background: #d7f3ea;
    color: #09664e;
}

.role-matrix article:nth-child(4n) i {
    background: #ffedc2;
    color: #7a4f07;
}

.role-matrix div {
    display: grid;
    gap: 4px;
}

.role-matrix span,
.muted {
    color: var(--muted);
}

.public-preview {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 8px;
    padding: 18px;
}

.public-slideshow {
    display: grid;
    min-height: 330px;
    overflow: hidden;
    position: relative;
}

.public-slideshow .slide {
    background: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 8px;
    box-shadow: 0 16px 34px rgba(0, 0, 0, 0.18);
    display: block;
    inset: 18px;
    opacity: 0;
    padding: 14px;
    pointer-events: none;
    position: absolute;
    transform: translateX(18px);
    transition: opacity 450ms ease, transform 450ms ease;
}

.public-slideshow .slide.active {
    opacity: 1;
    pointer-events: auto;
    transform: translateX(0);
}

.public-slideshow svg {
    background: #f8fafc;
    border-radius: 8px;
    display: block;
    height: auto;
    width: 100%;
}

.public-slideshow .info-card {
    height: 100%;
    min-height: 260px;
}

.public-slideshow svg rect:first-child {
    fill: #f8fafc;
}

.public-slideshow svg rect:not(:first-child) {
    fill: #ffffff;
    stroke: var(--line);
    stroke-width: 2;
}

.public-slideshow svg path {
    fill: none;
    stroke: #102f45;
    stroke-linecap: round;
    stroke-width: 7;
}

.public-slideshow .slide:nth-child(2) svg rect:not(:first-child) {
    fill: #f5f9ff;
}

.public-slideshow .slide:nth-child(2) svg path {
    stroke: var(--accent-blue);
}

.public-slideshow .slide:nth-child(3) svg rect:not(:first-child) {
    fill: #f3fbf8;
}

.public-slideshow .slide:nth-child(3) svg path {
    stroke: var(--accent-mint);
}

.public-slideshow .slide strong {
    color: var(--blue);
    display: block;
    font-size: 18px;
    margin-bottom: 4px;
}

.public-slideshow .slide span {
    color: var(--muted);
}

.public-slideshow .info-card {
    background: transparent;
}

.public-slideshow .info-card .info-bg {
    fill: #f8fafc;
    stroke: none;
}

.public-slideshow .info-card text {
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.public-slideshow .info-title {
    fill: #102f45;
    font-size: 24px;
    font-weight: 900;
}

.public-slideshow .info-subtitle,
.public-slideshow .info-label {
    fill: var(--muted);
    font-size: 13px;
    font-weight: 750;
}

.public-slideshow .info-label.left {
    text-anchor: start;
}

.public-slideshow .info-code {
    fill: #ffffff;
    font-size: 14px;
    font-weight: 900;
}

.public-slideshow .info-money {
    fill: #102f45;
    font-size: 54px;
    font-weight: 900;
}

.public-slideshow .info-line {
    fill: none;
    stroke: #b8c6d3;
    stroke-linecap: round;
    stroke-width: 7;
}

.public-slideshow .info-node,
.public-slideshow .info-seal {
    fill: #102f45;
    stroke: none;
}

.public-slideshow .info-node.alt {
    fill: var(--accent-blue);
}

.public-slideshow .info-pill {
    fill: #e7eef6;
    stroke: none;
}

.public-slideshow .info-pill-text {
    fill: #102f45;
    font-size: 12px;
    font-weight: 850;
}

.public-slideshow .info-panel,
.public-slideshow .info-row,
.public-slideshow .info-tile,
.public-slideshow .info-sheet {
    fill: #ffffff;
    stroke: var(--line);
    stroke-width: 2;
}

.public-slideshow .info-row,
.public-slideshow .info-tile {
    fill: #f7f9ff;
}

.public-slideshow .info-sheet.back {
    fill: #f3fbf8;
}

.public-slideshow .info-mark {
    fill: none;
    stroke: var(--blue);
    stroke-linecap: round;
    stroke-width: 7;
}

.public-slideshow .fees-card .info-bg,
.public-slideshow .fees-card .info-row {
    fill: #eef6fb;
}

.public-slideshow .fees-card .info-money,
.public-slideshow .fees-card .info-title {
    fill: var(--accent-blue);
}

.public-slideshow .academics-card .info-bg,
.public-slideshow .academics-card .info-tile {
    fill: #eef8f7;
}

.public-slideshow .academics-card .info-title {
    fill: var(--accent-mint);
}

.public-slideshow .academics-card .info-line {
    stroke: #9edccb;
}

.public-slideshow .reports-card .info-bg {
    fill: #fbf6ea;
}

.public-slideshow .reports-card .info-title {
    fill: var(--accent-gold);
}

.public-slideshow .reports-card .info-seal {
    fill: var(--accent-gold);
}

.public-slideshow .rfid-card .info-bg {
    fill: #eef6fb;
}

.public-slideshow .rfid-card .info-title {
    fill: var(--accent-blue);
}

.public-slideshow .rfid-card-body {
    fill: #ffffff;
    stroke: var(--line);
    stroke-width: 2;
}

.public-slideshow .rfid-chip {
    fill: var(--accent-blue);
    stroke: none;
}

.public-slideshow .rfid-wave {
    fill: none;
    stroke: var(--accent-blue);
    stroke-linecap: round;
    stroke-width: 6;
}

.public-slideshow .rfid-card .info-line {
    stroke: #b7d8f7;
}

.public-slideshow .rfid-card .info-row {
    fill: #ffffff;
}

.slide-dots {
    bottom: 12px;
    display: flex;
    gap: 7px;
    justify-content: center;
    left: 0;
    position: absolute;
    right: 0;
}

.slide-dots span {
    background: rgba(51, 0, 102, 0.25);
    border-radius: 999px;
    height: 8px;
    width: 8px;
}

.slide-dots span.active {
    background: var(--blue);
    width: 18px;
}

.preview-window {
    background: #ffffff;
    border: 1px solid var(--line);
    border-radius: 8px;
    box-shadow: 0 16px 34px rgba(51, 0, 102, 0.13);
    display: grid;
    gap: 14px;
    padding: 18px;
}

.preview-row {
    background: var(--blue);
    border-radius: 8px;
    height: 54px;
}

.preview-cards,
.preview-kpis {
    display: grid;
    gap: 10px;
    grid-template-columns: repeat(3, 1fr);
}

.preview-cards span,
.preview-kpis span,
.preview-list span {
    background: #f3f0ff;
    border-radius: 8px;
    min-height: 72px;
}

.preview-kpis span {
    display: grid;
    gap: 4px;
    min-height: 86px;
    padding: 14px;
}

.preview-kpis strong {
    color: var(--blue);
    font-size: 26px;
}

.preview-kpis small {
    color: var(--muted);
    font-weight: 750;
}

.preview-list {
    display: grid;
    gap: 9px;
}

.preview-menu {
    display: grid;
    gap: 9px;
    grid-template-columns: repeat(2, 1fr);
}

.preview-menu span {
    background: #f3f0ff;
    border-radius: 8px;
    color: var(--ink);
    font-weight: 800;
    min-height: 38px;
    padding: 10px 12px;
}

.preview-list span {
    min-height: 34px;
}

.contact-modal {
    align-items: center;
    background: rgba(19, 40, 61, 0.48);
    display: none;
    inset: 0;
    justify-content: center;
    padding: 18px;
    position: fixed;
    z-index: 50;
}

.contact-modal.open {
    display: flex;
}

.contact-dialog {
    background: #ffffff;
    border: 1px solid var(--line);
    border-radius: 8px;
    box-shadow: 0 24px 70px rgba(19, 40, 61, 0.24);
    max-width: 440px;
    padding: 24px;
    position: relative;
    width: 100%;
}

.contact-dialog > span {
    background: var(--soft);
    border-radius: 999px;
    color: var(--blue);
    display: inline-flex;
    font-weight: 800;
    padding: 7px 12px;
}

.contact-dialog h2 {
    color: var(--blue);
    margin: 14px 0 18px;
}

.contact-dialog form {
    display: grid;
    gap: 13px;
}

.modal-close {
    align-items: center;
    background: #f8f6ff;
    border: 1px solid var(--line);
    border-radius: 999px;
    color: var(--blue);
    display: inline-flex;
    font-size: 16px;
    height: 34px;
    justify-content: center;
    min-height: 34px;
    padding: 0;
    position: absolute;
    right: 14px;
    top: 14px;
    width: 34px;
}

.login-card {
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: 8px;
    box-shadow: 0 14px 40px rgba(19, 40, 61, 0.08);
    max-width: 430px;
    padding: 26px;
    width: 100%;
}

.login-brand span,
.content-card span,
.welcome-card span,
.stat-grid span,
.topbar span {
    color: var(--muted);
    font-size: 13px;
    font-weight: 750;
}

.login-brand h1,
.welcome-card h1,
.content-card h1,
.topbar h2 {
    margin: 6px 0 8px;
}

.login-brand p,
.welcome-card p,
.content-card p,
.module-grid span,
.empty-state p {
    color: var(--muted);
}

.login-card form {
    display: grid;
    gap: 13px;
    margin-top: 20px;
}

.login-remember {
    align-items: center;
    color: var(--muted);
    display: flex;
    font-size: 14px;
    font-weight: 750;
    gap: 8px;
}

.login-remember input {
    width: auto;
}

.password-field {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
}

.password-field input {
    border-radius: 8px 0 0 8px;
    min-width: 0;
}

.password-field .password-toggle {
    background: #f2f6fb;
    border: 1px solid var(--line);
    border-left: 0;
    border-radius: 0 8px 8px 0;
    color: var(--blue);
    font-weight: 800;
    min-width: 72px;
    padding: 0 14px;
}

label {
    color: var(--ink);
    display: grid;
    font-weight: 700;
    gap: 6px;
}

input,
select,
textarea,
button {
    border-radius: 8px;
    min-height: 44px;
}

input,
select,
textarea {
    border: 1px solid #c8d8e7;
    padding: 9px 11px;
    width: 100%;
}

button,
.welcome-card a,
.module-grid a {
    cursor: pointer;
}

button,
.welcome-card a {
    background: var(--blue);
    border: 0;
    color: #ffffff;
    font-weight: 800;
    padding: 10px 14px;
}

.alert {
    background: #fff1f0;
    border: 1px solid #ffc9c4;
    border-radius: 8px;
    color: #b42318;
    padding: 10px;
}

.app-shell {
    display: grid;
    grid-template-columns: 270px 1fr;
    min-height: 100vh;
}

.mobile-menu-toggle,
.mobile-menu-backdrop {
    display: none;
}

.mobile-menu-toggle span,
.mobile-menu-toggle span::before,
.mobile-menu-toggle span::after {
    background: currentColor;
    border-radius: 999px;
    content: "";
    display: block;
    height: 2px;
    width: 18px;
}

.mobile-menu-toggle span {
    position: relative;
}

.mobile-menu-toggle span::before,
.mobile-menu-toggle span::after {
    left: 0;
    position: absolute;
}

.mobile-menu-toggle span::before {
    top: -6px;
}

.mobile-menu-toggle span::after {
    top: 6px;
}

.sidebar {
    background: #ffffff;
    border-right: 1px solid var(--line);
    box-shadow: 8px 0 24px rgba(16, 47, 69, 0.04);
    padding: 18px 14px;
}

.brand {
    border-bottom: 1px solid var(--line);
    align-items: center;
    display: flex;
    gap: 10px;
    padding: 0 4px 18px;
}

.brand strong {
    font-size: 20px;
}

.brand-mark {
    align-items: center;
    background: #eef4f8;
    border-radius: 8px;
    color: var(--blue);
    display: flex;
    flex: 0 0 auto;
    font-weight: 900;
    height: 60px;
    justify-content: center;
    overflow: hidden;
    width: 60px;
}

.brand-mark img {
    height: 100%;
    object-fit: cover;
    width: 100%;
}

.brand span,
.sidebar nav p {
    color: var(--muted);
}

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

.sidebar nav p,
.menu-group summary {
    border-radius: 8px;
    cursor: pointer;
    font-size: 12px;
    font-weight: 650;
    letter-spacing: 0;
    margin: 10px 0 4px;
    padding: 9px 11px;
    text-transform: uppercase;
}

.menu-group {
    border-radius: 8px;
    display: grid;
    gap: 3px;
}

.menu-group summary {
    align-items: center;
    background: transparent;
    border: 1px solid transparent;
    color: #102f45;
    display: flex;
    justify-content: space-between;
    list-style: none;
}

.menu-group summary::-webkit-details-marker {
    display: none;
}

.menu-group summary::after {
    content: "+";
    color: #287f86;
    font-size: 16px;
    line-height: 1;
}

.menu-group[open] summary::after {
    content: "-";
}

.sidebar nav a {
    border-radius: 8px;
    border: 1px solid transparent;
    color: #253b4d;
    display: block;
    font-weight: 500;
    line-height: 1.25;
    padding: 9px 12px;
}

.menu-group a {
    margin-left: 10px;
}

.sidebar nav a:hover {
    background: #eef6f7;
    border-color: #d5e7ea;
    color: #102f45;
}

.sidebar nav a.is-active {
    background: #edf7f8;
    border-color: #cfe7ea;
    color: #102f45 !important;
    font-weight: 600;
}

.menu-subgroup {
    border-radius: 8px;
    display: grid;
    gap: 2px;
    margin-left: 8px;
}

.menu-subgroup summary {
    align-items: center;
    background: #e8f6f7;
    border: 1px solid #cfe7ea;
    border-left: 3px solid #287f86;
    border-radius: 8px;
    color: #102f45;
    cursor: pointer;
    display: flex;
    font-size: 13px;
    font-weight: 700;
    justify-content: space-between;
    list-style: none;
    padding: 9px 10px;
}

.menu-subgroup summary::-webkit-details-marker {
    display: none;
}

.menu-subgroup summary::after {
    background: #ffffff;
    border: 1px solid #bddde1;
    border-radius: 999px;
    color: #287f86;
    content: "More +";
    font-size: 11px;
    font-weight: 800;
    padding: 3px 7px;
}

.menu-subgroup[open] summary::after {
    content: "Less -";
}

.menu-subgroup a {
    font-size: 13px;
    margin-left: 14px;
    padding: 8px 10px;
}

.menu-dashboard {
    background: #edf7f8;
    border-color: #cfe7ea !important;
    color: #102f45 !important;
    font-weight: 600 !important;
}

.menu-calendar {
    border-left: 3px solid #b44174 !important;
}

.sidebar nav p.setup,
.menu-group.setup summary {
    background: #f8fafc;
    color: #102f45;
}

.menu-setup {
    border-left: 2px solid #6b7280 !important;
}

.sidebar nav p.academics,
.menu-group.academics summary {
    background: #f8fafc;
    color: #102f45;
}

.menu-academics {
    border-left: 2px solid #287f86 !important;
}

.sidebar nav p.finance,
.menu-group.finance summary {
    background: #f8fafc;
    color: #102f45;
}

.menu-finance {
    border-left: 2px solid #1d7ed0 !important;
}

.sidebar nav p.reports,
.menu-group.reports summary {
    background: #f8fafc;
    color: #102f45;
}

.menu-reports {
    border-left: 2px solid #7a4f07 !important;
}

.app-main {
    padding: 18px;
}

.topbar,
.welcome-card {
    align-items: center;
    display: flex;
    justify-content: space-between;
    gap: 16px;
}

.topbar {
    background: #102f45;
    border: 1px solid #102f45;
    border-radius: 8px;
    box-shadow: 0 10px 24px rgba(16, 47, 69, 0.18);
    color: #ffffff;
    margin-bottom: 16px;
    padding: 16px;
}

.topbar-meta {
    color: rgba(255, 255, 255, 0.78);
    display: grid;
    gap: 2px;
    margin-left: auto;
    text-align: right;
}

.topbar-meta strong {
    color: #ffffff;
}

.topbar span,
.topbar h2 {
    color: #ffffff;
}

.topbar-shortcuts {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: flex-end;
}

.topbar-shortcuts a {
    background: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.28);
    border-radius: 8px;
    color: var(--blue);
    font-size: 13px;
    font-weight: 850;
    min-height: 36px;
    padding: 8px 10px;
}

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

.topbar-actions a,
.topbar-actions button {
    background: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.28);
    border-radius: 8px;
    color: var(--blue);
    cursor: pointer;
    font-size: 13px;
    font-weight: 850;
    min-height: 36px;
    padding: 8px 12px;
}

.page-bottom-actions {
    display: flex;
    gap: 8px;
    justify-content: flex-end;
    margin-top: 14px;
}

.page-bottom-actions a,
.page-bottom-actions button {
    background: #ffffff;
    border: 1px solid var(--line);
    border-radius: 8px;
    color: var(--blue);
    cursor: pointer;
    font-size: 12px;
    font-weight: 850;
    min-height: 32px;
    padding: 6px 10px;
}

.login-page-actions {
    display: flex;
    gap: 8px;
    left: 16px;
    position: fixed;
    top: 16px;
    z-index: 5;
}

.login-page-actions a,
.login-page-actions button {
    background: #ffffff;
    border: 1px solid var(--line);
    border-radius: 8px;
    color: var(--blue);
    cursor: pointer;
    font-size: 13px;
    font-weight: 850;
    min-height: 36px;
    padding: 8px 12px;
}

.topbar form button {
    background: #287f86;
    color: #ffffff;
}

.erp-dialog-backdrop {
    align-items: center;
    background: rgba(16, 47, 69, 0.45);
    display: flex;
    inset: 0;
    justify-content: center;
    padding: 18px;
    position: fixed;
    z-index: 80;
}

.erp-dialog-backdrop[hidden] {
    display: none;
}

.erp-dialog {
    background: #ffffff;
    border: 1px solid #cfe1ee;
    border-radius: 8px;
    box-shadow: 0 24px 70px rgba(16, 47, 69, 0.24);
    max-width: 420px;
    padding: 24px;
    width: min(100%, 420px);
}

.erp-dialog > span {
    background: #e8f6f7;
    border-radius: 999px;
    color: #287f86;
    display: inline-flex;
    font-size: 12px;
    font-weight: 800;
    padding: 6px 10px;
}

.erp-dialog h2 {
    color: var(--ink);
    font-size: 24px;
    margin: 14px 0 8px;
}

.erp-dialog p {
    color: var(--muted);
    margin: 0;
}

.erp-dialog-actions {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
    margin-top: 22px;
}

.topbar h2 {
    font-size: 22px;
}

.app-footer {
    background: linear-gradient(135deg, #ffffff 0%, #fbf9ff 100%);
    border: 1px solid var(--line);
    border-radius: 8px;
    display: grid;
    gap: 12px;
    margin-top: 18px;
    padding: 16px;
    text-align: center;
}

.app-footer nav {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
}

.app-footer nav a {
    background: #f8f6ff;
    border: 1px solid var(--line);
    border-radius: 8px;
    color: var(--blue);
    font-weight: 850;
    min-height: 38px;
    padding: 8px 12px;
}

.app-footer nav a:nth-child(2n) {
    background: #f3fbf8;
    color: #09664e;
}

.app-footer nav a:nth-child(3n) {
    background: #f5f9ff;
    color: #10538f;
}

.app-footer p {
    color: var(--muted);
    font-size: 13px;
    font-weight: 700;
    margin: 0;
}

.welcome-card,
.content-card,
.stat-grid article,
.module-grid a,
.empty-state {
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: 8px;
}

.welcome-card,
.content-card {
    padding: 18px;
}

.dashboard-hero {
    background: #12324a;
    border-color: #12324a;
    color: #ffffff;
}

.dashboard-hero span,
.dashboard-hero h1,
.dashboard-hero p {
    color: #ffffff;
}

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

.hero-actions a {
    background: #287f86;
    border-color: #287f86;
    color: #ffffff;
}

.stat-grid,
.module-grid {
    display: grid;
    gap: 12px;
    margin-top: 14px;
}

.stat-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.academic-health-summary,
.stock-three-stats {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.stat-grid article {
    overflow: hidden;
    min-height: 94px;
    padding: 15px;
    position: relative;
}

.executive-stat-grid {
    grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
}

.executive-stat-grid article {
    background: #ffffff;
    border-color: #d6dee8;
    min-height: 86px;
}

.stat-grid article::before {
    background: var(--blue);
    content: "";
    height: 4px;
    left: 0;
    position: absolute;
    right: 0;
    top: 0;
}

.stat-grid article:nth-child(2)::before {
    background: var(--accent-blue);
}

.stat-grid article:nth-child(3)::before {
    background: var(--accent-mint);
}

.stat-grid article:nth-child(4)::before {
    background: var(--accent-gold);
}

.stat-grid strong {
    display: block;
    font-size: 28px;
    margin-top: 8px;
}

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

.module-grid a {
    display: grid;
    gap: 8px;
    min-height: 110px;
    padding: 16px;
}

.dashboard-grid {
    display: grid;
    gap: 14px;
    grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr);
    margin-top: 14px;
}

.dashboard-summary-grid {
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

.mobile-today-card {
    display: none;
}

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

.mobile-today-grid div {
    background: #f8fbff;
    border: 1px solid #d9e8f6;
    border-radius: 8px;
    display: grid;
    gap: 4px;
    min-height: 72px;
    padding: 10px;
}

.mobile-today-grid strong {
    color: #102f45;
    font-size: 20px;
}

.mobile-today-grid span {
    color: var(--muted);
    font-size: 12px;
    font-weight: 800;
}

.dashboard-panel h1,
.setup-progress h1 {
    margin-bottom: 14px;
}

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

.today-list div,
.today-list a {
    background: #f8fbff;
    border: 1px solid #d9e8f6;
    border-radius: 8px;
    color: inherit;
    display: grid;
    gap: 4px;
    min-height: 82px;
    padding: 12px;
    text-decoration: none;
}

.today-list a:hover {
    background: #eef8f8;
    border-color: #9bcfd1;
    transform: translateY(-1px);
}

.dashboard-panel {
    border-top: 5px solid #287f86;
}

.dashboard-summary-grid .dashboard-panel:nth-child(2) {
    border-top-color: #1d7ed0;
}

.dashboard-summary-grid .dashboard-panel:nth-child(3) {
    border-top-color: #7a4f07;
}

.today-list strong {
    color: var(--blue);
    font-size: 24px;
}

.today-list span {
    color: var(--muted);
    font-weight: 750;
}

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

.quick-action-list a {
    background: #ffffff;
    border: 1px solid var(--line);
    border-radius: 8px;
    display: grid;
    gap: 5px;
    padding: 12px;
}

.quick-action-list a:nth-child(4n + 1) {
    background: #fbf9ff;
}

.quick-action-list a:nth-child(4n + 2) {
    background: #f5f9ff;
}

.quick-action-list a:nth-child(4n + 3) {
    background: #f3fbf8;
}

.quick-action-list a:nth-child(4n) {
    background: #fffaf0;
}

.quick-action-list span {
    color: var(--muted);
}

.setup-progress {
    margin-top: 14px;
}

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

.setup-progress-grid a {
    background: #fffaf0;
    border: 1px solid #f3d79a;
    border-radius: 8px;
    display: grid;
    gap: 8px;
    padding: 12px;
}

.setup-progress-grid a.done {
    background: #f3fbf8;
    border-color: #b7e4d5;
}

.setup-progress-grid i {
    background: #ffedc2;
    border-radius: 999px;
    color: #7a4f07;
    font-size: 12px;
    font-style: normal;
    font-weight: 900;
    padding: 5px 8px;
    width: fit-content;
}

.setup-progress-grid a.done i {
    background: #d7f3ea;
    color: #09664e;
}

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

.feature-level {
    overflow: hidden;
    position: relative;
}

.feature-level::before {
    background: var(--blue);
    content: "";
    height: 4px;
    left: 0;
    position: absolute;
    right: 0;
    top: 0;
}

.feature-level:nth-child(4n + 2)::before {
    background: var(--accent-blue);
}

.feature-level:nth-child(4n + 3)::before {
    background: var(--accent-mint);
}

.feature-level:nth-child(4n)::before {
    background: var(--accent-gold);
}

.feature-level-links {
    display: grid;
    gap: 10px;
}

.feature-level-links a {
    background: #f8f6ff;
    border: 1px solid var(--line);
    border-radius: 8px;
    display: grid;
    gap: 5px;
    padding: 12px;
}

.feature-level-links span {
    color: var(--muted);
}

.logo-upload {
    align-items: center;
    background: #f8f6ff;
    border: 1px solid var(--line);
    border-radius: 8px;
    display: grid;
    gap: 12px;
    grid-template-columns: 84px 1fr;
    padding: 14px;
}

.logo-upload p {
    color: var(--muted);
    grid-column: 2;
    margin: 0;
}

.school-logo-preview {
    align-items: center;
    background: #ffffff;
    border: 1px solid var(--line);
    border-radius: 8px;
    color: var(--blue);
    display: flex;
    font-size: 28px;
    height: 72px;
    justify-content: center;
    overflow: hidden;
    width: 72px;
}

.school-logo-preview img {
    height: 100%;
    object-fit: cover;
    width: 100%;
}

.action-grid a {
    position: relative;
}

.action-grid a::before {
    background: var(--blue);
    border-radius: 999px;
    color: #ffffff;
    content: "Open";
    display: inline-flex;
    font-size: 12px;
    font-weight: 850;
    justify-content: center;
    padding: 5px 9px;
    width: fit-content;
}

.empty-state {
    margin-top: 18px;
    padding: 16px;
}

.form-grid,
.setup-grid {
    display: grid;
    gap: 14px;
    margin-top: 18px;
}

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

.setup-grid,
.table-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.setup-grid form {
    border: 1px solid var(--line);
    border-radius: 8px;
    display: grid;
    gap: 12px;
    padding: 14px;
}

.access-setup {
    grid-template-columns: 1.1fr 0.8fr 0.8fr;
}

.access-note {
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 14px;
}

.permission-roles {
    display: grid;
    gap: 12px;
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.permission-card {
    border: 1px solid var(--line);
    border-radius: 8px;
    display: grid;
    gap: 12px;
    padding: 14px;
}

.permission-card h2,
.permission-card label {
    margin: 0;
}

.role-card-meta {
    background: #f8fbff;
    border: 1px solid #d9e8f6;
    border-radius: 8px;
    color: var(--muted);
    font-size: 13px;
    font-weight: 850;
    margin: -4px 0 0;
    padding: 8px 10px;
}

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

.permission-list .check {
    background: #f8f6ff;
    border-radius: 8px;
    padding: 8px;
}

.setup-grid h2,
.table-grid h2 {
    margin: 0;
}

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

.check {
    align-items: center;
    display: flex;
    flex-direction: row;
}

.check input {
    min-height: auto;
    width: auto;
}

.notice {
    border-radius: 8px;
    font-weight: 700;
    margin: 0 0 14px;
    padding: 12px;
}

.notice.success {
    background: #ecfdf3;
    border: 1px solid #abefc6;
    color: #067647;
}

.notice.error {
    background: #fff1f0;
    border: 1px solid #ffc9c4;
    color: #b42318;
}

.table-grid {
    display: grid;
    gap: 12px;
    margin-top: 14px;
}

.filter-form {
    align-items: end;
    display: grid;
    gap: 12px;
    grid-template-columns: repeat(5, minmax(0, 1fr));
}

.button-link {
    align-items: center;
    background: var(--soft);
    border-radius: 8px;
    color: var(--blue);
    display: inline-flex;
    font-weight: 850;
    justify-content: center;
    min-height: 44px;
    padding: 10px 14px;
}

table {
    border-collapse: collapse;
    margin-top: 12px;
    width: 100%;
}

td {
    border-bottom: 1px solid var(--line);
    padding: 9px 4px;
}

th {
    color: var(--muted);
    font-size: 13px;
    text-align: left;
}

.list-card {
    margin-top: 14px;
    overflow-x: auto;
}

.user-console-hero {
    align-items: end;
    background: #ffffff;
    border: 1px solid var(--line);
    border-radius: 8px;
    display: grid;
    gap: 18px;
    grid-template-columns: minmax(0, 1fr) minmax(360px, 0.72fr);
    padding: 26px;
}

.user-console-hero > div:first-child > span,
.console-section-head span {
    color: var(--muted);
    font-size: 13px;
    font-weight: 800;
    text-transform: uppercase;
}

.user-console-hero h1 {
    color: var(--ink);
    font-size: 44px;
    line-height: 1;
    margin: 8px 0 10px;
}

.user-console-hero p {
    color: var(--muted);
    font-size: 18px;
    line-height: 1.45;
    margin: 0;
    max-width: 820px;
}

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

.user-console-stats article {
    background: #f8f6ff;
    border: 1px solid var(--line);
    border-radius: 8px;
    min-height: 84px;
    padding: 12px;
}

.user-console-stats article:nth-child(2) {
    background: #f3fbf8;
    border-color: #b7e4d5;
}

.user-console-stats article:nth-child(3) {
    background: #f5f9ff;
    border-color: #c3ddf4;
}

.user-console-stats article:nth-child(4) {
    background: #fff7ed;
    border-color: #fed7aa;
}

.user-console-stats span {
    color: var(--muted);
    display: block;
    font-size: 12px;
    font-weight: 850;
}

.user-console-stats strong {
    color: var(--ink);
    display: block;
    font-size: 26px;
    margin-top: 7px;
}

.user-console-panel {
    background: #ffffff;
    border: 1px solid var(--line);
    border-radius: 8px;
    margin-top: 14px;
    overflow: visible;
    padding: 16px;
}

.console-section-head {
    align-items: center;
    display: flex;
    justify-content: space-between;
    margin-bottom: 12px;
}

.console-section-head h2,
.console-form h3 {
    margin: 4px 0 0;
}

.user-admin-grid {
    display: grid;
    gap: 12px;
    grid-template-columns: 1.2fr 0.8fr 0.8fr;
}

.console-form {
    background: #fbfdff;
    border: 1px solid #dbe7f2;
    border-radius: 8px;
    display: grid;
    gap: 11px;
    padding: 14px;
}

.compact-form {
    align-content: start;
}

.role-merge-form,
.role-delete-form {
    display: grid;
    gap: 11px;
}

.role-delete-form {
    border-top: 1px solid #dbe7f2;
    padding-top: 12px;
}

.danger-button,
.delete-user-form button {
    background: #e03148;
}

button:disabled {
    cursor: not-allowed;
    opacity: 0.55;
}

.user-console-jump {
    display: grid;
    gap: 8px;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    margin-top: 12px;
}

.user-console-jump a {
    background: #ffffff;
    border: 1px solid var(--line);
    border-radius: 8px;
    color: var(--ink);
    font-size: 13px;
    font-weight: 850;
    min-height: 40px;
    padding: 10px 12px;
    text-align: center;
}

.user-console-toolbar {
    align-items: end;
    background: #f8fbff;
    border-bottom: 1px solid #c8d8e7;
    display: grid;
    gap: 12px;
    grid-template-columns: minmax(260px, 1.35fr) minmax(150px, 0.55fr) minmax(150px, 0.55fr) auto auto;
    margin: -16px -16px 0;
    padding: 16px;
}

.user-console-toolbar label {
    font-size: 12px;
    gap: 5px;
}

.search-control {
    position: relative;
}

.search-control span {
    bottom: 12px;
    color: var(--muted);
    font-size: 16px;
    left: 13px;
    position: absolute;
}

.search-control input {
    padding-left: 36px;
}

.secondary-button {
    background: #ffffff;
    border: 1px solid #aebfd1;
    color: var(--ink);
}

.add-user-button {
    background: var(--ink);
    color: #ffffff;
}

.selected-user-actions {
    align-items: center;
    background: #ffffff;
    border-bottom: 1px solid #d9e8f6;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 0 -16px;
    padding: 10px 16px;
}

.selected-user-actions strong {
    color: var(--ink);
    margin-right: auto;
}

.selected-user-actions button {
    min-height: 36px;
    padding: 8px 12px;
}

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

.user-console-table {
    border-collapse: separate;
    border-spacing: 0;
    color: #29445f;
    min-width: 0;
    width: 100%;
}

.user-console-table thead th {
    background: #2f4963;
    color: #ffffff;
    font-size: 13px;
    font-weight: 850;
    padding: 11px 12px;
    white-space: nowrap;
}

.user-console-table td {
    background: #f8fbff;
    border-bottom: 1px solid #d9e8f6;
    padding: 9px 12px;
    vertical-align: middle;
}

.user-console-table tbody tr:nth-child(even) td {
    background: #eef5fc;
}

.user-console-table tbody tr.is-selected td {
    background: #fffaf0;
}

.user-console-table input[type="checkbox"] {
    min-height: auto;
    width: auto;
}

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

.user-identity div {
    display: grid;
    gap: 2px;
    min-width: 0;
}

.user-identity span:not(.user-avatar) {
    color: var(--muted);
    font-size: 13px;
    overflow-wrap: anywhere;
}

.user-avatar {
    align-items: center;
    background: #dcecff;
    border: 1px solid #c3ddf4;
    border-radius: 999px;
    color: #10538f;
    display: inline-flex;
    flex: 0 0 auto;
    font-size: 12px;
    font-weight: 900;
    height: 34px;
    justify-content: center;
    width: 34px;
}

.status-pill {
    border-radius: 999px;
    color: #ffffff;
    display: inline-flex;
    font-size: 13px;
    font-weight: 850;
    justify-content: center;
    min-width: 78px;
    padding: 6px 10px;
}

.status-active {
    background: #24a148;
}

.status-inactive {
    background: #8a96a3;
}

.status-blocked {
    background: #e03148;
}

.row-action-buttons {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    white-space: nowrap;
}

.row-actions {
    display: grid;
    grid-column: 1 / -1;
    position: static;
}

.row-actions summary,
.row-delete-action button {
    background: #ffffff;
    border: 1px solid #aebfd1;
    border-radius: 8px;
    color: var(--ink);
    cursor: pointer;
    font-weight: 850;
    list-style: none;
    min-width: 66px;
    padding: 8px 10px;
    text-align: center;
}

.row-delete-action {
    margin: 0;
}

.row-delete-action button {
    border-color: #ffc9c4;
    color: #b42318;
    min-height: 36px;
}

.row-actions summary::-webkit-details-marker {
    display: none;
}

.row-actions[open] summary {
    background: var(--ink);
    color: #ffffff;
}

.inline-user-form,
.delete-user-form {
    background: #ffffff;
    border: 1px solid #aebfd1;
    border-radius: 8px;
    box-shadow: none;
    display: grid;
    gap: 9px;
    margin-top: 8px;
    padding: 12px;
    position: static;
    width: 100%;
}

.delete-user-form {
    box-shadow: none;
    margin-top: 8px;
    position: static;
    width: 100%;
}

.inline-user-form label {
    font-size: 12px;
}

.inline-user-form input,
.inline-user-form select {
    min-height: 38px;
}

.user-edit-page-form {
    max-width: 760px;
}

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

.user-table-footer {
    align-items: center;
    display: flex;
    justify-content: space-between;
    padding-top: 14px;
}

.payslip-card {
    max-width: 820px;
}

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

.payslip-meta {
    display: grid;
    gap: 12px;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    margin: 22px 0;
}

.payslip-meta article {
    background: #f8fbff;
    border: 1px solid #d9e8f6;
    border-radius: 8px;
    padding: 12px;
}

.payslip-meta span {
    color: var(--muted);
    display: block;
    font-size: 12px;
    font-weight: 800;
}

.payslip-table th {
    text-align: left;
    width: 50%;
}

.payroll-payment-form {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 0;
    min-width: 300px;
}

.payment-choice-group {
    align-items: center;
    background: #f8fbff;
    border: 1px solid #c9dced;
    border-radius: 8px;
    display: inline-flex;
    gap: 4px;
    padding: 3px;
}

.payment-choice-group label {
    cursor: pointer;
    margin: 0;
}

.payment-choice-group input {
    height: 1px;
    opacity: 0;
    position: absolute;
    width: 1px;
}

.payment-choice-group span {
    border-radius: 6px;
    color: var(--muted);
    display: inline-flex;
    font-size: 13px;
    font-weight: 850;
    min-width: 54px;
    padding: 7px 10px;
    justify-content: center;
}

.payment-choice-group input:checked + span {
    background: #ffffff;
    box-shadow: 0 1px 4px rgba(19, 40, 61, 0.12);
    color: var(--ink);
}

.payroll-paid-date {
    min-height: 38px;
    width: 145px;
}

.paysheet-title-row {
    align-items: center;
    display: flex;
    gap: 14px;
    justify-content: space-between;
}

.paysheet-title-row h1 {
    margin: 0;
}

.payroll-method-panel {
    align-items: center;
    background: #f8fbff;
    border: 1px solid #d9e8f6;
    border-radius: 8px;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 14px 0 18px;
    padding: 10px 12px;
}

.payroll-method-panel strong {
    color: var(--ink);
}

.payroll-method-panel > span {
    background: #ffffff;
    border: 1px solid #c9dced;
    border-radius: 8px;
    color: var(--ink);
    font-weight: 850;
    padding: 8px 12px;
}

.payroll-method-panel small {
    color: var(--muted);
    flex: 1 1 100%;
    font-weight: 700;
}

.paysheet-signatures {
    display: grid;
    gap: 42px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    margin-top: 48px;
    text-align: center;
}

.paysheet-signatures span {
    border-top: 1px solid var(--ink);
    display: block;
    margin-bottom: 8px;
    padding-top: 8px;
}

.is-filtered-out {
    display: none;
}

.parent-hero .button-link {
    background: #ffffff;
    border: 1px solid var(--line);
    color: var(--blue);
}

.parent-link-form {
    align-items: end;
    display: grid;
    gap: 12px;
    grid-template-columns: minmax(0, 1fr) auto;
    margin-top: 12px;
}

.parent-ward-grid article small {
    color: var(--muted);
    display: block;
    font-weight: 750;
    margin-top: 6px;
}

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

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

.parent-list div {
    background: #f8fbff;
    border: 1px solid #d9e8f6;
    border-radius: 8px;
    display: grid;
    gap: 4px;
    padding: 10px;
}

.parent-list strong {
    color: var(--ink);
}

.parent-list span,
.parent-list p {
    color: var(--muted);
    margin: 0;
}

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

.parent-service-card {
    overflow: hidden;
}

.parent-service-switcher {
    display: grid;
    gap: 9px;
    grid-template-columns: repeat(auto-fit, minmax(155px, 1fr));
    margin: 18px 0;
}

.parent-service-switcher a {
    background: linear-gradient(145deg, #f7fbff, #eef7ff);
    border: 1px solid #d4e6f5;
    border-radius: 12px;
    color: var(--ink);
    display: grid;
    gap: 3px;
    min-height: 68px;
    padding: 12px;
}

.parent-service-switcher a:hover {
    border-color: var(--blue);
    box-shadow: 0 8px 22px rgba(38, 92, 138, 0.1);
    transform: translateY(-1px);
}

.parent-service-switcher strong {
    color: var(--blue);
    font-size: 14px;
}

.parent-service-switcher span {
    color: var(--muted);
    font-size: 12px;
    font-weight: 650;
}

.parent-fee-summary-grid {
    display: grid;
    gap: 16px;
}

.parent-fee-summary {
    background: linear-gradient(135deg, #173e52, #235f78);
    border-radius: 18px;
    box-shadow: 0 18px 36px rgba(23, 62, 82, 0.18);
    color: #fff;
    overflow: hidden;
    padding: 22px;
}

.parent-fee-summary header span,
.parent-fee-summary header h2 {
    color: #fff;
}

.parent-fee-summary header span {
    opacity: 0.72;
}

.parent-fee-summary header h2 {
    margin: 5px 0 18px;
}

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

.parent-service-metrics div {
    background: rgba(255, 255, 255, 0.11);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 13px;
    display: grid;
    gap: 8px;
    min-height: 105px;
    padding: 14px;
}

.parent-service-metrics div.is-balance {
    background: #fff4cd;
    border-color: #ffe28a;
}

.parent-service-metrics span {
    color: rgba(255, 255, 255, 0.72);
    font-size: 12px;
}

.parent-service-metrics strong {
    color: #fff;
    font-size: 18px;
    line-height: 1.25;
}

.parent-service-metrics .is-balance span {
    color: #7a5b00;
}

.parent-service-metrics .is-balance strong {
    color: #5b4300;
}

@media (max-width: 760px) {
    .parent-service-metrics {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

/* Teaching assignment workflows, report lookup and reliable desktop flyouts. */
.teaching-assignment-workflows { display: grid; gap: 16px; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.teaching-workflow-card { margin: 0; }
.teaching-workflow-card form { border-top: 1px solid var(--line); margin-top: 14px; padding-top: 14px; }
.teaching-workflow-card h3 { font-size: 16px; margin: 0 0 10px; }
.teaching-workflow-card select[multiple] { min-height: 150px; }
.teaching-workflow-card small { color: var(--muted); display: block; font-size: 11px; margin-top: 5px; }
[data-report-student-search] { margin-bottom: 8px; width: 100%; }
@media (hover: hover) and (min-width: 861px) {
    .erp-site-header .sidebar .submenu-panel::after { bottom: 0; content: ""; left: -12px; position: absolute; top: 0; width: 12px; }
    .erp-site-header .sidebar .menu-group.finance .submenu-panel::after, .erp-site-header .sidebar .menu-group.reports .submenu-panel::after { left: auto; right: -12px; }
}
@media (max-width: 980px) { .teaching-assignment-workflows { grid-template-columns: 1fr; } }
.teaching-door-groups { display: grid; gap: 18px; grid-template-columns: repeat(2, minmax(0, 1fr)); margin-top: 18px; }
.teaching-door-groups > section { background: #f8fafb; border: 1px solid #dfe8ec; border-radius: 12px; padding: 16px; }
.teaching-door-groups > section > span { color: var(--muted); font-size: 12px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; }
.teaching-door-groups > .teaching-view-group, .teaching-task-directory > .teaching-view-group { background: #eef8ff; border-color: #b9dff3; }
.teaching-door-groups > .teaching-assign-group, .teaching-task-directory > .teaching-assign-group { background: #fff8e8; border-color: #ead49b; }
.teaching-view-group .request-links a, .teaching-task-directory > .teaching-view-group a { background: #fff; border-color: #c5e3f2; color: #174f70; }
.teaching-assign-group .request-links a, .teaching-task-directory > .teaching-assign-group a { background: #fffdf7; border-color: #ead9aa; color: #684b0d; }
.teaching-task-directory { grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (max-width: 760px) { .teaching-door-groups { grid-template-columns: repeat(2, minmax(0, 1fr)); } .teaching-task-directory { grid-template-columns: 1fr; } .teaching-door-groups > section { padding: 12px; } .teaching-door-groups .request-links { grid-template-columns: 1fr; } }

@media (max-width: 460px) {
    .parent-service-metrics {
        grid-template-columns: 1fr;
    }
}

.mobile-record-list {
    display: none;
}

.attendance-hero .button-link {
    background: #ffffff;
    border: 1px solid var(--line);
    color: var(--blue);
}

.attendance-filter {
    align-items: end;
    display: grid;
    gap: 12px;
    grid-template-columns: repeat(3, minmax(0, 1fr)) auto;
    margin-top: 12px;
}

.attendance-actions {
    align-items: center;
    display: flex;
    gap: 12px;
    justify-content: space-between;
    margin-bottom: 12px;
}

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

.attendance-list article {
    align-items: center;
    background: #f8fbff;
    border: 1px solid #d9e8f6;
    border-radius: 8px;
    display: grid;
    gap: 12px;
    grid-template-columns: minmax(0, 1fr) auto;
    padding: 12px;
}

.attendance-list article span {
    color: var(--muted);
    display: block;
    font-weight: 750;
    margin-top: 4px;
}

.attendance-status {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.attendance-status label {
    align-items: center;
    background: #ffffff;
    border: 1px solid #c8d8e7;
    border-radius: 8px;
    cursor: pointer;
    display: inline-flex;
    flex-direction: row;
    font-size: 13px;
    gap: 6px;
    min-height: 38px;
    padding: 8px 10px;
}

.attendance-status input {
    min-height: auto;
    width: auto;
}

.timetable-hero .button-link {
    background: #ffffff;
    border: 1px solid var(--line);
    color: var(--blue);
}

.timetable-filter,
.timetable-form {
    align-items: end;
    display: grid;
    gap: 12px;
    margin-top: 12px;
}

.timetable-filter {
    grid-template-columns: repeat(2, minmax(0, 1fr)) auto;
}

.timetable-form {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

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

.timetable-grid article {
    background: #f8fbff;
    border: 1px solid #d9e8f6;
    border-radius: 8px;
    display: grid;
    gap: 10px;
    padding: 12px;
}

.timetable-grid h2 {
    margin: 0;
}

.period-card {
    background: #ffffff;
    border: 1px solid var(--line);
    border-radius: 8px;
    display: grid;
    gap: 4px;
    padding: 10px;
}

.period-card span {
    color: var(--muted);
    font-weight: 750;
}

.exams-hero .button-link {
    background: #ffffff;
    border: 1px solid var(--line);
    color: var(--blue);
}

.exam-form,
.exam-filter,
.exam-routine-form,
.question-bank-form,
.question-paper-filter,
.question-paper-meta {
    align-items: end;
    display: grid;
    gap: 12px;
    margin-top: 12px;
}

.exam-form {
    grid-template-columns: repeat(6, minmax(0, 1fr)) auto;
}

.exam-filter {
    grid-template-columns: repeat(3, minmax(0, 1fr)) auto;
}

.exam-routine-form {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.exam-routine-form button {
    justify-self: start;
}

.question-bank-form {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.question-bank-form button {
    justify-self: start;
}

.question-paper-filter {
    grid-template-columns: repeat(3, minmax(0, 1fr)) auto;
}

.question-paper-form {
    display: grid;
    gap: 12px;
    margin-top: 14px;
}

.question-paper-meta {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

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

.question-select-list label {
    align-items: start;
    background: #f8fbff;
    border: 1px solid #d9e8f6;
    border-radius: 8px;
    display: grid;
    gap: 6px 10px;
    grid-template-columns: 22px minmax(0, 140px) minmax(0, 1fr) 80px;
    padding: 10px;
}

.question-select-list input {
    min-height: 18px;
    width: auto;
}

.question-select-list span {
    color: var(--ink);
    font-weight: 650;
}

.question-select-list em {
    color: var(--muted);
    font-style: normal;
    font-weight: 800;
    text-align: right;
}

.compact-table {
    margin-top: 14px;
}

.marks-entry-form {
    display: grid;
    gap: 12px;
}

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

.marks-entry-list article {
    align-items: end;
    background: #f8fbff;
    border: 1px solid #d9e8f6;
    border-radius: 8px;
    display: grid;
    gap: 12px;
    grid-template-columns: minmax(0, 1fr) 150px 150px;
    padding: 12px;
}

.marks-entry-list article span {
    color: var(--muted);
    display: block;
    font-weight: 750;
    margin-top: 4px;
}

.report-hero button {
    background: #ffffff;
    border: 1px solid var(--line);
    color: var(--blue);
}

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

.marksheet-filter {
    align-items: end;
    display: grid;
    gap: 12px;
    grid-template-columns: minmax(0, 1fr) minmax(0, 0.7fr) auto auto;
    margin-top: 12px;
}

.marksheet-page {
    background: #ffffff;
    border: 1px solid var(--line);
    border-radius: 8px;
    margin-top: 14px;
    padding: 22px;
}

.marksheet-header {
    align-items: center;
    border-bottom: 2px solid var(--blue);
    display: grid;
    gap: 12px;
    grid-template-columns: 58px 1fr;
    padding-bottom: 12px;
    text-align: center;
}

.marksheet-logo {
    align-items: center;
    border: 1px solid var(--line);
    border-radius: 8px;
    display: flex;
    height: 66px;
    justify-content: center;
    overflow: hidden;
    width: 66px;
}

.marksheet-logo img {
    height: 100%;
    object-fit: cover;
    width: 100%;
}

.marksheet-header h1 {
    color: var(--blue);
    font-size: 22px;
    margin: 0 0 4px;
}

.marksheet-header p {
    color: var(--muted);
    font-size: 12px;
    margin: 2px 0;
}

.marksheet-title {
    background: #f8f6ff;
    border: 1px solid var(--line);
    border-radius: 8px;
    margin: 18px 0;
    padding: 10px;
    text-align: center;
}

.marksheet-title h2 {
    margin: 0 0 4px;
}

.marksheet-title span {
    color: var(--muted);
    font-weight: 800;
}

.marksheet-details,
.marksheet-summary {
    display: grid;
    gap: 8px;
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.marksheet-details div,
.marksheet-summary div {
    background: #f8fbff;
    border: 1px solid #d9e8f6;
    border-radius: 8px;
    display: grid;
    gap: 4px;
    padding: 8px;
}

.marksheet-details span,
.marksheet-summary span {
    color: var(--muted);
    font-size: 12px;
    font-weight: 850;
}

.marksheet-table {
    margin: 14px 0;
}

.marksheet-table th {
    background: #f8f6ff;
    color: var(--ink);
    padding: 10px;
}

.marksheet-table td {
    padding: 10px;
}

.marksheet-table tfoot th {
    border-top: 2px solid var(--line);
}

.compact-marks-table {
    text-align: center;
}

.compact-marks-table th:first-child,
.compact-marks-table td:first-child {
    text-align: left;
}

.marksheet-signatures {
    display: grid;
    gap: 24px;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    margin-top: 42px;
    text-align: center;
}

.marksheet-signatures span {
    border-top: 1px solid var(--ink);
    display: block;
    margin-bottom: 8px;
}

.report-filter {
    align-items: end;
    display: grid;
    gap: 12px;
    grid-template-columns: repeat(4, minmax(0, 1fr)) auto;
    margin-top: 12px;
}

.report-stack {
    display: grid;
    gap: 14px;
    margin-top: 14px;
}

.calendar-grid {
    display: grid;
    gap: 8px;
    grid-template-columns: repeat(7, minmax(0, 1fr));
}

.calendar-grid > strong {
    color: var(--muted);
    font-size: 13px;
    padding: 8px;
    text-align: center;
}

.calendar-sunday {
    color: #b42318 !important;
}

.calendar-day {
    background: #ffffff;
    border: 1px solid var(--line);
    border-radius: 8px;
    display: grid;
    gap: 6px;
    min-height: 112px;
    padding: 8px;
}

.calendar-day b {
    color: var(--ink);
    font-size: 16px;
}

.calendar-day span {
    color: #b42318;
    font-size: 12px;
    font-weight: 850;
}

.calendar-day.is-empty {
    background: transparent;
    border: 0;
}

.calendar-day.is-holiday {
    background: #fff3f0;
    border-color: #f5b5aa;
}

.calendar-event {
    background: #eef8ff;
    border-left: 3px solid var(--accent-blue);
    border-radius: 6px;
    display: grid;
    gap: 3px;
    padding: 6px;
}

.calendar-event.holiday {
    background: #ffe8e3;
    border-left-color: #b42318;
}

.calendar-event strong,
.calendar-event small {
    overflow-wrap: anywhere;
}

.calendar-event form {
    margin: 0;
}

.calendar-event button {
    min-height: 28px;
    padding: 4px 8px;
}

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

.calendar-mini-month h2 {
    margin-top: 0;
}

.calendar-mini-grid {
    display: grid;
    gap: 5px;
    grid-template-columns: repeat(7, minmax(0, 1fr));
}

.calendar-mini-empty {
    min-height: 30px;
}

.calendar-mini-grid a {
    background: #f8fbff;
    border: 1px solid #d9e8f6;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 800;
    min-height: 30px;
    padding: 6px 4px;
    text-align: center;
}

.calendar-mini-grid a.is-holiday {
    background: #fff3f0;
    border-color: #f5b5aa;
    color: #b42318;
}

.calendar-day-detail {
    min-height: 260px;
}

.calendar-day-detail.is-holiday {
    background: #fff3f0;
}

.calendar-day-stack {
    display: grid;
    gap: 10px;
}

.report-section {
    overflow-x: auto;
}

.report-section table {
    min-width: 760px;
}

@media (max-width: 680px) {
    .app-main {
        padding: 12px;
    }

    .report-actions {
        align-items: stretch;
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .report-actions a,
    .report-actions button {
        justify-content: center;
        text-align: center;
        width: 100%;
    }

    .calendar-actions {
        gap: 6px;
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .calendar-actions .button-link {
        font-size: 11px;
        min-height: 30px;
        padding: 5px 6px;
    }

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

    .calendar-grid {
        grid-template-columns: 1fr;
    }

    .calendar-grid > strong,
    .calendar-day.is-empty {
        display: none;
    }

    .calendar-day {
        min-height: 0;
    }

    .calendar-day b {
        font-size: 18px;
    }

    .calendar-mini-grid {
        grid-template-columns: repeat(7, minmax(0, 1fr));
    }

    .calendar-mini-grid a {
        font-size: 11px;
        min-height: 28px;
        padding: 5px 2px;
    }

    .calendar-mini-empty {
        min-height: 28px;
    }

    .calendar-admin-card {
        margin-top: 12px;
    }

    .page-bottom-actions {
        justify-content: center;
    }

    .page-bottom-actions a,
    .page-bottom-actions button {
        font-size: 11px;
        min-height: 28px;
        padding: 5px 9px;
    }

    .parent-table-wrap table {
        display: none;
    }

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

    .mobile-record-card {
        border: 1px solid var(--line);
        border-left: 5px solid var(--accent-blue);
        border-radius: 8px;
        display: grid;
        gap: 8px;
        padding: 10px;
    }

    .fee-record-card {
        background: #f4fbf8;
        border-left-color: var(--accent-mint);
    }

    .purchase-record-card {
        background: #fffaf0;
        border-left-color: var(--accent-gold);
    }

    .mobile-record-card > span {
        color: var(--muted);
        font-size: 12px;
        font-weight: 850;
    }

    .mobile-record-card > strong {
        color: var(--ink);
        font-size: 17px;
    }

    .mobile-record-card dl {
        display: grid;
        gap: 6px;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        margin: 0;
    }

    .mobile-record-card dl div {
        background: rgba(255, 255, 255, 0.72);
        border: 1px solid rgba(216, 210, 239, 0.72);
        border-radius: 8px;
        padding: 7px;
    }

    .mobile-record-card dt {
        color: var(--muted);
        font-size: 11px;
        font-weight: 850;
        margin-bottom: 2px;
    }

    .mobile-record-card dd {
        color: var(--ink);
        font-size: 13px;
        font-weight: 800;
        margin: 0;
        overflow-wrap: anywhere;
    }

    .mobile-first-console {
        gap: 14px;
        padding: 16px;
    }

    .mobile-first-console h1 {
        font-size: 32px;
        margin-top: 4px;
    }

    .mobile-first-console p {
        font-size: 15px;
    }

    .user-console-stats {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .user-console-stats article {
        min-height: 72px;
        padding: 10px;
    }

    .user-console-stats strong {
        font-size: 22px;
    }

    .user-console-jump {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .user-console-panel {
        padding: 12px;
    }

    .console-section-head {
        align-items: flex-start;
        display: grid;
        gap: 4px;
    }

    .console-section-head h2 {
        font-size: 20px;
    }

    .console-form {
        padding: 12px;
    }

    .user-console-toolbar {
        border: 0;
        border-radius: 8px;
        margin: 0;
        padding: 0;
    }

    .user-console-toolbar label,
    .user-console-toolbar button,
    .user-console-toolbar .button-link {
        width: 100%;
    }

    .selected-user-actions {
        background: #f8fbff;
        border: 1px solid #d9e8f6;
        border-radius: 8px;
        margin: 12px 0 0;
        padding: 10px;
    }

    .selected-user-actions strong {
        flex: 1 0 100%;
        margin-right: 0;
    }

    .selected-user-actions button {
        flex: 1 1 calc(50% - 6px);
    }

    .user-table-wrap {
        margin-top: 12px;
        overflow: visible;
    }

    .user-console-table,
    .user-console-table tbody,
    .user-console-table tr,
    .user-console-table td {
        display: block;
        min-width: 0;
        width: 100%;
    }

    .user-console-table {
        border-collapse: separate;
        border-spacing: 0 10px;
        margin-top: 0;
    }

    .user-console-table thead {
        display: none;
    }

    .user-console-table tbody tr {
        background: #ffffff;
        border: 1px solid #d9e8f6;
        border-radius: 8px;
        box-shadow: 0 10px 22px rgba(19, 40, 61, 0.06);
        overflow: visible;
        padding: 10px;
    }

    .user-console-table tbody tr.is-selected {
        border-color: #f3d79a;
        box-shadow: 0 10px 22px rgba(122, 79, 7, 0.12);
    }

    .user-console-table td,
    .user-console-table tbody tr:nth-child(even) td,
    .user-console-table tbody tr.is-selected td {
        align-items: center;
        background: transparent;
        border: 0;
        display: flex;
        gap: 10px;
        justify-content: space-between;
        padding: 8px 0;
    }

    .user-console-table td::before {
        color: var(--muted);
        content: attr(data-label);
        flex: 0 0 92px;
        font-size: 12px;
        font-weight: 850;
    }

    .user-console-table td:first-child {
        justify-content: flex-start;
    }

    .user-console-table td:first-child::before {
        content: "Select user";
    }

    .user-console-table td:nth-child(2) {
        align-items: flex-start;
        border-bottom: 1px solid #d9e8f6;
        padding-bottom: 12px;
    }

    .user-console-table td:nth-child(2)::before {
        display: none;
    }

    .user-identity {
        width: 100%;
    }

    .user-identity strong {
        white-space: normal;
    }

    .row-action-buttons {
        display: grid;
        gap: 8px;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        width: 100%;
    }

    .row-actions,
    .row-delete-action,
    .row-actions summary,
    .row-delete-action button {
        width: 100%;
    }

    .inline-user-form {
        box-shadow: none;
        margin-top: 8px;
        position: static;
        width: 100%;
    }

    .user-table-footer {
        align-items: flex-start;
        flex-direction: column;
        gap: 4px;
    }

    .payslip-head {
        display: grid;
    }

    .payslip-meta {
        grid-template-columns: 1fr;
    }

    .paysheet-title-row,
    .payroll-method-panel {
        align-items: flex-start;
        display: grid;
    }

    .paysheet-signatures {
        gap: 28px;
        grid-template-columns: 1fr;
    }

    .parent-link-form,
    .attendance-filter,
    .timetable-filter,
    .timetable-form,
    .timetable-grid,
    .exam-form,
    .exam-filter,
    .exam-routine-form,
    .question-bank-form,
    .question-paper-filter,
    .question-paper-meta,
    .marksheet-filter,
    .marksheet-details,
    .marksheet-summary,
    .marksheet-signatures,
    .marks-entry-list article,
    .report-filter,
    .parent-portal-grid {
        grid-template-columns: 1fr;
    }

    .parent-link-form button,
    .attendance-filter button,
    .timetable-filter button,
    .timetable-form button,
    .exam-form button,
    .exam-filter button,
    .exam-routine-form button,
    .question-bank-form button,
    .question-paper-filter button,
    .question-paper-form button,
    .marksheet-filter button,
    .report-filter button {
        width: 100%;
    }

    .marksheet-page {
        padding: 16px;
    }

    .marksheet-header {
        grid-template-columns: 1fr;
    }

    .marksheet-logo {
        margin: 0 auto;
    }

    .attendance-actions,
    .attendance-list article {
        align-items: stretch;
        grid-template-columns: 1fr;
    }

    .attendance-actions {
        display: grid;
    }

    .attendance-status {
        display: grid;
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

/* Accounts display books and transactional voucher correction. */
.accounts-book-links { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.ledger-category-grid { display: grid; gap: 16px; grid-template-columns: repeat(2, minmax(0, 1fr)); margin-top: 16px; }
.ledger-category-card h2 { margin: 4px 0 14px; }
.ledger-link-list { display: grid; gap: 8px; }
.ledger-link-list a { align-items: center; background: #f8fafb; border: 1px solid #dfe8ec; border-radius: 10px; color: var(--ink); display: flex; justify-content: space-between; padding: 11px 12px; text-decoration: none; }
.ledger-link-list a:hover { background: #eef7f7; border-color: #acd3d3; }
.ledger-link-list span { color: var(--muted); font-size: 12px; }
.accounts-entry-table .is-tappable-row:hover td { background: #f5fbfd; }
.accounts-entry-table .row-voucher-link { color: inherit; display: block; min-height: 34px; padding: 4px 0; text-decoration: none; }
.accounts-entry-table .row-voucher-link:hover { color: #174f70; }
.voucher-print-actions form { margin: 0; }
.voucher-print-actions form button { min-height: 42px; }
.voucher-edit-form .balanced-voucher-line { grid-template-columns: minmax(150px, 1fr) minmax(110px, .45fr) minmax(160px, 1fr) minmax(100px, .45fr) auto; }
@media (max-width: 760px) {
    .accounts-book-links, .ledger-category-grid { grid-template-columns: 1fr; }
    .accounts-book { overflow-x: auto; }
    .receipt-type-picker { grid-template-columns: 1fr; }
    .voucher-edit-form .balanced-voucher-line { grid-template-columns: 1fr; }
}

/* Parent result request controls. */
.parent-result-filter {
    align-items: end;
    background: #f5f9fb;
    border: 1px solid #d9e6eb;
    border-radius: 12px;
    display: grid;
    gap: 10px;
    grid-template-columns: repeat(2, minmax(0, 1fr)) auto;
    margin: 12px 0 14px;
    padding: 14px;
}

.parent-results-empty {
    background: linear-gradient(135deg, #f4faf9, #f5f7fc);
    border: 1px dashed #bdd8da;
    margin-top: 8px;
}

@media (max-width: 680px) {
    .parent-result-filter {
        grid-template-columns: 1fr;
        padding: 11px;
    }
}

/* Happier timetable palette with a focused mobile routine. */
.timetable-day {
    --day-accent: #2b8b8e;
    --day-soft: #e7f7f5;
    --day-ink: #176f73;
}

.timetable-day-tuesday { --day-accent: #4d79c7; --day-soft: #edf3ff; --day-ink: #315eaa; }
.timetable-day-wednesday { --day-accent: #8a68c8; --day-soft: #f3efff; --day-ink: #6949a7; }
.timetable-day-thursday { --day-accent: #e08268; --day-soft: #fff1ec; --day-ink: #b85d47; }
.timetable-day-friday { --day-accent: #d39a32; --day-soft: #fff7df; --day-ink: #9b6b14; }
.timetable-day-saturday { --day-accent: #55a96c; --day-soft: #edf8ef; --day-ink: #387e4c; }

.timetable-grid .timetable-day {
    background: linear-gradient(160deg, var(--day-soft), #ffffff 68%);
    border-color: #d7e4e9;
}

.timetable-grid .timetable-day h2 {
    color: var(--day-ink);
}

.timetable-day .period-card {
    --period-pop: #f5c96a;
    background: linear-gradient(135deg, #ffffff 62%, #fff8e8);
    border-left-color: var(--day-accent);
}

.timetable-day .period-card:nth-of-type(4n + 2) { --period-pop: #ef91a4; background: linear-gradient(135deg, #ffffff 62%, #fff0f3); }
.timetable-day .period-card:nth-of-type(4n + 3) { --period-pop: #78c6dd; background: linear-gradient(135deg, #ffffff 62%, #edf9fc); }
.timetable-day .period-card:nth-of-type(4n) { --period-pop: #9bd38e; background: linear-gradient(135deg, #ffffff 62%, #f0faed); }

.timetable-day .period-number {
    background: var(--day-soft);
    color: var(--day-ink) !important;
}

.timetable-day .period-time {
    background: #fff8e8;
    border: 1px solid #eadfca;
    border-radius: 7px;
    padding: 4px 7px;
}

@media (max-width: 860px) {
    .app-view-timetable .timetable-hero {
        display: none;
    }

    .app-view-timetable .workflow-tabs {
        gap: 6px;
        margin-bottom: 8px;
    }

    .app-view-timetable .timetable-filter-card {
        border-radius: 11px;
        margin-bottom: 8px;
        padding: 10px;
    }

    .app-view-timetable .timetable-filter-card > span,
    .app-view-timetable .timetable-filter-card > h1 {
        display: none;
    }

    .app-view-timetable .timetable-filter {
        display: grid;
        gap: 7px;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        margin: 0;
    }

    .app-view-timetable .timetable-filter button {
        grid-column: 1 / -1;
    }

    .app-view-timetable .timetable-routine-card {
        border: 0;
        box-shadow: none;
        margin-top: 0;
        padding: 5px 0 0;
    }

    .app-view-timetable .timetable-routine-card::before {
        display: none;
    }

    .app-view-timetable .timetable-routine-card > h1 {
        font-size: 23px;
        margin: 3px 2px 10px;
    }
}

/* Teacher-friendly weekly routine cards. */
.timetable-grid {
    align-items: start;
    gap: 16px;
}

.timetable-grid article {
    background: linear-gradient(160deg, #f8fbfd, #edf5f7);
    border: 1px solid #d5e4e8;
    border-radius: 15px;
    box-shadow: 0 10px 24px rgba(28, 65, 84, 0.07);
    gap: 12px;
    padding: 14px;
}

.timetable-grid h2 {
    color: #174e63;
    font-size: 18px;
}

.period-card {
    background: #ffffff;
    border: 1px solid #d9e5ea;
    border-left: 4px solid #2b8b8e;
    border-radius: 13px;
    box-shadow: 0 7px 18px rgba(28, 65, 84, 0.065);
    gap: 9px;
    padding: 13px;
}

.period-card:nth-of-type(4n + 2) { border-left-color: #4d77b2; }
.period-card:nth-of-type(4n + 3) { border-left-color: #9a6bb0; }
.period-card:nth-of-type(4n) { border-left-color: #c68737; }

.period-card-head,
.period-card-meta {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
    justify-content: space-between;
}

.period-number {
    background: #e6f4f4;
    border-radius: 7px;
    color: #176f73 !important;
    font-size: 11px;
    font-weight: 600 !important;
    padding: 5px 8px;
    text-transform: uppercase;
}

.period-time {
    color: #587083 !important;
    font-size: 11px;
}

.period-subject {
    color: #16384d;
    font-size: 17px;
    font-weight: 600 !important;
}

.period-card-meta {
    justify-content: flex-start;
}

.period-class,
.period-teacher {
    background: #f3f7fa;
    border: 1px solid #dce6ec;
    border-radius: 7px;
    color: #526b7d !important;
    font-size: 11px;
    font-weight: 450 !important;
    padding: 5px 7px;
}

.period-teacher::before {
    color: #2b8b8e;
    content: "Teacher: ";
    font-weight: 550;
}

/* Authenticated module headers and mobile operational dashboard. */
.mobile-operational-summary {
    display: none;
}

@media (min-width: 861px) {
    .app-authenticated:not(.app-view-dashboard) .app-main > .content-card:first-of-type,
    .app-authenticated:not(.app-view-dashboard) .app-main > .welcome-card:first-of-type,
    .app-authenticated:not(.app-view-dashboard) .app-main > .user-console-hero:first-of-type {
        background:
            radial-gradient(circle at 92% 10%, rgba(255, 255, 255, 0.16) 0 72px, transparent 74px),
            linear-gradient(120deg, #174e63, #287d83 55%, #466ea2);
        border: 0;
        box-shadow: 0 16px 36px rgba(24, 69, 91, 0.18);
        color: #ffffff;
        overflow: hidden;
        padding: 24px 26px;
    }

    .app-authenticated:not(.app-view-dashboard) .app-main > .content-card:first-of-type::before,
    .app-authenticated:not(.app-view-dashboard) .app-main > .welcome-card:first-of-type::before,
    .app-authenticated:not(.app-view-dashboard) .app-main > .user-console-hero:first-of-type::before {
        display: none;
    }

    .app-authenticated:not(.app-view-dashboard) .app-main > .content-card:first-of-type > h1,
    .app-authenticated:not(.app-view-dashboard) .app-main > .content-card:first-of-type > h2,
    .app-authenticated:not(.app-view-dashboard) .app-main > .content-card:first-of-type > p,
    .app-authenticated:not(.app-view-dashboard) .app-main > .content-card:first-of-type > span,
    .app-authenticated:not(.app-view-dashboard) .app-main > .content-card:first-of-type > div:first-child h1,
    .app-authenticated:not(.app-view-dashboard) .app-main > .content-card:first-of-type > div:first-child p,
    .app-authenticated:not(.app-view-dashboard) .app-main > .content-card:first-of-type > div:first-child span,
    .app-authenticated:not(.app-view-dashboard) .app-main > .welcome-card:first-of-type > h1,
    .app-authenticated:not(.app-view-dashboard) .app-main > .welcome-card:first-of-type > h2,
    .app-authenticated:not(.app-view-dashboard) .app-main > .welcome-card:first-of-type > p,
    .app-authenticated:not(.app-view-dashboard) .app-main > .welcome-card:first-of-type > span,
    .app-authenticated:not(.app-view-dashboard) .app-main > .user-console-hero:first-of-type h1,
    .app-authenticated:not(.app-view-dashboard) .app-main > .user-console-hero:first-of-type p,
    .app-authenticated:not(.app-view-dashboard) .app-main > .user-console-hero:first-of-type span {
        color: #ffffff;
    }

    .app-authenticated:not(.app-view-dashboard) .app-main > .content-card:first-of-type > form,
    .app-authenticated:not(.app-view-dashboard) .app-main > .content-card:first-of-type > .setup-grid {
        background: #ffffff;
        border: 1px solid rgba(215, 226, 233, 0.9);
        border-radius: 12px;
        color: var(--ink);
        margin-top: 18px;
        padding: 18px;
    }

    .app-authenticated:not(.app-view-dashboard) .app-main > .content-card:first-of-type > .report-actions .button-link,
    .app-authenticated:not(.app-view-dashboard) .app-main > .content-card:first-of-type > .report-actions button,
    .app-authenticated:not(.app-view-dashboard) .app-main > .welcome-card:first-of-type > .hero-actions .button-link,
    .app-authenticated:not(.app-view-dashboard) .app-main > .welcome-card:first-of-type > .hero-actions button {
        background: rgba(255, 255, 255, 0.12);
        border-color: rgba(255, 255, 255, 0.3);
        color: #ffffff;
    }
}

@media (max-width: 860px) {
    .mobile-operational-summary {
        display: grid;
        gap: 10px;
        margin-top: 10px;
    }

    .mobile-operational-summary .dashboard-panel {
        padding: 15px;
    }

    .mobile-operational-summary .dashboard-panel > h1 {
        font-size: 21px;
        margin: 5px 0 10px;
    }

    .mobile-summary-items {
        display: grid;
        gap: 7px;
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .mobile-summary-items div,
    .mobile-summary-items a {
        background: #f4f8fb;
        border: 1px solid #dbe7ed;
        border-radius: 10px;
        color: inherit;
        display: grid;
        gap: 3px;
        min-height: 64px;
        padding: 9px;
        text-decoration: none;
    }

    .mobile-summary-items a:hover {
        background: #eef8f8;
        border-color: #9bcfd1;
    }

    .mobile-summary-items strong {
        color: #1b5964;
        font-size: 18px;
        font-weight: 600;
    }

    .mobile-summary-items span {
        color: var(--muted);
        font-size: 11px;
        font-weight: 450;
    }
}

/* Contextual reports, dependable nested menus, and quieter controls. */
a,
button,
summary,
.button-link,
input[type="submit"],
input[type="button"] {
    font-weight: 500 !important;
}

a strong,
button strong,
summary strong,
.button-link strong {
    font-weight: inherit !important;
}

.report-filter {
    grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
}

.app-authenticated:not(.app-view-dashboard) {
    background:
        radial-gradient(circle at 8% 4%, rgba(39, 139, 143, 0.08), transparent 24%),
        radial-gradient(circle at 92% 12%, rgba(71, 112, 181, 0.08), transparent 22%),
        #edf3f7;
}

.app-authenticated:not(.app-view-dashboard) .app-main {
    background: linear-gradient(180deg, rgba(248, 251, 253, 0.8), rgba(238, 244, 248, 0.46));
}

.app-authenticated:not(.app-view-dashboard) .content-card {
    background: linear-gradient(145deg, #ffffff, #fbfdfe);
    border-color: #d7e2e9;
}

.app-authenticated:not(.app-view-dashboard) .content-card::before {
    background: linear-gradient(90deg, #278b8f, #4e77b7);
    height: 4px;
}

.app-authenticated:not(.app-view-dashboard) .content-card:nth-of-type(3n + 2)::before {
    background: linear-gradient(90deg, #4e77b7, #7563a9);
}

.app-authenticated:not(.app-view-dashboard) .content-card:nth-of-type(3n)::before {
    background: linear-gradient(90deg, #b07a2c, #c45f5f);
}

@media (hover: hover) and (min-width: 861px) {
    .erp-site-header .sidebar .menu-subgroup {
        transform: none !important;
    }

    .erp-site-header .sidebar .menu-subgroup > summary {
        cursor: default;
        padding-right: 28px;
        position: relative;
    }

    .erp-site-header .sidebar .menu-subgroup > summary::after {
        background: transparent !important;
        border: 0 !important;
        border-right: 1.5px solid currentColor !important;
        border-top: 1.5px solid currentColor !important;
        border-radius: 0 !important;
        content: "" !important;
        height: 6px !important;
        padding: 0 !important;
        position: absolute;
        right: 12px;
        transform: rotate(45deg) !important;
        width: 6px !important;
    }

    .erp-site-header .sidebar .submenu-panel {
        display: grid;
        gap: 1px;
        left: calc(100% + 6px);
        opacity: 0;
        pointer-events: none;
        transform: translateX(5px);
        transition: opacity 140ms ease, transform 140ms ease, visibility 140ms ease;
        visibility: hidden;
    }

    .erp-site-header .sidebar .menu-subgroup[open] > .submenu-panel,
    .erp-site-header .sidebar .menu-subgroup:hover > .submenu-panel {
        opacity: 1;
        pointer-events: auto;
        transform: translateX(0);
        visibility: visible;
    }

    .erp-site-header .sidebar .submenu-panel::before {
        content: "";
        height: 100%;
        left: -14px;
        position: absolute;
        top: 0;
        width: 14px;
    }

    .erp-site-header .sidebar .menu-group.finance .submenu-panel,
    .erp-site-header .sidebar .menu-group.reports .submenu-panel {
        left: auto;
        right: calc(100% + 6px);
    }

    .erp-site-header .sidebar .menu-group.finance .submenu-panel::before,
    .erp-site-header .sidebar .menu-group.reports .submenu-panel::before {
        left: auto;
        right: -14px;
    }
}

/* 2026-06 professional workspace refinement. */
.public-topbar nav a,
.public-topbar nav button,
.public-footer a,
.app-footer nav a {
    font-weight: 550;
}

.public-footer p,
.app-footer p {
    font-weight: 450;
}

.content-card,
.welcome-card,
.finance-counter-card,
.voucher-form {
    border-color: #d9e3ea;
    border-radius: 14px;
}

.content-card {
    box-shadow: 0 10px 28px rgba(28, 55, 78, 0.065);
}

.report-request-empty {
    background: linear-gradient(135deg, rgba(238, 248, 248, 0.9), rgba(247, 250, 255, 0.96));
    border: 1px dashed #b9d5d8;
    padding: 36px;
    text-align: center;
}

.report-request-empty::before {
    display: none;
}

.report-summary-cards {
    display: grid;
    gap: 10px;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    margin: 0 0 16px;
}

.report-summary-cards div {
    background: #f2f8fb;
    border: 1px solid #d9e7ef;
    border-radius: 12px;
    display: grid;
    gap: 5px;
    padding: 14px;
}

.report-summary-cards div:nth-child(2) { background: #f5f3fc; }
.report-summary-cards div:nth-child(3) { background: #eef8f3; }
.report-summary-cards div:nth-child(4) { background: #fff5ef; }

.report-summary-cards span {
    color: var(--muted);
    font-size: 12px;
    font-weight: 550;
}

.report-summary-cards strong {
    color: #173d55;
    font-size: 21px;
    font-weight: 650;
}

.receipt-type-picker {
    display: grid;
    gap: 12px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    margin-bottom: 16px;
}

.receipt-type-picker a {
    background: #fff;
    border: 1px solid #d9e6eb;
    border-radius: 8px;
    color: #14364c;
    display: grid;
    gap: 5px;
    min-height: 78px;
    padding: 14px 16px;
    text-decoration: none;
}

.receipt-type-picker a strong {
    font-size: 17px;
    line-height: 1.2;
}

.receipt-type-picker a span {
    color: #5f7180;
    font-size: 13px;
    line-height: 1.35;
}

.receipt-type-picker a:hover,
.receipt-type-picker a.is-active {
    background: #eef8f8;
    border-color: #8ccaca;
    color: #145f65;
}

@media (min-width: 861px) {
    .erp-site-header {
        background: linear-gradient(90deg, rgba(255, 255, 255, 0.99), rgba(247, 251, 252, 0.98));
        box-shadow: 0 8px 24px rgba(22, 54, 75, 0.055);
        gap: 20px;
        overflow: visible;
        padding-left: max(24px, calc((100vw - 1720px) / 2));
        padding-right: max(30px, calc((100vw - 1720px) / 2));
    }

    .erp-site-header > .topbar {
        display: contents;
    }

    .erp-site-header .mobile-menu-toggle {
        display: none;
    }

    .erp-site-header .topbar-brand-mark { order: 1; }
    .erp-site-header .topbar-brand { flex: 0 1 auto; order: 2; }
    .erp-site-header .topbar-meta { flex: 0 0 auto; order: 3; }

    .erp-site-header > .sidebar {
        flex: 1 1 auto;
        min-width: 0;
        order: 4;
    }

    .erp-site-header .sidebar nav {
        justify-content: flex-end;
    }

    .erp-site-header .topbar form {
        flex: 0 0 auto;
        margin-left: 2px;
        order: 5;
    }

    .erp-site-header .topbar form button {
        background: #b98222;
        border-color: #b98222;
        box-shadow: 0 5px 13px rgba(185, 130, 34, 0.18);
    }

    .erp-site-header .sidebar .menu-group.finance > .mega-panel,
    .erp-site-header .sidebar .menu-group.reports > .mega-panel {
        left: auto;
        right: 0;
        transform: translateY(8px);
    }

    .erp-site-header .sidebar .menu-group.finance[open] > .mega-panel,
    .erp-site-header .sidebar .menu-group.reports[open] > .mega-panel {
        transform: translateY(0);
    }

    .erp-site-header .sidebar .menu-group.finance .submenu-panel,
    .erp-site-header .sidebar .menu-group.reports .submenu-panel {
        left: auto;
        right: calc(100% + 10px);
    }

    .admin-daily-hero {
        background:
            radial-gradient(circle at 89% 20%, rgba(255, 255, 255, 0.2) 0 64px, transparent 66px),
            linear-gradient(120deg, #197983, #3975bd 58%, #7159b1);
        border-radius: 16px;
    }

    .report-filter {
        grid-template-columns: repeat(4, minmax(180px, 1fr));
    }
}

@media (max-width: 860px) {
    .report-summary-cards {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

/* Final desktop hierarchy overrides must follow packaged release styles. */
@media (min-width: 861px) {
    .erp-site-header {
        gap: 24px;
        min-height: 68px;
    }

    .topbar-brand-mark {
        height: 40px;
        width: 40px;
    }

    .topbar-brand > span {
        font-size: 10px;
        font-weight: 650;
    }

    .topbar-brand h2 {
        font-size: 15px;
        font-weight: 600;
    }

    .erp-site-header .topbar-meta {
        font-size: 10px;
        font-weight: 500;
    }

    .erp-site-header .topbar-meta span {
        display: none;
    }

    .erp-site-header .topbar form button {
        font-weight: 600;
        min-height: 32px;
    }

    .erp-site-header .sidebar nav {
        gap: 18px;
    }

    .erp-site-header .sidebar nav > a,
    .erp-site-header .sidebar .menu-group > summary {
        background: transparent !important;
        border: 0 !important;
        color: #324a5b !important;
        font-size: 13px;
        font-weight: 450 !important;
        letter-spacing: 0;
        padding: 23px 0 20px;
        text-transform: none;
    }

    .erp-site-header .sidebar nav > a:hover,
    .erp-site-header .sidebar nav > a.is-active,
    .erp-site-header .sidebar .menu-group.has-active-link > summary,
    .erp-site-header .sidebar .menu-group[open] > summary,
    .erp-site-header .sidebar nav > a.menu-dashboard,
    .erp-site-header .sidebar nav > a.menu-dashboard:hover,
    .erp-site-header .sidebar nav > a.menu-dashboard.is-active {
        background: transparent !important;
        border: 0 !important;
        color: #147b78 !important;
        font-weight: 550 !important;
    }

    .erp-site-header .sidebar .menu-group > summary::after {
        border-bottom: 1.5px solid currentColor;
        border-right: 1.5px solid currentColor;
        content: "";
        height: 5px;
        margin-left: 7px;
        transform: rotate(45deg) translateY(-2px);
        width: 5px;
    }

    .app-main {
        margin: 0 auto;
        padding: 20px 24px 28px;
    }

    .admin-daily-hero {
        border-radius: 14px;
        box-shadow: 0 10px 24px rgba(40, 96, 145, 0.16);
        padding: 24px 28px;
    }

    .admin-daily-hero span {
        font-size: 11px;
        font-weight: 650;
        padding: 6px 10px;
    }

    .admin-daily-hero h1 {
        font-size: 31px;
        font-weight: 650;
        letter-spacing: -0.02em;
        margin: 9px 0 4px;
    }

    .admin-daily-hero p {
        font-size: 15px;
        font-weight: 400;
    }

    .dashboard-panel {
        padding: 20px;
    }

    .dashboard-panel > span:first-child {
        font-size: 11px;
        font-weight: 650;
    }

    .content-card.dashboard-panel > h1 {
        font-size: 27px;
        font-weight: 650;
        letter-spacing: -0.015em;
        margin-top: 6px;
    }

    .today-list strong,
    .daily-update-grid strong {
        font-size: 22px;
        font-weight: 650;
    }

    .today-list span {
        font-size: 13px;
        font-weight: 550;
    }

    .quick-action-list strong {
        font-size: 15px;
        font-weight: 600;
    }

    .quick-action-list span {
        font-size: 12px;
        font-weight: 500;
    }
}

/* Calmer desktop type hierarchy and navigation. */
@media (min-width: 861px) {
    .erp-site-header {
        gap: 24px;
        min-height: 68px;
        padding-left: max(24px, calc((100vw - 1640px) / 2));
        padding-right: max(24px, calc((100vw - 1640px) / 2));
    }

    .erp-site-header > .topbar {
        gap: 10px;
        min-width: 0;
    }

    .topbar-brand-mark {
        height: 40px;
        width: 40px;
    }

    .topbar-brand > span {
        font-size: 10px;
        font-weight: 650;
        letter-spacing: 0.025em;
    }

    .topbar-brand h2 {
        font-size: 15px;
        font-weight: 600;
    }

    .erp-site-header .topbar-meta {
        font-size: 10px;
        font-weight: 500;
    }

    .erp-site-header .topbar-meta strong {
        font-weight: 600;
    }

    .erp-site-header .topbar-meta span {
        display: none;
    }

    .erp-site-header .topbar form button {
        font-weight: 600;
        min-height: 32px;
        padding: 6px 12px;
    }

    .erp-site-header .sidebar nav {
        align-items: center;
        gap: 18px;
    }

    .erp-site-header .sidebar nav > a,
    .erp-site-header .sidebar .menu-group > summary {
        background: transparent !important;
        border: 0 !important;
        color: #324a5b !important;
        font-size: 13px;
        font-weight: 450 !important;
        letter-spacing: 0;
        padding: 23px 0 20px;
        text-transform: none;
    }

    .erp-site-header .sidebar nav > a:hover,
    .erp-site-header .sidebar nav > a.is-active,
    .erp-site-header .sidebar .menu-group.has-active-link > summary,
    .erp-site-header .sidebar .menu-group[open] > summary {
        background: transparent !important;
        color: #147b78 !important;
        font-weight: 550 !important;
    }

    .erp-site-header .sidebar nav > a.menu-dashboard,
    .erp-site-header .sidebar nav > a.menu-dashboard:hover,
    .erp-site-header .sidebar nav > a.menu-dashboard.is-active,
    body.menu-open .erp-site-header .sidebar nav > a.menu-dashboard {
        background: transparent !important;
        border: 0 !important;
        color: #147b78 !important;
        font-weight: 550 !important;
    }

    .erp-site-header .sidebar .menu-group > summary::after {
        border-bottom: 1.5px solid currentColor;
        border-right: 1.5px solid currentColor;
        content: "";
        height: 5px;
        margin-left: 7px;
        transform: rotate(45deg) translateY(-2px);
        width: 5px;
    }

    .app-main {
        margin: 0 auto;
        max-width: 1680px;
        padding: 20px 24px 28px;
    }

    .admin-daily-hero {
        border-radius: 14px;
        box-shadow: 0 10px 24px rgba(40, 96, 145, 0.16);
        padding: 24px 28px;
    }

    .admin-daily-hero span {
        font-size: 11px;
        font-weight: 650;
        padding: 6px 10px;
    }

    .admin-daily-hero h1 {
        font-size: 31px;
        font-weight: 650;
        letter-spacing: -0.02em;
        margin: 9px 0 4px;
    }

    .admin-daily-hero p {
        font-size: 15px;
        font-weight: 400;
    }

    .dashboard-panel {
        padding: 20px;
    }

    .dashboard-panel > span:first-child {
        font-size: 11px;
        font-weight: 650;
    }

    .dashboard-panel > h1 {
        font-size: 27px;
        font-weight: 650;
        letter-spacing: -0.015em;
        margin-top: 6px;
    }

    .today-list strong,
    .daily-update-grid strong {
        font-size: 22px;
        font-weight: 650;
    }

    .today-list span {
        font-size: 13px;
        font-weight: 550;
    }

    .quick-action-list a {
        gap: 4px;
        padding: 13px;
    }

    .quick-action-list strong {
        font-size: 15px;
        font-weight: 600;
    }

    .quick-action-list span {
        font-size: 12px;
        font-weight: 500;
    }
}

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

    .mobile-menu-toggle {
        align-items: center;
        background: rgba(255, 255, 255, 0.12);
        border: 1px solid rgba(255, 255, 255, 0.24);
        border-radius: 8px;
        box-shadow: none;
        color: #ffffff;
        display: inline-flex;
        flex: 0 0 auto;
        font-weight: 900;
        justify-content: center;
        height: 44px;
        padding: 0;
        width: 44px;
    }

    .mobile-menu-toggle strong {
        clip: rect(0 0 0 0);
        clip-path: inset(50%);
        height: 1px;
        overflow: hidden;
        position: absolute;
        white-space: nowrap;
        width: 1px;
    }

    .mobile-menu-backdrop {
        background: rgba(19, 40, 61, 0.28);
        display: block;
        inset: 0;
        position: fixed;
        z-index: 29;
    }

    .mobile-menu-backdrop[hidden] {
        display: none;
    }

    .sidebar {
        background: #ffffff;
        border-left: 0;
        border-right: 1px solid var(--line);
        bottom: 0;
        box-shadow: 18px 0 38px rgba(19, 40, 61, 0.16);
        left: 0;
        max-width: 360px;
        overflow-y: auto;
        padding: 18px 14px 18px;
        position: fixed;
        right: auto;
        top: 0;
        transform: translateX(-105%);
        transition: transform 180ms ease;
        width: min(88vw, 360px);
        z-index: 30;
    }

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

    .brand {
        padding-bottom: 12px;
    }

    .brand strong {
        font-size: 16px;
    }

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

    .sidebar nav p {
        display: none;
    }

    .sidebar nav {
        display: grid;
        gap: 8px;
        margin-top: 14px;
        overflow: visible;
    }

    .sidebar nav a {
        white-space: normal;
    }

    .menu-group,
    .menu-group[open] {
        display: grid;
    }

    .menu-group summary {
        background: #f8fbff;
        border: 1px solid #d9e8f6;
        border-radius: 8px;
        display: flex;
        margin: 8px 0 5px;
        padding: 10px 12px;
    }

    .menu-group a {
        margin-left: 0;
        padding: 10px 12px;
    }

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

    .topbar {
        align-items: start;
        display: grid;
        gap: 8px 12px;
        grid-template-columns: 44px minmax(0, 1fr) auto;
        min-height: 0;
        position: relative;
    }

    .topbar .mobile-menu-toggle {
        grid-column: 1;
        grid-row: 1 / span 2;
    }

    .topbar {
        margin-top: 0;
        border-radius: 8px;
        padding: 12px;
    }

    .topbar > div:first-of-type {
        grid-column: 2;
        min-width: 0;
    }

    .topbar-meta {
        grid-column: 2 / -1;
        margin-left: 0;
        text-align: left;
    }

    .topbar-actions {
        grid-column: 2 / -1;
        justify-content: flex-start;
    }

    .topbar-shortcuts {
        display: none;
    }

    .topbar form {
        grid-column: 3;
        grid-row: 1;
    }

    .topbar form button {
        min-height: 36px;
        padding: 8px 10px;
    }

    .topbar h2 {
        font-size: 20px;
        line-height: 1.2;
    }

    .dashboard-hero {
        padding: 16px;
    }

    .dashboard-hero h1 {
        font-size: 34px;
        line-height: 1.1;
    }

    .dashboard-hero p {
        font-size: 18px;
    }

    .mobile-today-card {
        display: block;
        margin-top: 0;
    }

    .executive-stat-grid,
    .dashboard-summary-grid,
    .dashboard-overview-grid > .dashboard-panel:first-child {
        display: none;
    }

    .dashboard-overview-grid {
        margin-top: 12px;
    }

    .public-feature-grid,
    .public-role-grid,
    .role-matrix,
    .role-highlights,
    .public-short-grid,
    .dashboard-grid,
    .today-list,
    .quick-action-list,
    .setup-progress-grid,
    .feature-levels,
    .filter-form,
    .stat-grid,
    .module-grid,
    .form-grid,
    .setup-grid,
    .table-grid,
    .permission-roles,
    .user-console-hero,
    .user-console-stats,
    .user-admin-grid,
    .user-console-toolbar,
    .exam-form,
    .exam-filter,
    .exam-routine-form,
    .question-bank-form,
    .question-paper-filter,
    .question-paper-meta {
        grid-template-columns: 1fr;
    }

    .question-select-list label {
        grid-template-columns: 22px minmax(0, 1fr);
    }

    .question-select-list span,
    .question-select-list em {
        grid-column: 2;
        text-align: left;
    }

    .user-console-hero {
        padding: 18px;
    }

    .user-console-hero h1 {
        font-size: 34px;
    }

    .user-console-toolbar {
        align-items: stretch;
    }

    .user-table-footer {
        align-items: flex-start;
        flex-direction: column;
        gap: 6px;
    }

    .span-2 {
        grid-column: auto;
    }

    .public-landing {
        padding: 12px;
    }

    .public-topbar {
        align-items: flex-start;
        gap: 10px;
    }

    .public-topbar nav {
        flex-wrap: wrap;
        justify-content: flex-end;
    }

    .public-topbar nav a {
        font-size: 14px;
        min-height: 36px;
        padding: 8px 10px;
    }

    .public-hero {
        grid-template-columns: 1fr;
        min-height: auto;
        padding: 22px;
    }

    .public-hero h1 {
        font-size: 32px;
    }

    .public-slideshow {
        min-height: 300px;
    }

    .public-short-grid {
        gap: 14px;
    }

    .public-short-grid article {
        box-shadow: 0 12px 28px rgba(51, 0, 102, 0.08);
        min-height: 132px;
        padding: 18px;
    }

    .public-short-grid strong {
        font-size: 18px;
    }

    .topbar-meta {
        margin-left: 0;
        text-align: left;
    }

    .hero-actions {
        justify-content: flex-start;
    }

    .logo-upload {
        grid-template-columns: 1fr;
    }

    .logo-upload p {
        grid-column: auto;
    }

    .role-icon-matrix i {
        height: 42px;
        min-height: 42px;
        min-width: 42px;
        width: 42px;
    }
}

@media print {
    body {
        background: #ffffff;
    }

    .sidebar,
    .topbar,
    .mobile-menu-toggle,
    .mobile-menu-backdrop,
    .app-footer,
    .print-hide {
        display: none !important;
    }

    .app-shell {
        display: block;
    }

    .app-main {
        padding: 0;
    }

    .printable-report {
        border: 0;
        box-shadow: none;
        margin: 0;
        padding: 0;
    }

    .report-stack {
        display: block;
    }

    .report-section {
        break-inside: avoid;
        margin-bottom: 18px;
        overflow: visible;
    }

    .report-section table {
        min-width: 0;
        width: 100%;
    }

    .paysheet-table {
        min-width: 0;
        width: 100%;
    }

    .paysheet-table th:nth-child(8),
    .paysheet-table td:nth-child(8),
    .paysheet-table th:nth-child(9),
    .paysheet-table td:nth-child(9) {
        display: none;
    }

    .paysheet-signatures {
        break-inside: avoid;
    }

    .marksheet-page {
        border: 0;
        margin: 0;
        padding: 0;
    }

    .marksheet-header {
        grid-template-columns: 56px 1fr;
        padding-bottom: 8px;
        text-align: left;
    }

    .marksheet-logo {
        height: 54px;
        width: 54px;
    }

    .marksheet-header h1 {
        font-size: 18px;
    }

    .marksheet-header p {
        font-size: 10px;
    }

    .marksheet-title {
        margin: 10px 0;
        padding: 8px;
    }

    .marksheet-details,
    .marksheet-summary {
        gap: 5px;
        grid-template-columns: repeat(3, 1fr);
    }

    .marksheet-details div,
    .marksheet-summary div {
        padding: 6px;
    }

    .marksheet-details span,
    .marksheet-summary span {
        font-size: 9px;
    }

    .marksheet-details strong,
    .marksheet-summary strong {
        font-size: 11px;
    }

    .compact-marks-table th,
    .compact-marks-table td {
        font-size: 10px;
        padding: 6px 4px;
        text-align: center;
    }

    .marksheet-signatures {
        gap: 18px;
        margin-top: 72px;
    }

    .marksheet-signatures span {
        margin-bottom: 12px;
        padding-top: 18px;
    }

    .marksheet-filter,
    .report-actions {
        display: none;
    }

    table {
        font-size: 12px;
    }
}

/* 2026-06-17 desktop nested menu hover fix. Keep this after release CSS overrides. */
@media (hover: hover) and (min-width: 901px) {
    .erp-site-header,
    .erp-site-header > .sidebar,
    .erp-site-header .sidebar nav,
    .erp-site-header .sidebar .menu-group,
    .erp-site-header .sidebar .menu-subgroup {
        overflow: visible !important;
    }

    .erp-site-header {
        isolation: isolate;
        z-index: 2000 !important;
    }

    .app-main {
        position: relative;
        z-index: 1;
    }

    .erp-site-header .sidebar .menu-group {
        position: relative;
    }

    .erp-site-header .sidebar .menu-group > .mega-panel {
        background: #ffffff;
        border: 1px solid #d9e6eb;
        border-radius: 8px;
        box-shadow: 0 18px 38px rgba(16, 47, 69, 0.14);
        display: grid !important;
        gap: 8px;
        left: 0;
        min-width: 260px;
        opacity: 0;
        padding: 10px;
        pointer-events: none;
        position: absolute !important;
        top: 100%;
        transform: translateY(8px);
        transition: opacity 140ms ease, transform 140ms ease, visibility 140ms ease;
        visibility: hidden;
        z-index: 2100 !important;
    }

    .erp-site-header .sidebar .menu-group[open] > .mega-panel,
    .erp-site-header .sidebar .menu-group:hover > .mega-panel,
    .erp-site-header .sidebar .menu-group:focus-within > .mega-panel {
        opacity: 1;
        pointer-events: auto;
        transform: translateY(0);
        visibility: visible;
    }

    .erp-site-header .sidebar .menu-group.finance > .mega-panel,
    .erp-site-header .sidebar .menu-group.reports > .mega-panel {
        left: auto;
        right: 0;
    }

    .erp-site-header .sidebar .menu-subgroup {
        position: relative !important;
    }

    .erp-site-header .sidebar .menu-subgroup > summary {
        cursor: pointer !important;
    }

    .erp-site-header .sidebar .menu-subgroup > .submenu-panel {
        background: #ffffff;
        border: 1px solid #d9e6eb;
        border-radius: 8px;
        box-shadow: 0 16px 34px rgba(16, 47, 69, 0.14);
        display: grid !important;
        gap: 4px;
        left: calc(100% + 12px) !important;
        min-width: 230px;
        opacity: 0;
        padding: 8px;
        pointer-events: none;
        position: absolute !important;
        right: auto !important;
        top: 0;
        transform: translateX(8px);
        transition: opacity 140ms ease, transform 140ms ease, visibility 140ms ease;
        visibility: hidden;
        z-index: 2200 !important;
    }

    .erp-site-header .sidebar .menu-subgroup[open] > .submenu-panel,
    .erp-site-header .sidebar .menu-subgroup:hover > .submenu-panel,
    .erp-site-header .sidebar .menu-subgroup:focus-within > .submenu-panel {
        opacity: 1;
        pointer-events: auto;
        transform: translateX(0);
        visibility: visible;
    }

    .erp-site-header .sidebar .menu-subgroup > .submenu-panel::before {
        content: "";
        height: 100%;
        left: -16px !important;
        position: absolute;
        right: auto !important;
        top: 0;
        width: 16px;
    }

    .erp-site-header .sidebar .menu-group.reports .menu-subgroup > .submenu-panel {
        left: auto !important;
        right: calc(100% + 12px) !important;
        transform: translateX(-8px);
    }

    .erp-site-header .sidebar .menu-group.reports .menu-subgroup[open] > .submenu-panel,
    .erp-site-header .sidebar .menu-group.reports .menu-subgroup:hover > .submenu-panel,
    .erp-site-header .sidebar .menu-group.reports .menu-subgroup:focus-within > .submenu-panel {
        transform: translateX(0);
    }

    .erp-site-header .sidebar .menu-group.reports .menu-subgroup > .submenu-panel::before {
        left: auto !important;
        right: -16px !important;
    }

    .erp-site-header .sidebar .submenu-panel a {
        margin-left: 0 !important;
        white-space: nowrap;
    }
}

/* Last rule: desktop menus must float above dashboard and never resize the row. */
@media (hover: hover) and (min-width: 901px) {
    .erp-site-header {
        isolation: isolate;
        overflow: visible !important;
        position: sticky !important;
        z-index: 3000 !important;
    }

    .erp-site-header > .sidebar,
    .erp-site-header .sidebar nav,
    .erp-site-header .sidebar .menu-group {
        overflow: visible !important;
    }

    .app-main {
        position: relative;
        z-index: 1;
    }

    .erp-site-header .sidebar .menu-group {
        position: relative !important;
    }

    .erp-site-header .sidebar .menu-group > .mega-panel {
        background: #ffffff;
        border: 1px solid #d9e6eb;
        border-radius: 8px;
        box-shadow: 0 18px 38px rgba(16, 47, 69, 0.14);
        display: grid !important;
        gap: 8px;
        left: 0 !important;
        min-width: 260px;
        opacity: 0;
        padding: 10px;
        pointer-events: none;
        position: absolute !important;
        right: auto !important;
        top: 100%;
        transform: translateY(8px);
        transition: opacity 140ms ease, transform 140ms ease, visibility 140ms ease;
        visibility: hidden;
        z-index: 3100 !important;
    }

    .erp-site-header .sidebar .menu-group[open] > .mega-panel,
    .erp-site-header .sidebar .menu-group:hover > .mega-panel,
    .erp-site-header .sidebar .menu-group:focus-within > .mega-panel {
        opacity: 1;
        pointer-events: auto;
        transform: translateY(0);
        visibility: visible;
    }

    .erp-site-header .sidebar .menu-group.finance > .mega-panel,
    .erp-site-header .sidebar .menu-group.reports > .mega-panel {
        left: auto !important;
        right: 0 !important;
    }

    .erp-site-header .sidebar .menu-subgroup > .submenu-panel {
        z-index: 3200 !important;
    }
}

/* Final visual polish override: report totals, dashboard contrast, and footer menu. */
.statement-total-row .statement-total {
    align-items: center !important;
    display: grid !important;
    gap: 16px !important;
    grid-template-columns: minmax(0, 1fr) minmax(120px, max-content) !important;
    margin-top: 0 !important;
    padding: 10px 14px !important;
}

.statement-total-row .statement-total span {
    min-width: 0;
}

.statement-total-row .statement-total strong {
    justify-self: end;
    text-align: right !important;
}

.admin-daily-hero {
    background:
        radial-gradient(circle at 88% 18%, rgba(255, 207, 129, 0.28) 0 58px, transparent 60px),
        linear-gradient(120deg, #0f5f62 0%, #365d8f 56%, #6f4f86 100%) !important;
    border: 0 !important;
    box-shadow: 0 18px 40px rgba(15, 95, 98, 0.18) !important;
    color: #ffffff !important;
}

.admin-daily-hero span,
.admin-daily-hero h1,
.admin-daily-hero p {
    color: #ffffff !important;
}

.admin-daily-hero span {
    background: rgba(255, 255, 255, 0.16) !important;
    border: 1px solid rgba(255, 255, 255, 0.24) !important;
    border-radius: 999px;
    display: inline-flex;
}

.dashboard-panel {
    border-top-color: #0f766e !important;
    box-shadow: 0 14px 30px rgba(28, 61, 79, 0.09);
}

.dashboard-summary-grid .dashboard-panel:nth-child(2) {
    border-top-color: #5068b8 !important;
}

.dashboard-summary-grid .dashboard-panel:nth-child(3) {
    border-top-color: #b06b3b !important;
}

.today-list div,
.today-list a,
.quick-action-list a {
    background: #f8faf9 !important;
    border-color: #cbdce0 !important;
}

.quick-action-list a:nth-child(4n + 1) {
    background: #f8f7fc !important;
}

.quick-action-list a:nth-child(4n + 2) {
    background: #f5f9fb !important;
}

.quick-action-list a:nth-child(4n + 3) {
    background: #f5faf7 !important;
}

.quick-action-list a:nth-child(4n) {
    background: #fff8ef !important;
}

.today-list strong,
.daily-update-grid strong {
    color: #0f5f62 !important;
}

.quick-action-list strong {
    color: #193849 !important;
}

.quick-action-list span,
.today-list span {
    color: #405967 !important;
}

.page-bottom-actions a,
.page-bottom-actions button {
    background: #ffffff !important;
    border-color: #b8d1d8 !important;
    color: #174555 !important;
}

.app-footer {
    background: linear-gradient(135deg, #17343a 0%, #24555a 58%, #493c63 100%) !important;
    border: 0 !important;
    box-shadow: 0 18px 40px rgba(23, 52, 58, 0.18);
    color: #ffffff !important;
}

.app-footer nav a {
    background: rgba(255, 255, 255, 0.94) !important;
    border-color: rgba(255, 255, 255, 0.78) !important;
    color: #17343a !important;
}

.app-footer nav a:hover {
    background: #fff4dc !important;
    color: #2b2a40 !important;
}

.app-footer p {
    color: #f4fbfb !important;
}

/* 2026-06-25 user-facing workflow refinements */
.public-short-grid > a,
.growth-activity-grid > a {
    color: inherit;
    text-decoration: none;
}

.public-short-grid > a {
    background: #ffffff;
    border: 1px solid var(--line);
    border-radius: 8px;
    display: grid;
    gap: 8px;
    overflow: hidden;
    padding: 18px;
    position: relative;
}

.public-short-grid > a::before {
    content: "";
    height: 4px;
    left: 0;
    position: absolute;
    right: 0;
    top: 0;
}

.public-short-grid > a:nth-child(1)::before { background: #102f45; }
.public-short-grid > a:nth-child(2)::before { background: #1d7ed0; }
.public-short-grid > a:nth-child(3)::before { background: #287f86; }
.public-short-grid > a:nth-child(4)::before { background: #b98212; }
.public-short-grid > a:nth-child(5)::before { background: #7a5bc8; }
.public-short-grid > a:nth-child(6)::before { background: #b44174; }
.public-short-grid > a:nth-child(1) i { background: #102f45; color: #ffffff; }
.public-short-grid > a:nth-child(2) i { background: #1d7ed0; color: #ffffff; }
.public-short-grid > a:nth-child(3) i { background: #287f86; color: #ffffff; }
.public-short-grid > a:nth-child(4) i { background: #b98212; color: #ffffff; }
.public-short-grid > a:nth-child(5) i { background: #7a5bc8; color: #ffffff; }
.public-short-grid > a:nth-child(6) i { background: #b44174; color: #ffffff; }

.growth-activity-grid > a {
    background: rgba(255, 255, 255, .92);
    border: 1px solid rgba(16, 47, 69, .12);
    border-radius: 8px;
    display: grid;
    gap: 5px;
    grid-template-columns: 38px minmax(0, 1fr);
    padding: 14px;
}

.growth-activity-grid > a:last-child { grid-column: 1 / -1; }
.growth-activity-grid > a:nth-child(2) i { background: #287f86; }
.growth-activity-grid > a:nth-child(3) i { background: #1d7ed0; }
.growth-activity-grid > a:nth-child(4) i { background: #b98212; }
.growth-activity-grid > a:nth-child(5) i { background: #b44174; }

.accounts-service-directory {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    width: 100%;
}

.accounts-service-directory > section:nth-child(1) {
    background: #f3fbf8;
    border-color: #b9e3d6;
}

.accounts-service-directory > section:nth-child(2) {
    background: #f5f9ff;
    border-color: #bad8f3;
}

.accounts-service-directory > section:nth-child(3) {
    background: #fff8e8;
    border-color: #ead49b;
}

.accounts-service-directory a {
    min-height: 46px;
}

.exam-card-grid,
.activity-type-grid,
.teaching-duty-hub,
.class-section-overview {
    display: grid;
    gap: 12px;
    margin-top: 16px;
}

.exam-card-grid {
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.exam-card-grid article {
    background: #ffffff;
    border: 1px solid #dce8ec;
    border-left: 5px solid #287f86;
    border-radius: 8px;
    display: grid;
    gap: 9px;
    padding: 15px;
}

.exam-card-grid article:nth-child(4n + 2) { border-left-color: #1d7ed0; }
.exam-card-grid article:nth-child(4n + 3) { border-left-color: #b98212; }
.exam-card-grid article:nth-child(4n) { border-left-color: #7a5bc8; }
.exam-card-grid article > span {
    color: #60717d;
    font-size: 12px;
    font-weight: 800;
    text-transform: uppercase;
}
.exam-card-grid article > strong {
    color: #102f45;
    font-size: 18px;
}
.exam-card-grid article > div {
    align-items: center;
    color: #40566b;
    display: flex;
    font-size: 14px;
    justify-content: space-between;
}
.exam-card-grid b {
    color: #60717d;
    font-size: 12px;
    text-transform: uppercase;
}

.exam-service-directory {
    width: 100%;
}

.exam-service-directory > section:last-child > div {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.activity-type-grid,
.teaching-duty-hub {
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.activity-type-grid a,
.teaching-duty-hub a {
    background: #ffffff;
    border: 1px solid #dce8ec;
    border-top: 4px solid #287f86;
    border-radius: 8px;
    color: #17384a;
    display: grid;
    gap: 8px;
    min-height: 112px;
    padding: 16px;
}

.activity-type-grid a:nth-child(2),
.teaching-duty-hub a:nth-child(2) { border-top-color: #1d7ed0; }
.activity-type-grid a:nth-child(3),
.teaching-duty-hub a:nth-child(3) { border-top-color: #b98212; }
.activity-type-grid a:nth-child(4),
.teaching-duty-hub a:nth-child(4) { border-top-color: #7a5bc8; }
.activity-type-grid a:nth-child(5) { border-top-color: #b44174; }
.activity-type-grid a:nth-child(6) { border-top-color: #287f86; }
.activity-type-grid span,
.teaching-duty-hub span {
    color: #60717d;
    font-size: 14px;
}

.activity-register-actions {
    margin-bottom: 12px;
}

.class-section-overview {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.class-section-overview article {
    background: #ffffff;
    border: 1px solid #dfe8ec;
    border-radius: 8px;
    overflow: hidden;
}

.class-section-overview h2 {
    background: #f5f9ff;
    border-bottom: 1px solid #dfe8ec;
    margin: 0;
    padding: 12px 14px;
}

.class-section-overview table {
    margin: 0;
}

.academic-health-summary {
    gap: 10px;
}

.academic-health-summary article {
    min-width: 0;
}

.report-school-name,
.report-statement h1,
.report-statement > p {
    text-align: center;
}

.report-school-name {
    color: #102f45;
    font-size: 18px;
    font-weight: 850;
    margin-bottom: 6px;
}

.report-statement h1 {
    font-size: 20px;
    letter-spacing: 0;
    text-transform: uppercase;
}

@media (min-width: 901px) {
    .accounts-service-directory,
    .exam-service-directory,
    .service-directory.workflow-tabs-after {
        grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    }

    .academic-audit-list {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }

    .academic-audit-item {
        align-content: start;
        min-height: 126px;
    }

    .report-statement {
        max-width: 210mm;
        min-height: 297mm;
        margin: 0 auto;
    }
}

@media (max-width: 680px) {
    .accounts-service-directory,
    .class-section-overview,
    .exam-service-directory > section:last-child > div,
    .academic-health-summary {
        grid-template-columns: 1fr !important;
    }

    .growth-activity-grid > a:last-child {
        grid-column: auto;
    }
}

@media print {
    @page {
        size: A4;
        margin: 10mm;
    }

    .topbar-user,
    .erp-site-header .topbar-user,
    .topbar-user form,
    .topbar-user button {
        display: none !important;
    }

    .single-report-view,
    .printable-report {
        display: block !important;
        margin: 0 !important;
        padding: 0 !important;
    }

    .report-statement {
        border: 0 !important;
        box-shadow: none !important;
        max-width: none !important;
        min-height: 0 !important;
        page-break-after: avoid;
        padding: 0 !important;
    }

    .report-statement h1 {
        font-size: 16pt !important;
        margin: 3mm 0 2mm !important;
    }

    .report-school-name {
        font-size: 14pt !important;
    }

    .statement-columns {
        gap: 6mm !important;
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
        margin-top: 5mm !important;
    }

    .statement-columns h3,
    .statement-columns p,
    .statement-line,
    .statement-result,
    .statement-health,
    .statement-total-row p {
        font-size: 9pt !important;
        padding: 2.2mm 2.6mm !important;
    }

    .statement-total-row {
        gap: 6mm !important;
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    }
}

/* 2026-06-24 visual polish: report totals, dashboard contrast, and footer menu. */
.statement-total-row .statement-total {
    align-items: center;
    display: grid;
    gap: 16px;
    grid-template-columns: minmax(0, 1fr) minmax(120px, max-content);
    margin-top: 0;
    padding: 10px 14px;
}

.statement-total-row .statement-total span {
    min-width: 0;
}

.statement-total-row .statement-total strong {
    justify-self: end;
    text-align: right;
}

.admin-daily-hero {
    background:
        radial-gradient(circle at 88% 18%, rgba(255, 207, 129, 0.28) 0 58px, transparent 60px),
        linear-gradient(120deg, #0f5f62 0%, #365d8f 56%, #6f4f86 100%) !important;
    border: 0 !important;
    box-shadow: 0 18px 40px rgba(15, 95, 98, 0.18) !important;
    color: #ffffff !important;
}

.admin-daily-hero span,
.admin-daily-hero h1,
.admin-daily-hero p {
    color: #ffffff !important;
}

.admin-daily-hero span {
    background: rgba(255, 255, 255, 0.16);
    border: 1px solid rgba(255, 255, 255, 0.24);
    border-radius: 999px;
    display: inline-flex;
}

.dashboard-panel {
    border-top-color: #0f766e !important;
    box-shadow: 0 14px 30px rgba(28, 61, 79, 0.09);
}

.dashboard-summary-grid .dashboard-panel:nth-child(2) {
    border-top-color: #5068b8 !important;
}

.dashboard-summary-grid .dashboard-panel:nth-child(3) {
    border-top-color: #b06b3b !important;
}

.today-list div,
.today-list a,
.quick-action-list a {
    background: #f8faf9;
    border-color: #cbdce0;
}

.quick-action-list a:nth-child(4n + 1) {
    background: #f8f7fc;
}

.quick-action-list a:nth-child(4n + 2) {
    background: #f5f9fb;
}

.quick-action-list a:nth-child(4n + 3) {
    background: #f5faf7;
}

.quick-action-list a:nth-child(4n) {
    background: #fff8ef;
}

.today-list strong,
.daily-update-grid strong {
    color: #0f5f62 !important;
}

.quick-action-list strong {
    color: #193849;
}

.quick-action-list span,
.today-list span {
    color: #405967;
}

.page-bottom-actions a,
.page-bottom-actions button {
    background: #ffffff;
    border-color: #b8d1d8;
    color: #174555;
}

.app-footer {
    background: linear-gradient(135deg, #17343a 0%, #24555a 58%, #493c63 100%) !important;
    border: 0 !important;
    box-shadow: 0 18px 40px rgba(23, 52, 58, 0.18);
    color: #ffffff !important;
}

.app-footer nav a {
    background: rgba(255, 255, 255, 0.94) !important;
    border-color: rgba(255, 255, 255, 0.78) !important;
    color: #17343a !important;
}

.app-footer nav a:hover {
    background: #fff4dc !important;
    color: #2b2a40 !important;
}

.app-footer p {
    color: #f4fbfb !important;
}

/* Last rule: keep tall Reports nested menus visible on desktop. */
@media (hover: hover) and (min-width: 901px) {
    .erp-site-header .sidebar .menu-group.reports > .mega-panel {
        max-height: calc(100vh - 92px);
        overflow: visible !important;
    }

    .erp-site-header .sidebar .menu-group.reports .menu-subgroup > .submenu-panel {
        bottom: 0 !important;
        max-height: calc(100vh - 118px);
        overflow-y: auto !important;
        top: auto !important;
    }
}

/* Absolute end-of-file desktop menu layer fix. */
@media (hover: hover) and (min-width: 901px) {
    .erp-site-header {
        isolation: isolate;
        position: sticky !important;
        z-index: 2000 !important;
    }

    .app-main {
        position: relative;
        z-index: 1;
    }

    .erp-site-header .sidebar .menu-group {
        position: relative !important;
    }

    .erp-site-header .sidebar .menu-group > .mega-panel {
        background: #ffffff;
        border: 1px solid #d9e6eb;
        border-radius: 8px;
        box-shadow: 0 18px 38px rgba(16, 47, 69, 0.14);
        display: grid !important;
        gap: 8px;
        left: 0 !important;
        min-width: 260px;
        opacity: 0;
        padding: 10px;
        pointer-events: none;
        position: absolute !important;
        right: auto !important;
        top: 100%;
        transform: translateY(8px);
        transition: opacity 140ms ease, transform 140ms ease, visibility 140ms ease;
        visibility: hidden;
        z-index: 2100 !important;
    }

    .erp-site-header .sidebar .menu-group[open] > .mega-panel,
    .erp-site-header .sidebar .menu-group:hover > .mega-panel,
    .erp-site-header .sidebar .menu-group:focus-within > .mega-panel {
        opacity: 1;
        pointer-events: auto;
        transform: translateY(0);
        visibility: visible;
    }

    .erp-site-header .sidebar .menu-group.finance > .mega-panel,
    .erp-site-header .sidebar .menu-group.reports > .mega-panel {
        left: auto !important;
        right: 0 !important;
    }
}

/* 2026-06-13 authoritative institutional header */
@media (min-width: 901px) {
    .erp-site-header > .topbar{align-items:center;background:linear-gradient(105deg,#082b43 0%,#0d3d58 48%,#12566d 100%);border:0;border-radius:0;box-shadow:0 8px 24px rgba(5,30,48,.18);color:#fff;display:grid;gap:26px;grid-template-columns:minmax(360px,1.45fr) minmax(310px,.9fr) minmax(260px,.75fr);min-height:94px;padding:14px 28px}
    .topbar-institution,.topbar-user{align-items:center;display:flex;min-width:0}.topbar-institution{gap:16px}.topbar-brand-mark{background:#fff;border:2px solid rgba(255,255,255,.72);border-radius:10px;box-shadow:0 5px 15px rgba(0,0,0,.2);flex:0 0 68px;height:68px;overflow:hidden;width:68px}.topbar-brand-mark img{height:100%;object-fit:contain;padding:3px;width:100%}.topbar-brand{min-width:0}.topbar-brand>span{color:#9fd2dc;font-size:11px;font-weight:800;letter-spacing:.12em;text-transform:uppercase}.topbar-brand h2{color:#fff;font-size:clamp(20px,1.6vw,29px);font-weight:800;line-height:1.1;margin:5px 0 0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.topbar-context{border-left:1px solid rgba(255,255,255,.22);display:grid;gap:9px;grid-template-columns:1fr 1fr;padding-left:26px}.topbar-context div,.topbar-user>div{display:grid;gap:3px}.topbar-context span,.topbar-user span{color:#9fd2dc;font-size:10px;font-weight:800;letter-spacing:.08em;text-transform:uppercase}.topbar-context strong{color:#fff;font-size:14px;line-height:1.2}.topbar-user{border-left:1px solid rgba(255,255,255,.22);gap:18px;justify-content:flex-end;padding-left:26px;text-align:right}.topbar-user strong{color:#fff;font-size:15px}.topbar-user small{color:#bfe3e8;font-size:12px}.topbar-user form{margin:0}.topbar-user button{background:#fff;border-color:#fff;color:#0b3c55;min-height:40px;padding:9px 16px}.topbar .mobile-menu-toggle{display:none}
}
@media (max-width:900px){.topbar-institution{align-items:center;display:flex;gap:10px;min-width:0}.topbar-context{display:none}.topbar-user>div{display:none}.topbar-user{display:flex}.topbar-brand h2{font-size:18px}.topbar-brand>span{font-size:10px}.topbar-brand-mark{flex:0 0 44px;height:44px;width:44px}}
.balanced-voucher-line{grid-template-columns:minmax(150px,1fr) minmax(110px,.45fr) minmax(160px,1fr) minmax(100px,.45fr)}

body .sidebar nav a.menu-dashboard,
body.menu-open .sidebar nav a.menu-dashboard,
body .sidebar nav a.menu-dashboard.is-active,
body .sidebar nav a.menu-dashboard:hover,
body .sidebar nav a.menu-dashboard:focus-visible {
    background: #edf7f8 !important;
    border-color: #cfe7ea !important;
    color: #102f45 !important;
    font-weight: 600 !important;
}

/* 2026 product polish: a brighter, calmer workspace across every module. */
:root {
    --accent-coral: #dc5f5f;
    --accent-sun: #e4a72b;
    --accent-sky: #2f80c1;
    --accent-leaf: #2b8a67;
    --surface-blue: #f2f8fc;
    --surface-green: #f1faf6;
    --surface-yellow: #fff9ea;
    --surface-rose: #fff4f4;
    --shadow-soft: 0 8px 24px rgba(19, 40, 61, 0.07);
}

body {
    background: #edf3f7;
}

.app-main {
    max-width: 1680px;
    min-width: 0;
}

.content-card,
.welcome-card,
.stat-grid article,
.module-grid a,
.setup-grid form,
.permission-card,
.access-note {
    box-shadow: var(--shadow-soft);
}

.content-card {
    overflow: hidden;
    position: relative;
}

.content-card > span:first-child {
    color: #287f86;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0;
    text-transform: uppercase;
}

.content-card > h1,
.content-card > div > h1 {
    font-size: 34px;
    line-height: 1.15;
}

.content-card::before {
    background: #287f86;
    content: "";
    height: 3px;
    left: 0;
    position: absolute;
    right: 0;
    top: 0;
}

.content-card:nth-of-type(4n + 2)::before {
    background: var(--accent-sky);
}

.content-card:nth-of-type(4n + 3)::before {
    background: var(--accent-leaf);
}

.content-card:nth-of-type(4n)::before {
    background: var(--accent-sun);
}

.setup-grid form,
.access-note {
    background: #ffffff;
}

.setup-grid form:nth-child(4n + 1) {
    border-top: 4px solid #287f86;
}

.setup-grid form:nth-child(4n + 2) {
    border-top: 4px solid var(--accent-sky);
}

.setup-grid form:nth-child(4n + 3) {
    border-top: 4px solid var(--accent-leaf);
}

.setup-grid form:nth-child(4n) {
    border-top: 4px solid var(--accent-sun);
}

input,
select,
textarea {
    background: #fbfdff;
}

input:focus,
select:focus,
textarea:focus {
    border-color: #287f86;
    box-shadow: 0 0 0 3px rgba(40, 127, 134, 0.14);
    outline: 0;
}

button,
.button-link {
    transition: background-color 160ms ease, border-color 160ms ease, transform 160ms ease;
}

button:hover,
.button-link:hover {
    transform: translateY(-1px);
}

th {
    background: #f3f7fa;
    color: #40566b;
    padding: 11px 8px;
}

td {
    padding: 11px 8px;
}

tbody tr:hover {
    background: #f7fbfd;
}

.teaching-register-table tbody tr:hover,
.teaching-register-table tbody tr:hover td,
.teaching-register-table tbody tr:hover a {
    color: #183247;
}

.student-register-table,
.student-register-table th,
.student-register-table td,
.student-register-table a,
.student-register-table tbody tr:hover,
.student-register-table tbody tr:hover td,
.student-register-table tbody tr:hover a {
    color: #183247 !important;
}

.student-register-table tbody tr,
.student-register-table tbody td {
    background: #ffffff !important;
}

.student-register-table tbody tr:hover {
    background: #eef8f8 !important;
}

.student-register-table tbody tr:hover td {
    background: #eef8f8 !important;
}

.app-authenticated .app-main a:not(.button-link):not(.danger-button) {
    color: #174f70;
}

.app-authenticated .app-main a:not(.button-link):not(.danger-button):hover {
    color: #102f45;
}

.app-authenticated .app-main table a,
.app-authenticated .app-main .responsive-table a,
.app-authenticated .app-main .today-list a,
.app-authenticated .app-main .mobile-summary-items a,
.app-authenticated .app-main .quick-action-list a,
.app-authenticated .app-main .request-links a,
.app-authenticated .app-main .workflow-tabs a,
.app-authenticated .app-main .service-directory a,
.app-authenticated .app-main .ledger-link-list a {
    color: #17384a;
}

.app-authenticated .app-main table a:hover,
.app-authenticated .app-main .responsive-table a:hover,
.app-authenticated .app-main .today-list a:hover,
.app-authenticated .app-main .mobile-summary-items a:hover,
.app-authenticated .app-main .quick-action-list a:hover,
.app-authenticated .app-main .request-links a:hover,
.app-authenticated .app-main .workflow-tabs a:hover,
.app-authenticated .app-main .service-directory a:hover,
.app-authenticated .app-main .ledger-link-list a:hover {
    color: #0f4f62;
}

.view-after-filter {
    border-top: 4px solid #287f86;
    margin-top: 18px;
}

.erp-action-row {
    cursor: pointer;
}

.erp-action-row:focus-visible,
.erp-action-row.is-action-open {
    background: #eef7f7;
    box-shadow: inset 3px 0 0 #287f86;
    outline: 0;
}

.erp-action-row .erp-row-actions > * {
    opacity: 0;
    pointer-events: none;
    transform: translateY(3px);
    transition: opacity 140ms ease, transform 140ms ease;
}

.erp-action-row.is-action-open .erp-row-actions > * {
    opacity: 1;
    pointer-events: auto;
    transform: none;
}

.erp-row-actions .danger-button,
.erp-row-actions .row-delete-action button {
    background: #ffffff;
    border-color: #e8a5a5;
    color: #a32626;
}

.erp-row-actions .row-action-buttons > a {
    background: #ffffff;
    border: 1px solid #9cb7c7;
    border-radius: 8px;
    color: #174f70;
    font-weight: 750;
    padding: 8px 11px;
}

.erp-action-item {
    cursor: pointer;
}

.erp-action-item:focus-visible,
.erp-action-item.is-action-open {
    box-shadow: 0 0 0 2px rgba(40, 127, 134, 0.22);
    outline: 0;
}

.erp-action-item .erp-item-actions {
    display: none;
}

.erp-action-item.is-action-open .erp-item-actions {
    display: block;
}

.stat-grid article:nth-child(4n + 1) {
    background: var(--surface-blue);
}

.stat-grid article:nth-child(4n + 2) {
    background: var(--surface-green);
}

.stat-grid article:nth-child(4n + 3) {
    background: var(--surface-yellow);
}

.stat-grid article:nth-child(4n) {
    background: var(--surface-rose);
}

.workflow-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 0 0 14px;
}

.workflow-tabs a {
    background: #ffffff;
    border: 1px solid var(--line);
    border-radius: 8px;
    color: #40566b;
    font-size: 14px;
    font-weight: 700;
    padding: 9px 12px;
}

.workflow-tabs a.is-active {
    background: #287f86;
    border-color: #287f86;
    color: #ffffff;
}

.table-wrap {
    max-width: 100%;
    overflow-x: auto;
}

.finance-report-selector {
    border-top-color: #287f86;
}

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

.report-card-grid a {
    background: #ffffff;
    border: 1px solid #d9e6eb;
    border-radius: 8px;
    color: #17384a !important;
    display: grid;
    gap: 8px;
    min-height: 120px;
    padding: 16px;
    position: relative;
    text-decoration: none;
}

.report-card-grid a::before {
    background: #287f86;
    border-radius: 8px 0 0 8px;
    bottom: 0;
    content: "";
    left: 0;
    position: absolute;
    top: 0;
    width: 4px;
}

.report-card-grid a:nth-child(2)::before { background: #1d7ed0; }
.report-card-grid a:nth-child(3)::before { background: #7a5bc8; }
.report-card-grid a:nth-child(4)::before { background: #b98212; }

.report-card-grid a:hover,
.report-card-grid a.is-active {
    background: #f5fbfd;
    border-color: #9bcfd1;
    transform: translateY(-1px);
}

.report-card-grid strong {
    color: #102f45;
    font-size: 17px;
    line-height: 1.25;
}

.report-card-grid span {
    color: #60717d;
    font-size: 13px;
    line-height: 1.4;
}

.single-report-view {
    display: block;
}

.report-statement {
    color: #17384a;
}

.report-statement h1 {
    margin-bottom: 4px;
}

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

.statement-columns > div {
    background: #f8fbfd;
    border: 1px solid #dbe7ed;
    border-radius: 8px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.statement-columns h3 {
    background: #eef6f8;
    border-bottom: 1px solid #dbe7ed;
    color: #17384a;
    font-size: 15px;
    font-weight: 650;
    margin: 0;
    padding: 12px 14px;
}

.statement-columns p,
.statement-line,
.statement-result,
.statement-closing-balances p {
    align-items: center;
    display: grid;
    gap: 16px;
    grid-template-columns: minmax(0, 1fr) minmax(120px, max-content);
    margin: 0;
    padding: 10px 14px;
}

.statement-columns p + p,
.cashflow-statement .statement-line + .statement-line,
.statement-closing-balances p + p {
    border-top: 1px solid #e4edf2;
}

.statement-section-title {
    background: #f0f5f7;
}

.statement-columns .statement-section-title span,
.statement-columns .statement-section-title strong {
    font-weight: 650;
}

.statement-subline span {
    color: #24465c;
    font-style: italic;
    padding-left: 18px;
}

.statement-subline strong {
    border-bottom: 1px solid #c7d4dc;
}

.statement-columns span,
.statement-line span,
.statement-result span,
.statement-closing-balances span {
    font-weight: 400;
    min-width: 0;
}

.statement-columns strong,
.statement-line strong,
.statement-result strong,
.statement-closing-balances strong {
    font-weight: 500;
    text-align: right;
    white-space: nowrap;
}

.statement-total,
.statement-result {
    background: #eef8f8;
    border-top: 1px solid #cde4e5;
}

.statement-total {
    margin-top: auto;
}

.statement-total-row {
    display: grid;
    gap: 18px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    margin-top: 0;
}

.statement-total span,
.statement-result span,
.statement-total strong,
.statement-result strong {
    font-weight: 650;
}

.statement-closing-balances {
    display: grid;
    gap: 10px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    margin-top: 14px;
}

.statement-closing-balances p {
    background: #fff9ea;
    border: 1px solid #ead9aa;
    border-radius: 8px;
}

.statement-health {
    align-items: center;
    border-radius: 8px;
    display: grid;
    gap: 16px;
    grid-template-columns: minmax(0, 1fr) minmax(120px, max-content);
    margin: 14px 0 0;
    padding: 12px 14px;
}

.statement-health.is-within-means {
    background: #eaf8f0;
    border: 1px solid #b8dec9;
    color: #174d31;
}

.statement-health.is-beyond-means {
    background: #fff2eb;
    border: 1px solid #efc4ad;
    color: #7a2f16;
}

.statement-health strong {
    text-align: right;
    white-space: nowrap;
}

@media (max-width: 980px) {
    .report-card-grid,
    .statement-columns,
    .statement-closing-balances {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 680px) {
    .app-main {
        padding: 10px;
    }

    .content-card,
    .welcome-card {
        padding: 15px;
    }

    .content-card > h1,
    .content-card > div > h1 {
        font-size: 26px;
    }

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

    .workflow-tabs a {
        align-items: center;
        display: flex;
        justify-content: center;
        min-height: 42px;
        text-align: center;
    }

    .responsive-table,
    .responsive-table tbody,
    .responsive-table tr,
    .responsive-table td {
        display: block;
        width: 100%;
    }

    .responsive-table {
        margin-top: 12px;
    }

    .responsive-table thead {
        clip: rect(0 0 0 0);
        height: 1px;
        overflow: hidden;
        position: absolute;
        width: 1px;
    }

    .responsive-table tbody {
        display: grid;
        gap: 10px;
    }

    .responsive-table tbody tr {
        background: #ffffff;
        border: 1px solid var(--line);
        border-left: 4px solid #287f86;
        border-radius: 8px;
        box-shadow: 0 5px 14px rgba(19, 40, 61, 0.05);
        padding: 6px 12px;
    }

    .responsive-table tbody tr:nth-child(4n + 2) {
        border-left-color: var(--accent-sky);
    }

    .responsive-table tbody tr:nth-child(4n + 3) {
        border-left-color: var(--accent-leaf);
    }

    .responsive-table tbody tr:nth-child(4n) {
        border-left-color: var(--accent-sun);
    }

    .responsive-table td {
        align-items: start;
        border-bottom: 1px solid #e7edf2;
        display: grid;
        gap: 12px;
        grid-template-columns: minmax(92px, 0.42fr) minmax(0, 1fr);
        overflow-wrap: anywhere;
        padding: 9px 0;
    }

    .responsive-table td:last-child {
        border-bottom: 0;
    }

    .responsive-table td::before {
        color: #607386;
        content: attr(data-label);
        font-size: 12px;
        font-weight: 800;
        text-transform: uppercase;
    }

    .erp-action-row .erp-row-actions {
        display: none;
    }

    .erp-action-row.is-action-open .erp-row-actions {
        display: grid;
    }

    .list-card {
        overflow: visible;
    }
}

/* Request-driven module pages */
.request-card-grid {
    display: grid;
    gap: 14px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    margin: 14px 0;
}

.request-card,
.maintenance-card {
    background: #ffffff;
    border: 1px solid var(--line);
    border-radius: 10px;
    box-shadow: var(--shadow-soft);
    padding: 20px;
}

.request-card {
    display: grid;
    gap: 12px;
}

.request-card > span,
.request-links a span {
    color: var(--muted);
    font-size: 13px;
}

.request-card h2 {
    margin: 0;
}

.request-links {
    display: grid;
    gap: 10px;
    grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
    margin-top: 14px;
}

.request-links a {
    background: #f5fbfd;
    border: 1px solid #cfe7ea;
    border-radius: 8px;
    color: #173e52;
    display: grid;
    gap: 3px;
    min-height: 54px;
    padding: 12px;
}

.request-links a:nth-child(4n + 2) {
    background: var(--surface-blue);
    border-color: #d9e8f6;
}

.request-links a:nth-child(4n + 3) {
    background: var(--surface-green);
    border-color: #d4eadf;
}

.request-links a:nth-child(4n) {
    background: var(--surface-yellow);
    border-color: #efe2bd;
}

.request-search-form {
    align-items: end;
    display: grid;
    gap: 12px;
    grid-template-columns: minmax(0, 1fr) auto;
    margin-bottom: 16px;
}

.paysheet-number {
    min-width: 90px;
    width: 100%;
}

.payroll-edit-form {
    margin-bottom: 6px;
}

.app-footer {
    background: linear-gradient(135deg, var(--blue), #287f86);
    border: 0;
    color: #ffffff;
}

.app-footer nav a,
.app-footer p {
    color: #ffffff;
}

.app-footer nav a {
    background: rgba(255, 255, 255, 0.12);
    border-color: rgba(255, 255, 255, 0.26);
}

.marksheet-header {
    display: flex;
    flex-direction: column;
    justify-content: center;
    text-align: center;
}

@media (max-width: 680px) {
    .request-card-grid {
        grid-template-columns: 1fr;
    }

    .user-console-stats,
    .compact-four-stats {
        display: grid;
        gap: 6px;
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }

    .user-console-stats article,
    .compact-four-stats article {
        min-width: 0;
        padding: 8px 4px;
        text-align: center;
    }

    .user-console-stats span,
    .compact-four-stats span {
        font-size: 9px;
    }

    .user-console-stats strong,
    .compact-four-stats strong {
        font-size: 20px;
    }

    .request-search-form {
        grid-template-columns: 1fr;
    }
}

@media print {
    @page {
        size: A4 portrait;
        margin: 8mm;
    }

    .marksheet-page {
        box-sizing: border-box;
        height: 277mm;
        max-height: 277mm;
        overflow: hidden;
        page-break-after: avoid;
        page-break-before: avoid;
        width: 194mm;
    }

    .marksheet-header {
        display: flex;
        flex-direction: column;
        justify-content: center;
        text-align: center;
    }

    .marksheet-signatures {
        margin-top: 34px;
    }
}

/* Request-driven ERP pages */
.public-growth-showcase{background:linear-gradient(135deg,#fffaf0 0%,#f3fbf8 52%,#f5f9ff 100%);border:1px solid var(--line);border-radius:8px;display:grid;gap:24px;grid-template-columns:minmax(280px,.78fr) minmax(0,1.22fr);margin:18px auto 0;max-width:1180px;overflow:hidden;padding:28px;position:relative}.public-growth-showcase::before{background:linear-gradient(90deg,#b98212,#169b79,#1d7ed0);content:"";height:5px;left:0;position:absolute;right:0;top:0}.growth-intro>span{background:#fff;border:1px solid #e5d9bd;border-radius:999px;color:#7a4f07;display:inline-flex;font-size:13px;font-weight:900;padding:7px 12px;text-transform:uppercase}.growth-intro h2{color:#102f45;font-size:32px;line-height:1.12;margin:16px 0 12px}.growth-intro p{color:var(--muted);font-size:17px;line-height:1.55}.growth-intro>a{background:#102f45;border-radius:8px;color:#fff;display:inline-flex;font-weight:850;margin-top:8px;min-height:42px;padding:10px 14px}.growth-activity-grid{display:grid;gap:10px;grid-template-columns:repeat(2,minmax(0,1fr))}.growth-activity-grid article{background:rgba(255,255,255,.92);border:1px solid rgba(16,47,69,.12);border-radius:8px;display:grid;gap:5px;grid-template-columns:38px minmax(0,1fr);padding:14px}.growth-activity-grid article:last-child{grid-column:1/-1}.growth-activity-grid i{align-items:center;background:#102f45;border-radius:8px;color:#fff;display:flex;font-size:12px;font-style:normal;font-weight:900;grid-row:1/span 2;height:38px;justify-content:center}.growth-activity-grid article:nth-child(2) i{background:#287f86}.growth-activity-grid article:nth-child(3) i{background:#1d7ed0}.growth-activity-grid article:nth-child(4) i{background:#b98212}.growth-activity-grid article:nth-child(5) i{background:#b44174}.growth-activity-grid strong{color:#17384a}.growth-activity-grid span{color:var(--muted);font-size:14px;line-height:1.4}.public-slideshow .activities-card .info-bg{fill:#fffcf5}.public-slideshow .activities-card .info-title{fill:#7a4f07}.public-slideshow .activities-card .activity-tile{fill:#fff;stroke:#e7d9bb}.public-slideshow .activities-card .activity-homework{fill:#f5f9ff;stroke:#bad8f3}.public-slideshow .activities-card .activity-project{fill:#f3fbf8;stroke:#b9e3d6}.public-slideshow .activities-card .activity-quiz{fill:#fff7e6;stroke:#efd39d}.public-slideshow .activities-card .activity-sports{fill:#fff1f5;stroke:#efc2d5}.public-slideshow .activities-card .activity-award{fill:#f4f0fb;stroke:#d8caec}.public-slideshow .activities-card .activity-path{stroke:#b98212;stroke-width:4}
.service-choice-card{background:#fbfcfd;border-color:#dfe7ec;box-shadow:0 6px 18px rgba(19,40,61,.05)}
.service-directory{align-items:stretch;display:grid;gap:8px;grid-template-columns:repeat(4,minmax(0,1fr));margin-top:14px}
.service-directory>section{background:#f8fafb;border:1px solid #dde7eb;border-radius:8px;padding:9px}
.service-directory>section>span{color:#60717d;display:block;font-size:10px;letter-spacing:.06em;margin-bottom:6px;text-transform:uppercase}
.service-directory>section>div{display:grid;gap:5px;grid-template-columns:repeat(auto-fit,minmax(118px,1fr))}
.service-directory a{background:#fff;border:1px solid #e2e9ed;border-radius:7px;color:#24495b;font-size:12px;font-weight:750;line-height:1.2;min-height:34px;padding:8px 9px}
.compact-service-directory.workflow-tabs-after,.workflow-tabs-after{border-top:1px solid #e0e8ec;margin-top:16px;padding-top:10px}
.parent-ward-card{background:#fbfcfd;border-color:#e1e8ec;box-shadow:0 4px 14px rgba(19,40,61,.04)}
.parent-ward-card::before{display:none}.parent-ward-card .stat-grid article{background:transparent;border:1px solid #e4eaed;box-shadow:none;min-height:88px}
.voucher-form input,.voucher-form select,.voucher-form textarea,.voucher-form label{box-sizing:border-box;max-width:100%;min-width:0;width:100%}
.academic-audit-list{display:grid;gap:10px;margin-top:18px}.academic-audit-item{align-items:center;background:#f8fafb;border:1px solid #dfe8ec;border-left:4px solid #2f8f91;border-radius:10px;color:#17384a;display:grid;gap:4px 14px;grid-template-columns:1fr auto;padding:14px}.academic-audit-item span{color:#60717d;font-size:13px;grid-column:1}.academic-audit-item b{font-size:22px;grid-column:2;grid-row:1/span 2}.academic-audit-item.is-attention{border-left-color:#c87922}.activity-form select[multiple],select[multiple]{min-height:180px}
.academic-health-summary,.stock-three-stats{grid-template-columns:repeat(3,minmax(0,1fr))!important}
@media(max-width:680px){.public-growth-showcase,.growth-activity-grid{grid-template-columns:1fr}.public-growth-showcase{gap:18px;padding:22px}.growth-intro h2{font-size:28px}.growth-activity-grid article:last-child{grid-column:auto}.service-directory{grid-template-columns:repeat(2,minmax(0,1fr))}.service-directory>section{padding:8px}.service-directory>section>div{grid-template-columns:1fr}.workflow-tabs-after{display:grid}.voucher-form{border-radius:10px;border-top-width:3px;padding:14px}.voucher-form-head,.voucher-footer,.voucher-print-actions{align-items:stretch;display:grid;gap:10px}.voucher-form-head>strong{font-size:18px;padding:10px 12px}.voucher-meta-grid,.voucher-line,.voucher-line-head,.payment-voucher-form,.form-grid{grid-template-columns:1fr!important}.voucher-line{background:#f8fafb;border:1px solid #dfe8ec;border-radius:10px;gap:10px;margin-bottom:10px;padding:12px}.voucher-form button,.voucher-footer button,.voucher-print-actions a,.voucher-print-actions button{justify-content:center;width:100%}.voucher-document-table{min-width:0;width:100%}}

/* 2026-06-16 desktop shell repair: one header, no duplicate left rail. */
@media (min-width: 901px) {
    .app-shell {
        display: block !important;
        min-height: 100vh;
    }

    .erp-site-header {
        align-items: center;
        background: rgba(255, 255, 255, 0.96) !important;
        box-shadow: 0 8px 24px rgba(22, 54, 75, 0.08);
        display: flex !important;
        gap: 18px;
        min-height: 88px;
        overflow: visible;
        padding: 10px 24px !important;
        position: sticky;
        top: 0;
        z-index: 50;
    }

    .erp-site-header > .topbar {
        align-items: center;
        background: linear-gradient(105deg, #082b43 0%, #0d3d58 48%, #12566d 100%) !important;
        border: 0 !important;
        border-radius: 0;
        box-shadow: none !important;
        color: #ffffff;
        display: grid !important;
        flex: 0 1 660px;
        gap: 18px !important;
        grid-template-columns: minmax(250px, 1.25fr) minmax(220px, .8fr) auto !important;
        margin: 0 !important;
        min-height: 68px !important;
        min-width: 0;
        overflow: hidden;
        padding: 10px 18px !important;
    }

    .erp-site-header .topbar-institution,
    .erp-site-header .topbar-user {
        min-width: 0;
    }

    .erp-site-header .topbar-brand-mark {
        flex: 0 0 50px !important;
        height: 50px !important;
        width: 50px !important;
    }

    .erp-site-header .topbar-brand h2 {
        color: #ffffff;
        font-size: clamp(17px, 1.35vw, 24px) !important;
        line-height: 1.12;
        margin: 4px 0 0;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .erp-site-header .topbar-brand > span,
    .erp-site-header .topbar-context span,
    .erp-site-header .topbar-user span {
        color: #9fd2dc !important;
    }

    .erp-site-header > .sidebar {
        background: transparent !important;
        border: 0 !important;
        box-shadow: none !important;
        display: flex !important;
        flex: 1 1 auto !important;
        min-width: 0;
        order: 0;
        padding: 0 !important;
    }

    .erp-site-header .sidebar > .brand {
        display: none !important;
    }

    .erp-site-header .sidebar nav {
        align-items: center !important;
        display: flex !important;
        flex: 1 1 auto;
        gap: 12px !important;
        justify-content: flex-end !important;
        margin: 0 !important;
        min-width: 0;
    }

    .erp-site-header .sidebar nav > a,
    .erp-site-header .sidebar .menu-group > summary {
        align-items: center;
        background: transparent !important;
        border: 0 !important;
        color: #17384a !important;
        display: inline-flex !important;
        font-size: 13px !important;
        font-weight: 550 !important;
        line-height: 1.2;
        margin: 0 !important;
        min-height: 40px;
        padding: 8px 6px !important;
        text-transform: none !important;
        white-space: nowrap;
    }

    .erp-site-header .sidebar nav > a.menu-dashboard,
    .erp-site-header .sidebar nav > a.is-active,
    .erp-site-header .sidebar .menu-group.has-active-link > summary,
    .erp-site-header .sidebar .menu-group[open] > summary {
        color: #147b78 !important;
    }

    .app-main {
        margin: 0 auto !important;
        max-width: 1680px !important;
        padding: 20px 24px 28px !important;
        width: 100%;
    }

    .admin-daily-hero {
        margin-top: 0;
    }
}

/* 2026-06-16 desktop header correction: prevent brand/user overlap. */
@media (min-width: 901px) {
    .erp-site-header {
        align-items: stretch !important;
        display: grid !important;
        gap: 0 !important;
        grid-template-columns: 1fr !important;
        min-height: 0 !important;
        padding: 0 !important;
        position: sticky;
        top: 0;
        z-index: 50;
    }

    .erp-site-header > .topbar {
        border-radius: 0 !important;
        display: grid !important;
        flex: none !important;
        gap: 24px !important;
        grid-template-columns: minmax(360px, 1.25fr) minmax(280px, .9fr) minmax(240px, .7fr) !important;
        min-height: 92px !important;
        overflow: visible !important;
        padding: 14px 34px !important;
        width: 100% !important;
    }

    .erp-site-header .topbar-institution {
        align-items: center;
        display: flex;
        gap: 16px;
        min-width: 0;
    }

    .erp-site-header .topbar-brand {
        min-width: 0;
    }

    .erp-site-header .topbar-brand h2 {
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .erp-site-header .topbar-context {
        align-items: center;
        border-left: 1px solid rgba(255, 255, 255, 0.24);
        display: grid !important;
        gap: 18px;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        min-width: 0;
        padding-left: 24px;
    }

    .erp-site-header .topbar-user {
        align-items: center;
        border-left: 1px solid rgba(255, 255, 255, 0.24);
        display: flex !important;
        gap: 18px;
        justify-content: flex-end;
        min-width: 0;
        padding-left: 24px;
        text-align: right;
    }

    .erp-site-header .topbar-user > div {
        min-width: 0;
    }

    .erp-site-header .topbar-user strong,
    .erp-site-header .topbar-user small {
        display: block;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .erp-site-header .topbar-user form {
        flex: 0 0 auto;
        margin: 0;
    }

    .erp-site-header > .sidebar {
        background: #ffffff !important;
        border-bottom: 1px solid #dfe8ec !important;
        display: block !important;
        width: 100%;
    }

    .erp-site-header .sidebar nav {
        display: flex !important;
        gap: 24px !important;
        justify-content: center !important;
        min-height: 58px;
        overflow: visible;
        padding: 0 24px;
    }

    .erp-site-header .sidebar nav > a,
    .erp-site-header .sidebar .menu-group > summary {
        min-height: 58px;
        padding: 18px 0 !important;
    }

    .app-main {
        padding-top: 24px !important;
    }
}

/* 2026-06-17 mobile shell correction: keep uploaded school logos inside the header. */
@media (max-width: 900px) {
    html,
    body,
    .app-shell,
    .erp-site-header,
    .topbar,
    .app-main {
        max-width: 100%;
        overflow-x: hidden;
    }

    .app-shell {
        display: block !important;
    }

    .erp-site-header {
        background: #102f45;
        border-radius: 0 0 10px 10px;
        overflow: visible;
        position: relative;
        z-index: 40;
    }

    .erp-site-header > .topbar {
        align-items: center !important;
        border: 0 !important;
        border-radius: 0 0 10px 10px !important;
        box-shadow: none !important;
        display: grid !important;
        gap: 10px !important;
        grid-template-columns: 44px minmax(0, 1fr) auto !important;
        margin: 0 !important;
        min-height: 76px;
        overflow: hidden;
        padding: 12px 14px !important;
        width: 100%;
    }

    .erp-site-header .mobile-menu-toggle {
        grid-column: 1;
        grid-row: 1;
        height: 44px;
        width: 44px;
    }

    .erp-site-header .topbar-institution {
        align-items: center;
        display: flex;
        gap: 8px;
        grid-column: 2;
        grid-row: 1;
        min-width: 0;
        overflow: hidden;
    }

    .erp-site-header .topbar-brand-mark {
        align-items: center;
        background: #ffffff;
        border: 1px solid rgba(255, 255, 255, 0.65);
        border-radius: 8px;
        display: flex;
        flex: 0 0 36px !important;
        height: 36px !important;
        justify-content: center;
        max-height: 36px;
        max-width: 36px;
        overflow: hidden;
        width: 36px !important;
    }

    .erp-site-header .topbar-brand-mark img {
        display: block;
        height: 100% !important;
        max-height: 100%;
        max-width: 100%;
        object-fit: contain;
        padding: 2px;
        width: 100% !important;
    }

    .erp-site-header .topbar-brand {
        min-width: 0;
        overflow: hidden;
    }

    .erp-site-header .topbar-brand > span {
        display: block;
        font-size: 9px !important;
        line-height: 1.1;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .erp-site-header .topbar-brand h2 {
        font-size: 16px !important;
        line-height: 1.15;
        margin: 3px 0 0;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .erp-site-header .topbar-context,
    .erp-site-header .topbar-user > div {
        display: none !important;
    }

    .erp-site-header .topbar-user {
        border-left: 0;
        display: flex !important;
        grid-column: 3;
        grid-row: 1;
        justify-content: flex-end;
        min-width: 0;
        padding-left: 0;
    }

    .erp-site-header .topbar-user form {
        margin: 0;
    }

    .erp-site-header .topbar-user button {
        min-height: 40px;
        padding: 8px 12px;
        white-space: nowrap;
    }

    .app-main {
        padding: 14px 10px 20px !important;
    }

    .admin-daily-hero {
        margin-top: 0;
    }
}

@media (max-width: 380px) {
    .erp-site-header > .topbar {
        grid-template-columns: 42px minmax(0, 1fr) auto !important;
        padding-left: 10px !important;
        padding-right: 10px !important;
    }

    .erp-site-header .topbar-brand-mark {
        display: none;
    }

    .erp-site-header .topbar-brand h2 {
        font-size: 14px !important;
    }

    .erp-site-header .topbar-user button {
        padding-left: 10px;
        padding-right: 10px;
    }
}

/* Final desktop nested menu hover override: nested panels pull out on hover. */
@media (hover: hover) and (min-width: 901px) {
    .erp-site-header,
    .erp-site-header > .sidebar,
    .erp-site-header .sidebar nav,
    .erp-site-header .sidebar .menu-group,
    .erp-site-header .sidebar .menu-subgroup {
        overflow: visible !important;
    }

    .erp-site-header {
        isolation: isolate;
        z-index: 2000 !important;
    }

    .app-main {
        position: relative;
        z-index: 1;
    }

    .erp-site-header .sidebar .menu-group {
        position: relative;
    }

    .erp-site-header .sidebar .menu-group > .mega-panel {
        z-index: 2100 !important;
    }

    .erp-site-header .sidebar .menu-subgroup {
        position: relative !important;
    }

    .erp-site-header .sidebar .menu-subgroup > summary {
        cursor: pointer !important;
    }

    .erp-site-header .sidebar .menu-subgroup > .submenu-panel {
        background: #ffffff;
        border: 1px solid #d9e6eb;
        border-radius: 8px;
        box-shadow: 0 16px 34px rgba(16, 47, 69, 0.14);
        display: grid !important;
        gap: 4px;
        left: calc(100% + 12px) !important;
        min-width: 230px;
        opacity: 0;
        padding: 8px;
        pointer-events: none;
        position: absolute !important;
        right: auto !important;
        top: 0;
        transform: translateX(8px);
        transition: opacity 140ms ease, transform 140ms ease, visibility 140ms ease;
        visibility: hidden;
        z-index: 2200 !important;
    }

    .erp-site-header .sidebar .menu-subgroup[open] > .submenu-panel,
    .erp-site-header .sidebar .menu-subgroup:hover > .submenu-panel,
    .erp-site-header .sidebar .menu-subgroup:focus-within > .submenu-panel {
        opacity: 1;
        pointer-events: auto;
        transform: translateX(0);
        visibility: visible;
    }

    .erp-site-header .sidebar .menu-subgroup > .submenu-panel::before {
        content: "";
        height: 100%;
        left: -16px !important;
        position: absolute;
        right: auto !important;
        top: 0;
        width: 16px;
    }

    .erp-site-header .sidebar .menu-group.reports .menu-subgroup > .submenu-panel {
        left: auto !important;
        right: calc(100% + 12px) !important;
        transform: translateX(-8px);
    }

    .erp-site-header .sidebar .menu-group.reports .menu-subgroup[open] > .submenu-panel,
    .erp-site-header .sidebar .menu-group.reports .menu-subgroup:hover > .submenu-panel,
    .erp-site-header .sidebar .menu-group.reports .menu-subgroup:focus-within > .submenu-panel {
        transform: translateX(0);
    }

    .erp-site-header .sidebar .menu-group.reports .menu-subgroup > .submenu-panel::before {
        left: auto !important;
        right: -16px !important;
    }

    .erp-site-header .sidebar .submenu-panel a {
        margin-left: 0 !important;
        white-space: nowrap;
    }
}

/* Last rule: desktop menus must float above dashboard and never resize the row. */
@media (hover: hover) and (min-width: 901px) {
    .erp-site-header {
        isolation: isolate;
        overflow: visible !important;
        position: sticky !important;
        z-index: 3000 !important;
    }

    .erp-site-header > .sidebar,
    .erp-site-header .sidebar nav,
    .erp-site-header .sidebar .menu-group {
        overflow: visible !important;
    }

    .app-main {
        position: relative;
        z-index: 1;
    }

    .erp-site-header .sidebar .menu-group {
        position: relative !important;
    }

    .erp-site-header .sidebar .menu-group > .mega-panel {
        background: #ffffff;
        border: 1px solid #d9e6eb;
        border-radius: 8px;
        box-shadow: 0 18px 38px rgba(16, 47, 69, 0.14);
        display: grid !important;
        gap: 8px;
        left: 0 !important;
        min-width: 260px;
        opacity: 0;
        padding: 10px;
        pointer-events: none;
        position: absolute !important;
        right: auto !important;
        top: 100%;
        transform: translateY(8px);
        transition: opacity 140ms ease, transform 140ms ease, visibility 140ms ease;
        visibility: hidden;
        z-index: 3100 !important;
    }

    .erp-site-header .sidebar .menu-group[open] > .mega-panel,
    .erp-site-header .sidebar .menu-group:hover > .mega-panel,
    .erp-site-header .sidebar .menu-group:focus-within > .mega-panel {
        opacity: 1;
        pointer-events: auto;
        transform: translateY(0);
        visibility: visible;
    }

    .erp-site-header .sidebar .menu-group.finance > .mega-panel,
    .erp-site-header .sidebar .menu-group.reports > .mega-panel {
        left: auto !important;
        right: 0 !important;
    }

    .erp-site-header .sidebar .menu-subgroup > .submenu-panel {
        z-index: 3200 !important;
    }
}

/* Live upload override: report totals, dashboard contrast, and footer menu. */
.statement-total-row .statement-total {
    align-items: center !important;
    display: grid !important;
    gap: 16px !important;
    grid-template-columns: minmax(0, 1fr) minmax(120px, max-content) !important;
    margin-top: 0 !important;
    padding: 10px 14px !important;
}

.statement-total-row .statement-total strong {
    justify-self: end;
    text-align: right !important;
}

.admin-daily-hero {
    background:
        radial-gradient(circle at 88% 18%, rgba(255, 207, 129, 0.28) 0 58px, transparent 60px),
        linear-gradient(120deg, #0f5f62 0%, #365d8f 56%, #6f4f86 100%) !important;
    border: 0 !important;
    box-shadow: 0 18px 40px rgba(15, 95, 98, 0.18) !important;
    color: #ffffff !important;
}

.admin-daily-hero span,
.admin-daily-hero h1,
.admin-daily-hero p {
    color: #ffffff !important;
}

.admin-daily-hero span {
    background: rgba(255, 255, 255, 0.16) !important;
    border: 1px solid rgba(255, 255, 255, 0.24) !important;
    border-radius: 999px;
    display: inline-flex;
}

.dashboard-panel {
    border-top-color: #0f766e !important;
    box-shadow: 0 14px 30px rgba(28, 61, 79, 0.09);
}

.dashboard-summary-grid .dashboard-panel:nth-child(2) {
    border-top-color: #5068b8 !important;
}

.dashboard-summary-grid .dashboard-panel:nth-child(3) {
    border-top-color: #b06b3b !important;
}

.today-list div,
.today-list a,
.quick-action-list a {
    background: #f8faf9 !important;
    border-color: #cbdce0 !important;
}

.quick-action-list a:nth-child(4n + 1) {
    background: #f8f7fc !important;
}

.quick-action-list a:nth-child(4n + 2) {
    background: #f5f9fb !important;
}

.quick-action-list a:nth-child(4n + 3) {
    background: #f5faf7 !important;
}

.quick-action-list a:nth-child(4n) {
    background: #fff8ef !important;
}

.today-list strong,
.daily-update-grid strong {
    color: #0f5f62 !important;
}

.quick-action-list strong {
    color: #193849 !important;
}

.quick-action-list span,
.today-list span {
    color: #405967 !important;
}

.page-bottom-actions a,
.page-bottom-actions button {
    background: #ffffff !important;
    border-color: #b8d1d8 !important;
    color: #174555 !important;
}

.app-footer {
    background: linear-gradient(135deg, #17343a 0%, #24555a 58%, #493c63 100%) !important;
    border: 0 !important;
    box-shadow: 0 18px 40px rgba(23, 52, 58, 0.18);
    color: #ffffff !important;
}

.app-footer nav a {
    background: rgba(255, 255, 255, 0.94) !important;
    border-color: rgba(255, 255, 255, 0.78) !important;
    color: #17343a !important;
}

.app-footer nav a:hover {
    background: #fff4dc !important;
    color: #2b2a40 !important;
}

.app-footer p {
    color: #f4fbfb !important;
}
