/* ==========================================================================
   PhishGuard AI — Modular Glassmorphic Dashboard Design System
   ========================================================================== */

:root {
    /* Color Palette - Light Mode */
    --bg-page: #F0F4FA;
    --bg-mesh-1: rgba(147, 197, 253, 0.8);
    --bg-mesh-2: rgba(196, 181, 253, 0.75);
    --bg-mesh-3: rgba(165, 243, 252, 0.7);
    --bg-mesh-4: rgba(253, 164, 175, 0.4);

    /* iOS Liquid Glass Materials - Light Mode */
    --card-bg: linear-gradient(135deg, rgba(255, 255, 255, 0.75) 0%, rgba(255, 255, 255, 0.45) 100%);
    --card-bg-solid: #FFFFFF;
    --card-border: rgba(255, 255, 255, 0.75);
    --card-border-subtle: rgba(255, 255, 255, 0.5);
    --card-shadow: 0 16px 36px -6px rgba(148, 163, 184, 0.2),
                   0 4px 14px -2px rgba(148, 163, 184, 0.08),
                   inset 0 1px 1px 0 rgba(255, 255, 255, 0.95),
                   inset 0 0 0 1px rgba(255, 255, 255, 0.35);
    --card-shadow-hover: 0 24px 48px -8px rgba(99, 102, 241, 0.2),
                         0 8px 20px -4px rgba(148, 163, 184, 0.12),
                         inset 0 1px 1.5px 0 rgba(255, 255, 255, 1),
                         inset 0 0 0 1px rgba(255, 255, 255, 0.5);

    --glass-blur: blur(28px) saturate(190%);
    --glass-blur-heavy: blur(40px) saturate(210%);
    --glass-specular: inset 0 1px 1px 0 rgba(255, 255, 255, 0.95), inset 0 0 0 1px rgba(255, 255, 255, 0.35);

    --text-primary: #0F172A;
    --text-secondary: #475569;
    --text-muted: #94A3B8;

    --brand-primary: #3B82F6;
    --brand-indigo: #6366F1;
    --brand-purple: #8B5CF6;
    --brand-gradient: linear-gradient(135deg, #3B82F6 0%, #6366F1 60%, #8B5CF6 100%);
    --brand-gradient-hover: linear-gradient(135deg, #2563EB 0%, #4F46E5 60%, #7C3AED 100%);

    --success: #10B981;
    --success-bg: rgba(16, 185, 129, 0.14);
    --success-text: #059669;

    --danger: #EF4444;
    --danger-bg: rgba(239, 68, 68, 0.14);
    --danger-text: #DC2626;

    --warning: #F59E0B;
    --warning-bg: rgba(245, 158, 11, 0.14);
    --warning-text: #D97706;

    --sidebar-width: 250px;
    --header-height: 72px;
    --radius-sm: 10px;
    --radius-md: 16px;
    --radius-lg: 24px;
    --radius-xl: 32px;
    --radius-full: 9999px;

    --transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
    --transition-fast: all 0.18s cubic-bezier(0.16, 1, 0.3, 1);
    --transition-smooth: all 0.38s cubic-bezier(0.16, 1, 0.3, 1);
    --transition-spring: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

[data-theme="dark"] {
    --bg-page: #080C14;
    --bg-mesh-1: rgba(37, 99, 235, 0.45);
    --bg-mesh-2: rgba(124, 58, 237, 0.38);
    --bg-mesh-3: rgba(6, 182, 212, 0.32);
    --bg-mesh-4: rgba(244, 63, 94, 0.25);

    /* iOS Liquid Glass Materials - Dark Mode */
    --card-bg: linear-gradient(135deg, rgba(255, 255, 255, 0.08) 0%, rgba(255, 255, 255, 0.03) 100%);
    --card-bg-solid: #101726;
    --card-border: rgba(255, 255, 255, 0.14);
    --card-border-subtle: rgba(255, 255, 255, 0.08);
    --card-shadow: 0 16px 40px -8px rgba(0, 0, 0, 0.65),
                   0 4px 16px -2px rgba(0, 0, 0, 0.45),
                   inset 0 1px 1px 0 rgba(255, 255, 255, 0.2),
                   inset 0 0 0 1px rgba(255, 255, 255, 0.05);
    --card-shadow-hover: 0 24px 52px -8px rgba(99, 102, 241, 0.32),
                         0 8px 24px -4px rgba(0, 0, 0, 0.55),
                         inset 0 1px 1.5px 0 rgba(255, 255, 255, 0.3),
                         inset 0 0 0 1px rgba(255, 255, 255, 0.08);

    --glass-blur: blur(32px) saturate(210%);
    --glass-blur-heavy: blur(45px) saturate(230%);
    --glass-specular: inset 0 1px 1px 0 rgba(255, 255, 255, 0.2), inset 0 0 0 1px rgba(255, 255, 255, 0.05);

    --text-primary: #F8FAFC;
    --text-secondary: #94A3B8;
    --text-muted: #64748B;
}

/* ==========================================================================
   RESET & BASE STYLES
   ========================================================================== */

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
    background-color: var(--bg-page);
    color: var(--text-primary);
    min-height: 100vh;
    overflow-x: hidden;
    position: relative;
    line-height: 1.5;
    scroll-behavior: smooth;
    transition: background-color 0.4s cubic-bezier(0.16, 1, 0.3, 1), color 0.3s ease;
}

/* Ambient luminous background orbs */
.ambient-glow {
    position: fixed;
    border-radius: 50%;
    filter: blur(100px);
    pointer-events: none;
    z-index: 0;
    opacity: 0.75;
    will-change: transform;
}

.glow-1 {
    width: 650px;
    height: 650px;
    top: -150px;
    right: -100px;
    background: radial-gradient(circle, var(--bg-mesh-1) 0%, rgba(255,255,255,0) 70%);
    animation: ambient-drift-1 22s ease-in-out infinite alternate;
}

.glow-2 {
    width: 600px;
    height: 600px;
    bottom: -150px;
    left: -100px;
    background: radial-gradient(circle, var(--bg-mesh-2) 0%, rgba(255,255,255,0) 70%);
    animation: ambient-drift-2 26s ease-in-out infinite alternate;
}

.glow-3 {
    width: 550px;
    height: 550px;
    top: 35%;
    right: 20%;
    background: radial-gradient(circle, var(--bg-mesh-3) 0%, rgba(255,255,255,0) 70%);
    animation: ambient-drift-3 19s ease-in-out infinite alternate;
}

.glow-4 {
    width: 500px;
    height: 500px;
    top: 15%;
    left: 15%;
    background: radial-gradient(circle, var(--bg-mesh-4) 0%, rgba(255,255,255,0) 70%);
    animation: ambient-drift-1 25s ease-in-out infinite alternate;
}

/* ==========================================================================
   APP SHELL LAYOUT
   ========================================================================== */

.app-layout {
    display: flex;
    min-height: 100vh;
    position: relative;
    z-index: 1;
}

/* ==========================================================================
   SIDEBAR
   ========================================================================== */

.sidebar {
    width: var(--sidebar-width);
    height: 100vh;
    position: sticky;
    top: 0;
    padding: 24px 18px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    background: var(--card-bg);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border-right: 1px solid var(--card-border);
    box-shadow: 4px 0 24px rgba(0, 0, 0, 0.03), inset -1px 0 1px 0 rgba(255, 255, 255, 0.4);
    z-index: 20;
    transition: var(--transition);
}

[data-theme="dark"] .sidebar {
    background: var(--card-bg);
    box-shadow: 4px 0 30px rgba(0, 0, 0, 0.5), inset -1px 0 1px 0 rgba(255, 255, 255, 0.06);
}

.brand-logo {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    color: var(--text-primary);
    font-weight: 800;
    font-size: 1.35rem;
    letter-spacing: -0.02em;
    padding: 6px 10px;
    margin-bottom: 28px;
}

.logo-shield {
    width: 38px;
    height: 38px;
    display: flex;
    align-items: center;
    justify-content: center;
    filter: drop-shadow(0 4px 14px rgba(56, 189, 248, 0.45));
    border-radius: 10px;
    overflow: hidden;
    flex-shrink: 0;
}

.logo-shield img, 
.brand-logo-img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
}

.logo-shield svg {
    width: 100%;
    height: 100%;
}

.nav-menu {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 12px 16px;
    border-radius: var(--radius-md);
    background: transparent;
    border: none;
    color: var(--text-secondary);
    font-weight: 600;
    font-size: 0.95rem;
    font-family: inherit;
    cursor: pointer;
    text-align: left;
    width: 100%;
    transition: color 0.25s cubic-bezier(0.16, 1, 0.3, 1),
                background 0.25s cubic-bezier(0.16, 1, 0.3, 1),
                transform 0.25s cubic-bezier(0.16, 1, 0.3, 1),
                box-shadow 0.25s cubic-bezier(0.16, 1, 0.3, 1);
    will-change: transform, background;
}

.nav-item .nav-icon {
    width: 19px;
    height: 19px;
    transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1), color 0.25s ease;
}

.nav-item:hover {
    color: var(--brand-primary);
    background: rgba(255, 255, 255, 0.65);
    transform: translateX(4px);
}

.nav-item:hover .nav-icon {
    transform: scale(1.12);
}

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

[data-theme="dark"] .nav-item:hover {
    background: rgba(255, 255, 255, 0.06);
}

.nav-item.active {
    color: var(--brand-primary);
    background: rgba(255, 255, 255, 0.92);
    box-shadow: 0 4px 18px -2px rgba(59, 130, 246, 0.2), inset 0 0 0 1px rgba(255, 255, 255, 0.9);
}

.nav-item.active .nav-icon {
    transform: scale(1.08);
}

[data-theme="dark"] .nav-item.active {
    background: rgba(30, 41, 59, 0.8);
    box-shadow: 0 4px 16px -2px rgba(0, 0, 0, 0.4), inset 0 0 0 1px rgba(255, 255, 255, 0.1);
}

/* Sidebar Floating Info Card */
.sidebar-bottom {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.sidebar-info-card {
    background: linear-gradient(135deg, rgba(238, 242, 255, 0.75) 0%, rgba(224, 231, 255, 0.5) 100%);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--card-border);
    border-radius: var(--radius-lg);
    padding: 18px 16px;
    text-align: left;
    box-shadow: var(--card-shadow);
    position: relative;
    overflow: hidden;
}

[data-theme="dark"] .sidebar-info-card {
    background: linear-gradient(135deg, rgba(30, 41, 59, 0.75) 0%, rgba(15, 23, 42, 0.6) 100%);
}

.info-shield-icon {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    background: var(--brand-primary);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 10px;
    box-shadow: 0 4px 10px rgba(59, 130, 246, 0.35);
}

.info-shield-icon svg {
    width: 17px;
    height: 17px;
}

.sidebar-info-card h4 {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 3px;
}

.sidebar-info-card p {
    font-size: 0.8rem;
    color: var(--text-secondary);
}

.user-profile-pill {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 14px;
    border-radius: var(--radius-full);
    background: rgba(255, 255, 255, 0.6);
    backdrop-filter: blur(12px);
    border: 1px solid var(--card-border);
    color: var(--text-primary);
    cursor: pointer;
    transition: var(--transition);
}

[data-theme="dark"] .user-profile-pill {
    background: rgba(30, 41, 59, 0.6);
}

.user-profile-pill:hover {
    background: rgba(255, 255, 255, 0.95);
    box-shadow: var(--card-shadow);
    transform: translateY(-1px);
}

[data-theme="dark"] .user-profile-pill:hover {
    background: rgba(30, 41, 59, 0.9);
}

.user-avatar-wrapper {
    position: relative;
    display: inline-flex;
    flex-shrink: 0;
}

.user-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: #E2E8F0;
    color: #1E293B;
    font-weight: 800;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1.5px solid var(--card-border);
}

[data-theme="dark"] .user-avatar {
    background: #334155;
    color: #F8FAFC;
}

.avatar-status-dot {
    position: absolute;
    bottom: -1px;
    right: -1px;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    border: 2px solid var(--card-bg-solid, #101726);
    background: #F59E0B;
    transition: var(--transition);
}

.avatar-status-dot.online {
    background: #10B981;
    box-shadow: 0 0 6px #10B981;
}

.user-meta {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-width: 0;
    overflow: hidden;
}

.user-name {
    font-size: 0.88rem;
    font-weight: 700;
    line-height: 1.2;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.user-plan {
    font-size: 0.74rem;
    color: var(--text-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.pill-auth-btn {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 5px 12px;
    border-radius: var(--radius-full);
    font-family: inherit;
    font-size: 0.75rem;
    font-weight: 700;
    border: none;
    cursor: pointer;
    white-space: nowrap;
    transition: var(--transition-spring);
    flex-shrink: 0;
}

.pill-auth-btn.login-state {
    background: var(--brand-gradient);
    color: #FFFFFF;
    box-shadow: 0 2px 10px rgba(59, 130, 246, 0.45);
}

.pill-auth-btn.login-state:hover {
    transform: scale(1.06);
    box-shadow: 0 4px 14px rgba(59, 130, 246, 0.65);
    background: var(--brand-gradient-hover);
}

.pill-auth-btn.account-state {
    background: rgba(16, 185, 129, 0.16);
    color: #34D399;
    border: 1px solid rgba(16, 185, 129, 0.35);
}

.pill-auth-btn.account-state:hover {
    background: rgba(16, 185, 129, 0.28);
    border-color: rgba(16, 185, 129, 0.6);
    transform: scale(1.06);
}

.user-chevron {
    color: var(--text-muted);
}

/* ==========================================================================
   TOP APP HEADER
   ========================================================================== */

.main-wrapper {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    min-width: 0;
}

.app-header {
    height: var(--header-height);
    padding: 0 36px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid var(--card-border);
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.65) 0%, rgba(255, 255, 255, 0.35) 100%);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    position: sticky;
    top: 0;
    z-index: 10;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.02), inset 0 -1px 0 rgba(255, 255, 255, 0.6);
}

[data-theme="dark"] .app-header {
    background: rgba(11, 15, 25, 0.7);
}

.search-box {
    display: flex;
    align-items: center;
    gap: 10px;
    background: rgba(255, 255, 255, 0.5);
    backdrop-filter: blur(20px) saturate(190%);
    -webkit-backdrop-filter: blur(20px) saturate(190%);
    border: 1px solid rgba(255, 255, 255, 0.7);
    padding: 8px 16px;
    border-radius: var(--radius-full);
    width: 380px;
    box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.03), inset 0 1px 1px rgba(255, 255, 255, 0.9), 0 4px 14px rgba(0, 0, 0, 0.03);
    transition: var(--transition-smooth);
}

[data-theme="dark"] .search-box {
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(255, 255, 255, 0.14);
    box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.3), inset 0 1px 1px rgba(255, 255, 255, 0.15), 0 4px 14px rgba(0, 0, 0, 0.4);
}

.search-box:focus-within {
    width: 440px;
    background: rgba(255, 255, 255, 0.85);
    border-color: rgba(59, 130, 246, 0.7);
    box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.18), inset 0 1px 2px rgba(0,0,0,0.02), inset 0 1px 1px rgba(255,255,255,1);
}

[data-theme="dark"] .search-box:focus-within {
    background: rgba(255, 255, 255, 0.12);
    border-color: rgba(59, 130, 246, 0.6);
    box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.25), inset 0 1px 2px rgba(0,0,0,0.3);
}

.search-box .search-icon {
    color: var(--text-muted);
}

.search-box input {
    border: none;
    background: transparent;
    outline: none;
    font-size: 0.88rem;
    color: var(--text-primary);
    width: 100%;
    font-family: inherit;
}

.search-box input::placeholder {
    color: var(--text-muted);
}

.search-kbd {
    font-size: 0.72rem;
    font-weight: 700;
    background: rgba(0, 0, 0, 0.05);
    color: var(--text-secondary);
    padding: 2px 8px;
    border-radius: 6px;
    border: 1px solid rgba(0, 0, 0, 0.08);
}

[data-theme="dark"] .search-kbd {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.12);
}

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

.theme-toggle-btn, .icon-action-btn {
    width: 40px;
    height: 40px;
    border-radius: var(--radius-full);
    background: rgba(255, 255, 255, 0.75);
    backdrop-filter: blur(10px);
    border: 1px solid var(--card-border);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
    cursor: pointer;
    position: relative;
    transition: var(--transition);
}

[data-theme="dark"] .theme-toggle-btn,
[data-theme="dark"] .icon-action-btn {
    background: rgba(30, 41, 59, 0.65);
}

.theme-toggle-btn:hover, .icon-action-btn:hover {
    color: var(--brand-primary);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.theme-toggle-btn .sun-icon { display: block; }
.theme-toggle-btn .moon-icon { display: none; }

[data-theme="dark"] .theme-toggle-btn .sun-icon { display: none; }
[data-theme="dark"] .theme-toggle-btn .moon-icon { display: block; }

.badge-dot {
    position: absolute;
    top: 7px;
    right: 7px;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: var(--danger);
    color: white;
    font-size: 0.65rem;
    font-weight: 800;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid var(--bg-page);
}

.upgrade-btn-header {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 9px 18px;
    border-radius: var(--radius-full);
    background: var(--brand-gradient);
    color: white;
    border: none;
    font-weight: 700;
    font-size: 0.88rem;
    cursor: pointer;
    box-shadow: 0 4px 14px rgba(99, 102, 241, 0.35);
    transition: var(--transition);
}

.upgrade-btn-header:hover {
    background: var(--brand-gradient-hover);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(99, 102, 241, 0.45);
}

.mobile-header-left {
    display: none;
}

.mobile-menu-btn {
    display: none;
}

.mobile-brand-logo {
    display: none;
}

.mobile-auth-btn {
    display: none;
}

.scanner-input-inner {
    display: flex;
    align-items: center;
    flex: 1;
    min-width: 0;
}

/* ==========================================================================
   MOBILE NAVIGATION DRAWER (Slide-Over Panel)
   ========================================================================== */

.mobile-drawer-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.65);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    z-index: 998;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.mobile-drawer-backdrop.open {
    opacity: 1;
    pointer-events: auto;
}

.mobile-drawer {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    width: min(320px, 86vw);
    background: rgba(11, 15, 25, 0.95);
    backdrop-filter: blur(36px) saturate(210%);
    -webkit-backdrop-filter: blur(36px) saturate(210%);
    border-right: 1px solid rgba(255, 255, 255, 0.12);
    box-shadow: 24px 0 60px rgba(0, 0, 0, 0.75);
    z-index: 999;
    transform: translateX(-100%);
    transition: transform 0.36s cubic-bezier(0.16, 1, 0.3, 1);
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    padding: 22px 18px;
}

[data-theme="light"] .mobile-drawer {
    background: rgba(255, 255, 255, 0.97);
    border-right: 1px solid rgba(0, 0, 0, 0.08);
    box-shadow: 20px 0 50px rgba(0, 0, 0, 0.12);
}

.mobile-drawer.open {
    transform: translateX(0);
}

.mobile-drawer-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 22px;
    padding-bottom: 14px;
    border-bottom: 1px solid var(--card-border-subtle);
}

.drawer-brand {
    display: flex;
    align-items: center;
    gap: 10px;
}

.drawer-brand .logo-shield {
    width: 34px;
    height: 34px;
}

.drawer-brand-text {
    display: flex;
    flex-direction: column;
}

.drawer-brand-title {
    font-size: 1.15rem;
    font-weight: 800;
    color: var(--text-primary);
    letter-spacing: -0.02em;
    line-height: 1.2;
}

.drawer-brand-badge {
    background: var(--brand-gradient);
    color: #FFFFFF;
    font-size: 0.65rem;
    font-weight: 800;
    padding: 2px 6px;
    border-radius: 5px;
    margin-left: 4px;
}

.drawer-brand-sub {
    font-size: 0.72rem;
    color: var(--text-muted);
}

.drawer-close-btn {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.12);
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition-fast);
}

[data-theme="light"] .drawer-close-btn {
    background: rgba(0, 0, 0, 0.06);
    border-color: rgba(0, 0, 0, 0.1);
}

.drawer-close-btn:hover {
    color: var(--text-primary);
    transform: scale(1.08);
}

/* Quick Scan CTA in Drawer */
.drawer-quick-cta-box {
    margin-bottom: 20px;
}

.drawer-quick-scan-btn {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    border-radius: 16px;
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.18) 0%, rgba(99, 102, 241, 0.18) 100%);
    border: 1px solid rgba(59, 130, 246, 0.4);
    color: var(--text-primary);
    cursor: pointer;
    text-align: left;
    transition: var(--transition);
    box-shadow: 0 4px 16px rgba(59, 130, 246, 0.15);
}

.drawer-quick-scan-btn:hover {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.26) 0%, rgba(99, 102, 241, 0.26) 100%);
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(59, 130, 246, 0.25);
}

.quick-scan-icon {
    width: 38px;
    height: 38px;
    border-radius: 10px;
    background: var(--brand-gradient);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.4);
}

.quick-scan-text {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
}

.cta-title {
    font-size: 0.94rem;
    font-weight: 800;
    color: var(--text-primary);
    line-height: 1.2;
}

.cta-subtitle {
    font-size: 0.72rem;
    color: var(--text-muted);
}

.quick-scan-arrow {
    font-size: 1.2rem;
    color: var(--brand-primary);
    font-weight: 800;
}

.drawer-menu-label {
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--text-muted);
    margin-bottom: 8px;
    padding: 0 4px;
}

.drawer-nav-menu {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-bottom: auto;
}

.drawer-nav-item {
    display: flex;
    align-items: center;
    gap: 14px;
    width: 100%;
    padding: 12px 14px;
    border-radius: 12px;
    background: transparent;
    border: none;
    color: var(--text-secondary);
    font-size: 0.94rem;
    font-weight: 600;
    cursor: pointer;
    text-align: left;
    transition: var(--transition-fast);
}

.drawer-nav-item .nav-icon {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
    transition: transform 0.2s ease;
}

.drawer-nav-item:hover {
    background: rgba(255, 255, 255, 0.06);
    color: var(--text-primary);
    transform: translateX(3px);
}

[data-theme="light"] .drawer-nav-item:hover {
    background: rgba(0, 0, 0, 0.05);
}

.drawer-nav-item.active {
    background: rgba(59, 130, 246, 0.15);
    color: var(--brand-primary);
    font-weight: 700;
    box-shadow: inset 0 0 0 1px rgba(59, 130, 246, 0.35);
}

.drawer-footer-section {
    margin-top: 24px;
    padding-top: 14px;
    border-top: 1px solid var(--card-border-subtle);
}

.drawer-account-card {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 11px 13px;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--card-border-subtle);
    cursor: pointer;
    transition: var(--transition);
}

[data-theme="light"] .drawer-account-card {
    background: rgba(0, 0, 0, 0.03);
}

.drawer-account-card:hover {
    background: rgba(59, 130, 246, 0.1);
    border-color: rgba(59, 130, 246, 0.4);
}

.drawer-account-meta {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
}

.drawer-account-name {
    font-size: 0.88rem;
    font-weight: 700;
    color: var(--text-primary);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.drawer-account-status {
    font-size: 0.72rem;
    color: var(--text-muted);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.drawer-auth-badge {
    font-size: 0.76rem;
    font-weight: 700;
    color: var(--brand-primary);
    flex-shrink: 0;
}

/* ==========================================================================
   VIEW ROUTING & CONTENT CONTAINER
   ========================================================================== */

.content-scrollable {
    padding: 30px 36px 60px;
    display: flex;
    flex-direction: column;
    gap: 26px;
    max-width: 1350px;
    margin: 0 auto;
    width: 100%;
}

.view-section {
    display: none;
}

.view-section.active {
    display: flex;
    flex-direction: column;
    gap: 26px;
    animation: viewFadeSlideIn 0.38s cubic-bezier(0.16, 1, 0.3, 1) forwards;
    will-change: opacity, transform;
}

/* ==========================================================================
   VIEW 1: HOME STYLES
   ========================================================================== */

.hero-glass-card {
    background: var(--card-bg);
    backdrop-filter: var(--glass-blur-heavy);
    -webkit-backdrop-filter: var(--glass-blur-heavy);
    border: 1px solid var(--card-border);
    border-radius: var(--radius-xl);
    padding: 40px 48px;
    display: grid;
    grid-template-columns: 1.15fr 0.85fr;
    gap: 30px;
    align-items: center;
    box-shadow: var(--card-shadow);
    position: relative;
    overflow: hidden;
    transition: var(--transition-smooth);
}

.hero-glass-card::before {
    content: "";
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 1px;
    background: linear-gradient(90deg, rgba(255, 255, 255, 0) 0%, rgba(255, 255, 255, 0.9) 30%, rgba(255, 255, 255, 0.9) 70%, rgba(255, 255, 255, 0) 100%);
    pointer-events: none;
}

.hero-headline {
    font-size: 2.85rem;
    font-weight: 800;
    line-height: 1.12;
    letter-spacing: -0.035em;
    color: var(--text-primary);
    margin-bottom: 16px;
}

.gradient-text {
    background: linear-gradient(135deg, #3B82F6 0%, #8B5CF6 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    display: inline-block;
}

.hero-subtext {
    font-size: 1.05rem;
    color: var(--text-secondary);
    max-width: 520px;
    line-height: 1.6;
    margin-bottom: 26px;
}

.hero-badges-row {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.badge-pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 7px 16px;
    border-radius: var(--radius-full);
    background: rgba(255, 255, 255, 0.55);
    backdrop-filter: blur(16px) saturate(180%);
    -webkit-backdrop-filter: blur(16px) saturate(180%);
    border: 1px solid rgba(255, 255, 255, 0.7);
    font-size: 0.84rem;
    font-weight: 600;
    color: var(--text-secondary);
    box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.9), 0 2px 8px rgba(0, 0, 0, 0.03);
    transition: var(--transition-spring);
}

[data-theme="dark"] .badge-pill {
    background: rgba(255, 255, 255, 0.07);
    border-color: rgba(255, 255, 255, 0.12);
    box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.15), 0 2px 8px rgba(0, 0, 0, 0.3);
}

.badge-pill:hover {
    transform: translateY(-2px);
    color: var(--brand-primary);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.12);
}

.badge-icon {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
}

.purple-bg { background: rgba(139, 92, 246, 0.18); color: #8B5CF6; }
.green-bg { background: rgba(16, 185, 129, 0.18); color: #10B981; font-weight: 800; }
.blue-bg { background: rgba(59, 130, 246, 0.18); color: #3B82F6; }
.indigo-bg { background: rgba(99, 102, 241, 0.18); color: #6366F1; }

.launch-scan-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 13px 26px;
    border-radius: var(--radius-full);
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.28) 0%, rgba(255, 255, 255, 0.05) 50%, rgba(0, 0, 0, 0.06) 100%), var(--brand-gradient);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.4);
    font-weight: 700;
    font-size: 0.98rem;
    cursor: pointer;
    box-shadow: inset 0 1px 1px 0 rgba(255, 255, 255, 0.7), inset 0 -1px 1px 0 rgba(0, 0, 0, 0.2), 0 8px 24px rgba(99, 102, 241, 0.42);
    transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1),
                box-shadow 0.35s cubic-bezier(0.16, 1, 0.3, 1),
                background 0.3s ease;
    will-change: transform, box-shadow;
}

.launch-scan-btn:hover {
    background: var(--brand-gradient-hover);
    transform: translateY(-2px) scale(1.02);
    box-shadow: 0 8px 28px rgba(99, 102, 241, 0.52);
}

.launch-scan-btn:active {
    transform: translateY(1px) scale(0.98);
}

.launch-scan-btn svg {
    transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.launch-scan-btn:hover svg {
    transform: translateX(4px);
}

/* 3D Security Graphic on Hero Right */
.hero-right {
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
}

.shield-3d-wrapper {
    position: relative;
    width: 320px;
    height: 270px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.floating-pill-top {
    position: absolute;
    top: 0;
    right: 15px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 14px;
    border-radius: var(--radius-full);
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(16px);
    border: 1px solid var(--card-border);
    font-size: 0.78rem;
    font-weight: 700;
    color: #1E293B;
    box-shadow: 0 8px 24px -4px rgba(59, 130, 246, 0.2);
    z-index: 5;
    animation: float-gentle 4s ease-in-out infinite;
}

[data-theme="dark"] .floating-pill-top {
    background: rgba(30, 41, 59, 0.85);
    color: #F8FAFC;
}

.dot-pulse {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #3B82F6;
    box-shadow: 0 0 10px #3B82F6;
    animation: pulse-glow 2s infinite;
}

.shield-3d-core {
    position: relative;
    width: 170px;
    height: 170px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-top: 10px;
}

.shield-glass-body {
    width: 120px;
    height: 140px;
    z-index: 3;
    animation: float-core 5s ease-in-out infinite alternate;
}

.shield-svg {
    width: 120px;
    height: 140px;
    filter: drop-shadow(0 14px 28px rgba(59, 130, 246, 0.4));
}

.orbit-ring {
    position: absolute;
    border-radius: 50%;
    border: 1.5px solid rgba(96, 165, 250, 0.35);
    pointer-events: none;
}

.ring-1 {
    width: 220px;
    height: 90px;
    box-shadow: 0 0 20px rgba(59, 130, 246, 0.2);
    animation: orbit-rotate-1 20s linear infinite;
    will-change: transform;
}

.ring-2 {
    width: 200px;
    height: 80px;
    border-color: rgba(139, 92, 246, 0.3);
    animation: orbit-rotate-2 26s linear infinite;
    will-change: transform;
}

.floating-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(1px);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.4);
}

.orb-1 {
    width: 18px;
    height: 18px;
    background: radial-gradient(circle, #93C5FD 0%, #3B82F6 100%);
    top: 25px;
    left: 0;
    animation: float-gentle 5s infinite;
}

.orb-2 {
    width: 14px;
    height: 14px;
    background: radial-gradient(circle, #C4B5FD 0%, #8B5CF6 100%);
    bottom: 25px;
    right: 5px;
    animation: float-gentle 6s infinite reverse;
}

.orb-3 {
    width: 10px;
    height: 10px;
    background: #60A5FA;
    top: 50%;
    right: -20px;
    animation: float-gentle 4s infinite;
}

.handwritten-motto {
    margin-top: 14px;
    display: flex;
    flex-direction: column;
    align-items: center;
    font-family: 'Caveat', cursive;
    color: var(--text-secondary);
    opacity: 0.85;
    line-height: 1.2;
    transform: rotate(-2deg);
}

.handwritten-motto span {
    font-size: 1.35rem;
    font-weight: 700;
    color: #4F46E5;
}

[data-theme="dark"] .handwritten-motto span {
    color: #818CF8;
}

.handwritten-motto em {
    font-size: 1.15rem;
    font-style: normal;
}

/* Capabilities Section */
.capabilities-section {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.section-title-wrap {
    text-align: center;
    max-width: 600px;
    margin: 0 auto;
}

.pill-label {
    font-size: 0.78rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--brand-primary);
    background: rgba(59, 130, 246, 0.12);
    padding: 4px 12px;
    border-radius: var(--radius-full);
    display: inline-block;
    margin-bottom: 8px;
}

.section-title-wrap h2 {
    font-size: 1.85rem;
    font-weight: 800;
    letter-spacing: -0.02em;
    margin-bottom: 6px;
}

.section-title-wrap p {
    font-size: 0.95rem;
    color: var(--text-secondary);
}

.capabilities-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}

.cap-card {
    background: var(--card-bg);
    backdrop-filter: blur(20px);
    border: 1px solid var(--card-border);
    border-radius: var(--radius-lg);
    padding: 24px 20px;
    box-shadow: var(--card-shadow);
    transition: var(--transition);
}

.cap-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--card-shadow-hover);
}

.cap-icon-box {
    width: 44px;
    height: 44px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 14px;
}

.cap-icon-box.blue { background: rgba(59, 130, 246, 0.15); color: #3B82F6; }
.cap-icon-box.green { background: rgba(16, 185, 129, 0.15); color: #10B981; }
.cap-icon-box.purple { background: rgba(139, 92, 246, 0.15); color: #8B5CF6; }
.cap-icon-box.orange { background: rgba(245, 158, 11, 0.15); color: #F59E0B; }

.cap-card h3 {
    font-size: 1.05rem;
    font-weight: 700;
    margin-bottom: 8px;
}

.cap-card p {
    font-size: 0.85rem;
    color: var(--text-secondary);
    line-height: 1.5;
}

.cap-card code {
    background: rgba(0, 0, 0, 0.08);
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 0.8rem;
    font-family: monospace;
}

[data-theme="dark"] .cap-card code {
    background: rgba(255, 255, 255, 0.1);
}

/* ==========================================================================
   VIEW 2: SCAN STYLES
   ========================================================================== */

.scanner-glass-card {
    background: var(--card-bg);
    backdrop-filter: var(--glass-blur-heavy);
    -webkit-backdrop-filter: var(--glass-blur-heavy);
    border: 1px solid var(--card-border);
    border-radius: var(--radius-xl);
    padding: 32px 38px;
    box-shadow: var(--card-shadow);
    transition: var(--transition-smooth);
    position: relative;
    overflow: hidden;
}

.scanner-glass-card::before {
    content: "";
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 1px;
    background: linear-gradient(90deg, rgba(255, 255, 255, 0) 0%, rgba(255, 255, 255, 0.85) 40%, rgba(255, 255, 255, 0.85) 60%, rgba(255, 255, 255, 0) 100%);
    pointer-events: none;
}

.scanner-header-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 22px;
}

.scanner-card-title {
    font-size: 1.45rem;
    font-weight: 800;
    letter-spacing: -0.02em;
    margin-bottom: 4px;
}

.scanner-card-subtitle {
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.scanner-status-chip {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 14px;
    border-radius: var(--radius-full);
    background: var(--success-bg);
    color: var(--success-text);
    font-size: 0.82rem;
    font-weight: 700;
}

.pulse-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--success);
    box-shadow: 0 0 8px var(--success);
    animation: pulse-glow 2s infinite;
}

.scanner-input-wrapper {
    display: flex;
    align-items: center;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.75) 0%, rgba(255, 255, 255, 0.45) 100%);
    backdrop-filter: blur(24px) saturate(200%);
    -webkit-backdrop-filter: blur(24px) saturate(200%);
    border: 1px solid rgba(255, 255, 255, 0.85);
    border-radius: var(--radius-full);
    padding: 6px 8px 6px 22px;
    box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.03), inset 0 1px 1px rgba(255, 255, 255, 1), 0 8px 24px rgba(0, 0, 0, 0.04);
    transition: var(--transition-smooth);
}

[data-theme="dark"] .scanner-input-wrapper {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.08) 0%, rgba(255, 255, 255, 0.03) 100%);
    border-color: rgba(255, 255, 255, 0.15);
    box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.3), inset 0 1px 1px rgba(255, 255, 255, 0.18), 0 8px 24px rgba(0, 0, 0, 0.4);
}

.scanner-input-wrapper:focus-within {
    border-color: rgba(59, 130, 246, 0.65);
    box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.2), inset 0 1px 1px rgba(255, 255, 255, 1), 0 12px 32px rgba(59, 130, 246, 0.16);
    background: rgba(255, 255, 255, 0.9);
}

[data-theme="dark"] .scanner-input-wrapper:focus-within {
    background: rgba(255, 255, 255, 0.12);
    border-color: rgba(59, 130, 246, 0.6);
    box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.25), inset 0 1px 2px rgba(0, 0, 0, 0.3);
}

.scanner-input-wrapper.input-error {
    border-color: rgba(244, 63, 94, 0.85) !important;
    box-shadow: 0 0 0 4px rgba(244, 63, 94, 0.25), 0 8px 24px rgba(244, 63, 94, 0.2) !important;
    animation: scannerShake 0.4s cubic-bezier(0.36, 0.07, 0.19, 0.97) both;
}

@keyframes scannerShake {
    10%, 90% { transform: translate3d(-2px, 0, 0); }
    20%, 80% { transform: translate3d(3px, 0, 0); }
    30%, 50%, 70% { transform: translate3d(-5px, 0, 0); }
    40%, 60% { transform: translate3d(5px, 0, 0); }
}

.scanner-error-box {
    margin-top: 14px;
    margin-bottom: 6px;
    padding: 12px 18px;
    border-radius: 14px;
    background: rgba(244, 63, 94, 0.12);
    border: 1px solid rgba(244, 63, 94, 0.4);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    box-shadow: 0 6px 22px rgba(244, 63, 94, 0.18);
    animation: errorSlideIn 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

[data-theme="light"] .scanner-error-box {
    background: rgba(255, 241, 242, 0.96);
    border-color: rgba(244, 63, 94, 0.45);
    box-shadow: 0 6px 20px rgba(225, 29, 72, 0.1);
}

.scanner-error-content {
    display: flex;
    align-items: center;
    gap: 12px;
    color: #fda4af;
    font-size: 0.92rem;
    font-weight: 500;
    line-height: 1.4;
}

[data-theme="light"] .scanner-error-content {
    color: #be123c;
}

.scanner-error-icon {
    flex-shrink: 0;
    color: #f43f5e;
}

@keyframes errorSlideIn {
    from {
        opacity: 0;
        transform: translateY(-8px) scale(0.98);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.input-icon-slot {
    color: var(--text-muted);
    display: flex;
    align-items: center;
    margin-right: 12px;
}

.scanner-input-field {
    flex: 1;
    border: none;
    background: transparent;
    outline: none;
    font-size: 1rem;
    font-family: inherit;
    color: var(--text-primary);
}

.scanner-input-field::placeholder {
    color: var(--text-muted);
}

.analyze-gradient-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 13px 26px;
    border-radius: var(--radius-full);
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.28) 0%, rgba(255, 255, 255, 0.05) 50%, rgba(0, 0, 0, 0.06) 100%), var(--brand-gradient);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.4);
    font-weight: 700;
    font-size: 0.94rem;
    cursor: pointer;
    box-shadow: inset 0 1px 1px 0 rgba(255, 255, 255, 0.7), inset 0 -1px 1px 0 rgba(0, 0, 0, 0.2), 0 8px 24px rgba(99, 102, 241, 0.4);
    transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1),
                box-shadow 0.35s cubic-bezier(0.16, 1, 0.3, 1),
                background 0.3s ease;
    will-change: transform, box-shadow;
}

.analyze-gradient-btn:hover {
    background: var(--brand-gradient-hover);
    transform: translateY(-2px) scale(1.02);
    box-shadow: 0 8px 28px rgba(99, 102, 241, 0.52);
}

.analyze-gradient-btn:active {
    transform: translateY(1px) scale(0.98);
}

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

.btn-spinner {
    display: none;
    width: 18px;
    height: 18px;
    border: 2px solid rgba(255, 255, 255, 0.35);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

.analyze-gradient-btn.loading .btn-spinner { display: block; }
.analyze-gradient-btn.loading .btn-content { display: none; }

.scanner-subtext-row {
    display: flex;
    justify-content: space-between;
    font-size: 0.82rem;
    color: var(--text-muted);
    margin-top: 12px;
    padding: 0 8px;
}

/* Scan Widgets Grid (Security Status + Tips) */
.scan-widgets-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
}

/* Results Card */
.results-card {
    display: none;
    margin-top: 24px;
    padding: 24px;
    border-radius: var(--radius-lg);
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(20px);
    border: 1px solid var(--card-border);
    box-shadow: var(--card-shadow);
    animation: slide-fade-in 0.45s cubic-bezier(0.16, 1, 0.3, 1) forwards;
    will-change: opacity, transform;
}

[data-theme="dark"] .results-card {
    background: rgba(30, 41, 59, 0.8);
}

.results-card.visible { display: block; }

.results-top-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--card-border-subtle);
    padding-bottom: 16px;
    margin-bottom: 20px;
}

.results-status-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 7px 18px;
    border-radius: var(--radius-full);
    font-weight: 800;
    font-size: 0.95rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    white-space: nowrap;
    flex-shrink: 0;
}

.results-status-badge.safe { background: var(--success-bg); color: var(--success-text); }
.results-status-badge.phishing, .results-status-badge.dangerous { background: var(--danger-bg); color: var(--danger-text); }
.results-status-badge.suspicious { background: var(--warning-bg); color: var(--warning-text); }

.badge-pulse {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: currentColor;
    box-shadow: 0 0 10px currentColor;
    animation: pulse-glow 2s infinite;
}

.results-timestamp {
    font-size: 0.82rem;
    color: var(--text-muted);
    white-space: nowrap;
    flex-shrink: 0;
}

.results-body {
    display: grid;
    grid-template-columns: 240px 1fr;
    gap: 28px;
    align-items: start;
}

.results-meter-box {
    background: rgba(255, 255, 255, 0.6);
    border: 1px solid var(--card-border-subtle);
    border-radius: var(--radius-md);
    padding: 20px;
    text-align: center;
}

[data-theme="dark"] .results-meter-box {
    background: rgba(15, 23, 42, 0.6);
}

.meter-label {
    font-size: 0.78rem;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 6px;
}

.meter-value {
    font-size: 2.2rem;
    font-weight: 800;
    color: var(--text-primary);
    line-height: 1;
    margin-bottom: 12px;
}

.meter-track {
    width: 100%;
    height: 8px;
    background: #E2E8F0;
    border-radius: var(--radius-full);
    overflow: hidden;
    margin-bottom: 10px;
}

[data-theme="dark"] .meter-track { background: #334155; }

.meter-fill {
    height: 100%;
    border-radius: var(--radius-full);
    transition: width 1.1s cubic-bezier(0.34, 1.25, 0.64, 1), background-color 0.4s ease;
    background: var(--success);
    will-change: width;
}

.meter-fill.dangerous, .meter-fill.phishing { background: var(--danger); }
.meter-fill.suspicious { background: var(--warning); }

.meter-caption {
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--text-secondary);
}

.details-heading {
    font-size: 0.88rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--text-muted);
    margin: 0 0 6px 0;
}

.details-summary {
    font-size: 0.98rem;
    font-weight: 500;
    color: var(--text-primary);
    margin-bottom: 16px;
}

.details-indicators {
    list-style: none;
    margin-bottom: 20px;
}

.details-indicators li {
    font-size: 0.9rem;
    color: var(--text-secondary);
    padding: 4px 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

.details-indicators li::before {
    content: "›";
    color: var(--brand-primary);
    font-weight: 800;
    font-size: 1.2rem;
}

.results-feedback-row {
    border-top: 1px solid var(--card-border-subtle);
    padding-top: 14px;
    display: flex;
    align-items: center;
    gap: 14px;
    flex-wrap: wrap;
}

.feedback-question {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-secondary);
}

.feedback-actions {
    display: flex;
    gap: 8px;
}

.feedback-pill-btn {
    padding: 6px 14px;
    border-radius: var(--radius-full);
    font-size: 0.82rem;
    font-weight: 700;
    cursor: pointer;
    border: 1px solid transparent;
    transition: var(--transition);
}

.feedback-pill-btn.correct {
    background: var(--success-bg);
    color: var(--success-text);
    border-color: rgba(16, 185, 129, 0.25);
}

.feedback-pill-btn.correct:hover {
    background: var(--success);
    color: white;
}

.feedback-pill-btn.wrong {
    background: var(--danger-bg);
    color: var(--danger-text);
    border-color: rgba(239, 68, 68, 0.25);
}

.feedback-pill-btn.wrong:hover {
    background: var(--danger);
    color: white;
}

.feedback-thanks {
    display: none;
    font-size: 0.85rem;
    color: var(--success);
    font-weight: 600;
}

.feedback-thanks.visible { display: inline-block; }

/* ==========================================================================
   VIEW 3: HISTORY STYLES
   ========================================================================== */

.history-manager-card {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.history-top-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.history-top-row h2 {
    font-size: 1.5rem;
    font-weight: 800;
}

.history-subtext {
    font-size: 0.88rem;
    color: var(--text-secondary);
}

.clear-history-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    border-radius: var(--radius-full);
    background: rgba(239, 68, 68, 0.12);
    color: var(--danger);
    border: 1px solid rgba(239, 68, 68, 0.2);
    font-weight: 700;
    font-size: 0.85rem;
    cursor: pointer;
    transition: var(--transition);
}

.clear-history-btn:hover {
    background: var(--danger);
    color: white;
}

.history-filter-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
}

.history-search-input {
    display: flex;
    align-items: center;
    gap: 10px;
    background: rgba(255, 255, 255, 0.65);
    border: 1px solid var(--card-border);
    padding: 8px 16px;
    border-radius: var(--radius-full);
    flex: 1;
    max-width: 400px;
}

[data-theme="dark"] .history-search-input {
    background: rgba(30, 41, 59, 0.6);
}

.history-search-input input {
    border: none;
    background: transparent;
    outline: none;
    font-size: 0.9rem;
    color: var(--text-primary);
    width: 100%;
}

.history-filter-pills {
    display: flex;
    gap: 8px;
}

.filter-pill {
    padding: 7px 16px;
    border-radius: var(--radius-full);
    background: rgba(255, 255, 255, 0.6);
    border: 1px solid var(--card-border-subtle);
    color: var(--text-secondary);
    font-weight: 600;
    font-size: 0.84rem;
    cursor: pointer;
    transition: var(--transition);
}

[data-theme="dark"] .filter-pill {
    background: rgba(30, 41, 59, 0.5);
}

.filter-pill.active {
    background: var(--brand-primary);
    color: white;
    border-color: var(--brand-primary);
    box-shadow: 0 2px 8px rgba(59, 130, 246, 0.3);
}

.history-list-container {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.history-empty-notice {
    padding: 40px;
    text-align: center;
    color: var(--text-muted);
    font-size: 0.95rem;
}

.history-item-row {
    display: grid;
    grid-template-columns: 32px 1fr auto auto auto 92px;
    align-items: center;
    gap: 16px;
    padding: 12px 18px;
    border-radius: var(--radius-md);
    background: rgba(255, 255, 255, 0.55);
    backdrop-filter: blur(14px) saturate(180%);
    -webkit-backdrop-filter: blur(14px) saturate(180%);
    border: 1px solid rgba(255, 255, 255, 0.7);
    box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.9), 0 2px 8px rgba(0, 0, 0, 0.02);
    transition: var(--transition-spring);
    animation: fadeInRow 0.35s cubic-bezier(0.16, 1, 0.3, 1) both;
}

[data-theme="dark"] .history-item-row {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.1);
    box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.12), 0 2px 8px rgba(0, 0, 0, 0.3);
}

.history-item-row:hover {
    background: rgba(255, 255, 255, 0.95);
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.05);
}

[data-theme="dark"] .history-item-row:hover {
    background: rgba(30, 41, 59, 0.85);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.25);
}

.history-status-icon {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.95rem;
}

.history-status-icon.safe { background: var(--success-bg); color: var(--success); }
.history-status-icon.phishing, .history-status-icon.dangerous { background: var(--danger-bg); color: var(--danger); }
.history-status-icon.suspicious { background: var(--warning-bg); color: var(--warning); }

.history-url-group {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.history-domain-name {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.history-sub-info {
    font-size: 0.78rem;
    color: var(--text-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.history-risk-badge {
    font-size: 0.78rem;
    font-weight: 700;
    padding: 3px 10px;
    border-radius: var(--radius-full);
}

.history-risk-badge.safe {
    background: var(--success-bg);
    color: var(--success-text);
}

.history-risk-badge.phishing, .history-risk-badge.dangerous {
    background: var(--danger-bg);
    color: var(--danger-text);
}

.history-risk-badge.suspicious {
    background: var(--warning-bg);
    color: var(--warning-text);
}

.history-rescan-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 6px 12px;
    border-radius: var(--radius-full);
    background: rgba(59, 130, 246, 0.12);
    color: var(--brand-primary);
    border: 1px solid rgba(59, 130, 246, 0.25);
    font-size: 0.78rem;
    font-weight: 700;
    cursor: pointer;
    transition: var(--transition);
}

.history-rescan-btn:hover {
    background: var(--brand-primary);
    color: white;
}

/* ==========================================================================
   VIEW 4: REPORTS STYLES
   ========================================================================== */

.reports-overview-section {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.reports-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
}

.benchmark-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-top: 10px;
}

.benchmark-row {
    display: grid;
    grid-template-columns: 140px 1fr 90px;
    align-items: center;
    gap: 14px;
}

.bench-label {
    font-size: 0.88rem;
    font-weight: 600;
    color: var(--text-secondary);
}

.bench-bar-track {
    width: 100%;
    height: 8px;
    border-radius: var(--radius-full);
    background: #E2E8F0;
    overflow: hidden;
}

[data-theme="dark"] .bench-bar-track {
    background: #334155;
}

.bench-bar-fill {
    height: 100%;
    border-radius: var(--radius-full);
    background: var(--brand-gradient);
}

.bench-val {
    font-size: 0.88rem;
    font-weight: 800;
    color: var(--text-primary);
    text-align: right;
}

/* ==========================================================================
   VIEW 5: SETTINGS STYLES
   ========================================================================== */

.settings-container-card {
    display: flex;
    flex-direction: column;
    gap: 28px;
}

.settings-container-card h2 {
    font-size: 1.5rem;
    font-weight: 800;
}

.settings-subtext {
    font-size: 0.88rem;
    color: var(--text-secondary);
}

.settings-group {
    display: flex;
    flex-direction: column;
    gap: 16px;
    border-top: 1px solid var(--card-border-subtle);
    padding-top: 20px;
}

.settings-group:first-of-type {
    border-top: none;
    padding-top: 0;
}

.settings-group-title {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--text-primary);
}

.settings-control-row, .settings-toggle-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding: 12px 0;
}

.setting-label {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--text-primary);
    display: block;
}

.setting-desc {
    font-size: 0.82rem;
    color: var(--text-secondary);
    margin-top: 2px;
}

.threshold-slider-wrap {
    display: flex;
    align-items: center;
    gap: 14px;
}

.threshold-slider-wrap input[type="range"] {
    width: 180px;
    accent-color: var(--brand-primary);
    cursor: pointer;
}

.threshold-display {
    font-size: 0.95rem;
    font-weight: 800;
    padding: 4px 12px;
    border-radius: var(--radius-full);
    background: rgba(59, 130, 246, 0.15);
    color: var(--brand-primary);
}

/* Switch Toggle Component */
.switch {
    position: relative;
    display: inline-block;
    width: 48px;
    height: 26px;
    flex-shrink: 0;
}

.switch input { opacity: 0; width: 0; height: 0; }

.slider {
    position: absolute;
    cursor: pointer;
    top: 0; left: 0; right: 0; bottom: 0;
    background-color: rgba(203, 213, 225, 0.6);
    backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.4);
    box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.1);
    transition: var(--transition-smooth);
}

[data-theme="dark"] .slider {
    background-color: rgba(71, 85, 105, 0.5);
    border-color: rgba(255, 255, 255, 0.1);
    box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.3);
}

.slider:before {
    position: absolute;
    content: "";
    height: 20px;
    width: 20px;
    left: 2px;
    bottom: 2px;
    background: linear-gradient(180deg, #FFFFFF 0%, #F8FAFC 100%);
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.15), 0 1px 2px rgba(0, 0, 0, 0.1), inset 0 1px 0 rgba(255, 255, 255, 1);
    transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
    border-radius: 50%;
}

input:checked + .slider {
    background-color: #34C759;
    border-color: rgba(52, 199, 89, 0.4);
}

input:checked + .slider:before {
    transform: translateX(22px);
}

.slider.round { border-radius: 34px; }
.slider.round:before { border-radius: 50%; }

.theme-switch-btn, .reset-data-btn {
    padding: 8px 18px;
    border-radius: var(--radius-full);
    font-weight: 700;
    font-size: 0.85rem;
    cursor: pointer;
    border: 1px solid var(--card-border);
    transition: var(--transition);
}

.theme-switch-btn {
    background: rgba(255, 255, 255, 0.7);
    color: var(--text-primary);
}

[data-theme="dark"] .theme-switch-btn {
    background: rgba(30, 41, 59, 0.7);
}

.theme-switch-btn:hover {
    background: var(--brand-primary);
    color: white;
}

.reset-data-btn {
    background: rgba(239, 68, 68, 0.12);
    color: var(--danger);
    border-color: rgba(239, 68, 68, 0.25);
}

.reset-data-btn:hover {
    background: var(--danger);
    color: white;
}

/* ==========================================================================
   KPI GRID & RECENT SCANS SHARED STYLES
   ========================================================================== */

.kpi-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}

.kpi-card {
    background: var(--card-bg);
    backdrop-filter: blur(24px);
    border: 1px solid var(--card-border);
    border-radius: var(--radius-lg);
    padding: 22px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-shadow: var(--card-shadow);
    transition: var(--transition);
}

.kpi-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--card-shadow-hover);
}

.kpi-info { display: flex; flex-direction: column; }

.kpi-num {
    font-size: 1.85rem;
    font-weight: 800;
    color: var(--text-primary);
    line-height: 1.1;
    margin-bottom: 4px;
}

.kpi-num.text-danger { color: var(--danger); }
.kpi-title { font-size: 0.85rem; font-weight: 600; color: var(--text-muted); }

.kpi-icon-bubble {
    width: 46px;
    height: 46px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.blue-bubble { background: rgba(59, 130, 246, 0.15); color: #3B82F6; }
.red-bubble { background: rgba(239, 68, 68, 0.15); color: #EF4444; }
.orange-bubble { background: rgba(245, 158, 11, 0.15); color: #F59E0B; }
.purple-bubble { background: rgba(139, 92, 246, 0.15); color: #8B5CF6; }

.glass-widget {
    background: var(--card-bg);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border: 1px solid var(--card-border);
    border-radius: var(--radius-xl);
    padding: 26px 30px;
    box-shadow: var(--card-shadow);
    transition: var(--transition-smooth);
    position: relative;
    overflow: hidden;
}

.glass-widget::before {
    content: "";
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 1px;
    background: linear-gradient(90deg, rgba(255, 255, 255, 0) 0%, rgba(255, 255, 255, 0.8) 50%, rgba(255, 255, 255, 0) 100%);
    pointer-events: none;
}

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

.widget-header h3 {
    font-size: 1.08rem;
    font-weight: 700;
    color: var(--text-primary);
}

.scan-item-row {
    display: grid;
    grid-template-columns: 28px 1fr auto auto 24px;
    align-items: center;
    gap: 14px;
    padding: 10px 14px;
    border-radius: var(--radius-md);
    background: rgba(255, 255, 255, 0.55);
    border: 1px solid var(--card-border-subtle);
    transition: var(--transition);
    cursor: pointer;
}

[data-theme="dark"] .scan-item-row {
    background: rgba(30, 41, 59, 0.45);
}

.scan-item-row:hover {
    background: rgba(255, 255, 255, 0.95);
    transform: translateX(3px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.04);
}

[data-theme="dark"] .scan-item-row:hover {
    background: rgba(30, 41, 59, 0.8);
}

.scan-status-icon {
    width: 26px;
    height: 26px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.85rem;
}

.scan-status-icon.safe { background: var(--success-bg); color: var(--success); }
.scan-status-icon.phishing, .scan-status-icon.dangerous { background: var(--danger-bg); color: var(--danger); }

.scan-url-text {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.scan-pill {
    padding: 3px 10px;
    border-radius: var(--radius-full);
    font-size: 0.75rem;
    font-weight: 700;
}

.scan-pill.safe { background: var(--success-bg); color: var(--success-text); }
.scan-pill.phishing, .scan-pill.dangerous { background: var(--danger-bg); color: var(--danger-text); }

.scan-time { font-size: 0.8rem; color: var(--text-muted); }
.scan-dots-btn { color: var(--text-muted); font-weight: 800; cursor: pointer; }

/* Donut Chart */
.threat-donut-content {
    display: grid;
    grid-template-columns: 140px 1fr;
    gap: 28px;
    align-items: center;
}

.donut-chart-container {
    position: relative;
    width: 130px;
    height: 130px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.donut-chart-svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.donut-bg { fill: none; stroke: #E2E8F0; stroke-width: 12; }
[data-theme="dark"] .donut-bg { stroke: #334155; }

.donut-segment {
    fill: none;
    stroke-width: 12;
    stroke-linecap: round;
    transition: stroke-dasharray 1s ease;
}

.segment-phish { stroke: #3B82F6; stroke-dasharray: 20 300; }

.donut-center-text {
    position: absolute;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.donut-big-num { font-size: 1.65rem; font-weight: 800; color: var(--text-primary); line-height: 1; }
.donut-sub-text { font-size: 0.75rem; color: var(--text-muted); font-weight: 600; }

.donut-legend { display: flex; flex-direction: column; gap: 8px; }

.legend-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 0.86rem;
}

.legend-dot { width: 9px; height: 9px; border-radius: 50%; margin-right: 8px; }
.dot-phishing { background: #EF4444; }
.dot-malware { background: #F97316; }
.dot-spam { background: #8B5CF6; }
.dot-scam { background: #3B82F6; }
.dot-suspicious { background: #94A3B8; }

.legend-name { flex: 1; color: var(--text-secondary); }
.legend-val { font-weight: 700; color: var(--text-primary); }

/* Right Widgets */
.widget-header-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 6px;
}

.status-title-group { display: flex; align-items: center; gap: 8px; }
.status-indicator-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--success); box-shadow: 0 0 10px var(--success); }

.badge-protected-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 12px;
    border-radius: var(--radius-full);
    background: var(--success-bg);
    color: var(--success-text);
    font-size: 0.78rem;
    font-weight: 700;
}

.pill-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--success); }
.status-subtext { font-size: 0.82rem; color: var(--text-muted); margin-bottom: 18px; }

.security-gauge-wrap {
    position: relative;
    width: 140px;
    height: 140px;
    margin: 0 auto 20px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.security-gauge-svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.gauge-track { fill: none; stroke: #E2E8F0; stroke-width: 11; }
[data-theme="dark"] .gauge-track { stroke: #334155; }

.gauge-fill {
    fill: none;
    stroke: url(#gauge-gradient);
    stroke-width: 11;
    stroke-linecap: round;
    stroke-dasharray: 339;
    stroke-dashoffset: 0;
    transition: stroke-dashoffset 1.4s cubic-bezier(0.16, 1, 0.3, 1), stroke 0.6s ease;
    will-change: stroke-dashoffset;
}

.gauge-center-content { position: absolute; display: flex; flex-direction: column; align-items: center; }
.gauge-big-pct { font-size: 1.85rem; font-weight: 800; color: var(--text-primary); line-height: 1; }
.gauge-tag { font-size: 0.78rem; font-weight: 700; color: var(--success); }

.security-stat-row {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    text-align: center;
    padding-top: 14px;
    border-top: 1px solid var(--card-border-subtle);
}

.sec-stat-val { font-size: 1.15rem; font-weight: 800; color: var(--text-primary); display: block; }
.sec-stat-val.text-success { color: var(--success); }
.sec-stat-lbl { font-size: 0.74rem; color: var(--text-muted); font-weight: 600; }

.tips-title-group { display: flex; align-items: center; gap: 8px; }
.tips-lightbulb { font-size: 1.1rem; }
.tips-nav-controls { display: flex; align-items: center; gap: 6px; }
.tips-counter { font-size: 0.78rem; font-weight: 700; color: var(--text-muted); margin-right: 4px; }

.tips-arrow {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.7);
    border: 1px solid var(--card-border-subtle);
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 800;
    transition: var(--transition);
}

[data-theme="dark"] .tips-arrow { background: rgba(30, 41, 59, 0.6); }
.tips-arrow:hover { background: var(--brand-primary); color: white; }

.tip-card-inner {
    background: rgba(255, 255, 255, 0.6);
    border: 1px solid var(--card-border-subtle);
    border-radius: var(--radius-md);
    padding: 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    margin: 14px 0 16px;
    transition: opacity 0.25s cubic-bezier(0.16, 1, 0.3, 1), transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
    will-change: opacity, transform;
}

[data-theme="dark"] .tip-card-inner { background: rgba(15, 23, 42, 0.55); }
.tip-content-left { flex: 1; }
.tip-title { font-size: 0.92rem; font-weight: 700; color: var(--text-primary); margin-bottom: 4px; }
.tip-body { font-size: 0.82rem; color: var(--text-secondary); line-height: 1.45; }

.tip-icon-bubble {
    width: 36px;
    height: 36px;
    border-radius: var(--radius-md);
    background: rgba(59, 130, 246, 0.12);
    color: var(--brand-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.tips-dots-row { display: flex; justify-content: center; gap: 6px; }

.tip-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #CBD5E1;
    cursor: pointer;
    transition: width 0.35s cubic-bezier(0.34, 1.56, 0.64, 1), background-color 0.25s ease, border-radius 0.35s ease;
}

[data-theme="dark"] .tip-dot { background: #475569; }
.tip-dot.active { width: 22px; border-radius: var(--radius-full); background: var(--brand-primary); }

/* Bottom Promo Card */
.promo-upgrade-card {
    background: linear-gradient(135deg, rgba(238, 242, 255, 0.85) 0%, rgba(224, 231, 255, 0.65) 100%);
    backdrop-filter: blur(24px);
    border: 1px solid var(--card-border);
    border-radius: var(--radius-lg);
    padding: 20px 28px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-shadow: var(--card-shadow);
}

[data-theme="dark"] .promo-upgrade-card {
    background: linear-gradient(135deg, rgba(30, 41, 59, 0.85) 0%, rgba(15, 23, 42, 0.7) 100%);
}

.promo-left { display: flex; align-items: center; gap: 16px; }

.promo-icon-circle {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: var(--brand-gradient);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 14px rgba(99, 102, 241, 0.35);
}

.promo-text-wrap h4 { font-size: 1rem; font-weight: 700; color: var(--text-primary); margin-bottom: 2px; }
.promo-text-wrap p { font-size: 0.84rem; color: var(--text-secondary); }

.promo-cta-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 11px 22px;
    border-radius: var(--radius-full);
    background: var(--brand-gradient);
    color: white;
    border: none;
    font-weight: 700;
    font-size: 0.88rem;
    cursor: pointer;
    box-shadow: 0 4px 16px rgba(99, 102, 241, 0.35);
    transition: var(--transition);
}

.promo-cta-btn:hover {
    background: var(--brand-gradient-hover);
    transform: translateY(-2px);
    box-shadow: 0 6px 22px rgba(99, 102, 241, 0.45);
}

.handwritten-footer {
    display: flex;
    justify-content: flex-end;
    font-family: 'Caveat', cursive;
    font-size: 1.45rem;
    font-weight: 700;
    color: var(--text-muted);
    opacity: 0.8;
    transform: rotate(-1.5deg);
    padding-right: 14px;
}

/* Animations */
@keyframes viewFadeSlideIn {
    0% {
        opacity: 0;
        transform: translateY(16px) scale(0.995);
    }
    100% {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@keyframes fadeInRow {
    0% {
        opacity: 0;
        transform: translateY(8px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes ambient-drift-1 {
    0% { transform: translate(0, 0) scale(1); }
    50% { transform: translate(35px, 25px) scale(1.08); }
    100% { transform: translate(-25px, 40px) scale(0.95); }
}

@keyframes ambient-drift-2 {
    0% { transform: translate(0, 0) scale(1); }
    50% { transform: translate(-30px, -25px) scale(1.06); }
    100% { transform: translate(30px, -20px) scale(0.98); }
}

@keyframes ambient-drift-3 {
    0% { transform: translate(0, 0) scale(1); }
    50% { transform: translate(25px, -30px) scale(1.1); }
    100% { transform: translate(-30px, 20px) scale(0.94); }
}

@keyframes float-gentle {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-7px); }
}

@keyframes float-core {
    0% { transform: translateY(-6px) rotate(0deg) scale(1); }
    50% { transform: translateY(6px) rotate(1deg) scale(1.02); }
    100% { transform: translateY(-6px) rotate(0deg) scale(1); }
}

@keyframes orbit-rotate-1 {
    0% { transform: rotate(-25deg) rotate(0deg); }
    100% { transform: rotate(-25deg) rotate(360deg); }
}

@keyframes orbit-rotate-2 {
    0% { transform: rotate(30deg) rotate(360deg); }
    100% { transform: rotate(30deg) rotate(0deg); }
}

@keyframes pulse-glow {
    0% {
        transform: scale(0.96);
        box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7);
    }
    70% {
        transform: scale(1);
        box-shadow: 0 0 0 7px rgba(16, 185, 129, 0);
    }
    100% {
        transform: scale(0.96);
        box-shadow: 0 0 0 0 rgba(16, 185, 129, 0);
    }
}

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

@keyframes slide-fade-in {
    0% {
        opacity: 0;
        transform: translateY(-16px) scale(0.98);
    }
    70% {
        opacity: 1;
        transform: translateY(2px) scale(1.005);
    }
    100% {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* ==========================================================================
   RESPONSIVE DESIGN SYSTEM (Mobile First + Desktop-Mode on Mobile Support)
   ========================================================================== */

/* Laptops & Wide Tablets */
@media (max-width: 1200px) {
    .hero-glass-card { grid-template-columns: 1fr; }
    .hero-right { display: none; }
    .capabilities-grid { grid-template-columns: repeat(2, 1fr); }
    .scan-widgets-grid { grid-template-columns: 1fr; }
    .reports-grid { grid-template-columns: 1fr; }
    .search-box { width: clamp(200px, 25vw, 320px); }
    .search-box:focus-within { width: clamp(220px, 30vw, 360px); }
}

/* Tablets & "Desktop Mode" on Mobile Phones (simulating ~980px) */
@media (max-width: 992px) {
    .app-header {
        padding: 0 20px;
        height: 64px;
        gap: 12px;
    }
    .sidebar {
        width: 76px;
        padding: 16px 8px;
    }
    .brand-name, 
    .sidebar-bottom, 
    .sidebar-info-card, 
    .nav-item span {
        display: none;
    }
    .brand-logo {
        padding: 6px 0;
        justify-content: center;
        margin-bottom: 20px;
    }
    .nav-item {
        justify-content: center;
        padding: 12px;
        gap: 0;
    }
    .search-box {
        width: clamp(160px, 22vw, 240px);
    }
    .search-kbd {
        display: none;
    }
    .upgrade-btn-header span {
        font-size: 0.8rem;
    }
    .kpi-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .content-scrollable {
        padding: 24px 20px 60px;
    }
    .results-body {
        grid-template-columns: 200px 1fr;
        gap: 20px;
    }
}

/* Native Mobile Devices & Touch Phones */
@media (max-width: 768px) {
    /* 1. HIDE DESKTOP SIDEBAR COMPLETELY - ZERO WASTED SPACE */
    .sidebar {
        display: none !important;
    }

    /* 2. APP LAYOUT IS PURE VERTICAL */
    .app-layout {
        display: block;
        min-height: 100vh;
    }

    .main-wrapper {
        min-height: 100vh;
        width: 100%;
    }

    /* 3. ULTRA-CLEAN MOBILE APP HEADER */
    .app-header {
        height: 58px;
        padding: 0 14px;
        display: flex;
        align-items: center;
        justify-content: space-between;
        position: sticky;
        top: 0;
        z-index: 50;
        background: rgba(11, 15, 25, 0.92);
        backdrop-filter: blur(24px) saturate(200%);
        -webkit-backdrop-filter: blur(24px) saturate(200%);
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    }

    [data-theme="light"] .app-header {
        background: rgba(255, 255, 255, 0.94);
        border-bottom: 1px solid rgba(0, 0, 0, 0.08);
    }

    /* 4. SHOW THREE-LINES HAMBURGER + DISTINCT LOGO */
    .mobile-header-left {
        display: flex !important;
        align-items: center;
        gap: 12px;
    }

    .mobile-menu-btn {
        display: flex !important;
        align-items: center;
        justify-content: center;
        width: 38px;
        height: 38px;
        border-radius: 10px;
        background: rgba(255, 255, 255, 0.08);
        border: 1px solid rgba(255, 255, 255, 0.12);
        color: var(--text-primary);
        cursor: pointer;
        transition: var(--transition-fast);
        flex-shrink: 0;
    }

    [data-theme="light"] .mobile-menu-btn {
        background: rgba(0, 0, 0, 0.05);
        border-color: rgba(0, 0, 0, 0.1);
    }

    .mobile-menu-btn:active {
        transform: scale(0.92);
    }

    .mobile-brand-logo {
        display: flex !important;
        align-items: center;
        gap: 8px;
        text-decoration: none;
    }

    .mobile-brand-logo .logo-shield {
        width: 30px;
        height: 30px;
    }

    .mobile-brand-text {
        font-size: 1.15rem;
        font-weight: 800;
        letter-spacing: -0.02em;
        color: var(--text-primary);
    }

    .mobile-brand-badge {
        background: var(--brand-gradient);
        color: #FFFFFF;
        font-size: 0.65rem;
        font-weight: 800;
        padding: 2px 6px;
        border-radius: 5px;
        letter-spacing: 0.04em;
    }

    /* 5. HIDE DESKTOP SEARCH BOX ON MOBILE (SAVES SPACE) */
    .search-box {
        display: none !important;
    }

    /* 6. HEADER RIGHT ACTIONS */
    .header-actions {
        display: flex;
        align-items: center;
        gap: 8px;
        margin-left: auto;
    }

    .upgrade-btn-header {
        display: none !important;
    }

    .theme-toggle-btn {
        width: 36px;
        height: 36px;
    }

    .icon-action-btn {
        display: none !important;
    }

    .mobile-auth-btn {
        display: inline-flex !important;
        width: 36px;
        height: 36px;
        border-radius: 50%;
        background: var(--brand-gradient);
        color: #FFFFFF;
        font-weight: 800;
        font-size: 0.85rem;
        align-items: center;
        justify-content: center;
        border: 1.5px solid rgba(255, 255, 255, 0.35);
        cursor: pointer;
        box-shadow: 0 2px 8px rgba(59, 130, 246, 0.4);
        flex-shrink: 0;
    }

    /* 7. CONTENT AREA - FULL SCREEN, ZERO WASTED SPACE */
    .content-scrollable {
        padding: 16px 14px 60px 14px;
        gap: 20px;
        overflow-x: hidden;
    }

    /* Hero Banner */
    .hero-glass-card {
        padding: 24px 18px;
        border-radius: 20px;
    }

    .hero-headline {
        font-size: 1.95rem;
        line-height: 1.15;
    }

    .hero-subtext {
        font-size: 0.92rem;
        margin-bottom: 18px;
    }

    .hero-badges-row {
        flex-wrap: wrap;
        gap: 8px;
    }

    /* Scanner Section */
    .scanner-glass-card {
        padding: 20px 16px;
        border-radius: 20px;
    }

    .scanner-header-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
        margin-bottom: 16px;
    }

    .scanner-card-title {
        font-size: 1.35rem;
    }

    .scanner-card-subtitle {
        font-size: 0.85rem;
    }

    .scanner-status-chip {
        font-size: 0.76rem;
        padding: 5px 12px;
    }

    /* URL Input Bar */
    .scanner-input-wrapper {
        flex-direction: column;
        align-items: stretch;
        border-radius: 18px;
        padding: 12px 14px;
        gap: 12px;
    }

    .scanner-input-inner {
        display: flex;
        align-items: center;
        width: 100%;
        min-width: 0;
    }

    .input-icon-slot {
        margin-right: 10px;
        flex-shrink: 0;
    }

    .scanner-input-field {
        font-size: 0.95rem;
        width: 100%;
        min-width: 0;
    }

    .analyze-gradient-btn {
        width: 100%;
        margin-top: 0;
        padding: 13px 20px;
        border-radius: 14px;
        font-size: 0.95rem;
    }

    /* Helper & Counter */
    .scanner-subtext-row {
        flex-direction: column;
        gap: 4px;
        align-items: flex-start;
        padding: 0 4px;
    }

    .helper-text {
        font-size: 0.78rem;
        line-height: 1.4;
    }

    .char-count {
        align-self: flex-end;
        font-size: 0.74rem;
    }

    /* Results Card */
    .results-card {
        padding: 18px 14px;
        border-radius: 18px;
        margin-top: 18px;
    }

    .results-top-bar {
        gap: 8px;
        padding-bottom: 12px;
        margin-bottom: 16px;
    }

    .results-status-badge {
        padding: 5px 12px;
        font-size: 0.78rem;
        gap: 6px;
        white-space: nowrap !important;
        flex-shrink: 0;
    }

    .results-timestamp {
        font-size: 0.76rem;
        white-space: nowrap;
        flex-shrink: 0;
    }

    .results-body {
        grid-template-columns: 1fr;
        gap: 18px;
    }

    .results-meter-box {
        padding: 16px 12px;
        border-radius: 14px;
    }

    .meter-value {
        font-size: 2.1rem;
        margin-bottom: 8px;
    }

    .details-summary {
        font-size: 0.92rem;
        margin-bottom: 12px;
    }

    .details-indicators li {
        font-size: 0.85rem;
    }

    .results-feedback-row {
        flex-direction: column;
        align-items: stretch;
        gap: 10px;
    }

    .feedback-actions {
        display: flex;
        width: 100%;
        gap: 8px;
    }

    .feedback-pill-btn {
        flex: 1;
        justify-content: center;
        text-align: center;
        padding: 8px 12px;
    }

    /* Grids & Cards */
    .kpi-grid {
        grid-template-columns: 1fr 1fr;
        gap: 12px;
    }

    .kpi-card {
        padding: 16px 14px;
    }

    .kpi-value {
        font-size: 1.45rem;
    }

    .capabilities-grid {
        grid-template-columns: 1fr;
        gap: 14px;
    }

    .scan-widgets-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .glass-widget {
        padding: 20px 16px;
    }

    .history-filter-bar {
        flex-direction: column;
        align-items: stretch;
        gap: 10px;
    }

    .history-item-row {
        grid-template-columns: 28px 1fr auto;
        gap: 8px;
        padding: 12px 10px;
    }

    .history-item-row .history-sub-info, 
    .history-item-row .history-risk-badge, 
    .history-item-row .scan-time {
        display: none;
    }
}

/* Very Small Mobile Screens (360px and below) */
@media (max-width: 480px) {
    .kpi-grid {
        grid-template-columns: 1fr;
    }
    .hero-headline {
        font-size: 1.75rem;
    }
    .scanner-card-title {
        font-size: 1.25rem;
    }
}

/* ==========================================================================
   AUTH / LOGIN PAGE (Matching Home UI Glassmorphic Design System)
   ========================================================================== */

.auth-body {
    min-height: 100vh;
    background-color: var(--bg-page);
    color: var(--text-primary);
    font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
    position: relative;
    overflow-x: hidden;
    margin: 0;
    padding: 0;
}

.auth-viewport {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    position: relative;
    z-index: 2;
}

.auth-top-header {
    max-width: 1280px;
    margin: 0 auto;
    width: 100%;
    padding: 24px 32px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.brand-ai-badge {
    background: var(--brand-gradient);
    color: #FFFFFF;
    font-size: 0.7rem;
    font-weight: 800;
    padding: 2px 7px;
    border-radius: 6px;
    letter-spacing: 0.05em;
    margin-left: 4px;
    box-shadow: 0 2px 8px rgba(99, 102, 241, 0.4);
}

.auth-header-actions {
    display: flex;
    align-items: center;
    gap: 16px;
}

.auth-nav-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 18px;
    border-radius: var(--radius-full);
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    backdrop-filter: var(--glass-blur);
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.86rem;
    font-weight: 600;
    transition: var(--transition);
}

.auth-nav-link:hover {
    color: var(--text-primary);
    border-color: var(--brand-primary);
    transform: translateX(-2px);
    box-shadow: 0 4px 16px rgba(59, 130, 246, 0.2);
}

.auth-main-container {
    max-width: 1280px;
    margin: 0 auto;
    width: 100%;
    flex: 1;
    display: grid;
    grid-template-columns: 1.15fr 1fr;
    gap: 48px;
    align-items: center;
    padding: 20px 32px 60px 32px;
}

/* Left Hero Showcase */
.auth-hero-showcase {
    display: flex;
    flex-direction: column;
    padding-right: 20px;
}

.auth-hero-title {
    font-size: 2.85rem;
    font-weight: 800;
    line-height: 1.15;
    letter-spacing: -0.025em;
    color: var(--text-primary);
    margin: 18px 0 16px 0;
}

.auth-hero-desc {
    font-size: 1.05rem;
    line-height: 1.6;
    color: var(--text-secondary);
    max-width: 520px;
    margin-bottom: 28px;
}

.auth-features-list {
    display: flex;
    flex-direction: column;
    gap: 14px;
    margin-bottom: 32px;
}

.auth-feature-item {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    padding: 16px 18px;
    border-radius: var(--radius-md);
    background: var(--card-bg);
    border: 1px solid var(--card-border-subtle);
    backdrop-filter: var(--glass-blur);
    box-shadow: var(--card-shadow);
    transition: var(--transition);
}

.auth-feature-item:hover {
    transform: translateY(-2px);
    border-color: rgba(59, 130, 246, 0.4);
    box-shadow: var(--card-shadow-hover);
}

.auth-feature-icon {
    width: 42px;
    height: 42px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    flex-shrink: 0;
}

.auth-feature-icon.blue { background: rgba(59, 130, 246, 0.15); border: 1px solid rgba(59, 130, 246, 0.3); }
.auth-feature-icon.purple { background: rgba(139, 92, 246, 0.15); border: 1px solid rgba(139, 92, 246, 0.3); }
.auth-feature-icon.green { background: rgba(16, 185, 129, 0.15); border: 1px solid rgba(16, 185, 129, 0.3); }

.auth-feature-text h4 {
    font-size: 0.96rem;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0 0 3px 0;
}

.auth-feature-text p {
    font-size: 0.84rem;
    color: var(--text-muted);
    line-height: 1.45;
    margin: 0;
}

.auth-trust-footer {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.trust-badge {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-secondary);
    padding: 6px 14px;
    border-radius: var(--radius-full);
    background: var(--card-bg);
    border: 1px solid var(--card-border-subtle);
    backdrop-filter: var(--glass-blur);
}

/* Right Glassmorphic Card */
.auth-card-wrapper {
    display: flex;
    justify-content: center;
    width: 100%;
}

.auth-glass-card {
    width: 100%;
    max-width: 480px;
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: var(--radius-xl);
    backdrop-filter: var(--glass-blur-heavy);
    box-shadow: var(--card-shadow-hover);
    padding: 38px 36px 32px 36px;
    position: relative;
    overflow: hidden;
}

.auth-glass-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 15%;
    right: 15%;
    height: 2px;
    background: var(--brand-gradient);
    border-radius: 9999px;
    opacity: 0.85;
}

.auth-card-header {
    text-align: center;
    margin-bottom: 24px;
}

.auth-icon-badge {
    width: 62px;
    height: 62px;
    border-radius: 20px;
    background: rgba(59, 130, 246, 0.12);
    border: 1px solid rgba(59, 130, 246, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 16px auto;
    box-shadow: 0 10px 24px -4px rgba(59, 130, 246, 0.35);
}

.auth-card-header h2 {
    font-size: 1.68rem;
    font-weight: 800;
    color: var(--text-primary);
    letter-spacing: -0.02em;
    margin: 0 0 6px 0;
}

.auth-card-header p {
    font-size: 0.88rem;
    color: var(--text-secondary);
    margin: 0;
}

/* Quick Demo Login Box */
.demo-login-box {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    background: rgba(59, 130, 246, 0.08);
    border: 1px dashed rgba(59, 130, 246, 0.35);
    border-radius: var(--radius-md);
    padding: 12px 14px;
    margin-bottom: 20px;
    transition: var(--transition);
}

.demo-login-box:hover {
    background: rgba(59, 130, 246, 0.12);
    border-color: rgba(59, 130, 246, 0.6);
}

.demo-box-content {
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.demo-pill-title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--text-primary);
}

.demo-badge {
    background: var(--brand-primary);
    color: #FFFFFF;
    font-size: 0.66rem;
    font-weight: 800;
    padding: 2px 6px;
    border-radius: 4px;
    letter-spacing: 0.04em;
}

.demo-creds-preview {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.demo-creds-preview code {
    background: rgba(255, 255, 255, 0.08);
    padding: 2px 5px;
    border-radius: 4px;
    color: #38BDF8;
    font-family: monospace;
    font-size: 0.74rem;
}

.quick-demo-btn {
    background: var(--brand-gradient);
    color: #FFFFFF;
    border: none;
    border-radius: var(--radius-sm);
    padding: 8px 14px;
    font-size: 0.82rem;
    font-weight: 700;
    cursor: pointer;
    white-space: nowrap;
    transition: var(--transition-spring);
    box-shadow: 0 4px 14px -2px rgba(59, 130, 246, 0.4);
}

.quick-demo-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 18px -2px rgba(59, 130, 246, 0.6);
    background: var(--brand-gradient-hover);
}

.auth-divider {
    display: flex;
    align-items: center;
    text-align: center;
    margin: 18px 0;
    color: var(--text-muted);
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.08em;
}

.auth-divider::before,
.auth-divider::after {
    content: '';
    flex: 1;
    border-bottom: 1px solid var(--card-border-subtle);
}

.auth-divider span {
    padding: 0 12px;
}

/* Alert Notification Banner */
.auth-alert {
    padding: 12px 16px;
    border-radius: var(--radius-sm);
    margin-bottom: 18px;
    font-size: 0.86rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 10px;
    animation: slide-fade-in 0.25s ease-out;
}

.auth-alert.error {
    background: var(--danger-bg);
    color: var(--danger-text);
    border: 1px solid rgba(239, 68, 68, 0.35);
}

.auth-alert.success {
    background: var(--success-bg);
    color: var(--success-text);
    border: 1px solid rgba(16, 185, 129, 0.35);
}

/* Form Fields */
.form-field-group {
    margin-bottom: 18px;
}

.form-label {
    display: block;
    font-size: 0.84rem;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 7px;
}

.form-label-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 7px;
}

.forgot-link {
    font-size: 0.8rem;
    color: var(--brand-primary);
    text-decoration: none;
    font-weight: 600;
    transition: var(--transition);
}

.forgot-link:hover {
    color: var(--brand-indigo);
    text-decoration: underline;
}

.input-glow-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    width: 100%;
    border-radius: var(--radius-md);
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--card-border);
    transition: var(--transition);
}

.input-glow-wrapper:focus-within {
    border-color: var(--brand-primary);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.25), 0 8px 24px -4px rgba(59, 130, 246, 0.2);
    background: rgba(255, 255, 255, 0.07);
}

.input-icon {
    position: absolute;
    left: 14px;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    pointer-events: none;
}

.cyber-input {
    width: 100%;
    height: 48px;
    padding: 0 46px 0 44px;
    background: transparent;
    border: none;
    outline: none;
    font-family: inherit;
    font-size: 0.94rem;
    color: var(--text-primary);
}

.cyber-input::placeholder {
    color: var(--text-muted);
    opacity: 0.65;
}

.password-toggle-btn {
    position: absolute;
    right: 12px;
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: 6px;
    display: flex;
    align-items: center;
    border-radius: 6px;
    transition: var(--transition);
}

.password-toggle-btn:hover {
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.08);
}

.form-aux-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin: 14px 0 24px 0;
}

.custom-checkbox {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-size: 0.84rem;
    color: var(--text-secondary);
    user-select: none;
}

.custom-checkbox input {
    display: none;
}

.checkbox-box {
    width: 18px;
    height: 18px;
    border-radius: 5px;
    border: 1.5px solid var(--card-border);
    background: rgba(255, 255, 255, 0.05);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.custom-checkbox input:checked + .checkbox-box {
    background: var(--brand-primary);
    border-color: var(--brand-primary);
}

.custom-checkbox input:checked + .checkbox-box::after {
    content: '✓';
    color: #FFFFFF;
    font-size: 11px;
    font-weight: 800;
}

.auth-submit-btn {
    width: 100%;
    height: 50px;
    border-radius: var(--radius-md);
    background: var(--brand-gradient);
    border: none;
    color: #FFFFFF;
    font-family: inherit;
    font-size: 0.95rem;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    box-shadow: 0 8px 24px -4px rgba(99, 102, 241, 0.5);
    transition: var(--transition-spring);
}

.auth-submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 30px -4px rgba(99, 102, 241, 0.7);
    background: var(--brand-gradient-hover);
}

.auth-submit-btn:disabled {
    opacity: 0.75;
    cursor: not-allowed;
    transform: none;
}

.auth-card-footer {
    text-align: center;
    margin-top: 22px;
    padding-top: 18px;
    border-top: 1px solid var(--card-border-subtle);
}

.auth-compliance-text {
    font-size: 0.78rem;
    color: var(--text-muted);
    margin: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

/* Auth Responsive Breakpoints */
@media (max-width: 1024px) {
    .auth-main-container {
        grid-template-columns: 1fr;
        gap: 36px;
        padding: 16px 24px 40px 24px;
    }
    .auth-hero-showcase {
        padding-right: 0;
        text-align: center;
        align-items: center;
    }
    .auth-hero-desc {
        max-width: 100%;
    }
    .auth-features-list {
        max-width: 500px;
        width: 100%;
        text-align: left;
    }
    .auth-trust-footer {
        justify-content: center;
    }
    .auth-hero-title {
        font-size: 2.3rem;
    }
}

@media (max-width: 540px) {
    .auth-top-header {
        padding: 16px 20px;
    }
    .auth-glass-card {
        padding: 28px 20px 24px 20px;
    }
    .auth-hero-title {
        font-size: 1.85rem;
    }
    .demo-login-box {
        flex-direction: column;
        align-items: stretch;
    }
    .quick-demo-btn {
        width: 100%;
        text-align: center;
    }
}

/* ==========================================================================
   DASHBOARD PAGE STYLES (Matching Home UI Design System)
   ========================================================================== */

.dashboard-page {
    min-height: calc(100vh - var(--header-height));
    padding: 32px 32px 64px 32px;
    display: flex;
    justify-content: center;
    position: relative;
    z-index: 2;
}

.dashboard-container {
    max-width: 1240px;
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.dashboard-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--card-border-subtle);
}

.dashboard-header h1 {
    font-size: 1.85rem;
    font-weight: 800;
    color: var(--text-primary);
    margin: 0;
    letter-spacing: -0.02em;
}

.logout-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 9px 20px;
    border-radius: var(--radius-full);
    background: var(--danger-bg);
    color: var(--danger-text);
    border: 1px solid rgba(239, 68, 68, 0.3);
    font-family: inherit;
    font-size: 0.88rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
}

.logout-btn:hover {
    background: rgba(239, 68, 68, 0.22);
    border-color: rgba(239, 68, 68, 0.5);
    transform: translateY(-1px);
    box-shadow: 0 4px 14px rgba(239, 68, 68, 0.25);
}

.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 20px;
}

.dashboard-card {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: var(--radius-lg);
    padding: 24px;
    backdrop-filter: var(--glass-blur);
    box-shadow: var(--card-shadow);
    transition: var(--transition);
}

.dashboard-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--card-shadow-hover);
    border-color: rgba(59, 130, 246, 0.3);
}

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

.dashboard-card-header h3 {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--text-secondary);
    margin: 0;
}

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

.dashboard-card-icon.blue { background: rgba(59, 130, 246, 0.14); color: #38BDF8; border: 1px solid rgba(59, 130, 246, 0.25); }
.dashboard-card-icon.green { background: rgba(16, 185, 129, 0.14); color: #34D399; border: 1px solid rgba(16, 185, 129, 0.25); }
.dashboard-card-icon.orange { background: rgba(245, 158, 11, 0.14); color: #FBBF24; border: 1px solid rgba(245, 158, 11, 0.25); }
.dashboard-card-icon.red { background: rgba(239, 68, 68, 0.14); color: #F87171; border: 1px solid rgba(239, 68, 68, 0.25); }

.dashboard-card-value {
    font-size: 2.3rem;
    font-weight: 800;
    color: var(--text-primary);
    line-height: 1.1;
    margin-bottom: 4px;
    letter-spacing: -0.02em;
}

.dashboard-card-label {
    font-size: 0.82rem;
    color: var(--text-muted);
}

.table-card, .account-card {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: var(--radius-lg);
    padding: 26px 28px;
    backdrop-filter: var(--glass-blur);
    box-shadow: var(--card-shadow);
}

.table-card h3, .account-card h3 {
    font-size: 1.15rem;
    font-weight: 800;
    color: var(--text-primary);
    margin: 0 0 16px 0;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
}

.data-table th {
    text-align: left;
    padding: 12px 14px;
    font-size: 0.78rem;
    font-weight: 700;
    color: var(--text-muted);
    border-bottom: 1px solid var(--card-border-subtle);
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.data-table td {
    padding: 14px;
    font-size: 0.88rem;
    color: var(--text-secondary);
    border-bottom: 1px solid var(--card-border-subtle);
}

.data-table tr:hover td {
    background: rgba(255, 255, 255, 0.02);
}

.account-info-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 13px 0;
    border-bottom: 1px solid var(--card-border-subtle);
    font-size: 0.92rem;
    color: var(--text-secondary);
}

.table-card {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

@media (max-width: 768px) {
    .dashboard-page {
        padding: 16px 14px 60px 14px;
    }
    .dashboard-top-bar {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }
    .dashboard-top-bar .logout-btn {
        width: 100%;
        text-align: center;
        justify-content: center;
    }
    .dashboard-grid {
        grid-template-columns: 1fr 1fr;
        gap: 12px;
    }
    .dashboard-card {
        padding: 16px 14px;
    }
    .dashboard-card-value {
        font-size: 1.8rem;
    }
    .table-card, .account-card {
        padding: 18px 16px;
    }
}

@media (max-width: 480px) {
    .dashboard-grid {
        grid-template-columns: 1fr;
    }
}



