/* ============================================================================
   LeakGuard AI — Enterprise Design System
   Brand Identity: Revenue Intelligence That Never Sleeps
   Visual Identity v1 (2026-02-23)
   ============================================================================ */

:root {
    /* Brand Primary & Accents */
    --primary: #0F172A;
    --primary-light: #1E293B;
    --accent: #1854B4;
    --accent-hover: #134A9B;
    --accent-light: #E8EFF8;
    --accent-teal: #19B3A6;
    --accent-teal-light: #E6F8F6;
    --accent-amber: #FFB547;
    --accent-amber-light: #FFF4E0;

    /* Semantic Colors */
    --success: #2BB673;
    --success-light: #E8F9F0;
    --warning: #FFB547;
    --warning-light: #FFF4E0;
    --danger: #E53935;
    --danger-light: #FDECEC;

    /* Neutral Scale (Slate) */
    --text: #0F172A;
    --text-secondary: #64748B;
    --text-light: #6B7280;
    --bg: #FFFFFF;
    --bg-subtle: #F8FAFC;
    --bg-muted: #F1F5F9;
    --border: #E2E8F0;
    --border-light: #F1F5F9;

    /* Elevation System */
    --shadow-sm: 0 1px 2px 0 rgba(15, 23, 42, .06), 0 1.5px 4px 0 rgba(15, 23, 42, .08);
    --shadow: 0 1px 3px rgba(15, 23, 42, .1), 0 1px 2px rgba(15, 23, 42, .06);
    --shadow-md: 0 2px 8px 0 rgba(15, 23, 42, .10), 0 4px 16px 0 rgba(15, 23, 42, .12);
    --shadow-lg: 0 4px 16px 0 rgba(15, 23, 42, .14), 0 8px 32px 0 rgba(15, 23, 42, .16);
    --shadow-xl: 0 8px 32px 0 rgba(15, 23, 42, .18), 0 16px 48px 0 rgba(15, 23, 42, .20);

    /* Border Radius (8px grid) */
    --radius: 8px;
    --radius-sm: 4px;
    --radius-lg: 12px;
    --radius-xl: 16px;

    /* Typography */
    --font: 'Inter', 'Segoe UI', 'Roboto', 'Arial', sans-serif;
    --font-mono: 'JetBrains Mono', 'Menlo', 'Consolas', 'Liberation Mono', monospace;

    /* Type Scale (from Brand Visual Identity) */
    --font-h1: 2.5rem;
    --font-h2: 2rem;
    --font-h3: 1.5rem;
    --font-h4: 1.25rem;
    --font-h5: 1.125rem;
    --font-body: 1rem;
    --font-small: 0.875rem;
    --font-caption: 0.75rem;

    /* Spacing Scale (8px grid) */
    --space-xs: 4px;
    --space-s: 8px;
    --space-m: 16px;
    --space-l: 24px;
    --space-xl: 32px;
    --space-2xl: 48px;

    /* Motion */
    --transition: 150ms cubic-bezier(.4, 0, .2, 1);
}

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

html {
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
}

body {
    font-family: var(--font);
    color: var(--text);
    background: var(--bg);
    line-height: 1.6;
    font-size: 16px;
}

a {
    color: var(--accent);
    text-decoration: none;
    transition: color var(--transition);
}

a:hover {
    color: var(--accent-hover);
}

/* A11-04: :focus-visible for all interactive elements */
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
[tabindex]:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}

/* A11-05: Skip-to-content link */
.skip-link {
    position: absolute;
    top: -100%;
    left: 16px;
    z-index: 9999;
    padding: 8px 16px;
    background: var(--accent);
    color: #fff;
    font-size: 14px;
    font-weight: 600;
    border-radius: var(--radius);
    text-decoration: none;
    transition: top .2s;
}

.skip-link:focus {
    top: 16px;
    color: #fff;
}

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

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

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

.container-narrow {
    max-width: 800px;
    margin: 0 auto;
    padding: 0 24px;
}

/* ============================================================================
   Navigation
   ============================================================================ */

.nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    background: rgba(255, 255, 255, .95);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border);
    transition: box-shadow var(--transition);
}

.nav.scrolled {
    box-shadow: var(--shadow-md);
}

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

.nav-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 20px;
    font-weight: 700;
    color: var(--primary);
    letter-spacing: -0.5px;
}

.nav-logo .logo-icon {
    width: 36px;
    height: 36px;
    background: linear-gradient(135deg, var(--accent), #0E3D8A);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 18px;
    font-weight: 800;
}

.nav-logo .logo-icon-img {
    width: 32px;
    height: 32px;
    flex-shrink: 0;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 20px;
    list-style: none;
}

.nav-links a {
    color: var(--text-secondary);
    font-size: 14px;
    font-weight: 500;
    transition: color var(--transition);
}

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

.nav-cta {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    flex-shrink: 0;
    padding: 10px 20px;
    font-size: 14px;
    font-weight: 600;
    color: white;
    background: var(--accent);
    border: none;
    border-radius: var(--radius);
    cursor: pointer;
    transition: background var(--transition), transform var(--transition);
}

.nav-cta:hover {
    background: var(--accent-hover);
    color: white;
    transform: translateY(-1px);
}

/* ============================================================================
   Hero Section
   ============================================================================ */

.hero {
    padding: 160px 0 100px;
    background: linear-gradient(180deg, var(--bg-subtle) 0%, var(--bg) 100%);
    text-align: center;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 800px;
    height: 800px;
    background: radial-gradient(circle, rgba(24, 84, 180, .06) 0%, transparent 70%);
    pointer-events: none;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 16px;
    background: var(--accent-light);
    color: var(--accent);
    font-size: 13px;
    font-weight: 600;
    border-radius: 100px;
    margin-bottom: 24px;
    letter-spacing: 0.03em;
}

.hero h1 {
    font-size: clamp(36px, 5vw, 60px);
    font-weight: 800;
    line-height: 1.1;
    letter-spacing: -1.5px;
    color: var(--primary);
    margin-bottom: 20px;
    max-width: 800px;
    margin-inline: auto;
}

.hero h1 .gradient-text {
    background: linear-gradient(135deg, var(--accent), var(--accent-teal));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-subtitle {
    font-size: clamp(16px, 2vw, 20px);
    color: var(--text-secondary);
    max-width: 600px;
    margin: 0 auto 40px;
    line-height: 1.7;
}

.hero-actions {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    flex-wrap: wrap;
}

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

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 14px 28px;
    font-size: 15px;
    font-weight: 600;
    border: none;
    border-radius: var(--radius);
    cursor: pointer;
    transition: all var(--transition);
    text-decoration: none;
    line-height: 1;
}

.btn:disabled,
.btn[disabled] {
    opacity: 0.5;
    cursor: not-allowed;
    pointer-events: none;
}

.btn-primary {
    color: white;
    background: var(--accent);
    box-shadow: 0 1px 2px rgba(24, 84, 180, .3);
}

.btn-primary:hover {
    background: var(--accent-hover);
    color: white;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(24, 84, 180, .3);
}

.btn-secondary {
    color: var(--text);
    background: var(--bg);
    border: 1px solid var(--border);
}

.btn-secondary:hover {
    background: var(--bg-subtle);
    border-color: var(--text-light);
}

.btn-ghost {
    color: var(--text-secondary);
    background: transparent;
    padding: 14px 20px;
}

.btn-ghost:hover {
    color: var(--text);
}

.btn-sm {
    padding: 8px 16px;
    font-size: 13px;
}

.btn-lg {
    padding: 16px 32px;
    font-size: 16px;
}

.btn-block {
    width: 100%;
}

.btn-success {
    background: var(--success);
    color: white;
}

.btn-success:hover {
    background: #239E63;
    color: white;
}

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

.btn-danger:hover {
    background: #C62828;
    color: white;
}

/* ============================================================================
   Social Proof
   ============================================================================ */

.social-proof {
    padding: 60px 0;
    text-align: center;
    border-bottom: 1px solid var(--border-light);
}

.social-proof-label {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-light);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: 24px;
}

.stats-row {
    display: flex;
    justify-content: center;
    gap: 64px;
    flex-wrap: wrap;
}

.stat-item {
    text-align: center;
}

.stat-value {
    font-size: 36px;
    font-weight: 800;
    color: var(--primary);
    letter-spacing: -1px;
    line-height: 1;
    margin-bottom: 4px;
}

.stat-label {
    font-size: 14px;
    color: var(--text-secondary);
}

/* ============================================================================
   Features / Problem → Solution
   ============================================================================ */

.section {
    padding: 100px 0;
}

.section-alt {
    background: var(--bg-subtle);
}

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

.section-header .overline {
    display: inline-block;
    font-size: 13px;
    font-weight: 600;
    color: var(--accent);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: 12px;
}

.section-header h2 {
    font-size: clamp(28px, 3.5vw, 40px);
    font-weight: 800;
    letter-spacing: -1px;
    color: var(--primary);
    margin-bottom: 16px;
    line-height: 1.15;
}

.section-header p {
    font-size: 17px;
    color: var(--text-secondary);
    line-height: 1.7;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 24px;
}

.feature-card {
    padding: 32px;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    transition: border-color var(--transition), box-shadow var(--transition);
}

.feature-card:hover {
    border-color: var(--accent);
    box-shadow: var(--shadow-md);
}

.feature-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    margin-bottom: 20px;
}

.feature-icon.blue {
    background: var(--accent-light);
    color: var(--accent);
}

.feature-icon.green {
    background: var(--success-light);
    color: var(--success);
}

.feature-icon.amber {
    background: var(--accent-amber-light);
    color: var(--accent-amber);
}

.feature-icon.red {
    background: var(--danger-light);
    color: var(--danger);
}

.feature-icon.teal {
    background: var(--accent-teal-light);
    color: var(--accent-teal);
}

.feature-card h3 {
    font-size: 18px;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 8px;
}

.feature-card p {
    font-size: 15px;
    color: var(--text-secondary);
    line-height: 1.6;
}

/* ============================================================================
   How It Works
   ============================================================================ */

.steps {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 40px;
    counter-reset: step;
}

.step {
    position: relative;
    text-align: center;
}

.step-number {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: var(--accent-light);
    color: var(--accent);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    font-weight: 800;
    margin: 0 auto 20px;
}

.step h3 {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 8px;
    color: var(--primary);
}

.step p {
    font-size: 15px;
    color: var(--text-secondary);
    line-height: 1.6;
}

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

.pricing-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 24px;
    max-width: 1000px;
    margin: 0 auto;
}

.pricing-card {
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius-xl);
    padding: 40px 32px;
    position: relative;
    transition: transform var(--transition), box-shadow var(--transition);
}

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

.pricing-card.featured {
    border-color: var(--accent);
    box-shadow: 0 0 0 1px var(--accent), var(--shadow-lg);
}

.pricing-badge {
    position: absolute;
    top: -12px;
    left: 50%;
    transform: translateX(-50%);
    padding: 4px 16px;
    background: var(--accent);
    color: white;
    font-size: 12px;
    font-weight: 700;
    border-radius: 100px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.pricing-card .tier-name {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 8px;
}

.pricing-card .price {
    font-size: 48px;
    font-weight: 800;
    color: var(--primary);
    letter-spacing: -2px;
    line-height: 1;
    margin-bottom: 4px;
}

.pricing-card .price .currency {
    font-size: 24px;
    vertical-align: super;
    font-weight: 700;
}

.pricing-card .price .period {
    font-size: 16px;
    font-weight: 400;
    color: var(--text-light);
    letter-spacing: 0;
}

.pricing-card .price-desc {
    font-size: 14px;
    color: var(--text-secondary);
    margin-bottom: 28px;
}

.pricing-features {
    list-style: none;
    margin-bottom: 32px;
}

.pricing-features li {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 8px 0;
    font-size: 14px;
    color: var(--text);
    line-height: 1.5;
}

.pricing-features li::before {
    content: '\2713';
    flex-shrink: 0;
    width: 20px;
    height: 20px;
    background: var(--success-light);
    color: var(--success);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 700;
    margin-top: 1px;
}

/* ============================================================================
   CTA (Call to Action)
   ============================================================================ */

.cta-section {
    padding: 100px 0;
    background: linear-gradient(135deg, var(--accent), #0E3D8A);
    text-align: center;
    color: white;
}

.cta-section h2 {
    font-size: clamp(28px, 3.5vw, 40px);
    font-weight: 800;
    letter-spacing: -1px;
    margin-bottom: 16px;
    color: #FFFFFF;
}

.cta-section p {
    font-size: 17px;
    color: rgba(255, 255, 255, 0.85);
    max-width: 500px;
    margin: 0 auto 32px;
    line-height: 1.7;
}

.cta-section .btn-primary {
    background: var(--accent-amber);
    color: var(--primary);
    font-weight: 700;
    border: none;
    box-shadow: 0 4px 14px rgba(255, 181, 71, 0.4);
}

.cta-section .btn-primary:hover {
    background: #FFC56E;
    color: var(--primary);
    box-shadow: 0 6px 20px rgba(255, 181, 71, 0.5);
    transform: translateY(-1px);
}

/* ============================================================================
   Integrations Grid
   ============================================================================ */

.integrations-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 24px;
    max-width: 960px;
    margin: 0 auto;
}

.integration-card {
    padding: 32px 24px;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    text-align: center;
    transition: border-color var(--transition), box-shadow var(--transition);
}

.integration-card:hover {
    border-color: var(--accent);
    box-shadow: var(--shadow-md);
}

.integration-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 16px;
}

.integration-card h3 {
    font-size: 18px;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 8px;
}

.integration-card p {
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.6;
}

.integrations-note {
    text-align: center;
    margin-top: 32px;
    font-size: 15px;
    color: var(--text-light);
    font-style: italic;
}

/* ============================================================================
   Leak Categories Tags
   ============================================================================ */

.leak-categories-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    justify-content: center;
    max-width: 800px;
    margin: 0 auto;
}

.leak-tag {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 100px;
    font-size: 14px;
    font-weight: 600;
    color: var(--primary);
    transition: border-color var(--transition), box-shadow var(--transition), transform var(--transition);
}

.leak-tag:hover {
    border-color: var(--accent);
    box-shadow: var(--shadow-sm);
    transform: translateY(-1px);
}

.leak-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    flex-shrink: 0;
}

.leak-dot.red {
    background: var(--danger);
}

.leak-dot.amber {
    background: var(--warning);
}

.leak-dot.blue {
    background: var(--accent);
}

.leak-dot.teal {
    background: var(--accent-teal);
}

.leak-dot.green {
    background: var(--success);
}

/* ============================================================================
   Trust & Security Grid
   ============================================================================ */

.trust-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 32px;
    max-width: 960px;
    margin: 0 auto;
}

.trust-item {
    text-align: center;
    padding: 32px 24px;
}

.trust-icon {
    font-size: 36px;
    margin-bottom: 16px;
    line-height: 1;
}

.trust-item h3 {
    font-size: 18px;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 8px;
}

.trust-item p {
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.7;
}

/* 4-step layout override */
.steps-4 {
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
}

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

.footer {
    padding: 48px 0;
    background: var(--primary);
    border-top: 1px solid rgba(255, 255, 255, .08);
    color: #94A3B8;
    font-size: 14px;
}

.footer-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 16px;
}

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

.footer-links a {
    color: #94A3B8;
    font-size: 13px;
    transition: color var(--transition);
}

.footer-links a:hover {
    color: white;
}

/* ============================================================================
   DASHBOARD
   ============================================================================ */

.dash-layout {
    display: flex;
    min-height: 100vh;
    padding-top: 72px;
}

/* Sidebar */
.dash-sidebar {
    width: 260px;
    background: var(--primary);
    color: white;
    padding: 24px 0;
    position: fixed;
    top: 72px;
    left: 0;
    bottom: 0;
    overflow-y: auto;
    z-index: 50;
}

.dash-sidebar-nav {
    list-style: none;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.dash-sidebar-nav li a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 24px;
    color: #94A3B8;
    font-size: 14px;
    font-weight: 500;
    transition: all var(--transition);
    border-inline-start: 3px solid transparent;
}

.dash-sidebar-nav li a:hover {
    color: white;
    background: rgba(255, 255, 255, .05);
}

.dash-sidebar-nav li a.active {
    color: white;
    background: rgba(24, 84, 180, .15);
    border-inline-start-color: var(--accent);
}

.dash-sidebar-nav .nav-section {
    padding: 16px 24px 8px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: #475569;
}

/* Main content area */
.dash-main {
    flex: 1;
    margin-inline-start: 260px;
    padding: 32px;
    background: var(--bg-subtle);
    min-height: calc(100vh - 72px);
}

.dash-header {
    margin-bottom: 32px;
}

/* Breadcrumb navigation */
.breadcrumb {
    margin-bottom: 16px;
}

.breadcrumb ol {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 4px;
    padding: 0;
    margin: 0;
    font-size: 13px;
    color: var(--text-secondary);
}

.breadcrumb li {
    display: flex;
    align-items: center;
}

.breadcrumb li:not(:last-child)::after {
    content: "›";
    margin-left: 6px;
    color: var(--text-light);
    font-weight: 300;
}

.breadcrumb li a {
    color: var(--accent);
    text-decoration: none;
    transition: color var(--transition);
}

.breadcrumb li a:hover {
    color: var(--accent-hover);
    text-decoration: underline;
}

.breadcrumb li[aria-current="page"] {
    color: var(--text);
    font-weight: 500;
}

.dash-header h1 {
    font-size: 24px;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 4px;
}

.dash-header p {
    font-size: 14px;
    color: var(--text-secondary);
}

/* Dashboard cards */
.dash-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 20px;
    margin-bottom: 32px;
}

.dash-card {
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 24px;
    transition: box-shadow var(--transition);
}

.dash-card:hover {
    box-shadow: var(--shadow-md);
}

.dash-card-label {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 8px;
}

.dash-card-value {
    font-size: 28px;
    font-weight: 800;
    color: var(--primary);
    letter-spacing: -0.5px;
    line-height: 1;
}

.dash-card-sub {
    font-size: 13px;
    color: var(--text-light);
    margin-top: 4px;
}

/* Tables */
.dash-table-wrap {
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    overflow: hidden;
    margin-bottom: 24px;
}

.dash-table-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 24px;
    border-bottom: 1px solid var(--border);
}

.dash-table-header h2 {
    font-size: 16px;
    font-weight: 700;
    color: var(--primary);
}

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

th {
    text-align: start;
    padding: 12px 24px;
    font-size: 12px;
    font-weight: 600;
    color: var(--text-light);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    background: var(--bg-subtle);
    border-bottom: 1px solid var(--border);
}

td {
    padding: 14px 24px;
    font-size: 14px;
    color: var(--text);
    border-bottom: 1px solid var(--border-light);
}

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

tr:hover td {
    background: var(--bg-subtle);
}

/* Badges / Tags */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 3px 10px;
    font-size: 12px;
    font-weight: 600;
    border-radius: 100px;
    line-height: 1.4;
}

.badge-blue {
    background: var(--accent-light);
    color: var(--accent);
}

.badge-green {
    background: var(--success-light);
    color: #239E63;
}

.badge-amber {
    background: var(--warning-light);
    color: #D97706;
}

.badge-red {
    background: var(--danger-light);
    color: var(--danger);
}

.badge-gray {
    background: var(--bg-muted);
    color: var(--text-secondary);
}

/* Progress bar */
.progress-bar {
    width: 100%;
    height: 8px;
    background: var(--bg-muted);
    border-radius: 100px;
    overflow: hidden;
}

.progress-bar-fill {
    height: 100%;
    border-radius: 100px;
    background: var(--accent);
    transition: width 0.6s ease;
}

.progress-bar-fill.warn {
    background: var(--warning);
}

.progress-bar-fill.danger {
    background: var(--danger);
}

/* ============================================================================
   Login
   ============================================================================ */

.login-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--bg-subtle) 0%, #EEF2F7 50%, var(--bg-subtle) 100%);
    padding: 24px;
    position: relative;
}

.login-page::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--accent) 0%, var(--accent-teal) 100%);
}

.login-box {
    width: 100%;
    max-width: 440px;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius-xl);
    padding: 48px 40px;
    box-shadow: var(--shadow-xl);
}

.login-box h1 {
    font-size: 24px;
    font-weight: 800;
    text-align: center;
    margin-bottom: 8px;
    color: var(--primary);
}

.login-box .login-subtitle {
    text-align: center;
    color: var(--text-secondary);
    font-size: 14px;
    margin-bottom: 32px;
}

/* Auth page shared utilities */
.auth-logo {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-bottom: 32px;
    font-size: 20px;
    font-weight: 700;
    color: var(--primary);
    letter-spacing: -0.5px;
}

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

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

.auth-divider span {
    font-size: 12px;
    color: var(--text-light);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.auth-footer-link {
    text-align: center;
    margin-top: 16px;
    font-size: 13px;
    color: var(--text-light);
}

.auth-footer-link a {
    color: var(--accent);
}

.auth-footer-link--muted a {
    color: var(--text-light);
}

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

.btn-spinner {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255, 255, 255, .3);
    border-top-color: #fff;
    border-radius: 50%;
    animation: spin .6s linear infinite;
}

.tier-badge-wrap {
    text-align: center;
    margin-bottom: 28px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 6px;
}

.form-input {
    width: 100%;
    padding: 12px 16px;
    font-size: 14px;
    font-family: var(--font-mono);
    color: var(--text);
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    transition: border-color var(--transition), box-shadow var(--transition);
    outline: none;
}

.form-input:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(24, 84, 180, .15);
}

.form-input::placeholder {
    color: var(--text-light);
    font-family: var(--font);
}

.label-hint {
    color: var(--text-light);
    font-weight: 400;
}

.form-error {
    color: var(--danger);
    font-size: 13px;
    margin-top: 6px;
    display: none;
}

.form-error.show {
    display: block;
}

/* ── Password Strength Meter ─────────────────────────────────────────────── */
.pw-strength-wrap {
    margin-top: 8px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.pw-strength-bar {
    flex: 1;
    height: 6px;
    background: var(--border);
    border-radius: 3px;
    overflow: hidden;
}

.pw-strength-fill {
    height: 100%;
    width: 0;
    border-radius: 3px;
    transition: width .3s ease, background .3s ease;
}

.pw-strength-fill.pw-str-0 {
    background: var(--danger);
    width: 5%;
}

.pw-strength-fill.pw-str-1 {
    background: var(--danger);
}

.pw-strength-fill.pw-str-2 {
    background: var(--accent-amber);
}

.pw-strength-fill.pw-str-3 {
    background: var(--success);
}

.pw-strength-fill.pw-str-4 {
    background: #239E63;
}

.pw-strength-label {
    font-size: 12px;
    font-weight: 600;
    min-width: 70px;
    text-align: right;
    white-space: nowrap;
}

.pw-strength-wrap[data-score="0"] .pw-strength-label {
    color: var(--danger);
}

.pw-strength-wrap[data-score="1"] .pw-strength-label {
    color: var(--danger);
}

.pw-strength-wrap[data-score="2"] .pw-strength-label {
    color: var(--accent-amber);
}

.pw-strength-wrap[data-score="3"] .pw-strength-label {
    color: var(--success);
}

.pw-strength-wrap[data-score="4"] .pw-strength-label {
    color: #239E63;
}

/* ── Password Match Hint ─────────────────────────────────────────────────── */
.pw-match-hint {
    font-size: 12px;
    font-weight: 500;
    margin-top: 6px;
    min-height: 18px;
}

.pw-match-hint.pw-match-ok {
    color: var(--success);
}

.pw-match-hint.pw-match-err {
    color: var(--danger);
}

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

.alert {
    padding: 14px 20px;
    border-radius: var(--radius);
    font-size: 14px;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.alert-error {
    background: var(--danger-light);
    color: #991B1B;
    border: 1px solid #FECACA;
}

.alert-success {
    background: var(--success-light);
    color: #065F46;
    border: 1px solid #A7F3D0;
}

.alert-warning {
    background: var(--warning-light);
    color: #92400E;
    border: 1px solid #FDE68A;
}

.alert-info {
    background: var(--accent-light);
    color: var(--accent);
    border: 1px solid #A3C4E8;
}

/* ============================================================================
   HTMX loading indicators
   ============================================================================ */

.htmx-indicator {
    display: none;
}

.htmx-request .htmx-indicator {
    display: inline-flex;
}

.htmx-request .htmx-hide-on-request {
    display: none;
}

.spinner {
    width: 16px;
    height: 16px;
    border: 2px solid var(--border);
    border-top-color: var(--accent);
    border-radius: 50%;
    animation: spin .6s linear infinite;
}

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

/* ============================================================================
   Billing Section
   ============================================================================ */

.billing-card {
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 32px;
    margin-bottom: 24px;
}

.billing-card h3 {
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 16px;
    color: var(--primary);
}

.billing-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
    border-bottom: 1px solid var(--border-light);
    font-size: 14px;
}

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

.billing-label {
    color: var(--text-secondary);
}

.billing-value {
    font-weight: 600;
    color: var(--text);
}

/* ============================================================================
   Empty State
   ============================================================================ */

.empty-state {
    text-align: center;
    padding: 64px 24px;
    color: var(--text-secondary);
}

.empty-state-icon {
    font-size: 48px;
    margin-bottom: 16px;
    opacity: .5;
}

.empty-state h3 {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 8px;
    color: var(--text);
}

.empty-state p {
    font-size: 14px;
    max-width: 400px;
    margin: 0 auto;
}

/* ============================================================================
   Hamburger Menu
   ============================================================================ */

.nav-hamburger {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 36px;
    height: 36px;
    padding: 6px;
    background: none;
    border: none;
    cursor: pointer;
    z-index: 110;
}

.nav-hamburger span {
    display: block;
    width: 24px;
    height: 2px;
    background: var(--text);
    border-radius: 2px;
    transition: transform 0.3s ease, opacity 0.3s ease;
}

.nav-hamburger.active span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}

.nav-hamburger.active span:nth-child(2) {
    opacity: 0;
}

.nav-hamburger.active span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

/* ============================================================================
   Dashboard Bottom Navigation (Mobile)
   ============================================================================ */

.dash-bottom-nav {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--bg);
    border-top: 1px solid var(--border);
    padding: 8px 0;
    padding-bottom: max(8px, env(safe-area-inset-bottom));
    z-index: 200;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, .06);
}

.dash-bottom-nav-inner {
    display: flex;
    justify-content: space-around;
    align-items: center;
    max-width: 500px;
    margin: 0 auto;
}

.dash-bottom-nav a {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    padding: 6px 12px;
    font-size: 11px;
    font-weight: 500;
    color: var(--text-secondary);
    text-decoration: none;
    border-radius: var(--radius);
    transition: color var(--transition), background var(--transition);
}

.dash-bottom-nav a:hover,
.dash-bottom-nav a.active {
    color: var(--accent);
    background: var(--accent-light);
}

.dash-bottom-nav a svg,
.dash-bottom-nav a .icon {
    font-size: 20px;
    width: 20px;
    height: 20px;
}

/* ============================================================================
   Signup Page
   ============================================================================ */

.signup-box {
    width: 100%;
    max-width: 520px;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius-xl);
    padding: 48px 40px;
    box-shadow: var(--shadow-lg);
}

.signup-box h1 {
    font-size: 24px;
    font-weight: 800;
    text-align: center;
    margin-bottom: 8px;
    color: var(--primary);
}

.signup-subtitle {
    text-align: center;
    color: var(--text-secondary);
    font-size: 14px;
    margin-bottom: 32px;
}

.tier-badge {
    display: inline-block;
    padding: 4px 14px;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-radius: 20px;
    background: var(--accent-light);
    color: var(--accent);
}

.tier-badge.pro {
    background: var(--success-light);
    color: var(--success);
}

.tier-badge.enterprise {
    background: var(--warning-light);
    color: var(--warning);
}

.success-box {
    background: var(--success-light);
    border: 1px solid var(--success);
    border-radius: var(--radius);
    padding: 24px;
    text-align: center;
    margin-bottom: 24px;
}

.success-box h2 {
    color: var(--success);
    font-size: 18px;
    margin-bottom: 8px;
}

.success-box .api-key-display {
    background: var(--primary);
    color: var(--success);
    font-family: var(--font-mono);
    font-size: 13px;
    padding: 12px 16px;
    border-radius: var(--radius);
    word-break: break-all;
    margin: 12px 0;
}

/* ============================================================================
   Error Page
   ============================================================================ */

.error-page {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 60vh;
    text-align: center;
    padding: 48px 24px;
}

.error-page .error-code {
    font-size: 96px;
    font-weight: 900;
    color: var(--accent);
    line-height: 1;
    margin-bottom: 8px;
    letter-spacing: -4px;
}

.error-page .error-title {
    font-size: 24px;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 12px;
}

.error-page .error-message {
    font-size: 16px;
    color: var(--text-secondary);
    max-width: 480px;
    margin: 0 auto 32px;
}

.error-page .error-actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    justify-content: center;
}

/* ============================================================================
   Analysis Detail Page
   ============================================================================ */

.analysis-meta-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 16px;
    margin-bottom: 32px;
}

.analysis-meta-card {
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 16px;
}

.analysis-meta-card .meta-label {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 4px;
}

.analysis-meta-card .meta-value {
    font-size: 18px;
    font-weight: 700;
    color: var(--text);
}

.analysis-section {
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 24px;
    margin-bottom: 24px;
}

.analysis-section h3 {
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 16px;
    color: var(--text);
}

.analysis-section pre {
    background: var(--bg-muted);
    padding: 16px;
    border-radius: var(--radius);
    overflow-x: auto;
    font-size: 13px;
    font-family: var(--font-mono);
    line-height: 1.5;
    white-space: pre-wrap;
    word-break: break-word;
}

/* ============================================================================
   Hero Enhancements
   ============================================================================ */

.hero-free-badge {
    margin-top: 12px;
    font-size: 0.95rem;
    color: var(--text-secondary);
    letter-spacing: .3px;
}

.hero-screenshot {
    margin-top: 48px;
    max-width: 820px;
    margin-inline: auto;
}

.hero-screenshot img {
    width: 100%;
    height: auto;
    border-radius: var(--radius-lg);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, .35);
}

.cta-subtext {
    margin-top: 14px;
    font-size: 0.95rem;
    color: rgba(255, 255, 255, .65);
}

/* ============================================================================
   Error Page Helpers
   ============================================================================ */

.error-help {
    margin-top: 24px;
    font-size: 13px;
    color: var(--text-light);
}

/* ============================================================================
   Waitlist Page
   ============================================================================ */

.waitlist-badge-wrap {
    text-align: center;
    margin-bottom: 28px;
}

.waitlist-badge-wrap .badge {
    font-size: 14px;
    padding: 6px 18px;
}

.waitlist-benefits {
    margin-top: 32px;
    padding-top: 24px;
    border-top: 1px solid var(--border);
}

.waitlist-benefits h3 {
    text-align: center;
    font-size: 1rem;
    margin-bottom: 16px;
    color: var(--text-secondary);
}

.waitlist-benefits ul {
    list-style: none;
    padding: 0;
    margin: 0;
    font-size: 0.9rem;
    color: var(--text-light);
}

.waitlist-benefits li {
    padding: 6px 0;
}

/* ============================================================================
   Blog Pages
   ============================================================================ */

.section--pt-nav {
    padding-top: 120px;
}

.container--blog {
    max-width: 900px;
}

.container--article {
    max-width: 780px;
}

.nav-signin {
    margin-left: 8px;
}

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

.blog-grid {
    display: grid;
    gap: 24px;
    margin-top: 32px;
}

.blog-card {
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 28px 32px;
    transition: box-shadow var(--transition), transform var(--transition);
}

.blog-card:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

.blog-card-meta {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
    font-size: 13px;
    color: var(--text-light);
}

.blog-card h2 {
    font-size: 20px;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 8px;
    line-height: 1.3;
}

.blog-card h2 a {
    color: inherit;
    text-decoration: none;
}

.blog-card h2 a:hover {
    color: var(--accent);
}

.blog-card p {
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 12px;
}

.blog-read-more {
    font-size: 13px;
    font-weight: 600;
    color: var(--accent);
    text-decoration: none;
}

.blog-read-more:hover {
    text-decoration: underline;
}

.blog-back {
    display: inline-block;
    margin-bottom: 24px;
    font-size: 14px;
    font-weight: 500;
    color: var(--accent);
    text-decoration: none;
}

.blog-back:hover {
    text-decoration: underline;
}

.blog-article-header {
    margin-bottom: 32px;
    padding-bottom: 24px;
    border-bottom: 1px solid var(--border);
}

.blog-article-header h1 {
    font-size: 32px;
    font-weight: 800;
    line-height: 1.2;
    color: var(--text);
    margin: 16px 0 12px;
}

.blog-article-excerpt {
    font-size: 17px;
    color: var(--text-secondary);
    line-height: 1.6;
}

.blog-article-body {
    font-size: 16px;
    line-height: 1.75;
    color: var(--text);
}

.blog-article-body h2 {
    font-size: 22px;
    font-weight: 700;
    margin: 36px 0 12px;
    color: var(--text);
}

.blog-article-body h3 {
    font-size: 18px;
    font-weight: 600;
    margin: 28px 0 10px;
    color: var(--text);
}

.blog-article-body p {
    margin-bottom: 16px;
    color: var(--text-secondary);
}

.blog-article-body ul {
    margin: 12px 0 20px 24px;
    padding: 0;
}

.blog-article-body li {
    margin-bottom: 8px;
    color: var(--text-secondary);
    line-height: 1.6;
}

.blog-article-body strong {
    color: var(--text);
    font-weight: 600;
}

.blog-article-body em {
    font-style: italic;
}

.blog-cta {
    margin-top: 48px;
    padding: 32px;
    background: linear-gradient(135deg, rgba(24, 84, 180, .08), rgba(24, 84, 180, .03));
    border: 1px solid rgba(24, 84, 180, .15);
    border-radius: var(--radius-lg);
    text-align: center;
}

.blog-cta h3 {
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 8px;
    color: var(--text);
}

.blog-cta p {
    font-size: 15px;
    color: var(--text-secondary);
    margin-bottom: 16px;
    max-width: 500px;
    margin-left: auto;
    margin-right: auto;
}

/* ============================================================================
   Calculator Page
   ============================================================================ */

.calc-hero {
    padding: 80px 0 40px;
    text-align: center;
}

.calc-hero h1 {
    font-size: clamp(1.8rem, 4vw, 2.8rem);
    font-weight: 800;
    line-height: 1.15;
    margin-bottom: 16px;
}

.calc-hero p {
    color: var(--text-secondary);
    font-size: 1.1rem;
    max-width: 620px;
    margin-inline: auto;
}

.calc-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    max-width: 1040px;
    margin: 0 auto 80px;
    padding: 0 24px;
}

.calc-input {
    background: var(--bg-subtle);
    border: 1px solid var(--border);
    border-radius: var(--radius-xl);
    padding: 32px;
}

.calc-input h2 {
    font-size: 1.25rem;
    margin-bottom: 24px;
}

.calc-input .form-group label {
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.arr-display {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--accent);
    text-align: center;
    margin-top: 4px;
}

.range-labels {
    display: flex;
    justify-content: space-between;
    font-size: 0.75rem;
    color: var(--text-light);
    margin-top: 4px;
}

input[type="range"] {
    -webkit-appearance: none;
    width: 100%;
    height: 8px;
    border-radius: 4px;
    background: var(--border);
    outline: none;
    cursor: pointer;
}

input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: var(--accent);
    border: 3px solid var(--bg-subtle);
    box-shadow: 0 2px 6px rgba(0, 0, 0, .3);
    cursor: pointer;
}

.optional-toggle {
    font-size: 0.8rem;
    color: var(--accent);
    cursor: pointer;
    border: none;
    background: none;
    padding: 8px 0;
    text-decoration: underline;
}

.optional-fields {
    display: none;
}

.optional-fields.show {
    display: block;
}

.btn-calculate {
    width: 100%;
    padding: 14px;
    font-size: 1.05rem;
    font-weight: 700;
    border-radius: 10px;
    border: none;
    background: var(--accent);
    color: #fff;
    cursor: pointer;
    margin-top: 8px;
    transition: background .2s, transform .1s;
}

.btn-calculate:hover {
    background: var(--accent-hover);
}

.btn-calculate:active {
    transform: scale(.98);
}

.calc-result {
    background: var(--bg-subtle);
    border: 1px solid var(--border);
    border-radius: var(--radius-xl);
    padding: 32px;
    display: flex;
    flex-direction: column;
}

.calc-result h2 {
    font-size: 1.25rem;
    margin-bottom: 24px;
}

.result-placeholder {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: var(--text-light);
    font-size: 0.95rem;
    padding: 40px 20px;
    border: 2px dashed var(--border);
    border-radius: var(--radius-lg);
}

.result-live {
    display: none;
}

.result-live.show {
    display: block;
}

.total-risk {
    text-align: center;
    padding: 24px 0;
    border-bottom: 1px solid var(--border);
    margin-bottom: 24px;
}

.total-risk .label {
    font-size: 0.85rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 8px;
}

.total-risk .amount {
    font-size: clamp(2rem, 5vw, 3rem);
    font-weight: 800;
    color: var(--danger);
}

.total-risk .per-month {
    font-size: 1rem;
    color: var(--text-secondary);
    margin-top: 4px;
}

.breakdown-item {
    margin-bottom: 16px;
}

.breakdown-header {
    display: flex;
    justify-content: space-between;
    font-size: 0.85rem;
    margin-bottom: 6px;
}

.breakdown-header .cat-name {
    color: var(--text);
    font-weight: 500;
}

.breakdown-header .cat-amount {
    color: var(--danger);
    font-weight: 600;
}

.breakdown-bar {
    height: 8px;
    border-radius: 4px;
    background: var(--border);
    overflow: hidden;
}

.breakdown-fill {
    height: 100%;
    border-radius: 4px;
    transition: width .6s ease-out;
    width: 0;
}

.fill-1 { background: #ef4444; }
.fill-2 { background: #f97316; }
.fill-3 { background: #eab308; }
.fill-4 { background: #6366f1; }
.fill-5 { background: #8b5cf6; }

.benchmark-section {
    margin-top: 24px;
    padding-top: 24px;
    border-top: 1px solid var(--border);
}

.benchmark-section h3 {
    font-size: 0.95rem;
    margin-bottom: 12px;
}

.benchmark-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.8rem;
    padding: 6px 12px;
    border-radius: 20px;
    margin: 4px;
    font-weight: 500;
}

.badge-warning {
    background: rgba(239, 68, 68, .15);
    color: #ef4444;
}

.badge-ok {
    background: rgba(34, 197, 94, .15);
    color: #22c55e;
}

.badge-neutral {
    background: rgba(148, 163, 184, .15);
    color: #94a3b8;
}

.result-cta {
    margin-top: 28px;
    padding-top: 24px;
    border-top: 1px solid var(--border);
    text-align: center;
}

.result-cta p {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-bottom: 16px;
}

.result-cta .btn {
    display: inline-block;
    padding: 12px 28px;
    font-weight: 700;
    border-radius: var(--radius);
    text-decoration: none;
    font-size: 0.95rem;
}

.calc-trust {
    text-align: center;
    padding: 32px 24px;
    font-size: 0.85rem;
    color: var(--text-light);
}

.calc-trust strong {
    color: var(--text-secondary);
}

/* Calculator email capture */
.calc-email-intro {
    font-size: 0.9rem;
    margin-bottom: 8px;
    color: var(--text-secondary);
}

.calc-email-form {
    display: flex;
    gap: 8px;
    max-width: 420px;
    margin: 0 auto 16px;
}

.calc-email-form input[type="email"] {
    flex: 1;
    padding: 10px 14px;
    border-radius: var(--radius);
    border: 1px solid var(--border);
    background: rgba(255, 255, 255, .08);
    color: var(--text);
    font-size: 0.9rem;
}

.calc-email-form .btn {
    white-space: nowrap;
    padding: 10px 18px;
}

.calc-confirm-box {
    display: none;
    max-width: 420px;
    margin: 0 auto 16px;
    background: linear-gradient(135deg, rgba(16, 185, 129, .12), rgba(25, 179, 166, .08));
    border: 1px solid rgba(16, 185, 129, .3);
    border-radius: var(--radius-lg);
    padding: 20px 24px;
    text-align: center;
    animation: confirmFadeIn .4s ease-out;
}

.calc-confirm-icon {
    width: 44px;
    height: 44px;
    margin: 0 auto 12px;
    border-radius: 50%;
    background: rgba(16, 185, 129, .15);
    display: flex;
    align-items: center;
    justify-content: center;
}

.calc-confirm-title {
    margin: 0 0 4px;
    font-size: 1rem;
    font-weight: 600;
    color: var(--success);
}

.calc-confirm-addr {
    margin: 0;
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.calc-error-msg {
    display: none;
    font-size: 0.85rem;
    color: var(--danger);
}

.calc-placeholder-emoji {
    font-size: 2rem;
    margin-bottom: 8px;
}

.calc-cta-subtext {
    margin-top: 8px;
    font-size: 0.85rem;
    color: var(--text-secondary);
}

@keyframes confirmFadeIn {
    from { opacity: 0; transform: translateY(8px) scale(.96); }
    to   { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes checkDraw {
    from { stroke-dashoffset: 30; }
    to   { stroke-dashoffset: 0; }
}

.calc-confirm-box svg polyline {
    stroke-dasharray: 30;
    animation: checkDraw .4s ease-out .15s both;
}

/* ============================================================================
   Monitor Login
   ============================================================================ */

.monitor-login-wrap {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: calc(100vh - 72px);
    padding: 32px;
    background: var(--bg-subtle);
}

.monitor-login-card {
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 40px;
    max-width: 400px;
    width: 100%;
    box-shadow: var(--shadow-lg);
}

.monitor-login-header {
    text-align: center;
    margin-bottom: 24px;
}

.monitor-login-header img {
    margin-bottom: 12px;
}

.monitor-login-header h1 {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text);
    margin: 0 0 8px;
}

.monitor-login-header p {
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin: 0;
}

.monitor-login-error {
    background: var(--danger-light);
    color: var(--danger);
    padding: 10px 16px;
    border-radius: var(--radius);
    font-size: 14px;
    margin-bottom: 16px;
}

.monitor-login-footer {
    text-align: center;
    margin-top: 16px;
}

.monitor-login-footer a {
    font-size: 13px;
    color: var(--text-secondary);
}

/* ============================================================================
   2FA Components
   ============================================================================ */

.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 20px;
    border-radius: var(--radius);
    font-weight: 600;
}

.status-badge--success {
    background: rgba(43, 182, 115, .1);
    color: var(--success);
}

.status-badge--warning {
    background: rgba(255, 181, 71, .1);
    color: var(--warning);
}

.status-badge--danger {
    background: rgba(229, 57, 53, .1);
    color: var(--danger);
}

.totp-input {
    text-align: center;
    font-size: 24px;
    letter-spacing: 6px;
    font-family: var(--font-mono);
}

.totp-input-sm {
    text-align: center;
    font-size: 20px;
    letter-spacing: 4px;
    font-family: var(--font-mono);
}

.card-centered {
    text-align: center;
    margin: 20px 0;
}

.form-narrow {
    max-width: 400px;
    margin-left: auto;
    margin-right: auto;
}

.qr-code-wrap {
    display: inline-block;
    padding: 16px;
    background: white;
    border-radius: var(--radius-lg);
    box-shadow: 0 2px 12px rgba(0, 0, 0, .08);
}

.qr-code-wrap img {
    display: block;
    width: 192px;
    height: 192px;
}

.secret-key {
    display: inline-block;
    padding: 8px 16px;
    background: var(--bg-muted);
    border-radius: 6px;
    font-size: 13px;
    letter-spacing: 2px;
    word-break: break-all;
    user-select: all;
    font-family: var(--font-mono);
}

.backup-codes-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
    max-width: 320px;
    margin: 0 auto 16px;
}

.backup-code {
    display: block;
    padding: 8px;
    text-align: center;
    background: var(--bg-muted);
    border-radius: 6px;
    font-size: 14px;
    letter-spacing: 1px;
    font-family: var(--font-mono);
    user-select: all;
}

.backup-modal-overlay {
    position: fixed;
    inset: 0;
    z-index: 1000;
    background: rgba(0, 0, 0, .6);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    animation: modalFadeIn .2s ease;
}

.backup-modal {
    background: var(--bg);
    border-radius: var(--radius-xl);
    padding: 32px;
    max-width: 420px;
    width: 100%;
    box-shadow: 0 20px 60px rgba(0, 0, 0, .3);
    animation: modalSlideUp .25s ease;
}

@keyframes modalFadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

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

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

.alert-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    border-radius: 9px;
    background: var(--danger);
    color: #fff;
    font-size: 0.7rem;
    font-weight: 700;
    margin-left: 6px;
    line-height: 1;
}

.demo-banner {
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    color: #a8b2d1;
    padding: 10px 20px;
    border-radius: var(--radius);
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 0.85rem;
    border: 1px solid rgba(99, 102, 241, .25);
}

.demo-banner strong {
    color: #e2e8f0;
}

.demo-banner a {
    color: #818cf8;
}

.demo-banner-reset {
    background: rgba(99, 102, 241, .15);
    border: 1px solid rgba(99, 102, 241, .3);
    color: #818cf8;
    padding: 4px 12px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.8rem;
}

.demo-upgrade-hint {
    background: linear-gradient(135deg, #1e293b 0%, #1e1b4b 100%);
    border: 1px solid rgba(99, 102, 241, .25);
    border-radius: var(--radius);
    padding: 16px 20px;
    margin: 12px 0;
    color: #a8b2d1;
    font-size: 0.9rem;
    text-align: center;
}

.demo-upgrade-hint a {
    color: #818cf8;
    font-weight: 600;
}

.sidebar-spacer {
    margin-top: auto;
}

.alert-icon {
    font-size: 20px;
    flex-shrink: 0;
}

.alert-subtext {
    margin: 4px 0 0;
    font-size: 13px;
    color: var(--text-light);
}

.btn-mt-s {
    margin-top: 8px;
}

.ml-auto {
    margin-left: auto;
}

/* -- Layout utilities -- */
.d-inline { display: inline; }
.d-flex { display: flex; }
.flex-wrap { flex-wrap: wrap; }
.flex-1 { flex: 1; }
.flex-col-stretch { flex-direction: column; align-items: stretch; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.gap-xs { gap: 6px; }
.gap-s { gap: 8px; }
.gap-m { gap: 10px; }
.gap-default { gap: 12px; }
.gap-l { gap: 16px; }

/* -- Spacing utilities -- */
.mt-s { margin-top: 8px; }
.mt-m { margin-top: 12px; }
.mt-default { margin-top: 16px; }
.mt-l { margin-top: 20px; }
.mt-xl { margin-top: 24px; }
.mt-2xl { margin-top: 32px; }
.mb-s { margin-bottom: 8px; }
.mb-m { margin-bottom: 12px; }
.mb-default { margin-bottom: 16px; }
.mb-l { margin-bottom: 24px; }
.m-0 { margin: 0; }

/* -- Text utilities -- */
.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }
.text-muted { color: var(--text-light); }
.text-secondary { color: var(--text-secondary); }
.text-success { color: var(--success); }
.text-success-bold { color: var(--success); font-weight: 600; }
.text-danger { color: var(--danger); }
.text-danger-bold { color: var(--danger); font-weight: 600; }
.text-warning { color: var(--warning); }
.text-accent { color: var(--accent); }
.text-default { color: var(--text); }
.text-sm { font-size: 13px; }
.text-sm-muted { font-size: 13px; color: var(--text-light); }
.text-xs { font-size: 12px; }
.font-mono-sm { font-family: var(--font-mono); font-size: 12px; }
.font-semibold { font-weight: 600; }
.font-bold-xl { font-size: 1.8rem; font-weight: 700; }
.text-label-muted { font-size: 0.85rem; color: var(--text-light); }

/* -- Overflow -- */
.overflow-x-auto { overflow-x: auto; }

/* -- Table utilities -- */
.table-full { width: 100%; border-collapse: collapse; font-size: 0.9rem; }
.table-cell { padding: 12px 16px; }
.table-head-border { border-bottom: 2px solid var(--border); text-align: left; }
.table-row-border { border-bottom: 1px solid var(--border); }
.table-row-inactive { opacity: 0.5; }

/* -- Card utilities -- */
.card-pad-compact { padding: 16px 20px; }
.card-empty-state { text-align: center; padding: 60px 24px; }

/* -- Billing section borders -- */
.billing-card--border-left { border-left: 3px solid var(--border); }
.billing-card--border-danger { border-left: 3px solid var(--danger); }
.billing-card--border-warning { border-left: 3px solid var(--warning); }

/* -- Dashboard-specific components -- */
.dash-header-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
}

.dash-value-sm { font-size: 18px; }

.summary-cards {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
}

.summary-card-inner {
    flex: 1;
    min-width: 200px;
    text-align: center;
}

.schedule-actions {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}

.btn-table-sm {
    font-size: 0.78rem;
    padding: 4px 10px;
}

.btn-danger-outline {
    color: #ef4444;
    border-color: #ef4444;
}

.freq-badge {
    padding: 2px 10px;
    border-radius: 4px;
    font-size: 0.8rem;
    font-weight: 600;
}

.freq-badge--weekly { background: #e8f4fd; color: #2980b9; }
.freq-badge--monthly { background: #eafaf1; color: #27ae60; }
.freq-badge--quarterly { background: #fef3e2; color: #f39c12; }

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

.info-box {
    padding: 16px 20px;
    border: 1px solid var(--border);
    border-radius: 8px;
    font-size: 0.85rem;
    color: var(--text-light);
}

.empty-howto {
    padding: 20px;
    background: var(--bg-muted, #f8f9fa);
    border-radius: 8px;
    text-align: left;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.empty-howto h3 { margin-bottom: 12px; font-size: 0.95rem; }
.empty-howto ol { color: var(--text-light); font-size: 0.9rem; line-height: 1.8; padding-left: 20px; }

.empty-icon { font-size: 3rem; margin-bottom: 16px; }

.invoice-pdf-btn {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 12px;
    padding: 4px 10px;
}

.banner-flex {
    display: flex;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
}

.banner-content {
    flex: 1;
    min-width: 200px;
}

.qb-setup-text {
    font-size: 13px;
    color: var(--text-light);
    margin-bottom: 12px;
}

.qb-details { margin-bottom: 12px; }

.qb-details summary {
    cursor: pointer;
    font-weight: 600;
    font-size: 13px;
    color: var(--accent);
}

.qb-details ol {
    font-size: 13px;
    color: var(--text-light);
    margin: 10px 0 0 16px;
    line-height: 1.8;
}

.qb-details a { color: #2CA01C; }

.qb-error-text { color: #ef4444; font-size: 13px; }

.save-msg-inline { display: none; margin-left: 12px; }

/* ── Dashboard page utilities (cancel, delete, checkout, faq) ── */
.mb-20 { margin-bottom: 20px; }
.mb-28 { margin-bottom: 28px; }

.billing-card--border-accent { border-left: 3px solid var(--accent); }

.btn-row--center {
    display: flex;
    gap: 12px;
    justify-content: center;
    flex-wrap: wrap;
}

.stack-8  { display: flex; flex-direction: column; gap: 8px; }
.stack-12 { display: flex; flex-direction: column; gap: 12px; }
.stack-16 { display: flex; flex-direction: column; gap: 16px; }

.icon-row {
    display: flex;
    align-items: flex-start;
    gap: 12px;
}

.icon-row-10 {
    display: flex;
    align-items: flex-start;
    gap: 10px;
}

.emoji-hero {
    font-size: 56px;
    margin-bottom: 16px;
}

.emoji-hero--sm {
    font-size: 48px;
    margin-bottom: 16px;
}

.icon-lg { font-size: 20px; }
.icon-md { font-size: 18px; }

.max-w-md { max-width: 520px; }

.nav-logo-centered {
    justify-content: center;
    margin-bottom: 24px;
}

.info-panel {
    background: var(--bg-subtle);
    border-radius: 8px;
    padding: 16px;
    font-size: 13px;
}

.info-panel--whats-next {
    background: var(--bg-subtle);
    border-radius: 12px;
    padding: 20px;
    max-width: 380px;
    margin: 0 auto 24px;
    text-align: left;
}

.option-card {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 12px;
    background: var(--bg-subtle);
    border-radius: 8px;
}

.form-label-bold {
    font-weight: 600;
    margin-bottom: 8px;
    display: block;
}

.form-label-normal {
    font-weight: 400;
    display: block;
    margin-bottom: 4px;
}

.form-hint {
    font-size: 12px;
    color: var(--text-light);
    margin-top: 4px;
}

.radio-label {
    font-weight: 400;
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
}

.checkbox-label {
    font-weight: 400;
    display: flex;
    align-items: flex-start;
    gap: 8px;
    cursor: pointer;
}

.list-compact {
    margin: 0;
    padding-left: 20px;
    font-size: 13px;
    line-height: 1.8;
    color: var(--text);
}

.list-spaced {
    margin: 0;
    padding-left: 20px;
    font-size: 14px;
    line-height: 2;
}

.list-report {
    font-size: 14px;
    line-height: 1.8;
    color: var(--text-secondary);
    padding-left: 20px;
    margin: 8px 0;
}

.list-whats-next {
    margin: 8px 0 0;
    padding-left: 20px;
    line-height: 1.8;
}

.btn-danger {
    background: var(--danger);
    color: white;
    border: none;
}

.dash-card--min-w { min-width: 120px; }

/* -- Analysis Detail components -- */
.ad-original-query {
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.7;
    font-style: italic;
    padding-left: var(--space-m);
    border-left: 3px solid var(--border);
}

.ad-json-fallback {
    background: var(--bg-subtle);
    padding: var(--space-m);
    border-radius: var(--radius);
    font-size: 13px;
    overflow-x: auto;
    color: var(--text);
    font-family: var(--font-mono);
    line-height: 1.5;
    white-space: pre-wrap;
}

.ad-disclaimer {
    text-align: center;
    padding: var(--space-m) 0 0;
    font-size: 12px;
    color: var(--text-light);
}

.ad-disclaimer a {
    color: var(--accent);
    text-decoration: underline;
}

.section-heading {
    margin: 0 0 2px;
}

.section-subtext {
    margin: 0;
    font-size: 13px;
    color: var(--text-light);
}

.badge--sm {
    font-size: 11px;
}

.dash-card-value--md {
    font-size: 15px;
}

.dash-cards--detail {
    grid-template-columns: repeat(auto-fit, minmax(155px, 1fr));
}

/* -- Upgrade Gate (new_analysis) -- */
.upgrade-gate {
    background: linear-gradient(135deg, var(--card-bg) 0%, rgba(24, 84, 180, 0.08) 100%);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 40px 32px;
    text-align: center;
    margin-bottom: var(--space-l);
}

.upgrade-gate h2 {
    margin: 0 0 12px;
}

.empty-state-text {
    color: var(--text-light);
    max-width: 540px;
    margin: 0 auto var(--space-l);
    line-height: 1.7;
}

/* -- Alert Center -- */
.alert-filter-nav {
    display: flex;
    gap: var(--space-s);
    margin-bottom: var(--space-l);
    flex-wrap: wrap;
}

.alert-card-row {
    display: flex;
    align-items: flex-start;
    gap: 12px;
}

.alert-icon {
    font-size: 1.5rem;
    flex-shrink: 0;
    margin-top: 2px;
}

.alert-content {
    flex: 1;
    min-width: 0;
}

.alert-title-row {
    display: flex;
    align-items: center;
    gap: var(--space-s);
    flex-wrap: wrap;
    margin-bottom: var(--space-xs);
}

.alert-title {
    margin: 0;
    font-size: 0.95rem;
}

.alert-unread-dot {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #3498db;
}

.alert-severity-tag {
    font-size: 0.75rem;
    padding: 2px 8px;
    border-radius: var(--radius-sm);
    font-weight: 600;
}

.alert-type-tag {
    font-size: 0.75rem;
    padding: 2px 8px;
    border-radius: var(--radius-sm);
    background: var(--bg-muted, #f0f0f0);
    color: var(--text-light);
}

.alert-message {
    margin: 6px 0;
    font-size: 0.88rem;
    color: var(--text-light);
    line-height: 1.5;
    white-space: pre-line;
}

.alert-metric-box {
    margin-top: var(--space-s);
    padding: 8px 12px;
    background: var(--bg-muted, #f8f9fa);
    border-radius: 6px;
    font-size: 0.85rem;
    display: inline-flex;
    gap: var(--space-m);
    flex-wrap: wrap;
}

.alert-meta-row {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 10px;
    font-size: 0.8rem;
    color: var(--text-light);
}

.alert-mark-read-btn {
    font-size: 0.78rem;
    padding: 2px 10px;
}

/* -- Trend Dashboard -- */
.trend-page-title {
    margin-bottom: 0.5rem;
}

.trend-page-subtitle {
    color: var(--text-light);
    margin-bottom: 1.5rem;
}

.trend-form-row {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.trend-form-label {
    font-weight: 600;
}

/* -- New Analysis Form -- */
.na-textarea {
    resize: vertical;
    font-family: var(--font);
}

.na-char-count {
    font-size: 12px;
    color: var(--text-light);
    margin-top: var(--space-xs);
    display: block;
}

.na-quota-text {
    margin-top: 12px;
    font-size: 13px;
    color: var(--text-light);
}

.na-wizard-nav--mt {
    margin-top: var(--space-l);
}

.na-spinner-inline {
    width: 16px;
    height: 16px;
    border-width: 2px;
    display: inline-block;
    vertical-align: middle;
    margin-right: var(--space-s);
}

.na-crm-icon--hubspot {
    background: rgba(255, 122, 89, 0.15);
}

.na-crm-label--hubspot {
    font-size: 18px;
    font-weight: bold;
    color: #FF7A59;
}

.na-crm-label--salesforce {
    font-size: 14px;
    font-weight: bold;
    color: #00A1E0;
}

.na-crm-btn--hubspot {
    background: linear-gradient(135deg, #FF7A59, #e0583e);
}

.na-crm-icon--quickbooks {
    background: rgba(44, 160, 28, 0.15);
}

.na-crm-label--quickbooks {
    font-size: 14px;
    font-weight: bold;
    color: #2CA01C;
}

.na-crm-btn--quickbooks {
    background: linear-gradient(135deg, #2CA01C, #1e7a14);
}

.na-upgrade-link {
    color: var(--accent);
    text-decoration: underline;
}

.text-no-decoration {
    text-decoration: none;
}

.td-truncate {
    max-width: 300px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.mr-s {
    margin-right: var(--space-s);
}

.d-none {
    display: none;
}

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

@media (max-width: 768px) {
    .calc-layout {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 1024px) {
    .nav-hamburger {
        display: flex;
    }

    .nav-links {
        display: none;
        position: absolute;
        top: 72px;
        left: 0;
        right: 0;
        flex-direction: column;
        background: var(--bg, #fff);
        backdrop-filter: blur(12px);
        border-bottom: 1px solid var(--border);
        padding: 16px 24px;
        gap: 8px;
        box-shadow: var(--shadow-md);
    }

    .nav-links.open {
        display: flex;
    }

    .nav-links a {
        padding: 10px 0;
        font-size: 16px;
    }

    .nav-cta {
        display: none;
    }

    .hero {
        padding: 120px 0 60px;
    }

    .stats-row {
        gap: 32px;
    }

    .pricing-grid {
        grid-template-columns: 1fr;
        max-width: 400px;
    }

    .dash-sidebar {
        display: none;
    }

    .dash-main {
        margin-inline-start: 0;
        padding-bottom: 80px;
    }

    .dash-bottom-nav {
        display: block;
    }

    .dash-cards {
        grid-template-columns: 1fr 1fr;
    }

    .footer-inner {
        flex-direction: column;
        text-align: center;
    }

    .signup-box {
        padding: 32px 20px;
    }

    .analysis-meta-cards {
        grid-template-columns: 1fr 1fr;
    }

    /* U4: 44px minimum touch targets on mobile */
    .btn,
    .btn-sm {
        min-height: 44px;
        min-width: 44px;
    }

    .dash-bottom-nav-inner a {
        min-height: 44px;
        min-width: 44px;
    }

    .nav-links a {
        min-height: 44px;
    }

    .filter-select,
    .form-input,
    select {
        min-height: 44px;
    }

    .toggle-switch {
        min-width: 48px;
        min-height: 44px;
    }

    /* U11: Responsive tables on mobile */
    .dash-table-wrap table {
        display: block;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .dash-table-wrap thead {
        white-space: nowrap;
    }
}

/* ============================================================================
   UX Improvements
   ============================================================================ */

/* U3: Clickable row keyboard focus */
.clickable-row:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: -2px;
}

.clickable-row:focus-visible td {
    background: var(--accent-light);
}

/* U7: Password visibility toggle */
.password-wrapper {
    position: relative;
}

.password-wrapper .form-input {
    padding-right: 44px;
}

.pw-toggle-btn {
    position: absolute;
    right: 4px;
    top: 50%;
    transform: translateY(-50%);
    background: transparent;
    border: none;
    padding: 8px;
    cursor: pointer;
    color: var(--text-light);
    font-size: 16px;
    line-height: 1;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 36px;
    min-height: 36px;
}

.pw-toggle-btn:hover {
    color: var(--text);
    background: var(--bg-muted);
}

.pw-toggle-btn:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}

/* U6: Delete account confirmation step */
.delete-confirm-input {
    font-family: var(--font-mono);
    letter-spacing: 1px;
}

/* U16: Double-submit prevention */
.btn[data-submitting="true"] {
    opacity: 0.6;
    cursor: wait;
    pointer-events: none;
}

/* U35: Reduced motion */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}

/* U36: Print styles */
@media print {
    .nav,
    .dash-sidebar,
    .dash-bottom-nav,
    .btn,
    footer,
    .skip-link {
        display: none !important;
    }

    .dash-main {
        margin: 0 !important;
        padding: 0 !important;
    }

    body {
        font-size: 12pt;
        color: #000;
        background: #fff;
    }

    a {
        color: #000;
        text-decoration: underline;
    }

    a[href]::after {
        content: " (" attr(href) ")";
        font-size: 0.8em;
        color: #666;
    }

    a[href^="#"]::after,
    a[href^="javascript"]::after {
        content: "";
    }
}

/* U40: Autofill styles */
input:-webkit-autofill,
input:-webkit-autofill:hover,
input:-webkit-autofill:focus {
    -webkit-box-shadow: 0 0 0 30px var(--bg) inset !important;
    -webkit-text-fill-color: var(--text) !important;
    border-color: var(--accent) !important;
}

/* U41: Selection highlight */
::selection {
    background: rgba(24, 84, 180, 0.2);
    color: var(--text);
}

/* U43: Better table header styles */
table thead th {
    position: sticky;
    top: 0;
    background: var(--bg-subtle);
    z-index: 1;
}

/* U21: Save feedback animation */
.save-success {
    color: var(--success);
    font-size: 13px;
    font-weight: 500;
    animation: fadeInOut 3s forwards;
}

@keyframes fadeInOut {
    0% { opacity: 0; transform: translateY(-4px); }
    10% { opacity: 1; transform: translateY(0); }
    80% { opacity: 1; }
    100% { opacity: 0; }
}

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

    .hero-actions {
        flex-direction: column;
    }

    .analysis-meta-cards {
        grid-template-columns: 1fr;
    }

    .error-page .error-code {
        font-size: 64px;
    }
}

/* ============================================================================
   Notification / Toast System
   ============================================================================ */

#lg-notification-container {
    position: fixed;
    top: 80px;
    right: 20px;
    z-index: 10000;
    display: flex;
    flex-direction: column;
    gap: 8px;
    max-width: 400px;
    pointer-events: none;
}

.lg-toast {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 12px 16px;
    border-radius: var(--radius);
    background: var(--bg);
    border: 1px solid var(--border);
    box-shadow: var(--shadow-lg);
    font-size: 14px;
    color: var(--text);
    pointer-events: auto;
    opacity: 0;
    transform: translateX(40px);
    transition: opacity 0.25s ease, transform 0.25s ease;
}

.lg-toast-visible {
    opacity: 1;
    transform: translateX(0);
}

.lg-toast-leaving {
    opacity: 0;
    transform: translateX(40px);
}

.lg-toast-icon {
    flex-shrink: 0;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: 700;
    border-radius: 50%;
}

.lg-toast-success .lg-toast-icon {
    color: var(--success);
}

.lg-toast-error .lg-toast-icon {
    color: var(--danger);
}

.lg-toast-warning .lg-toast-icon {
    color: var(--warning);
}

.lg-toast-info .lg-toast-icon {
    color: var(--accent);
}

.lg-toast-success {
    border-left: 3px solid var(--success);
}

.lg-toast-error {
    border-left: 3px solid var(--danger);
}

.lg-toast-warning {
    border-left: 3px solid var(--warning);
}

.lg-toast-info {
    border-left: 3px solid var(--accent);
}

.lg-toast-message {
    flex: 1;
    line-height: 1.4;
}

.lg-toast-close {
    flex-shrink: 0;
    background: none;
    border: none;
    cursor: pointer;
    font-size: 16px;
    color: var(--text-light);
    padding: 0 2px;
    line-height: 1;
}

.lg-toast-close:hover {
    color: var(--text);
}

@media (max-width: 480px) {
    #lg-notification-container {
        left: 12px;
        right: 12px;
        max-width: 100%;
    }
}

/* ============================================================================
   Dark Mode — prefers-color-scheme
   ============================================================================ */

@media (prefers-color-scheme: dark) {
    :root {
        --primary: #E2E8F0;
        --primary-light: #CBD5E1;
        --accent: #4D8AE0;
        --accent-hover: #6BA0ED;
        --accent-light: #1A2D4D;
        --accent-teal: #2DD89F;
        --accent-teal-light: #0D3D35;
        --accent-amber: #FFB547;
        --accent-amber-light: #3D2E0F;
        --success: #34D399;
        --success-light: #064E3B;
        --warning: #FFB547;
        --warning-light: #78350F;
        --danger: #F87171;
        --danger-light: #7F1D1D;
        --text: #F8FAFC;
        --text-secondary: #CBD5E1;
        --text-light: #9CA3AF;
        --bg: #0F172A;
        --bg-subtle: #1E293B;
        --bg-muted: #334155;
        --border: #334155;
        --border-light: #1E293B;
        --shadow-sm: 0 1px 2px rgba(0, 0, 0, .3);
        --shadow: 0 1px 3px rgba(0, 0, 0, .4), 0 1px 2px rgba(0, 0, 0, .3);
        --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, .4), 0 2px 4px -2px rgba(0, 0, 0, .3);
        --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, .4), 0 4px 6px -4px rgba(0, 0, 0, .3);
        --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, .4), 0 8px 10px -6px rgba(0, 0, 0, .3);
    }

    body {
        color-scheme: dark;
    }

    img,
    svg {
        opacity: .92;
    }

    .nav,
    .footer {
        background: #0F172A;
        border-color: var(--border);
    }

    .nav.scrolled {
        background: rgba(15, 23, 42, .95);
    }

    .hero {
        background: linear-gradient(135deg, #0F172A 0%, #1E293B 100%);
    }

    .dash-sidebar {
        background: #1E293B;
        border-color: var(--border);
    }

    .dash-bottom-nav {
        background: #1E293B;
        border-color: var(--border);
    }

    .dash-card,
    .billing-card,
    .feature-card {
        background: var(--bg-subtle);
        border-color: var(--border);
    }

    .pricing-card {
        background: var(--bg-subtle);
        border-color: var(--border);
    }

    .pricing-card.popular {
        border-color: var(--accent);
    }

    .form-input,
    .form-textarea,
    .form-select {
        background: var(--bg-subtle);
        border-color: var(--border);
        color: var(--text);
    }

    .btn-secondary {
        background: var(--bg-muted);
        border-color: var(--border);
        color: var(--text);
    }

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

    .signup-box,
    .login-box {
        background: var(--bg-subtle);
        border-color: var(--border);
    }

    .badge {
        border-color: var(--border);
    }

    .alert {
        border-color: var(--border);
    }

    .alert-error {
        background: rgba(248, 113, 113, .15);
        color: #FCA5A5;
        border-color: rgba(248, 113, 113, .3);
    }

    .alert-success {
        background: rgba(52, 211, 153, .15);
        color: #6EE7B7;
        border-color: rgba(52, 211, 153, .3);
    }

    .alert-warning {
        background: rgba(255, 181, 71, .15);
        color: #FDE68A;
        border-color: rgba(255, 181, 71, .3);
    }

    .alert-info {
        background: rgba(77, 138, 224, .15);
        color: #93C5FD;
        border-color: rgba(77, 138, 224, .3);
    }

    .dash-table th {
        background: var(--bg-muted);
        color: var(--text-secondary);
    }

    .dash-table td {
        border-color: var(--border);
    }

    .dash-table tr:hover td {
        background: var(--bg-muted);
    }

    code,
    pre {
        background: var(--bg-muted);
        color: var(--text);
    }

    .faq-question {
        background: var(--bg-subtle);
        border-color: var(--border);
    }

    .faq-answer {
        background: var(--bg);
        border-color: var(--border);
    }

    ::selection {
        background: var(--accent);
        color: #fff;
    }
}

/* Legal pages — tables */
.legal-table {
    width: 100%;
    border-collapse: collapse;
    margin: 1rem 0 1.5rem;
    font-size: 0.95rem;
}
.legal-table th,
.legal-table td {
    border: 1px solid var(--border, #334155);
    padding: 0.6rem 0.8rem;
    text-align: left;
    vertical-align: top;
}
.legal-table th {
    background: var(--card-bg, #1e293b);
    font-weight: 600;
}

/* ============================================================================
   UX Medium & Minor Fixes (U19-U46)
   ============================================================================ */

/* U20: Max line length for readability */
.dash-main {
    max-width: 900px;
}

.billing-card p,
.legal-content p,
.faq-body p {
    max-width: 70ch;
}

/* U37: Custom scrollbar */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: var(--bg-subtle);
}

::-webkit-scrollbar-thumb {
    background: var(--border);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--text-light);
}

/* U39: Link hover underline in content areas */
.dash-main a:hover,
.billing-card a:hover,
.legal-content a:hover {
    text-decoration: underline;
}

/* U44: Metric values in monospace */
.dash-card-value,
.metric-value,
.readiness-number {
    font-family: var(--font-mono);
}

/* U45: Subtle hover animations for cards */
.dash-card {
    transition: transform var(--transition), box-shadow var(--transition);
}

.dash-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

/* U19: Better text contrast for light text */
.form-hint,
.login-subtitle {
    color: var(--text-secondary);
}