:root {
    --primary: #0ab39c;
    /* Brand Green */
    --primary-dark: #089c88;
    --secondary: #405189;
    /* Deep Blue/Slate */
    --bg-light: #f7f9fc;
    --text-main: #1a1c21;
    --text-muted: #64748b;
    --white: #ffffff;
    --border: #e2e8f0;
    --gradient-hero: linear-gradient(135deg, #f0fdfa 0%, #fff 100%);
}

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

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--white);
    color: var(--text-main);
    line-height: 1.6;
    overflow-x: hidden;
}

/* Navbar */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    border-bottom: 1px solid rgba(255, 255, 255, 0.8);
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    z-index: 1000;
    padding: 16px 0;
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    font-weight: 800;
    font-size: 20px;
    color: var(--text-main);
    letter-spacing: -0.5px;
}

.logo-icon {
    width: 36px;
    height: 36px;
    background: var(--primary);
    color: white;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.nav-links {
    display: flex;
    gap: 32px;
    align-items: center;
}

.guest-nav,
.user-nav {
    display: flex;
    gap: 24px;
    align-items: center;
}

.nav-links a {
    text-decoration: none;
    color: var(--text-muted);
    font-weight: 500;
    font-size: 15px;
    transition: color 0.2s;
}

.nav-links a:hover {
    color: var(--primary);
}

.nav-btn-primary {
    background: var(--text-main);
    color: white;
    border: none;
    padding: 9px 20px;
    border-radius: 6px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.nav-btn-primary:hover {
    background: var(--primary);
    transform: translateY(-1px);
}

.user-profile {
    display: flex;
    align-items: center;
    cursor: pointer;
}

.user-name {
    font-size: 15px;
    font-weight: 600;
    color: var(--text-main);
    margin-right: 16px;
    letter-spacing: -0.01em;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    opacity: 0.9;
}

.avatar {
    width: 36px;
    height: 36px;
    background: var(--secondary);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: 600;
}

.mobile-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
}

/* Hero Section */
.hero {
    padding: 110px 24px 60px;
    /* Reduced from 140px/80px for better viewport fit */
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    gap: 60px;
    align-items: center;
}

.hero-content h1 {
    font-size: 56px;
    line-height: 1.1;
    font-weight: 800;
    margin-bottom: 24px;
    letter-spacing: -2px;
}

.text-gradient {
    color: var(--primary);
    /* Fallback */
    background: linear-gradient(135deg, var(--primary) 0%, #22d3ee 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero-sub {
    font-size: 18px;
    color: var(--text-muted);
    margin-bottom: 40px;
    max-width: 500px;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: #ecfdf5;
    color: var(--primary-dark);
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 24px;
}

/* Scrolling Phone Chaos Visual */
.chaos-phone-container {
    display: flex;
    align-items: center;
    margin: 0 8px;
}

.scrolling-phone {
    width: 18px;
    height: 28px;
    border: 2px solid var(--primary-dark);
    border-radius: 4px;
    background: #fff;
    overflow: hidden;
    position: relative;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.scrolling-content {
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding: 2px;
    /* Infinite scroll animation */
    animation: scroll-vertical 1s linear infinite;
}

.chat-line {
    height: 2px;
    background: #e2e8f0;
    border-radius: 1px;
    width: 100%;
}

.chat-line.short {
    width: 60%;
}

.chat-line.long {
    width: 90%;
}

.chat-line.green {
    background: #25D366;
    width: 80%;
}

/* Gmail Color hint */

.chaos-extras {
    display: flex;
    align-items: center;
    gap: -4px;
    /* Slight overlap */
    margin-left: 4px;
    margin-right: 28px;
    /* Increased to accommodate the badge overflow */
}

.official-icon-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    background: white;
    border-radius: 50%;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    z-index: 1;
}

.official-icon-wrapper:nth-child(2) {
    margin-left: -8px;
    /* Overlap */
    z-index: 2;
}

.official-icon {
    width: 26px;
    height: 26px;
}

.unread-badge {
    position: absolute;
    top: -10px;
    /* Moved up */
    right: -28px;
    /* Moved right to reveal icon */
    background: #ef4444;
    color: white;
    font-size: 9px;
    /* Slightly larger text */
    font-weight: 700;
    padding: 2px 6px;
    border-radius: 12px;
    border: 2px solid white;
    /* Thicker border for separation */
    min-width: 20px;
    text-align: center;
    z-index: 10;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.15);
}

@keyframes scroll-vertical {
    0% {
        transform: translateY(0);
    }

    100% {
        transform: translateY(-14px);
    }

    /* Scroll half height (loop) */
}

.hero-actions {
    display: flex;
    gap: 16px;
    margin-bottom: 8px;
    /* Reduced from 24px to pull text closer */
}

.hero-trust-text {
    font-size: 13px;
    color: #64748b;
    margin-top: 4px;
    /* Reduced from default */
    margin-bottom: 24px;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 6px;
}

.cta-primary {
    background: var(--primary);
    color: white;
    padding: 14px 32px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: transform 0.2s, box-shadow 0.2s;
    box-shadow: 0 10px 20px rgba(10, 179, 156, 0.2);
}

.cta-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 15px 30px rgba(10, 179, 156, 0.3);
}

.cta-secondary {
    padding: 14px 32px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    color: var(--text-main);
    background: #f1f5f9;
    transition: background 0.2s;
}

.cta-secondary:hover {
    background: #e2e8f0;
}

.trust-badges {
    display: flex;
    gap: 24px;
    font-size: 14px;
    color: var(--text-muted);
    font-weight: 500;
}

.trust-badges span {
    display: flex;
    align-items: center;
    gap: 6px;
}

.logo {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--gray-900);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* Mockup Animation */
.mockup-card {
    background: white;
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 24px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.08);
    position: relative;
    transform: rotate(-2deg);
    transition: transform 0.5s ease;
}

.mockup-card:hover {
    transform: rotate(0deg) scale(1.02);
}

.mockup-header {
    display: flex;
    gap: 8px;
    margin-bottom: 24px;
}

.dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
}

.red {
    background: #fee2e2;
}

.yellow {
    background: #fef3c7;
}

.green {
    background: #dcfce7;
}

.mockup-body {
    height: 200px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.skeleton-line {
    height: 12px;
    background: #f1f5f9;
    border-radius: 4px;
}

.w-75 {
    width: 75%;
}

.w-50 {
    width: 50%;
}

.upload-animation {
    margin-top: auto;
    background: #f8fafc;
    border: 2px dashed #e2e8f0;
    border-radius: 8px;
    height: 100px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: var(--primary);
}

.file-icon-anim {
    animation: bounce 2s infinite;
}

@keyframes bounce {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-5px);
    }
}

/* Features */
.features {
    padding: 80px 24px;
    max-width: 1200px;
    margin: 0 auto;
}

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

.section-header h2 {
    font-size: 32px;
    font-weight: 800;
    margin-bottom: 12px;
}

.section-header p {
    color: var(--text-muted);
    font-size: 18px;
}

.feature-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 32px;
}

.feature-card {
    background: white;
    padding: 32px;
    border-radius: 16px;
    border: 1px solid var(--border);
    transition: transform 0.3s;
}

.feature-card:hover {
    transform: translateY(-5px);
    border-color: var(--primary);
}

.icon-box {
    width: 50px;
    height: 50px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
    color: white;
}

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

.bg-green {
    background: var(--primary);
}

.bg-purple {
    background: #8b5cf6;
}

.feature-card h3 {
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 12px;
}

.feature-card p {
    color: var(--text-muted);
}

/* Authenticated View */
.dashboard-hero {
    padding: 120px 24px 60px;
    background-color: #f8fafc;
    /* Dot Pattern + Brand Gradients */
    background-image:
        radial-gradient(#cbd5e1 1px, transparent 1px),
        radial-gradient(circle at 0% 0%, rgba(10, 179, 156, 0.15) 0%, transparent 50%),
        radial-gradient(circle at 100% 100%, rgba(64, 81, 137, 0.15) 0%, transparent 50%);
    background-size: 24px 24px, 100% 100%, 100% 100%;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    position: relative;
}

.auth-centered-view .welcome-text h1 {
    font-size: 64px;
    font-weight: 800;
    margin-bottom: 24px;
    color: var(--text-main);
    letter-spacing: -2px;
    background: linear-gradient(135deg, var(--text-main) 0%, #405189 100%);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.auth-centered-view .welcome-text p {
    font-size: 24px;
    color: var(--text-muted);
    font-weight: 500;
    max-width: 600px;
    margin: 0 auto;
}

.auth-centered-view .cta-primary {
    margin-top: 32px;
    padding: 24px 64px;
    font-size: 20px;
    border-radius: 50px;
    background: var(--primary);
    box-shadow: 0 20px 40px rgba(10, 179, 156, 0.3);
    display: inline-flex;
    align-items: center;
    gap: 12px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    position: relative;
    overflow: hidden;
}

.auth-centered-view .cta-primary::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(rgba(255, 255, 255, 0.2), transparent);
    opacity: 0;
    transition: opacity 0.3s;
}

.auth-centered-view .cta-primary:hover {
    transform: translateY(-4px) scale(1.02);
    box-shadow: 0 30px 60px rgba(10, 179, 156, 0.4);
}

.auth-centered-view .cta-primary:hover::after {
    opacity: 1;
}

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

/* Google Login Modal */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.4);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    z-index: 2000;
    display: flex;
    /* defaults to none via JS */
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

.modal-card {
    background: white;
    width: 100%;
    max-width: 400px;
    border-radius: 20px;
    padding: 40px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.15);
    border: 1px solid var(--border);
    position: relative;
    text-align: center;
    transform: scale(1);
    animation: scaleIn 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes scaleIn {
    from {
        transform: scale(0.95);
        opacity: 0;
    }

    to {
        transform: scale(1);
        opacity: 1;
    }
}

.modal-close {
    position: absolute;
    top: 16px;
    right: 16px;
    background: none;
    border: none;
    cursor: pointer;
    color: var(--text-muted);
    padding: 8px;
    border-radius: 50%;
    transition: background 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-close:hover {
    background: #f1f5f9;
    color: var(--text-main);
}

.modal-icon {
    width: 56px;
    height: 56px;
    background: #ecfdf5;
    color: var(--primary);
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 24px;
}

.modal-icon svg {
    width: 28px;
    height: 28px;
}

.modal-header h2 {
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 8px;
    color: var(--text-main);
}

.modal-header p {
    color: var(--text-muted);
    font-size: 16px;
    margin-bottom: 32px;
}

.google-btn {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    background: white;
    border: 1px solid var(--border);
    padding: 14px;
    border-radius: 10px;
    font-size: 16px;
    font-weight: 500;
    color: var(--text-main);
    cursor: pointer;
    transition: all 0.2s;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.google-btn:hover {
    background: #f8fafc;
    border-color: #cbd5e1;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
}

.modal-divider {
    margin: 24px 0;
    font-size: 14px;
    color: var(--text-muted);
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-divider::before,
.modal-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--border);
    margin: 0 16px;
}

.modal-footer-text {
    font-size: 13px;
    color: var(--text-muted);
    line-height: 1.5;
}

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

/* Footer */
footer {
    padding: 40px 24px;
    border-top: 1px solid var(--border);
    margin-top: auto;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: var(--text-muted);
    font-size: 14px;
}

.footer-brand {
    font-weight: 600;
}

.footer-links {
    display: flex;
    gap: 24px;
}

.footer-links a {
    color: var(--text-muted);
    text-decoration: none;
}

@media (max-width: 768px) {
    .nav-links {
        display: none;
    }

    /* Hide for now, can add mobile menu js later */
    .mobile-toggle {
        display: block;
    }

    .hero {
        grid-template-columns: 1fr;
        padding-top: 100px;
        text-align: center;
    }

    .hero-content h1 {
        font-size: 40px;
    }

    .hero-actions {
        justify-content: center;
        flex-direction: column;
    }

    .trust-badges {
        justify-content: center;
    }

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

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

/* Mockup Dashboard Styles (Realistic Rows) */
.mockup-row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    border-bottom: 1px solid #f1f5f9;
    background: white;
    /* Ensure visibility */
}

.mockup-row:last-child {
    border-bottom: none;
}

/* Big Order ID */
.order-id-large {
    font-size: 16px;
    font-weight: 700;
    color: #15803d;
    /* dark green text */
    background: #dcfce7;
    /* light green bg */
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    flex-shrink: 0;
}

.row-content {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.row-file-line {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 2px;
}

.file-icon-small {
    width: 14px;
    height: 14px;
}

.file-icon-small.text-red {
    color: #ef4444;
}

.file-icon-small.text-blue {
    color: #3b82f6;
}

.row-title {
    font-size: 11px;
    font-weight: 600;
    color: #1e293b;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.row-meta {
    display: flex;
    gap: 4px;
    margin-left: 20px;
    /* Align under text */
}

.badge {
    font-size: 8px;
    padding: 1px 5px;
    border-radius: 4px;
    font-weight: 600;
    line-height: 1.4;
}

.badge.blue {
    background: #e0f2fe;
    color: #0284c7;
}

.badge.gray {
    background: #f1f5f9;
    color: #64748b;
}

.badge.purple {
    background: #f3e8ff;
    color: #9333ea;
}

.btn-print {
    background: var(--primary);
    color: white;
    border: none;
    padding: 6px 10px;
    border-radius: 6px;
    font-size: 10px;
    font-weight: 600;
    cursor: pointer;
    transition: opacity 0.2s;
}



/* Skeleton Effect */
.mockup-row.skeleton {
    opacity: 0.6;
    pointer-events: none;
}

.skeleton-box {
    background: #e2e8f0;
    border-radius: 4px;
    position: relative;
    overflow: hidden;
}

.skeleton-box::after {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.6), transparent);
    animation: skeleton-loading 1.5s infinite;
}

.s-id {
    width: 36px;
    height: 36px;
}

.s-title-line {
    width: 80%;
    height: 10px;
    margin-bottom: 4px;
}

.s-meta {
    width: 50%;
    height: 8px;
    margin-left: 20px;
}

.s-btn {
    width: 36px;
    height: 22px;
}

@keyframes skeleton-loading {
    0% {
        transform: translateX(-100%);
    }

    100% {
        transform: translateX(100%);
    }
}