/* ============================================================
   CAR Book — Base Styles
   Mobile-first | BEM naming
   ============================================================ */

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

html {
    font-size: 16px;
    -webkit-text-size-adjust: 100%;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.5;
    color: #1a1a2e;
    background-color: #f5f6fa;
    min-height: 100vh;
}

a {
    color: #2563eb;
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

img {
    max-width: 100%;
    height: auto;
}

/* --- Layout --- */
.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
}

.container--narrow {
    max-width: 480px;
}

.container--medium {
    max-width: 720px;
}

/* --- Page --- */
.page {
    padding: 1.5rem 0;
}

.page__title {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    color: #1a1a2e;
}

.page__subtitle {
    font-size: 1rem;
    color: #64748b;
    margin-bottom: 1rem;
}

/* --- Auth Layout --- */
.auth {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 1rem;
}

.auth__card {
    width: 100%;
    max-width: 420px;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.08);
    padding: 2rem 1.5rem;
}

.auth__logo {
    text-align: center;
    margin-bottom: 1.5rem;
}

.auth__logo-text {
    font-size: 1.75rem;
    font-weight: 800;
    color: #2563eb;
}

.auth__title {
    font-size: 1.25rem;
    font-weight: 600;
    text-align: center;
    margin-bottom: 1.5rem;
    color: #1a1a2e;
}

.auth__footer {
    text-align: center;
    margin-top: 1.5rem;
    font-size: 0.875rem;
    color: #64748b;
}

.auth__footer a {
    font-weight: 500;
}

.auth__divider {
    display: flex;
    align-items: center;
    margin: 1rem 0;
    color: #94a3b8;
    font-size: 0.875rem;
}

.auth__divider::before,
.auth__divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: #e2e8f0;
}

.auth__divider span {
    padding: 0 0.75rem;
}

/* --- Form --- */
.form__group {
    margin-bottom: 1rem;
}

.form__label {
    display: block;
    font-size: 0.875rem;
    font-weight: 500;
    color: #374151;
    margin-bottom: 0.375rem;
}

.form__label--required::after {
    content: ' *';
    color: #ef4444;
}

.form__input,
.form__select,
.form__textarea {
    width: 100%;
    padding: 0.625rem 0.75rem;
    font-size: 1rem;
    line-height: 1.5;
    color: #1a1a2e;
    background: #fff;
    border: 1.5px solid #d1d5db;
    border-radius: 8px;
    transition: border-color 0.2s, box-shadow 0.2s;
    appearance: none;
}

.form__input:focus,
.form__select:focus,
.form__textarea:focus {
    outline: none;
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}

.form__input::placeholder {
    color: #9ca3af;
}

.form__input--error,
.form__select--error {
    border-color: #ef4444;
}

.form__input--error:focus,
.form__select--error:focus {
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.15);
}

.form__error {
    display: none;
    font-size: 0.8125rem;
    color: #ef4444;
    margin-top: 0.25rem;
}

.form__error--visible {
    display: block;
}

.form__hint {
    font-size: 0.8125rem;
    color: #64748b;
    margin-top: 0.25rem;
}

.form__select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%236b7280' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.75rem center;
    padding-right: 2.25rem;
}

.form__textarea {
    min-height: 80px;
    resize: vertical;
}

/* --- Form Section (for multi-section forms) --- */
.form__section {
    margin-bottom: 1.5rem;
}

.form__section-title {
    font-size: 1rem;
    font-weight: 600;
    color: #1a1a2e;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid #e2e8f0;
}

/* --- Checkbox group (specializations) --- */
.checkbox-group {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.5rem;
}

.checkbox-group__item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem;
    border: 1.5px solid #e2e8f0;
    border-radius: 8px;
    cursor: pointer;
    transition: border-color 0.2s, background-color 0.2s;
}

.checkbox-group__item:hover {
    border-color: #2563eb;
    background-color: #f0f5ff;
}

.checkbox-group__item input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: #2563eb;
}

.checkbox-group__item--checked {
    border-color: #2563eb;
    background-color: #eff6ff;
}

.checkbox-group__label {
    font-size: 0.875rem;
    color: #374151;
    cursor: pointer;
}

/* --- Buttons --- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.625rem 1.25rem;
    font-size: 1rem;
    font-weight: 500;
    line-height: 1.5;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: background-color 0.2s, opacity 0.2s;
    text-decoration: none;
}

.btn:hover {
    text-decoration: none;
}

.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.btn--primary {
    color: #fff;
    background-color: #2563eb;
}

.btn--primary:hover:not(:disabled) {
    background-color: #1d4ed8;
}

.btn--secondary {
    color: #374151;
    background-color: #e5e7eb;
}

.btn--secondary:hover:not(:disabled) {
    background-color: #d1d5db;
}

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

.btn--danger:hover:not(:disabled) {
    background-color: #dc2626;
}

.btn--outline {
    color: #2563eb;
    background-color: transparent;
    border: 1.5px solid #2563eb;
}

.btn--outline:hover:not(:disabled) {
    background-color: #eff6ff;
}

.btn--full {
    width: 100%;
}

.btn--sm {
    padding: 0.375rem 0.75rem;
    font-size: 0.875rem;
}

.btn--loading {
    position: relative;
    color: transparent !important;
}

.btn--loading::after {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: #fff;
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
}

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

/* --- Notifications --- */
.notification {
    position: fixed;
    top: 1rem;
    right: 1rem;
    left: 1rem;
    max-width: 480px;
    margin: 0 auto;
    padding: 0.875rem 1rem;
    border-radius: 8px;
    font-size: 0.9375rem;
    font-weight: 500;
    z-index: 9999;
    animation: slideDown 0.3s ease-out;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.notification--error {
    color: #991b1b;
    background-color: #fef2f2;
    border: 1px solid #fecaca;
}

.notification--success {
    color: #166534;
    background-color: #f0fdf4;
    border: 1px solid #bbf7d0;
}

.notification--info {
    color: #1e40af;
    background-color: #eff6ff;
    border: 1px solid #bfdbfe;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-1rem);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* --- Navigation --- */
.nav {
    background: #fff;
    border-bottom: 1px solid #e2e8f0;
    padding: 0 1rem;
}

.nav__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    max-width: 1200px;
    margin: 0 auto;
    height: 56px;
}

.nav__brand {
    font-size: 1.125rem;
    font-weight: 700;
    color: #2563eb;
}

.nav__brand:hover {
    text-decoration: none;
}

.nav__links {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    list-style: none;
}

.nav__link {
    padding: 0.5rem 0.75rem;
    font-size: 0.875rem;
    font-weight: 500;
    color: #64748b;
    border-radius: 6px;
    transition: color 0.2s, background-color 0.2s;
}

.nav__link:hover {
    color: #1a1a2e;
    background-color: #f1f5f9;
    text-decoration: none;
}

.nav__link--active {
    color: #2563eb;
    background-color: #eff6ff;
}

.nav__link--logout {
    color: #ef4444;
}

.nav__link--logout:hover {
    background-color: #fef2f2;
    color: #dc2626;
}

/* --- Cards --- */
.card {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
    padding: 1.5rem;
    margin-bottom: 1rem;
}

.card__title {
    font-size: 1.125rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
}

/* --- Empty State --- */
.empty-state {
    text-align: center;
    padding: 3rem 1rem;
    color: #64748b;
}

.empty-state__icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.empty-state__text {
    font-size: 1rem;
    margin-bottom: 1rem;
}

/* --- Utility --- */
.text-center { text-align: center; }
.text-muted { color: #64748b; }
.text-sm { font-size: 0.875rem; }
.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.hidden { display: none !important; }

/* --- Responsive --- */
@media (min-width: 640px) {
    .auth__card {
        padding: 2.5rem 2rem;
    }

    .checkbox-group {
        grid-template-columns: 1fr 1fr;
    }
}

@media (min-width: 768px) {
    .page__title {
        font-size: 1.75rem;
    }

    .checkbox-group {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* ============================================================
   Garage Theme — Dark (Client Dashboard)
   ============================================================ */

/* --- Theme Variables --- */
.garage-theme {
    --bg: #0D0F14;
    --card: #161923;
    --card-hover: #1C2030;
    --glass: rgba(255, 255, 255, 0.04);
    --glass-border: rgba(255, 255, 255, 0.08);
    --text: #E8EAF0;
    --text-sec: rgba(255, 255, 255, 0.45);
    --text-ter: rgba(255, 255, 255, 0.25);
    --accent: #4A9EFF;
    --green: #3DDC84;
    --amber: #FFB74D;
    --red: #FF5252;
    --screen-bg: #0A0C10;

    background: var(--screen-bg);
    color: var(--text);
}

/* --- Garage Layout --- */
.garage {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    max-width: 540px;
    margin: 0 auto;
    position: relative;
}

/* --- Garage Header --- */
.garage-header {
    background: linear-gradient(160deg, var(--bg), var(--card), #0f1520);
    border-radius: 0 0 24px 24px;
    padding: 48px 20px 18px;
    position: relative;
}

.garage-header__welcome {
    font-size: 12px;
    color: var(--text-ter);
}

.garage-header__name {
    font-size: 21px;
    font-weight: 800;
    color: var(--text);
    letter-spacing: -0.5px;
    margin-top: 2px;
}

/* --- Garage Content --- */
.garage-content {
    flex: 1;
    padding: 14px 16px 100px;
}

.garage-content__title {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.garage-content__title h3 {
    font-size: 15px;
    font-weight: 700;
    color: var(--text);
}

.garage-content__add {
    background: var(--glass);
    border: 1px solid rgba(74, 158, 255, 0.19);
    color: var(--accent);
    border-radius: 10px;
    padding: 6px 12px;
    font-size: 11px;
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    text-decoration: none;
    transition: background 0.2s;
}

.garage-content__add:hover {
    background: rgba(74, 158, 255, 0.1);
    text-decoration: none;
}

/* --- Car Card --- */
.car-card {
    background: var(--card);
    border-radius: 20px;
    overflow: hidden;
    margin-bottom: 10px;
    border: 1px solid var(--glass-border);
    cursor: pointer;
    transition: background 0.2s;
}

.car-card:hover {
    background: var(--card-hover);
}

.car-card__header {
    padding: 14px 16px 10px;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
}

.car-card__name {
    font-weight: 700;
    font-size: 17px;
    color: var(--text);
    letter-spacing: -0.3px;
}

.car-card__sub {
    font-size: 11px;
    color: var(--text-sec);
    margin-top: 2px;
}

.car-card__status {
    display: flex;
    align-items: center;
    gap: 5px;
}

.car-card__tags {
    padding: 4px 16px 14px;
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

/* --- Tags --- */
.tag {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: var(--glass);
    border: 1px solid var(--glass-border);
    border-radius: 8px;
    padding: 3px 9px;
    font-size: 11px;
    font-weight: 600;
    color: var(--text-sec);
}

.tag--green {
    color: var(--green);
    background: rgba(61, 220, 132, 0.12);
    border-color: rgba(61, 220, 132, 0.2);
}

.tag--amber {
    color: var(--amber);
    background: rgba(255, 183, 77, 0.12);
    border-color: rgba(255, 183, 77, 0.2);
}

.tag--red {
    color: var(--red);
    background: rgba(255, 82, 82, 0.12);
    border-color: rgba(255, 82, 82, 0.2);
}

/* --- Tab Bar --- */
.tab-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: 72px;
    background: var(--bg);
    border-top: 1px solid var(--glass-border);
    display: flex;
    align-items: flex-start;
    justify-content: space-around;
    padding-top: 10px;
    z-index: 50;
    max-width: 540px;
    margin: 0 auto;
}

@supports (padding-bottom: env(safe-area-inset-bottom)) {
    .tab-bar {
        padding-bottom: env(safe-area-inset-bottom);
    }
}

.tab-bar__item {
    background: none;
    border: none;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3px;
    cursor: pointer;
    opacity: 0.35;
    transition: opacity 0.2s;
    text-decoration: none;
    padding: 0;
    font-family: inherit;
}

.tab-bar__item:hover {
    text-decoration: none;
    opacity: 0.6;
}

.tab-bar__item--active {
    opacity: 1;
}

.tab-bar__icon {
    width: 38px;
    height: 38px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
}

.tab-bar__item--active .tab-bar__icon {
    background: var(--accent);
}

.tab-bar__label {
    font-size: 9px;
    font-weight: 600;
    color: var(--text-sec);
}

.tab-bar__item--active .tab-bar__label {
    color: var(--accent);
}

/* --- Garage Empty State --- */
.garage-theme .empty-state {
    color: var(--text-sec);
    padding: 4rem 1rem;
}

.garage-theme .empty-state .btn--primary {
    background: var(--accent);
}

/* --- Garage Notification Override --- */
.garage-theme .notification--error {
    background: rgba(255, 82, 82, 0.15);
    border-color: rgba(255, 82, 82, 0.3);
    color: var(--red);
}

.garage-theme .notification--success {
    background: rgba(61, 220, 132, 0.15);
    border-color: rgba(61, 220, 132, 0.3);
    color: var(--green);
}

/* --- Garage Page Header (with back button) --- */
.garage-page-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 48px 20px 18px;
    background: linear-gradient(160deg, var(--bg), var(--card), #0f1520);
    border-radius: 0 0 24px 24px;
}

.garage-page-header__back {
    background: var(--glass);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: var(--text-sec);
    text-decoration: none;
    font-size: 16px;
    transition: background 0.2s;
}

.garage-page-header__back:hover {
    background: var(--card-hover);
    text-decoration: none;
}

.garage-page-header__title {
    font-size: 19px;
    font-weight: 700;
    color: var(--text);
}

/* --- Dark Form --- */
.garage-theme .form__label {
    font-size: 10px;
    font-weight: 700;
    color: var(--text-ter);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 6px;
}

.garage-theme .form__label--required::after {
    color: var(--red);
}

.garage-theme .form__input,
.garage-theme .form__select,
.garage-theme .form__textarea {
    background-color: var(--card);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    color: var(--text);
    font-size: 13px;
    font-weight: 500;
    padding: 0 12px;
    height: 44px;
}

.garage-theme .form__textarea {
    height: auto;
    padding: 10px 12px;
}

.garage-theme .form__select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23888' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
}

.garage-theme .form__input:focus,
.garage-theme .form__select:focus,
.garage-theme .form__textarea:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(74, 158, 255, 0.15);
}

.garage-theme .form__input::placeholder {
    color: var(--text-ter);
}

.garage-theme .form__hint {
    color: var(--text-ter);
}

.garage-theme .form__error {
    color: var(--red);
}

.garage-theme .form__input--error,
.garage-theme .form__select--error {
    border-color: var(--red);
}

.garage-theme .form__input--error:focus,
.garage-theme .form__select--error:focus {
    box-shadow: 0 0 0 3px rgba(255, 82, 82, 0.15);
}

/* --- Dark Card --- */
.garage-theme .card {
    background: transparent;
    box-shadow: none;
    padding: 0;
}

/* --- Gradient Submit Button --- */
.btn--gradient {
    background: linear-gradient(135deg, var(--accent), #3A8AE0);
    color: #fff;
    border: none;
    border-radius: 14px;
    padding: 14px;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 8px 24px rgba(74, 158, 255, 0.12);
    transition: opacity 0.2s;
}

.btn--gradient:hover:not(:disabled) {
    opacity: 0.9;
}

.btn--gradient:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.btn--gradient.btn--loading::after {
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: #fff;
}

/* --- Dark Link --- */
.garage-theme .text-muted {
    color: var(--text-ter);
}

.garage-theme a.text-muted:hover {
    color: var(--text-sec);
}

/* --- Profile Card --- */
.profile-card {
    text-align: center;
    padding: 20px 0 24px;
}

.profile-card__avatar {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--accent), #3A8AE0);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 12px;
    font-size: 24px;
    font-weight: 800;
    color: #fff;
}

.profile-card__name {
    font-size: 19px;
    font-weight: 700;
    color: var(--text);
}

.profile-card__role {
    font-size: 12px;
    color: var(--text-ter);
    margin-top: 2px;
}

/* --- Profile Menu --- */
.profile-menu {
    display: flex;
    flex-direction: column;
    gap: 2px;
    background: var(--card);
    border-radius: 16px;
    overflow: hidden;
    border: 1px solid var(--glass-border);
}

.profile-menu__item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    color: var(--text);
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    background: none;
    border: none;
    width: 100%;
    cursor: pointer;
    font-family: inherit;
    transition: background 0.2s;
}

.profile-menu__item:hover {
    background: var(--glass);
    text-decoration: none;
}

.profile-menu__item span {
    flex: 1;
    text-align: left;
}

.profile-menu__chevron {
    color: var(--text-ter);
}

.profile-menu__item--danger {
    color: var(--red);
}

/* --- Car Header (timeline page) --- */
.car-header__info {
    flex: 1;
}

.car-header__name {
    font-size: 19px;
    font-weight: 700;
    color: var(--text);
}

.car-header__details {
    font-size: 11px;
    color: var(--text-sec);
    margin-top: 2px;
}

.car-header__photo {
    margin-top: 8px;
    border-radius: 10px;
    overflow: hidden;
    display: flex;
    justify-content: center;
}

.car-header__photo img {
    width: 100%;
    height: 90px;
    object-fit: cover;
    object-position: center 60%;
    border-radius: 10px;
}

/* --- Timeline --- */
.timeline-entry {
    display: flex;
    gap: 10px;
    margin-bottom: 4px;
}

.timeline-entry__line {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 28px;
}

.timeline-entry__dot {
    width: 28px;
    height: 28px;
    border-radius: 8px;
    background: rgba(61, 220, 132, 0.15);
    border: 1px solid rgba(61, 220, 132, 0.19);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.timeline-entry__dot--pending {
    background: rgba(255, 183, 77, 0.15);
    border-color: rgba(255, 183, 77, 0.19);
}

.timeline-entry__connector {
    width: 1px;
    flex: 1;
    background: linear-gradient(var(--glass-border), transparent);
    margin-top: 3px;
}

.timeline-entry__card {
    flex: 1;
    background: var(--card);
    border-radius: 16px;
    padding: 12px;
    margin-bottom: 6px;
    border: 1px solid var(--glass-border);
}

.timeline-entry__top {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
}

.timeline-entry__date {
    font-size: 11px;
    color: var(--text-ter);
    font-weight: 500;
}

.timeline-entry__desc {
    font-weight: 600;
    font-size: 13px;
    color: var(--text);
    margin: 5px 0 6px;
}

.timeline-entry__tags {
    display: flex;
    gap: 5px;
    flex-wrap: wrap;
}

.tag--accent {
    color: var(--accent);
    background: rgba(74, 158, 255, 0.12);
    border-color: rgba(74, 158, 255, 0.2);
}

/* --- Repair Form: Car Chip --- */
.car-chip {
    display: flex;
    align-items: center;
    gap: 6px;
    background: var(--card);
    border: 1px solid var(--glass-border);
    border-radius: 10px;
    padding: 6px 10px;
}

.car-chip__name {
    font-size: 12px;
    font-weight: 600;
    color: var(--text);
}

/* --- Photo Upload --- */
.photo-upload {
    position: relative;
    cursor: pointer;
}

.photo-upload__input {
    position: absolute;
    inset: 0;
    opacity: 0;
    cursor: pointer;
    z-index: 2;
}

.photo-upload__placeholder {
    background: var(--card);
    border: 1px dashed var(--glass-border);
    border-radius: 14px;
    padding: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    color: var(--text-ter);
    transition: border-color 0.2s;
}

.photo-upload:hover .photo-upload__placeholder {
    border-color: var(--accent);
}

.photo-upload__text {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-sec);
}

.photo-upload__hint {
    font-size: 10px;
    color: var(--text-ter);
}

.photo-upload__preview {
    position: relative;
    border-radius: 14px;
    overflow: hidden;
    border: 1px solid var(--glass-border);
}

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

.photo-upload__remove {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.7);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #fff;
    font-size: 16px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 3;
    transition: background 0.2s;
}

.photo-upload__remove:hover {
    background: var(--red);
}

/* --- Car Card Photo --- */
.car-card__photo {
    position: relative;
    padding: 8px 12px 0;
    display: flex;
    justify-content: center;
    overflow: hidden;
}

.car-card__photo img {
    width: 100%;
    height: 130px;
    object-fit: cover;
    object-position: center 60%;
    display: block;
    border-radius: 4px;
}

.car-card__photo::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 50%;
    background: linear-gradient(transparent, var(--card));
    pointer-events: none;
}

/* --- Photo Lightbox --- */
.photo-lightbox {
    position: fixed;
    inset: 0;
    z-index: 10000;
    background: rgba(0, 0, 0, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    animation: fadeIn 0.2s ease-out;
}

.photo-lightbox img {
    max-width: 100%;
    max-height: 90vh;
    object-fit: contain;
    border-radius: 8px;
}

.photo-lightbox__close {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.25);
    color: #fff;
    font-size: 20px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10001;
    transition: background 0.2s;
}

.photo-lightbox__close:hover {
    background: rgba(255, 82, 82, 0.7);
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* --- Timeline Photo Button --- */
.timeline-photo-btn {
    cursor: pointer;
    font-family: inherit;
    transition: opacity 0.2s;
}

.timeline-photo-btn:hover {
    opacity: 0.8;
}
