:root {
    --eq-surface: #f4f7fb;
    --eq-surface-alt: #ffffff;
    --eq-surface-muted: #eef3f9;
    --eq-border: rgba(15, 23, 42, 0.08);
    --eq-border-strong: rgba(15, 23, 42, 0.14);
    --eq-text: #172033;
    --eq-text-muted: #66758f;
    --eq-primary: #2563eb;
    --eq-primary-strong: #1d4ed8;
    --eq-shadow: 0 18px 45px rgba(15, 23, 42, 0.08);
    --eq-radius-lg: 24px;
    --eq-radius-md: 16px;
    --eq-radius-sm: 12px;
}

html[data-theme='dark'] {
    --eq-surface: #0f172a;
    --eq-surface-alt: #111c34;
    --eq-surface-muted: #18243c;
    --eq-border: rgba(148, 163, 184, 0.16);
    --eq-border-strong: rgba(148, 163, 184, 0.28);
    --eq-text: #e5edf8;
    --eq-text-muted: #9aa9c3;
    --eq-primary: #60a5fa;
    --eq-primary-strong: #3b82f6;
    --eq-shadow: 0 22px 50px rgba(2, 6, 23, 0.35);
}

html,
body {
    background: var(--eq-surface);
    color: var(--eq-text);
}

body .card,
body .ui-fieldset,
body .ui-dialog .ui-dialog-content,
body .ui-panel,
body .ui-datatable,
body .ui-selectonemenu-panel,
body .ui-overlaypanel,
.wrap-login100 {
    background: var(--eq-surface-alt);
    border: 1px solid var(--eq-border);
    border-radius: var(--eq-radius-md);
    box-shadow: var(--eq-shadow);
}

body .layout-main {
    background: linear-gradient(180deg, rgba(37, 99, 235, 0.06), transparent 220px), var(--eq-surface);
}

body .topbar {
    background: rgba(255, 255, 255, 0.82);
    backdrop-filter: blur(14px);
    border-bottom: 1px solid var(--eq-border);
    box-shadow: 0 10px 30px rgba(15, 23, 42, 0.08);
}

html[data-theme='dark'] body .topbar {
    background: rgba(15, 23, 42, 0.78);
}

body .layout-menu-container {
    background: linear-gradient(180deg, var(--eq-surface-alt), var(--eq-surface-muted));
    border-right: 1px solid var(--eq-border);
}

.eduquest-quick-code {
    margin: 0 1rem 1rem;
    padding: 1rem;
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.12), rgba(59, 130, 246, 0.02));
    border: 1px solid rgba(37, 99, 235, 0.18);
    border-radius: var(--eq-radius-md);
}

.eduquest-quick-code-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
    color: var(--eq-text);
    font-size: 0.92rem;
    font-weight: 700;
}

.eduquest-page-shell {
    display: grid;
    gap: 1rem;
}

.eduquest-page-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    padding: 1.5rem 1.75rem;
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.12), rgba(15, 23, 42, 0.02));
    border: 1px solid rgba(37, 99, 235, 0.14);
    border-radius: var(--eq-radius-lg);
    box-shadow: var(--eq-shadow);
}

.eduquest-page-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    margin-bottom: 0.45rem;
    color: var(--eq-primary);
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.eduquest-page-title {
    margin: 0;
    color: var(--eq-text);
    font-size: 1.65rem;
    font-weight: 800;
}

.eduquest-page-subtitle {
    margin: 0.5rem 0 0;
    color: var(--eq-text-muted);
    max-width: 58rem;
    line-height: 1.6;
}

.eduquest-page-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    justify-content: flex-end;
}

.eduquest-meta-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.7rem 0.95rem;
    background: var(--eq-surface-alt);
    border: 1px solid var(--eq-border);
    border-radius: 999px;
    color: var(--eq-text-muted);
    font-size: 0.88rem;
    font-weight: 600;
}

.eduquest-meta-chip strong {
    color: var(--eq-text);
}

.eduquest-section-title {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    margin: 0 0 1rem;
    color: var(--eq-text);
    font-size: 1.05rem;
    font-weight: 700;
}

.eduquest-section-note,
.eduquest-chart-subtitle,
.eduquest-stat-note,
.eduquest-login-copy,
.eduquest-login-version {
    color: var(--eq-text-muted);
    font-size: 0.92rem;
}

.eduquest-stat-grid {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 0.85rem;
}

.eduquest-stat-card {
    display: flex;
    align-items: flex-start;
    gap: 0.9rem;
    min-height: 120px;
    padding: 1.15rem;
    background: linear-gradient(160deg, rgba(37, 99, 235, 0.14), rgba(255, 255, 255, 0.02));
    border: 1px solid rgba(37, 99, 235, 0.16);
    border-radius: var(--eq-radius-md);
    box-shadow: var(--eq-shadow);
}

.eduquest-stat-icon {
    width: 44px;
    height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 14px;
    background: rgba(37, 99, 235, 0.16);
    color: var(--eq-primary);
    font-size: 1.1rem;
}

.eduquest-stat-label {
    color: var(--eq-text-muted);
    font-size: 0.82rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.eduquest-stat-value {
    margin-top: 0.25rem;
    color: var(--eq-text);
    font-size: 1.65rem;
    font-weight: 800;
}

.eduquest-chart-card {
    height: 100%;
    padding: 1rem;
    border-radius: var(--eq-radius-lg);
}

.eduquest-chart-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 0.5rem;
}

.eduquest-chart-title {
    color: var(--eq-text);
    font-size: 1rem;
    font-weight: 700;
}

.eduquest-table-search {
    position: relative;
    display: inline-flex;
    align-items: center;
}

.eduquest-table-search .ui-inputfield {
    width: 230px !important;
    padding-left: 2.3rem !important;
}

.eduquest-table-search .pi {
    position: absolute;
    left: 0.8rem;
    color: var(--eq-text-muted);
    z-index: 2;
}

body .ui-inputfield,
body .ui-selectonemenu,
body .ui-button,
body .ui-selectcheckboxmenu,
body .ui-datepicker {
    border-radius: var(--eq-radius-sm);
}

body .ui-inputfield,
body .ui-selectonemenu,
body .ui-selectcheckboxmenu-label {
    background: var(--eq-surface-alt);
    border: 1px solid var(--eq-border-strong);
    color: var(--eq-text);
    box-shadow: none;
}

body .ui-button.default,
body .ui-button.save,
body .ui-button.ui-state-default {
    background: linear-gradient(135deg, var(--eq-primary), var(--eq-primary-strong));
    border: none;
    color: #fff;
}

body .ui-fieldset .ui-fieldset-legend {
    background: transparent;
    border: none;
    padding: 0.75rem 1rem 0;
}

body .ui-fieldset .ui-fieldset-content {
    padding-top: 0.5rem;
}

body .ui-datatable .ui-datatable-header,
body .ui-datatable .ui-datatable-footer,
body .ui-datatable thead th {
    background: var(--eq-surface-muted);
    color: var(--eq-text);
    border-color: var(--eq-border);
}

body .ui-datatable tbody td {
    border-color: var(--eq-border);
    color: var(--eq-text);
}

body .ui-datatable tbody tr:nth-child(even) {
    background: rgba(148, 163, 184, 0.06);
}

body .ui-datatable .ui-column-filter {
    width: 100%;
}

body .ui-paginator {
    background: transparent;
    border: none;
}

.eduquest-theme-toggle {
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
    padding: 0.7rem 1rem;
    background: var(--eq-surface-alt);
    border: 1px solid var(--eq-border);
    border-radius: 999px;
    color: var(--eq-text);
    font-weight: 700;
    text-decoration: none;
}

.eduquest-theme-toggle .pi,
.eduquest-theme-toggle .fa {
    color: var(--eq-primary);
}

@media (max-width: 1280px) {
    .eduquest-stat-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 768px) {
    .eduquest-page-header {
        flex-direction: column;
    }

    .eduquest-page-meta {
        justify-content: flex-start;
    }

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

    .eduquest-table-search .ui-inputfield {
        width: 100% !important;
    }
}

.eduquest-admin-topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    min-height: 82px;
    padding: 0 1.4rem 0 1rem;
    background: linear-gradient(135deg, rgba(15, 23, 42, 0.98), rgba(30, 41, 59, 0.96));
    color: #f8fbff;
}

/* The vendor "avalon" theme hardcodes .topbar-left to a fixed 235px width and
   its own background color with higher selector specificity than the rules
   above — the hamburger + logo + two-line brand text don't fit in 235px and
   wrap/overflow, producing a visually separate, mismatched block. Neutralize
   the vendor box model here so the topbar renders as one continuous bar. */
.layout-wrapper .topbar.eduquest-admin-topbar,
.layout-wrapper .topbar.eduquest-admin-topbar .topbar-left,
.layout-wrapper .topbar.eduquest-admin-topbar .topbar-right {
    background: transparent !important;
    background-image: none !important;
    box-shadow: none !important;
}

.layout-wrapper .topbar.eduquest-admin-topbar {
    height: auto !important;
    min-height: 82px;
}

.layout-wrapper .topbar.eduquest-admin-topbar .topbar-left,
.layout-wrapper .topbar.eduquest-admin-topbar .topbar-right {
    float: none !important;
    width: auto !important;
    height: auto !important;
    min-height: 82px;
    display: flex !important;
    align-items: center !important;
    padding: 0 !important;
}

.layout-wrapper .topbar.eduquest-admin-topbar .topbar-right {
    margin-left: auto;
    justify-content: flex-end;
    gap: 1rem;
}

.eduquest-brand-title,
.eduquest-brand-subtitle {
    white-space: nowrap;
}

.eduquest-topbar-brand,
.eduquest-topbar-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.eduquest-brand-lockup {
    display: inline-flex;
    align-items: center;
    gap: 0.9rem;
    color: inherit;
    text-decoration: none;
}

.eduquest-brand-logo {
    width: 40px;
    height: 40px;
    object-fit: contain;
}

.eduquest-brand-text {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
}

.eduquest-brand-title {
    font-size: 1rem;
    font-weight: 800;
    letter-spacing: 0.01em;
}

.eduquest-brand-subtitle {
    color: rgba(226, 232, 240, 0.72);
    font-size: 0.78rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.eduquest-icon-button {
    width: 42px;
    height: 42px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    background: rgba(148, 163, 184, 0.12);
    color: #f8fbff !important;
    text-decoration: none;
    transition: all 0.2s ease;
}

.eduquest-icon-button:hover,
.eduquest-avatar-trigger:hover,
.eduquest-side-shortcut:hover {
    background: rgba(59, 130, 246, 0.22);
    transform: translateY(-1px);
}

.eduquest-topbar-context {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 0.15rem;
    margin-left: auto;
    padding-right: 0.25rem;
}

.eduquest-topbar-company {
    color: #f8fbff;
    font-size: 0.95rem;
    font-weight: 700;
}

.eduquest-topbar-program {
    color: rgba(226, 232, 240, 0.74);
    font-size: 0.78rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.eduquest-topbar-items {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin: 0;
    padding: 0;
    list-style: none;
}

.eduquest-topbar-link,
.eduquest-user-avatar-item {
    display: inline-flex;
    align-items: center;
}

.eduquest-avatar-trigger {
    position: relative;
    width: 46px;
    height: 46px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 14px;
    background: rgba(148, 163, 184, 0.12);
    cursor: pointer;
    overflow: hidden;
}

.eduquest-avatar-fallback-icon {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgba(248, 251, 255, 0.85);
    font-size: 1.1rem;
    z-index: 0;
}

.eduquest-avatar-fallback-icon-lg {
    color: var(--eq-primary);
    font-size: 1.6rem;
}

.eduquest-user-avatar {
    position: relative;
    z-index: 1;
    width: 38px;
    height: 38px;
    border-radius: 12px;
    object-fit: cover;
    background: transparent;
}

.eduquest-user-card-avatar-wrap {
    position: relative;
    width: 72px;
    height: 72px;
    border-radius: 20px;
    overflow: hidden;
    background: rgba(37, 99, 235, 0.12);
    flex: 0 0 auto;
}

.eduquest-user-card-avatar {
    position: relative;
    z-index: 1;
}

.eduquest-user-card {
    width: 380px;
}

.eduquest-user-card-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
}

.eduquest-user-card-avatar {
    width: 72px;
    height: 72px;
    border-radius: 20px;
    object-fit: cover;
    box-shadow: var(--eq-shadow);
}

.eduquest-user-card-title {
    color: var(--eq-text);
    font-size: 1.05rem;
    font-weight: 800;
}

.eduquest-user-card-subtitle {
    color: var(--eq-text-muted);
    font-size: 0.9rem;
}

.eduquest-user-card-links {
    display: grid;
    gap: 0.55rem;
    margin: 1rem 0;
}

.eduquest-user-card-link {
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
    color: var(--eq-primary);
    font-weight: 700;
    text-decoration: none;
}

.eduquest-user-card-actions {
    display: flex;
    justify-content: flex-end;
}

.eduquest-topbar-menu .ui-menu-child .ui-menu-list,
body .ui-menu.ui-megamenu .ui-menu-child .ui-menu-list {
    min-width: 280px;
}

body .ui-menu .ui-menu-list .ui-widget-header {
    background: transparent;
}

body .ui-menu .ui-menu-list .ui-menuitem .ui-menuitem-link,
body .ui-menu.ui-menubar > .ui-menu-list > .ui-menuitem > .ui-menuitem-link {
    color: var(--eq-text);
    font-weight: 700;
}

body .ui-menu .ui-menu-list .ui-menuitem .ui-menuitem-link:hover {
    color: var(--eq-primary-strong);
}

.eduquest-side-brand {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    margin: 1rem;
    padding: 1rem;
    border-radius: 18px;
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.24), rgba(15, 23, 42, 0.88));
    color: #f8fbff;
    box-shadow: var(--eq-shadow);
}

.eduquest-side-brand-icon {
    width: 46px;
    height: 46px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.14);
    font-size: 1.1rem;
}

.eduquest-side-brand-title {
    font-size: 0.96rem;
    font-weight: 800;
}

.eduquest-side-brand-subtitle {
    color: rgba(226, 232, 240, 0.78);
    font-size: 0.8rem;
}

.eduquest-side-shortcuts {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.75rem;
    margin: 0 1rem 1rem;
}

.eduquest-side-shortcut {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.45rem;
    min-height: 42px;
    border-radius: 12px;
    background: var(--eq-surface-alt);
    border: 1px solid var(--eq-border);
    color: var(--eq-text);
    font-size: 0.84rem;
    font-weight: 700;
    text-decoration: none;
}

.eduquest-menu-caption {
    margin: 0 1rem 0.75rem;
    color: var(--eq-text-muted);
    font-size: 0.76rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.layout-menu-container .layout-menu {
    padding: 0 0.75rem 1rem;
}

.layout-menu-container .layout-menu li > a,
.layout-menu-container .layout-menu li > .ui-menuitem-link {
    border-radius: 12px;
}

.layout-menu-container .layout-menu li > a:hover,
.layout-menu-container .layout-menu li > .ui-menuitem-link:hover,
.layout-menu-container .layout-menu li.active-menuitem > a,
.layout-menu-container .layout-menu li.active-menuitem > .ui-menuitem-link {
    background: rgba(37, 99, 235, 0.14);
    color: var(--eq-primary-strong);
}

.eduquest-form-card,
.eduquest-matrix-card,
.eduquest-directory-card,
.eduquest-summary-card {
    padding: 1.1rem;
    border-radius: var(--eq-radius-lg);
}

.eduquest-action-row {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.85rem;
    padding: 1rem 0 0.4rem;
}

.eduquest-rights-page .ui-fieldset {
    height: 100%;
}

.eduquest-data-table .ui-column-customfilter .custom-filter,
.eduquest-rights-matrix .ui-column-customfilter .custom-filter {
    width: 100%;
}

.eduquest-table-header-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1rem;
}

.eduquest-table-header-bar .eduquest-section-title {
    margin: 0;
}

.eduquest-rights-matrix .ui-selectbooleancheckbox,
.eduquest-rights-matrix .ui-chkbox {
    margin: 0 auto;
}

.eduquest-rights-matrix .ui-button {
    min-width: 2.5rem;
}

.eduquest-kpi-strip {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.85rem;
    margin-bottom: 1rem;
}

.eduquest-kpi-tile {
    padding: 1rem 1.1rem;
    background: linear-gradient(160deg, rgba(37, 99, 235, 0.12), rgba(255, 255, 255, 0.02));
    border: 1px solid rgba(37, 99, 235, 0.12);
    border-radius: var(--eq-radius-md);
}

.eduquest-kpi-label {
    color: var(--eq-text-muted);
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.eduquest-kpi-value {
    margin-top: 0.35rem;
    color: var(--eq-text);
    font-size: 1.3rem;
    font-weight: 800;
}

.eduquest-compact-note {
    color: var(--eq-text-muted);
    font-size: 0.84rem;
}

.eduquest-label-stack {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    gap: 0.3rem;
}

.eduquest-label-stack .ui-selectbooleancheckbox {
    margin: 0;
}

.eduquest-rights-root {
    color: var(--eq-primary);
    font-size: 0.84rem;
    font-weight: 700;
}

html[data-theme='dark'] .eduquest-admin-topbar {
    background: linear-gradient(135deg, rgba(2, 6, 23, 0.98), rgba(15, 23, 42, 0.96));
}

html[data-theme='dark'] .eduquest-icon-button,
html[data-theme='dark'] .eduquest-avatar-trigger {
    background: rgba(148, 163, 184, 0.14);
}

html[data-theme='dark'] .eduquest-side-shortcut {
    background: rgba(15, 23, 42, 0.72);
}

@media (max-width: 960px) {
    .eduquest-admin-topbar {
        flex-wrap: wrap;
        padding-bottom: 1rem;
    }

    .eduquest-topbar-context {
        align-items: flex-start;
        margin-left: 0;
        order: 3;
        width: 100%;
    }

    .eduquest-kpi-strip {
        grid-template-columns: 1fr;
    }
}
.eduquest-contrast-fix-v2 {
    display: block;
}

body .layout-menu-container {
    background: linear-gradient(180deg, #0f172a, #172554) !important;
    color: #e2e8f0;
}

body .layout-menu-container .menu-scroll-content {
    background: transparent !important;
}

body .layout-menu-container .layout-menu,
body .layout-menu-container .layout-menu ul,
body .layout-menu-container .layout-menu li,
body .layout-menu-container .layout-menu li a,
body .layout-menu-container .layout-menu li span,
body .layout-menu-container .layout-menu li i,
body .layout-menu-container .ui-menuitem-text,
body .layout-menu-container .layout-menu .layout-root-menuitem > .layout-menuitem-root-text {
    color: #dbe7ff !important;
}

body .layout-menu-container .layout-menu .layout-root-menuitem > .layout-menuitem-root-text,
body .layout-menu-container .eduquest-menu-caption {
    color: rgba(191, 219, 254, 0.78) !important;
}

body .layout-menu-container .layout-menu li > a:hover,
body .layout-menu-container .layout-menu li.active-menuitem > a,
body .layout-menu-container .layout-menu li.active-menuitem > .ui-menuitem-link,
body .layout-menu-container .layout-menu li > .ui-menuitem-link:hover {
    background: rgba(96, 165, 250, 0.18) !important;
    color: #ffffff !important;
}

body .layout-menu-container .layout-menu li.active-menuitem > a i,
body .layout-menu-container .layout-menu li > a:hover i,
body .layout-menu-container .layout-menu li > .ui-menuitem-link:hover i {
    color: #93c5fd !important;
}

.eduquest-side-brand {
    background: linear-gradient(135deg, rgba(255,255,255,0.16), rgba(99,102,241,0.28)) !important;
    border: 1px solid rgba(191, 219, 254, 0.16);
}

.eduquest-side-shortcut {
    background: rgba(255,255,255,0.08) !important;
    border-color: rgba(191, 219, 254, 0.18) !important;
    color: #f8fbff !important;
}

.eduquest-side-shortcut i {
    color: #93c5fd !important;
}

.eduquest-quick-code {
    background: rgba(255,255,255,0.07) !important;
    border: 1px solid rgba(147,197,253,0.22) !important;
}

.eduquest-quick-code-label,
.eduquest-quick-code-label label,
.eduquest-quick-code-label .ui-outputlabel {
    color: #f8fbff !important;
}

.eduquest-quick-code .ui-inputfield {
    background: rgba(15, 23, 42, 0.88) !important;
    border: 1px solid rgba(191, 219, 254, 0.18) !important;
    color: #ffffff !important;
}

.eduquest-admin-topbar #menu-button,
.eduquest-admin-topbar #topbar-menu-button {
    position: static !important;
    top: auto !important;
    left: auto !important;
    right: auto !important;
    margin: 0 !important;
}

.eduquest-admin-topbar .topbar-left,
.eduquest-admin-topbar .topbar-right {
    float: none !important;
}

.eduquest-admin-topbar .eduquest-brand-lockup {
    padding: 0.55rem 0.9rem;
    border-radius: 16px;
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(148, 163, 184, 0.12);
}

.eduquest-admin-topbar .eduquest-icon-button {
    box-shadow: 0 10px 22px rgba(2, 6, 23, 0.2);
}

.eduquest-user-avatar-item {
    flex: 0 0 auto;
}

.eduquest-user-card {
    background: var(--eq-surface-alt);
    border: 1px solid var(--eq-border);
    border-radius: 20px;
    box-shadow: var(--eq-shadow);
    padding: 1.15rem;
}

.eduquest-solid-danger.ui-button,
.eduquest-solid-danger .ui-button {
    background: linear-gradient(135deg, #ef4444, #dc2626) !important;
    color: #fff !important;
    border: none !important;
}

body .card,
body .ui-fieldset,
body .ui-panel,
body .ui-datatable,
body .ui-dialog .ui-dialog-content,
body .ui-overlaypanel,
body .ui-selectonemenu-panel {
    background: rgba(23, 33, 61, 0.96);
}

body .ui-fieldset .ui-fieldset-legend,
body .lbl-14-b-1,
body .ui-outputlabel,
body .ui-panelgrid td,
body .ui-panelgrid label,
body .ui-selectonemenu-label,
body .ui-selectcheckboxmenu-label,
body .ui-chkbox-label,
body .ui-datepicker-title,
body .ui-datatable thead th,
body .ui-datatable tfoot td,
body .ui-datatable tbody td,
body .ui-datatable tbody td div,
body .ui-column-title,
body .ui-widget-content,
body .ui-widget-header,
body .ui-tabs .ui-tabs-nav li a,
body .ui-tabs .ui-tabs-panels,
body .ui-accordion .ui-accordion-header a,
body .ui-accordion .ui-accordion-content,
body .ui-messages,
body .ui-message,
body .ui-messages-summary,
body .ui-messages-detail {
    color: #edf4ff !important;
}

body .ui-inputfield,
body .ui-selectonemenu,
body .ui-selectcheckboxmenu,
body textarea.ui-inputfield {
    background: rgba(14, 23, 45, 0.92) !important;
    border: 1px solid rgba(99, 102, 241, 0.22) !important;
    color: #f8fbff !important;
}

body .ui-inputfield::placeholder {
    color: rgba(203, 213, 225, 0.7);
}

body .ui-selectonemenu-trigger,
body .ui-selectonemenu .ui-selectonemenu-trigger .ui-icon {
    color: #93c5fd !important;
}

body .ui-datatable .ui-datatable-header,
body .ui-datatable .ui-datatable-footer,
body .ui-datatable thead th {
    background: linear-gradient(180deg, rgba(30, 41, 59, 0.96), rgba(15, 23, 42, 0.96)) !important;
    border-color: rgba(148, 163, 184, 0.14) !important;
    color: #f8fbff !important;
}

body .ui-datatable tbody tr {
    background: rgba(18, 27, 51, 0.96) !important;
}

body .ui-datatable tbody tr:nth-child(even) {
    background: rgba(28, 38, 68, 0.96) !important;
}

body .ui-datatable tbody tr:hover {
    background: rgba(59, 130, 246, 0.16) !important;
}

body .ui-datatable tbody tr.ui-state-highlight,
body .ui-datatable tbody tr.ui-state-hover.ui-state-highlight {
    background: linear-gradient(135deg, rgba(37,99,235,0.38), rgba(129,140,248,0.32)) !important;
}

body .ui-datatable tbody tr.ui-state-highlight td,
body .ui-datatable tbody tr.ui-state-highlight td div {
    color: #ffffff !important;
}

body .ui-paginator {
    color: #e2e8f0 !important;
}

body .ui-paginator .ui-paginator-page,
body .ui-paginator .ui-paginator-next,
body .ui-paginator .ui-paginator-prev,
body .ui-paginator .ui-paginator-first,
body .ui-paginator .ui-paginator-last,
body .ui-paginator .ui-dropdown {
    background: rgba(15, 23, 42, 0.9) !important;
    border: 1px solid rgba(148, 163, 184, 0.18) !important;
    color: #f8fbff !important;
}

body .my-dt-thead .ui-button,
body .eduquest-data-table .ui-button,
body .eduquest-rights-matrix .ui-button {
    border: none !important;
    border-radius: 12px !important;
    box-shadow: 0 10px 20px rgba(15, 23, 42, 0.22);
}

body .eduquest-action-edit.ui-button,
body .eduquest-action-edit .ui-button,
body .my-dt-thead .ui-button .fa-edit,
body .my-dt-thead .ui-button .pi-pencil {
    color: #ffffff !important;
}

body .eduquest-action-edit.ui-button,
body .eduquest-action-edit .ui-button {
    background: linear-gradient(135deg, #06b6d4, #3b82f6) !important;
}

body .eduquest-action-next.ui-button,
body .eduquest-action-next .ui-button {
    background: linear-gradient(135deg, #8b5cf6, #6366f1) !important;
    color: #ffffff !important;
}

body .eduquest-action-delete.ui-button,
body .eduquest-action-delete .ui-button {
    background: linear-gradient(135deg, #f97316, #ef4444) !important;
    color: #ffffff !important;
}

body .eduquest-solid-primary.ui-button,
body .eduquest-solid-primary .ui-button {
    background: linear-gradient(135deg, #3b82f6, #6366f1) !important;
    color: #ffffff !important;
    border: none !important;
}

body .eduquest-solid-secondary.ui-button,
body .eduquest-solid-secondary .ui-button {
    background: rgba(96, 165, 250, 0.18) !important;
    color: #f8fbff !important;
    border: 1px solid rgba(96, 165, 250, 0.22) !important;
}

body .ui-fileupload-simple .ui-button,
body .ui-fileupload-choose,
body .ui-fileupload .ui-fileupload-choose {
    background: linear-gradient(135deg, #60a5fa, #818cf8) !important;
    color: #ffffff !important;
    border: none !important;
    border-radius: 14px !important;
}

@media (max-width: 960px) {
    body .layout-menu-container {
        box-shadow: 0 20px 55px rgba(2, 6, 23, 0.38);
    }

    .eduquest-theme-toggle span {
        display: none;
    }
}

.eduquest-contrast-fix-v3 {
    display: block;
}

html[data-theme='light'] body,
html[data-theme='light'] body .layout-main {
    color: #172033;
}

html[data-theme='light'] body .card,
html[data-theme='light'] body .ui-fieldset,
html[data-theme='light'] body .ui-panel,
html[data-theme='light'] body .ui-datatable,
html[data-theme='light'] body .ui-dialog .ui-dialog-content,
html[data-theme='light'] body .ui-overlaypanel,
html[data-theme='light'] body .ui-selectonemenu-panel,
html[data-theme='light'] .eduquest-user-card,
html[data-theme='light'] .eduquest-login-panel {
    background: linear-gradient(180deg, #ffffff, #f8fbff) !important;
    border: 1px solid rgba(37, 99, 235, 0.1) !important;
    color: #172033 !important;
    box-shadow: 0 18px 42px rgba(15, 23, 42, 0.08) !important;
}

html[data-theme='light'] body .ui-fieldset .ui-fieldset-legend,
html[data-theme='light'] body .lbl-14-b-1,
html[data-theme='light'] body .ui-outputlabel,
html[data-theme='light'] body .ui-panelgrid td,
html[data-theme='light'] body .ui-panelgrid label,
html[data-theme='light'] body .ui-selectonemenu-label,
html[data-theme='light'] body .ui-selectcheckboxmenu-label,
html[data-theme='light'] body .ui-chkbox-label,
html[data-theme='light'] body .ui-datepicker-title,
html[data-theme='light'] body .ui-datatable thead th,
html[data-theme='light'] body .ui-datatable tfoot td,
html[data-theme='light'] body .ui-datatable tbody td,
html[data-theme='light'] body .ui-datatable tbody td div,
html[data-theme='light'] body .ui-column-title,
html[data-theme='light'] body .ui-widget-content,
html[data-theme='light'] body .ui-widget-header,
html[data-theme='light'] body .ui-tabs .ui-tabs-nav li a,
html[data-theme='light'] body .ui-tabs .ui-tabs-panels,
html[data-theme='light'] body .ui-accordion .ui-accordion-header a,
html[data-theme='light'] body .ui-accordion .ui-accordion-content,
html[data-theme='light'] body .ui-messages,
html[data-theme='light'] body .ui-message,
html[data-theme='light'] body .ui-messages-summary,
html[data-theme='light'] body .ui-messages-detail,
html[data-theme='light'] .eduquest-login-title,
html[data-theme='light'] .eduquest-login-copy,
html[data-theme='light'] .eduquest-login-label {
    color: #172033 !important;
}

html[data-theme='light'] .eduquest-login-kicker,
html[data-theme='light'] .eduquest-user-card-subtitle,
html[data-theme='light'] .eduquest-topbar-program,
html[data-theme='light'] .eduquest-brand-subtitle {
    color: #64748b !important;
}

html[data-theme='light'] body .ui-inputfield,
html[data-theme='light'] body .ui-selectonemenu,
html[data-theme='light'] body .ui-selectcheckboxmenu,
html[data-theme='light'] body textarea.ui-inputfield,
html[data-theme='light'] .eduquest-quick-code .ui-inputfield,
html[data-theme='light'] .eduquest-login-input {
    background: #ffffff !important;
    border: 1px solid rgba(37, 99, 235, 0.18) !important;
    color: #0f172a !important;
    box-shadow: inset 0 1px 2px rgba(15, 23, 42, 0.04);
}

html[data-theme='light'] body .ui-inputfield::placeholder,
html[data-theme='light'] .eduquest-login-input::placeholder {
    color: #94a3b8 !important;
}

html[data-theme='light'] body .ui-datatable .ui-datatable-header,
html[data-theme='light'] body .ui-datatable .ui-datatable-footer,
html[data-theme='light'] body .ui-datatable thead th {
    background: linear-gradient(180deg, #eff6ff, #dbeafe) !important;
    border-color: rgba(37, 99, 235, 0.12) !important;
    color: #10213f !important;
}

html[data-theme='light'] body .ui-datatable tbody tr {
    background: #ffffff !important;
}

html[data-theme='light'] body .ui-datatable tbody tr:nth-child(even) {
    background: #f8fbff !important;
}

html[data-theme='light'] body .ui-datatable tbody tr:hover {
    background: rgba(59, 130, 246, 0.08) !important;
}

html[data-theme='light'] body .ui-datatable tbody tr.ui-state-highlight,
html[data-theme='light'] body .ui-datatable tbody tr.ui-state-hover.ui-state-highlight {
    background: linear-gradient(135deg, #2563eb, #4f46e5) !important;
}

html[data-theme='light'] body .ui-datatable tbody tr.ui-state-highlight td,
html[data-theme='light'] body .ui-datatable tbody tr.ui-state-highlight td div {
    color: #ffffff !important;
}

html[data-theme='light'] body .ui-paginator .ui-paginator-page,
html[data-theme='light'] body .ui-paginator .ui-paginator-next,
html[data-theme='light'] body .ui-paginator .ui-paginator-prev,
html[data-theme='light'] body .ui-paginator .ui-paginator-first,
html[data-theme='light'] body .ui-paginator .ui-paginator-last,
html[data-theme='light'] body .ui-paginator .ui-dropdown {
    background: #ffffff !important;
    border: 1px solid rgba(37, 99, 235, 0.14) !important;
    color: #172033 !important;
}

html[data-theme='light'] .eduquest-admin-topbar {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.96), rgba(239, 246, 255, 0.96)) !important;
    border-bottom: 1px solid rgba(37, 99, 235, 0.12);
    color: #0f172a !important;
}

html[data-theme='light'] .eduquest-topbar-company,
html[data-theme='light'] .eduquest-brand-title {
    color: #0f172a !important;
}

html[data-theme='light'] .eduquest-icon-button,
html[data-theme='light'] .eduquest-avatar-trigger,
html[data-theme='light'] .eduquest-theme-toggle {
    background: rgba(255, 255, 255, 0.95) !important;
    border: 1px solid rgba(37, 99, 235, 0.14) !important;
    color: #1e3a8a !important;
    box-shadow: 0 10px 24px rgba(37, 99, 235, 0.12) !important;
}

html[data-theme='light'] .eduquest-icon-button i,
html[data-theme='light'] .eduquest-avatar-trigger i,
html[data-theme='light'] .eduquest-theme-toggle i {
    color: #2563eb !important;
}

html[data-theme='light'] .eduquest-brand-lockup {
    background: rgba(255, 255, 255, 0.88) !important;
    border: 1px solid rgba(37, 99, 235, 0.12) !important;
}

html[data-theme='light'] .eduquest-brand-logo {
    padding: 0.3rem;
    border-radius: 14px;
    background: linear-gradient(135deg, #eff6ff, #dbeafe);
    box-shadow: inset 0 0 0 1px rgba(37, 99, 235, 0.08);
}

html[data-theme='light'] body .layout-menu-container {
    background: linear-gradient(180deg, #0f172a, #1e3a8a) !important;
}

html[data-theme='light'] .eduquest-side-brand {
    background: linear-gradient(135deg, rgba(255,255,255,0.18), rgba(96,165,250,0.24)) !important;
}

html[data-theme='light'] .eduquest-quick-code {
    background: rgba(255,255,255,0.08) !important;
    border: 1px solid rgba(147,197,253,0.24) !important;
}

html[data-theme='dark'] body .card,
html[data-theme='dark'] body .ui-fieldset,
html[data-theme='dark'] body .ui-panel,
html[data-theme='dark'] body .ui-datatable,
html[data-theme='dark'] body .ui-dialog .ui-dialog-content,
html[data-theme='dark'] body .ui-overlaypanel,
html[data-theme='dark'] body .ui-selectonemenu-panel,
html[data-theme='dark'] .eduquest-user-card,
html[data-theme='dark'] .eduquest-login-panel {
    background: rgba(23, 33, 61, 0.96) !important;
    border: 1px solid rgba(99, 102, 241, 0.14) !important;
}

html[data-theme='dark'] .eduquest-admin-topbar {
    background: linear-gradient(135deg, rgba(2, 6, 23, 0.98), rgba(15, 23, 42, 0.96)) !important;
}

html[data-theme='dark'] .eduquest-icon-button,
html[data-theme='dark'] .eduquest-avatar-trigger,
html[data-theme='dark'] .eduquest-theme-toggle {
    background: rgba(30, 41, 59, 0.92) !important;
    border: 1px solid rgba(148, 163, 184, 0.16) !important;
}

body .eduquest-icon-button,
body .eduquest-avatar-trigger {
    width: 46px !important;
    height: 46px !important;
    border-radius: 14px !important;
}

body .eduquest-theme-toggle {
    min-height: 46px;
    border-radius: 14px !important;
}

body .eduquest-brand-lockup {
    border-radius: 18px !important;
}

body .eduquest-topbar-brand {
    gap: 0.85rem !important;
}

body .eduquest-topbar-actions {
    gap: 0.75rem !important;
}

body .eduquest-user-card {
    width: 360px;
    max-width: calc(100vw - 2rem);
}

body .eduquest-table-search .ui-inputfield {
    min-height: 42px;
    border-radius: 12px !important;
}

body .ui-datatable tbody .ui-button,
body .my-dt-thead .ui-button,
body .eduquest-data-table .ui-button,
body .eduquest-rights-matrix .ui-button {
    min-width: 2.45rem;
    min-height: 2.45rem;
}

body .eduquest-action-edit.ui-button,
body .eduquest-action-next.ui-button,
body .eduquest-action-delete.ui-button {
    box-shadow: 0 12px 24px rgba(15, 23, 42, 0.2) !important;
}

body .eduquest-login-submit.ui-button,
body .eduquest-solid-primary.ui-button,
body .eduquest-solid-secondary.ui-button,
body .eduquest-solid-danger.ui-button {
    min-height: 44px;
    border-radius: 14px !important;
}

.eduquest-topbar-form {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    margin: 0;
}

body .eduquest-side-brand {
    align-items: center;
    min-height: 82px;
}

body .eduquest-side-brand-title {
    line-height: 1.15;
}

body .eduquest-side-brand-subtitle {
    margin-top: 0.2rem;
}

body .eduquest-brand-logo {
    width: 36px;
    height: 36px;
}

body .eduquest-brand-title {
    font-size: 0.96rem;
}

body .eduquest-brand-subtitle {
    font-size: 0.72rem;
}

body .eduquest-form-card .ui-fieldset,
body .eduquest-form-card .ui-fieldset .ui-fieldset-content {
    background: transparent !important;
    box-shadow: none !important;
}

body .eduquest-form-card .form-group,
body .eduquest-form-card .form-group .ui-panelgrid-content,
body .eduquest-form-card .form-group tr,
body .eduquest-form-card .form-group td {
    border: none !important;
    background: transparent !important;
}

body .eduquest-form-card .form-group td {
    padding: 0.22rem 0.28rem !important;
}

body .eduquest-form-card .form-group .xit-right,
body .eduquest-form-card .form-group .ui-grid-col-4 {
    padding-right: 0 !important;
}

body .eduquest-form-card .form-group .ui-grid-col-8 {
    padding-left: 0 !important;
}

body .eduquest-form-card .lbl-14-b-1,
body .eduquest-form-card .ui-outputlabel {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    min-height: 32px;
    padding: 0.65rem 0.9rem;
    border-radius: 12px 0 0 12px;
    font-weight: 700;
}

html[data-theme='light'] body .eduquest-form-card .lbl-14-b-1,
html[data-theme='light'] body .eduquest-form-card .ui-outputlabel {
    background: linear-gradient(135deg, #e0ecff, #c7dbff) !important;
    color: #163260 !important;
}

html[data-theme='dark'] body .eduquest-form-card .lbl-14-b-1,
html[data-theme='dark'] body .eduquest-form-card .ui-outputlabel {
    background: linear-gradient(135deg, #1e2b57, #263463) !important;
    color: #f8fbff !important;
}

body .eduquest-form-card .ui-inputfield,
body .eduquest-form-card .ui-selectonemenu,
body .eduquest-form-card textarea.ui-inputfield,
body .eduquest-form-card .ui-selectonemenu-label {
    min-height: 32px;
    border-radius: 0 12px 12px 0 !important;
}

body .eduquest-form-card .ui-selectonemenu-trigger {
    border-radius: 0 12px 12px 0 !important;
}

body .eduquest-form-card .ui-fileupload-simple .ui-button,
body .eduquest-form-card .ui-fileupload-choose,
body .eduquest-form-card .ui-fileupload .ui-fileupload-choose {
    min-height: 32px;
    border-radius: 12px !important;
}

body .eduquest-form-card .eduquest-solid-primary.ui-button,
body .eduquest-form-card .eduquest-solid-secondary.ui-button,
body .eduquest-form-card .eduquest-action-delete.ui-button {
    min-width: 84px;
}

body .ui-datatable thead > tr > th,
body .ui-datatable tbody > tr > td,
body .ui-datatable tfoot > tr > td {
    border-color: rgba(99, 102, 241, 0.14) !important;
}

html[data-theme='dark'] body .ui-datatable tbody > tr > td {
    background: #0f172a !important;
    color: #eef4ff !important;
}

html[data-theme='dark'] body .ui-datatable tbody > tr:nth-child(even) > td {
    background: #121c33 !important;
}

html[data-theme='dark'] body .ui-datatable tbody > tr:hover > td {
    background: rgba(37, 99, 235, 0.18) !important;
}

html[data-theme='dark'] body .ui-datatable tbody > tr.ui-state-highlight > td,
html[data-theme='dark'] body .ui-datatable tbody > tr.ui-state-hover.ui-state-highlight > td {
    background: linear-gradient(135deg, #1d4ed8, #4338ca) !important;
    color: #ffffff !important;
}

html[data-theme='light'] body .ui-datatable tbody > tr > td {
    background: #ffffff !important;
    color: #172033 !important;
}

html[data-theme='light'] body .ui-datatable tbody > tr:nth-child(even) > td {
    background: #f8fbff !important;
}

html[data-theme='light'] body .ui-datatable tbody > tr:hover > td {
    background: #eef5ff !important;
}

html[data-theme='light'] body .ui-datatable tbody > tr.ui-state-highlight > td,
html[data-theme='light'] body .ui-datatable tbody > tr.ui-state-hover.ui-state-highlight > td {
    background: linear-gradient(135deg, #2563eb, #4f46e5) !important;
    color: #ffffff !important;
}

body .ui-datatable .ui-sortable-column .ui-sortable-column-icon,
body .ui-datatable .ui-column-filter,
body .ui-datatable .ui-column-customfilter .custom-filter {
    color: #60a5fa !important;
}

body .ui-datatable .ui-paginator-bottom {
    border-top: 1px solid rgba(99, 102, 241, 0.14) !important;
}

body .ui-datatable .ui-paginator .ui-state-active,
body .ui-datatable .ui-paginator .ui-paginator-page.ui-state-active {
    background: linear-gradient(135deg, #2563eb, #4f46e5) !important;
    color: #ffffff !important;
    border-color: transparent !important;
}

body .ui-growl-item-container,
body .ui-messages-warn,
body .ui-message-warn,
body .ui-messages-error,
body .ui-message-error,
body .ui-messages-info,
body .ui-message-info {
    border-radius: 16px !important;
    box-shadow: 0 20px 40px rgba(15, 23, 42, 0.18) !important;
}

body .ui-growl {
    top: 92px !important;
}

@media (max-width: 1200px) {
    .eduquest-topbar-form {
        gap: 0.5rem;
    }

    body .eduquest-brand-text {
        display: none;
    }
}

/* ====================================================================
   Global content polish — applies the design system to every legacy
   page automatically, without requiring per-page markup changes.
   ==================================================================== */

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.layout-wrapper .layout-main {
    padding: 96px 22px 32px 22px;
}

body .ui-fieldset {
    margin-bottom: 1rem;
}

body .ui-fieldset .ui-fieldset-legend {
    margin-bottom: 0.35rem;
    font-size: 0.98rem;
    font-weight: 800;
    letter-spacing: 0.01em;
    color: var(--eq-primary-strong);
}

body .ui-fieldset .ui-fieldset-legend .ui-fieldset-legend-text {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

body .ui-fieldset .ui-fieldset-content {
    padding: 0.35rem 1.1rem 1.1rem;
}

body .card {
    padding: 1.25rem;
}

body .ui-panelgrid td {
    padding: 0.45rem 0.6rem;
}

body .ui-outputlabel,
body .lbl-14-b-1 {
    font-weight: 600;
}

body .ui-datatable-header {
    border-radius: var(--eq-radius-md) var(--eq-radius-md) 0 0;
}

@keyframes eq-fade-in {
    from {
        opacity: 0;
        transform: translateY(4px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.layout-main > form,
.layout-main > .ui-fluid {
    animation: eq-fade-in 0.22s ease both;
}

@media (max-width: 768px) {
    .layout-wrapper .layout-main {
        padding: 88px 14px 24px 14px;
    }
}

/* ====================================================================
   Tab-header contrast fix.
   Every ELMS/ELTR "master" page (course, trainer, topic, question, etc.)
   embeds its own identical <style> block for its p:tabView header, hard-
   coding a DARK NAVY background (#16264C) for inactive tabs and a LIGHT
   GRAY background (#f5f6f7) for the active tab — independent of the
   light/dark theme toggle. The theme-wide label-color rules above force
   a single text color (near-white in the dark block, near-black in the
   light block) onto every ".ui-tabs-nav li a" regardless of state. That
   collides with whichever tab doesn't match the current theme's assumed
   background, making its label the same color as its background — e.g.
   near-white text forced onto the light-gray active tab, or near-black
   text forced onto the dark-navy inactive tabs. Pin each state to the
   backgrounds these pages actually use, in both themes, so labels are
   always legible ("Basic Info" disappearing on the active tab was this
   bug). Higher specificity than the generic li a rule wins outright. */
body .ui-tabs .ui-tabs-nav li a {
    color: #f8fbff !important;
}

body .ui-tabs .ui-tabs-nav li.ui-state-active a {
    color: #172033 !important;
}

/* ====================================================================
   Day-mode (light theme) contrast fixes.
   The sidebar accent card, its shortcut buttons, and the "secondary"
   button style were built assuming a permanently dark backdrop (white
   text on a near-transparent white overlay) and were never re-covered
   by the html[data-theme='light'] block, so on a light page they render
   as white-on-white — effectively invisible. Rather than chase every
   shade of "is this in dark mode or not", pin the left navigation rail
   to always be the dark, high-contrast surface (a permanently-dark side
   nav is a deliberate, common pattern and keeps every icon/label inside
   it readable regardless of which theme the main content area is in).
   ==================================================================== */

.eduquest-side-brand,
html[data-theme='light'] .eduquest-side-brand,
html[data-theme='dark'] .eduquest-side-brand {
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.32), rgba(15, 23, 42, 0.92)) !important;
    color: #f8fbff !important;
}

.eduquest-side-brand-title,
.eduquest-side-brand-subtitle {
    color: inherit;
}

.eduquest-side-shortcut,
html[data-theme='light'] .eduquest-side-shortcut,
html[data-theme='dark'] .eduquest-side-shortcut {
    background: rgba(15, 23, 42, 0.35) !important;
    border: 1px solid rgba(148, 163, 184, 0.25) !important;
    color: #f8fbff !important;
}

.eduquest-side-shortcut i {
    color: #93c5fd !important;
}

/* The "secondary" button (Clear / Search / Cancel) needs real contrast
   against a light card, not just a faint blue tint with white text. */
html[data-theme='light'] body .eduquest-solid-secondary.ui-button,
html[data-theme='light'] body .eduquest-solid-secondary .ui-button {
    background: #eef4ff !important;
    color: #1d4ed8 !important;
    border: 1px solid rgba(37, 99, 235, 0.28) !important;
}

/* Reinforce action-button + icon color together so the icon can never
   end up the same color as its own button background in either theme. */
body .eduquest-action-edit.ui-button,
body .eduquest-action-edit.ui-button i,
body .eduquest-action-edit .ui-button,
body .eduquest-action-edit .ui-button i {
    background: linear-gradient(135deg, #06b6d4, #3b82f6) !important;
    color: #ffffff !important;
    border: none !important;
}

body .eduquest-action-next.ui-button,
body .eduquest-action-next.ui-button i,
body .eduquest-action-next .ui-button,
body .eduquest-action-next .ui-button i {
    background: linear-gradient(135deg, #8b5cf6, #6366f1) !important;
    color: #ffffff !important;
    border: none !important;
}

body .eduquest-action-delete.ui-button,
body .eduquest-action-delete.ui-button i,
body .eduquest-action-delete .ui-button,
body .eduquest-action-delete .ui-button i {
    background: linear-gradient(135deg, #f97316, #ef4444) !important;
    color: #ffffff !important;
    border: none !important;
}

/* A nested p:fieldset inside .eduquest-form-card is intentionally made
   transparent so it doesn't look like a "card inside a card" — but that
   only works if its parent actually has the themed card background. Make
   the parent explicit instead of relying on inheritance, and neutralize
   any stray vendor background (file-upload widgets, ".xit" wrappers)
   that could otherwise show through as an unexpected dark patch. */
html[data-theme='light'] body .eduquest-form-card {
    background: linear-gradient(180deg, #ffffff, #f8fbff) !important;
}

html[data-theme='dark'] body .eduquest-form-card {
    background: rgba(23, 33, 61, 0.96) !important;
}

body .eduquest-form-card .xit,
body .eduquest-form-card .ui-fileupload-simple,
body .eduquest-form-card .ui-panelgrid,
body .eduquest-form-card .ui-panelgrid-content {
    background: transparent !important;
}

/* Same white-on-white problem as the brand card: Quick Code's own label
   and input were pinned to white text on a near-transparent background
   with no theme override. Reinforce the whole nav rail's background too,
   at higher selector specificity than any earlier variant, so it stays
   the intended dark, high-contrast surface no matter what. */
.layout-wrapper .layout-menu-container {
    background: linear-gradient(180deg, #0f172a, #172554) !important;
}

.layout-wrapper .layout-menu-container .layout-menu,
.layout-wrapper .layout-menu-container .layout-menu li,
.layout-wrapper .layout-menu-container .layout-menu li a,
.layout-wrapper .layout-menu-container .layout-menu li span,
.layout-wrapper .layout-menu-container .layout-menu li i,
.layout-wrapper .layout-menu-container .ui-menuitem-text {
    color: #dbe7ff !important;
}

.eduquest-quick-code,
html[data-theme='light'] .eduquest-quick-code,
html[data-theme='dark'] .eduquest-quick-code {
    background: rgba(15, 23, 42, 0.32) !important;
    border: 1px solid rgba(147, 197, 253, 0.25) !important;
}

.eduquest-quick-code-label,
.eduquest-quick-code-label label,
.eduquest-quick-code-label .ui-outputlabel {
    color: #f8fbff !important;
}

.eduquest-quick-code .ui-inputfield {
    background: rgba(15, 23, 42, 0.9) !important;
    border: 1px solid rgba(191, 219, 254, 0.22) !important;
    color: #ffffff !important;
}

/* ====================================================================
   Specificity correction.
   The two fixes above for the nav-rail background/text and the table
   row-action icons did not actually win in day mode: an earlier rule
   `html[data-theme='light'] body .layout-menu-container {...}` (and the
   equivalent .ui-datatable/.ui-button plumbing) carries a trailing
   `body` type-selector that these new rules didn't match or beat —
   CSS specificity compares class-count first, but a tie there is
   broken by comparing element/type-selector count next, and the older
   rule had one where the newer rule had none. Re-declare both fixes
   with matching-or-greater specificity (an explicit theme-scoped
   variant plus the same `body` element) so they win outright. */
html[data-theme='light'] body .layout-wrapper .layout-menu-container,
html[data-theme='dark'] body .layout-wrapper .layout-menu-container,
body .layout-wrapper .layout-menu-container {
    background: linear-gradient(180deg, #0f172a, #172554) !important;
}

html[data-theme='light'] body .layout-wrapper .layout-menu-container .layout-menu li a,
html[data-theme='dark'] body .layout-wrapper .layout-menu-container .layout-menu li a,
body .layout-wrapper .layout-menu-container .layout-menu li a,
html[data-theme='light'] body .layout-wrapper .layout-menu-container .layout-menu li span,
html[data-theme='dark'] body .layout-wrapper .layout-menu-container .layout-menu li span,
body .layout-wrapper .layout-menu-container .layout-menu li span,
html[data-theme='light'] body .layout-wrapper .layout-menu-container .ui-menuitem-text,
html[data-theme='dark'] body .layout-wrapper .layout-menu-container .ui-menuitem-text,
body .layout-wrapper .layout-menu-container .ui-menuitem-text {
    color: #dbe7ff !important;
}

html[data-theme='light'] body .layout-wrapper .layout-menu-container .layout-menu li i,
html[data-theme='dark'] body .layout-wrapper .layout-menu-container .layout-menu li i,
body .layout-wrapper .layout-menu-container .layout-menu li i,
html[data-theme='light'] body .layout-wrapper .layout-menu-container .eduquest-menu-caption,
html[data-theme='dark'] body .layout-wrapper .layout-menu-container .eduquest-menu-caption,
body .layout-wrapper .layout-menu-container .eduquest-menu-caption {
    color: rgba(191, 219, 254, 0.78) !important;
}

html[data-theme='light'] body .layout-wrapper .layout-menu-container .layout-menu li:hover > a,
html[data-theme='dark'] body .layout-wrapper .layout-menu-container .layout-menu li:hover > a,
body .layout-wrapper .layout-menu-container .layout-menu li:hover > a,
html[data-theme='light'] body .layout-wrapper .layout-menu-container .layout-menu li.active-menuitem > a,
html[data-theme='dark'] body .layout-wrapper .layout-menu-container .layout-menu li.active-menuitem > a,
body .layout-wrapper .layout-menu-container .layout-menu li.active-menuitem > a {
    background: rgba(96, 165, 250, 0.22) !important;
    color: #ffffff !important;
}

/* Row-action icon buttons: cover every element PrimeFaces might render
   the icon glyph as (<i> for pi/fa icon fonts, <span class="ui-icon">
   for some skins) and out-specify the same competing light-theme rule
   shape as above. */
html[data-theme='light'] body .ui-datatable .eduquest-action-edit.ui-button,
html[data-theme='dark'] body .ui-datatable .eduquest-action-edit.ui-button,
body .ui-datatable .eduquest-action-edit.ui-button {
    background: linear-gradient(135deg, #06b6d4, #3b82f6) !important;
    border: none !important;
}

html[data-theme='light'] body .ui-datatable .eduquest-action-next.ui-button,
html[data-theme='dark'] body .ui-datatable .eduquest-action-next.ui-button,
body .ui-datatable .eduquest-action-next.ui-button {
    background: linear-gradient(135deg, #8b5cf6, #6366f1) !important;
    border: none !important;
}

html[data-theme='light'] body .ui-datatable .eduquest-action-delete.ui-button,
html[data-theme='dark'] body .ui-datatable .eduquest-action-delete.ui-button,
body .ui-datatable .eduquest-action-delete.ui-button {
    background: linear-gradient(135deg, #f97316, #ef4444) !important;
    border: none !important;
}

html[data-theme='light'] body .ui-datatable .eduquest-action-edit.ui-button i,
html[data-theme='light'] body .ui-datatable .eduquest-action-edit.ui-button span,
html[data-theme='light'] body .ui-datatable .eduquest-action-next.ui-button i,
html[data-theme='light'] body .ui-datatable .eduquest-action-next.ui-button span,
html[data-theme='light'] body .ui-datatable .eduquest-action-delete.ui-button i,
html[data-theme='light'] body .ui-datatable .eduquest-action-delete.ui-button span,
html[data-theme='dark'] body .ui-datatable .eduquest-action-edit.ui-button i,
html[data-theme='dark'] body .ui-datatable .eduquest-action-edit.ui-button span,
html[data-theme='dark'] body .ui-datatable .eduquest-action-next.ui-button i,
html[data-theme='dark'] body .ui-datatable .eduquest-action-next.ui-button span,
html[data-theme='dark'] body .ui-datatable .eduquest-action-delete.ui-button i,
html[data-theme='dark'] body .ui-datatable .eduquest-action-delete.ui-button span,
body .ui-datatable .eduquest-action-edit.ui-button i,
body .ui-datatable .eduquest-action-edit.ui-button span,
body .ui-datatable .eduquest-action-next.ui-button i,
body .ui-datatable .eduquest-action-next.ui-button span,
body .ui-datatable .eduquest-action-delete.ui-button i,
body .ui-datatable .eduquest-action-delete.ui-button span {
    color: #ffffff !important;
}
