/* ============================================
   microSaaS Labs - Premium SaaS Stylesheet
   Black Primary | Blue Accent | Apple-Inspired
   ============================================ */

/* CSS Custom Properties */
:root {
    /* Colors */
    --primary-black: #000000;
    --secondary-black: #1d1d1f;
    --tertiary-black: #2d2d2d;
    --accent-blue: #0071e3;
    --accent-blue-hover: #0077ed;
    --accent-blue-light: #147ce5;
    --text-primary: #1d1d1f;
    --text-secondary: #6e6e73;
    --text-tertiary: #86868b;
    --text-white: #f5f5f7;
    --bg-white: #ffffff;
    --bg-light: #fbfbfd;
    --bg-gray: #f5f5f7;
    --border-light: #d2d2d7;
    
    /* Dark Theme (Default) */
    --bg-primary: #000000;
    --bg-secondary: #1d1d1f;
    --bg-tertiary: #2d2d2d;
    --success: #34c759;
    --warning: #ff9500;
    --error: #ff3b30;
    
    /* Typography */
    --font-primary: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Segoe UI', Roboto, sans-serif;
    --font-mono: 'SF Mono', 'Fira Code', Consolas, monospace;
    
    /* Spacing */
    --space-xs: 0.25rem;
    --space-sm: 0.5rem;
    --space-md: 1rem;
    --space-lg: 1.5rem;
    --space-xl: 2rem;
    --space-2xl: 3rem;
    --space-3xl: 4rem;
    --space-4xl: 6rem;
    --space-5xl: 8rem;
    
    /* Layout */
    --max-width: 1200px;
    --max-width-narrow: 980px;
    --max-width-wide: 1440px;
    --nav-height: 48px;
    
    /* Shadows */
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.04);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.08);
    --shadow-lg: 0 8px 30px rgba(0, 0, 0, 0.12);
    --shadow-xl: 0 20px 60px rgba(0, 0, 0, 0.15);
    
    /* Transitions */
    --transition-fast: 150ms ease;
    --transition-base: 250ms ease;
    --transition-slow: 400ms ease;
    
    /* Border Radius */
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 18px;
    --radius-xl: 24px;
    --radius-full: 9999px;
}

/* Reset & Base */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: var(--font-primary);
    font-size: 1rem;
    line-height: 1.5;
    color: var(--text-white);
    background-color: var(--bg-primary);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

a {
    color: var(--accent-blue);
    text-decoration: none;
    transition: color var(--transition-fast);
}

a:hover {
    color: var(--accent-blue-hover);
}

ul, ol {
    list-style: none;
}

button {
    font-family: inherit;
    cursor: pointer;
    border: none;
    background: none;
}

input, textarea, select {
    font-family: inherit;
    font-size: inherit;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-weight: 600;
    line-height: 1.1;
    letter-spacing: -0.02em;
}

.headline-hero {
    font-size: clamp(2.5rem, 8vw, 5rem);
    font-weight: 700;
    letter-spacing: -0.03em;
}

.headline-large {
    font-size: clamp(2rem, 5vw, 3.5rem);
    font-weight: 600;
}

.headline-medium {
    font-size: clamp(1.5rem, 4vw, 2.5rem);
    font-weight: 600;
}

.headline-small {
    font-size: clamp(1.25rem, 3vw, 1.75rem);
    font-weight: 600;
}

.subhead {
    font-size: clamp(1.125rem, 2.5vw, 1.5rem);
    font-weight: 400;
    color: var(--text-secondary);
    line-height: 1.4;
}

.body-large {
    font-size: 1.125rem;
    line-height: 1.6;
}

.body-small {
    font-size: 0.875rem;
    line-height: 1.5;
}

.caption {
    font-size: 0.75rem;
    color: var(--text-tertiary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-weight: 500;
}

/* Layout */
.container {
    width: 100%;
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 var(--space-lg);
}

.container-narrow {
    max-width: var(--max-width-narrow);
}

.container-wide {
    max-width: var(--max-width-wide);
}

.section {
    padding: var(--space-4xl) 0;
}

.section-large {
    padding: var(--space-5xl) 0;
}

/* Navigation */
.nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: var(--nav-height);
    background: rgba(0, 0, 0, 0.92);
    backdrop-filter: saturate(180%) blur(20px);
    -webkit-backdrop-filter: saturate(180%) blur(20px);
    z-index: 1000;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

/* Keep nav visible above mobile menu */
@media (max-width: 768px) {
    .nav {
        z-index: 1003;
        background: #000000;
    }
}

.nav-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 100%;
    max-width: var(--max-width-wide);
    margin: 0 auto;
    padding: 0 var(--space-xl);
}

.nav-logo {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--text-white);
    letter-spacing: -0.01em;
}

.nav-logo span {
    color: var(--accent-blue);
}

.nav-menu {
    display: flex;
    align-items: center;
    gap: var(--space-xl);
}

.nav-link {
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.875rem;
    font-weight: 400;
    transition: color var(--transition-fast);
}

.nav-link:hover {
    color: var(--text-white);
}

.nav-link.active {
    color: var(--text-white);
}

.nav-auth {
    display: flex;
    align-items: center;
    gap: var(--space-md);
}

.nav-toggle {
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 5px;
    padding: var(--space-sm);
    width: 44px;
    height: 44px;
    cursor: pointer;
    z-index: 1002;
}

.nav-toggle span {
    display: block;
    width: 22px;
    height: 2px;
    background: var(--text-white);
    border-radius: 2px;
    transition: all var(--transition-base);
    transform-origin: center;
}

/* Hamburger animation when active */
.nav-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.nav-toggle.active span:nth-child(2) {
    opacity: 0;
    transform: scaleX(0);
}

.nav-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
}

/* Mobile Navigation */
@media (max-width: 768px) {
    .nav-toggle {
        display: flex;
        position: relative;
        z-index: 1004;
    }
    
    .nav-container {
        padding: 0 var(--space-md);
    }
    
    .nav-menu {
        position: fixed;
        top: var(--nav-height);
        left: 0;
        right: 0;
        bottom: 0;
        width: 100%;
        height: calc(100vh - var(--nav-height));
        height: calc(100dvh - var(--nav-height));
        background: #000000;
        flex-direction: column;
        justify-content: flex-start;
        align-items: center;
        padding: var(--space-3xl) var(--space-xl);
        gap: var(--space-lg);
        opacity: 0;
        visibility: hidden;
        pointer-events: none;
        transform: translateY(-10px);
        transition: all var(--transition-base);
        z-index: 1001;
    }
    
    .nav-menu.active {
        opacity: 1;
        visibility: visible;
        pointer-events: auto;
        transform: translateY(0);
    }
    
    .nav-menu .nav-link {
        font-size: 1.5rem;
        font-weight: 500;
        padding: var(--space-md) 0;
        color: #ffffff;
    }
    
    .nav-menu .nav-link:hover {
        color: var(--accent-blue);
    }
    
    .nav-auth {
        flex-direction: column;
        width: 100%;
        max-width: 280px;
        margin-top: var(--space-xl);
        gap: var(--space-md);
    }
    
    .nav-auth .btn {
        width: 100%;
        justify-content: center;
        padding: 1rem 1.5rem;
    }
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-sm);
    padding: 0.75rem 1.5rem;
    font-size: 0.9375rem;
    font-weight: 500;
    border-radius: var(--radius-full);
    transition: all var(--transition-fast);
    white-space: nowrap;
}

.btn-primary {
    background: var(--accent-blue);
    color: white;
}

.btn-primary:hover {
    background: var(--accent-blue-hover);
    color: white;
    transform: scale(1.02);
}

.btn-secondary {
    background: var(--primary-black);
    color: white;
}

.btn-secondary:hover {
    background: var(--secondary-black);
    color: white;
}

.btn-outline {
    background: transparent;
    color: var(--accent-blue);
    border: 1px solid var(--accent-blue);
}

.btn-outline:hover {
    background: var(--accent-blue);
    color: white;
}

.btn-ghost {
    background: transparent;
    color: rgba(255, 255, 255, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.btn-ghost:hover {
    background: rgba(255, 255, 255, 0.1);
    color: white;
    border-color: rgba(255, 255, 255, 0.5);
}

.btn-white {
    background: white;
    color: var(--primary-black);
}

.btn-white:hover {
    background: var(--bg-gray);
    color: var(--primary-black);
}

.btn-small {
    padding: 0.5rem 1rem;
    font-size: 0.8125rem;
}

.btn-large {
    padding: 1rem 2rem;
    font-size: 1.0625rem;
}

.btn-icon {
    padding: 0.75rem;
}

/* Hero Section */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: calc(var(--nav-height) + var(--space-4xl)) var(--space-lg) var(--space-4xl);
    background: linear-gradient(180deg, var(--primary-black) 0%, var(--secondary-black) 100%);
    color: var(--text-white);
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 150%;
    height: 150%;
    background: radial-gradient(ellipse at center, rgba(0, 113, 227, 0.15) 0%, transparent 70%);
    pointer-events: none;
}

.hero-content {
    max-width: 900px;
    position: relative;
    z-index: 1;
}

.hero-eyebrow {
    display: inline-block;
    padding: 0.5rem 1rem;
    background: rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-full);
    font-size: 0.875rem;
    font-weight: 500;
    margin-bottom: var(--space-lg);
    color: var(--accent-blue);
}

.hero-title {
    margin-bottom: var(--space-lg);
}

.hero-subtitle {
    max-width: 600px;
    margin: 0 auto var(--space-2xl);
    color: rgba(255, 255, 255, 0.7);
}

.hero-actions {
    display: flex;
    gap: var(--space-md);
    justify-content: center;
    flex-wrap: wrap;
}

/* Hero Light Variant */
.hero-light {
    background: var(--bg-secondary);
    color: var(--text-white);
}

.hero-light::before {
    background: radial-gradient(ellipse at center, rgba(0, 113, 227, 0.15) 0%, transparent 70%);
}

.hero-light .hero-subtitle {
    color: rgba(255, 255, 255, 0.7);
}

/* Cards */
.card {
    background: var(--bg-secondary);
    border-radius: var(--radius-lg);
    padding: var(--space-xl);
    box-shadow: var(--shadow-sm);
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: all var(--transition-base);
    color: var(--text-white);
}

.card:hover {
    box-shadow: var(--shadow-lg);
    transform: translateY(-4px);
}

.card-dark {
    background: var(--secondary-black);
    border-color: rgba(255, 255, 255, 0.1);
    color: var(--text-white);
}

/* Product Cards */
.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    gap: var(--space-xl);
}

.product-card {
    background: var(--bg-secondary);
    border-radius: var(--radius-xl);
    overflow: hidden;
    box-shadow: var(--shadow-md);
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: all var(--transition-base);
    color: var(--text-white);
}

.product-card:hover {
    box-shadow: var(--shadow-xl);
    transform: translateY(-8px);
}

.product-card-image {
    height: 200px;
    background: linear-gradient(135deg, var(--primary-black) 0%, var(--secondary-black) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.product-card-image::after {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 30% 30%, rgba(0, 113, 227, 0.3) 0%, transparent 60%);
}

.product-card-icon {
    font-size: 4rem;
    color: white;
    position: relative;
    z-index: 1;
}

.product-card-content {
    padding: var(--space-xl);
}

.product-card-category {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    background: var(--bg-tertiary);
    border-radius: var(--radius-full);
    font-size: 0.75rem;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: var(--space-md);
}

.product-card-title {
    font-size: 1.375rem;
    font-weight: 600;
    margin-bottom: var(--space-sm);
}

.product-card-description {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.9375rem;
    line-height: 1.5;
    margin-bottom: var(--space-lg);
}

.product-card-price {
    display: flex;
    align-items: baseline;
    gap: var(--space-xs);
    margin-bottom: var(--space-lg);
}

.product-card-amount {
    font-size: 1.75rem;
    font-weight: 600;
}

.product-card-period {
    color: var(--text-tertiary);
    font-size: 0.875rem;
}

.product-card-actions {
    display: flex;
    gap: var(--space-sm);
}

.product-card-actions .btn {
    flex: 1;
}

/* Features Grid */
.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: var(--space-xl);
}

.feature-card {
    text-align: center;
    padding: var(--space-2xl);
}

.feature-icon {
    width: 64px;
    height: 64px;
    margin: 0 auto var(--space-lg);
    background: var(--bg-tertiary);
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.75rem;
}

.feature-title {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: var(--space-sm);
}

.feature-description {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.9375rem;
    line-height: 1.6;
}

/* Section Headers */
.section-header {
    text-align: center;
    max-width: 700px;
    margin: 0 auto var(--space-3xl);
}

.section-eyebrow {
    display: inline-block;
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--accent-blue);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: var(--space-md);
}

.section-title {
    margin-bottom: var(--space-md);
}

.section-description {
    color: rgba(255, 255, 255, 0.7);
    font-size: 1.125rem;
    line-height: 1.6;
}

/* Dark Sections */
.section-dark {
    background: var(--primary-black);
    color: var(--text-white);
}

.section-dark .section-description {
    color: rgba(255, 255, 255, 0.7);
}

.section-gray {
    background: var(--bg-secondary);
}

/* Stories / Testimonials */
.stories-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: var(--space-xl);
}

.story-card {
    background: var(--bg-secondary);
    border-radius: var(--radius-xl);
    padding: var(--space-2xl);
    box-shadow: var(--shadow-md);
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: all var(--transition-base);
    color: var(--text-white);
}

.story-card:hover {
    box-shadow: var(--shadow-lg);
}

.story-header {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    margin-bottom: var(--space-lg);
}

.story-logo {
    width: 56px;
    height: 56px;
    background: linear-gradient(135deg, var(--accent-blue) 0%, var(--accent-blue-light) 100%);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: white;
    font-weight: 700;
}

.story-company {
    font-size: 1.125rem;
    font-weight: 600;
}

.story-industry {
    font-size: 0.875rem;
    color: var(--text-tertiary);
}

.story-problem {
    margin-bottom: var(--space-lg);
}

.story-label {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-tertiary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: var(--space-xs);
}

.story-text {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.9375rem;
    line-height: 1.6;
}

.story-solution {
    background: var(--bg-tertiary);
    border-radius: var(--radius-md);
    padding: var(--space-lg);
    margin-bottom: var(--space-lg);
}

.story-solution .story-label {
    color: var(--accent-blue);
}

.story-result {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    padding-top: var(--space-lg);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.story-metric {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--success);
}

.story-metric-label {
    font-size: 0.875rem;
    color: rgba(255, 255, 255, 0.7);
}

/* Forms */
.form-container {
    max-width: 600px;
    margin: 0 auto;
}

.form-group {
    margin-bottom: var(--space-lg);
}

.form-label {
    display: block;
    font-size: 0.9375rem;
    font-weight: 500;
    margin-bottom: var(--space-sm);
    color: var(--text-white);
}

.form-label.required::after {
    content: ' *';
    color: var(--error);
}

.form-input {
    width: 100%;
    padding: 0.875rem 1rem;
    font-size: 1rem;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: var(--radius-md);
    background: var(--bg-tertiary);
    color: var(--text-white);
    transition: all var(--transition-fast);
}

.form-input:focus {
    outline: none;
    border-color: var(--accent-blue);
    box-shadow: 0 0 0 4px rgba(0, 113, 227, 0.1);
}

.form-input::placeholder {
    color: var(--text-tertiary);
}

.form-input.error {
    border-color: var(--error);
}

.form-textarea {
    min-height: 150px;
    resize: vertical;
}

.form-select {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%2386868b' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    padding-right: 2.5rem;
}

.form-error {
    font-size: 0.8125rem;
    color: var(--error);
    margin-top: var(--space-xs);
}

.form-hint {
    font-size: 0.8125rem;
    color: var(--text-tertiary);
    margin-top: var(--space-xs);
}

.form-row {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-lg);
}

@media (max-width: 640px) {
    .form-row {
        grid-template-columns: 1fr;
    }
}

/* Auth Pages */
.auth-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: calc(var(--nav-height) + var(--space-2xl)) var(--space-lg) var(--space-2xl);
    background: var(--bg-primary);
}

.auth-card {
    width: 100%;
    max-width: 440px;
    background: var(--bg-secondary);
    border-radius: var(--radius-xl);
    padding: var(--space-2xl);
    box-shadow: var(--shadow-lg);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--text-white);
}

.auth-header {
    text-align: center;
    margin-bottom: var(--space-2xl);
}

.auth-logo {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: var(--space-md);
}

.auth-logo span {
    color: var(--accent-blue);
}

.auth-title {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: var(--space-sm);
}

.auth-subtitle {
    color: var(--text-secondary);
    font-size: 0.9375rem;
}

.auth-divider {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    margin: var(--space-xl) 0;
    color: var(--text-tertiary);
    font-size: 0.8125rem;
}

.auth-divider::before,
.auth-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--border-light);
}

.auth-footer {
    text-align: center;
    margin-top: var(--space-xl);
    padding-top: var(--space-xl);
    border-top: 1px solid var(--border-light);
    font-size: 0.9375rem;
    color: var(--text-secondary);
}

/* Google Sign-in Button */
.google-signin-wrapper {
    width: 100%;
}

.google-signin-btn {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    padding: 0.875rem 1.5rem;
    background: white;
    color: #1d1d1f;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: var(--radius-md);
    font-size: 0.9375rem;
    font-weight: 500;
    cursor: pointer;
    transition: all var(--transition-fast);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.google-signin-btn:hover {
    background: #f5f5f7;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    transform: translateY(-1px);
}

.google-signin-btn:active {
    transform: translateY(0);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.12);
}

/* Divider */
.divider {
    display: flex;
    align-items: center;
    text-align: center;
    width: 100%;
    position: relative;
}

.divider::before,
.divider::after {
    content: '';
    flex: 1;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.divider span {
    flex-shrink: 0;
}

/* Dashboard */
.dashboard {
    min-height: 100vh;
    display: flex;
    padding-top: var(--nav-height);
}

.dashboard-sidebar {
    width: 260px;
    background: var(--primary-black);
    color: var(--text-white);
    padding: var(--space-xl);
    position: fixed;
    top: var(--nav-height);
    left: 0;
    bottom: 0;
    overflow-y: auto;
}

.dashboard-sidebar-header {
    padding-bottom: var(--space-xl);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    margin-bottom: var(--space-xl);
}

.dashboard-user-name {
    font-size: 1.125rem;
    font-weight: 600;
    margin-bottom: var(--space-xs);
}

.dashboard-user-email {
    font-size: 0.8125rem;
    color: rgba(255, 255, 255, 0.6);
}

.dashboard-nav {
    display: flex;
    flex-direction: column;
    gap: var(--space-xs);
}

.dashboard-nav-link {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    padding: 0.75rem 1rem;
    border-radius: var(--radius-md);
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.9375rem;
    transition: all var(--transition-fast);
}

.dashboard-nav-link:hover {
    background: rgba(255, 255, 255, 0.1);
    color: white;
}

.dashboard-nav-link.active {
    background: var(--accent-blue);
    color: white;
}

.dashboard-nav-icon {
    font-size: 1.25rem;
    line-height: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.dashboard-main {
    flex: 1;
    margin-left: 260px;
    padding: var(--space-2xl);
    background: var(--bg-gray);
}

.dashboard-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: var(--space-2xl);
}

.dashboard-title {
    font-size: 1.75rem;
    font-weight: 600;
}

.dashboard-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: var(--space-xl);
    margin-bottom: var(--space-2xl);
}

.dashboard-stat-card {
    background: var(--bg-secondary);
    border-radius: var(--radius-lg);
    padding: var(--space-xl);
    box-shadow: var(--shadow-sm);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--text-white);
}

.dashboard-stat-label {
    font-size: 0.875rem;
    color: var(--text-tertiary);
    margin-bottom: var(--space-sm);
}

.dashboard-stat-value {
    font-size: 2rem;
    font-weight: 700;
}

.dashboard-stat-change {
    display: flex;
    align-items: center;
    gap: var(--space-xs);
    font-size: 0.8125rem;
    margin-top: var(--space-sm);
}

.dashboard-stat-change.positive {
    color: var(--success);
}

.dashboard-stat-change.negative {
    color: var(--error);
}

/* Tables */
.table-container {
    background: var(--bg-secondary);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--text-white);
}

.table-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--space-lg);
    border-bottom: 1px solid var(--border-light);
}

.table-title {
    font-size: 1.125rem;
    font-weight: 600;
}

.table {
    width: 100%;
    border-collapse: collapse;
}

.table th,
.table td {
    padding: var(--space-md) var(--space-lg);
    text-align: left;
    border-bottom: 1px solid var(--border-light);
}

.table th {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-tertiary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    background: var(--bg-tertiary);
}

.table td {
    font-size: 0.9375rem;
}

.table tr:last-child td {
    border-bottom: none;
}

.table tr:hover td {
    background: var(--bg-tertiary);
}

/* Status Badges */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.75rem;
    font-size: 0.75rem;
    font-weight: 500;
    border-radius: var(--radius-full);
}

.badge-success {
    background: rgba(52, 199, 89, 0.1);
    color: var(--success);
}

.badge-warning {
    background: rgba(255, 149, 0, 0.1);
    color: var(--warning);
}

.badge-error {
    background: rgba(255, 59, 48, 0.1);
    color: var(--error);
}

.badge-info {
    background: rgba(0, 113, 227, 0.1);
    color: var(--accent-blue);
}

/* Apple-Style Product Page */
.product-hero {
    min-height: 80vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: calc(var(--nav-height) + var(--space-4xl)) var(--space-lg) var(--space-4xl);
    background: var(--primary-black);
    color: var(--text-white);
}

.product-hero-eyebrow {
    font-size: 1.25rem;
    font-weight: 500;
    color: var(--accent-blue);
    margin-bottom: var(--space-md);
}

.product-hero-title {
    font-size: clamp(3rem, 10vw, 6rem);
    font-weight: 700;
    letter-spacing: -0.03em;
    margin-bottom: var(--space-lg);
    background: linear-gradient(90deg, #fff 0%, rgba(255, 255, 255, 0.7) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.product-hero-subtitle {
    font-size: clamp(1.25rem, 3vw, 1.75rem);
    color: rgba(255, 255, 255, 0.7);
    max-width: 700px;
    margin-bottom: var(--space-2xl);
}

.product-hero-actions {
    display: flex;
    gap: var(--space-md);
    flex-wrap: wrap;
    justify-content: center;
}

/* Product Story Sections */
.product-section {
    padding: var(--space-5xl) var(--space-lg);
}

.product-section-content {
    max-width: 900px;
    margin: 0 auto;
}

.product-section-sticky {
    position: sticky;
    top: calc(var(--nav-height) + var(--space-xl));
}

.product-section-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-4xl);
    align-items: center;
}

@media (max-width: 768px) {
    .product-section-grid {
        grid-template-columns: 1fr;
        gap: var(--space-2xl);
    }
}

.product-feature-visual {
    aspect-ratio: 4/3;
    background: var(--bg-secondary);
    border-radius: var(--radius-xl);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 6rem;
}

.product-feature-content {
    max-width: 480px;
}

.product-feature-eyebrow {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--accent-blue);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: var(--space-md);
}

.product-feature-title {
    font-size: clamp(1.75rem, 4vw, 2.5rem);
    font-weight: 600;
    margin-bottom: var(--space-lg);
}

.product-feature-description {
    font-size: 1.125rem;
    line-height: 1.7;
    color: rgba(255, 255, 255, 0.7);
}

/* Product Pricing Section */
.product-pricing {
    text-align: center;
    padding: var(--space-5xl) var(--space-lg);
    background: var(--bg-secondary);
}

.product-pricing-card {
    max-width: 480px;
    margin: 0 auto;
    background: var(--bg-tertiary);
    border-radius: var(--radius-xl);
    padding: var(--space-3xl);
    box-shadow: var(--shadow-lg);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--text-white);
}

.product-pricing-amount {
    font-size: 3.5rem;
    font-weight: 700;
    margin-bottom: var(--space-xs);
}

.product-pricing-period {
    color: var(--text-tertiary);
    margin-bottom: var(--space-xl);
}

.product-pricing-features {
    text-align: left;
    margin-bottom: var(--space-2xl);
}

.product-pricing-feature {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    padding: var(--space-sm) 0;
    color: var(--text-secondary);
}

.product-pricing-feature::before {
    content: '✓';
    color: var(--success);
    font-weight: 700;
}

/* Footer */
.footer {
    background: var(--primary-black);
    color: var(--text-white);
    padding: var(--space-4xl) var(--space-lg) var(--space-2xl);
    margin-top: auto;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: var(--space-2xl);
    max-width: var(--max-width);
    margin: 0 auto var(--space-3xl);
}

.footer-column-title {
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--text-tertiary);
    margin-bottom: var(--space-lg);
}

.footer-links {
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
}

.footer-link {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.875rem;
    transition: color var(--transition-fast);
}

.footer-link:hover {
    color: white;
}

.footer-bottom {
    max-width: var(--max-width);
    margin: 0 auto;
    padding-top: var(--space-2xl);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: var(--space-md);
}

.footer-copyright {
    font-size: 0.8125rem;
    color: var(--text-tertiary);
}

.footer-legal {
    display: flex;
    gap: var(--space-lg);
}

.footer-legal-link {
    font-size: 0.8125rem;
    color: var(--text-tertiary);
}

.footer-legal-link:hover {
    color: white;
}

/* Utility Classes */
.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }

.mt-0 { margin-top: 0; }
.mt-1 { margin-top: var(--space-sm); }
.mt-2 { margin-top: var(--space-md); }
.mt-3 { margin-top: var(--space-lg); }
.mt-4 { margin-top: var(--space-xl); }
.mt-5 { margin-top: var(--space-2xl); }

.mb-0 { margin-bottom: 0; }
.mb-1 { margin-bottom: var(--space-sm); }
.mb-2 { margin-bottom: var(--space-md); }
.mb-3 { margin-bottom: var(--space-lg); }
.mb-4 { margin-bottom: var(--space-xl); }
.mb-5 { margin-bottom: var(--space-2xl); }

.hidden { display: none !important; }
.visible { visibility: visible; }
.invisible { visibility: hidden; }

.flex { display: flex; }
.flex-col { flex-direction: column; }
.items-center { align-items: center; }
.justify-center { justify-content: center; }
.justify-between { justify-content: space-between; }
.gap-1 { gap: var(--space-sm); }
.gap-2 { gap: var(--space-md); }
.gap-3 { gap: var(--space-lg); }
.gap-4 { gap: var(--space-xl); }

.w-full { width: 100%; }
.max-w-sm { max-width: 24rem; }
.max-w-md { max-width: 28rem; }
.max-w-lg { max-width: 32rem; }
.max-w-xl { max-width: 36rem; }

/* Alert / Toast Messages */
.alert {
    padding: var(--space-md) var(--space-lg);
    border-radius: var(--radius-md);
    font-size: 0.9375rem;
    display: flex;
    align-items: center;
    gap: var(--space-md);
}

.alert-success {
    background: rgba(52, 199, 89, 0.1);
    color: var(--success);
    border: 1px solid rgba(52, 199, 89, 0.2);
}

.alert-error {
    background: rgba(255, 59, 48, 0.1);
    color: var(--error);
    border: 1px solid rgba(255, 59, 48, 0.2);
}

.alert-warning {
    background: rgba(255, 149, 0, 0.1);
    color: var(--warning);
    border: 1px solid rgba(255, 149, 0, 0.2);
}

.alert-info {
    background: rgba(0, 113, 227, 0.1);
    color: var(--accent-blue);
    border: 1px solid rgba(0, 113, 227, 0.2);
}

/* Modal */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.75);
    -webkit-backdrop-filter: blur(8px);
    backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: var(--space-lg);
    z-index: 9999;
    opacity: 0;
    visibility: hidden;
    transition: opacity var(--transition-base), visibility var(--transition-base);
    overflow: hidden;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
}

.modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.modal {
    background: var(--bg-secondary);
    border-radius: var(--radius-xl);
    width: 100%;
    max-width: 500px;
    max-height: 90vh;
    max-height: 90svh;
    max-height: 90dvh;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    transform: scale(0.9) translateY(30px);
    transition: transform var(--transition-base);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--text-white);
    overscroll-behavior: contain;
}

.modal-overlay.active .modal {
    transform: scale(1) translateY(0);
}

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--space-lg) var(--space-xl);
    border-bottom: 1px solid var(--border-light);
}

.modal-title {
    font-size: 1.25rem;
    font-weight: 600;
}

.modal-close {
    width: 32px;
    height: 32px;
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-tertiary);
    transition: all var(--transition-fast);
}

.modal-close:hover {
    background: var(--bg-tertiary);
    color: var(--text-white);
}

.modal-body {
    padding: var(--space-xl);
}

.modal-footer {
    display: flex;
    gap: var(--space-md);
    justify-content: flex-end;
    padding: var(--space-lg) var(--space-xl);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

/* Loading States */
.loading {
    display: inline-flex;
    align-items: center;
    gap: var(--space-sm);
}

.spinner {
    width: 20px;
    height: 20px;
    border: 2px solid var(--border-light);
    border-top-color: var(--accent-blue);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.skeleton {
    background: linear-gradient(90deg, var(--bg-tertiary) 25%, var(--bg-secondary) 50%, var(--bg-tertiary) 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
    border-radius: var(--radius-sm);
}

@keyframes shimmer {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* Empty States */
.empty-state {
    text-align: center;
    padding: var(--space-4xl) var(--space-xl);
}

.empty-state-icon {
    font-size: 4rem;
    margin-bottom: var(--space-lg);
    opacity: 0.3;
}

.empty-state-title {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: var(--space-sm);
}

.empty-state-description {
    color: var(--text-secondary);
    margin-bottom: var(--space-xl);
}

/* Responsive Dashboard Sidebar */
@media (max-width: 1024px) {
    .dashboard-sidebar {
        transform: translateX(-100%);
        transition: transform var(--transition-base);
        z-index: 100;
    }
    
    .dashboard-sidebar.active {
        transform: translateX(0);
    }
    
    .dashboard-main {
        margin-left: 0;
    }
}

/* ============================================
   COMPREHENSIVE RESPONSIVE STYLES
   ============================================ */

/* Extra Large Screens (1440px+) */
@media (min-width: 1440px) {
    .container {
        max-width: var(--max-width-wide);
    }
    
    .hero-content {
        max-width: 1100px;
    }
    
    .product-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* Large Screens (1024px - 1439px) */
@media (max-width: 1439px) and (min-width: 1025px) {
    .container {
        max-width: var(--max-width);
        padding: 0 var(--space-xl);
    }
}

/* Tablet Landscape (769px - 1024px) */
@media (max-width: 1024px) {
    :root {
        --space-4xl: 4rem;
        --space-5xl: 5rem;
    }
    
    .hero {
        min-height: auto;
        padding: calc(var(--nav-height) + var(--space-3xl)) var(--space-lg) var(--space-3xl);
    }
    
    .section {
        padding: var(--space-3xl) var(--space-lg);
    }
    
    .features-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: var(--space-lg);
    }
    
    .product-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: var(--space-lg);
    }
    
    .pricing-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: var(--space-lg);
    }
    
    .footer-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: var(--space-xl);
    }
}

/* Tablet Portrait (640px - 768px) */
@media (max-width: 768px) {
    :root {
        --space-3xl: 2.5rem;
        --space-4xl: 3rem;
        --space-5xl: 4rem;
    }
    
    /* Typography adjustments */
    .headline-hero {
        font-size: clamp(2rem, 10vw, 3rem);
    }
    
    .headline-large {
        font-size: clamp(1.75rem, 6vw, 2.25rem);
    }
    
    .headline-medium {
        font-size: clamp(1.375rem, 5vw, 1.75rem);
    }
    
    /* Hero section */
    .hero {
        min-height: auto;
        padding: calc(var(--nav-height) + var(--space-2xl)) var(--space-md) var(--space-2xl);
    }
    
    .hero-content {
        padding: 0 var(--space-sm);
    }
    
    .hero-subtitle {
        font-size: 1rem;
        padding: 0 var(--space-sm);
    }
    
    .hero-actions {
        flex-direction: column;
        width: 100%;
        padding: 0 var(--space-md);
    }
    
    .hero-actions .btn {
        width: 100%;
    }
    
    /* Sections */
    .section {
        padding: var(--space-2xl) var(--space-md);
    }
    
    .section-header {
        margin-bottom: var(--space-xl);
    }
    
    /* Grids */
    .features-grid {
        grid-template-columns: 1fr;
        gap: var(--space-md);
    }
    
    .product-grid {
        grid-template-columns: 1fr;
        gap: var(--space-lg);
    }
    
    .pricing-grid {
        grid-template-columns: 1fr;
        gap: var(--space-lg);
    }
    
    /* Cards */
    .card {
        padding: var(--space-lg);
    }
    
    .product-card-content {
        padding: var(--space-lg);
    }
    
    .product-card-image {
        height: 160px;
    }
    
    .feature-card {
        padding: var(--space-lg);
    }
    
    .pricing-card {
        padding: var(--space-lg);
    }
    
    /* Product page grids */
    .product-section-grid {
        grid-template-columns: 1fr;
        gap: var(--space-xl);
    }
    
    .product-feature-visual {
        aspect-ratio: 16/9;
        font-size: 4rem;
    }
    
    .product-hero-actions {
        flex-direction: column;
        width: 100%;
    }
    
    .product-hero-actions .btn {
        width: 100%;
    }
    
    /* Footer */
    .footer {
        padding: var(--space-2xl) var(--space-md);
    }
    
    .footer-grid {
        grid-template-columns: 1fr 1fr;
        gap: var(--space-xl);
    }
    
    .footer-bottom {
        flex-direction: column;
        gap: var(--space-md);
        text-align: center;
    }
    
    /* CTA */
    .cta {
        padding: var(--space-3xl) var(--space-md);
    }
    
    .cta-actions {
        flex-direction: column;
        width: 100%;
        max-width: 320px;
        margin: 0 auto;
    }
    
    .cta-actions .btn {
        width: 100%;
    }
    
    /* Tables - make scrollable */
    .table-container {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
    
    /* Testimonials */
    .testimonial-card {
        padding: var(--space-lg);
    }
    
    /* Stats */
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: var(--space-lg);
    }
}

/* Mobile Large (481px - 639px) */
@media (max-width: 639px) {
    /* Reduce spacing */
    :root {
        --space-2xl: 2rem;
        --space-3xl: 2.5rem;
    }
    
    /* Container */
    .container {
        padding: 0 var(--space-md);
    }
    
    /* Buttons */
    .btn-large {
        padding: 0.875rem 1.5rem;
        font-size: 1rem;
    }
    
    /* Product cards */
    .product-card-actions {
        flex-direction: column;
    }
    
    .product-card-actions .btn {
        width: 100%;
    }
    
    /* Footer */
    .footer-grid {
        grid-template-columns: 1fr;
        gap: var(--space-xl);
        text-align: center;
    }
    
    .footer-links {
        display: flex;
        flex-direction: column;
        align-items: center;
    }
    
    /* Stats */
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    /* Auth pages */
    .auth-card {
        padding: var(--space-xl);
        border-radius: var(--radius-lg);
    }
    
    /* Dashboard */
    .dashboard-header {
        padding: var(--space-md);
    }
    
    .dashboard-content {
        padding: var(--space-md);
    }
    
    /* Pricing */
    .product-pricing-card {
        padding: var(--space-xl);
    }
    
    .product-pricing-amount {
        font-size: 2.5rem;
    }
}

/* Mobile Small (up to 480px) */
@media (max-width: 480px) {
    :root {
        --space-xl: 1.25rem;
        --space-2xl: 1.5rem;
        --space-3xl: 2rem;
    }
    
    /* Typography */
    .headline-hero {
        font-size: 2rem;
        line-height: 1.15;
    }
    
    .headline-large {
        font-size: 1.5rem;
        line-height: 1.2;
    }
    
    .headline-medium {
        font-size: 1.25rem;
    }
    
    .body-large {
        font-size: 1rem;
    }
    
    .subhead {
        font-size: 1rem;
        line-height: 1.5;
    }
    
    /* Navigation */
    .nav-logo {
        font-size: 1rem;
    }
    
    /* Hero */
    .hero {
        min-height: calc(100vh - var(--nav-height));
        min-height: calc(100dvh - var(--nav-height));
        padding: calc(var(--nav-height) + var(--space-lg)) var(--space-md) var(--space-xl);
    }
    
    .hero-content {
        padding: 0 var(--space-xs);
    }
    
    .hero-eyebrow {
        font-size: 0.75rem;
        padding: 0.375rem 0.75rem;
        margin-bottom: var(--space-md);
    }
    
    .hero-title {
        margin-bottom: var(--space-md);
    }
    
    .hero-subtitle {
        font-size: 1rem;
        margin-bottom: var(--space-xl);
    }
    
    .hero-actions {
        flex-direction: column;
        width: 100%;
        max-width: 300px;
        margin: 0 auto;
    }
    
    .hero-actions .btn {
        width: 100%;
    }
    
    /* Sections */
    .section {
        padding: var(--space-2xl) var(--space-md);
    }
    
    .section-eyebrow {
        font-size: 0.6875rem;
    }
    
    .section-header {
        margin-bottom: var(--space-xl);
    }
    
    .section-description {
        font-size: 0.9375rem;
    }
    
    /* Cards */
    .card {
        padding: var(--space-md);
        border-radius: var(--radius-md);
    }
    
    .product-card-content {
        padding: var(--space-md);
    }
    
    .product-card-title {
        font-size: 1.125rem;
    }
    
    .product-card-amount {
        font-size: 1.5rem;
    }
    
    .feature-card {
        padding: var(--space-md);
    }
    
    .feature-icon {
        font-size: 2rem;
    }
    
    /* Pricing */
    .pricing-card {
        padding: var(--space-lg);
    }
    
    /* Auth */
    .auth-card {
        padding: var(--space-lg);
        margin: var(--space-md);
    }
    
    .auth-title {
        font-size: 1.25rem;
    }
    
    /* Buttons */
    .btn {
        padding: 0.625rem 1.25rem;
        font-size: 0.875rem;
    }
    
    .btn-small {
        padding: 0.5rem 0.875rem;
        font-size: 0.75rem;
    }
    
    .btn-large {
        padding: 0.75rem 1.25rem;
        font-size: 0.9375rem;
    }
    
    /* Forms */
    .form-input {
        padding: 0.75rem 1rem;
        font-size: 1rem; /* Prevents zoom on iOS */
    }
    
    /* Footer */
    .footer {
        padding: var(--space-xl) var(--space-sm);
    }
    
    .footer-column-title {
        font-size: 0.875rem;
    }
    
    /* CTA */
    .cta {
        padding: var(--space-2xl) var(--space-sm);
    }
    
    .cta-title {
        font-size: 1.5rem;
    }
    
    .cta-subtitle {
        font-size: 0.9375rem;
    }
}

/* Touch device optimizations */
@media (hover: none) and (pointer: coarse) {
    /* Larger touch targets */
    .btn {
        min-height: 44px;
    }
    
    .nav-link {
        padding: var(--space-sm) var(--space-md);
    }
    
    .footer-link {
        padding: var(--space-xs) 0;
    }
    
    /* Remove hover effects */
    .card:hover {
        transform: none;
    }
    
    .product-card:hover {
        transform: none;
    }
    
    .btn-primary:hover {
        transform: none;
    }
}

/* High DPI screens */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    /* Thinner borders on retina */
    .card {
        border-width: 0.5px;
    }
    
    .product-card {
        border-width: 0.5px;
    }
}

/* Landscape mode for mobile */
@media (max-height: 500px) and (orientation: landscape) {
    .hero {
        min-height: auto;
        padding: calc(var(--nav-height) + var(--space-lg)) var(--space-lg) var(--space-lg);
    }
    
    .auth-page {
        padding: calc(var(--nav-height) + var(--space-lg)) var(--space-lg) var(--space-lg);
    }
}

/* Safe area insets for notched devices */
@supports (padding: max(0px)) {
    .nav {
        padding-left: max(var(--space-lg), env(safe-area-inset-left));
        padding-right: max(var(--space-lg), env(safe-area-inset-right));
    }
    
    .footer {
        padding-bottom: max(var(--space-xl), env(safe-area-inset-bottom));
    }
    
    @media (max-width: 768px) {
        .nav-menu {
            padding-left: max(var(--space-lg), env(safe-area-inset-left));
            padding-right: max(var(--space-lg), env(safe-area-inset-right));
            padding-bottom: max(var(--space-2xl), env(safe-area-inset-bottom));
        }
    }
}

/* Print Styles */
@media print {
    .nav,
    .footer,
    .dashboard-sidebar,
    .btn {
        display: none !important;
    }
    
    body {
        background: white;
        color: black;
    }
}

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    html {
        scroll-behavior: auto;
    }
}

/* Focus Styles for Accessibility */
*:focus-visible {
    outline: 2px solid var(--accent-blue);
    outline-offset: 2px;
}

/* Skip Link */
.skip-link {
    position: absolute;
    top: -100%;
    left: 50%;
    transform: translateX(-50%);
    background: var(--accent-blue);
    color: white;
    padding: var(--space-md) var(--space-lg);
    border-radius: var(--radius-md);
    z-index: 9999;
    transition: top var(--transition-fast);
}

.skip-link:focus {
    top: var(--space-md);
}
/* ============================================
   Affiliate Program Page Styles
   ============================================ */

/* Top Banner */
.affiliate-banner {
    background: linear-gradient(90deg, var(--accent-blue) 0%, #0077ed 100%);
    color: white;
    text-align: center;
    padding: 0.75rem 1rem;
    font-size: 0.875rem;
    font-weight: 500;
}

.affiliate-nav {
    top: 36px;
}

@media (max-width: 768px) {
    .affiliate-banner {
        font-size: 0.8125rem;
        padding: 0.625rem 1rem;
    }
    
    .affiliate-nav {
        top: 32px;
    }
}

.affiliate-hero {
    padding-top: calc(var(--nav-height) + 36px + var(--space-4xl));
}

/* Steps Grid */
.steps-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: var(--space-xl);
}

@media (max-width: 1024px) {
    .steps-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 640px) {
    .steps-grid {
        grid-template-columns: 1fr;
    }
}

.step-card {
    background: var(--bg-secondary);
    border-radius: var(--radius-xl);
    padding: var(--space-2xl);
    text-align: center;
    position: relative;
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: all var(--transition-base);
}

.step-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-lg);
    border-color: var(--accent-blue);
}

.step-number {
    position: absolute;
    top: -12px;
    left: 50%;
    transform: translateX(-50%);
    width: 28px;
    height: 28px;
    background: var(--accent-blue);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.875rem;
    font-weight: 700;
}

.step-icon {
    font-size: 3rem;
    margin-bottom: var(--space-lg);
}

.step-title {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: var(--space-sm);
    color: var(--text-white);
}

.step-description {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.9375rem;
    line-height: 1.6;
}

/* Calculator */
.calculator-wrapper {
    max-width: 900px;
    margin: 0 auto;
}

.calculator-card {
    background: var(--bg-secondary);
    border-radius: var(--radius-xl);
    padding: var(--space-2xl);
    border: 1px solid rgba(255, 255, 255, 0.1);
    margin-bottom: var(--space-2xl);
}

.calculator-inputs {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-xl);
    margin-bottom: var(--space-2xl);
}

@media (max-width: 640px) {
    .calculator-inputs {
        grid-template-columns: 1fr;
    }
}

.calculator-input-group {
    display: flex;
    flex-direction: column;
}

.calculator-results {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: var(--space-lg);
}

@media (max-width: 768px) {
    .calculator-results {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 480px) {
    .calculator-results {
        grid-template-columns: 1fr;
    }
}

.calculator-result {
    background: var(--bg-tertiary);
    border-radius: var(--radius-md);
    padding: var(--space-lg);
    text-align: center;
}

.calculator-result.highlight {
    background: linear-gradient(135deg, var(--accent-blue) 0%, #0077ed 100%);
}

.result-label {
    display: block;
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.7);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: var(--space-xs);
}

.calculator-result.highlight .result-label {
    color: rgba(255, 255, 255, 0.9);
}

.result-value {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-white);
}

.result-value.large {
    font-size: 1.5rem;
}

.value-updated {
    animation: pulse 0.3s ease;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

/* Commission Table */
.commission-table-wrapper {
    background: var(--bg-secondary);
    border-radius: var(--radius-xl);
    padding: var(--space-2xl);
    border: 1px solid rgba(255, 255, 255, 0.1);
    overflow-x: auto;
}

.table-title {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: var(--space-lg);
    color: var(--text-white);
}

.commission-table {
    width: 100%;
    border-collapse: collapse;
}

.commission-table th,
.commission-table td {
    padding: var(--space-md) var(--space-lg);
    text-align: left;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.commission-table th {
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-tertiary);
    background: var(--bg-tertiary);
}

.commission-table th:first-child {
    border-radius: var(--radius-sm) 0 0 var(--radius-sm);
}

.commission-table th:last-child {
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}

.commission-table td {
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.9375rem;
}

.commission-table tbody tr:hover {
    background: rgba(255, 255, 255, 0.03);
}

.highlight-cell {
    color: var(--success) !important;
    font-weight: 600;
}

/* Benefits Cards */
.benefit-card {
    background: var(--bg-secondary);
    border-radius: var(--radius-xl);
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: all var(--transition-base);
}

.benefit-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-lg);
    border-color: var(--accent-blue);
}

/* Signup Form */
.signup-form-wrapper {
    max-width: 500px;
    margin: 0 auto;
}

.affiliate-form {
    background: var(--bg-secondary);
    border-radius: var(--radius-xl);
    padding: var(--space-2xl);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.btn-block {
    width: 100%;
}

.form-footer-text {
    text-align: center;
    margin-top: var(--space-lg);
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.9375rem;
}

.form-footer-text a {
    color: var(--accent-blue);
}

/* Checkbox */
.checkbox-label {
    display: flex;
    align-items: flex-start;
    gap: var(--space-sm);
    cursor: pointer;
    font-size: 0.875rem;
    color: rgba(255, 255, 255, 0.7);
}

.checkbox-label input[type="checkbox"] {
    width: 18px;
    height: 18px;
    margin-top: 2px;
    accent-color: var(--accent-blue);
}

.checkbox-text a {
    color: var(--accent-blue);
}

/* Success Message */
.success-message {
    text-align: center;
    padding: var(--space-3xl);
    background: var(--bg-secondary);
    border-radius: var(--radius-xl);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.success-icon {
    width: 80px;
    height: 80px;
    background: var(--success);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
    margin: 0 auto var(--space-xl);
}

.success-message h3 {
    font-size: 1.5rem;
    margin-bottom: var(--space-md);
    color: var(--text-white);
}

.success-message p {
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: var(--space-xl);
    max-width: 400px;
    margin-left: auto;
    margin-right: auto;
}

/* FAQ Accordion */
.faq-wrapper {
    max-width: 800px;
    margin: 0 auto;
}

.faq-item {
    background: var(--bg-secondary);
    border-radius: var(--radius-lg);
    margin-bottom: var(--space-md);
    border: 1px solid rgba(255, 255, 255, 0.1);
    overflow: hidden;
    transition: all var(--transition-base);
}

.faq-item:hover {
    border-color: rgba(255, 255, 255, 0.2);
}

.faq-item.active {
    border-color: var(--accent-blue);
}

.faq-question {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--space-lg) var(--space-xl);
    font-size: 1rem;
    font-weight: 500;
    color: var(--text-white);
    background: transparent;
    border: none;
    cursor: pointer;
    text-align: left;
    transition: all var(--transition-fast);
}

.faq-question:hover {
    color: var(--accent-blue);
}

.faq-icon {
    font-size: 1.5rem;
    font-weight: 300;
    color: var(--accent-blue);
    transition: transform var(--transition-base);
}

.faq-item.active .faq-icon {
    transform: rotate(45deg);
}

.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height var(--transition-base), padding var(--transition-base);
}

.faq-item.active .faq-answer {
    max-height: 500px;
}

.faq-answer p {
    padding: 0 var(--space-xl) var(--space-lg);
    color: rgba(255, 255, 255, 0.7);
    line-height: 1.7;
}

/* CTA Section Full */
.cta-section-full {
    background: linear-gradient(135deg, var(--accent-blue) 0%, #0077ed 100%);
    text-align: center;
    padding: var(--space-5xl) var(--space-lg);
}

.cta-content {
    max-width: 700px;
    margin: 0 auto;
}

.cta-description {
    color: rgba(255, 255, 255, 0.9);
    font-size: 1.25rem;
    margin: var(--space-md) 0 var(--space-xl);
}

/* ============================================
   Developer & Agency Tools Page Styles
   ============================================ */

/* White-Label Grid */
.whitelabel-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-2xl);
    align-items: start;
}

@media (max-width: 968px) {
    .whitelabel-grid {
        grid-template-columns: 1fr;
    }
}

.whitelabel-card {
    background: var(--bg-secondary);
    border-radius: var(--radius-xl);
    padding: var(--space-2xl);
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: all var(--transition-base);
}

.whitelabel-card.featured {
    border-color: var(--accent-blue);
    box-shadow: 0 0 40px rgba(0, 113, 227, 0.15);
}

.whitelabel-icon {
    font-size: 3rem;
    margin-bottom: var(--space-lg);
}

.whitelabel-title {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: var(--space-md);
    color: var(--text-white);
}

.whitelabel-description {
    color: rgba(255, 255, 255, 0.7);
    line-height: 1.6;
    margin-bottom: var(--space-lg);
}

.whitelabel-features {
    list-style: none;
    margin-bottom: var(--space-xl);
}

.whitelabel-features li {
    position: relative;
    padding-left: 1.75rem;
    padding-bottom: var(--space-sm);
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.9375rem;
}

.whitelabel-features li::before {
    content: '✓';
    position: absolute;
    left: 0;
    color: var(--success);
    font-weight: 600;
}

/* Example Cards */
.whitelabel-examples {
    background: var(--bg-secondary);
    border-radius: var(--radius-xl);
    padding: var(--space-2xl);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.examples-title {
    font-size: 1.125rem;
    font-weight: 600;
    margin-bottom: var(--space-lg);
    color: var(--text-white);
}

.example-cards {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-md);
}

@media (max-width: 640px) {
    .example-cards {
        grid-template-columns: repeat(2, 1fr);
    }
}

.example-card {
    background: var(--bg-tertiary);
    border-radius: var(--radius-md);
    padding: var(--space-lg);
    text-align: center;
    transition: all var(--transition-base);
    border: 1px solid transparent;
}

.example-card:hover {
    border-color: var(--accent-blue);
    transform: translateY(-4px);
}

.example-icon {
    font-size: 2rem;
    margin-bottom: var(--space-sm);
}

.example-card span {
    display: block;
    font-size: 0.8125rem;
    color: rgba(255, 255, 255, 0.7);
}

/* Code Preview */
.api-content {
    display: flex;
    flex-direction: column;
    gap: var(--space-3xl);
}

.code-preview {
    background: var(--bg-secondary);
    border-radius: var(--radius-xl);
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.code-header {
    display: flex;
    align-items: center;
    gap: var(--space-lg);
    padding: var(--space-md) var(--space-lg);
    background: var(--bg-tertiary);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.code-dots {
    display: flex;
    gap: 6px;
}

.code-dots span {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
}

.code-dots span:nth-child(1) { background: #ff5f56; }
.code-dots span:nth-child(2) { background: #ffbd2e; }
.code-dots span:nth-child(3) { background: #27c93f; }

.code-title {
    font-size: 0.8125rem;
    color: rgba(255, 255, 255, 0.5);
    flex: 1;
}

.code-tabs {
    display: flex;
    gap: var(--space-xs);
}

.code-tab {
    padding: 0.375rem 0.75rem;
    font-size: 0.75rem;
    background: transparent;
    color: rgba(255, 255, 255, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all var(--transition-fast);
}

.code-tab:hover {
    color: white;
    border-color: rgba(255, 255, 255, 0.4);
}

.code-tab.active {
    background: var(--accent-blue);
    color: white;
    border-color: var(--accent-blue);
}

.code-body {
    padding: var(--space-lg);
    overflow-x: auto;
}

.code-block {
    margin: 0;
    font-family: var(--font-mono);
    font-size: 0.875rem;
    line-height: 1.6;
    color: rgba(255, 255, 255, 0.9);
}

.code-block.hidden {
    display: none;
}

.code-comment { color: #6a9955; }
.code-string { color: #ce9178; }
.code-keyword { color: #569cd6; }
.code-key { color: #9cdcfe; }
.code-number { color: #b5cea8; }

.code-footer {
    padding: var(--space-md) var(--space-lg);
    background: var(--bg-tertiary);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.api-endpoints {
    font-size: 0.8125rem;
    color: rgba(255, 255, 255, 0.6);
}

.api-endpoints strong {
    color: rgba(255, 255, 255, 0.8);
}

/* API Pricing */
.pricing-title {
    font-size: 1.5rem;
    font-weight: 600;
    text-align: center;
    margin-bottom: var(--space-2xl);
    color: var(--text-white);
}

.pricing-cards {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-xl);
}

@media (max-width: 968px) {
    .pricing-cards {
        grid-template-columns: 1fr;
        max-width: 400px;
        margin: 0 auto;
    }
}

.pricing-card {
    background: var(--bg-secondary);
    border-radius: var(--radius-xl);
    padding: var(--space-2xl);
    border: 1px solid rgba(255, 255, 255, 0.1);
    text-align: center;
    transition: all var(--transition-base);
    position: relative;
}

.pricing-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-lg);
}

.pricing-card.popular {
    border-color: var(--accent-blue);
    box-shadow: 0 0 40px rgba(0, 113, 227, 0.15);
}

.popular-badge {
    position: absolute;
    top: -12px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--accent-blue);
    color: white;
    padding: 0.375rem 1rem;
    border-radius: var(--radius-full);
    font-size: 0.75rem;
    font-weight: 600;
    white-space: nowrap;
}

.pricing-tier {
    font-size: 0.875rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--accent-blue);
    margin-bottom: var(--space-sm);
}

.pricing-amount {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--text-white);
    margin-bottom: var(--space-lg);
}

.pricing-amount span {
    font-size: 1rem;
    font-weight: 400;
    color: rgba(255, 255, 255, 0.5);
}

.pricing-features {
    list-style: none;
    margin-bottom: var(--space-xl);
    text-align: left;
}

.pricing-features li {
    position: relative;
    padding-left: 1.5rem;
    padding-bottom: var(--space-sm);
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.9375rem;
}

.pricing-features li::before {
    content: '✓';
    position: absolute;
    left: 0;
    color: var(--success);
    font-weight: 600;
}

/* Integrations Grid */
.integrations-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: var(--space-lg);
}

@media (max-width: 1024px) {
    .integrations-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 640px) {
    .integrations-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

.integration-card {
    background: var(--bg-secondary);
    border-radius: var(--radius-lg);
    padding: var(--space-xl);
    text-align: center;
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: all var(--transition-base);
}

.integration-card:hover {
    transform: translateY(-6px);
    border-color: var(--accent-blue);
    box-shadow: var(--shadow-lg);
}

.integration-icon {
    width: 48px;
    height: 48px;
    margin: 0 auto var(--space-md);
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-md);
}

.integration-icon svg {
    width: 32px;
    height: 32px;
}

.integration-icon.shopify { background: #95bf47; color: white; }
.integration-icon.wordpress { background: #21759b; color: white; }
.integration-icon.salesforce { background: #00a1e0; color: white; }
.integration-icon.hubspot { background: #ff7a59; color: white; }
.integration-icon.zapier { background: #ff4a00; color: white; }
.integration-icon.stripe { background: #635bff; color: white; }

.integration-title {
    font-size: 0.9375rem;
    font-weight: 600;
    margin-bottom: var(--space-xs);
    color: var(--text-white);
}

.integration-description {
    font-size: 0.8125rem;
    color: rgba(255, 255, 255, 0.6);
    line-height: 1.4;
}

.integration-cta {
    text-align: center;
    margin-top: var(--space-3xl);
    padding: var(--space-2xl);
    background: var(--bg-secondary);
    border-radius: var(--radius-xl);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.integration-cta p {
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: var(--space-lg);
    font-size: 1.125rem;
}

/* Benefits Grid Large */
.benefits-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-xl);
}

@media (max-width: 768px) {
    .benefits-grid {
        grid-template-columns: 1fr;
    }
}

.benefit-card-large {
    background: var(--bg-secondary);
    border-radius: var(--radius-xl);
    padding: var(--space-2xl);
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: all var(--transition-base);
}

.benefit-card-large:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-lg);
    border-color: var(--accent-blue);
}

.benefit-icon-large {
    font-size: 2.5rem;
    margin-bottom: var(--space-lg);
}

.benefit-title-large {
    font-size: 1.375rem;
    font-weight: 600;
    margin-bottom: var(--space-sm);
    color: var(--text-white);
}

.benefit-description-large {
    color: rgba(255, 255, 255, 0.7);
    line-height: 1.6;
    font-size: 0.9375rem;
}
