:root {
    --color-background: #f7f9ff;
    --color-on-background: #181c20;
    --color-surface-variant: #dfe3e8;
    --color-on-surface-variant: #414754;
    --color-outline: #727785;
    --color-outline-variant: #c1c6d6;
    --color-primary: #005bbf;
    --color-on-primary: #ffffff;
    --color-on-primary-fixed-variant: #004493;
    --color-surface-container: #ebeef4;
    --color-surface-container-low: #f1f4fa;
    --color-secondary: #006e2c;
    --color-on-surface: #181c20;

    --font-inter: 'Inter', sans-serif;
}

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

html, body {
    max-width: 100%;
    overflow-x: hidden;
    -webkit-overflow-scrolling: touch;
}

/* Touch responsiveness for premium feel */
button, a, input, select, textarea {
    touch-action: manipulation;
}

button:active, a:active, .audit-item:active {
    transform: scale(0.98);
    transition: transform 0.1s ease;
}

/* Hardware acceleration for stable UI and no flickering */
.dashboard-header, .top-nav, .bottom-nav, .view, .hero-3d, .splash-intro {
    transform: translateZ(0);
    will-change: transform;
}

input,
textarea,
[contenteditable="true"] {
    caret-color: auto;
}

.hidden {
    display: none !important;
}

/* Background Decoration */
.bg-decoration {
    position: fixed;
    border-radius: 50%;
    filter: blur(100px);
    z-index: -1;
    opacity: 0.15;
    pointer-events: none;
}

.primary-decoration {
    width: 350px;
    height: 350px;
    background: linear-gradient(135deg, #3b82f6, #60a5fa);
    top: -100px;
    right: -100px;
}

.secondary-decoration {
    width: 300px;
    height: 300px;
    background: linear-gradient(135deg, #6366f1, #a855f7);
    bottom: -50px;
    left: -100px;
}

body.dark-mode .bg-decoration {
    opacity: 0.3;
}

/* Splash Intro */
.splash-intro {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: #000000;
    z-index: 9999;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: opacity 0.8s cubic-bezier(0.4, 0, 0.2, 1), backdrop-filter 0.8s ease, visibility 0.8s ease;
    overflow: hidden;
}

.splash-video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0;
    animation: fadeVideoIn 0.5s ease-out forwards;
}

@keyframes fadeVideoIn {
    to {
        opacity: 1;
    }
}

.splash-intro.fade-out {
    opacity: 0;
    visibility: hidden;
    backdrop-filter: blur(20px);
}

body.splash-active {
    overflow: hidden !important;
}

/* Glassmorphism transition effect for the rest of the body */
body.splash-active .view {
    filter: blur(12px) brightness(0.6);
    transform: scale(0.95);
    transition: filter 1s cubic-bezier(0.4, 0, 0.2, 1), transform 1s cubic-bezier(0.4, 0, 0.2, 1);
}

body.dark-mode {
    --color-background: #0f172a;
    --color-on-background: #f8fafc;
    background-color: var(--color-background);
}

body:not(.splash-active) .view {
    filter: blur(0) brightness(1);
    transform: scale(1);
    transition: filter 1s cubic-bezier(0.4, 0, 0.2, 1), transform 1s cubic-bezier(0.4, 0, 0.2, 1);
}

body {
    background-color: var(--color-background);
    color: var(--color-on-background);
    font-family: var(--font-inter);
    font-size: 14px;
    line-height: 20px;
    font-weight: 400;
    min-height: 100dvh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow-x: hidden;
}

.material-symbols-outlined {
    font-variation-settings: 'FILL' 0, 'wght' 400, 'GRAD' 0, 'opsz' 24;
}

/* Typography utilities */
.text-headline-lg {
    font-size: 17px;
    line-height: 28px;
    letter-spacing: -0.02em;
    font-weight: 700;
}

.text-headline-md {
    font-size: 28px;
    line-height: 36px;
    letter-spacing: -0.01em;
    font-weight: 700;
    color: #1e293b;
}

.text-title-md {
    font-size: 20px;
    line-height: 28px;
    font-weight: 700;
    color: #1e293b;
}

.text-body-md {
    font-size: 14px;
    line-height: 20px;
    color: #64748b;
}

.dashboard-subtitle {
    max-width: 280px;
    margin-top: 4px;
}

.text-label-md {
    font-size: 12px;
    line-height: 16px;
    letter-spacing: 0.05em;
    font-weight: 500;
}

/* Header */
.top-nav {
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 50;
    background-color: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 4px 20px rgba(26, 115, 232, 0.06);
    padding-top: env(safe-area-inset-top);
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 64px;
    padding: 0 20px;
    width: 100%;
    max-width: 768px; width: 100%;
    margin: 0 auto;
}

.logo-container {
    display: flex;
    align-items: center;
    gap: 8px;
}

.icon-blue {
    color: #2563eb;
}

.logo-text {
    font-size: 20px;
    font-weight: 700;
    background: linear-gradient(to right, #1d4ed8, #3b82f6);
    -webkit-background-clip: text;
    color: transparent;
    letter-spacing: -0.015em;
}

/* Login Header Specifics */
#login-view .top-nav {
    background: transparent;
    border: none;
    box-shadow: none;
    padding: 0;
    position: relative;
}

#login-view .nav-container {
    justify-content: center;
    max-width: none;
    padding: 0;
}

.voice-btn {
    background: rgba(37, 99, 235, 0.1);
    border: none;
    color: #2563eb;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.voice-btn:hover {
    background: rgba(37, 99, 235, 0.2);
}

.voice-btn.listening {
    background: #ef4444;
    color: white;
    box-shadow: 0 0 0 4px rgba(239, 68, 68, 0.2);
    animation: pulse-mic 1.5s infinite;
}

@keyframes pulse-mic {
    0% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.1);
    }

    100% {
        transform: scale(1);
    }
}

.voice-btn .material-symbols-outlined {
    font-size: 18px;
}

#login-view .logo-container {
    flex-direction: row;
    gap: 12px;
    margin-right: 40px;
}

#login-view .logo-container .material-symbols-outlined {
    font-size: 56px;
}

#login-view .logo-text {
    font-size: 44px;
    letter-spacing: -0.03em;
}

.clear-all-btn {
    background: none;
    border: none;
    color: #ef4444;
    font-size: 14px;
    font-weight: 600;
    padding: 6px 12px;
    border-radius: 20px;
    cursor: pointer;
    transition: background-color 0.2s;
}

.clear-all-btn:active {
    background-color: rgba(239, 68, 68, 0.1);
}

.avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background-color: var(--color-surface-container);
    display: flex;
    align-items: center;
    justify-content: center;
}

.avatar-icon {
    color: var(--color-outline);
    font-size: 14px;
}

/* Main Content */
.main-content {
    width: 100%;
    max-width: 768px; width: 100%;
    padding: 96px 20px 48px;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

#login-view {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100dvh;
    overflow-y: auto;
    overflow-x: hidden;
    justify-content: center;
    padding-top: 6vh;
}

/* Hide scrollbar for #login-view to simulate disabled scroll visually, but allow actual scrolling if screen is too tiny */
#login-view::-webkit-scrollbar {
    display: none;
}

#login-view .main-content {
    padding-top: 0px;
    padding-bottom: 24px;
    margin: 0 auto;
}

.hero-section {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.hero-title {
    color: var(--color-on-background);
    font-weight: 400;
}

.hero-subtitle {
    color: var(--color-on-surface-variant);
}

/* Login Card */
.login-card {
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    padding: 24px;
    box-shadow: 0 8px 30px rgba(26, 115, 232, 0.08);
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.social-btn {
    width: 100%;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    background-color: white;
    border: 1px solid var(--color-outline-variant);
    border-radius: 8px;
    cursor: pointer;
    transition: background-color 0.15s, transform 0.15s;
}

.social-btn:hover {
    background-color: var(--color-surface-container-low);
}

.social-btn:active {
    transform: scale(0.95);
}

.social-btn span {
    font-size: 15px;
    line-height: 10px;
    letter-spacing: 0.05em;
    font-weight: 500;
    color: var(--color-on-surface-variant);
}

.google-logo {
    width: 20px;
    height: 20px;
}

.divider-container {
    display: flex;
    align-items: center;
    gap: 16px;
}

.divider-line {
    height: 1px;
    flex: 1;
    background-color: var(--color-outline-variant);
}

.divider-text {
    font-size: 12px;
    line-height: 16px;
    letter-spacing: 0.05em;
    font-weight: 500;
    color: var(--color-outline);
    text-transform: uppercase;
}

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

.input-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.input-group label {
    font-size: 12px;
    line-height: 16px;
    letter-spacing: 0.05em;
    font-weight: 500;
    color: var(--color-on-surface);
    margin-left: 4px;
}

.password-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 4px;
}

.forgot-link {
    font-size: 12px;
    line-height: 16px;
    letter-spacing: 0.05em;
    font-weight: 500;
    color: var(--color-primary);
    text-decoration: none;
}

.forgot-link:hover {
    text-decoration: underline;
}



.input-wrapper {
    position: relative;
}

.input-icon {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--color-outline);
    font-size: 20px;
}

.input-wrapper input {
    width: 100%;
    height: 48px;
    padding: 0 16px 0 48px;
    background-color: white;
    border: 1px solid var(--color-outline-variant);
    border-radius: 8px;
    font-family: var(--font-inter);
    font-size: 14px;
    outline: none;
    transition: all 0.2s;
}

.input-wrapper input:focus {
    box-shadow: 0 0 0 2px var(--color-primary);
    border-color: transparent;
}

.submit-btn {
    width: 100%;
    height: 48px;
    background-color: var(--color-primary);
    color: var(--color-on-primary);
    border-radius: 8px;
    border: none;
    font-size: 16px;
    font-weight: 600;
    box-shadow: 0 4px 12px rgba(0, 91, 191, 0.2);
    cursor: pointer;
    transition: all 0.2s;
    margin-top: 12px;
}

.submit-btn:hover {
    background-color: var(--color-on-primary-fixed-variant);
}

.submit-btn:active {
    transform: scale(0.98);
}

.submit-btn.loading {
    opacity: 0.7;
    pointer-events: none;
}

.submit-btn.loading .material-symbols-outlined {
    animation: rotateLoading 1s linear infinite;
}

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

/* Footer */
.footer {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
    text-align: center;
}

.footer-text {
    color: var(--color-on-surface-variant);
}

.signup-link {
    color: var(--color-primary);
    font-weight: 600;
    text-decoration: none;
}

.signup-link:hover {
    text-decoration: underline;
}

.footer-image-container {
    margin-top: 32px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
}

.footer-image-wrapper {
    width: 100%;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.footer-image {
    width: 100%;
    height: 160px;
    object-fit: cover;
    display: block;
}

.footer-image-caption {
    font-size: 12px;
    line-height: 16px;
    letter-spacing: 0.05em;
    font-weight: 500;
    color: var(--color-outline);
    font-style: italic;
}

/* Background Decorations */
.bg-decoration {
    position: fixed;
    border-radius: 50%;
    z-index: -1;
}

.primary-decoration {
    top: -10%;
    right: -10%;
    width: 50%;
    height: 50%;
    background-color: rgba(0, 91, 191, 0.05);
    filter: blur(100px);
}

.secondary-decoration {
    bottom: -5%;
    left: -5%;
    width: 40%;
    height: 40%;
    background-color: rgba(0, 110, 44, 0.05);
    filter: blur(80px);
}

/* Views */
.view {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    min-height: 100vh;
    transition: opacity 0.3s ease;
}

.view.hidden {
    display: none !important;
    opacity: 0;
}

#onboarding-view {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    height: 100dvh;
    overflow: hidden;
    z-index: 100;
}

/* Onboarding Header Override */
.shadow-none {
    box-shadow: none !important;
    background-color: transparent !important;
    border-bottom: none !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
}

.skip-btn {
    background: none;
    border: none;
    font-family: var(--font-inter);
    font-size: 14px;
    font-weight: 500;
    color: var(--color-outline);
    cursor: pointer;
    transition: color 0.2s;
}

.skip-btn:hover {
    color: var(--color-on-surface-variant);
}

/* Onboarding Content */
.onboarding-content {
    width: 100%;
    max-width: 768px; width: 100%;
    padding: 80px 20px 48px;
    display: flex;
    flex-direction: column;
    flex: 1;
    justify-content: space-between;
}

.slides-container {
    position: relative;
    flex: 1;
    display: flex;
    align-items: center;
    min-height: 380px;
}

.slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 40px;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.4s ease, transform 0.4s ease;
    transform: translateX(20px);
}

.slide.active {
    opacity: 1;
    pointer-events: auto;
    transform: translateX(0);
}

.slide.previous {
    transform: translateX(-20px);
}

.slide-image-container {
    width: 240px;
    height: 240px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.slide-text {
    text-align: center;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.subtitle-text {
    color: var(--color-on-surface-variant);
    padding: 0 16px;
}

/* Illustrations */
.illustration-lens {
    width: 200px;
    height: 200px;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.9), rgba(255, 255, 255, 0.4));
    backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.6);
    border-radius: 24px;
    box-shadow: 0 12px 40px rgba(0, 91, 191, 0.08), inset 0 2px 10px rgba(255, 255, 255, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.lens-circle {
    position: absolute;
    border-radius: 50%;
    border: 1px dashed rgba(0, 91, 191, 0.2);
    animation: spin 20s linear infinite;
}

.lens-circle.circle-1 {
    width: 160px;
    height: 160px;
    border: 1px solid rgba(0, 91, 191, 0.1);
}

.lens-circle.circle-2 {
    width: 110px;
    height: 110px;
    border: 1px dashed rgba(0, 91, 191, 0.3);
    animation-direction: reverse;
    animation-duration: 15s;
}

.lens-circle.circle-3 {
    width: 60px;
    height: 60px;
    border: 2px solid rgba(0, 91, 191, 0.2);
}

.lens-icon {
    font-size: 40px !important;
    color: var(--color-primary);
    z-index: 2;
    text-shadow: 0 0 20px rgba(0, 91, 191, 0.4);
}

@keyframes spin {
    100% {
        transform: rotate(360deg);
    }
}

.illustration-cards {
    width: 240px;
    height: 200px;
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    justify-content: center;
    align-items: center;
}

.mini-card {
    width: calc(50% - 6px);
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.8);
    border-radius: 12px;
    padding: 12px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.04);
    display: flex;
    flex-direction: column;
    gap: 8px;
    transform: translateY(0);
    transition: transform 0.3s;
}

.mini-card:nth-child(1) {
    transform: translateY(8px);
}

.mini-card:nth-child(2) {
    transform: translateY(-8px);
}

.mini-card:nth-child(3) {
    transform: translateY(4px);
}

.mini-card:nth-child(4) {
    transform: translateY(-4px);
}

.icon-info {
    color: var(--color-primary);
    font-size: 16px !important;
}

.icon-success {
    color: var(--color-secondary);
    font-size: 16px !important;
}

.icon-warning {
    color: var(--color-error);
    font-size: 16px !important;
}

.skeleton-line {
    height: 4px;
    border-radius: 2px;
    background-color: var(--color-surface-variant);
}

.w-full {
    width: 100%;
}

.w-3\/4 {
    width: 75%;
}

.w-1\/2 {
    width: 50%;
}

.illustration-report {
    width: 220px;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.6);
    border-radius: 20px;
    padding: 20px;
    box-shadow: 0 16px 40px rgba(0, 110, 44, 0.08);
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.report-header {
    display: flex;
    align-items: center;
    gap: 12px;
}

.report-icon-container {
    width: 40px;
    height: 40px;
    background-color: var(--color-secondary-container);
    color: var(--color-on-secondary-container);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.report-title-area {
    display: flex;
    flex-direction: column;
    gap: 2px;
    text-align: left;
}

.report-title-area h3 {
    font-size: 14px;
    font-weight: 600;
    color: var(--color-on-background);
}

.report-title-area span {
    font-size: 10px;
    color: var(--color-outline);
}

.report-score-area {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.score-labels {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 10px;
    font-weight: 500;
    color: var(--color-on-surface-variant);
}

.score-value {
    color: var(--color-secondary);
    font-weight: 700;
    font-size: 12px;
}

.score-bar-bg {
    width: 100%;
    height: 6px;
    background-color: var(--color-surface-variant);
    border-radius: 3px;
    overflow: hidden;
}

.score-bar-fill {
    width: 98%;
    height: 100%;
    background-color: var(--color-secondary);
    border-radius: 3px;
}

/* Controls */
.onboarding-controls {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 24px;
    width: 100%;
    z-index: 10;
}

.onboarding-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.btn-green {
    background-color: var(--color-secondary) !important;
    box-shadow: 0 4px 12px rgba(0, 110, 44, 0.2) !important;
}

.btn-green:hover {
    background-color: #005320 !important;
    /* darker green */
}

.pagination-dots {
    display: flex;
    gap: 8px;
}

.dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background-color: var(--color-outline-variant);
    transition: all 0.3s ease;
}

.dot.active {
    width: 16px;
    border-radius: 3px;
    background-color: var(--color-primary);
}

.slide-actions {
    width: 100%;
    margin-top: 24px;
    display: flex;
    gap: 16px;
}

.flex-1 {
    flex: 1;
}

.flex-2 {
    flex: 2;
}

.outline-btn {
    background-color: transparent !important;
    color: var(--color-primary) !important;
    border: 1px solid var(--color-primary) !important;
    box-shadow: none !important;
}

.outline-btn:hover {
    background-color: var(--color-surface-container) !important;
}

/* Analysis View Styles */
#analysis-view {
    background-color: #081324;
    color: white;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

/* Dotted Grid Background */
#analysis-view::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: radial-gradient(rgba(255, 255, 255, 0.1) 1px, transparent 1px);
    background-size: 24px 24px;
    pointer-events: none;
}

.analysis-inner {
    width: 100%;
    max-width: 768px; width: 100%;
    padding: 40px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    z-index: 1;
}

.shield-container {
    margin-bottom: 32px;
}

.shield-large {
    font-size: 120px !important;
    color: white;
    font-variation-settings: 'FILL' 1, 'wght' 400, 'GRAD' 0, 'opsz' 48;
}

.analysis-title {
    font-size: 36px;
    font-weight: 700;
    margin-bottom: 16px;
    letter-spacing: -0.01em;
}

.analysis-subtitle {
    font-size: 16px;
    line-height: 1.5;
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 48px;
    max-width: 280px;
}

.get-started-btn {
    background-color: #3b82f6 !important;
    box-shadow: 0 4px 14px rgba(59, 130, 246, 0.4) !important;
    width: 100%;
    max-width: 280px;
    height: 54px !important;
    border-radius: 12px !important;
}

/* Dashboard and Profile View Styles */
#dashboard-view,
#profile-view {
    background-color: #f8fafc;
    color: var(--color-on-background);
    align-items: stretch;
    overflow-y: auto;
}

.dashboard-header {
    background-color: white;
    position: fixed;
    top: 0;
    z-index: 100;
    border-bottom: 1px solid #e2e8f0;
    width: 100%;
    padding-top: env(safe-area-inset-top);
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 20px;
    max-width: 768px; width: 100%;
    margin: 0 auto;
}

.logo-container {
    display: flex;
    align-items: center;
    gap: 8px;
}

.logo-text {
    font-size: 18px;
    font-weight: 700;
    color: #1e293b;
}


.avatar-small {
    width: 36px;
    height: 36px;
}

.avatar-small img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
    border: 2px solid #e2e8f0;
}

.dashboard-content {
    padding: 80px 20px 100px;
    max-width: 768px; width: 100%;
    margin: 0 auto;
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 32px;
}

.welcome-section {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.metrics-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.metric-card {
    background: white;
    padding: 20px;
    border-radius: 16px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.03);
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.metric-card.centered {
    align-items: center;
    justify-content: center;
}

.metric-label {
    font-size: 11px;
    font-weight: 600;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.02em;
}

.metric-value {
    font-size: 28px;
    font-weight: 700;
    color: #1e293b;
}

.metric-trend {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 12px;
    font-weight: 600;
    padding: 4px 8px;
    border-radius: 20px;
    width: fit-content;
}

.metric-trend.up {
    color: #10b981;
    background-color: #ecfdf5;
}

.metric-trend.down {
    color: #ef4444;
    background-color: #fef2f2;
}

.metric-trend span:first-child {
    font-size: 16px !important;
}

/* Circular Progress */
.circular-progress {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    background: conic-gradient(#10b981 98%, #f1f5f9 0);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 8px;
}

.progress-inner {
    width: 58px;
    height: 58px;
    background-color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.progress-text {
    font-size: 16px;
    font-weight: 700;
    color: #1e293b;
}

/* Confidence Bar */
.blue-text {
    color: #3b82f6;
}

.confidence-bar-bg {
    width: 100%;
    height: 6px;
    background-color: #f1f5f9;
    border-radius: 3px;
    overflow: hidden;
}

.confidence-bar-fill {
    width: 85%;
    height: 100%;
    background-color: #3b82f6;
    border-radius: 3px;
}

/* Quick Audit */
.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.filter-icon {
    color: #64748b;
    cursor: pointer;
}

.audit-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.audit-item {
    background: white;
    padding: 16px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    gap: 16px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.03);
    cursor: pointer;
    transition: transform 0.2s;
}

.audit-item:active {
    transform: scale(0.98);
}

.audit-icon-bg {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.audit-icon-bg span {
    color: white;
    font-size: 24px !important;
}

.blue-bg {
    background-color: #3b82f6;
}

.light-blue-bg {
    background-color: #60a5fa;
}

.indigo-bg {
    background-color: #6366f1;
}

.blue-soft-bg {
    background-color: #93c5fd;
}

.purple-vibrant-bg {
    background-color: #7c4dff;
}

.icon-white {
    color: #ffffff !important;
}

.audit-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.audit-info h3 {
    font-size: 15px;
    font-weight: 600;
    color: #1e293b;
}

.audit-info p {
    font-size: 12px;
    color: #64748b;
    line-height: 1.4;
}

.chevron {
    color: #cbd5e1;
    font-size: 20px !important;
}

/* Featured Card */
.featured-card {
    position: relative;
    border-radius: 20px;
    overflow: hidden;
    height: 180px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
}

.featured-bg {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: brightness(0.6);
}

.featured-content {
    position: absolute;
    bottom: 0;
    left: 0;
    padding: 24px;
    color: white;
}

.featured-content h2 {
    font-size: 22px;
    font-weight: 700;
    margin-bottom: 4px;
}

.featured-content p {
    font-size: 13px;
    opacity: 0.9;
}

/* Bottom Nav */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    width: 100%;
    min-height: 80px;
    height: calc(80px + env(safe-area-inset-bottom));
    padding-bottom: env(safe-area-inset-bottom);
    background-color: white;
    display: flex;
    justify-content: space-around;
    align-items: center;
    border-top: 1px solid #e2e8f0;
    padding-bottom: 20px;
    z-index: 100;
}

.nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    color: #94a3b8;
    cursor: pointer;
    transition: color 0.2s;
}

.nav-item.active {
    color: #3b82f6;
}

.nav-item span:first-child {
    font-size: 24px !important;
}

.nav-item span:last-child {
    font-size: 11px;
    font-weight: 600;
}

/* --- Profile View Styles --- */
.profile-card {
    background: white;
    border-radius: 20px;
    padding: 24px;
    display: flex;
    align-items: center;
    gap: 20px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.03);
    margin-bottom: 24px;
}

.profile-avatar-container {
    position: relative;
    width: 80px;
    height: 80px;
}

.avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid #2563eb;
}

.profile-avatar-large {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid #e2e8f0;
}

/* Custom Confirmation Modals */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(8px);
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.modal-content.glass-card {
    background: rgba(15, 23, 42, 0.95);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 28px;
    padding: 32px;
    width: 100%;
    max-width: 320px;
    text-align: center;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    transform: translateY(20px) scale(0.95);
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.modal-overlay.active .modal-content {
    transform: translateY(0) scale(1);
}

.modal-header {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
    margin-bottom: 20px;
}

.modal-header .material-symbols-outlined {
    font-size: 56px;
    filter: drop-shadow(0 0 10px rgba(239, 68, 68, 0.3));
}

.icon-red {
    color: #ef4444;
}

.modal-body {
    margin-bottom: 32px;
}

.modal-body p {
    color: #94a3b8;
    line-height: 1.6;
    margin: 0;
}

.modal-footer {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.modal-footer .btn {
    padding: 14px;
    border-radius: 16px;
    font-size: 16px;
    font-weight: 700;
    border: none;
    cursor: pointer;
}

.btn-danger {
    background: linear-gradient(135deg, #ef4444, #dc2626);
    color: white;
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.2);
}

.btn-primary {
    background: linear-gradient(135deg, #2563eb, #1d4ed8);
    color: white;
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.2);
}

.btn-ghost {
    background: rgba(255, 255, 255, 0.05);
    color: #f8fafc;
}

.verified-badge {
    position: absolute;
    bottom: -4px;
    right: -4px;
    background: white;
    border-radius: 50%;
    padding: 2px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.verified-badge span {
    color: #10b981;
    font-size: 20px !important;
    font-variation-settings: 'FILL' 1;
}

.profile-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.profile-info h2 {
    font-size: 20px;
    font-weight: 600;
    color: #1e293b;
    margin: 0;
}

.role-text {
    font-size: 13px;
    color: #64748b;
    margin: 0 0 4px 0;
}

.badge-container {
    display: flex;
    gap: 8px;
}

.access-badge {
    font-size: 10px;
    font-weight: 700;
    padding: 4px 8px;
    border-radius: 12px;
    letter-spacing: 0.05em;
}

.access-badge.pro {
    background-color: #eff6ff;
    color: #2563eb;
}

.access-badge.ethical {
    background-color: #ecfdf5;
    color: #059669;
}

.settings-section {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 24px;
}

.section-title {
    font-size: 12px;
    font-weight: 600;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-left: 8px;
}


.settings-list {
    background: white;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.03);
    display: flex;
    flex-direction: column;
}

.settings-item {
    display: flex;
    align-items: center;
    padding: 16px;
    gap: 16px;
    border-bottom: 1px solid #f1f5f9;
    cursor: pointer;
    transition: background-color 0.2s;
}

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

.settings-item:active {
    background-color: #f8fafc;
}

.settings-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.gray-bg {
    background-color: #f1f5f9;
}

.icon-blue-dark {
    color: #2563eb;
    font-size: 22px !important;
}

.settings-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.settings-info h4 {
    font-size: 16px;
    font-weight: 600;
    color: #1e293b;
    margin: 0;
}

.settings-info p {
    font-size: 14px;
    color: #64748b;
    margin: 0;
}

.chevron {
    color: #94a3b8;
}

.toggle-switch {
    width: 50px;
    height: 28px;
    background-color: #cbd5e1;
    border-radius: 14px;
    position: relative;
    cursor: pointer;
    transition: background-color 0.3s;
}

.toggle-switch.active {
    background-color: #3b82f6;
}

.toggle-knob {
    width: 24px;
    height: 24px;
    background-color: white;
    border-radius: 50%;
    position: absolute;
    top: 2px;
    left: 2px;
    transition: transform 0.3s;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.toggle-switch.active .toggle-knob {
    transform: translateX(22px);
}

.logout-btn {
    width: 100%;
    height: 54px;
    background-color: #dc2626;
    color: white;
    border-radius: 16px;
    border: none;
    font-size: 16px;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(220, 38, 38, 0.2);
    margin-top: 8px;
    transition: transform 0.2s, background-color 0.2s;
}

.logout-btn:active {
    transform: scale(0.98);
    background-color: #b91c1c;
}

.nav-icon-pill {
    color: #2563eb;
}

.icon-purple {
    color: #a855f7;
}

/* --- Dark Mode Functionality --- */
body.dark-mode {
    --color-background: #0f172a;
    --color-on-background: #f8fafc;
    background-color: var(--color-background);
}

body.dark-mode #dashboard-view,
body.dark-mode #profile-view {
    background-color: #0f172a;
    color: #f8fafc;
}

body.dark-mode .top-nav,
body.dark-mode .dashboard-header,
body.dark-mode .bottom-nav,
body.dark-mode .profile-card,
body.dark-mode .settings-list,
body.dark-mode .metric-card,
body.dark-mode .featured-card,
body.dark-mode .audit-item {
    background: rgba(30, 41, 59, 0.7);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

body.dark-mode .audit-info h3 {
    color: #f8fafc;
}

body.dark-mode .audit-info p {
    color: #94a3b8;
}

body.dark-mode .top-nav,
body.dark-mode .dashboard-header {
    background-color: #0f172a;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

#profile-view .dashboard-header {
    position: static;
}

body.dark-mode .settings-item {
    border-bottom-color: #334155;
}

body.dark-mode .settings-item:active {
    background-color: #0f172a;
}

body.dark-mode h1,
body.dark-mode h2,
body.dark-mode h3,
body.dark-mode h4,
body.dark-mode .text-headline-md,
body.dark-mode .profile-info h2,
body.dark-mode .logo-text {
    color: #f8fafc;
}

body.dark-mode .text-body-md,
body.dark-mode .role-text,
body.dark-mode .settings-info p,
body.dark-mode .section-title,
body.dark-mode .nav-item,
body.dark-mode .chevron {
    color: #94a3b8;
}

body.dark-mode .nav-item.active {
    color: #60a5fa;
}

body.dark-mode .nav-icon-pill {
    color: #60a5fa;
}

body.dark-mode .gray-bg {
    background-color: #334155;
}

body.dark-mode .blue-soft-bg {
    background-color: rgba(59, 130, 246, 0.15);
}

body.dark-mode .purple-soft-bg {
    background-color: rgba(168, 85, 247, 0.15);
}

body.dark-mode .icon-blue,
body.dark-mode .icon-blue-dark {
    color: #60a5fa;
}

body.dark-mode .icon-purple {
    color: #c084fc;
}

body.dark-mode .hero-subtitle,
body.dark-mode .footer-text,
body.dark-mode,
body.dark-mode .footer-image-caption,
body.dark-mode .forgot-link {
    color: rgba(255, 255, 255, 0.6);
}

body.dark-mode .metric-label,
body.dark-mode .metric-value {
    color: #f8fafc;
}

body.dark-mode .avatar,
body.dark-mode .avatar-small {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
}

body.dark-mode .avatar-icon {
    color: #f8fafc;
}

body.dark-mode .mini-card,
body.dark-mode .report-card,
body.dark-mode .illustration-lens {
    background: rgba(30, 41, 59, 0.7);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

body.dark-mode .mini-card h3,
body.dark-mode .report-card h3 {
    color: #f8fafc;
}

body.dark-mode .login-card {
    background: rgba(15, 23, 42, 0.6);
    backdrop-filter: blur(32px);
    -webkit-backdrop-filter: blur(32px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-top: 1px solid rgba(255, 255, 255, 0.15);
    border-left: 1px solid rgba(255, 255, 255, 0.15);
    box-shadow: 0 24px 48px rgba(0, 0, 0, 0.5);
}

body.dark-mode .login-card input,
body.dark-mode .login-card .social-btn {
    background-color: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.15);
    color: white;
}

body.dark-mode .login-card .social-btn span {
    color: white;
    font-weight: bold;
}

body.dark-mode .login-card input {
    color: white;
    font-weight: bold;
    background-color: rgba(255, 255, 255, 0.05);
}

body.dark-mode .login-card input::placeholder {
    color: rgba(255, 255, 255, 0.5);
    font-weight: normal;
}

body.dark-mode .login-card .input-icon {
    color: rgba(255, 255, 255, 0.7);
}

body.dark-mode .login-card label {
    color: white;
    font-weight: bold;
}

body.dark-mode .login-card .divider-text {
    color: rgba(255, 255, 255, 0.8);
    font-weight: bold;
}

body.dark-mode .login-card .divider-line {
    background-color: rgba(255, 255, 255, 0.15);
}

/* Analysis Tab Specific Styles */
.stepper-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 20px;
    margin-bottom: 8px;
}

.step {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    flex: 1;
}

.step-circle {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background-color: #f1f5f9;
    color: #94a3b8;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: 700;
}

.step.active .step-circle {
    background-color: #1d4ed8;
    color: white;
}

.step-label {
    font-size: 10px;
    font-weight: 700;
    color: #94a3b8;
    letter-spacing: 0.05em;
}

.step.active .step-label {
    color: #1d4ed8;
}

.step-line {
    flex: 1;
    height: 1px;
    background-color: #e2e8f0;
    margin-bottom: 24px;
}

.audit-form-card {
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.form-label {
    font-size: 11px;
    font-weight: 700;
    color: #94a3b8;
    letter-spacing: 0.05em;
}

.custom-dropdown {
    position: relative;
    width: 100%;
}

.dropdown-trigger {
    width: 100%;
    height: 48px;
    padding: 0 16px;
    background-color: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    font-size: 14px;
    color: #1e293b;
    display: flex;
    align-items: center;
    justify-content: space-between;
    cursor: pointer;
    transition: all 0.2s ease;
}

.dropdown-trigger:hover {
    border-color: #3b82f6;
}

.dropdown-options {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    width: 100%;
    background-color: white;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1);
    z-index: 50;
    overflow: hidden;
    animation: slideDown 0.2s ease;
}

.dropdown-option {
    padding: 12px 16px;
    font-size: 14px;
    color: #475569;
    cursor: pointer;
    transition: background-color 0.2s;
}

.dropdown-option:hover {
    background-color: #f1f5f9;
    color: #1e293b;
}

.dropdown-option.active {
    background-color: #eff6ff;
    color: #1d4ed8;
    font-weight: 600;
}

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

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

.audit-input {
    width: 100%;
    height: 48px;
    padding: 0 16px;
    background-color: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    font-size: 14px;
    color: #1e293b;
    outline: none;
}

.active-border {
    border: 2px solid #2563eb !important;
    border-radius: 10px;
    overflow: hidden;
}

.drop-zone {
    border: 2px dashed #cbd5e1;
    border-radius: 12px;
    padding: 24px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    background-color: #f8fafc;
    cursor: pointer;
    transition: background-color 0.2s;
}

.drop-zone:hover,
.drop-zone.drag-over {
    background-color: #f1f5f9;
    border-color: #2563eb;
}

body.dark-mode .drop-zone.drag-over {
    background-color: rgba(59, 130, 246, 0.1);
    border-color: #3b82f6;
}

.drop-icon {
    font-size: 32px !important;
    color: #1d4ed8;
}

.drop-text {
    font-size: 14px;
    font-weight: 600;
    color: #475569;
}

.drop-subtext {
    font-size: 11px;
    color: #94a3b8;
}

.audit-textarea {
    width: 100%;
    height: 120px;
    padding: 16px;
    background-color: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    font-size: 14px;
    color: #1e293b;
    resize: none;
    outline: none;
}

.info-text-center {
    font-size: 11px;
    color: #64748b;
    text-align: center;
    margin-top: 4px;
}

.alert-card {
    display: flex;
    gap: 16px;
    padding: 16px;
    border-radius: 12px;
}

.success-alert {
    background-color: #dcfce7;
    border: 1px solid #86efac;
}

.alert-icon {
    color: #15803d;
}

.alert-content h3 {
    font-size: 14px;
    font-weight: 700;
    color: #15803d;
    margin-bottom: 4px;
}

.alert-content p {
    font-size: 12px;
    color: #166534;
    line-height: 1.4;
}

/* Dark Mode Overrides for Analysis Tab */
body.dark-mode .step-circle {
    background-color: rgba(255, 255, 255, 0.05);
    color: #64748b;
}

body.dark-mode .step.active .step-circle {
    background-color: #3b82f6;
    color: white;
}

body.dark-mode .step-line {
    background-color: #334155;
}

body.dark-mode .custom-select,
body.dark-mode .audit-input,
body.dark-mode .audit-textarea,
body.dark-mode .drop-zone {
    background-color: rgba(15, 23, 42, 0.4);
    border-color: rgba(255, 255, 255, 0.1);
    color: #f8fafc;
}

body.dark-mode .drop-zone:hover {
    background-color: rgba(15, 23, 42, 0.6);
}

body.dark-mode .drop-text {
    color: #e2e8f0;
}

body.dark-mode .success-alert {
    background-color: rgba(21, 128, 61, 0.2);
    border-color: rgba(34, 197, 94, 0.3);
    backdrop-filter: blur(12px);
}

body.dark-mode .alert-icon,
body.dark-mode .alert-content h3 {
    color: #4ade80;
}

body.dark-mode .dropdown-trigger {
    background-color: rgba(15, 23, 42, 0.4);
    border-color: rgba(255, 255, 255, 0.1);
    color: #f8fafc;
}

body.dark-mode .dropdown-options {
    background-color: rgba(30, 41, 59, 0.95);
    border-color: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(16px);
}

body.dark-mode .dropdown-option {
    color: #cbd5e1;
}

body.dark-mode .dropdown-option:hover {
    background-color: rgba(255, 255, 255, 0.05);
    color: white;
}

body.dark-mode .dropdown-option.active {
    background-color: rgba(59, 130, 246, 0.2);
    color: #60a5fa;
}

body.dark-mode .alert-content p {
    color: #86efac;
}

/* Premium Login Styles */
.hero-section.centered {
    align-items: center;
    text-align: center;
}

.login-card.premium-style {
    background: white;
    border-radius: 24px;
    padding: 32px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.04);
    border: none;
    gap: 17px;
}

body.dark-mode .login-card.premium-style {
    background: rgba(15, 23, 42, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(20px);
}

.premium-input input {
    height: 56px !important;
    border-radius: 12px !important;
    border: 1px solid #e2e8f0 !important;
    padding-left: 52px !important;
    padding-right: 48px !important;
    font-size: 15px !important;
    color: #1e293b;
    background-color: white !important;
}

body.dark-mode .premium-input input {
    background-color: rgba(0, 0, 0, 0.2) !important;
    border-color: rgba(255, 255, 255, 0.1) !important;
    color: white;
}

.premium-input .input-icon {
    left: 20px;
    color: #94a3b8;
}

.premium-input .visibility-toggle {
    position: absolute;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    color: #94a3b8;
    cursor: pointer;
    font-size: 20px;
    z-index: 10;
}

.premium-input input:focus {
    border-color: #0ea5e9 !important;
    box-shadow: 0 0 0 4px rgba(14, 165, 233, 0.1) !important;
}

.form-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: -4px;
    margin-bottom: 8px;
}

.remember-me {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-size: 13px;
    color: #475569;
}

body.dark-mode .remember-me {
    color: #cbd5e1;
}

.remember-me input {
    width: 16px;
    height: 16px;
    border-radius: 4px;
    border: 1px solid #cbd5e1;
    cursor: pointer;
}

.form-options .forgot-link {
    font-size: 13px;
    color: #14b8a6;
    font-weight: 600;
    text-decoration: none;
}

.premium-btn {
    height: 56px;
    border-radius: 12px;
    background: linear-gradient(to right, #20b2aa, #2980b9);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-size: 16px;
    box-shadow: 0 10px 20px rgba(41, 128, 185, 0.2);
    border: none;
    color: white;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
}

.premium-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 24px rgba(41, 128, 185, 0.3);
}

.trust-badges {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin-top: 4px;
    margin-bottom: 12px;
}

.badge {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 12px;
    color: #64748b;
}

body.dark-mode .badge {
    color: #94a3b8;
}

.badge .material-symbols-outlined {
    font-size: 14px;
    color: #10b981;
}

.badge-dot {
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background-color: #cbd5e1;
}

.social-row {
    display: flex;
    gap: 16px;
}

.social-btn.outlined {
    flex: 1;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    height: 72px;
    gap: 12px;
    font-size: 18px;
    font-weight: 600;
    background-color: white;
    justify-content: center;
    align-items: center;
}

.social-btn.outlined img {
    width: 28px;
    height: 28px;
    object-fit: contain;
}

body.dark-mode .social-btn.outlined {
    background-color: transparent;
    border-color: rgba(255, 255, 255, 0.1);
}

body.dark-mode .social-btn.outlined span {
    color: white;
}

.divider-container .divider-text {
    text-transform: none;
    color: #94a3b8;
    font-size: 13px;
}

/* Profile Popup Menu */
.profile-avatar-trigger {
    position: relative;
    cursor: pointer;
}

.profile-popup {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    width: 200px;
    background-color: white;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1);
    z-index: 100;
    overflow: hidden;
    animation: slideDown 0.2s ease;
    display: flex;
    flex-direction: column;
}

body.dark-mode .profile-popup {
    background-color: rgba(30, 41, 59, 0.95);
    border-color: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(16px);
}

.popup-item {
    padding: 12px 16px;
    font-size: 14px;
    color: #475569;
    cursor: pointer;
    transition: background-color 0.2s;
    display: flex;
    align-items: center;
    gap: 12px;
}

.popup-item .material-symbols-outlined {
    font-size: 18px;
    color: #94a3b8;
}

.credits-display-item .material-symbols-outlined {
    color: #f59e0b !important;
}

.credits-display-item {
    border-top: 1px solid rgba(0, 0, 0, 0.05);
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    background-color: rgba(245, 158, 11, 0.03);
}

body.dark-mode .credits-display-item {
    border-color: rgba(255, 255, 255, 0.05);
    background-color: rgba(245, 158, 11, 0.05);
}

.popup-item:hover {
    background-color: #f1f5f9;
    color: #1e293b;
}

.popup-item:hover .material-symbols-outlined {
    color: #3b82f6;
}

body.dark-mode .popup-item {
    color: #cbd5e1;
}

body.dark-mode .popup-item:hover {
    background-color: rgba(255, 255, 255, 0.05);
    color: white;
}

body.dark-mode .popup-item:hover .material-symbols-outlined {
    color: #60a5fa;
}

/* Cards Folder Design - 3D Orbiting Cards */
.hero-3d {
    position: relative;
    height: 320px;
    width: calc(100% + 40px);
    margin-left: -20px;
    margin-right: -20px;
    margin-top: -16px;
    background: transparent;
    perspective: 1200px;
    isolation: isolate;
    margin-bottom: -16px;
}

.bg-grid {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(rgba(56, 189, 248, 0.07) 1px, transparent 1px),
        linear-gradient(90deg, rgba(139, 92, 246, 0.07) 1px, transparent 1px);
    background-size: 44px 44px;
    opacity: 0.22;
    filter: blur(0.4px);
}

.bg-vignette {
    position: absolute;
    inset: -10%;
    background: none;
    z-index: 1;
}

.particle-layer {
    position: absolute;
    inset: 0;
    z-index: 2;
    pointer-events: none;
}

.particle {
    position: absolute;
    width: var(--size);
    height: var(--size);
    border-radius: 50%;
    background: radial-gradient(circle, rgba(56, 189, 248, 0.95) 0%, rgba(56, 189, 248, 0) 74%);
    box-shadow: 0 0 18px rgba(56, 189, 248, 0.65), 0 0 40px rgba(139, 92, 246, 0.2);
    animation: particleFloat var(--duration) linear infinite;
    animation-delay: var(--delay);
    opacity: 0;
}

@keyframes particleFloat {
    0% {
        transform: translate3d(0, 0, 0) scale(0.7);
        opacity: 0;
    }

    15% {
        opacity: 0.7;
    }

    85% {
        opacity: 0.42;
    }

    100% {
        transform: translate3d(var(--dx), var(--dy), 0) scale(1.06);
        opacity: 0;
    }
}

.center-zone {
    position: absolute;
    inset: 0;
    z-index: 10;
    pointer-events: none;
}

.orbit-ring {
    position: absolute;
    top: 50%;
    left: 50%;
    border: 1px solid rgba(99, 102, 241, 0.44);
    border-radius: 50%;
    transform-style: preserve-3d;
    mix-blend-mode: screen;
    filter: drop-shadow(0 0 12px rgba(56, 189, 248, 0.5));
}

.ring-1 {
    width: 260px;
    height: 140px;
    transform: translate(-50%, -50%) rotateX(71deg) rotateZ(0deg);
    animation: spinRing1 34s linear infinite;
}

.ring-2 {
    width: 220px;
    height: 120px;
    border-color: rgba(6, 182, 212, 0.42);
    transform: translate(-50%, -50%) rotateX(71deg) rotateZ(30deg);
    animation: spinRing2 28s linear infinite;
}

.ring-3 {
    width: 180px;
    height: 100px;
    border-color: rgba(168, 85, 247, 0.5);
    transform: translate(-50%, -50%) rotateX(71deg) rotateZ(58deg);
    animation: spinRing3 24s linear infinite;
}

@keyframes spinRing1 {
    to {
        transform: translate(-50%, -50%) rotateX(71deg) rotateZ(360deg);
    }
}

@keyframes spinRing2 {
    to {
        transform: translate(-50%, -50%) rotateX(71deg) rotateZ(390deg);
    }
}

@keyframes spinRing3 {
    to {
        transform: translate(-50%, -50%) rotateX(71deg) rotateZ(-302deg);
    }
}

.chip-glow {
    position: absolute;
    top: 56%;
    left: 50%;
    width: 180px;
    height: 110px;
    transform: translate(-50%, -50%);
    border-radius: 50%;
    background: radial-gradient(circle, rgba(139, 92, 246, 0.34) 0%, rgba(56, 189, 248, 0.22) 42%, rgba(0, 0, 0, 0) 72%);
    filter: blur(24px);
    animation: pulseGlow 2.5s ease-in-out infinite;
}

.center-chip {
    position: absolute;
    top: 56%;
    left: 50%;
    width: 220px;
    height: 135px;
    transform: translate(-50%, -50%);
    transform-origin: center center;
    z-index: 11;
    animation: pulseChip 2.5s infinite ease-in-out;
    pointer-events: auto;
    transform-style: preserve-3d;
}

.chip-inner {
    height: 100%;
    width: 100%;
    display: block;
}

.chip-inner img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
}

@keyframes pulseChip {

    0%,
    100% {
        transform: translate(-50%, -50%) scale(1);
    }

    50% {
        transform: translate(-50%, -50%) scale(1.02);
    }
}

@keyframes pulseGlow {

    0%,
    100% {
        opacity: 0.72;
        transform: translate(-50%, -50%) scale(1);
    }

    50% {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1.1);
    }
}

.orbit {
    position: absolute;
    top: 46%;
    left: 50%;
    width: 280px;
    height: 140px;
    transform-style: preserve-3d;
    transform: translate(-50%, -50%) rotateX(65deg);
    z-index: 14;
}

.orbit-card {
    --radius: 120px;
    position: absolute;
    top: 50%;
    left: 50%;
    width: 100px;
    min-height: 60px;
    border-radius: 10px;
    background: linear-gradient(145deg, rgba(16, 24, 51, 0.72), rgba(8, 12, 24, 0.55));
    border: 1px solid rgba(96, 165, 250, 0.75);
    backdrop-filter: blur(14px);
    box-shadow:
        0 0 25px rgba(124, 58, 237, 0.6),
        0 10px 34px rgba(4, 8, 22, 0.56),
        inset 0 0 20px rgba(129, 140, 248, 0.18);
    padding: 0.2rem;
    transform-style: preserve-3d;
    transition: transform 320ms ease, box-shadow 320ms ease, border-color 320ms ease;
    overflow: hidden;
    z-index: 1;
}

.orbit-card img {
    width: 100%;
    height: 100%;
    min-height: 80px;
    border-radius: 10px;
    object-fit: cover;
    display: block;
    border: 1px solid rgba(186, 230, 253, 0.25);
    box-shadow: inset 0 0 28px rgba(255, 255, 255, 0.06);
}

.orbit-card:hover {
    border-color: rgba(186, 230, 253, 0.95);
    box-shadow:
        0 0 36px rgba(56, 189, 248, 0.7),
        0 0 38px rgba(167, 139, 250, 0.45),
        0 14px 40px rgba(4, 8, 22, 0.6);
}

.card-1 {
    --a: 0deg;
}

.card-2 {
    --a: 60deg;
}

.card-3 {
    --a: 120deg;
}

.card-4 {
    --a: 180deg;
}

.card-5 {
    --a: 240deg;
}

/* --- Result View Styles --- */
.card-title-center {
    text-align: center;
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 20px;
    color: var(--color-on-background);
}

.circular-score-container {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 20px;
}

.circular-score {
    position: relative;
    width: 150px;
    height: 150px;
}

.circular-score svg {
    width: 150px;
    height: 150px;
    transform: rotate(-90deg);
}

.circular-score circle {
    fill: none;
    stroke-width: 8;
    stroke-linecap: round;
}

.circular-score circle.bg {
    stroke: #f1f5f9;
}

.circular-score circle.fg {
    stroke: #2563eb;
    transition: stroke-dasharray 0.5s ease;
}

body.dark-mode .circular-score circle.bg {
    stroke: rgba(255, 255, 255, 0.05);
}

.score-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    display: flex;
    flex-direction: column;
    align-items: center;
}

.score-text .number {
    font-size: 2.2rem;
    font-weight: 700;
    color: #2563eb;
}

body.dark-mode .score-text .number {
    color: #60a5fa;
}

.score-text .label {
    font-size: 0.7rem;
    font-weight: 600;
    color: #64748b;
    margin-top: 8px;
}

.recommendation-badge {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    color: #10b981;
    font-weight: 600;
    font-size: 0.9rem;
}

.results-row {
    display: flex;
    gap: 12px;
}

.risk-card,
.audit-id-card {
    flex: 1;
    background: white;
    border-radius: 12px;
    padding: 12px;
    display: flex;
    flex-direction: column;
    gap: 4px;
    border: 1px solid #e2e8f0;
}

body.dark-mode .risk-card,
body.dark-mode .audit-id-card {
    background: rgba(30, 41, 59, 0.7);
    border-color: rgba(255, 255, 255, 0.1);
}

.risk-label,
.id-label {
    font-size: 0.75rem;
    font-weight: 600;
    color: #64748b;
}

.risk-badge {
    font-size: 0.85rem;
    font-weight: 700;
    padding: 4px 8px;
    border-radius: 6px;
    width: fit-content;
}

.risk-badge.low {
    background: #ecfdf5;
    color: #10b981;
}

body.dark-mode .risk-badge.low {
    background: rgba(16, 185, 129, 0.15);
}

.risk-badge.medium {
    background: #fef3c7;
    color: #d97706;
}

body.dark-mode .risk-badge.medium {
    background: rgba(245, 158, 11, 0.2);
    color: #fbbf24;
}

.risk-badge.high {
    background: #fee2e2;
    color: #dc2626;
}

body.dark-mode .risk-badge.high {
    background: rgba(239, 68, 68, 0.18);
    color: #f87171;
}

.desktop-link-nav {
    font-size: 0.8rem;
    font-weight: 600;
    color: #3b82f6;
    text-decoration: none;
}

.top-nav .nav-container .desktop-link-nav {
    margin-left: auto;
}

.desktop-link-nav:hover {
    text-decoration: underline;
}

body.dark-mode .desktop-link-nav {
    color: #60a5fa;
}

.history-entries {
    display: flex;
    flex-direction: column;
    gap: 12px;
    width: 100%;
}

.history-entry-card {
    text-align: left;
    padding: 14px 16px;
    border-radius: 12px;
    background: rgba(248, 250, 252, 0.95);
    border: 1px solid rgba(148, 163, 184, 0.25);
}

body.dark-mode .history-entry-card {
    background: rgba(30, 41, 59, 0.6);
    border-color: rgba(71, 85, 105, 0.4);
}

.history-entry-meta {
    font-size: 0.72rem;
    color: #64748b;
    margin-bottom: 6px;
}

.history-entry-title {
    font-weight: 700;
    font-size: 0.95rem;
    margin-bottom: 4px;
}

.history-entry-sub {
    font-size: 0.82rem;
    color: #475569;
}

body.dark-mode .history-entry-sub {
    color: #94a3b8;
}

.id-value {
    font-size: 0.85rem;
    font-weight: 600;
    color: #2563eb;
}

body.dark-mode .id-value {
    color: #60a5fa;
}

.card-header-simple {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 16px;
}

.card-header-simple h3 {
    font-size: 1rem;
    font-weight: 600;
    margin: 0;
}

.factors-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.factor-pill {
    background: #f1f5f9;
    color: #475569;
    padding: 6px 12px;
    border-radius: 8px;
    font-size: 0.8rem;
    font-weight: 500;
}

body.dark-mode .factor-pill {
    background: rgba(255, 255, 255, 0.05);
    color: #94a3b8;
}

.sensitive-card {
    background: #fff1f2 !important;
    border-color: #fecaca !important;
}

body.dark-mode .sensitive-card {
    background: rgba(159, 18, 57, 0.1) !important;
    border-color: rgba(159, 18, 57, 0.2) !important;
}

.text-red {
    color: #e11d48;
}

.attribute-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.attribute-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-weight: 500;
}

.flagged-badge {
    background: #fee2e2;
    color: #ef4444;
    font-size: 0.7rem;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 4px;
}

body.dark-mode .flagged-badge {
    background: rgba(239, 68, 68, 0.15);
}

.attribute-footer {
    font-size: 0.75rem;
    color: #94a3b8;
    font-style: italic;
    margin-top: 12px;
}

.card-header-with-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.card-header-with-info h3 {
    font-size: 1rem;
    font-weight: 600;
    margin: 0;
}

.info-icon {
    font-size: 1.2rem;
    color: #94a3b8;
}

.parity-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.parity-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 8px;
    font-weight: 600;
    font-size: 0.9rem;
}

.parity-val {
    font-family: monospace;
    font-size: 1rem;
}

.val-green {
    color: #10b981;
}

.val-blue {
    color: #2563eb;
}

.parity-bar-bg {
    height: 8px;
    background: #f1f5f9;
    border-radius: 4px;
    overflow: hidden;
}

body.dark-mode .parity-bar-bg {
    background: rgba(255, 255, 255, 0.05);
}

.parity-bar {
    height: 100%;
    border-radius: 4px;
}

.bar-green {
    background: #10b981;
}

.bar-blue {
    background: #2563eb;
}


/* --- Report View Styles --- */
#tab-report-view {
    overflow-y: auto;
    max-height: calc(100vh - 64px);
    padding-bottom: 100px;
}

.report-view-container {
    padding: 40px 20px;
    display: flex;
    flex-direction: column;
    gap: 24px;
    max-width: 500px;
    margin: 0 auto;
}

.report-intro {
    padding: 8px 0;
}

.report-id {
    font-size: 12px;
    font-weight: 700;
    color: #3b82f6;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    margin-bottom: 8px;
}

.report-title {
    font-size: 32px;
    line-height: 1.1;
    font-weight: 900;
    color: #0f172a;
    letter-spacing: -1px;
    margin-bottom: 8px;
}

body.dark-mode .report-title {
    color: #f8fafc;
}

.report-date {
    font-size: 14px;
    color: #64748b;
    font-weight: 500;
}

.findings-card {
    background: white;
    border-radius: 32px;
    padding: 32px;
    border: 1px solid rgba(0, 0, 0, 0.05);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.03);
}

body.dark-mode .findings-card {
    background: rgba(30, 41, 59, 0.6);
    border-color: rgba(255, 255, 255, 0.08);
}

.findings-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
}

.findings-header h3 {
    font-size: 20px;
    font-weight: 800;
}

.critical-badge {
    background: #fee2e2;
    color: #ef4444;
    font-size: 11px;
    font-weight: 800;
    padding: 6px 14px;
    border-radius: 30px;
    text-transform: uppercase;
}

body.dark-mode .critical-badge {
    background: rgba(239, 68, 68, 0.2);
}

.parity-score-display {
    display: flex;
    align-items: center;
    gap: 24px;
    margin-bottom: 32px;
}

.mini-circular {
    position: relative;
    width: 80px;
    height: 80px;
    flex-shrink: 0;
}

.mini-circular svg {
    width: 80px;
    height: 80px;
    transform: rotate(-90deg);
}

.mini-circular .score-num {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-weight: 900;
    font-size: 24px;
}

.score-details h4 {
    font-size: 14px;
    font-weight: 700;
    color: #334155;
    margin-bottom: 4px;
}

body.dark-mode .score-details h4 {
    color: #cbd5e1;
}

.score-details p {
    font-size: 14px;
    color: #64748b;
    line-height: 1.5;
}

.sub-metrics-row {
    display: flex;
    gap: 16px;
}

.sub-metric-card {
    flex: 1;
    background: #f8fafc;
    padding: 20px;
    border-radius: 20px;
}

body.dark-mode .sub-metric-card {
    background: rgba(15, 23, 42, 0.4);
}

.sub-metric-card .label {
    font-size: 11px;
    font-weight: 700;
    color: #94a3b8;
    text-transform: uppercase;
    margin-bottom: 6px;
    display: block;
}

.sub-metric-card .value {
    font-size: 26px;
    font-weight: 900;
    color: #1e293b;
}

body.dark-mode .sub-metric-card .value {
    color: #f1f5f9;
}

.section-header-row {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 10px;
}

.section-header-row h3 {
    font-size: 22px;
    font-weight: 800;
}

.breakdown-card {
    background: white;
    border-radius: 24px;
    padding: 24px;
    border-left: 6px solid #ef4444;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.02);
}

body.dark-mode .breakdown-card {
    background: rgba(30, 41, 59, 0.4);
}

.breakdown-text {
    font-size: 15px;
    line-height: 1.7;
    color: #475569;
}

body.dark-mode .breakdown-text {
    color: #94a3b8;
}

.breakdown-text strong {
    color: #0f172a;
    font-weight: 700;
}

body.dark-mode .breakdown-text strong {
    color: #f1f5f9;
}

.improvement-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.step-card {
    background: white;
    border-radius: 24px;
    padding: 20px;
    display: flex;
    gap: 20px;
    align-items: flex-start;
    border: 1px solid rgba(0, 0, 0, 0.03);
    transition: transform 0.2s, background-color 0.2s;
}

.step-card:active {
    transform: scale(0.98);
    background-color: #f8fafc;
}

body.dark-mode .step-card {
    background: rgba(30, 41, 59, 0.4);
    border-color: rgba(255, 255, 255, 0.05);
}

.step-icon {
    color: #10b981;
    font-size: 28px !important;
}

.step-info h4 {
    font-size: 17px;
    font-weight: 800;
    margin-bottom: 6px;
}

.step-info p {
    font-size: 14px;
    color: #64748b;
    line-height: 1.5;
}

.report-actions {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-top: 16px;
    margin-bottom: 80px;
}

.btn-pdf {
    background: #2563eb;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 22px;
    border-radius: 22px;
    font-size: 17px;
    font-weight: 800;
    border: none;
    cursor: pointer;
    box-shadow: 0 8px 20px rgba(37, 99, 235, 0.2);
}

.btn-share {
    background: #f1f5f9;
    color: #475569;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 22px;
    border-radius: 22px;
    font-size: 17px;
    font-weight: 800;
    border: none;
    cursor: pointer;
}

body.dark-mode .btn-share {
    background: rgba(255, 255, 255, 0.05);
    color: #cbd5e1;
}

/* ── Firebase shell: credits + game entry ─────────────────────── */
.mobile-auth-profile-root {
    flex: 1;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-width: 0;
    padding: 0 6px;
}

.mobile-auth-profile-root.hidden {
    display: none !important;
}

.mobile-auth-chips {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    justify-content: center;
}

.mobile-credits-badge {
    font-size: 0.72rem;
    font-weight: 700;
    color: #1e293b;
    background: #e2e8f0;
    padding: 6px 10px;
    border-radius: 999px;
    white-space: nowrap;
    max-width: 140px;
    overflow: hidden;
    text-overflow: ellipsis;
}

body.dark-mode .mobile-credits-badge {
    color: #e2e8f0;
    background: rgba(51, 65, 85, 0.9);
}

.mobile-game-chip {
    font-size: 0.72rem;
    font-weight: 700;
    color: #0f172a;
    background: linear-gradient(135deg, #a855f7, #6366f1);
    border: none;
    padding: 6px 12px;
    border-radius: 999px;
    cursor: pointer;
    white-space: nowrap;
}

.mobile-auth-name-pill {
    font-size: 0.7rem;
    color: #64748b;
    max-width: 88px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

body.dark-mode .mobile-auth-name-pill {
    color: #94a3b8;
}

.social-btn-muted {
    opacity: 0.45;
    cursor: not-allowed;
}

.audit-item-button {
    width: 100%;
    border: none;
    background: transparent;
    text-align: left;
    cursor: pointer;
    font: inherit;
    color: inherit;
    padding: 0;
}

.audit-item-button:focus-visible {
    outline: 2px solid #3b82f6;
    outline-offset: 2px;
}

/* Low credits modal (auth.js toggles .active) */
.mob-lc-overlay {
    position: fixed;
    inset: 0;
    z-index: 10000;
    background: rgba(0, 0, 0, 0.55);
    backdrop-filter: blur(4px);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.28s ease;
}

.mob-lc-overlay.active {
    opacity: 1;
    pointer-events: auto;
}

.mob-lc-modal {
    position: fixed;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%) scale(0.94);
    width: 90%;
    max-width: 380px;
    background: #2d2e30;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 24px;
    padding: 1.5rem;
    z-index: 10001;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.28s ease, transform 0.28s ease;
    text-align: center;
    color: #fff;
    box-shadow: 0 24px 54px rgba(0, 0, 0, 0.45);
}

.mob-lc-modal.active {
    opacity: 1;
    pointer-events: auto;
    transform: translate(-50%, -50%) scale(1);
}

.mob-lc-icon-wrap {
    width: 56px;
    height: 56px;
    margin: 0 auto 12px;
    border-radius: 50%;
    background: rgba(239, 68, 68, 0.15);
    border: 1px solid rgba(239, 68, 68, 0.25);
    display: flex;
    align-items: center;
    justify-content: center;
}

.mob-lc-icon {
    font-size: 28px !important;
    color: #f87171;
}

.mob-lc-title {
    font-size: 1.35rem;
    font-weight: 800;
    margin-bottom: 8px;
}

.mob-lc-text {
    font-size: 0.9rem;
    color: #cbd5e1;
    line-height: 1.5;
    margin-bottom: 1.25rem;
}

.mob-lc-actions {
    display: flex;
    gap: 10px;
}

.mob-lc-btn {
    flex: 1;
    padding: 12px 14px;
    border-radius: 999px;
    font-weight: 700;
    font-size: 0.88rem;
    border: none;
    cursor: pointer;
}

.mob-lc-btn-secondary {
    background: #3c4043;
    color: #fff;
}

.mob-lc-btn-primary {
    background: #e8eaed;
    color: #202124;
}

/* Game overlay */
.mob-game-bg {
    position: fixed;
    inset: 0;
    z-index: 10005;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(6px);
    display: none;
    opacity: 0;
    transition: opacity 0.28s ease;
}

.mob-game-bg.game-ui-open {
    opacity: 1;
}

.mob-game-panel {
    position: fixed;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%) scale(0.96);
    width: 96vw;
    max-width: 900px;
    height: 88vh;
    max-height: 820px;
    z-index: 10006;
    background: #111;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 20px;
    display: none;
    flex-direction: column;
    overflow: hidden;
    opacity: 0;
    transition: opacity 0.25s ease, transform 0.25s ease;
    box-shadow: 0 24px 54px rgba(0, 0, 0, 0.55);
}

.mob-game-panel.game-ui-open {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
}

.mob-game-toolbar {
    height: 52px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 14px;
    background: #1a1c1e;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.mob-game-title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
    font-size: 0.95rem;
    color: #fff;
}

.mob-game-title-icon {
    font-size: 22px !important;
    color: #c084fc;
}

.mob-game-close {
    background: transparent;
    border: none;
    color: #94a3b8;
    cursor: pointer;
    padding: 8px;
    border-radius: 999px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.mob-game-close:hover {
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
}

.mob-game-iframe {
    flex: 1;
    width: 100%;
    border: 0;
    background: #000;
}

/* Desktop-parity result blocks */
.mob-outcome-card {
    gap: 8px;
}

.mob-engine-badge-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 4px;
}

.mob-engine-pill {
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: #3b82f6;
}

.mob-engine-conf {
    font-size: 12px;
    font-weight: 600;
    color: var(--color-on-surface-variant);
}

.mob-outcome-label {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--color-on-surface-variant);
    margin-top: 4px;
}

.mob-final-decision {
    font-size: 1.75rem;
    font-weight: 800;
    line-height: 1.15;
    margin: 4px 0 8px;
    letter-spacing: -0.02em;
}

.mob-confidence-line {
    font-size: 13px;
    color: var(--color-on-surface-variant);
}

.mob-key-drivers {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.mob-driver-row {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.mob-driver-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
}

.mob-driver-name {
    font-size: 14px;
    font-weight: 700;
    text-transform: capitalize;
}

.mob-driver-attr {
    font-size: 12px;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 8px;
}

.mob-driver-track {
    height: 10px;
    width: 100%;
    background: var(--color-surface-container);
    border-radius: 999px;
    overflow: hidden;
}

.mob-driver-fill {
    height: 100%;
    border-radius: 999px;
    transition: width 0.85s cubic-bezier(0.4, 0, 0.2, 1);
    width: 0;
}

.mob-explain-quote {
    font-size: 15px;
    line-height: 1.5;
    font-style: italic;
    color: var(--color-on-surface-variant);
    margin-bottom: 14px;
}

.mob-system-insight-block {
    padding-top: 12px;
    border-top: 1px solid var(--color-outline-variant);
}

.mob-system-insight-label {
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--color-on-surface);
}

.mob-system-insight-body {
    font-size: 14px;
    font-weight: 600;
    margin-top: 6px;
    line-height: 1.45;
}

.mob-bias-rows {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.mob-bias-row-head {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin-bottom: 6px;
    font-size: 14px;
    font-weight: 700;
}

.mob-bias-track {
    height: 12px;
    width: 100%;
    background: var(--color-surface-container);
    border-radius: 999px;
    overflow: hidden;
}

.mob-bias-fill {
    height: 100%;
    border-radius: 999px;
    transition: width 0.9s ease;
}

.mob-bias-blue {
    background: linear-gradient(90deg, #3b82f6, #60a5fa);
    box-shadow: 0 0 10px rgba(59, 130, 246, 0.45);
}

.mob-bias-purple {
    background: linear-gradient(90deg, #a855f7, #c084fc);
    box-shadow: 0 0 10px rgba(168, 85, 247, 0.45);
}

.mob-bias-pink {
    background: linear-gradient(90deg, #ec4899, #f472b6);
    box-shadow: 0 0 10px rgba(236, 72, 153, 0.45);
}

body.dark-mode .mob-engine-conf,
body.dark-mode .mob-confidence-line {
    color: #94a3b8;
}

/* --- Signup View (Matches User Image) --- */
#signup-view {
    background: #0B0F19;
    /* Deep dark theme */
    color: #FFFFFF;
}

.signup-container {
    padding: 32px 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
}

.signup-header {
    text-align: center;
    margin-bottom: 32px;
}

.signup-title {
    color: #3b82f6;
    font-size: 28px;
    font-weight: 800;
    margin-bottom: 8px;
    letter-spacing: -0.01em;
}

.signup-subtitle {
    color: #94a3b8;
    font-size: 14px;
    line-height: 1.5;
    max-width: 280px;
    margin: 0 auto;
}

.signup-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 24px;
    padding: 24px;
    width: 100%;
    max-width: 360px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.3);
}

.google-signup-btn {
    width: 100%;
    height: 52px;
    background: #FFFFFF;
    color: #1F2937;
    border: none;
    border-radius: 12px;
    font-weight: 600;
    font-size: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    cursor: pointer;
    transition: transform 0.2s;
}

.google-signup-btn:active {
    transform: scale(0.98);
}

.google-icon {
    width: 20px;
    height: 20px;
}

.signup-divider {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 24px 0;
}

.signup-divider .divider-line {
    height: 1px;
    flex: 1;
    background: rgba(255, 255, 255, 0.1);
}

.signup-divider .divider-text {
    font-size: 12px;
    color: #64748b;
    font-weight: 600;
}

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

.signup-input-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.signup-input-group label {
    font-size: 13px;
    font-weight: 600;
    color: #94a3b8;
    margin-left: 4px;
}

.signup-input-wrapper {
    position: relative;
}

.signup-input-wrapper input {
    width: 100%;
    height: 48px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 0 16px;
    color: #FFFFFF;
    font-size: 14px;
    outline: none;
    transition: all 0.2s;
}

.signup-input-wrapper input::placeholder {
    color: rgba(255, 255, 255, 0.2);
}

.signup-input-wrapper input:focus {
    border-color: #3b82f6;
    background: rgba(255, 255, 255, 0.08);
}

.signup-visibility-toggle {
    position: absolute;
    right: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: #64748b;
    cursor: pointer;
    font-size: 20px !important;
}

.signup-options {
    margin-top: 4px;
}

.terms-checkbox {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    cursor: pointer;
}

.terms-checkbox input {
    margin-top: 3px;
    accent-color: #3b82f6;
}

.terms-checkbox span {
    font-size: 13px;
    color: #94a3b8;
    line-height: 1.4;
}

.terms-checkbox a {
    color: #3b82f6;
    text-decoration: none;
    font-weight: 600;
}

.signup-submit-btn {
    width: 100%;
    height: 52px;
    background: #3b82f6;
    color: #FFFFFF;
    border: none;
    border-radius: 14px;
    font-weight: 700;
    font-size: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-top: 12px;
    box-shadow: 0 8px 24px rgba(59, 130, 246, 0.35);
    cursor: pointer;
    transition: all 0.2s;
}

.signup-submit-btn:active {
    transform: scale(0.98);
}

.login-prompt {
    text-align: center;
    margin-top: 24px;
}

.login-prompt p {
    font-size: 14px;
    color: #94a3b8;
}

.login-link-back {
    color: #3b82f6;
    font-weight: 700;
    text-decoration: none;
}

.signup-trust-footer {
    margin-top: 40px;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
    padding-bottom: 40px;
}

.trust-title {
    font-size: 10px;
    font-weight: 800;
    color: #64748b;
    letter-spacing: 0.1em;
}

.trust-badges-row {
    display: flex;
    gap: 24px;
    justify-content: center;
}

.trust-badge {
    display: flex;
    align-items: center;
    gap: 6px;
    color: #94a3b8;
}

.trust-badge span {
    font-size: 11px;
    font-weight: 700;
}

.trust-badge .material-symbols-outlined {
    font-size: 16px !important;
    color: #3b82f6;
}

.single-badge {
    margin-top: -4px;
}

.copyright-text {
    font-size: 12px;
    color: #475569;
    margin-top: 12px;
    max-width: 200px;
    text-align: center;
}

/* Google Sign-in Button Styles (Extracted from inline) */
.google-login-btn {
    width: 100%;
    height: 100px;
    font-size: 32px;
    font-weight: 900;
}

.google-login-btn .google-icon {
    width: 48px;
    height: 48px;
}

/* Responsive adjustments for small heights (e.g. iPhone SE, 600px - 750px) */
@media (max-height: 750px) {
    #login-view .main-content {
        padding-top: 20px;
        gap: 12px;
    }

    .login-card.premium-style {
        padding: 20px;
        gap: 12px;
    }

    .google-login-btn {
        height: 60px;
        font-size: 20px;
    }

    .google-login-btn .google-icon {
        width: 32px;
        height: 32px;
    }

    .hero-section {
        gap: 6px;
    }

    #login-view .logo-container .material-symbols-outlined {
        font-size: 36px !important;
    }

    #login-view .logo-text {
        font-size: 28px !important;
    }
}

@media (max-height: 600px) {
    #login-view .main-content {
        padding-top: 10px;
        padding-bottom: 20px;
    }

    .login-card.premium-style {
        padding: 16px;
        gap: 8px;
    }

    .premium-input input {
        height: 48px !important;
    }

    .submit-btn.premium-btn {
        height: 48px !important;
    }
}

/* OTP View Styles */
.otp-content {
    padding: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: calc(100vh - 80px);
}

.otp-card {
    width: 100%;
    max-width: 400px;
    padding: 32px 24px;
    text-align: center;
}

.otp-icon-header {
    width: 64px;
    height: 64px;
    background: rgba(59, 130, 246, 0.1);
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 24px;
}

.otp-icon-header .material-symbols-outlined {
    font-size: 32px;
    color: var(--color-primary);
}

.otp-card h2 {
    margin-bottom: 8px;
    color: var(--color-on-background);
}

.otp-card .subtitle {
    color: var(--color-on-surface-variant);
    margin-bottom: 32px;
}

.otp-input-container {
    display: flex;
    gap: 8px;
    justify-content: center;
    margin-bottom: 32px;
}

.otp-digit {
    width: 44px;
    height: 56px;
    border: 2px solid var(--color-outline-variant);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.05);
    color: var(--color-on-background);
    font-size: 24px;
    font-weight: 600;
    text-align: center;
    outline: none;
    transition: all 0.2s;
}

.otp-digit:focus {
    border-color: var(--color-primary);
    background: rgba(59, 130, 246, 0.1);
    box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.1);
}

.otp-footer {
    margin-top: 24px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    font-size: 14px;
    color: var(--color-on-surface-variant);
}

.otp-footer a {
    color: var(--color-primary);
    text-decoration: none;
    font-weight: 600;
}
