:root {
    --font-base: "Manrope", sans-serif;
    --font-display: "Sora", sans-serif;
    --radius-md: 14px;
    --radius-lg: 24px;
    --shadow-soft: 0 10px 30px rgba(0, 0, 0, 0.08);

    --bg: #f4f8fb;
    --bg-elevated: #ffffff;
    --surface: #ffffff;
    --text: #0f172a;
    --muted: #4b5563;

    --brand-700: #005f73;
    --brand-600: #0a7f96;
    --brand-500: #14a0bf;
    --accent: #ffb703;
    --danger: #b3261e;
    --ring: rgba(20, 160, 191, 0.4);
}

html[data-theme="dark"] {
    --bg: #081019;
    --bg-elevated: #112031;
    --surface: #112031;
    --text: #e2ebf6;
    --muted: #9fb2c9;
    --brand-700: #14a0bf;
    --brand-600: #2ab0cc;
    --brand-500: #5fd5ec;
    --accent: #ffd166;
    --ring: rgba(95, 213, 236, 0.35);
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: var(--font-base);
    color: var(--text);
    background: var(--bg);
    min-height: 100vh;
}

h1,
h2,
h3,
h4,
.display-font {
    font-family: var(--font-display);
    letter-spacing: -0.02em;
}

.app-navbar {
    background-color: var(--bg-elevated);
    border-bottom: 1px solid rgba(148, 163, 184, 0.2);
}

.brand-mark {
    width: auto;
    height: 34px;
    padding: 0 0.5rem;
    display: inline-grid;
    place-items: center;
    border-radius: 11px;
    font-weight: 800;
    color: #ffffff;
    background: var(--brand-700);
    box-shadow: var(--shadow-soft);
}

.brand-logo {
    width: auto;
    min-width: 34px;
    height: 34px;
    border-radius: 11px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    background: #ffffff;
    padding: 0 4px;
}

.brand-logo img {
    width: auto;
    height: 100%;
    max-width: 100%;
    object-fit: contain;
}

.btn-brand {
    border: 0;
    color: #ffffff;
    background: var(--brand-700);
}

.btn-brand:hover,
.btn-brand:focus {
    color: #ffffff;
    transform: translateY(-1px);
    background: var(--brand-600);
}

.btn-outline-brand {
    border-color: var(--brand-600);
    color: var(--brand-700);
}

.btn-outline-brand:hover,
.btn-outline-brand:focus {
    color: #ffffff;
    background-color: var(--brand-600);
    border-color: var(--brand-600);
}

.btn-theme {
    border: 1px solid rgba(10, 127, 150, 0.3);
    color: var(--text);
    border-radius: 999px;
}

.hero {
    padding: 5rem 0 3rem;
}

.hero-grid {
    display: grid;
    gap: 1.5rem;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    align-items: center;
}

.glass-card {
    background: var(--bg-elevated);
    border: 1px solid rgba(148, 163, 184, 0.2);
    box-shadow: var(--shadow-soft);
    border-radius: var(--radius-lg);
}

.hero-card,
.metric-card,
.plan-card,
.feature-card,
.testimonial-card,
.faq-card,
.contact-card {
    padding: 1.25rem;
}

.badge-soft {
    background-color: rgba(20, 160, 191, 0.15);
    color: var(--brand-700);
    border-radius: 999px;
    padding: 0.35rem 0.7rem;
    font-size: 0.8rem;
}

.section-space {
    padding: 4.5rem 0;
}

.feature-grid,
.plan-grid,
.metrics-grid,
.logo-grid,
.footer-grid {
    display: grid;
    gap: 1rem;
}

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

.plan-grid {
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
}

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

.logo-grid {
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    opacity: 0.8;
}

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

.metric-card h3 {
    margin: 0;
    font-size: 1.45rem;
}

.plan-price {
    font-size: 2rem;
    font-family: var(--font-display);
}

.plan-highlight {
    border: 1px solid rgba(20, 160, 191, 0.55);
    transform: translateY(-4px);
}

.icon-badge {
    width: 42px;
    height: 42px;
    border-radius: 12px;
    display: inline-grid;
    place-items: center;
    color: #fff;
    background: var(--brand-700);
    margin-bottom: 0.8rem;
}

.app-main {
    padding: 1.5rem 0 2rem;
}

.dashboard-layout {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
}

.app-sidebar {
    padding: 1rem;
    position: sticky;
    top: 90px;
    height: fit-content;
}

.sidebar-head {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    border-bottom: 1px solid rgba(148, 163, 184, 0.25);
    padding-bottom: 0.9rem;
    margin-bottom: 1rem;
}

.sidebar-brand-logo {
    width: auto;
    min-width: 46px;
    height: 46px;
    flex: 0 0 auto;
}

.sidebar-brand-logo .brand-logo,
.sidebar-brand-logo .brand-mark {
    width: auto;
    min-width: 46px;
    height: 46px;
    border-radius: 13px;
}

.sidebar-menu-title {
    font-size: 0.72rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--muted);
    font-weight: 700;
}

.sidebar-nav .nav-link {
    color: var(--text);
    border-radius: 10px;
    margin-bottom: 0.2rem;
}

.sidebar-nav .nav-link:hover,
.sidebar-nav .nav-link:focus {
    background-color: rgba(20, 160, 191, 0.14);
}

.auth-wrap {
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: clamp(1rem, 3vw, 2.5rem);
    background:
        radial-gradient(circle at 12% 10%, rgba(20, 160, 191, 0.16), transparent 28rem),
        radial-gradient(circle at 92% 86%, rgba(212, 160, 23, 0.12), transparent 24rem),
        #f4f7fb;
}

.auth-page .app-navbar {
    display: none;
}

.auth-shell {
    display: grid;
    width: min(1180px, 100%);
    min-height: 700px;
    grid-template-columns: minmax(0, 0.92fr) minmax(440px, 1.08fr);
    overflow: hidden;
    border: 1px solid rgba(148, 163, 184, 0.24);
    border-radius: 2rem;
    background: #fff;
    box-shadow: 0 32px 90px -42px rgba(15, 23, 42, 0.48);
}

.auth-shell--login {
    width: min(1060px, 100%);
    min-height: 650px;
    grid-template-columns: minmax(0, 1fr) minmax(420px, 0.9fr);
}

.auth-visual {
    position: relative;
    min-height: 100%;
    overflow: hidden;
    background: #123744;
}

.auth-visual > img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    transition: transform 0.8s ease;
}

.auth-shell:hover .auth-visual > img {
    transform: scale(1.025);
}

.auth-visual__overlay {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(180deg, rgba(6, 35, 45, 0.16) 18%, rgba(5, 27, 38, 0.92) 100%),
        linear-gradient(90deg, rgba(8, 107, 135, 0.2), transparent 55%);
}

.auth-visual__content {
    position: absolute;
    z-index: 1;
    right: 0;
    bottom: 0;
    left: 0;
    padding: clamp(2rem, 5vw, 3.5rem);
    color: #fff;
}

.auth-visual__content h2 {
    max-width: 13ch;
    margin: 1rem 0 0.85rem;
    color: #fff;
    font-family: var(--font-display);
    font-size: clamp(2rem, 3.3vw, 3.25rem);
    line-height: 1.06;
}

.auth-visual__content p {
    max-width: 34rem;
    margin: 0;
    color: rgba(255, 255, 255, 0.78);
    font-size: 1rem;
    line-height: 1.7;
}

.auth-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 0.8rem;
    border: 1px solid rgba(255, 255, 255, 0.28);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.12);
    backdrop-filter: blur(12px);
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.auth-proof,
.auth-feature-list {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin-top: 1.5rem;
    padding: 0;
    color: rgba(255, 255, 255, 0.9);
    font-size: 0.82rem;
    font-weight: 650;
    list-style: none;
}

.auth-proof span,
.auth-feature-list li {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
}

.auth-proof i,
.auth-feature-list i {
    color: #f3c64f;
}

.auth-panel {
    display: grid;
    place-items: center;
    padding: clamp(2rem, 5vw, 4.5rem);
    background: rgba(255, 255, 255, 0.98);
}

.auth-panel__inner {
    width: min(420px, 100%);
}

.auth-panel__inner--wide {
    width: min(600px, 100%);
}

.auth-brand {
    display: inline-flex;
    align-items: center;
    gap: 0.7rem;
    color: #172033;
    font-family: var(--font-display);
    font-weight: 800;
    text-decoration: none;
}

.auth-brand__mark {
    display: grid;
    width: 2.65rem;
    height: 2.65rem;
    place-items: center;
    border-radius: 0.85rem;
    background: linear-gradient(135deg, #086b87, #14a0bf);
    color: #fff;
    box-shadow: 0 10px 22px -10px rgba(8, 107, 135, 0.8);
}

.auth-heading {
    margin: 2.2rem 0 1.8rem;
}

.auth-kicker {
    display: block;
    margin-bottom: 0.55rem;
    color: #08758f;
    font-size: 0.77rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.auth-heading h1 {
    margin-bottom: 0.65rem;
    color: #172033;
    font-family: var(--font-display);
    font-size: clamp(1.8rem, 3vw, 2.45rem);
    line-height: 1.12;
}

.auth-heading p {
    margin: 0;
    color: #64748b;
    line-height: 1.65;
}

.auth-field {
    margin-bottom: 1.2rem;
}

.auth-field .form-label,
.auth-register-form .form-label {
    margin-bottom: 0.5rem;
    color: #334155;
    font-size: 0.84rem;
    font-weight: 700;
}

.auth-field a {
    color: #08758f;
    font-size: 0.82rem;
    font-weight: 700;
    text-decoration: none;
}

.auth-input {
    position: relative;
}

.auth-input > i {
    position: absolute;
    z-index: 2;
    top: 50%;
    left: 1rem;
    color: #94a3b8;
    transform: translateY(-50%);
}

.auth-input .form-control {
    min-height: 3.3rem;
    padding-left: 2.8rem;
}

.auth-panel .form-control,
.auth-panel .form-select {
    min-height: 3.15rem;
    border-color: #d7dee9;
    border-radius: 0.85rem;
    background-color: #fbfcfe;
}

.auth-panel .form-control:focus,
.auth-panel .form-select:focus {
    border-color: #14a0bf;
    background: #fff;
}

.auth-submit {
    display: flex;
    width: 100%;
    min-height: 3.25rem;
    align-items: center;
    justify-content: center;
    gap: 0.65rem;
    margin-top: 0.35rem;
    border-radius: 0.85rem;
    font-weight: 800;
    box-shadow: 0 14px 28px -15px rgba(8, 107, 135, 0.9);
}

.auth-submit i {
    transition: transform 0.2s ease;
}

.auth-submit:hover i {
    transform: translateX(4px);
}

.auth-switch {
    margin: 1.5rem 0 0;
    color: #64748b;
    font-size: 0.88rem;
    text-align: center;
}

.auth-switch a {
    color: #08758f;
    font-weight: 800;
    text-decoration: none;
}

.auth-demo {
    margin-top: 1.3rem;
    padding: 0.85rem 1rem;
    border: 1px dashed #cbd5e1;
    border-radius: 0.85rem;
    background: #f8fafc;
}

.auth-demo summary {
    color: #64748b;
    font-size: 0.8rem;
    font-weight: 700;
    cursor: pointer;
}

.auth-register-form .form-check {
    padding: 1rem 1rem 1rem 2.6rem;
    border: 1px solid #dce3ed;
    border-radius: 0.85rem;
    background: #f8fafc;
}

.auth-register-form .form-check-input {
    margin-left: -1.55rem;
}

.auth-register-form .form-check-label {
    color: #64748b;
    font-size: 0.8rem;
    line-height: 1.5;
}

[data-theme="dark"] .auth-wrap {
    background: #0c1320;
}

[data-theme="dark"] .auth-shell,
[data-theme="dark"] .auth-panel {
    background: #131d2c;
}

[data-theme="dark"] .auth-brand,
[data-theme="dark"] .auth-heading h1,
[data-theme="dark"] .auth-field .form-label,
[data-theme="dark"] .auth-register-form .form-label {
    color: #eef5ff;
}

[data-theme="dark"] .auth-panel .form-control,
[data-theme="dark"] .auth-panel .form-select,
[data-theme="dark"] .auth-demo,
[data-theme="dark"] .auth-register-form .form-check {
    border-color: #314158;
    background: #182537;
    color: #eef5ff;
}

@media (max-width: 991px) {
    .auth-shell,
    .auth-shell--login {
        width: min(680px, 100%);
        grid-template-columns: 1fr;
    }

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

    .auth-visual > img {
        position: absolute;
    }

    .auth-visual__content h2 {
        max-width: 18ch;
        font-size: clamp(1.8rem, 6vw, 2.7rem);
    }
}

@media (max-width: 575px) {
    .auth-wrap {
        padding: 0;
        place-items: stretch;
    }

    .auth-shell,
    .auth-shell--login {
        min-height: 100vh;
        border: 0;
        border-radius: 0;
    }

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

    .auth-visual__content {
        padding: 1.4rem;
    }

    .auth-visual__content h2 {
        margin-top: 0.7rem;
        font-size: 1.75rem;
    }

    .auth-visual__content p,
    .auth-proof,
    .auth-feature-list {
        display: none;
    }

    .auth-panel {
        padding: 1.8rem 1.25rem 2.5rem;
        place-items: start center;
    }

    .auth-heading {
        margin: 1.5rem 0;
    }
}

.form-control,
.form-select {
    border-radius: 12px;
    border-color: #cbd5e1;
}

.form-control:focus,
.form-select:focus {
    border-color: var(--brand-500);
    box-shadow: 0 0 0 0.2rem var(--ring);
}

/* Global modal style: border-0, shadow, and primary header with white text. */
.modal .modal-content {
    border: 0 !important;
    box-shadow: 0 0.75rem 1.5rem rgba(0, 0, 0, 0.2) !important;
}

.modal .modal-header {
    background-color: var(--bs-primary, #0d6efd) !important;
    color: #ffffff !important;
    border-bottom: 0;
}

.modal .modal-header .modal-title,
.modal .modal-header h1,
.modal .modal-header h2,
.modal .modal-header h3,
.modal .modal-header h4,
.modal .modal-header h5,
.modal .modal-header h6 {
    color: #ffffff !important;
}

.modal .modal-header .btn-close {
    filter: invert(1) grayscale(100%) brightness(200%);
    opacity: 0.95;
}

.spinner-overlay {
    position: fixed;
    inset: 0;
    display: none;
    align-items: center;
    justify-content: center;
    background: rgba(8, 16, 25, 0.35);
    z-index: 1300;
}

.spinner-overlay.show {
    display: flex;
}

.spinner-lg {
    width: 3rem;
    height: 3rem;
}

.modal.fade .modal-dialog {
    transform: translateY(-42px);
    opacity: 0;
    transition: transform 0.36s ease, opacity 0.36s ease;
}

.modal.show .modal-dialog {
    transform: translateY(0);
    opacity: 1;
}

/* Sub Admin Sidebar Layout */
:root {
    --sidebar-width: 280px;
}

#sidebar {
    width: var(--sidebar-width);
    height: 100vh;
    position: fixed;
    top: 0;
    left: 0;
    background-color: #212529;
    color: #fff;
    overflow-y: auto;
    transition: all 0.3s;
    z-index: 1000;
}

#sidebar .nav-link {
    color: #adb5bd;
    font-size: 0.9rem;
    padding: 0.6rem 1rem;
    border-radius: 0.25rem;
    margin: 0.1rem 0.5rem;
}

#sidebar .nav-link:hover,
#sidebar .nav-link.active {
    color: #fff;
    background-color: rgba(255, 255, 255, 0.1);
}

#sidebar .nav-link i {
    margin-right: 0.5rem;
    width: 20px;
    text-align: center;
}

#sidebar .sidebar-heading {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: #6c757d;
    padding: 0.75rem 1rem 0.25rem;
    list-style: none;
}

#main-content {
/*margin-left: var(--sidebar-width);
    margin-left: var(--sidebar-width);
    width: calc(100% - var(--sidebar-width));*/
    min-height: 100vh;
    padding: 1.5rem;
    transition: margin-left 0.3s;
}

@media (max-width: 991.98px) {
    #sidebar {
        margin-left: calc(-1 * var(--sidebar-width));
    }

    #sidebar.active {
        margin-left: 0;
    }

    #main-content {
        margin-left: 0;
        width: 100%;
        padding: 1rem;
    }
}

.fade-in-up {
    animation: fadeInUp 0.7s ease both;
}

.fade-in-up[data-delay="1"] { animation-delay: 0.07s; }
.fade-in-up[data-delay="2"] { animation-delay: 0.14s; }
.fade-in-up[data-delay="3"] { animation-delay: 0.21s; }

.plan-limit-grid {
    display: grid;
    gap: 0.5rem;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
}

.table > :not(caption) > * > * {
    padding: 0.65rem;
}

.admin-panel .table-responsive {
    border-radius: var(--radius-md);
}

.subadmin-workspace {
    padding: 1rem;
}

.subadmin-template {
    --sidebar-width: 260px;
    --subadmin-fixed-sidebar-width: 18%;
    --subadmin-fixed-main-width: calc(100% - var(--subadmin-fixed-sidebar-width));
    --subadmin-navbar-offset: 60px;
    --subadmin-pane-gap: 0.85rem;
    --subadmin-primary: #0d6efd;
    --subadmin-bg-body: #f8f9fa;
    --subadmin-card-bg: #ffffff;
    --subadmin-text-color: #212529;
    --subadmin-border: rgba(148, 163, 184, 0.2);
    --subadmin-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
    background-color: var(--subadmin-bg-body);
    color: var(--subadmin-text-color);
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    transition: background-color 0.3s, color 0.3s;
}

html[data-theme="dark"] .subadmin-template {
    --subadmin-bg-body: #121212;
    --subadmin-card-bg: #1e1e1e;
    --subadmin-text-color: #f8f9fa;
    --subadmin-border: rgba(148, 163, 184, 0.16);
    --subadmin-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.22);
}

.subadmin-template .subadmin-dashboard-shell {
    min-height: 100vh;
}

.subadmin-template .subadmin-two-column {
    min-height: 100vh;
}

.subadmin-template .subadmin-sidebar-col {
    padding-left: 0;
    padding-right: 0;
}

.subadmin-template .tab-content-section {
    display: block;
}

.subadmin-template .tab-content-section.d-none {
    display: none !important;
}

.subadmin-template #sidebar {
    width: 100%;
    height: 100vh;
    position: sticky;
    top: 0;
    left: 0;
    background-color: #212529;
    color: #ffffff;
    overflow-y: auto;
    z-index: 1000;
    transition: all 0.3s;
}

.subadmin-template #main-content {
    margin-left: 0;
    width: 100%;
    padding: 1.5rem;
    min-height: 100vh;
    transition: margin-left 0.3s;
}

@media (min-width: 768px) {
    .subadmin-template {
        overflow: hidden;
    }

    .subadmin-template .subadmin-two-column {
        position: relative;
        min-height: 100vh;
    }

    .subadmin-template .subadmin-sidebar-col {
        position: fixed;
        top: calc(var(--subadmin-navbar-offset) + var(--subadmin-pane-gap));
        left: 0;
        width: var(--subadmin-fixed-sidebar-width);
        height: calc(100vh - (var(--subadmin-navbar-offset) + var(--subadmin-pane-gap)));
        z-index: 1000;
    }

    .subadmin-template #sidebar {
        height: 100%;
    }

    .subadmin-template #main-content {
        position: fixed;
        top: calc(var(--subadmin-navbar-offset) + var(--subadmin-pane-gap));
        right: 0;
        width: var(--subadmin-fixed-main-width);
        height: calc(100vh - (var(--subadmin-navbar-offset) + var(--subadmin-pane-gap)));
        overflow-y: auto;
        overflow-x: hidden;
        isolation: isolate;
    }

    .subadmin-template #main-content > .modal {
        position: absolute;
        inset: 0;
        overflow: hidden;
    }

    .subadmin-template #main-content > .modal-backdrop {
        position: absolute;
        inset: 0;
    }

    .subadmin-template #main-content > .modal .modal-dialog {
        margin: 0.75rem auto;
        max-width: calc(100% - 1.5rem);
        width: min(var(--bs-modal-width), calc(100% - 1.5rem));
        max-height: calc(100% - 1.5rem);
    }

    .subadmin-template #main-content > .modal .modal-dialog-scrollable {
        height: calc(100% - 1.5rem);
        max-height: calc(100% - 1.5rem);
    }

    .subadmin-template #main-content > .modal .modal-content {
        max-height: 100%;
    }
}

.subadmin-template .subadmin-main-topbar {
    background-color: var(--subadmin-card-bg);
    border: 0;
    box-shadow: var(--subadmin-shadow);
}

.subadmin-template .subadmin-main-topbar .btn.rounded-circle {
    width: 34px;
    height: 34px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.subadmin-template .subadmin-main-topbar .input-group {
    background: var(--subadmin-card-bg);
    border-radius: 0.5rem;
    overflow: hidden;
}

.subadmin-template .subadmin-main-topbar .input-group-text,
.subadmin-template .subadmin-main-topbar .form-select,
.subadmin-template .subadmin-main-topbar .form-control {
    background: transparent;
}

.subadmin-template .btn-brand {
    background-color: #0d6efd;
    border-color: #0d6efd;
    color: #ffffff;
}

.subadmin-template .btn-brand:hover,
.subadmin-template .btn-brand:focus {
    background-color: #0b5ed7;
    border-color: #0a58ca;
    color: #ffffff;
}

.subadmin-template .btn-outline-brand {
    color: #0d6efd;
    border-color: #0d6efd;
}

.subadmin-template .btn-outline-brand:hover,
.subadmin-template .btn-outline-brand:focus {
    color: #ffffff;
    background-color: #0d6efd;
    border-color: #0d6efd;
}

.subadmin-template .card,
.subadmin-template .border.rounded-4,
.subadmin-template .tab-pane > .border.rounded-4 {
    border: 0 !important;
    box-shadow: var(--subadmin-shadow);
    border-radius: 0.5rem;
    background-color: var(--subadmin-card-bg);
}

.subadmin-template .metrics-grid {
    gap: 0.8rem;
    grid-template-columns: repeat(auto-fit, minmax(165px, 1fr));
}

.subadmin-template .metric-card {
    padding: 1rem;
}

.subadmin-template .metric-card h2 {
    margin-bottom: 0;
    font-size: 1.45rem;
    font-weight: 800;
}

.subadmin-template .stat-card-icon {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
}

.subadmin-template .heatmap-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 5px;
}

.subadmin-template .heatmap-cell {
    height: 30px;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    color: #ffffff;
}

.subadmin-template .table > :not(caption) > * > * {
    padding: 0.52rem 0.62rem;
}

.subadmin-template .table-hover > tbody > tr:hover > * {
    background-color: rgba(13, 110, 253, 0.06);
}

.subadmin-template #sidebar .nav-link {
    color: #adb5bd;
    font-size: 0.9rem;
    padding: 0.6rem 1rem;
    border-radius: 0.25rem;
    margin: 0.1rem 0.5rem;
    border: 0;
    background: transparent;
    width: calc(100% - 1rem);
    text-align: left;
    transition: background-color 0.2s ease, color 0.2s ease;
}

.subadmin-template #sidebar .nav-link:hover,
.subadmin-template #sidebar .nav-link:focus,
.subadmin-template #sidebar .nav-link.active {
    color: #ffffff;
    background-color: rgba(255, 255, 255, 0.1);
}

.subadmin-template #sidebar .nav-link i {
    margin-right: 0.5rem;
    width: 20px;
    text-align: center;
}

.subadmin-template .sidebar-heading {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: #6c757d;
    padding: 0.75rem 1rem 0.25rem;
}

.subadmin-template #sidebar .sidebar-heading-link {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: #6c757d;
    padding: 0.75rem 1rem 0.25rem;
    margin: 0.2rem 0.5rem 0;
    border-radius: 0.25rem;
}

.subadmin-template #sidebar .sidebar-heading-link:hover,
.subadmin-template #sidebar .sidebar-heading-link.active {
    color: #ffffff;
    background-color: rgba(255, 255, 255, 0.08);
}

.subadmin-template .tab-section-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
}

.subadmin-template .card {
    margin-bottom: 1.5rem;
}

@media (max-width: 767.98px) {
    .subadmin-template #sidebar {
        position: fixed;
        margin-left: calc(-1 * var(--sidebar-width));
    }

    .subadmin-template #sidebar.active,
    .subadmin-template #sidebar.is-open {
        margin-left: 0;
    }

    .subadmin-template #main-content {
        margin-left: 0;
        padding: 0.95rem;
    }
}

.role-workspace {
    padding: 1rem;
}

.role-shell {
    display: grid;
    grid-template-columns: 260px minmax(0, 1fr);
    gap: 1rem;
    align-items: start;
}

.role-shell__sidebar {
    background: #1c2530;
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    color: #f8fafc;
    padding: 0.85rem;
    position: sticky;
    top: 90px;
}

.role-shell__sidebar-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid rgba(255, 255, 255, 0.12);
    padding-bottom: 0.65rem;
    margin-bottom: 0.7rem;
}

.role-shell__sidebar-title {
    font-size: 0.72rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    font-weight: 700;
    color: rgba(248, 250, 252, 0.75);
}

.role-shell__content {
    min-width: 0;
}

.role-shell__topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    flex-wrap: wrap;
    background: var(--surface);
    border: 1px solid rgba(148, 163, 184, 0.2);
    border-radius: 14px;
    padding: 0.7rem;
}

.role-shell__topbar-left,
.role-shell__topbar-right {
    display: flex;
    align-items: center;
    gap: 0.55rem;
}

.role-shell__search {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.35rem 0.45rem;
    border: 1px solid rgba(148, 163, 184, 0.28);
    border-radius: 999px;
    background: var(--bg-elevated);
    min-width: min(100%, 520px);
}

.role-shell__search i {
    color: var(--muted);
}

.role-shell__search input {
    border: 0;
    background: transparent;
    min-width: 220px;
    flex: 1 1 auto;
    color: var(--text);
}

.role-shell__search input:focus {
    outline: none;
}

.role-shell__nav .nav-link {
    border-radius: 10px;
    color: rgba(248, 250, 252, 0.82);
    text-align: left;
    width: 100%;
    font-size: 0.9rem;
    padding: 0.58rem 0.7rem;
    border: 1px solid transparent;
}

.role-shell__nav .nav-link:hover,
.role-shell__nav .nav-link:focus,
.role-shell__nav .nav-link.active {
    color: #ffffff;
    background-color: rgba(20, 160, 191, 0.22);
    border-color: rgba(20, 160, 191, 0.46);
}

.subadmin-shell {
    display: grid;
    grid-template-columns: 270px minmax(0, 1fr);
    gap: 1rem;
    align-items: start;
}

.subadmin-shell__sidebar {
    background: #1c2530;
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    color: #f8fafc;
    padding: 0.85rem;
    position: sticky;
    top: 90px;
}

.subadmin-shell__sidebar-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid rgba(255, 255, 255, 0.12);
    padding-bottom: 0.65rem;
    margin-bottom: 0.7rem;
}

.subadmin-shell__sidebar-title {
    font-size: 0.72rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    font-weight: 700;
    color: rgba(248, 250, 252, 0.75);
}

.subadmin-shell__content {
    min-width: 0;
}

.subadmin-topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    flex-wrap: wrap;
    background: var(--surface);
    border: 1px solid rgba(148, 163, 184, 0.2);
    border-radius: 14px;
    padding: 0.7rem;
}

.subadmin-topbar__left,
.subadmin-topbar__right {
    display: flex;
    align-items: center;
    gap: 0.55rem;
}

.subadmin-topbar__search {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.35rem 0.45rem;
    border: 1px solid rgba(148, 163, 184, 0.28);
    border-radius: 999px;
    background: var(--bg-elevated);
    min-width: min(100%, 520px);
}

.subadmin-topbar__search i {
    color: var(--muted);
}

.subadmin-topbar__search input {
    border: 0;
    background: transparent;
    min-width: 220px;
    flex: 1 1 auto;
    color: var(--text);
}

.subadmin-topbar__search input:focus {
    outline: none;
}

.subadmin-tabs .nav-link {
    border-radius: 10px;
    color: rgba(248, 250, 252, 0.82);
    text-align: left;
    width: 100%;
    font-size: 0.9rem;
    padding: 0.58rem 0.7rem;
    border: 1px solid transparent;
}

.subadmin-tabs .nav-link.active {
    background-color: rgba(20, 160, 191, 0.22);
    border-color: rgba(20, 160, 191, 0.46);
    color: #ffffff;
}

.subadmin-tabs .nav-link:hover,
.subadmin-tabs .nav-link:focus {
    color: #ffffff;
    background-color: rgba(255, 255, 255, 0.1);
}

html[data-theme="dark"] .subadmin-shell__sidebar {
    background: #0b1320;
    border-color: rgba(148, 163, 184, 0.18);
}

html[data-theme="dark"] .role-shell__sidebar {
    background: #0b1320;
    border-color: rgba(148, 163, 184, 0.18);
}

html[data-theme="dark"] .subadmin-topbar {
    border-color: rgba(148, 163, 184, 0.18);
}

html[data-theme="dark"] .subadmin-topbar__search {
    border-color: rgba(148, 163, 184, 0.24);
}

html[data-theme="dark"] .role-shell__topbar {
    border-color: rgba(148, 163, 184, 0.18);
}

html[data-theme="dark"] .role-shell__search {
    border-color: rgba(148, 163, 184, 0.24);
}

.invoice-body {
    background: #f8fafc;
    color: #0f172a;
    font-family: var(--font-base);
    margin: 0;
    padding: 2rem;
}

.invoice-wrap {
    max-width: 760px;
    margin: 0 auto;
    background: #ffffff;
    border-radius: 16px;
    border: 1px solid #e2e8f0;
    padding: 1.5rem;
}

.invoice-head {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1.25rem;
}

.invoice-total {
    font-weight: 700;
}

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

/* ===================================================================
   COMPREHENSIVE DESIGN SYSTEM - CONSISTENT UX/UI PATTERNS
   =================================================================== */

/* Status Badge System - Consistent color coding */
.badge-status {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.35rem 0.65rem;
    border-radius: 999px;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.badge-success { background-color: rgba(16, 185, 129, 0.15); color: #059669; }
.badge-warning { background-color: rgba(245, 158, 11, 0.15); color: #b45309; }
.badge-danger { background-color: rgba(239, 68, 68, 0.15); color: #991b1b; }
.badge-info { background-color: rgba(59, 130, 246, 0.15); color: #1e40af; }
.badge-neutral { background-color: rgba(107, 114, 128, 0.15); color: #374151; }

/* Status-specific badges */
.badge-passed { background-color: rgba(16, 185, 129, 0.15); color: #059669; }
.badge-failed { background-color: rgba(239, 68, 68, 0.15); color: #991b1b; }
.badge-pending { background-color: rgba(245, 158, 11, 0.15); color: #b45309; }
.badge-submitted { background-color: rgba(245, 158, 11, 0.15); color: #b45309; }
.badge-graded { background-color: rgba(16, 185, 129, 0.15); color: #059669; }
.badge-completed { background-color: rgba(16, 185, 129, 0.15); color: #059669; }
.badge-withdrawn { background-color: rgba(239, 68, 68, 0.15); color: #991b1b; }
.badge-suspended { background-color: rgba(107, 114, 128, 0.15); color: #374151; }

/* Assessment Type Badges */
.badge-formative { background-color: rgba(3, 102, 214, 0.12); color: #0369a1; }
.badge-summative { background-color: rgba(6, 78, 59, 0.12); color: #065f46; }
.badge-poe { background-color: rgba(124, 58, 11, 0.12); color: #7c3a0b; }

/* Evidence Type Badges */
.badge-practical { background-color: rgba(59, 130, 246, 0.12); color: #1e40af; }
.badge-poe-ev { background-color: rgba(34, 197, 94, 0.12); color: #166534; }

/* Card System - Consistent layout */
.workspace-card {
    background: var(--surface);
    border: 1px solid rgba(148, 163, 184, 0.15);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-soft);
    transition: all 0.2s ease;
    overflow: hidden;
}

.workspace-card:hover {
    border-color: rgba(148, 163, 184, 0.3);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.1);
}

.workspace-card-header {
    padding: 1rem;
    background: linear-gradient(135deg, rgba(20, 160, 191, 0.08) 0%, rgba(255, 183, 3, 0.04) 100%);
    border-bottom: 1px solid rgba(148, 163, 184, 0.1);
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.workspace-card-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text);
    margin: 0;
    display: flex;
    align-items: center;
    gap: 0.65rem;
}

.workspace-card-title i {
    font-size: 1.25rem;
    color: var(--brand-600);
}

.workspace-card-body {
    padding: 1.25rem;
}

.workspace-card-footer {
    padding: 0.85rem 1.25rem;
    background-color: rgba(0, 0, 0, 0.02);
    border-top: 1px solid rgba(148, 163, 184, 0.1);
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
}

/* Table System - Consistent styling */
.workspace-table {
    margin-bottom: 0;
}

.workspace-table thead {
    background-color: rgba(0, 0, 0, 0.02);
    border-top: 2px solid rgba(148, 163, 184, 0.2);
    border-bottom: 2px solid rgba(148, 163, 184, 0.2);
}

.workspace-table thead th {
    padding: 0.85rem 0.9rem;
    font-weight: 700;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--muted);
    border: none;
}

.workspace-table tbody td {
    padding: 0.75rem 0.9rem;
    border-bottom: 1px solid rgba(148, 163, 184, 0.12);
    vertical-align: middle;
}

.workspace-table tbody tr:hover {
    background-color: rgba(20, 160, 191, 0.04);
}

.workspace-table tbody tr:last-child td {
    border-bottom: none;
}

/* Button System - Improved consistency */
.btn-workspace-primary {
    background: linear-gradient(135deg, var(--brand-600) 0%, var(--brand-700) 100%);
    border: none;
    color: #ffffff;
    font-weight: 600;
    padding: 0.55rem 1.1rem;
    border-radius: 10px;
    transition: all 0.2s ease;
}

.btn-workspace-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 16px rgba(20, 160, 191, 0.3);
    color: #ffffff;
}

.btn-workspace-secondary {
    background: rgba(148, 163, 184, 0.1);
    border: 1px solid rgba(148, 163, 184, 0.3);
    color: var(--text);
    font-weight: 600;
    padding: 0.55rem 1.1rem;
    border-radius: 10px;
    transition: all 0.2s ease;
}

.btn-workspace-secondary:hover {
    background: rgba(148, 163, 184, 0.2);
    border-color: rgba(148, 163, 184, 0.5);
    color: var(--text);
}

.btn-workspace-small {
    font-size: 0.8rem;
    padding: 0.4rem 0.8rem;
    border-radius: 8px;
}

/* Modal Enhancement - Consistent styling */
.workspace-modal .modal-header {
    background: linear-gradient(135deg, var(--brand-600) 0%, var(--brand-700) 100%);
    border: none;
    padding: 1.25rem;
}

.workspace-modal .modal-header .modal-title {
    font-weight: 700;
    font-size: 1.2rem;
    display: flex;
    align-items: center;
    gap: 0.65rem;
}

.workspace-modal .modal-header .btn-close {
    filter: invert(1) grayscale(100%) brightness(200%);
    opacity: 0.8;
}

.workspace-modal .modal-body {
    padding: 1.5rem;
}

.workspace-modal .modal-footer {
    padding: 1rem 1.5rem;
    border-top: 1px solid rgba(148, 163, 184, 0.15);
    background-color: rgba(0, 0, 0, 0.01);
}

/* Form Elements - Consistent styling */
.workspace-form-group {
    margin-bottom: 1.15rem;
}

.workspace-form-label {
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--text);
    font-size: 0.95rem;
}

.workspace-form-control {
    border: 1px solid rgba(148, 163, 184, 0.3);
    border-radius: 10px;
    padding: 0.65rem 0.95rem;
    font-size: 0.95rem;
    transition: all 0.2s ease;
}

.workspace-form-control:focus {
    border-color: var(--brand-500);
    box-shadow: 0 0 0 3px var(--ring);
    outline: none;
}

/* Data Sections - Consistent info display */
.workspace-info-row {
    display: flex;
    justify-content: space-between;
    padding: 0.75rem 0;
    border-bottom: 1px solid rgba(148, 163, 184, 0.1);
}

.workspace-info-row:last-child {
    border-bottom: none;
}

.workspace-info-label {
    font-weight: 600;
    color: var(--muted);
    font-size: 0.9rem;
}

.workspace-info-value {
    color: var(--text);
    font-weight: 500;
}

/* Timeline/Thread System - Comments & feedback */
.workspace-thread {
    display: flex;
    gap: 1rem;
    margin-bottom: 1rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid rgba(148, 163, 184, 0.1);
}

.workspace-thread:last-child {
    border-bottom: none;
}

.workspace-thread-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--brand-600) 0%, var(--brand-500) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    font-weight: 700;
    flex-shrink: 0;
}

.workspace-thread-body {
    flex: 1;
    min-width: 0;
}

.workspace-thread-header {
    display: flex;
    align-items: baseline;
    gap: 0.5rem;
    margin-bottom: 0.35rem;
}

.workspace-thread-author {
    font-weight: 700;
    color: var(--text);
}

.workspace-thread-time {
    font-size: 0.8rem;
    color: var(--muted);
}

.workspace-thread-content {
    color: var(--text);
    line-height: 1.5;
}

/* Attachment/File System */
.workspace-attachment {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem;
    background-color: rgba(148, 163, 184, 0.06);
    border-radius: 10px;
    transition: all 0.2s ease;
    margin-bottom: 0.5rem;
}

.workspace-attachment:hover {
    background-color: rgba(148, 163, 184, 0.12);
}

.workspace-attachment-icon {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    background: linear-gradient(135deg, var(--brand-600) 0%, var(--brand-500) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    font-size: 1.1rem;
    flex-shrink: 0;
}

.workspace-attachment-info {
    flex: 1;
    min-width: 0;
}

.workspace-attachment-name {
    font-weight: 600;
    color: var(--text);
    word-break: break-word;
    font-size: 0.95rem;
}

.workspace-attachment-size {
    font-size: 0.8rem;
    color: var(--muted);
}

/* Empty States */
.workspace-empty-state {
    text-align: center;
    padding: 2.5rem 1.5rem;
    color: var(--muted);
}

.workspace-empty-state i {
    font-size: 3rem;
    opacity: 0.3;
    margin-bottom: 1rem;
}

.workspace-empty-state p {
    margin: 0;
}

/* Sidebar Navigation Consistency */
.workspace-sidebar {
    background: #1c2530;
    color: #f8fafc;
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    padding: 0.85rem;
    position: sticky;
    top: 90px;
}

.workspace-sidebar-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.65rem 0.85rem;
    margin: 0.25rem 0;
    border-radius: 10px;
    color: rgba(248, 250, 252, 0.8);
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 0.95rem;
}

.workspace-sidebar-item:hover,
.workspace-sidebar-item.active {
    color: #ffffff;
    background-color: rgba(20, 160, 191, 0.25);
    border-left: 3px solid var(--brand-500);
    padding-left: 0.82rem;
}

.workspace-sidebar-item i {
    width: 20px;
    text-align: center;
    flex-shrink: 0;
}

/* ===================================================================
   UNIVERSAL BOOTSTRAP ENHANCEMENT - Apply design system globally
   =================================================================== */

/* Auto-enhance all cards with workspace styling */
.card {
    border: 1px solid rgba(148, 163, 184, 0.15) !important;
    box-shadow: var(--shadow-soft) !important;
    border-radius: var(--radius-md) !important;
    transition: all 0.2s ease !important;
    background-color: var(--surface) !important;
}

.card:hover {
    border-color: rgba(148, 163, 184, 0.3) !important;
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.1) !important;
}

.card-header {
    background: linear-gradient(135deg, rgba(20, 160, 191, 0.08) 0%, rgba(255, 183, 3, 0.04) 100%) !important;
    border-bottom: 1px solid rgba(148, 163, 184, 0.1) !important;
    font-weight: 700 !important;
    color: var(--text) !important;
}

.card-body {
    padding: 1.25rem !important;
}

.card-footer {
    background-color: rgba(0, 0, 0, 0.02) !important;
    border-top: 1px solid rgba(148, 163, 184, 0.1) !important;
}

/* Auto-enhance tables */
.table {
    margin-bottom: 0 !important;
}

.table thead {
    background-color: rgba(0, 0, 0, 0.02) !important;
    border-top: 2px solid rgba(148, 163, 184, 0.2) !important;
    border-bottom: 2px solid rgba(148, 163, 184, 0.2) !important;
}

.table thead th {
    padding: 0.85rem 0.9rem !important;
    font-weight: 700 !important;
    font-size: 0.85rem !important;
    text-transform: uppercase !important;
    letter-spacing: 0.5px !important;
    color: var(--muted) !important;
    border: none !important;
}

.table tbody td {
    padding: 0.75rem 0.9rem !important;
    border-bottom: 1px solid rgba(148, 163, 184, 0.12) !important;
    vertical-align: middle !important;
}

.table tbody tr:hover {
    background-color: rgba(20, 160, 191, 0.04) !important;
}

.table tbody tr:last-child td {
    border-bottom: none !important;
}

/* Status badge auto-styling */
.badge {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.4rem 0.75rem !important;
    border-radius: 999px !important;
    font-weight: 600 !important;
    font-size: 0.8rem !important;
    text-transform: uppercase !important;
    letter-spacing: 0.5px !important;
}

/* Bootstrap badge colors mapped to status colors */
.badge.bg-success, .badge.bg-success-subtle { 
    background-color: rgba(16, 185, 129, 0.15) !important; 
    color: #059669 !important;
}

.badge.bg-danger, .badge.bg-danger-subtle { 
    background-color: rgba(239, 68, 68, 0.15) !important; 
    color: #991b1b !important;
}

.badge.bg-warning, .badge.bg-warning-subtle { 
    background-color: rgba(245, 158, 11, 0.15) !important; 
    color: #b45309 !important;
}

.badge.bg-primary, .badge.bg-primary-subtle { 
    background-color: rgba(59, 130, 246, 0.15) !important; 
    color: #1e40af !important;
}

.badge.bg-info, .badge.bg-info-subtle { 
    background-color: rgba(59, 130, 246, 0.12) !important; 
    color: #0369a1 !important;
}

.badge.bg-secondary, .badge.bg-secondary-subtle { 
    background-color: rgba(107, 114, 128, 0.15) !important; 
    color: #374151 !important;
}

/* Enhanced buttons */
.btn {
    font-weight: 600 !important;
    transition: all 0.2s ease !important;
    border-radius: 10px !important;
}

.btn-primary {
    background: linear-gradient(135deg, var(--brand-600) 0%, var(--brand-700) 100%) !important;
    border: none !important;
}

.btn-primary:hover {
    transform: translateY(-2px) !important;
    box-shadow: 0 8px 16px rgba(20, 160, 191, 0.3) !important;
}

.btn-outline-primary {
    border-color: var(--brand-500) !important;
    color: var(--brand-600) !important;
}

.btn-outline-primary:hover {
    background: rgba(20, 160, 191, 0.1) !important;
    border-color: var(--brand-600) !important;
    color: var(--brand-600) !important;
}

.btn-sm {
    font-size: 0.8rem !important;
    padding: 0.4rem 0.8rem !important;
}

/* Modal enhancements */
.modal-header {
    background: linear-gradient(135deg, var(--brand-600) 0%, var(--brand-700) 100%) !important;
    border: none !important;
    padding: 1.25rem !important;
}

.modal-header .modal-title {
    font-weight: 700 !important;
    font-size: 1.2rem !important;
    color: #ffffff !important;
}

.modal-header .btn-close {
    filter: invert(1) grayscale(100%) brightness(200%) !important;
    opacity: 0.8 !important;
}

.modal-body {
    padding: 1.5rem !important;
}

.modal-footer {
    padding: 1rem 1.5rem !important;
    border-top: 1px solid rgba(148, 163, 184, 0.15) !important;
    background-color: rgba(0, 0, 0, 0.01) !important;
}

/* Form elements */
.form-label {
    font-weight: 600 !important;
    margin-bottom: 0.5rem !important;
    color: var(--text) !important;
}

.form-control,
.form-select {
    border: 1px solid rgba(148, 163, 184, 0.3) !important;
    border-radius: 10px !important;
    padding: 0.65rem 0.95rem !important;
    transition: all 0.2s ease !important;
    background-color: var(--surface) !important;
    color: var(--text) !important;
}

.form-control:focus,
.form-select:focus {
    border-color: var(--brand-500) !important;
    box-shadow: 0 0 0 3px var(--ring) !important;
    outline: none !important;
}

/* Alert styling */
.alert {
    border: none !important;
    border-radius: var(--radius-md) !important;
    border-left: 4px solid currentColor !important;
}

.alert-success {
    background-color: rgba(16, 185, 129, 0.12) !important;
    color: #059669 !important;
    border-left-color: #10b981 !important;
}

.alert-danger {
    background-color: rgba(239, 68, 68, 0.12) !important;
    color: #991b1b !important;
    border-left-color: #ef4444 !important;
}

.alert-warning {
    background-color: rgba(245, 158, 11, 0.12) !important;
    color: #b45309 !important;
    border-left-color: #f59e0b !important;
}

.alert-info {
    background-color: rgba(59, 130, 246, 0.12) !important;
    color: #1e40af !important;
    border-left-color: #3b82f6 !important;
}

/* Dropdown enhancements */
.dropdown-menu {
    border: 1px solid rgba(148, 163, 184, 0.2) !important;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.12) !important;
    border-radius: var(--radius-md) !important;
}

.dropdown-item:hover,
.dropdown-item:focus {
    background-color: rgba(20, 160, 191, 0.1) !important;
}

.dropdown-item.active {
    background-color: linear-gradient(135deg, var(--brand-600) 0%, var(--brand-700) 100%) !important;
}

/* Sidebar icon consistency */
i[class*="bi-"] {
    font-size: inherit;
}

.nav-link i[class*="bi-"] {
    margin-right: 0.5rem;
}

.facilitator-workspace {
    gap: 1rem;
}

.facilitator-hero {
    border: 1px solid rgba(20, 160, 191, 0.25);
    background: var(--bg-elevated);
}

.facilitator-active-course {
    color: var(--muted);
    font-size: 0.92rem;
}

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

.facilitator-summary-item {
    border: 1px solid rgba(148, 163, 184, 0.2);
    border-radius: 14px;
    padding: 0.9rem;
    background: var(--surface);
    transition: transform 0.2s ease, border-color 0.2s ease;
}

.facilitator-summary-item:hover {
    transform: translateY(-1px);
    border-color: rgba(20, 160, 191, 0.35);
}

.facilitator-quick-nav {
    position: sticky;
    top: 84px;
    z-index: 25;
}

.facilitator-shell {
    display: grid;
    grid-template-columns: 250px minmax(0, 1fr);
    gap: 1rem;
    align-items: start;
}

.facilitator-content {
    display: grid;
    gap: 1rem;
}

.facilitator-nav-pills {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.facilitator-nav-pills .nav-link {
    border-radius: 12px;
    color: var(--text);
    font-size: 0.9rem;
    padding: 0.55rem 0.85rem;
    border: 1px solid rgba(148, 163, 184, 0.2);
    background: var(--surface);
}

.facilitator-nav-pills .nav-link.active {
    background: var(--brand-700);
    color: #ffffff;
    border-color: transparent;
    box-shadow: 0 8px 20px rgba(10, 127, 150, 0.25);
}

@media print {
    .print-actions {
        display: none;
    }

    .invoice-body {
        background: #ffffff;
        padding: 0;
    }

    .invoice-wrap {
        border: 0;
        border-radius: 0;
        padding: 0;
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(16px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

    .app-sidebar {
        position: static;
    }

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

    .facilitator-quick-nav {
        top: 8px;
    }

    .facilitator-nav-pills {
        flex-direction: row;
        flex-wrap: wrap;
    }

    .facilitator-nav-pills .nav-link {
        border-radius: 999px;
    }

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

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

    .subadmin-shell__sidebar {
        position: fixed;
        top: 72px;
        left: 0.75rem;
        right: 0.75rem;
        z-index: 1035;
        max-height: calc(100vh - 90px);
        overflow: auto;
        transform: translateY(-110%);
        transition: transform 0.24s ease;
        pointer-events: none;
    }

    .subadmin-shell__sidebar.is-open {
        transform: translateY(0);
        pointer-events: auto;
    }

    .role-shell__sidebar {
        position: fixed;
        top: 72px;
        left: 0.75rem;
        right: 0.75rem;
        z-index: 1035;
        max-height: calc(100vh - 90px);
        overflow: auto;
        transform: translateY(-110%);
        transition: transform 0.24s ease;
        pointer-events: none;
    }

    .role-shell__sidebar.is-open {
        transform: translateY(0);
        pointer-events: auto;
    }

    .subadmin-topbar__search {
        min-width: 0;
        width: 100%;
    }

    .role-shell__search {
        min-width: 0;
        width: 100%;
    }

    .subadmin-topbar__search input {
        min-width: 0;
    }

    .role-shell__search input {
        min-width: 0;
    }
}
.certificate-verification-card {
    max-width: 45rem;
}

.virtual-session-card {
    display: flex;
    flex-direction: column;
    border-top: 3px solid var(--brand-500, #14a0bf);
}

.virtual-session-api-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
    gap: 0.75rem;
}

.virtual-session-api-card {
    display: flex;
    flex-direction: column;
    min-height: 185px;
    padding: 1rem;
    border: 1px solid rgba(148, 163, 184, 0.22);
    border-radius: 14px;
    background: var(--surface);
}

.virtual-room-shell {
    height: 100vh;
    background: #11131a;
    display: grid;
    grid-template-rows: 64px minmax(0, 1fr);
    overflow: hidden;
}

.virtual-room-topbar {
    padding: 0.65rem 1rem;
    background: #242632;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.virtual-room-stage {
    min-height: 0;
    position: relative;
}

.virtual-room-stage iframe {
    display: block;
    border: 0;
}

.virtual-room-loading {
    position: absolute;
    inset: 0;
    color: #fff;
    display: grid;
    place-content: center;
    justify-items: center;
    gap: 1rem;
    text-align: center;
    padding: 2rem;
}

.virtual-live-dot {
    display: inline-block;
    width: 0.5rem;
    height: 0.5rem;
    margin-right: 0.35rem;
    border-radius: 50%;
    background: #fff;
    animation: virtual-live-pulse 1.4s infinite;
}

@keyframes virtual-live-pulse {
    50% { opacity: 0.35; }
}

.native-meeting {
    height: 100vh;
    display: grid;
    grid-template-rows: 64px minmax(0, 1fr) 82px;
    overflow: hidden;
    color: #f8fafc;
    background: #11131a;
}

.native-meeting__topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.65rem 1rem;
    background: #242632;
}

.native-meeting__main {
    min-height: 0;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 320px;
}

.native-meeting__stage {
    min-width: 0;
    min-height: 0;
    position: relative;
    overflow: auto;
    padding: 1rem;
}

.native-meeting__notice {
    position: absolute;
    z-index: 5;
    inset: 0;
    display: grid;
    place-content: center;
    justify-items: center;
    gap: 0.8rem;
    text-align: center;
    padding: 2rem;
    background: #11131a;
}

.native-meeting__notice[hidden] {
    display: none;
}

.native-meeting__grid {
    min-height: 100%;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    grid-auto-rows: minmax(220px, 1fr);
    gap: 0.75rem;
}

.native-meeting__grid.view-compact {
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    grid-auto-rows: minmax(140px, 220px);
    align-content: center;
}

.native-meeting__grid.view-speaker {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
}

.native-meeting__grid.view-speaker .native-video-tile {
    flex: 0 0 180px;
    min-height: 120px;
    height: 120px;
}

.native-meeting__grid.view-speaker .native-video-tile.is-focused {
    order: -1;
    flex: 1 0 100%;
    height: calc(100% - 135px);
    min-height: 280px;
}

.native-meeting.is-sidebar-hidden .native-meeting__main {
    grid-template-columns: minmax(0, 1fr);
}

.native-meeting.is-sidebar-hidden .native-meeting__sidebar {
    display: none;
}

.native-video-tile {
    min-height: 220px;
    position: relative;
    overflow: hidden;
    border-radius: 16px;
    background: #252936;
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.native-video-tile video {
    position: absolute;
    z-index: 2;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.native-video-tile--local video {
    transform: scaleX(-1);
}

.native-video-tile--local.is-screen-sharing video {
    transform: none;
}

.native-video-tile__fallback {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
}

.native-video-tile__fallback span {
    display: grid;
    place-items: center;
    width: 84px;
    height: 84px;
    border-radius: 50%;
    font-size: 1.5rem;
    font-weight: 800;
    background: var(--brand-700);
}

.native-video-tile footer {
    position: absolute;
    z-index: 3;
    left: 0.65rem;
    right: 0.65rem;
    bottom: 0.65rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.5rem;
    padding: 0.4rem 0.65rem;
    border-radius: 9px;
    background: rgba(10, 12, 18, 0.78);
    font-size: 0.82rem;
}

.native-video-tile__presenting {
    position: absolute;
    z-index: 4;
    top: 0.65rem;
    left: 0.65rem;
    padding: 0.35rem 0.6rem;
    border-radius: 999px;
    color: #fff;
    background: #dc3545;
    font-size: 0.72rem;
    font-weight: 700;
}

.native-video-tile__resize {
    position: absolute;
    z-index: 5;
    top: 0.65rem;
    right: 0.65rem;
    display: flex;
    gap: 0.25rem;
    padding: 0.25rem;
    border-radius: 10px;
    background: rgba(10, 12, 18, 0.82);
}

.native-video-tile__resize button {
    display: grid;
    place-items: center;
    width: 30px;
    height: 30px;
    padding: 0;
    border: 0;
    border-radius: 7px;
    color: #fff;
    background: transparent;
}

.native-video-tile__resize button:hover,
.native-video-tile__resize button:focus-visible {
    background: var(--brand-700);
}

.native-video-tile.is-presenting-screen {
    border-color: #dc3545;
    box-shadow: 0 0 0 2px rgba(220, 53, 69, 0.3);
}

.native-meeting__grid.view-speaker .native-video-tile.is-focused[data-tile-size="0"] {
    flex-basis: 55%;
    height: 42%;
    min-height: 240px;
}

.native-meeting__grid.view-speaker .native-video-tile.is-focused[data-tile-size="1"] {
    flex-basis: 78%;
    height: 58%;
    min-height: 300px;
}

.native-meeting__grid.view-speaker .native-video-tile.is-focused[data-tile-size="2"] {
    flex-basis: 100%;
    height: calc(100% - 135px);
}

.native-meeting__grid.view-speaker .native-video-tile.is-focused[data-tile-size="3"] {
    flex-basis: 100%;
    height: 100%;
    min-height: 420px;
}

.native-meeting__sidebar {
    min-height: 0;
    color: var(--text);
    background: var(--surface);
    border-left: 1px solid rgba(148, 163, 184, 0.2);
}

.native-meeting__sidebar-content {
    height: calc(100% - 42px);
    padding: 0.85rem;
    overflow: auto;
}

.native-participant {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    padding: 0.65rem;
    border-radius: 11px;
    background: var(--surface-soft, rgba(148, 163, 184, 0.08));
}

.native-participant__avatar {
    display: grid;
    place-items: center;
    flex: 0 0 38px;
    height: 38px;
    border-radius: 50%;
    color: #fff;
    font-size: 0.75rem;
    font-weight: 800;
    background: var(--brand-700);
}

.native-meeting__chat {
    height: 100%;
    display: grid;
    grid-template-rows: minmax(0, 1fr) auto;
    gap: 0.75rem;
}

.native-meeting__messages {
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
}

.native-chat-message {
    padding: 0.65rem;
    border-radius: 11px;
    background: var(--surface-soft, rgba(148, 163, 184, 0.08));
    font-size: 0.84rem;
}

.native-chat-message p {
    margin: 0.3rem 0 0;
    overflow-wrap: anywhere;
}

.native-meeting__chat-form {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 0.5rem;
}

.native-meeting__controls {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.65rem;
    padding: 0.75rem;
    background: #242632;
}

.native-control {
    min-width: 66px;
    border: 0;
    border-radius: 12px;
    padding: 0.55rem 0.7rem;
    color: #fff;
    background: #3a3d49;
    display: grid;
    justify-items: center;
    gap: 0.15rem;
    font-size: 0.7rem;
}

.native-control i {
    font-size: 1.05rem;
}

.native-control:hover,
.native-control.is-active {
    background: var(--brand-700);
}

.native-control--danger,
.native-control--danger:hover {
    background: #dc3545;
}

@media (max-width: 850px) {
    .native-meeting__main {
        grid-template-columns: 1fr;
    }

    .native-meeting__sidebar {
        display: none;
    }

    .native-meeting__controls {
        overflow-x: auto;
        justify-content: flex-start;
    }

    .native-meeting__grid {
        grid-template-columns: 1fr;
    }
}

/* ===================================================================
   EDUSUITE 2026 UI REFRESH
   Shared visual layer for every role portal and public/authenticated UI.
   =================================================================== */
:root {
    --brand-900: #082653;
    --brand-800: #0b3268;
    --brand-700: #0d3b78;
    --brand-600: #1263a7;
    --brand-500: #1687d3;
    --brand-100: #e9f4ff;
    --success: #43a833;
    --accent: #ffbf00;
    --bg: #f4f7fb;
    --bg-elevated: #ffffff;
    --surface: #ffffff;
    --text: #152033;
    --muted: #66758a;
    --line: #e3eaf2;
    --radius-sm: 10px;
    --radius-md: 14px;
    --radius-lg: 20px;
    --shadow-xs: 0 1px 2px rgba(15, 23, 42, .04);
    --shadow-soft: 0 12px 32px -22px rgba(15, 35, 62, .38);
    --shadow-card: 0 18px 45px -32px rgba(8, 38, 83, .5);
    --ring: rgba(22, 135, 211, .22);
}

html[data-theme="dark"] {
    --bg: #08111f;
    --bg-elevated: #0f1c2d;
    --surface: #122238;
    --text: #edf5ff;
    --muted: #a8bad0;
    --line: #263b55;
    --brand-100: rgba(22, 135, 211, .15);
    --brand-700: #48a6e5;
    --brand-600: #5db4ec;
    --brand-500: #72c0f1;
    --shadow-soft: 0 14px 34px -20px rgba(0, 0, 0, .72);
    --shadow-card: 0 22px 50px -30px rgba(0, 0, 0, .86);
}

html { scroll-behavior: smooth; }
body {
    background:
        radial-gradient(circle at 8% 0%, rgba(22, 135, 211, .075), transparent 28rem),
        var(--bg);
    line-height: 1.55;
}

::selection { background: rgba(22, 135, 211, .2); }


.app-navbar {
    min-height: 64px;
    background: color-mix(in srgb, var(--bg-elevated) 92%, transparent);
    border-bottom: 1px solid var(--line);
    box-shadow: 0 8px 28px -25px rgba(8, 38, 83, .65);
    backdrop-filter: blur(18px) saturate(150%);
    -webkit-backdrop-filter: blur(18px) saturate(150%);
}
.app-navbar .navbar-toggler { border: 0; color: var(--text); box-shadow: none; }
.app-navbar .nav-link {
    color: var(--muted);
    font-weight: 700;
    border-radius: .7rem;
    padding: .55rem .75rem !important;
}
.app-navbar .nav-link:hover,
.app-navbar .nav-link:focus { color: var(--brand-700); background: var(--brand-100); }

.app-brand { min-width: 0; text-decoration: none; }
.app-brand__copy { display: grid; min-width: 0; line-height: 1.08; }
.app-brand__copy strong {
    max-width: min(34vw, 300px);
    overflow: hidden;
    color: var(--text);
    font-family: var(--font-display);
    font-size: .96rem;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.app-brand__copy small { margin-top: .2rem; color: var(--muted); font-size: .67rem; font-weight: 700; }
.brand-logo {
    width: 42px;
    min-width: 42px;
    height: 42px;
    padding: 5px;
    border: 1px solid var(--line);
    border-radius: 12px;
    box-shadow: var(--shadow-xs);
}
.brand-logo img { width: 100%; height: 100%; object-fit: contain; }
.brand-logo--default { width: 116px; min-width: 116px; padding: 5px 8px; }

.btn { border-radius: .72rem; font-weight: 750; transition: transform .16s ease, box-shadow .16s ease, background-color .16s ease; }
.btn:not(:disabled):hover { transform: translateY(-1px); }
.btn-brand {
    border-color: var(--brand-700);
    background: linear-gradient(135deg, var(--brand-700), var(--brand-500));
    box-shadow: 0 12px 24px -16px rgba(13, 59, 120, .85);
}
.btn-outline-brand { background: transparent; }
.btn-theme { display: inline-grid; width: 38px; height: 38px; padding: 0; place-items: center; background: var(--surface); }

.app-user-nav { padding-block: .3rem; }
.app-dashboard-link { color: var(--text) !important; }
.app-user-menu {
    display: inline-flex;
    align-items: center;
    gap: .55rem;
    min-height: 44px;
    padding: .35rem .6rem;
    border: 1px solid var(--line);
    background: var(--surface);
    color: var(--text);
    box-shadow: var(--shadow-xs);
}
.app-user-avatar {
    display: grid;
    width: 32px;
    height: 32px;
    place-items: center;
    border-radius: 10px;
    background: linear-gradient(135deg, var(--brand-700), var(--brand-500));
    color: #fff;
    font-weight: 900;
}
.app-user-menu__copy { flex-direction: column; align-items: flex-start; line-height: 1.05; }
.app-user-menu__copy strong { max-width: 180px; overflow: hidden; font-size: .78rem; text-overflow: ellipsis; white-space: nowrap; }
.app-user-menu__copy small { margin-top: .2rem; color: var(--muted); font-size: .64rem; font-weight: 700; }
.app-account-dropdown { min-width: 220px; padding: .5rem; border-radius: 14px; background: var(--surface); }
.app-account-dropdown .dropdown-item { padding: .65rem .75rem; border-radius: .65rem; color: var(--text); font-weight: 650; }

.app-main { padding: 1rem 0 2.5rem; }
.app-authenticated .app-main > .container,
.app-authenticated .app-main > .container-fluid { max-width: 1680px; }

.glass-card,
.workspace-card,
.card {
    border-color: var(--line) !important;
    background: var(--surface);
    box-shadow: var(--shadow-soft);
}
.glass-card { border-radius: var(--radius-lg); }
.glass-card:hover { box-shadow: var(--shadow-card); }

.metrics-grid { gap: 1rem; }
.metric-card {
    position: relative;
    min-height: 128px;
    overflow: hidden;
    padding: 1.15rem !important;
    border: 1px solid var(--line);
    box-shadow: var(--shadow-soft);
    transition: transform .18s ease, box-shadow .18s ease;
}
.metric-card::before {
    position: absolute;
    inset: 0 auto 0 0;
    width: 4px;
    content: "";
    background: linear-gradient(180deg, var(--brand-500), var(--success));
}
.metric-card::after {
    position: absolute;
    width: 92px;
    height: 92px;
    right: -28px;
    bottom: -34px;
    border-radius: 50%;
    content: "";
    background: rgba(22, 135, 211, .07);
}
.metric-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-card); }
.metric-card h2,
.metric-card h3 { position: relative; z-index: 1; color: var(--text); font-weight: 800; letter-spacing: -.035em; }

.role-workspace { padding: .3rem; }
.role-shell { grid-template-columns: 264px minmax(0, 1fr); gap: 1rem; }
.role-shell__sidebar,
.assessor-shell__sidebar {
    top: 80px !important;
    max-height: calc(100vh - 96px);
    overflow-y: auto;
    border: 1px solid rgba(255,255,255,.08) !important;
    border-radius: 18px !important;
    background: linear-gradient(180deg, #082653 0%, #0b3268 58%, #0d3b78 100%) !important;
    box-shadow: 0 22px 45px -30px rgba(8, 38, 83, .9) !important;
    scrollbar-width: thin;
}
.role-shell__sidebar-title,
.assessor-shell__sidebar-title { color: rgba(255,255,255,.7) !important; }
.role-shell__nav .nav-link,
.assessor-shell__nav .nav-link {
    min-height: 42px;
    display: flex;
    align-items: center;
    gap: .55rem;
    margin-bottom: .18rem;
    border-radius: 10px !important;
    color: rgba(255,255,255,.82) !important;
}
.role-shell__nav .nav-link:hover,
.role-shell__nav .nav-link:focus,
.role-shell__nav .nav-link.active,
.assessor-shell__nav .nav-link:hover,
.assessor-shell__nav .nav-link:focus,
.assessor-shell__nav .nav-link.active {
    border-color: rgba(255,255,255,.13) !important;
    background: rgba(255,255,255,.12) !important;
    color: #fff !important;
}
.role-shell__nav .nav-link.active,
.assessor-shell__nav .nav-link.active { box-shadow: inset 3px 0 0 var(--accent); }

.role-shell__topbar,
.assessor-shell__topbar,
.subadmin-main-topbar {
    position: sticky;
    z-index: 20;
    top: 72px;
    border: 1px solid var(--line) !important;
    border-radius: 16px !important;
    background: color-mix(in srgb, var(--surface) 94%, transparent) !important;
    box-shadow: var(--shadow-soft) !important;
    backdrop-filter: blur(14px);
}
.role-shell__search,
.assessor-shell__search {
    min-height: 42px;
    border-color: var(--line) !important;
    border-radius: 12px !important;
    background: var(--bg) !important;
}

.subadmin-template {
    --subadmin-primary: var(--brand-500);
    --subadmin-bg-body: var(--bg);
    --subadmin-card-bg: var(--surface);
    --subadmin-text-color: var(--text);
    --subadmin-border: var(--line);
    --subadmin-shadow: var(--shadow-soft);
    font-family: var(--font-base);
}
.subadmin-template #sidebar {
    border: 1px solid rgba(255,255,255,.08);
    border-radius: 0 18px 18px 0;
    background: linear-gradient(180deg, #082653 0%, #0b3268 58%, #0d3b78 100%);
    box-shadow: 14px 0 36px -30px rgba(8,38,83,.92);
}
.subadmin-template #sidebar .nav-link {
    min-height: 39px;
    display: flex;
    align-items: center;
    border-radius: 9px;
    color: rgba(255,255,255,.74);
}
.subadmin-template #sidebar .nav-link:hover,
.subadmin-template #sidebar .nav-link:focus,
.subadmin-template #sidebar .nav-link.active {
    color: #fff;
    background: rgba(255,255,255,.11);
}
.subadmin-template #sidebar .nav-link.active { box-shadow: inset 3px 0 0 var(--accent); }
.subadmin-template #sidebar .sidebar-heading-link {
    margin-top: .7rem;
    color: rgba(255,255,255,.44);
}
.app-main.admin-panel.subadmin-template #main-content { background: var(--bg) !important; }

.table-responsive {
    border: 1px solid var(--line);
    border-radius: 14px;
    background: var(--surface);
    box-shadow: var(--shadow-xs);
}
.table { --bs-table-bg: transparent; --bs-table-color: var(--text); margin-bottom: 0; }
.table thead th {
    border-bottom: 1px solid var(--line);
    background: color-mix(in srgb, var(--bg) 82%, var(--surface));
    color: var(--muted);
    font-size: .72rem;
    font-weight: 850;
    letter-spacing: .035em;
    text-transform: uppercase;
    white-space: nowrap;
}
.table tbody td { border-color: var(--line); vertical-align: middle; }
.table-hover > tbody > tr:hover > * { --bs-table-bg-state: rgba(22,135,211,.045); }

.form-label { color: var(--text); font-size: .84rem; font-weight: 750; }
.form-control,
.form-select {
    min-height: 42px;
    border-color: var(--line);
    border-radius: 11px;
    background-color: var(--surface);
    color: var(--text);
}
.form-control::placeholder { color: color-mix(in srgb, var(--muted) 72%, transparent); }
.form-control:focus,
.form-select:focus { border-color: var(--brand-500); box-shadow: 0 0 0 .22rem var(--ring); }

.nav-tabs { gap: .35rem; border: 0; }
.nav-tabs .nav-link {
    border: 1px solid transparent;
    border-radius: 10px;
    color: var(--muted);
    font-weight: 750;
}
.nav-tabs .nav-link.active {
    border-color: var(--line);
    background: var(--surface);
    color: var(--brand-700);
    box-shadow: var(--shadow-xs);
}

.modal .modal-content { border: 1px solid var(--line) !important; border-radius: 18px; overflow: hidden; background: var(--surface); }
.modal .modal-header {
    background: linear-gradient(135deg, #082653, #1263a7) !important;
    padding: 1rem 1.25rem;
}
.modal .modal-body { color: var(--text); }
.modal .modal-footer { border-color: var(--line); background: var(--bg); }

.alert { border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow-xs); }
.badge { font-weight: 750; letter-spacing: .01em; }

::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { border: 3px solid transparent; border-radius: 999px; background: #b8c5d4; background-clip: padding-box; }
html[data-theme="dark"] ::-webkit-scrollbar-thumb { background: #3e536d; background-clip: padding-box; }

@media (max-width: 991.98px) {
    .app-navbar .navbar-collapse { padding: .75rem 0 1rem; }
    .app-navbar .navbar-nav { align-items: stretch !important; }
    .app-navbar .btn { width: 100%; justify-content: center; margin-top: .25rem; }
    .app-navbar .btn-theme { width: 42px; }
    .role-shell { grid-template-columns: 1fr; }
    .role-shell__sidebar,
    .assessor-shell__sidebar {
        position: fixed !important;
        z-index: 1090;
        inset: 74px auto 12px 12px;
        width: min(310px, calc(100vw - 24px));
        max-height: none;
        transform: translateX(calc(-100% - 24px));
        transition: transform .22s ease;
    }
    .role-shell__sidebar.is-open,
    .role-shell__sidebar.show,
    .assessor-shell__sidebar.is-open,
    .assessor-shell__sidebar.show { transform: translateX(0); }
    .role-shell__topbar,
    .assessor-shell__topbar { position: static; }
    .role-shell__topbar-left,
    .role-shell__topbar-right,
    .assessor-shell__topbar-left,
    .assessor-shell__topbar-right { width: 100%; }
    .role-shell__search,
    .assessor-shell__search { width: 100%; min-width: 0; }
    .role-shell__search input,
    .assessor-shell__search input { min-width: 0; }
}

@media (max-width: 575.98px) {
    .app-brand__copy strong { max-width: 40vw; }
    .brand-logo--default { width: 96px; min-width: 96px; }
    .app-main { padding-top: .65rem; }
    .role-workspace { padding: 0; }
    .glass-card { border-radius: 15px; }
    .metric-card { min-height: 112px; }
    .modal-dialog { margin: .5rem; }
}

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

/* ===================================================================
   EDUSUITE VIRTUAL CLASSROOM 2.0
   Pre-join lobby, live moderation, reactions and connection feedback.
   =================================================================== */
.native-meeting.is-prejoin > .native-meeting__topbar,
.native-meeting.is-prejoin > .native-meeting__main,
.native-meeting.is-prejoin > .native-meeting__controls {
    visibility: hidden;
}

.meeting-prejoin {
    position: fixed;
    z-index: 1080;
    inset: 0;
    display: grid;
    place-items: center;
    padding: 1.5rem;
    color: var(--text);
    background:
        radial-gradient(circle at 20% 20%, rgba(22, 135, 211, .22), transparent 34rem),
        radial-gradient(circle at 85% 80%, rgba(67, 168, 51, .14), transparent 30rem),
        #07182f;
}

.native-meeting:not(.is-prejoin) .meeting-prejoin {
    display: none;
}

.meeting-prejoin__card {
    width: min(1040px, 100%);
    display: grid;
    grid-template-columns: minmax(0, 1.25fr) minmax(330px, .75fr);
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, .14);
    border-radius: 24px;
    background: var(--surface);
    box-shadow: 0 35px 80px rgba(0, 0, 0, .38);
}

.meeting-prejoin__preview {
    position: relative;
    min-height: 520px;
    overflow: hidden;
    display: grid;
    place-items: center;
    background: #111827;
}

.meeting-prejoin__preview video {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transform: scaleX(-1);
}

.meeting-prejoin__avatar {
    z-index: 1;
    display: grid;
    place-items: center;
    width: 112px;
    height: 112px;
    border-radius: 50%;
    color: #fff;
    font-size: 2rem;
    font-weight: 800;
    background: linear-gradient(135deg, var(--brand-600), var(--brand-800));
    box-shadow: 0 16px 40px rgba(0, 0, 0, .25);
}

.meeting-prejoin__preview-actions {
    position: absolute;
    z-index: 3;
    left: 50%;
    bottom: 1.25rem;
    display: flex;
    gap: .6rem;
    transform: translateX(-50%);
}

.meeting-prejoin__setup {
    padding: 2rem;
    align-self: center;
}

.meeting-host-menu {
    min-width: 240px;
}

.native-participant .dropdown {
    margin-left: -.3rem;
}

.native-chat-message.is-self {
    margin-left: 1.5rem;
    border: 1px solid rgba(22, 135, 211, .18);
    background: rgba(22, 135, 211, .1);
}

.meeting-reaction-menu {
    min-width: auto;
}

.meeting-reaction-menu.show {
    display: grid;
    grid-template-columns: repeat(5, 46px);
    gap: .25rem;
}

.meeting-reaction-menu button {
    width: 46px;
    height: 46px;
    border: 0;
    border-radius: 12px;
    background: transparent;
    font-size: 1.45rem;
    transition: transform .16s ease, background .16s ease;
}

.meeting-reaction-menu button:hover,
.meeting-reaction-menu button:focus-visible {
    transform: translateY(-2px) scale(1.08);
    background: rgba(22, 135, 211, .12);
}

.meeting-reaction-layer {
    position: absolute;
    z-index: 8;
    right: 1.25rem;
    bottom: 1rem;
    width: 230px;
    pointer-events: none;
}

.meeting-reaction-bubble {
    position: absolute;
    right: 0;
    bottom: 0;
    display: flex;
    align-items: center;
    gap: .55rem;
    max-width: 220px;
    padding: .45rem .7rem;
    border: 1px solid rgba(255,255,255,.18);
    border-radius: 999px;
    color: #fff;
    background: rgba(10, 18, 32, .84);
    box-shadow: 0 12px 30px rgba(0,0,0,.25);
    animation: meeting-reaction-float 2.4s ease-out forwards;
}

.meeting-reaction-bubble span {
    font-size: 1.45rem;
}

.meeting-reaction-bubble small {
    max-width: 130px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

@keyframes meeting-reaction-float {
    0% { opacity: 0; transform: translateY(20px) scale(.88); }
    14% { opacity: 1; transform: translateY(0) scale(1); }
    80% { opacity: 1; transform: translateY(-85px) scale(1); }
    100% { opacity: 0; transform: translateY(-120px) scale(.95); }
}

.meeting-toast {
    position: absolute;
    z-index: 12;
    top: 1rem;
    left: 50%;
    max-width: min(520px, calc(100% - 2rem));
    padding: .7rem 1rem;
    border-radius: 12px;
    color: #fff;
    background: rgba(15, 23, 42, .94);
    box-shadow: 0 18px 40px rgba(0, 0, 0, .28);
    opacity: 0;
    transform: translate(-50%, -10px);
    transition: opacity .18s ease, transform .18s ease;
}

.meeting-toast.is-visible {
    opacity: 1;
    transform: translate(-50%, 0);
}

.meeting-toast--success { background: rgba(22, 101, 52, .95); }
.meeting-toast--warning { background: rgba(146, 64, 14, .96); }
.meeting-toast--danger { background: rgba(153, 27, 27, .96); }

.native-control:disabled {
    opacity: .45;
    cursor: not-allowed;
}

.native-meeting__sidebar .nav-tabs .nav-link {
    padding-inline: .45rem;
    font-size: .82rem;
}

.native-video-tile.is-camera-off video {
    opacity: 0;
}

@media (max-width: 900px) {
    .meeting-prejoin__card {
        grid-template-columns: 1fr;
        max-width: 680px;
        max-height: calc(100vh - 2rem);
        overflow-y: auto;
    }
    .meeting-prejoin__preview {
        min-height: 310px;
    }
}

@media (max-width: 560px) {
    .meeting-prejoin { padding: .6rem; }
    .meeting-prejoin__card { border-radius: 18px; }
    .meeting-prejoin__preview { min-height: 250px; }
    .meeting-prejoin__setup { padding: 1.25rem; }
    .native-meeting__topbar { align-items: flex-start; }
    .native-meeting__topbar > :last-child { gap: .35rem !important; }
    .native-meeting__controls { padding-bottom: max(.75rem, env(safe-area-inset-bottom)); }
}


/* ChilledTutor public marketing wordmark */
.brand-logo--marketing {
    width: 222px;
    min-width: 222px;
    height: 58px;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
    overflow: visible;
}
.brand-logo--marketing img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}
@media (max-width: 575.98px) {
    .brand-logo--marketing {
        width: 184px;
        min-width: 184px;
        height: 48px;
    }
}


/* ===================================================================
   CHILLEDTUTOR VIRTUAL MEETING 3.1 — TEAMS / ZOOM INSPIRED CANVAS
   Makes the video canvas use the available viewport instead of leaving
   large unused black bands around one or a few participants.
   =================================================================== */
.native-meeting {
    height: 100vh;
    height: 100dvh;
    grid-template-rows: 58px minmax(0, 1fr) 74px;
    background: #14161c;
}

.native-meeting__topbar {
    min-width: 0;
    padding: .45rem .8rem;
    background: #23252d;
    border-bottom: 1px solid rgba(255,255,255,.06);
}

.native-meeting__main {
    min-height: 0;
    grid-template-columns: minmax(0, 1fr) clamp(286px, 22vw, 330px);
    background: #111319;
}

.native-meeting__stage {
    min-width: 0;
    min-height: 0;
    display: flex;
    padding: .7rem;
    overflow: hidden;
    background: #111319;
}

.native-meeting__grid {
    flex: 1 1 auto;
    width: 100%;
    height: 100%;
    min-width: 0;
    min-height: 0;
    align-content: stretch;
    justify-content: stretch;
    gap: .65rem;
    grid-auto-rows: minmax(0, 1fr);
}

/* Smart gallery geometry. JavaScript updates data-layout-group as people join/leave. */
.native-meeting__grid.view-gallery[data-layout-group="single"] {
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: minmax(0, 1fr);
}

.native-meeting__grid.view-gallery[data-layout-group="duo"] {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-template-rows: minmax(0, 1fr);
}

.native-meeting__grid.view-gallery[data-layout-group="quad"] {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-template-rows: repeat(2, minmax(0, 1fr));
}

.native-meeting__grid.view-gallery[data-layout-group="six"] {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    grid-template-rows: repeat(2, minmax(0, 1fr));
}

.native-meeting__grid.view-gallery[data-layout-group="nine"] {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    grid-template-rows: repeat(3, minmax(0, 1fr));
}

.native-meeting__grid.view-gallery[data-layout-group="sixteen"] {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    grid-auto-rows: minmax(0, 1fr);
}

.native-meeting__grid.view-gallery[data-layout-group="many"] {
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    grid-auto-rows: minmax(140px, 1fr);
    overflow-y: auto;
}

.native-video-tile {
    width: 100%;
    height: 100%;
    min-width: 0;
    min-height: 0;
    border-radius: 12px;
    background: #24272f;
    box-shadow: 0 5px 18px rgba(0,0,0,.18);
}

/* Default is Zoom/Teams-style fill. Users can switch to Fit from View. */
.native-video-tile video {
    object-fit: cover;
    background: #101216;
}

.native-meeting.is-video-fit .native-video-tile video,
.native-video-tile.is-screen-sharing video,
.native-video-tile.is-presenting-screen video {
    object-fit: contain;
}

/* A single participant gets the full usable canvas — no small strip in a sea of black. */
.native-meeting__grid.view-gallery[data-layout-group="single"] .native-video-tile {
    max-width: none;
    max-height: none;
    border-radius: 10px;
}

.native-meeting__grid.view-gallery[data-layout-group="single"] .native-video-tile footer {
    left: .75rem;
    right: auto;
    bottom: .75rem;
    min-width: 180px;
    max-width: min(420px, calc(100% - 1.5rem));
}

/* Speaker mode: dominant content gets almost all vertical space; thumbnails form a filmstrip. */
.native-meeting__grid.view-speaker {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 180px));
    grid-template-rows: minmax(0, 1fr) 104px;
    align-content: stretch;
    justify-content: center;
    overflow: hidden;
}

.native-meeting__grid.view-speaker .native-video-tile {
    min-height: 0;
    height: 104px;
}

.native-meeting__grid.view-speaker .native-video-tile.is-focused {
    grid-column: 1 / -1;
    grid-row: 1;
    width: 100%;
    height: 100%;
    min-height: 0;
    max-width: none;
}

.native-meeting__grid.view-speaker .native-video-tile:not(.is-focused) {
    grid-row: 2;
}

.native-meeting__grid.view-compact {
    height: 100%;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    grid-auto-rows: minmax(120px, 1fr);
    align-content: stretch;
}

.native-meeting__sidebar {
    min-width: 0;
    box-shadow: -8px 0 24px rgba(0,0,0,.08);
}

.native-meeting__sidebar .nav-tabs {
    min-height: 44px;
    align-items: stretch;
}

.native-meeting__sidebar .nav-tabs .nav-link {
    min-height: 44px;
    border-radius: 0;
    font-weight: 600;
}

.native-meeting__sidebar-content {
    height: calc(100% - 44px);
    padding: .75rem;
}

.native-meeting__controls {
    gap: .5rem;
    padding: .5rem .75rem;
    background: #23252d;
    border-top: 1px solid rgba(255,255,255,.06);
}

.native-control {
    min-width: 58px;
    min-height: 54px;
    padding: .42rem .58rem;
    border-radius: 10px;
    background: #353842;
    transition: background .16s ease, transform .16s ease, box-shadow .16s ease;
}

.native-control:hover {
    transform: translateY(-1px);
    background: #454956;
}

.native-control.is-active {
    background: var(--brand-700);
    box-shadow: 0 4px 14px rgba(13,59,120,.24);
}

.native-control--danger,
.native-control--danger:hover {
    background: #d9363e;
}

.native-control span {
    line-height: 1.05;
}

/* Landscape tablets / smaller laptops: keep the canvas dominant. */
@media (max-width: 1180px) {
    .native-meeting__main {
        grid-template-columns: minmax(0, 1fr) 280px;
    }
    .native-meeting__stage { padding: .5rem; }
    .native-meeting__grid { gap: .5rem; }
    .native-meeting__topbar { gap: .5rem; }
    .native-meeting__topbar .btn,
    .native-meeting__topbar .badge { font-size: .72rem; }
}

/* Phones and narrow tablets use an overlay side panel so video keeps the viewport. */
@media (max-width: 900px) {
    .native-meeting {
        grid-template-rows: 54px minmax(0, 1fr) 68px;
    }
    .native-meeting__main {
        position: relative;
        display: block;
    }
    .native-meeting__stage {
        position: absolute;
        inset: 0;
        padding: .4rem;
    }
    .native-meeting__sidebar {
        display: block;
        position: absolute;
        z-index: 20;
        top: 0;
        right: 0;
        bottom: 0;
        width: min(88vw, 320px);
        transform: translateX(0);
        transition: transform .18s ease;
    }
    .native-meeting.is-sidebar-hidden .native-meeting__sidebar {
        display: block;
        transform: translateX(100%);
        pointer-events: none;
    }
    .native-meeting:not(.is-sidebar-hidden) .native-meeting__stage {
        right: min(88vw, 320px);
    }
    .native-meeting__grid.view-gallery[data-layout-group="duo"] {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
    .native-meeting__grid.view-gallery[data-layout-group="quad"],
    .native-meeting__grid.view-gallery[data-layout-group="six"],
    .native-meeting__grid.view-gallery[data-layout-group="nine"],
    .native-meeting__grid.view-gallery[data-layout-group="sixteen"] {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        grid-auto-rows: minmax(0, 1fr);
    }
    .native-control {
        min-width: 52px;
        min-height: 50px;
        padding: .35rem .45rem;
    }
}

@media (max-width: 650px) {
    .native-meeting__topbar {
        padding-inline: .45rem;
    }
    .native-meeting__topbar > :last-child .badge[data-connection-quality],
    .native-meeting__topbar > :last-child > .badge[data-meeting-count] {
        display: none;
    }
    .native-meeting__controls {
        justify-content: flex-start;
        overflow-x: auto;
        scrollbar-width: none;
        padding-bottom: max(.45rem, env(safe-area-inset-bottom));
    }
    .native-meeting__controls::-webkit-scrollbar { display: none; }
    .native-control span { display: none; }
    .native-control {
        flex: 0 0 46px;
        min-width: 46px;
        width: 46px;
        min-height: 46px;
        height: 46px;
        border-radius: 50%;
        padding: 0;
    }
    .native-control i { font-size: 1rem; }
}


/* Keep presenter resize controls useful without re-introducing vertical dead space. */
.native-meeting__grid.view-speaker .native-video-tile.is-focused[data-tile-size="0"] {
    width: 55%;
    max-width: 55%;
    height: 100%;
    min-height: 0;
    justify-self: center;
}
.native-meeting__grid.view-speaker .native-video-tile.is-focused[data-tile-size="1"] {
    width: 78%;
    max-width: 78%;
    height: 100%;
    min-height: 0;
    justify-self: center;
}
.native-meeting__grid.view-speaker .native-video-tile.is-focused[data-tile-size="2"],
.native-meeting__grid.view-speaker .native-video-tile.is-focused[data-tile-size="3"] {
    width: 100%;
    max-width: 100%;
    height: 100%;
    min-height: 0;
    justify-self: stretch;
}


/* ChilledTutor Virtual Meeting Chat 4.0 */
.native-meeting__chat {
    grid-template-rows: auto minmax(0, 1fr) auto;
}

.native-meeting__chat-meta {
    min-height: 32px;
    padding: 0.35rem 0.55rem;
    border-radius: 10px;
    background: rgba(148, 163, 184, 0.08);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    font-size: 0.72rem;
    color: var(--muted);
}

.native-meeting__messages {
    padding: 0.15rem 0.1rem 0.45rem;
    scroll-behavior: smooth;
}

.native-chat-message {
    width: fit-content;
    max-width: 92%;
    min-width: 150px;
    padding: 0.75rem 0.8rem;
    border-radius: 16px 16px 16px 5px;
    background: var(--surface-soft, rgba(148, 163, 184, 0.08));
}

.native-chat-message.is-self {
    align-self: flex-end;
    margin-left: 1rem;
    border-radius: 16px 16px 5px 16px;
}

.native-chat-message__meta {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 1rem;
}

.native-chat-message__meta strong {
    font-size: 0.82rem;
}

.native-chat-message__meta small {
    white-space: nowrap;
    font-size: 0.68rem;
}

.native-chat-message p {
    white-space: pre-wrap;
    font-size: 0.9rem;
    line-height: 1.45;
}

.native-meeting__chat-form {
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: end;
    position: relative;
}

.native-meeting__composer {
    position: relative;
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    align-items: end;
    border: 1px solid rgba(148, 163, 184, 0.35);
    border-radius: 14px;
    background: var(--surface, #fff);
}

.native-meeting__composer:focus-within {
    border-color: rgba(22, 135, 211, 0.65);
    box-shadow: 0 0 0 3px rgba(22, 135, 211, 0.1);
}

.native-meeting__composer textarea.form-control {
    min-height: 46px;
    max-height: 120px;
    resize: vertical;
    border: 0;
    box-shadow: none !important;
    background: transparent;
    padding: 0.72rem 0.65rem 0.72rem 0.2rem;
}

.native-meeting__emoji-toggle {
    width: 42px;
    height: 46px;
    border: 0;
    background: transparent;
    color: var(--muted);
    font-size: 1.1rem;
}

.native-meeting__emoji-toggle:hover,
.native-meeting__emoji-toggle:focus-visible {
    color: var(--brand-600);
}

.native-meeting__emoji-picker {
    position: absolute;
    z-index: 40;
    left: 0;
    bottom: calc(100% + 8px);
    width: 228px;
    padding: 0.55rem;
    border: 1px solid rgba(148, 163, 184, 0.25);
    border-radius: 14px;
    background: var(--surface, #fff);
    box-shadow: 0 16px 38px rgba(15, 23, 42, 0.18);
    grid-template-columns: repeat(5, 1fr);
    gap: 0.25rem;
}

.native-meeting__emoji-picker:not([hidden]) {
    display: grid;
}

.native-meeting__emoji-picker button {
    width: 38px;
    height: 38px;
    border: 0;
    border-radius: 10px;
    background: transparent;
    font-size: 1.25rem;
}

.native-meeting__emoji-picker button:hover,
.native-meeting__emoji-picker button:focus-visible {
    background: rgba(22, 135, 211, 0.1);
    transform: scale(1.08);
}

.native-meeting__send {
    width: 48px;
    min-width: 48px;
    height: 48px;
    border-radius: 14px;
}

@media (max-width: 720px) {
    .native-meeting__chat-meta {
        align-items: flex-start;
        flex-direction: column;
        gap: 0.1rem;
    }

    .native-chat-message {
        max-width: 96%;
    }
}


/* ChilledTutor System Tooltip Standard 3.4 */
.app-tip-shell {
    display: inline-flex;
    align-items: center;
    vertical-align: middle;
    margin-top: 0.3rem;
    line-height: 1;
}

.app-tip-icon {
    width: 24px;
    height: 24px;
    padding: 0;
    border: 0;
    border-radius: 999px;
    display: inline-grid;
    place-items: center;
    color: var(--brand-600);
    background: rgba(20, 160, 191, 0.10);
    cursor: help;
    font-size: 0.8rem;
    line-height: 1;
    transition: transform .15s ease, background-color .15s ease, color .15s ease, box-shadow .15s ease;
}

.app-tip-icon:hover,
.app-tip-icon:focus-visible {
    color: #ffffff;
    background: var(--brand-600);
    transform: translateY(-1px);
    box-shadow: 0 6px 14px rgba(10, 127, 150, .18);
    outline: none;
}

.app-tip-icon:focus-visible {
    box-shadow: 0 0 0 3px var(--ring), 0 6px 14px rgba(10, 127, 150, .18);
}

.app-tip-tooltip {
    --bs-tooltip-opacity: 1;
    --bs-tooltip-bg: #0f172a;
    --bs-tooltip-color: #f8fafc;
    --bs-tooltip-max-width: 360px;
}

.app-tip-tooltip .tooltip-inner {
    max-width: 360px;
    padding: .7rem .85rem;
    border-radius: 10px;
    text-align: left;
    font-family: var(--font-base);
    font-size: .76rem;
    line-height: 1.5;
    box-shadow: 0 12px 30px rgba(15, 23, 42, .20);
}

html[data-theme="dark"] .app-tip-icon {
    color: #7dd3fc;
    background: rgba(56, 189, 248, .12);
}

html[data-theme="dark"] .app-tip-icon:hover,
html[data-theme="dark"] .app-tip-icon:focus-visible {
    color: #081019;
    background: #7dd3fc;
}

@media (max-width: 575.98px) {
    .app-tip-tooltip {
        --bs-tooltip-max-width: min(320px, calc(100vw - 32px));
    }

    .app-tip-tooltip .tooltip-inner {
        max-width: min(320px, calc(100vw - 32px));
    }
}


/* CSV format tooltips: wider so column formats/examples remain readable */
.app-csv-tooltip {
    --bs-tooltip-max-width: 520px;
}
.app-csv-tooltip .tooltip-inner {
    max-width: 520px;
    font-size: .78rem;
    line-height: 1.55;
}
@media (max-width: 575.98px) {
    .app-csv-tooltip,
    .app-csv-tooltip .tooltip-inner {
        max-width: min(340px, calc(100vw - 28px));
    }
}


/* ChilledTutor Contextual Learning Resources 3.7 */
.role-detail-fact {
    height: 100%;
    padding: .8rem .9rem;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    background: #f8fafc;
}
.role-detail-fact span {
    display: block;
    margin-bottom: .2rem;
    color: #64748b;
    font-size: .68rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .04em;
}
.role-detail-fact strong {
    color: #0f172a;
    font-size: .9rem;
}

.role-resource-preview {
    padding: 1rem;
    border: 1px solid #dbe7f3;
    border-radius: 14px;
    background: linear-gradient(135deg, #fbfdff, #ffffff);
}
.role-resource-preview__files {
    display: grid;
    gap: .45rem;
}
.role-resource-preview__file {
    display: grid;
    grid-template-columns: 22px minmax(0, 1fr) 18px;
    gap: .55rem;
    align-items: center;
    padding: .55rem .65rem;
    border: 1px solid #e5e7eb;
    border-radius: 9px;
    background: #fff;
    color: #334155;
    text-decoration: none;
    font-size: .75rem;
}
.role-resource-preview__file:hover {
    border-color: #bfdbfe;
    background: #f8fbff;
}
.role-resource-preview__file span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.role-resource-preview__empty {
    min-height: 66px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: .55rem;
    padding: .8rem;
    border: 1px dashed #cbd5e1;
    border-radius: 10px;
    color: #64748b;
    background: #f8fafc;
    font-size: .73rem;
}

.role-resource-shortcuts {
    padding: .8rem;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    background: #f8fafc;
}

.role-context-resource-section {
    border-left: 4px solid #16a34a;
}
.role-context-resource-summary {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: .7rem;
}
.role-context-resource-summary > div {
    padding: .75rem;
    border: 1px solid #e5e7eb;
    border-radius: 11px;
    background: #f8fafc;
}
.role-context-resource-summary strong {
    display: block;
    color: #0f172a;
    font-size: 1rem;
}
.role-context-resource-summary span {
    color: #64748b;
    font-size: .68rem;
}
.role-context-unit-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
    gap: .7rem;
}
.role-context-unit-card {
    padding: .85rem;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    background: #fff;
}
.role-context-unit-card h4 {
    margin: .45rem 0 .35rem;
    color: #0f172a;
    font-size: .8rem;
    line-height: 1.35;
}
.role-context-unit-card p {
    margin: 0 0 .65rem;
    color: #64748b;
    font-size: .68rem;
}

html[data-theme="dark"] .role-detail-fact,
html[data-theme="dark"] .role-resource-preview,
html[data-theme="dark"] .role-resource-preview__file,
html[data-theme="dark"] .role-resource-preview__empty,
html[data-theme="dark"] .role-resource-shortcuts,
html[data-theme="dark"] .role-context-resource-summary > div,
html[data-theme="dark"] .role-context-unit-card {
    background: #111827;
    border-color: #26364a;
}
html[data-theme="dark"] .role-detail-fact strong,
html[data-theme="dark"] .role-resource-preview__file,
html[data-theme="dark"] .role-context-resource-summary strong,
html[data-theme="dark"] .role-context-unit-card h4 {
    color: #f8fafc;
}

@media (max-width: 767.98px) {
    .role-context-resource-summary {
        grid-template-columns: 1fr;
    }
}


/* ============================================================
   ChilledTutor Sub Administrator Unified Navigation Shell 3.8
   Shared by the main Organisation Administrator dashboard and
   Document Centre so navigation behaves and looks the same.
   ============================================================ */
.subadmin-shell {
    --subadmin-unified-sidebar-width: 272px;
    --subadmin-shell-top: 74px;
}

.subadmin-unified-sidebar {
    width: 100%;
    height: 100%;
    min-height: 0;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    border: 1px solid rgba(255,255,255,.08);
    border-radius: 0 18px 18px 0;
    background: linear-gradient(180deg, #082653 0%, #0b3268 58%, #0d3b78 100%);
    color: #fff;
    box-shadow: 14px 0 36px -30px rgba(8,38,83,.92);
}

.subadmin-sidebar-brand {
    min-height: 72px;
    display: flex;
    align-items: center;
    gap: .7rem;
    padding: .8rem .9rem;
    border-bottom: 1px solid rgba(255,255,255,.11);
    flex: 0 0 auto;
}

.subadmin-sidebar-brand__mark {
    width: 39px;
    height: 39px;
    border-radius: 12px;
    display: grid;
    place-items: center;
    flex: 0 0 auto;
    background: linear-gradient(135deg, rgba(255,255,255,.18), rgba(255,255,255,.08));
    border: 1px solid rgba(255,255,255,.14);
    color: #ffd166;
    font-size: 1rem;
}

.subadmin-sidebar-brand__copy {
    min-width: 0;
    display: grid;
    line-height: 1.15;
}

.subadmin-sidebar-brand__copy strong {
    overflow: hidden;
    color: #fff;
    font-size: .82rem;
    font-weight: 850;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.subadmin-sidebar-brand__copy span {
    margin-top: .22rem;
    color: rgba(255,255,255,.56);
    font-size: .61rem;
    font-weight: 650;
}

.subadmin-sidebar-close {
    width: 31px;
    height: 31px;
    margin-left: auto;
    padding: 0;
    display: grid;
    place-items: center;
    border: 1px solid rgba(255,255,255,.16);
    border-radius: 9px;
    color: #fff;
    background: rgba(255,255,255,.07);
}

.subadmin-sidebar-scroll {
    min-height: 0;
    flex: 1 1 auto;
    overflow-y: auto;
    overflow-x: hidden;
    padding: .55rem .45rem .75rem;
    scrollbar-width: thin;
    scrollbar-color: rgba(255,255,255,.18) transparent;
}

.subadmin-sidebar-nav {
    gap: .08rem;
}

.subadmin-unified-sidebar .sidebar-section-label {
    margin: .8rem .55rem .28rem;
    padding: .2rem .38rem;
    list-style: none;
    color: rgba(255,255,255,.38);
    font-size: .58rem;
    font-weight: 850;
    letter-spacing: .105em;
    text-transform: uppercase;
}

.subadmin-unified-sidebar .nav-link {
    min-height: 38px;
    display: flex;
    align-items: center;
    gap: .55rem;
    margin: 0 .18rem;
    padding: .52rem .65rem;
    border: 1px solid transparent;
    border-radius: 10px;
    color: rgba(255,255,255,.74);
    font-size: .73rem;
    font-weight: 680;
    text-decoration: none;
    transition: background-color .16s ease, border-color .16s ease, color .16s ease, transform .16s ease;
}

.subadmin-unified-sidebar .nav-link > i {
    width: 20px;
    margin: 0;
    flex: 0 0 20px;
    color: rgba(255,255,255,.63);
    font-size: .86rem;
    text-align: center;
}

.subadmin-unified-sidebar .nav-link:hover,
.subadmin-unified-sidebar .nav-link:focus-visible {
    color: #fff;
    background: rgba(255,255,255,.085);
    border-color: rgba(255,255,255,.06);
    transform: translateX(1px);
    outline: none;
}

.subadmin-unified-sidebar .nav-link:hover > i,
.subadmin-unified-sidebar .nav-link:focus-visible > i,
.subadmin-unified-sidebar .nav-link.active > i {
    color: #ffd166;
}

.subadmin-unified-sidebar .nav-link.active {
    color: #fff;
    background: linear-gradient(90deg, rgba(20,160,191,.26), rgba(255,255,255,.09));
    border-color: rgba(255,255,255,.09);
    box-shadow: inset 3px 0 0 #ffd166;
}

.subadmin-unified-sidebar .subadmin-dashboard-link {
    min-height: 52px;
    align-items: center;
    margin-bottom: .2rem;
    background: rgba(255,255,255,.055);
}

.subadmin-unified-sidebar .subadmin-dashboard-link > i {
    font-size: 1rem;
}

.subadmin-nav-copy {
    min-width: 0;
    display: grid;
    gap: .1rem;
}

.subadmin-nav-copy strong {
    color: inherit;
    font-size: .76rem;
    font-weight: 850;
}

.subadmin-nav-copy small {
    color: rgba(255,255,255,.48);
    font-size: .57rem;
    font-weight: 600;
}

.subadmin-unified-sidebar .subadmin-dashboard-link.active .subadmin-nav-copy small {
    color: rgba(255,255,255,.72);
}

.subadmin-sidebar-footer {
    flex: 0 0 auto;
    padding: .65rem .7rem .75rem;
    border-top: 1px solid rgba(255,255,255,.09);
}

.subadmin-sidebar-footer a {
    min-height: 38px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: .45rem;
    padding: .5rem .65rem;
    border: 1px solid rgba(255,255,255,.12);
    border-radius: 10px;
    background: rgba(255,255,255,.06);
    color: rgba(255,255,255,.78);
    font-size: .65rem;
    font-weight: 750;
    text-decoration: none;
}

.subadmin-sidebar-footer a:hover,
.subadmin-sidebar-footer a:focus-visible {
    background: rgba(255,255,255,.11);
    color: #fff;
}

/* Main dashboard uses the same fixed sidebar width as the Document Centre. */
@media (min-width: 992px) {
    .subadmin-shell.subadmin-template .subadmin-sidebar-col {
        width: var(--subadmin-unified-sidebar-width);
        max-width: var(--subadmin-unified-sidebar-width);
    }

    .subadmin-shell.subadmin-template #main-content {
        width: calc(100% - var(--subadmin-unified-sidebar-width));
        max-width: calc(100% - var(--subadmin-unified-sidebar-width));
    }
}

/* The dashboard menu button is visible at Bootstrap's lg breakpoint,
   so make the 768–991px range behave like the mobile navigation too. */
@media (min-width: 768px) and (max-width: 991.98px) {
    .subadmin-shell.subadmin-template {
        overflow: visible;
    }

    .subadmin-shell.subadmin-template .subadmin-sidebar-col {
        position: fixed;
        top: var(--subadmin-shell-top);
        bottom: 0;
        left: -310px;
        width: min(290px, 88vw);
        height: auto;
        z-index: 1055;
        transition: left .2s ease;
        box-shadow: 18px 0 42px rgba(15,23,42,.28);
    }

    .subadmin-shell.subadmin-template .subadmin-sidebar-col.is-open {
        left: 0;
    }

    .subadmin-shell.subadmin-template #main-content {
        position: relative;
        inset: auto;
        width: 100%;
        max-width: 100%;
        height: auto;
        min-height: calc(100vh - var(--subadmin-shell-top));
        overflow: visible;
    }
}

@media (max-width: 991.98px) {
    .subadmin-unified-sidebar {
        border-radius: 0 16px 16px 0;
    }
}


/* Override legacy #sidebar rules now that the sidebar is contained by the
   shared Sub Admin shell instead of positioning itself independently. */
.subadmin-shell #sidebar.subadmin-unified-sidebar,
.subadmin-template #sidebar.subadmin-unified-sidebar {
    width: 100%;
    height: 100%;
    min-height: 0;
    position: relative;
    inset: auto;
    margin-left: 0;
    overflow: hidden;
    z-index: auto;
    background: linear-gradient(180deg, #082653 0%, #0b3268 58%, #0d3b78 100%);
    border-radius: 0 18px 18px 0;
}

.subadmin-shell #sidebar.subadmin-unified-sidebar .nav-link,
.subadmin-template #sidebar.subadmin-unified-sidebar .nav-link {
    min-height: 38px;
    display: flex;
    align-items: center;
    gap: .55rem;
    margin: 0 .18rem;
    padding: .52rem .65rem;
    border: 1px solid transparent;
    border-radius: 10px;
    color: rgba(255,255,255,.74);
    font-size: .73rem;
    font-weight: 680;
}

.subadmin-shell #sidebar.subadmin-unified-sidebar .nav-link > i,
.subadmin-template #sidebar.subadmin-unified-sidebar .nav-link > i {
    width: 20px;
    margin: 0;
    flex: 0 0 20px;
    color: rgba(255,255,255,.63);
    text-align: center;
}

.subadmin-shell #sidebar.subadmin-unified-sidebar .nav-link:hover,
.subadmin-shell #sidebar.subadmin-unified-sidebar .nav-link:focus,
.subadmin-shell #sidebar.subadmin-unified-sidebar .nav-link.active,
.subadmin-template #sidebar.subadmin-unified-sidebar .nav-link:hover,
.subadmin-template #sidebar.subadmin-unified-sidebar .nav-link:focus,
.subadmin-template #sidebar.subadmin-unified-sidebar .nav-link.active {
    color: #fff;
    background: rgba(255,255,255,.10);
}

.subadmin-shell #sidebar.subadmin-unified-sidebar .nav-link.active,
.subadmin-template #sidebar.subadmin-unified-sidebar .nav-link.active {
    background: linear-gradient(90deg, rgba(20,160,191,.26), rgba(255,255,255,.09));
    border-color: rgba(255,255,255,.09);
    box-shadow: inset 3px 0 0 #ffd166;
}

.subadmin-shell #sidebar.subadmin-unified-sidebar .nav-link:hover > i,
.subadmin-shell #sidebar.subadmin-unified-sidebar .nav-link.active > i,
.subadmin-template #sidebar.subadmin-unified-sidebar .nav-link:hover > i,
.subadmin-template #sidebar.subadmin-unified-sidebar .nav-link.active > i {
    color: #ffd166;
}

.subadmin-shell #sidebar.subadmin-unified-sidebar .sidebar-section-label,
.subadmin-template #sidebar.subadmin-unified-sidebar .sidebar-section-label {
    margin: .8rem .55rem .28rem;
    padding: .2rem .38rem;
    color: rgba(255,255,255,.38);
    font-size: .58rem;
    font-weight: 850;
    letter-spacing: .105em;
    text-transform: uppercase;
    list-style: none;
}

@media (max-width: 991.98px) {
    .subadmin-shell #sidebar.subadmin-unified-sidebar,
    .subadmin-template #sidebar.subadmin-unified-sidebar {
        margin-left: 0;
    }
}

/* ==========================================================================
   Multi-Role Accounts + Secure Workspace Switching 5.0
   ========================================================================== */
.multi-role-picker {
    border: 1px solid #dfe7f0;
    border-radius: 14px;
    background: #fff;
    overflow: hidden;
}

.multi-role-picker__head,
.multi-role-picker__footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding: 14px 16px;
}

.multi-role-picker__head {
    border-bottom: 1px solid #e8edf3;
    background: #f8fbff;
}

.multi-role-picker__head > div,
.multi-role-picker__footer > label {
    min-width: 0;
    display: grid;
    gap: 3px;
}

.multi-role-picker__head strong,
.multi-role-picker__footer label > span {
    color: #1f3552;
    font-size: .82rem;
    font-weight: 800;
}

.multi-role-picker__head small,
.multi-role-picker__footer small {
    color: #728197;
    font-size: .68rem;
}

.multi-role-picker__grid {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 10px;
    padding: 14px;
}

.multi-role-option {
    position: relative;
    min-width: 0;
    min-height: 92px;
    display: grid;
    grid-template-columns: 24px 38px minmax(0, 1fr);
    align-items: center;
    gap: 8px;
    padding: 11px;
    border: 1px solid #dfe7f0;
    border-radius: 12px;
    background: #fff;
    cursor: pointer;
    transition: border-color .15s ease, background-color .15s ease, box-shadow .15s ease;
}

.multi-role-option:hover {
    border-color: #b7cee9;
    background: #fbfdff;
}

.multi-role-option.is-selected {
    border-color: #8cb9e6;
    background: #f2f8ff;
    box-shadow: inset 0 0 0 1px rgba(39, 113, 198, .08);
}

.multi-role-option--admin.is-selected {
    border-color: #d8b55b;
    background: #fffaf0;
}

.multi-role-option .form-check-input {
    margin: 0;
}

.multi-role-option__icon {
    width: 38px;
    height: 38px;
    display: grid;
    place-items: center;
    border-radius: 10px;
    background: #eaf4ff;
    color: #226dc1;
}

.multi-role-option--admin .multi-role-option__icon {
    background: #fff2cf;
    color: #9a6c00;
}

.multi-role-option__copy {
    min-width: 0;
    display: grid;
    gap: 2px;
}

.multi-role-option__copy strong {
    color: #213852;
    font-size: .72rem;
    font-weight: 800;
}

.multi-role-option__copy small {
    color: #7b899c;
    font-size: .58rem;
    line-height: 1.3;
}

.multi-role-picker__footer {
    border-top: 1px solid #e8edf3;
    background: #fbfcfe;
}

.multi-role-picker__footer > label {
    flex: 1 1 auto;
    max-width: 520px;
}

.tenant-user-role-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
}

.tenant-user-role-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 7px;
    border-radius: 999px;
    background: #f1f5f9;
    color: #53657b;
    font-size: .64rem;
    font-weight: 700;
    white-space: nowrap;
}

.tenant-user-role-badge.is-default {
    background: #eaf3ff;
    color: #1e65b3;
}

.app-role-switch-heading {
    color: #79889b;
    font-size: .68rem;
    font-weight: 800;
    letter-spacing: .02em;
    text-transform: uppercase;
}

.app-role-switch-item {
    display: flex !important;
    align-items: center;
    gap: 9px;
    min-width: 260px;
    padding-top: 8px !important;
    padding-bottom: 8px !important;
}

.app-role-switch-item.active,
.app-role-switch-item:disabled {
    opacity: 1;
    background: #f4f8fd;
    color: inherit;
}

.app-role-switch-icon {
    width: 34px;
    height: 34px;
    flex: 0 0 34px;
    display: grid;
    place-items: center;
    border-radius: 9px;
    background: #edf5ff;
    color: #246bbb;
}

.app-role-switch-copy {
    min-width: 0;
    display: grid;
    gap: 1px;
}

.app-role-switch-copy strong {
    font-size: .74rem;
    font-weight: 800;
}

.app-role-switch-copy small {
    color: #7d8a9b;
    font-size: .58rem;
}

html[data-theme="dark"] .multi-role-picker,
html[data-theme="dark"] .multi-role-option,
html[data-theme="dark"] .multi-role-picker__head,
html[data-theme="dark"] .multi-role-picker__footer {
    border-color: #293a4f;
    background: #101b2a;
}

html[data-theme="dark"] .multi-role-option.is-selected,
html[data-theme="dark"] .app-role-switch-item.active,
html[data-theme="dark"] .app-role-switch-item:disabled {
    background: #12243a;
}

html[data-theme="dark"] .multi-role-option__copy strong,
html[data-theme="dark"] .multi-role-picker__head strong,
html[data-theme="dark"] .multi-role-picker__footer label > span {
    color: #edf5ff;
}

@media (max-width: 1200px) {
    .multi-role-picker__grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-width: 767.98px) {
    .multi-role-picker__grid { grid-template-columns: 1fr; }
    .multi-role-picker__head,
    .multi-role-picker__footer { align-items: stretch; flex-direction: column; }
    .multi-role-picker__footer > label { max-width: none; }
    .app-role-switch-item { min-width: 0; }
}


/* ==========================================================================
   Multi-Role Administrator Workspaces 5.1
   ========================================================================== */
.multi-role-self-note {
    display: inline-flex;
    align-items: center;
    width: fit-content;
    margin-top: 5px;
    padding: 4px 7px;
    border-radius: 999px;
    background: #eef8f2;
    color: #24724d;
    font-size: .62rem;
    font-weight: 750;
}
.multi-role-option [data-role-protected="true"] { cursor: not-allowed; }
.multi-role-option:has([data-role-protected="true"]) {
    border-color: #d7b55b;
    background: #fffaf0;
}
html[data-theme="dark"] .multi-role-self-note {
    background: #123025;
    color: #8bd8b0;
}


/* ========================================================================== 
   EduSuite responsive refinement 8.1
   Conservative shared rules only. Page grids/flex layouts remain page-owned.
   ========================================================================== */
.app-main,
.app-main > .container,
.app-main > .container-fluid,
.role-shell__content,
.assessor-shell__content,
.facilitator-content,
.subadmin-template #main-content {
    min-width: 0;
}

.app-main img,
.app-main video,
.app-main iframe,
.app-main canvas {
    max-width: 100%;
}

.app-main .table-responsive {
    width: 100%;
    max-width: 100%;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior-inline: contain;
}

.app-main .input-group,
.app-main .form-control,
.app-main .form-select,
.app-main textarea,
.app-main .modal-content {
    min-width: 0;
    max-width: 100%;
}

@media (max-width: 767.98px) {
    .app-main > .container,
    .app-main > .container-fluid {
        width: 100%;
        max-width: 100%;
        padding-left: .75rem;
        padding-right: .75rem;
    }

    .app-main .modal-dialog:not(.modal-fullscreen) {
        width: auto;
        max-width: calc(100vw - 1rem);
        margin: .5rem;
    }

    .app-main .modal-footer {
        gap: .5rem;
    }

    .app-main .modal-footer .btn {
        margin: 0;
    }

    .role-shell__topbar-left,
    .role-shell__topbar-right,
    .assessor-shell__topbar-left,
    .assessor-shell__topbar-right {
        min-width: 0;
    }

    .app-main .dropdown-menu {
        max-width: calc(100vw - 1.5rem);
    }

    .app-main .nav-tabs {
        flex-wrap: nowrap;
        max-width: 100%;
        overflow-x: auto;
        overflow-y: hidden;
        scrollbar-width: thin;
        -webkit-overflow-scrolling: touch;
    }

    .app-main .nav-tabs .nav-item,
    .app-main .nav-tabs .nav-link {
        flex: 0 0 auto;
        white-space: nowrap;
    }
}

@media (max-width: 575.98px) {
    .app-main .tab-section-head,
    .app-main .page-header,
    .app-main .workspace-header {
        align-items: flex-start !important;
    }

    .app-main .table > :not(caption) > * > * {
        overflow-wrap: anywhere;
    }
}
