/* =============================================================================
   AEROQ PRO - UI Stylesheet
   -----------------------------------------------------------------------------
   This file is intentionally self-contained (no build step).
   It defines:
   - CSS variables (colors/spacing/typography)
   - Base reset + layout primitives
   - Components used across templates (nav, buttons, cards, forms, tables)
   - Page-specific styles (landing, pricing, app tool, admin, auth)
   ============================================================================= */

/* =============================================================================
   Design Tokens
   ============================================================================= */

:root {
    /* Color palette */
    --white: #ffffff;
    --black: #0b1220;

    --primary-50: #eff6ff;
    --primary-100: #dbeafe;
    --primary-200: #bfdbfe;
    --primary-300: #93c5fd;
    --primary-400: #60a5fa;
    --primary-500: #3b82f6;
    --primary-600: #2563eb;
    --primary-700: #1d4ed8;
    --primary-800: #1e40af;

    --gray-50: #f9fafb;
    --gray-100: #f3f4f6;
    --gray-200: #e5e7eb;
    --gray-300: #d1d5db;
    --gray-400: #9ca3af;
    --gray-500: #6b7280;
    --gray-600: #4b5563;
    --gray-700: #374151;
    --gray-800: #1f2937;
    --gray-900: #111827;
    --titanium-400: var(--gray-500);

    --green-50: #ecfdf5;
    --green-100: #d1fae5;
    --green-200: #a7f3d0;
    --green-500: #10b981;
    --green-600: #059669;

    --red-50: #fef2f2;
    --red-100: #fee2e2;
    --red-200: #fecaca;
    --red-500: #ef4444;
    --red-600: #dc2626;

    --orange-50: #fff7ed;
    --orange-100: #ffedd5;
    --orange-500: #f97316;
    --orange-600: #ea580c;

    /* Semantic colors */
    --bg: var(--gray-50);
    --surface: var(--white);
    --surface-muted: var(--gray-50);

    --text-primary: var(--gray-900);
    --text-secondary: var(--gray-700);
    --text-muted: var(--gray-500);

    --border-light: var(--gray-200);
    --border-medium: var(--gray-300);

    /* Typography */
    --font-sans: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", "Apple Color Emoji", "Segoe UI Emoji";
    --font-mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;

    /* Radii */
    --radius-sm: 0.375rem;
    --radius-md: 0.5rem;
    --radius-lg: 0.75rem;
    --radius-xl: 1rem;
    --radius-2xl: 1.25rem;
    --radius-full: 9999px;

    /* Spacing */
    --space-0: 0;
    --space-1: 0.25rem;
    --space-2: 0.5rem;
    --space-3: 0.75rem;
    --space-4: 1rem;
    --space-5: 1.25rem;
    --space-6: 1.5rem;
    --space-8: 2rem;
    --space-10: 2.5rem;
    --space-12: 3rem;
    --space-16: 4rem;

    /* Shadows */
    --shadow-xs: 0 1px 2px rgba(17, 24, 39, 0.06);
    --shadow-sm: 0 4px 12px rgba(17, 24, 39, 0.08);
    --shadow-md: 0 12px 28px rgba(17, 24, 39, 0.12);
    --shadow-lg: 0 20px 40px rgba(17, 24, 39, 0.16);

    /* Motion */
    --duration-fast: 120ms;
    --duration-normal: 220ms;
    --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
}

/* =============================================================================
   Base Reset
   ============================================================================= */

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

html {
    font-family: var(--font-sans);
    line-height: 1.5;
    -webkit-text-size-adjust: 100%;
    text-rendering: optimizeLegibility;
}

body {
    margin: 0;
    background: var(--bg);
    color: var(--text-primary);
}

img, svg, video { max-width: 100%; height: auto; }

a { color: inherit; }

a:hover { text-decoration: none; }

button, input, select, textarea {
    font: inherit;
    color: inherit;
}

/* =============================================================================
   Layout
   ============================================================================= */

.container {
    width: 100%;
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 var(--space-6);
}

.main {
    padding: var(--space-8) 0 var(--space-12);
}

/* =============================================================================
   Typography Helpers
   ============================================================================= */

h1, h2, h3, h4 {
    margin: 0;
    line-height: 1.15;
    letter-spacing: -0.02em;
}

h1 { font-size: clamp(2rem, 5vw, 3rem); }
h2 { font-size: 1.75rem; }
h3 { font-size: 1.25rem; }

p { margin: 0; }

.text-center { text-align: center; }
.text-muted { color: var(--text-muted); }

.text-gradient {
    background: linear-gradient(135deg, var(--primary-600), var(--primary-400));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.font-mono { font-family: var(--font-mono); }

/* =============================================================================
   Nav
   ============================================================================= */

.nav {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: rgba(255, 255, 255, 0.82);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border-light);
}

.nav-inner {
    height: 64px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-6);
}

.nav-brand {
    display: inline-flex;
    align-items: center;
    gap: var(--space-2);
    text-decoration: none;
}

.nav-logo {
    width: 34px;
    height: 34px;
    border-radius: var(--radius-lg);
    background: var(--primary-500);
    color: var(--white);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 900;
}

.nav-title {
    font-weight: 900;
    letter-spacing: -0.03em;
}

.nav-version {
    font-weight: 800;
    padding: 0.125rem 0.5rem;
    border-radius: var(--radius-full);
    background: var(--primary-100);
    color: var(--primary-700);
    font-size: 0.75rem;
    margin-left: var(--space-1);
}

.nav-links {
    display: flex;
    align-items: center;
    gap: var(--space-2);
}

.nav-link {
    text-decoration: none;
    color: var(--text-secondary);
    padding: var(--space-2) var(--space-3);
    border-radius: var(--radius-lg);
    font-weight: 600;
    font-size: 0.9rem;
    transition: background var(--duration-fast) var(--ease-out), color var(--duration-fast) var(--ease-out);
}

.nav-link:hover {
    background: var(--gray-100);
    color: var(--text-primary);
}

.nav-link.active {
    background: var(--primary-50);
    color: var(--primary-700);
}

.nav-credits {
    display: inline-flex;
    align-items: center;
    gap: var(--space-2);
    padding: var(--space-2) var(--space-3);
    background: var(--surface);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-full);
    box-shadow: var(--shadow-xs);
}

.nav-credits-icon { color: var(--primary-600); }
.nav-credits-count { font-family: var(--font-mono); font-weight: 800; }

/* =============================================================================
   Buttons
   ============================================================================= */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-2);
    padding: var(--space-2) var(--space-4);
    border-radius: var(--radius-lg);
    border: 1px solid transparent;
    background: transparent;
    cursor: pointer;
    text-decoration: none;
    font-weight: 700;
    transition: transform var(--duration-fast) var(--ease-out), box-shadow var(--duration-fast) var(--ease-out), background var(--duration-fast) var(--ease-out), border-color var(--duration-fast) var(--ease-out);
    user-select: none;
}

.btn:active { transform: translateY(1px); }

.btn-primary {
    background: var(--primary-600);
    color: var(--white);
    border-color: var(--primary-600);
    box-shadow: var(--shadow-xs);
}

.btn-primary:hover {
    background: var(--primary-700);
    border-color: var(--primary-700);
    box-shadow: var(--shadow-sm);
}

.btn-secondary {
    background: var(--gray-900);
    color: var(--white);
    border-color: var(--gray-900);
}

.btn-secondary:hover {
    background: var(--black);
    border-color: var(--black);
}

.btn-ghost {
    background: transparent;
    border-color: var(--border-light);
    color: var(--text-secondary);
}

.btn-ghost:hover {
    background: var(--gray-100);
    border-color: var(--border-medium);
    color: var(--text-primary);
}

.btn-outline {
    background: transparent;
    border-color: var(--primary-300);
    color: var(--primary-700);
}

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

.btn-lg {
    padding: var(--space-3) var(--space-6);
    border-radius: var(--radius-xl);
    font-size: 1rem;
}

.btn-sm {
    padding: var(--space-1) var(--space-3);
    border-radius: var(--radius-md);
    font-size: 0.875rem;
}

/* =============================================================================
   Badges
   ============================================================================= */

.badge {
    display: inline-flex;
    align-items: center;
    gap: var(--space-2);
    padding: 0.25rem 0.625rem;
    border-radius: var(--radius-full);
    font-size: 0.75rem;
    font-weight: 700;
    border: 1px solid transparent;
}

.badge-primary {
    background: var(--primary-50);
    color: var(--primary-700);
    border-color: var(--primary-100);
}

.badge-admin {
    background: var(--orange-500);
    color: var(--white);
}

.badge-success {
    background: var(--green-50);
    color: var(--green-600);
    border-color: var(--green-100);
}

.badge-danger {
    background: var(--red-50);
    color: var(--red-600);
    border-color: var(--red-100);
}

/* =============================================================================
   Cards
   ============================================================================= */

.card {
    background: var(--surface);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-2xl);
    box-shadow: var(--shadow-sm);
    overflow: hidden;
}

.card-glow {
    border-color: var(--primary-100);
    box-shadow: 0 10px 30px rgba(37, 99, 235, 0.10);
}

.card-header {
    padding: var(--space-6);
    border-bottom: 1px solid var(--border-light);
    background: linear-gradient(180deg, var(--white), var(--gray-50));
}

.card-body {
    padding: var(--space-6);
}

.card-footer {
    padding: var(--space-5) var(--space-6);
    border-top: 1px solid var(--border-light);
    background: var(--gray-50);
}

/* =============================================================================
   Flash Messages
   ============================================================================= */

.flash-container {
    position: fixed;
    top: 76px;
    right: var(--space-6);
    z-index: 1500;
    display: flex;
    flex-direction: column;
    gap: var(--space-3);
}

.flash {
    width: min(420px, calc(100vw - 2rem));
    background: var(--surface);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-md);
    padding: var(--space-4);
    display: grid;
    grid-template-columns: 28px 1fr 28px;
    gap: var(--space-3);
    align-items: start;
    transition: all var(--duration-normal) var(--ease-out);
}

.flash-icon {
    width: 28px;
    height: 28px;
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 900;
    background: var(--gray-100);
    color: var(--text-primary);
}

.flash-success .flash-icon { background: var(--green-50); color: var(--green-600); }
.flash-error .flash-icon { background: var(--red-50); color: var(--red-600); }
.flash-warning .flash-icon { background: var(--orange-50); color: var(--orange-600); }

.flash-message { font-weight: 600; color: var(--text-primary); }

.flash-close {
    border: none;
    background: transparent;
    cursor: pointer;
    color: var(--text-muted);
    font-size: 1rem;
    line-height: 1;
    padding: 0;
}

.flash-close:hover { color: var(--text-primary); }

/* =============================================================================
   Forms
   ============================================================================= */

.form-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: var(--space-4);
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: var(--space-2);
}

.form-label {
    font-weight: 700;
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.form-input,
.form-select,
textarea.form-input {
    width: 100%;
    padding: var(--space-3) var(--space-4);
    border: 1px solid var(--border-medium);
    border-radius: var(--radius-lg);
    background: var(--white);
    outline: none;
    transition: border-color var(--duration-fast) var(--ease-out), box-shadow var(--duration-fast) var(--ease-out);
}

.form-input:focus,
.form-select:focus,
textarea.form-input:focus {
    border-color: var(--primary-400);
    box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.18);
}

.form-hint {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.checkbox-group {
    display: inline-flex;
    align-items: center;
    gap: var(--space-2);
}

.checkbox-group input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: var(--primary-600);
}

/* =============================================================================
   Tables
   ============================================================================= */

.table-wrap {
    overflow-x: auto;
    border: 1px solid var(--border-light);
    border-radius: var(--radius-xl);
    background: var(--white);
}

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

.table th,
.table td {
    padding: var(--space-3) var(--space-4);
    border-bottom: 1px solid var(--border-light);
    text-align: left;
    vertical-align: top;
}

.table th {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--text-muted);
    background: var(--gray-50);
}

.table tr:last-child td { border-bottom: none; }

/* =============================================================================
   Landing Page
   ============================================================================= */

.hero-section {
    padding: var(--space-12) 0 var(--space-10);
    text-align: center;
}

.hero-section .tagline {
    font-size: 1.125rem;
    color: var(--text-secondary);
    max-width: 760px;
    margin: var(--space-4) auto 0;
}

.hero-cta {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: var(--space-4);
    margin-top: var(--space-6);
}

.trust-badges {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: var(--space-3);
    margin-top: var(--space-6);
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: var(--space-6);
    margin-top: var(--space-12);
}

.feature-card {
    background: var(--white);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-2xl);
    padding: var(--space-6);
    text-align: center;
    box-shadow: var(--shadow-sm);
    transition: transform var(--duration-normal) var(--ease-out), box-shadow var(--duration-normal) var(--ease-out);
}

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

.feature-card .icon { font-size: 2.5rem; margin-bottom: var(--space-3); }
.feature-card h3 { margin-bottom: var(--space-2); }

.feature-card ul {
    list-style: none;
    padding: 0;
    margin: var(--space-4) 0 0;
    text-align: left;
}

.feature-card li {
    display: flex;
    gap: var(--space-2);
    align-items: center;
    padding: var(--space-2) 0;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.feature-card li::before {
    content: "✓";
    color: var(--green-600);
    font-weight: 900;
}

.how-it-works {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: var(--space-8);
    margin-top: var(--space-8);
}

.how-step { text-align: center; }

.step-number {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: var(--gray-100);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto var(--space-3);
    font-weight: 900;
    color: var(--text-primary);
}

.step-number.final {
    background: var(--primary-600);
    color: var(--white);
}

.cta-section {
    margin-top: var(--space-16);
    background: linear-gradient(135deg, var(--primary-50), var(--primary-100));
    border: 1px solid var(--primary-200);
    border-radius: var(--radius-2xl);
    padding: var(--space-12);
    text-align: center;
}

/* Free calculator results */
.result-box {
    padding: var(--space-3);
}

.result-label {
    font-size: 0.6875rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.result-value {
    font-size: 1.25rem;
    font-weight: 900;
    font-family: var(--font-mono);
}

.result-box.highlight {
    background: var(--green-50);
    border: 1px solid var(--green-100);
    border-radius: var(--radius-xl);
}

/* =============================================================================
   App Tool
   ============================================================================= */

.page {
    max-width: 1000px;
    margin: 0 auto;
    padding: var(--space-8) var(--space-6);
}

.page-header {
    text-align: center;
    margin-bottom: var(--space-10);
}

.page-header .tagline {
    color: var(--text-secondary);
    margin-top: var(--space-3);
}

.notice {
    background: var(--primary-50);
    border: 1px solid var(--primary-100);
    border-radius: var(--radius-2xl);
    padding: var(--space-6);
}

.notice ul { margin: var(--space-3) 0 0 var(--space-6); }
.notice li { margin-bottom: var(--space-2); color: var(--text-secondary); }

.action-buttons {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: var(--space-3);
}

/* Mode selector */
.mode-selector {
    display: flex;
    background: var(--white);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-2xl);
    padding: var(--space-1);
    margin-bottom: var(--space-6);
    overflow-x: auto;
    box-shadow: var(--shadow-xs);
}

.mode-btn {
    flex: 1;
    min-width: 120px;
    padding: var(--space-3) var(--space-4);
    background: transparent;
    border: none;
    border-radius: var(--radius-xl);
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-1);
    transition: all var(--duration-fast) var(--ease-out);
    color: var(--text-secondary);
}

.mode-btn:hover { background: var(--gray-100); }

.mode-btn.active {
    background: var(--primary-600);
    color: var(--white);
    box-shadow: var(--shadow-sm);
}

.mode-icon { font-size: 1.4rem; }
.mode-label { font-size: 0.75rem; font-weight: 800; }

.mode-section { display: none; }
.mode-section.active { display: block; }

/* Results */
.results-section .quote-summary {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: var(--space-4);
    margin-bottom: var(--space-6);
}

.summary-stat {
    background: var(--gray-50);
    border-radius: var(--radius-xl);
    padding: var(--space-4);
    text-align: center;
    border: 1px solid var(--border-light);
}

.summary-stat .label {
    font-size: 0.75rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin-bottom: var(--space-1);
}

.summary-stat .value {
    font-size: 1.5rem;
    font-weight: 900;
    color: var(--text-primary);
    font-family: var(--font-mono);
}

.summary-stat.highlight {
    background: var(--green-50);
    border-color: var(--green-100);
}

.summary-stat.highlight .value { color: var(--green-600); }

/* =============================================================================
   Auth Pages
   ============================================================================= */

.auth-wrap {
    max-width: 520px;
    margin: 0 auto;
}

.auth-card {
    background: var(--white);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-2xl);
    padding: var(--space-8);
    box-shadow: var(--shadow-md);
}

.auth-title { margin-bottom: var(--space-2); }

.auth-footer {
    margin-top: var(--space-6);
    text-align: center;
}

/* =============================================================================
   Pricing
   ============================================================================= */

.pricing-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: var(--space-6);
    margin-top: var(--space-8);
}

.pricing-card {
    background: var(--white);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-2xl);
    padding: var(--space-6);
    box-shadow: var(--shadow-sm);
    display: flex;
    flex-direction: column;
}

.pricing-card.featured {
    border-color: var(--primary-200);
    box-shadow: 0 18px 50px rgba(37, 99, 235, 0.16);
}

.price {
    font-size: 2.25rem;
    font-weight: 900;
    font-family: var(--font-mono);
    margin-top: var(--space-4);
}

.pricing-features {
    list-style: none;
    padding: 0;
    margin: var(--space-5) 0 0;
}

.pricing-features li {
    display: flex;
    gap: var(--space-2);
    align-items: center;
    padding: var(--space-2) 0;
    color: var(--text-secondary);
}

.pricing-features li::before {
    content: "✓";
    color: var(--green-600);
    font-weight: 900;
}

.faq-section {
    margin-top: var(--space-16);
}

.faq-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: var(--space-6);
    margin-top: var(--space-6);
}

.faq-item {
    background: var(--white);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-2xl);
    padding: var(--space-6);
    box-shadow: var(--shadow-sm);
}

/* =============================================================================
   Admin
   ============================================================================= */

.admin-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: var(--space-4);
    margin-bottom: var(--space-6);
}

.admin-badge {
    display: inline-flex;
    align-items: center;
    gap: var(--space-2);
    padding: var(--space-1) var(--space-3);
    background: var(--orange-500);
    color: var(--white);
    border-radius: var(--radius-full);
    font-size: 0.75rem;
    font-weight: 800;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: var(--space-4);
    margin-bottom: var(--space-8);
}

.stat-card {
    background: var(--white);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-2xl);
    padding: var(--space-6);
    text-align: center;
    box-shadow: var(--shadow-sm);
}

.stat-card .big {
    font-size: 2.5rem;
    font-weight: 900;
    font-family: var(--font-mono);
}

.stat-card .label {
    margin-top: var(--space-1);
    color: var(--text-muted);
}

.admin-grid, .account-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(380px, 1fr));
    gap: var(--space-6);
}

/* =============================================================================
   Processing Overlay
   ============================================================================= */

.processing-overlay {
    position: fixed;
    inset: 0;
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
}

.processing-content {
    text-align: center;
    animation: fadeIn 0.25s var(--ease-out);
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
}

.processing-spinner {
    width: 64px;
    height: 64px;
    margin: 0 auto var(--space-6);
    position: relative;
}

.processing-spinner::before,
.processing-spinner::after {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: 50%;
    border: 3px solid transparent;
}

.processing-spinner::before {
    border-top-color: var(--primary-600);
    animation: spin 1s linear infinite;
}

.processing-spinner::after {
    border-right-color: var(--primary-300);
    animation: spin 0.85s linear infinite reverse;
    inset: 7px;
}

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

.processing-text { font-weight: 800; font-size: 1.125rem; }
.processing-subtext { font-family: var(--font-mono); color: var(--text-muted); }

/* =============================================================================
   Error Pages
   ============================================================================= */

.error-page {
    min-height: calc(100vh - 64px);
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: var(--space-10);
}

.error-content { max-width: 480px; }

.error-code {
    font-size: 6rem;
    font-weight: 900;
    color: var(--gray-200);
    line-height: 1;
    margin-bottom: var(--space-4);
}

/* =============================================================================
   Footer
   ============================================================================= */

.footer {
    border-top: 1px solid var(--border-light);
    padding: var(--space-8) 0;
    background: var(--white);
}

.footer-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: var(--space-4);
}

.footer-brand {
    display: inline-flex;
    align-items: center;
    gap: var(--space-3);
}

.footer-logo {
    width: 32px;
    height: 32px;
    border-radius: var(--radius-lg);
    background: var(--primary-600);
    color: var(--white);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 900;
}

.footer-text { color: var(--text-muted); font-size: 0.875rem; }

.footer-links { display: flex; align-items: center; gap: var(--space-4); flex-wrap: wrap; }

.footer-link {
    color: var(--text-muted);
    text-decoration: none;
    font-weight: 700;
    font-size: 0.875rem;
}

.footer-link:hover { color: var(--text-primary); }

/* =============================================================================
   Utilities
   ============================================================================= */

.hidden { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); border: 0; }

.mt-2 { margin-top: var(--space-2); }
.mt-4 { margin-top: var(--space-4); }
.mt-6 { margin-top: var(--space-6); }
.mt-8 { margin-top: var(--space-8); }
.mt-12 { margin-top: var(--space-12); }
.mt-16 { margin-top: var(--space-16); }

.mb-2 { margin-bottom: var(--space-2); }
.mb-4 { margin-bottom: var(--space-4); }
.mb-6 { margin-bottom: var(--space-6); }
.mb-8 { margin-bottom: var(--space-8); }

.gap-2 { gap: var(--space-2); }
.gap-4 { gap: var(--space-4); }
.gap-6 { gap: var(--space-6); }

.flex { display: flex; }
.flex-col { flex-direction: column; }
.flex-wrap { flex-wrap: wrap; }
.items-center { align-items: center; }
.items-start { align-items: flex-start; }
.justify-between { justify-content: space-between; }
.justify-center { justify-content: center; }

.grid { display: grid; }
.w-full { width: 100%; }

.grid-cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }

.required { color: var(--red-600); }

/* =============================================================================
   Responsive
   ============================================================================= */

@media (max-width: 900px) {
    .admin-grid, .account-grid { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
    .container { padding: 0 var(--space-4); }
    .nav-links { display: none; }
    .page { padding: var(--space-6) var(--space-4); }
    .card-body { padding: var(--space-5); }
    .auth-card { padding: var(--space-6); }
    .form-grid { grid-template-columns: 1fr; }
    .grid-cols-2 { grid-template-columns: 1fr; }
}

/* =============================================================================
   Print
   ============================================================================= */

@media print {
    .nav, .footer, .flash-container { display: none !important; }
    .main { padding-top: 0; }
    body { background: var(--white); }
    .card { box-shadow: none; }
}
