/* CriSTEAM — EduKids-inspired bright UI */
:root {
    --primary-color: #6366f1;
    --primary-hover: #4f46e5;
    --primary-light: #eef2ff;
    --secondary-color: #06b6d4;
    --secondary-light: #ecfeff;
    --accent-color: #f59e0b;
    --accent-light: #fffbeb;
    --text-main: #1e293b;
    --text-muted: #64748b;
    --bg-page: #f5f7ff;
    --bg-card: #ffffff;
    --border-color: #e2e8f0;
    --success: #10b981;
    --success-bg: #d1fae5;
    --danger: #ef4444;
    --danger-bg: #fee2e2;
    --warning: #f59e0b;
    --warning-bg: #fef3c7;
    --info: #0ea5e9;
    --info-bg: #e0f2fe;
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 20px;
    --radius-xl: 28px;
    --shadow-sm: 0 1px 3px rgb(99 102 241 / 0.06);
    --shadow-md: 0 8px 24px rgb(99 102 241 / 0.1);
    --shadow-lg: 0 16px 40px rgb(99 102 241 / 0.14);
    --shadow-glow: 0 0 0 1px rgb(99 102 241 / 0.08), 0 8px 32px rgb(99 102 241 / 0.12);
    --transition-fast: 0.18s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-smooth: 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: "Nunito", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    background: linear-gradient(160deg, #f0f9ff 0%, #f5f7ff 35%, #fdf4ff 70%, #fff7ed 100%);
    background-attachment: fixed;
    color: var(--text-main);
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    position: relative;
    overflow-x: hidden;
}

/* Decorative background blobs */
.bg-decoration {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 0;
    overflow: hidden;
}

.bg-blob {
    position: absolute;
    border-radius: 50%;
    filter: blur(60px);
    opacity: 0.45;
    animation: blobFloat 18s ease-in-out infinite;
}

.bg-blob-1 {
    width: 420px;
    height: 420px;
    background: radial-gradient(circle, #a5b4fc 0%, transparent 70%);
    top: -120px;
    right: -80px;
}

.bg-blob-2 {
    width: 360px;
    height: 360px;
    background: radial-gradient(circle, #67e8f9 0%, transparent 70%);
    bottom: 10%;
    left: -100px;
    animation-delay: -6s;
}

.bg-blob-3 {
    width: 280px;
    height: 280px;
    background: radial-gradient(circle, #fcd34d 0%, transparent 70%);
    top: 45%;
    right: 15%;
    animation-delay: -12s;
}

@keyframes blobFloat {
    0%, 100% { transform: translate(0, 0) scale(1); }
    33% { transform: translate(20px, -25px) scale(1.05); }
    66% { transform: translate(-15px, 15px) scale(0.95); }
}

.navbar,
.main-content,
.footer {
    position: relative;
    z-index: 1;
}

.main-content {
    view-transition-name: main-content;
}

@view-transition {
    navigation: auto;
}

/* Navbar */
.navbar {
    background: rgba(255, 255, 255, 0.82);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border-bottom: 1px solid rgb(99 102 241 / 0.1);
    box-shadow: 0 4px 24px rgb(99 102 241 / 0.06);
    position: sticky;
    top: 0;
    z-index: 200;
    transition: box-shadow var(--transition-fast);
}

.navbar-container {
    width: 90%;
    max-width: 90%;
    margin: 0 auto;
    padding: 0 1rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 64px;
    position: relative;
}

/* Brand */
.brand {
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 0.45rem;
}

/* Brand logo image */
.brand-logo {
    height: 48px;
    width: auto;
    display: block;
    object-fit: contain;
}


/* Nav content area */
.nav-content {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    flex: 1;
    margin-left: 2rem;
}

.nav-main-links {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    flex-wrap: wrap;
}

.nav-user-area {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-left: auto;
}

/* Nav links */
.nav-link {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-muted);
    text-decoration: none;
    padding: 0.45rem 0.75rem;
    border-radius: var(--radius-sm);
    transition: all 0.15s ease-in-out;
    white-space: nowrap;
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
}

.nav-link:hover {
    color: var(--primary-color);
    background: var(--primary-light);
}

.nav-link.active {
    color: var(--primary-color);
    background: var(--primary-light);
    font-weight: 700;
    box-shadow: inset 0 -2px 0 var(--primary-color);
}

.nav-link-research {
    color: #7c3aed;
}

.nav-link-research:hover {
    background: #f5f3ff;
    color: #7c3aed;
}

.nav-link-research.active {
    background: #f5f3ff;
    color: #7c3aed;
}

/* XP Pill */
.xp-pill {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    background: #fef3c7;
    border: 1.5px solid #fcd34d;
    border-radius: 9999px;
    padding: 0.25rem 0.8rem;
    text-decoration: none;
    font-weight: 700;
    font-size: 0.85rem;
    color: #b45309;
    box-shadow: 0 1px 2px rgba(245, 158, 11, 0.1);
    transition: all 0.15s ease-in-out;
}

.xp-pill:hover {
    background: #fde68a;
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(245, 158, 11, 0.2);
}

.xp-bolt {
    font-size: 0.95rem;
}

/* User profile */
.user-profile-badge {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.user-avatar-circle {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary-color), #4338ca);
    color: white;
    font-weight: 800;
    font-size: 0.875rem;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.user-display-name {
    font-size: 0.88rem;
    font-weight: 600;
    color: var(--text-main);
    max-width: 140px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Logout button */
.nav-logout-btn {
    font-size: 0.82rem;
    padding: 0.35rem 0.75rem;
    line-height: 1.2;
}

/* Mobile toggle button */
.nav-toggle {
    display: none;
    flex-direction: column;
    justify-content: space-around;
    width: 30px;
    height: 26px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 2px;
    z-index: 250;
}

.nav-toggle span {
    display: block;
    width: 100%;
    height: 2.5px;
    background: var(--text-main);
    border-radius: 3px;
    transition: all 0.25s ease-in-out;
}

/* Responsive Navbar */
@media (max-width: 960px) {
    .nav-toggle {
        display: flex;
    }

    .nav-content {
        display: none;
        position: absolute;
        top: 64px;
        left: 0;
        right: 0;
        background: #ffffff;
        border-bottom: 1px solid var(--border-color);
        box-shadow: var(--shadow-lg);
        flex-direction: column;
        align-items: stretch;
        gap: 0.75rem;
        padding: 1.25rem 1.5rem;
        margin-left: 0;
        z-index: 300;
    }

    .nav-content.open {
        display: flex;
    }

    .nav-main-links {
        flex-direction: column;
        align-items: stretch;
        width: 100%;
        gap: 0.35rem;
    }

    .nav-link {
        width: 100%;
        padding: 0.65rem 0.85rem;
        border-radius: var(--radius-sm);
    }

    .nav-user-area {
        flex-direction: row;
        width: 100%;
        align-items: center;
        justify-content: space-between;
        margin-left: 0;
        padding-top: 0.85rem;
        border-top: 1px solid var(--border-color);
        margin-top: 0.5rem;
    }

    .user-display-name {
        display: inline-block;
    }
}

/* Layout */
.main-content {
    flex: 1;
    width: 90%;
    max-width: 90%;
    margin: 0 auto;
    padding: 1.5rem 0.5rem;
}

.container {
    width: 100%;
    max-width: 100%;
    margin: 0 auto;
}

/* Messages / Alerts */
.messages-container {
    margin-bottom: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.alert {
    padding: 0.9rem 1.25rem;
    border-radius: var(--radius-md);
    font-size: 0.92rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    box-shadow: var(--shadow-sm);
}

.alert-enter {
    animation: alertSlideIn 0.45s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.alert-leave {
    animation: alertSlideOut 0.28s ease forwards;
}

.alert-dismiss {
    flex-shrink: 0;
    border: none;
    background: transparent;
    color: inherit;
    font-size: 1.35rem;
    line-height: 1;
    cursor: pointer;
    opacity: 0.65;
    padding: 0 0.15rem;
}

.alert-dismiss:hover {
    opacity: 1;
}

@keyframes alertSlideIn {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes alertSlideOut {
    to { opacity: 0; transform: translateY(-8px); }
}

.alert-success { background: var(--success-bg); color: var(--success); border-left: 4px solid var(--success); }
.alert-error, .alert-danger { background: var(--danger-bg); color: var(--danger); border-left: 4px solid var(--danger); }
.alert-warning { background: var(--warning-bg); color: var(--warning); border-left: 4px solid var(--warning); }
.alert-info { background: var(--info-bg); color: var(--info); border-left: 4px solid var(--info); }

/* Card & Auth Containers */
.card {
    background: rgba(255, 255, 255, 0.92);
    border: 1px solid rgb(99 102 241 / 0.1);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-glow);
    padding: 2rem;
    transition: transform var(--transition-fast), box-shadow var(--transition-fast);
}

.card:hover {
    box-shadow: var(--shadow-lg);
}

.card-header {
    text-align: center;
    margin-bottom: 1.75rem;
}

.card-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-main);
}

.card-subtitle {
    font-size: 0.92rem;
    color: var(--text-muted);
    margin-top: 0.35rem;
}

/* Forms */
.form-group {
    margin-bottom: 1.25rem;
}

.form-label {
    display: block;
    font-size: 0.88rem;
    font-weight: 600;
    color: var(--text-main);
    margin-bottom: 0.4rem;
}

.form-control {
    width: 100%;
    padding: 0.65rem 0.9rem;
    font-size: 0.95rem;
    border: 1.5px solid var(--border-color);
    border-radius: var(--radius-md);
    background-color: #fff;
    color: var(--text-main);
    transition: border-color 0.15s, box-shadow 0.15s;
}

.form-control:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}

.form-text {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-top: 0.35rem;
}

.form-error {
    font-size: 0.82rem;
    color: var(--danger);
    margin-top: 0.35rem;
    font-weight: 500;
}

/* Password visibility toggle */
.password-input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    width: 100%;
}

.password-input-wrapper .form-control {
    padding-right: 2.75rem !important;
}

.password-input-wrapper input::-ms-reveal,
.password-input-wrapper input::-ms-clear {
    display: none;
}

.password-toggle-btn {
    position: absolute;
    right: 0.5rem;
    top: 50%;
    transform: translateY(-50%);
    background: transparent;
    border: none;
    padding: 0.35rem;
    cursor: pointer;
    color: var(--text-muted, #64748b);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-sm, 6px);
    transition: color 0.15s ease, background-color 0.15s ease, transform 0.1s ease;
    line-height: 1;
    z-index: 2;
    -webkit-user-select: none;
    user-select: none;
}

.password-toggle-btn:hover {
    color: var(--primary-color, #4f46e5);
    background-color: rgba(99, 102, 241, 0.08);
}

.password-toggle-btn:active {
    transform: translateY(-50%) scale(0.92);
}

.password-toggle-btn:focus-visible {
    outline: 2px solid var(--primary-color, #4f46e5);
    outline-offset: 2px;
}

.password-toggle-btn svg {
    width: 20px;
    height: 20px;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
    fill: none;
    pointer-events: none;
    display: block;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.7rem 1.4rem;
    font-size: 0.95rem;
    font-weight: 600;
    border-radius: var(--radius-md);
    cursor: pointer;
    border: none;
    transition: background 0.15s, transform 0.05s;
    text-decoration: none;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-color) 0%, #818cf8 100%);
    color: #fff;
    width: 100%;
    box-shadow: 0 4px 14px rgb(99 102 241 / 0.35);
}

.btn-primary:hover {
    background: linear-gradient(135deg, var(--primary-hover) 0%, var(--primary-color) 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgb(99 102 241 / 0.4);
}

.btn-primary:active {
    transform: translateY(0) scale(0.98);
}

.btn-outline {
    background: transparent;
    border: 1.5px solid var(--border-color);
    color: var(--text-main);
}

.btn-outline:hover {
    background: var(--primary-light);
    border-color: var(--primary-color);
    color: var(--primary-color);
}

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

/* Info Box / Summary */
.info-box {
    background-color: var(--primary-light);
    border: 1px solid #bfdbfe;
    border-radius: var(--radius-md);
    padding: 1rem;
    margin-bottom: 1.5rem;
    font-size: 0.9rem;
}

.info-item {
    display: flex;
    justify-content: space-between;
    padding: 0.35rem 0;
    border-bottom: 1px dashed #dbeafe;
}

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

.info-label {
    color: var(--text-muted);
}

.info-value {
    font-weight: 600;
    color: var(--text-main);
}

/* Footer */
.footer {
    border-top: 1px solid rgb(99 102 241 / 0.08);
    padding: 1.5rem;
    text-align: center;
    font-size: 0.85rem;
    color: var(--text-muted);
    background: rgba(255, 255, 255, 0.75);
    backdrop-filter: blur(8px);
    margin-top: auto;
}

/* Dashboard Grid */
.dashboard-card {
    background: rgba(255, 255, 255, 0.92);
    border: 1px solid rgb(99 102 241 / 0.1);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-glow);
    padding: 2rem;
    margin-top: 1rem;
    animation: fadeUp 0.5s ease both;
}

.profile-header {
    display: flex;
    align-items: center;
    gap: 1.25rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 1.5rem;
}

.avatar {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary-light), var(--secondary-light));
    color: var(--primary-color);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.75rem;
    font-weight: 700;
    box-shadow: 0 4px 16px rgb(99 102 241 / 0.15);
}

.profile-title {
    font-size: 1.4rem;
    font-weight: 700;
}

.badge-success {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    background: var(--success-bg);
    color: var(--success);
    font-size: 0.8rem;
    font-weight: 600;
    border-radius: 9999px;
    margin-top: 0.25rem;
}

.details-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1.25rem;
}

.detail-item {
    background: var(--bg-page);
    padding: 1rem;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
}

.detail-item .label {
    font-size: 0.8rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.35rem;
}

.detail-item .value {
    font-size: 1.05rem;
    font-weight: 600;
    color: var(--text-main);
}

/* Stepper Progress Bar */
.stepper-wrapper {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 2rem;
    position: relative;
}

.stepper-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    z-index: 2;
    flex: 1;
}

.step-circle {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: #fff;
    border: 2px solid var(--border-color);
    color: var(--text-muted);
    font-weight: 700;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    margin-bottom: 0.4rem;
}

.stepper-step.active .step-circle {
    border-color: var(--primary-color);
    background: var(--primary-color);
    color: #fff;
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.2);
}

.stepper-step.completed .step-circle {
    border-color: var(--success);
    background: var(--success);
    color: #fff;
}

.step-title {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-muted);
    text-align: center;
}

.stepper-step.active .step-title {
    color: var(--primary-color);
}

.stepper-step.completed .step-title {
    color: var(--text-main);
}

.stepper-line {
    position: absolute;
    top: 18px;
    left: 16%;
    right: 16%;
    height: 2px;
    background: var(--border-color);
    z-index: 1;
}

.stepper-line-progress {
    height: 100%;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
    transition: width 0.3s ease;
}

/* ===== Animations ===== */
@keyframes fadeUp {
    from { opacity: 0; transform: translateY(24px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes scaleIn {
    from { opacity: 0; transform: scale(0.92); }
    to { opacity: 1; transform: scale(1); }
}

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

@keyframes pulse-soft {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.04); }
}

.animate-in {
    animation: fadeUp 0.6s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.animate-in-delay-1 { animation-delay: 0.1s; }
.animate-in-delay-2 { animation-delay: 0.2s; }
.animate-in-delay-3 { animation-delay: 0.3s; }

.pulse-soft {
    animation: pulse-soft 2.2s ease-in-out infinite;
}

.btn.is-loading {
    position: relative;
    color: transparent !important;
    pointer-events: none;
}

.btn.is-loading::after {
    content: "";
    position: absolute;
    inset: 0;
    margin: auto;
    width: 1.15rem;
    height: 1.15rem;
    border: 2px solid rgb(255 255 255 / 0.35);
    border-top-color: #fff;
    border-radius: 50%;
    animation: spinBtn 0.65s linear infinite;
}

.btn-outline.is-loading::after {
    border-color: rgb(99 102 241 / 0.25);
    border-top-color: var(--primary-color);
}

@keyframes spinBtn {
    to { transform: rotate(360deg); }
}

.dot-btn.current {
    transform: scale(1.06);
}

.animate-stagger > * {
    animation: fadeUp 0.55s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.animate-stagger > *:nth-child(1) { animation-delay: 0.05s; }
.animate-stagger > *:nth-child(2) { animation-delay: 0.12s; }
.animate-stagger > *:nth-child(3) { animation-delay: 0.19s; }
.animate-stagger > *:nth-child(4) { animation-delay: 0.26s; }
.animate-stagger > *:nth-child(5) { animation-delay: 0.33s; }
.animate-stagger > *:nth-child(6) { animation-delay: 0.4s; }
.animate-stagger > *:nth-child(n+7) { animation-delay: 0.47s; }

/* ===== Page Hero (light, colorful — no dark backgrounds) ===== */
.page-hero {
    position: relative;
    overflow: hidden;
    border-radius: var(--radius-xl);
    padding: 2.25rem 2.5rem;
    margin-bottom: 2rem;
    border: 1px solid rgb(99 102 241 / 0.12);
    box-shadow: var(--shadow-glow);
}

.page-hero::before {
    content: "";
    position: absolute;
    top: -40%;
    right: -8%;
    width: 280px;
    height: 280px;
    border-radius: 50%;
    background: radial-gradient(circle, rgb(99 102 241 / 0.12) 0%, transparent 70%);
    pointer-events: none;
}

.page-hero__eyebrow {
    font-size: 0.82rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    font-weight: 800;
    color: var(--primary-color);
    margin-bottom: 0.35rem;
}

.page-hero__title {
    font-size: clamp(1.6rem, 3vw, 2.1rem);
    font-weight: 800;
    color: var(--text-main);
    margin: 0.35rem 0;
    line-height: 1.2;
}

.page-hero__desc {
    margin: 0;
    color: var(--text-muted);
    font-size: 1.05rem;
    max-width: 640px;
}

.page-hero--blue {
    background: linear-gradient(135deg, #ffffff 0%, #eef2ff 55%, #dbeafe 100%);
}

.page-hero--cyan {
    background: linear-gradient(135deg, #ffffff 0%, #ecfeff 50%, #cffafe 100%);
}

.page-hero--green {
    background: linear-gradient(135deg, #ffffff 0%, #ecfdf5 50%, #d1fae5 100%);
}

.page-hero--purple {
    background: linear-gradient(135deg, #ffffff 0%, #f5f3ff 50%, #ede9fe 100%);
}

.page-hero--amber {
    background: linear-gradient(135deg, #ffffff 0%, #fffbeb 50%, #fef3c7 100%);
}

.page-hero--indigo {
    background: linear-gradient(135deg, #ffffff 0%, #eef2ff 50%, #e0e7ff 100%);
}

/* ===== Activity list cards ===== */
.list-container,
.lab-container,
.badge-container,
.review-container,
.detail-container {
    width: 100%;
    max-width: 100%;
    margin: 0 auto;
}

.activity-card {
    background: rgba(255, 255, 255, 0.95);
    border: 1px solid rgb(99 102 241 / 0.1);
    border-radius: var(--radius-lg);
    padding: 1.75rem 2rem;
    margin-bottom: 1.25rem;
    box-shadow: var(--shadow-sm);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1.25rem;
    transition: transform var(--transition-fast), box-shadow var(--transition-fast), border-color var(--transition-fast);
}

.activity-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
    border-color: rgb(99 102 241 / 0.22);
}

.activity-card.locked {
    opacity: 0.72;
    background: rgb(248 250 252 / 0.8);
}

.activity-card.locked:hover {
    transform: none;
}

/* ===== Auth layout (login/register) ===== */
.auth-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2.5rem;
    align-items: center;
    max-width: 960px;
    margin: 1.5rem auto;
    padding: 0 0.5rem;
}

.auth-showcase {
    padding: 2rem 0;
}

.auth-showcase__badge {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    background: var(--primary-light);
    color: var(--primary-color);
    font-size: 0.82rem;
    font-weight: 800;
    padding: 0.35rem 0.85rem;
    border-radius: 999px;
    border: 1px solid rgb(99 102 241 / 0.2);
    margin-bottom: 1rem;
}

.auth-showcase__title {
    font-size: clamp(1.75rem, 4vw, 2.35rem);
    font-weight: 800;
    line-height: 1.15;
    color: var(--text-main);
    margin-bottom: 0.75rem;
}

.auth-showcase__title span {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.auth-showcase__desc {
    color: var(--text-muted);
    font-size: 1.05rem;
    margin-bottom: 1.75rem;
    line-height: 1.65;
}

.auth-features {
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
}

.auth-feature {
    display: flex;
    align-items: flex-start;
    gap: 0.85rem;
    padding: 0.85rem 1rem;
    background: rgba(255, 255, 255, 0.7);
    border: 1px solid rgb(99 102 241 / 0.1);
    border-radius: var(--radius-md);
    transition: transform var(--transition-fast), box-shadow var(--transition-fast);
}

.auth-feature:hover {
    transform: translateX(4px);
    box-shadow: var(--shadow-sm);
}

.auth-feature__icon {
    font-size: 1.5rem;
    line-height: 1;
    flex-shrink: 0;
}

.auth-feature__text strong {
    display: block;
    font-size: 0.95rem;
    color: var(--text-main);
    margin-bottom: 0.15rem;
}

.auth-feature__text span {
    font-size: 0.85rem;
    color: var(--text-muted);
}

.auth-wrapper {
    max-width: 540px;
    margin: 1.5rem auto;
}

.auth-layout .auth-wrapper {
    max-width: none;
    margin: 0;
}

/* ===== Lab / detail page headers ===== */
.lab-header {
    background: linear-gradient(135deg, #ffffff 0%, #ecfeff 50%, #cffafe 100%) !important;
    color: var(--text-main) !important;
    border: 1px solid rgb(6 182 212 / 0.2);
    box-shadow: var(--shadow-glow) !important;
}

.live-total-bar {
    background: linear-gradient(135deg, #6366f1 0%, #818cf8 100%) !important;
    box-shadow: 0 10px 30px rgb(99 102 241 / 0.35) !important;
}

/* ===== Responsive auth ===== */
@media (max-width: 860px) {
    .auth-layout {
        grid-template-columns: 1fr;
        max-width: 540px;
    }

    .auth-showcase {
        text-align: center;
        padding: 0.5rem 0 0;
    }

    .auth-features {
        display: none;
    }
}

.navbar-scrolled {
    box-shadow: 0 8px 32px rgb(99 102 241 / 0.12);
}

.reveal-on-scroll {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.55s cubic-bezier(0.22, 1, 0.36, 1),
                transform 0.55s cubic-bezier(0.22, 1, 0.36, 1);
}

.reveal-on-scroll.is-visible {
    opacity: 1;
    transform: translateY(0);
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }

    .bg-blob {
        animation: none;
    }
}

