/*
 * This is a manifest file that'll be compiled into application.css, which will include all the files
 * listed below.
 *
 * Any CSS (and SCSS, if configured) file within this directory, lib/assets/stylesheets, or any plugin's
 * vendor/assets/stylesheets directory can be referenced here using a relative path.
 *
 * You're free to add application-wide styles to this file and they'll appear at the bottom of the
 * compiled file so the styles you add here take precedence over styles defined in any other CSS
 * files in this directory. Styles in this file should be added after the last require_* statement.
 * It is generally better to create a new file per style scope.
 *


 */

:root {
    --bg-color: #08111f;
    --bg-elevated: #0d1728;
    --card-bg: rgba(14, 24, 40, 0.88);
    --card-strong: #101c31;
    --surface-muted: rgba(255, 255, 255, 0.05);
    --text-primary: #f3f7ff;
    --text-secondary: #94a8c6;
    --accent-primary: #5b8cff;
    --accent-secondary: #35c8b8;
    --accent-warm: #ff8f66;
    --success: #33d69f;
    --danger: #ff6b78;
    --warning: #ffcc66;
    --border-radius: 18px;
    --shadow: 0 20px 45px -28px rgba(0, 0, 0, 0.7);
    --shadow-lg: 0 30px 80px -40px rgba(0, 0, 0, 0.85);
    --font-family: 'Manrope', system-ui, -apple-system, sans-serif;
    --font-display: 'Space Grotesk', 'Manrope', system-ui, sans-serif;
    --bg-orb-1: rgba(91, 140, 255, 0.16);
    --bg-orb-2: rgba(53, 200, 184, 0.14);
    --bg-start: #09111f;
    --bg-end: #050b15;
    --grid-line: rgba(255, 255, 255, 0.03);
    --panel-border: rgba(255, 255, 255, 0.08);
    --soft-border: rgba(255, 255, 255, 0.12);
    --ghost-bg: rgba(255, 255, 255, 0.08);
    --ghost-bg-hover: rgba(255, 255, 255, 0.14);
    --ghost-border: rgba(255, 255, 255, 0.08);
}

body {
    background:
        radial-gradient(circle at top left, var(--bg-orb-1), transparent 28%),
        radial-gradient(circle at top right, var(--bg-orb-2), transparent 24%),
        linear-gradient(180deg, var(--bg-start) 0%, var(--bg-end) 100%);
    color: var(--text-primary);
    font-family: var(--font-family);
    margin: 0;
    padding: 0;
    /* Clear fixed .theme-toggle-fab when scrolled to the bottom */
    padding-bottom: calc(5.75rem + env(safe-area-inset-bottom, 0px));
    line-height: 1.6;
    min-height: 100vh;
    position: relative;
}

body::before {
    content: "";
    position: fixed;
    inset: 0;
    background-image: linear-gradient(var(--grid-line) 1px, transparent 1px),
        linear-gradient(90deg, var(--grid-line) 1px, transparent 1px);
    background-size: 72px 72px;
    mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.45), transparent 80%);
    pointer-events: none;
    opacity: 0.3;
}

:root[data-theme="light"] {
    --bg-color: #eef4fb;
    --bg-elevated: #ffffff;
    --card-bg: rgba(255, 255, 255, 0.9);
    --card-strong: #ffffff;
    --surface-muted: rgba(15, 23, 42, 0.05);
    --text-primary: #10203a;
    --text-secondary: #60738d;
    --shadow: 0 20px 45px -28px rgba(26, 51, 90, 0.2);
    --shadow-lg: 0 30px 80px -40px rgba(26, 51, 90, 0.25);
    --bg-orb-1: rgba(91, 140, 255, 0.18);
    --bg-orb-2: rgba(255, 143, 102, 0.14);
    --bg-start: #f8fbff;
    --bg-end: #edf3fb;
    --grid-line: rgba(16, 32, 58, 0.05);
    --panel-border: rgba(16, 32, 58, 0.08);
    --soft-border: rgba(16, 32, 58, 0.12);
    --ghost-bg: rgba(16, 32, 58, 0.04);
    --ghost-bg-hover: rgba(16, 32, 58, 0.08);
    --ghost-border: rgba(16, 32, 58, 0.08);
}

h1,
h2,
h3,
h4,
h5,
h6 {
    color: var(--text-primary);
    font-family: var(--font-display);
    letter-spacing: -0.03em;
    margin-top: 0;
}

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

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

.container {
    max-width: 1800px;
    width: 95%;
    margin: 0 auto;
    padding: 2rem;
    position: relative;
    z-index: 1;
}

/* Header */
.app-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 3rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding-bottom: 1rem;
}

.app-brand {
    font-size: 1.5rem;
    font-weight: 700;
    background: linear-gradient(to right, var(--accent-primary), var(--accent-secondary));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.5rem 1rem;
    border-radius: 999px;
    font-weight: 700;
    transition: all 0.2s;
    border: none;
    cursor: pointer;
    font-size: 0.9rem;
    gap: 0.4rem;
}

.btn-primary {
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
    color: white;
    box-shadow: 0 16px 30px -18px rgba(91, 140, 255, 0.9);
}

.btn-primary:hover {
    color: white;
    transform: translateY(-1px);
}

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

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

.btn-demo-green {
    background: linear-gradient(135deg, #15803d, #22c55e);
    color: white;
    border: 1px solid rgba(34, 197, 94, 0.72);
    box-shadow: 0 22px 42px -20px rgba(34, 197, 94, 0.92);
}

.btn-demo-green:hover {
    color: white;
    transform: translateY(-2px) scale(1.01);
    box-shadow: 0 26px 48px -20px rgba(34, 197, 94, 0.98);
}

.btn-demo-green-large {
    min-height: 88px;
    min-width: 320px;
    padding: 1.1rem 2.6rem;
    font-size: 1.08rem;
    font-weight: 900;
    letter-spacing: 0.01em;
    box-shadow: 0 28px 54px -22px rgba(34, 197, 94, 0.98);
}

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

.btn-danger:hover {
    background-color: #dc2626;
    transform: translateY(-1px);
}

.button_to {
    margin: 0;
}

/* Index Page: Car Grid */
.cars-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 2rem;
}

.car-card-wrapper {
    position: relative;
    display: flex;
    flex-direction: column;
}

.car-card {
    background-color: var(--card-bg);
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    position: relative;
    display: flex;
    flex-direction: column;
    text-decoration: none;
    color: inherit;
}

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

.delete-btn {
    margin-top: 0.75rem;
    width: 100%;
}

.car-image-placeholder {
    height: 180px;
    background-color: #334155;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
    font-size: 3rem;
}

.car-image {
    height: 180px;
    object-fit: cover;
    width: 100%;
}

.car-content {
    padding: 1.5rem;
    flex: 1;
}

.car-title {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}

.landing-page {
    max-width: 1320px;
    margin: 0 auto;
    padding: 1.5rem 1.5rem 5rem;
    position: relative;
    z-index: 1;
}

.landing-page::before {
    content: "";
    position: absolute;
    inset: 2rem 1rem auto;
    height: 520px;
    background:
        radial-gradient(circle at 15% 20%, rgba(91, 140, 255, 0.28), transparent 24%),
        radial-gradient(circle at 88% 14%, rgba(53, 200, 184, 0.22), transparent 22%),
        radial-gradient(circle at 60% 78%, rgba(255, 143, 102, 0.16), transparent 28%);
    filter: blur(24px);
    pointer-events: none;
    z-index: -1;
}

.landing-nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.9rem 1.1rem;
    background: rgba(8, 17, 31, 0.54);
    border: 1px solid var(--panel-border);
    border-radius: 999px;
    backdrop-filter: blur(18px);
    position: sticky;
    top: 1rem;
    z-index: 10;
    box-shadow: var(--shadow);
}

.landing-brand {
    display: inline-flex;
    align-items: center;
    gap: 0.8rem;
    color: var(--text-primary);
    font-family: var(--font-display);
    font-size: 1.1rem;
    font-weight: 700;
}

.landing-brand:hover {
    color: var(--text-primary);
}

.landing-brand-mark {
    width: 2.5rem;
    height: 2.5rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
    color: white;
    box-shadow: 0 16px 28px -18px rgba(91, 140, 255, 0.95);
}

.landing-nav-links,
.landing-nav-actions,
.landing-hero-actions,
.landing-report-actions,
.shared-report-cta-actions {
    display: flex;
    align-items: center;
    gap: 0.85rem;
}

.landing-nav-links a {
    color: var(--text-secondary);
    font-size: 0.95rem;
    font-weight: 600;
}

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

.landing-main {
    display: flex;
    flex-direction: column;
    gap: 4rem;
    margin-top: 2.5rem;
}

.landing-hero,
.landing-report-band,
.landing-final-cta,
.shared-report-cta {
    background: linear-gradient(180deg, rgba(16, 28, 49, 0.9), rgba(9, 17, 31, 0.78));
    border: 1px solid var(--panel-border);
    box-shadow: var(--shadow-lg);
}

.landing-hero {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(420px, 0.9fr);
    gap: 3.5rem;
    align-items: center;
    padding: 3.5rem;
    border-radius: 38px;
    overflow: hidden;
}

.landing-kicker {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--accent-secondary);
    font-size: 0.88rem;
    font-weight: 800;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    margin-bottom: 1rem;
}

.landing-hero h1,
.landing-section-heading h2,
.landing-report-band h2,
.landing-final-cta h2,
.shared-report-cta h2 {
    font-size: clamp(3.2rem, 5vw, 5.6rem);
    line-height: 0.96;
    margin-bottom: 1.25rem;
}

.landing-section-heading h2,
.landing-report-band h2,
.landing-final-cta h2,
.shared-report-cta h2 {
    font-size: clamp(2.35rem, 3.6vw, 3.9rem);
}

.landing-lead,
.landing-report-band p,
.landing-final-cta p,
.shared-report-cta p {
    max-width: 62ch;
    font-size: 1.1rem;
    color: var(--text-secondary);
}

.landing-hero-copy {
    display: flex;
    flex-direction: column;
    gap: 1.35rem;
}

.landing-hero-btn,
.landing-nav-btn {
    min-height: 2.9rem;
    padding-inline: 1.2rem;
}

.landing-hero-points {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1rem;
    margin-top: 0.5rem;
}

.landing-hero-points > div,
.landing-metric,
.landing-feature-card,
.landing-story-card {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--panel-border);
    border-radius: 24px;
    backdrop-filter: blur(10px);
}

.landing-hero-points > div {
    padding: 1.15rem 1.1rem;
}

.landing-hero-points strong,
.landing-metric strong {
    display: block;
    font-family: var(--font-display);
    font-size: 1.2rem;
    margin-bottom: 0.2rem;
}

.landing-hero-points p,
.landing-metric span {
    color: var(--text-secondary);
    font-size: 0.95rem;
    margin: 0;
}

.landing-hero-media {
    position: relative;
    min-height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.5rem 0;
}

.landing-hero-image {
    width: min(100%, 620px);
    border-radius: 30px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    box-shadow: 0 28px 65px -36px rgba(0, 0, 0, 0.9);
    transform: perspective(1200px) rotateY(-8deg) rotateX(3deg);
    animation: landing-float 7s ease-in-out infinite;
}

.landing-orbit-card {
    position: absolute;
    padding: 1rem 1.1rem;
    background: rgba(8, 17, 31, 0.82);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 18px;
    box-shadow: var(--shadow);
    max-width: 220px;
}

.landing-orbit-card span {
    display: block;
    color: var(--text-secondary);
    font-size: 0.85rem;
}

.landing-orbit-card strong {
    font-size: 0.98rem;
}

.landing-orbit-card-top {
    left: 0;
    top: 8%;
}

.landing-orbit-card-bottom {
    right: 0;
    bottom: 8%;
}

.landing-metrics,
.landing-feature-grid,
.landing-use-case-grid {
    display: grid;
    gap: 1.35rem;
}

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

.landing-metric,
.landing-feature-card {
    padding: 1.75rem;
}

.landing-metric p,
.landing-feature-card p,
.landing-story-copy p {
    color: var(--text-secondary);
    margin-bottom: 0;
}

.landing-section {
    display: flex;
    flex-direction: column;
    gap: 1.75rem;
}

.landing-section-heading {
    max-width: 840px;
}

.landing-use-case-grid {
    grid-template-columns: 1.25fr 1fr 1fr;
}

.landing-story-card {
    overflow: hidden;
    transition: transform 0.24s ease, border-color 0.24s ease;
}

.landing-story-card-wide {
    grid-row: span 2;
}

.landing-story-card:hover,
.landing-feature-card:hover,
.landing-metric:hover {
    transform: translateY(-4px);
    border-color: var(--soft-border);
}

.landing-story-image {
    display: block;
    width: 100%;
    aspect-ratio: 4 / 3;
    object-fit: cover;
    background: rgba(255, 255, 255, 0.02);
}

.landing-story-copy {
    padding: 1.45rem;
}

.landing-feature-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1.35rem;
}

.landing-icon {
    width: 3.2rem;
    height: 3.2rem;
    border-radius: 1rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1rem;
    background: linear-gradient(135deg, rgba(91, 140, 255, 0.18), rgba(53, 200, 184, 0.18));
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.landing-icon span {
    width: 1.45rem;
    height: 1.45rem;
    display: block;
    border: 2px solid currentColor;
    border-radius: 0.45rem;
    color: var(--text-primary);
    position: relative;
}

.landing-icon span::before,
.landing-icon span::after {
    content: "";
    position: absolute;
    background: currentColor;
}

.landing-icon span::before {
    width: 0.8rem;
    height: 2px;
    left: 0.22rem;
    top: 0.33rem;
}

.landing-icon span::after {
    width: 2px;
    height: 0.8rem;
    right: 0.28rem;
    bottom: 0.2rem;
}

.landing-icon-report span {
    border-radius: 0.3rem;
}

.landing-icon-share span::before {
    width: 0.92rem;
    left: 0.14rem;
    top: 0.62rem;
}

.landing-icon-share span::after {
    width: 0.52rem;
    height: 0.52rem;
    right: 0.16rem;
    top: 0.16rem;
    border-radius: 50%;
}

.landing-icon-speed span::before {
    width: 0.95rem;
    transform: rotate(-34deg);
    left: 0.2rem;
    top: 0.66rem;
}

.landing-icon-speed span::after {
    height: 0.95rem;
    right: 0.38rem;
    bottom: 0.12rem;
}

.landing-report-band,
.landing-final-cta,
.shared-report-cta {
    border-radius: 30px;
    padding: 2.4rem;
}

.landing-report-band,
.shared-report-cta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
}

.landing-final-cta {
    text-align: center;
}

.landing-hero-actions-center {
    justify-content: center;
}

.shared-report-cta {
    margin-bottom: 1.6rem;
}

:root[data-theme="light"] .landing-nav {
    background: rgba(255, 255, 255, 0.78);
    border-color: rgba(16, 32, 58, 0.1);
    box-shadow: 0 24px 45px -30px rgba(30, 55, 90, 0.28);
}

:root[data-theme="light"] .landing-nav-links a {
    color: #5c6f89;
}

:root[data-theme="light"] .landing-nav-links a:hover,
:root[data-theme="light"] .landing-brand,
:root[data-theme="light"] .landing-brand:hover {
    color: #10203a;
}

:root[data-theme="light"] .landing-hero,
:root[data-theme="light"] .landing-report-band,
:root[data-theme="light"] .landing-final-cta,
:root[data-theme="light"] .shared-report-cta {
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.94), rgba(243, 248, 255, 0.9));
    border-color: rgba(16, 32, 58, 0.1);
    box-shadow: 0 36px 80px -44px rgba(30, 55, 90, 0.3);
}

:root[data-theme="light"] .landing-hero::before,
:root[data-theme="light"] .landing-report-band::before,
:root[data-theme="light"] .landing-final-cta::before {
    content: "";
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at top left, rgba(91, 140, 255, 0.08), transparent 26%),
        radial-gradient(circle at top right, rgba(53, 200, 184, 0.08), transparent 22%);
    pointer-events: none;
}

:root[data-theme="light"] .landing-hero,
:root[data-theme="light"] .landing-report-band,
:root[data-theme="light"] .landing-final-cta {
    position: relative;
}

:root[data-theme="light"] .landing-kicker {
    color: #0ea5a0;
}

:root[data-theme="light"] .landing-hero h1,
:root[data-theme="light"] .landing-section-heading h2,
:root[data-theme="light"] .landing-report-band h2,
:root[data-theme="light"] .landing-final-cta h2,
:root[data-theme="light"] .shared-report-cta h2,
:root[data-theme="light"] .landing-feature-card h3,
:root[data-theme="light"] .landing-story-copy h3,
:root[data-theme="light"] .landing-metric strong,
:root[data-theme="light"] .landing-hero-points strong,
:root[data-theme="light"] .landing-orbit-card strong {
    color: #10203a;
}

:root[data-theme="light"] .landing-lead,
:root[data-theme="light"] .landing-report-band p,
:root[data-theme="light"] .landing-final-cta p,
:root[data-theme="light"] .shared-report-cta p,
:root[data-theme="light"] .landing-feature-card p,
:root[data-theme="light"] .landing-story-copy p,
:root[data-theme="light"] .landing-metric p,
:root[data-theme="light"] .landing-hero-points p,
:root[data-theme="light"] .landing-orbit-card span,
:root[data-theme="light"] .landing-metric span {
    color: #60738d;
}

:root[data-theme="light"] .landing-hero-points > div,
:root[data-theme="light"] .landing-metric,
:root[data-theme="light"] .landing-feature-card,
:root[data-theme="light"] .landing-story-card {
    background: rgba(255, 255, 255, 0.78);
    border-color: rgba(16, 32, 58, 0.1);
    box-shadow: 0 22px 40px -34px rgba(30, 55, 90, 0.24);
}

:root[data-theme="light"] .landing-story-card:hover,
:root[data-theme="light"] .landing-feature-card:hover,
:root[data-theme="light"] .landing-metric:hover {
    border-color: rgba(91, 140, 255, 0.24);
}

:root[data-theme="light"] .landing-orbit-card {
    background: rgba(255, 255, 255, 0.9);
    border-color: rgba(16, 32, 58, 0.1);
    box-shadow: 0 24px 42px -34px rgba(30, 55, 90, 0.28);
}

:root[data-theme="light"] .landing-hero-image {
    border-color: rgba(16, 32, 58, 0.1);
    box-shadow: 0 34px 68px -40px rgba(30, 55, 90, 0.34);
}

:root[data-theme="light"] .landing-icon {
    background: linear-gradient(135deg, rgba(91, 140, 255, 0.12), rgba(53, 200, 184, 0.12));
    border-color: rgba(16, 32, 58, 0.08);
}

:root[data-theme="light"] .landing-icon span,
:root[data-theme="light"] .landing-icon span::before,
:root[data-theme="light"] .landing-icon span::after {
    color: #10203a;
}

@keyframes landing-float {
    0%,
    100% {
        transform: perspective(1200px) rotateY(-8deg) rotateX(3deg) translateY(0);
    }
    50% {
        transform: perspective(1200px) rotateY(-8deg) rotateX(3deg) translateY(-8px);
    }
}

@media (max-width: 1080px) {
    .landing-hero,
    .landing-use-case-grid,
    .landing-metrics,
    .landing-feature-grid {
        grid-template-columns: 1fr;
    }

    .landing-report-band,
    .shared-report-cta {
        flex-direction: column;
        align-items: flex-start;
    }

    .landing-hero-points {
        grid-template-columns: 1fr;
    }

    .landing-orbit-card {
        position: static;
    }

    .landing-hero-media {
        gap: 1rem;
        flex-direction: column;
    }

    .landing-hero-image {
        transform: none;
        animation: none;
    }

    .landing-story-card-wide {
        grid-row: auto;
    }
}

@media (max-width: 780px) {
    .landing-page {
        padding-inline: 1rem;
    }

    .landing-nav {
        border-radius: 28px;
        padding: 1rem;
        flex-wrap: wrap;
        justify-content: center;
    }

    .landing-nav-links,
    .landing-nav-actions,
    .landing-hero-actions,
    .landing-report-actions,
    .shared-report-cta-actions {
        width: 100%;
        justify-content: center;
        flex-wrap: wrap;
    }

    .landing-hero,
    .landing-report-band,
    .landing-final-cta,
    .shared-report-cta {
        padding: 1.3rem;
        border-radius: 24px;
    }
}

.car-year {
    display: inline-block;
    background-color: rgba(255, 255, 255, 0.1);
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
    font-size: 0.8rem;
    color: var(--text-secondary);
}

.car-actions {
    margin-top: 1rem;
    display: flex;
    gap: 0.5rem;
}

/* Show Page: Split View */
.car-show-header {
    text-align: center;
    margin-bottom: 3rem;
}

.car-details-title {
    font-size: 2.5rem;
    font-weight: 800;
    letter-spacing: -0.025em;
    margin-bottom: 0.5rem;
}

.car-details-sub {
    color: var(--text-secondary);
    font-size: 1.1rem;
}

.comparison-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    margin-top: 2rem;
}

.col-header {
    text-align: center;
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    padding: 1rem;
    background-color: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
}

.col-header.raw {
    border-bottom: 3px solid var(--accent-primary);
}

.col-header.enhanced {
    border-bottom: 3px solid var(--success);
}

.photo-pair {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    margin-bottom: 2rem;
    align-items: start;
}

.photo-card {
    background-color: var(--card-bg);
    padding: 1rem;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
}

.photo-display {
    width: 100%;
    aspect-ratio: 16/9;
    background-color: #000;
    border-radius: 6px;
    overflow: hidden;
    position: relative;
}

.photo-display img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.empty-state {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    color: var(--text-secondary);
    flex-direction: column;
    gap: 0.5rem;
}

/* Responsive */
@media (max-width: 768px) {
    .comparison-grid {
        grid-template-columns: 1fr;
    }

    .photo-pair {
        grid-template-columns: 1fr;
        gap: 1rem;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
        padding-bottom: 1rem;
    }
}

/* Forms */
.form-group {
    margin-bottom: 1.5rem;
}

.form-label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: var(--text-primary);
}

.form-control {
    width: 100%;
    padding: 0.75rem 1rem;
    font-size: 1rem;
    background-color: var(--card-bg);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    color: var(--text-primary);
    transition: border-color 0.2s, box-shadow 0.2s;
    box-sizing: border-box;
}

.form-control:focus {
    outline: none;
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.2);
}

.form-hint {
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-top: 0.25rem;
}

.nested-fields {
    background-color: rgba(255, 255, 255, 0.03);
    padding: 1rem;
    border-radius: 8px;
    margin-bottom: 1rem;
    border: 1px dashed rgba(255, 255, 255, 0.1);
}
/* Lane Inspection Layout */
.lane-show-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin-bottom: 3rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.page-title {
    font-size: 3rem;
    font-weight: 800;
    margin-bottom: 0.5rem;
    background: linear-gradient(to right, #fff, #94a3b8);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.page-subtitle {
    font-size: 1.25rem;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: 1rem;
}

.badge {
    background-color: var(--accent-primary);
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 999px;
    font-size: 0.9rem;
    font-weight: 700;
}

.inspection-timeline {
    display: flex;
    flex-direction: column;
    gap: 3rem;
}

.inspection-card {
    background-color: var(--card-bg);
    border-radius: 16px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.05);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.card-header {
    background-color: rgba(255, 255, 255, 0.03);
    padding: 1.5rem 2rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.step-number {
    width: 32px;
    height: 32px;
    background-color: var(--accent-primary);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
}

.test-name {
    margin: 0;
    flex-grow: 1;
    font-size: 1.25rem;
    font-weight: 600;
}

.status-indicator {
    padding: 0.25rem 0.75rem;
    border-radius: 4px;
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.status-indicator.completed {
    background-color: rgba(16, 185, 129, 0.1);
    color: var(--success);
}

.status-indicator.pending {
    background-color: rgba(255, 255, 255, 0.05);
    color: var(--text-secondary);
}

.card-body {
    padding: 2rem;
}

.grid-2-col {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
}

.panel {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.panel-label {
    text-transform: uppercase;
    font-size: 0.85rem;
    letter-spacing: 0.1em;
    color: var(--text-secondary);
    font-weight: 600;
}

.photo-frame {
    aspect-ratio: 4/3;
    background-color: #000;
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.photo-content {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.empty-photo {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
    background-color: rgba(255, 255, 255, 0.02);
}

.results-content {
    background-color: rgba(0, 0, 0, 0.2);
    border-radius: 8px;
    padding: 1.5rem;
    height: 100%;
    border: 1px solid rgba(255, 255, 255, 0.05);
    display: flex;
    flex-direction: column;
}

.results-data {
    flex-grow: 1;
}

.attributes-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.attribute-item {
    display: flex;
    justify-content: space-between;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    padding-bottom: 0.5rem;
}

.attr-key {
    color: var(--text-secondary);
}

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

.raw-result {
    font-family: monospace;
    white-space: pre-wrap;
    word-break: break-all;
}

.panel-actions {
    margin-top: 1.5rem;
    display: flex;
    justify-content: flex-end;
}

.page-footer {
    margin-top: 4rem;
    display: flex;
    align-items: center;
    gap: 1.5rem;
    padding-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.danger-zone {
    margin-left: auto;
}

.btn-danger-ghost {
    background-color: transparent;
    color: var(--danger);
    border: 1px solid rgba(239, 68, 68, 0.2);
    padding: 0.5rem 1rem;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.2s;
}

.btn-danger-ghost:hover {
    background-color: rgba(239, 68, 68, 0.1);
}

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

.empty-photo-link {
    display: block;
    width: 100%;
    height: 100%;
    text-decoration: none;
}

.empty-photo-link:hover .empty-photo {
    background-color: rgba(255, 255, 255, 0.05);
    border: 1px dashed var(--accent-primary);
    color: var(--accent-primary);
}

/* Authentication Pages */
.auth-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    background: radial-gradient(circle at top right, #1e293b 0%, #0f172a 100%);
}

.auth-card {
    background-color: var(--card-bg);
    padding: 2.5rem;
    border-radius: 16px;
    width: 100%;
    max-width: 420px;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.auth-header {
    text-align: center;
    margin-bottom: 2rem;
}

.auth-title {
    font-size: 1.75rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}

.auth-subtitle {
    color: var(--text-secondary);
    font-size: 0.95rem;
}

.auth-form .form-group {
    margin-bottom: 1.25rem;
}

.auth-form .form-label {
    font-size: 0.9rem;
    margin-bottom: 0.4rem;
}

.auth-form .form-control {
    background-color: rgba(15, 23, 42, 0.5);
    border-color: rgba(255, 255, 255, 0.05);
}

.auth-form .form-control:focus {
    background-color: rgba(15, 23, 42, 0.8);
    border-color: var(--accent-primary);
}

.auth-actions {
    margin-top: 2rem;
}

.auth-btn {
    width: 100%;
    justify-content: center;
    padding: 0.75rem;
    font-size: 1rem;
    font-weight: 600;
}

.auth-links {
    margin-top: 1.5rem;
    text-align: center;
    font-size: 0.9rem;
    color: var(--text-secondary);
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.auth-links a {
    color: var(--text-secondary);
    transition: color 0.2s;
}

.auth-links a:hover {
    color: var(--accent-primary);
}

.remember-me {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: -0.5rem;
    margin-bottom: 1rem;
}

.remember-me input[type="checkbox"] {
    accent-color: var(--accent-primary);
    width: 1rem;
    height: 1rem;
    cursor: pointer;
}

.remember-me label {
    font-size: 0.9rem;
    color: var(--text-secondary);
    cursor: pointer;
    user-select: none;
}

:root[data-theme="light"] .auth-container {
    background:
        radial-gradient(circle at top left, rgba(91, 140, 255, 0.16), transparent 24%),
        radial-gradient(circle at top right, rgba(53, 200, 184, 0.16), transparent 22%),
        linear-gradient(180deg, #f8fbff 0%, #ecf3fb 100%);
}

:root[data-theme="light"] .auth-card {
    background: rgba(255, 255, 255, 0.94);
    border-color: rgba(16, 32, 58, 0.09);
    box-shadow: 0 32px 70px -42px rgba(26, 51, 90, 0.32);
}

:root[data-theme="light"] .auth-title,
:root[data-theme="light"] .form-label,
:root[data-theme="light"] .remember-me label {
    color: #10203a;
}

:root[data-theme="light"] .auth-subtitle,
:root[data-theme="light"] .auth-links,
:root[data-theme="light"] .auth-links a,
:root[data-theme="light"] .form-hint {
    color: #60738d;
}

:root[data-theme="light"] .auth-links a:hover {
    color: var(--accent-primary);
}

:root[data-theme="light"] .auth-form .form-control {
    background-color: rgba(16, 32, 58, 0.06);
    border-color: rgba(16, 32, 58, 0.12);
    color: #10203a;
}

:root[data-theme="light"] .auth-form .form-control::placeholder {
    color: #7c8fa8;
}

:root[data-theme="light"] .auth-form .form-control:focus {
    background-color: #ffffff;
    border-color: rgba(91, 140, 255, 0.65);
    box-shadow: 0 0 0 4px rgba(91, 140, 255, 0.12);
}

/* Shared flash */
.flash-stack {
    position: fixed;
    top: 1.25rem;
    right: 1.25rem;
    z-index: 1000;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    max-width: min(420px, calc(100vw - 2rem));
}

.flash-banner {
    padding: 0.95rem 1rem;
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: rgba(8, 17, 31, 0.9);
    color: #f8fbff;
    backdrop-filter: blur(18px);
    box-shadow: var(--shadow);
}

.flash-banner-notice {
    border-color: rgba(51, 214, 159, 0.28);
}

.flash-banner-alert {
    border-color: rgba(255, 107, 120, 0.35);
}

.flash-banner-neutral {
    border-color: rgba(91, 140, 255, 0.28);
}

:root[data-theme="light"] .flash-banner {
    border-color: rgba(148, 163, 184, 0.22);
    background: rgba(255, 255, 255, 0.95);
    color: #13233f;
    box-shadow: 0 18px 40px -28px rgba(15, 23, 42, 0.35);
}

:root[data-theme="light"] .flash-banner-notice {
    border-color: rgba(34, 197, 94, 0.32);
    background: linear-gradient(180deg, rgba(240, 253, 244, 0.98), rgba(220, 252, 231, 0.94));
}

:root[data-theme="light"] .flash-banner-alert {
    border-color: rgba(239, 68, 68, 0.28);
    background: linear-gradient(180deg, rgba(254, 242, 242, 0.98), rgba(254, 226, 226, 0.94));
}

:root[data-theme="light"] .flash-banner-neutral {
    border-color: rgba(59, 130, 246, 0.22);
    background: linear-gradient(180deg, rgba(239, 246, 255, 0.98), rgba(219, 234, 254, 0.94));
}

.theme-toggle-fab {
    position: fixed;
    right: 1.25rem;
    bottom: 1.25rem;
    z-index: 1001;
    display: inline-flex;
    align-items: center;
    gap: 0.7rem;
    padding: 0.75rem 1rem;
    border-radius: 999px;
    border: 1px solid var(--soft-border);
    background: rgba(8, 17, 31, 0.84);
    color: var(--text-primary);
    box-shadow: var(--shadow);
    backdrop-filter: blur(18px);
    cursor: pointer;
    font: inherit;
    font-weight: 700;
}

.theme-toggle-badge {
    width: 34px;
    height: 34px;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
    color: white;
    font-size: 0.72rem;
    letter-spacing: 0.06em;
}

:root[data-theme="light"] .theme-toggle-fab {
    background: rgba(255, 255, 255, 0.92);
}

/* Dashboard shell */
.dashboard-shell {
    display: grid;
    grid-template-columns: 320px minmax(0, 1fr);
    gap: 1.5rem;
    min-height: 100vh;
    padding: 1.5rem;
    position: relative;
    z-index: 1;
}

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

.dashboard-sidebar {
    position: sticky;
    top: 1.5rem;
    align-self: start;
    min-height: calc(100vh - 3rem);
    padding: 1.5rem;
    border-radius: 28px;
    background: linear-gradient(180deg, rgba(14, 24, 40, 0.95), rgba(9, 18, 31, 0.88));
    border: 1px solid var(--panel-border);
    box-shadow: var(--shadow-lg);
    backdrop-filter: blur(22px);
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.dashboard-brand-link {
    display: flex;
    align-items: center;
    gap: 0.9rem;
    color: var(--text-primary);
}

.dashboard-brand-mark {
    width: 48px;
    height: 48px;
    border-radius: 16px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-display);
    font-weight: 700;
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
    color: white;
}

.dashboard-brand-kicker,
.dashboard-panel-kicker,
.dashboard-section-kicker,
.dashboard-eyebrow,
.dashboard-metric-label,
.dashboard-sidebar-label,
.inspection-summary-overline,
.inspection-slide-kicker {
    margin: 0 0 0.35rem;
    text-transform: uppercase;
    letter-spacing: 0.14em;
    font-size: 0.72rem;
    color: var(--text-secondary);
    font-weight: 800;
}

.dashboard-brand-title {
    margin: 0;
    font-size: 1.3rem;
}

.dashboard-brand-copy {
    margin: 0.9rem 0 0;
    color: var(--text-secondary);
    font-size: 0.95rem;
}

.dashboard-nav {
    display: flex;
    flex-direction: column;
    gap: 0.7rem;
}

.dashboard-nav-link {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    padding: 0.9rem 1rem;
    border-radius: 18px;
    color: var(--text-secondary);
    border: 1px solid transparent;
    background: var(--surface-muted);
}

.dashboard-nav-link:hover,
.dashboard-nav-link.active {
    color: var(--text-primary);
    border-color: rgba(91, 140, 255, 0.2);
    background: linear-gradient(135deg, rgba(91, 140, 255, 0.16), rgba(53, 200, 184, 0.08));
}

.dashboard-nav-token {
    width: 34px;
    height: 34px;
    border-radius: 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: color-mix(in srgb, var(--text-primary) 8%, transparent);
    color: var(--text-primary);
    font-size: 0.76rem;
    font-weight: 800;
    letter-spacing: 0.08em;
}

.dashboard-sidebar-card {
    margin-top: auto;
    padding: 1.2rem;
    border-radius: 22px;
    background: linear-gradient(180deg, rgba(91, 140, 255, 0.12), rgba(255, 143, 102, 0.1));
    border: 1px solid var(--panel-border);
}

.dashboard-sidebar-card p,
.inspection-method-summary p {
    margin: 0.35rem 0 0;
    color: var(--text-secondary);
}

.dashboard-main {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.dashboard-main-full {
    max-width: 1500px;
    width: 100%;
    margin: 0 auto;
}

.dashboard-hero,
.dashboard-panel,
.dashboard-metric-card {
    border-radius: 28px;
    background: linear-gradient(180deg, rgba(14, 24, 40, 0.9), rgba(10, 17, 29, 0.92));
    border: 1px solid var(--panel-border);
    box-shadow: var(--shadow);
    backdrop-filter: blur(18px);
}

.dashboard-hero {
    padding: 2rem;
    display: flex;
    justify-content: space-between;
    gap: 1.5rem;
    align-items: flex-start;
}

.dashboard-hero-title {
    margin: 0;
    font-size: clamp(2rem, 3vw, 3.6rem);
    line-height: 0.96;
}

.dashboard-hero-copy {
    max-width: 760px;
    margin: 0.85rem 0 0;
    color: var(--text-secondary);
    font-size: 1rem;
}

.dashboard-hero-actions,
.intake-actions,
.inspection-summary-actions {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.dashboard-btn {
    min-height: 44px;
    padding-inline: 1.15rem;
}

.dashboard-hero-cta-note {
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.btn-sm {
    min-height: 38px;
    font-size: 0.82rem;
    padding-inline: 0.9rem;
}

.dashboard-metrics {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 1rem;
}

.dashboard-metric-card {
    padding: 1.35rem 1.4rem;
}

.dashboard-metric-card strong {
    display: block;
    font-family: var(--font-display);
    font-size: 2rem;
    line-height: 1;
    margin-bottom: 0.35rem;
}

.dashboard-metric-card span,
.dashboard-section-meta,
.inspection-summary-owner,
.inspection-summary-footnote,
.inspection-empty-state p,
.inspection-facts-list dt,
.inspection-progress-meta span,
.inspection-angle-pill span,
.intake-upload-copy,
.intake-upload-state,
.dashboard-empty-panel p {
    color: var(--text-secondary);
}

.dashboard-feature-grid,
.inspection-detail-layout,
.inspection-intake-layout {
    display: grid;
    gap: 1rem;
}

.dashboard-feature-grid {
    grid-template-columns: minmax(0, 1.6fr) minmax(280px, 0.9fr);
}

.dashboard-feature-grid-single {
    grid-template-columns: minmax(0, 1fr);
}

.inspection-intake-layout {
    grid-template-columns: minmax(280px, 360px) minmax(0, 1fr);
}

.inspection-detail-layout {
    grid-template-columns: minmax(0, 1.65fr) minmax(300px, 0.85fr);
}

.dashboard-panel {
    padding: 1.5rem;
}

.dashboard-panel-highlight {
    padding: 1.8rem;
    background:
        radial-gradient(circle at top right, rgba(255, 143, 102, 0.16), transparent 34%),
        linear-gradient(180deg, rgba(14, 24, 40, 0.94), rgba(11, 19, 33, 0.92));
}

.dashboard-panel-highlight h2,
.dashboard-empty-panel h2,
.intake-brief h2 {
    font-size: 1.85rem;
    margin-bottom: 0.45rem;
}

.dashboard-panel-highlight p:last-child,
.dashboard-empty-panel p {
    margin-bottom: 0;
}

.dashboard-panel-compact {
    align-self: stretch;
}

.dashboard-cta-banner {
    padding: 1.8rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    color: var(--text-primary);
    background:
        radial-gradient(circle at top right, rgba(53, 200, 184, 0.2), transparent 30%),
        linear-gradient(135deg, rgba(91, 140, 255, 0.2), rgba(53, 200, 184, 0.1));
}

.dashboard-cta-banner:hover {
    color: var(--text-primary);
    transform: translateY(-1px);
}

.dashboard-cta-banner h2 {
    font-size: clamp(2rem, 3vw, 3rem);
    margin-bottom: 0.4rem;
}

.dashboard-cta-banner p {
    margin: 0;
    max-width: 760px;
    color: var(--text-secondary);
}

.dashboard-cta-arrow {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 68px;
    min-width: 492px;
    padding: 0 3rem;
    border-radius: 999px;
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
    color: white;
    font-weight: 800;
    font-size: 1.15rem;
    letter-spacing: 0.01em;
    white-space: nowrap;
}

.dashboard-cta-sidecar {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 0.9rem;
    color: var(--text-primary);
    background:
        radial-gradient(circle at top left, rgba(91, 140, 255, 0.16), transparent 32%),
        linear-gradient(180deg, rgba(91, 140, 255, 0.08), rgba(53, 200, 184, 0.1));
}

.dashboard-cta-sidecar:hover {
    color: var(--text-primary);
}

.dashboard-cta-sidecar h3 {
    margin: 0;
    font-size: 1.55rem;
}

.dashboard-cta-sidecar p {
    margin: 0;
    color: var(--text-secondary);
}

.dashboard-cta-sidecar-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    align-self: flex-start;
    min-height: 58px;
    min-width: 184px;
    padding: 0 1.6rem;
    border-radius: 999px;
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
    color: white;
    font-size: 1.05rem;
    font-weight: 800;
}

.dashboard-mini-list {
    list-style: none;
    margin: 1rem 0 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.dashboard-filter-row {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.dashboard-filter-chip {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 40px;
    padding: 0.55rem 0.95rem;
    border-radius: 999px;
    border: 1px solid var(--panel-border);
    background: var(--surface-muted);
    color: var(--text-secondary);
    font-weight: 700;
}

.dashboard-filter-chip.active,
.dashboard-filter-chip:hover {
    color: var(--text-primary);
    border-color: rgba(91, 140, 255, 0.24);
    background: linear-gradient(135deg, rgba(91, 140, 255, 0.16), rgba(53, 200, 184, 0.08));
}

.dashboard-mini-list li,
.inspection-summary-stats,
.inspection-progress-meta,
.dashboard-section-header {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    align-items: center;
}

.dashboard-mini-list strong,
.inspection-summary-stats strong,
.inspection-angle-pill strong,
.inspection-facts-list dd {
    font-family: var(--font-display);
    margin: 0;
}

.dashboard-section {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.dashboard-section-header {
    margin-bottom: 1rem;
}

.dashboard-section-header h2 {
    margin: 0;
    font-size: 1.55rem;
}

.dashboard-section-header-tight {
    margin-bottom: 1.2rem;
}

.inspection-card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1rem;
}

.inspection-summary-card {
    display: flex;
    flex-direction: column;
    border-radius: 26px;
    overflow: hidden;
    background: linear-gradient(180deg, rgba(14, 24, 40, 0.94), rgba(10, 18, 31, 0.96));
    border: 1px solid var(--panel-border);
    box-shadow: var(--shadow);
}

.dashboard-method-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.38rem 0.8rem;
    border-radius: 999px;
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.dashboard-method-gemini {
    background: rgba(91, 140, 255, 0.16);
    color: #9fbcff;
}

.dashboard-method-openai {
    background: rgba(51, 214, 159, 0.16);
    color: var(--success);
}

.dashboard-method-hybrid {
    background: rgba(255, 204, 102, 0.18);
    color: var(--warning);
}

.dashboard-method-custom {
    background: rgba(255, 143, 102, 0.16);
    color: var(--accent-warm);
}

.inspection-summary-media {
    position: relative;
    display: block;
    min-height: 220px;
    background: linear-gradient(135deg, rgba(91, 140, 255, 0.18), rgba(53, 200, 184, 0.08));
}

.inspection-summary-image {
    width: 100%;
    height: 220px;
    object-fit: cover;
    display: block;
}

.inspection-summary-placeholder {
    height: 220px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
    font-family: var(--font-display);
}

.dashboard-status {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.38rem 0.8rem;
    border-radius: 999px;
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.inspection-summary-media .dashboard-status {
    position: absolute;
    top: 1rem;
    left: 1rem;
    backdrop-filter: blur(10px);
}

.dashboard-status-new-inspection,
.dashboard-status-created {
    background: rgba(255, 204, 102, 0.16);
    color: var(--warning);
}

.dashboard-status-pending {
    background: rgba(91, 140, 255, 0.16);
    color: #a9c0ff;
}

.dashboard-status-completed {
    background: rgba(51, 214, 159, 0.16);
    color: var(--success);
}

.dashboard-status-failed {
    background: rgba(255, 107, 120, 0.16);
    color: var(--danger);
}

.inspection-summary-body,
.inspection-summary-footer {
    padding: 1.2rem 1.25rem;
}

.inspection-summary-header h3 {
    margin: 0;
    font-size: 1.4rem;
}

.inspection-summary-date {
    color: var(--text-secondary);
    font-size: 0.85rem;
}

.method-table-inspection,
.method-table-external {
    display: grid;
    gap: 0.2rem;
}

.method-table-inspection span,
.method-table-external span,
.method-table-external code {
    color: var(--text-secondary);
}

.method-progress-compact {
    min-width: 120px;
    margin: 0;
}

.method-progress-compact strong {
    font-size: 0.82rem;
}

.inspection-progress {
    display: flex;
    flex-direction: column;
    gap: 0.55rem;
    margin: 1rem 0;
}

.inspection-progress-bar {
    width: 100%;
    height: 10px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.07);
    overflow: hidden;
}

.inspection-progress-bar span {
    display: block;
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
}

.inspection-summary-stats {
    margin-bottom: 1rem;
}

.inspection-summary-stats span,
.inspection-run-chip span,
.inspection-run-chip small {
    color: var(--text-secondary);
    font-size: 0.85rem;
}

.inspection-summary-footer {
    padding-top: 0;
    margin-top: auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
}

.btn-danger-ghost {
    background-color: rgba(255, 107, 120, 0.08);
    color: var(--danger);
    border: 1px solid rgba(255, 107, 120, 0.18);
    padding: 0.55rem 1rem;
    border-radius: 999px;
    cursor: pointer;
    font-weight: 700;
}

.btn-danger-ghost:hover {
    color: var(--danger);
    background-color: rgba(255, 107, 120, 0.14);
}

.dashboard-empty-panel {
    text-align: center;
}

.dashboard-input {
    width: 100%;
    box-sizing: border-box;
    border-radius: 18px;
    border: 1px solid var(--soft-border);
    background: var(--surface-muted);
    color: var(--text-primary);
    padding: 0.95rem 1rem;
    font-size: 1rem;
}

.dashboard-input:focus {
    outline: none;
    border-color: rgba(91, 140, 255, 0.6);
    box-shadow: 0 0 0 4px rgba(91, 140, 255, 0.15);
}

.form-error-panel {
    margin-bottom: 1.25rem;
    padding: 1rem 1.1rem;
    border-radius: 18px;
    background: rgba(255, 107, 120, 0.08);
    border: 1px solid rgba(255, 107, 120, 0.18);
}

.form-error-panel h3,
.form-error-panel ul {
    margin: 0;
}

.form-error-panel ul {
    padding-left: 1.25rem;
    margin-top: 0.6rem;
}

.intake-brief {
    height: fit-content;
}

.intake-stat-strip {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.9rem;
    margin: 1.5rem 0;
}

.intake-stat-strip div {
    padding: 1rem;
    border-radius: 18px;
    background: var(--surface-muted);
}

.intake-stat-strip span,
.intake-angle-item span {
    display: block;
    color: var(--text-secondary);
    font-size: 0.85rem;
}

.intake-stat-strip strong,
.intake-angle-item strong {
    font-family: var(--font-display);
    font-size: 1.2rem;
}

.intake-angle-list {
    display: grid;
    gap: 0.75rem;
}

.intake-angle-item {
    display: flex;
    align-items: center;
    gap: 0.9rem;
    padding: 0.95rem 1rem;
    border-radius: 18px;
    background: var(--surface-muted);
}

.intake-form-group {
    margin-bottom: 1.5rem;
}

.intake-form-group-secondary {
    margin-top: 1.35rem;
    margin-bottom: 0.6rem;
}

.intake-secondary-input {
    background: rgba(255, 255, 255, 0.04);
    border-color: rgba(148, 163, 184, 0.22);
    color: var(--text-secondary);
}

.intake-upload-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 1rem;
}

.intake-upload-card {
    position: relative;
    min-height: 168px;
    padding: 1rem;
    border-radius: 22px;
    border: 1px dashed var(--soft-border);
    background: var(--surface-muted);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 0.75rem;
    cursor: pointer;
    transition: transform 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.intake-upload-card:hover,
.intake-upload-card.is-selected {
    transform: translateY(-2px);
    border-color: rgba(91, 140, 255, 0.4);
    background: linear-gradient(180deg, rgba(91, 140, 255, 0.12), rgba(53, 200, 184, 0.08));
}

.intake-upload-angle {
    font-family: var(--font-display);
    font-size: 1.1rem;
}

.intake-upload-state {
    font-size: 0.88rem;
    word-break: break-word;
}

.intake-upload-input {
    position: absolute;
    inset: 0;
    opacity: 0;
    cursor: pointer;
}

.intake-actions {
    margin-top: 1.5rem;
    justify-content: flex-end;
}

.inspection-run-chip {
    padding: 0.75rem 1rem;
    border-radius: 20px;
    background: var(--surface-muted);
    border: 1px solid var(--panel-border);
    display: grid;
    gap: 0.1rem;
}

.inspection-viewer-panel,
.inspection-sidebar-panel {
    min-width: 0;
}

.inspection-slide-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 0.85rem;
}

.inspection-slide-header h3 {
    margin: 0;
    font-size: 1.4rem;
}

.inspection-empty-state {
    padding: 2rem;
    border-radius: 22px;
    background: var(--surface-muted);
    border: 1px dashed var(--soft-border);
}

.inspection-empty-state-large {
    min-height: 420px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;
    gap: 0.8rem;
}

.inspection-empty-state h3 {
    margin: 0;
}

.inspection-processing-banner {
    display: grid;
    gap: 1rem;
    background:
        radial-gradient(circle at top right, rgba(53, 200, 184, 0.18), transparent 30%),
        linear-gradient(180deg, rgba(91, 140, 255, 0.1), rgba(53, 200, 184, 0.08));
}

.inspection-processing-banner h2 {
    margin-bottom: 0.4rem;
}

.inspection-processing-banner p:last-child {
    margin-bottom: 0;
    color: var(--text-secondary);
}

.inspection-processing-rail {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.85rem;
}

.inspection-processing-step {
    padding: 1rem 1.1rem;
    border-radius: 18px;
    border: 1px solid var(--panel-border);
    background: rgba(255, 255, 255, 0.04);
    display: flex;
    align-items: center;
    gap: 0.8rem;
}

.inspection-processing-step span {
    width: 32px;
    height: 32px;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    background: rgba(255, 255, 255, 0.08);
}

.inspection-processing-step.is-active,
.inspection-processing-step.is-complete {
    border-color: rgba(53, 200, 184, 0.34);
    background: linear-gradient(180deg, rgba(53, 200, 184, 0.16), rgba(91, 140, 255, 0.08));
}

.inspection-empty-state-processing {
    align-items: flex-start;
}

.inspection-processing-demo-links {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-top: 0.5rem;
}

.inspection-facts-list {
    display: grid;
    gap: 1rem;
    margin: 0 0 1.5rem;
}

.inspection-facts-list div {
    padding-bottom: 0.9rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.inspection-facts-list dt {
    margin-bottom: 0.15rem;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.inspection-progress-stack {
    margin-top: 1.2rem;
}

.inspection-angle-checklist {
    display: grid;
    gap: 0.7rem;
    margin-top: 1.2rem;
}

.inspection-angle-pill {
    display: flex;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 0.9rem 1rem;
    border-radius: 16px;
    border: 1px solid var(--panel-border);
    background: var(--surface-muted);
}

.inspection-angle-pill.is-ready {
    border-color: rgba(51, 214, 159, 0.2);
}

.inspection-angle-pill.is-missing {
    border-color: rgba(255, 204, 102, 0.2);
}

.intake-upload-thumb-wrap {
    width: 100%;
    min-height: 72px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    margin: 0.35rem 0 0.5rem;
}

.intake-upload-thumb {
    display: none;
    width: 68px;
    height: 68px;
    object-fit: cover;
    border-radius: 14px;
    border: 1px solid var(--soft-border);
    box-shadow: 0 10px 24px -18px rgba(0, 0, 0, 0.65);
}

.intake-upload-thumb.is-visible {
    display: block;
}

.intake-upload-thumb-badge {
    display: none;
    position: absolute;
    top: 0.15rem;
    right: 0.2rem;
    padding: 0.18rem 0.5rem;
    border-radius: 999px;
    background: rgba(17, 26, 51, 0.82);
    color: #fff;
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.intake-upload-thumb-badge.is-visible {
    display: inline-flex;
}

.demo-helper-cta {
    margin-top: 1.25rem;
    padding: 1.2rem 1.25rem;
    border-radius: 22px;
    border: 1px solid var(--panel-border);
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.03), rgba(91, 140, 255, 0.05));
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.demo-helper-cta h3 {
    margin: 0;
    font-size: 1.25rem;
}

.demo-helper-cta p:last-child {
    margin: 0.35rem 0 0;
    color: var(--text-secondary);
}

.demo-helper-cta.is-active {
    border-color: rgba(34, 197, 94, 0.28);
    background: linear-gradient(180deg, rgba(34, 197, 94, 0.12), rgba(53, 200, 184, 0.08));
}

.btn-demo-select {
    width: 320px;
    min-height: 88px;
    padding: 1.1rem 2.6rem;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.08rem;
    font-weight: 900;
    letter-spacing: 0.01em;
    flex: 0 0 320px;
    box-shadow: 0 18px 34px -20px rgba(34, 197, 94, 0.95);
}

.inspection-method-summary {
    margin-top: 1.2rem;
    padding: 1rem;
    border-radius: 18px;
    background: var(--surface-muted);
}

.inspection-method-summary h3 {
    margin-bottom: 0.35rem;
}

.damage-summary-list {
    display: grid;
    gap: 1rem;
}

.damage-summary-card {
    padding: 1.1rem 1.15rem;
    border: 1px solid var(--panel-border);
    border-radius: 18px;
    background: var(--surface-muted);
}

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

.damage-summary-kicker {
    margin: 0 0 0.25rem;
    color: var(--text-secondary);
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.damage-summary-header h3 {
    margin: 0;
}

.damage-summary-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.damage-summary-chip {
    display: inline-flex;
    align-items: baseline;
    gap: 0.45rem;
    padding: 0.7rem 0.9rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.damage-summary-chip strong {
    font-family: var(--font-display);
    font-size: 1rem;
}

.damage-summary-chip span {
    color: var(--text-secondary);
}

.dashboard-table-scroll {
    overflow-x: auto;
}

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

.dashboard-table th,
.dashboard-table td {
    padding: 0.85rem 0.7rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    text-align: left;
    vertical-align: top;
}

.dashboard-table th {
    color: var(--text-secondary);
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.dashboard-table-mono {
    font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
    font-size: 0.82rem;
}

.photos-index-modal {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.photos-index-modal[hidden] {
    display: none;
}

.modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.75);
    cursor: pointer;
}

.modal-content {
    position: relative;
    background: var(--card-bg);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-lg);
    max-width: 95vw;
    max-height: 95vh;
    display: flex;
    flex-direction: column;
    z-index: 1;
}

.modal-content-photo {
    padding: 1.5rem;
    align-items: center;
}

.modal-content-raw {
    padding: 1.5rem;
    width: 90vw;
    max-width: 700px;
    max-height: 85vh;
    overflow: auto;
}

.modal-close {
    position: absolute;
    top: 0.5rem;
    right: 0.75rem;
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 1.5rem;
    cursor: pointer;
    line-height: 1;
    padding: 0.25rem;
}

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

.modal-title {
    margin: 0 0 1rem 0;
    font-size: 0.95rem;
    color: var(--text-secondary);
}

.demo-sample-modal-content {
    max-width: 1200px;
}

.demo-sample-selection.is-active {
    border-color: rgba(91, 140, 255, 0.28);
    background: linear-gradient(180deg, rgba(91, 140, 255, 0.12), rgba(53, 200, 184, 0.08));
}

.hidden {
    display: none !important;
}

/* Modernize carousel used on inspection detail */
.method-carousel-container {
    position: relative;
    margin-bottom: 1rem;
    border-radius: 24px;
    overflow: hidden;
    background: rgba(5, 8, 14, 0.5);
    border: 1px solid var(--panel-border);
}

.method-carousel-track {
    display: flex;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scroll-behavior: smooth;
    scrollbar-width: none;
}

.method-carousel-track::-webkit-scrollbar {
    display: none;
}

.method-carousel-slide {
    flex: 0 0 100%;
    scroll-snap-align: start;
    padding: 1rem;
    box-sizing: border-box;
}

.method-carousel-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    border: none;
    width: 46px;
    height: 46px;
    border-radius: 50%;
    z-index: 20;
    background: rgba(8, 17, 31, 0.72);
    color: #fff;
    font-size: 22px;
    cursor: pointer;
}

.method-carousel-btn:hover {
    background: rgba(8, 17, 31, 0.92);
}

.prev-btn {
    left: 14px;
}

.next-btn {
    right: 14px;
}

.method-carousel-indicators {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 12px;
}

.method-indicator {
    width: 11px;
    height: 11px;
    border-radius: 50%;
    border: none;
    background: rgba(255, 255, 255, 0.2);
    cursor: pointer;
    padding: 0;
}

.method-indicator.active {
    background: var(--accent-primary);
}

.custom-photo-frame {
    position: relative;
    background: #02050a;
    border-radius: 18px;
    overflow: hidden;
    height: min(68vh, 680px);
    min-height: 420px;
}

.custom-photo-image {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
}

.custom-overlay-layer {
    position: absolute;
    inset: 0;
    pointer-events: none;
}

.custom-damage-overlay {
    position: absolute;
    inset: 0;
    pointer-events: none;
}

.custom-damage-box {
    position: absolute;
    border: 2px solid var(--damage-overlay-color, var(--danger));
    background: color-mix(in srgb, var(--damage-overlay-color, var(--danger)) 18%, transparent);
    border-radius: 6px;
    box-shadow: 0 0 0 1px rgba(7, 10, 18, 0.35);
    pointer-events: auto;
}

.custom-damage-polygon-layer {
    position: absolute;
    inset: 0;
    overflow: visible;
}

.custom-damage-polygon {
    fill: color-mix(in srgb, var(--damage-overlay-color, var(--danger)) 8%, transparent);
    stroke: var(--damage-overlay-color, var(--danger));
    stroke-width: 2;
    vector-effect: non-scaling-stroke;
    pointer-events: auto;
}

.inspection-overlay-controls {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.inspection-overlay-label {
    font-size: 0.8rem;
    color: var(--text-secondary);
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.inspection-overlay-select {
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: rgba(12, 16, 24, 0.8);
    color: var(--text-primary);
    padding: 0.55rem 0.95rem;
}

.damage-legend {
    position: absolute;
    top: 18px;
    right: 18px;
    z-index: 2;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    max-width: min(38%, 240px);
    padding: 0.8rem 0.95rem;
    border-radius: 14px;
    background: rgba(7, 10, 18, 0.76);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.damage-legend.is-empty {
    opacity: 0.8;
}

.damage-legend-item {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    min-width: 0;
}

.damage-legend-swatch {
    width: 11px;
    height: 11px;
    border-radius: 999px;
    background: var(--legend-color);
    box-shadow: 0 0 0 2px color-mix(in srgb, var(--legend-color) 28%, transparent);
    flex: 0 0 auto;
}

.damage-legend-text,
.damage-legend-empty {
    color: #f8fafc;
    font-size: 0.82rem;
    line-height: 1.3;
}

.damage-legend-text {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

:root[data-theme="light"] .inspection-overlay-select {
    background: rgba(255, 255, 255, 0.92);
    border-color: rgba(15, 23, 42, 0.12);
    color: #0f172a;
}

:root[data-theme="light"] .damage-legend {
    background: rgba(255, 255, 255, 0.9);
    border-color: rgba(15, 23, 42, 0.08);
}

:root[data-theme="light"] .damage-legend-text,
:root[data-theme="light"] .damage-legend-empty {
    color: #0f172a;
}

.comparison-mode-modal {
    align-items: stretch;
    padding: 1.5rem;
}

.comparison-mode-content {
    width: min(96vw, 1600px);
    max-width: 1600px;
    max-height: calc(100vh - 3rem);
    padding: 1.5rem;
    overflow: hidden;
}

.comparison-mode-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    padding-right: 2.5rem;
    margin-bottom: 1.25rem;
}

.comparison-mode-title {
    margin: 0.2rem 0 0;
}

.comparison-mode-body {
    overflow: auto;
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
    padding-right: 0.25rem;
}

.comparison-row {
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.03), rgba(255, 255, 255, 0.01));
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 18px;
    padding: 1.1rem;
}

.comparison-row-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1rem;
}

.comparison-row-kicker,
.comparison-panel-title {
    margin: 0 0 0.35rem;
    color: var(--text-secondary);
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.comparison-row-header h3 {
    margin: 0;
}

.comparison-columns {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 1rem;
}

.comparison-panel {
    min-width: 0;
}

.comparison-panel .custom-photo-frame {
    height: min(56vh, 520px);
    min-height: 320px;
}

:root[data-theme="light"] .comparison-row {
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.82), rgba(244, 247, 252, 0.86));
    border-color: rgba(15, 23, 42, 0.08);
}

:root[data-theme="light"] .dashboard-sidebar {
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.92), rgba(242, 247, 253, 0.92));
}

:root[data-theme="light"] .dashboard-hero,
:root[data-theme="light"] .dashboard-panel,
:root[data-theme="light"] .dashboard-metric-card,
:root[data-theme="light"] .inspection-summary-card {
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.94), rgba(246, 250, 255, 0.92));
}

:root[data-theme="light"] .dashboard-panel-highlight {
    background:
        radial-gradient(circle at top right, rgba(91, 140, 255, 0.14), transparent 35%),
        linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(241, 247, 255, 0.96));
}

:root[data-theme="light"] .inspection-summary-media {
    background: linear-gradient(135deg, rgba(91, 140, 255, 0.12), rgba(255, 143, 102, 0.08));
}

:root[data-theme="light"] .method-carousel-container,
:root[data-theme="light"] .custom-photo-frame {
    background: rgba(235, 241, 249, 0.95);
}

:root[data-theme="light"] .dashboard-nav-link.active,
:root[data-theme="light"] .dashboard-nav-link:hover {
    background: linear-gradient(135deg, rgba(91, 140, 255, 0.12), rgba(53, 200, 184, 0.08));
}

:root[data-theme="light"] .dashboard-filter-chip.active,
:root[data-theme="light"] .dashboard-filter-chip:hover {
    background: linear-gradient(135deg, rgba(91, 140, 255, 0.12), rgba(53, 200, 184, 0.08));
}

/* Responsive */
@media (max-width: 1180px) {
    .dashboard-shell {
        grid-template-columns: 1fr;
    }

    .dashboard-sidebar {
        position: static;
        min-height: auto;
    }

    .dashboard-metrics,
    .dashboard-feature-grid,
    .inspection-detail-layout,
    .inspection-intake-layout {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 960px) {
    .comparison-mode-content {
        width: 100%;
        max-height: calc(100vh - 1.5rem);
        padding: 1rem;
    }

    .comparison-mode-header {
        flex-direction: column;
        padding-right: 2rem;
    }

    .comparison-columns {
        grid-template-columns: 1fr;
    }
}

/* AI inspections analytics — daily charts */
.analytics-status-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 0.65rem 1rem;
    padding: 0 0 0.75rem;
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--text-secondary);
}

.analytics-legend-item {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
}

.analytics-legend-swatch {
    width: 10px;
    height: 10px;
    border-radius: 3px;
    flex-shrink: 0;
}

.analytics-legend-swatch--new-inspection {
    background: #4c1d95;
    box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.35), 0 0 0 3px rgba(16, 32, 58, 0.35);
}

.analytics-legend-swatch--created {
    background: var(--warning);
}

.analytics-legend-swatch--pending {
    background: #6b9cff;
}

.analytics-legend-swatch--completed {
    background: var(--success);
}

.analytics-legend-swatch--failed {
    background: var(--danger);
}

/* Vertical stacked column chart (inspections by day) */
.analytics-vchart-scroll {
    overflow-x: auto;
    overflow-y: visible;
    padding: 0.5rem 0 0.25rem;
    margin: 0 -0.25rem;
    -webkit-overflow-scrolling: touch;
}

.analytics-vchart {
    --analytics-vchart-px: 200px;
    display: flex;
    flex-direction: row;
    align-items: stretch;
    justify-content: flex-start;
    gap: clamp(3px, 1.2vw, 8px);
    min-width: min(100%, 31rem);
    min-height: calc(var(--analytics-vchart-px) + 3.25rem);
    padding: 0 0.25rem 0.5rem;
    border-bottom: 1px solid var(--panel-border);
}

.analytics-vchart-col {
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    align-items: center;
    flex: 1 1 0;
    min-width: 1.15rem;
    max-width: 3rem;
    gap: 0.3rem;
}

.analytics-vchart-total {
    font-size: 0.65rem;
    font-weight: 800;
    font-family: var(--font-display);
    color: var(--text-secondary);
    line-height: 1;
    min-height: 0.85rem;
}

.analytics-vchart-bar {
    width: 100%;
    max-width: 2rem;
    display: flex;
    flex-direction: column-reverse;
    align-items: stretch;
    /* flex-start = pack toward main-start; for column-reverse that is the bottom, so no empty gap showing track bg */
    justify-content: flex-start;
    border-radius: 10px 10px 4px 4px;
    overflow: hidden;
    background: rgba(91, 140, 255, 0.08);
    border: 1px solid var(--panel-border);
    box-sizing: border-box;
    transition: height 0.2s ease;
}

.analytics-vchart-bar:hover {
    border-color: rgba(91, 140, 255, 0.35);
}

.analytics-vchart-bar--users-solo {
    background: rgba(255, 143, 102, 0.12);
}

.analytics-vchart-bar--users-solo:hover {
    border-color: rgba(255, 143, 102, 0.45);
}

.analytics-vseg {
    min-height: 2px;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.12);
}

/* Solid fill — reads clearly on light and dark dashboards (avoids pale lavender) */
.analytics-vseg--new-inspection {
    background: #5b21b6;
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.22),
        inset 0 -1px 0 rgba(0, 0, 0, 0.25);
}

.analytics-vseg--users-solo {
    background: linear-gradient(180deg, #ffb38a, #ea580c);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.25);
}

.analytics-vseg--created {
    background: linear-gradient(180deg, #ffe066, #e6a317);
}

.analytics-vseg--pending {
    background: linear-gradient(180deg, #93b4ff, #3d6fd9);
}

.analytics-vseg--completed {
    background: linear-gradient(180deg, #5ee9b5, #1fa97a);
}

.analytics-vseg--failed {
    background: linear-gradient(180deg, #ff9aa2, #e11d48);
}

.analytics-vchart-date {
    font-size: 0.58rem;
    font-weight: 700;
    color: var(--text-secondary);
    line-height: 1.1;
    text-align: center;
    white-space: nowrap;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
}

:root[data-theme="light"] .analytics-vchart-bar {
    background: rgba(91, 140, 255, 0.12);
}

:root[data-theme="light"] .analytics-vchart-bar--users-solo {
    background: rgba(234, 88, 12, 0.12);
}

:root[data-theme="light"] .analytics-vseg--new-inspection {
    background: #3b0764;
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.2),
        inset 0 -1px 0 rgba(0, 0, 0, 0.15),
        0 0 0 1px rgba(16, 32, 58, 0.2);
}

:root[data-theme="light"] .analytics-legend-swatch--new-inspection {
    background: #3b0764;
    box-shadow: 0 0 0 2px #ffffff, 0 0 0 3px rgba(16, 32, 58, 0.35);
}

:root[data-theme="light"] .analytics-vseg--users-solo {
    background: linear-gradient(180deg, #fb923c, #c2410c);
}

.analytics-daily-chart {
    display: flex;
    flex-direction: column;
    gap: 0.55rem;
    padding: 1rem 0;
}

.analytics-daily-row {
    display: grid;
    grid-template-columns: 3.5rem minmax(0, 1fr) 2rem;
    align-items: center;
    gap: 0.65rem;
}

.analytics-daily-label {
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--text-secondary);
    white-space: nowrap;
}

.analytics-daily-bar-track {
    height: 10px;
    border-radius: 999px;
    background: var(--surface-muted);
    border: 1px solid var(--panel-border);
    overflow: hidden;
}

.analytics-daily-bar-fill {
    display: block;
    height: 100%;
    min-width: 0;
    border-radius: 999px;
    background: linear-gradient(90deg, var(--accent-primary), var(--accent-secondary));
    transition: width 0.2s ease;
}

.analytics-daily-bar-fill--users {
    background: linear-gradient(90deg, var(--accent-warm), rgba(255, 143, 102, 0.75));
}

.analytics-daily-count {
    font-size: 0.8rem;
    font-weight: 800;
    font-family: var(--font-display);
    color: var(--text-primary);
    text-align: right;
}

@media (max-width: 768px) {
    .flash-stack {
        left: 1rem;
        right: 1rem;
        max-width: none;
    }

    .dashboard-shell {
        padding: 1rem;
        gap: 1rem;
    }

    .dashboard-sidebar,
    .dashboard-hero,
    .dashboard-panel,
    .dashboard-metric-card {
        border-radius: 22px;
    }

    .dashboard-hero {
        padding: 1.4rem;
    }

    .dashboard-hero-actions,
    .inspection-summary-footer,
    .dashboard-section-header,
    .inspection-slide-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .inspection-card-grid {
        grid-template-columns: 1fr;
    }

    .intake-upload-grid {
        grid-template-columns: 1fr;
    }

    .custom-photo-frame {
        min-height: 320px;
    }
}

/* Kaminari pagination (dashboard lists, photo QA, etc.) */
.pagination-wrap {
    margin-top: 1.75rem;
    padding-top: 1.35rem;
    border-top: 1px solid var(--panel-border);
    /* Keep page controls left of fixed .theme-toggle-fab */
    padding-right: calc(12.5rem + env(safe-area-inset-right, 0px));
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 1rem;
}

.pagination-wrap .page-entries-info {
    margin: 0;
    font-size: 0.9375rem;
    line-height: 1.5;
    color: var(--text-secondary);
    font-weight: 600;
}

.pagination-wrap nav.pagination {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.4rem;
    row-gap: 0.5rem;
}

.pagination-wrap nav.pagination > span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.pagination-wrap nav.pagination a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 2.5rem;
    padding: 0.4rem 0.75rem;
    font-size: 0.875rem;
    font-weight: 700;
    border-radius: 12px;
    border: 1px solid var(--panel-border);
    background: var(--surface-muted);
    color: var(--text-primary);
    text-decoration: none;
    transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease, box-shadow 0.15s ease;
}

.pagination-wrap nav.pagination span.first a,
.pagination-wrap nav.pagination span.last a {
    padding-left: 0.95rem;
    padding-right: 0.95rem;
}

.pagination-wrap nav.pagination a:hover {
    border-color: rgba(91, 140, 255, 0.35);
    background: linear-gradient(135deg, rgba(91, 140, 255, 0.14), rgba(53, 200, 184, 0.08));
    color: var(--text-primary);
}

.pagination-wrap nav.pagination span.page:not(.gap):not(.current) a {
    min-width: 2.5rem;
    padding-left: 0.5rem;
    padding-right: 0.5rem;
}

.pagination-wrap nav.pagination span.page.current {
    min-width: 2.5rem;
    min-height: 2.5rem;
    padding: 0.4rem 0.5rem;
    font-size: 0.875rem;
    font-weight: 800;
    font-family: var(--font-display);
    border-radius: 12px;
    border: 1px solid transparent;
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
    color: #fff;
    box-shadow: 0 6px 20px -8px rgba(91, 140, 255, 0.55);
}

.pagination-wrap nav.pagination span.page.gap {
    min-width: auto;
    min-height: 2.5rem;
    padding: 0 0.35rem;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-secondary);
    border: none;
    background: transparent;
}

.pagination-wrap:has(.review-summary) {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.85rem 1.25rem;
    align-items: center;
}

.pagination-wrap:has(.review-summary) .page-entries-info {
    min-width: 0;
}

.pagination-wrap:has(.review-summary) nav.pagination {
    justify-content: flex-start;
}

.pagination-wrap:has(.review-summary) .review-summary {
    grid-column: 1 / -1;
    margin: 0;
    font-size: 0.85rem;
    color: var(--text-secondary);
}

@media (min-width: 640px) {
    .pagination-wrap:not(:has(.review-summary)) {
        flex-direction: row;
        flex-wrap: wrap;
        align-items: center;
        justify-content: space-between;
        gap: 1rem 1.5rem;
    }

    .pagination-wrap:not(:has(.review-summary)) .page-entries-info {
        flex: 1 1 auto;
        min-width: min(100%, 16rem);
    }

    .pagination-wrap:not(:has(.review-summary)) nav.pagination {
        flex: 0 1 auto;
        justify-content: flex-end;
    }

    .pagination-wrap:has(.review-summary) {
        grid-template-columns: minmax(0, 1fr) auto;
    }

    .pagination-wrap:has(.review-summary) nav.pagination {
        justify-content: flex-end;
    }
}
