/* ===== VARIABLES & RESET ===== */
:root {
    --primary: #E12029;
    /* Alfamart Red */
    --primary-dark: #B91A21;
    --primary-light: #FF4D54;
    --secondary: #FFE900;
    /* Alfamart Yellow */
    --secondary-dark: #FFD700;
    --accent: #00A651;
    /* Keep a nice green */
    --warning: #FFB347;
    --info: #4ECDC4;
    --bg: #F8F9FA;
    --bg-card: #FFFFFF;
    --bg-sidebar: #E12029;
    /* Red Sidebar */
    --bg-sidebar-hover: #B91A21;
    --text: #2D3436;
    --text-secondary: #636E72;
    --text-light: #B2BEC3;
    --border: #E0E0E0;
    --shadow: 0 10px 28px rgba(15, 23, 42, 0.08);
    --shadow-lg: 0 20px 42px rgba(15, 23, 42, 0.14);
    --radius: 12px;
    --radius-sm: 8px;
    --sidebar-width: 260px;
    --topbar-height: 65px;
    --transition: all 0.3s ease;
}

[data-theme="dark"] {
    --bg: #121212;
    --bg-card: #1E1E2E;
    --text: #E0E0E0;
    --text-secondary: #A0A0B0;
    --text-light: #666680;
    --border: #333350;
    --shadow: 0 10px 28px rgba(0, 0, 0, 0.28);
    --shadow-lg: 0 20px 42px rgba(0, 0, 0, 0.4);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
    background: var(--bg);
    color: var(--text);
    display: flex;
    min-height: 100vh;
    overflow-x: hidden;
}

a {
    text-decoration: none;
    color: inherit;
}

button {
    cursor: pointer;
    border: none;
    outline: none;
    font-family: inherit;
}

input,
select,
textarea {
    font-family: inherit;
    outline: none;
}

body.sidebar-mobile-open {
    overflow: hidden;
}

body.guest-mode .sidebar,
body.guest-mode .sidebar-backdrop {
    display: none;
}

/* ===== SIDEBAR ===== */
.sidebar {
    width: var(--sidebar-width);
    background: var(--bg-sidebar);
    color: #fff;
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    z-index: 1000;
    display: flex;
    flex-direction: column;
    transition: var(--transition);
    overflow-y: auto;
}

.sidebar.collapsed {
    width: 70px;
}

.sidebar.collapsed .logo span,
.sidebar.collapsed .user-info,
.sidebar.collapsed .sidebar-menu span,
.sidebar.collapsed .menu-label {
    display: none;
}

.sidebar.collapsed .sidebar-guest-intro {
    display: none !important;
}

.sidebar.collapsed .sidebar-menu a {
    justify-content: center;
    padding: 14px;
}

.sidebar.collapsed .sidebar-menu a i {
    margin-right: 0;
    font-size: 18px;
}

.sidebar-header {
    padding: 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.sidebar-close {
    display: none;
    width: 38px;
    height: 38px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.12);
    color: #fff;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.sidebar-close:hover {
    background: rgba(255, 255, 255, 0.2);
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 20px;
    font-weight: 800;
}

.logo i {
    font-size: 28px;
    color: var(--secondary);
}

.brand-asset-slot {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.brand-asset-slot-compact {
    width: 44px;
    height: 44px;
}

.brand-asset-slot-topbar {
    width: 44px;
    height: 44px;
}

.brand-asset-slot-auth {
    width: 92px;
    height: 92px;
    margin-bottom: 6px;
}

.brand-asset-slot-about {
    width: 96px;
    height: 96px;
}

.brand-asset-image {
    display: block;
    width: 100%;
    height: auto;
}

.brand-asset-image-compact,
.brand-asset-image-topbar {
    width: 44px;
    height: 44px;
}

.brand-asset-image-auth,
.brand-asset-image-about {
    width: 92px;
    height: 92px;
}

.brand-asset-image-hero {
    width: 96px;
    height: 96px;
}

.brand-mark {
    position: relative;
    width: 54px;
    height: 54px;
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 18px;
    background:
        radial-gradient(circle at 30% 30%, rgba(255, 255, 255, 0.18), transparent 48%),
        linear-gradient(160deg, #171b24 0%, #2b3342 56%, #842433 100%);
    box-shadow: 0 18px 34px rgba(23, 27, 36, 0.28);
    overflow: hidden;
}

.brand-mark-compact {
    width: 44px;
    height: 44px;
    border-radius: 14px;
    box-shadow: 0 12px 24px rgba(23, 27, 36, 0.24);
}

.brand-mark-auth {
    width: 92px;
    height: 92px;
    border-radius: 28px;
}

.brand-mark::before {
    content: '';
    position: absolute;
    inset: 1px;
    border-radius: inherit;
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.brand-mark-core,
.brand-mark-ring,
.brand-mark-accent {
    position: absolute;
}

.brand-mark-core {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: linear-gradient(145deg, #f6d6d8, #ffffff);
    box-shadow: 0 0 0 8px rgba(214, 76, 95, 0.16);
    animation: brandCorePulse 4.6s ease-in-out infinite;
}

.brand-mark-ring {
    border-radius: 999px;
    border: 1.5px solid rgba(255, 255, 255, 0.52);
}

.brand-mark-ring.ring-outer {
    width: 34px;
    height: 34px;
    border-top-color: transparent;
    border-right-color: rgba(255, 169, 181, 0.92);
    animation: brandOrbit 11s linear infinite;
}

.brand-mark-ring.ring-inner {
    width: 24px;
    height: 24px;
    border-left-color: transparent;
    border-bottom-color: rgba(255, 224, 160, 0.92);
    animation: brandOrbitReverse 8s linear infinite;
}

.brand-mark-accent {
    width: 32px;
    height: 2px;
    border-radius: 999px;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.95), transparent);
}

.brand-mark-accent.accent-top {
    transform: rotate(44deg);
}

.brand-mark-accent.accent-bottom {
    transform: rotate(-44deg);
}

@keyframes brandCorePulse {
    0%, 100% {
        transform: scale(0.92);
        box-shadow: 0 0 0 8px rgba(214, 76, 95, 0.16);
    }
    50% {
        transform: scale(1.04);
        box-shadow: 0 0 0 12px rgba(214, 76, 95, 0.08);
    }
}

@keyframes brandOrbit {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

@keyframes brandOrbitReverse {
    from { transform: rotate(360deg); }
    to { transform: rotate(0deg); }
}

.sidebar-user {
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 12px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.sidebar-guest-intro {
    margin: 16px;
    padding: 18px;
    border-radius: 18px;
    background:
        radial-gradient(circle at top right, rgba(255, 255, 255, 0.12), transparent 40%),
        rgba(18, 22, 30, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.12);
    box-shadow: 0 14px 28px rgba(23, 27, 36, 0.18);
}

.sidebar-guest-intro span {
    display: inline-flex;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.62);
}

.sidebar-guest-intro p {
    margin: 10px 0 14px;
    font-size: 13px;
    line-height: 1.65;
    color: rgba(255, 255, 255, 0.9);
}

.sidebar-guest-intro .btn {
    width: 100%;
    justify-content: center;
    border-color: rgba(255, 255, 255, 0.26);
    color: #fff;
}

.sidebar-guest-intro .btn:hover {
    background: rgba(255, 255, 255, 0.12);
    border-color: rgba(255, 255, 255, 0.4);
}

.user-avatar i {
    font-size: 40px;
    color: var(--secondary);
}

.user-info {
    display: flex;
    flex-direction: column;
}

.user-name {
    font-weight: 600;
    font-size: 14px;
}

.user-role {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.7);
    text-transform: capitalize;
}

.sidebar-menu {
    list-style: none;
    padding: 10px 0;
    flex: 1;
}

.menu-label {
    padding: 12px 20px 6px;
    font-size: 11px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.3);
    letter-spacing: 1.5px;
}

.sidebar-menu a {
    display: flex;
    align-items: center;
    padding: 12px 20px;
    color: rgba(255, 255, 255, 0.7);
    transition: var(--transition);
    border-left: 3px solid transparent;
    font-size: 14px;
}

.sidebar-menu a:hover {
    background: var(--bg-sidebar-hover);
    color: #fff;
}

.sidebar-menu a.active {
    background: var(--bg-sidebar-hover);
    color: var(--secondary);
    border-left-color: var(--secondary);
}

.sidebar-menu a i {
    margin-right: 12px;
    width: 20px;
    text-align: center;
}

.sidebar-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.48);
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
    z-index: 900;
}

.sidebar-backdrop.active {
    opacity: 1;
    visibility: visible;
}

/* ===== MAIN CONTENT ===== */
.main-content {
    flex: 1;
    margin-left: var(--sidebar-width);
    transition: var(--transition);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.sidebar.collapsed~.main-content {
    margin-left: 70px;
}

body.guest-mode .main-content {
    margin-left: 0;
}

/* ===== TOPBAR ===== */
.topbar {
    height: var(--topbar-height);
    background: var(--bg-card);
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    padding: 0 24px;
    gap: 16px;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: var(--shadow);
}

.menu-btn {
    display: none;
    width: 42px;
    height: 42px;
    border-radius: 12px;
    background: var(--bg);
    border: 1px solid var(--border);
    font-size: 18px;
    color: var(--text);
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.menu-btn:hover {
    border-color: var(--primary);
    color: var(--primary);
    background: rgba(225, 32, 41, 0.05);
}

.topbar-brand {
    display: none;
    align-items: center;
    gap: 12px;
    padding: 0;
    background: transparent;
    color: var(--text);
}

.topbar-brand-copy {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    text-align: left;
}

.topbar-brand-copy strong {
    font-size: 15px;
    line-height: 1.2;
}

.topbar-brand-copy small {
    color: var(--text-secondary);
    font-size: 12px;
    line-height: 1.4;
}

.guest-topbar-nav {
    display: none;
    align-items: center;
    gap: 8px;
}

.guest-topbar-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 14px;
    border-radius: 999px;
    border: 1px solid var(--border);
    background: var(--bg);
    color: var(--text-secondary);
    font-size: 13px;
    font-weight: 600;
    transition: var(--transition);
}

.guest-topbar-link:hover,
.guest-topbar-link.active {
    border-color: rgba(225, 32, 41, 0.22);
    background: rgba(225, 32, 41, 0.08);
    color: var(--primary);
}

body.guest-mode .topbar {
    height: auto;
    min-height: var(--topbar-height);
    flex-wrap: wrap;
    padding-top: 14px;
    padding-bottom: 14px;
}

body.guest-mode .menu-btn {
    display: none !important;
}

.topbar-search {
    flex: 1;
    max-width: 500px;
    position: relative;
}

.topbar-search i {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-light);
}

.topbar-search input {
    width: 100%;
    padding: 10px 14px 10px 42px;
    border: 2px solid var(--border);
    border-radius: 25px;
    background: var(--bg);
    color: var(--text);
    font-size: 14px;
    transition: var(--transition);
}

.topbar-search input:focus {
    border-color: var(--primary);
}

.topbar-actions {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-left: auto;
}

.theme-toggle {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--bg);
    color: var(--text);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    transition: var(--transition);
}

.theme-toggle:hover {
    background: var(--primary);
    color: #fff;
}

.user-menu {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    padding: 8px 12px;
    border-radius: var(--radius-sm);
    transition: var(--transition);
    position: relative;
    font-size: 14px;
    font-weight: 500;
}

.user-menu:hover {
    background: var(--bg);
}

.user-menu i.fa-user-circle {
    font-size: 28px;
    color: var(--primary);
}

.user-menu .fa-chevron-down {
    font-size: 10px;
}

.user-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    box-shadow: var(--shadow-lg);
    min-width: 200px;
    display: none;
    z-index: 1001;
}

.user-dropdown.show {
    display: block;
}

.user-dropdown a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    font-size: 14px;
    color: var(--text);
    transition: var(--transition);
}

.user-dropdown a:hover {
    background: var(--bg);
}

.user-dropdown hr {
    border: none;
    border-top: 1px solid var(--border);
    margin: 4px 0;
}

/* ===== PAGE CONTENT ===== */
.page-content {
    padding: 24px;
    flex: 1;
    will-change: transform, opacity;
}

.page-slide-forward {
    animation: pageSlideForward 360ms cubic-bezier(0.2, 0.75, 0.25, 1);
}

.page-slide-backward {
    animation: pageSlideBackward 360ms cubic-bezier(0.2, 0.75, 0.25, 1);
}

@keyframes pageSlideForward {
    from {
        opacity: 0;
        transform: translate3d(36px, 0, 0);
    }
    to {
        opacity: 1;
        transform: translate3d(0, 0, 0);
    }
}

@keyframes pageSlideBackward {
    from {
        opacity: 0;
        transform: translate3d(-36px, 0, 0);
    }
    to {
        opacity: 1;
        transform: translate3d(0, 0, 0);
    }
}

@media (prefers-reduced-motion: reduce) {
    .page-slide-forward,
    .page-slide-backward {
        animation: none;
    }
}

/* ===== BUTTONS ===== */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    border-radius: var(--radius-sm);
    font-weight: 600;
    font-size: 14px;
    transition: var(--transition);
    border: 2px solid transparent;
}

.btn:hover {
    transform: translateY(-1px);
}

.btn:active {
    transform: translateY(0);
}

.btn-primary {
    background: var(--primary);
    color: #fff;
}

.btn-primary:hover {
    background: var(--primary-dark);
    box-shadow: 0 10px 24px rgba(225, 32, 41, 0.24);
}

.btn-secondary {
    background: var(--bg);
    color: var(--text);
    border-color: var(--border);
}

.btn-secondary:hover {
    border-color: var(--primary);
    color: var(--primary);
}

.btn-success {
    background: var(--secondary);
    color: #fff;
}

.btn-success:hover {
    background: #25b888;
}

.btn-danger {
    background: var(--accent);
    color: #fff;
}

.btn-danger:hover {
    background: #e55a5a;
}

.btn-outline {
    background: transparent;
    border: 2px solid var(--primary);
    color: var(--primary);
}

.btn-outline:hover {
    background: var(--primary);
    color: #fff;
}

.btn-sm {
    padding: 6px 14px;
    font-size: 12px;
}

.btn-lg {
    padding: 14px 28px;
    font-size: 16px;
}

.btn-full {
    width: 100%;
    justify-content: center;
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none !important;
}

/* ===== CARDS ===== */
.card {
    background: var(--bg-card);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    border: 1px solid var(--border);
    overflow: hidden;
    transition: var(--transition);
}

.card:hover {
    box-shadow: var(--shadow-lg);
}

.card-header {
    padding: 20px 24px;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.card-header h3 {
    font-size: 16px;
    font-weight: 700;
}

.card-body {
    padding: 24px;
}

.card-footer {
    padding: 16px 24px;
    border-top: 1px solid var(--border);
}

/* ===== STAT CARDS ===== */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 20px;
    margin-bottom: 24px;
}

.stat-card {
    background: var(--bg-card);
    border-radius: var(--radius);
    padding: 24px;
    display: flex;
    align-items: center;
    gap: 16px;
    box-shadow: var(--shadow);
    border: 1px solid var(--border);
    transition: var(--transition);
}

.stat-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.stat-icon {
    width: 56px;
    height: 56px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
}

.stat-icon.purple {
    background: rgba(108, 99, 255, 0.12);
    color: var(--primary);
}

.stat-icon.green {
    background: rgba(46, 216, 163, 0.12);
    color: var(--secondary);
}

.stat-icon.red {
    background: rgba(255, 107, 107, 0.12);
    color: var(--accent);
}

.stat-icon.orange {
    background: rgba(255, 179, 71, 0.12);
    color: var(--warning);
}

.stat-icon.blue {
    background: rgba(78, 205, 196, 0.12);
    color: var(--info);
}

.stat-info h4 {
    font-size: 28px;
    font-weight: 800;
    line-height: 1;
}

.stat-info p {
    font-size: 13px;
    color: var(--text-secondary);
    margin-top: 4px;
}

/* ===== TEST CARDS GRID ===== */
.tests-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 24px;
}

.test-card {
    background: var(--bg-card);
    border-radius: var(--radius);
    border: 1px solid var(--border);
    box-shadow: var(--shadow);
    overflow: hidden;
    cursor: pointer;
    transition: var(--transition);
    position: relative;
}

.test-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-lg);
}

.test-card-badge {
    position: absolute;
    top: 12px;
    right: 12px;
    padding: 5px 10px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    letter-spacing: 0.03em;
}

.badge-intelligence {
    background: rgba(108, 99, 255, 0.14);
    color: #4b2ea9;
}

.badge-personality {
    background: rgba(255, 107, 107, 0.14);
    color: #9f1f25;
}

.badge-interest {
    background: rgba(46, 216, 163, 0.16);
    color: #0f7e55;
}

.badge-aptitude {
    background: rgba(255, 179, 71, 0.18);
    color: #9a5600;
}

.status-info {
    background: rgba(78, 205, 196, 0.15);
    color: #0d7f78;
}

.test-card-icon {
    height: 120px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 48px;
    position: relative;
    overflow: hidden;
}

.test-card-icon::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    opacity: 0.08;
}

.test-card-icon.purple {
    color: var(--primary);
    background: linear-gradient(135deg, rgba(108, 99, 255, 0.08), rgba(108, 99, 255, 0.02));
}

.test-card-icon.green {
    color: var(--secondary);
    background: linear-gradient(135deg, rgba(46, 216, 163, 0.08), rgba(46, 216, 163, 0.02));
}

.test-card-icon.red {
    color: var(--accent);
    background: linear-gradient(135deg, rgba(255, 107, 107, 0.08), rgba(255, 107, 107, 0.02));
}

.test-card-icon.orange {
    color: var(--warning);
    background: linear-gradient(135deg, rgba(255, 179, 71, 0.08), rgba(255, 179, 71, 0.02));
}

.test-card-icon.blue {
    color: var(--info);
    background: linear-gradient(135deg, rgba(78, 205, 196, 0.08), rgba(78, 205, 196, 0.02));
}

.test-card-body {
    padding: 20px;
}

.test-card-body h3 {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 6px;
}

.test-card-body .test-subtitle {
    font-size: 13px;
    color: var(--primary-dark);
    font-weight: 700;
    margin-bottom: 10px;
}

.test-card-body p {
    font-size: 13px;
    color: var(--text-secondary);
    line-height: 1.5;
    margin-bottom: 12px;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    overflow: hidden;
    min-height: 39px;
}

.test-card-meta {
    display: flex;
    gap: 16px;
    font-size: 12px;
    color: var(--text-light);
}

.test-card-meta span {
    display: flex;
    align-items: center;
    gap: 4px;
}

.test-card-footer {
    padding: 12px 20px;
    border-top: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
}

.test-card-helper {
    flex: 1;
    font-size: 12px;
    color: var(--text-secondary);
    line-height: 1.4;
}

.bank-readiness-panel {
    margin: 0 0 24px;
    padding: 20px 22px;
    border-radius: 18px;
    border: 1px solid var(--border);
    background: linear-gradient(135deg, rgba(225, 32, 41, 0.05), rgba(255, 233, 0, 0.08), rgba(78, 205, 196, 0.08));
    display: grid;
    grid-template-columns: minmax(0, 1.8fr) minmax(260px, 1fr);
    gap: 18px;
    box-shadow: var(--shadow);
}

.bank-readiness-panel.loading {
    opacity: 0.8;
}

.bank-readiness-copy .eyebrow {
    display: inline-flex;
    margin-bottom: 8px;
    padding: 4px 10px;
    border-radius: 999px;
    background: rgba(225, 32, 41, 0.08);
    color: var(--primary);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.bank-readiness-copy h3 {
    font-size: 22px;
    margin-bottom: 8px;
}

.bank-readiness-copy p {
    color: var(--text-secondary);
    line-height: 1.5;
}

.bank-readiness-stats {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 12px;
    flex-wrap: wrap;
}

.bank-readiness-stat {
    min-width: 120px;
    padding: 12px 14px;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.86);
    border: 1px solid rgba(255, 255, 255, 0.7);
}

.bank-readiness-stat strong {
    display: block;
    font-size: 24px;
    line-height: 1;
}

.bank-readiness-stat span {
    display: block;
    margin-top: 4px;
    color: var(--text-secondary);
    font-size: 12px;
}

.bank-readiness-chips {
    grid-column: 1 / -1;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.bank-readiness-chip {
    display: inline-flex;
    align-items: center;
    padding: 7px 12px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 600;
    border: 1px solid transparent;
}

.bank-readiness-chip.warning {
    background: rgba(255, 179, 71, 0.14);
    color: #9a5600;
    border-color: rgba(255, 179, 71, 0.24);
}

.bank-readiness-chip.success {
    background: rgba(0, 166, 81, 0.12);
    color: #0a7b40;
    border-color: rgba(0, 166, 81, 0.22);
}

.test-card-ready {
    border-color: rgba(0, 166, 81, 0.18);
}

.test-card-empty {
    border-color: rgba(225, 32, 41, 0.18);
}

.test-card-pending {
    border-color: rgba(78, 205, 196, 0.2);
}

.test-card-status {
    margin-bottom: 12px;
    padding: 10px 12px;
    border-radius: 12px;
    display: flex;
    flex-direction: column;
    gap: 4px;
    font-size: 12px;
    font-weight: 700;
}

.test-card-status i {
    margin-right: 6px;
}

.test-card-status span {
    font-size: 12px;
    font-weight: 500;
    color: var(--text-secondary);
}

.test-card-status.ready {
    background: rgba(0, 166, 81, 0.09);
    color: #0a7b40;
}

.test-card-status.empty {
    background: rgba(225, 32, 41, 0.08);
    color: var(--primary);
}

.test-card-status.pending {
    background: rgba(78, 205, 196, 0.12);
    color: #0d7f78;
}

.test-card-status.built-in {
    background: rgba(15, 23, 42, 0.05);
    color: var(--text);
}

.test-card-disabled {
    cursor: default;
}

.test-card-skeleton {
    pointer-events: none;
}

.skeleton-block,
.skeleton-line,
.skeleton-pill,
.skeleton-button {
    position: relative;
    overflow: hidden;
    background: linear-gradient(90deg, rgba(148, 163, 184, 0.16), rgba(226, 232, 240, 0.45), rgba(148, 163, 184, 0.16));
    background-size: 200% 100%;
    animation: shimmer 1.4s linear infinite;
}

.skeleton-block {
    height: 120px;
}

.skeleton-line {
    height: 13px;
    border-radius: 999px;
    margin-bottom: 10px;
}

.skeleton-line-title {
    width: 64%;
    height: 18px;
}

.skeleton-line-subtitle {
    width: 72%;
}

.skeleton-line-short {
    width: 45%;
}

.skeleton-pill-row {
    display: flex;
    gap: 8px;
    margin-top: 14px;
}

.skeleton-pill {
    width: 88px;
    height: 28px;
    border-radius: 999px;
}

.skeleton-button {
    width: 130px;
    height: 34px;
    border-radius: 999px;
    margin-left: auto;
}

.section-header {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 16px;
    margin: 30px 0 16px;
    flex-wrap: wrap;
}

.page-content > .section-header:first-child {
    margin-top: 0;
}

.section-header .section-title {
    margin-bottom: 4px;
}

.section-subtitle {
    font-size: 13px;
    line-height: 1.5;
    color: var(--text-secondary);
}

.section-meta {
    display: inline-flex;
    align-items: center;
    padding: 6px 12px;
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.05);
    color: var(--text-secondary);
    font-size: 12px;
    font-weight: 700;
}

.back-to-top {
    position: fixed;
    right: 24px;
    bottom: 24px;
    width: 48px;
    height: 48px;
    border-radius: 16px;
    background: var(--primary);
    color: #fff;
    box-shadow: var(--shadow-lg);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transform: translateY(12px);
    transition: var(--transition);
    z-index: 1300;
}

.back-to-top.visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.back-to-top:hover {
    background: var(--primary-dark);
}

@keyframes shimmer {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* ===== MODAL ===== */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.3s ease;
}

.modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
}

.modal-content {
    position: relative;
    z-index: 1;
    background: var(--bg-card);
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
    max-height: 90vh;
    overflow-y: auto;
    animation: slideUp 0.3s ease;
}

.modal-close {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--bg);
    color: var(--text);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    z-index: 10;
    transition: var(--transition);
}

.modal-close:hover {
    background: var(--accent);
    color: #fff;
}

/* Login Modal */
.login-modal {
    width: min(920px, 94vw);
    padding: 0;
    overflow: hidden;
}

.evaluation-target-modal-content {
    width: min(760px, 94vw);
    padding: 0;
    overflow: hidden;
}

.evaluation-target-shell {
    padding: 28px;
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.evaluation-target-head h3 {
    margin-top: 10px;
    margin-bottom: 8px;
    font-size: 24px;
}

.evaluation-target-head p {
    color: var(--text-secondary);
    line-height: 1.7;
}

.evaluation-target-kicker {
    display: inline-block;
    padding: 6px 10px;
    border-radius: 999px;
    background: rgba(125, 35, 49, 0.08);
    color: #7d2331;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.evaluation-target-search {
    position: relative;
}

.evaluation-target-search i {
    position: absolute;
    top: 50%;
    left: 16px;
    transform: translateY(-50%);
    color: var(--text-light);
}

.evaluation-target-search input {
    width: 100%;
    padding: 14px 16px 14px 44px;
    border-radius: 16px;
    border: 1px solid rgba(15, 23, 42, 0.08);
    background: rgba(248, 250, 252, 0.9);
}

.evaluation-target-list {
    max-height: 360px;
    overflow: auto;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.evaluation-target-row {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    padding: 16px 18px;
    border-radius: 18px;
    border: 1px solid rgba(15, 23, 42, 0.08);
    background: rgba(255, 255, 255, 0.96);
    transition: var(--transition);
    cursor: pointer;
}

.evaluation-target-row:hover {
    border-color: rgba(125, 35, 49, 0.22);
    transform: translateY(-1px);
}

.evaluation-target-row input {
    width: 18px;
    height: 18px;
    margin-top: 4px;
}

.evaluation-target-copy {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.evaluation-target-copy strong {
    font-size: 15px;
}

.evaluation-target-copy span,
.evaluation-target-copy small {
    color: var(--text-secondary);
    line-height: 1.5;
}

.evaluation-target-actions {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    flex-wrap: wrap;
}

.evaluation-target-empty {
    padding: 44px 24px;
    text-align: center;
    color: var(--text-secondary);
}

.evaluation-target-empty i {
    font-size: 42px;
    color: #7d2331;
    margin-bottom: 12px;
}

.auth-shell {
    display: grid;
    grid-template-columns: minmax(280px, 340px) minmax(0, 1fr);
}

.auth-brand-panel {
    position: relative;
    overflow: hidden;
    padding: 42px 34px;
    background:
        radial-gradient(circle at top right, rgba(255, 255, 255, 0.14), transparent 34%),
        linear-gradient(165deg, #171b24 0%, #202632 52%, #7e2331 100%);
    color: #f7f8fa;
}

.auth-brand-panel::after {
    content: '';
    position: absolute;
    inset: auto -90px -90px auto;
    width: 220px;
    height: 220px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.08), transparent 66%);
}

.auth-form-panel {
    padding: 38px 38px 34px;
    background: var(--bg-card);
}

.login-header {
    text-align: left;
    margin-bottom: 26px;
}

.auth-kicker,
.auth-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.16em;
    text-transform: uppercase;
}

.auth-kicker {
    margin-top: 24px;
    color: rgba(255, 255, 255, 0.68);
}

.auth-eyebrow {
    margin-bottom: 10px;
    color: #7d2331;
}

.auth-brand-panel h2,
.login-header h2 {
    font-size: 28px;
    font-weight: 800;
    line-height: 1.2;
}

.auth-brand-panel p,
.login-header p {
    font-size: 14px;
    line-height: 1.7;
}

.auth-brand-panel p {
    max-width: 280px;
    margin-top: 12px;
    color: rgba(247, 248, 250, 0.78);
}

.login-header p {
    color: var(--text-secondary);
    margin-top: 8px;
}

.auth-trust-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 28px;
}

.auth-trust-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.08);
    color: rgba(247, 248, 250, 0.9);
    font-size: 13px;
}

.auth-trust-item i {
    color: #f4c065;
}

.login-tabs {
    display: inline-grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    padding: 4px;
    gap: 4px;
    margin-bottom: 24px;
    border-radius: 16px;
    background: rgba(125, 35, 49, 0.06);
}

.tab-btn {
    flex: 1;
    padding: 12px 14px;
    background: transparent;
    color: var(--text-secondary);
    font-weight: 700;
    font-size: 14px;
    border: none;
    border-radius: 12px;
    transition: var(--transition);
}

.tab-btn.active {
    background: #7d2331;
    color: #fff;
    box-shadow: 0 10px 24px rgba(125, 35, 49, 0.16);
}

.login-form {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.form-group label {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: 6px;
}

.auth-input-shell {
    position: relative;
    display: flex;
    align-items: center;
    border: 2px solid var(--border);
    border-radius: 14px;
    background: var(--bg);
    transition: var(--transition);
}

.auth-input-shell:focus-within {
    border-color: #7d2331;
    box-shadow: 0 0 0 4px rgba(125, 35, 49, 0.08);
}

.form-group input,
.form-group select,
.form-group textarea {
    padding: 12px 14px;
    border: none;
    border-radius: 14px;
    background: transparent;
    color: var(--text);
    font-size: 14px;
    transition: var(--transition);
    width: 100%;
}

.form-group input:focus,
.form-group select:focus {
    box-shadow: none;
}

.settings-workspace {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.settings-editor-surface {
    border: none;
    box-shadow: var(--shadow-lg);
    overflow: hidden;
}

.settings-system-grid,
.settings-editor-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 20px;
    align-items: start;
}

.settings-editor-column {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.settings-workspace-intro {
    display: flex;
    justify-content: space-between;
    gap: 20px;
    align-items: flex-start;
    margin-bottom: 22px;
    padding: 22px 24px;
    border-radius: 20px;
    background: linear-gradient(135deg, rgba(125, 35, 49, 0.06), rgba(255, 255, 255, 0.92));
    border: 1px solid rgba(125, 35, 49, 0.1);
}

.settings-workspace-intro h3 {
    margin-top: 8px;
    margin-bottom: 10px;
    font-size: 22px;
    line-height: 1.3;
}

.settings-workspace-intro p {
    color: var(--text-secondary);
    line-height: 1.7;
    max-width: 720px;
}

.settings-highlight-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    max-width: 320px;
    justify-content: flex-end;
}

.settings-highlight-pills span {
    padding: 8px 12px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.88);
    border: 1px solid rgba(125, 35, 49, 0.14);
    color: #7d2331;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.settings-block {
    padding: 24px;
    border-radius: 22px;
    border: 1px solid rgba(15, 23, 42, 0.08);
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(246, 248, 251, 0.92));
    box-shadow: 0 16px 40px rgba(15, 23, 42, 0.06);
}

.settings-block-emphasis {
    background: linear-gradient(180deg, rgba(125, 35, 49, 0.04), rgba(255, 255, 255, 0.98));
    border-color: rgba(125, 35, 49, 0.14);
}

.settings-block + .settings-block {
    margin-top: 0;
    padding-top: 24px;
    border-top: none;
}

.settings-block h4 {
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.settings-block-intro {
    color: var(--text-secondary);
    font-size: 14px;
    line-height: 1.7;
    margin-bottom: 18px;
}

.settings-setting-item {
    padding: 18px 20px;
    border-radius: 18px;
    border: 1px solid rgba(15, 23, 42, 0.08);
    background: rgba(255, 255, 255, 0.9);
}

.settings-inline-divider {
    height: 1px;
    margin: 18px 0;
    background: linear-gradient(90deg, rgba(125, 35, 49, 0.16), rgba(15, 23, 42, 0.05));
}

.settings-action-cluster,
.settings-action-row {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.settings-action-row {
    margin-top: 24px;
}

.settings-support-copy {
    margin-top: 12px;
    color: var(--text-secondary);
    font-size: 13px;
    line-height: 1.7;
}

.settings-form-stack {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.settings-block .form-group input,
.settings-block .form-group select,
.settings-block .form-group textarea {
    border: 1px solid rgba(15, 23, 42, 0.08);
    background: rgba(255, 255, 255, 0.96);
    box-shadow: inset 0 1px 2px rgba(15, 23, 42, 0.03);
}

.settings-block .form-group input:focus,
.settings-block .form-group select:focus,
.settings-block .form-group textarea:focus {
    border-color: rgba(125, 35, 49, 0.32);
    box-shadow: 0 0 0 4px rgba(125, 35, 49, 0.08);
    outline: none;
}

.settings-rich-text {
    min-height: 108px;
    resize: vertical;
}

.admin-import-helper {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin-bottom: 16px;
    padding: 14px 16px;
    border-radius: 16px;
    border: 1px solid rgba(15, 23, 42, 0.08);
    background: linear-gradient(135deg, rgba(248, 250, 252, 0.96), rgba(255, 255, 255, 0.92));
    color: var(--text-secondary);
    font-size: 13px;
    line-height: 1.65;
}

.admin-import-helper i {
    color: #7d2331;
    margin-top: 2px;
}

.question-bank-modal-content {
    width: min(1100px, 96vw);
    max-height: 92vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.question-bank-modal-shell {
    display: flex;
    flex-direction: column;
    height: 100%;
}

.question-bank-modal-header {
    display: flex;
    justify-content: space-between;
    gap: 18px;
    align-items: flex-start;
    padding: 28px 30px 18px;
    border-bottom: 1px solid rgba(15, 23, 42, 0.08);
    background: linear-gradient(135deg, rgba(125, 35, 49, 0.06), rgba(255, 255, 255, 0.96));
}

.question-bank-modal-kicker {
    display: inline-block;
    padding: 6px 10px;
    border-radius: 999px;
    background: rgba(125, 35, 49, 0.08);
    color: #7d2331;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.question-bank-modal-header h3 {
    margin-top: 12px;
    margin-bottom: 8px;
    font-size: 26px;
}

.question-bank-modal-header p {
    color: var(--text-secondary);
    line-height: 1.7;
    max-width: 700px;
}

.question-bank-modal-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: flex-end;
}

.question-bank-chip {
    padding: 9px 12px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.94);
    border: 1px solid rgba(15, 23, 42, 0.08);
    color: var(--text);
    font-size: 12px;
    font-weight: 700;
}

.question-bank-chip.muted {
    color: #7d2331;
    border-color: rgba(125, 35, 49, 0.12);
}

.question-bank-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
    padding: 24px 30px 30px;
    overflow: auto;
}

.question-bank-editor-grid {
    display: grid;
    grid-template-columns: minmax(280px, 340px) minmax(0, 1fr);
    gap: 20px;
    align-items: start;
}

.question-bank-panel {
    padding: 22px;
    border-radius: 22px;
    border: 1px solid rgba(15, 23, 42, 0.08);
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(247, 249, 252, 0.94));
    box-shadow: 0 16px 36px rgba(15, 23, 42, 0.06);
}

.question-bank-panel-emphasis {
    border-color: rgba(125, 35, 49, 0.12);
    background: linear-gradient(180deg, rgba(125, 35, 49, 0.03), rgba(255, 255, 255, 0.98));
}

.question-bank-panel-head {
    margin-bottom: 18px;
}

.question-bank-panel-head h4 {
    margin-bottom: 6px;
    font-size: 18px;
}

.question-bank-panel-head p {
    color: var(--text-secondary);
    font-size: 13px;
    line-height: 1.7;
}

.question-bank-type-note,
.question-bank-footer-note {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 14px 16px;
    border-radius: 16px;
    background: rgba(248, 250, 252, 0.9);
    border: 1px solid rgba(15, 23, 42, 0.08);
    color: var(--text-secondary);
    font-size: 13px;
    line-height: 1.65;
}

.question-bank-type-note i,
.question-bank-footer-note i {
    color: #7d2331;
    margin-top: 2px;
}

.qb-field-group {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.qb-field-group.is-hidden {
    display: none;
}

.question-bank-panel .form-group input,
.question-bank-panel .form-group select,
.question-bank-panel .form-group textarea {
    border: 1px solid rgba(15, 23, 42, 0.08);
    background: rgba(255, 255, 255, 0.96);
}

.question-bank-panel .form-group input:focus,
.question-bank-panel .form-group select:focus,
.question-bank-panel .form-group textarea:focus {
    border-color: rgba(125, 35, 49, 0.32);
    box-shadow: 0 0 0 4px rgba(125, 35, 49, 0.08);
    outline: none;
}

.question-bank-textarea {
    resize: vertical;
}

.question-bank-json {
    font-family: Consolas, monospace;
}

.question-bank-inline-check {
    display: flex;
    align-items: center;
    gap: 8px;
    min-height: 48px;
    color: var(--text-secondary);
    font-weight: 500;
}

.question-bank-inline-check input {
    width: auto;
}

.question-bank-field-note {
    margin-top: -8px;
    font-size: 12px;
    color: var(--text-secondary);
    line-height: 1.6;
}

.question-bank-form-footer {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    align-items: center;
    padding-top: 6px;
}

.question-bank-form-actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

@media (max-width: 1100px) {
    .settings-system-grid,
    .settings-editor-grid,
    .question-bank-editor-grid {
        grid-template-columns: 1fr;
    }

    .settings-workspace-intro,
    .question-bank-modal-header,
    .question-bank-form-footer {
        flex-direction: column;
    }

    .settings-highlight-pills,
    .question-bank-modal-meta {
        justify-content: flex-start;
        max-width: none;
    }
}

@media (max-width: 768px) {
    .settings-block,
    .question-bank-panel {
        padding: 18px;
    }

    .question-bank-modal-header,
    .question-bank-form {
        padding-left: 18px;
        padding-right: 18px;
    }
}

.branding-preset-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 14px;
}

.branding-preset-card {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 18px;
    border-radius: 18px;
    border: 1px solid var(--border);
    background: var(--bg);
    box-shadow: var(--shadow);
    cursor: pointer;
    transition: var(--transition);
}

.branding-preset-card:hover,
.branding-preset-card.selected {
    border-color: rgba(225, 32, 41, 0.28);
    transform: translateY(-1px);
}

.branding-preset-card input {
    position: absolute;
    top: 14px;
    right: 14px;
    width: 16px;
    height: 16px;
}

.branding-preset-card img {
    width: 64px;
    height: 64px;
    object-fit: contain;
}

.branding-preset-card strong {
    font-size: 15px;
}

.branding-preset-card span {
    color: var(--text-secondary);
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.password-toggle {
    position: absolute;
    right: 8px;
    width: 34px;
    height: 34px;
    border-radius: 10px;
    background: transparent;
    color: var(--text-secondary);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.password-toggle:hover {
    background: rgba(125, 35, 49, 0.08);
    color: #7d2331;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.auth-note {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    font-size: 12px;
    color: var(--text-secondary);
    margin-top: 6px;
    line-height: 1.6;
}

.auth-note i {
    margin-top: 2px;
    color: #7d2331;
}

/* Test Modal */
.test-modal-content {
    width: 95vw;
    max-width: 1200px;
    height: 90vh;
    display: flex;
    flex-direction: column;
}

.test-header {
    padding: 16px 24px;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-shrink: 0;
    background: var(--bg-card);
}

.test-header-left h2 {
    font-size: 18px;
}

.test-header-left p {
    font-size: 13px;
    color: var(--text-secondary);
}

.test-header-right {
    display: flex;
    align-items: center;
    gap: 16px;
}

.test-timer {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 20px;
    font-weight: 700;
    color: var(--primary);
    background: rgba(108, 99, 255, 0.1);
    padding: 8px 16px;
    border-radius: var(--radius-sm);
}

.test-timer.warning {
    color: var(--accent);
    background: rgba(255, 107, 107, 0.1);
}

.test-progress {
    display: flex;
    align-items: center;
    gap: 8px;
}

.test-progress span {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-secondary);
    white-space: nowrap;
}

.progress-bar {
    width: 120px;
    height: 8px;
    background: var(--bg);
    border-radius: 4px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary), var(--secondary));
    border-radius: 4px;
    transition: width 0.3s ease;
}

.test-body {
    flex: 1;
    overflow-y: auto;
    padding: 30px 40px;
}

.test-footer {
    padding: 16px 24px;
    border-top: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-shrink: 0;
    background: var(--bg-card);
}

.question-nav {
    display: flex;
    gap: 4px;
    flex-wrap: wrap;
    justify-content: center;
    max-width: 60%;
}

.q-nav-btn {
    width: 32px;
    height: 32px;
    border-radius: 6px;
    background: var(--bg);
    color: var(--text);
    font-size: 12px;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
    border: 2px solid transparent;
}

.q-nav-btn:hover {
    border-color: var(--primary);
}

.q-nav-btn.active {
    background: var(--primary);
    color: #fff;
}

.q-nav-btn.answered {
    background: var(--secondary);
    color: #fff;
}

/* Result Modal */
.result-modal-content {
    width: 90vw;
    max-width: 900px;
    padding: 40px;
}

/* QR Modal */
.qr-modal {
    width: 400px;
    padding: 40px;
    text-align: center;
}

.qr-content h3 {
    margin-bottom: 16px;
    font-size: 20px;
}

.qr-content img {
    max-width: 250px;
    margin: 16px auto;
}

.qr-content p {
    font-size: 14px;
    color: var(--text-secondary);
    margin-top: 8px;
}

.qr-url {
    font-size: 18px;
    font-weight: 700;
    color: var(--primary);
    margin-top: 12px;
}

/* ===== QUESTION STYLES ===== */
.question-container {
    max-width: 800px;
    margin: 0 auto;
}

.question-text {
    font-size: 18px;
    font-weight: 600;
    line-height: 1.6;
    margin-bottom: 24px;
    padding: 20px;
    background: var(--bg);
    border-radius: var(--radius);
    border-left: 4px solid var(--primary);
}

.question-number {
    font-size: 13px;
    color: var(--primary);
    font-weight: 700;
    margin-bottom: 8px;
    display: block;
}

.question-help {
    margin: -10px 0 18px;
    color: var(--text-secondary);
    font-size: 13px;
    line-height: 1.5;
}

.options-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.option-item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 18px;
    border: 2px solid var(--border);
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: var(--transition);
    font-size: 15px;
}

.option-item:hover {
    border-color: var(--primary);
    background: rgba(108, 99, 255, 0.04);
}

.option-item.selected {
    border-color: var(--primary);
    background: rgba(108, 99, 255, 0.08);
}

.option-item .option-radio {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    border: 2px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: var(--transition);
}

.option-item.selected .option-radio {
    border-color: var(--primary);
    background: var(--primary);
}

.option-item.selected .option-radio::after {
    content: '';
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #fff;
}

/* Paired options (EPPS style) */
.paired-options {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.paired-option {
    padding: 20px;
    border: 2px solid var(--border);
    border-radius: var(--radius);
    cursor: pointer;
    transition: var(--transition);
    text-align: center;
    font-size: 15px;
    line-height: 1.5;
}

.paired-option:hover {
    border-color: var(--primary);
}

.paired-option.selected {
    border-color: var(--primary);
    background: rgba(108, 99, 255, 0.08);
    box-shadow: 0 0 0 3px rgba(108, 99, 255, 0.15);
}

/* Scale question (Likert) */
.scale-options {
    display: flex;
    gap: 12px;
    justify-content: center;
    flex-wrap: wrap;
}

.scale-options-anchored {
    align-items: stretch;
}

.scale-btn {
    width: 60px;
    height: 60px;
    border-radius: var(--radius-sm);
    border: 2px solid var(--border);
    background: var(--bg);
    font-size: 18px;
    font-weight: 700;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.scale-btn strong {
    font-size: 18px;
}

.scale-btn span {
    font-size: 9px;
    font-weight: 400;
    color: var(--text-light);
}

.scale-btn-title {
    display: block;
}

.scale-btn-anchored {
    width: min(220px, 100%);
    min-height: 150px;
    height: auto;
    padding: 14px;
    gap: 8px;
    align-items: flex-start;
    justify-content: flex-start;
    text-align: left;
}

.scale-btn-anchored .scale-btn-title {
    font-size: 11px;
    font-weight: 700;
    color: var(--text-primary);
}

.scale-btn-anchored .scale-btn-desc {
    font-size: 11px;
    line-height: 1.5;
    color: var(--text-secondary);
}

.scale-btn:hover {
    border-color: var(--primary);
}

.scale-btn.selected {
    border-color: var(--primary);
    background: var(--primary);
    color: #fff;
}

.scale-btn.selected span {
    color: rgba(255, 255, 255, 0.7);
}

.scale-btn.selected .scale-btn-desc {
    color: rgba(255, 255, 255, 0.82);
}

.scale-labels {
    display: flex;
    justify-content: space-between;
    font-size: 12px;
    color: var(--text-light);
    margin-top: 8px;
}

/* Kraepelin special */
.kraepelin-grid {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.kraepelin-numbers {
    display: flex;
    gap: 0;
    font-size: 32px;
    font-weight: 700;
    font-family: 'Courier New', monospace;
}

.kraepelin-numbers .kr-digit {
    width: 50px;
    text-align: center;
    padding: 10px 0;
    border: 1px solid var(--border);
    background: var(--bg);
}

.kraepelin-inputs {
    display: flex;
    gap: 0;
}

.kraepelin-inputs input {
    width: 50px;
    height: 50px;
    text-align: center;
    font-size: 24px;
    font-weight: 700;
    border: 2px solid var(--primary);
    border-radius: 0;
    background: rgba(108, 99, 255, 0.05);
    color: var(--text);
}

.kraepelin-inputs input:focus {
    background: rgba(108, 99, 255, 0.15);
}

/* Wartegg special */
.wartegg-container {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    max-width: 600px;
    margin: 0 auto;
}

.wartegg-box {
    aspect-ratio: 1;
    border: 2px solid var(--border);
    border-radius: var(--radius-sm);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
    background: #fff;
}

.wartegg-box:hover {
    border-color: var(--primary);
}

.wartegg-box.active {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(108, 99, 255, 0.2);
}

.wartegg-box canvas {
    width: 100%;
    height: 100%;
    cursor: crosshair;
}

.wartegg-number {
    position: absolute;
    top: 4px;
    left: 8px;
    font-size: 12px;
    font-weight: 700;
    color: var(--text-light);
}

/* ===== RESULT DISPLAY ===== */
.result-header {
    text-align: center;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 2px solid var(--border);
}

.result-header .result-icon {
    font-size: 64px;
    color: var(--primary);
    margin-bottom: 12px;
}

.result-header h2 {
    font-size: 24px;
    margin-bottom: 4px;
}

.result-header p {
    color: var(--text-secondary);
}

.result-section {
    margin-bottom: 24px;
}

.result-section h3 {
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.result-section h3 i {
    color: var(--primary);
}

.result-scores {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 12px;
}

.score-item {
    background: var(--bg);
    padding: 16px;
    border-radius: var(--radius-sm);
    border-left: 4px solid var(--primary);
}

.score-item .score-label {
    font-size: 13px;
    color: var(--text-secondary);
    margin-bottom: 4px;
}

.score-item .score-value {
    font-size: 24px;
    font-weight: 800;
    color: var(--primary);
}

.score-item .score-desc {
    font-size: 12px;
    color: var(--text-secondary);
    margin-top: 4px;
}

.score-bar-container {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.score-bar-item {
    display: flex;
    align-items: center;
    gap: 12px;
}

.score-bar-label {
    width: 120px;
    font-size: 13px;
    font-weight: 600;
    flex-shrink: 0;
}

.score-bar-track {
    flex: 1;
    height: 24px;
    background: var(--bg);
    border-radius: 12px;
    overflow: hidden;
    position: relative;
}

.score-bar-fill {
    height: 100%;
    border-radius: 12px;
    background: linear-gradient(90deg, var(--primary), var(--primary-light));
    transition: width 0.8s ease;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    padding-right: 8px;
    font-size: 11px;
    font-weight: 700;
    color: #fff;
    min-width: 30px;
}

.score-bar-value {
    font-size: 14px;
    font-weight: 700;
    width: 40px;
    text-align: right;
    flex-shrink: 0;
}

.result-interpretation {
    background: var(--bg);
    padding: 20px;
    border-radius: var(--radius);
    line-height: 1.8;
    font-size: 14px;
}

.result-chart-container {
    max-width: 500px;
    margin: 0 auto;
}

/* ===== DASHBOARD ===== */
.private-landing {
    display: flex;
    flex-direction: column;
    gap: 22px;
}

.private-hero {
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) minmax(320px, 0.9fr);
    gap: 22px;
}

.private-hero-copy,
.private-hero-panel,
.private-flow-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 24px;
    box-shadow: var(--shadow);
}

.private-hero-copy {
    position: relative;
    overflow: hidden;
    padding: 40px;
}

.private-hero-copy::after {
    content: '';
    position: absolute;
    inset: auto -80px -80px auto;
    width: 220px;
    height: 220px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(125, 35, 49, 0.08), transparent 68%);
}

.private-eyebrow,
.private-panel-kicker {
    display: inline-flex;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.16em;
    text-transform: uppercase;
}

.private-eyebrow {
    color: #7d2331;
    margin-bottom: 16px;
}

.private-hero-copy h1 {
    max-width: 760px;
    font-size: clamp(32px, 4vw, 48px);
    line-height: 1.1;
    margin-bottom: 18px;
}

.private-hero-copy p {
    max-width: 640px;
    color: var(--text-secondary);
    font-size: 15px;
    line-height: 1.8;
}

.private-hero-actions {
    display: flex;
    gap: 12px;
    margin-top: 24px;
    flex-wrap: wrap;
}

.private-trust-row {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 24px;
}

.private-trust-pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 14px;
    border-radius: 999px;
    background: rgba(125, 35, 49, 0.06);
    color: #5f1d27;
    font-size: 12px;
    font-weight: 600;
}

.private-hero-panel {
    position: relative;
    overflow: hidden;
    padding: 34px;
    background:
        radial-gradient(circle at top right, rgba(255, 255, 255, 0.14), transparent 34%),
        linear-gradient(165deg, #171b24 0%, #202632 54%, #7e2331 100%);
    color: #f7f8fa;
}

.private-hero-panel::after {
    content: '';
    position: absolute;
    inset: auto -70px -90px auto;
    width: 210px;
    height: 210px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.08), transparent 64%);
}

.private-hero-mark {
    display: inline-flex;
    margin-bottom: 24px;
    animation: privateFloat 6s ease-in-out infinite;
}

.private-hero-mark .brand-asset-image-hero {
    width: 96px;
    height: 96px;
}

.private-panel-kicker {
    color: rgba(255, 255, 255, 0.65);
}

.private-hero-panel h2 {
    font-size: 30px;
    margin-top: 12px;
}

.private-hero-panel p {
    margin-top: 12px;
    color: rgba(247, 248, 250, 0.78);
    line-height: 1.8;
}

.private-panel-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-top: 26px;
}

.private-panel-grid div {
    padding: 14px;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.private-panel-grid strong {
    display: block;
    margin-bottom: 6px;
    font-size: 13px;
}

.private-panel-grid span {
    color: rgba(247, 248, 250, 0.72);
    font-size: 12px;
    line-height: 1.6;
}

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

.private-flow-card {
    padding: 26px;
}

.private-flow-card span {
    display: inline-flex;
    width: 34px;
    height: 34px;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    background: rgba(125, 35, 49, 0.08);
    color: #7d2331;
    font-weight: 800;
    margin-bottom: 14px;
}

.private-flow-card h3 {
    font-size: 18px;
    margin-bottom: 10px;
}

.private-flow-card p {
    color: var(--text-secondary);
    line-height: 1.7;
    font-size: 14px;
}

.private-preview {
    display: flex;
    flex-direction: column;
    gap: 22px;
}

.private-preview-hero {
    display: grid;
    grid-template-columns: minmax(0, 1.12fr) minmax(300px, 0.88fr);
    gap: 22px;
}

.private-preview-copy,
.private-preview-shell,
.private-preview-card,
.private-preview-note {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 24px;
    box-shadow: var(--shadow);
}

.private-preview-copy {
    position: relative;
    overflow: hidden;
    padding: 38px;
}

.private-preview-copy::after {
    content: '';
    position: absolute;
    inset: auto -70px -90px auto;
    width: 220px;
    height: 220px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(125, 35, 49, 0.08), transparent 70%);
}

.private-preview-copy h2 {
    max-width: 720px;
    font-size: clamp(28px, 3.2vw, 40px);
    line-height: 1.14;
}

.private-preview-copy p {
    max-width: 620px;
    margin-top: 16px;
    color: var(--text-secondary);
    font-size: 15px;
    line-height: 1.8;
}

.private-preview-shell {
    position: relative;
    overflow: hidden;
    padding: 30px;
    background:
        radial-gradient(circle at top right, rgba(255, 255, 255, 0.14), transparent 34%),
        linear-gradient(165deg, #171b24 0%, #202632 54%, #7e2331 100%);
    color: #f7f8fa;
}

.private-preview-shell::after {
    content: '';
    position: absolute;
    inset: auto -70px -90px auto;
    width: 210px;
    height: 210px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.08), transparent 64%);
}

.private-preview-mark {
    display: inline-flex;
    margin-bottom: 18px;
    animation: privateFloat 6s ease-in-out infinite;
}

.private-preview-mark .brand-asset-image-hero {
    width: 88px;
    height: 88px;
}

.private-preview-stats {
    display: grid;
    gap: 12px;
    margin-top: 12px;
}

.private-preview-stat {
    padding: 16px 18px;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(6px);
}

.private-preview-stat strong {
    display: block;
    font-size: 28px;
    line-height: 1.1;
}

.private-preview-stat span {
    display: block;
    margin-top: 6px;
    color: rgba(247, 248, 250, 0.76);
    font-size: 13px;
    line-height: 1.55;
}

.private-preview-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 18px;
}

.private-preview-card {
    padding: 24px;
}

.private-preview-card-icon {
    width: 46px;
    height: 46px;
    border-radius: 14px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(125, 35, 49, 0.08);
    color: #7d2331;
    font-size: 18px;
}

.private-preview-card-kicker {
    display: inline-flex;
    margin-top: 16px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: #7d2331;
}

.private-preview-card h3 {
    margin-top: 12px;
    font-size: 20px;
}

.private-preview-card p {
    margin-top: 10px;
    color: var(--text-secondary);
    font-size: 14px;
    line-height: 1.7;
}

.private-preview-note {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 18px 20px;
    color: var(--text-secondary);
    line-height: 1.7;
}

.private-preview-note i {
    color: var(--primary);
    font-size: 18px;
}

@keyframes privateFloat {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-6px); }
}

.welcome-banner {
    background: linear-gradient(135deg, var(--primary) 0%, #FF4D54 60%, var(--secondary) 100%);
    color: #fff;
    border-radius: var(--radius);
    padding: 32px 40px;
    margin-bottom: 24px;
    position: relative;
    overflow: hidden;
}

.welcome-banner::after {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 300px;
    height: 300px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 50%;
}

.welcome-banner h1 {
    font-size: 28px;
    font-weight: 800;
    margin-bottom: 8px;
}

.welcome-banner p {
    font-size: 15px;
    opacity: 0.85;
    max-width: 600px;
}

.welcome-banner .banner-actions {
    margin-top: 20px;
    display: flex;
    gap: 12px;
}

.welcome-banner .btn {
    border-color: rgba(255, 255, 255, 0.3);
}

.section-title {
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.section-title i {
    color: var(--primary);
}

/* ===== TABLES ===== */
.table-container {
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

th {
    padding: 14px 16px;
    text-align: left;
    font-weight: 600;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-secondary);
    background: var(--bg);
    border-bottom: 2px solid var(--border);
}

td {
    padding: 12px 16px;
    border-bottom: 1px solid var(--border);
    vertical-align: middle;
}

tr:hover td {
    background: rgba(108, 99, 255, 0.02);
}

.status-badge {
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 700;
}

.status-completed {
    background: rgba(0, 166, 81, 0.12);
    color: #0a7b40;
}

.status-pending {
    background: rgba(255, 179, 71, 0.12);
    color: #9a5600;
}

/* ===== NETWORK INFO ===== */
.network-info {
    text-align: center;
    padding: 40px;
}

.network-info .net-icon {
    font-size: 64px;
    color: var(--primary);
    margin-bottom: 20px;
}

.network-info h2 {
    font-size: 24px;
    margin-bottom: 8px;
}

.network-url {
    font-size: 28px;
    font-weight: 800;
    color: var(--primary);
    margin: 20px 0;
    padding: 20px;
    background: var(--bg);
    border-radius: var(--radius);
    border: 2px dashed var(--primary);
    display: inline-block;
}

.network-steps {
    text-align: left;
    max-width: 500px;
    margin: 24px auto;
}

.network-steps li {
    padding: 12px 0;
    font-size: 15px;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    gap: 12px;
}

.network-steps li i {
    color: var(--primary);
    font-size: 18px;
    width: 24px;
}

/* ===== FILTER BAR ===== */
.filter-bar {
    display: flex;
    gap: 12px;
    margin-bottom: 20px;
    flex-wrap: wrap;
    align-items: center;
}

.filter-btn {
    padding: 8px 16px;
    border-radius: 20px;
    background: var(--bg);
    color: var(--text-secondary);
    font-size: 13px;
    font-weight: 600;
    border: 2px solid var(--border);
    transition: var(--transition);
}

.filter-btn:hover {
    border-color: var(--primary);
    color: var(--primary);
}

.filter-btn.active {
    background: var(--primary);
    color: #fff;
    border-color: var(--primary);
}

/* ===== LOADING ===== */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
}

.spinner {
    text-align: center;
    color: #fff;
}

.brain-loading i {
    font-size: 48px;
    color: var(--primary-light);
}

.spinner p {
    margin-top: 16px;
    font-size: 16px;
}

/* ===== TOAST ===== */
.toast-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 10000;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.toast {
    padding: 14px 20px;
    border-radius: var(--radius-sm);
    color: #fff;
    font-size: 14px;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 10px;
    animation: slideIn 0.3s ease;
    box-shadow: var(--shadow-lg);
    min-width: 300px;
}

.toast-success {
    background: #27ae60;
}

.toast-error {
    background: #e74c3c;
}

.toast-info {
    background: var(--primary);
}

.toast-warning {
    background: var(--warning);
    color: #333;
}

/* ===== ANIMATIONS ===== */
@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(100px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* ===== ABOUT PAGE ===== */
.about-page {
    max-width: 800px;
    margin: 0 auto;
}

.about-page h1 {
    font-size: 32px;
    text-align: center;
    margin-bottom: 8px;
}

.about-page .subtitle {
    text-align: center;
    color: var(--text-secondary);
    margin-bottom: 30px;
}

.about-features {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 16px;
    margin: 24px 0;
}

.about-feature {
    padding: 20px;
    background: var(--bg);
    border-radius: var(--radius);
    text-align: center;
}

.about-feature i {
    font-size: 32px;
    color: var(--primary);
    margin-bottom: 12px;
}

.about-feature h4 {
    margin-bottom: 6px;
}

.about-feature p {
    font-size: 13px;
    color: var(--text-secondary);
}

/* ===== ADMIN PANEL ===== */
.admin-tabs {
    display: flex;
    gap: 0;
    margin-bottom: 24px;
}

.admin-tab {
    padding: 12px 24px;
    background: var(--bg);
    border: 2px solid var(--border);
    font-weight: 600;
    font-size: 14px;
    color: var(--text-secondary);
    transition: var(--transition);
}

.admin-tab:first-child {
    border-radius: var(--radius-sm) 0 0 var(--radius-sm);
}

.admin-tab:last-child {
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}

.admin-tab.active {
    background: var(--primary);
    color: #fff;
    border-color: var(--primary);
}

.admin-panel {
    display: none;
}

.admin-panel.active {
    display: block;
}

/* ===== NOTIFICATION BELL ===== */
.notif-bell-btn {
    position: relative;
    background: transparent;
    border: none;
    color: var(--text-secondary);
    font-size: 18px;
    cursor: pointer;
    padding: 8px;
    border-radius: 50%;
    transition: var(--transition);
}
.notif-bell-btn:hover { color: var(--primary); background: var(--bg-hover); }
.notif-badge {
    position: absolute;
    top: 2px; right: 0;
    min-width: 18px; height: 18px;
    background: var(--primary);
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    border: 2px solid var(--surface);
    padding: 0 4px;
}

/* ===== NOTIFICATION ITEMS ===== */
.notif-item {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    padding: 16px 20px;
    border-bottom: 1px solid var(--border);
    cursor: pointer;
    transition: var(--transition);
    background: var(--surface);
    border-radius: var(--radius-sm);
    margin-bottom: 8px;
}
.notif-item:hover { background: var(--bg-hover); }
.notif-unread {
    background: rgba(225, 32, 41, 0.04);
    border-left: 3px solid var(--primary);
}
.notif-icon {
    width: 36px; height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    flex-shrink: 0;
}
.notif-info { color: #3498db; background: rgba(52, 152, 219, 0.1); }
.notif-success { color: #2ed8a3; background: rgba(46, 216, 163, 0.1); }
.notif-warning { color: #f39c12; background: rgba(243, 156, 18, 0.1); }
.notif-error { color: #e74c3c; background: rgba(231, 76, 60, 0.1); }
.notif-body { flex: 1; min-width: 0; }
.notif-title { font-weight: 600; font-size: 14px; margin-bottom: 4px; }
.notif-message { font-size: 13px; color: var(--text-secondary); line-height: 1.4; }
.notif-time { font-size: 12px; color: var(--text-light); margin-top: 4px; }
.notif-delete {
    background: none; border: none;
    color: var(--text-light);
    cursor: pointer;
    padding: 4px 8px;
    border-radius: var(--radius-sm);
    opacity: 0;
    transition: var(--transition);
}
.notif-item:hover .notif-delete { opacity: 1; }
.notif-delete:hover { color: var(--accent); background: rgba(231, 76, 60, 0.1); }

/* ===== SCORE-PILL / ACTIVITY / TOGGLE ===== */
.score-pill {
    display: inline-block;
    padding: 2px 10px;
    background: var(--primary);
    color: #fff;
    border-radius: 20px;
    font-weight: 600;
    font-size: 13px;
}
.activity-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
    border-bottom: 1px solid var(--border);
    gap: 8px;
    flex-wrap: wrap;
}
.activity-item:last-child { border-bottom: none; }
.activity-name { font-weight: 600; font-size: 14px; }
.activity-test { font-size: 13px; color: var(--text-secondary); }
.activity-time { font-size: 12px; color: var(--text-light); }

.toggle-switch { position: relative; display: inline-block; width: 48px; height: 26px; }
.toggle-switch input { opacity: 0; width: 0; height: 0; }
.toggle-slider {
    position: absolute; cursor: pointer;
    top: 0; left: 0; right: 0; bottom: 0;
    background: var(--border);
    border-radius: 26px;
    transition: var(--transition);
}
.toggle-slider::before {
    position: absolute; content: "";
    height: 20px; width: 20px;
    left: 3px; bottom: 3px;
    background: #fff;
    border-radius: 50%;
    transition: var(--transition);
}
.toggle-switch input:checked + .toggle-slider { background: var(--primary); }
.toggle-switch input:checked + .toggle-slider::before { transform: translateX(22px); }

.setting-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 0;
    border-bottom: 1px solid var(--border);
    gap: 16px;
}
.setting-item:last-child { border-bottom: none; }
.setting-info h4 { margin-bottom: 4px; }
.setting-info p { font-size: 13px; color: var(--text-secondary); }

/* ===== STATUS SELECT ===== */
.status-select {
    padding: 4px 8px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--surface);
    color: var(--text);
    font-size: 12px;
    font-weight: 500;
}

/* ===== PROFILE AVATAR ===== */
.profile-avatar {
    width: 80px; height: 80px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary), #ff6b6b);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 36px;
    color: #fff;
    flex-shrink: 0;
}

/* ===== CLICK STAT CARD ===== */
.stat-card.clickable { cursor: pointer; }
.stat-card.clickable:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }

/* ===== FILTER BAR ===== */
.filter-bar {
    display: flex;
    gap: 8px;
    margin-bottom: 24px;
    flex-wrap: wrap;
}
.filter-btn {
    padding: 8px 16px;
    border: 2px solid var(--border);
    background: var(--surface);
    border-radius: 20px;
    font-size: 13px;
    font-weight: 500;
    color: var(--text-secondary);
    cursor: pointer;
    transition: var(--transition);
}
.filter-btn:hover { border-color: var(--primary); color: var(--primary); }
.filter-btn.active { background: var(--primary); color: #fff; border-color: var(--primary); }

/* ===== TABLE ===== */
.table-container { overflow-x: auto; }
.table-container table { width: 100%; border-collapse: collapse; font-size: 14px; }
.table-container th { padding: 12px 16px; text-align: left; font-weight: 600; font-size: 12px; text-transform: uppercase; color: var(--text-secondary); border-bottom: 2px solid var(--border); background: var(--bg); letter-spacing: 0.5px; }
.table-container td { padding: 12px 16px; border-bottom: 1px solid var(--border); vertical-align: middle; }
.table-container tbody tr:hover { background: var(--bg-hover); }

.network-url {
    font-size: 22px;
    font-weight: 700;
    font-family: 'Fira Code', monospace;
    margin: 16px 0;
    color: #fff;
    background: rgba(0,0,0,0.2);
    padding: 12px 24px;
    display: inline-block;
    border-radius: var(--radius);
}
.network-steps {
    list-style: none;
    text-align: left;
    max-width: 400px;
    margin: 20px auto 0;
}
.network-steps li {
    padding: 10px 0;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    font-size: 14px;
    color: rgba(255,255,255,0.9);
}
.network-steps li i { margin-right: 10px; width: 20px; }
.network-info { text-align: center; }

/* ===== ADMIN TAB (RESPONSIVE) ===== */
@media (max-width: 768px) {
    .admin-tabs {
        flex-wrap: wrap;
        gap: 4px;
    }
    .admin-tab {
        flex: 1;
        min-width: calc(50% - 4px);
        font-size: 12px;
        padding: 10px 12px;
        border-radius: var(--radius-sm) !important;
    }
}

/* ===== PRINT ===== */
.print-btn {
    margin-bottom: 20px;
}

@media print {

    .sidebar,
    .topbar,
    .test-footer,
    .btn,
    .modal-close,
    .print-btn {
        display: none !important;
    }

    .main-content {
        margin-left: 0 !important;
    }

    .page-content {
        padding: 0 !important;
    }

    body {
        background: #fff;
    }
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
    .sidebar {
        transform: translateX(-100%);
        width: var(--sidebar-width);
    }

    .sidebar.mobile-open {
        transform: translateX(0);
    }

    .sidebar-close {
        display: inline-flex;
    }

    .main-content {
        margin-left: 0;
    }

    .menu-btn {
        display: flex;
    }

    .topbar-search {
        max-width: none;
    }

    body.guest-mode .topbar {
        display: grid;
        grid-template-columns: minmax(0, 1fr) auto;
        align-items: center;
        padding: 16px;
        gap: 12px;
    }

    .topbar-brand {
        width: 100%;
    }

    .guest-topbar-nav {
        width: 100%;
        display: grid;
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 8px;
    }

    .guest-topbar-link {
        width: 100%;
        min-height: 42px;
        padding: 10px 12px;
        justify-content: center;
        text-align: center;
        border-radius: 16px;
    }

    body.guest-mode .topbar-brand {
        width: auto;
        min-width: 0;
        display: flex;
        gap: 10px;
    }

    body.guest-mode .brand-asset-slot-topbar,
    body.guest-mode .brand-asset-image-topbar {
        width: 40px;
        height: 40px;
    }

    body.guest-mode .topbar-brand-copy {
        min-width: 0;
    }

    body.guest-mode .topbar-brand-copy strong {
        font-size: 14px;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    body.guest-mode .topbar-brand-copy small {
        font-size: 11px;
        line-height: 1.35;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    body.guest-mode .guest-topbar-nav {
        grid-column: 1 / -1;
    }

    body.guest-mode .topbar-actions {
        margin-left: 0;
        gap: 8px;
    }

    body.guest-mode .topbar-actions .btn {
        min-width: 0;
        padding: 10px 14px;
        justify-content: center;
    }

    body.guest-mode .theme-toggle {
        width: 40px;
        height: 40px;
    }

    .page-content {
        padding: 14px;
    }

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

    .section-header {
        margin-top: 24px;
    }

    .bank-readiness-panel {
        grid-template-columns: 1fr;
    }

    .bank-readiness-stats {
        justify-content: flex-start;
    }

    .tests-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .test-card-footer {
        flex-direction: column;
        align-items: stretch;
    }

    .test-card-footer .btn {
        width: 100%;
        justify-content: center;
    }

    .test-modal-content {
        width: 100vw;
        height: 100vh;
        border-radius: 0;
    }

    .test-body {
        padding: 20px;
    }

    .test-header {
        flex-direction: column;
        gap: 12px;
    }

    .test-footer {
        flex-wrap: wrap;
    }

    .question-nav {
        max-width: 100%;
        order: 3;
        width: 100%;
    }

    .login-modal {
        width: min(100%, 480px);
        max-height: calc(100dvh - 20px);
        border-radius: 24px;
    }

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

    #loginModal {
        align-items: flex-start;
        padding: 10px;
        overflow-y: auto;
    }

    #loginModal .modal-content {
        margin: 0 auto;
    }

    .auth-brand-panel,
    .auth-form-panel {
        padding: 24px 20px;
    }

    .brand-asset-slot-auth,
    .brand-asset-image-auth {
        width: 70px;
        height: 70px;
    }

    .modal-close {
        top: 12px;
        right: 12px;
    }

    .login-header {
        margin-bottom: 20px;
    }

    .auth-brand-panel h2,
    .login-header h2 {
        font-size: 24px;
    }

    .auth-brand-panel p,
    .login-header p {
        font-size: 13px;
        line-height: 1.65;
    }

    .auth-trust-list {
        gap: 10px;
        margin-top: 20px;
    }

    .auth-trust-item {
        padding: 10px 12px;
        border-radius: 12px;
        font-size: 12px;
    }

    .login-tabs {
        width: 100%;
        margin-bottom: 18px;
    }

    .tab-btn {
        min-height: 42px;
        padding: 10px 12px;
        font-size: 13px;
    }

    .login-form {
        gap: 14px;
    }

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

    .auth-input-shell {
        border-radius: 12px;
    }

    .form-group input,
    .form-group select,
    .form-group textarea {
        min-height: 44px;
        padding: 11px 12px;
    }

    .password-toggle {
        right: 6px;
        width: 32px;
        height: 32px;
    }

    .auth-note {
        font-size: 11px;
    }

    .welcome-banner {
        padding: 24px;
    }

    .welcome-banner h1 {
        font-size: 22px;
    }

    .back-to-top {
        right: 16px;
        bottom: 16px;
    }

    .paired-options {
        grid-template-columns: 1fr;
    }

    .wartegg-container {
        grid-template-columns: repeat(2, 1fr);
    }

    .form-row {
        grid-template-columns: 1fr;
    }

    .private-hero,
    .private-flow,
    .private-panel-grid,
    .private-preview-hero,
    .private-preview-grid {
        grid-template-columns: 1fr;
    }

    .private-hero-copy,
    .private-hero-panel,
    .private-flow-card,
    .private-preview-copy,
    .private-preview-shell,
    .private-preview-card {
        padding: 20px;
        border-radius: 22px;
    }

    .private-landing,
    .private-preview {
        gap: 16px;
    }

    .private-hero-copy h1,
    .private-preview-copy h2 {
        font-size: clamp(26px, 7vw, 34px);
        line-height: 1.14;
        margin-bottom: 14px;
    }

    .private-hero-copy p,
    .private-preview-copy p,
    .private-hero-panel p {
        font-size: 14px;
        line-height: 1.72;
    }

    .private-hero-actions {
        display: grid;
        grid-template-columns: 1fr;
        gap: 10px;
    }

    .private-hero-actions .btn {
        width: 100%;
        justify-content: center;
    }

    .private-trust-row {
        display: grid;
        grid-template-columns: 1fr;
        gap: 10px;
    }

    .private-trust-pill {
        width: 100%;
        justify-content: flex-start;
        padding: 12px 14px;
        border-radius: 16px;
    }

    .private-panel-grid {
        gap: 10px;
    }

    .private-panel-grid div {
        padding: 12px;
        border-radius: 14px;
    }

    .private-flow-card {
        padding: 22px;
    }

    .private-flow-card h3 {
        font-size: 17px;
    }

    .private-preview-grid {
        gap: 14px;
    }

    .private-preview-card {
        padding: 20px;
    }

    .private-preview-stat strong {
        font-size: 24px;
    }

    .private-preview-note {
        align-items: flex-start;
        padding: 16px 18px;
    }

    .result-modal-content {
        width: 95vw;
        padding: 24px;
    }
}

@media (max-width: 480px) {
    body.guest-mode .topbar {
        grid-template-columns: 1fr;
        padding: calc(10px + env(safe-area-inset-top, 0px)) 10px 10px;
        gap: 8px;
    }

    body.guest-mode .topbar-brand,
    body.guest-mode .guest-topbar-nav,
    body.guest-mode .topbar-actions {
        width: 100%;
    }

    body.guest-mode .topbar-brand {
        grid-column: 1;
    }

    body.guest-mode .topbar-brand-copy strong {
        font-size: 13px;
    }

    body.guest-mode .topbar-brand-copy small {
        font-size: 10px;
    }

    body.guest-mode .brand-asset-slot-topbar,
    body.guest-mode .brand-asset-image-topbar {
        width: 36px;
        height: 36px;
    }

    body.guest-mode .guest-topbar-nav {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 6px;
    }

    body.guest-mode .guest-topbar-link {
        min-height: 38px;
        font-size: 11px;
        border-radius: 14px;
    }

    body.guest-mode .guest-topbar-link:last-child {
        grid-column: 1 / -1;
    }

    body.guest-mode .topbar-actions {
        display: grid;
        grid-template-columns: 38px minmax(0, 1fr);
        gap: 8px;
    }

    body.guest-mode .topbar-actions .btn {
        width: 100%;
        padding: 9px 12px;
    }

    body.guest-mode .theme-toggle {
        width: 38px;
        height: 38px;
    }

    .page-content {
        padding: 12px;
    }

    .section-meta {
        width: 100%;
        justify-content: center;
    }

    .bank-readiness-stat {
        width: 100%;
    }

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

    .stat-card {
        padding: 16px;
    }

    .stat-info h4 {
        font-size: 22px;
    }

    .branding-preset-grid {
        grid-template-columns: 1fr;
    }

    .login-modal {
        width: calc(100vw - 12px);
        max-height: calc(100dvh - 12px);
        border-radius: 22px;
    }

    .auth-brand-panel,
    .auth-form-panel {
        padding: 18px 16px;
    }

    .brand-asset-slot-auth,
    .brand-asset-image-auth {
        width: 60px;
        height: 60px;
    }

    .auth-kicker {
        margin-top: 16px;
    }

    .auth-brand-panel h2,
    .login-header h2 {
        font-size: 22px;
    }

    .private-hero-copy h1,
    .private-preview-copy h2 {
        font-size: 24px;
    }

    .private-hero-copy p,
    .private-preview-copy p,
    .private-hero-panel p,
    .private-preview-note {
        font-size: 13px;
    }

    .private-flow-card {
        padding: 18px;
    }

    .private-preview-note {
        align-items: flex-start;
    }

    .test-card-badge {
        top: 10px;
        right: 10px;
        max-width: calc(100% - 20px);
    }
}
.profile-form-stack {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.profile-avatar img,
.profile-avatar-admin img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: inherit;
}

.admin-user-filterbar {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 16px;
}

.table-user-cell {
    display: flex;
    align-items: center;
    gap: 12px;
}

.table-user-avatar {
    width: 42px;
    height: 42px;
    border-radius: 14px;
    object-fit: cover;
    border: 1px solid var(--border);
    background: var(--bg-secondary);
}

.table-user-avatar-fallback {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    color: var(--primary);
    background: rgba(225, 32, 41, 0.08);
}

.table-user-meta {
    color: var(--text-secondary);
    font-size: 13px;
    margin-top: 4px;
}

.admin-user-modal-content {
    max-width: 920px;
}

.admin-user-editor {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.admin-user-editor-hero {
    display: flex;
    gap: 20px;
    align-items: center;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--border);
    flex-wrap: wrap;
}

.admin-user-editor-copy {
    flex: 1;
    min-width: 240px;
}

.admin-user-editor-copy p {
    color: var(--text-secondary);
    margin: 8px 0 14px;
    line-height: 1.7;
}

.profile-avatar-admin {
    width: 92px;
    height: 92px;
    border-radius: 24px;
    overflow: hidden;
}

.admin-user-editor-form {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.admin-user-editor-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 16px;
}

.settings-checkbox-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
    gap: 10px;
    margin-top: 10px;
}

.settings-checkbox {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    min-height: 42px;
    padding: 10px 12px;
    border: 1px solid var(--border);
    border-radius: 14px;
    background: var(--bg-secondary);
    color: var(--text-secondary);
    font-size: 14px;
}

.settings-checkbox input {
    width: 16px;
    height: 16px;
    accent-color: var(--primary);
}

.role-definition-grid {
    display: grid;
    gap: 16px;
}

.role-definition-card {
    padding: 18px;
    border: 1px solid var(--border);
    border-radius: 18px;
    background: linear-gradient(180deg, rgba(255,255,255,0.98), rgba(248,249,252,0.96));
}

.test-access-grid {
    display: grid;
    gap: 12px;
}

.test-access-row {
    display: grid;
    grid-template-columns: minmax(220px, 1.25fr) 90px minmax(260px, 1fr);
    gap: 14px;
    align-items: start;
    padding: 16px;
    border: 1px solid var(--border);
    border-radius: 18px;
    background: var(--bg-secondary);
}

.test-access-main {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.test-access-main span {
    color: var(--text-secondary);
    font-size: 14px;
}

.test-access-main small {
    color: var(--text-light);
    line-height: 1.6;
}

.test-access-toggle {
    display: flex;
    justify-content: center;
    padding-top: 6px;
}

.test-access-roles {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 8px;
}

.admin-role-helper {
    margin-top: 16px;
    padding: 14px 16px;
    border-radius: 16px;
    background: rgba(15, 23, 42, 0.04);
    border: 1px solid var(--border);
}

.announcement-feed-grid,
.announcement-admin-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 16px;
}

.announcement-card,
.announcement-admin-card {
    padding: 18px;
    border: 1px solid var(--border);
    border-radius: 20px;
    background: linear-gradient(180deg, rgba(255,255,255,0.98), rgba(247,248,252,0.96));
    box-shadow: 0 18px 40px rgba(15, 23, 42, 0.05);
}

.announcement-card-pinned {
    border-color: rgba(225, 32, 41, 0.2);
    box-shadow: 0 20px 44px rgba(225, 32, 41, 0.08);
}

.announcement-card-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 12px;
}

.announcement-card h3,
.announcement-admin-card h3 {
    margin-bottom: 10px;
}

.announcement-card p,
.announcement-admin-card p {
    color: var(--text-secondary);
    line-height: 1.7;
    margin-bottom: 12px;
}

.announcement-card-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    color: var(--text-light);
    font-size: 13px;
}

@media (max-width: 900px) {
    .test-access-row {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 640px) {
    .admin-user-editor-hero {
        align-items: flex-start;
    }

    .settings-checkbox-grid,
    .test-access-roles {
        grid-template-columns: 1fr;
    }
}
