/* =========================================================
   EMCoursePro Design System (Bootstrap-friendly)
   - Tokens (CSS variables)
   - Reusable component classes (.ec-*)
   - Tile system (Subject/Topic/Guidelines)
   - Question UI helpers
   ========================================================= */

/* -------------------------
   1) Design Tokens
   ------------------------- */
:root {
    /* Brand */
    --ec-primary: #2E3A8C;
    --ec-accent: #4F46E5;
    --ec-primary-deep: #1A245A;
    --ec-primary-soft: rgba(99, 102, 241, 0.14);
    --ec-success-soft: rgba(34, 197, 94, 0.14);
    --ec-warning-soft: rgba(245, 158, 11, 0.16);
    --ec-purple-soft: rgba(147, 51, 234, 0.15);
    --ec-cyan-soft: rgba(6, 182, 212, 0.15);
    /* Surfaces */
    --ec-bg: #F4F6FB;
    --ec-surface: #FFFFFF;
    --ec-surface-alt: #F8FAFC;
    /* Text */
    --ec-text: #111827;
    --ec-muted: #6B7280;
    /* Borders / shadow */
    --ec-border: #E5E7EB;
    --ec-shadow: 0 6px 18px rgba(0, 0, 0, 0.08);
    /* Radius */
    --ec-radius: 14px;
    /* Focus */
    --ec-focus: 0 0 0 0.25rem rgba(79, 70, 229, 0.25);
    /* Footer */
    --ec-footer-bg: #1A245A;
    --ec-footer-heading: #FFFFFF;
    --ec-footer-text: #DCE2F3;
    --ec-footer-accent: #8FA7FF;
    --ec-footer-border: rgba(143, 167, 255, 0.28);
    --ec-footer-link: #E5EAFE;
    --ec-footer-link-hover: #FFFFFF;
}

/* -------------------------
   2) Base page styles
   ------------------------- */
html {
    scroll-behavior: smooth;
}

body {
    background: var(--ec-bg);
    color: var(--ec-text);
}

.ec-admin-shell {
    display: flex;
    min-height: 100vh;
    background:
        radial-gradient(circle at top right, rgba(99, 102, 241, 0.12), transparent 28%),
        linear-gradient(180deg, #f8faff 0%, #f3f6fd 100%);
}

.ec-admin-sidebar {
    width: 288px;
    min-width: 288px;
    background:
        radial-gradient(circle at top, rgba(255, 255, 255, 0.18), transparent 26%),
        linear-gradient(180deg, #101a46 0%, #17245a 44%, #1f2f78 100%);
    color: #fff;
    padding: 1.5rem 1rem 1.25rem;
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
    position: sticky;
    top: 0;
    height: 100dvh;
    box-shadow: 18px 0 42px rgba(15, 23, 42, 0.2);
    border-right: 1px solid rgba(255, 255, 255, 0.08);
    overflow: hidden;
    transition: width 0.2s ease, min-width 0.2s ease, padding 0.2s ease;
}

.ec-admin-sidebar-header {
    position: relative;
    display: flex;
    align-items: center;
    min-height: 2.75rem;
    padding-right: 3.5rem;
}

.ec-admin-sidebar-toggle {
    position: absolute;
    top: 50%;
    right: 0;
    z-index: 1;
    transform: translateY(-50%);
    width: 2.75rem;
    height: 2.75rem;
    flex: 0 0 2.75rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 12px;
}

.ec-admin-sidebar-toggle:hover,
.ec-admin-sidebar-toggle:focus-visible {
    background: rgba(255, 255, 255, 0.16);
    outline: none;
    box-shadow: 0 0 0 0.2rem rgba(255, 255, 255, 0.2);
}

.ec-admin-brand {
    color: #fff;
    font-weight: 800;
    padding: 0.35rem 0.35rem 0.75rem;
    flex: 1 1 auto;
    min-width: 0;
}

.ec-admin-brand-logo-wrap {
    max-width: 100%;
}

.ec-admin-nav {
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    padding-right: 0.2rem;
}

.ec-admin-nav .nav-link {
    color: rgba(255, 255, 255, 0.9);
    border-radius: 16px;
    padding: 0.85rem 0.95rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.85rem;
    border: 1px solid transparent;
    transition: background-color 0.2s ease, color 0.2s ease, transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.ec-admin-nav .nav-link:hover,
.ec-admin-nav .nav-link:focus-visible {
    color: #fff;
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.14);
    transform: translateX(3px);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.ec-admin-nav .nav-link.active {
    color: #fff;
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.38), rgba(79, 70, 229, 0.62));
    border-color: rgba(255, 255, 255, 0.18);
    box-shadow: 0 14px 26px rgba(15, 23, 42, 0.22);
}

.ec-admin-nav-icon {
    width: 2.3rem;
    height: 2.3rem;
    border-radius: 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.1);
    color: inherit;
    flex: 0 0 auto;
    font-size: 0.95rem;
}

.ec-admin-nav .nav-link.active .ec-admin-nav-icon {
    background: rgba(255, 255, 255, 0.16);
}

.ec-admin-nav-label {
    min-width: 0;
    white-space: nowrap;
}

.ec-admin-user {
    margin-top: auto;
    padding-top: 1.15rem;
    border-top: 1px solid rgba(255, 255, 255, 0.18);
    flex-shrink: 0;
}

.ec-admin-user-card {
    display: flex;
    align-items: center;
    gap: 0.9rem;
    padding: 0.95rem 1rem;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.12);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

.ec-admin-user-avatar {
    width: 3rem;
    height: 3rem;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #818cf8, #c084fc);
    color: #fff;
    font-weight: 800;
    letter-spacing: 0.04em;
    box-shadow: 0 10px 24px rgba(76, 29, 149, 0.28);
}

.ec-admin-user-meta {
    min-width: 0;
}

.ec-admin-user-label {
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: rgba(255, 255, 255, 0.6);
}

.ec-admin-user-name {
    font-weight: 700;
    color: #fff;
    word-break: break-word;
    line-height: 1.2;
}

.ec-admin-user-role {
    font-size: 0.86rem;
    color: rgba(255, 255, 255, 0.72);
}

.ec-admin-user .ec-btn-outline {
    color: #fff;
    border-color: rgba(255, 255, 255, 0.4);
    background: rgba(255, 255, 255, 0.02);
    border-radius: 14px;
    padding-block: 0.75rem;
    font-weight: 700;
}

.ec-admin-logout {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.55rem;
}

@media (min-width: 1200px) {
    .ec-admin-sidebar-collapsed .ec-admin-sidebar {
        width: 84px;
        min-width: 84px;
        padding-inline: 0.65rem;
    }

    .ec-admin-sidebar-collapsed .ec-admin-sidebar-header {
        padding-right: 0;
    }

    .ec-admin-sidebar-collapsed .ec-admin-sidebar-toggle {
        left: 50%;
        right: auto;
        transform: translate(-50%, -50%);
    }

    .ec-admin-sidebar-collapsed .ec-admin-brand,
    .ec-admin-sidebar-collapsed .ec-admin-nav-label,
    .ec-admin-sidebar-collapsed .ec-admin-user-card,
    .ec-admin-sidebar-collapsed .ec-admin-logout-label {
        display: none;
    }

    .ec-admin-sidebar-collapsed .ec-admin-nav {
        padding-right: 0;
    }

    .ec-admin-sidebar-collapsed .ec-admin-nav .nav-link {
        justify-content: center;
        padding-inline: 0.55rem;
        position: relative;
    }

    .ec-admin-sidebar-collapsed .ec-admin-nav .nav-link:hover,
    .ec-admin-sidebar-collapsed .ec-admin-nav .nav-link:focus-visible {
        transform: none;
    }

    .ec-admin-sidebar-collapsed .ec-admin-user {
        padding-top: 0.75rem;
    }

    .ec-admin-sidebar-collapsed .ec-admin-user form {
        margin-top: 0 !important;
    }

    .ec-admin-sidebar-collapsed .ec-admin-logout {
        width: 100%;
        padding-inline: 0;
    }
}

.ec-admin-user .ec-btn-outline:hover,
.ec-admin-user .ec-btn-outline:focus-visible {
    color: var(--ec-primary);
    background: #fff;
    border-color: #fff;
}

.ec-admin-main {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
}

.ec-admin-content {
    flex: 1;
}

@media (max-width: 1199.98px) {
    .ec-admin-shell {
        flex-direction: column;
    }

    .ec-admin-sidebar {
        width: 100%;
        min-width: 0;
        height: auto;
        position: static;
        border-right: none;
        border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    }

    .ec-admin-nav {
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    }

    .ec-admin-user {
        margin-top: 0;
    }

    .ec-admin-sidebar-toggle {
        display: none;
    }

    .ec-admin-sidebar-header {
        padding-right: 0;
    }
}

.ec-admin-question-stem {
    cursor: help;
    border-radius: 4px;
}

.ec-admin-question-stem:focus-visible {
    outline: none;
    box-shadow: var(--ec-focus);
}

.ec-admin-stem-tooltip .tooltip-inner {
    max-width: min(550px, calc(100vw - 2rem));
    padding: 0.75rem 0.9rem;
    color: var(--ec-surface);
    background: var(--ec-text);
    text-align: left;
    white-space: normal;
    line-height: 1.45;
}

@media (max-width: 575.98px) {
    .ec-admin-sidebar {
        padding-inline: 0.85rem;
    }

    .ec-admin-nav {
        grid-template-columns: 1fr;
    }
}

.ec-dashboard-page {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.ec-admin-page {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.ec-admin-header {
    background:
        radial-gradient(circle at top right, rgba(79, 70, 229, 0.12), transparent 28%),
        linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(255, 255, 255, 0.9));
    border: 1px solid rgba(148, 163, 184, 0.16);
    border-radius: 28px;
    padding: 1.4rem 1.5rem;
    box-shadow: 0 18px 36px rgba(15, 23, 42, 0.06);
}

.ec-admin-kicker {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.42rem 0.78rem;
    border-radius: 999px;
    background: rgba(79, 70, 229, 0.08);
    color: var(--ec-accent);
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.03em;
    margin-bottom: 0.85rem;
}

.ec-admin-title {
    font-size: clamp(1.7rem, 2vw, 2.35rem);
    line-height: 1.05;
    font-weight: 800;
    letter-spacing: -0.03em;
    margin-bottom: 0.4rem;
}

.ec-admin-subtitle {
    color: var(--ec-muted);
    margin-bottom: 0;
    max-width: 820px;
}

.ec-admin-header-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 0.75rem;
}

.ec-admin-pill-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 0.85rem;
}

.ec-admin-pill {
    padding: 0.9rem 1rem;
    border-radius: 18px;
    background: rgba(248, 250, 252, 0.95);
    border: 1px solid rgba(148, 163, 184, 0.15);
}

.ec-admin-pill-label {
    font-size: 0.78rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--ec-muted);
    margin-bottom: 0.28rem;
}

.ec-admin-pill-value {
    font-size: 1.45rem;
    font-weight: 800;
    letter-spacing: -0.03em;
    color: var(--ec-text);
}

.ec-admin-surface {
    border: 1px solid rgba(148, 163, 184, 0.16);
    border-radius: 24px;
    background: rgba(255, 255, 255, 0.97);
    box-shadow: 0 18px 34px rgba(15, 23, 42, 0.06);
}

.ec-admin-surface-body {
    padding: 1.2rem;
}

.ec-admin-toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.ec-admin-toolbar-group {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    align-items: center;
}

.ec-admin-filter-form {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    align-items: center;
    width: 100%;
}

.ec-admin-filter-field {
    position: relative;
    min-width: min(100%, 240px);
    flex: 1 1 240px;
}

.ec-admin-filter-field--select {
    flex-basis: 220px;
}

.ec-admin-filter-field i {
    position: absolute;
    top: 50%;
    left: 0.95rem;
    transform: translateY(-50%);
    color: #94a3b8;
    pointer-events: none;
}

.ec-admin-filter-field .form-control,
.ec-admin-filter-field .form-select {
    min-height: 3rem;
    border-radius: 16px;
    border: 1px solid rgba(148, 163, 184, 0.24);
    background: #fff;
    box-shadow: none;
}

.ec-admin-filter-field .form-control {
    padding-left: 2.7rem;
}

.ec-admin-filter-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    align-items: center;
}

.ec-admin-btn-secondary {
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
    border-radius: 14px;
    padding: 0.85rem 1rem;
    background: rgba(255, 255, 255, 0.76);
    border: 1px solid rgba(148, 163, 184, 0.24);
    color: var(--ec-text);
    font-weight: 700;
    text-decoration: none;
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.ec-admin-btn-secondary:hover,
.ec-admin-btn-secondary:focus-visible {
    transform: translateY(-1px);
    box-shadow: 0 12px 24px rgba(15, 23, 42, 0.08);
    border-color: rgba(79, 70, 229, 0.28);
}

.ec-admin-btn-sm {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    border-radius: 12px;
    padding: 0.5rem 0.75rem;
    font-size: 0.82rem;
    font-weight: 700;
    text-decoration: none;
    border: 1px solid rgba(148, 163, 184, 0.22);
    background: #fff;
    color: var(--ec-text);
    transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease, background-color 0.18s ease;
}

.ec-admin-btn-sm:hover,
.ec-admin-btn-sm:focus-visible {
    transform: translateY(-1px);
    box-shadow: 0 10px 18px rgba(15, 23, 42, 0.06);
}

.ec-admin-btn-sm--primary {
    color: var(--ec-accent);
    border-color: rgba(99, 102, 241, 0.24);
    background: rgba(79, 70, 229, 0.05);
}

.ec-admin-btn-sm--neutral {
    color: #334155;
    background: rgba(148, 163, 184, 0.08);
}

.ec-admin-btn-sm--danger {
    color: #dc2626;
    border-color: rgba(239, 68, 68, 0.24);
    background: rgba(239, 68, 68, 0.05);
}

.ec-admin-btn-sm--warning {
    color: #d97706;
    border-color: rgba(245, 158, 11, 0.24);
    background: rgba(245, 158, 11, 0.08);
}

.ec-admin-btn-sm--success {
    color: #15803d;
    border-color: rgba(34, 197, 94, 0.24);
    background: rgba(34, 197, 94, 0.08);
}

.ec-admin-table-wrap {
    overflow: hidden;
}

.ec-admin-table {
    margin-bottom: 0;
}

.ec-admin-table thead th {
    background: rgba(248, 250, 252, 0.96);
    color: #475569;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    border-bottom: 1px solid rgba(148, 163, 184, 0.16);
    padding: 0.95rem 1rem;
    white-space: nowrap;
}

.ec-admin-table tbody td {
    padding: 1rem;
    vertical-align: middle;
    border-color: rgba(226, 232, 240, 0.85);
}

.ec-admin-table tbody tr:hover {
    background: rgba(79, 70, 229, 0.03);
}

.ec-admin-row-title {
    font-weight: 700;
    color: var(--ec-text);
}

.ec-admin-row-subtitle {
    display: block;
    margin-top: 0.18rem;
    color: var(--ec-muted);
    font-size: 0.82rem;
}

.ec-admin-user-cell {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    min-width: 0;
}

.ec-admin-user-avatar-sm {
    width: 2.7rem;
    height: 2.7rem;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    background: linear-gradient(135deg, #818cf8, #c084fc);
    color: #fff;
    font-size: 0.82rem;
    font-weight: 800;
    letter-spacing: 0.05em;
    box-shadow: 0 10px 20px rgba(76, 29, 149, 0.16);
}

.ec-admin-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 0.5rem;
}

.ec-admin-bulk-bar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 1rem 1.05rem;
    border: 1px solid rgba(148, 163, 184, 0.16);
    border-radius: 18px;
    background: rgba(248, 250, 252, 0.95);
}

.ec-admin-bulk-title {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: #334155;
    font-weight: 700;
}

.ec-admin-status {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
    padding: 0.4rem 0.72rem;
    border-radius: 999px;
    font-size: 0.76rem;
    font-weight: 700;
    border: 1px solid transparent;
}

.ec-admin-status--success {
    color: #15803d;
    background: rgba(34, 197, 94, 0.12);
    border-color: rgba(34, 197, 94, 0.18);
}

.ec-admin-status--neutral {
    color: #334155;
    background: rgba(148, 163, 184, 0.14);
    border-color: rgba(148, 163, 184, 0.18);
}

.ec-admin-status--danger {
    color: #b91c1c;
    background: rgba(239, 68, 68, 0.12);
    border-color: rgba(239, 68, 68, 0.18);
}

.ec-admin-status--warning {
    color: #b45309;
    background: rgba(245, 158, 11, 0.14);
    border-color: rgba(245, 158, 11, 0.18);
}

.ec-admin-status--primary {
    color: var(--ec-accent);
    background: rgba(79, 70, 229, 0.08);
    border-color: rgba(79, 70, 229, 0.16);
}

.ec-admin-alert {
    border-radius: 18px;
    border-width: 1px;
    box-shadow: 0 12px 24px rgba(15, 23, 42, 0.04);
}

.ec-admin-empty {
    padding: 2.25rem 1rem;
    text-align: center;
    color: var(--ec-muted);
}

.ec-admin-empty i {
    font-size: 1.4rem;
    color: var(--ec-accent);
    margin-bottom: 0.8rem;
}

.ec-admin-footer {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    padding: 1rem 1.2rem 1.2rem;
    color: var(--ec-muted);
    font-size: 0.86rem;
}

.ec-admin-pagination .pagination {
    gap: 0.35rem;
}

.ec-admin-pagination .page-link {
    border: 1px solid rgba(148, 163, 184, 0.2);
    border-radius: 12px;
    color: #334155;
    min-width: 2.35rem;
    height: 2.35rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-shadow: none;
}

.ec-admin-pagination .page-item.active .page-link {
    background: var(--ec-accent);
    border-color: var(--ec-accent);
    color: #fff;
}

.ec-admin-pagination .page-item.disabled .page-link {
    background: rgba(248, 250, 252, 0.92);
    color: #94a3b8;
}

.ec-admin-inline-link {
    color: var(--ec-accent);
    font-weight: 700;
    text-decoration: none;
}

.ec-admin-inline-link:hover,
.ec-admin-inline-link:focus-visible {
    color: #3730a3;
}

.ec-admin-mono {
    font-family: ui-monospace, SFMono-Regular, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
}

.ec-admin-question-stem {
    max-width: 420px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

@media (max-width: 991.98px) {
    .ec-admin-header-actions {
        justify-content: flex-start;
    }

    .ec-admin-footer {
        flex-direction: column;
        align-items: flex-start;
    }
}

@media (max-width: 575.98px) {
    .ec-admin-header,
    .ec-admin-surface-body {
        padding: 1rem;
    }

    .ec-admin-pill-grid {
        grid-template-columns: 1fr;
    }

    .ec-admin-filter-actions,
    .ec-admin-actions {
        width: 100%;
        justify-content: flex-start;
    }

    .ec-admin-btn-secondary,
    .ec-admin-filter-actions .btn,
    .ec-admin-filter-actions .ec-btn-primary {
        width: 100%;
        justify-content: center;
    }
}

.ec-dashboard-hero {
    background:
        radial-gradient(circle at top right, rgba(79, 70, 229, 0.14), transparent 26%),
        linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(255, 255, 255, 0.88));
    border: 1px solid rgba(148, 163, 184, 0.18);
    border-radius: 28px;
    padding: 1.5rem 1.6rem;
    box-shadow: 0 18px 36px rgba(15, 23, 42, 0.08);
}

.ec-dashboard-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.45rem 0.8rem;
    border-radius: 999px;
    background: rgba(79, 70, 229, 0.08);
    color: var(--ec-accent);
    font-size: 0.82rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    margin-bottom: 0.95rem;
}

.ec-dashboard-title {
    font-size: clamp(1.85rem, 2.2vw, 2.65rem);
    line-height: 1.05;
    font-weight: 800;
    letter-spacing: -0.03em;
    margin-bottom: 0.5rem;
}

.ec-dashboard-subtitle {
    margin-bottom: 0;
    color: var(--ec-muted);
    max-width: 780px;
    font-size: 1rem;
}

.ec-dashboard-chip-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.ec-dashboard-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
    padding: 0.75rem 0.95rem;
    border-radius: 16px;
    background: rgba(15, 23, 42, 0.03);
    border: 1px solid rgba(148, 163, 184, 0.18);
    color: var(--ec-text);
    font-weight: 600;
}

.ec-dashboard-chip i {
    color: var(--ec-accent);
}

.ec-dashboard-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 0.75rem;
}

.ec-dashboard-btn-secondary {
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
    border-radius: 14px;
    padding: 0.85rem 1rem;
    background: rgba(255, 255, 255, 0.7);
    border: 1px solid rgba(148, 163, 184, 0.24);
    color: var(--ec-text);
    font-weight: 700;
    text-decoration: none;
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.ec-dashboard-btn-secondary:hover,
.ec-dashboard-btn-secondary:focus-visible {
    transform: translateY(-1px);
    box-shadow: 0 12px 24px rgba(15, 23, 42, 0.08);
    border-color: rgba(79, 70, 229, 0.28);
}

.ec-kpi-card {
    position: relative;
    overflow: hidden;
    height: 100%;
    border: 1px solid rgba(148, 163, 184, 0.14);
    border-radius: 22px;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(248, 250, 252, 0.92));
    box-shadow: 0 18px 34px rgba(15, 23, 42, 0.06);
    padding: 1.2rem;
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease;
}

.ec-kpi-card::after {
    content: "";
    position: absolute;
    inset: auto -2.5rem -2.5rem auto;
    width: 7rem;
    height: 7rem;
    border-radius: 999px;
    background: rgba(99, 102, 241, 0.08);
}

.ec-kpi-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 22px 44px rgba(15, 23, 42, 0.1);
    border-color: rgba(99, 102, 241, 0.18);
}

.ec-kpi-icon {
    width: 3.25rem;
    height: 3.25rem;
    border-radius: 18px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.15rem;
    flex: 0 0 auto;
}

.ec-kpi-card--primary .ec-kpi-icon {
    background: var(--ec-primary-soft);
    color: var(--ec-accent);
}

.ec-kpi-card--success .ec-kpi-icon {
    background: var(--ec-success-soft);
    color: #16a34a;
}

.ec-kpi-card--warning .ec-kpi-icon {
    background: var(--ec-warning-soft);
    color: #f59e0b;
}

.ec-kpi-card--purple .ec-kpi-icon {
    background: var(--ec-purple-soft);
    color: #9333ea;
}

.ec-kpi-card--cyan .ec-kpi-icon {
    background: var(--ec-cyan-soft);
    color: #2563eb;
}

.ec-kpi-label {
    color: var(--ec-muted);
    font-size: 0.87rem;
    font-weight: 600;
    margin-bottom: 0.4rem;
}

.ec-kpi-value {
    font-size: clamp(1.7rem, 2vw, 2.35rem);
    line-height: 1;
    font-weight: 800;
    letter-spacing: -0.03em;
    margin-bottom: 0.5rem;
}

.ec-kpi-meta {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    color: var(--ec-muted);
    font-size: 0.87rem;
    font-weight: 600;
}

.ec-kpi-meta .is-positive {
    color: #16a34a;
}

.ec-kpi-meta .is-neutral {
    color: #475569;
}

.ec-dashboard-panel {
    height: 100%;
    border: 1px solid rgba(148, 163, 184, 0.16);
    border-radius: 24px;
    background: rgba(255, 255, 255, 0.96);
    box-shadow: 0 18px 34px rgba(15, 23, 42, 0.06);
}

.ec-dashboard-panel .card-body {
    padding: 1.25rem;
}

.ec-panel-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1rem;
}

.ec-panel-title {
    font-size: 1rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    margin-bottom: 0.2rem;
}

.ec-panel-subtitle {
    color: var(--ec-muted);
    font-size: 0.86rem;
    margin-bottom: 0;
}

.ec-panel-link {
    color: var(--ec-accent);
    text-decoration: none;
    font-weight: 700;
    white-space: nowrap;
}

.ec-panel-link:hover,
.ec-panel-link:focus-visible {
    color: #3730a3;
}

.ec-chart-shell {
    position: relative;
    min-height: 280px;
}

.ec-donut-shell {
    display: grid;
    gap: 1rem;
}

.ec-donut-wrap {
    position: relative;
    width: min(220px, 100%);
    margin-inline: auto;
}

.ec-donut-center {
    position: absolute;
    inset: 50% auto auto 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    pointer-events: none;
}

.ec-donut-center span {
    display: block;
    color: var(--ec-muted);
    font-size: 0.8rem;
    font-weight: 600;
}

.ec-donut-center strong {
    display: block;
    font-size: 1.6rem;
    line-height: 1.1;
    letter-spacing: -0.03em;
}

.ec-status-list {
    display: grid;
    gap: 0.75rem;
}

.ec-status-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.85rem 0.95rem;
    border-radius: 16px;
    background: var(--ec-surface-alt);
    border: 1px solid rgba(148, 163, 184, 0.14);
}

.ec-status-item strong {
    display: block;
    font-size: 0.95rem;
}

.ec-status-item span {
    color: var(--ec-muted);
    font-size: 0.82rem;
}

.ec-status-dot {
    width: 0.75rem;
    height: 0.75rem;
    border-radius: 999px;
    display: inline-block;
    margin-right: 0.5rem;
}

.ec-status-dot--published {
    background: #4f46e5;
}

.ec-status-dot--draft {
    background: #f59e0b;
}

.ec-activity-list {
    display: grid;
    gap: 0.8rem;
    max-height: 320px;
    overflow: auto;
    padding-right: 0.2rem;
}

.ec-activity-item {
    display: grid;
    grid-template-columns: auto 1fr auto;
    gap: 0.85rem;
    align-items: start;
    padding: 0.9rem 0.95rem;
    border-radius: 18px;
    background: var(--ec-surface-alt);
    border: 1px solid rgba(148, 163, 184, 0.12);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.ec-activity-item:hover {
    transform: translateY(-1px);
    box-shadow: 0 12px 24px rgba(15, 23, 42, 0.06);
}

.ec-activity-icon {
    width: 2.35rem;
    height: 2.35rem;
    border-radius: 14px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.95rem;
}

.ec-activity-icon--success {
    background: var(--ec-success-soft);
    color: #16a34a;
}

.ec-activity-icon--primary {
    background: var(--ec-primary-soft);
    color: var(--ec-accent);
}

.ec-activity-icon--warning {
    background: var(--ec-warning-soft);
    color: #f59e0b;
}

.ec-activity-icon--purple {
    background: var(--ec-purple-soft);
    color: #9333ea;
}

.ec-activity-title {
    font-size: 0.93rem;
    font-weight: 700;
    margin-bottom: 0.2rem;
}

.ec-activity-text {
    margin-bottom: 0;
    color: var(--ec-muted);
    font-size: 0.83rem;
}

.ec-activity-time {
    color: var(--ec-muted);
    font-size: 0.76rem;
    font-weight: 700;
    white-space: nowrap;
}

.ec-table-card {
    overflow: hidden;
}

.ec-dashboard-table {
    margin-bottom: 0;
}

.ec-dashboard-table thead th {
    background: rgba(248, 250, 252, 0.95);
    color: #475569;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    border-bottom: 1px solid rgba(148, 163, 184, 0.16);
    padding: 0.95rem 1rem;
}

.ec-dashboard-table tbody td {
    padding: 0.95rem 1rem;
    border-color: rgba(226, 232, 240, 0.85);
    vertical-align: middle;
}

.ec-dashboard-table tbody tr:hover {
    background: rgba(79, 70, 229, 0.03);
}

.ec-table-title {
    font-weight: 700;
}

.ec-table-secondary {
    display: block;
    font-size: 0.82rem;
    color: var(--ec-muted);
    margin-top: 0.15rem;
}

.ec-table-stem {
    max-width: 300px;
    color: #334155;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.ec-dashboard-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.38rem 0.7rem;
    border-radius: 999px;
    font-size: 0.76rem;
    font-weight: 700;
    border: 1px solid transparent;
}

.ec-dashboard-badge--success {
    background: rgba(34, 197, 94, 0.12);
    color: #15803d;
    border-color: rgba(34, 197, 94, 0.18);
}

.ec-dashboard-badge--neutral {
    background: rgba(148, 163, 184, 0.14);
    color: #334155;
    border-color: rgba(148, 163, 184, 0.18);
}

.ec-table-footer {
    padding: 0.85rem 1rem 1rem;
    color: var(--ec-muted);
    font-size: 0.82rem;
}

.ec-empty-state {
    padding: 2.2rem 1rem;
    text-align: center;
    color: var(--ec-muted);
}

.ec-empty-state i {
    font-size: 1.35rem;
    margin-bottom: 0.75rem;
    color: var(--ec-accent);
}

.ec-quick-actions-grid {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 0.85rem;
}

.ec-quick-action {
    display: flex;
    align-items: flex-start;
    gap: 0.8rem;
    padding: 1rem;
    border-radius: 18px;
    text-decoration: none;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(248, 250, 252, 0.94));
    border: 1px solid rgba(148, 163, 184, 0.16);
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.ec-quick-action:hover,
.ec-quick-action:focus-visible {
    transform: translateY(-3px);
    box-shadow: 0 16px 28px rgba(15, 23, 42, 0.08);
    border-color: rgba(79, 70, 229, 0.22);
}

.ec-quick-action-icon {
    width: 2.65rem;
    height: 2.65rem;
    border-radius: 14px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    font-size: 1rem;
}

.ec-quick-action--upload .ec-quick-action-icon {
    background: var(--ec-primary-soft);
    color: var(--ec-accent);
}

.ec-quick-action--guideline .ec-quick-action-icon {
    background: var(--ec-success-soft);
    color: #16a34a;
}

.ec-quick-action--category .ec-quick-action-icon {
    background: var(--ec-purple-soft);
    color: #9333ea;
}

.ec-quick-action--backup .ec-quick-action-icon {
    background: var(--ec-warning-soft);
    color: #f59e0b;
}

.ec-quick-action--audit .ec-quick-action-icon {
    background: rgba(37, 99, 235, 0.14);
    color: #2563eb;
}

.ec-quick-action--reports .ec-quick-action-icon {
    background: rgba(20, 184, 166, 0.14);
    color: #0f766e;
}

.ec-quick-action-title {
    display: block;
    font-weight: 700;
    font-size: 0.92rem;
    margin-bottom: 0.18rem;
}

.ec-quick-action-text {
    display: block;
    margin-bottom: 0;
    color: var(--ec-muted);
    font-size: 0.82rem;
}

@media (max-width: 1399.98px) {
    .ec-quick-actions-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 991.98px) {
    .ec-dashboard-hero {
        padding: 1.25rem;
    }

    .ec-dashboard-actions {
        justify-content: flex-start;
    }

    .ec-quick-actions-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 575.98px) {
    .ec-dashboard-chip-list,
    .ec-dashboard-actions,
    .ec-quick-actions-grid {
        grid-template-columns: 1fr;
    }

    .ec-quick-actions-grid {
        display: grid;
    }

    .ec-kpi-card,
    .ec-quick-action {
        padding: 0.95rem;
    }

    .ec-table-stem {
        max-width: 180px;
    }
}

/* Links */
a {
    color: inherit;
}

    a:hover {
        color: inherit;
    }

/* -------------------------
   3) Navbar
   ------------------------- */
.ec-navbar {
    background: var(--ec-primary);
}

    .ec-navbar .navbar-brand,
    .ec-navbar .nav-link {
        color: #fff;
    }

        .ec-navbar .nav-link:hover {
            color: rgba(255, 255, 255, 0.85);
        }

    .ec-navbar .btn-light {
        border-radius: 10px;
        font-weight: 600;
    }

/* -------------------------
   4) Typography helpers
   ------------------------- */
.ec-page-title {
    font-weight: 800;
    letter-spacing: -0.02em;
}

/* Muted helper */
.ec-muted {
    color: var(--ec-muted);
}

/* -------------------------
   5) Core card + containers
   ------------------------- */
.ec-card {
    background: var(--ec-surface);
    border: 1px solid var(--ec-border);
    border-radius: var(--ec-radius);
    box-shadow: var(--ec-shadow);
}

/* Table container */
.ec-table-wrap {
    background: var(--ec-surface);
    border: 1px solid var(--ec-border);
    border-radius: var(--ec-radius);
    box-shadow: var(--ec-shadow);
    padding: 12px;
}

/* -------------------------
   6) Buttons
   ------------------------- */
.ec-btn-primary {
    background: var(--ec-accent);
    border: 1px solid var(--ec-accent);
    color: #fff;
    border-radius: 10px;
    padding: 10px 16px;
    font-weight: 700;
}

/* Search inputs */
.ec-search-group {
    border-radius: 999px;
    background: #fff;
    border: 1px solid var(--ec-border);
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.08);
    padding: 4px;
}

    .ec-search-group:focus-within {
        border-color: rgba(79, 70, 229, 0.45);
        box-shadow: var(--ec-focus), 0 12px 24px rgba(15, 23, 42, 0.12);
    }

.ec-search-input {
    border: none;
    border-radius: 999px !important;
    padding-left: 14px;
    background: transparent;
}

    .ec-search-input:focus {
        border: none;
        box-shadow: none;
        background: transparent;
    }

.ec-search-clear-btn {
    border: none;
    background: transparent;
    color: var(--ec-muted);
}

    .ec-search-clear-btn:hover {
        color: var(--ec-text);
    }

.ec-search-submit-btn {
    border-radius: 999px;
    min-width: 44px;
    padding-inline: 14px;
}

    .ec-btn-primary:hover {
        filter: brightness(0.92);
        color: #fff;
    }

    .ec-btn-primary:focus {
        box-shadow: var(--ec-focus);
    }


.ec-guidelines-page {
    padding-bottom: 4rem;
}

.ec-grid-shell {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    gap: 14px;
    align-items: center;
    margin-bottom: 2rem;
}

.ec-grid-nav {
    display: flex;
    align-items: center;
    justify-content: center;
}

.ec-grid-nav-btn {
    width: 64px;
    height: 64px;
    border: 1px solid rgba(99, 102, 241, 0.24);
    border-radius: 999px;
    background: radial-gradient(circle at 25% 20%, rgba(255, 255, 255, 0.96), rgba(239, 244, 255, 0.88));
    color: #26314b;
    font-size: 1.5rem;
    font-weight: 800;
    line-height: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 14px 28px rgba(15, 23, 42, 0.14), 0 0 0 4px rgba(99, 102, 241, 0.08);
    backdrop-filter: blur(4px);
    transition: transform 0.22s ease, box-shadow 0.22s ease, opacity 0.22s ease, border-color 0.22s ease, color 0.22s ease;
}

.ec-grid-nav-btn:hover {
    transform: translateY(-3px) scale(1.04);
    box-shadow: 0 18px 36px rgba(15, 23, 42, 0.17), 0 0 0 6px rgba(245, 158, 11, 0.18);
    border-color: rgba(79, 70, 229, 0.4);
    color: #1d2b57;
}

.ec-grid-nav-btn:focus-visible {
    outline: none;
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.45), 0 12px 28px rgba(15, 23, 42, 0.18);
}

.ec-grid-nav-btn.is-disabled,
.ec-grid-nav-btn:disabled {
    opacity: 0.35;
    pointer-events: none;
    transform: none;
}

.ec-grid-page {
    min-height: 100%;
    min-width: 0;
    margin-left: 0;
    margin-right: 0;
}

.ec-guidelines-footer-spacer {
    min-height: 1.5rem;
}

.ec-grid-nav-icon {
    display: inline-block;
    transform: translateY(-1px);
}

.guideline-item.ec-slide-in {
    animation: ecGuidelineSlideIn 320ms cubic-bezier(.22, .61, .36, 1);
}

.guideline-item.ec-slide-in.ec-slide-next {
    --ec-slide-x: 34px;
}

.guideline-item.ec-slide-in.ec-slide-prev {
    --ec-slide-x: -34px;
}

@keyframes ecGuidelineSlideIn {
    from {
        opacity: 0;
        transform: translate3d(var(--ec-slide-x, 26px), 0, 0) scale(0.98);
    }

    to {
        opacity: 1;
        transform: translate3d(0, 0, 0) scale(1);
    }
}

.guidelines-page .ec-page-title {
    margin-bottom: 0;
}

.ec-guideline-grid {
    display: grid;
    grid-column: 2;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1.5rem;
    width: 100%;
}

.ec-guideline-grid .guideline-item {
    width: 100%;
    min-width: 0;
}

.ec-guideline-card {
    display: flex;
    flex-direction: column;
    width: 100%;
    min-width: 0;
    min-height: 285px;
    height: 100%;
    padding: 1.5rem;
    overflow: hidden;
    border-radius: 18px;
    box-shadow: 0 8px 24px color-mix(in srgb, var(--ec-primary) 10%, transparent);
}

.ec-guideline-card:hover {
    transform: translateY(-2px);
    border-color: color-mix(in srgb, var(--ec-accent) 48%, var(--ec-border));
    box-shadow: 0 14px 32px color-mix(in srgb, var(--ec-primary) 16%, transparent);
}

.ec-guideline-card-heading {
    min-width: 0;
}

.ec-guideline-card h5 {
    margin: 0;
    color: var(--ec-text);
    font-size: 1.45rem;
    line-height: 1.25;
    overflow-wrap: anywhere;
}

.ec-guideline-stat {
    display: inline-flex;
    align-items: center;
    margin-top: 1.25rem;
    color: var(--ec-muted);
    font-size: 0.92rem;
    font-weight: 700;
}

.ec-guideline-actions {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 0.75rem;
    margin-top: auto;
    padding-top: 1.5rem;
}

.ec-guideline-link {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.35rem;
    width: 100%;
    padding: 0.65rem 0.8rem;
    border: 1px solid var(--ec-border);
    border-radius: 10px;
    background: var(--ec-surface-alt);
    color: var(--ec-text);
    font-size: 0.88rem;
    font-weight: 700;
    text-decoration: none;
    transition: border-color 0.2s ease, color 0.2s ease, background-color 0.2s ease;
}

.ec-guideline-link-arrow {
    display: inline-block;
    transition: transform 0.2s ease;
}

.ec-guideline-link:hover,
.ec-guideline-link:focus-visible {
    border-color: color-mix(in srgb, var(--ec-accent) 55%, var(--ec-border));
    background: var(--ec-surface);
    color: var(--ec-primary);
}

.ec-guideline-link:hover .ec-guideline-link-arrow,
.ec-guideline-link:focus-visible .ec-guideline-link-arrow {
    transform: translateX(4px);
}

.ec-guideline-actions > .btn {
    display: flex;
    align-items: center;
    justify-content: center;
    align-self: flex-start;
    width: fit-content;
    min-width: 100px;
    min-height: 44px;
    padding-inline: 1.25rem;
    border: 1px solid var(--ec-primary);
    border-radius: 10px;
    background: var(--ec-primary);
    color: var(--ec-surface);
    font-weight: 800;
    box-shadow: 0 8px 18px color-mix(in srgb, var(--ec-primary) 18%, transparent);
}

.ec-guideline-actions > .btn:hover,
.ec-guideline-actions > .btn:focus-visible {
    border-color: var(--ec-accent);
    background: var(--ec-primary);
    color: var(--ec-surface);
    box-shadow: 0 11px 22px color-mix(in srgb, var(--ec-primary) 24%, transparent);
}

.ec-guideline-card-accent {
    width: 100%;
    height: 3px;
    margin-top: 1.25rem;
    border-radius: 999px;
    background: linear-gradient(90deg, var(--ec-accent), transparent);
    opacity: 0.55;
}

@media (max-width: 991.98px) {
    .ec-guideline-grid {
        grid-column: 1;
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 575.98px) {
    .ec-guideline-grid {
        grid-template-columns: minmax(0, 1fr);
        gap: 1rem;
    }

    .ec-guideline-card {
        min-height: 265px;
        padding: 1.25rem;
    }
}

@media (prefers-reduced-motion: reduce) {
    .ec-guideline-card,
    .ec-guideline-link,
    .ec-guideline-link-arrow {
        transition: none;
    }

    .ec-guideline-card:hover {
        transform: none;
    }
}

.ec-grid-aligned-search {
    margin-left: 0;
    margin-right: 0;
    padding-left: 70px;
    padding-right: 70px;
}

.ec-browse-toolbar {
    display: grid;
    grid-template-columns: minmax(320px, 560px) minmax(120px, 150px) minmax(130px, 160px);
    align-items: start;
    justify-content: start;
    gap: 1rem;
}

.ec-browse-control {
    min-width: 0;
}

.ec-browse-control label {
    display: block;
    margin: 0 0 0.3rem 0.2rem;
    color: var(--ec-muted);
    font-size: 0.78rem;
    font-weight: 700;
}

.ec-browse-toolbar .ec-search-group {
    height: 46px;
    padding: 3px;
}

.ec-browse-toolbar .ec-search-submit-btn {
    padding-top: 0;
    padding-bottom: 0;
    box-shadow: none;
}

.ec-browse-control .form-select {
    min-height: 46px;
    border-color: var(--ec-border);
    border-radius: 999px;
    background-color: var(--ec-surface);
    color: var(--ec-text);
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.08);
    font-weight: 600;
}

.ec-browse-control .form-select:focus {
    border-color: rgba(79, 70, 229, 0.45);
    box-shadow: var(--ec-focus), 0 12px 24px rgba(15, 23, 42, 0.12);
}

@media (max-width: 991.98px) {
    .ec-admin-shell {
        flex-direction: column;
    }

    .ec-admin-sidebar {
        width: 100%;
        min-width: 0;
        height: auto;
        position: static;
        box-shadow: none;
    }

    .ec-grid-aligned-search {
        margin-left: 0;
        margin-right: 0;
        padding-left: 0;
        padding-right: 0;
    }

    .ec-browse-toolbar {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .ec-browse-search-control {
        grid-column: 1 / -1;
    }

    .ec-grid-shell {
        grid-template-columns: 1fr;
        gap: 10px;
    }

    .ec-grid-nav {
        justify-content: flex-end;
    }

    .ec-grid-nav-left {
        order: 2;
    }

    .ec-grid-nav-right {
        order: 3;
    }

    .ec-grid-page {
        order: 1;
    }

    .ec-grid-nav-btn {
        width: 52px;
        height: 52px;
        font-size: 1.6rem;
    }
}

@media (max-width: 359.98px) {
    .ec-browse-toolbar {
        grid-template-columns: 1fr;
    }

    .ec-browse-search-control {
        grid-column: auto;
    }
}

@media (min-width: 992px) {
    .guidelines-page {
        padding-top: 1.25rem !important;
        padding-bottom: 1.25rem !important;
    }

    .ec-guidelines-page {
        padding-bottom: 4.5rem;
    }

    .guidelines-page .ec-grid-shell {
        align-items: stretch;
        margin-bottom: 2.5rem;
    }
}

/* -------------------------
   7) Interactive Tile System
   Supports:
   - .subject-card
   - .topic-card
   - .guideline-category-card
   - .guideline-card
   ------------------------- */
.subject-card,
.topic-card,
.guideline-category-card,
.guideline-card {
    background: var(--ec-surface);
    border: 1px solid var(--ec-border);
    border-radius: 16px;
    padding: 20px;
    cursor: pointer;
    /* smoother + premium feel */
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    transition: transform 0.25s cubic-bezier(.4,0,.2,1), box-shadow 0.25s ease, border-color 0.25s ease;
    will-change: transform;
}

    /* Hover lift */
    .subject-card:hover,
    .topic-card:hover,
    .guideline-category-card:hover,
    .guideline-card:hover {
        transform: translateY(-6px);
        box-shadow: 0 16px 35px rgba(0, 0, 0, 0.12);
        border-color: rgba(79, 70, 229, 0.35);
    }

    /* Press */
    .subject-card:active,
    .topic-card:active,
    .guideline-category-card:active,
    .guideline-card:active {
        transform: translateY(-2px);
    }

    /* Title styling */
    .subject-card h5,
    .topic-card h5,
    .guideline-category-card h5,
    .guideline-card h5 {
        font-weight: 800;
        transition: color 0.2s ease;
    }

    /* Title color shift on hover */
    .subject-card:hover h5,
    .topic-card:hover h5,
    .guideline-category-card:hover h5,
    .guideline-card:hover h5 {
        color: var(--ec-accent);
    }

    /* Smooth progress bars inside tiles */
    .topic-card .progress-bar,
    .guideline-card .progress-bar {
        transition: width 0.4s ease;
    }


.guideline-category-card {
    min-height: 100%;
}

.guideline-category-card-special {
    position: relative;
    overflow: hidden;
    border-color: color-mix(in srgb, #c99324 60%, var(--ec-border));
    background: linear-gradient(145deg, color-mix(in srgb, #f6d77a 9%, var(--ec-surface)), var(--ec-surface) 55%);
    box-shadow: 0 7px 20px rgba(151, 105, 17, 0.14);
}

.guideline-category-card-special:hover {
    border-color: #c99324;
    box-shadow: 0 17px 38px rgba(151, 105, 17, 0.22);
}

.ec-special-tile-badge {
    align-self: flex-start;
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    margin-bottom: 0.75rem;
    padding: 0.25rem 0.65rem;
    border: 1px solid rgba(151, 105, 17, 0.3);
    border-radius: 999px;
    background: linear-gradient(135deg, #fff7d6, #f5d06d);
    color: #68470d;
    font-size: 0.7rem;
    font-weight: 800;
    letter-spacing: 0.06em;
    line-height: 1.2;
    text-transform: uppercase;
}

.guideline-category-card .ec-tile-footer {
    margin-top: auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.guideline-category-card .ec-tile-footer-line {
    flex: 1;
    height: 4px;
    border-radius: 6px;
    background: linear-gradient(90deg, var(--ec-accent), transparent);
    opacity: 0.35;
}

.guideline-category-card .ec-tile-arrow {
    color: var(--ec-muted);
    font-size: 0.95rem;
    font-weight: 600;
    letter-spacing: 0.01em;
    opacity: 0.65;
    transform: translateX(0);
    transition: transform 0.2s ease, opacity 0.2s ease, color 0.2s ease;
    white-space: nowrap;
}

.guideline-category-card:hover .ec-tile-arrow,
a:focus-visible .guideline-category-card .ec-tile-arrow {
    opacity: 1;
    transform: translateX(4px);
    color: var(--ec-text);
}

/* Fade-in on load */
.subject-card,
.topic-card,
.guideline-category-card,
.guideline-card {
    animation: ecFadeIn 0.35s ease forwards;
}

@keyframes ecFadeIn {
    from {
        opacity: 0;
        transform: translateY(8px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Keyboard focus (accessible tiles) */
a:focus-visible .subject-card,
a:focus-visible .topic-card,
a:focus-visible .guideline-category-card,
a:focus-visible .guideline-card {
    outline: none;
    box-shadow: var(--ec-focus), 0 16px 35px rgba(0, 0, 0, 0.12);
    border-color: rgba(79, 70, 229, 0.45);
    transform: translateY(-4px);
}

/* -------------------------
   8) Question UI
   ------------------------- */
.ec-revision-shell {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 320px;
    gap: 1rem;
    min-height: 0;
    flex: 1;
    overflow: hidden;
}

.ec-revision-app {
    height: 100%;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    min-height: 0;
}

body:has(.ec-revision-app) {
    min-height: 100vh;
    overflow: auto;
}

body:has(.ec-revision-app) > .container {
    max-width: 1400px;
    height: calc(100vh - 72px);
    padding-top: 0.9rem;
    padding-bottom: 0.9rem;
}

body:has(.ec-revision-app) > .container > main {
    height: 100%;
    padding-bottom: 0 !important;
    display: flex;
    min-height: 0;
}

.ec-revision-main {
    flex: 1;
    min-width: 0;
    min-height: 0;
    display: flex;
}

.ec-revision-header {
    padding: 1.5rem;
    margin-bottom: 1.2rem;
    border-radius: 18px;
}

.ec-revision-header-top {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1rem;
    margin-bottom: 1rem;
}

.ec-revision-kicker {
    font-size: 0.88rem;
    font-weight: 700;
    color: #4f46e5;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    margin-bottom: 0.35rem;
}

.ec-revision-title {
    margin: 0;
    font-size: 1.7rem;
    line-height: 1.2;
    letter-spacing: -0.02em;
    font-weight: 800;
}

.ec-guideline-action {
    border: 1px solid rgba(79, 70, 229, 0.32);
    border-radius: 10px;
    padding: 0.55rem 0.8rem;
    font-weight: 600;
    font-size: 0.9rem;
    color: #3730a3;
    text-decoration: none;
    background: rgba(79, 70, 229, 0.06);
    transition: all .2s ease;
}

.ec-guideline-action:hover,
.ec-guideline-action:focus-visible {
    color: #1e1b4b;
    border-color: rgba(79, 70, 229, 0.45);
    background: rgba(79, 70, 229, 0.12);
}

.ec-progress-block {
    border: 1px solid var(--ec-border);
    border-radius: 12px;
    padding: 0.85rem 0.95rem;
    background: linear-gradient(180deg, rgba(248, 250, 255, 0.9), rgba(255, 255, 255, 0.95));
}

.ec-progress-meta {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin-bottom: 0.45rem;
}

.ec-progress-label {
    font-size: 0.82rem;
    color: var(--ec-muted);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-weight: 700;
}

.ec-progress-value {
    font-weight: 800;
    color: #1f2b6f;
}

.ec-progress-track {
    height: 12px;
    background: #dbe4ff;
    border-radius: 999px;
    overflow: hidden;
}

.ec-progress-fill {
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, #3452e8 0%, #4f46e5 55%, #6d5ef4 100%);
    box-shadow: 0 4px 14px rgba(79, 70, 229, 0.34);
}

.ec-question-card {
    padding: 1.1rem 1.1rem 0;
    border-radius: 18px;
    box-shadow: 0 16px 36px rgba(15, 23, 42, 0.09);
    min-height: 0;
    overflow: hidden;
}

.ec-answer-form {
    height: 100%;
    display: flex;
    flex-direction: column;
    min-height: 0;
}

.ec-question-scroll {
    overflow: auto;
    min-height: 0;
    padding: 0.55rem 0.55rem 1rem;
}

.ec-question-eyebrow {
    font-size: 0.8rem;
    color: var(--ec-muted);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-bottom: 0.55rem;
    font-weight: 700;
}

.ec-question-stem {
    font-size: clamp(1.18rem, 1.65vw, 1.5rem);
    line-height: 1.5;
    margin-bottom: 1.35rem;
    font-weight: 700;
}

.ec-image-thumb {
    max-height: 320px;
    width: auto;
    object-fit: contain;
    border: 1px solid var(--ec-border);
    border-radius: 12px;
    background: #fff;
}

.ec-option-list {
    border: 0;
    padding: 0;
    margin: 0;
    display: grid;
    gap: 0.78rem;
}

.ec-option {
    border: 1px solid #d6ddf2;
    border-radius: 14px;
    padding: 0.95rem 1rem;
    cursor: default;
    transition: transform .14s ease, box-shadow .2s ease, border-color .2s ease, background-color .2s ease;
    background: #fff;
    display: block;
}

.ec-option-select {
    display: grid;
    grid-template-columns: auto auto minmax(0, 1fr);
    gap: 0.75rem;
    align-items: center;
}

.ec-option-select label { cursor: pointer; }

.ec-option:hover {
    transform: translateY(-1px);
    border-color: rgba(79, 70, 229, 0.42);
    box-shadow: 0 10px 22px rgba(37, 56, 126, 0.11);
    background: #fbfcff;
}

.ec-option:has(.ec-option-input:focus-visible) {
    box-shadow: var(--ec-focus), 0 10px 20px rgba(15, 23, 42, 0.08);
}

.ec-option-input {
    margin: 0;
    width: 1.05rem;
    height: 1.05rem;
    accent-color: var(--ec-accent);
}

.ec-option-control {
    width: 0.62rem;
    height: 0.62rem;
    border-radius: 999px;
    background: #cdd6f5;
    transition: background-color .2s ease, transform .2s ease;
}

.ec-option-text {
    font-size: 1.03rem;
    color: #1f2b6f;
}

.ec-option:has(.ec-option-input:checked),
.ec-option-selected {
    border-color: rgba(79, 70, 229, 0.6);
    background: linear-gradient(135deg, rgba(79, 70, 229, 0.08), rgba(79, 70, 229, 0.02));
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.14);
}

.ec-option:has(.ec-option-input:checked) .ec-option-control,
.ec-option-selected .ec-option-control {
    background: #4f46e5;
    transform: scale(1.12);
}

.ec-revision-shell .ec-option.ec-option-correct {
    border-color: #16a34a;
    background: linear-gradient(135deg, rgba(22, 163, 74, 0.14), rgba(255, 255, 255, 0.92));
    box-shadow: 0 0 0 2px rgba(22, 163, 74, 0.18);
}

.ec-revision-shell .ec-option.ec-option-wrong {
    border-color: #dc2626;
    background: linear-gradient(135deg, rgba(220, 38, 38, 0.12), rgba(255, 255, 255, 0.94));
    box-shadow: 0 0 0 2px rgba(220, 38, 38, 0.12);
}

.ec-revision-shell .ec-option.ec-option-correct .ec-option-control {
    background: #16a34a;
}

.ec-revision-shell .ec-option.ec-option-wrong .ec-option-control {
    background: #dc2626;
}

.ec-answer-actions {
    margin-top: 0;
}

.ec-question-footer {
    border-top: 1px solid var(--ec-border);
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.84), rgba(255, 255, 255, 0.98));
    margin: 0 -1.1rem;
    padding: 0.95rem 1.1rem 1.1rem;
}

.ec-btn-primary.ec-btn-answer {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    padding: 12px 22px;
    font-size: 1.08rem;
    font-weight: 600;
    line-height: 1;
    letter-spacing: 0.01em;
    text-decoration: none;
    color: #fff;
    border: 1px solid #4658ee;
    background: linear-gradient(135deg, #5b6cff, #3f4de3);
    box-shadow: 0 6px 18px rgba(63, 77, 227, 0.35), inset 0 -1px 0 rgba(10, 15, 82, 0.18);
    transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

.ec-btn-primary.ec-btn-answer:hover,
.ec-btn-primary.ec-btn-answer:focus-visible {
    background: linear-gradient(135deg, #6c7cff, #4b59f0);
    transform: translateY(-1px);
    color: #fff;
    box-shadow: 0 10px 24px rgba(63, 77, 227, 0.42), inset 0 -1px 0 rgba(10, 15, 82, 0.16);
}

.ec-btn-primary.ec-btn-answer:active {
    transform: translateY(0);
    box-shadow: 0 5px 14px rgba(63, 77, 227, 0.32), inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.ec-btn-primary.ec-btn-answer:focus-visible {
    outline: none;
    box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.95), 0 0 0 6px rgba(79, 70, 229, 0.42), 0 10px 24px rgba(63, 77, 227, 0.42);
}

.ec-revision-sidebar {
    display: grid;
    gap: 1rem;
    min-height: 0;
    overflow: auto;
}

.ec-sidebar-panel {
    padding: 1rem;
    border-radius: 18px;
    border: 1px solid #dde4f5;
    background: linear-gradient(180deg, #ffffff, #f9fbff);
    box-shadow: 0 12px 28px rgba(25, 45, 98, 0.08);
    display: flex;
    flex-direction: column;
    gap: 0.95rem;
}

.ec-sidebar-section {
    display: grid;
    gap: 0.75rem;
}

.ec-sidebar-title {
    margin: 0;
    font-size: 0.82rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-weight: 800;
    color: #44527a;
}

.ec-sidebar-divider {
    height: 1px;
    background: linear-gradient(90deg, rgba(191, 203, 234, 0.35), rgba(191, 203, 234, 0.85), rgba(191, 203, 234, 0.35));
}

.ec-sidebar-card {
    padding: 1.2rem;
    border-radius: 16px;
}

.ec-sidebar-card h3 {
    font-size: 1.2rem;
    margin: 0 0 0.8rem;
    font-weight: 800;
    color: #1f2b6f;
}

.ec-stat-list {
    margin: 0;
}

.ec-stat-list--enhanced {
    border: 1px solid #e5ebfa;
    border-radius: 14px;
    background: #fff;
    overflow: hidden;
}

.ec-stat-list > div {
    display: flex;
    justify-content: space-between;
    padding: 0.5rem 0;
    border-top: 1px solid #e6ebf8;
}

.ec-stat-list > div:first-child {
    border-top: 0;
    padding-top: 0;
}

.ec-stat-list dt {
    margin: 0;
    color: #455273;
    font-weight: 500;
}

.ec-stat-list dd {
    margin: 0;
    font-size: 1.2rem;
    font-weight: 800;
    color: #1f2b6f;
}

.ec-stat-list--enhanced > div {
    padding: 0.68rem 0.85rem;
    border-top: 1px solid #edf1fb;
    align-items: center;
}

.ec-stat-list--enhanced > div:first-child {
    border-top: 0;
}

.ec-stat-list--enhanced dt {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    font-weight: 600;
    color: #3f4e72;
}

.ec-stat-list--enhanced dd {
    font-size: 1.35rem;
    line-height: 1;
    letter-spacing: 0.01em;
}

.ec-stat-icon {
    width: 1.35rem;
    height: 1.35rem;
    border-radius: 50%;
    display: inline-grid;
    place-items: center;
    font-size: 0.78rem;
    font-weight: 800;
    color: #334675;
    background: #eef2fb;
}

.ec-mini-progress {
    display: grid;
    gap: 0.38rem;
    padding: 0.1rem 0.1rem 0;
}

.ec-mini-progress-meta {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    font-size: 0.82rem;
    color: #61729a;
}

.ec-mini-progress-meta strong {
    font-size: 0.95rem;
    font-weight: 800;
    color: #22346b;
}

.ec-mini-progress-track {
    height: 8px;
    border-radius: 999px;
    background: #e9eefc;
    overflow: hidden;
}

.ec-mini-progress-fill {
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, #5f6dff, #4ac19b);
    box-shadow: inset 0 -1px 0 rgba(15, 23, 42, 0.18);
}

.ec-answer-result {
    margin-top: 0.25rem;
    border-radius: 10px;
    padding: 0.5rem 0.68rem;
    font-size: 0.85rem;
    font-weight: 700;
    letter-spacing: 0.02em;
}

.ec-answer-result.is-correct {
    background: rgba(22, 163, 74, 0.12);
    color: #166534;
}

.ec-answer-result.is-incorrect {
    background: rgba(220, 38, 38, 0.1);
    color: #991b1b;
}

.ec-reset-link {
    margin-top: 0.95rem;
    border: 0;
    background: transparent;
    color: #61739a;
    font-size: 0.9rem;
    text-decoration: underline;
    text-underline-offset: 3px;
    padding: 0;
}

.ec-reset-link:hover,
.ec-reset-link:focus-visible {
    color: #334d84;
}

.ec-question-nav-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(46px, 1fr));
    gap: 0.5rem;
}

.ec-nav-chip {
    height: 44px;
    border-radius: 12px;
    display: grid;
    place-items: center;
    border: 1px solid #d5ddf2;
    font-weight: 700;
    color: #4e5f87;
    background: #fff;
    transition: transform 0.16s ease, border-color 0.16s ease, box-shadow 0.16s ease;
}

.ec-nav-chip.is-answered {
    border-color: rgba(22, 163, 74, 0.22);
    background: rgba(22, 163, 74, 0.12);
    color: #166534;
}

.ec-nav-chip.is-current {
    border-color: #4f46e5;
    background: #eef0ff;
    color: #2f3eb5;
    box-shadow: 0 0 0 2px rgba(79, 70, 229, 0.18);
}

.ec-nav-chip.is-unanswered {
    opacity: 0.88;
}

.ec-review-banner {
    margin-top: 1rem;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.9rem 1rem;
    border: 1px solid #cdd6ff;
    background: linear-gradient(180deg, #f7f8ff, #ffffff);
}

.ec-nav-chip {
    text-decoration: none;
}

.ec-nav-chip.is-answered-incorrect {
    border-color: rgba(220, 38, 38, 0.28);
    background: rgba(220, 38, 38, 0.12);
    color: #991b1b;
}

.ec-nav-chip.is-locked {
    cursor: not-allowed;
    opacity: 0.65;
}

.ec-nav-chip:hover,
.ec-nav-chip:focus-visible {
    text-decoration: none;
    transform: translateY(-1px);
    border-color: #b7c4e6;
    box-shadow: 0 6px 14px rgba(42, 63, 127, 0.14);
}

.ec-btn-reset {
    margin-top: 0.2rem;
    width: 100%;
    min-height: 42px;
    border-radius: 12px;
    border: 1px solid rgba(220, 38, 38, 0.45);
    background: rgba(255, 255, 255, 0.8);
    color: #9f1f1f;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.45rem;
    text-decoration: none;
    font-size: 0.94rem;
    font-weight: 700;
    transition: background 0.16s ease, color 0.16s ease, border-color 0.16s ease;
}

.ec-btn-reset:hover,
.ec-btn-reset:focus-visible {
    background: rgba(220, 38, 38, 0.08);
    color: #8c1919;
    border-color: rgba(220, 38, 38, 0.62);
    text-decoration: none;
}

.ec-explain {
    margin-top: 1.15rem;
    padding: 0.95rem 1rem;
    border-radius: 14px;
    background: linear-gradient(180deg, #fcfdff, #f8faff);
}

@media (max-width: 991.98px) {
    body:has(.ec-revision-app) {
        height: auto;
        overflow: auto;
    }

    body:has(.ec-revision-app) > .container {
        height: auto;
    }

    body:has(.ec-revision-app) > .container > main {
        height: auto;
    }

    body:has(.ec-revision-app) .ec-site-footer {
        display: block;
    }

    .ec-revision-app {
        height: auto;
    }

    .ec-revision-shell {
        grid-template-columns: 1fr;
        overflow: visible;
    }

    .ec-revision-sidebar {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        overflow: visible;
    }
}

@media (max-width: 767.98px) {
    .ec-revision-header,
    .ec-question-card,
    .ec-sidebar-card {
        padding: 1rem;
    }

    .ec-revision-header-top {
        flex-direction: column;
    }

    .ec-revision-sidebar {
        grid-template-columns: 1fr;
    }

    .ec-btn-primary.ec-btn-answer {
        width: 100%;
    }
}


/* -------------------------
   9) Badges
   ------------------------- */
.ec-badge {
    display: inline-block;
    padding: 6px 10px;
    border-radius: 999px;
    font-weight: 700;
    font-size: 0.85rem;
}

.ec-badge-ok {
    background: rgba(22,163,74,0.12);
    color: #166534;
}

.ec-badge-bad {
    background: rgba(220,38,38,0.12);
    color: #7f1d1d;
}

/* =========================================================
   Dashboard Quick Actions (G6.5)
   ========================================================= */
.ec-action-card {
    border-radius: 16px;
    border: 1px solid var(--ec-border);
    transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease;
    cursor: pointer;
}

    .ec-action-card:hover {
        transform: translateY(-4px);
        box-shadow: 0 14px 30px rgba(0, 0, 0, 0.10);
        border-color: rgba(79, 70, 229, 0.25);
    }

.ec-action-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 8px 12px;
    border-radius: 999px;
    font-weight: 700;
    font-size: 0.85rem;
    background: rgba(79, 70, 229, 0.12);
    color: var(--ec-accent);
    border: 1px solid rgba(79, 70, 229, 0.18);
}

.ec-action-pill--disabled {
    background: rgba(107, 114, 128, 0.10);
    color: #6B7280;
    border-color: rgba(107, 114, 128, 0.18);
}

/* Optional: visually disable placeholder links */
a[aria-disabled="true"] {
    pointer-events: none;
    opacity: 0.75;
}

/* =========================================================
   Dashboard Clickable Table Rows (UX polish)
   ========================================================= */

.ec-click-row {
    transition: background 0.18s ease, transform 0.12s ease;
}

    .ec-click-row:hover {
        background: rgba(79, 70, 229, 0.05);
    }

    .ec-click-row:active {
        transform: translateY(1px);
    }

    /* Keyboard accessibility */
    .ec-click-row:focus-visible {
        outline: none;
        box-shadow: var(--ec-focus);
        background: rgba(79, 70, 229, 0.06);
    }


/* =========================================================
   Proper Disabled Action Cards (Timed / Mock)
   ========================================================= */

.ec-action-card[aria-disabled="true"] {
    pointer-events: none;
    opacity: 0.6;
    cursor: not-allowed;
    transform: none !important;
    box-shadow: none !important;
}

    /* Prevent hover animation on disabled */
    .ec-action-card[aria-disabled="true"]:hover {
        transform: none;
        box-shadow: none;
        border-color: var(--ec-border);
    }

/* -------------------------
   Landing page refresh
   ------------------------- */
.ec-nav {
    background: #1f2f7a;
    box-shadow: 0 8px 22px rgba(18, 30, 82, 0.22);
}

.ec-brand {
    color: #fff;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    gap: 0.65rem;
    padding-top: 0;
    padding-bottom: 0;
    line-height: 1;
}

.ec-brand-logo-wrap {
    display: flex;
    align-items: center;
    width: 230px;
    height: 70px;
    flex: 0 0 auto;
}

.ec-site-logo {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: left center;
    flex-shrink: 0;
    filter: drop-shadow(0 6px 12px rgba(0, 0, 0, 0.18));
}

.ec-admin-brand {
    padding-inline: 0;
}

.ec-admin-brand-logo-wrap {
    width: 230px;
    height: 70px;
}

.ec-logo-preview-box {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 188px;
}

.ec-logo-preview {
    display: block;
    width: 100%;
    height: 140px;
    object-fit: contain;
    object-position: center;
}

.ec-logo-square {
    width: 18px;
    height: 18px;
    border-radius: 4px;
    background: linear-gradient(135deg, #4de2d7, #4b7cff);
    box-shadow: 0 3px 10px rgba(18, 30, 82, 0.35);
}

.ec-nav .nav-link {
    color: rgba(255, 255, 255, 0.92);
    font-weight: 500;
}

@media (max-width: 991.98px) {
    .ec-brand-logo-wrap {
        width: 200px;
        height: 60px;
    }

    .ec-admin-brand-logo-wrap {
        width: 200px;
        height: 60px;
    }
}

@media (max-width: 575.98px) {
    .ec-brand-logo-wrap,
    .ec-admin-brand-logo-wrap {
        width: 165px;
        height: 50px;
    }
}


.ec-main-links {
    gap: 0.2rem 0.35rem;
}

.ec-main-links .nav-link {
    padding: 0.45rem 0.7rem;
    border-radius: 10px;
    white-space: nowrap;
}

.ec-main-links .nav-link.active {
    color: #fff;
    background: rgba(255, 255, 255, 0.14);
}

.ec-main-links .dropdown-menu {
    margin-top: 0.35rem;
}

.ec-nav .nav-link:hover,
.ec-nav .nav-link:focus-visible,
.ec-brand:hover,
.ec-brand:focus-visible {
    color: #fff;
}

.ec-nav .nav-link:focus-visible,
.ec-btn-primary:focus-visible,
.ec-btn-outline:focus-visible,
.ec-nav-toggler:focus-visible {
    outline: 2px solid #ffd772;
    outline-offset: 2px;
    box-shadow: none;
}

.ec-nav-toggler {
    border-color: rgba(255, 255, 255, 0.45);
    color: var(--ec-primary-foreground, #fff);
}

.ec-nav-toggler .navbar-toggler-icon {
    /* Keep Bootstrap's icon box/button size; draw theme-aware bars inside it. */
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background-image: none;
}

.ec-btn-primary {
    background: #f4be4f;
    border-color: #f4be4f;
    color: #1f2f7a;
    font-weight: 700;
}

.ec-btn-primary:hover {
    background: #ebaf33;
    border-color: #ebaf33;
    color: #162465;
}

.ec-btn-outline {
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.75);
    color: #fff;
    font-weight: 600;
    border-radius: 12px;
    padding: 0.55rem 1rem;
}

.ec-btn-outline:hover {
    background: rgba(255, 255, 255, 0.12);
    color: #fff;
}

.ec-hero {
    background: radial-gradient(circle at 15% 20%, rgba(153, 196, 255, 0.45), transparent 38%), radial-gradient(circle at 85% 70%, rgba(181, 210, 255, 0.45), transparent 42%), linear-gradient(160deg, #f5f9ff 0%, #edf3ff 55%, #f8fbff 100%);
}

.py-lg-6 {
    padding-top: 5.5rem !important;
    padding-bottom: 5.5rem !important;
}

.ec-section {
    padding-top: 4.5rem;
    padding-bottom: 4.5rem;
}

.ec-shadow-soft {
    box-shadow: 0 16px 40px rgba(31, 47, 122, 0.12);
}

.ec-card {
    border-radius: 18px;
    border: 1px solid #eaf0fd;
}

.ec-hero-shot {
    background: #fff;
}

.ec-dashboard-placeholder {
    min-height: 310px;
    background: linear-gradient(180deg, #f7fbff 0%, #e9f1ff 100%);
    padding: 1.2rem;
}

.ec-ph-row {
    height: 14px;
    width: 65%;
    border-radius: 99px;
    background: #c8dafd;
    margin-bottom: 1rem;
}

.ec-ph-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0.6rem;
    margin-bottom: 1rem;
}

.ec-ph-grid span {
    display: block;
    height: 70px;
    border-radius: 10px;
    background: #dce8ff;
}

.ec-ph-bars {
    display: flex;
    align-items: flex-end;
    gap: 0.5rem;
    height: 130px;
}

.ec-ph-bars span {
    flex: 1;
    border-radius: 8px 8px 0 0;
    background: linear-gradient(180deg, #65c6ff, #4b7cff);
}

.ec-ph-bars span:nth-child(1) {
    height: 40%;
}

.ec-ph-bars span:nth-child(2) {
    height: 72%;
}

.ec-ph-bars span:nth-child(3) {
    height: 58%;
}

.ec-ph-bars span:nth-child(4) {
    height: 85%;
}

.ec-ph-bars span:nth-child(5) {
    height: 65%;
}

.ec-ph-bars span:nth-child(6) {
    height: 94%;
}

.ec-mini-widget {
    position: absolute;
    left: -1rem;
    bottom: 1.2rem;
    background: #fff;
    border: 1px solid #dfe9ff;
    border-radius: 14px;
    padding: 0.75rem;
    width: 168px;
}

.ec-mini-bar {
    width: 14px;
    height: 24px;
    background: #8fb4ff;
    border-radius: 5px 5px 0 0;
}

.ec-mini-bar.tall {
    height: 36px;
}

.ec-mini-bar.taller {
    height: 46px;
}

.ec-feature-card .ec-icon-circle {
    width: 68px;
    height: 68px;
    margin: 0 auto;
    border-radius: 50%;
    display: grid;
    place-items: center;
    font-size: 1.8rem;
    background: linear-gradient(160deg, #f5f9ff, #deebff);
}

.ec-step-number {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    background: #e0ecff;
    color: #1f2f7a;
    font-weight: 700;
    margin: 0 auto 0.75rem;
}

.ec-step-col:not(:last-child)::after {
    content: "➜";
    position: absolute;
    right: -12px;
    top: 28%;
    color: #b7c7ef;
    font-size: 1.5rem;
    display: none;
}

.ec-check-list li {
    margin-bottom: 0.75rem;
    padding-left: 1.75rem;
    position: relative;
}

.ec-check-list li::before {
    content: "✓";
    position: absolute;
    left: 0;
    top: 0;
    color: #19a676;
    font-weight: 800;
}

.ec-doctor-wrap img,
.ec-doctor-placeholder {
    max-height: 240px;
}

.ec-doctor-placeholder {
    width: 100%;
    border-radius: 16px;
    background: linear-gradient(140deg, #eef4ff, #dce9ff);
    border: 1px dashed #b9cbf6;
    color: #4a5da9;
    font-weight: 600;
}

.ec-cta-band {
    background: #1f2f7a;
}

.ec-site-footer {
    background: var(--ec-footer-bg);
    color: var(--ec-footer-text);
    border-top: 1px solid var(--ec-footer-border);
    margin-top: 0;
    white-space: normal;
}

.ec-site-footer a {
    color: var(--ec-footer-link);
    text-decoration: none;
}

.ec-footer-inner {
    padding-block: clamp(2.75rem, 5vw, 4.5rem) 1.5rem;
}

.ec-footer-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.4fr) repeat(4, minmax(0, 1fr));
    gap: clamp(1.5rem, 3vw, 3.5rem);
    align-items: start;
}

.ec-footer-brand,
.ec-footer-feature {
    min-width: 0;
}

.ec-footer-logo-link {
    display: inline-flex;
    align-items: center;
    max-width: 100%;
    margin-bottom: 1rem;
    border-radius: 0.35rem;
}

.ec-footer-logo {
    display: block;
    width: auto;
    max-width: min(100%, 150px);
    height: 46px;
    object-fit: contain;
    object-position: left center;
}

.ec-footer-brand-name,
.ec-footer-feature h2 {
    color: var(--ec-footer-heading);
    font-size: 1rem;
    font-weight: 700;
    line-height: 1.3;
    margin: 0 0 0.7rem;
}

.ec-footer-brand-name {
    letter-spacing: 0.08em;
}

.ec-footer-brand p,
.ec-footer-feature p {
    color: var(--ec-footer-text);
    font-size: 0.9rem;
    line-height: 1.65;
    margin: 0;
}

.ec-footer-icon {
    color: var(--ec-footer-accent);
    font-size: 1.55rem;
    margin-bottom: 1rem;
}

.ec-footer-legal {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1.25rem 2rem;
    margin-top: clamp(2rem, 4vw, 3.5rem);
    padding-top: 1.4rem;
    border-top: 1px solid var(--ec-footer-border);
    color: var(--ec-footer-text);
    font-size: 0.84rem;
}

.ec-footer-legal-links {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 0.75rem 1.5rem;
}

.ec-site-footer a:hover {
    color: var(--ec-footer-link-hover);
    text-decoration: underline;
    text-underline-offset: 0.2em;
}

.ec-site-footer a:focus-visible {
    color: var(--ec-footer-link-hover);
    outline: 2px solid var(--ec-footer-accent);
    outline-offset: 4px;
}

@media (max-width: 991.98px) {
    .ec-footer-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .ec-footer-brand {
        grid-column: 1 / -1;
    }
}

@media (max-width: 575.98px) {
    .ec-footer-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .ec-footer-brand {
        grid-column: auto;
    }

    .ec-footer-legal {
        align-items: flex-start;
        flex-direction: column;
    }

    .ec-footer-legal-links {
        flex-direction: column;
        justify-content: flex-start;
    }
}

.ec-pricing-card {
    position: relative;
    max-width: 360px;
    border-radius: 16px;
    box-shadow: 0 14px 36px rgba(31, 47, 122, 0.10);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.ec-pricing-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 18px 44px rgba(31, 47, 122, 0.14);
}

.ec-pricing-card-body {
    min-height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 1.75rem;
}

.ec-pricing-badge {
    position: absolute;
    top: 1rem;
    right: 1rem;
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    padding: 0.35rem 0.75rem;
    background: #e7efff;
    color: #1f2f7a;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.01em;
}

.ec-pricing-title {
    margin-bottom: 1rem;
    padding-right: 6.5rem;
    font-size: 1.2rem;
    font-weight: 600;
    line-height: 1.35;
}

.ec-pricing-price-wrap {
    margin-bottom: 1.5rem;
}

.ec-pricing-price {
    font-size: clamp(2.25rem, 5vw, 2.625rem);
    font-weight: 700;
    line-height: 1;
    letter-spacing: -0.03em;
    color: var(--ec-text);
}

.ec-pricing-billing {
    margin-top: 0.55rem;
    font-size: 0.95rem;
    color: var(--ec-muted);
}

.ec-pricing-features {
    margin-bottom: 1.75rem !important;
}

.ec-pricing-features li {
    margin-bottom: 0.7rem;
    padding-left: 1.9rem;
    color: var(--ec-muted);
}

.ec-pricing-features li:last-child {
    margin-bottom: 0;
}

.ec-pricing-features li::before {
    top: 0.05rem;
}

.ec-pricing-cta-home {
    min-height: 50px;
    border-radius: 10px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
}

.ec-pricing-helper {
    margin-top: 0.85rem;
    font-size: 0.85rem;
    color: var(--ec-muted);
}

.plan-card {
    position: relative;
    border-radius: 18px;
    padding: 24px;
    background: linear-gradient(135deg, #ffffff, #f3f4f6);
    border: 1px solid #e5e7eb;
    transition: all 0.25s ease;
    overflow: hidden;
}

.plan-card::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 6px;
    height: 100%;
    background: linear-gradient(180deg, #2563eb, #06b6d4);
}

.plan-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.1);
}

.active-plan {
    border: 2px solid #2563eb;
    box-shadow: 0 0 25px rgba(37, 99, 235, 0.25);
}

.active-badge {
    position: absolute;
    top: 12px;
    right: 12px;
    background: #10b981;
    color: white;
    padding: 5px 12px;
    font-size: 12px;
    border-radius: 999px;
    font-weight: 600;
    letter-spacing: 0.02em;
}

.plan-price {
    font-size: 34px;
    font-weight: 800;
    color: #111827;
    margin-bottom: 0;
}

.plan-feature-list li {
    margin-bottom: 0.65rem;
    color: var(--ec-muted);
}

.plan-feature-list li:last-child {
    margin-bottom: 0;
}

.plan-card .btn-primary {
    background: linear-gradient(135deg, #2563eb, #06b6d4);
    border: none;
}

@media (min-width: 992px) {
    .ec-step-number {
        margin: 0 0 0.75rem;
    }

    .ec-step-col:not(:last-child)::after {
        display: block;
    }
}

@media (max-width: 991.98px) {
    .ec-mini-widget {
        position: static;
        margin-top: 1rem;
        width: 100%;
    }

    .ec-btn-outline {
        border-color: rgba(255, 255, 255, 0.6);
    }
}

/* Context-specific outline button colors */
.ec-nav .ec-btn-outline {
    border-color: rgba(255, 255, 255, 0.75);
    color: #fff;
}

.ec-nav .ec-btn-outline:hover {
    background: rgba(255, 255, 255, 0.12);
    color: #fff;
}

.ec-hero .ec-btn-outline {
    border-color: #b9c8ea;
    color: #1f2f7a;
    background: #fff;
}

.ec-hero .ec-btn-outline:hover {
    border-color: #9bb1df;
    background: #f3f7ff;
    color: #1f2f7a;
}

/* Landing conversion polish updates */
#questionbank,
#guidelinebased,
#pricing {
    scroll-margin-top: 90px;
}

.ec-btn-primary,
.ec-btn-amber {
    background: #f4be4f;
    border-color: #f4be4f;
    color: #1f2f7a;
    font-weight: 700;
    border-radius: 12px;
    padding: 0.7rem 1.35rem;
    box-shadow: 0 10px 20px rgba(244, 190, 79, 0.32);
    transition: transform 0.18s ease, box-shadow 0.18s ease, background-color 0.18s ease;
}

.ec-btn-primary:hover,
.ec-btn-primary:focus,
.ec-btn-amber:hover,
.ec-btn-amber:focus {
    background: #ebaf33;
    border-color: #ebaf33;
    color: #162465;
    transform: translateY(-1px);
    box-shadow: 0 14px 24px rgba(235, 175, 51, 0.34);
}

.ec-btn-primary:focus-visible,
.ec-btn-amber:focus-visible {
    outline: 2px solid #ffd772;
    outline-offset: 2px;
}

.ec-hero-visual {
    background: #fff;
    border: 1px solid #e2ebff;
    border-radius: 24px;
    box-shadow: 0 24px 55px rgba(31, 47, 122, 0.18);
    padding: 1rem;
    min-height: 340px;
}

.ec-hero-visual-image {
    width: 100%;
    border-radius: 18px;
    min-height: 308px;
    object-fit: cover;
    background: linear-gradient(180deg, #f7fbff 0%, #edf3ff 100%);
}

.ec-home-slideshow {
    position: relative;
    width: 100%;
    min-height: 308px;
    height: 100%;
    border-radius: 18px;
    overflow: hidden;
    background: #f4f5f7;
}

.ec-home-slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    transition: opacity .6s ease;
    pointer-events: none;
}

.ec-home-slide.is-active { opacity: 1; pointer-events: auto; }
.ec-home-slide img { width: 100%; height: 100%; object-fit: contain; object-position: center; }

.ec-home-slide-control {
    position: absolute;
    z-index: 2;
    top: 50%;
    transform: translateY(-50%);
    width: 2rem;
    height: 2rem;
    border: 0;
    border-radius: 50%;
    color: var(--ec-primary, #17324d);
    background: rgba(255, 255, 255, .82);
    box-shadow: 0 2px 8px rgba(0, 0, 0, .18);
}

.ec-home-slide-control--previous { left: .65rem; }
.ec-home-slide-control--next { right: .65rem; }
.ec-home-slide-control:focus-visible { outline: 3px solid var(--ec-accent, #d4a72c); outline-offset: 2px; }

.ec-slide-admin-preview {
    aspect-ratio: 16 / 10;
    overflow: hidden;
    background: #f4f5f7;
    border-radius: .375rem;
}

.ec-slide-admin-preview img { width: 100%; height: 100%; object-fit: contain; object-position: center; }

@media (prefers-reduced-motion: reduce) {
    .ec-home-slide { transition: none; }
}

.ec-dashboard-fallback {
    border-radius: 18px;
    min-height: 308px;
    background: linear-gradient(180deg, #f8fbff 0%, #ebf2ff 100%);
    padding: 1rem;
}

.ec-db-top {
    height: 12px;
    width: 52%;
    border-radius: 99px;
    background: #cedefe;
    margin-bottom: 0.9rem;
    display: flex;
    gap: 0.25rem;
}

.ec-db-top span {
    display: block;
    width: 16%;
    background: rgba(255, 255, 255, 0.38);
    border-radius: 99px;
}

.ec-db-cards {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0.55rem;
    margin-bottom: 0.95rem;
}

.ec-db-card {
    background: #fff;
    border: 1px solid #dbe7ff;
    border-radius: 10px;
    padding: 0.45rem;
}

.ec-db-card strong {
    display: block;
    font-size: 0.9rem;
    color: #1f2f7a;
}

.ec-db-card small {
    color: #6e7ea7;
    font-size: 0.68rem;
}

.ec-db-charts {
    display: grid;
    grid-template-columns: 130px 1fr;
    gap: 0.8rem;
    align-items: end;
}

.ec-db-donut-wrap {
    background: #fff;
    border: 1px solid #dbe7ff;
    border-radius: 12px;
    padding: 0.6rem;
    text-align: center;
}

.ec-db-donut {
    width: 80px;
    height: 80px;
    margin: 0 auto 0.3rem;
    border-radius: 50%;
    background: conic-gradient(#4b7cff 0 68%, #8ec7ff 68% 86%, #d9e8ff 86% 100%);
    position: relative;
}

.ec-db-donut::after {
    content: "";
    position: absolute;
    inset: 16px;
    border-radius: 50%;
    background: #fff;
}

.ec-db-donut-wrap p {
    margin: 0;
    font-size: 0.72rem;
    color: #5c6f9f;
}

.ec-db-bar {
    background: #fff;
    border: 1px solid #dbe7ff;
    border-radius: 12px;
    padding: 0.7rem 0.7rem 0.45rem;
    display: flex;
    align-items: flex-end;
    gap: 0.38rem;
    min-height: 120px;
}

.ec-db-bar span {
    flex: 1;
    border-radius: 6px 6px 0 0;
    background: linear-gradient(180deg, #79c6ff, #4b7cff);
}

.ec-db-bar span:nth-child(1) { height: 42%; }
.ec-db-bar span:nth-child(2) { height: 65%; }
.ec-db-bar span:nth-child(3) { height: 55%; }
.ec-db-bar span:nth-child(4) { height: 88%; }
.ec-db-bar span:nth-child(5) { height: 70%; }
.ec-db-bar span:nth-child(6) { height: 93%; }

.ec-plan-teaser {
    display: inline-flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.55rem;
    background: rgba(255, 255, 255, 0.78);
    border: 1px solid #d7e4ff;
    border-radius: 999px;
    padding: 0.55rem 0.8rem 0.55rem 0.95rem;
    box-shadow: 0 8px 18px rgba(31, 47, 122, 0.08);
}

.ec-plan-teaser-text {
    color: #3b4a76;
    font-size: 0.93rem;
    font-weight: 600;
}

.ec-plan-teaser-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    padding: 0.32rem 0.78rem;
    font-size: 0.83rem;
    font-weight: 700;
    color: #1f2f7a;
    background: #e7efff;
    border: 1px solid #c7d8ff;
    text-decoration: none;
}

.ec-plan-teaser-link:hover {
    background: #dbe8ff;
}

.ec-section-tight {
    padding-bottom: 3.5rem;
}

.ec-feature-grid .ec-feature-card {
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
}

/* Home page FRCEM marketing sections */
.ec-section-heading {
    max-width: 800px;
}

.ec-home-credibility,
.ec-home-steps {
    background: var(--ec-surface-alt);
}

.ec-stat-card,
.ec-marketing-feature,
.ec-step-card {
    border: 1px solid var(--ec-border);
    border-radius: var(--ec-radius);
    background: var(--ec-surface);
    box-shadow: var(--ec-shadow);
}

.ec-stat-card {
    position: relative;
    overflow: hidden;
}

.ec-stat-card::after {
    content: "";
    position: absolute;
    inset: 0 auto 0 0;
    width: 4px;
    background: var(--ec-accent);
}

.ec-stat-icon,
.ec-feature-icon {
    width: 2.75rem;
    height: 2.75rem;
    display: inline-grid;
    place-items: center;
    border-radius: calc(var(--ec-radius) - 4px);
    margin-bottom: 1rem;
    background: var(--ec-primary-soft);
    color: var(--ec-accent);
    font-size: 1.1rem;
}

.ec-stat-value {
    color: var(--ec-primary);
    font-size: clamp(1.75rem, 3vw, 2.35rem);
    font-weight: 800;
    line-height: 1.1;
}

.ec-stat-value-text {
    font-size: 1.45rem;
}

.ec-marketing-feature,
.ec-step-card {
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.ec-marketing-feature:hover {
    transform: translateY(-3px);
}

.ec-step-card {
    text-align: center;
}

.ec-home-closing {
    background: var(--ec-surface-alt);
}

.ec-closing-panel {
    max-width: 980px;
    border: 1px solid var(--ec-border);
    border-radius: var(--ec-radius);
    background: var(--ec-surface);
    box-shadow: var(--ec-shadow);
}

.ec-closing-copy {
    max-width: 800px;
    color: var(--ec-muted);
    font-size: 1.08rem;
    line-height: 1.75;
}

.ec-closing-tagline {
    color: var(--ec-primary);
}

.ec-closing-credibility {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.45rem 1.5rem;
    font-weight: 600;
}

.ec-closing-credibility span {
    position: relative;
}

.ec-closing-credibility span:not(:last-child)::after {
    content: "";
    position: absolute;
    top: 50%;
    right: -0.8rem;
    width: 0.3rem;
    height: 0.3rem;
    border-radius: 50%;
    background: var(--ec-accent);
    transform: translateY(-50%);
}

.ec-pricing-cta,
.ec-final-cta {
    width: 100%;
    max-width: 340px;
    margin-left: auto;
    margin-right: auto;
}

@media (max-width: 991.98px) {
    .ec-hero-visual {
        margin-top: 0.5rem;
        min-height: auto;
    }

    .ec-plan-teaser {
        display: flex;
        justify-content: center;
        width: 100%;
    }

    .ec-db-cards {
        grid-template-columns: repeat(2, 1fr);
    }

    .ec-db-charts {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 575.98px) {
    .ec-stat-card,
    .ec-marketing-feature,
    .ec-step-card {
        padding: 1.25rem !important;
    }

    .ec-closing-credibility {
        display: grid;
    }

    .ec-closing-credibility span:not(:last-child)::after {
        display: none;
    }
}

/* ===== Identity Auth Refresh ===== */
.ec-auth-page {
    min-height: calc(100vh - 76px);
    padding: 3rem 0;
    background:
        radial-gradient(circle at 8% 8%, rgba(75, 124, 255, 0.12), transparent 42%),
        radial-gradient(circle at 90% 92%, rgba(255, 193, 80, 0.16), transparent 40%),
        linear-gradient(180deg, #f7f9ff 0%, #eef3ff 100%);
}

.ec-auth-card {
    border-radius: 1.5rem;
    overflow: hidden;
    background: #ffffff;
    border: 1px solid #dfe7ff;
    box-shadow: 0 24px 55px rgba(27, 41, 97, 0.14);
}

.ec-auth-side {
    position: relative;
    height: 100%;
    padding: 2.5rem 2rem;
    color: #fff;
    background:
        radial-gradient(circle at 16% 18%, rgba(138, 208, 255, 0.38), transparent 34%),
        radial-gradient(circle at 86% 88%, rgba(255, 203, 104, 0.26), transparent 37%),
        linear-gradient(145deg, #192a78 0%, #243a8f 58%, #334ca8 100%);
}

.ec-auth-side::before,
.ec-auth-side::after {
    content: "";
    position: absolute;
    border-radius: 50%;
    pointer-events: none;
}

.ec-auth-side::before {
    width: 180px;
    height: 180px;
    top: -60px;
    right: -48px;
    background: rgba(255, 255, 255, 0.1);
}

.ec-auth-side::after {
    width: 220px;
    height: 220px;
    bottom: -110px;
    left: -70px;
    background: rgba(255, 255, 255, 0.08);
}

.ec-auth-brand-wrap {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    margin-bottom: 1.8rem;
    font-size: 1.6rem;
    font-weight: 700;
    letter-spacing: -0.02em;
}

.ec-auth-brand-mark {
    width: 1.7rem;
    height: 1.7rem;
    border-radius: 0.45rem;
    background: linear-gradient(145deg, #60d2ff, #2b9ef8);
    box-shadow: 0 8px 22px rgba(43, 158, 248, 0.4);
}

.ec-auth-title {
    font-size: clamp(1.8rem, 3vw, 2.35rem);
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 0.9rem;
    position: relative;
    z-index: 1;
}

.ec-auth-subtitle {
    font-size: 1.02rem;
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 1.5rem;
    max-width: 28ch;
    position: relative;
    z-index: 1;
}

.ec-auth-bullets li {
    display: flex;
    align-items: flex-start;
    gap: 0.6rem;
    font-size: 0.96rem;
    line-height: 1.5;
    margin-bottom: 0.85rem;
    color: rgba(255, 255, 255, 0.92);
    position: relative;
    z-index: 1;
}

.ec-auth-credibility {
    margin-top: 1.5rem;
    padding-top: 1.25rem;
    border-top: 1px solid rgba(255, 255, 255, 0.22);
    color: rgba(255, 255, 255, 0.92);
    font-size: 0.9rem;
    font-weight: 600;
    position: relative;
    z-index: 1;
}

.ec-auth-check {
    width: 1.35rem;
    height: 1.35rem;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.85rem;
    color: #1f2f7a;
    background: #ffcf66;
    flex-shrink: 0;
    margin-top: 0.1rem;
}

.ec-auth-form {
    padding: 2.5rem 2.2rem;
}

.ec-auth-form-heading {
    font-size: clamp(1.7rem, 2.8vw, 2.1rem);
    font-weight: 700;
    color: #1c275f;
    margin-bottom: 0.35rem;
}

.ec-auth-form-copy {
    color: #6c7aa5;
    margin-bottom: 1.5rem;
}

.ec-auth-input {
    border-radius: 0.8rem;
    border-color: #c9d5f4;
    min-height: 2.95rem;
}

.ec-auth-input:focus,
.ec-auth-input:focus-visible {
    border-color: #4b7cff;
    box-shadow: 0 0 0 0.2rem rgba(75, 124, 255, 0.23);
}

.ec-auth-submit {
    border: none;
    border-radius: 0.8rem;
    font-weight: 700;
    padding: 0.8rem 1rem;
    margin-top: 0.5rem;
}

.ec-auth-link-list,
.ec-auth-inline-link {
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
    margin-top: 1rem;
    color: #6a7698;
    text-align: center;
}

.ec-auth-inline-link {
    flex-direction: row;
    justify-content: center;
    gap: 0.3rem;
}

.ec-auth-link-list a,
.ec-auth-inline-link a {
    color: #1f2f7a;
    font-weight: 600;
    text-decoration: none;
}

.ec-auth-link-list a:hover,
.ec-auth-inline-link a:hover {
    text-decoration: underline;
}

.ec-auth-divider {
    height: 1px;
    margin: 1.3rem 0 1rem;
    background: linear-gradient(90deg, rgba(195, 206, 236, 0), rgba(195, 206, 236, 1), rgba(195, 206, 236, 0));
}

.ec-auth-muted {
    color: #7282ad;
    font-size: 0.92rem;
}

.ec-auth-validation-summary ul {
    margin-bottom: 0;
    padding-left: 1.25rem;
}

@media (max-width: 991.98px) {
    .ec-auth-page {
        padding: 1.5rem 0 2rem;
    }

    .ec-auth-side {
        padding: 1.8rem 1.45rem;
    }

    .ec-auth-form {
        padding: 1.75rem 1.45rem 2rem;
    }
}

/* -------------------------
   Revision exam viewport layout overrides
   ------------------------- */
body:has(.ec-revision-shell) {
    overflow: auto;
}

body:has(.ec-revision-shell) .container:has(.ec-revision-shell) {
    max-width: 100%;
    padding-inline: clamp(0.75rem, 2vw, 1.4rem);
}

body:has(.ec-revision-shell) main {
    padding-bottom: 0 !important;
}

.ec-revision-shell {
    height: calc(100dvh - 88px);
    min-height: 0;
    display: flex;
    flex-direction: column;
    gap: 0.95rem;
    max-width: 1320px;
    margin: 0 auto;
}

.ec-revision-header {
    flex-shrink: 0;
    margin-bottom: 0;
}

.ec-revision-main-content {
    flex: 1;
    min-height: 0;
    display: flex;
    gap: 1rem;
    overflow: hidden;
}

.ec-question-panel {
    flex: 1;
    min-width: 0;
    min-height: 0;
    padding: 1.15rem 1.15rem 1rem;
    border-radius: 18px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.ec-answer-form {
    margin-top: 0;
    min-height: 0;
    display: flex;
    flex: 1;
    flex-direction: column;
    overflow: hidden;
}

.ec-question-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.4rem 1rem;
    margin-bottom: 0.75rem;
    flex-shrink: 0;
}

.ec-question-id-badge {
    display: inline-flex;
    align-items: center;
    max-width: 100%;
    padding: 0.18rem 0.5rem;
    border: 1px solid var(--ec-border);
    border-radius: 999px;
    background: var(--ec-surface-alt);
    color: var(--ec-muted);
    font-size: 0.72rem;
    font-weight: 600;
    line-height: 1.25;
    white-space: nowrap;
    user-select: text;
}

.ec-question-scroll {
    flex: 1;
    min-height: 0;
    overflow: auto;
    padding-right: 0.35rem;
}

.ec-question-scroll > * + * {
    margin-top: 1rem;
}

.ec-answer-actions {
    margin-top: 0.9rem;
    padding: 0.9rem 0.85rem 0.2rem;
    border-top: 1px solid var(--ec-border);
    background: linear-gradient(180deg, rgba(248, 250, 255, 0.95) 0%, rgba(255, 255, 255, 1) 68%);
    border-radius: 12px 12px 10px 10px;
    box-shadow: 0 -8px 18px rgba(15, 23, 42, 0.06);
    flex-shrink: 0;
}

.ec-btn-primary.ec-btn-answer {
    min-height: 52px;
    padding: 14px 28px;
    border-radius: 12px;
    font-size: 1.02rem;
    font-weight: 700;
    box-shadow: 0 14px 30px rgba(47, 71, 202, 0.32), inset 0 -2px 0 rgba(18, 38, 120, 0.2);
    transition: transform .18s ease, box-shadow .2s ease, filter .2s ease;
}

.ec-btn-primary.ec-btn-answer:focus-visible {
    outline: none;
    box-shadow: 0 0 0 4px rgba(79, 70, 229, 0.28), 0 18px 30px rgba(47, 71, 202, 0.3);
}

.ec-explain {
    margin-top: 0.95rem;
    padding: 1rem 1.05rem;
    border: 1px double #d7dff6;
    border-radius: 12px;
    background: linear-gradient(178deg, rgba(245, 247, 255, 0.82), rgb(228 255 208 / 98%));
}

.ec-explain-title {
    margin: 0;
    font-size: 0.98rem;
    font-weight: 700;
    color: #1f2b6f;
}

.ec-explain-correct {
    margin-top: 0.5rem;
    color: #25356f;
}

.ec-explain-text {
    margin-top: 0.55rem;
    color: #22305f;
    line-height: 1.55;
}

.ec-question-panel--answered {
    padding: 1rem 1rem 0.9rem;
}

.ec-question-scroll--compact > * + * {
    margin-top: 0.75rem;
}

.ec-question-scroll--compact .ec-question-stem {
    margin-bottom: 0.95rem;
    line-height: 1.4;
}

.ec-question-scroll--compact .ec-option-list {
    gap: 0.56rem;
}

.ec-question-scroll--compact .ec-option {
    padding: 0.72rem 0.85rem;
    gap: 0.6rem;
}

.ec-question-scroll--compact .ec-explain {
    margin-top: 0.7rem;
    padding: 0.8rem 0.9rem;
}

.ec-question-scroll--compact .ec-explain-title {
    font-size: 0.94rem;
}

.ec-question-scroll--answered {
    flex: 1 1 auto;
    min-height: 0;
    overflow: auto;
}

.ec-question-scroll--answered > * + * {
    margin-top: 0.62rem;
}

.ec-question-scroll--answered .ec-question-stem {
    margin-bottom: 0.72rem;
}

.ec-question-scroll--answered .ec-option-list {
    margin-bottom: 0.1rem;
}

.ec-question-scroll--answered .ec-explain {
    margin-top: 0.35rem;
    padding: 0.85rem 0.95rem;
}

.ec-question-scroll--answered .ec-explain-title {
    font-size: 0.92rem;
    margin-bottom: 0.12rem;
}

.ec-answer-form--answered .ec-answer-actions {
    margin-top: 0.7rem;
    padding-top: 0.7rem;
}

.ec-answer-actions--pinned {
    position: relative;
    z-index: 1;
}

.ec-answer-form--answered .ec-btn-primary.ec-btn-answer {
    min-height: 46px;
    padding: 11px 22px;
}

.ec-revision-sidebar {
    width: 320px;
    flex-shrink: 0;
    min-height: 0;
    overflow: auto;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.ec-sidebar-card {
    flex-shrink: 0;
}

@media (max-width: 991.98px) {
    body:has(.ec-revision-shell) {
        overflow: auto;
    }

    .ec-revision-shell {
        height: auto;
        min-height: calc(100dvh - 88px);
    }

    .ec-revision-main-content {
        flex-direction: column;
        overflow: visible;
    }

    .ec-question-panel,
    .ec-revision-sidebar {
        min-height: unset;
        overflow: visible;
    }

    .ec-revision-sidebar {
        width: 100%;
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 767.98px) {
    .ec-revision-sidebar {
        grid-template-columns: 1fr;
    }

    .ec-btn-primary.ec-btn-answer {
        width: 100%;
    }
}

/* Mock exam SaaS redesign */
.ec-category-exam-card {
    position: relative;
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) minmax(190px, 260px);
    align-items: center;
    gap: 1.4rem;
    overflow: hidden;
    padding: 1.6rem;
    color: #fff;
    border: 1px solid rgba(255, 217, 116, 0.38);
    border-radius: calc(var(--ec-radius) + 4px);
    background:
        radial-gradient(circle at 90% 15%, rgba(255, 217, 116, 0.2), transparent 28%),
        linear-gradient(135deg, var(--ec-primary-deep), var(--ec-primary));
    box-shadow: 0 14px 30px rgba(20, 31, 80, 0.18);
}

.ec-category-exam-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 4.25rem;
    height: 4.25rem;
    color: #ffd974;
    font-size: 1.75rem;
    border: 1px solid rgba(255, 217, 116, 0.4);
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.08);
}

.ec-category-exam-kicker {
    display: block;
    margin-bottom: .35rem;
    color: #ffd974;
    font-size: .75rem;
    font-weight: 800;
    letter-spacing: .13em;
    text-transform: uppercase;
}

.ec-category-exam-copy h3 {
    margin-bottom: .35rem;
    color: #fff;
    font-weight: 800;
}

.ec-category-exam-copy p {
    margin-bottom: .75rem;
    color: rgba(255, 255, 255, 0.78);
}

.ec-category-exam-meta {
    display: flex;
    flex-wrap: wrap;
    gap: .65rem 1.2rem;
    font-weight: 700;
}

.ec-category-exam-meta i {
    margin-right: .35rem;
    color: #ffd974;
}

.ec-category-exam-action {
    display: flex;
    flex-direction: column;
    gap: .55rem;
    text-align: center;
}

.ec-category-exam-unavailable {
    color: rgba(255, 255, 255, 0.75);
    font-size: .85rem;
}

.ec-category-exam-card .ec-mock-cta:disabled {
    cursor: not-allowed;
    filter: grayscale(.7);
    opacity: .55;
    transform: none;
}

@media (max-width: 767.98px) {
    .ec-category-exam-card {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .ec-category-exam-icon {
        margin: 0 auto;
    }

    .ec-category-exam-meta {
        justify-content: center;
    }
}

.ec-mock-shell {
    max-width: 1400px;
    margin: 0 auto;
}

.ec-mock-hero {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem 1.5rem;
    margin-bottom: 24px;
}

.ec-mock-title {
    font-size: 36px;
    line-height: 1.05;
    letter-spacing: -0.02em;
    color: #15234f;
}

.ec-mock-subtitle {
    font-size: 15px;
    max-width: 720px;
    color: #566283;
}


.ec-mock-page {
    max-width: 1400px;
}

.ec-mock-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}
.ec-mock-pills {
    display: inline-flex;
    align-items: center;
    gap: 0.85rem;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.ec-mock-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
    background: #eef2fd;
    border: 1px solid #dfe7fb;
    color: #1f2f5f;
    border-radius: 999px;
    padding: 0.62rem 1rem;
    font-weight: 700;
    white-space: nowrap;
}

.ec-mock-pill-icon {
    width: 1.65rem;
    height: 1.65rem;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #fff;
    color: #2f49a2;
    box-shadow: inset 0 0 0 1px rgba(47, 73, 162, 0.12);
}

.ec-mock-card {
    position: relative;
    overflow: hidden;
    border-radius: 18px;
    background: #fff;
    border: 1px solid #e7ecfb;
    padding: 22px;
    margin-bottom: 0;
    box-shadow: 0 10px 24px rgba(17, 30, 67, 0.08);
    transition: transform .22s ease, box-shadow .22s ease, border-color .22s ease;
}

.ec-mock-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 20px 36px rgba(17, 30, 67, 0.14);
    border-color: #cfdbfa;
}

.ec-mock-card-title {
    font-size: 28px;
    line-height: 1;
    margin: 0;
    color: #132452;
    font-weight: 800;
    letter-spacing: -0.02em;
}

.ec-mock-meta {
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
    color: #1f2f5f;
    font-weight: 500;
    font-size: 1.24rem;
}

.ec-mock-meta-icon {
    width: 1.65rem;
    height: 1.65rem;
    border-radius: 50%;
    border: 2px solid #eca624;
    color: #c58300;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.95rem;
    line-height: 1;
}

.ec-mock-card p {
    font-size: 14px;
}

.ec-mock-card-highlight {
    color: #7080a3;
    font-size: 14px;
}

.ec-mock-card-deco {
    position: absolute;
    top: 1rem;
    right: 0.9rem;
    width: 74px;
    height: 74px;
    border-radius: 50%;
    pointer-events: none;
    background: radial-gradient(circle at 35% 30%, rgba(255, 220, 123, 0.55), rgba(212, 225, 255, 0.6));
    filter: saturate(1.1);
}

.ec-mock-cta {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.85rem;
    width: 100%;
    text-decoration: none;
    border-radius: 999px;
    border: none;
    font-weight: 800;
    font-size: 14px;
    line-height: 1;
    padding: 10px 18px;
    color: #102047;
    background: linear-gradient(135deg, #ffd974 0%, #f3bf3e 100%);
    box-shadow: 0 10px 18px rgba(214, 156, 24, 0.22);
    transition: transform .2s ease, box-shadow .2s ease, filter .2s ease;
}

.ec-mock-cta:hover,
.ec-mock-cta:focus-visible {
    color: #0d1f48;
    transform: translateY(-2px);
    filter: brightness(1.02);
    box-shadow: 0 14px 25px rgba(214, 156, 24, 0.28);
}

.ec-mock-feature-strip {
    margin-top: 28px;
    border: 1px solid #e2e8fa;
    background: #f8faff;
    border-radius: 16px;
    padding: 16px 0;
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0.75rem 1.1rem;
}

.ec-mock-feature-item {
    display: flex;
    align-items: center;
    gap: 0.62rem;
    color: #1a2c5a;
    font-weight: 600;
    white-space: nowrap;
}

.ec-mock-feature-dot {
    width: 12px;
    height: 12px;
    border-radius: 999px;
    flex-shrink: 0;
    background: radial-gradient(circle at 30% 30%, #ffe089, #f1bb35);
    box-shadow: 0 0 0 4px rgba(241, 187, 53, 0.14);
}

.ec-mock-footer {
    margin-top: 1.2rem;
    text-align: center;
    border-top: 1px solid #e3e8f8;
    padding-top: 1.1rem;
}

@media (max-width: 1199.98px) {
    .ec-mock-hero {
        align-items: flex-start;
        flex-direction: column;
    }

    .ec-mock-pills {
        justify-content: flex-start;
    }

    .ec-mock-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .ec-mock-feature-strip {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 767.98px) {
    .ec-mock-shell {
        margin-top: 0.25rem;
    }

    .ec-mock-subtitle {
        font-size: 1.03rem;
    }

    .ec-mock-grid {
        grid-template-columns: 1fr;
    }

    .ec-mock-card {
        padding: 1.35rem;
    }


    .ec-mock-feature-strip {
        grid-template-columns: 1fr;
    }

    .ec-mock-feature-item {
        white-space: normal;
    }
}

/* -------------------------
   Timed Exam Run Page
   ------------------------- */
.timed-run-page {
    --timed-navy: #15255e;
    --timed-blue: #2854c4;
    --timed-bg: #f3f5fb;
    --timed-border: #dfe5f0;
    --timed-muted: #5f6f88;
    --timed-success: #1f9d73;
    --timed-gold: #f1b300;
}

.timed-run-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.85rem;
    flex-wrap: wrap;
    margin-bottom: 0.15rem;
}

.timed-run-title {
    font-size: clamp(1.7rem, 3vw, 2.55rem);
    color: #0f1d4f;
    letter-spacing: -0.03em;
    line-height: 1.1;
}

.timed-run-subtitle {
    color: var(--timed-muted);
    font-size: 1.03rem;
    line-height: 1.25;
}

.timed-header-actions {
    gap: 0.55rem;
}

.timed-timer-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: #fff4d8;
    color: #1d294f;
    border: 1px solid #f3db98;
    border-radius: 14px;
    padding: 0.58rem 0.95rem;
    box-shadow: 0 8px 18px rgba(15, 23, 42, 0.07);
    font-weight: 700;
    font-size: 1.1rem;
    min-width: 210px;
    justify-content: space-between;
}

.timed-timer-icon {
    font-size: 0.95rem;
}

.timed-timer-value {
    white-space: nowrap;
}

.timed-timer-chevron {
    font-size: 1.1rem;
    line-height: 1;
    color: #7a828f;
}

.timed-pause-wrap .btn {
    padding: 0.45rem 0.8rem;
    font-size: 0.9rem;
    border-radius: 10px;
    font-weight: 600;
}

.timed-run-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 300px;
    gap: 0.85rem;
    align-items: start;
}

.timed-question-card,
.timed-sidebar,
.timed-feature-strip {
    border-radius: 18px;
    border-color: var(--timed-border);
    box-shadow: 0 10px 30px rgba(15, 23, 42, 0.08);
}

.timed-question-text {
    font-size: clamp(1.05rem, 1.55vw, 1.45rem);
    line-height: 1.42;
    color: #1f2a45;
    margin-bottom: 0.45rem;
}

.timed-options {
    display: grid;
    gap: 0.45rem;
}

.timed-option-row {
    display: block;
    min-height: 54px;
    border: 1px solid var(--timed-border);
    border-radius: 10px;
    padding: 0.62rem 0.82rem;
    background: #fff;
    cursor: default;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
}

.timed-option-select {
    display: flex;
    align-items: center;
    gap: 0.62rem;
}

.timed-option-label {
    display: flex;
    align-items: center;
    gap: 0.62rem;
    min-width: 0;
    cursor: pointer;
}

.timed-option-row:hover {
    border-color: #c8d2ea;
    box-shadow: 0 6px 18px rgba(15, 23, 42, 0.08);
}

.timed-option-row.is-selected {
    background: #eef3ff;
    border-color: #adc0ef;
    box-shadow: inset 0 0 0 1px rgba(45, 84, 196, 0.35);
}

.timed-option-radio {
    width: 1.2rem;
    height: 1.2rem;
    margin: 0;
    accent-color: var(--timed-blue);
}

.timed-option-letter {
    font-size: 1.2rem;
    font-weight: 700;
    color: #2d3f67;
    line-height: 1;
}

.timed-option-text {
    font-size: 1.02rem;
    color: #1f2a45;
    line-height: 1.33;
}

.timed-actions {
    display: flex;
    justify-content: flex-end;
    gap: 0.75rem;
}

.timed-btn {
    border-radius: 10px;
    font-weight: 700;
    font-size: 1rem;
    padding: 0.62rem 1.2rem;
    min-width: 164px;
}

.timed-btn-primary {
    border: 1px solid #d69b00;
    background: linear-gradient(180deg, #ffc938 0%, #f1b300 100%);
    color: #fff;
    box-shadow: 0 8px 20px rgba(241, 179, 0, 0.35);
}

.timed-btn-primary:hover,
.timed-btn-primary:focus {
    color: #fff;
    filter: brightness(1.02);
}

.timed-sidebar {
    padding: 0.95rem !important;
}

.timed-sidebar-title {
    font-size: 1.45rem;
    font-weight: 800;
    color: var(--timed-navy);
    margin-bottom: 0.65rem;
}

.timed-q-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(40px, 1fr));
    gap: 0.38rem;
}

.timed-q-pill {
    border-radius: 8px;
    border: 1px solid var(--timed-border);
    background: #f6f8fd;
    color: #374151;
    min-height: 36px;
    font-size: 0.92rem;
    font-weight: 700;
}

.timed-q-pill.is-current {
    background: var(--timed-blue);
    border-color: #20449f;
    color: #fff;
}

.timed-q-pill.is-answered {
    background: #9ce0c7;
    border-color: #71c8a8;
    color: #154c39;
}

.timed-q-pill.is-unanswered {
    background: #f2f4f9;
    color: #596376;
}

.timed-legend {
    margin-top: 0.85rem;
    border-top: 1px solid var(--timed-border);
    padding-top: 0.7rem;
    display: grid;
    gap: 0.28rem;
    color: #2f3f63;
    font-size: 0.92rem;
}

.timed-legend > div {
    display: flex;
    align-items: center;
    gap: 0.55rem;
}

.timed-legend-dot {
    width: 11px;
    height: 11px;
    border-radius: 999px;
    display: inline-block;
    border: 1px solid transparent;
}

.timed-legend-dot.is-answered {
    background: var(--timed-success);
}

.timed-legend-dot.is-current {
    background: var(--timed-blue);
}

.timed-legend-dot.is-unanswered {
    background: #d9deea;
}

.timed-feature-strip {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0.4rem;
    padding: 0.55rem 0.75rem;
}

.timed-feature-item {
    font-size: 0.87rem;
    font-weight: 600;
    color: #2d3e61;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.32rem;
    text-align: center;
    border-right: 1px solid #e4e9f5;
}

.timed-feature-item:last-child {
    border-right: none;
}

.timed-footer {
    border-top: 1px solid #dee3f1;
    padding-top: 0.75rem;
    display: flex;
    justify-content: space-between;
    gap: 0.75rem;
    flex-wrap: wrap;
    color: #5b6780;
}

.timed-footer nav {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
}

.timed-footer a {
    text-decoration: none;
    color: inherit;
}

.timed-footer a:hover {
    color: #263a73;
}

@media (max-width: 1199.98px) {
    .timed-run-layout {
        grid-template-columns: 1fr;
    }

    .timed-sidebar {
        order: 2;
    }

    .timed-feature-strip {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .timed-feature-item {
        border-right: none;
    }
}

@media (max-width: 767.98px) {
    .timed-run-subtitle {
        font-size: 0.95rem;
    }

    .timed-header-actions {
        width: 100%;
        justify-content: space-between;
    }

    .timed-timer-badge {
        width: auto;
        min-width: 0;
        font-size: 0.98rem;
        flex: 1 1 auto;
    }

    .timed-option-row {
        min-height: 52px;
        padding: 0.62rem 0.75rem;
    }

    .timed-option-letter {
        font-size: 1.25rem;
    }

    .timed-option-text {
        font-size: 0.96rem;
    }

    .timed-actions {
        justify-content: stretch;
    }

    .timed-btn {
        width: 100%;
    }

    .timed-feature-strip {
        grid-template-columns: 1fr;
    }
}

/* -------------------------
   Premium dashboard redesign
   ------------------------- */
.ec-dashboard {
    max-width: 1320px;
    margin: 0 auto;
}

.ec-dashboard-title {
    font-size: clamp(1.8rem, 2.5vw, 2.5rem);
    font-weight: 800;
    letter-spacing: -0.03em;
    color: #152347;
    margin-bottom: 0.65rem;
}

.ec-dashboard-subtitle {
    color: #60708f;
    font-size: 1rem;
    max-width: 760px;
}

.ec-kpi-card,
.ec-session-card,
.ec-panel-card {
    padding: 1.4rem;
    border-radius: 18px;
    border: 1px solid #e9effb;
    box-shadow: 0 10px 28px rgba(23, 36, 80, 0.06);
}

.ec-kpi-label {
    color: #6f7e99;
    font-size: 0.86rem;
    font-weight: 600;
    margin-bottom: 0.8rem;
}

.ec-kpi-value {
    color: #122248;
    font-size: clamp(1.6rem, 2.4vw, 2rem);
    font-weight: 800;
    line-height: 1.1;
    margin: 0;
}

.ec-streak-icon {
    width: 1.3rem;
    height: 1.3rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #f59e0b;
}

.ec-session-content {
    width: min(100%, 760px);
}

.ec-session-title {
    color: #17274f;
    font-size: 1.02rem;
    font-weight: 700;
}

.ec-session-meta {
    color: #64748b;
    font-size: 0.92rem;
}

.ec-soft-progress {
    height: 10px;
    border-radius: 999px;
    background: #e7edfb;
}

.ec-soft-progress .progress-bar {
    background: linear-gradient(90deg, #4e73ff, #3152d8);
    border-radius: 999px;
}

.ec-panel-card {
    padding: 1.5rem;
}

.ec-panel-card-light {
    background: linear-gradient(180deg, #ffffff 0%, #fbfcff 100%);
}

.ec-panel-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
}

.ec-panel-title {
    font-size: 1.05rem;
    font-weight: 700;
    letter-spacing: -0.01em;
    margin: 0;
    color: #132447;
}

.ec-panel-subtitle {
    font-size: 0.85rem;
    color: #7081a1;
}

.ec-filter-pill {
    border-radius: 999px;
    border: 1px solid #d9e3fa;
    background: #f6f9ff;
    color: #3b5bbf;
    font-size: 0.76rem;
    font-weight: 700;
    padding: 0.35rem 0.75rem;
    white-space: nowrap;
}

.ec-chart-wrap {
    height: 320px;
    width: 100%;
    position: relative;
}

.ec-chart-wrap canvas {
    width: 100% !important;
    height: 100% !important;
    display: block;
}

.ec-topic-list,
.ec-recommend-list {
    display: flex;
    flex-direction: column;
    gap: 0.95rem;
}

.ec-topic-name,
.ec-recommend-name {
    color: #1f2f5d;
    font-weight: 600;
    font-size: 0.86rem;
}

.ec-topic-score {
    color: #7a879f;
    font-size: 0.84rem;
    font-weight: 700;
}

.ec-progress-amber,
.ec-progress-soft {
    height: 8px;
    border-radius: 999px;
    background: #f1f4fb;
}

.ec-progress-amber .progress-bar {
    border-radius: 999px;
    background: linear-gradient(90deg, #fbbf24, #f59e0b);
}

.ec-progress-soft .progress-bar {
    border-radius: 999px;
    background: linear-gradient(90deg, #8ea6ff, #5b7fff);
}

.ec-btn-amber {
    background: linear-gradient(90deg, #f8c458, #f0ae2c);
    border: 1px solid #eab03b;
    border-radius: 12px;
    color: #27385f;
    font-weight: 700;
    padding: 0.62rem 1rem;
}

.ec-btn-amber:hover {
    filter: brightness(0.98);
    color: #1f2f53;
}

.ec-btn-ghost {
    border-radius: 12px;
    border: 1px solid #d6def3;
    color: #3550a9;
    background: #fff;
    font-weight: 600;
}

.ec-link-secondary {
    color: #5b6f98;
    font-size: 0.9rem;
    font-weight: 600;
    text-decoration: none;
}

.ec-link-secondary:hover {
    color: #3859bb;
}

.ec-dashboard-table-wrap {
    border: 1px solid #edf1fb;
    border-radius: 14px;
}

.ec-dashboard-table thead th {
    color: #74829c;
    font-size: 0.75rem;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    font-weight: 700;
    padding: 0.8rem 1rem;
    border-bottom: 1px solid #edf1fb;
    background: #f9fbff;
}

.ec-dashboard-table tbody td {
    padding: 0.9rem 1rem;
    color: #1b2d57;
    border-color: #f0f3fa;
}

.ec-click-row {
    transition: background-color 0.2s ease;
}

.ec-click-row:hover {
    background: #f6f9ff;
}

.ec-activity-feed {
    display: flex;
    flex-direction: column;
}

.ec-activity-item {
    display: grid;
    grid-template-columns: 14px minmax(0, 1fr);
    gap: 0.7rem;
    padding: 0.75rem 0;
    border-bottom: 1px solid #edf1fb;
}

.ec-activity-item:last-child {
    border-bottom: none;
}

.ec-activity-dot {
    width: 10px;
    height: 10px;
    margin-top: 0.35rem;
    border-radius: 999px;
    background: linear-gradient(180deg, #5e80ff, #3f63ef);
}

.ec-activity-title {
    color: #1b2d57;
    font-weight: 700;
    font-size: 0.9rem;
}

.ec-activity-time,
.ec-activity-meta {
    color: #7384a3;
    font-size: 0.8rem;
}

.ec-mock-metrics {
    display: grid;
    gap: 0.55rem;
}

.ec-metric-mini {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-radius: 10px;
    border: 1px solid #edf2fd;
    padding: 0.65rem 0.75rem;
    background: #fbfcff;
    font-size: 0.84rem;
    color: #637595;
}

.ec-metric-mini strong {
    color: #1a2e58;
}

.ec-empty-state {
    color: #7081a1;
    font-size: 0.9rem;
}

.ec-action-card-premium {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 1.4rem;
    border-radius: 18px;
}

.ec-action-card-premium h3 {
    margin: 0 0 0.4rem;
    color: #15294e;
    font-size: 1.12rem;
}

.ec-action-card-premium p {
    color: #697b9f;
    font-size: 0.9rem;
}

.ec-action-pill {
    width: 2.35rem;
    height: 2.35rem;
    border-radius: 999px;
    background: #eef3ff;
    color: #3f5ec0;
    border-color: #d8e1fb;
    flex: 0 0 auto;
}

.ec-nav .dropdown .ec-btn-outline {
    border-radius: 999px;
    padding: 0.5rem 0.95rem;
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
}

.ec-account-email {
    display: block;
    max-width: 220px;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

@media (min-width: 992px) {
    .ec-nav .navbar-brand,
    .ec-main-links,
    .ec-account-actions > .nav-item:last-child {
        flex-shrink: 0;
    }

    .ec-nav-content,
    .ec-account-actions,
    .ec-account-item,
    .ec-account-button {
        min-width: 0;
    }

    .ec-account-actions {
        flex-shrink: 1;
        flex-wrap: nowrap;
    }

    .ec-account-button {
        max-width: 100%;
    }
}

@media (min-width: 992px) and (max-width: 1199.98px) {
    .ec-nav .ec-brand-logo-wrap {
        width: 150px;
    }

    .ec-main-links {
        gap: 0 0.1rem;
    }

    .ec-main-links .nav-link {
        padding-inline: 0.4rem;
    }

    .ec-account-actions {
        margin-left: 0.5rem !important;
        gap: 0.35rem !important;
    }

    .ec-account-email {
        max-width: 150px;
    }
}

@media (max-width: 991.98px) {
    .ec-account-button {
        max-width: 100%;
    }

    .ec-account-email {
        max-width: calc(100vw - 5rem);
    }
}

.ec-nav .dropdown-menu {
    border-radius: 14px;
    border: 1px solid #e5ebfa;
    box-shadow: 0 18px 30px rgba(23, 36, 80, 0.14);
}

@media (max-width: 1199.98px) {
    .ec-chart-wrap {
        height: 290px;
    }
}

@media (max-width: 767.98px) {
    .ec-kpi-card,
    .ec-session-card,
    .ec-panel-card,
    .ec-action-card-premium {
        padding: 1.1rem;
    }

    .ec-chart-wrap {
        height: 250px;
    }

    .ec-panel-head {
        align-items: flex-start;
        flex-direction: column;
    }
}

/* -------------------------
   Selectable website themes
   Default values above remain untouched so the current theme is pixel-stable.
   ------------------------- */
[data-theme="navy-gold"] {
    --ec-primary: #0F172A;
    --ec-primary-deep: #1F2937;
    --ec-secondary: #1F2937;
    --ec-accent: #D4AF37;
    --ec-accent-rgb: 212, 175, 55;
    --ec-gold: #D4AF37;
    --ec-light-gold: #F4D03F;
    --ec-theme-success: #10B981;
    --ec-primary-soft: rgba(212, 175, 55, 0.14);
    --ec-bg: #F8FAFC;
    --ec-surface: #FFFFFF;
    --ec-surface-alt: #F8FAFC;
    --ec-focus: 0 0 0 0.25rem rgba(212, 175, 55, 0.3);
    --ec-public-hero-bg: radial-gradient(circle at 15% 20%, rgba(212, 175, 55, 0.16), transparent 38%), radial-gradient(circle at 85% 70%, rgba(31, 41, 55, 0.12), transparent 42%), linear-gradient(160deg, #F8FAFC 0%, #F1F5F9 55%, #FFFFFF 100%);
    --ec-public-panel-bg: linear-gradient(145deg, #0F172A 0%, #172033 58%, #1F2937 100%);
    --ec-public-panel-decoration: rgba(212, 175, 55, 0.14);
    --ec-public-panel-decoration-secondary: rgba(255, 255, 255, 0.07);
    --ec-public-page-bg: radial-gradient(circle at 8% 8%, rgba(212, 175, 55, 0.09), transparent 42%), radial-gradient(circle at 90% 92%, rgba(31, 41, 55, 0.08), transparent 40%), linear-gradient(180deg, #F8FAFC 0%, #F1F5F9 100%);
    --ec-public-link: #775A10;
    --ec-public-input-focus: rgba(212, 175, 55, 0.28);
    --ec-cta-bg: #0F172A;
    --ec-footer-bg: #0F172A;
    --ec-footer-heading: #FFFFFF;
    --ec-footer-accent: #D4AF37;
    --ec-footer-border: rgba(212, 175, 55, 0.28);
    --ec-footer-text: #E5E7EB;
    --ec-footer-link: #D4AF37;
    --ec-footer-link-hover: #F4D03F;
}

[data-theme="charcoal-gold"] {
    --ec-primary: #111827;
    --ec-primary-deep: #1F2937;
    --ec-secondary: #1F2937;
    --ec-accent: #D4AF37;
    --ec-accent-rgb: 212, 175, 55;
    --ec-gold: #D4AF37;
    --ec-light-gold: #F4D03F;
    --ec-theme-success: #10B981;
    --ec-primary-soft: rgba(212, 175, 55, 0.14);
    --ec-bg: #F8FAFC;
    --ec-surface: #FFFFFF;
    --ec-surface-alt: #F8FAFC;
    --ec-focus: 0 0 0 0.25rem rgba(212, 175, 55, 0.3);
    --ec-public-hero-bg: radial-gradient(circle at 15% 20%, rgba(212, 175, 55, 0.16), transparent 38%), radial-gradient(circle at 85% 70%, rgba(31, 41, 55, 0.12), transparent 42%), linear-gradient(160deg, #F8FAFC 0%, #F1F5F9 55%, #FFFFFF 100%);
    --ec-public-panel-bg: linear-gradient(145deg, #111827 0%, #182130 58%, #1F2937 100%);
    --ec-public-panel-decoration: rgba(212, 175, 55, 0.14);
    --ec-public-panel-decoration-secondary: rgba(255, 255, 255, 0.07);
    --ec-public-page-bg: radial-gradient(circle at 8% 8%, rgba(212, 175, 55, 0.09), transparent 42%), radial-gradient(circle at 90% 92%, rgba(31, 41, 55, 0.08), transparent 40%), linear-gradient(180deg, #F8FAFC 0%, #F1F5F9 100%);
    --ec-public-link: #775A10;
    --ec-public-input-focus: rgba(212, 175, 55, 0.28);
    --ec-cta-bg: #111827;
    --ec-footer-bg: #111827;
    --ec-footer-heading: #FFFFFF;
    --ec-footer-accent: #D4AF37;
    --ec-footer-border: rgba(212, 175, 55, 0.28);
    --ec-footer-text: #E5E7EB;
    --ec-footer-link: #D4AF37;
    --ec-footer-link-hover: #F4D03F;
}

[data-theme="deep-teal-gold"] {
    --ec-primary: #0F3D3E;
    --ec-primary-deep: #0F3D3E;
    --ec-secondary: #145A5A;
    --ec-accent: #D4AF37;
    --ec-accent-rgb: 212, 175, 55;
    --ec-gold: #D4AF37;
    --ec-light-gold: #F4D03F;
    --ec-theme-success: #10B981;
    --ec-primary-soft: rgba(212, 175, 55, 0.14);
    --ec-bg: #F8FAFC;
    --ec-surface: #FFFFFF;
    --ec-surface-alt: #F8FAFC;
    --ec-focus: 0 0 0 0.25rem rgba(212, 175, 55, 0.3);
    --ec-public-hero-bg: radial-gradient(circle at 15% 20%, rgba(212, 175, 55, 0.16), transparent 38%), radial-gradient(circle at 85% 70%, rgba(20, 90, 90, 0.12), transparent 42%), linear-gradient(160deg, #F8FAFC 0%, #F1F5F9 55%, #FFFFFF 100%);
    --ec-public-panel-bg: linear-gradient(145deg, #0F3D3E 0%, #124B4C 58%, #145A5A 100%);
    --ec-public-panel-decoration: rgba(212, 175, 55, 0.14);
    --ec-public-panel-decoration-secondary: rgba(255, 255, 255, 0.07);
    --ec-public-page-bg: radial-gradient(circle at 8% 8%, rgba(212, 175, 55, 0.09), transparent 42%), radial-gradient(circle at 90% 92%, rgba(20, 90, 90, 0.08), transparent 40%), linear-gradient(180deg, #F8FAFC 0%, #F1F5F9 100%);
    --ec-public-link: #66500D;
    --ec-public-input-focus: rgba(212, 175, 55, 0.28);
    --ec-cta-bg: #0F3D3E;
    --ec-footer-bg: #0F3D3E;
    --ec-footer-heading: #FFFFFF;
    --ec-footer-accent: #D4AF37;
    --ec-footer-border: rgba(212, 175, 55, 0.3);
    --ec-footer-text: #FFFFFF;
    --ec-footer-link: #D4AF37;
    --ec-footer-link-hover: #F4D03F;
}

[data-theme="burgundy-gold"] {
    --ec-primary: #5A1934;
    --ec-primary-deep: #5A1934;
    --ec-secondary: #7A2448;
    --ec-accent: #D4AF37;
    --ec-accent-rgb: 212, 175, 55;
    --ec-gold: #D4AF37;
    --ec-light-gold: #F4D03F;
    --ec-theme-success: #10B981;
    --ec-primary-soft: rgba(212, 175, 55, 0.14);
    --ec-bg: #FFF9F5;
    --ec-surface: #FFFFFF;
    --ec-surface-alt: #FFF9F5;
    --ec-focus: 0 0 0 0.25rem rgba(212, 175, 55, 0.3);
    --ec-public-hero-bg: radial-gradient(circle at 15% 20%, rgba(212, 175, 55, 0.16), transparent 38%), radial-gradient(circle at 85% 70%, rgba(122, 36, 72, 0.12), transparent 42%), linear-gradient(160deg, #FFF9F5 0%, #FFF3EC 55%, #FFFFFF 100%);
    --ec-public-panel-bg: linear-gradient(145deg, #5A1934 0%, #681E3E 58%, #7A2448 100%);
    --ec-public-panel-decoration: rgba(212, 175, 55, 0.14);
    --ec-public-panel-decoration-secondary: rgba(255, 255, 255, 0.07);
    --ec-public-page-bg: radial-gradient(circle at 8% 8%, rgba(212, 175, 55, 0.09), transparent 42%), radial-gradient(circle at 90% 92%, rgba(122, 36, 72, 0.08), transparent 40%), linear-gradient(180deg, #FFF9F5 0%, #FFF3EC 100%);
    --ec-public-link: #66500D;
    --ec-public-input-focus: rgba(212, 175, 55, 0.28);
    --ec-cta-bg: #5A1934;
    --ec-footer-bg: #5A1934;
    --ec-footer-heading: #FFFFFF;
    --ec-footer-accent: #D4AF37;
    --ec-footer-border: rgba(212, 175, 55, 0.3);
    --ec-footer-text: #FFFFFF;
    --ec-footer-link: #D4AF37;
    --ec-footer-link-hover: #F4D03F;
}

[data-theme="midnight-silver"] {
    --ec-primary: #0B132B;
    --ec-primary-deep: #0B132B;
    --ec-secondary: #1C2541;
    --ec-accent: #C0C7D1;
    --ec-accent-rgb: 192, 199, 209;
    --ec-gold: #C0C7D1;
    --ec-light-gold: #E2E8F0;
    --ec-theme-success: #10B981;
    --ec-primary-soft: rgba(192, 199, 209, 0.18);
    --ec-bg: #F8FAFC;
    --ec-surface: #FFFFFF;
    --ec-surface-alt: #F8FAFC;
    --ec-focus: 0 0 0 0.25rem rgba(28, 37, 65, 0.28);
    --ec-public-hero-bg: radial-gradient(circle at 15% 20%, rgba(192, 199, 209, 0.22), transparent 38%), radial-gradient(circle at 85% 70%, rgba(28, 37, 65, 0.12), transparent 42%), linear-gradient(160deg, #F8FAFC 0%, #F1F5F9 55%, #FFFFFF 100%);
    --ec-public-panel-bg: linear-gradient(145deg, #0B132B 0%, #121B35 58%, #1C2541 100%);
    --ec-public-panel-decoration: rgba(192, 199, 209, 0.16);
    --ec-public-panel-decoration-secondary: rgba(255, 255, 255, 0.07);
    --ec-public-page-bg: radial-gradient(circle at 8% 8%, rgba(192, 199, 209, 0.14), transparent 42%), radial-gradient(circle at 90% 92%, rgba(28, 37, 65, 0.08), transparent 40%), linear-gradient(180deg, #F8FAFC 0%, #F1F5F9 100%);
    --ec-public-link: #293652;
    --ec-public-input-focus: rgba(28, 37, 65, 0.24);
    --ec-cta-bg: #0B132B;
    --ec-footer-bg: #0B132B;
    --ec-footer-heading: #FFFFFF;
    --ec-footer-accent: #C0C7D1;
    --ec-footer-border: rgba(192, 199, 209, 0.3);
    --ec-footer-text: #FFFFFF;
    --ec-footer-link: #E2E8F0;
    --ec-footer-link-hover: #FFFFFF;
}

[data-theme="forest-gold"] {
    --ec-primary: #12372A;
    --ec-primary-deep: #12372A;
    --ec-secondary: #1F5A44;
    --ec-accent: #D4AF37;
    --ec-accent-rgb: 212, 175, 55;
    --ec-gold: #D4AF37;
    --ec-light-gold: #F4D03F;
    --ec-theme-success: #10B981;
    --ec-primary-soft: rgba(212, 175, 55, 0.14);
    --ec-bg: #F7FAF8;
    --ec-surface: #FFFFFF;
    --ec-surface-alt: #F7FAF8;
    --ec-focus: 0 0 0 0.25rem rgba(212, 175, 55, 0.3);
    --ec-public-hero-bg: radial-gradient(circle at 15% 20%, rgba(212, 175, 55, 0.16), transparent 38%), radial-gradient(circle at 85% 70%, rgba(31, 90, 68, 0.12), transparent 42%), linear-gradient(160deg, #F7FAF8 0%, #EFF6F2 55%, #FFFFFF 100%);
    --ec-public-panel-bg: linear-gradient(145deg, #12372A 0%, #184936 58%, #1F5A44 100%);
    --ec-public-panel-decoration: rgba(212, 175, 55, 0.14);
    --ec-public-panel-decoration-secondary: rgba(255, 255, 255, 0.07);
    --ec-public-page-bg: radial-gradient(circle at 8% 8%, rgba(212, 175, 55, 0.09), transparent 42%), radial-gradient(circle at 90% 92%, rgba(31, 90, 68, 0.08), transparent 40%), linear-gradient(180deg, #F7FAF8 0%, #EFF6F2 100%);
    --ec-public-link: #66500D;
    --ec-public-input-focus: rgba(212, 175, 55, 0.28);
    --ec-cta-bg: #12372A;
    --ec-footer-bg: #12372A;
    --ec-footer-heading: #FFFFFF;
    --ec-footer-accent: #D4AF37;
    --ec-footer-border: rgba(212, 175, 55, 0.3);
    --ec-footer-text: #FFFFFF;
    --ec-footer-link: #D4AF37;
    --ec-footer-link-hover: #F4D03F;
}

/* Public and Identity surfaces opt in for every non-default theme.
   The unqualified rules above remain the source of truth for default. */
[data-theme="navy-gold"] .ec-hero,
[data-theme="charcoal-gold"] .ec-hero,
[data-theme="deep-teal-gold"] .ec-hero,
[data-theme="burgundy-gold"] .ec-hero,
[data-theme="midnight-silver"] .ec-hero,
[data-theme="forest-gold"] .ec-hero,

[data-theme="custom"] .ec-hero {
    background: var(--ec-public-hero-bg);
}

[data-theme="navy-gold"] .ec-hero .text-primary,
[data-theme="charcoal-gold"] .ec-hero .text-primary,
[data-theme="deep-teal-gold"] .ec-hero .text-primary,
[data-theme="burgundy-gold"] .ec-hero .text-primary,
[data-theme="midnight-silver"] .ec-hero .text-primary,
[data-theme="forest-gold"] .ec-hero .text-primary,
[data-theme="custom"] .ec-hero .text-primary,
[data-theme="navy-gold"] .ec-auth-form-heading,
[data-theme="charcoal-gold"] .ec-auth-form-heading,
[data-theme="deep-teal-gold"] .ec-auth-form-heading,
[data-theme="burgundy-gold"] .ec-auth-form-heading,
[data-theme="midnight-silver"] .ec-auth-form-heading,
[data-theme="forest-gold"] .ec-auth-form-heading,

[data-theme="custom"] .ec-auth-form-heading {
    color: var(--ec-primary) !important;
}

[data-theme="navy-gold"] .ec-hero .ec-btn-outline,
[data-theme="charcoal-gold"] .ec-hero .ec-btn-outline,
[data-theme="deep-teal-gold"] .ec-hero .ec-btn-outline,
[data-theme="burgundy-gold"] .ec-hero .ec-btn-outline,
[data-theme="midnight-silver"] .ec-hero .ec-btn-outline,
[data-theme="forest-gold"] .ec-hero .ec-btn-outline,

[data-theme="custom"] .ec-hero .ec-btn-outline {
    border-color: rgba(var(--ec-accent-rgb), 0.72);
    color: var(--ec-primary);
    background: #FFFFFF;
}

[data-theme="navy-gold"] .ec-hero .ec-btn-outline:hover,
[data-theme="navy-gold"] .ec-hero .ec-btn-outline:focus-visible,
[data-theme="charcoal-gold"] .ec-hero .ec-btn-outline:hover,
[data-theme="deep-teal-gold"] .ec-hero .ec-btn-outline:hover,
[data-theme="burgundy-gold"] .ec-hero .ec-btn-outline:hover,
[data-theme="midnight-silver"] .ec-hero .ec-btn-outline:hover,
[data-theme="forest-gold"] .ec-hero .ec-btn-outline:hover,
[data-theme="custom"] .ec-hero .ec-btn-outline:hover,
[data-theme="charcoal-gold"] .ec-hero .ec-btn-outline:focus-visible,
[data-theme="deep-teal-gold"] .ec-hero .ec-btn-outline:focus-visible,
[data-theme="burgundy-gold"] .ec-hero .ec-btn-outline:focus-visible,
[data-theme="midnight-silver"] .ec-hero .ec-btn-outline:focus-visible,
[data-theme="forest-gold"] .ec-hero .ec-btn-outline:focus-visible,

[data-theme="custom"] .ec-hero .ec-btn-outline:focus-visible {
    border-color: var(--ec-light-gold);
    color: var(--ec-primary);
    background: rgba(var(--ec-accent-rgb), 0.12);
}

[data-theme="navy-gold"] .ec-feature-card .ec-icon-circle,
[data-theme="charcoal-gold"] .ec-feature-card .ec-icon-circle,
[data-theme="deep-teal-gold"] .ec-feature-card .ec-icon-circle,
[data-theme="burgundy-gold"] .ec-feature-card .ec-icon-circle,
[data-theme="midnight-silver"] .ec-feature-card .ec-icon-circle,
[data-theme="forest-gold"] .ec-feature-card .ec-icon-circle,
[data-theme="custom"] .ec-feature-card .ec-icon-circle,
[data-theme="navy-gold"] .ec-step-number,
[data-theme="charcoal-gold"] .ec-step-number,
[data-theme="deep-teal-gold"] .ec-step-number,
[data-theme="burgundy-gold"] .ec-step-number,
[data-theme="midnight-silver"] .ec-step-number,
[data-theme="forest-gold"] .ec-step-number,
[data-theme="custom"] .ec-step-number,
[data-theme="navy-gold"] .ec-pricing-badge,
[data-theme="charcoal-gold"] .ec-pricing-badge,
[data-theme="deep-teal-gold"] .ec-pricing-badge,
[data-theme="burgundy-gold"] .ec-pricing-badge,
[data-theme="midnight-silver"] .ec-pricing-badge,
[data-theme="forest-gold"] .ec-pricing-badge,

[data-theme="custom"] .ec-pricing-badge {
    background: rgba(var(--ec-accent-rgb), 0.16);
    color: var(--ec-primary);
}

[data-theme="navy-gold"] .ec-hero-visual,
[data-theme="charcoal-gold"] .ec-hero-visual,
[data-theme="deep-teal-gold"] .ec-hero-visual,
[data-theme="burgundy-gold"] .ec-hero-visual,
[data-theme="midnight-silver"] .ec-hero-visual,
[data-theme="forest-gold"] .ec-hero-visual,
[data-theme="custom"] .ec-hero-visual,
[data-theme="navy-gold"] .ec-auth-card,
[data-theme="charcoal-gold"] .ec-auth-card,
[data-theme="deep-teal-gold"] .ec-auth-card,
[data-theme="burgundy-gold"] .ec-auth-card,
[data-theme="midnight-silver"] .ec-auth-card,
[data-theme="forest-gold"] .ec-auth-card,

[data-theme="custom"] .ec-auth-card {
    border-color: rgba(var(--ec-accent-rgb), 0.34);
    box-shadow: 0 24px 55px rgba(15, 23, 42, 0.14);
}

[data-theme="navy-gold"] .ec-cta-band,
[data-theme="charcoal-gold"] .ec-cta-band,
[data-theme="deep-teal-gold"] .ec-cta-band,
[data-theme="burgundy-gold"] .ec-cta-band,
[data-theme="midnight-silver"] .ec-cta-band,
[data-theme="forest-gold"] .ec-cta-band,

[data-theme="custom"] .ec-cta-band {
    background: var(--ec-cta-bg);
}

[data-theme="navy-gold"] .ec-site-footer,
[data-theme="charcoal-gold"] .ec-site-footer,
[data-theme="deep-teal-gold"] .ec-site-footer,
[data-theme="burgundy-gold"] .ec-site-footer,
[data-theme="midnight-silver"] .ec-site-footer,
[data-theme="forest-gold"] .ec-site-footer,

[data-theme="custom"] .ec-site-footer {
    background: var(--ec-footer-bg);
    color: var(--ec-footer-text);
    border-top-color: rgba(var(--ec-accent-rgb), 0.35);
}

[data-theme="navy-gold"] .ec-site-footer a,
[data-theme="charcoal-gold"] .ec-site-footer a,
[data-theme="deep-teal-gold"] .ec-site-footer a,
[data-theme="burgundy-gold"] .ec-site-footer a,
[data-theme="midnight-silver"] .ec-site-footer a,
[data-theme="forest-gold"] .ec-site-footer a,

[data-theme="custom"] .ec-site-footer a {
    color: var(--ec-footer-link);
}

[data-theme="navy-gold"] .ec-site-footer a:hover,
[data-theme="navy-gold"] .ec-site-footer a:focus-visible,
[data-theme="charcoal-gold"] .ec-site-footer a:hover,
[data-theme="deep-teal-gold"] .ec-site-footer a:hover,
[data-theme="burgundy-gold"] .ec-site-footer a:hover,
[data-theme="midnight-silver"] .ec-site-footer a:hover,
[data-theme="forest-gold"] .ec-site-footer a:hover,
[data-theme="custom"] .ec-site-footer a:hover,
[data-theme="charcoal-gold"] .ec-site-footer a:focus-visible,
[data-theme="deep-teal-gold"] .ec-site-footer a:focus-visible,
[data-theme="burgundy-gold"] .ec-site-footer a:focus-visible,
[data-theme="midnight-silver"] .ec-site-footer a:focus-visible,
[data-theme="forest-gold"] .ec-site-footer a:focus-visible,

[data-theme="custom"] .ec-site-footer a:focus-visible {
    color: var(--ec-footer-link-hover);
    text-decoration: underline;
    text-underline-offset: 0.2em;
}

[data-theme="navy-gold"] .ec-auth-page,
[data-theme="charcoal-gold"] .ec-auth-page,
[data-theme="deep-teal-gold"] .ec-auth-page,
[data-theme="burgundy-gold"] .ec-auth-page,
[data-theme="midnight-silver"] .ec-auth-page,
[data-theme="forest-gold"] .ec-auth-page,

[data-theme="custom"] .ec-auth-page {
    background: var(--ec-public-page-bg);
}

[data-theme="navy-gold"] .ec-auth-side,
[data-theme="charcoal-gold"] .ec-auth-side,
[data-theme="deep-teal-gold"] .ec-auth-side,
[data-theme="burgundy-gold"] .ec-auth-side,
[data-theme="midnight-silver"] .ec-auth-side,
[data-theme="forest-gold"] .ec-auth-side,

[data-theme="custom"] .ec-auth-side {
    background: var(--ec-public-panel-bg);
}

[data-theme="navy-gold"] .ec-auth-side::before,
[data-theme="charcoal-gold"] .ec-auth-side::before,
[data-theme="deep-teal-gold"] .ec-auth-side::before,
[data-theme="burgundy-gold"] .ec-auth-side::before,
[data-theme="midnight-silver"] .ec-auth-side::before,
[data-theme="forest-gold"] .ec-auth-side::before,

[data-theme="custom"] .ec-auth-side::before {
    background: var(--ec-public-panel-decoration);
}

[data-theme="navy-gold"] .ec-auth-side::after,
[data-theme="charcoal-gold"] .ec-auth-side::after,
[data-theme="deep-teal-gold"] .ec-auth-side::after,
[data-theme="burgundy-gold"] .ec-auth-side::after,
[data-theme="midnight-silver"] .ec-auth-side::after,
[data-theme="forest-gold"] .ec-auth-side::after,

[data-theme="custom"] .ec-auth-side::after {
    background: var(--ec-public-panel-decoration-secondary);
}

[data-theme="navy-gold"] .ec-auth-brand-mark,
[data-theme="charcoal-gold"] .ec-auth-brand-mark,
[data-theme="deep-teal-gold"] .ec-auth-brand-mark,
[data-theme="burgundy-gold"] .ec-auth-brand-mark,
[data-theme="midnight-silver"] .ec-auth-brand-mark,
[data-theme="forest-gold"] .ec-auth-brand-mark,

[data-theme="custom"] .ec-auth-brand-mark {
    background: linear-gradient(145deg, var(--ec-light-gold), var(--ec-gold));
    box-shadow: 0 8px 22px rgba(var(--ec-accent-rgb), 0.3);
}

[data-theme="navy-gold"] .ec-auth-check,
[data-theme="charcoal-gold"] .ec-auth-check,
[data-theme="deep-teal-gold"] .ec-auth-check,
[data-theme="burgundy-gold"] .ec-auth-check,
[data-theme="midnight-silver"] .ec-auth-check,
[data-theme="forest-gold"] .ec-auth-check,

[data-theme="custom"] .ec-auth-check {
    color: var(--ec-primary);
    background: var(--ec-light-gold);
}

[data-theme="navy-gold"] .ec-auth-input,
[data-theme="charcoal-gold"] .ec-auth-input,
[data-theme="deep-teal-gold"] .ec-auth-input,
[data-theme="burgundy-gold"] .ec-auth-input,
[data-theme="midnight-silver"] .ec-auth-input,
[data-theme="forest-gold"] .ec-auth-input,

[data-theme="custom"] .ec-auth-input {
    border-color: #9CA3AF;
}

[data-theme="navy-gold"] .ec-auth-input:focus,
[data-theme="navy-gold"] .ec-auth-input:focus-visible,
[data-theme="charcoal-gold"] .ec-auth-input:focus,
[data-theme="deep-teal-gold"] .ec-auth-input:focus,
[data-theme="burgundy-gold"] .ec-auth-input:focus,
[data-theme="midnight-silver"] .ec-auth-input:focus,
[data-theme="forest-gold"] .ec-auth-input:focus,
[data-theme="custom"] .ec-auth-input:focus,
[data-theme="charcoal-gold"] .ec-auth-input:focus-visible,
[data-theme="deep-teal-gold"] .ec-auth-input:focus-visible,
[data-theme="burgundy-gold"] .ec-auth-input:focus-visible,
[data-theme="midnight-silver"] .ec-auth-input:focus-visible,
[data-theme="forest-gold"] .ec-auth-input:focus-visible,

[data-theme="custom"] .ec-auth-input:focus-visible {
    border-color: var(--ec-gold);
    box-shadow: 0 0 0 0.2rem var(--ec-public-input-focus);
}

[data-theme="navy-gold"] .ec-auth-link-list a,
[data-theme="navy-gold"] .ec-auth-inline-link a,
[data-theme="charcoal-gold"] .ec-auth-link-list a,
[data-theme="deep-teal-gold"] .ec-auth-link-list a,
[data-theme="burgundy-gold"] .ec-auth-link-list a,
[data-theme="midnight-silver"] .ec-auth-link-list a,
[data-theme="forest-gold"] .ec-auth-link-list a,
[data-theme="custom"] .ec-auth-link-list a,
[data-theme="charcoal-gold"] .ec-auth-inline-link a,
[data-theme="deep-teal-gold"] .ec-auth-inline-link a,
[data-theme="burgundy-gold"] .ec-auth-inline-link a,
[data-theme="midnight-silver"] .ec-auth-inline-link a,
[data-theme="forest-gold"] .ec-auth-inline-link a,

[data-theme="custom"] .ec-auth-inline-link a {
    color: var(--ec-public-link);
}

[data-theme="navy-gold"] .ec-auth-page .form-check-input:focus,
[data-theme="charcoal-gold"] .ec-auth-page .form-check-input:focus,
[data-theme="deep-teal-gold"] .ec-auth-page .form-check-input:focus,
[data-theme="burgundy-gold"] .ec-auth-page .form-check-input:focus,
[data-theme="midnight-silver"] .ec-auth-page .form-check-input:focus,
[data-theme="forest-gold"] .ec-auth-page .form-check-input:focus,

[data-theme="custom"] .ec-auth-page .form-check-input:focus {
    border-color: var(--ec-gold);
    box-shadow: 0 0 0 0.2rem var(--ec-public-input-focus);
}

[data-theme="navy-gold"] .ec-auth-page .form-check-input:checked,
[data-theme="charcoal-gold"] .ec-auth-page .form-check-input:checked,
[data-theme="deep-teal-gold"] .ec-auth-page .form-check-input:checked,
[data-theme="burgundy-gold"] .ec-auth-page .form-check-input:checked,
[data-theme="midnight-silver"] .ec-auth-page .form-check-input:checked,
[data-theme="forest-gold"] .ec-auth-page .form-check-input:checked,

[data-theme="custom"] .ec-auth-page .form-check-input:checked {
    background-color: var(--ec-primary);
    border-color: var(--ec-gold);
}

[data-theme="navy-gold"] .ec-nav,
[data-theme="charcoal-gold"] .ec-nav,
[data-theme="deep-teal-gold"] .ec-nav,
[data-theme="burgundy-gold"] .ec-nav,
[data-theme="midnight-silver"] .ec-nav,
[data-theme="forest-gold"] .ec-nav,

[data-theme="custom"] .ec-nav {
    background: var(--ec-primary);
    box-shadow: 0 8px 22px rgba(15, 23, 42, 0.22);
}

[data-theme="navy-gold"] .ec-admin-sidebar,
[data-theme="charcoal-gold"] .ec-admin-sidebar,
[data-theme="deep-teal-gold"] .ec-admin-sidebar,
[data-theme="burgundy-gold"] .ec-admin-sidebar,
[data-theme="midnight-silver"] .ec-admin-sidebar,
[data-theme="forest-gold"] .ec-admin-sidebar,

[data-theme="custom"] .ec-admin-sidebar {
    background:
        radial-gradient(circle at top, rgba(255, 255, 255, 0.12), transparent 26%),
        linear-gradient(180deg, var(--ec-primary) 0%, var(--ec-primary-deep) 100%);
}

[data-theme="navy-gold"] .ec-main-links .nav-link.active,
[data-theme="charcoal-gold"] .ec-main-links .nav-link.active,
[data-theme="deep-teal-gold"] .ec-main-links .nav-link.active,
[data-theme="burgundy-gold"] .ec-main-links .nav-link.active,
[data-theme="midnight-silver"] .ec-main-links .nav-link.active,
[data-theme="forest-gold"] .ec-main-links .nav-link.active,
[data-theme="custom"] .ec-main-links .nav-link.active,
[data-theme="navy-gold"] .ec-admin-nav .nav-link.active,
[data-theme="charcoal-gold"] .ec-admin-nav .nav-link.active,
[data-theme="deep-teal-gold"] .ec-admin-nav .nav-link.active,
[data-theme="burgundy-gold"] .ec-admin-nav .nav-link.active,
[data-theme="midnight-silver"] .ec-admin-nav .nav-link.active,
[data-theme="forest-gold"] .ec-admin-nav .nav-link.active,

[data-theme="custom"] .ec-admin-nav .nav-link.active {
    color: #FFFFFF;
    background: rgba(var(--ec-accent-rgb), 0.2);
    border-color: rgba(var(--ec-accent-rgb), 0.55);
}

[data-theme="navy-gold"] .ec-btn-primary,
[data-theme="charcoal-gold"] .ec-btn-primary,
[data-theme="deep-teal-gold"] .ec-btn-primary,
[data-theme="burgundy-gold"] .ec-btn-primary,
[data-theme="midnight-silver"] .ec-btn-primary,
[data-theme="forest-gold"] .ec-btn-primary,

[data-theme="custom"] .ec-btn-primary {
    background: var(--ec-primary);
    border-color: var(--ec-accent);
    color: #FFFFFF;
}

[data-theme="navy-gold"] .ec-btn-primary:hover,
[data-theme="navy-gold"] .ec-btn-primary:focus,
[data-theme="charcoal-gold"] .ec-btn-primary:hover,
[data-theme="deep-teal-gold"] .ec-btn-primary:hover,
[data-theme="burgundy-gold"] .ec-btn-primary:hover,
[data-theme="midnight-silver"] .ec-btn-primary:hover,
[data-theme="forest-gold"] .ec-btn-primary:hover,
[data-theme="custom"] .ec-btn-primary:hover,
[data-theme="charcoal-gold"] .ec-btn-primary:focus,
[data-theme="deep-teal-gold"] .ec-btn-primary:focus,
[data-theme="burgundy-gold"] .ec-btn-primary:focus,
[data-theme="midnight-silver"] .ec-btn-primary:focus,
[data-theme="forest-gold"] .ec-btn-primary:focus,

[data-theme="custom"] .ec-btn-primary:focus {
    background: var(--ec-primary-deep);
    border-color: var(--ec-light-gold);
    color: #FFFFFF;
}

[data-theme="navy-gold"] .ec-pricing-card,
[data-theme="charcoal-gold"] .ec-pricing-card,
[data-theme="deep-teal-gold"] .ec-pricing-card,
[data-theme="burgundy-gold"] .ec-pricing-card,
[data-theme="midnight-silver"] .ec-pricing-card,
[data-theme="forest-gold"] .ec-pricing-card,
[data-theme="custom"] .ec-pricing-card,
[data-theme="navy-gold"] .plan-card,
[data-theme="charcoal-gold"] .plan-card,
[data-theme="deep-teal-gold"] .plan-card,
[data-theme="burgundy-gold"] .plan-card,
[data-theme="midnight-silver"] .plan-card,
[data-theme="forest-gold"] .plan-card,

[data-theme="custom"] .plan-card {
    border-color: rgba(var(--ec-accent-rgb), 0.45) !important;
}

[data-theme="navy-gold"] .ec-pricing-price,
[data-theme="charcoal-gold"] .ec-pricing-price,
[data-theme="deep-teal-gold"] .ec-pricing-price,
[data-theme="burgundy-gold"] .ec-pricing-price,
[data-theme="midnight-silver"] .ec-pricing-price,
[data-theme="forest-gold"] .ec-pricing-price,

[data-theme="custom"] .ec-pricing-price {
    color: var(--ec-public-link);
}

.ec-theme-options {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1rem;
}

.ec-theme-option {
    cursor: pointer;
    display: flex;
    gap: 0.85rem;
    padding: 1.2rem;
    border: 2px solid var(--ec-border);
    border-radius: var(--ec-radius);
    background: var(--ec-surface);
    transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

.ec-theme-option:has(input:checked) {
    border-color: var(--ec-accent);
    box-shadow: var(--ec-focus);
    transform: translateY(-1px);
}

.ec-theme-option input {
    margin-top: 0.3rem;
    accent-color: var(--ec-accent);
}

.ec-theme-option-content {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    color: var(--ec-muted);
}

.ec-theme-option-content strong {
    color: var(--ec-text);
    font-size: 1.05rem;
}

.ec-theme-swatches {
    display: flex;
    gap: 0.4rem;
    margin-top: 0.7rem;
}

.ec-theme-swatches i {
    width: 2rem;
    height: 1.25rem;
    border-radius: 999px;
    background: var(--swatch);
    border: 1px solid rgba(15, 23, 42, 0.18);
}

/* Custom theme values are validated and emitted on the root element. */
[data-theme="custom"] {
    --ec-primary-soft: rgba(var(--ec-accent-rgb), 0.14);
    --ec-focus: 0 0 0 0.25rem rgba(var(--ec-accent-rgb), 0.3);
    --ec-surface: #FFFFFF;
    --ec-border: #E5E7EB;
    --ec-text: #111827;
    --ec-muted: #6B7280;
    --ec-public-panel-bg: var(--ec-primary);
    --ec-public-page-bg: var(--ec-bg);
    --ec-public-hero-bg: var(--ec-bg);
    --ec-public-panel-decoration: rgba(var(--ec-accent-rgb), 0.14);
    --ec-public-panel-decoration-secondary: rgba(255, 255, 255, 0.07);
    --ec-public-link: var(--ec-primary);
    --ec-public-input-focus: rgba(var(--ec-accent-rgb), 0.28);
    --ec-footer-heading: var(--ec-primary-foreground);
    --ec-footer-text: var(--ec-primary-foreground);
    --ec-footer-link-hover: var(--ec-primary-foreground);
    --ec-footer-border: rgba(var(--ec-accent-rgb), 0.3);
}

[data-theme="custom"] .ec-nav,
[data-theme="custom"] .ec-admin-sidebar,
[data-theme="custom"] .ec-btn-primary {
    color: var(--ec-primary-foreground);
}

[data-theme="custom"] .ec-admin-shell {
    background: var(--ec-bg);
}

[data-theme="custom"] .ec-nav .nav-link,
[data-theme="custom"] .ec-admin-sidebar .nav-link,
[data-theme="custom"] .ec-admin-nav .nav-link.active {
    color: var(--ec-primary-foreground);
}

[data-theme="custom"] .ec-btn-primary,
[data-theme="custom"] .ec-btn-primary:hover,
[data-theme="custom"] .ec-btn-primary:focus {
    color: var(--ec-primary-foreground);
}

.ec-custom-theme-editor {
    padding: 1.25rem;
    border: 1px solid var(--ec-border);
    border-radius: var(--ec-radius);
    background: var(--ec-surface-alt);
}

.ec-custom-theme-fields {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
    gap: 1rem;
}

.ec-custom-theme-field label {
    display: block;
    margin-bottom: 0.4rem;
    font-weight: 700;
}

.ec-colour-inputs {
    display: flex;
    align-items: center;
    gap: 0.65rem;
}

.ec-colour-inputs input[type="color"] {
    width: 3rem;
    height: 2.5rem;
    padding: 0.15rem;
    border: 1px solid var(--ec-border);
    border-radius: 0.5rem;
    background: var(--ec-surface);
}

.ec-custom-theme-preview {
    margin-top: 1.25rem;
    overflow: hidden;
    border: 1px solid var(--ec-border);
    border-radius: 0.75rem;
    --preview-primary: #0F172A;
    --preview-primary-foreground: #FFFFFF;
    --preview-accent: #D4AF37;
    --preview-accent-foreground: #111827;
    --preview-background: #F8FAFC;
}

.ec-custom-theme-preview-header {
    padding: 0.75rem 1rem;
    color: var(--preview-primary-foreground);
    background: var(--preview-primary);
    font-weight: 700;
}

.ec-custom-theme-preview-body {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 1rem;
    background: var(--preview-background);
}

.ec-custom-theme-preview button {
    padding: 0.45rem 0.8rem;
    border: 1px solid var(--preview-accent);
    border-radius: 0.45rem;
    background: var(--preview-accent);
    color: var(--preview-accent-foreground);
}
