:root {
    --exn-primary: #2563eb;
    --exn-primary-dark: #1d4ed8;
    --exn-secondary: #0f766e;
    --exn-accent: #e11d48;
    --exn-warning: #d97706;
    --exn-success: #15803d;
    --exn-info: #0369a1;
    --exn-ink: #0f172a;
    --exn-text: #334155;
    --exn-muted: #64748b;
    --exn-subtle: #94a3b8;
    --exn-line: #dbe3ef;
    --exn-line-strong: #cbd5e1;
    --exn-soft: #f4f7fb;
    --exn-panel: #ffffff;
    --exn-page: #f5f7fb;
    --exn-surface-raised: #ffffff;
    --exn-surface-inset: #f8fafc;
    --exn-surface-hover: #eef4ff;
    --exn-focus-ring: rgba(37, 99, 235, 0.36);
    --exn-overlay: rgba(15, 23, 42, 0.48);
    --exn-success-soft: #ecfdf3;
    --exn-success-line: #86efac;
    --exn-success-text: #047857;
    --exn-warning-soft: #fff7ed;
    --exn-warning-line: #fdba74;
    --exn-warning-text: #b45309;
    --exn-danger-soft: #fff1f2;
    --exn-danger-line: #fda4af;
    --exn-danger-text: #be123c;
    --exn-radius: 8px;
    --exn-shadow: 0 10px 24px rgba(15, 23, 42, 0.06);
    --exn-shadow-soft: 0 6px 16px rgba(15, 23, 42, 0.05);
}

:root,
[data-bs-theme="light"],
[data-bs-theme="dark"] {
    --bs-primary: var(--exn-primary);
    --bs-secondary: var(--exn-secondary);
    --bs-link-color: var(--exn-primary);
    --bs-link-hover-color: var(--exn-primary-dark);
    --app-primary: var(--exn-primary);
    --app-secondary: var(--exn-secondary);
    --app-primary-rgb: 37, 99, 235;
    --app-secondary-rgb: 15, 118, 110;
}

html,
body {
    letter-spacing: 0;
}

body.bg-gray-100,
body.bg-gray-200,
.admin-layout {
    background: var(--exn-page) !important;
}

.admin-layout {
    color: var(--exn-text);
}

.admin-layout .main-content {
    padding: 0 1rem 2rem 0;
}

.admin-layout .container-fluid {
    max-width: 1560px;
}

.admin-layout h1,
.admin-layout h2,
.admin-layout h3,
.admin-layout h4,
.admin-layout h5,
.admin-layout h6,
.landing-panel h1,
.landing-panel h2,
.landing-panel h3,
.landing-panel h4,
.landing-panel h5,
.landing-panel h6 {
    color: var(--exn-ink);
    font-weight: 800;
    letter-spacing: 0;
}

.admin-layout p,
.landing-panel p {
    color: var(--exn-muted);
}

.text-dark {
    color: var(--exn-ink) !important;
}

.text-secondary,
.text-muted {
    color: var(--exn-muted) !important;
}

/* Application sidebar */
.examnova-sidebar {
    --sidebar-surface: #0b1b34;
    --sidebar-border: rgba(148, 163, 184, 0.2);
    --sidebar-text: #dbe7f4;
    --sidebar-muted: #9fb0c7;
    --sidebar-hover: rgba(255, 255, 255, 0.075);
    --sidebar-active: rgba(var(--app-primary-rgb), 0.28);
    --sidebar-active-border: rgba(var(--app-primary-rgb), 0.48);
    --sidebar-icon-surface: rgba(255, 255, 255, 0.085);
    --sidebar-icon-border: rgba(255, 255, 255, 0.12);
    --sidebar-scrollbar: rgba(148, 163, 184, 0.52);
    width: 248px;
    height: calc(100dvh - 16px);
    margin: 8px 0 8px 8px !important;
    border: 1px solid var(--sidebar-border);
    border-radius: 14px;
    background: var(--sidebar-surface) !important;
    box-shadow: 0 18px 40px rgba(2, 8, 23, 0.18);
    color: var(--sidebar-text);
    overflow: hidden;
}

.examnova-sidebar[data-sidebar-theme="light"] {
    --sidebar-surface: #ffffff;
    --sidebar-border: #dbe3ef;
    --sidebar-text: #1e293b;
    --sidebar-muted: #64748b;
    --sidebar-hover: #f1f5f9;
    --sidebar-active: rgba(var(--app-primary-rgb), 0.1);
    --sidebar-active-border: rgba(var(--app-primary-rgb), 0.28);
    --sidebar-icon-surface: #f1f5f9;
    --sidebar-icon-border: #dbe3ef;
    --sidebar-scrollbar: rgba(100, 116, 139, 0.42);
    box-shadow: 0 18px 40px rgba(15, 23, 42, 0.1);
}

.examnova-sidebar[data-sidebar-theme="transparent"] {
    --sidebar-surface: rgba(255, 255, 255, 0.86);
    --sidebar-border: rgba(148, 163, 184, 0.36);
    --sidebar-text: #1e293b;
    --sidebar-muted: #64748b;
    --sidebar-hover: rgba(255, 255, 255, 0.66);
    --sidebar-active: rgba(var(--app-primary-rgb), 0.12);
    --sidebar-active-border: rgba(var(--app-primary-rgb), 0.3);
    --sidebar-icon-surface: rgba(255, 255, 255, 0.68);
    --sidebar-icon-border: rgba(148, 163, 184, 0.34);
    --sidebar-scrollbar: rgba(100, 116, 139, 0.42);
    backdrop-filter: blur(16px);
}

html[data-bs-theme="dark"] .examnova-sidebar[data-sidebar-theme="transparent"] {
    --sidebar-surface: rgba(8, 20, 39, 0.86);
    --sidebar-border: rgba(148, 163, 184, 0.22);
    --sidebar-text: #e5edf7;
    --sidebar-muted: #9fb0c7;
    --sidebar-hover: rgba(255, 255, 255, 0.075);
    --sidebar-active: rgba(var(--app-primary-rgb), 0.3);
    --sidebar-active-border: rgba(var(--app-primary-rgb), 0.5);
    --sidebar-icon-surface: rgba(255, 255, 255, 0.085);
    --sidebar-icon-border: rgba(255, 255, 255, 0.12);
    --sidebar-scrollbar: rgba(148, 163, 184, 0.52);
}

.examnova-sidebar .sidenav-header {
    min-height: 72px;
    border-bottom: 1px solid var(--sidebar-border);
}

.examnova-sidebar .navbar-brand {
    min-height: 72px;
}

.examnova-logo-mark {
    width: 36px;
    height: 36px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    color: #ffffff;
    background: linear-gradient(135deg, var(--exn-primary), var(--exn-secondary));
    box-shadow: 0 8px 16px rgba(var(--app-primary-rgb), 0.24);
}

.examnova-sidebar .sidebar-brand-name {
    color: var(--sidebar-text) !important;
    font-weight: 800;
}

.examnova-sidebar .app-sidenav__section {
    margin: 18px 20px 7px;
    padding: 0;
    color: var(--sidebar-muted) !important;
    font-size: 0.68rem;
    font-weight: 800;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.examnova-sidebar .nav-link,
.sidenav.examnova-sidebar .navbar-nav .nav-link {
    min-height: 44px;
    margin: 2px 12px;
    padding: 0.62rem 0.72rem;
    border: 1px solid transparent;
    border-radius: 10px;
    color: var(--sidebar-text) !important;
    font-weight: 700 !important;
    box-shadow: none !important;
}

.examnova-sidebar .nav-link .nav-link-text,
.examnova-sidebar .nav-link .material-symbols-rounded,
.sidenav.examnova-sidebar .navbar-nav .nav-link .nav-link-text,
.sidenav.examnova-sidebar .navbar-nav .nav-link .material-symbols-rounded {
    color: inherit !important;
    opacity: 1 !important;
}

.examnova-sidebar .app-sidenav__main {
    display: inline-flex;
    align-items: center;
    gap: 0.7rem;
    min-width: 0;
}

.examnova-sidebar .app-sidenav__main .material-symbols-rounded,
.examnova-sidebar .nav-link i {
    width: 28px;
    min-width: 28px;
    height: 28px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--sidebar-icon-border);
    border-radius: 8px;
    background: var(--sidebar-icon-surface);
    font-size: 1.02rem;
    line-height: 1;
    text-align: center;
}

.examnova-sidebar .nav-link:hover {
    background: var(--sidebar-hover) !important;
    border-color: var(--sidebar-border);
}

.examnova-sidebar .nav-link:focus-visible {
    outline: 3px solid rgba(var(--app-primary-rgb), 0.44);
    outline-offset: 2px;
}

.examnova-sidebar .nav-link.active,
.examnova-sidebar .nav-link.active:hover {
    background: var(--sidebar-active) !important;
    border-color: var(--sidebar-active-border);
    color: var(--sidebar-text) !important;
}

#sidenav-collapse-main {
    height: calc(100dvh - 88px);
    overflow-y: auto;
    overflow-x: hidden;
    padding: 0 0 1.5rem;
    scrollbar-color: var(--sidebar-scrollbar) transparent;
    scrollbar-width: thin;
}

#sidenav-collapse-main::-webkit-scrollbar {
    width: 6px;
}

#sidenav-collapse-main::-webkit-scrollbar-thumb {
    border-radius: 999px;
    background: var(--sidebar-scrollbar);
}

.examnova-navbar {
    position: relative;
    z-index: 1040;
    overflow: visible;
    min-height: 68px;
    margin: 8px 0 10px !important;
    border: 1px solid var(--exn-line);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.94);
    box-shadow: var(--exn-shadow-soft);
    backdrop-filter: blur(14px);
}

.examnova-institute-switcher {
    position: relative;
}

.examnova-institute-menu {
    z-index: 1045 !important;
    width: min(21rem, calc(100vw - 24px));
    min-width: 16rem;
    max-height: min(24rem, calc(100vh - 120px));
    padding: 0.45rem;
    overflow-y: auto;
    border: 1px solid var(--exn-line);
    border-radius: 8px;
    background: var(--exn-card, #fff);
    box-shadow: 0 16px 34px rgba(15, 23, 42, 0.18);
}

.examnova-institute-menu .dropdown-header {
    padding: 0.55rem 0.6rem;
    color: var(--exn-ink);
    font-size: 0.75rem;
    font-weight: 850;
}

.examnova-institute-menu form + form {
    margin-top: 0.2rem;
}

.examnova-institute-menu .dropdown-item {
    width: 100%;
    border-radius: 6px;
    color: var(--exn-text);
    font-size: 0.84rem;
    overflow-wrap: anywhere;
}

.examnova-institute-menu .dropdown-item:hover,
.examnova-institute-menu .dropdown-item:focus-visible {
    background: #eff6ff;
    color: #1d4ed8;
}

.examnova-greeting {
    font-size: 0.92rem;
    font-weight: 800;
    color: var(--exn-ink);
}

.examnova-subtle,
.exn-muted {
    color: var(--exn-muted);
    font-size: 0.84rem;
    line-height: 1.5;
}

.examnova-search {
    width: min(360px, 36vw);
    min-height: 42px;
    border: 1px solid var(--exn-line);
    border-radius: 8px;
    background: #ffffff;
}

.examnova-search .form-control {
    color: var(--exn-ink);
    font-size: 0.9rem;
}

.examnova-user {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--exn-ink);
    font-weight: 700;
}

.examnova-avatar {
    width: 34px;
    height: 34px;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #e0f2fe;
    color: #075985;
    font-size: 0.85rem;
    font-weight: 800;
}

.theme-toggle {
    width: 40px;
    height: 40px;
    border-radius: 8px;
    border: 1px solid var(--exn-line);
    background: #ffffff;
    color: var(--exn-ink);
    box-shadow: none;
}

.theme-toggle:hover {
    transform: none;
    box-shadow: var(--exn-shadow-soft);
}

/* Page headers */
.mphb {
    overflow: visible;
    border: 1px solid var(--exn-line);
    border-radius: 8px;
    padding: 1.25rem;
    background: #ffffff;
    box-shadow: var(--exn-shadow-soft);
}

.mphb__graphics {
    display: none !important;
}

.mphb--compact {
    padding: 1rem 1.15rem;
}

.mphb__content {
    align-items: center;
    gap: 1rem;
}

.mphb__badge {
    min-height: 26px;
    padding: 0.28rem 0.65rem;
    margin-bottom: 0.55rem;
    border-radius: 999px;
    border: 1px solid #bfdbfe;
    background: #eff6ff;
    color: #1d4ed8;
    font-size: 0.7rem;
    font-weight: 800;
    letter-spacing: 0.04em;
}

.mphb__title {
    margin: 0;
    color: var(--exn-ink);
    font-size: 1.55rem;
    line-height: 1.2;
    font-weight: 850;
}

.mphb__subtitle {
    max-width: 860px;
    margin: 0.35rem 0 0;
    color: var(--exn-muted);
    font-size: 0.94rem;
    line-height: 1.55;
}

.mphb__right {
    gap: 0.6rem;
}

.auth-card-header .mphb__title,
.auth-card-header .mphb__subtitle {
    color: #ffffff;
}

/* Cards and panels */
.admin-layout .card,
.exn-card,
.tbl-panel,
.mdc-card,
.mcc,
.mkpi,
.exn-kpi-card,
.exn-resource-card {
    border: 1px solid var(--exn-line);
    border-radius: 8px;
    background: var(--exn-panel);
    box-shadow: var(--exn-shadow-soft);
}

.admin-layout .card {
    overflow: hidden;
}

.admin-layout .card:hover,
.exn-card:hover,
.tbl-panel:hover,
.mdc-card:hover,
.mcc:hover,
.mkpi:hover,
.exn-kpi-card:hover,
.exn-resource-card:hover {
    transform: none;
    border-color: var(--exn-line-strong);
    box-shadow: var(--exn-shadow);
}

.admin-layout .card > .card-header,
.admin-layout .card .card-header:first-child,
.tbl-panel__head {
    border-bottom: 1px solid var(--exn-line);
    background: #ffffff;
    box-shadow: none;
}

.exn-card {
    position: relative;
    overflow: hidden;
}

.exn-card.p-4,
.mdc-card,
.mcc,
.mkpi {
    padding: 1.1rem !important;
}

.exn-section-head {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 1rem;
    margin: 1.15rem 0 0.75rem;
}

.exn-section-head h5,
.exn-section-head h6 {
    margin: 0 0 0.25rem;
    font-size: 1.05rem;
}

/* Metrics */
.exn-stat,
.exn-kpi-card {
    min-height: 104px;
    padding: 1rem;
}

.exn-stat__icon,
.exn-kpi-card__icon,
.exn-resource-card__icon,
.mkpi__icon {
    width: 40px;
    height: 40px;
    flex: 0 0 40px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #bfdbfe;
    border-radius: 8px;
    background: #eff6ff;
    color: var(--exn-primary);
    box-shadow: none;
}

.exn-kpi-card__icon.is-success,
.exn-resource-card__icon.is-success {
    border-color: #bbf7d0;
    background: #f0fdf4;
    color: var(--exn-success);
}

.exn-kpi-card__icon.is-warning,
.exn-resource-card__icon.is-warning {
    border-color: #fed7aa;
    background: #fff7ed;
    color: var(--exn-warning);
}

.exn-kpi-card__icon.is-info,
.exn-resource-card__icon.is-info {
    border-color: #bae6fd;
    background: #f0f9ff;
    color: var(--exn-info);
}

.exn-stat__value,
.exn-kpi-card__value,
.mkpi__value {
    margin-top: 0.35rem;
    color: #082f63;
    font-size: 1.55rem;
    line-height: 1.1;
    font-weight: 850;
}

.exn-stat__label,
.exn-kpi-card__label,
.mkpi__title,
.mkpi__subtitle {
    color: var(--exn-muted);
    font-size: 0.8rem;
    line-height: 1.35;
    text-transform: none;
    letter-spacing: 0;
}

.exn-kpi-card {
    display: flex;
    align-items: center;
    gap: 0.9rem;
}

.mkpi {
    opacity: 1;
    transform: none;
}

.mkpi::before,
.mkpi::after,
.mcc::before,
.mdc-card::before {
    display: none;
}

.mkpi--compact {
    min-height: 104px;
}

.mkpi__chart,
.mcc__chart {
    border: 1px solid var(--exn-line);
    border-radius: 8px;
    background: #f8fafc;
}

.mcc__chart--sm {
    min-height: 220px;
}

.mcc__chart--md {
    min-height: 280px;
}

.mcc__chart--lg {
    min-height: 330px;
}

.mcc__chart--xl {
    min-height: 390px;
}

.mdc-card__title,
.mcc__title {
    color: var(--exn-ink);
    font-size: 1rem;
    font-weight: 800;
}

.mdc-card__subtitle,
.mcc__subtitle {
    color: var(--exn-muted);
}

.mdc-stat-list__item {
    border: 1px solid var(--exn-line);
    border-radius: 8px;
    background: #f8fafc;
}

/* Buttons, pills, statuses */
.exn-btn-primary,
.btn.bg-gradient-primary,
.btn.btn-primary {
    border: 1px solid var(--exn-primary) !important;
    background: var(--exn-primary) !important;
    color: #ffffff !important;
    box-shadow: none !important;
}

.btn,
.mui-btn,
.exn-pill,
.tbl-status,
.tbl-pill,
.tbl-action-btn {
    border-radius: 8px;
}

.btn:hover,
.mui-btn:hover,
.exn-btn-primary:hover {
    transform: none !important;
    box-shadow: var(--exn-shadow-soft) !important;
}

.exn-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    min-height: 30px;
    padding: 0.38rem 0.65rem;
    border: 1px solid #bfdbfe;
    color: #1d4ed8;
    background: #eff6ff;
    font-size: 0.78rem;
    font-weight: 800;
}

.tbl-status {
    min-height: 28px;
    padding: 0.32rem 0.65rem;
    font-size: 0.74rem;
}

.tbl-status--primary,
.tbl-pill--primary {
    color: #1d4ed8;
    background: #eff6ff;
    border-color: #bfdbfe;
}

.tbl-status--success,
.tbl-pill--success,
.mdc-badge.is-success {
    color: #15803d;
    background: #f0fdf4;
    border-color: #bbf7d0;
}

.tbl-status--warning,
.tbl-pill--warning,
.mdc-badge.is-warning {
    color: #b45309;
    background: #fff7ed;
    border-color: #fed7aa;
}

.tbl-status--danger,
.tbl-pill--danger,
.mdc-badge.is-danger {
    color: #be123c;
    background: #fff1f2;
    border-color: #fecdd3;
}

.tbl-status--secondary,
.tbl-pill--secondary,
.mdc-badge.is-info {
    color: #0f766e;
    background: #f0fdfa;
    border-color: #99f6e4;
}

.mui-btn {
    min-height: 40px;
    border-radius: 8px;
    box-shadow: none;
}

.mui-btn--outline {
    background: #ffffff;
}

/* Resource cards and grids */
.exn-resource-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem;
}

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

.exn-resource-card {
    min-height: 0;
    padding: 1rem;
    color: inherit;
}

.exn-resource-card__top,
.exn-resource-card__actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
}

.exn-resource-card__title {
    margin: 0.95rem 0 0.35rem;
    color: var(--exn-ink);
    font-size: 1rem;
    font-weight: 800;
}

.exn-resource-card__subtitle {
    min-height: 0;
    margin: 0;
    color: var(--exn-muted);
    font-size: 0.84rem;
    line-height: 1.45;
}

.exn-resource-card__facts,
.exn-detail-list {
    display: grid;
    gap: 0.55rem;
    margin-top: 1rem;
}

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

.exn-resource-card__facts div,
.exn-detail-list div {
    min-width: 0;
    padding: 0.65rem;
    border: 1px solid #e6edf6;
    border-radius: 8px;
    background: #f8fafc;
}

.exn-resource-card__facts span,
.exn-detail-list span {
    display: block;
    color: var(--exn-muted);
    font-size: 0.68rem;
    font-weight: 800;
    text-transform: uppercase;
}

.exn-resource-card__facts strong,
.exn-detail-list strong {
    display: block;
    overflow: hidden;
    color: var(--exn-ink);
    font-size: 0.82rem;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.exn-empty-state,
.tbl-empty {
    border: 1px dashed var(--exn-line-strong);
    border-radius: 8px;
    background: #ffffff;
    color: var(--exn-muted);
}

/* Tables */
.tbl-panel__head {
    padding: 1rem;
}

.tbl-panel__body {
    background: #ffffff;
}

.tbl-toolbar {
    gap: 0.75rem;
}

.tbl-toolbar__item {
    min-width: 180px;
}

.tbl-toolbar__item--search {
    min-width: 280px;
}

.tbl-table thead th {
    padding: 0.85rem 1rem;
    border-bottom-color: var(--exn-line);
    background: #f8fafc;
    color: #475569;
    font-size: 0.72rem;
    letter-spacing: 0.04em;
}

.tbl-table tbody td {
    padding: 0.95rem 1rem;
    border-bottom-color: #edf2f7;
    background: #ffffff;
    color: var(--exn-text);
    font-size: 0.86rem;
}

.tbl-table tbody tr:hover td {
    background: #f8fafc;
}

.tbl-table__title,
.tbl-cell-strong {
    color: #0f2f57;
}

.tbl-table__sub,
.tbl-cell-muted {
    color: var(--exn-muted);
}

.tbl-action-btn {
    width: 36px;
    min-width: 36px;
    height: 36px;
    border: 1px solid var(--exn-line);
    background: #ffffff;
    box-shadow: none;
}

.tbl-identity {
    align-items: center;
}

.tbl-identity__avatar {
    width: 38px;
    height: 38px;
    flex-basis: 38px;
    border-radius: 999px;
}

.tbl-row-check {
    border-radius: 5px;
}

/* Forms */
.exn-form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem;
}

.exn-form-grid .full {
    grid-column: 1 / -1;
}

.exn-input,
.form-control,
.form-select,
.mui-input,
.select2-container--default .select2-selection--single,
.select2-container--default .select2-selection--multiple {
    border-color: var(--exn-line) !important;
    border-radius: 8px !important;
}

.form-control:focus,
.form-select:focus,
.mui-input:focus {
    border-color: #93c5fd !important;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.14) !important;
}

/* Calendars */
.exn-calendar-wrap {
    overflow: hidden;
}

.exn-calendar-wrap .fc {
    color: var(--exn-ink);
    font-family: Inter, system-ui, sans-serif;
}

.exn-calendar-wrap .fc .fc-toolbar {
    flex-wrap: wrap;
    gap: 0.75rem;
}

.exn-calendar-wrap .fc .fc-toolbar-title {
    color: var(--exn-ink);
    font-size: 1.05rem;
    font-weight: 850;
}

.exn-calendar-wrap .fc .fc-button {
    border: 1px solid var(--exn-line);
    border-radius: 8px;
    background: #ffffff;
    color: var(--exn-ink);
    box-shadow: none;
    text-transform: capitalize;
}

.exn-calendar-wrap .fc .fc-button-primary:not(:disabled).fc-button-active,
.exn-calendar-wrap .fc .fc-button-primary:not(:disabled):active,
.exn-calendar-wrap .fc .fc-button:hover {
    border-color: var(--exn-primary);
    background: var(--exn-primary);
    color: #ffffff;
}

.exn-calendar-wrap .fc-theme-standard td,
.exn-calendar-wrap .fc-theme-standard th,
.exn-calendar-wrap .fc-theme-standard .fc-scrollgrid {
    border-color: var(--exn-line);
}

.exn-calendar-wrap .fc-event {
    border-radius: 6px;
    padding: 2px 4px;
    font-size: 0.78rem;
}

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

.exn-mini-calendar span {
    aspect-ratio: 1;
    display: grid;
    place-items: center;
    border-radius: 8px;
    color: var(--exn-muted);
    background: #f8fafc;
    font-size: 0.78rem;
}

.exn-mini-calendar span.has-event {
    color: #ffffff;
    background: var(--exn-primary);
}

.exn-calendar-detail {
    min-height: 280px;
}

/* Settings and tabs */
.exn-settings-nav {
    position: sticky;
    top: 88px;
    display: grid;
    gap: 0.4rem;
    padding: 0.6rem;
    border: 1px solid var(--exn-line);
    border-radius: 8px;
    background: #ffffff;
}

.exn-settings-nav button {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    padding: 0.7rem;
    border: 0;
    border-radius: 8px;
    color: var(--exn-muted);
    background: transparent;
    text-align: left;
    font-weight: 800;
}

.exn-settings-nav button.active,
.exn-settings-nav button:hover,
.mui-tabs__btn.active {
    color: var(--exn-primary);
    background: #eff6ff;
}

.exn-settings-panel {
    display: none;
}

.exn-settings-panel.active {
    display: block;
}

.mui-tabs,
.mui-tabs__nav,
.mui-tabs__content {
    border-radius: 8px;
}

/* Demo launcher */
.exn-demo-fab {
    right: 24px !important;
    bottom: 18px !important;
    z-index: 1035 !important;
    max-width: calc(100vw - 48px);
}

.exn-demo-fab__button,
.exn-demo-fab__link {
    border-radius: 8px !important;
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.12) !important;
}

.exn-demo-fab__button {
    background: var(--exn-primary) !important;
}

body:has(.exn-demo-fab) .admin-layout .container-fluid,
body:has(.exn-demo-fab) .container-fluid {
    padding-bottom: 5rem;
}

/* Presenter-focused Demo Studio */
.exn-demo-studio__hero {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 1.5rem;
    padding: clamp(1.25rem, 3vw, 2rem);
    border: 1px solid var(--exn-line, #dbe3ef);
    border-radius: 10px;
    background: linear-gradient(135deg, #10213d, #173e75);
    color: #fff;
}

.exn-demo-studio__eyebrow {
    display: inline-flex;
    align-items: center;
    gap: .35rem;
    margin-bottom: .65rem;
    color: #bfdbfe;
    font-size: .72rem;
    font-weight: 850;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.exn-demo-studio__hero h2 { margin: 0; color: #fff; font-size: clamp(1.45rem, 3vw, 2.1rem); font-weight: 850; }
.exn-demo-studio__hero p { max-width: 680px; margin: .6rem 0 0; color: #dbeafe; line-height: 1.55; }
.exn-demo-studio__credential { display: grid; flex: 0 0 auto; gap: .22rem; min-width: 220px; padding: 1rem; border: 1px solid rgba(191,219,254,.3); border-radius: 8px; background: rgba(255,255,255,.08); }
.exn-demo-studio__credential span { color: #bfdbfe; font-size: .68rem; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; }
.exn-demo-studio__credential strong { color: #fff; font-size: .9rem; overflow-wrap: anywhere; }
.exn-demo-studio__credential small { color: #dbeafe; }

.exn-demo-studio__chapter-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: .7rem; }
.exn-demo-studio__chapter { display: flex; align-items: flex-start; gap: .6rem; min-height: 104px; padding: .9rem; border: 1px solid var(--exn-line, #dbe3ef); border-radius: 8px; background: var(--exn-card, #fff); }
.exn-demo-studio__chapter > i { color: #f59e0b; font-size: 1.2rem; }
.exn-demo-studio__chapter.is-ready > i { color: #16a34a; }
.exn-demo-studio__chapter strong { display: block; color: var(--exn-ink, #0f172a); font-size: .78rem; }
.exn-demo-studio__chapter p { margin: .28rem 0 0; color: var(--exn-muted, #64748b); font-size: .72rem; line-height: 1.42; }

.exn-demo-studio__readiness { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: .7rem; }
.exn-demo-studio__readiness article { display: flex; gap: .65rem; min-width: 0; padding: .9rem; border: 1px solid var(--exn-line, #dbe3ef); border-radius: 8px; background: var(--exn-card, #fff); }
.exn-demo-studio__readiness-icon { display: grid; width: 34px; height: 34px; flex: 0 0 34px; place-items: center; border-radius: 7px; background: #eff6ff; color: #2563eb; }
.exn-demo-studio__readiness strong,.exn-demo-studio__readiness span,.exn-demo-studio__readiness small { display: block; }
.exn-demo-studio__readiness strong { color: var(--exn-ink, #0f172a); font-size: 1.15rem; line-height: 1.1; }
.exn-demo-studio__readiness span:not(.exn-demo-studio__readiness-icon) { margin-top: .2rem; color: var(--exn-ink, #0f172a); font-size: .74rem; font-weight: 800; }
.exn-demo-studio__readiness small { margin-top: .16rem; color: var(--exn-muted, #64748b); font-size: .67rem; line-height: 1.3; }

.exn-demo-studio__persona { display: flex; flex-direction: column; padding: 1rem; }
.exn-demo-studio__persona.is-current { border-color: #60a5fa; box-shadow: 0 0 0 2px rgba(37,99,235,.1); }
.exn-demo-studio__persona code { color: #1d4ed8; font-size: .76rem; overflow-wrap: anywhere; }
.exn-demo-studio__persona p { margin: .55rem 0 0; color: var(--exn-muted, #64748b); font-size: .79rem; line-height: 1.45; }
.exn-demo-studio__side-card { padding: 1.15rem; }
.exn-demo-studio__side-card h6 { color: var(--exn-ink, #0f172a); font-weight: 850; }
.exn-demo-studio__side-card ol { margin: 0 0 1rem; padding-left: 1.15rem; color: var(--exn-text, #334155); font-size: .8rem; line-height: 1.65; }
.exn-demo-studio__side-card p { color: var(--exn-muted, #64748b); font-size: .76rem; line-height: 1.5; }
.exn-demo-studio__session { display: flex; align-items: center; justify-content: space-between; gap: .6rem; padding: .6rem 0; border-top: 1px solid var(--exn-line, #dbe3ef); }
.exn-demo-studio__session strong,.exn-demo-studio__session small { display: block; }
.exn-demo-studio__session strong { color: var(--exn-ink, #0f172a); font-size: .75rem; }
.exn-demo-studio__session small { margin-top: .12rem; color: var(--exn-muted, #64748b); font-size: .68rem; }

.exn-demo-studio__tour-group { margin-top: 1rem; }
.exn-demo-studio__tour-group > h6 { margin-bottom: .75rem; color: var(--exn-ink, #0f172a); font-weight: 850; }
.exn-demo-studio__tour { display: flex; flex-direction: column; padding: 1rem; }
.exn-demo-studio__tour h6 { color: var(--exn-ink, #0f172a); font-weight: 850; }
.exn-demo-studio__tour p { color: var(--exn-muted, #64748b); font-size: .79rem; line-height: 1.5; }
.exn-demo-studio__covers { display: flex; flex-wrap: wrap; gap: .35rem; }
.exn-demo-studio__covers span { padding: .2rem .45rem; border-radius: 999px; background: var(--exn-soft, #f1f5f9); color: var(--exn-muted, #64748b); font-size: .67rem; font-weight: 700; }

.exn-demo-studio__mission-control { padding: 1.2rem; border: 1px solid #bfdbfe; border-radius: 12px; background: linear-gradient(145deg, #f8fbff, #eef6ff); }
.exn-demo-studio__mission-kicker { display: block; margin-bottom: .2rem; color: #1d4ed8; font-size: .68rem; font-weight: 850; letter-spacing: .08em; text-transform: uppercase; }
.exn-demo-studio__mission-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .9rem; }
.exn-demo-studio__mission { display: flex; flex-direction: column; min-width: 0; padding: 1.1rem; border-color: #bfdbfe; }
.exn-demo-studio__mission-topline { display: flex; align-items: center; justify-content: space-between; gap: .65rem; margin-bottom: .75rem; }
.exn-demo-studio__mission-topline > span:last-child { color: var(--exn-muted, #64748b); font-size: .68rem; font-weight: 750; }
.exn-demo-studio__mission h6 { margin-bottom: .35rem; color: var(--exn-ink, #0f172a); font-weight: 850; }
.exn-demo-studio__mission > p { color: var(--exn-muted, #64748b); font-size: .78rem; line-height: 1.5; }
.exn-demo-studio__mission-steps { display: grid; gap: .42rem; margin: .2rem 0 1rem; padding: 0; list-style: none; }
.exn-demo-studio__mission-steps li { display: flex; align-items: center; gap: .5rem; color: var(--exn-text, #334155); font-size: .72rem; }
.exn-demo-studio__mission-steps li > span { display: grid; width: 22px; height: 22px; flex: 0 0 22px; place-items: center; border-radius: 50%; background: #dbeafe; color: #1d4ed8; font-size: .64rem; font-weight: 850; }
.exn-demo-studio__mission-steps strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.exn-demo-studio__mission-progress { overflow: hidden; height: 7px; margin-top: auto; border-radius: 999px; background: #dbe3ef; }
.exn-demo-studio__mission-progress > span { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, #2563eb, #7c3aed); transition: width .25s ease; }
.exn-demo-studio__filters { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: .35rem; }
.exn-demo-studio__filters button { padding: .36rem .62rem; border: 1px solid #bfdbfe; border-radius: 999px; background: #fff; color: #475569; font-size: .68rem; font-weight: 800; }
.exn-demo-studio__filters button:hover,.exn-demo-studio__filters button.is-active { border-color: #2563eb; background: #2563eb; color: #fff; }
.exn-demo-studio [data-demo-tour-card][hidden] { display: none !important; }

html[data-bs-theme="dark"] .exn-demo-studio__chapter,
html[data-bs-theme="dark"] .exn-demo-studio__readiness article,
html[data-bs-theme="dark"] .exn-demo-studio__persona,
html[data-bs-theme="dark"] .exn-demo-studio__side-card,
html[data-bs-theme="dark"] .exn-demo-studio__tour { background: #111c2f; border-color: #314158; }
html[data-bs-theme="dark"] .exn-demo-studio__chapter strong,
html[data-bs-theme="dark"] .exn-demo-studio__readiness strong,
html[data-bs-theme="dark"] .exn-demo-studio__readiness span:not(.exn-demo-studio__readiness-icon),
html[data-bs-theme="dark"] .exn-demo-studio__side-card h6,
html[data-bs-theme="dark"] .exn-demo-studio__session strong,
html[data-bs-theme="dark"] .exn-demo-studio__tour h6,
html[data-bs-theme="dark"] .exn-demo-studio__tour-group > h6 { color: #f8fafc; }
html[data-bs-theme="dark"] .exn-demo-studio__readiness-icon { background: rgba(37,99,235,.2); color: #93c5fd; }
html[data-bs-theme="dark"] .exn-demo-studio__covers span { background: #1b2b45; color: #bfdbfe; }
html[data-bs-theme="dark"] .exn-demo-studio__mission-control { border-color: #314158; background: linear-gradient(145deg, #111c2f, #14233a); }
html[data-bs-theme="dark"] .exn-demo-studio__mission { background: #111c2f; border-color: #314158; }
html[data-bs-theme="dark"] .exn-demo-studio__mission h6 { color: #f8fafc; }
html[data-bs-theme="dark"] .exn-demo-studio__mission-steps li { color: #dbeafe; }
html[data-bs-theme="dark"] .exn-demo-studio__mission-steps li > span { background: rgba(37,99,235,.25); color: #bfdbfe; }
html[data-bs-theme="dark"] .exn-demo-studio__mission-progress { background: #263851; }
html[data-bs-theme="dark"] .exn-demo-studio__filters button { border-color: #314158; background: #111c2f; color: #cbd5e1; }
html[data-bs-theme="dark"] .exn-demo-studio__filters button:hover,html[data-bs-theme="dark"] .exn-demo-studio__filters button.is-active { border-color: #60a5fa; background: #2563eb; color: #fff; }

@media (max-width: 1399.98px) { .exn-demo-studio__chapter-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } .exn-demo-studio__readiness { grid-template-columns: repeat(3, minmax(0, 1fr)); } .exn-demo-studio__mission-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 767.98px) { .exn-demo-studio__hero { align-items: stretch; flex-direction: column; } .exn-demo-studio__credential { min-width: 0; } .exn-demo-studio__chapter-grid,.exn-demo-studio__readiness,.exn-demo-studio__mission-grid { grid-template-columns: 1fr; } .exn-demo-studio__mission-control { padding: .9rem; } .exn-demo-studio__filters { justify-content: flex-start; } }

/* Product preview blocks used by landing/auth */
.exn-product-frame {
    position: relative;
    overflow: hidden;
    border: 1px solid var(--exn-line);
    border-radius: 8px;
    background: #ffffff;
    box-shadow: var(--exn-shadow);
}

.exn-product-frame__bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 0.75rem;
    border-bottom: 1px solid var(--exn-line);
    background: #f8fafc;
}

.exn-product-frame__dots {
    display: flex;
    gap: 0.35rem;
}

.exn-product-frame__dots span {
    width: 8px;
    height: 8px;
    border-radius: 999px;
    background: #cbd5e1;
}

.exn-product-frame__body {
    padding: 1rem;
}

.exn-mini-dashboard {
    display: grid;
    gap: 0.75rem;
}

.exn-mini-dashboard__grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.65rem;
}

.exn-mini-dashboard__metric,
.exn-mini-dashboard__panel {
    border: 1px solid var(--exn-line);
    border-radius: 8px;
    background: #ffffff;
    padding: 0.75rem;
}

.exn-mini-dashboard__metric span {
    display: block;
    color: var(--exn-muted);
    font-size: 0.72rem;
    font-weight: 800;
    text-transform: uppercase;
}

.exn-mini-dashboard__metric strong {
    display: block;
    margin-top: 0.35rem;
    color: var(--exn-ink);
    font-size: 1.3rem;
    line-height: 1;
}

.exn-mini-bars {
    display: grid;
    gap: 0.48rem;
}

.exn-mini-bars i {
    display: block;
    height: 9px;
    border-radius: 999px;
    background: #dbeafe;
}

.exn-mini-bars i:nth-child(2) {
    width: 78%;
    background: #ccfbf1;
}

.exn-mini-bars i:nth-child(3) {
    width: 58%;
    background: #fed7aa;
}

/* Dark mode */
html[data-bs-theme="dark"] {
    --exn-ink: #f8fafc;
    --exn-text: #d7e0ee;
    --exn-muted: #a7b4c7;
    --exn-subtle: #718096;
    --exn-line: #314158;
    --exn-line-strong: #43546d;
    --exn-soft: #172033;
    --exn-panel: #111c2f;
    --exn-page: #0b1220;
    --exn-surface-raised: #132138;
    --exn-surface-inset: #0f1a2c;
    --exn-surface-hover: #1b2b45;
    --exn-focus-ring: rgba(96, 165, 250, 0.5);
    --exn-overlay: rgba(2, 8, 23, 0.72);
    --exn-success-soft: rgba(22, 163, 74, 0.16);
    --exn-success-line: rgba(74, 222, 128, 0.42);
    --exn-success-text: #86efac;
    --exn-warning-soft: rgba(217, 119, 6, 0.17);
    --exn-warning-line: rgba(251, 191, 36, 0.42);
    --exn-warning-text: #fcd34d;
    --exn-danger-soft: rgba(225, 29, 72, 0.16);
    --exn-danger-line: rgba(251, 113, 133, 0.44);
    --exn-danger-text: #fda4af;
    --exn-shadow: none;
    --exn-shadow-soft: none;
}

html[data-bs-theme="dark"] body,
html[data-bs-theme="dark"] body.bg-gray-100,
html[data-bs-theme="dark"] body.bg-gray-200,
html[data-bs-theme="dark"] .admin-layout {
    background: var(--exn-page) !important;
}

html[data-bs-theme="dark"] .examnova-navbar,
html[data-bs-theme="dark"] .mphb,
html[data-bs-theme="dark"] .admin-layout .card,
html[data-bs-theme="dark"] .exn-card,
html[data-bs-theme="dark"] .tbl-panel,
html[data-bs-theme="dark"] .mdc-card,
html[data-bs-theme="dark"] .mcc,
html[data-bs-theme="dark"] .mkpi,
html[data-bs-theme="dark"] .exn-kpi-card,
html[data-bs-theme="dark"] .exn-resource-card,
html[data-bs-theme="dark"] .exn-product-frame,
html[data-bs-theme="dark"] .exn-mini-dashboard__metric,
html[data-bs-theme="dark"] .exn-mini-dashboard__panel {
    background: var(--exn-panel);
    border-color: var(--exn-line);
    color: var(--exn-text);
}

html[data-bs-theme="dark"] .examnova-institute-menu {
    border-color: #314158;
    background: #111c2f;
}

html[data-bs-theme="dark"] .examnova-institute-menu .dropdown-header,
html[data-bs-theme="dark"] .examnova-institute-menu .dropdown-item {
    color: #f8fafc;
}

html[data-bs-theme="dark"] .examnova-institute-menu .dropdown-item:hover,
html[data-bs-theme="dark"] .examnova-institute-menu .dropdown-item:focus-visible {
    background: #1b2b45;
    color: #bfdbfe;
}

html[data-bs-theme="dark"] .tbl-panel__head,
html[data-bs-theme="dark"] .tbl-panel__body,
html[data-bs-theme="dark"] .admin-layout .card > .card-header,
html[data-bs-theme="dark"] .admin-layout .card .card-header:first-child,
html[data-bs-theme="dark"] .exn-product-frame__bar {
    background: #132138;
    border-color: var(--exn-line);
}

html[data-bs-theme="dark"] .examnova-search,
html[data-bs-theme="dark"] .theme-toggle,
html[data-bs-theme="dark"] .form-control,
html[data-bs-theme="dark"] .form-select,
html[data-bs-theme="dark"] .mui-input,
html[data-bs-theme="dark"] .mui-btn--outline,
html[data-bs-theme="dark"] .tbl-action-btn {
    background: #0f1a2c !important;
    border-color: var(--exn-line) !important;
    color: var(--exn-text) !important;
}

html[data-bs-theme="dark"] .tbl-table thead th,
html[data-bs-theme="dark"] .tbl-table tbody td,
html[data-bs-theme="dark"] .mdc-stat-list__item,
html[data-bs-theme="dark"] .mkpi__chart,
html[data-bs-theme="dark"] .mcc__chart,
html[data-bs-theme="dark"] .exn-resource-card__facts div,
html[data-bs-theme="dark"] .exn-detail-list div {
    background: #132138;
    border-color: var(--exn-line);
    color: var(--exn-text);
}

html[data-bs-theme="dark"] .tbl-table tbody tr:hover td {
    background: #182842;
}

html[data-bs-theme="dark"] .exn-stat__value,
html[data-bs-theme="dark"] .exn-kpi-card__value,
html[data-bs-theme="dark"] .mkpi__value,
html[data-bs-theme="dark"] .tbl-table__title,
html[data-bs-theme="dark"] .tbl-cell-strong,
html[data-bs-theme="dark"] .exn-resource-card__title,
html[data-bs-theme="dark"] .mdc-card__title,
html[data-bs-theme="dark"] .mcc__title,
html[data-bs-theme="dark"] .exn-mini-dashboard__metric strong {
    color: #f8fafc;
}

html[data-bs-theme="dark"] .exn-empty-state,
html[data-bs-theme="dark"] .tbl-empty {
    background: #111c2f;
    border-color: var(--exn-line);
}

html[data-bs-theme="dark"] .examnova-sidebar[data-sidebar-theme="dark"] {
    --sidebar-surface: #081427;
    --sidebar-border: rgba(148, 163, 184, 0.16);
}

html[data-bs-theme="dark"] .auth-card-header .mphb__title,
html[data-bs-theme="dark"] .auth-card-header .mphb__subtitle {
    color: #ffffff;
}

@media (min-width: 1200px) {
    .g-sidenav-show .sidenav.fixed-start + .main-content,
    .admin-layout .main-content {
        margin-left: 16.5rem;
    }
}

@media (max-width: 1199.98px) {
    .admin-layout .main-content {
        padding-left: 0.75rem;
        padding-right: 0.75rem;
    }

    .examnova-sidebar {
        margin: 0 !important;
        border-radius: 0 8px 8px 0;
    }
}

@media (max-width: 991.98px) {
    .examnova-search {
        width: 100%;
    }

    .exn-resource-grid,
    .exn-resource-grid--institutes,
    .exn-form-grid {
        grid-template-columns: 1fr;
    }

    .exn-section-head,
    .mphb__content {
        align-items: flex-start;
        flex-direction: column;
    }

    .mphb__right {
        width: 100%;
        justify-content: flex-start;
    }

    .exn-settings-nav {
        position: static;
    }
}

@media (max-width: 767.98px) {
    .admin-layout .container-fluid {
        padding-left: 0.75rem;
        padding-right: 0.75rem;
    }

    .mphb {
        padding: 1rem;
    }

    .mphb__title {
        font-size: 1.3rem;
    }

    .exn-mini-dashboard__grid,
    .exn-resource-card__facts {
        grid-template-columns: 1fr;
    }

    .tbl-toolbar__item,
    .tbl-toolbar__item--search {
        min-width: 100%;
    }

    .exn-demo-fab {
        right: 12px !important;
        bottom: 12px !important;
    }

    .exn-demo-fab__link {
        display: none !important;
    }
}
