/* ════════════════════════════════════════
   RouteMyWork — 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);
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    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);
}

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

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

.cutroute-navbar .nav-link:hover,
.cutroute-navbar .nav-link.active {
    color: var(--white);
    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);
    color: var(--white);
}

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

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

.nav-cta-primary:hover {
    background: var(--accent-hover);
    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);
}

.old-way-list span {
    font-size: 0;
}

.old-way-list span::after {
    content: "\\f00d";
    font-family: "Font Awesome 6 Free";
    font-size: 0.875rem;
    font-weight: 900;
}

.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; }
}

/* ── Unified Authenticated Workspace ───────────────────────────────────── */
/* These tokens are the stable contract for application surfaces and states. */
:root {
    --cr-primary: #16803d;
    --cr-primary-hover: #106b32;
    --cr-sidebar: #071f2b;
    --cr-sidebar-raised: #0b2d3b;
    --cr-background: #f5f8f7;
    --cr-surface: #ffffff;
    --cr-border-subtle: #e4ebe8;
    --cr-text-muted: #667787;
    --cr-success: #16803d;
    --cr-warning: #c86b08;
    --cr-danger: #d43f3a;
    --cr-info: #2678c9;
    --cr-radius-card: 14px;
    --cr-radius-control: 10px;
}

.cutroute-app--internal {
    display: block;
    min-height: 100dvh;
    background: var(--cr-background);
}

.app-shell {
    display: grid;
    grid-template-columns: 252px minmax(0, 1fr);
    min-height: 100dvh;
}

.app-workspace {
    display: flex;
    min-width: 0;
    flex-direction: column;
}

/* Blazor moves focus to the page heading after navigation for screen readers. */
.app-workspace h1:focus {
    outline: none;
}

.app-sidebar {
    position: sticky;
    top: 0;
    display: flex;
    height: 100dvh;
    min-height: 0;
    flex-direction: column;
    overflow: hidden;
    color: rgba(232, 247, 240, 0.8);
    background:
        radial-gradient(circle at 10% 100%, rgba(43, 185, 98, 0.18), transparent 28rem),
        linear-gradient(180deg, #082938 0%, var(--cr-sidebar) 62%, #061923 100%);
    border-right: 1px solid rgba(255, 255, 255, 0.06);
    z-index: 1055;
}

.app-sidebar__brand {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 82px;
    padding: 0 1.3rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.app-sidebar__brand-link,
.app-sidebar__brand-link:hover {
    display: inline-flex;
    align-items: center;
    gap: 0.72rem;
    color: #fff;
    font-family: var(--font-heading);
    font-size: 1.35rem;
    font-weight: 800;
    letter-spacing: -0.04em;
    text-decoration: none;
}

.app-sidebar__mark,
.app-sidebar__business-mark {
    display: grid;
    width: 34px;
    height: 34px;
    place-items: center;
    border-radius: 11px;
    color: #c7f9d8;
    background: linear-gradient(145deg, #1b9b51, #0a6a37);
    box-shadow: 0 8px 20px rgba(4, 47, 30, 0.42);
}

.app-sidebar__close { display: none; }

.app-sidebar__nav {
    display: flex;
    min-height: 0;
    flex: 1;
    flex-direction: column;
    gap: 0.18rem;
    overflow-y: auto;
    padding: 1.1rem 0.85rem 1rem;
    scrollbar-width: thin;
}

.app-sidebar__section {
    margin: 0.85rem 0.55rem 0.36rem;
    color: rgba(201, 227, 220, 0.48);
    font-size: 0.64rem;
    font-weight: 800;
    letter-spacing: 0.13em;
    text-transform: uppercase;
}

.app-sidebar__section:first-child { margin-top: 0; }

.app-sidebar__nav a {
    display: flex;
    align-items: center;
    min-height: 39px;
    gap: 0.8rem;
    padding: 0.56rem 0.68rem;
    border: 1px solid transparent;
    border-radius: var(--cr-radius-control);
    color: rgba(230, 245, 239, 0.76);
    font-size: 0.88rem;
    font-weight: 650;
    line-height: 1.15;
    text-decoration: none;
    transition: background 150ms ease, color 150ms ease, border-color 150ms ease, transform 150ms ease;
}

.app-sidebar__nav a i {
    width: 1rem;
    color: rgba(201, 227, 220, 0.7);
    text-align: center;
}

.app-sidebar__nav a:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.075);
    transform: translateX(2px);
}

.app-sidebar__nav a.active {
    color: #fff;
    background: linear-gradient(135deg, #159447, #167839);
    border-color: rgba(202, 255, 219, 0.13);
    box-shadow: 0 7px 18px rgba(1, 45, 25, 0.35);
}

.app-sidebar__nav a.active i { color: #fff; }

.app-sidebar__account {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    gap: 0.62rem;
    margin: 0.9rem;
    padding: 0.78rem;
    border: 1px solid rgba(207, 240, 224, 0.12);
    border-radius: 13px;
    background: rgba(255, 255, 255, 0.055);
}

.app-sidebar__business-mark {
    width: 29px;
    height: 29px;
    border-radius: 9px;
    color: #8bedaf;
    background: rgba(35, 179, 86, 0.17);
    box-shadow: none;
    font-size: 0.78rem;
}

.app-sidebar__account-copy { min-width: 0; }
.app-sidebar__account-copy strong,
.app-sidebar__account-copy span { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.app-sidebar__account-copy strong { color: #fff; font-size: 0.76rem; }
.app-sidebar__account-copy span { margin-top: 0.1rem; color: rgba(220, 240, 230, 0.56); font-size: 0.66rem; }

.app-sidebar__billing,
.app-sidebar__billing:hover {
    display: grid;
    width: 27px;
    height: 27px;
    place-items: center;
    border-radius: 8px;
    color: #dcfae6;
    background: rgba(255, 255, 255, 0.09);
    font-size: 0.72rem;
    text-decoration: none;
}
.app-sidebar__billing span { display: none; }

.app-topbar {
    position: sticky;
    top: 0;
    display: flex;
    min-height: 72px;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.8rem clamp(1rem, 2.5vw, 2rem);
    background: rgba(255, 255, 255, 0.92);
    border-bottom: 1px solid var(--cr-border-subtle);
    backdrop-filter: blur(16px);
    z-index: 1040;
}

.app-topbar__left,
.app-topbar__actions,
.app-topbar__account { display: flex; align-items: center; }
.app-topbar__left { min-width: 0; gap: 0.85rem; }
.app-topbar__actions { flex-shrink: 0; gap: 0.65rem; }
.app-topbar__actions form { margin: 0; }

.app-topbar__menu,
.app-topbar__signout,
.app-topbar__icon {
    display: grid;
    width: 36px;
    height: 36px;
    place-items: center;
    border: 1px solid var(--cr-border-subtle);
    border-radius: 10px;
    color: #536675;
    background: #fff;
}

.app-topbar__menu { display: none; }
.app-topbar__signout { cursor: pointer; transition: border-color 150ms ease, color 150ms ease, background 150ms ease; }
.app-topbar__signout:hover { color: var(--cr-danger); border-color: #f2c5c2; background: #fff7f6; }
.app-topbar__icon { cursor: default; }

.app-topbar__search {
    display: flex;
    width: min(330px, 35vw);
    min-height: 36px;
    align-items: center;
    gap: 0.55rem;
    padding: 0 0.78rem;
    border: 1px solid var(--cr-border-subtle);
    border-radius: 9px;
    color: #94a2ae;
    background: #fbfcfc;
    font-size: 0.72rem;
}
.app-topbar__search i { color: #8a9aa5; }

.app-topbar__account,
.app-topbar__account:hover {
    gap: 0.55rem;
    color: var(--cr-text);
    text-decoration: none;
}
.app-topbar__avatar {
    display: grid;
    width: 34px;
    height: 34px;
    place-items: center;
    border: 2px solid #dcefe2;
    border-radius: 50%;
    color: #fff;
    background: linear-gradient(145deg, #256d49, #154c34);
    font-size: 0.67rem;
    font-weight: 800;
}
.app-topbar__account-copy { display: grid; line-height: 1.15; }
.app-topbar__account-copy strong { max-width: 150px; overflow: hidden; font-size: 0.72rem; text-overflow: ellipsis; white-space: nowrap; }
.app-topbar__account-copy small { margin-top: 0.15rem; color: var(--cr-text-muted); font-size: 0.64rem; }
.app-topbar__chevron { color: #9ba9b4; font-size: 0.67rem; }

.main-content--app {
    flex: 1;
    min-width: 0;
    padding: clamp(1rem, 2.4vw, 2rem);
    background:
        radial-gradient(circle at 100% 0%, rgba(49, 167, 101, 0.07), transparent 23rem),
        var(--cr-background);
}

.main-content--app > .impersonation-banner { margin: -0.35rem -0.35rem 1rem; border-radius: var(--cr-radius-control); }

/* The existing dashboard supplies data and panels; the shell now owns navigation. */
.app-workspace .dashboard-shell { display: block; min-height: 0; padding: 0; }
.app-workspace .dashboard-shell > .dashboard-sidebar,
.app-workspace .dashboard-topbar { display: none; }
.app-workspace .dashboard-main { min-height: 0; padding: 0; background: transparent; }

.dashboard-panel,
.dashboard-card,
.table-shell,
.form-card,
.form-section {
    border-color: var(--cr-border-subtle);
    border-radius: var(--cr-radius-card);
    box-shadow: 0 1px 2px rgba(13, 37, 46, 0.035), 0 6px 18px rgba(13, 37, 46, 0.035);
}

.dashboard-panel__header { padding: 1rem 1.1rem; }
.dashboard-panel__body { padding: 0 1.1rem 1.1rem; }
.dashboard-panel__title { font-size: 0.92rem; letter-spacing: -0.01em; }
.dashboard-panel__action { border-radius: 8px; font-size: 0.72rem; }
.dashboard-grid { gap: 1rem; }
.metric-card { min-height: 128px; border-radius: var(--cr-radius-card); }
.metric-card__icon { width: 43px; height: 43px; border-radius: 13px; }
.card-label { color: #748393; font-size: 0.68rem; letter-spacing: 0.08em; }
.card-value { font-size: clamp(1.45rem, 2vw, 1.9rem); }

.page-shell { width: min(100%, 1440px); padding: 0; }
.page-header-card { padding: 1.25rem 0; border: 0; border-radius: 0; box-shadow: none; background: transparent; backdrop-filter: none; }
.page-header { margin-bottom: 1.35rem; }
.page-title { font-size: clamp(1.65rem, 2.2vw, 2.25rem); }
.page-subtitle { font-size: 0.9rem; }
.section-label { color: var(--cr-primary); font-size: 0.67rem; }

.table-shell { overflow-x: auto; }
.table-shell .table thead th,
.main-content--app .table thead th {
    padding: 0.82rem 1rem;
    color: #71808d;
    background: #f8faf9;
    border-bottom-color: var(--cr-border-subtle);
    font-size: 0.68rem;
}
.table-shell .table tbody td,
.main-content--app .table tbody td { padding: 0.9rem 1rem; border-bottom-color: #edf1ef; }
.main-content--app .table-hover > tbody > tr:hover > * { --bs-table-accent-bg: #f4faf6; }

.form-card,
.form-section { padding: clamp(1rem, 2vw, 1.5rem); }
.form-label { color: #304250; font-size: 0.82rem; }
.form-control,
.form-select,
.input-group-text { min-height: 42px; border-radius: var(--cr-radius-control); }
.btn { min-height: 38px; border-radius: 9px; font-size: 0.84rem; }
.btn-primary { background: var(--cr-primary); border-color: var(--cr-primary); }
.btn-primary:hover,
.btn-primary:focus { background: var(--cr-primary-hover); border-color: var(--cr-primary-hover); }
.btn-outline-primary { color: var(--cr-primary); border-color: rgba(22, 128, 61, 0.32); }
.btn-outline-primary:hover { background: var(--cr-primary); border-color: var(--cr-primary); }
.status-badge { padding: 0.27rem 0.58rem; font-size: 0.67rem; }

/* Crew is a responsive work surface, not an in-app phone mockup. */
.app-workspace .crew-mobile-page { display: block; }
.app-workspace .crew-mobile-frame {
    width: min(100%, 760px);
    margin: 0 auto;
    padding: 0;
    border-radius: 0;
    color: var(--cr-text);
    background: transparent;
    box-shadow: none;
}
.app-workspace .crew-mobile-topbar { padding: 0 0 0.9rem; border-bottom: 1px solid var(--cr-border-subtle); }
.app-workspace .crew-mobile-topbar__subtitle { color: var(--cr-text-muted); }
.app-workspace .crew-mobile-summary { color: var(--cr-text); background: #fff; border-color: var(--cr-border-subtle); box-shadow: var(--cr-shadow-sm); }
.app-workspace .crew-mobile-summary__label { color: var(--cr-text-muted); }
.app-workspace .crew-mobile-frame .mobile-job-card { border-color: var(--cr-border-subtle); box-shadow: var(--cr-shadow-sm); }
.app-workspace .crew-mobile-nav { display: none; }

.client-portal-page { width: min(100%, 1240px); }
.client-portal-hero { border-radius: var(--cr-radius-card); box-shadow: 0 10px 26px rgba(16, 74, 44, 0.15); }
.client-portal-grid .dashboard-panel { min-height: 100%; }

@media (max-width: 960px) {
    .app-shell { grid-template-columns: 224px minmax(0, 1fr); }
    .app-sidebar__brand { padding-inline: 1rem; }
    .app-sidebar__nav { padding-inline: 0.65rem; }
    .app-sidebar__account { margin: 0.65rem; }
}

@media (max-width: 768px) {
    .app-shell { display: block; }
    .app-sidebar {
        position: fixed;
        top: 0;
        bottom: 0;
        left: 0;
        width: min(290px, calc(100vw - 3.5rem));
        height: 100dvh;
        transform: translateX(-105%);
        transition: transform 190ms ease;
        box-shadow: 20px 0 45px rgba(5, 24, 31, 0.2);
    }
    .app-sidebar--open { transform: translateX(0); }
    .app-sidebar__close { display: grid; width: 32px; height: 32px; place-items: center; border: 0; border-radius: 9px; color: #d8eee3; background: rgba(255,255,255,0.08); }
    .app-sidebar__backdrop { position: fixed; z-index: 1050; inset: 0; width: 100%; height: 100%; border: 0; background: rgba(5, 19, 25, 0.42); }
    .app-topbar { min-height: 62px; padding-inline: 1rem; }
    .app-topbar__menu { display: grid; }
    .app-topbar__search { display: none; }
    .app-topbar__account-copy,
    .app-topbar__chevron,
    .app-topbar__signout { display: none; }
    .main-content--app { padding: 1rem; }
    .main-content--app > .impersonation-banner { margin: 0 0 1rem; }
    .page-header-card { padding: 0; }
    .dashboard-panel__header { align-items: flex-start; }
}

@media (max-width: 480px) {
    .app-topbar__actions { gap: 0.45rem; }
    .app-topbar__icon { width: 33px; height: 33px; }
    .app-topbar__avatar { width: 33px; height: 33px; }
    .dashboard-panel__header,
    .dashboard-panel__body { padding-inline: 0.9rem; }
    .metric-card { min-height: 110px; }
    .client-portal-hero { padding: 1.25rem; }
}
/* Field workflows and workspace search retain usable controls at narrow widths. */
.workspace-search-form { display:flex; flex-wrap:wrap; gap:1rem; align-items:end; margin-bottom:1.5rem; }
.workspace-search-form > div { flex:1 1 180px; min-width:0; }
.workspace-search-form label { display:block; margin-bottom:.35rem; }
.crew-photo-preview { width:120px; height:120px; object-fit:cover; border-radius:8px; }
.skip-link { position:fixed; top:-100px; left:1rem; z-index:2000; background:white; color:#14532d; padding:1rem; }
.skip-link:focus { top:1rem; }
.main-content--app, .app-workspace, .page-shell { min-width:0; }
.list-group-item, .crew-mobile-topbar__content { overflow-wrap:anywhere; }
@media (max-width:767px) {
  .main-content--app .btn, .app-topbar .btn, .app-topbar__menu, .app-topbar__signout { min-height:44px; min-width:44px; }
  .app-topbar { gap:.5rem; padding-left:.75rem; padding-right:.75rem; }
  .app-topbar__left, .app-topbar__actions { gap:.4rem; }
  .crew-mobile-nav__item { min-height:48px; }
  .workspace-search-form > div { flex-basis:100%; }
}
.crew-mobile-topbar .btn-icon-soft { color:#14532d; background:#fff; border:1px solid #c9dfd1; min-height:44px; min-width:44px; }
@media (max-width:768px) {
  .app-sidebar:not(.app-sidebar--open) { visibility:hidden; }
  .app-sidebar__close { width:44px; height:44px; }
}
@media (max-width:768px) { .app-topbar__signout { display:grid; } }
