* {
    box-sizing: border-box;
}

html,
body {
    margin: 0;
    padding: 0;
    font-family: Inter, Arial, Helvetica, sans-serif;
    background: #f8fafc;
    color: #0f172a;
}

body {
    min-height: 100vh;
}

a {
    color: inherit;
}

img {
    max-width: 100%;
}

button,
input,
select,
textarea {
    font: inherit;
}

.container {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid #e5e7eb;
}

.header-inner {
    height: 72px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    font-weight: 800;
    letter-spacing: 0.02em;
}

.brand-mark {
    width: 38px;
    height: 38px;
    border-radius: 12px;
    background: linear-gradient(135deg, #dbeafe, #e0f2fe);
    color: #2563eb;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    box-shadow: 0 10px 24px rgba(37, 99, 235, 0.12);
}

.brand-text {
    font-size: 1rem;
}

.desktop-nav {
    display: flex;
    align-items: center;
    gap: 20px;
}

.desktop-nav a {
    text-decoration: none;
    color: #334155;
    font-weight: 600;
}

.desktop-nav a:hover {
    color: #0f172a;
}

.nav-btn {
    padding: 10px 16px;
    border-radius: 999px;
    background: #eff6ff;
    color: #1d4ed8 !important;
}

.mobile-menu-toggle {
    display: none;
    width: 44px;
    height: 44px;
    border: 0;
    background: #ffffff;
    border-radius: 12px;
    cursor: pointer;
    padding: 10px;
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.08);
}

.mobile-menu-toggle span {
    display: block;
    height: 2px;
    background: #0f172a;
    margin: 5px 0;
    border-radius: 999px;
}

.mobile-menu {
    display: none;
    border-top: 1px solid #e5e7eb;
    background: #ffffff;
}

.mobile-menu.is-open {
    display: block;
}

.mobile-menu-inner {
    display: flex;
    flex-direction: column;
    padding: 12px 0 16px;
}

.mobile-menu-inner a {
    text-decoration: none;
    padding: 14px 0;
    border-bottom: 1px solid #f1f5f9;
    color: #334155;
    font-weight: 600;
}

.site-main {
    padding: 28px 0 48px;
}

.site-footer {
    border-top: 1px solid #e5e7eb;
    background: #ffffff;
    margin-top: 40px;
}

.footer-inner {
    min-height: 84px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 24px;
    padding: 20px 0;
    flex-wrap: wrap;
}

.footer-brand {
    font-weight: 800;
    margin-bottom: 6px;
}

.footer-text {
    color: #64748b;
    font-size: 0.95rem;
}

.footer-links {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
}

.footer-links a {
    text-decoration: none;
    color: #475569;
}

.alert {
    border-radius: 16px;
    padding: 14px 16px;
    margin-bottom: 20px;
    font-weight: 600;
}

.alert-success {
    background: #ecfdf5;
    color: #047857;
    border: 1px solid #a7f3d0;
}

.alert-error {
    background: #fef2f2;
    color: #b91c1c;
    border: 1px solid #fecaca;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 44px;
    padding: 0 18px;
    border-radius: 14px;
    text-decoration: none;
    border: 1px solid transparent;
    font-weight: 700;
    cursor: pointer;
    transition: 0.2s ease;
}

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

.btn-primary,
.btn {
    background: #0f172a;
    color: #ffffff;
}

.btn-secondary {
    background: #ffffff;
    color: #0f172a;
    border-color: #dbe2ea;
}

.page,
.hero-card,
.home-user-box {
    width: 100%;
}

.hero-card {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 24px;
    padding: 22px;
    box-shadow: 0 16px 40px rgba(15, 23, 42, 0.04);
}

.home-user-box {
    background: #f8fafc;
    border: 1px solid #e5e7eb;
    border-radius: 18px;
    padding: 16px;
    color: #334155;
}

.home-hero {
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    gap: 22px;
    margin-bottom: 28px;
}

.home-hero-content,
.home-hero-panel {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 28px;
    padding: 28px;
    box-shadow: 0 16px 40px rgba(15, 23, 42, 0.04);
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    min-height: 34px;
    padding: 0 12px;
    border-radius: 999px;
    background: #eff6ff;
    color: #1d4ed8;
    font-size: 0.9rem;
    font-weight: 700;
    margin-bottom: 16px;
}

.home-hero-content h1 {
    font-size: clamp(2rem, 4vw, 3.7rem);
    line-height: 1.04;
    margin: 0 0 14px;
}

.home-hero-content p {
    font-size: 1.05rem;
    line-height: 1.75;
    color: #475569;
    max-width: 640px;
    margin: 0 0 20px;
}

.hero-actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.hero-stat-card {
    background: linear-gradient(135deg, #eff6ff, #f8fafc);
    border: 1px solid #dbeafe;
    border-radius: 22px;
    padding: 22px;
    margin-bottom: 14px;
}

.hero-stat-value {
    font-size: 2rem;
    font-weight: 800;
    color: #0f172a;
}

.hero-stat-label {
    color: #475569;
    margin-top: 6px;
}

.hero-mini-card {
    background: #f8fafc;
    border: 1px solid #e5e7eb;
    border-radius: 18px;
    padding: 16px;
    margin-bottom: 12px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.hero-mini-card span {
    color: #64748b;
    line-height: 1.6;
}

.section-block {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 28px;
    padding: 24px;
    box-shadow: 0 16px 40px rgba(15, 23, 42, 0.04);
}

.section-head {
    display: flex;
    justify-content: space-between;
    align-items: end;
    gap: 16px;
    margin-bottom: 18px;
    flex-wrap: wrap;
}

.section-kicker {
    color: #2563eb;
    font-size: 0.9rem;
    font-weight: 700;
    margin-bottom: 6px;
}

.section-head h2 {
    margin: 0;
    font-size: 1.8rem;
}

.empty-state {
    background: #f8fafc;
    border: 1px dashed #cbd5e1;
    border-radius: 20px;
    padding: 28px;
    text-align: center;
}

.empty-state h3 {
    margin-top: 0;
    margin-bottom: 8px;
}

.empty-state p {
    margin: 0;
    color: #64748b;
}

.car-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(270px, 1fr));
    gap: 18px;
}

.car-card {
    display: block;
    text-decoration: none;
    color: inherit;
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 24px;
    overflow: hidden;
    transition: 0.22s ease;
    box-shadow: 0 14px 30px rgba(15, 23, 42, 0.04);
}

.car-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 18px 40px rgba(15, 23, 42, 0.08);
}

.car-card-image-wrap {
    position: relative;
}

.car-card-image {
    width: 100%;
    height: 210px;
    object-fit: cover;
    display: block;
    background: #f1f5f9;
}

.car-card-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    color: #94a3b8;
}

.car-card-badge {
    position: absolute;
    left: 14px;
    top: 14px;
    background: rgba(255, 255, 255, 0.92);
    color: #0f172a;
    font-size: 0.82rem;
    font-weight: 700;
    border-radius: 999px;
    padding: 8px 12px;
    backdrop-filter: blur(8px);
}

.car-card-body {
    padding: 18px;
}

.car-card-body h3 {
    margin: 0 0 10px;
    font-size: 1.08rem;
    line-height: 1.4;
}

.car-card-price {
    font-size: 1.45rem;
    font-weight: 800;
    margin-bottom: 14px;
}

.car-card-price span {
    font-size: 0.95rem;
    font-weight: 600;
    color: #64748b;
}

.car-card-meta {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
}

.car-card-meta div {
    background: #f8fafc;
    border-radius: 16px;
    padding: 12px;
    border: 1px solid #eef2f7;
}

.car-card-meta span {
    display: block;
    font-size: 0.8rem;
    color: #64748b;
    margin-bottom: 6px;
}

.car-card-meta strong {
    font-size: 0.95rem;
    color: #0f172a;
}

.form-shell {
    max-width: 860px;
    margin: 0 auto;
}

.form-page-head {
    margin-bottom: 18px;
}

.form-page-head h1 {
    margin: 0 0 8px 0;
    font-size: 2rem;
}

.form-page-head p {
    margin: 0;
    color: #64748b;
    line-height: 1.7;
}

.form-card {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 24px;
    padding: 24px;
    box-shadow: 0 16px 40px rgba(15, 23, 42, 0.04);
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.form-group-full {
    grid-column: 1 / -1;
}

.form-label {
    font-size: 0.95rem;
    font-weight: 700;
    color: #0f172a;
}

.form-input,
.form-select,
.form-textarea {
    width: 100%;
    min-height: 48px;
    border: 1px solid #dbe2ea;
    border-radius: 16px;
    padding: 0 14px;
    background: #ffffff;
    color: #0f172a;
    font-size: 1rem;
    outline: none;
    transition: 0.2s ease;
}

.form-textarea {
    min-height: 120px;
    padding: 14px;
    resize: vertical;
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
    border-color: #93c5fd;
    box-shadow: 0 0 0 4px rgba(147, 197, 253, 0.22);
}

.form-help {
    font-size: 0.88rem;
    color: #64748b;
    line-height: 1.6;
}

.form-actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    margin-top: 22px;
}

.auth-shell {
    min-height: calc(100vh - 180px);
    display: grid;
    place-items: center;
}

.auth-wrap {
    width: 100%;
    max-width: 1040px;
    display: grid;
    grid-template-columns: 1fr 420px;
    gap: 22px;
    align-items: stretch;
}

.auth-hero,
.auth-card {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 28px;
    padding: 28px;
    box-shadow: 0 16px 40px rgba(15, 23, 42, 0.04);
}

.auth-hero {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.auth-hero h1 {
    margin: 0 0 14px 0;
    font-size: clamp(2rem, 4vw, 3.2rem);
    line-height: 1.05;
}

.auth-hero p {
    margin: 0;
    color: #64748b;
    line-height: 1.8;
    max-width: 540px;
}

.auth-points {
    display: grid;
    gap: 12px;
    margin-top: 24px;
}

.auth-point {
    background: #f8fafc;
    border: 1px solid #e5e7eb;
    border-radius: 18px;
    padding: 16px;
}

.auth-card h2 {
    margin: 0 0 18px 0;
}

.vehicle-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
    gap: 18px;
}

.vehicle-card {
    display: block;
    text-decoration: none;
    color: inherit;
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 24px;
    overflow: hidden;
    box-shadow: 0 14px 30px rgba(15, 23, 42, 0.04);
}

.vehicle-card-body {
    padding: 18px;
}

.vehicle-card h3 {
    margin: 0 0 10px 0;
    line-height: 1.35;
}

.vehicle-card-meta {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    margin-top: 12px;
}

.vehicle-card-meta div {
    background: #f8fafc;
    border: 1px solid #eef2f7;
    border-radius: 16px;
    padding: 12px;
}

.vehicle-card-meta span {
    display: block;
    font-size: 0.82rem;
    color: #64748b;
    margin-bottom: 6px;
}

.vehicle-card-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-top: 16px;
}

.vehicle-card-actions form {
    margin: 0;
}

.section-stack {
    display: grid;
    gap: 20px;
}

.photo-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
    gap: 14px;
}

.photo-card {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 18px;
    overflow: hidden;
}

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

.photo-card-body {
    padding: 12px;
}

.inline-badge {
    display: inline-flex;
    align-items: center;
    min-height: 34px;
    padding: 0 12px;
    border-radius: 999px;
    background: #eff6ff;
    color: #1d4ed8;
    font-size: 0.9rem;
    font-weight: 700;
}

@media (max-width: 960px) {
    .desktop-nav {
        display: none;
    }

    .mobile-menu-toggle {
        display: inline-block;
    }

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

    .site-main {
        padding-top: 20px;
    }

    .auth-wrap {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 640px) {
    .container {
        width: min(100% - 20px, 1180px);
    }

    .header-inner {
        height: 64px;
    }

    .brand-mark {
        width: 34px;
        height: 34px;
        border-radius: 10px;
    }

    .brand-text {
        font-size: 0.95rem;
    }

    .site-main {
        padding-bottom: 28px;
    }

    .home-hero-content,
    .home-hero-panel,
    .section-block,
    .hero-card,
    .form-card,
    .auth-hero,
    .auth-card {
        border-radius: 22px;
        padding: 18px;
    }

    .home-hero-content h1 {
        font-size: 2.1rem;
    }

    .home-hero-content p {
        font-size: 0.98rem;
        line-height: 1.65;
    }

    .hero-actions {
        display: grid;
        grid-template-columns: 1fr;
    }

    .hero-actions .btn,
    .form-actions .btn {
        width: 100%;
    }

    .car-grid {
        grid-template-columns: 1fr;
        gap: 14px;
    }

    .car-card {
        border-radius: 22px;
    }

    .car-card-image {
        height: 220px;
    }

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

    .footer-inner {
        align-items: flex-start;
    }

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

    .form-page-head h1 {
        font-size: 1.7rem;
    }

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

.upload-dropzone {
    border: 1.5px dashed #cbd5e1;
    background: #f8fafc;
    border-radius: 20px;
    padding: 22px;
    text-align: center;
    transition: 0.2s ease;
}

.upload-dropzone.is-dragover {
    border-color: #60a5fa;
    background: #eff6ff;
}

.upload-dropzone h3 {
    margin: 0 0 8px 0;
    font-size: 1.05rem;
}

.upload-dropzone p {
    margin: 0;
    color: #64748b;
    line-height: 1.6;
}

.upload-actions {
    margin-top: 14px;
    display: flex;
    justify-content: center;
    gap: 10px;
    flex-wrap: wrap;
}

.upload-hidden-input {
    display: none;
}

.upload-preview-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
    gap: 14px;
    margin-top: 16px;
}

.upload-preview-card {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 18px;
    overflow: hidden;
    box-shadow: 0 8px 20px rgba(15, 23, 42, 0.04);
}

.upload-preview-card img {
    width: 100%;
    height: 150px;
    object-fit: cover;
    display: block;
    background: #f1f5f9;
}

.upload-preview-body {
    padding: 12px;
}

.upload-preview-name {
    font-size: 0.88rem;
    color: #334155;
    line-height: 1.5;
    word-break: break-word;
    min-height: 42px;
    margin-bottom: 10px;
}

.upload-preview-meta {
    font-size: 0.8rem;
    color: #64748b;
    margin-bottom: 10px;
}

.upload-empty {
    color: #94a3b8;
    font-size: 0.95rem;
    margin-top: 14px;
}

.upload-preview-card {
    position: relative;
}

.upload-preview-card.is-dragging {
    opacity: 0.55;
    transform: scale(0.98);
}

.upload-primary-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    z-index: 2;
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    padding: 0 10px;
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.88);
    color: #ffffff;
    font-size: 0.78rem;
    font-weight: 700;
    backdrop-filter: blur(8px);
}

.upload-drag-hint {
    position: absolute;
    top: 10px;
    right: 10px;
    z-index: 2;
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    padding: 0 10px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.92);
    color: #0f172a;
    font-size: 0.78rem;
    font-weight: 700;
    border: 1px solid #e5e7eb;
}