/* ============================================
   LogCar.co — Modern Design System (Phase 1)
   Theme: Clean White, Modern Depth, Elderly-Friendly
   Fonts: Noto Sans Thai (>= 1rem), Sarabun (< 1rem)
   Icons: Font Awesome 6
   ============================================ */

@import url('https://fonts.googleapis.com/css2?family=Noto+Sans+Thai:wght@300;400;500;600;700&family=Sarabun:wght@300;400;500;600;700&display=swap');

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

/* === Design Tokens === */
:root {
    --primary: #3b82f6;
    --primary-dark: #2563eb;
    --primary-deeper: #1d4ed8;
    --primary-light: #eff6ff;
    --primary-50: rgba(59,130,246,0.08);
    --primary-100: rgba(59,130,246,0.15);

    --accent: #f97316;
    --accent-dark: #ea580c;
    --accent-light: #fff7ed;

    --success: #22c55e;
    --success-dark: #16a34a;
    --success-light: #f0fdf4;

    --warning: #eab308;
    --warning-dark: #ca8a04;
    --warning-light: #fefce8;

    --danger: #ef4444;
    --danger-dark: #dc2626;
    --danger-light: #fef2f2;

    --info: #06b6d4;
    --info-light: #ecfeff;

    --bg: #f8fafc;
    --bg-alt: #f1f5f9;
    --card: #ffffff;
    --text: #0f172a;
    --text-secondary: #475569;
    --text-muted: #94a3b8;
    --border: #e2e8f0;
    --border-light: #f1f5f9;

    --shadow-xs: 0 1px 2px rgba(0,0,0,0.04);
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.06), 0 1px 2px rgba(0,0,0,0.04);
    --shadow-md: 0 4px 6px -1px rgba(0,0,0,0.06), 0 2px 4px -2px rgba(0,0,0,0.04);
    --shadow-lg: 0 10px 25px -5px rgba(0,0,0,0.07), 0 8px 10px -6px rgba(0,0,0,0.04);
    --shadow-xl: 0 20px 40px -10px rgba(0,0,0,0.1);
    --shadow-primary: 0 4px 14px rgba(59,130,246,0.25);
    --shadow-accent: 0 4px 14px rgba(249,115,22,0.25);

    --radius-sm: 0.5rem;
    --radius-md: 0.75rem;
    --radius-lg: 1rem;
    --radius-xl: 1.25rem;
    --radius-2xl: 1.5rem;
    --radius-full: 9999px;

    --bottom-nav-h: 4.25rem;
    --transition: 0.2s cubic-bezier(0.4, 0, 0.2, 1);

    --trip-primary: #0d9488;
    --trip-primary-dark: #0f766e;
    --trip-bg: #f0fdfa;
    --trip-car: #2563eb;
    --trip-leisure: #7c3aed;

    /* Typography (enforce across app) */
    --font-body: 1rem;
    --font-label: 0.75rem;
    --font-caption: 0.875rem;
    --lh-headline: 1.1;
    --lh-body: 1.65;
}

/* === Base === */
html { font-size: 16px; -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
    font-family: 'Noto Sans Thai', sans-serif;
    font-size: var(--font-body);
    font-weight: 400;
    line-height: var(--lh-body);
    color: var(--text);
    background: 
        radial-gradient(circle at 50% 30%, rgba(255,255,255,0.65) 0%, rgba(203,213,225,0.15) 100%),
        url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='500' height='300'%3E%3Cfilter id='brushed'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.01 0.95' numOctaves='3' result='noise'/%3E%3CfeColorMatrix type='matrix' values='0.33 0.33 0.33 0 0.88 0.33 0.33 0.33 0 0.88 0.33 0.33 0.33 0 0.88 0 0 0 0.06 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' fill='%23f1f5f9'/%3E%3Crect width='100%25' height='100%25' filter='url(%23brushed)'/%3E%3C/svg%3E");
    background-attachment: fixed;
    min-height: 100vh;
    padding-bottom: calc(var(--bottom-nav-h) + 1.5rem);
    -webkit-font-smoothing: antialiased;
}

/* Sarabun for captions/small text */
.text-caption, .text-small, .text-meta, .bottom-nav-label, .badge,
.form-hint, .step-label, .filter-chip, .garage-type, .garage-detail,
.alert-desc, .card-desc, .timeline-date, .timeline-shop, .insurance-vehicle,
.insurance-remaining, .ai-result-label, .upload-hint, .add-hint { font-family: 'Sarabun', sans-serif; }

h1, .h1 { font-size: 1.75rem; font-weight: 700; line-height: var(--lh-headline); letter-spacing: -0.01em; }
h2, .h2 { font-size: 1.5rem; font-weight: 700; line-height: var(--lh-headline); letter-spacing: -0.01em; }
h3, .h3 { font-size: 1.25rem; font-weight: 600; line-height: var(--lh-headline); }
.text-caption { font-size: var(--font-caption); color: var(--text-secondary); }
.text-small { font-size: var(--font-label); color: var(--text-secondary); }
.text-meta { font-size: var(--font-label); color: var(--text-muted); }

/* Headlines & titles — line-height ≤ 1.1 */
.section-title, .section-title-lg, .page-title, .card-title,
.admin-hero-title, .garage-hero-title, .maint-member-hero .garage-hero-title,
.showcase-hero-title, .alert-title, .modal-sheet h2, .modal-sheet h3 {
    line-height: var(--lh-headline);
}

a { color: var(--primary); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--primary-dark); }

/* === Layout === */
.page-wrapper { max-width: 480px; margin: 0 auto; padding: 0 1rem; }
.page-content { padding-top: 1rem; padding-bottom: 1.5rem; }

/* === Header Bar === */
.header-bar {
    background: rgba(255,255,255,0.85);
    backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border-light);
    padding: 0.875rem 1rem;
    display: flex; align-items: center; justify-content: space-between;
    position: sticky; top: 0; z-index: 100;
    max-width: 480px; margin: 0 auto;
}

.header-bar .logo { display: flex; align-items: center; gap: 0.5rem; }
.header-bar .logo-icon { font-size: 1.25rem; color: var(--primary); }
.header-bar .logo-text {
    font-size: 1.25rem; font-weight: 800;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
}
.header-bar .logo-text span {
    background: linear-gradient(135deg, var(--accent), var(--accent-dark));
    -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
}

.header-back {
    background: rgba(255,255,255,0.85);
    backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border-light);
    padding: 0.875rem 1rem;
    display: flex; align-items: center; gap: 0.75rem;
    position: sticky; top: 0; z-index: 100;
    max-width: 480px; margin: 0 auto;
}

.header-back .back-btn {
    background: var(--primary-light); border: none;
    width: 40px; height: 40px; border-radius: var(--radius-md);
    display: flex; align-items: center; justify-content: center;
    color: var(--primary); font-size: 1rem; cursor: pointer;
    text-decoration: none;
    transition: all var(--transition);
}
.header-back .back-btn:hover { background: var(--primary-100); transform: translateX(-2px); }
.header-back .page-title { font-size: 1.125rem; font-weight: 700; line-height: var(--lh-headline); }

/* === Icon Button === */
.icon-btn {
    background: var(--bg-alt); border: none;
    width: 42px; height: 42px; border-radius: var(--radius-md);
    display: flex; align-items: center; justify-content: center;
    color: var(--text-secondary); font-size: 1.1rem; cursor: pointer;
    transition: all var(--transition); position: relative;
}
.icon-btn:hover { background: var(--primary-light); color: var(--primary); }

.icon-btn .badge-dot {
    position: absolute; top: 8px; right: 8px;
    width: 8px; height: 8px; border-radius: var(--radius-full);
    background: var(--danger); border: 2px solid var(--card);
}

/* === Cards === */
.card {
    background: var(--card);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-sm);
    padding: 1.25rem;
    margin-bottom: 1rem;
    border: 1px solid var(--border-light);
    transition: all var(--transition);
    position: relative; overflow: hidden;
}
.card:hover { box-shadow: var(--shadow-md); }
.card-clickable { cursor: pointer; }
.card-clickable:active { transform: scale(0.98); }

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

.card-icon {
    width: 44px; height: 44px; border-radius: var(--radius-lg);
    display: flex; align-items: center; justify-content: center;
    font-size: 1.125rem; flex-shrink: 0;
}
.card-icon.primary { background: var(--primary-light); color: var(--primary); }
.card-icon.accent { background: var(--accent-light); color: var(--accent); }
.card-icon.success { background: var(--success-light); color: var(--success-dark); }
.card-icon.warning { background: var(--warning-light); color: var(--warning-dark); }
.card-icon.danger { background: var(--danger-light); color: var(--danger); }
.card-icon.info { background: var(--info-light); color: var(--info); }

.card-title { font-size: 1.0625rem; font-weight: 600; color: var(--text); margin-bottom: 0.15rem; }
.card-desc { font-size: var(--font-body); color: var(--text-secondary); line-height: var(--lh-body); }

.card-footer {
    display: flex; align-items: center; justify-content: space-between;
    margin-top: 1rem; padding-top: 0.75rem;
    border-top: 1px solid var(--border-light);
}

/* === Vehicle Card === */
.vehicle-card { position: relative; }
.vehicle-card::before {
    content: ''; position: absolute; top: 0; right: 0;
    width: 120px; height: 120px; border-radius: 50%;
    background: linear-gradient(135deg, var(--primary-50), transparent);
    transform: translate(30%, -30%); pointer-events: none;
}

.vehicle-card .vehicle-info { display: flex; flex-direction: column; gap: 0.25rem; }
.vehicle-card .vehicle-name { font-size: 1.25rem; font-weight: 700; }
.vehicle-card .vehicle-plate {
    font-size: 1rem; font-weight: 700; color: var(--primary-dark);
    background: var(--primary-light); padding: 0.3rem 0.75rem;
    border-radius: var(--radius-sm); display: inline-block; width: fit-content;
    letter-spacing: 0.05em;
}
.vehicle-card .vehicle-meta { font-family: 'Sarabun', sans-serif; font-size: 0.875rem; color: var(--text-secondary); }
.vehicle-card .vehicle-mileage {
    display: flex; align-items: center; gap: 0.5rem;
    margin-top: 0.75rem; font-size: 1rem;
}
.vehicle-card .vehicle-mileage i { color: var(--primary); }
.vehicle-card .mileage-value { font-weight: 700; font-size: 1.125rem; color: var(--text); }

/* === Alert Card === */
.alert-card {
    display: flex; align-items: flex-start; gap: 0.875rem;
    padding: 1rem; border-radius: var(--radius-lg);
    margin-bottom: 0.75rem; border: 1px solid; cursor: pointer;
    transition: all var(--transition);
}
.alert-card:hover { transform: translateX(4px); }

.alert-card.alert-danger { background: var(--danger-light); border-color: rgba(239,68,68,0.15); }
.alert-card.alert-warning { background: var(--warning-light); border-color: rgba(234,179,8,0.15); }
.alert-card.alert-success { background: var(--success-light); border-color: rgba(34,197,94,0.15); }
.alert-card.alert-info { background: var(--info-light); border-color: rgba(6,182,212,0.15); }

.alert-card .alert-icon {
    width: 40px; height: 40px; border-radius: var(--radius-md);
    display: flex; align-items: center; justify-content: center;
    font-size: 1rem; flex-shrink: 0;
}
.alert-card.alert-danger .alert-icon { background: rgba(239,68,68,0.12); color: var(--danger); }
.alert-card.alert-warning .alert-icon { background: rgba(234,179,8,0.12); color: var(--warning-dark); }
.alert-card.alert-success .alert-icon { background: rgba(34,197,94,0.12); color: var(--success-dark); }
.alert-card.alert-info .alert-icon { background: rgba(6,182,212,0.12); color: var(--info); }

.alert-card .alert-content { flex: 1; }
.alert-card .alert-title { font-size: 1rem; font-weight: 600; margin-bottom: 0.15rem; line-height: var(--lh-headline); }
.alert-card .alert-desc { font-size: var(--font-body); color: var(--text-secondary); line-height: var(--lh-body); }
.alert-card .alert-action {
    font-size: 0.875rem; font-weight: 600; color: var(--primary);
    margin-top: 0.35rem; display: inline-flex; align-items: center; gap: 0.25rem;
}

/* === Quick Actions === */
.quick-actions { display: grid; grid-template-columns: repeat(2, 1fr); gap: 0.75rem; }

.quick-action-btn {
    background: var(--card); border: 1px solid var(--border-light);
    border-radius: var(--radius-xl); padding: 1.25rem 1rem;
    display: flex; flex-direction: column; align-items: center; gap: 0.75rem;
    cursor: pointer; transition: all var(--transition);
    text-decoration: none; color: var(--text);
    box-shadow: var(--shadow-xs);
}
.quick-action-btn:hover {
    border-color: var(--primary); box-shadow: var(--shadow-md);
    transform: translateY(-3px); text-decoration: none;
}
.quick-action-btn:active { transform: translateY(0) scale(0.97); }

.quick-action-btn .qa-icon {
    width: 52px; height: 52px; border-radius: var(--radius-lg);
    display: flex; align-items: center; justify-content: center;
    font-size: 1.25rem;
}
.quick-action-btn .qa-label { font-size: 1rem; font-weight: 600; text-align: center; }

/* === Buttons === */
.btn {
    font-family: 'Noto Sans Thai', sans-serif; font-size: 1rem; font-weight: 600;
    padding: 0.75rem 1.5rem; border-radius: var(--radius-lg);
    border: 2px solid transparent; cursor: pointer;
    display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem;
    min-height: 48px; transition: all var(--transition);
    text-decoration: none; line-height: 1.4; position: relative; overflow: hidden;
}
.btn:hover { text-decoration: none; }

.btn-primary {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: #fff; box-shadow: var(--shadow-primary);
}
.btn-primary:hover { box-shadow: 0 6px 20px rgba(59,130,246,0.35); transform: translateY(-1px); }
.btn-primary:active { transform: translateY(0) scale(0.98); }

.btn-accent {
    background: linear-gradient(135deg, var(--accent), var(--accent-dark));
    color: #fff; box-shadow: var(--shadow-accent);
}
.btn-accent:hover { box-shadow: 0 6px 20px rgba(249,115,22,0.35); transform: translateY(-1px); }

.btn-secondary {
    background: var(--card); color: var(--primary); border-color: var(--primary);
}
.btn-secondary:hover { background: var(--primary-light); }

.btn-danger { background: linear-gradient(135deg, var(--danger), var(--danger-dark)); color: #fff; }

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

.btn-block { display: flex; width: 100%; }
.btn-lg { min-height: 56px; font-size: 1.0625rem; padding: 1rem 2rem; border-radius: var(--radius-xl); }
.btn-sm { min-height: 40px; font-size: 0.875rem; font-family: 'Sarabun', sans-serif; padding: 0.5rem 1rem; border-radius: var(--radius-md); }

/* === Forms === */
.form-group { margin-bottom: 1.25rem; }
.form-label { display: block; font-size: 1rem; font-weight: 600; color: var(--text); margin-bottom: 0.4rem; }
.form-hint { font-size: var(--font-label); color: var(--text-muted); margin-top: 0.35rem; }

.form-input, .form-select, .form-textarea {
    font-family: 'Noto Sans Thai', sans-serif; font-size: 1rem;
    width: 100%; padding: 0.8rem 1rem;
    border: 2px solid var(--border); border-radius: var(--radius-lg);
    background: var(--card); color: var(--text);
    min-height: 50px; transition: all var(--transition); outline: none;
}
.form-input:focus, .form-select:focus, .form-textarea:focus {
    border-color: var(--primary); box-shadow: 0 0 0 4px var(--primary-50);
}
.form-input::placeholder { color: var(--text-muted); }
.form-textarea { min-height: 100px; resize: vertical; }

/* Custom Select Wrapper */
.select-wrapper { position: relative; }
.select-wrapper .form-select {
    appearance: none; cursor: pointer;
    padding-right: 2.75rem;
}
.select-wrapper::after {
    content: '\f107'; font-family: 'Font Awesome 6 Free'; font-weight: 900;
    position: absolute; right: 1rem; top: 50%; transform: translateY(-50%);
    color: var(--text-muted); pointer-events: none; font-size: 0.875rem;
    transition: transform var(--transition);
}
.select-wrapper:focus-within::after { color: var(--primary); transform: translateY(-50%) rotate(180deg); }

/* === Custom Dropdown (Enhanced Select) === */
.custom-select { position: relative; width: 100%; }

.custom-select-trigger {
    font-family: 'Noto Sans Thai', sans-serif; font-size: 1rem;
    width: 100%; padding: 0.8rem 2.75rem 0.8rem 1rem;
    border: 2px solid var(--border); border-radius: var(--radius-lg);
    background: var(--card); color: var(--text);
    min-height: 50px; cursor: pointer;
    display: flex; align-items: center; gap: 0.5rem;
    transition: all var(--transition);
    user-select: none;
}
.custom-select-trigger:hover { border-color: var(--text-muted); }
.custom-select.open .custom-select-trigger {
    border-color: var(--primary); box-shadow: 0 0 0 4px var(--primary-50);
    border-bottom-left-radius: 0; border-bottom-right-radius: 0;
}

.custom-select-trigger .trigger-placeholder { color: var(--text-muted); }
.custom-select-trigger .trigger-icon { color: var(--text-muted); margin-right: 0.25rem; }

.custom-select-trigger::after {
    content: '\f107'; font-family: 'Font Awesome 6 Free'; font-weight: 900;
    position: absolute; right: 1rem; font-size: 0.875rem;
    color: var(--text-muted); transition: transform var(--transition);
}
.custom-select.open .custom-select-trigger::after { transform: rotate(180deg); color: var(--primary); }

.custom-select-dropdown {
    position: absolute; left: 0; right: 0; top: 100%;
    background: var(--card); border: 2px solid var(--primary);
    border-top: none; border-radius: 0 0 var(--radius-lg) var(--radius-lg);
    box-shadow: var(--shadow-lg); z-index: 50;
    max-height: 240px; overflow-y: auto;
    display: none; animation: dropdownOpen 0.2s ease;
}
.custom-select.open .custom-select-dropdown { display: block; }

.custom-select-option {
    padding: 0.75rem 1rem; cursor: pointer;
    display: flex; align-items: center; gap: 0.75rem;
    font-size: 1rem; transition: background var(--transition);
    border-bottom: 1px solid var(--border-light);
}
.custom-select-option:last-child { border-bottom: none; }
.custom-select-option:hover { background: var(--primary-light); }
.custom-select-option.selected { background: var(--primary-light); color: var(--primary-dark); font-weight: 600; }
.custom-select-option .option-icon { color: var(--text-muted); width: 20px; text-align: center; }
.custom-select-option.selected .option-icon { color: var(--primary); }

@keyframes dropdownOpen {
    from { opacity: 0; transform: translateY(-8px); }
    to { opacity: 1; transform: translateY(0); }
}

/* === Step Wizard === */
.wizard-progress {
    display: flex; align-items: center; justify-content: center;
    gap: 0.5rem; padding: 1rem 0; margin-bottom: 1rem;
}
.wizard-dot {
    width: 10px; height: 10px; border-radius: var(--radius-full);
    background: var(--border); transition: all 0.3s;
}
.wizard-dot.active {
    background: var(--primary); width: 28px;
    box-shadow: 0 0 0 4px var(--primary-50);
}
.wizard-dot.completed { background: var(--success); }

.wizard-step-label {
    font-family: 'Sarabun', sans-serif; font-size: 0.875rem;
    color: var(--text-muted); text-align: center; margin-bottom: 1rem;
}
.wizard-step { display: none; animation: fadeSlideUp 0.35s ease; }
.wizard-step.active { display: block; }
.wizard-actions { display: flex; gap: 0.75rem; margin-top: 1.5rem; }
.wizard-actions .btn { flex: 1; }

/* === Timeline === */
.timeline { position: relative; padding-left: 2rem; }
.timeline::before {
    content: ''; position: absolute; left: 7px; top: 8px; bottom: 8px;
    width: 2px; background: linear-gradient(to bottom, var(--primary), var(--border));
    border-radius: 1px;
}

.timeline-item { position: relative; margin-bottom: 1.25rem; }
.timeline-item--highlight .timeline-card {
    border-color: var(--primary);
    box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.25);
}
.timeline-deposit-note {
    margin-top: 0.35rem;
    color: var(--text-muted);
    font-size: 0.75rem;
}
.timeline-item::before {
    content: ''; position: absolute; left: -2rem; top: 8px;
    width: 12px; height: 12px; border-radius: var(--radius-full);
    background: var(--card); border: 3px solid var(--primary);
    box-shadow: 0 0 0 4px var(--primary-50);
}

.timeline-item .timeline-date { font-size: var(--font-label); color: var(--text-muted); margin-bottom: 0.25rem; }
.timeline-item .timeline-card {
    background: var(--card); border: 1px solid var(--border-light);
    border-radius: var(--radius-lg); padding: 1rem;
    box-shadow: var(--shadow-xs); transition: all var(--transition);
}
.timeline-item .timeline-card:hover { box-shadow: var(--shadow-md); }
.timeline-receipt-thumb {
    display:flex; align-items:center; gap:0.65rem; width:100%; margin-bottom:0.65rem;
    padding:0.45rem; border:1px solid var(--border-light); border-radius:var(--radius-md);
    background:var(--bg); cursor:pointer; text-align:left;
}
.timeline-receipt-thumb img {
    width:56px; height:42px; object-fit:cover; border-radius:var(--radius-sm); background:#fff;
}
.timeline-receipt-thumb span {
    font-family:'Sarabun',sans-serif; font-size:0.82rem; color:var(--primary-dark); font-weight:600;
}
.maint-media-section { margin-top: 0.25rem; }
.maint-media-tabs { display: flex; flex-direction: column; gap: 0.65rem; }
.maint-media-tab-bar {
    display: flex; gap: 0.35rem; padding: 0.2rem;
    background: var(--bg); border: 1px solid var(--border-light);
    border-radius: var(--radius-lg);
}
.maint-media-tab {
    flex: 1; display: inline-flex; align-items: center; justify-content: center; gap: 0.35rem;
    padding: 0.55rem 0.65rem; border: none; border-radius: var(--radius-md);
    background: transparent; color: var(--text-secondary);
    font-family: 'Sarabun', sans-serif; font-size: 0.85rem; font-weight: 700;
    cursor: pointer; min-height: 40px; transition: background 0.15s ease, color 0.15s ease;
}
.maint-media-tab i { font-size: 0.9rem; }
.maint-media-tab.active {
    background: var(--card); color: var(--primary-dark);
    box-shadow: var(--shadow-sm);
}
.maint-media-tab-badge {
    display: inline-flex; align-items: center; justify-content: center;
    min-width: 1.25rem; height: 1.25rem; padding: 0 0.3rem;
    border-radius: var(--radius-full); background: var(--primary-light);
    color: var(--primary-dark); font-size: 0.68rem; font-weight: 800;
}
.maint-media-tab.active .maint-media-tab-badge {
    background: var(--primary); color: #fff;
}
.maint-media-tab-badge.is-empty { display: none; }
.maint-media-tab-panel { display: none; animation: fadeSlideUp 0.2s ease; }
.maint-media-tab-panel.active { display: block; }

.maint-photo-section { margin-top: 0.25rem; }
.maint-photo-intro { margin-bottom: 0.65rem; }
.maint-photo-slots { display: grid; gap: 0.65rem; }
.maint-photo-slot {
    border: 1px solid var(--border-light); border-radius: var(--radius-md);
    background: var(--bg); padding: 0.65rem;
}
.maint-photo-slot-head { display: flex; flex-direction: column; gap: 0.1rem; margin-bottom: 0.5rem; }
.maint-photo-slot-title { font-size: 0.85rem; font-weight: 700; color: var(--text); }
.maint-photo-slot-hint { font-size: 0.75rem; color: var(--text-muted); }
.maint-photo-slot-body { display: flex; flex-wrap: wrap; gap: 0.45rem; align-items: center; }
.maint-photo-thumb {
    position: relative; width: 64px; height: 64px; border-radius: var(--radius-sm);
    overflow: hidden; border: 1px solid var(--border-light); background: #fff;
}
.maint-photo-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.maint-photo-thumb-fallback {
    width: 100%; height: 100%; display: flex; align-items: center; justify-content: center;
    color: var(--text-muted); background: var(--card);
}
.maint-photo-remove {
    position: absolute; top: 2px; right: 2px; width: 20px; height: 20px; border: none;
    border-radius: 999px; background: rgba(0,0,0,0.55); color: #fff; cursor: pointer;
    display: flex; align-items: center; justify-content: center; font-size: 0.65rem;
}
.maint-photo-add {
    display: inline-flex; flex-direction: column; align-items: center; justify-content: center;
    gap: 0.15rem; width: 64px; height: 64px; border: 1px dashed var(--border);
    border-radius: var(--radius-sm); color: var(--primary); cursor: pointer; font-size: 0.68rem;
    background: var(--card);
}
.maint-photo-add i { font-size: 1rem; }
.maint-photo-storage-hint {
    margin-top: 0.45rem; color: var(--text-muted); word-break: break-all;
}
.maint-photo-storage-hint code { font-size: 0.72rem; }
.maint-photo-gallery {
    display: flex; flex-wrap: wrap; gap: 0.4rem; margin-top: 0.55rem; align-items: center;
}
.timeline-photo-gallery { margin-top: 0.45rem; }
.maint-photo-gallery-thumb {
    position: relative; width: 52px; height: 52px; padding: 0; border: 1px solid var(--border-light);
    border-radius: var(--radius-sm); overflow: hidden; cursor: pointer; background: #fff;
}
.maint-photo-gallery-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.maint-photo-gallery-thumb span {
    width: 100%; height: 100%; display: flex; align-items: center; justify-content: center;
    color: var(--text-muted);
}
.maint-photo-gallery-label {
    position: absolute; left: 0; right: 0; bottom: 0; font-size: 0.55rem; line-height: 1.1;
    padding: 0.1rem 0.15rem; background: rgba(0,0,0,0.55); color: #fff; text-align: center;
}
.maint-photo-gallery-more {
    font-size: 0.75rem; font-weight: 700; color: var(--primary-dark); padding: 0.15rem 0.45rem;
    border: 1px dashed var(--border); border-radius: var(--radius-sm); background: var(--bg);
    cursor: pointer; min-height: 52px; min-width: 40px;
}
.maint-photo-gallery-more:hover { background: var(--primary-light); border-color: var(--primary); }
.timeline-photo-gallery .maint-photo-gallery-thumb {
    width: 64px; height: 64px; transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.timeline-photo-gallery .maint-photo-gallery-thumb:hover {
    transform: scale(1.04); box-shadow: var(--shadow-sm);
}
.timeline-photo-gallery .maint-photo-gallery-more { min-height: 64px; }
.passport-tl-photos { margin-top: 0.35rem; }
.passport-tl-photos .maint-photo-gallery-thumb { width: 44px; height: 44px; }

.maint-video-section { margin-top: 0.25rem; }
.maint-video-intro { margin-bottom: 0.65rem; }
.maint-video-slots { display: grid; gap: 0.65rem; }
.maint-video-slot {
    border: 1px solid var(--border-light); border-radius: var(--radius-md);
    background: var(--bg); padding: 0.65rem;
}
.maint-video-slot-head { display: flex; flex-direction: column; gap: 0.1rem; margin-bottom: 0.5rem; }
.maint-video-slot-title { font-size: 0.85rem; font-weight: 700; color: var(--text); }
.maint-video-slot-hint { font-size: 0.75rem; color: var(--text-muted); }
.maint-video-slot-body { display: flex; flex-wrap: wrap; gap: 0.45rem; align-items: center; }
.maint-video-thumb {
    position: relative; width: 96px; height: 64px; border-radius: var(--radius-sm);
    overflow: hidden; border: 1px solid var(--border-light); background: #0f172a;
}
.maint-video-thumb video { width: 100%; height: 100%; object-fit: cover; display: block; }
.maint-video-play-badge {
    position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
    color: #fff; font-size: 1.1rem; pointer-events: none;
    background: rgba(0,0,0,0.25);
}
.maint-video-remove {
    position: absolute; top: 2px; right: 2px; width: 20px; height: 20px; border: none;
    border-radius: 999px; background: rgba(0,0,0,0.55); color: #fff; cursor: pointer;
    display: flex; align-items: center; justify-content: center; font-size: 0.65rem; z-index: 2;
}
.maint-video-add {
    display: inline-flex; flex-direction: column; align-items: center; justify-content: center;
    gap: 0.15rem; width: 96px; height: 64px; border: 1px dashed var(--border);
    border-radius: var(--radius-sm); color: var(--primary); cursor: pointer; font-size: 0.68rem;
    background: var(--card);
}
.maint-video-add i { font-size: 1rem; }
.maint-video-storage-hint {
    margin-top: 0.45rem; color: var(--text-muted); word-break: break-all;
}
.maint-video-storage-hint code { font-size: 0.72rem; }
.maint-video-gallery {
    display: flex; flex-wrap: wrap; gap: 0.4rem; margin-top: 0.45rem; align-items: center;
}
.timeline-video-gallery { margin-top: 0.35rem; }
.maint-video-gallery-thumb {
    position: relative; width: 64px; height: 44px; padding: 0; border: 1px solid var(--border-light);
    border-radius: var(--radius-sm); overflow: hidden; cursor: pointer; background: #0f172a;
}
.maint-video-gallery-icon {
    width: 100%; height: 100%; display: flex; align-items: center; justify-content: center;
    color: #fff; font-size: 0.95rem;
}
.maint-video-gallery-label {
    position: absolute; left: 0; right: 0; bottom: 0; font-size: 0.55rem; line-height: 1.1;
    padding: 0.1rem 0.15rem; background: rgba(0,0,0,0.55); color: #fff; text-align: center;
}
.maint-video-gallery-more {
    font-size: 0.75rem; font-weight: 700; color: var(--primary-dark); padding: 0.15rem 0.45rem;
    border: 1px dashed var(--border); border-radius: var(--radius-sm); background: var(--bg);
    cursor: pointer; min-height: 44px; min-width: 40px;
}
.maint-video-gallery-more:hover { background: var(--primary-light); border-color: var(--primary); }
.passport-tl-videos { margin-top: 0.35rem; }
.passport-tl-videos .maint-video-gallery-thumb { width: 52px; height: 36px; }

.maint-video-lightbox {
    position: fixed; inset: 0; z-index: 1200; display: none; align-items: center; justify-content: center;
    padding: 1rem;
}
.maint-video-lightbox.is-open { display: flex; }
.maint-video-lightbox-backdrop { position: absolute; inset: 0; background: rgba(15,23,42,0.9); }
.maint-video-lightbox-panel {
    position: relative; z-index: 1; width: min(96vw, 820px); display: grid;
    grid-template-columns: auto 1fr auto; align-items: center; gap: 0.5rem;
}
.maint-video-lightbox-stage {
    position: relative; background: #0f172a; border-radius: var(--radius-lg); overflow: hidden;
    min-height: min(50vh, 420px); display: flex; align-items: center; justify-content: center;
}
.maint-video-lightbox-stage.is-loading .maint-video-lightbox-player { opacity: 0.15; }
.maint-video-lightbox-player {
    max-width: 100%; max-height: min(72vh, 560px); width: 100%; height: auto; display: block;
    transition: opacity 0.2s ease;
}
.maint-video-lightbox-spinner {
    position: absolute; inset: 0; display: none; align-items: center; justify-content: center;
    color: #fff; font-size: 1.75rem;
}
.maint-video-lightbox-stage.is-loading .maint-video-lightbox-spinner { display: flex; }
.maint-video-lightbox-caption {
    position: absolute; left: 0; right: 0; bottom: 0; padding: 0.55rem 0.75rem;
    background: linear-gradient(transparent, rgba(0,0,0,0.75)); color: #fff; font-size: 0.85rem; font-weight: 600;
}
.maint-video-lightbox-counter {
    position: absolute; top: 0.5rem; right: 0.55rem; padding: 0.2rem 0.5rem; border-radius: var(--radius-full);
    background: rgba(0,0,0,0.55); color: #fff; font-size: 0.75rem; font-weight: 700;
}
.maint-video-lightbox-close {
    position: absolute; top: -0.25rem; right: -0.25rem; z-index: 3; width: 2.5rem; height: 2.5rem; border: none;
    border-radius: 999px; background: rgba(255,255,255,0.95); color: var(--text-primary); font-size: 1.1rem;
    cursor: pointer; box-shadow: var(--shadow-md);
}
.maint-video-lightbox-nav {
    width: 2.5rem; height: 2.5rem; border: none; border-radius: 999px; background: rgba(255,255,255,0.92);
    color: var(--text-primary); cursor: pointer; box-shadow: var(--shadow-md); flex-shrink: 0;
}
.maint-video-lightbox-nav:disabled { opacity: 0.35; cursor: not-allowed; }
.maint-video-lightbox-nav:not(:disabled):hover { background: #fff; }

.modal-sheet.has-video-processing { position: relative; }
.maint-media-upload-locked {
    pointer-events: none;
    opacity: 0.5;
    filter: grayscale(0.15);
}
.maint-photo-add.is-disabled,
.maint-video-add.is-disabled {
    pointer-events: none;
    opacity: 0.45;
    cursor: not-allowed;
    border-color: var(--border-light);
    color: var(--text-muted);
}
.maint-video-processing-overlay {
    position: absolute; inset: 0; z-index: 30;
    display: none; align-items: center; justify-content: center;
    padding: 1.25rem;
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(3px);
}
.maint-video-processing-overlay.is-visible { display: flex; }
.maint-video-processing-card {
    width: min(100%, 320px);
    text-align: center;
    padding: 1.25rem 1rem;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-light);
    background: var(--card);
    box-shadow: var(--shadow-lg);
}
.maint-video-processing-spinner {
    font-size: 2rem;
    color: var(--primary);
    margin-bottom: 0.65rem;
}
.maint-video-processing-title {
    font-size: 1rem;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 0.35rem;
}
.maint-video-processing-hint {
    font-size: 0.82rem;
    color: var(--text-muted);
    line-height: 1.45;
}

/* Lightbox — ดูรูปซ่อม (timeline / passport) */
.upload-preview-overlay {
    position: fixed; inset: 0; z-index: 1100; display: flex; align-items: center; justify-content: center; padding: 1rem;
}
.upload-preview-backdrop { position: absolute; inset: 0; background: rgba(15,23,42,0.82); }
.upload-preview-body { position: relative; z-index: 1; max-width: min(96vw, 720px); max-height: 90vh; }
.upload-preview-body img { width: 100%; max-height: 90vh; object-fit: contain; border-radius: var(--radius-lg); box-shadow: var(--shadow-lg); }
.upload-preview-close {
    position: absolute; top: 1rem; right: 1rem; z-index: 2; width: 2.5rem; height: 2.5rem; border: none;
    border-radius: 999px; background: rgba(255,255,255,0.95); color: var(--text-primary); font-size: 1.1rem;
    cursor: pointer; box-shadow: var(--shadow-md);
}
.maint-photo-lightbox {
    position: fixed; inset: 0; z-index: 1200; display: none; align-items: center; justify-content: center;
    padding: 1rem;
}
.maint-photo-lightbox.is-open { display: flex; }
.maint-photo-lightbox-backdrop { position: absolute; inset: 0; background: rgba(15,23,42,0.9); }
.maint-photo-lightbox-panel {
    position: relative; z-index: 1; width: min(96vw, 820px); display: grid;
    grid-template-columns: auto 1fr auto; align-items: center; gap: 0.5rem;
}
.maint-photo-lightbox-stage {
    position: relative; background: #0f172a; border-radius: var(--radius-lg); overflow: hidden;
    min-height: min(70vh, 520px); display: flex; align-items: center; justify-content: center;
}
.maint-photo-lightbox-stage.is-loading .maint-photo-lightbox-img { opacity: 0.15; }
.maint-photo-lightbox-img {
    max-width: 100%; max-height: min(78vh, 640px); width: auto; height: auto; object-fit: contain; display: block;
    transition: opacity 0.2s ease;
}
.maint-photo-lightbox-spinner {
    position: absolute; inset: 0; display: none; align-items: center; justify-content: center;
    color: #fff; font-size: 1.75rem;
}
.maint-photo-lightbox-stage.is-loading .maint-photo-lightbox-spinner { display: flex; }
.maint-photo-lightbox-caption {
    position: absolute; left: 0; right: 0; bottom: 0; padding: 0.55rem 0.75rem;
    background: linear-gradient(transparent, rgba(0,0,0,0.75)); color: #fff; font-size: 0.85rem; font-weight: 600;
}
.maint-photo-lightbox-counter {
    position: absolute; top: 0.5rem; right: 0.55rem; padding: 0.2rem 0.5rem; border-radius: var(--radius-full);
    background: rgba(0,0,0,0.55); color: #fff; font-size: 0.75rem; font-weight: 700;
}
.maint-photo-lightbox-close {
    position: absolute; top: -0.25rem; right: -0.25rem; z-index: 3; width: 2.5rem; height: 2.5rem; border: none;
    border-radius: 999px; background: rgba(255,255,255,0.95); color: var(--text-primary); font-size: 1.1rem;
    cursor: pointer; box-shadow: var(--shadow-md);
}
.maint-photo-lightbox-nav {
    width: 2.5rem; height: 2.5rem; border: none; border-radius: 999px; background: rgba(255,255,255,0.92);
    color: var(--text-primary); cursor: pointer; box-shadow: var(--shadow-md); flex-shrink: 0;
}
.maint-photo-lightbox-nav:disabled { opacity: 0.35; cursor: not-allowed; }
.maint-photo-lightbox-nav:not(:disabled):hover { background: #fff; }
.timeline-item .timeline-title { font-size: 1rem; font-weight: 600; margin-bottom: 0.15rem; }
.timeline-item .timeline-shop { font-size: 0.875rem; color: var(--text-secondary); display: flex; align-items: center; gap: 0.35rem; }
.timeline-item .timeline-items-list { font-size: 1rem; color: var(--text-secondary); margin-top: 0.5rem; line-height: 1.6; }
.timeline-item .timeline-cost {
    font-size: 1.125rem; font-weight: 700; color: var(--accent-dark); margin-top: 0.5rem;
    display: flex; align-items: center; gap: 0.35rem;
}
.timeline-footer-row {
    display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between;
    gap: 0.5rem; margin-top: 0.5rem;
}
.timeline-action-btns { display: flex; flex-wrap: wrap; gap: 0.35rem; align-items: center; }
.timeline-photo-btn { font-size: 0.78rem; }

/* === Badge === */
.badge {
    font-size: 0.8rem; font-weight: 600;
    padding: 0.2rem 0.65rem; border-radius: var(--radius-full);
    display: inline-flex; align-items: center; gap: 4px;
    letter-spacing: 0.01em;
}
.badge-danger { background: var(--danger-light); color: var(--danger); }
.badge-warning { background: var(--warning-light); color: var(--warning-dark); }
.badge-success { background: var(--success-light); color: var(--success-dark); }
.badge-info { background: var(--info-light); color: var(--info); }
.badge-primary { background: var(--primary-light); color: var(--primary-dark); }

/* === Section Header === */
.section-header { display: flex; align-items: center; justify-content: space-between; margin: 1.5rem 0 0.875rem; }
.section-title {
    font-size: 1.0625rem; font-weight: 700; line-height: var(--lh-headline);
    display: flex; align-items: center; gap: 0.5rem;
}
.section-title i { color: var(--primary); font-size: 1rem; }
.section-link { font-size: 0.875rem; font-weight: 600; color: var(--primary); display: flex; align-items: center; gap: 0.25rem; }

/* === Upload Zone === */
.upload-zone {
    border: 2px dashed var(--border); border-radius: var(--radius-xl);
    padding: 3rem 1rem; display: flex; flex-direction: column;
    align-items: center; gap: 0.75rem; cursor: pointer;
    transition: all var(--transition); background: var(--card); text-align: center;
}
.upload-zone:hover, .upload-zone.drag-over {
    border-color: var(--primary); background: var(--primary-light);
}
.upload-zone .upload-icon {
    width: 64px; height: 64px; border-radius: var(--radius-full);
    background: var(--primary-light); color: var(--primary);
    display: flex; align-items: center; justify-content: center;
    font-size: 1.5rem; transition: all var(--transition);
}
.upload-zone:hover .upload-icon { background: var(--primary-100); transform: scale(1.05); }
.upload-zone .upload-text { font-size: 1rem; font-weight: 600; }
.upload-zone .upload-hint { font-size: 0.875rem; color: var(--text-secondary); }

/* === Progress Bar === */
.progress-bar {
    height: 6px; border-radius: 3px;
    background: var(--bg-alt); overflow: hidden; margin: 0.75rem 0;
}
.progress-fill {
    height: 100%; border-radius: 3px;
    background: linear-gradient(90deg, var(--primary), var(--info));
    transition: width 0.5s ease; width: 0%;
}

/* === AI Result Card === */
.ai-result-card {
    background: var(--card); border: 2px solid var(--success);
    border-radius: var(--radius-xl); padding: 1.25rem;
    box-shadow: 0 4px 14px rgba(34,197,94,0.1);
}
.ai-result-header {
    display: flex; align-items: center; gap: 0.5rem;
    margin-bottom: 1rem; font-size: 1rem; font-weight: 700; color: var(--success-dark);
}
.ai-result-row {
    display: flex; justify-content: space-between; align-items: center;
    padding: 0.65rem 0; border-bottom: 1px solid var(--border-light);
}
.ai-result-row:last-child { border-bottom: none; }
.ai-result-label { font-size: 0.875rem; color: var(--text-secondary); }
.ai-result-value { font-size: 1rem; font-weight: 600; }
.ai-result-total { font-size: 1.25rem; font-weight: 700; color: var(--accent-dark); }

/* === Search Bar === */
.search-bar { position: relative; margin-bottom: 1rem; }
.search-bar .search-icon {
    position: absolute; left: 1rem; top: 50%; transform: translateY(-50%);
    color: var(--text-muted); pointer-events: none; font-size: 1rem;
}
.search-bar .form-input {
    padding-left: 2.75rem; border-radius: var(--radius-full);
    background: var(--card);
}

/* === Filter Chips === */
.filter-chips {
    display: flex; gap: 0.5rem; overflow-x: auto;
    padding-bottom: 0.5rem; margin-bottom: 1rem;
    -webkit-overflow-scrolling: touch; scrollbar-width: none;
}
.filter-chips::-webkit-scrollbar { display: none; }

.filter-chip {
    font-size: 0.875rem; font-weight: 600;
    padding: 0.5rem 1rem; border-radius: var(--radius-full);
    border: 1.5px solid var(--border); background: var(--card);
    color: var(--text-secondary); cursor: pointer; white-space: nowrap;
    transition: all var(--transition); min-height: 40px;
    display: flex; align-items: center; gap: 0.35rem;
}
.filter-chip:hover { border-color: var(--primary); color: var(--primary); }
.filter-chip.active {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: #fff; border-color: transparent; box-shadow: var(--shadow-primary);
}

.filter-chips-label {
    display: flex; align-items: center; gap: 0.35rem;
    margin-bottom: 0.35rem; color: var(--text-secondary); font-weight: 600;
}
.filter-chips-hint { font-weight: 400; opacity: 0.75; font-size: 0.75rem; }
.filter-chips--type { margin-bottom: 0.65rem; }
.filter-chips--tags { margin-bottom: 0.75rem; }

.tag-filter-chip.active {
    background: color-mix(in srgb, var(--primary) 10%, white);
    color: var(--primary); border-color: var(--primary);
    box-shadow: none;
}

.garage-loc-banner {
    font-family: 'Sarabun', sans-serif; font-size: 0.8rem; font-weight: 600;
    padding: 0.65rem 0.85rem; border-radius: var(--radius-lg);
    background: var(--bg); color: var(--text-secondary);
    border: 1px solid var(--border-light); margin-bottom: 1rem;
    display: flex; align-items: center; gap: 0.45rem;
}
.garage-loc-banner--ok {
    background: var(--success-light, #f0fdf4);
    color: var(--success-dark, #166534);
    border-color: color-mix(in srgb, var(--success, #22c55e) 25%, white);
}
.garage-loc-banner--warn {
    background: var(--warning-light, #fffbeb);
    color: var(--warning-dark, #92400e);
    border-color: color-mix(in srgb, var(--warning, #f59e0b) 25%, white);
}

.garage-vehicle-banner {
    padding: 0.85rem 1rem; border-radius: var(--radius-xl);
    background: linear-gradient(135deg, #f0fdf4 0%, #ecfeff 100%);
    border: 1px solid color-mix(in srgb, var(--primary) 20%, white);
    margin-bottom: 0.85rem;
}
.garage-vehicle-banner-head {
    display: flex; align-items: center; justify-content: space-between;
    gap: 0.5rem; margin-bottom: 0.5rem;
}
.garage-vehicle-banner-title {
    font-size: 0.875rem; font-weight: 800; color: var(--text);
    display: flex; align-items: center; gap: 0.35rem;
}
.garage-vehicle-banner-hint { margin: 0.4rem 0 0; line-height: 1.4; }
.garage-vehicle-banner--empty {
    background: var(--bg); border-style: dashed;
}
#garage-vehicle-select { min-height: 44px; font-weight: 600; }

.garage-top-pick { margin-bottom: 1rem; }
.garage-top-pick-label {
    font-size: 0.8rem; font-weight: 800; color: var(--primary-dark, #166534);
    margin-bottom: 0.45rem; display: flex; align-items: center; gap: 0.35rem;
}
.garage-top-pick-card {
    border: 2.5px solid var(--primary) !important;
    background: linear-gradient(135deg, #fff 0%, #f0fdf4 55%, #ecfeff 100%) !important;
    box-shadow: var(--shadow-primary);
}
.garage-match-badge {
    font-size: 0.72rem !important;
    padding: 0.18rem 0.45rem !important;
}
.garage-match-reasons {
    color: var(--primary-dark, #166534);
    font-weight: 700;
    margin-top: 0.15rem;
}
.garage-top-pick-reason {
    margin: 0.35rem 0 0;
    color: var(--text-secondary);
}

/* === Garage Card === */
.garage-card {
    display: flex; gap: 1rem; padding: 1rem;
    border-radius: var(--radius-xl); background: var(--card);
    border: 1px solid var(--border-light); margin-bottom: 0.75rem;
    transition: all var(--transition); box-shadow: var(--shadow-xs);
}
.garage-card:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); }

.garage-icon {
    width: 52px; height: 52px; border-radius: var(--radius-lg);
    display: flex; align-items: center; justify-content: center;
    font-size: 1.125rem; flex-shrink: 0;
}
.garage-info { flex: 1; min-width: 0; }
.garage-name { font-size: 1.0625rem; font-weight: 600; margin-bottom: 0.15rem; }
.garage-type { font-size: 0.875rem; color: var(--primary); font-weight: 600; margin-bottom: 0.35rem; }
.garage-detail {
    font-size: 0.875rem; color: var(--text-secondary);
    display: flex; align-items: flex-start; gap: 0.4rem; margin-bottom: 0.2rem; line-height: 1.4;
}
.garage-detail i { color: var(--text-muted); margin-top: 2px; font-size: 0.8rem; }

/* === Insurance Card === */
.insurance-card { position: relative; overflow: hidden; }
.insurance-card .status-stripe {
    position: absolute; left: 0; top: 0; bottom: 0; width: 4px; border-radius: 4px 0 0 4px;
}
.insurance-card .status-stripe.danger { background: linear-gradient(to bottom, var(--danger), #fca5a5); }
.insurance-card .status-stripe.warning { background: linear-gradient(to bottom, var(--warning), #fde68a); }
.insurance-card .status-stripe.success { background: linear-gradient(to bottom, var(--success), #86efac); }

.insurance-card .insurance-body { padding-left: 0.75rem; }
.insurance-card .insurance-type { font-size: 1.0625rem; font-weight: 700; margin-bottom: 0.15rem; }
.insurance-card .insurance-vehicle { font-size: 0.875rem; color: var(--text-secondary); margin-bottom: 0.5rem; }
.insurance-card .insurance-expiry { font-size: 1rem; font-weight: 600; margin-bottom: 0.15rem; }
.insurance-card .insurance-remaining { font-size: 0.9rem; font-weight: 700; }
.insurance-card .insurance-remaining.danger { color: var(--danger); }
.insurance-card .insurance-remaining.warning { color: var(--warning-dark); }
.insurance-card .insurance-remaining.success { color: var(--success-dark); }

/* === Add Card === */
.add-card {
    background: var(--card); border: 2px dashed var(--border);
    border-radius: var(--radius-xl); padding: 2rem 1rem;
    display: flex; flex-direction: column; align-items: center;
    gap: 0.75rem; cursor: pointer; transition: all var(--transition);
    text-decoration: none; color: var(--text-secondary); margin-bottom: 1rem;
}
.add-card:hover { border-color: var(--primary); background: var(--primary-light); color: var(--primary); text-decoration: none; }
.add-card .add-icon {
    width: 52px; height: 52px; border-radius: var(--radius-full);
    background: var(--bg-alt); display: flex; align-items: center; justify-content: center;
    font-size: 1.25rem; transition: all var(--transition); color: var(--text-muted);
}
.add-card:hover .add-icon { background: var(--primary-100); color: var(--primary); }
.add-card .add-label { font-size: 1rem; font-weight: 600; }
.add-card .add-hint { font-size: 0.875rem; }

/* === Bottom Navigation === */
.bottom-nav {
    position: fixed; bottom: 0; left: 0; right: 0;
    height: var(--bottom-nav-h);
    background: rgba(255,255,255,0.92);
    backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
    border-top: 1px solid var(--border-light);
    display: flex; align-items: center; justify-content: center;
    z-index: 200;
    padding-bottom: env(safe-area-inset-bottom, 0);
}
.bottom-nav-inner {
    display: flex; align-items: center; justify-content: space-around;
    width: 100%; max-width: 480px;
}
.nav-item {
    display: flex; flex-direction: column; align-items: center; gap: 2px;
    padding: 0.4rem 0.75rem; text-decoration: none;
    color: var(--text-muted); transition: color var(--transition);
    min-width: 56px; border-radius: var(--radius-md); position: relative;
}
.nav-item:hover { color: var(--primary); text-decoration: none; }
.nav-item.active { color: var(--primary); }
.nav-item .nav-icon { font-size: 1.25rem; line-height: 1; }
.nav-item .bottom-nav-label { font-size: 0.75rem; font-weight: 500; line-height: 1; }
.nav-item.active .bottom-nav-label { font-weight: 700; }

/* Active indicator dot */
.nav-item.active::after {
    content: ''; position: absolute; bottom: 0; left: 50%; transform: translateX(-50%);
    width: 4px; height: 4px; border-radius: var(--radius-full); background: var(--primary);
}

/* Center action button */
.nav-item.nav-add .nav-icon {
    width: 48px; height: 48px; border-radius: var(--radius-full);
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: #fff; display: flex; align-items: center; justify-content: center;
    margin-top: -18px; box-shadow: var(--shadow-primary);
    transition: all var(--transition); font-size: 1.25rem;
}
.nav-item.nav-add:hover .nav-icon { transform: scale(1.08); box-shadow: 0 6px 20px rgba(59,130,246,0.4); }
.nav-item.nav-add::after { display: none; }

/* === Modal === */
.modal-overlay {
    position: fixed; inset: 0; background: rgba(15,23,42,0.5);
    backdrop-filter: blur(4px); z-index: 11000;
    display: none; align-items: flex-end; justify-content: center;
}
.modal-overlay.open { display: flex; animation: fadeIn 0.2s; }

.modal-sheet {
    background: var(--card); border-radius: var(--radius-2xl) var(--radius-2xl) 0 0;
    width: 100%; max-width: 480px; max-height: 92vh;
    overflow-y: auto; padding: 1.5rem; animation: slideUp 0.35s ease;
}
.modal-handle { width: 36px; height: 4px; border-radius: 2px; background: var(--border); margin: 0 auto 1.25rem; }

/* === Toast === */
.toast-container {
    position: fixed; top: 1rem; left: 50%; transform: translateX(-50%);
    z-index: 500; max-width: 420px; width: calc(100% - 2rem);
}
.toast {
    background: var(--card); border-radius: var(--radius-lg);
    padding: 0.875rem 1rem; box-shadow: var(--shadow-xl);
    display: flex; align-items: center; gap: 0.75rem;
    margin-bottom: 0.5rem; animation: slideDown 0.35s ease;
    border: 1px solid var(--border-light);
}
.toast.toast-success { border-left: 4px solid var(--success); }
.toast.toast-warning { border-left: 4px solid var(--warning); }
.toast.toast-error { border-left: 4px solid var(--danger); }
.toast.toast-info { border-left: 4px solid var(--primary); }

.toast .toast-icon { font-size: 1.125rem; flex-shrink: 0; }
.toast.toast-success .toast-icon { color: var(--success); }
.toast.toast-warning .toast-icon { color: var(--warning); }
.toast.toast-error .toast-icon { color: var(--danger); }
.toast.toast-info .toast-icon { color: var(--primary); }

.toast .toast-message { font-size: 0.9375rem; flex: 1; }
.toast .toast-close {
    background: none; border: none; font-size: 1rem;
    color: var(--text-muted); cursor: pointer; padding: 0.25rem;
    border-radius: var(--radius-sm); transition: all var(--transition);
}
.toast .toast-close:hover { background: var(--bg-alt); color: var(--text); }

/* === Divider === */
.divider { height: 1px; background: var(--border-light); margin: 1rem 0; }

/* === Stat Card === */
.stat-card {
    background: var(--card); border-radius: var(--radius-xl);
    border: 1px solid var(--border-light); padding: 1rem;
    text-align: center; box-shadow: var(--shadow-xs);
}
.stat-value { font-size: 1.375rem; font-weight: 700; margin-bottom: 0.15rem; }
.stat-label { font-family: 'Sarabun', sans-serif; font-size: var(--font-label); color: var(--text-secondary); }

/* === Option Grid (Wizard brand/type selection) === */
.option-grid {
    display: grid; grid-template-columns: repeat(2, 1fr); gap: 0.625rem;
}
.option-btn {
    font-family: 'Noto Sans Thai', sans-serif; font-size: 1rem; font-weight: 500;
    background: var(--card); border: 2px solid var(--border);
    border-radius: var(--radius-lg); padding: 0.875rem 0.75rem;
    cursor: pointer; transition: all var(--transition);
    display: flex; align-items: center; justify-content: center; gap: 0.75rem;
    color: var(--text); min-height: 50px;
}
.option-btn:hover { border-color: var(--primary); background: var(--primary-light); color: var(--primary-dark); }
.option-btn:active { transform: scale(0.97); }
.option-btn.selected { border-color: var(--primary); background: var(--primary-light); color: var(--primary-dark); font-weight: 600; }

.brand-logo-img {
    width: 20px;
    height: 20px;
    object-fit: contain;
    filter: brightness(0.2) contrast(1.2);
    transition: filter var(--transition), transform var(--transition);
}
.option-btn:hover .brand-logo-img,
.option-btn.selected .brand-logo-img,
.custom-select-option:hover .option-icon.brand-logo-img,
.custom-select-option.selected .option-icon.brand-logo-img,
.trigger-icon.brand-logo-img {
    filter: brightness(0) saturate(100%) invert(43%) sepia(97%) saturate(1313%) hue-rotate(203deg) brightness(101%) contrast(92%);
    transform: scale(1.05);
}
.option-btn i { font-size: 1.125rem; }

/* === Utility === */
.text-center { text-align: center; }
.text-right { text-align: right; }
.text-primary-color { color: var(--primary); }
.text-accent-color { color: var(--accent-dark); }
.text-danger-color { color: var(--danger); }
.text-success-color { color: var(--success-dark); }
.fw-bold { font-weight: 700; }
.fw-semibold { font-weight: 600; }
.mt-1 { margin-top: 0.25rem; } .mt-2 { margin-top: 0.5rem; } .mt-3 { margin-top: 0.75rem; }
.mt-4 { margin-top: 1rem; } .mt-5 { margin-top: 1.5rem; }
.mb-1 { margin-bottom: 0.25rem; } .mb-2 { margin-bottom: 0.5rem; } .mb-3 { margin-bottom: 0.75rem; }
.mb-4 { margin-bottom: 1rem; } .mb-5 { margin-bottom: 1.5rem; }
.flex { display: flex; } .flex-center { display: flex; align-items: center; justify-content: center; }
.flex-between { display: flex; align-items: center; justify-content: space-between; }
.gap-2 { gap: 0.5rem; } .gap-3 { gap: 0.75rem; } .gap-4 { gap: 1rem; }
.hidden { display: none !important; }

/* === Animations === */
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes slideUp { from { transform: translateY(100%); } to { transform: translateY(0); } }
@keyframes slideDown { from { opacity: 0; transform: translateY(-16px); } to { opacity: 1; transform: translateY(0); } }
@keyframes fadeSlideUp { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: translateY(0); } }
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.5; } }
@keyframes spin { from { transform: rotate(0deg); } to { transform: rotate(360deg); } }

.animate-fade-in { animation: fadeIn 0.3s ease; }
.animate-slide-up { animation: fadeSlideUp 0.35s ease; }
.animate-spin { animation: spin 1s linear infinite; }

/* === Credit Card Style Vehicles === */
.vehicle-card-cc {
    aspect-ratio: 1.586 / 1;
    border-radius: var(--radius-xl);
    padding: 1.25rem 1.5rem;
    color: var(--text);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    position: relative;
    overflow: hidden;
    margin-bottom: 1.25rem;
    box-shadow: var(--shadow-md);
    border: 1.5px solid var(--border);
    transition: all var(--transition);
    cursor: pointer;
}
.vehicle-card-cc:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary-dark);
}
.vehicle-card-cc:active {
    transform: translateY(-2px) scale(0.99);
}

.vehicle-card-cc::after {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(
        45deg,
        rgba(255,255,255,0) 45%,
        rgba(255,255,255,0.4) 50%,
        rgba(255,255,255,0) 55%
    );
    transform: rotate(45deg);
    transition: transform 0.5s ease;
    pointer-events: none;
}
.vehicle-card-cc:hover::after {
    transform: translate(30%, 30%) rotate(45deg);
}

/* Card Brand Gradients (Premium White / Silver / Teal / Zinc) */
.cc-toyota { background: linear-gradient(to top right, rgba(255, 255, 255, 1) 0%, rgba(255, 255, 255, 0.8) 50%, rgba(255, 255, 255, 0.2) 100%), url('img/camry_isolated.png') no-repeat center/cover; background-blend-mode: multiply; }
.cc-isuzu { background: linear-gradient(to top right, rgba(255, 255, 255, 1) 0%, rgba(255, 255, 255, 0.8) 50%, rgba(255, 255, 255, 0.25) 100%), url('img/isuzu_isolated.png') no-repeat center/cover; background-blend-mode: multiply; }
.cc-byd { background: linear-gradient(to top right, rgba(240, 253, 250, 1) 0%, rgba(240, 253, 250, 0.8) 50%, rgba(240, 253, 250, 0.2) 100%), url('img/byd_isolated.png') no-repeat center/cover; background-blend-mode: multiply; }
.cc-tesla { background: linear-gradient(to top right, rgba(250, 250, 249, 1) 0%, rgba(250, 250, 249, 0.8) 50%, rgba(250, 250, 249, 0.2) 100%), url('img/tesla_isolated.png') no-repeat center/cover; background-blend-mode: multiply; }
.cc-honda { background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 48%, #cbd5e1 100%); }
.cc-mazda { background: linear-gradient(135deg, #fef2f2 0%, #fecaca 48%, #fca5a5 100%); }
.cc-ford { background: linear-gradient(135deg, #eff6ff 0%, #bfdbfe 48%, #93c5fd 100%); }

.cc-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
}
.cc-logo-wrap {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}
.cc-brand-logo {
    width: 24px;
    height: 24px;
    object-fit: contain;
    filter: brightness(0.15) contrast(1.2);
}
.cc-brand-name {
    font-size: 1.125rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: var(--text);
}

.cc-chip-wrap {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 0.25rem;
}
.cc-chip {
    width: 36px;
    height: 26px;
    background: linear-gradient(135deg, #fbbf24, #d97706);
    border-radius: 5px;
    border: 1.5px solid rgba(0,0,0,0.15);
    position: relative;
}
.cc-chip::after {
    content: '';
    position: absolute;
    inset: 3px;
    border: 0.5px solid rgba(255,255,255,0.3);
    border-radius: 3px;
    background: rgba(0,0,0,0.05);
}
.cc-signal {
    font-size: 0.9rem;
    color: var(--text-muted);
}

.cc-number {
    font-size: 1.35rem;
    font-weight: 800;
    letter-spacing: 0.12em;
    text-align: center;
    margin: 0.5rem 0;
    font-family: 'Noto Sans Thai', sans-serif;
    color: #0f172a;
    text-shadow: 1px 1px 0px rgba(255, 255, 255, 0.95), -1px -1px 0px rgba(15, 23, 42, 0.22);
    background: rgba(255, 255, 255, 0.25);
    padding: 0.3rem 0.5rem;
    border-radius: var(--radius-sm);
    border: 1.5px solid rgba(15, 23, 42, 0.12);
    box-shadow: inset 1px 1px 2px rgba(0,0,0,0.04), 0px 1px 1px rgba(255,255,255,0.7);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(4px);
}

.cc-footer {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
}
.cc-owner-wrap {
    display: flex;
    flex-direction: column;
}
.cc-label {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-secondary);
    line-height: 1.2;
}
.cc-owner-name {
    font-size: 0.9375rem;
    font-weight: 600;
    color: var(--text);
}
.cc-mileage-wrap {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
}
.cc-mileage-val {
    font-size: 1.0625rem;
    font-weight: 700;
    color: var(--primary-dark);
}

/* Warning and Danger States for Credit Cards */
.vehicle-card-cc.cc-warning-state {
    background-image: linear-gradient(to top right, rgba(255, 251, 235, 1) 0%, rgba(255, 251, 235, 0.8) 50%, rgba(255, 251, 235, 0.2) 100%),
                      url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 350 200'><path d='M 220,0 L 210,25 L 225,55 L 215,80 M 210,25 L 185,35 M 80,0 L 90,20 L 80,40' stroke='rgba(180, 83, 9, 0.32)' stroke-width='1.5' fill='none' stroke-linejoin='round' stroke-linecap='round'/></svg>"),
                      url('img/byd_isolated.png') !important;
    background-repeat: no-repeat, no-repeat, no-repeat !important;
    background-position: center, center, center !important;
    background-size: cover, cover, cover !important;
    background-blend-mode: multiply !important;
    border-color: var(--warning) !important;
    box-shadow: 0 10px 20px -5px rgba(217, 119, 6, 0.15);
}
.vehicle-card-cc.cc-warning-state .cc-number {
    border-color: rgba(217, 119, 6, 0.25);
    background: rgba(255, 255, 255, 0.35);
    text-shadow: 1px 1px 0px rgba(255, 255, 255, 0.95), -1px -1px 0px rgba(120, 53, 4, 0.3);
}
.vehicle-card-cc.cc-warning-state .cc-mileage-val {
    color: var(--warning-dark);
}

.vehicle-card-cc.cc-danger-state {
    background-image: linear-gradient(to top right, rgba(255, 245, 245, 1) 0%, rgba(255, 245, 245, 0.8) 50%, rgba(255, 245, 245, 0.2) 100%),
                      url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 350 200'><path d='M 180,0 L 170,30 L 190,70 L 175,100 L 195,140 M 170,30 L 130,50 L 115,85 M 190,70 L 230,85 L 250,120 M 260,0 L 280,35 L 265,75 M 280,35 L 310,50 M 90,0 L 105,25 L 90,50' stroke='rgba(220, 38, 38, 0.32)' stroke-width='1.5' fill='none' stroke-linejoin='round' stroke-linecap='round'/></svg>"),
                      url('img/camry_isolated.png') !important;
    background-repeat: no-repeat, no-repeat, no-repeat !important;
    background-position: center, center, center !important;
    background-size: cover, cover, cover !important;
    background-blend-mode: multiply !important;
    border-color: var(--danger) !important;
    box-shadow: 0 10px 20px -5px rgba(220, 38, 38, 0.15);
}
.vehicle-card-cc.cc-danger-state .cc-number {
    border-color: rgba(220, 38, 38, 0.25);
    background: rgba(255, 255, 255, 0.35);
    text-shadow: 1px 1px 0px rgba(255, 255, 255, 0.95), -1px -1px 0px rgba(153, 27, 27, 0.3);
}
.vehicle-card-cc.cc-danger-state .cc-mileage-val {
    color: var(--danger);
}


/* === Credit Card Carousel === */
.cc-carousel-wrapper {
    position: relative;
    margin-bottom: 1.75rem;
}
.cc-carousel {
    display: flex;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    gap: 1rem;
    padding: 0.25rem 0.25rem 0.75rem 0.25rem;
    scrollbar-width: none;
    -ms-overflow-style: none;
}
.cc-carousel::-webkit-scrollbar {
    display: none;
}
.cc-carousel-item {
    flex: 0 0 92%;
    scroll-snap-align: center;
    transition: transform var(--transition);
}
.cc-carousel-dots {
    display: flex;
    justify-content: center;
    gap: 0.35rem;
    margin-top: 0.25rem;
}
.cc-carousel-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--border);
    transition: all var(--transition);
}
.cc-carousel-dot.active {
    width: 16px;
    border-radius: 3px;
    background: var(--primary);
}


.station-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 0.5rem;
}
.station-chip {
    padding: 0.5rem 0.75rem;
    border: 1.5px solid var(--border);
    border-radius: var(--radius-md);
    text-align: center;
    font-size: 0.8rem;
    font-family: 'Sarabun', sans-serif;
    cursor: pointer;
    background: var(--card);
    transition: all var(--transition);
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
}
.station-chip:hover {
    border-color: var(--primary-light);
    color: var(--primary);
}
.station-chip.active {
    border-color: var(--primary);
    background: var(--primary-50);
    color: var(--primary);
    font-weight: 600;
}

/* === Trip Log === */
.btn-trip {
    background: linear-gradient(135deg, var(--trip-primary), var(--trip-primary-dark));
    color: #fff; border: none;
    box-shadow: 0 4px 14px rgba(13,148,136,0.3);
}
.btn-trip:hover { filter: brightness(1.05); color: #fff; }

.trip-year-stats {
    display: grid; grid-template-columns: repeat(3, 1fr); gap: 0.6rem;
    margin-bottom: 1.25rem;
}
.trip-year-stat {
    background: var(--card); border-radius: var(--radius-lg);
    padding: 0.85rem 0.65rem; text-align: center;
    border: 1px solid var(--border-light); box-shadow: var(--shadow-xs);
}
.trip-year-stat-value {
    font-size: 1rem; font-weight: 700; color: var(--trip-primary);
    line-height: 1.2; margin-bottom: 0.15rem;
}
.trip-year-stat-label {
    font-size: 0.75rem; color: var(--text-secondary); font-family: 'Sarabun', sans-serif;
}

.trip-list { margin-bottom: 0.5rem; }

.trip-receipt-card {
    background: var(--card);
    border: 1px solid rgba(13,148,136,0.18);
    border-radius: var(--radius-xl);
    padding: 1.1rem 1.15rem;
    margin-bottom: 0.85rem;
    cursor: pointer;
    transition: all var(--transition);
    box-shadow: var(--shadow-sm);
    position: relative;
    overflow: hidden;
}
.trip-receipt-card::before {
    content: '';
    position: absolute; top: 0; left: 0; right: 0; height: 3px;
    background: linear-gradient(90deg, var(--trip-car), var(--trip-primary), var(--trip-leisure));
}
.trip-receipt-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
    border-color: rgba(13,148,136,0.35);
}
.trip-receipt-top {
    display: flex; justify-content: space-between; align-items: center;
    margin-bottom: 0.65rem;
}
.trip-status-badge {
    font-size: 0.75rem; font-weight: 700; font-family: 'Sarabun', sans-serif;
    padding: 0.15rem 0.5rem; border-radius: var(--radius-full);
    display: inline-flex; align-items: center; gap: 0.25rem;
}
.trip-status-badge.active { background: #ccfbf1; color: var(--trip-primary-dark); }
.trip-status-badge.completed { background: var(--bg-alt); color: var(--text-secondary); }
.trip-receipt-dates {
    font-size: 0.75rem; color: var(--text-muted); font-family: 'Sarabun', sans-serif;
}
.trip-route-line {
    display: flex; align-items: center; gap: 0.5rem;
    margin-bottom: 0.35rem; flex-wrap: wrap;
}
.trip-route-origin, .trip-route-dest {
    font-size: 1.05rem; font-weight: 700; color: var(--text);
}
.trip-route-arrow { color: var(--trip-primary); font-size: 0.9rem; }
.trip-receipt-name {
    font-size: 0.875rem; color: var(--text-secondary);
    margin-bottom: 0.25rem; font-family: 'Sarabun', sans-serif;
}
.trip-receipt-vehicle {
    font-size: 0.8rem; color: var(--text-muted); font-family: 'Sarabun', sans-serif;
    margin-bottom: 0.85rem;
}
.trip-expense-bars { margin-bottom: 0.75rem; }
.trip-expense-bar-row {
    display: grid; grid-template-columns: 72px 1fr auto;
    align-items: center; gap: 0.5rem; margin-bottom: 0.4rem;
}
.trip-bar-label {
    font-size: 0.75rem; font-weight: 600; font-family: 'Sarabun', sans-serif;
    display: flex; align-items: center; gap: 0.25rem;
}
.trip-bar-label.car { color: var(--trip-car); }
.trip-bar-label.leisure { color: var(--trip-leisure); }
.trip-bar-track {
    height: 6px; background: var(--bg-alt); border-radius: var(--radius-full); overflow: hidden;
}
.trip-bar-fill { height: 100%; border-radius: var(--radius-full); transition: width 0.4s ease; }
.trip-bar-fill.car { background: linear-gradient(90deg, #60a5fa, var(--trip-car)); }
.trip-bar-fill.leisure { background: linear-gradient(90deg, #a78bfa, var(--trip-leisure)); }
.trip-bar-amount {
    font-size: 0.8rem; font-weight: 700; font-family: 'Sarabun', sans-serif;
    min-width: 58px; text-align: right;
}
.trip-receipt-total {
    display: flex; justify-content: space-between; align-items: center;
    padding-top: 0.65rem; border-top: 1px dashed var(--border);
    font-family: 'Sarabun', sans-serif; font-size: 0.85rem; color: var(--text-secondary);
}
.trip-receipt-total strong {
    font-size: 1.2rem; font-weight: 800; color: var(--trip-primary);
    font-family: 'Noto Sans Thai', sans-serif;
}

.trip-empty-state {
    text-align: center; padding: 2rem 1rem; color: var(--text-secondary);
    margin-bottom: 1.5rem;
}
.trip-empty-state i { font-size: 2.5rem; color: var(--trip-primary); margin-bottom: 0.75rem; }
.trip-empty-state h3 { font-size: 1.1rem; margin-bottom: 0.35rem; color: var(--text); }
.trip-empty-state p { font-size: 0.875rem; font-family: 'Sarabun', sans-serif; }
.trip-empty-hint {
    font-size: 0.85rem; color: var(--text-muted); font-family: 'Sarabun', sans-serif;
    text-align: center; padding: 1rem; background: var(--bg-alt);
    border-radius: var(--radius-lg); margin-bottom: 0.75rem;
}

.modal-sheet-tall { max-height: 94vh; }

.trip-detail-hero {
    background: var(--card);
    border: 1px solid rgba(13,148,136,0.2);
    border-radius: var(--radius-xl);
    padding: 1.25rem 1.15rem;
    margin-bottom: 1.25rem;
    box-shadow: var(--shadow-sm);
    position: relative;
    overflow: hidden;
}
.trip-detail-hero::before {
    content: '';
    position: absolute; top: 0; left: 0; right: 0; height: 4px;
    background: linear-gradient(90deg, var(--trip-car), var(--trip-primary), var(--trip-leisure));
}
.trip-detail-hero-top {
    display: flex; justify-content: space-between; align-items: center;
    margin-bottom: 0.75rem;
}
.trip-detail-hero-title {
    font-size: 1.35rem; font-weight: 700; color: var(--text);
    margin-bottom: 0.35rem; line-height: 1.3;
}
.trip-detail-hero-meta {
    font-size: 0.85rem; color: var(--text-secondary);
    font-family: 'Sarabun', sans-serif; line-height: 1.55;
}

.trip-detail-meta {
    font-size: 0.85rem; color: var(--text-secondary);
    font-family: 'Sarabun', sans-serif; line-height: 1.6; margin-bottom: 1rem;
}
.trip-detail-summary {
    background: var(--trip-bg); border: 1px solid rgba(13,148,136,0.15);
    border-radius: var(--radius-lg); padding: 1rem;
}
.trip-summary-grid {
    display: grid; grid-template-columns: 1fr 1fr; gap: 0.75rem; margin-bottom: 0.75rem;
}
.trip-summary-item {
    background: var(--card); border-radius: var(--radius-md);
    padding: 0.65rem 0.75rem; text-align: center;
}
.trip-summary-label {
    font-size: 0.75rem; font-family: 'Sarabun', sans-serif; display: block; margin-bottom: 0.15rem;
}
.trip-summary-item.car .trip-summary-label { color: var(--trip-car); }
.trip-summary-item.leisure .trip-summary-label { color: var(--trip-leisure); }
.trip-summary-value { font-size: 1.05rem; font-weight: 700; }
.trip-summary-grand {
    display: flex; justify-content: space-between; align-items: center;
    padding-top: 0.65rem; border-top: 1px solid rgba(13,148,136,0.12);
    font-family: 'Sarabun', sans-serif;
}
.trip-summary-grand strong { font-size: 1.35rem; color: var(--trip-primary); font-family: 'Noto Sans Thai', sans-serif; }
.trip-summary-perkm {
    text-align: center; font-size: 0.8rem; color: var(--text-muted);
    font-family: 'Sarabun', sans-serif; margin-top: 0.35rem;
}

.trip-import-banner {
    display: flex; justify-content: space-between; align-items: center; gap: 0.75rem;
    background: var(--trip-bg); border: 1px dashed rgba(13,148,136,0.35);
    border-radius: var(--radius-lg); padding: 0.85rem 1rem; margin-bottom: 1rem;
}

.trip-expense-section { margin-bottom: 1.25rem; }
.trip-expense-section-header {
    font-size: 0.9rem; font-weight: 700; margin-bottom: 0.5rem;
    display: flex; align-items: center; gap: 0.4rem;
    padding-bottom: 0.35rem; border-bottom: 2px solid var(--border-light);
}
.trip-expense-section-header.car { color: var(--trip-car); border-color: rgba(37,99,235,0.2); }
.trip-expense-section-header.leisure { color: var(--trip-leisure); border-color: rgba(124,58,237,0.2); }

.trip-expense-item {
    display: flex; align-items: center; gap: 0.75rem;
    padding: 0.75rem 0; border-bottom: 1px solid var(--border-light);
}
.trip-expense-item:last-child { border-bottom: none; }
.trip-expense-icon {
    width: 38px; height: 38px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-size: 0.95rem; flex-shrink: 0;
}
.trip-expense-icon.car { background: #eff6ff; color: var(--trip-car); }
.trip-expense-icon.leisure { background: #f5f3ff; color: var(--trip-leisure); }
.trip-expense-info { flex: 1; min-width: 0; }
.trip-expense-cat { font-size: 0.9rem; font-weight: 600; }
.trip-expense-note {
    font-size: 0.8rem; color: var(--text-muted); font-family: 'Sarabun', sans-serif;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.trip-expense-right { text-align: right; flex-shrink: 0; }
.trip-expense-amount { font-size: 1rem; font-weight: 700; color: var(--text); }
.trip-expense-date { font-size: 0.75rem; color: var(--text-muted); font-family: 'Sarabun', sans-serif; }
.trip-expense-empty {
    font-size: 0.85rem; color: var(--text-muted); font-family: 'Sarabun', sans-serif;
    padding: 0.75rem 0; font-style: italic;
}
.trip-linked-badge {
    font-size: 0.75rem; color: var(--trip-primary); margin-left: 0.15rem;
}

.expense-group-toggle {
    display: grid; grid-template-columns: 1fr 1fr; gap: 0.6rem;
}
.expense-group-btn {
    min-height: 48px; padding: 0.75rem;
    border: 2px solid var(--border); border-radius: var(--radius-lg);
    background: var(--card); font-family: 'Noto Sans Thai', sans-serif;
    font-weight: 600; font-size: 0.9rem; cursor: pointer;
    display: flex; align-items: center; justify-content: center; gap: 0.4rem;
    transition: all var(--transition); color: var(--text-secondary);
}
.expense-group-btn.active[data-group="car"] {
    border-color: var(--trip-car); background: #eff6ff; color: var(--trip-car);
}
.expense-group-btn.active[data-group="leisure"] {
    border-color: var(--trip-leisure); background: #f5f3ff; color: var(--trip-leisure);
}

.trip-expense-chips {
    display: flex; flex-wrap: wrap; gap: 0.45rem;
}
.trip-expense-chip {
    padding: 0.5rem 0.75rem; min-height: 40px;
    border: 1.5px solid var(--border); border-radius: var(--radius-full);
    background: var(--card); font-size: 0.8rem; font-family: 'Sarabun', sans-serif;
    cursor: pointer; transition: all var(--transition);
    display: inline-flex; align-items: center; gap: 0.3rem; color: var(--text-secondary);
}
.trip-expense-chip:hover { border-color: var(--trip-primary); color: var(--trip-primary); }
.trip-expense-chip.active {
    border-color: var(--trip-primary); background: var(--trip-bg);
    color: var(--trip-primary-dark); font-weight: 600;
}

@media (prefers-reduced-motion: reduce) {
    .trip-bar-fill { transition: none; }
    .trip-receipt-card:hover { transform: none; }
}

/* === Member Price Benchmarks === */
.benchmark-section-card {
    background: linear-gradient(135deg, #f0f9ff 0%, #f8fafc 100%);
    border: 1px solid rgba(37,99,235,0.15);
    border-radius: var(--radius-xl);
    padding: 1.15rem 1.1rem;
    margin-bottom: 1.25rem;
}
.benchmark-section-header {
    display: flex; justify-content: space-between; align-items: flex-start;
    margin-bottom: 0.85rem; gap: 0.5rem;
}
.benchmark-section-title {
    font-size: 1rem; font-weight: 700; color: var(--primary-dark);
    display: flex; align-items: center; gap: 0.4rem;
}
.benchmark-section-sub {
    font-size: 0.8rem; color: var(--text-secondary);
    font-family: 'Sarabun', sans-serif; margin-top: 0.2rem;
}
.benchmark-contrib-badge {
    font-size: 0.75rem; font-weight: 600; font-family: 'Sarabun', sans-serif;
    background: var(--success-light); color: var(--success-dark);
    padding: 0.2rem 0.5rem; border-radius: var(--radius-full);
    white-space: nowrap; display: inline-flex; align-items: center; gap: 0.25rem;
}
.benchmark-list-item {
    display: flex; justify-content: space-between; align-items: center;
    padding: 0.65rem 0; border-bottom: 1px solid rgba(37,99,235,0.08);
    gap: 0.75rem;
}
.benchmark-list-item:last-child { border-bottom: none; }
.benchmark-list-left {
    display: flex; align-items: center; gap: 0.5rem;
    font-size: 0.875rem; font-weight: 600; color: var(--text);
    min-width: 0;
}
.benchmark-list-left i { color: var(--primary); width: 18px; text-align: center; flex-shrink: 0; }
.benchmark-list-right { text-align: right; flex-shrink: 0; }
.benchmark-list-median { font-size: 1rem; font-weight: 700; color: var(--primary-dark); }
.benchmark-list-range {
    font-size: 0.75rem; color: var(--text-muted); font-family: 'Sarabun', sans-serif;
}
.benchmark-list-n {
    font-size: 0.75rem; color: var(--text-muted); font-family: 'Sarabun', sans-serif;
}
.benchmark-empty {
    font-size: 0.85rem; color: var(--text-secondary); font-family: 'Sarabun', sans-serif;
    text-align: center; padding: 0.75rem 0;
}
.benchmark-panel {
    background: linear-gradient(135deg, #eff6ff, #f8fafc);
    border: 1px solid rgba(59,130,246,0.2);
    border-radius: var(--radius-lg);
    padding: 0.85rem 1rem;
    margin-bottom: 1rem;
}
.benchmark-panel.benchmark-neutral { background: var(--bg-alt); border-color: var(--border); }
.benchmark-panel-title {
    font-size: 0.8rem; font-weight: 700; color: var(--primary-dark);
    margin-bottom: 0.5rem; display: flex; align-items: center; gap: 0.35rem;
}
.benchmark-panel-body { font-family: 'Sarabun', sans-serif; font-size: 0.85rem; color: var(--text-secondary); }
.benchmark-job {
    font-size: 0.9rem; font-weight: 700; color: var(--text);
    font-family: 'Noto Sans Thai', sans-serif; margin-bottom: 0.35rem;
}
.benchmark-job i { color: var(--primary); margin-right: 0.25rem; }
.benchmark-median {
    font-size: 1.35rem; font-weight: 800; color: var(--primary-dark);
    font-family: 'Noto Sans Thai', sans-serif; line-height: 1.2;
}
.benchmark-median-label {
    font-size: 0.75rem; font-weight: 500; color: var(--text-muted);
}
.benchmark-range { font-size: 0.85rem; color: var(--text-secondary); margin: 0.15rem 0 0.35rem; }
.benchmark-meta { font-size: 0.75rem; color: var(--text-muted); margin-bottom: 0.5rem; }
.benchmark-compare {
    font-size: 0.85rem; font-weight: 600; padding: 0.5rem 0.65rem;
    border-radius: var(--radius-md); margin: 0.5rem 0;
    display: flex; align-items: center; gap: 0.35rem;
}
.benchmark-compare.benchmark-ok { background: var(--success-light); color: var(--success-dark); }
.benchmark-compare.benchmark-good { background: #ecfdf5; color: #047857; }
.benchmark-compare.benchmark-warn { background: var(--warning-light); color: var(--warning-dark); }
.benchmark-disclaimer {
    font-size: 0.75rem; color: var(--text-muted); margin-top: 0.5rem;
    padding-top: 0.5rem; border-top: 1px dashed var(--border);
    line-height: 1.45;
}
.benchmark-insufficient { color: var(--warning-dark); font-size: 0.8rem; }
.benchmark-note { font-size: 0.75rem; color: var(--text-muted); font-style: italic; }
.benchmark-cta {
    font-size: 0.75rem; color: var(--primary); font-weight: 600; margin-top: 0.35rem;
}

/* Price cards — mobile-friendly layout */
.benchmark-price-section {
    margin-top: 0.5rem;
}
.benchmark-price-section-title {
    font-size: 0.82rem;
    font-weight: 700;
    color: var(--primary-dark);
    margin-bottom: 0.65rem;
    display: flex;
    align-items: center;
    gap: 0.35rem;
    font-family: 'Noto Sans Thai', sans-serif;
}
.benchmark-price-cards {
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
}
.benchmark-price-card {
    background: #fff;
    border: 1px solid rgba(59, 130, 246, 0.18);
    border-radius: var(--radius-lg);
    padding: 0.85rem 1rem;
    box-shadow: 0 1px 4px rgba(15, 23, 42, 0.05);
}
.benchmark-price-card--total {
    background: linear-gradient(135deg, #eff6ff, #f8fafc);
    border-color: rgba(59, 130, 246, 0.28);
}
.benchmark-price-card--low,
.benchmark-price-card--normal { border-left: 3px solid var(--success); }
.benchmark-price-card--high { border-left: 3px solid var(--warning); }
.benchmark-price-card-head {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    margin-bottom: 0.65rem;
    padding-bottom: 0.55rem;
    border-bottom: 1px solid rgba(37, 99, 235, 0.1);
}
.benchmark-price-card-icon {
    width: 2rem;
    height: 2rem;
    border-radius: var(--radius-md);
    background: var(--primary-light);
    color: var(--primary);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: 0.9rem;
}
.benchmark-price-card-title {
    font-size: 0.92rem;
    font-weight: 700;
    color: var(--text);
    line-height: 1.35;
    font-family: 'Noto Sans Thai', sans-serif;
}
.benchmark-price-card-body {
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
}
.benchmark-price-row {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 0.75rem;
}
.benchmark-price-row-label {
    font-size: 0.8rem;
    color: var(--text-muted);
    font-family: 'Sarabun', sans-serif;
    flex-shrink: 0;
}
.benchmark-price-row-value {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--text);
    text-align: right;
    font-family: 'Noto Sans Thai', sans-serif;
}
.benchmark-price-row-value--emphasis {
    font-size: 1.1rem;
    color: var(--primary-dark);
}
.benchmark-price-row-value--muted {
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--text-secondary);
}
.benchmark-price-card-footer {
    margin-top: 0.55rem;
}
.benchmark-price-card-footer .benchmark-compare {
    margin: 0;
    font-size: 0.78rem;
}
.benchmark-price-cards--reference .benchmark-price-card {
    padding: 0.75rem 0.9rem;
}
.ocr-category-price-summary .benchmark-price-section {
    margin-top: 0.35rem;
}
.ocr-category-price-summary .benchmark-disclaimer {
    margin-top: 0.5rem;
    padding-top: 0;
    border-top: none;
    font-size: 0.72rem;
}

.timeline-benchmark-badge {
    display: flex; align-items: flex-start; gap: 0.4rem;
    font-size: 0.8rem; font-family: 'Sarabun', sans-serif; font-weight: 600;
    padding: 0.5rem 0.65rem; border-radius: var(--radius-md);
    margin-top: 0.65rem; line-height: 1.4;
}
.timeline-benchmark-badge.benchmark-ok { background: var(--success-light); color: var(--success-dark); }
.timeline-benchmark-badge.benchmark-good { background: #ecfdf5; color: #047857; }
.timeline-benchmark-badge.benchmark-warn { background: var(--warning-light); color: var(--warning-dark); }
.timeline-benchmark-badge.benchmark-neutral { background: var(--bg-alt); color: var(--text-secondary); }
.timeline-benchmark-ref {
    display: block; font-size: 0.75rem; font-weight: 400; color: inherit; opacity: 0.85; margin-top: 0.1rem;
}

/* === Member Gamification === */
.gamification-hero {
    background: linear-gradient(135deg, #4c1d95 0%, #6d28d9 50%, #7c3aed 100%);
    border-radius: var(--radius-xl);
    padding: 1.15rem 1.1rem;
    color: #fff;
    margin-bottom: 1.25rem;
    box-shadow: 0 8px 24px rgba(109,40,217,0.35);
}
.gamification-hero-left { display: flex; gap: 0.85rem; align-items: center; margin-bottom: 0.85rem; }
.gamification-level-ring {
    width: 52px; height: 52px; border-radius: 50%;
    background: rgba(255,255,255,0.15); border: 2px solid rgba(255,255,255,0.4);
    display: flex; align-items: center; justify-content: center;
    font-weight: 800; font-size: 0.95rem; flex-shrink: 0;
}
.gamification-level-name { font-size: 1.1rem; font-weight: 700; }
.gamification-xp { font-size: 0.8rem; opacity: 0.85; font-family: 'Sarabun', sans-serif; margin: 0.1rem 0 0.4rem; }
.gamification-level-bar {
    height: 6px; background: rgba(255,255,255,0.2); border-radius: var(--radius-full); overflow: hidden;
}
.gamification-level-fill { height: 100%; background: #fde68a; border-radius: var(--radius-full); transition: width 0.4s ease; }
.gamification-hero-right { display: flex; gap: 0.5rem; flex-wrap: wrap; }
.gamification-stat-pill {
    font-size: 0.75rem; font-family: 'Sarabun', sans-serif; font-weight: 600;
    background: rgba(255,255,255,0.15); padding: 0.3rem 0.6rem; border-radius: var(--radius-full);
    display: inline-flex; align-items: center; gap: 0.3rem;
}
.gamification-stat-pill.streak { background: rgba(239,68,68,0.35); }

.mission-group-label {
    font-size: 0.85rem; font-weight: 700; color: var(--text-secondary);
    margin-bottom: 0.65rem; display: flex; align-items: center; gap: 0.35rem;
}
.mission-card {
    display: flex; gap: 0.85rem;
    background: var(--card); border: 1px solid var(--border-light);
    border-radius: var(--radius-xl); padding: 1rem;
    margin-bottom: 0.75rem; box-shadow: var(--shadow-xs);
    transition: border-color var(--transition);
}
.mission-card.mission-done { border-color: rgba(34,197,94,0.35); background: linear-gradient(135deg,#f0fdf4,#fff); }
.mission-card.mission-active { border-color: rgba(124,58,237,0.25); }
.mission-card-icon {
    width: 44px; height: 44px; border-radius: var(--radius-lg);
    background: linear-gradient(135deg,#ede9fe,#ddd6fe);
    color: #6d28d9; display: flex; align-items: center; justify-content: center;
    font-size: 1.1rem; flex-shrink: 0;
}
.mission-card.mission-done .mission-card-icon { background: var(--success-light); color: var(--success-dark); }
.mission-card-body { flex: 1; min-width: 0; }
.mission-card-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 0.5rem; margin-bottom: 0.25rem; }
.mission-card-title { font-size: 0.95rem; font-weight: 700; }
.mission-status { font-size: 0.75rem; font-weight: 700; font-family: 'Sarabun', sans-serif; white-space: nowrap; }
.mission-status.done { color: var(--success-dark); }
.mission-status.active { color: #7c3aed; }
.mission-card-desc {
    font-size: var(--font-body); color: var(--text-secondary); font-family: 'Sarabun', sans-serif;
    line-height: var(--lh-body); margin-bottom: 0.5rem;
}
.mission-progress-track {
    height: 6px; background: var(--bg-alt); border-radius: var(--radius-full);
    overflow: hidden; margin-bottom: 0.5rem;
}
.mission-progress-fill {
    height: 100%; background: linear-gradient(90deg,#7c3aed,#a78bfa);
    border-radius: var(--radius-full); transition: width 0.35s ease;
}
.mission-card.mission-done .mission-progress-fill { background: var(--success); }
.mission-card-footer {
    display: flex; flex-wrap: wrap; gap: 0.5rem; align-items: center;
    font-size: 0.75rem; font-family: 'Sarabun', sans-serif; color: var(--text-muted);
    margin-bottom: 0.5rem;
}
.mission-xp { color: #7c3aed; font-weight: 700; }
.mission-cta { margin-top: 0.25rem; min-height: 40px; width: 100%; }

.badges-grid {
    display: grid; grid-template-columns: repeat(3, 1fr); gap: 0.65rem;
    margin-bottom: 1.5rem;
}
.member-badge {
    position: relative; text-align: center; padding: 0.75rem 0.35rem;
    background: var(--card); border-radius: var(--radius-lg);
    border: 1px solid var(--border-light);
}
.member-badge.badge-locked { opacity: 0.45; filter: grayscale(0.6); }
.member-badge-icon {
    width: 40px; height: 40px; border-radius: 50%; margin: 0 auto 0.35rem;
    background: var(--bg-alt); color: var(--text-muted);
    display: flex; align-items: center; justify-content: center; font-size: 1rem;
}
.member-badge-name { font-size: 0.75rem; font-weight: 600; font-family: 'Sarabun', sans-serif; line-height: 1.25; }
.member-badge-lock {
    position: absolute; top: 0.35rem; right: 0.35rem;
    font-size: 0.75rem; color: var(--text-muted);
}

.gamification-mini-link {
    display: inline-flex; align-items: center; gap: 0.35rem;
    text-decoration: none; font-family: 'Sarabun', sans-serif; font-size: 0.75rem; font-weight: 700;
    background: linear-gradient(135deg,#ede9fe,#f5f3ff); color: #6d28d9;
    padding: 0.25rem 0.55rem; border-radius: var(--radius-full);
    border: 1px solid rgba(124,58,237,0.2);
}
.gamification-mini-lv { background: #7c3aed; color: #fff; padding: 0.1rem 0.35rem; border-radius: var(--radius-full); font-size: 0.75rem; }

.header-gamification-pill {
    position: relative;
    display: inline-flex; align-items: center; gap: 0.2rem;
    text-decoration: none; font-family: 'Sarabun', sans-serif;
    font-size: 0.75rem; font-weight: 700; color: #6d28d9;
    background: linear-gradient(135deg,#ede9fe,#f5f3ff);
    padding: 0.25rem 0.4rem; border-radius: var(--radius-full);
    border: 1px solid rgba(124,58,237,0.2);
    min-height: 30px;
}
.header-gamification-pill i { font-size: 0.75rem; }
.header-gamification-dot { top: -3px; right: -3px; min-width: 14px; height: 14px; font-size: 0.75rem; }
.header-gamification-dot {
    position: absolute; top: -4px; right: -4px;
    min-width: 16px; height: 16px; padding: 0 4px;
    background: #ef4444; color: #fff; border-radius: var(--radius-full);
    font-size: 0.75rem; font-weight: 800;
    display: flex; align-items: center; justify-content: center;
    border: 2px solid var(--card);
}

/* === Showcase Social === */
:root {
    --showcase-bg: #f8fafc;
    --showcase-accent: #7c3aed;
    --prestige-bronze: #cd7f32;
    --prestige-silver: #64748b;
    --prestige-gold: #ca8a04;
    --prestige-platinum: #7c3aed;
    --plate-bg: #1e3a8a;
    --plate-text: #ffffff;
}

.onboarding-page { background: linear-gradient(180deg, #f8fafc 0%, #ede9fe 100%); min-height: 100vh; }
.onboarding-wrap { max-width: 420px; margin: 0 auto; padding: 2.5rem 1.25rem; }
.onboarding-logo { text-align: center; margin-bottom: 1.25rem; }
.onboarding-title { font-size: 1.35rem; font-weight: 700; text-align: center; margin-bottom: 0.35rem; }
.onboarding-sub { font-family: 'Sarabun', sans-serif; font-size: 0.9rem; color: var(--text-secondary); text-align: center; margin-bottom: 1.5rem; }
.onboarding-choice {
    display: flex; align-items: center; gap: 0.85rem; width: 100%;
    background: var(--card); border: 2px solid var(--border-light); border-radius: var(--radius-xl);
    padding: 1rem 1.1rem; margin-bottom: 0.75rem; cursor: pointer; text-align: left;
    min-height: 72px; transition: border-color var(--transition), box-shadow var(--transition);
}
.onboarding-choice:hover, .onboarding-choice:focus { border-color: var(--primary); box-shadow: var(--shadow-md); }
.onboarding-choice-icon {
    width: 48px; height: 48px; border-radius: var(--radius-lg);
    display: flex; align-items: center; justify-content: center; font-size: 1.25rem; flex-shrink: 0;
}
.onboarding-choice-icon.showcase { background: linear-gradient(135deg,#ede9fe,#ddd6fe); color: #6d28d9; }
.onboarding-choice-icon.garage { background: var(--primary-light); color: var(--primary); }
.onboarding-choice-text { flex: 1; display: flex; flex-direction: column; gap: 0.15rem; }
.onboarding-choice-text strong { font-size: 1rem; }
.onboarding-choice-text span { font-family: 'Sarabun', sans-serif; font-size: var(--font-body); color: var(--text-secondary); }
.onboarding-choice-arrow { color: var(--text-muted); font-size: 0.8rem; }
.onboarding-note { font-family: 'Sarabun', sans-serif; font-size: 0.75rem; color: var(--text-muted); text-align: center; margin-top: 1rem; }

/* === Garage page zones & hierarchy === */
.garage-zone { margin-bottom: 1.25rem; }
.garage-zone-hero { margin-bottom: 0.75rem; }
.garage-member-hero {
    background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary) 100%);
    color: #fff; border-radius: var(--radius-xl);
    padding: 0.85rem 1rem; margin-bottom: 0.65rem;
    box-shadow: 0 4px 14px rgba(26,86,219,0.25);
}
.garage-member-hero--compact {
    padding: 0.45rem 0.65rem;
    margin-bottom: 0.45rem;
    border-radius: var(--radius-lg);
    box-shadow: 0 2px 8px rgba(26, 86, 219, 0.18);
}
.garage-member-hero--compact .garage-hero-inner { gap: 0.35rem; }
.garage-member-hero--compact .garage-hero-greet { gap: 0.45rem; min-width: 0; }
.garage-member-hero--compact .garage-hero-text { min-width: 0; }
.garage-member-hero--compact .garage-hero-avatar {
    width: 30px; height: 30px; font-size: 0.95rem;
}
.garage-member-hero--compact .garage-hero-title {
    font-size: 0.82rem; font-weight: 700;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.garage-member-hero--compact .garage-hero-sub {
    font-size: 0.68rem; opacity: 0.88; margin-top: 0;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
    line-height: 1.25;
}
.garage-member-hero--compact .garage-hero-profile-link {
    width: 28px; height: 28px; font-size: 0.85rem;
}
.garage-member-hero--compact .garage-hero-hint { display: none; }
.garage-hero-inner { display: flex; align-items: center; justify-content: space-between; gap: 0.5rem; }
.garage-hero-greet { display: flex; align-items: center; gap: 0.6rem; min-width: 0; }
.garage-hero-avatar {
    width: 42px; height: 42px; border-radius: 50%;
    background: rgba(255,255,255,0.2); display: flex; align-items: center; justify-content: center;
    font-size: 1.35rem; flex-shrink: 0;
}
.garage-hero-title { font-size: 1.05rem; font-weight: 800; line-height: var(--lh-headline); }
.garage-hero-sub { font-family: 'Sarabun', sans-serif; font-size: var(--font-body); opacity: 0.9; margin-top: 0.1rem; line-height: var(--lh-body); }
.garage-hero-profile-link {
    width: 36px; height: 36px; border-radius: 50%; background: rgba(255,255,255,0.15);
    display: flex; align-items: center; justify-content: center; color: #fff; text-decoration: none; flex-shrink: 0;
}
.garage-hero-hint {
    font-family: 'Sarabun', sans-serif; font-size: 0.75rem; opacity: 0.85;
    margin-top: 0.45rem; text-align: center;
}
.garage-hero-carousel { margin-bottom: 0; }
.garage-hero-carousel .vehicle-card-cc {
    margin-bottom: 0;
    box-shadow:
        0 2px 4px rgba(15, 23, 42, 0.06),
        0 10px 24px -6px rgba(15, 23, 42, 0.16),
        0 0 0 1px rgba(15, 23, 42, 0.04);
}
.garage-hero-carousel .vehicle-card-cc:hover {
    box-shadow:
        0 4px 8px rgba(15, 23, 42, 0.08),
        0 18px 36px -10px rgba(15, 23, 42, 0.22),
        0 0 0 1px rgba(15, 23, 42, 0.06);
}

/* Garage card — debit-style full-bleed vehicle photo */
.vehicle-card-cc--has-photo {
    background: #0f172a !important;
    background-blend-mode: normal !important;
    border-color: rgba(255, 255, 255, 0.14) !important;
}
.vehicle-card-cc--has-photo.cc-warning-state,
.vehicle-card-cc--has-photo.cc-danger-state {
    background: #0f172a !important;
    background-image: none !important;
    background-blend-mode: normal !important;
    border-color: rgba(255, 255, 255, 0.14) !important;
}
.cc-vehicle-photo-bg {
    position: absolute;
    inset: 0;
    z-index: 0;
    background-color: #1e293b;
    background-size: cover;
    background-position: center 42%;
    background-repeat: no-repeat;
    transform: scale(1.04);
    transition: transform 0.55s ease;
}
.vehicle-card-cc--photo-ready .cc-vehicle-photo-bg {
    transform: scale(1);
}
.vehicle-card-cc--has-photo:hover .cc-vehicle-photo-bg {
    transform: scale(1.07);
}
.cc-vehicle-photo-scrim {
    position: absolute;
    inset: 0;
    z-index: 1;
    pointer-events: none;
    background: linear-gradient(
        125deg,
        rgba(15, 23, 42, 0.82) 0%,
        rgba(15, 23, 42, 0.48) 38%,
        rgba(15, 23, 42, 0.22) 62%,
        rgba(15, 23, 42, 0.55) 100%
    );
}
.vehicle-card-cc--has-photo.cc-warning-state .cc-vehicle-photo-scrim {
    background: linear-gradient(
        125deg,
        rgba(120, 53, 4, 0.84) 0%,
        rgba(15, 23, 42, 0.5) 40%,
        rgba(15, 23, 42, 0.2) 62%,
        rgba(69, 26, 3, 0.58) 100%
    );
}
.vehicle-card-cc--has-photo.cc-danger-state .cc-vehicle-photo-scrim {
    background: linear-gradient(
        125deg,
        rgba(127, 29, 29, 0.86) 0%,
        rgba(15, 23, 42, 0.52) 40%,
        rgba(15, 23, 42, 0.22) 62%,
        rgba(69, 10, 10, 0.6) 100%
    );
}
.vehicle-card-cc--has-photo::before {
    content: '';
    position: absolute;
    inset: 0;
    z-index: 2;
    border-radius: inherit;
    pointer-events: none;
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.28),
        inset 0 -1px 0 rgba(0, 0, 0, 0.18);
}
.vehicle-card-cc--has-photo::after {
    z-index: 3;
}
.vehicle-card-cc--has-photo .cc-header,
.vehicle-card-cc--has-photo .cc-chip-wrap,
.vehicle-card-cc--has-photo .cc-number,
.vehicle-card-cc--has-photo .cc-footer {
    position: relative;
    z-index: 4;
}
.vehicle-card-cc--has-photo .cc-brand-name,
.vehicle-card-cc--has-photo .cc-label,
.vehicle-card-cc--has-photo .cc-owner-name,
.vehicle-card-cc--has-photo .cc-signal {
    color: rgba(255, 255, 255, 0.88);
}
.vehicle-card-cc--has-photo .cc-mileage-val {
    color: #7dd3fc;
}
.vehicle-card-cc--has-photo.cc-warning-state .cc-mileage-val {
    color: #fcd34d;
}
.vehicle-card-cc--has-photo.cc-danger-state .cc-mileage-val {
    color: #fca5a5;
}
.vehicle-card-cc--has-photo .cc-brand-logo {
    filter: brightness(0) invert(1) drop-shadow(0 1px 2px rgba(0, 0, 0, 0.35));
}
.vehicle-card-cc--has-photo .cc-number {
    color: #fff;
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.22);
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.45);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.12), 0 2px 8px rgba(0, 0, 0, 0.2);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}
.vehicle-card-cc--has-photo .badge {
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
}
.garage-zone-priority .alert-card { margin-bottom: 0.5rem; }
.garage-priority-header .section-title { font-size: 0.95rem; font-weight: 800; color: var(--danger); }
.garage-schedule-header { margin-top: 0.75rem; }
.garage-schedule-header .section-title { font-size: 0.82rem; }
.garage-schedule-compact { padding: 0.55rem 0.65rem; margin-bottom: 0; }
.garage-zone-actions { margin-bottom: 0.75rem; }
.garage-actions-header { margin-bottom: 0.5rem; }
.garage-actions-header .section-title { font-size: 0.88rem; font-weight: 700; }

.garage-quick-actions {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.4rem;
}

.garage-quick-action {
    background: var(--card);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-md);
    padding: 0.5rem 0.25rem 0.45rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.3rem;
    min-height: 4.25rem;
    text-decoration: none;
    color: var(--text);
    transition: background 0.15s ease, transform 0.1s ease;
    -webkit-tap-highlight-color: transparent;
}
.garage-quick-action:active {
    transform: scale(0.96);
    background: var(--bg);
}
.garage-quick-action .qa-icon {
    width: 2rem;
    height: 2rem;
    border-radius: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.85rem;
    flex-shrink: 0;
}
.garage-quick-action .qa-label {
    font-size: 0.65rem;
    font-weight: 600;
    line-height: 1.15;
    text-align: center;
    color: var(--text-secondary);
}

.garage-quick-action--wide {
    grid-column: 1 / -1;
    flex-direction: row;
    justify-content: center;
    gap: 0.45rem;
    min-height: 2.5rem;
    padding: 0.4rem 0.65rem;
}
.garage-quick-action--wide .qa-label {
    font-size: 0.75rem;
    color: var(--text);
}

.garage-quick-action--fuel { background: #fffbeb; border-color: #fde68a; }
.garage-quick-action--fuel .qa-label { color: #b45309; }
.garage-quick-action--trip { background: #f0fdfa; border-color: rgba(13, 148, 136, 0.18); }
.garage-quick-action--trip .qa-label { color: var(--trip-primary-dark, #0f766e); }

.qa-icon--primary { background: var(--primary-light); color: var(--primary); }
.qa-icon--accent { background: var(--accent-light); color: var(--accent); }
.qa-icon--mission { background: #ede9fe; color: #6d28d9; }
.qa-icon--info { background: var(--info-light); color: var(--info); }
.qa-icon--success { background: var(--success-light); color: var(--success-dark); }
.qa-icon--fuel { background: var(--warning-light); color: #d97706; }
.qa-icon--trip { background: var(--trip-bg, #ccfbf1); color: var(--trip-primary, #0d9488); }

@media (min-width: 480px) {
    .garage-quick-actions { gap: 0.5rem; }
    .garage-quick-action { min-height: 4.5rem; padding: 0.55rem 0.35rem; }
    .garage-quick-action .qa-icon { width: 2.15rem; height: 2.15rem; font-size: 0.9rem; }
    .garage-quick-action .qa-label { font-size: 0.7rem; }
}
.garage-zone-activity .section-title { font-size: 0.82rem; color: var(--text-secondary); }
.garage-zone-activity .card { padding: 0.85rem 1rem; margin-bottom: 0.5rem; }
.garage-zone-activity .card-title { font-size: 0.85rem; }
.garage-zone-secondary {
    padding-top: 0.5rem; border-top: 1px dashed var(--border);
    margin-bottom: 0.5rem;
}
.garage-missions-compact .card {
    padding: 0.65rem 0.75rem !important; margin-bottom: 0.65rem !important;
    border-left-width: 3px !important;
}
.garage-missions-compact .card > div:first-child { margin-bottom: 0.5rem !important; }
.garage-missions-compact [style*="font-size:0.95rem"] { font-size: 0.82rem !important; }
.garage-missions-compact .btn { min-height: 38px !important; font-size: 0.75rem !important; }
.garage-secondary-promos {
    display: grid; grid-template-columns: 1fr 1fr; gap: 0.4rem; margin-bottom: 0.5rem;
}
.garage-secondary-link {
    display: flex; align-items: center; gap: 0.35rem;
    padding: 0.5rem 0.6rem; border-radius: var(--radius-md);
    background: var(--bg); border: 1px solid var(--border-light);
    text-decoration: none; color: var(--text-secondary);
    font-family: 'Sarabun', sans-serif; font-size: 0.75rem; font-weight: 600;
}
.garage-secondary-link i:first-child { color: var(--primary); font-size: 0.75rem; }
.garage-secondary-link i:last-child { margin-left: auto; font-size: 0.75rem; opacity: 0.5; }
.garage-secondary-link--sale i:first-child { color: #dc2626; }
.garage-resale-hint {
    grid-column: 1 / -1; font-family: 'Sarabun', sans-serif;
    font-size: 0.75rem; color: var(--text-muted); padding: 0 0.15rem;
}
.garage-showcase-link {
    display: flex; align-items: center; gap: 0.4rem;
    padding: 0.5rem 0.65rem; border-radius: var(--radius-md);
    background: linear-gradient(135deg,#f5f3ff,#faf5ff);
    border: 1px solid rgba(109,40,217,0.15);
    text-decoration: none; color: #6d28d9;
    font-family: 'Sarabun', sans-serif; font-size: 0.75rem; font-weight: 600;
    margin-bottom: 0.5rem;
}
.garage-showcase-link i:last-child { margin-left: auto; font-size: 0.75rem; opacity: 0.6; }

/* === Maintenance page zones & hierarchy === */
.maint-zone { margin-bottom: 1.25rem; }
.maint-zone-hero { margin-bottom: 1rem; }
.maint-member-hero {
    background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary) 100%);
    color: #fff; border-radius: var(--radius-xl);
    padding: 0.85rem 1rem; margin-bottom: 0.65rem;
    box-shadow: 0 4px 14px rgba(26,86,219,0.25);
}
.maint-hero-card {
    background: var(--card); border: 1px solid var(--border-light);
    border-radius: var(--radius-xl); padding: 1rem;
    box-shadow: var(--shadow-sm);
}
.maint-hero-card .maint-vehicle-field { margin-bottom: 0.85rem; }
.maint-hero-card .form-label {
    font-size: var(--font-label); color: var(--text-secondary); font-weight: 700;
}
.maint-hero-stats {
    display: grid; grid-template-columns: repeat(2, 1fr); gap: 0.5rem;
    margin-bottom: 0.85rem;
}
.maint-stat {
    background: var(--bg); border-radius: var(--radius-lg);
    padding: 0.65rem 0.5rem; text-align: center;
    border: 1px solid var(--border-light);
}
.maint-stat-value { font-size: 1.15rem; font-weight: 800; line-height: 1.2; }
.maint-stat-value--cost { color: var(--accent); }
.maint-stat-value--count { color: var(--primary); }
.maint-stat-label {
    font-family: 'Sarabun', sans-serif; font-size: 0.75rem;
    color: var(--text-secondary); margin-top: 0.15rem;
}
.maint-hero-cta {
    box-shadow: 0 4px 12px rgba(37,99,235,0.3);
    font-weight: 800;
}
.maint-zone-priority .service-schedule-card { margin-bottom: 0; }
.maint-priority-header .section-title {
    font-size: 0.95rem; font-weight: 800; color: #c2410c;
}
.maint-zone-history .section-title { font-size: 0.92rem; font-weight: 800; }
.maint-zone-history .section-title-lg { font-size: 1rem; }
.maint-zone-schedule { margin-bottom: 1rem; }
.maint-schedule-collapsible {
    border: 1px solid var(--border-light);
    border-radius: var(--radius-lg);
    background: #fafafa;
    overflow: hidden;
}
.maint-schedule-summary {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 0.85rem;
    cursor: pointer;
    list-style: none;
    user-select: none;
}
.maint-schedule-summary::-webkit-details-marker { display: none; }
.maint-schedule-summary .section-title {
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--text-secondary);
    flex: 1;
}
.maint-schedule-summary-hint {
    font-size: 0.72rem;
    color: var(--text-muted);
}
.maint-schedule-directory-link {
    font-size: 0.75rem;
    flex-shrink: 0;
}
.maint-schedule-panel-wrap {
    margin: 0;
    border: none;
    border-top: 1px solid var(--border-light);
    border-radius: 0;
    box-shadow: none;
}
.maint-zone-benchmark { margin-bottom: 1rem; }
.maint-benchmark-compact {
    padding: 0.75rem 0.85rem !important;
    margin-bottom: 0 !important;
}
.maint-benchmark-compact .benchmark-section-title { font-size: 0.82rem; }
.maint-benchmark-compact .benchmark-section-sub { font-size: 0.75rem; }
.maint-benchmark-compact .benchmark-list-item { padding: 0.45rem 0; }
.maint-benchmark-compact .benchmark-list-median { font-size: 0.9rem; }
.maint-zone-actions .section-title {
    font-size: 0.82rem; color: var(--text-secondary); font-weight: 700;
}
.maint-quick-actions {
    display: grid; grid-template-columns: repeat(3, 1fr); gap: 0.5rem;
}
.maint-quick-btn {
    display: flex; flex-direction: column; align-items: center; gap: 0.35rem;
    padding: 0.65rem 0.35rem; border-radius: var(--radius-lg);
    background: var(--card); border: 1px solid var(--border-light);
    text-decoration: none; color: var(--text);
    font-family: 'Sarabun', sans-serif; font-size: 0.75rem; font-weight: 600;
    text-align: center; transition: all var(--transition);
}
.maint-quick-btn:hover { border-color: var(--primary); text-decoration: none; transform: translateY(-1px); }
.maint-quick-btn i { font-size: 1.05rem; }
.maint-quick-btn--scan {
    border-color: rgba(249,115,22,0.25);
    background: linear-gradient(135deg,#fff7ed,#fffbeb); color: #c2410c;
}
.maint-quick-btn--scan i { color: var(--accent); }
.maint-quick-btn--garage i { color: var(--info); }
.maint-quick-btn--upload i { color: var(--primary); }
.maint-zone-secondary {
    padding-top: 0.5rem; border-top: 1px dashed var(--border);
    margin-bottom: 0.5rem;
}
.maint-secondary-links {
    display: grid; grid-template-columns: 1fr 1fr; gap: 0.4rem; margin-bottom: 0.5rem;
}
.maint-gamification-hint { text-align: center; font-size: 0.75rem; }
.garage-settings-row {
    display: flex; align-items: center; justify-content: space-between;
    padding: 0.45rem 0.15rem; font-family: 'Sarabun', sans-serif; font-size: 0.75rem; color: var(--text-muted);
}
.garage-settings-label { font-weight: 600; }
.garage-settings-btn { min-height: 32px !important; font-size: 0.75rem !important; padding: 0.2rem 0.5rem !important; }

.garage-showcase-banner {
    display: flex; align-items: center; gap: 0.45rem;
    background: linear-gradient(135deg,#4c1d95,#6d28d9); color: #fff;
    padding: 0.55rem 0.75rem; border-radius: var(--radius-lg);
    text-decoration: none; margin-bottom: 0.75rem; font-size: 0.78rem; font-weight: 600;
    min-height: 40px; box-shadow: 0 3px 10px rgba(109,40,217,0.28);
}
.garage-showcase-banner span { flex: 1; font-family: 'Sarabun', sans-serif; font-size: 0.75rem; }
.garage-showcase-banner i { font-size: 0.85rem; }

.feed-tabs {
    display: flex; gap: 0.3rem; margin-bottom: 0.65rem;
    overflow-x: auto; -webkit-overflow-scrolling: touch;
    padding-bottom: 0.15rem; scrollbar-width: none;
}
.feed-tabs::-webkit-scrollbar { display: none; }
.feed-tab {
    flex: 0 0 auto; padding: 0.3rem 0.55rem; border: 1px solid var(--border);
    background: var(--card); border-radius: var(--radius-full);
    font-family: 'Sarabun', sans-serif; font-size: 0.75rem; font-weight: 600;
    color: var(--text-secondary); cursor: pointer; min-height: 32px;
    display: inline-flex; align-items: center; justify-content: center; gap: 0.2rem;
    white-space: nowrap;
}
.feed-tab i { font-size: 0.75rem; }
.feed-tab.active { background: var(--primary); color: #fff; border-color: var(--primary); }

.showcase-carousel-wrap { margin: 0 -0.15rem 0.65rem; overflow: hidden; }
.showcase-carousel-track { display: flex; gap: 0.6rem; overflow-x: auto; padding: 0.15rem 0.15rem 0.4rem; scroll-snap-type: x mandatory; -ms-overflow-style: none; scrollbar-width: none; }
.showcase-carousel-track::-webkit-scrollbar { display: none; }
.showcase-carousel-item { flex: 0 0 72%; max-width: 260px; min-width: 210px; scroll-snap-align: start; }

.showcase-spot-card {
    --showcase-spot-accent: var(--primary);
    display: flex;
    flex-direction: column;
    height: 100%;
    background: var(--card);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-xl);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    cursor: pointer;
    transition: border-color 0.2s, box-shadow 0.2s, transform 0.15s;
}
.showcase-spot-card[data-brand="toyota"] { --showcase-spot-accent: #eb0a1e; }
.showcase-spot-card[data-brand="byd"] { --showcase-spot-accent: #00a99d; }
.showcase-spot-card[data-brand="tesla"] { --showcase-spot-accent: #e82127; }
.showcase-spot-card[data-brand="honda"] { --showcase-spot-accent: #cc0000; }
.showcase-spot-card[data-brand="isuzu"] { --showcase-spot-accent: #c41230; }
.showcase-spot-card[data-brand="mazda"] { --showcase-spot-accent: #101010; }
.showcase-spot-card[data-brand="ford"] { --showcase-spot-accent: #003478; }
.showcase-spot-card[data-brand="mg"] { --showcase-spot-accent: #c41230; }
.showcase-spot-card[data-brand="nissan"] { --showcase-spot-accent: #c3002f; }
.showcase-spot-card[data-brand="mitsubishi"] { --showcase-spot-accent: #e60012; }
.showcase-spot-card[data-brand="bmw"] { --showcase-spot-accent: #0066b1; }
.showcase-spot-card[data-brand="mercedes"] { --showcase-spot-accent: #00adef; }
.showcase-spot-card:active { transform: scale(0.985); }
.showcase-spot-card:hover {
    border-color: color-mix(in srgb, var(--showcase-spot-accent) 30%, var(--border-light));
    box-shadow: 0 6px 18px rgba(15, 23, 42, 0.1);
}
.showcase-spot-card--forsale { border-color: color-mix(in srgb, #dc2626 22%, var(--border-light)); }
.showcase-spot-card--following { border-color: color-mix(in srgb, #f43f5e 18%, var(--border-light)); }
.showcase-spot-card--has-photo .showcase-spot-cover {
    background-color: #e2e8f0;
}

.showcase-spot-cover {
    position: relative;
    height: 118px;
    overflow: hidden;
    background-color: #e2e8f0;
    display: flex;
    align-items: center;
    justify-content: center;
}
.showcase-spot-cover-bg {
    position: absolute;
    inset: 0;
    background: linear-gradient(145deg, #f1f5f9 0%, #e2e8f0 55%, color-mix(in srgb, var(--showcase-spot-accent) 12%, #e2e8f0) 100%);
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    z-index: 0;
}
.showcase-spot-card--has-photo .showcase-spot-cover-bg {
    background-color: #cbd5e1;
}
.showcase-spot-cover-scrim {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(15, 23, 42, 0.08) 0%, transparent 35%, rgba(15, 23, 42, 0.55) 100%);
    pointer-events: none;
    z-index: 1;
}
.showcase-spot-cover-icon {
    position: relative;
    z-index: 2;
    font-size: 2.2rem;
    color: color-mix(in srgb, var(--showcase-spot-accent) 50%, #94a3b8);
    opacity: 0.75;
}
.showcase-spot-cover-top {
    position: absolute;
    top: 0.45rem;
    left: 0.45rem;
    right: 0.45rem;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.3rem;
    z-index: 2;
}
.showcase-spot-cover-top .prestige-ring {
    font-size: 0.65rem;
    padding: 0.08rem 0.32rem;
    backdrop-filter: blur(4px);
    background: rgba(255, 255, 255, 0.88);
    box-shadow: 0 1px 4px rgba(15, 23, 42, 0.12);
}
.showcase-spot-sale { transform: scale(0.88); transform-origin: top right; }
.showcase-spot-sale .for-sale-badge { font-size: 0.65rem; }
.showcase-spot-plate {
    position: absolute;
    left: 0.45rem;
    bottom: 0.4rem;
    z-index: 2;
    transform: scale(0.9);
    transform-origin: left bottom;
}
.showcase-spot-plate .plate-badge { box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25); }

.showcase-spot-body {
    display: flex;
    flex-direction: column;
    gap: 0.28rem;
    padding: 0.55rem 0.6rem 0.6rem;
    flex: 1;
}
.showcase-spot-title {
    margin: 0;
    font-size: 0.9rem;
    font-weight: 700;
    line-height: 1.25;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.showcase-spot-year {
    font-family: 'Sarabun', sans-serif;
    font-size: 0.72rem;
    font-weight: 600;
    color: var(--text-muted);
    margin-left: 0.25rem;
}
.showcase-spot-owner {
    display: flex;
    align-items: center;
    gap: 0.3rem;
    min-width: 0;
    font-family: 'Sarabun', sans-serif;
    font-size: 0.74rem;
    color: var(--text-secondary);
}
.showcase-spot-owner-avatar {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: var(--bg-alt);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: 0.62rem;
    color: var(--showcase-spot-accent);
}
.showcase-spot-owner-name {
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    flex: 1;
    min-width: 0;
}
.showcase-spot-owner-lv {
    font-size: 0.68rem;
    font-weight: 700;
    color: var(--showcase-accent);
    flex-shrink: 0;
}
.showcase-spot-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
    margin-top: 0.05rem;
}
.showcase-spot-stat {
    font-family: 'Sarabun', sans-serif;
    font-size: 0.68rem;
    font-weight: 600;
    color: var(--text-muted);
    display: inline-flex;
    align-items: center;
    gap: 0.2rem;
}
.showcase-spot-stat i { font-size: 0.62rem; opacity: 0.85; }
.showcase-spot-stat .fa-heart { color: #f43f5e; }
.showcase-spot-follow {
    margin-top: auto;
    width: 100%;
    font-family: 'Sarabun', sans-serif;
    font-size: 0.74rem;
    font-weight: 700;
    padding: 0.38rem 0.5rem;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
    background: var(--bg);
    color: var(--text-secondary);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.28rem;
    min-height: 34px;
    transition: background 0.15s, border-color 0.15s, color 0.15s;
}
.showcase-spot-follow i { font-size: 0.72rem; }
.showcase-spot-follow:hover {
    background: color-mix(in srgb, var(--showcase-spot-accent) 8%, var(--bg));
    border-color: color-mix(in srgb, var(--showcase-spot-accent) 28%, var(--border));
}
.showcase-spot-follow.following {
    background: #fef2f2;
    border-color: #fecaca;
    color: #dc2626;
}
.showcase-spot-card--following .showcase-spot-follow.following {
    background: linear-gradient(135deg, #fff1f2, #fef2f2);
}

.plate-badge {
    display: inline-flex; flex-direction: column; align-items: center;
    background: var(--plate-bg); color: var(--plate-text);
    padding: 0.12rem 0.45rem; border-radius: 0.35rem;
    border: 1.5px solid #fff; box-shadow: 0 1px 4px rgba(0,0,0,0.2);
    font-weight: 800; line-height: 1.1;
}
.plate-badge-text { font-size: 0.75rem; letter-spacing: 0.03em; }
.plate-badge-prov { font-size: 0.75rem; font-weight: 600; opacity: 0.9; font-family: 'Sarabun', sans-serif; }

.showcase-card {
    background: var(--card); border: 1px solid var(--border-light);
    border-radius: var(--radius-lg); overflow: hidden; box-shadow: var(--shadow-xs);
    cursor: pointer; transition: box-shadow var(--transition);
}
.showcase-card:hover { box-shadow: var(--shadow-sm); }
.showcase-card-cover {
    height: 88px; background-size: cover; background-position: center; position: relative;
}
.showcase-card-compact .showcase-card-cover { height: 72px; }
.showcase-card-cover-overlay {
    position: absolute; inset: 0;
    background: linear-gradient(180deg, transparent 35%, rgba(15,23,42,0.5) 100%);
}
.showcase-card-cover .plate-badge { position: absolute; bottom: 0.3rem; left: 0.35rem; transform: scale(0.92); transform-origin: left bottom; }
.showcase-card-body { padding: 0.5rem 0.55rem 0.55rem; }
.showcase-card-title { font-size: 1rem; font-weight: 700; line-height: var(--lh-headline); }
.showcase-card-year { font-weight: 500; color: var(--text-secondary); font-size: 0.75rem; }
.showcase-card-owner {
    font-family: 'Sarabun', sans-serif; font-size: 0.75rem; color: var(--text-secondary);
    margin: 0.1rem 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.showcase-owner-lv { color: var(--showcase-accent); font-weight: 700; }
.showcase-card-meta {
    display: flex; flex-wrap: wrap; gap: 0.25rem; align-items: center; margin: 0.2rem 0 0;
}
.showcase-mileage { font-family: 'Sarabun', sans-serif; font-size: 0.75rem; color: var(--text-muted); }
.showcase-card-footer { display: flex; justify-content: space-between; align-items: center; margin-top: 0.2rem; }
.showcase-card-compact .showcase-card-footer { display: none; }
.showcase-followers { font-family: 'Sarabun', sans-serif; font-size: 0.75rem; color: var(--text-muted); }

.prestige-ring {
    font-family: 'Sarabun', sans-serif; font-size: 0.75rem; font-weight: 700;
    color: var(--prestige-color, #64748b);
    background: color-mix(in srgb, var(--prestige-color, #64748b) 12%, transparent);
    padding: 0.08rem 0.3rem; border-radius: var(--radius-full);
    display: inline-flex; align-items: center; gap: 0.15rem;
}
.prestige-ring i { font-size: 0.75rem; }

.btn-follow {
    font-family: 'Sarabun', sans-serif; font-size: 0.75rem; font-weight: 700;
    padding: 0.2rem 0.45rem; border-radius: var(--radius-full);
    border: 1px solid var(--border); background: var(--card); color: var(--text-secondary);
    cursor: pointer; display: inline-flex; align-items: center; gap: 0.2rem; min-height: 28px;
}
.btn-follow.following { background: #fef2f2; border-color: #fecaca; color: #dc2626; }
.btn-follow-lg { min-height: 40px; padding: 0.4rem 0.75rem; font-size: var(--font-body); flex: 1; }

.feed-item {
    display: flex; gap: 0.5rem; background: var(--card);
    border: 1px solid var(--border-light); border-radius: var(--radius-lg);
    padding: 0.6rem 0.65rem; margin-bottom: 0.45rem; box-shadow: var(--shadow-xs);
    overflow: visible; position: relative;
}
.feed-item-icon {
    width: 32px; height: 32px; border-radius: var(--radius-md);
    display: flex; align-items: center; justify-content: center; flex-shrink: 0; font-size: 0.8rem;
}
.feed-item-body { flex: 1; min-width: 0; }
.feed-item-header { display: flex; justify-content: space-between; gap: 0.35rem; margin-bottom: 0.05rem; }
.feed-item-author { font-size: 0.75rem; font-weight: 700; color: var(--text); text-decoration: none; }
.feed-item-time { font-family: 'Sarabun', sans-serif; font-size: 0.75rem; color: var(--text-muted); white-space: nowrap; }
.feed-item-car { font-family: 'Sarabun', sans-serif; font-size: 0.75rem; margin-bottom: 0.1rem; }
.feed-item-car a { color: var(--primary); text-decoration: none; font-weight: 600; }
.feed-item-title { font-size: 1rem; font-weight: 700; margin-bottom: 0.1rem; line-height: var(--lh-headline); }
.feed-item-desc {
    font-family: 'Sarabun', sans-serif; font-size: var(--font-body); color: var(--text-secondary);
    line-height: var(--lh-body); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.feed-item-amount, .feed-item-xp, .feed-item-distance {
    font-family: 'Sarabun', sans-serif; font-size: 0.75rem; font-weight: 700;
    color: var(--accent-dark); margin-top: 0.25rem;
}
.feed-item-xp { color: var(--showcase-accent); }
.feed-price-cheap { color: var(--success-dark); }
/* Feed — Facebook-style reactions & comments */
.feed-reaction-summary {
    display: flex; align-items: center; flex-wrap: wrap; gap: 0.35rem;
    margin-top: 0.4rem; padding-top: 0.35rem;
    border-top: 1px solid var(--border-light);
    font-family: 'Sarabun', sans-serif; font-size: 0.75rem; color: var(--text-muted);
}
.feed-rx-icons-stack { display: inline-flex; align-items: center; }
.feed-rx-icon {
    width: 16px; height: 16px; border-radius: 50%; color: #fff;
    display: inline-flex; align-items: center; justify-content: center;
    font-size: 0.75rem; margin-right: -4px; border: 1.5px solid var(--card);
}
.feed-rx-count { font-weight: 700; color: var(--text-secondary); margin-right: 0.35rem; }
.feed-rx-comments-link {
    margin-left: auto; cursor: pointer; color: var(--text-muted);
    background: none; border: none; padding: 0; font: inherit;
}
.feed-rx-comments-link:hover { color: var(--primary); text-decoration: underline; }

.feed-action-bar {
    display: grid; grid-template-columns: 1fr 1fr 1fr;
    gap: 0.15rem; margin-top: 0.3rem;
    border-top: 1px solid var(--border-light);
    padding-top: 0.2rem;
}
.feed-action-fb {
    background: none; border: none; cursor: pointer;
    font-family: 'Sarabun', sans-serif; font-size: 0.75rem; font-weight: 600;
    color: var(--text-secondary); min-height: 34px;
    display: inline-flex; align-items: center; justify-content: center; gap: 0.3rem;
    border-radius: var(--radius-md); transition: background var(--transition);
}
.feed-action-fb:hover { background: var(--bg-alt); }
.feed-action-fb i { font-size: 0.85rem; }
.feed-action-like.active { font-weight: 700; }
.feed-action-like-wrap { position: relative; display: flex; justify-content: center; }

.feed-reaction-picker {
    position: absolute; bottom: calc(100% + 8px); left: 50%; transform: translateX(-50%) scale(0.8);
    display: flex; gap: 0.15rem; padding: 0.4rem 0.5rem;
    background: var(--card); border-radius: var(--radius-full);
    box-shadow: 0 8px 28px rgba(0,0,0,0.18), 0 0 0 1px var(--border-light);
    opacity: 0; visibility: hidden; pointer-events: none;
    transition: opacity 0.15s ease, transform 0.15s ease, visibility 0.15s;
    z-index: 30;
}
.feed-reaction-picker.open {
    opacity: 1; visibility: visible; pointer-events: auto; transform: translateX(-50%) scale(1);
}
.feed-reaction-option {
    width: 40px; height: 40px; border-radius: 50%; border: none; cursor: pointer;
    background: transparent; color: #fff;
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    position: relative; transition: transform 0.15s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.feed-reaction-emoji {
    width: 36px; height: 36px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-size: 1.05rem; box-shadow: 0 2px 8px rgba(0,0,0,0.12);
}
.feed-reaction-label {
    position: absolute; bottom: calc(100% + 4px); left: 50%; transform: translateX(-50%);
    background: rgba(0,0,0,0.78); color: #fff; font-size: 0.75rem; font-weight: 600;
    padding: 0.15rem 0.4rem; border-radius: var(--radius-sm); white-space: nowrap;
    opacity: 0; pointer-events: none; transition: opacity 0.12s ease;
    font-family: 'Sarabun', sans-serif;
}
.feed-reaction-option:hover { transform: scale(1.35) translateY(-6px); z-index: 2; }
.feed-reaction-option:hover .feed-reaction-label { opacity: 1; }
.feed-reaction-option.rx-like .feed-reaction-emoji { background: linear-gradient(180deg, #60a5fa, #2563eb); }
.feed-reaction-option.rx-love .feed-reaction-emoji { background: linear-gradient(180deg, #f87171, #dc2626); }
.feed-reaction-option.rx-care .feed-reaction-emoji { background: linear-gradient(180deg, #fde047, #ca8a04); color: #78350f; }
.feed-reaction-option.rx-haha .feed-reaction-emoji { background: linear-gradient(180deg, #fde047, #eab308); color: #713f12; }
.feed-reaction-option.rx-wow .feed-reaction-emoji { background: linear-gradient(180deg, #fde047, #eab308); color: #713f12; }
.feed-reaction-option.rx-sad .feed-reaction-emoji { background: linear-gradient(180deg, #fde047, #eab308); color: #713f12; }
.feed-reaction-option.rx-angry .feed-reaction-emoji { background: linear-gradient(180deg, #fb923c, #ea580c); }
.feed-action-like.rx-like i { color: #2563eb; }
.feed-action-like.rx-love i { color: #dc2626; }
.feed-action-like.rx-care i { color: #ca8a04; }
.feed-action-like.rx-haha i, .feed-action-like.rx-wow i, .feed-action-like.rx-sad i { color: #ca8a04; }
.feed-action-like.rx-angry i { color: #ea580c; }

.feed-comments {
    display: none; margin-top: 0.45rem; padding-top: 0.45rem;
    border-top: 1px solid var(--border-light);
}
.feed-comments.open { display: block; }
.feed-comments-list { margin-bottom: 0.5rem; }
.feed-comment-item {
    display: flex; gap: 0.4rem; align-items: flex-start; margin-bottom: 0.45rem;
}
.feed-comment-item-new { animation: feedCommentIn 0.3s ease; }
@keyframes feedCommentIn {
    from { opacity: 0; transform: translateY(4px); }
    to { opacity: 1; transform: translateY(0); }
}
.feed-comment-avatar {
    width: 28px; height: 28px; border-radius: 50%; background: var(--bg-alt);
    display: flex; align-items: center; justify-content: center; font-size: 0.85rem; flex-shrink: 0;
}
.feed-comment-bubble {
    flex: 1; background: var(--bg-alt); border-radius: var(--radius-lg);
    padding: 0.35rem 0.55rem; min-width: 0;
}
.feed-comment-author { font-size: 0.75rem; font-weight: 700; color: var(--text); }
.feed-comment-text { font-family: 'Sarabun', sans-serif; font-size: var(--font-body); color: var(--text-secondary); line-height: var(--lh-body); }
.feed-comment-meta {
    font-family: 'Sarabun', sans-serif; font-size: 0.75rem; color: var(--text-muted);
    align-self: center; white-space: nowrap;
}
.feed-comment-compose {
    display: flex; gap: 0.4rem; align-items: center;
}
.feed-comment-compose-avatar {
    width: 28px; height: 28px; border-radius: 50%; background: #ede9fe;
    display: flex; align-items: center; justify-content: center; font-size: 0.85rem; flex-shrink: 0;
}
.feed-comment-input {
    flex: 1; border: 1px solid var(--border); border-radius: var(--radius-full);
    padding: 0.4rem 0.75rem; font-family: 'Sarabun', sans-serif; font-size: 0.75rem;
    min-height: 34px; background: var(--card);
}
.feed-comment-input:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 2px var(--primary-50); }
.feed-empty { text-align: center; padding: 1.25rem 0.75rem; color: var(--text-muted); font-family: 'Sarabun', sans-serif; font-size: var(--font-body); line-height: var(--lh-body); }
.feed-empty i { font-size: 1.5rem; margin-bottom: 0.35rem; display: block; }
.feed-empty-hint { font-size: 0.8rem; margin-top: 0.35rem; line-height: 1.45; color: var(--text-secondary); }
.feed-empty-actions { display: flex; gap: 0.5rem; justify-content: center; flex-wrap: wrap; margin-top: 0.75rem; }
.showcase-carousel-empty { min-height: 120px; display: flex; flex-direction: column; align-items: center; justify-content: center; }

.showcase-page-hero {
    border-radius: var(--radius-lg); overflow: hidden; margin-bottom: 0.75rem;
    background: var(--card); border: 1px solid var(--border-light);
    box-shadow: 0 2px 14px rgba(15, 23, 42, 0.06);
}
.showcase-hero-gallery { display: flex; flex-direction: column; }
.showcase-hero-stage {
    position: relative; aspect-ratio: 4 / 3; max-height: 260px;
    background: linear-gradient(145deg, #e8eef5 0%, #d4dce8 100%);
    overflow: hidden;
}
.showcase-hero-stage--empty { min-height: 180px; display: flex; align-items: center; justify-content: center; }
.showcase-hero-stage--loading { min-height: 200px; display: flex; align-items: stretch; }
.showcase-hero-skeleton {
    flex: 1; background: linear-gradient(90deg, #e8eef5 0%, #f4f7fb 45%, #e8eef5 90%);
    background-size: 200% 100%; animation: showcase-skeleton-shimmer 1.2s ease-in-out infinite;
}
.showcase-hero-info--loading { display: flex; flex-direction: column; gap: 0.45rem; }
.showcase-hero-skeleton-line {
    height: 0.72rem; border-radius: var(--radius-sm);
    background: linear-gradient(90deg, #e8eef5 0%, #f4f7fb 45%, #e8eef5 90%);
    background-size: 200% 100%; animation: showcase-skeleton-shimmer 1.2s ease-in-out infinite;
}
.showcase-hero-skeleton-line--lg { height: 1rem; width: 72%; }
.showcase-hero-skeleton-line--sm { width: 48%; }
@keyframes showcase-skeleton-shimmer {
    0% { background-position: 100% 0; }
    100% { background-position: -100% 0; }
}
.showcase-hero-main-img {
    width: 100%; height: 100%; object-fit: cover; display: block;
    opacity: 0; transition: opacity 0.35s ease;
}
.showcase-hero-main-img.is-loaded { opacity: 1; }
.showcase-hero-stage-scrim {
    position: absolute; inset: 0; pointer-events: none;
    background: linear-gradient(to top, rgba(15, 23, 42, 0.5) 0%, transparent 48%);
}
.showcase-hero-stage-badges {
    position: absolute; left: 0.6rem; right: 0.6rem; bottom: 0.5rem;
    display: flex; justify-content: space-between; align-items: flex-end; gap: 0.5rem; z-index: 2;
}
.showcase-hero-plate .plate-badge { box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2); }
.showcase-hero-placeholder {
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    gap: 0.35rem; padding: 1.5rem; color: var(--text-muted); text-align: center;
    font-family: 'Sarabun', sans-serif; font-size: 0.82rem;
}
.showcase-hero-placeholder i { font-size: 1.75rem; opacity: 0.55; }
.showcase-hero-placeholder-link {
    margin-top: 0.35rem; font-size: 0.78rem; font-weight: 600; color: var(--showcase-accent);
    text-decoration: none; display: inline-flex; align-items: center; gap: 0.25rem;
}
.showcase-hero-thumbs {
    display: flex; gap: 0.35rem; padding: 0.45rem 0.55rem;
    overflow-x: auto; -webkit-overflow-scrolling: touch;
    background: var(--bg-alt); border-top: 1px solid var(--border-light);
    scrollbar-width: none;
}
.showcase-hero-thumbs::-webkit-scrollbar { display: none; }
.showcase-hero-thumb {
    flex: 0 0 54px; width: 54px; height: 42px; border-radius: var(--radius-sm);
    overflow: hidden; border: 2px solid transparent; padding: 0; background: var(--card);
    cursor: pointer; transition: border-color 0.2s ease, transform 0.15s ease;
}
.showcase-hero-thumb.is-active { border-color: var(--showcase-accent); }
.showcase-hero-thumb:focus-visible { outline: 2px solid var(--showcase-accent); outline-offset: 2px; }
.showcase-hero-thumb img {
    width: 100%; height: 100%; object-fit: cover; display: block; opacity: 0.85;
}
.showcase-hero-thumb.is-active img { opacity: 1; }
.showcase-hero-nav {
    position: absolute; inset: 0; display: flex; justify-content: space-between;
    align-items: center; padding: 0 0.35rem; pointer-events: none; z-index: 3;
}
.showcase-hero-nav-btn {
    pointer-events: auto; width: 32px; height: 32px; border-radius: 50%;
    border: none; background: rgba(255, 255, 255, 0.88); color: var(--text-primary);
    display: flex; align-items: center; justify-content: center; cursor: pointer;
    box-shadow: 0 2px 8px rgba(15, 23, 42, 0.15);
}
.showcase-hero-nav-btn:focus-visible { outline: 2px solid var(--showcase-accent); outline-offset: 2px; }
.showcase-hero-counter {
    position: absolute; top: 0.45rem; right: 0.45rem; z-index: 3;
    font-family: 'Sarabun', sans-serif; font-size: 0.72rem; font-weight: 700;
    color: #fff; background: rgba(15, 23, 42, 0.55); padding: 0.15rem 0.45rem;
    border-radius: var(--radius-full); font-variant-numeric: tabular-nums;
}
.showcase-hero-cover { height: 130px; background-size: cover; background-position: center; position: relative; }
.showcase-hero-info { padding: 0.75rem 0.85rem 0.85rem; }
.showcase-hero-title { font-size: 1.05rem; font-weight: 700; margin: 0 0 0.15rem; line-height: var(--lh-headline); }
.showcase-hero-sub { font-family: 'Sarabun', sans-serif; font-size: var(--font-body); color: var(--text-secondary); margin-bottom: 0.25rem; line-height: var(--lh-body); }
.showcase-hero-owner { font-family: 'Sarabun', sans-serif; font-size: 0.75rem; color: var(--showcase-accent); font-weight: 600; text-decoration: none; display: inline-block; margin-bottom: 0.35rem; }
.showcase-hero-stats { display: flex; gap: 0.65rem; font-family: 'Sarabun', sans-serif; font-size: 0.75rem; color: var(--text-secondary); margin-bottom: 0.5rem; flex-wrap: wrap; }
.showcase-hero-actions { display: flex; gap: 0.35rem; flex-wrap: wrap; }
@media (prefers-reduced-motion: reduce) {
    .showcase-hero-main-img { transition: none; }
    .showcase-hero-thumb { transition: none; }
    .showcase-hero-skeleton, .showcase-hero-skeleton-line { animation: none; }
}
.showcase-stats-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0.35rem; margin-bottom: 0.75rem; }
.showcase-stat {
    text-align: center; background: var(--card); border: 1px solid var(--border-light);
    border-radius: var(--radius-md); padding: 0.45rem 0.2rem;
}
.showcase-stat i { color: var(--primary); margin-bottom: 0.1rem; font-size: 0.75rem; }
.showcase-stat-val { font-size: 0.9rem; font-weight: 700; font-variant-numeric: tabular-nums; }
.showcase-stat-lbl { font-family: 'Sarabun', sans-serif; font-size: 0.75rem; color: var(--text-muted); }

.member-rank-header { display: flex; gap: 0.65rem; align-items: flex-start; margin-bottom: 0.85rem; }
.member-avatar {
    width: 48px; height: 48px; border-radius: 50%;
    background: linear-gradient(135deg,#ede9fe,#ddd6fe);
    display: flex; align-items: center; justify-content: center; font-size: 1.5rem; flex-shrink: 0;
}
.member-rank-name { font-size: 1rem; font-weight: 700; }
.member-rank-level { font-size: 1rem; font-weight: 700; color: var(--showcase-accent); margin: 0.1rem 0; line-height: var(--lh-headline); }
.member-rank-xp { font-family: 'Sarabun', sans-serif; font-size: 0.75rem; color: var(--text-secondary); }
.member-rank-bar { margin: 0.3rem 0; height: 5px; background: var(--bg-alt); border-radius: var(--radius-full); overflow: hidden; }
.member-rank-streak { font-family: 'Sarabun', sans-serif; font-size: 0.75rem; color: #ea580c; font-weight: 600; }
.member-cars-grid { display: grid; gap: 0.5rem; margin-bottom: 0.75rem; }

.home-pref-options { display: grid; grid-template-columns: 1fr 1fr; gap: 0.5rem; }
.home-pref-btn {
    min-height: 48px; border: 2px solid var(--border); background: var(--card);
    border-radius: var(--radius-lg); font-family: 'Sarabun', sans-serif;
    font-size: 0.85rem; font-weight: 600; cursor: pointer;
    display: flex; align-items: center; justify-content: center; gap: 0.35rem;
}
.home-pref-btn.active { border-color: var(--showcase-accent); background: #faf5ff; color: #6d28d9; }

/* === Used Car Valuation & For Sale === */
.for-sale-badge {
    display: inline-flex; align-items: center; gap: 0.2rem;
    background: linear-gradient(135deg, #dc2626, #b91c1c); color: #fff;
    font-family: 'Sarabun', sans-serif; font-size: 0.75rem; font-weight: 800;
    padding: 0.15rem 0.4rem; border-radius: var(--radius-full);
    box-shadow: 0 1px 5px rgba(220,38,38,0.3);
}
.for-sale-badge i { font-size: 0.75rem; }
.for-sale-badge-lg { font-size: 0.75rem; padding: 0.28rem 0.55rem; }
.showcase-card-sale-wrap, .showcase-hero-sale-wrap {
    position: absolute; top: 0.3rem; right: 0.3rem; z-index: 2;
}
.showcase-card-cover { position: relative; }
.showcase-card-forsale { border-color: rgba(220,38,38,0.35); }
.showcase-resale-hint {
    font-family: 'Sarabun', sans-serif; font-size: 0.75rem; color: var(--text-muted);
    display: inline-flex; align-items: center; gap: 0.15rem;
}
.showcase-resale-hint i { font-size: 0.75rem; }

.resale-panel {
    background: linear-gradient(135deg, #f0fdf4, #fff);
    border: 1px solid rgba(34,197,94,0.25); border-radius: var(--radius-lg);
    padding: 0.65rem 0.75rem; margin-bottom: 0.35rem;
}
.resale-panel-empty { text-align: center; color: var(--text-muted); font-family: 'Sarabun', sans-serif; font-size: var(--font-body); padding: 0.85rem; line-height: var(--lh-body); }
.resale-panel-title { font-size: 1rem; font-weight: 700; color: #15803d; margin-bottom: 0.1rem; line-height: var(--lh-headline); }
.resale-panel-title i { font-size: 0.75rem; }
.resale-panel-sub { font-family: 'Sarabun', sans-serif; font-size: var(--font-body); color: var(--text-secondary); margin-bottom: 0.35rem; line-height: var(--lh-body); }
.resale-median { font-size: 1.15rem; font-weight: 800; color: #15803d; font-variant-numeric: tabular-nums; }
.resale-range { font-family: 'Sarabun', sans-serif; font-size: 0.75rem; color: var(--text-secondary); margin: 0.1rem 0 0.35rem; }
.resale-meta { display: flex; flex-wrap: wrap; gap: 0.45rem; font-family: 'Sarabun', sans-serif; font-size: 0.75rem; color: var(--text-muted); }
.resale-asking-row {
    margin-top: 0.45rem; padding-top: 0.45rem; border-top: 1px dashed rgba(34,197,94,0.3);
    display: flex; flex-wrap: wrap; align-items: center; gap: 0.3rem;
}
.resale-asking-label { font-family: 'Sarabun', sans-serif; font-size: 0.75rem; font-weight: 600; }
.resale-asking-price { font-size: 0.95rem; font-weight: 800; color: #dc2626; }
.resale-compare-badge {
    font-family: 'Sarabun', sans-serif; font-size: 0.75rem; font-weight: 700;
    padding: 0.1rem 0.35rem; border-radius: var(--radius-full);
}
.resale-good { background: #dcfce7; color: #15803d; }
.resale-fair { background: #e0f2fe; color: #1d4ed8; }
.resale-warn { background: #fef3c7; color: #b45309; }
.resale-neutral { background: var(--bg-alt); color: var(--text-muted); }
.feed-price-sale { color: #dc2626 !important; font-weight: 800; }

/* Showcase pages — tighter section spacing on mobile */
.page-content .section-header { margin: 0.85rem 0 0.5rem; }
.page-content .section-title { font-size: 0.88rem; }
.page-content .section-title i { font-size: 0.85rem; }
.page-content .section-subtitle {
    font-family: 'Sarabun', sans-serif;
    font-size: 0.72rem;
    font-weight: 600;
    color: var(--text-muted);
    white-space: nowrap;
}

.gamification-hero { padding: 0.85rem 0.8rem; margin-bottom: 0.85rem; }
.gamification-level-ring { width: 42px; height: 42px; font-size: 0.82rem; }
.gamification-level-name { font-size: 0.95rem; }
.gamification-xp { font-size: 0.75rem; margin: 0.05rem 0 0.3rem; }
.gamification-stat-pill { font-size: 0.75rem; padding: 0.2rem 0.45rem; }
.mission-card { padding: 0.75rem; margin-bottom: 0.5rem; gap: 0.6rem; border-radius: var(--radius-lg); }
.mission-card-icon { width: 36px; height: 36px; font-size: 0.9rem; }
.mission-card-title { font-size: 0.85rem; }
.mission-card-desc { font-size: var(--font-body); margin-bottom: 0.35rem; line-height: var(--lh-body); }
.badges-grid { gap: 0.45rem; }
.member-badge { padding: 0.5rem 0.25rem; }
.member-badge-icon { width: 32px; height: 32px; font-size: 0.85rem; }
.member-badge-name { font-size: 0.75rem; }

/* === Post-Warranty: Reviews, Schedule, Passport === */
.garage-name-link { color: var(--text); font-weight: 700; text-decoration: none; }
.garage-name-link:hover { color: var(--primary); }
.garage-tags-row { display: flex; flex-wrap: wrap; gap: 0.25rem; margin-top: 0.35rem; }
.garage-tag {
    font-family: 'Sarabun', sans-serif; font-size: 0.75rem; font-weight: 700;
    padding: 0.12rem 0.4rem; border-radius: var(--radius-full);
    background: color-mix(in srgb, var(--gt-color, var(--primary)) 12%, white);
    color: var(--gt-color, var(--primary)); border: 1px solid color-mix(in srgb, var(--gt-color, var(--primary)) 25%, white);
}
.garage-nav-btn { margin-left: auto; padding: 0.25rem 0.6rem; font-size: 0.75rem; min-height: 28px; border-radius: var(--radius-md); background: var(--primary); color: #fff; border: none; font-weight: 700; cursor: pointer; display: inline-flex; align-items: center; gap: 0.25rem; }

.review-summary { display: flex; gap: 0.75rem; align-items: flex-start; }
.review-summary-score { text-align: center; flex-shrink: 0; }
.review-big-score { font-size: 2rem; font-weight: 800; color: var(--text); line-height: 1; }
.review-count-label { font-family: 'Sarabun', sans-serif; font-size: 0.75rem; color: var(--text-muted); margin-top: 0.15rem; }
.review-summary-bars { flex: 1; min-width: 0; }
.review-dim-row { display: flex; align-items: center; gap: 0.35rem; margin-bottom: 0.3rem; font-family: 'Sarabun', sans-serif; font-size: 0.75rem; }
.review-dim-label { width: 5.5rem; flex-shrink: 0; color: var(--text-secondary); }
.review-dim-bar { flex: 1; height: 5px; background: var(--bg-alt); border-radius: var(--radius-full); overflow: hidden; }
.review-dim-fill { height: 100%; background: linear-gradient(90deg, #fbbf24, #f59e0b); border-radius: var(--radius-full); }
.review-dim-val { width: 1.5rem; text-align: right; font-weight: 700; }
.review-summary-empty { text-align: center; padding: 1rem; color: var(--text-muted); font-family: 'Sarabun', sans-serif; font-size: var(--font-body); line-height: var(--lh-body); }
.review-stars i { color: var(--border); font-size: 0.75rem; }
.review-stars i.filled { color: #f59e0b; }
.review-item { padding: 0.65rem 0; border-bottom: 1px solid var(--border-light); }
.review-item:last-child { border-bottom: none; }
.review-item-head { display: flex; gap: 0.45rem; align-items: flex-start; }
.review-avatar { width: 32px; height: 32px; border-radius: 50%; background: var(--bg-alt); display: flex; align-items: center; justify-content: center; font-size: 1rem; flex-shrink: 0; }
.review-item-meta { flex: 1; min-width: 0; }
.review-author { font-size: 0.75rem; font-weight: 700; }
.review-date { font-family: 'Sarabun', sans-serif; font-size: 0.75rem; color: var(--text-muted); }
.review-text { font-family: 'Sarabun', sans-serif; font-size: var(--font-body); color: var(--text-secondary); line-height: var(--lh-body); margin: 0.35rem 0 0 2.4rem; }
.review-amount-row { font-family: 'Sarabun', sans-serif; font-size: 0.75rem; margin: 0.25rem 0 0 2.4rem; }
.review-price-badge { font-size: 0.75rem; font-weight: 700; padding: 0.1rem 0.35rem; border-radius: var(--radius-full); margin-left: 0.25rem; }
.review-price-badge.cheap { background: #dcfce7; color: #15803d; }
.review-price-badge.expensive { background: #fef3c7; color: #b45309; }
.review-price-badge.normal { background: #e0f2fe; color: #1d4ed8; }
.review-tags { display: flex; flex-wrap: wrap; gap: 0.2rem; margin: 0.3rem 0 0 2.4rem; }
.review-tag { font-family: 'Sarabun', sans-serif; font-size: 0.75rem; font-weight: 600; padding: 0.1rem 0.35rem; border-radius: var(--radius-full); background: var(--bg-alt); color: var(--text-secondary); }
.review-linked { font-family: 'Sarabun', sans-serif; font-size: 0.75rem; color: var(--success-dark); margin: 0.2rem 0 0 2.4rem; }
.review-context-banner { background: var(--primary-light); border-radius: var(--radius-md); padding: 0.45rem 0.6rem; font-family: 'Sarabun', sans-serif; font-size: 0.75rem; color: var(--primary-dark); margin-bottom: 0.75rem; }
.review-dim-input { display: flex; justify-content: space-between; align-items: center; margin-bottom: 0.45rem; }
.review-dim-name { font-family: 'Sarabun', sans-serif; font-size: 0.75rem; font-weight: 600; }
.review-star-input { display: flex; gap: 0.15rem; }
.review-star-btn { background: none; border: none; cursor: pointer; color: var(--border); font-size: 1.1rem; padding: 0.1rem; }
.review-star-btn.active { color: #f59e0b; }
.review-tags-select { display: flex; flex-wrap: wrap; gap: 0.3rem; }
.review-tag-btn { font-family: 'Sarabun', sans-serif; font-size: 0.75rem; padding: 0.3rem 0.55rem; border-radius: var(--radius-full); border: 1px solid var(--border); background: var(--card); cursor: pointer; }
.review-tag-btn.selected { background: var(--primary-light); border-color: var(--primary); color: var(--primary-dark); font-weight: 700; }

/* === Garage Detail Page === */
.garage-detail-page { padding-bottom: 1.5rem; }
.gd-section { margin-bottom: 1.15rem; }
.gd-section .card { margin-bottom: 0.65rem; }
.gd-section .card:last-child { margin-bottom: 0; }

.gd-hero {
    background: var(--card);
    border: 1px solid color-mix(in srgb, var(--primary) 18%, white);
    border-radius: var(--radius-xl);
    padding: 1.15rem 1rem 1rem;
    margin-bottom: 0.75rem;
    box-shadow: var(--shadow-sm);
    position: relative;
    overflow: hidden;
}
.gd-hero::before {
    content: '';
    position: absolute; top: 0; left: 0; right: 0; height: 4px;
    background: linear-gradient(90deg, var(--primary), var(--accent, #0ea5e9));
}
.gd-hero-top {
    display: flex; align-items: flex-start; gap: 0.85rem;
    margin-bottom: 0.75rem;
}
.gd-hero-icon {
    width: 58px; height: 58px; border-radius: var(--radius-lg);
    display: flex; align-items: center; justify-content: center;
    font-size: 1.45rem; flex-shrink: 0;
    box-shadow: var(--shadow-sm);
}
.gd-hero-head { flex: 1; min-width: 0; }
.gd-hero-type {
    font-family: 'Sarabun', sans-serif; font-size: 0.75rem; font-weight: 700;
    color: var(--primary); margin-bottom: 0.2rem;
}
.gd-hero-name {
    font-size: 1.28rem; font-weight: 800; line-height: 1.25;
    margin: 0; word-break: break-word;
}
.gd-hero-pills {
    display: flex; flex-wrap: wrap; gap: 0.35rem;
    margin-top: 0.65rem;
}
.gd-hero-pill {
    font-family: 'Sarabun', sans-serif; font-size: 0.72rem; font-weight: 700;
    padding: 0.22rem 0.55rem; border-radius: var(--radius-full);
    background: var(--bg); border: 1px solid var(--border-light);
    color: var(--text-secondary); display: inline-flex; align-items: center; gap: 0.25rem;
}
.gd-hero-pill--star { background: #fffbeb; border-color: #fde68a; color: #b45309; }
.gd-hero-pill--dist { background: #eff6ff; border-color: #bfdbfe; color: #1d4ed8; }
.gd-hero-pill--match { background: #f0fdf4; border-color: #bbf7d0; color: #166534; }
.gd-hero-pill--fav { background: var(--primary-light); border-color: var(--primary); color: var(--primary-dark); }
.gd-hero-tags { margin-top: 0.55rem; justify-content: flex-start; }

.gd-actions {
    display: grid; grid-template-columns: 1.2fr 1fr 1fr; gap: 0.45rem;
    margin-bottom: 0.75rem;
}
.gd-actions .btn { min-height: 44px; font-size: 0.8rem; padding: 0.45rem 0.5rem; }
.gd-actions .btn i { margin-right: 0.15rem; }

.gd-match-banner {
    font-family: 'Sarabun', sans-serif; font-size: 0.8rem; font-weight: 600;
    padding: 0.7rem 0.85rem; border-radius: var(--radius-lg);
    background: linear-gradient(135deg, #f0fdf4 0%, #ecfeff 100%);
    border: 1px solid color-mix(in srgb, var(--primary) 22%, white);
    margin-bottom: 0.85rem; line-height: 1.45;
}
.gd-match-banner strong { color: var(--primary-dark, #166534); }

.gd-info-card { padding: 0.85rem 1rem; }
.gd-info-row {
    display: flex; gap: 0.65rem; align-items: flex-start;
    padding: 0.55rem 0; border-bottom: 1px solid var(--border-light);
}
.gd-info-row:last-child { border-bottom: none; padding-bottom: 0; }
.gd-info-row:first-child { padding-top: 0; }
.gd-info-icon {
    width: 32px; height: 32px; border-radius: var(--radius-md);
    background: var(--bg); color: var(--text-muted);
    display: flex; align-items: center; justify-content: center;
    flex-shrink: 0; font-size: 0.85rem;
}
.gd-info-body { flex: 1; min-width: 0; }
.gd-info-label {
    font-family: 'Sarabun', sans-serif; font-size: 0.7rem; font-weight: 700;
    color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.02em;
    margin-bottom: 0.12rem;
}
.gd-info-value {
    font-family: 'Sarabun', sans-serif; font-size: 0.875rem;
    color: var(--text); line-height: 1.45; word-break: break-word;
}
.gd-info-value a { color: var(--primary); font-weight: 700; text-decoration: none; }
.gd-info-chips { display: flex; flex-wrap: wrap; gap: 0.3rem; margin-top: 0.25rem; }
.gd-info-chip {
    font-family: 'Sarabun', sans-serif; font-size: 0.72rem; font-weight: 600;
    padding: 0.15rem 0.45rem; border-radius: var(--radius-full);
    background: var(--bg); border: 1px solid var(--border-light); color: var(--text-secondary);
}

.gd-review-card { padding: 1rem; }
.gd-review-card .review-summary {
    flex-direction: column; align-items: stretch; gap: 0.85rem;
}
.gd-review-card .review-summary-score { text-align: center; }
.gd-review-card .review-summary-bars { width: 100%; }
.gd-review-list-card { padding: 0.65rem 1rem; }
.gd-review-list-card .review-item { padding: 0.75rem 0; }
.gd-review-empty {
    text-align: center; padding: 1.25rem 0.5rem;
    font-family: 'Sarabun', sans-serif; color: var(--text-muted);
}
.gd-review-empty i { font-size: 1.5rem; display: block; margin-bottom: 0.35rem; opacity: 0.6; }

.gd-maint-card { padding: 0.65rem 1rem; }
.gd-maint-item {
    display: flex; gap: 0.55rem; align-items: flex-start;
    padding: 0.6rem 0; border-bottom: 1px solid var(--border-light);
}
.gd-maint-item:last-child { border-bottom: none; }
.gd-maint-icon {
    width: 34px; height: 34px; border-radius: var(--radius-md);
    background: var(--primary-light); color: var(--primary);
    display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.gd-maint-body { flex: 1; min-width: 0; }
.gd-maint-title { font-weight: 700; font-size: 0.875rem; line-height: 1.35; }
.gd-maint-meta {
    font-family: 'Sarabun', sans-serif; font-size: 0.75rem;
    color: var(--text-secondary); margin-top: 0.12rem;
}
.gd-maint-amount { font-weight: 800; color: var(--primary); white-space: nowrap; font-size: 0.875rem; }

.garage-linked-item { font-family: 'Sarabun', sans-serif; font-size: var(--font-body); padding: 0.35rem 0; border-bottom: 1px solid var(--border-light); line-height: var(--lh-body); }
.garage-linked-item:last-child { border-bottom: none; }

.sched-warranty-banner {
    font-family: 'Sarabun', sans-serif; font-size: 0.75rem; font-weight: 600;
    padding: 0.4rem 0.55rem; border-radius: var(--radius-md); margin-bottom: 0.5rem;
    background: #fff7ed; color: #c2410c; border: 1px solid rgba(249,115,22,0.2);
}
.sched-warranty-banner.active { background: #ecfdf5; color: #15803d; border-color: rgba(34,197,94,0.25); }
.sched-alert { font-family: 'Sarabun', sans-serif; font-size: 0.75rem; font-weight: 700; color: #dc2626; margin-bottom: 0.45rem; }
.sched-list { display: flex; flex-direction: column; gap: 0.35rem; }
.sched-item { display: flex; gap: 0.4rem; align-items: stretch; background: var(--bg); border-radius: var(--radius-md); padding: 0.45rem; border: 1px solid var(--border-light); }
.sched-item.sched-overdue { border-color: rgba(220,38,38,0.35); background: #fff5f5; }
.sched-item.sched-due_soon { border-color: rgba(217,119,6,0.35); background: #fffbeb; }
.sched-item-priority { font-family: 'Sarabun', sans-serif; font-size: 0.75rem; font-weight: 700; writing-mode: vertical-rl; text-orientation: mixed; padding: 0.25rem 0.15rem; border-radius: var(--radius-sm); align-self: stretch; display: flex; align-items: center; justify-content: center; letter-spacing: 0.02em; }
.sched-item-body { flex: 1; min-width: 0; }
.sched-item-title { font-size: 0.75rem; font-weight: 700; }
.sched-item-note { font-family: 'Sarabun', sans-serif; font-size: var(--font-body); color: var(--text-muted); line-height: var(--lh-body); }
.sched-item-meta { display: flex; flex-wrap: wrap; gap: 0.25rem; align-items: center; margin-top: 0.2rem; }
.sched-badge { font-family: 'Sarabun', sans-serif; font-size: 0.75rem; font-weight: 700; padding: 0.1rem 0.35rem; border-radius: var(--radius-full); }
.sched-badge.overdue { background: #fee2e2; color: #dc2626; }
.sched-badge.due-soon { background: #fef3c7; color: #b45309; }
.sched-badge.ok { background: #e0f2fe; color: #1d4ed8; }
.sched-next-km { font-family: 'Sarabun', sans-serif; font-size: 0.75rem; color: var(--text-muted); }
.sched-item-action { display: flex; align-items: center; justify-content: center; width: 32px; color: var(--primary); text-decoration: none; font-size: 0.85rem; }
.sched-view-all { display: block; text-align: center; font-family: 'Sarabun', sans-serif; font-size: 0.75rem; font-weight: 600; color: var(--primary); text-decoration: none; margin-top: 0.5rem; }
.service-schedule-card { padding: 0.65rem 0.75rem; }

/* Garage / maintenance promo link cards */
.promo-link-card {
    display: flex; flex-direction: column; align-items: stretch;
    padding: 0.75rem 1rem; text-decoration: none; color: inherit;
    margin-bottom: 0.75rem;
}
.promo-link-card-row {
    display: flex; align-items: center; gap: 0.65rem; width: 100%;
}
.promo-link-card-body { flex: 1; min-width: 0; }
.promo-link-card-title {
    display: flex; align-items: center; gap: 0.35rem;
    font-size: 1rem; font-weight: 700; line-height: var(--lh-headline);
    white-space: nowrap;
}
.promo-link-card-title i { flex-shrink: 0; font-size: 1rem; }
.promo-link-card-sub {
    font-family: 'Sarabun', sans-serif; font-size: var(--font-body);
    color: var(--text-secondary); line-height: var(--lh-body); margin-top: 0.1rem;
}
.promo-link-card-arrow {
    flex-shrink: 0; font-size: var(--font-label); align-self: center;
}
.promo-link-card-extra {
    width: 100%; margin-top: 0.5rem;
    font-family: 'Sarabun', sans-serif; font-size: var(--font-body);
    color: var(--text-secondary); line-height: var(--lh-body);
}
.passport-banner {
    border-left: 4px solid var(--primary);
    background: linear-gradient(135deg, #eff6ff, #fff);
}
.passport-banner .promo-link-card-title { color: var(--primary-dark); }
.passport-banner .promo-link-card-arrow { color: var(--primary); }
.resale-banner {
    border-left: 4px solid #dc2626;
    background: linear-gradient(135deg, #fff5f5, #fff);
}
.resale-banner .promo-link-card-title { color: #dc2626; font-size: 0.9rem; }
.resale-banner .promo-link-card-sub { font-size: var(--font-body); }
.resale-banner .promo-link-card-arrow { color: #dc2626; }
/* legacy aliases */
.passport-banner-body, .promo-link-card-body { flex: 1; min-width: 0; }
.passport-banner-title, .promo-link-card-title { display: flex; align-items: center; gap: 0.35rem; font-weight: 700; line-height: var(--lh-headline); white-space: nowrap; font-size: 1rem; }
.passport-banner-sub, .promo-link-card-sub { font-family: 'Sarabun', sans-serif; color: var(--text-secondary); line-height: var(--lh-body); margin-top: 0.1rem; font-size: var(--font-body); }
.passport-banner-arrow, .promo-link-card-arrow { flex-shrink: 0; font-size: 0.85rem; align-self: center; }
/* === Service Passport page === */
.passport-page-body { background: linear-gradient(180deg, #eef2ff 0%, var(--bg) 12rem); }
.passport-page-header { background: transparent; border-bottom: none; box-shadow: none; }
.passport-page-header-inner { display: flex; align-items: center; gap: 0.65rem; width: 100%; }
.passport-page-header-text { display: flex; flex-direction: column; min-width: 0; }
.passport-page-header .page-title { font-size: 1rem; font-weight: 800; line-height: 1.2; }
.passport-page-sub { font-family: 'Sarabun', sans-serif; font-size: 0.72rem; color: var(--text-muted); }
.passport-page-wrapper .page-content { padding-top: 0.35rem; }

.passport-car-picker {
    display: flex; align-items: center; gap: 0.5rem;
    margin-bottom: 0.65rem; padding: 0.45rem 0.55rem;
    background: var(--card); border: 1px solid var(--border-light);
    border-radius: var(--radius-lg);
}
.passport-car-picker-label {
    font-family: 'Sarabun', sans-serif; font-size: 0.72rem; font-weight: 600;
    color: var(--text-secondary); white-space: nowrap;
}
.passport-car-select { flex: 1; min-height: 2.25rem; font-size: 0.82rem; padding: 0.35rem 0.5rem; }

.passport-doc {
    position: relative; overflow: hidden;
    background: var(--card);
    border: 1px solid rgba(30, 58, 138, 0.12);
    border-radius: 1rem;
    box-shadow: 0 4px 24px rgba(15, 23, 42, 0.08), 0 1px 3px rgba(15, 23, 42, 0.04);
}
.passport-doc-watermark {
    position: absolute; inset: 0; pointer-events: none;
    display: flex; align-items: center; justify-content: center;
    font-size: 4.5rem; font-weight: 900; letter-spacing: 0.2em;
    color: rgba(30, 58, 138, 0.03); transform: rotate(-18deg);
    user-select: none;
}
.passport-header {
    display: flex; justify-content: space-between; align-items: center; gap: 0.5rem;
    padding: 0.85rem 1rem;
    background: linear-gradient(135deg, #1e3a8a 0%, #2563eb 55%, #3b82f6 100%);
    color: #fff;
}
.passport-brand { display: flex; align-items: center; gap: 0.55rem; min-width: 0; }
.passport-logo { width: 28px; height: 28px; border-radius: 6px; object-fit: cover; border: 1px solid rgba(255,255,255,0.25); }
.passport-brand-name { font-size: 0.82rem; font-weight: 800; line-height: 1.1; }
.passport-brand-sub { font-family: 'Sarabun', sans-serif; font-size: 0.65rem; opacity: 0.85; }
.passport-badge {
    font-family: 'Sarabun', sans-serif; font-size: 0.62rem; font-weight: 700;
    padding: 0.2rem 0.45rem; border-radius: var(--radius-full);
    white-space: nowrap; flex-shrink: 0;
}
.passport-badge--active { background: rgba(255,255,255,0.22); }
.passport-badge--muted { background: rgba(255,255,255,0.14); }

.passport-vehicle {
    padding: 1rem 1rem 0.85rem; text-align: center;
    border-bottom: 1px solid var(--border-light);
    background: linear-gradient(180deg, #fafbff 0%, var(--card) 100%);
}
.passport-plate {
    display: inline-block; background: #1e3a8a; color: #fff;
    font-weight: 800; font-size: 0.88rem; letter-spacing: 0.04em;
    padding: 0.28rem 0.75rem; border-radius: 0.35rem;
    margin-bottom: 0.45rem; box-shadow: inset 0 -2px 0 rgba(0,0,0,0.15);
}
.passport-car-name { font-size: 1.2rem; font-weight: 800; margin: 0; line-height: 1.25; }
.passport-car-meta { font-family: 'Sarabun', sans-serif; font-size: 0.78rem; color: var(--text-secondary); margin-top: 0.2rem; }
.passport-car-mileage-note { font-family: 'Sarabun', sans-serif; font-size: 0.68rem; color: var(--text-muted); margin-top: 0.2rem; }
.passport-mileage-src { color: var(--text-secondary); }

.passport-section--compliance { padding-top: 0.65rem; padding-bottom: 0.7rem; }
.passport-compliance-grid { display: grid; grid-template-columns: 1fr; gap: 0.4rem; }
.passport-compliance-card {
    display: flex; gap: 0.55rem; align-items: flex-start;
    padding: 0.55rem 0.65rem; border-radius: var(--radius-md);
    border: 1px solid var(--border-light); background: var(--bg-alt);
}
.passport-compliance-card--ok { border-color: #bbf7d0; background: #f0fdf4; }
.passport-compliance-card--warn { border-color: #fde68a; background: #fffbeb; }
.passport-compliance-card--bad { border-color: #fecaca; background: #fef2f2; }
.passport-compliance-card--muted { border-style: dashed; }
.passport-compliance-icon {
    width: 1.75rem; height: 1.75rem; border-radius: 50%; flex-shrink: 0;
    display: flex; align-items: center; justify-content: center; font-size: 0.72rem;
    background: var(--card); color: var(--primary);
}
.passport-compliance-card--ok .passport-compliance-icon { color: var(--success-dark); background: #dcfce7; }
.passport-compliance-card--warn .passport-compliance-icon { color: #b45309; background: #fef3c7; }
.passport-compliance-card--bad .passport-compliance-icon { color: var(--danger); background: #fee2e2; }
.passport-compliance-label { font-size: 0.78rem; font-weight: 700; line-height: 1.2; }
.passport-compliance-state { font-family: 'Sarabun', sans-serif; font-size: 0.72rem; font-weight: 600; margin-top: 0.05rem; }
.passport-compliance-card--ok .passport-compliance-state { color: var(--success-dark); }
.passport-compliance-card--warn .passport-compliance-state { color: #b45309; }
.passport-compliance-card--bad .passport-compliance-state { color: var(--danger); }
.passport-compliance-meta { font-family: 'Sarabun', sans-serif; font-size: 0.66rem; color: var(--text-muted); margin-top: 0.12rem; line-height: 1.35; }
.passport-compliance-meta--muted { font-style: italic; }
.passport-compliance-link {
    display: inline-flex; align-items: center; gap: 0.35rem; margin-top: 0.5rem;
    font-family: 'Sarabun', sans-serif; font-size: 0.72rem; font-weight: 600;
    color: var(--primary); text-decoration: none;
}
.passport-empty--timeline { padding: 0.85rem 0.25rem 0.35rem; }

.passport-metrics {
    display: grid; grid-template-columns: auto 1fr; gap: 0.75rem;
    padding: 0.85rem 1rem; align-items: center;
    border-bottom: 1px solid var(--border-light);
}
.passport-score-ring {
    width: 4.5rem; height: 4.5rem; border-radius: 50%; flex-shrink: 0;
    background: conic-gradient(var(--score-color, #059669) calc(var(--score-pct) * 1%), var(--bg-alt) 0);
    display: flex; align-items: center; justify-content: center;
}
.passport-score-inner {
    width: 3.65rem; height: 3.65rem; border-radius: 50%; background: var(--card);
    display: flex; flex-direction: column; align-items: center; justify-content: center;
}
.passport-score-val { font-size: 1.35rem; font-weight: 800; color: var(--score-color, #059669); line-height: 1; }
.passport-score-lbl { font-family: 'Sarabun', sans-serif; font-size: 0.58rem; color: var(--text-muted); margin-top: 0.1rem; }
.passport-metrics-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0.35rem 0.5rem; }
.passport-metric { min-width: 0; }
.passport-metric-val { display: block; font-size: 0.88rem; font-weight: 800; line-height: 1.15; }
.passport-metric-lbl { font-family: 'Sarabun', sans-serif; font-size: 0.62rem; color: var(--text-muted); }

.passport-compare-wrap { padding: 0 1rem 0.65rem; }
.passport-compare {
    font-family: 'Sarabun', sans-serif; font-size: 0.72rem; font-weight: 600;
    padding: 0.4rem 0.55rem; border-radius: var(--radius-md);
    display: flex; align-items: center; gap: 0.35rem;
}
.passport-compare--up { background: var(--success-light); color: var(--success-dark); }
.passport-compare--down { background: #fff7ed; color: #c2410c; }

.passport-section { padding: 0.75rem 1rem 0.85rem; border-top: 1px solid var(--border-light); }
.passport-section--compact { padding-bottom: 0.65rem; }
.passport-section-title {
    font-size: 0.82rem; font-weight: 700; margin-bottom: 0.45rem;
    color: var(--text-secondary); display: flex; align-items: center; gap: 0.35rem;
}
.passport-job-chips { display: flex; flex-wrap: wrap; gap: 0.35rem; }
.passport-job-chip {
    font-family: 'Sarabun', sans-serif; font-size: 0.68rem; font-weight: 600;
    padding: 0.22rem 0.45rem; border-radius: var(--radius-full);
    background: var(--primary-light); color: var(--primary-dark);
}
.passport-job-chip strong { font-weight: 800; }

.passport-timeline { display: flex; flex-direction: column; gap: 0; }
.passport-tl-item {
    display: grid; grid-template-columns: 1.5rem 1fr auto; gap: 0.45rem;
    padding: 0.55rem 0; align-items: start;
    border-bottom: 1px solid var(--border-light);
}
.passport-tl-item:last-child { border-bottom: none; }
.passport-tl-item--latest .passport-tl-dot { background: var(--success-light); color: var(--success-dark); box-shadow: 0 0 0 2px rgba(34,197,94,0.2); }
.passport-tl-track { display: flex; justify-content: center; padding-top: 0.1rem; }
.passport-tl-dot {
    width: 1.5rem; height: 1.5rem; border-radius: 50%;
    background: var(--primary-light); color: var(--primary);
    display: flex; align-items: center; justify-content: center; font-size: 0.62rem;
}
.passport-tl-body { min-width: 0; }
.passport-tl-title { font-size: 0.8rem; font-weight: 700; line-height: 1.25; }
.passport-tl-sub, .passport-tl-shop, .passport-tl-items {
    font-family: 'Sarabun', sans-serif; font-size: 0.68rem; color: var(--text-muted); line-height: 1.35;
}
.passport-tl-shop { margin-top: 0.1rem; }
.passport-tl-items { margin-top: 0.15rem; color: var(--text-secondary); }
.passport-tl-amount { font-size: 0.78rem; font-weight: 800; color: var(--accent-dark); white-space: nowrap; padding-top: 0.1rem; }

.passport-footer {
    display: flex; gap: 0.65rem; padding: 0.85rem 1rem;
    background: var(--bg-alt); align-items: center;
    border-top: 1px dashed var(--border);
}
.passport-qr {
    width: 4rem; height: 4rem; flex-shrink: 0;
    border-radius: var(--radius-md); overflow: hidden;
    background: #fff; border: 1px solid var(--border);
}
.passport-qr-img { display: block; width: 100%; height: 100%; object-fit: contain; }
.passport-qr-fallback {
    width: 100%; height: 100%; align-items: center; justify-content: center;
    font-size: 1.4rem; color: var(--text-muted);
}
.passport-verify { min-width: 0; }
.passport-verify-id { font-family: ui-monospace, monospace; font-size: 0.72rem; font-weight: 700; letter-spacing: 0.03em; }
.passport-verify-note { font-family: 'Sarabun', sans-serif; font-size: 0.65rem; color: var(--text-muted); margin-top: 0.15rem; line-height: 1.35; }

.passport-actions { margin-top: 0.75rem; }
.passport-action-btn { min-height: 2.75rem; font-size: 0.82rem; }

.passport-info-card {
    display: flex; gap: 0.65rem; margin-top: 0.85rem; padding: 0.75rem 0.85rem;
    background: var(--card); border: 1px solid var(--border-light);
    border-radius: var(--radius-lg);
}
.passport-info-icon {
    width: 2rem; height: 2rem; border-radius: 50%; flex-shrink: 0;
    background: var(--info-light); color: var(--info);
    display: flex; align-items: center; justify-content: center; font-size: 0.85rem;
}
.passport-info-title { font-size: 0.82rem; font-weight: 700; margin-bottom: 0.15rem; }
.passport-info-desc { font-family: 'Sarabun', sans-serif; font-size: 0.72rem; color: var(--text-secondary); line-height: 1.45; margin: 0; }

.passport-tl-note {
    display: flex; gap: 0.45rem; align-items: flex-start;
    padding: 0.55rem 0.65rem; margin-bottom: 0.55rem;
    background: #fffbeb; border: 1px solid #fde68a; border-radius: var(--radius-md);
    font-family: 'Sarabun', sans-serif; font-size: 0.75rem; line-height: 1.45; color: #92400e;
}
.passport-tl-note i { margin-top: 0.1rem; flex-shrink: 0; }
.passport-tl-item--insurance .passport-tl-dot { background: #eff6ff; color: #2563eb; }
.passport-empty--inline { padding: 0.65rem 0 0.25rem; text-align: center; }

.passport-empty {
    text-align: center; padding: 1.25rem 0.75rem;
    font-family: 'Sarabun', sans-serif; color: var(--text-muted);
}
.passport-empty i { font-size: 1.5rem; margin-bottom: 0.35rem; opacity: 0.5; }
.passport-empty p { font-size: 0.82rem; margin-bottom: 0.65rem; }
.passport-empty-page {
    text-align: center; padding: 2.5rem 1rem;
    background: var(--card); border-radius: var(--radius-xl); border: 1px dashed var(--border);
}
.passport-empty-icon { font-size: 2.5rem; color: var(--text-muted); opacity: 0.35; margin-bottom: 0.65rem; }
.passport-empty-page h2 { font-size: 1rem; margin-bottom: 0.35rem; }
.passport-empty-page p { font-family: 'Sarabun', sans-serif; font-size: 0.82rem; color: var(--text-secondary); margin-bottom: 1rem; }

.timeline-review-btn { min-height: 30px; font-size: 0.75rem; padding: 0.2rem 0.5rem; }
.timeline-reviewed { font-family: 'Sarabun', sans-serif; font-size: 0.75rem; color: var(--success-dark); font-weight: 600; }
.timeline-shop-link { color: var(--primary); font-weight: 600; text-decoration: none; }

/* === Responsive === */
@media (min-width: 768px) {
    .page-wrapper { max-width: 600px; }
    .quick-actions { grid-template-columns: repeat(4, 1fr); }
}
@media (min-width: 1024px) {
    .page-wrapper { max-width: 720px; }
    .bottom-nav { display: none; }
    body { padding-bottom: 0; }
}

/* === Member profile page (mobile-first) === */
.member-page-body { background: var(--bg); }
.member-page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.member-page-header-start {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}
.member-missions-btn {
    position: relative;
    text-decoration: none;
    color: var(--text-secondary);
    margin-right: 0.5rem;
}
.member-missions-btn i { font-size: 1.15rem; color: #7c3aed; }
.member-mission-dot {
    position: absolute;
    top: 6px;
    right: 6px;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #ef4444;
    border: 2px solid var(--card);
}
.member-page { padding-top: 0.25rem; }
.member-page .member-block { margin-bottom: 1rem; }
.member-page .member-block--badges { margin-bottom: 0.5rem; }

.member-identity {
    background: var(--card);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-xl);
    padding: 1rem;
    margin-bottom: 0.75rem;
    box-shadow: var(--shadow-sm);
}
.member-identity-top {
    display: flex;
    gap: 0.75rem;
    align-items: center;
}
.member-identity-avatar {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    background: linear-gradient(135deg, #eff6ff, #dbeafe);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.65rem;
    flex-shrink: 0;
    border: 2px solid #fff;
    box-shadow: 0 2px 8px rgba(59, 130, 246, 0.15);
}
.member-identity-main { flex: 1; min-width: 0; }
.member-identity-name {
    font-size: 1.1rem;
    font-weight: 700;
    line-height: 1.25;
    margin: 0 0 0.2rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.member-identity-meta {
    display: flex;
    flex-direction: column;
    gap: 0.12rem;
    font-family: 'Sarabun', sans-serif;
    font-size: 0.78rem;
    color: var(--text-secondary);
    line-height: 1.45;
}
.member-identity-meta span {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    max-width: 100%;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.member-identity-meta span + span { margin-top: 0.1rem; }
.member-identity-meta i { font-size: 0.72rem; color: var(--text-muted); width: 0.85rem; text-align: center; }

.member-quick-actions {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0.45rem;
    margin-bottom: 0.75rem;
}
.member-qa-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.3rem;
    padding: 0.55rem 0.25rem;
    background: var(--card);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-lg);
    text-decoration: none;
    color: var(--text);
    min-height: 72px;
    justify-content: center;
    transition: border-color 0.2s, transform 0.15s;
}
.member-qa-item:active { transform: scale(0.97); }
.member-qa-icon {
    width: 36px;
    height: 36px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
}
.member-qa-label {
    font-family: 'Sarabun', sans-serif;
    font-size: 0.72rem;
    font-weight: 600;
    color: var(--text-secondary);
    text-align: center;
    line-height: 1.2;
}

.member-progress {
    margin-bottom: 0.85rem;
}
.member-progress-link {
    display: block;
    text-decoration: none;
    color: inherit;
    background: linear-gradient(135deg, #5b21b6 0%, #7c3aed 100%);
    border-radius: var(--radius-xl);
    padding: 0.75rem 0.85rem;
    color: #fff;
    box-shadow: 0 4px 14px rgba(109, 40, 217, 0.28);
}
.member-progress-row {
    display: flex;
    align-items: center;
    gap: 0.65rem;
}
.member-progress-lv {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.18);
    border: 2px solid rgba(255, 255, 255, 0.35);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.78rem;
    font-weight: 800;
    flex-shrink: 0;
}
.member-progress-body { flex: 1; min-width: 0; }
.member-progress-title {
    font-size: 0.88rem;
    font-weight: 700;
    margin-bottom: 0.15rem;
}
.member-progress-sub {
    font-family: 'Sarabun', sans-serif;
    font-size: 0.72rem;
    opacity: 0.9;
    margin-bottom: 0.35rem;
}
.member-progress-bar {
    height: 5px;
    background: rgba(255, 255, 255, 0.25);
    border-radius: var(--radius-full);
    overflow: hidden;
}
.member-progress-bar-fill {
    height: 100%;
    background: #fde68a;
    border-radius: var(--radius-full);
}
.member-progress-chevron {
    opacity: 0.7;
    font-size: 0.85rem;
    flex-shrink: 0;
}
.member-progress-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
    margin-top: 0.45rem;
}
.member-progress-pill {
    font-family: 'Sarabun', sans-serif;
    font-size: 0.68rem;
    font-weight: 600;
    background: rgba(255, 255, 255, 0.15);
    padding: 0.15rem 0.45rem;
    border-radius: var(--radius-full);
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
}
.member-progress-pill--fire { background: rgba(239, 68, 68, 0.35); }

.member-block-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    margin-bottom: 0.45rem;
}
.member-block-title {
    font-size: 0.9rem;
    font-weight: 700;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 0.35rem;
    color: var(--text);
}
.member-block-title i { color: var(--primary); font-size: 0.85rem; }
.member-block-link {
    font-family: 'Sarabun', sans-serif;
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--primary);
    text-decoration: none;
    white-space: nowrap;
}
.member-cars-list { display: flex; flex-direction: column; gap: 0.55rem; }
.member-cars-empty {
    text-align: center;
    padding: 1.35rem 0.85rem;
    background: var(--card);
    border: 1px dashed var(--border);
    border-radius: var(--radius-xl);
    font-family: 'Sarabun', sans-serif;
    font-size: 0.82rem;
    color: var(--text-secondary);
    line-height: 1.55;
}
.member-cars-empty a { color: var(--primary); font-weight: 600; text-decoration: none; }
.member-cars-empty a:hover { text-decoration: underline; }

.member-car-card {
    --member-car-accent: var(--primary);
    display: flex;
    align-items: stretch;
    gap: 0.65rem;
    padding: 0.65rem 0.7rem 0.65rem 0.65rem;
    background: var(--card);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-sm);
    cursor: pointer;
    transition: border-color 0.2s, box-shadow 0.2s, transform 0.15s;
    position: relative;
    overflow: hidden;
}
.member-car-card::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 3px;
    background: var(--member-car-accent);
    border-radius: var(--radius-xl) 0 0 var(--radius-xl);
}
.member-car-card[data-brand="toyota"] { --member-car-accent: #eb0a1e; }
.member-car-card[data-brand="byd"] { --member-car-accent: #00a99d; }
.member-car-card[data-brand="tesla"] { --member-car-accent: #e82127; }
.member-car-card[data-brand="honda"] { --member-car-accent: #cc0000; }
.member-car-card[data-brand="isuzu"] { --member-car-accent: #c41230; }
.member-car-card[data-brand="mazda"] { --member-car-accent: #101010; }
.member-car-card[data-brand="ford"] { --member-car-accent: #003478; }
.member-car-card[data-brand="mg"] { --member-car-accent: #c41230; }
.member-car-card[data-brand="nissan"] { --member-car-accent: #c3002f; }
.member-car-card[data-brand="mitsubishi"] { --member-car-accent: #e60012; }
.member-car-card[data-brand="bmw"] { --member-car-accent: #0066b1; }
.member-car-card[data-brand="mercedes"] { --member-car-accent: #00adef; }
.member-car-card:active { transform: scale(0.985); }
.member-car-card:hover {
    border-color: color-mix(in srgb, var(--member-car-accent) 35%, var(--border-light));
    box-shadow: 0 4px 14px rgba(15, 23, 42, 0.08);
}
.member-car-card--forsale {
    border-color: color-mix(in srgb, #dc2626 25%, var(--border-light));
}

.member-car-card-thumb {
    flex: 0 0 88px;
    width: 88px;
    height: 88px;
    border-radius: var(--radius-lg);
    background: linear-gradient(145deg, #f1f5f9 0%, #e2e8f0 100%);
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}
.member-car-card-thumb--photo {
    background-size: cover;
    background-position: center;
}
.member-car-card-thumb-scrim {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent 40%, rgba(15, 23, 42, 0.35) 100%);
    pointer-events: none;
}
.member-car-card-thumb-icon {
    font-size: 1.65rem;
    color: color-mix(in srgb, var(--member-car-accent) 55%, #94a3b8);
    opacity: 0.85;
}
.member-car-card-sale {
    position: absolute;
    top: 0.3rem;
    left: 0.3rem;
    z-index: 1;
    transform: scale(0.82);
    transform-origin: top left;
}
.member-car-card-sale .for-sale-badge { font-size: 0.65rem; padding: 0.1rem 0.3rem; }

.member-car-card-body {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
    padding-top: 0.05rem;
}
.member-car-card-head {
    display: flex;
    align-items: baseline;
    gap: 0.35rem;
    min-width: 0;
}
.member-car-card-title {
    margin: 0;
    font-size: 0.92rem;
    font-weight: 700;
    line-height: 1.25;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    flex: 1;
    min-width: 0;
}
.member-car-card-year {
    font-family: 'Sarabun', sans-serif;
    font-size: 0.72rem;
    font-weight: 600;
    color: var(--text-muted);
    flex-shrink: 0;
}
.member-car-card-plate {
    font-family: 'Sarabun', sans-serif;
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--text-secondary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    letter-spacing: 0.02em;
}
.member-car-card-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.25rem;
    margin-top: 0.1rem;
}
.member-car-card-meta .prestige-ring { font-size: 0.68rem; padding: 0.06rem 0.28rem; }
.member-car-card-chip {
    font-family: 'Sarabun', sans-serif;
    font-size: 0.68rem;
    font-weight: 600;
    color: var(--text-muted);
    background: var(--bg-alt);
    padding: 0.1rem 0.35rem;
    border-radius: var(--radius-full);
    display: inline-flex;
    align-items: center;
    gap: 0.2rem;
    white-space: nowrap;
}
.member-car-card-chip i { font-size: 0.62rem; opacity: 0.85; }
.member-car-card-chip--mileage { color: var(--text-secondary); }
.member-car-card-chip--value { color: #059669; background: #ecfdf5; }

.member-car-card-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.3rem;
    margin-top: 0.35rem;
}
.member-car-card-action {
    font-family: 'Sarabun', sans-serif;
    font-size: 0.68rem;
    font-weight: 700;
    color: var(--text-secondary);
    background: var(--bg);
    border: 1px solid var(--border-light);
    padding: 0.22rem 0.45rem;
    border-radius: var(--radius-full);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.22rem;
    transition: background 0.15s, border-color 0.15s, color 0.15s;
}
.member-car-card-action i { font-size: 0.62rem; color: var(--member-car-accent); }
.member-car-card-action:hover {
    background: color-mix(in srgb, var(--member-car-accent) 8%, var(--bg));
    border-color: color-mix(in srgb, var(--member-car-accent) 30%, var(--border-light));
    color: var(--text);
}

.member-car-card-foot { margin-top: 0.15rem; }
.member-car-card-followers {
    font-family: 'Sarabun', sans-serif;
    font-size: 0.72rem;
    font-weight: 600;
    color: var(--text-muted);
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
}
.member-car-card-followers i { color: #f43f5e; font-size: 0.68rem; }

.member-car-card-chevron {
    flex-shrink: 0;
    align-self: center;
    color: var(--text-muted);
    opacity: 0.45;
    font-size: 0.75rem;
    padding-right: 0.1rem;
}

.member-badges-scroll {
    display: flex;
    gap: 0.45rem;
    overflow-x: auto;
    padding-bottom: 0.25rem;
    scroll-snap-type: x proximity;
    -webkit-overflow-scrolling: touch;
}
.member-badges-scroll .member-badge {
    flex: 0 0 88px;
    scroll-snap-align: start;
    margin-bottom: 0;
}
.missions-tip-card {
    background: linear-gradient(135deg, #fef3c7, #fffbeb);
    border: 1px solid rgba(234, 179, 8, 0.25);
    margin-bottom: 1rem;
}
.missions-tip-inner {
    display: flex;
    gap: 0.75rem;
    align-items: flex-start;
}
.missions-tip-icon {
    font-size: 1.5rem;
    color: #d97706;
    margin-top: 0.1rem;
    flex-shrink: 0;
}
.missions-tip-text {
    font-family: 'Sarabun', sans-serif;
    font-size: 0.85rem;
    color: #92400e;
    line-height: 1.5;
}
.missions-cta-wrap {
    text-align: center;
    margin: 1rem 0 0.5rem;
}
.missions-cta-btn {
    min-width: 220px;
}

.member-badge-summary {
    font-family: 'Sarabun', sans-serif;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-muted);
}

.member-settings { margin-top: 0.25rem; padding-bottom: 0.5rem; }
.member-settings-card {
    background: var(--card);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-xl);
    overflow: hidden;
}
.member-settings-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.85rem 1rem;
    border-bottom: 1px solid var(--border-light);
    font-family: 'Sarabun', sans-serif;
}
.member-settings-row:last-child { border-bottom: none; }
.member-settings-row--stack {
    flex-direction: column;
    align-items: stretch;
    gap: 0.35rem;
}
.member-settings-row--stack .home-pref-options { width: 100%; margin-top: 0.25rem; }
.member-settings-label {
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--text);
}
.member-settings-sublabel {
    font-size: 0.72rem;
    color: var(--text-muted);
    margin-top: 0.1rem;
}
.member-settings .home-pref-options {
    display: flex;
    gap: 0.35rem;
}
.member-settings .home-pref-btn {
    min-height: 36px;
    padding: 0 0.65rem;
    font-size: 0.75rem;
    flex: 1;
}
.member-logout-btn {
    width: 100%;
    margin-top: 0.65rem;
    min-height: 44px;
    font-family: 'Sarabun', sans-serif;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--danger);
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
}
.member-uploads-strip .card { border-radius: var(--radius-lg); }
