/* =====================================================
   MOTORS365 DASHBOARD STYLES
   ===================================================== */

/* Dashboard Layout */
.dashboard-body {
    display: flex;
    min-height: 100vh;
    background: var(--bg-primary);
}

/* Sidebar */
.sidebar {
    width: 260px;
    height: 100vh;
    position: fixed;
    left: 0;
    top: 0;
    display: flex;
    flex-direction: column;
    background: var(--bg-secondary);
    border-right: 1px solid var(--border-subtle);
    z-index: 100;
    transition: transform var(--transition-base);
}

.sidebar-header {
    padding: 1.5rem;
    border-bottom: 1px solid var(--border-subtle);
}

.sidebar-logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-family: var(--font-display);
    font-size: 1.25rem;
    font-weight: 700;
}

.sidebar-logo .logo-icon {
    width: 32px;
    height: 32px;
    color: var(--navy-800);
}

.sidebar-nav {
    flex: 1;
    padding: 1rem;
    overflow-y: auto;
}

.sidebar-link {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.875rem 1rem;
    border-radius: var(--radius-md);
    color: var(--text-secondary);
    font-size: 0.938rem;
    transition: all var(--transition-fast);
    margin-bottom: 0.25rem;
}

.sidebar-link:hover {
    background: var(--bg-card);
    color: var(--text-primary);
}

.sidebar-link.active {
    background: var(--gold-muted);
    color: var(--gold);
}

.sidebar-link svg {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
}

.sidebar-divider {
    height: 1px;
    background: var(--border-subtle);
    margin: 0.5rem 1rem;
}

.sidebar-link-pro {
    position: relative;
}

.sidebar-pro-badge {
    font-size: 0.55rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    padding: 1px 6px;
    border-radius: var(--radius-full);
    background: var(--gold-muted);
    color: var(--gold);
    margin-left: auto;
}

.sidebar-footer {
    padding: 1rem;
    border-top: 1px solid var(--border-subtle);
}

.usage-card {
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    padding: 1rem;
    margin-bottom: 1rem;
}

.usage-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.75rem;
}

.usage-label {
    font-size: 0.875rem;
    font-weight: 500;
}

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

.usage-bar {
    height: 6px;
    background: var(--bg-tertiary);
    border-radius: var(--radius-full);
    overflow: hidden;
    margin-bottom: 1rem;
}

.usage-progress {
    height: 100%;
    background: linear-gradient(90deg, var(--gold) 0%, var(--gold-dark) 100%);
    border-radius: var(--radius-full);
    transition: width var(--transition-base);
}

.btn-sm {
    padding: 0.5rem 1rem;
    font-size: 0.813rem;
}

/* Main Content */
.main-content {
    flex: 1;
    margin-left: 260px;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Dashboard Header */
.dashboard-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 2rem;
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border-subtle);
    position: sticky;
    top: 0;
    z-index: 50;
}

.header-left {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.sidebar-toggle-btn {
    display: none;
    padding: 0.5rem;
    color: var(--text-secondary);
}

.sidebar-toggle-btn svg {
    width: 24px;
    height: 24px;
}

.page-title {
    font-size: 1.25rem;
    font-weight: 600;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.header-btn {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    color: var(--text-secondary);
    transition: all var(--transition-fast);
}

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

.header-btn svg {
    width: 20px;
    height: 20px;
}

.user-menu {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    cursor: pointer;
}

.user-avatar {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--gold-muted);
    border: 1px solid var(--border-gold);
    border-radius: 50%;
    color: var(--gold);
    font-weight: 600;
}

/* Analysis Input Section */
.analysis-input-section {
    padding: 2rem;
    max-width: 1000px;
    margin: 0 auto;
    width: 100%;
}

.input-card {
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-xl);
    padding: 2rem;
    margin-bottom: 2rem;
}

.input-card-header {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    margin-bottom: 2rem;
}

.input-icon-wrapper {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--gold-muted);
    border: 1px solid var(--border-gold);
    border-radius: var(--radius-md);
    color: var(--gold);
    flex-shrink: 0;
}

.input-icon-wrapper svg {
    width: 24px;
    height: 24px;
}

.input-title {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.input-subtitle {
    color: var(--text-secondary);
}

/* Form Styles */
.analysis-form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

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

.form-input {
    padding: 1rem 1.25rem;
    background: var(--bg-secondary);
    border: 1px solid var(--border-default);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    font-size: 1rem;
    transition: all var(--transition-fast);
}

.form-input:focus {
    outline: none;
    border-color: var(--gold);
    box-shadow: 0 0 0 4px var(--gold-muted);
}

.form-input::placeholder {
    color: var(--text-muted);
}

.input-wrapper {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

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

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
}

.radio-group {
    display: flex;
    gap: 1rem;
}

.radio-option {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
}

.radio-option input {
    appearance: none;
    width: 18px;
    height: 18px;
    border: 2px solid var(--border-default);
    border-radius: 50%;
    transition: all var(--transition-fast);
}

.radio-option input:checked {
    border-color: var(--gold);
    background: var(--gold);
    box-shadow: inset 0 0 0 3px var(--bg-secondary);
}

.radio-label {
    font-size: 0.938rem;
    color: var(--text-secondary);
}

.btn-analyze-main {
    margin-top: 0.5rem;
}

.btn-analyze-main svg {
    width: 20px;
    height: 20px;
}

/* Supported Platforms */
.supported-platforms {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border-subtle);
}

.platforms-label {
    font-size: 0.813rem;
    color: var(--text-muted);
}

.platforms-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.platform-badge {
    padding: 0.25rem 0.75rem;
    background: var(--bg-tertiary);
    border-radius: var(--radius-full);
    font-size: 0.75rem;
    color: var(--text-secondary);
}

/* Recent Analyses */
.recent-section {
    margin-top: 1rem;
}

.recent-title {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: var(--text-secondary);
}

.recent-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
}

.recent-card {
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    overflow: hidden;
    cursor: pointer;
    transition: all var(--transition-base);
}

.recent-card:hover {
    border-color: var(--border-default);
    transform: translateY(-2px);
}

.recent-image {
    height: 120px;
    background: var(--bg-tertiary);
    display: flex;
    align-items: center;
    justify-content: center;
}

.recent-placeholder {
    color: var(--navy-600);
}

.recent-placeholder svg {
    width: 60px;
    height: 60px;
}

.recent-info {
    padding: 1rem;
    position: relative;
}

.recent-score {
    position: absolute;
    top: -16px;
    right: 1rem;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    font-size: 0.813rem;
    font-weight: 700;
}

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

.score-warning {
    background: var(--warning);
    color: var(--navy-950);
}

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

.recent-name {
    font-size: 0.938rem;
    font-weight: 600;
    margin-bottom: 0.25rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.recent-meta {
    font-size: 0.813rem;
    color: var(--text-muted);
    margin-bottom: 0.5rem;
}

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

.recent-card-empty {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 200px;
}

.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
    color: var(--text-muted);
    text-align: center;
    padding: 1rem;
}

.empty-state svg {
    width: 32px;
    height: 32px;
    opacity: 0.5;
}

.empty-state span {
    font-size: 0.875rem;
}

/* Loading State */
.analysis-loading {
    padding: 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: calc(100vh - 80px);
}

.loading-card {
    text-align: center;
    max-width: 400px;
}

.loading-animation {
    width: 120px;
    height: 120px;
    margin: 0 auto 2rem;
    position: relative;
}

.loading-ring {
    position: absolute;
    inset: 0;
    animation: rotate 2s linear infinite;
}

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

.ring-segment {
    position: absolute;
    width: 100%;
    height: 100%;
    border: 3px solid transparent;
    border-top-color: var(--gold);
    border-radius: 50%;
}

.ring-segment:nth-child(2) {
    transform: rotate(120deg);
    opacity: 0.6;
}

.ring-segment:nth-child(3) {
    transform: rotate(240deg);
    opacity: 0.3;
}

.loading-icon {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--gold);
}

.loading-icon svg {
    width: 40px;
    height: 40px;
}

.loading-title {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.loading-subtitle {
    color: var(--text-secondary);
    margin-bottom: 2rem;
}

.loading-steps {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    text-align: left;
}

.loading-step {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    background: var(--bg-card);
    border-radius: var(--radius-md);
    color: var(--text-muted);
    transition: all var(--transition-fast);
}

.loading-step.active {
    background: var(--gold-muted);
    color: var(--gold);
}

.loading-step.completed {
    color: var(--success);
}

.step-indicator {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: currentColor;
}

.loading-step.active .step-indicator {
    animation: pulse 1s infinite;
}

/* Results Section */
.analysis-results {
    padding: 2rem;
    max-width: 1200px;
    margin: 0 auto;
    width: 100%;
}

.results-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 2rem;
}

.back-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    color: var(--text-secondary);
    border-radius: var(--radius-md);
    transition: all var(--transition-fast);
}

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

.back-btn svg {
    width: 18px;
    height: 18px;
}

.results-actions {
    display: flex;
    gap: 0.75rem;
}

/* Results Grid */
.results-grid {
    display: grid;
    grid-template-columns: 1fr 400px;
    gap: 1.5rem;
    margin-bottom: 2rem;
}

/* Vehicle Overview */
.vehicle-overview {
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-xl);
    overflow: hidden;
}

.overview-image {
    height: 240px;
    background: var(--bg-tertiary);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.image-placeholder {
    color: var(--navy-600);
}

.image-placeholder svg {
    width: 100px;
    height: 100px;
}

.image-badge {
    position: absolute;
    bottom: 1rem;
    right: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 0.75rem;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(10px);
    border-radius: var(--radius-full);
    font-size: 0.813rem;
    color: white;
}

.image-badge svg {
    width: 14px;
    height: 14px;
}

.overview-content {
    padding: 1.5rem;
}

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

.vehicle-badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: var(--radius-full);
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.5rem;
}

.badge-recommended {
    background: var(--success-muted);
    color: var(--success);
}

.badge-caution {
    background: var(--warning-muted);
    color: var(--warning);
}

.badge-avoid {
    background: var(--danger-muted);
    color: var(--danger);
}

.vehicle-title {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.vehicle-subtitle {
    font-size: 0.938rem;
    color: var(--text-muted);
}

.confidence-score {
    text-align: center;
}

.score-ring {
    width: 80px;
    height: 80px;
    position: relative;
}

.score-ring svg {
    width: 100%;
    height: 100%;
}

.score-value {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--success);
}

.score-label {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-top: 0.25rem;
}

.overview-specs {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
    padding: 1.5rem 0;
    border-top: 1px solid var(--border-subtle);
    border-bottom: 1px solid var(--border-subtle);
}

.spec-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.spec-item svg {
    width: 20px;
    height: 20px;
    color: var(--text-muted);
}

.spec-value {
    display: block;
    font-weight: 600;
}

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

.overview-pricing {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-top: 1.5rem;
}

.price-box {
    padding: 1rem;
    background: var(--bg-secondary);
    border-radius: var(--radius-md);
}

.price-box-highlight {
    background: var(--success-muted);
}

.price-label {
    display: block;
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-bottom: 0.25rem;
}

.price-value {
    font-size: 1.25rem;
    font-weight: 700;
}

.price-box-highlight .price-value {
    color: var(--success);
}

.price-indicator {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 0.75rem;
    border-radius: var(--radius-full);
    font-size: 0.813rem;
    font-weight: 500;
}

.price-fair {
    background: var(--success-muted);
    color: var(--success);
}

.price-high {
    background: var(--warning-muted);
    color: var(--warning);
}

.price-indicator svg {
    width: 16px;
    height: 16px;
}

/* Findings Card */
.findings-card {
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-xl);
    padding: 1.5rem;
}

.card-title {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 1.125rem;
    margin-bottom: 1.5rem;
}

.card-title svg {
    width: 20px;
    height: 20px;
    color: var(--gold);
}

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

.finding {
    display: flex;
    gap: 1rem;
    padding: 1rem;
    border-radius: var(--radius-md);
    background: var(--bg-secondary);
}

.finding-icon {
    width: 24px;
    height: 24px;
    flex-shrink: 0;
}

.finding-icon svg {
    width: 100%;
    height: 100%;
}

.finding-positive .finding-icon { color: var(--success); }
.finding-warning .finding-icon { color: var(--warning); }
.finding-danger .finding-icon { color: var(--danger); }
.finding-info .finding-icon { color: var(--info); }

.finding-content h4 {
    font-size: 0.938rem;
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.finding-content p {
    font-size: 0.875rem;
    color: var(--text-secondary);
    line-height: 1.5;
}

/* Tabs */
.detail-tabs {
    display: flex;
    gap: 0.5rem;
    padding: 0.5rem;
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    margin-bottom: 1.5rem;
    overflow-x: auto;
}

.tab-btn {
    padding: 0.75rem 1.25rem;
    border-radius: var(--radius-md);
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-secondary);
    white-space: nowrap;
    transition: all var(--transition-fast);
}

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

.tab-btn.active {
    background: var(--gold);
    color: var(--text-inverse);
}

.tab-content {
    display: none;
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-xl);
    padding: 2rem;
}

.tab-content.active {
    display: block;
}

/* MOT Tab */
.mot-overview {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
}

.mot-stat {
    text-align: center;
    padding: 1rem;
    background: var(--bg-secondary);
    border-radius: var(--radius-md);
}

.mot-stat-value {
    display: block;
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 0.25rem;
}

.mot-stat-value.mot-pass { color: var(--success); }
.mot-stat-value.mot-fail { color: var(--danger); }

.mot-stat-label {
    font-size: 0.813rem;
    color: var(--text-muted);
}

.mot-timeline-detail {
    margin-bottom: 2rem;
}

.mot-entry {
    display: flex;
    gap: 1rem;
}

.mot-entry-date {
    width: 60px;
    text-align: center;
    flex-shrink: 0;
}

.mot-month {
    display: block;
    font-size: 0.875rem;
    font-weight: 500;
}

.mot-year {
    display: block;
    font-size: 0.75rem;
    color: var(--text-muted);
}

.mot-entry-connector {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 24px;
}

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

.connector-dot.pass { background: var(--success); }
.connector-dot.fail { background: var(--danger); }

.connector-line {
    width: 2px;
    flex: 1;
    background: var(--border-default);
    margin: 0.5rem 0;
}

.mot-entry-content {
    flex: 1;
    padding-bottom: 1.5rem;
}

.mot-entry-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 0.75rem;
}

.mot-result {
    padding: 0.25rem 0.75rem;
    border-radius: var(--radius-full);
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
}

.mot-result.pass {
    background: var(--success-muted);
    color: var(--success);
}

.mot-result.fail {
    background: var(--danger-muted);
    color: var(--danger);
}

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

.mot-advisory {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    padding: 0.75rem;
    background: var(--bg-secondary);
    border-radius: var(--radius-sm);
    margin-top: 0.5rem;
}

.advisory-label {
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--warning);
}

.advisory-text {
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.no-issues {
    font-size: 0.875rem;
    color: var(--success);
}

/* Mileage Chart */
.mileage-chart {
    padding-top: 2rem;
    border-top: 1px solid var(--border-subtle);
}

.chart-title {
    font-size: 1rem;
    margin-bottom: 1.5rem;
}

.chart-container {
    display: flex;
    align-items: flex-end;
    gap: 1rem;
    height: 150px;
    padding: 0 1rem;
}

.chart-bar {
    flex: 1;
    background: linear-gradient(180deg, var(--gold) 0%, var(--gold-dark) 100%);
    border-radius: var(--radius-sm) var(--radius-sm) 0 0;
    position: relative;
    transition: height var(--transition-base);
}

.bar-value {
    position: absolute;
    top: -24px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--text-secondary);
    white-space: nowrap;
}

.bar-label {
    position: absolute;
    bottom: -24px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 0.75rem;
    color: var(--text-muted);
}

.chart-insight {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: 2.5rem;
    padding: 1rem;
    background: var(--success-muted);
    border-radius: var(--radius-md);
    font-size: 0.875rem;
    color: var(--success);
}

.insight-icon {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
}

/* Model Intelligence Tab */
.model-header {
    margin-bottom: 2rem;
}

.model-header h3 {
    font-size: 1.25rem;
    margin-bottom: 0.25rem;
}

.model-header p {
    color: var(--text-muted);
}

.model-sections {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.model-section-title {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 1rem;
    margin-bottom: 1rem;
}

.model-section-title svg {
    width: 20px;
    height: 20px;
    color: var(--gold);
}

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

.issue-item {
    display: flex;
    gap: 1rem;
    padding: 1rem;
    background: var(--bg-secondary);
    border-radius: var(--radius-md);
}

.issue-severity {
    padding: 0.25rem 0.5rem;
    border-radius: var(--radius-sm);
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    height: fit-content;
}

.severity-high {
    background: var(--danger-muted);
    color: var(--danger);
}

.severity-medium {
    background: var(--warning-muted);
    color: var(--warning);
}

.severity-low {
    background: var(--bg-tertiary);
    color: var(--text-muted);
}

.issue-content h5 {
    font-size: 0.938rem;
    margin-bottom: 0.25rem;
}

.issue-content p {
    font-size: 0.875rem;
    color: var(--text-secondary);
    line-height: 1.5;
}

.strengths-list {
    list-style: none;
}

.strengths-list li {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 0;
    font-size: 0.938rem;
    color: var(--text-secondary);
    border-bottom: 1px solid var(--border-subtle);
}

.strengths-list li::before {
    content: '✓';
    color: var(--success);
    font-weight: 700;
}

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

.recall-item {
    display: flex;
    gap: 1rem;
    padding: 1rem;
    background: var(--bg-secondary);
    border-radius: var(--radius-md);
}

.recall-status {
    padding: 0.25rem 0.5rem;
    border-radius: var(--radius-sm);
    font-size: 0.75rem;
    font-weight: 600;
    height: fit-content;
}

.recall-resolved .recall-status {
    background: var(--success-muted);
    color: var(--success);
}

.recall-content h5 {
    font-size: 0.938rem;
    margin-bottom: 0.25rem;
}

.recall-content p {
    font-size: 0.875rem;
    color: var(--text-secondary);
}

/* Maintenance Tab */
.maintenance-summary {
    margin-bottom: 2rem;
}

.maintenance-total {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 1.5rem;
    background: var(--bg-secondary);
    border-radius: var(--radius-lg);
}

.total-label {
    font-size: 0.875rem;
    color: var(--text-muted);
    margin-bottom: 0.5rem;
}

.total-value {
    font-size: 2rem;
    font-weight: 700;
    color: var(--gold);
}

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

.maintenance-item {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    padding: 1.25rem;
    background: var(--bg-secondary);
    border-radius: var(--radius-md);
}

.maintenance-when {
    width: 100px;
    text-align: center;
    flex-shrink: 0;
}

.when-label {
    display: block;
    font-size: 0.75rem;
    color: var(--text-muted);
}

.when-value {
    font-weight: 600;
}

.maintenance-content {
    flex: 1;
}

.maintenance-content h4 {
    font-size: 1rem;
    margin-bottom: 0.25rem;
}

.maintenance-content p {
    font-size: 0.875rem;
    color: var(--text-muted);
    margin-bottom: 0.5rem;
}

.maintenance-cost {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--gold);
}

.maintenance-priority {
    padding: 0.375rem 0.75rem;
    border-radius: var(--radius-full);
    font-size: 0.75rem;
    font-weight: 500;
}

.priority-high {
    background: var(--danger-muted);
    color: var(--danger);
}

.priority-medium {
    background: var(--warning-muted);
    color: var(--warning);
}

.priority-low {
    background: var(--bg-tertiary);
    color: var(--text-muted);
}

/* Checklist Tab */
.checklist-intro {
    color: var(--text-secondary);
    margin-bottom: 2rem;
}

.checklist-sections {
    display: flex;
    flex-direction: column;
    gap: 2rem;
    margin-bottom: 2rem;
}

.checklist-section-title {
    font-size: 1rem;
    margin-bottom: 1rem;
}

.checklist-items {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.checklist-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    background: var(--bg-secondary);
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all var(--transition-fast);
}

.checklist-item:hover {
    background: var(--bg-tertiary);
}

.checklist-item.priority {
    border-left: 3px solid var(--warning);
}

.checklist-item input {
    appearance: none;
    width: 20px;
    height: 20px;
    border: 2px solid var(--border-default);
    border-radius: var(--radius-sm);
    flex-shrink: 0;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.checklist-item input:checked {
    background: var(--success);
    border-color: var(--success);
}

.checklist-item input:checked::after {
    content: '✓';
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 0.75rem;
    font-weight: 700;
}

.checklist-text {
    font-size: 0.938rem;
    color: var(--text-secondary);
}

.checklist-item input:checked + .checkmark + .checklist-text {
    text-decoration: line-through;
    color: var(--text-muted);
}

/* Negotiation Tab */
.negotiation-intro {
    margin-bottom: 2rem;
}

.negotiation-intro p {
    color: var(--text-secondary);
    margin-bottom: 1rem;
}

.target-price {
    display: inline-flex;
    flex-direction: column;
    padding: 1rem 1.5rem;
    background: var(--success-muted);
    border-radius: var(--radius-md);
}

.target-label {
    font-size: 0.813rem;
    color: var(--success);
    margin-bottom: 0.25rem;
}

.target-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--success);
}

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

.negotiation-point {
    display: flex;
    gap: 1rem;
    padding: 1.25rem;
    background: var(--bg-secondary);
    border-radius: var(--radius-md);
}

.point-number {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--gold-muted);
    border-radius: 50%;
    color: var(--gold);
    font-weight: 700;
    flex-shrink: 0;
}

.point-content h4 {
    font-size: 1rem;
    margin-bottom: 0.5rem;
}

.point-content p {
    font-size: 0.875rem;
    color: var(--text-secondary);
    font-style: italic;
    margin-bottom: 0.75rem;
    line-height: 1.5;
}

.point-value {
    font-size: 0.813rem;
    font-weight: 500;
    color: var(--success);
}

/* Chat Section */
.chat-section {
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-xl);
    margin-top: 2rem;
    overflow: hidden;
}

.chat-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 1.5rem;
    border-bottom: 1px solid var(--border-subtle);
}

.chat-header h3 {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 1rem;
}

.chat-header svg {
    width: 20px;
    height: 20px;
    color: var(--gold);
}

.chat-remaining {
    font-size: 0.813rem;
    color: var(--text-muted);
}

.chat-messages {
    padding: 1.5rem;
    max-height: 300px;
    overflow-y: auto;
}

.chat-message {
    display: flex;
    gap: 1rem;
    margin-bottom: 1rem;
}

.message-avatar {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    font-size: 0.75rem;
    font-weight: 600;
    flex-shrink: 0;
}

.chat-message.assistant .message-avatar {
    background: var(--gold-muted);
    color: var(--gold);
}

.chat-message.user .message-avatar {
    background: var(--bg-tertiary);
    color: var(--text-secondary);
}

.message-content {
    flex: 1;
    padding: 1rem;
    background: var(--bg-secondary);
    border-radius: var(--radius-md);
}

.message-content p {
    font-size: 0.938rem;
    line-height: 1.6;
    color: var(--text-secondary);
}

.chat-input-form {
    display: flex;
    gap: 0.75rem;
    padding: 0 1.5rem 1rem;
}

.chat-input {
    flex: 1;
    padding: 0.875rem 1rem;
    background: var(--bg-secondary);
    border: 1px solid var(--border-default);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    font-size: 0.938rem;
}

.chat-input:focus {
    outline: none;
    border-color: var(--gold);
}

.chat-input-form .btn {
    padding: 0.875rem 1rem;
}

.chat-input-form .btn svg {
    width: 18px;
    height: 18px;
}

.chat-suggestions {
    display: flex;
    gap: 0.5rem;
    padding: 0 1.5rem 1.5rem;
    flex-wrap: wrap;
}

.suggestion-chip {
    padding: 0.5rem 0.875rem;
    background: var(--bg-secondary);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-full);
    font-size: 0.813rem;
    color: var(--text-secondary);
    transition: all var(--transition-fast);
}

.suggestion-chip:hover {
    background: var(--bg-tertiary);
    color: var(--text-primary);
    border-color: var(--border-default);
}

/* Responsive */
@media (max-width: 1024px) {
    .sidebar {
        transform: translateX(-100%);
    }

    .sidebar.active {
        transform: translateX(0);
    }

    .main-content {
        margin-left: 0;
    }

    .sidebar-toggle-btn {
        display: block;
    }

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

    .overview-specs {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .analysis-input-section,
    .analysis-results {
        padding: 1rem;
    }

    .input-card {
        padding: 1.5rem;
    }

    .form-row {
        grid-template-columns: 1fr;
    }

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

    .mot-overview {
        grid-template-columns: repeat(2, 1fr);
    }

    .results-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }

    .results-actions {
        width: 100%;
        justify-content: flex-start;
    }

    .overview-pricing {
        flex-direction: column;
        align-items: stretch;
    }

    .detail-tabs {
        flex-wrap: nowrap;
        -webkit-overflow-scrolling: touch;
    }
}

/* =====================================================
   ADDITIONAL DASHBOARD STYLES
   ===================================================== */

/* Analysis Section */
.analysis-section { padding: 2rem; }
.analysis-container { max-width: 700px; margin: 0 auto; }
.analysis-header { text-align: center; margin-bottom: 2rem; }
.analysis-header h2 { font-size: 1.75rem; margin-bottom: 0.5rem; }
.analysis-header p { color: var(--text-muted); }

/* Input Divider */
.input-divider { display: flex; align-items: center; gap: 1rem; margin: 1rem 0; color: var(--text-muted); font-size: 0.875rem; }
.input-divider::before, .input-divider::after { content: ''; flex: 1; height: 1px; background: var(--border-subtle); }

/* Input Group */
.input-group { position: relative; }
.input-group .input-icon { position: absolute; left: 1rem; top: 50%; transform: translateY(-50%); width: 20px; height: 20px; color: var(--text-muted); }
.input-group .form-input { padding-left: 3rem; }
.input-group.large .form-input { padding: 1.25rem 1.25rem 1.25rem 3.5rem; font-size: 1.125rem; }

/* Price input (progressive disclosure) */
.price-input-group {
    margin-top: 0.75rem;
    animation: slideDown 0.25s ease-out;
}
.price-input-group .form-input {
    font-size: 0.95rem;
    padding: 0.875rem 1rem 0.875rem 3rem;
    border-style: dashed;
}
.price-input-group .form-input::placeholder { font-style: italic; }
@keyframes slideDown {
    from { opacity: 0; transform: translateY(-8px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Recent Analyses */
.recent-analyses { margin-top: 2rem; padding-top: 2rem; border-top: 1px solid var(--border-subtle); }
.recent-analyses h4 { font-size: 1rem; margin-bottom: 1rem; color: var(--text-muted); }
.recent-list { display: flex; flex-direction: column; gap: 0.75rem; }
.recent-item { display: flex; align-items: center; gap: 1rem; padding: 1rem; background: var(--bg-card); border: 1px solid var(--border-subtle); border-radius: var(--radius-lg); transition: all var(--transition-fast); }
.recent-item:hover { border-color: var(--gold); transform: translateX(4px); }
.recent-item .recent-score { width: 40px; height: 40px; display: flex; align-items: center; justify-content: center; border-radius: 50%; font-weight: 700; font-size: 0.875rem; flex-shrink: 0; }
.recent-item .recent-info { flex: 1; }
.recent-item .recent-title { display: block; font-weight: 600; margin-bottom: 0.25rem; }
.recent-item .recent-meta { font-size: 0.813rem; color: var(--text-muted); }
.recent-item .recent-time { font-size: 0.75rem; color: var(--text-muted); }
.no-recent { color: var(--text-muted); text-align: center; padding: 1rem; }

/* Loading Section — Night Driver Game */
.loading-section { display: flex; align-items: center; justify-content: center; min-height: 60vh; }
.nd-loading-container { text-align: center; max-width: 520px; width: 100%; }
.nd-loading-top { margin-bottom: 16px; }
.nd-loading-steps-inline { display: flex; justify-content: center; gap: 6px; flex-wrap: wrap; margin-bottom: 8px; }
.nd-step {
    display: inline-flex; align-items: center; gap: 5px;
    font-size: 0.72rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.04em;
    color: var(--text-muted); padding: 4px 10px; border-radius: var(--radius-full);
    background: rgba(255,255,255,0.04); transition: all 0.3s ease;
}
.nd-step-dot {
    width: 6px; height: 6px; border-radius: 50%; background: var(--border-default);
    flex-shrink: 0; transition: all 0.3s ease;
}
.nd-step.active { color: var(--gold); background: var(--gold-muted); }
.nd-step.active .nd-step-dot { background: var(--gold); box-shadow: 0 0 6px rgba(212,168,85,0.5); animation: nd-pulse 1s ease infinite; }
.nd-step.completed { color: var(--success); background: rgba(34,197,94,0.08); }
.nd-step.completed .nd-step-dot { background: var(--success); }
@keyframes nd-pulse { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.4); } }
.nd-loading-subtitle { font-size: 0.85rem; color: var(--text-secondary); margin: 0; }

/* Night Driver canvas */
.nd-game-wrap {
    position: relative; border-radius: var(--radius-lg); overflow: hidden;
    border: 2px solid var(--border-subtle); background: #000; margin: 0 auto; max-width: 480px;
    box-shadow: 0 0 30px rgba(0,0,0,0.5), inset 0 0 40px rgba(0,0,0,0.3);
}
.nd-game-wrap canvas { display: block; width: 100%; height: auto; image-rendering: pixelated; }
.nd-controls-hint {
    display: flex; justify-content: center; gap: 16px; margin-top: 10px;
    font-size: 0.72rem; color: var(--text-muted); font-family: 'Courier New', monospace; letter-spacing: 0.03em;
}
.nd-proceed-btn { margin-top: 16px; animation: nd-btn-glow 2s ease infinite; gap: 8px; }
.nd-proceed-btn svg { width: 20px; height: 20px; }
@keyframes nd-btn-glow {
    0%, 100% { box-shadow: 0 0 8px rgba(212,168,85,0.3); }
    50% { box-shadow: 0 0 20px rgba(212,168,85,0.6); }
}
.nd-proceed-hint { font-size: 0.78rem; color: var(--success); margin: 8px 0 0; animation: nd-fadeIn 0.5s ease; }
@keyframes nd-fadeIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: translateY(0); } }

/* Results Section */
.results-section { padding: 2rem; }
.results-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 2rem; flex-wrap: wrap; gap: 1rem; }
.results-actions { display: flex; gap: 0.75rem; }

/* Vehicle Summary Card */
.vehicle-summary-card { display: grid; grid-template-columns: 200px 1fr 180px; gap: 2rem; padding: 2rem; background: var(--bg-card); border: 1px solid var(--border-subtle); border-radius: var(--radius-xl); margin-bottom: 2rem; }
.vehicle-image { background: var(--bg-tertiary); border-radius: var(--radius-lg); display: flex; align-items: center; justify-content: center; min-height: 150px; }
.vehicle-placeholder { color: var(--navy-600); }
.vehicle-placeholder svg { width: 80px; height: 80px; }
.vehicle-info { display: flex; flex-direction: column; justify-content: center; }
.vehicle-badges { display: flex; gap: 0.5rem; margin-bottom: 0.75rem; }
.badge { padding: 0.25rem 0.75rem; background: var(--bg-tertiary); border-radius: var(--radius-full); font-size: 0.75rem; font-weight: 500; }
.vehicle-title { font-size: 1.5rem; font-weight: 700; margin-bottom: 0.5rem; }
.vehicle-meta { display: flex; gap: 1.5rem; color: var(--text-muted); font-size: 0.875rem; margin-bottom: 1rem; }
.vehicle-meta span { display: flex; align-items: center; gap: 0.5rem; }
.vehicle-meta svg { width: 16px; height: 16px; }
.vehicle-price-row { display: flex; align-items: center; gap: 1rem; }
.vehicle-price { font-size: 1.75rem; font-weight: 700; color: var(--gold); }
.price-indicator { display: flex; align-items: center; gap: 0.5rem; font-size: 0.875rem; }
.indicator-dot { width: 8px; height: 8px; border-radius: 50%; }
.indicator-dot.good { background: var(--success); }
.indicator-dot.fair { background: var(--warning); }
.indicator-dot.warning { background: var(--danger); }
.vehicle-score { display: flex; flex-direction: column; align-items: center; justify-content: center; }
.score-ring { position: relative; width: 100px; height: 100px; }
.score-value { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font-size: 2rem; font-weight: 700; }
.score-label { font-size: 0.75rem; color: var(--text-muted); margin-top: 0.5rem; }
.score-verdict { font-size: 0.875rem; font-weight: 600; margin-top: 0.25rem; }
.score-verdict.good { color: var(--success); }
.score-verdict.warning { color: var(--warning); }
.score-verdict.bad { color: var(--danger); }

/* Results Tabs */
.results-tabs { display: flex; gap: 0.5rem; padding: 0.5rem; background: var(--bg-card); border-radius: var(--radius-lg); margin-bottom: 1.5rem; overflow-x: auto; }
.tab-btn { display: flex; align-items: center; gap: 0.5rem; padding: 0.75rem 1rem; border-radius: var(--radius-md); font-size: 0.875rem; color: var(--text-muted); white-space: nowrap; transition: all var(--transition-fast); }
.tab-btn svg { width: 18px; height: 18px; }
.tab-btn:hover { color: var(--text-primary); background: var(--bg-secondary); }
.tab-btn.active { background: var(--gold); color: var(--text-inverse); }

/* Cards */
.card { background: var(--bg-card); border: 1px solid var(--border-subtle); border-radius: var(--radius-xl); overflow: hidden; }
.card-header { padding: 1.25rem 1.5rem; border-bottom: 1px solid var(--border-subtle); }
.card-header h3 { font-size: 1rem; }
.card-subtitle { font-size: 0.813rem; color: var(--text-muted); margin-top: 0.25rem; }
.card-body { padding: 1.5rem; }

/* Overview Grid */
.overview-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1.5rem; }
.insights-card, .score-breakdown-card { grid-column: span 1; }
.recommendation-card { grid-column: span 2; display: flex; gap: 1.5rem; padding: 1.5rem; }
.recommendation-card.high { border-color: var(--success); background: var(--success-muted); }
.recommendation-card.medium { border-color: var(--warning); background: var(--warning-muted); }
.recommendation-card.low { border-color: var(--danger); background: var(--danger-muted); }
.recommendation-icon { width: 48px; height: 48px; display: flex; align-items: center; justify-content: center; background: var(--bg-card); border-radius: 50%; flex-shrink: 0; }
.recommendation-content h3 { margin-bottom: 0.5rem; }
.recommendation-content p { color: var(--text-secondary); line-height: 1.6; }
.maintenance-card { grid-column: span 2; }

/* Insight Items */
.insight-item { display: flex; align-items: center; gap: 0.75rem; padding: 0.75rem 1rem; border-radius: var(--radius-md); margin-bottom: 0.5rem; }
.insight-item.positive { background: var(--success-muted); color: var(--success); }
.insight-item.warning { background: var(--warning-muted); color: var(--warning); }
.insight-item.neutral { background: var(--bg-secondary); color: var(--text-secondary); }
.insight-icon { font-size: 1rem; }

/* Breakdown Items */
.breakdown-item { margin-bottom: 1rem; }
.breakdown-header { display: flex; justify-content: space-between; margin-bottom: 0.5rem; font-size: 0.875rem; }
.breakdown-bar { height: 8px; background: var(--bg-tertiary); border-radius: var(--radius-full); overflow: hidden; }
.breakdown-fill { height: 100%; border-radius: var(--radius-full); transition: width 1s ease-out; }
.breakdown-fill.good { background: var(--success); }
.breakdown-fill.warning { background: var(--warning); }
.breakdown-fill.bad { background: var(--danger); }

/* Maintenance Items */
.maintenance-item { display: flex; justify-content: space-between; align-items: center; padding: 1rem; border-radius: var(--radius-md); margin-bottom: 0.5rem; }
.maintenance-item.urgent { background: var(--danger-muted); }
.maintenance-item.soon { background: var(--warning-muted); }
.maintenance-item.normal { background: var(--bg-secondary); }
.maintenance-info { flex: 1; }
.maintenance-name { display: block; font-weight: 600; margin-bottom: 0.25rem; }
.maintenance-due { font-size: 0.813rem; color: var(--text-muted); }
.maintenance-cost { font-weight: 600; color: var(--gold); }

/* MOT Timeline */
.mot-timeline { display: flex; flex-direction: column; gap: 1.5rem; }
.mot-entry { display: flex; gap: 1rem; padding: 1rem; border-radius: var(--radius-md); }
.mot-entry.pass { background: var(--success-muted); border-left: 3px solid var(--success); }
.mot-entry.fail { background: var(--danger-muted); border-left: 3px solid var(--danger); }
.mot-entry.latest { border-width: 3px; }
.mot-badge { padding: 0.25rem 0.75rem; border-radius: var(--radius-full); font-size: 0.75rem; font-weight: 700; height: fit-content; }
.mot-entry.pass .mot-badge { background: var(--success); color: white; }
.mot-entry.fail .mot-badge { background: var(--danger); color: white; }
.mot-details { flex: 1; }
.mot-date { font-weight: 600; margin-bottom: 0.25rem; }
.mot-mileage { font-size: 0.875rem; color: var(--text-muted); margin-bottom: 0.5rem; }
.mot-advisories, .mot-failures, .mot-dangerous, .mot-minor { margin-top: 0.5rem; }
.mot-advisories ul, .mot-failures ul, .mot-dangerous ul, .mot-minor ul { margin: 0.25rem 0 0 1rem; font-size: 0.875rem; color: var(--text-secondary); }
.mot-dangerous { color: var(--danger); }
.mot-dangerous strong { color: var(--danger); }
.mot-minor strong { color: var(--text-muted); }
.mot-mileage-delta { font-size: 0.8rem; color: var(--text-muted); opacity: 0.8; }
.mot-expiry-inline { font-size: 0.8rem; font-weight: 400; color: var(--text-muted); margin-left: 0.5rem; }

/* MOT Expiry Banner */
.mot-expiry-banner { display: flex; align-items: center; gap: 0.75rem; padding: 0.75rem 1rem; border-radius: var(--radius-md); margin-bottom: 1.5rem; font-size: 0.9rem; font-weight: 500; }
.mot-expiry-banner.good { background: var(--success-muted); color: var(--success); }
.mot-expiry-banner.warning { background: var(--warning-muted); color: var(--warning); }
.mot-expiry-banner.expired { background: var(--danger-muted); color: var(--danger); }

.bar-label { position: absolute; bottom: -20px; left: 50%; transform: translateX(-50%); font-size: 0.7rem; color: var(--text-muted); white-space: nowrap; }

/* Issues List */
.issues-list { display: flex; flex-direction: column; gap: 1rem; }
.issue-item { padding: 1rem; border-radius: var(--radius-md); }
.issue-item.high { background: var(--danger-muted); border-left: 3px solid var(--danger); }
.issue-item.medium { background: var(--warning-muted); border-left: 3px solid var(--warning); }
.issue-item.low { background: var(--bg-secondary); border-left: 3px solid var(--border-default); }
.issue-header { display: flex; align-items: center; gap: 0.5rem; margin-bottom: 0.5rem; }
.issue-header h4 { font-size: 1rem; }
.issue-desc { font-size: 0.875rem; color: var(--text-secondary); line-height: 1.5; margin-bottom: 0.5rem; }
.issue-check { font-size: 0.75rem; color: var(--text-muted); font-style: italic; }

/* Price Analysis */
.price-analysis-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1.5rem; }
.price-main-card { grid-column: span 2; }
.gauge-track { padding: 1rem 0; }
.gauge-labels { display: flex; justify-content: space-between; font-size: 0.75rem; color: var(--text-muted); margin-bottom: 0.5rem; }
.gauge-bar { height: 12px; background: linear-gradient(90deg, var(--success) 0%, var(--warning) 50%, var(--danger) 100%); border-radius: var(--radius-full); position: relative; }
.gauge-marker { position: absolute; top: -4px; width: 20px; height: 20px; background: white; border: 3px solid var(--navy-950); border-radius: 50%; transform: translateX(-50%); }
.price-stats { display: flex; gap: 2rem; margin-top: 1.5rem; }
.price-stat { flex: 1; text-align: center; padding: 1rem; background: var(--bg-secondary); border-radius: var(--radius-md); }
.stat-label { display: block; font-size: 0.75rem; color: var(--text-muted); margin-bottom: 0.25rem; }
.stat-value { font-size: 1.25rem; font-weight: 700; }
.price-stat.positive .stat-value { color: var(--success); }
.price-stat.negative .stat-value { color: var(--danger); }
.negotiation-prices { display: flex; gap: 1rem; margin-bottom: 1.5rem; }
.neg-price { flex: 1; padding: 1rem; background: var(--bg-secondary); border-radius: var(--radius-md); text-align: center; }
.neg-label { display: block; font-size: 0.75rem; color: var(--text-muted); margin-bottom: 0.25rem; }
.neg-value { font-size: 1.25rem; font-weight: 700; color: var(--gold); }
.negotiation-points h4 { font-size: 0.875rem; margin-bottom: 0.75rem; }
.neg-point { display: flex; justify-content: space-between; padding: 0.75rem; background: var(--bg-secondary); border-radius: var(--radius-sm); margin-bottom: 0.5rem; font-size: 0.875rem; }
.neg-saving { color: var(--success); font-weight: 500; }
.comparable-item { display: flex; justify-content: space-between; align-items: center; padding: 0.75rem; border-bottom: 1px solid var(--border-subtle); font-size: 0.875rem; }
.comp-price { font-weight: 600; }
.comp-source { color: var(--text-muted); }

/* ==========================================================================
   Market Valuation (VDG) — Range Bar + Price Grid
   ========================================================================== */

/* Valuation card */
.valuation-card { grid-column: span 2; }
.valuation-card .card-header { display: flex; justify-content: space-between; align-items: center; }
.valuation-source { font-size: 0.7rem; color: var(--text-muted); font-weight: 400; letter-spacing: 0.02em; }

/* Range bar container */
.vr-bar-container { padding: 2.5rem 1rem 1rem; position: relative; }
.vr-bar-track {
    position: relative;
    height: 10px;
    background: linear-gradient(90deg,
        #ef4444 0%,
        #f97316 20%,
        #eab308 40%,
        #22c55e 60%,
        #3b82f6 80%,
        #6366f1 100%
    );
    border-radius: 999px;
    margin-bottom: 3.5rem;
}
.vr-bar-fill { display: none; }

/* Markers */
.vr-marker {
    position: absolute;
    top: 50%;
    transform: translate(-50%, -50%);
    z-index: 2;
}
.vr-marker-dot {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: var(--bg-primary, #fff);
    border: 3px solid var(--text-primary, #1e293b);
    box-shadow: 0 1px 3px rgba(0,0,0,0.15);
}
.vr-marker-label {
    position: absolute;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 0.65rem;
    line-height: 1.3;
    text-align: center;
    white-space: nowrap;
    color: var(--text-secondary, #64748b);
    font-weight: 500;
}
.vr-marker-label br + * { font-weight: 600; color: var(--text-primary, #1e293b); }
.vr-marker-staggered .vr-marker-label { top: 38px; }

/* Asking price marker (triangle pointer) */
.vr-asking-marker {
    position: absolute;
    top: -28px;
    transform: translateX(-50%);
    z-index: 5;
    text-align: center;
}
.vr-asking-arrow {
    width: 0; height: 0;
    border-left: 7px solid transparent;
    border-right: 7px solid transparent;
    border-top: 10px solid var(--text-primary, #1e293b);
    margin: 0 auto;
}
.vr-asking-label {
    font-size: 0.7rem;
    font-weight: 700;
    line-height: 1.3;
    color: var(--text-primary, #1e293b);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    white-space: nowrap;
    margin-bottom: 2px;
}
.vr-asking-marker.good .vr-asking-arrow { border-top-color: #22c55e; }
.vr-asking-marker.good .vr-asking-label { color: #22c55e; }
.vr-asking-marker.warning .vr-asking-arrow { border-top-color: #ef4444; }
.vr-asking-marker.warning .vr-asking-label { color: #ef4444; }
.vr-asking-marker.fair .vr-asking-arrow { border-top-color: #eab308; }
.vr-asking-marker.fair .vr-asking-label { color: #eab308; }

/* Verdict badge */
.vr-verdict {
    text-align: center;
    font-size: 0.875rem;
    font-weight: 700;
    padding: 0.5rem 1.25rem;
    border-radius: var(--radius-full, 999px);
    display: inline-block;
    margin: 0.5rem auto 0;
    width: fit-content;
}
.vr-bar-container { display: flex; flex-direction: column; align-items: center; }
.vr-bar-container > .vr-bar-track { width: 100%; }
.vr-verdict.good { background: rgba(34,197,94,0.12); color: #16a34a; }
.vr-verdict.warning { background: rgba(239,68,68,0.12); color: #dc2626; }
.vr-verdict.fair { background: rgba(234,179,8,0.12); color: #ca8a04; }

/* Price point grid */
.valuation-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0.75rem;
    margin-top: 1.5rem;
}
.vg-item {
    padding: 1rem;
    background: var(--bg-secondary, #f8fafc);
    border-radius: var(--radius-md, 8px);
    text-align: center;
    border: 1px solid var(--border-subtle, #e2e8f0);
    transition: border-color 0.2s, box-shadow 0.2s;
}
.vg-item:hover {
    border-color: var(--gold, #d4a843);
    box-shadow: 0 2px 8px rgba(212,168,67,0.15);
}
.vg-item.vg-below { border-left: 3px solid #22c55e; }
.vg-item.vg-above { border-left: 3px solid #ef4444; }
.vg-price {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-primary, #1e293b);
    margin-bottom: 0.25rem;
}
.vg-label {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-secondary, #64748b);
    text-transform: uppercase;
    letter-spacing: 0.03em;
    margin-bottom: 0.15rem;
}
.vg-desc {
    font-size: 0.65rem;
    color: var(--text-muted, #94a3b8);
}

/* Vehicle check valuation section */
.vc-section-valuation { border-left: 3px solid var(--gold, #d4a843); }
.vc-section-valuation h3 { display: flex; align-items: center; gap: 0.5rem; flex-wrap: wrap; }
.vc-valuation-range {
    font-size: 0.875rem;
    font-weight: 700;
    color: var(--gold, #d4a843);
    margin-left: auto;
}
.vc-valuation-source {
    font-size: 0.7rem;
    color: var(--text-muted, #94a3b8);
    margin-bottom: 1rem;
}
.vc-valuation-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0.75rem;
    margin-top: 1.5rem;
}
.vc-valuation-desc {
    font-size: 0.8rem;
    color: var(--text-secondary, #64748b);
    margin-top: 1rem;
    font-style: italic;
}

/* Responsive: valuation grid on small screens */
@media (max-width: 768px) {
    .valuation-card { grid-column: span 1; }
    .valuation-grid, .vc-valuation-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .vr-marker-label { font-size: 0.55rem; }
}

/* Checklist Grid */
.checklist-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1.5rem; }
.checklist-items { display: flex; flex-direction: column; gap: 0.5rem; }
.checklist-item { display: flex; align-items: center; gap: 0.75rem; padding: 0.75rem; background: var(--bg-secondary); border-radius: var(--radius-md); cursor: pointer; }
.checklist-item.high { border-left: 3px solid var(--warning); }
.checkmark { width: 20px; height: 20px; border: 2px solid var(--border-default); border-radius: var(--radius-sm); display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.checklist-item input:checked + .checkmark { background: var(--success); border-color: var(--success); }
.checklist-item input:checked + .checkmark::after { content: '✓'; color: white; font-size: 0.75rem; }
.checklist-item input { display: none; }
.checklist-progress { margin-top: 1.5rem; display: flex; align-items: center; gap: 1rem; }
.progress-bar { flex: 1; height: 8px; background: var(--bg-tertiary); border-radius: var(--radius-full); overflow: hidden; }
.progress-fill { height: 100%; background: var(--success); transition: width 0.3s ease; }

/* Chat */
.chat-container { display: flex; flex-direction: column; height: 500px; }
.chat-messages { flex: 1; overflow-y: auto; padding: 1.5rem; }
.chat-message { display: flex; gap: 1rem; margin-bottom: 1rem; }
.chat-message.user { flex-direction: row-reverse; }
.message-avatar { width: 36px; height: 36px; display: flex; align-items: center; justify-content: center; border-radius: 50%; font-size: 0.75rem; font-weight: 600; flex-shrink: 0; }
.chat-message.assistant .message-avatar { background: var(--gold-muted); color: var(--gold); }
.chat-message.user .message-avatar { background: var(--bg-tertiary); color: var(--text-secondary); }
.message-content { max-width: 80%; padding: 1rem; background: var(--bg-secondary); border-radius: var(--radius-lg); }
.message-content p { font-size: 0.938rem; line-height: 1.6; }
.typing-dots { display: flex; gap: 0.25rem; }
.typing-dots span { width: 6px; height: 6px; background: var(--text-muted); border-radius: 50%; animation: typing 1s infinite; }
.typing-dots span:nth-child(2) { animation-delay: 0.2s; }
.typing-dots span:nth-child(3) { animation-delay: 0.4s; }
@keyframes typing { 0%, 100% { opacity: 0.3; } 50% { opacity: 1; } }
.chat-suggestions { display: flex; flex-wrap: wrap; gap: 0.5rem; padding: 0 1.5rem 1rem; }
.chat-form { display: flex; gap: 0.75rem; padding: 0 1.5rem 1rem; }
.chat-form .chat-input { flex: 1; }
.chat-footer { padding: 0.75rem 1.5rem; border-top: 1px solid var(--border-subtle); text-align: center; font-size: 0.813rem; color: var(--text-muted); }

/* Toast Notifications */
.toast-container { position: fixed; bottom: 2rem; right: 2rem; z-index: 1000; display: flex; flex-direction: column; gap: 0.75rem; }
.toast { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 1rem 1.25rem; background: var(--bg-card); border: 1px solid var(--border-subtle); border-radius: var(--radius-lg); box-shadow: var(--shadow-xl); transform: translateX(120%); transition: transform 0.3s ease; min-width: 280px; }
.toast.active { transform: translateX(0); }
.toast-success { border-color: var(--success); }
.toast-error { border-color: var(--danger); }
.toast-warning { border-color: var(--warning); }
.toast button { background: none; border: none; color: var(--text-muted); cursor: pointer; font-size: 1.25rem; line-height: 1; }

/* Page Content */
.page-content { padding: 2rem; }
.stats-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; margin-bottom: 2rem; }
.stat-card { display: flex; align-items: center; gap: 1rem; padding: 1.25rem; background: var(--bg-card); border: 1px solid var(--border-subtle); border-radius: var(--radius-lg); }
.stat-icon { width: 48px; height: 48px; display: flex; align-items: center; justify-content: center; background: var(--gold-muted); border-radius: var(--radius-md); color: var(--gold); font-size: 1.25rem; }
.stat-icon svg { width: 24px; height: 24px; }
.stat-value { font-size: 1.5rem; font-weight: 700; }
.stat-label { font-size: 0.813rem; color: var(--text-muted); }

/* History/Saved Grids */
.history-grid, .saved-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 1.5rem; }
.history-card, .saved-card { background: var(--bg-card); border: 1px solid var(--border-subtle); border-radius: var(--radius-xl); overflow: hidden; position: relative; transition: all var(--transition-fast); }
.history-card:hover, .saved-card:hover { border-color: var(--gold); transform: translateY(-2px); }
.card-score { position: absolute; top: 1rem; right: 1rem; width: 40px; height: 40px; display: flex; align-items: center; justify-content: center; border-radius: 50%; font-weight: 700; font-size: 0.875rem; z-index: 1; }
.saved-badge { position: absolute; top: 1rem; left: 1rem; color: var(--gold); z-index: 1; }
.saved-badge svg { width: 20px; height: 20px; }
.top-pick-badge { position: absolute; top: -10px; left: 50%; transform: translateX(-50%); padding: 0.25rem 0.75rem; background: var(--gold); color: var(--text-inverse); font-size: 0.75rem; font-weight: 600; border-radius: var(--radius-full); z-index: 2; }
.saved-card.top-pick { border-color: var(--gold); }
.card-image { height: 120px; background: var(--bg-tertiary); display: flex; align-items: center; justify-content: center; color: var(--navy-600); }
.card-image svg { width: 50px; height: 50px; }
.card-content { padding: 1.25rem; }
.card-content h3 { font-size: 1rem; margin-bottom: 0.25rem; }
.card-meta { font-size: 0.875rem; color: var(--text-muted); }
.card-footer { display: flex; justify-content: space-between; align-items: center; margin-top: 1rem; padding-top: 1rem; border-top: 1px solid var(--border-subtle); }
.card-time { font-size: 0.75rem; color: var(--text-muted); }
.card-actions { display: flex; gap: 0.5rem; }
.compare-checkbox { position: absolute; top: 1rem; left: 1rem; cursor: pointer; }
.compare-checkbox input { display: none; }
.compare-checkbox .checkmark { width: 24px; height: 24px; border: 2px solid var(--border-default); border-radius: var(--radius-sm); background: var(--bg-card); display: flex; align-items: center; justify-content: center; }
.compare-checkbox input:checked + .checkmark { background: var(--gold); border-color: var(--gold); }
.compare-checkbox input:checked + .checkmark::after { content: '✓'; color: var(--text-inverse); font-weight: 700; }

/* Empty State */
.empty-state { display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 4rem 2rem; }
.empty-icon { width: 80px; height: 80px; display: flex; align-items: center; justify-content: center; margin-bottom: 1.5rem; color: var(--text-muted); opacity: 0.5; }
.empty-icon svg { width: 60px; height: 60px; }
.empty-state h3 { font-size: 1.25rem; margin-bottom: 0.5rem; }
.empty-state p { color: var(--text-muted); margin-bottom: 1.5rem; }
.error-message { color: var(--danger); text-align: center; padding: 2rem; }
.error-message a { color: var(--gold); }
.loading-placeholder { text-align: center; padding: 2rem; color: var(--text-muted); }

/* Settings Layout */
.settings-layout { display: flex; gap: 2rem; padding: 2rem; }
.settings-nav { width: 200px; flex-shrink: 0; }
.settings-nav .nav-item { display: flex; align-items: center; gap: 0.75rem; padding: 0.75rem 1rem; border-radius: var(--radius-md); color: var(--text-muted); margin-bottom: 0.5rem; text-decoration: none; transition: all var(--transition-fast); }
.settings-nav .nav-item svg { width: 18px; height: 18px; }
.settings-nav .nav-item:hover { background: var(--bg-card); color: var(--text-primary); }
.settings-nav .nav-item.active { background: var(--gold-muted); color: var(--gold); }
.settings-content { flex: 1; }
.settings-section { display: none; }
.settings-section.active { display: block; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; margin-bottom: 1rem; }
.form-group { margin-bottom: 1rem; }
.form-group label { display: block; font-size: 0.813rem; color: var(--text-muted); margin-bottom: 0.5rem; }
.plan-card { display: flex; justify-content: space-between; align-items: center; padding: 1.5rem; background: var(--gold-muted); border-radius: var(--radius-lg); margin-bottom: 1.5rem; }
.plan-label { font-size: 0.75rem; color: var(--text-muted); text-transform: uppercase; }
.plan-name { font-size: 1.25rem; font-weight: 700; color: var(--gold); }
.plan-stats { display: flex; gap: 2rem; }
.plan-stat { text-align: center; }
.plan-actions { display: flex; gap: 1rem; }
.btn.danger { color: var(--danger); }
.danger-zone { border-color: var(--danger); }
.danger-zone .card-header { background: var(--danger-muted); }
.plan-option { padding: 1.5rem; border: 1px solid var(--border-subtle); border-radius: var(--radius-lg); margin-bottom: 1rem; }
.plan-option.current { border-color: var(--gold); background: var(--gold-muted); }
.plan-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 1rem; }
.plan-price { font-size: 1.25rem; font-weight: 700; color: var(--gold); }
.plan-features { list-style: none; margin: 0; padding: 0; }
.plan-features li { padding: 0.5rem 0; font-size: 0.875rem; color: var(--text-secondary); border-bottom: 1px solid var(--border-subtle); }
.plan-features li::before { content: '✓'; color: var(--success); margin-right: 0.5rem; }
.current-badge { display: inline-block; padding: 0.25rem 0.75rem; background: var(--gold); color: var(--text-inverse); font-size: 0.75rem; font-weight: 600; border-radius: var(--radius-full); margin-top: 1rem; }

/* User Menu Dropdown */
.user-menu { position: relative; }
.user-dropdown { position: absolute; top: 100%; right: 0; margin-top: 0.5rem; background: var(--bg-card); border: 1px solid var(--border-subtle); border-radius: var(--radius-lg); box-shadow: var(--shadow-lg); min-width: 160px; opacity: 0; visibility: hidden; transform: translateY(-10px); transition: all var(--transition-fast); z-index: 100; }
.user-menu.open .user-dropdown { opacity: 1; visibility: visible; transform: translateY(0); }
.user-dropdown a { display: block; padding: 0.75rem 1rem; color: var(--text-secondary); font-size: 0.875rem; transition: all var(--transition-fast); }
.user-dropdown a:hover { background: var(--bg-secondary); color: var(--text-primary); }

/* Credits Badge */
.credits-badge { display: flex; align-items: center; gap: 0.5rem; padding: 0.5rem 1rem; background: var(--bg-card); border: 1px solid var(--border-subtle); border-radius: var(--radius-full); font-size: 0.875rem; }
.credits-badge svg { width: 18px; height: 18px; color: var(--gold); }

/* Responsive Overrides */
@media (max-width: 1024px) {
    .vehicle-summary-card { grid-template-columns: 1fr; }
    .vehicle-image { display: none; }
    .overview-grid { grid-template-columns: 1fr; }
    .overview-grid .recommendation-card, .overview-grid .maintenance-card { grid-column: span 1; }
    .price-analysis-grid { grid-template-columns: 1fr; }
    .price-main-card { grid-column: span 1; }
    .checklist-grid { grid-template-columns: 1fr; }
    .settings-layout { flex-direction: column; }
    .settings-nav { width: 100%; display: flex; gap: 0.5rem; overflow-x: auto; }
    .settings-nav .nav-item { flex-shrink: 0; }
    .stats-row { grid-template-columns: 1fr; }
}
@media (max-width: 768px) {
    .history-grid, .saved-grid { grid-template-columns: 1fr; }
    .form-row { grid-template-columns: 1fr; }
}

/* Registration Modal */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: all var(--transition-base);
}

.modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.modal-content {
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-xl);
    width: 100%;
    max-width: 440px;
    margin: 1rem;
    transform: scale(0.95);
    transition: transform var(--transition-base);
}

.modal-overlay.active .modal-content {
    transform: scale(1);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid var(--border-subtle);
}

.modal-header h3 {
    font-size: 1.125rem;
    font-weight: 600;
    margin: 0;
}

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

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

.modal-body {
    padding: 1.5rem;
}

.modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 0.75rem;
    padding: 1rem 1.5rem;
    border-top: 1px solid var(--border-subtle);
    background: var(--bg-secondary);
    border-radius: 0 0 var(--radius-xl) var(--radius-xl);
}

/* Registration Modal Specific */
.reg-modal .modal-body {
    text-align: center;
}

.reg-modal-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 80px;
    height: 80px;
    margin: 0 auto 1.25rem;
    background: var(--gold-muted);
    border-radius: 50%;
    color: var(--gold);
}

.reg-modal-message {
    font-size: 0.938rem;
    color: var(--text-secondary);
    margin-bottom: 1rem;
    line-height: 1.5;
}

.reg-modal-vehicle,
.reg-modal-price {
    font-size: 0.875rem;
    color: var(--text-muted);
    margin-bottom: 0.5rem;
}

.reg-modal-vehicle strong,
.reg-modal-price strong {
    color: var(--text-secondary);
}

.reg-input-group {
    margin-top: 1.5rem;
    text-align: left;
}

.reg-input-group label {
    display: block;
    font-size: 0.813rem;
    font-weight: 500;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
}

.reg-modal-input {
    width: 100%;
    padding: 0.875rem 1rem;
    font-size: 1.25rem;
    font-weight: 600;
    letter-spacing: 0.05em;
    text-align: center;
    background: var(--bg-primary);
    border: 2px solid var(--border-default);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    transition: all var(--transition-fast);
}

.reg-modal-input:focus {
    outline: none;
    border-color: var(--gold);
    box-shadow: 0 0 0 3px var(--gold-muted);
}

.reg-modal-input.error {
    border-color: var(--danger);
    animation: shake 0.3s ease-in-out;
}

.reg-input-hint {
    display: block;
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-top: 0.5rem;
    text-align: center;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    75% { transform: translateX(5px); }
}
