/* ════════════════════════════════════════
   CutRoute — Lawn Care SaaS Platform
   ════════════════════════════════════════ */

/* ── CSS Variables ── */
:root {
    /* Brand / Primary Palette */
    --primary: #0F3D3D;
    --primary-light: #1A6B6B;

    /* Dashboard Refresh Palette */
    --cr-navy: #0f172a;
    --cr-navy-2: #111827;
    --cr-surface: #ffffff;
    --cr-surface-2: #f8fafc;
    --cr-border: #e2e8f0;
    --cr-text: #0f172a;
    --cr-muted: #64748b;

    /* Accent / Action */
    --accent: #27AE60;
    --accent-hover: #219A52;
    --accent-light: rgba(39, 174, 96, 0.08);
    --accent-glow: rgba(39, 174, 96, 0.25);
    --brand-green: #27AE60;
    --cr-green: #16a34a;
    --cr-green-2: #22c55e;
    --cr-green-soft: #ecfdf5;

    /* Utility Colors */
    --secondary: #6C757D;
    --danger: #E74C3C;
    --warning: #F39C12;
    --info: #3498DB;
    --white: #FFFFFF;
    --bg-light: #F8F9FA;
    --bg-section: #F0F7F4;
    --text: #2C3E50;
    --text-light: #6B7280;
    --border: #E5E7EB;
    --border-light: #F3F4F6;
    --cr-blue: #2563eb;
    --cr-blue-soft: #eff6ff;
    --cr-amber: #f59e0b;
    --cr-amber-soft: #fffbeb;
    --cr-red: #ef4444;
    --cr-red-soft: #fef2f2;

    /* Shadows */
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.06);
    --shadow: 0 4px 12px rgba(0,0,0,0.08);
    --shadow-lg: 0 12px 40px rgba(0,0,0,0.1);
    --cr-shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.06);
    --cr-shadow-md: 0 12px 30px rgba(15, 23, 42, 0.08);
    --cr-shadow-lg: 0 24px 60px rgba(15, 23, 42, 0.14);

    /* Radii */
    --radius-sm: 8px;
    --radius: 12px;
    --radius-lg: 16px;
    --cr-radius-sm: 12px;
    --cr-radius-md: 18px;
    --cr-radius-lg: 28px;

    /* Typography */
    --font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    --font-heading: 'Space Grotesk', 'Inter', sans-serif;
}

/* ── Reset & Global ── */
* { box-sizing: border-box; }

html {
    scroll-behavior: smooth;
}

html, body {
    background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
    color: var(--cr-text);
}

body {
    font-family: var(--font-family);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    font-weight: 700;
}

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

/* ── App Shell ── */
.cutroute-app {
    min-height: 100vh;
    min-height: 100dvh;
    display: flex;
    flex-direction: column;
    background:
        radial-gradient(circle at top right, rgba(34, 197, 94, 0.08), transparent 28%),
        radial-gradient(circle at top left, rgba(37, 99, 235, 0.06), transparent 24%),
        linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
}

.main-content {
    flex: 1;
    padding-top: 80px;
}

.main-content--app {
    padding-top: 0;
}

/* Super Admin shell: platform navigation is deliberately separate from tenant navigation. */
.super-admin-shell {
    min-height: 100vh;
    min-height: 100dvh;
    background:
        radial-gradient(circle at 90% 0%, rgba(245, 158, 11, 0.12), transparent 22rem),
        linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
}

.super-admin-mode-bar {
    min-height: 2.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    background: #f59e0b;
    color: #172033;
    font-size: 0.84rem;
    font-weight: 800;
}

.super-admin-navigation {
    width: min(100% - 3rem, 1480px);
    margin: 0 auto;
    min-height: 5.1rem;
    display: flex;
    align-items: center;
    gap: 1.5rem;
    border-bottom: 1px solid var(--cr-border);
}

.super-admin-brand {
    display: flex;
    flex-direction: column;
    text-decoration: none;
    color: var(--cr-text);
    line-height: 1.15;
    min-width: max-content;
}

.super-admin-brand:hover { color: var(--cr-text); }

.super-admin-brand__eyebrow {
    color: var(--cr-muted);
    font-size: 0.66rem;
    font-weight: 800;
    letter-spacing: 0.16em;
    text-transform: uppercase;
}

.super-admin-brand__title {
    margin-top: 0.2rem;
    font-family: var(--font-heading);
    font-size: 1.1rem;
    font-weight: 800;
}

.super-admin-navigation__links {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    margin-left: auto;
}

.super-admin-navigation__links a,
.super-admin-account-link,
.super-admin-signout {
    display: inline-flex;
    align-items: center;
    gap: 0.42rem;
    padding: 0.5rem 0.68rem;
    border: 1px solid transparent;
    border-radius: 0.65rem;
    color: var(--cr-muted);
    background: transparent;
    font: inherit;
    font-size: 0.83rem;
    font-weight: 700;
    line-height: 1;
    text-decoration: none;
    white-space: nowrap;
    transition: background-color 150ms ease, color 150ms ease, border-color 150ms ease;
}

.super-admin-navigation__links a:hover,
.super-admin-account-link:hover,
.super-admin-signout:hover {
    color: var(--cr-text);
    background: #f8fafc;
    border-color: var(--cr-border);
}

.super-admin-navigation__links a.active {
    color: #9a5b00;
    background: #fff7e6;
    border-color: #fde2ad;
}

.super-admin-navigation__account {
    display: flex;
    align-items: center;
    gap: 0.2rem;
    padding-left: 0.75rem;
    border-left: 1px solid var(--cr-border);
}

.super-admin-navigation__account form { margin: 0; }

.super-admin-signout { cursor: pointer; }

.super-admin-content { padding-bottom: 2rem; }

@media (max-width: 1050px) {
    .super-admin-navigation {
        width: min(100% - 2rem, 1480px);
        flex-wrap: wrap;
        gap: 0.75rem;
        padding: 0.8rem 0;
    }

    .super-admin-navigation__links {
        order: 3;
        width: 100%;
        margin-left: 0;
        overflow-x: auto;
        padding-bottom: 0.15rem;
    }
}

@media (max-width: 620px) {
    .super-admin-mode-bar { min-height: 2.25rem; }
    .super-admin-navigation__links a span,
    .super-admin-account-link span,
    .super-admin-signout span { display: none; }
    .super-admin-navigation__links a,
    .super-admin-account-link,
    .super-admin-signout { padding: 0.56rem; }
    .super-admin-navigation__account { margin-left: auto; }
}

/* ── Page Layout ── */
.page-shell {
    width: min(100%, 1480px);
    margin: 0 auto;
    padding: 1.5rem;
}

.page-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}

.page-header-card {
    background: rgba(255, 255, 255, 0.72);
    border: 1px solid rgba(226, 232, 240, 0.9);
    border-radius: var(--cr-radius-lg);
    padding: 1.25rem 1.4rem;
    box-shadow: var(--cr-shadow-sm);
    backdrop-filter: blur(18px);
}

.page-header-compact {
    padding: 0;
}

.page-title {
    font-size: clamp(1.6rem, 2vw, 2.5rem);
    font-weight: 800;
    line-height: 1.2;
    margin: 0;
    color: var(--cr-text);
    letter-spacing: -0.03em;
}

.page-subtitle {
    margin: 0.5rem 0 0;
    color: var(--cr-muted);
    max-width: 60ch;
    font-size: 0.95rem;
}

.page-actions {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    justify-content: flex-end;
}

/* ── Navbar ── */
.cutroute-navbar {
    background: rgba(15, 23, 42, 0.92) !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06) !important;
    backdrop-filter: blur(18px);
    padding: 0.75rem 0;
    box-shadow: 0 2px 12px rgba(0,0,0,0.15);
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1030;
}

.cutroute-navbar .navbar-brand {
    font-family: var(--font-heading);
    font-size: 1.35rem;
    font-weight: 800;
    color: var(--white) !important;
}

.cutroute-navbar .navbar-brand i {
    color: var(--accent);
    font-size: 1.5rem;
}

.cutroute-navbar .nav-link {
    color: rgba(255,255,255,0.85) !important;
    font-size: 0.9rem;
    font-weight: 500;
    padding: 0.5rem 0.75rem !important;
    border-radius: var(--radius-sm);
    transition: all 0.15s;
}

.cutroute-navbar .nav-link:hover,
.cutroute-navbar .nav-link.active {
    color: var(--white) !important;
    background: rgba(255,255,255,0.1);
}

.cutroute-navbar .nav-link i {
    margin-right: 0.4rem;
    width: 1rem;
}

.super-admin-bar--starter { background: #0f2740; }
.super-admin-bar--growth { background: #2d8a49; }
.super-admin-bar--pro { background: #14532d; }

.nav-cta {
    border-color: rgba(255,255,255,0.3) !important;
    color: var(--white) !important;
}

.nav-cta:hover {
    background: rgba(255,255,255,0.1) !important;
    border-color: rgba(255,255,255,0.5) !important;
}

.nav-cta-primary {
    background: var(--accent) !important;
    color: var(--white) !important;
    border: none !important;
    font-weight: 600;
}

.nav-cta-primary:hover {
    background: var(--accent-hover) !important;
    transform: translateY(-1px);
}

/* ── Footer ── */
.cutroute-footer {
    background: #0f172a;
    color: rgba(255,255,255,0.8);
    margin-top: auto;
}

.cutroute-footer h6 {
    color: var(--white);
    font-size: 0.85rem;
}

.cutroute-footer-link {
    color: rgba(255,255,255,0.6);
    text-decoration: none;
    transition: color 0.15s;
}

.cutroute-footer-link:hover {
    color: var(--white);
}

.cutroute-footer-bottom {
    border-top: 1px solid rgba(255,255,255,0.1);
}

.cutroute-brand-icon {
    color: var(--accent);
}

/* ── Landing Page Hero ── */
.hero-section {
    position: relative;
    width: 100%;
    min-height: 90vh;
    display: flex;
    align-items: center;
    background: linear-gradient(160deg, #0F3D3D 0%, #1A6B6B 50%, #0F3D3D 100%);
    overflow: hidden;
}

.hero-grid-overlay {
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(39, 174, 96, 0.06) 1px, transparent 1px),
        linear-gradient(90deg, rgba(39, 174, 96, 0.06) 1px, transparent 1px);
    background-size: 60px 60px;
    pointer-events: none;
}

.hero-glow-1 {
    position: absolute;
    top: -20%;
    right: -10%;
    width: 600px;
    height: 600px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(39,174,96,0.12) 0%, transparent 70%);
    pointer-events: none;
}

.hero-content {
    position: relative;
    z-index: 2;
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.hero-title {
    font-size: 3.25rem;
    font-weight: 800;
    line-height: 1.1;
    color: var(--white);
    margin-bottom: 1rem;
}

.hero-subtitle {
    font-size: 1.15rem;
    color: rgba(255,255,255,0.75);
    line-height: 1.6;
    margin-bottom: 1.5rem;
    max-width: 520px;
}

.hero-actions {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.hero-trust {
    display: flex;
    gap: 1.5rem;
    flex-wrap: wrap;
}

.trust-item {
    font-size: 0.85rem;
    color: rgba(255,255,255,0.7);
}

.trust-item i { margin-right: 0.35rem; }

.btn-cta {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.85rem 2rem;
    background: var(--accent);
    color: var(--white);
    font-weight: 700;
    font-size: 1rem;
    border: none;
    border-radius: var(--radius-sm);
    transition: all 0.2s ease;
    text-decoration: none;
}

.btn-cta:hover {
    background: var(--accent-hover);
    transform: translateY(-2px);
    box-shadow: 0 8px 24px var(--accent-glow);
    color: var(--white);
}

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

/* Hero Visual */
.hero-visual-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    max-width: 420px;
}

.hero-stat-card {
    background: rgba(255,255,255,0.08);
    border: 1px solid rgba(255,255,255,0.12);
    border-radius: var(--radius);
    padding: 1.5rem;
    text-align: center;
    backdrop-filter: blur(12px);
}

.hero-stat-card.wide { grid-column: 1 / -1; }

.stat-icon { font-size: 1.5rem; color: var(--accent); margin-bottom: 0.5rem; }
.stat-number { font-size: 1.75rem; font-weight: 800; color: var(--white); }
.stat-label { font-size: 0.8rem; color: rgba(255,255,255,0.6); }

.scroll-indicator {
    position: absolute;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.25rem;
    color: rgba(255,255,255,0.4);
    font-size: 0.75rem;
    animation: bounce 2s infinite;
}

@keyframes bounce {
    0%, 100% { transform: translateX(-50%) translateY(0); }
    50% { transform: translateX(-50%) translateY(8px); }
}

/* ── Landing Cards ── */
.pain-card {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 2rem;
    text-align: center;
    height: 100%;
    transition: all 0.2s;
}

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

.feature-card {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 2rem;
    height: 100%;
    transition: all 0.25s ease;
    position: relative;
    overflow: hidden;
}

.feature-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--accent), var(--accent-hover));
    opacity: 0;
    transition: opacity 0.25s ease;
}

.feature-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-lg);
    border-color: var(--accent);
}

.feature-card:hover::before { opacity: 1; }

.feature-icon {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--accent-light);
    border-radius: var(--radius-sm);
    margin-bottom: 1rem;
    color: var(--accent);
    font-size: 1.25rem;
}

/* ── Section System ── */
.section { width: 100%; padding: 5rem 0; }
.section-inner { max-width: 1200px; margin: 0 auto; padding: 0 2rem; }
.section-label {
    display: inline-block;
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--accent);
    margin-bottom: 0.75rem;
}
.section-title { font-size: 2.5rem; font-weight: 800; line-height: 1.15; }
.section-sub { font-size: 1.1rem; max-width: 600px; line-height: 1.6; color: var(--text-light); }

/* Process Section */
.process-section {
    background: linear-gradient(160deg, #0F3D3D 0%, #1A6B6B 100%);
    color: var(--white);
    position: relative;
    overflow: hidden;
}

.process-step {
    text-align: center;
    padding: 2rem 1.5rem;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius);
    backdrop-filter: blur(8px);
    height: 100%;
}

.step-number {
    width: 48px; height: 48px;
    display: flex; align-items: center; justify-content: center;
    border-radius: 50%;
    background: var(--accent);
    color: var(--white); font-weight: 800;
    margin: 0 auto 1rem;
    font-size: 1.2rem;
}

/* CTA Section */
.cta-section {
    background: var(--bg-light);
    text-align: center;
}

/* ── Auth Pages ── */
.auth-page {
    background: linear-gradient(135deg, #0f172a 0%, #0b2b1a 100%);
}

.auth-card {
    background: var(--white);
    border-radius: 28px;
    padding: 2.5rem;
    width: 100%;
    max-width: 440px;
    box-shadow: var(--shadow-lg);
}

/* ── Dashboard Shell ── */
.dashboard-shell {
    display: grid;
    grid-template-columns: 290px minmax(0, 1fr);
    gap: 1rem;
    width: min(100%, 1480px);
    margin: 0 auto;
    padding: 1.5rem;
}

.dashboard-sidebar {
    background: linear-gradient(180deg, #0f172a 0%, #0b1726 100%);
    color: #fff;
    border-radius: 30px;
    box-shadow: var(--cr-shadow-lg);
    overflow: hidden;
    position: sticky;
    top: 1rem;
    align-self: start;
}

.dashboard-sidebar__brand {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1.25rem 1.25rem 1rem;
    font-size: 1.2rem;
    font-weight: 800;
}

.dashboard-sidebar__brand i { color: var(--cr-green-2); }

.dashboard-sidebar__nav {
    padding: 0.4rem 0.8rem 0.8rem;
}

.dashboard-sidebar__nav a {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    padding: 0.82rem 1rem;
    margin: 0.25rem 0;
    border-radius: 16px;
    color: rgba(255, 255, 255, 0.84);
    text-decoration: none;
    font-weight: 600;
}

.dashboard-sidebar__nav a:hover,
.dashboard-sidebar__nav a.active {
    background: rgba(34, 197, 94, 0.18);
    color: #fff;
}

.dashboard-sidebar__nav i {
    width: 1.2rem;
    color: var(--cr-green-2);
}

.dashboard-sidebar__panel {
    margin: 0.8rem;
    padding: 1rem;
    border-radius: 22px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.dashboard-sidebar__panel .progress {
    height: 8px;
    background: rgba(255, 255, 255, 0.12);
}

.dashboard-sidebar__button {
    width: 100%;
    margin-top: 0.85rem;
}

.dashboard-main {
    min-width: 0;
}

/* Dashboard Topbar */
.dashboard-topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1rem;
    padding: 0.95rem 1.1rem;
    border-radius: 24px;
    background: rgba(255, 255, 255, 0.78);
    border: 1px solid rgba(226, 232, 240, 0.9);
    box-shadow: var(--cr-shadow-sm);
    backdrop-filter: blur(16px);
}

.dashboard-topbar__search {
    flex: 1;
    max-width: 420px;
    position: relative;
}

.dashboard-topbar__search i {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: #94a3b8;
}

.dashboard-topbar__search input {
    min-height: 46px;
    padding-left: 2.5rem;
    border-radius: 16px;
}

.dashboard-topbar__user {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-weight: 700;
}

.dashboard-topbar__avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--cr-green-2), var(--cr-green));
    display: grid;
    place-items: center;
    color: #fff;
}

/* Dashboard Grid System */
.dashboard-grid {
    display: grid;
    gap: 1rem;
}

.dashboard-grid--metrics { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.dashboard-grid--cards { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.dashboard-grid--two { grid-template-columns: minmax(0, 1.35fr) minmax(0, 0.9fr); }
.dashboard-grid--three { grid-template-columns: repeat(3, minmax(0, 1fr)); }

/* Dashboard Panel */
.dashboard-panel {
    background: rgba(255, 255, 255, 0.82);
    border: 1px solid rgba(226, 232, 240, 0.92);
    border-radius: 28px;
    box-shadow: var(--cr-shadow-sm);
    overflow: hidden;
}

.dashboard-panel__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 1.1rem 1.2rem 0;
}

.dashboard-panel__body {
    padding: 1.1rem 1.2rem 1.2rem;
}

.dashboard-panel__title {
    margin: 0;
    font-weight: 800;
    font-size: 1rem;
}

.dashboard-panel__action {
    font-size: 0.85rem;
}

/* Dashboard Cards */
.dashboard-card,
.pricing-card,
.feature-card,
.pain-card,
.auth-card,
.metric-card,
.subscription-banner,
.mobile-job-card,
.table-shell,
.dashboard-surface {
    background: var(--cr-surface);
    border: 1px solid var(--cr-border);
    border-radius: var(--cr-radius-lg);
    box-shadow: var(--cr-shadow-sm);
}

.dashboard-card,
.metric-card,
.subscription-banner,
.mobile-job-card,
.table-shell {
    padding: 1.25rem;
}

.dashboard-card {
    background: var(--white);
    transition: all 0.2s;
}

.dashboard-card:hover,
.metric-card:hover,
.feature-card:hover,
.pain-card:hover {
    box-shadow: var(--cr-shadow-md);
}

.card-label,
.section-label,
.metric-card__subtext,
.empty-state__body,
.subscription-banner p,
.mobile-job-card__notes,
.page-subtitle,
.search-filter-bar__search input,
.table-muted {
    color: var(--cr-muted);
}

.card-label {
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-size: 0.75rem;
    font-weight: 700;
    margin-bottom: 0.25rem;
}

.card-value {
    font-size: clamp(1.75rem, 2vw, 2.35rem);
    font-weight: 800;
    line-height: 1.05;
    color: var(--cr-text);
}

.card-icon {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-sm);
    font-size: 1.25rem;
}

.admin-nav-card {
    cursor: pointer;
    transition: all 0.2s;
    text-decoration: none;
    color: var(--text);
}

.admin-nav-card:hover {
    border-color: var(--accent);
    box-shadow: var(--shadow);
    transform: translateY(-2px);
    color: var(--text);
}

/* Metric Cards */
.metric-card__top,
.subscription-banner,
.mobile-job-card__header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
}

.metric-card__icon {
    width: 52px;
    height: 52px;
    display: grid;
    place-items: center;
    border-radius: 16px;
    font-size: 1.2rem;
}

.tone-neutral { background: var(--cr-blue-soft); color: var(--cr-blue); }
.tone-green { background: var(--cr-green-soft); color: var(--cr-green); }
.tone-amber { background: var(--cr-amber-soft); color: var(--cr-amber); }
.tone-red { background: var(--cr-red-soft); color: var(--cr-red); }
.tone-slate { background: #f1f5f9; color: #334155; }

.metric-card__trend {
    margin-top: 0.85rem;
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    font-weight: 600;
    font-size: 0.85rem;
}

.trend-positive { color: var(--cr-green); }
.trend-negative { color: var(--cr-red); }

.metric-card__subtext {
    margin-top: 0.35rem;
    font-size: 0.9rem;
}

/* Status Badges */
.status-badge,
.badge-status {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
    border-radius: 999px;
    font-weight: 700;
    letter-spacing: 0.01em;
    white-space: nowrap;
}

.status-badge {
    padding: 0.38rem 0.75rem;
    font-size: 0.78rem;
}

.status-badge--compact { padding: 0.26rem 0.62rem; }

.status-badge--active,
.badge-status-active {
    background: var(--cr-green-soft);
    color: var(--cr-green);
}

.status-badge--pending,
.status-badge--info,
.badge-status-pending {
    background: var(--cr-blue-soft);
    color: var(--cr-blue);
}

.status-badge--warning,
.badge-status-completed {
    background: #eff6ff;
    color: var(--cr-blue);
}

.status-badge--danger,
.badge-status-suspended {
    background: var(--cr-red-soft);
    color: var(--cr-red);
}

.status-badge--neutral {
    background: #f1f5f9;
    color: #334155;
}

/* Plan Badge */
.plan-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.45rem 0.75rem;
    border-radius: 999px;
    background: #f8fafc;
    color: #334155;
    font-size: 0.82rem;
    font-weight: 700;
}

.plan-badge--featured {
    background: var(--cr-green-soft);
    color: var(--cr-green);
}

/* Empty States */
.empty-state {
    max-width: 640px;
    margin: 0 auto;
    padding: 2rem 1.25rem;
    text-align: center;
}

.empty-state__icon {
    width: 72px;
    height: 72px;
    margin: 0 auto 1rem;
    display: grid;
    place-items: center;
    border-radius: 24px;
    background: var(--cr-green-soft);
    color: var(--cr-green);
    font-size: 1.55rem;
}

.empty-state__title {
    margin: 0;
    font-size: 1.25rem;
    font-weight: 800;
}

.empty-state__body {
    margin: 0.45rem auto 1.25rem;
    max-width: 52ch;
}

.empty-state__actions,
.action-button-group,
.mobile-job-card__actions,
.subscription-banner__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
    justify-content: center;
}

/* Search / Filter Bar */
.search-filter-bar {
    display: flex;
    gap: 0.75rem;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1rem;
}

.search-filter-bar__search {
    position: relative;
    flex: 1 1 360px;
}

.search-filter-bar__search i {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: #94a3b8;
}

.search-filter-bar__search input {
    width: 100%;
    padding-left: 2.5rem;
    min-height: 48px;
    border-radius: 16px;
    border-color: var(--cr-border);
    background: #fff;
}

.search-filter-bar__actions {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

/* Subscription Banner */
.subscription-banner {
    background: linear-gradient(135deg, #0f172a 0%, #0b2f21 100%);
    color: #fff;
    align-items: center;
}

.subscription-banner h3 {
    margin: 0.15rem 0 0.25rem;
    font-size: 1.35rem;
}

.subscription-banner p {
    color: rgba(255, 255, 255, 0.72);
    margin: 0;
}

.subscription-banner__eyebrow {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: rgba(255, 255, 255, 0.58);
    font-weight: 700;
}

.subscription-banner__price {
    font-size: 2rem;
    font-weight: 800;
    text-align: right;
}

.subscription-banner .status-badge--active {
    background: rgba(34, 197, 94, 0.16);
    color: #bbf7d0;
}

.subscription-banner .status-badge--pending {
    background: rgba(37, 99, 235, 0.16);
    color: #dbeafe;
}

/* Mobile Job Card */
.mobile-job-card {
    padding: 1rem;
}

.mobile-job-card__header h3 {
    margin: 0.2rem 0 0.15rem;
    font-size: 1.05rem;
    font-weight: 800;
}

.mobile-job-card__header p {
    margin: 0;
    color: var(--cr-muted);
    font-size: 0.9rem;
}

.mobile-job-card__time {
    display: inline-flex;
    align-items: center;
    font-size: 0.78rem;
    color: var(--cr-green);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-bottom: 0.35rem;
}

.mobile-job-card__notes {
    margin-top: 0.85rem;
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
    padding: 0.85rem;
    border-radius: 14px;
    background: #f8fafc;
    font-size: 0.92rem;
}

.mobile-job-card__actions { margin-top: 1rem; }

/* Button Icon */
.btn-icon-soft {
    width: 42px;
    height: 42px;
    display: grid;
    place-items: center;
    border-radius: 14px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
}

.btn-icon-soft:hover {
    background: rgba(255, 255, 255, 0.14);
    color: #fff;
}

/* Crew Mobile View */
.crew-mobile-page { display: flex; justify-content: center; }

.crew-mobile-frame {
    width: min(100%, 430px);
    background: linear-gradient(180deg, #0f172a 0%, #122235 100%);
    border-radius: 34px;
    padding: 1rem;
    color: #fff;
    box-shadow: var(--cr-shadow-lg);
}

.crew-mobile-topbar {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.crew-mobile-topbar__content { flex: 1; }

.crew-mobile-topbar__greeting {
    font-size: 1.05rem;
    font-weight: 800;
}

.crew-mobile-topbar__subtitle {
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.85rem;
}

.crew-mobile-summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 22px;
    padding: 1rem;
    margin-bottom: 1rem;
}

.crew-mobile-summary__label {
    color: rgba(255, 255, 255, 0.64);
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-weight: 700;
}

.crew-mobile-summary__count {
    font-size: 2rem;
    font-weight: 800;
    line-height: 1;
}

.crew-mobile-frame .mobile-job-card {
    border-radius: 24px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: #fff;
}

.crew-mobile-nav {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.75rem;
    margin-top: 1rem;
}

.crew-mobile-nav__item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.35rem;
    padding: 0.8rem 0.5rem;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.08);
    color: rgba(255, 255, 255, 0.72);
    text-decoration: none;
    font-size: 0.82rem;
    font-weight: 700;
}

.crew-mobile-nav__item--active {
    background: linear-gradient(135deg, var(--cr-green), var(--cr-green-2));
    color: #fff;
}

/* Client Portal */
.client-portal-page { width: min(100%, 1200px); }

.client-portal-hero {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1rem;
    padding: 2rem;
    border-radius: 28px;
    background:
        linear-gradient(180deg, rgba(15, 23, 42, 0.35), rgba(15, 23, 42, 0.05)),
        linear-gradient(135deg, #14532d 0%, #166534 50%, #22c55e 100%);
    color: #fff;
    box-shadow: var(--cr-shadow-md);
    margin-bottom: 1rem;
    position: relative;
    overflow: hidden;
}

.client-portal-hero::after {
    content: "";
    position: absolute;
    inset: auto -8% -55% auto;
    width: 280px;
    height: 280px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.22), transparent 68%);
}

.client-portal-hero__title {
    font-size: clamp(2rem, 3vw, 2.8rem);
    font-weight: 800;
    line-height: 1;
    margin-bottom: 0.4rem;
    position: relative;
    z-index: 1;
}

.client-portal-hero__address {
    font-size: 0.95rem;
    color: rgba(255, 255, 255, 0.82);
    margin-bottom: 0.85rem;
    position: relative;
    z-index: 1;
}

.client-portal-hero__subtitle {
    max-width: 52ch;
    margin: 0;
    color: rgba(255, 255, 255, 0.88);
    position: relative;
    z-index: 1;
}

.client-portal-hero__action {
    position: relative;
    z-index: 1;
    border-radius: 16px;
}

.client-portal-grid .dashboard-panel { min-height: 100%; }

/* Route Progress */
.route-progress { margin-top: 1rem; }

.route-progress .progress {
    height: 10px;
    background: #e2e8f0;
    border-radius: 999px;
}

.route-progress .progress-bar {
    background: linear-gradient(90deg, var(--cr-green), var(--cr-green-2));
}

/* Tables */
.table-shell {
    overflow: hidden;
    padding: 0;
}

.table-shell .table { margin-bottom: 0; }

.table-shell .table thead th {
    background: #f8fafc;
    color: #334155;
    border-bottom: 1px solid var(--cr-border);
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.table-shell .table tbody td {
    vertical-align: middle;
    padding-top: 0.95rem;
    padding-bottom: 0.95rem;
}

/* Forms */
.form-card,
.form-section {
    background: var(--cr-surface);
    border: 1px solid var(--cr-border);
    border-radius: 24px;
    box-shadow: var(--cr-shadow-sm);
    padding: 1.25rem;
}

.form-label {
    font-weight: 700;
    color: #334155;
    font-size: 0.9rem;
}

.form-control,
.form-select,
.input-group-text {
    border-color: var(--cr-border);
    border-radius: 14px;
    min-height: 46px;
}

.form-control:focus,
.form-select:focus {
    border-color: rgba(34, 197, 94, 0.6);
    box-shadow: 0 0 0 0.2rem rgba(34, 197, 94, 0.14);
}

.input-group-text { background: var(--bg-light); border-color: var(--border); }

/* Buttons */
.btn { border-radius: 14px; font-weight: 700; }

.btn-primary {
    background: linear-gradient(135deg, var(--cr-green), var(--cr-green-2));
    border-color: var(--cr-green);
}

.btn-primary:hover {
    background: linear-gradient(135deg, #15803d, #16a34a);
    border-color: #15803d;
}

.btn-primary:focus { box-shadow: 0 0 0 0.2rem var(--accent-glow); }

.btn-outline-primary {
    color: var(--cr-green);
    border-color: rgba(34, 197, 94, 0.35);
}

.btn-outline-primary:hover {
    background: var(--cr-green);
    border-color: var(--cr-green);
    color: #fff;
}

.btn-outline-secondary {
    border-color: var(--cr-border);
}

/* ── Impersonation Banner ── */
.impersonation-banner {
    background: var(--warning);
    color: #1a1a1a;
    text-align: center;
    padding: 0.5rem;
    font-weight: 600;
    font-size: 0.9rem;
}

/* ── Pricing Cards Refresh ── */
.pricing-card {
    padding: 0;
    overflow: hidden;
}

.pricing-featured {
    transform: translateY(-6px);
    box-shadow: var(--cr-shadow-md);
}

.pricing-header,
.pricing-body,
.pricing-footer {
    padding-left: 1.5rem;
    padding-right: 1.5rem;
}

.pricing-header { padding-top: 1.5rem; }

.pricing-badge { background: var(--cr-green); }

/* ── Landing Page Refresh ── */
.landing-page .hero-section {
    min-height: calc(100vh - 80px);
    padding: 3rem 0 4rem;
    background:
        radial-gradient(circle at top right, rgba(34, 197, 94, 0.22), transparent 24%),
        radial-gradient(circle at top left, rgba(37, 99, 235, 0.14), transparent 24%),
        linear-gradient(140deg, #0f172a 0%, #0b2b1a 50%, #0f172a 100%);
}

.landing-page .section-title,
.landing-page .hero-title { letter-spacing: -0.04em; }

.landing-page .hero-subtitle { color: rgba(255, 255, 255, 0.76); }

.landing-page {
    background:
        radial-gradient(circle at top left, rgba(34, 197, 94, 0.08), transparent 20%),
        radial-gradient(circle at top right, rgba(37, 99, 235, 0.05), transparent 18%),
        linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
}

.landing-hero { padding-top: 2.5rem; }

.landing-hero__grid {
    display: grid;
    grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.05fr);
    gap: 2rem;
    align-items: center;
}

.landing-hero__copy { max-width: 720px; }

.landing-page .hero-title {
    color: var(--cr-text);
    margin-bottom: 1rem;
    border: 0;
    outline: 0;
    box-shadow: none;
    background: transparent;
}

.landing-hero__title {
    max-width: 12ch;
    isolation: isolate;
}

.landing-hero__subtitle {
    color: #475569;
    max-width: 58ch;
    margin-bottom: 0;
    border: 0;
    outline: 0;
    box-shadow: none;
    background: transparent;
}

.landing-trust-row {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    color: var(--cr-muted);
    font-size: 0.92rem;
}

.landing-mini-stats {
    margin-top: 1.5rem;
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0.8rem;
}

.landing-mini-stat {
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid var(--cr-border);
    border-radius: 20px;
    padding: 1rem;
    box-shadow: var(--cr-shadow-sm);
}

.landing-preview-shell {
    position: relative;
    padding-top: 1.5rem;
}

.landing-preview { padding: 1rem; }

.landing-preview-chip {
    position: absolute;
    top: 0;
    z-index: 2;
    min-width: 180px;
    background: rgba(255, 255, 255, 0.95);
    border: 1px solid rgba(226, 232, 240, 0.95);
    border-radius: 18px;
    padding: 0.9rem 1rem;
    box-shadow: var(--cr-shadow-md);
}

.landing-preview-chip--left { left: -0.5rem; }
.landing-preview-chip--right { right: -0.5rem; }

.landing-page .feature-card,
.landing-page .pain-card { padding: 1.5rem; }

.landing-page .feature-card::before {
    background: linear-gradient(90deg, var(--cr-green), var(--cr-green-2));
}

.landing-page .btn-cta {
    background: linear-gradient(135deg, var(--cr-green), var(--cr-green-2));
}

.landing-page .process-section {
    background: linear-gradient(140deg, #0f172a 0%, #0b2b1a 100%);
}

.landing-page .cta-section { background: transparent; }

/* ── Responsive ── */
@media (max-width: 1200px) {
    .dashboard-grid--metrics,
    .dashboard-grid--cards,
    .dashboard-grid--three {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .dashboard-grid--two { grid-template-columns: 1fr; }
    .dashboard-shell { grid-template-columns: 1fr; }

    .dashboard-sidebar {
        position: relative;
        top: auto;
    }

    .landing-hero__grid { grid-template-columns: 1fr; }
    .landing-hero__title { max-width: none; }
    .landing-mini-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 992px) {
    .hero-content { grid-template-columns: 1fr; gap: 2rem; text-align: center; }
    .hero-title { font-size: 2.5rem; }
    .hero-subtitle { margin: 0 auto 1.5rem; }
    .hero-actions { justify-content: center; }
    .hero-trust { justify-content: center; }
    .hero-visual-grid { margin: 0 auto; }
    .section-title { font-size: 2rem; }
}

@media (max-width: 768px) {
    .page-shell,
    .dashboard-shell { padding: 1rem; }

    .page-header,
    .dashboard-topbar,
    .subscription-banner,
    .mobile-job-card__header,
    .metric-card__top {
        flex-direction: column;
        align-items: flex-start;
    }

    .page-actions,
    .search-filter-bar {
        width: 100%;
        flex-direction: column;
        align-items: stretch;
    }

    .dashboard-grid--metrics,
    .dashboard-grid--cards,
    .dashboard-grid--three {
        grid-template-columns: 1fr;
    }

    .subscription-banner__price { text-align: left; }
    .landing-mini-stats { grid-template-columns: 1fr; }

    .landing-preview-chip {
        position: static;
        margin-bottom: 0.75rem;
        min-width: 0;
    }

    .landing-preview-shell { padding-top: 0; }

    .client-portal-hero {
        padding: 1.5rem;
        flex-direction: column;
    }

    .crew-mobile-frame {
        width: 100%;
        border-radius: 26px;
    }
}

@media (max-width: 640px) {
    .hero-title { font-size: 2rem; }
    .section-title { font-size: 1.65rem; }
    .hero-actions { flex-direction: column; }
    .hero-actions .btn { width: 100%; margin: 0 !important; }
    .hero-trust { flex-direction: column; align-items: center; gap: 0.5rem; }
    .page-shell { padding: 1rem; }
    .page-header { flex-direction: column; }
    .page-actions { width: 100%; }
    .page-actions .btn { flex: 1; }
    .auth-card { margin: 1rem; padding: 1.5rem; }
}
