* {
    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;
    text-decoration: none;
}

img {
    max-width: 100%;
    display: block;
}

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

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

/* ============================= */
/* Header */
/* ============================= */

.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 {
    min-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;
    font-size: 1rem;
}

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

.nav a {
    color: #334155;
    font-weight: 600;
}

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

.header-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

/* ============================= */
/* Footer */
/* ============================= */

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

.footer-grid {
    min-height: 84px;
    display: grid;
    grid-template-columns: 1.3fr 1fr 1fr 1fr;
    gap: 24px;
    padding: 24px 0;
}

.footer h4 {
    margin: 0 0 10px 0;
    font-size: 0.98rem;
}

.footer a {
    display: block;
    color: #475569;
    padding: 6px 0;
}

.footer a:hover {
    color: #0f172a;
}

/* ============================= */
/* Buttons */
/* ============================= */

.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 {
    background: #0f172a;
    color: #ffffff;
}

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

.btn-ghost {
    background: transparent;
    color: #0f172a;
}

/* ============================= */
/* Alerts / Notice */
/* ============================= */

.notice,
.alert {
    border-radius: 16px;
    padding: 14px 16px;
    margin-bottom: 20px;
    font-weight: 600;
    border: 1px solid #e5e7eb;
    background: #f8fafc;
    color: #334155;
}

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

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

/* ============================= */
/* Main spacing */
/* ============================= */

main {
    min-height: calc(100vh - 156px);
}

.section {
    padding: 28px 0 40px;
}

.page-head {
    padding: 28px 0 10px;
}

.page-head h1 {
    margin: 0 0 8px 0;
    font-size: clamp(2rem, 4vw, 3rem);
    line-height: 1.08;
}

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

/* ============================= */
/* Home hero */
/* ============================= */

.hero {
    padding: 28px 0 18px;
}

.hero-shell {
    width: 100%;
}

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

.hero-copy,
.hero-media,
.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);
}

.eyebrow,
.hero-badge,
.tag {
    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;
}

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

.hero-copy p,
.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-media {
    background: linear-gradient(135deg, #eff6ff, #f8fafc);
    min-height: 340px;
}

.hero-stat-card,
.kpi {
    background: linear-gradient(135deg, #eff6ff, #f8fafc);
    border: 1px solid #dbeafe;
    border-radius: 22px;
    padding: 22px;
    box-shadow: 0 16px 40px rgba(15, 23, 42, 0.04);
}

.hero-stat-value,
.kpi strong {
    font-size: 2rem;
    font-weight: 800;
    color: #0f172a;
    display: block;
}

.hero-stat-label,
.kpi span,
.muted {
    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;
}

/* ============================= */
/* Search bar */
/* ============================= */

.search-card {
    margin: 0 0 24px;
}

.search-bar {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 24px;
    padding: 16px;
    box-shadow: 0 16px 40px rgba(15, 23, 42, 0.04);
    display: grid;
    grid-template-columns: 1.1fr 1fr 1fr 0.9fr auto;
    gap: 12px;
}

.search-field {
    display: flex;
    flex-direction: column;
    gap: 8px;
    border: 1px solid #dbe2ea;
    border-radius: 16px;
    padding: 12px 14px;
    background: #ffffff;
}

.search-field label {
    font-size: 0.85rem;
    font-weight: 700;
    color: #64748b;
}

.search-field input,
.search-field select {
    border: 0;
    outline: none;
    background: transparent;
    color: #0f172a;
    padding: 0;
}

/* ============================= */
/* Sections / cards */
/* ============================= */

.section-block,
.detail-section,
.hero-card,
.home-user-box,
.sidebar,
.booking-card,
.auth-hero,
.auth-card,
.form-card {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 28px;
    padding: 24px;
    box-shadow: 0 16px 40px rgba(15, 23, 42, 0.04);
}

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

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

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

.detail-section h3 {
    margin: 0 0 12px 0;
    font-size: 1.08rem;
}

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

/* ============================= */
/* Grid helpers */
/* ============================= */

.grid {
    display: grid;
    gap: 18px;
}

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

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

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

/* ============================= */
/* Listing / card grid */
/* ============================= */

.card,
.car-card,
.vehicle-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);
}

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

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

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

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

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

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

.topline {
    display: flex;
    justify-content: space-between;
    align-items: start;
    gap: 10px;
    margin-bottom: 14px;
}

.bottomline {
    display: flex;
    justify-content: space-between;
    align-items: end;
    gap: 12px;
    margin-top: 16px;
}

.summary {
    color: #64748b;
    line-height: 1.7;
}

.tag-row,
.meta-row {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 10px;
}

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

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

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

.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-placeholder,
.vehicle-card-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    color: #94a3b8;
    background: #f8fafc;
}

.vehicle-card-placeholder {
    min-height: 220px;
    font-weight: 600;
    border-bottom: 1px solid #e5e7eb;
}

.car-card-meta,
.vehicle-card-meta {
    display: grid;
    gap: 10px;
    margin-top: 12px;
}

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

.vehicle-card-meta {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

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

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

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

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

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

/* ============================= */
/* Listing detail */
/* ============================= */

.detail-grid {
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    gap: 20px;
}

.gallery {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 14px;
}

.gallery-main,
.gallery-col .tile,
.listing-photo-frame,
.listing-photo-placeholder {
    border-radius: 18px;
    overflow: hidden;
    background: #f8fafc;
}

.gallery-main {
    min-height: 420px;
    background-size: cover;
    background-position: center;
}

.gallery-col {
    display: grid;
    gap: 14px;
}

.gallery-col .tile {
    min-height: 203px;
    background-size: cover;
    background-position: center;
}

.listing-photo-frame {
    width: 100%;
    height: 420px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.listing-photo-main {
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    object-fit: contain;
}

.listing-photo-placeholder {
    width: 100%;
    height: 420px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #64748b;
    font-weight: 600;
    font-size: 18px;
    text-align: center;
}

.feature-list,
.rule-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.feature-item,
.rule-item,
.booking-box {
    background: #f8fafc;
    border: 1px solid #e5e7eb;
    border-radius: 18px;
    padding: 16px;
}

.booking-card {
    align-self: start;
    position: sticky;
    top: 96px;
}

.booking-price {
    font-size: 2rem;
    font-weight: 800;
    margin-bottom: 6px;
}

.booking-sub {
    color: #64748b;
    margin-bottom: 18px;
}

.form-stack,
.price-breakdown {
    display: grid;
    gap: 12px;
}

.row {
    display: flex;
    justify-content: space-between;
    gap: 16px;
}

.row.total {
    border-top: 1px solid #e5e7eb;
    padding-top: 12px;
    font-weight: 800;
}

/* ============================= */
/* Dashboard */
/* ============================= */

.host-dashboard-columns {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 20px;
}

.kpi {
    width: 100%;
}

.kpi span {
    display: block;
    color: #64748b;
    line-height: 1.6;
}

.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;
}

/* ============================= */
/* Empty state */
/* ============================= */

.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;
}

/* ============================= */
/* Forms */
/* ============================= */

.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-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,
.auth-form input,
.auth-form select,
.form-control {
    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,
.auth-form input:focus,
.auth-form select:focus,
.form-control: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 */
/* ============================= */

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

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

.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;
}

.auth-panel {
    display: flex;
    align-items: center;
    justify-content: center;
}

/* ============================= */
/* Upload */
/* ============================= */

.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 {
    position: relative;
    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.is-dragging {
    opacity: 0.55;
    transform: scale(0.98);
}

.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-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;
}

/* ============================= */
/* Responsive */
/* ============================= */

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

    .hero-grid,
    .home-hero,
    .detail-grid,
    .auth-wrap,
    .host-dashboard-columns,
    .footer-grid {
        grid-template-columns: 1fr;
    }

    .search-bar {
        grid-template-columns: 1fr 1fr;
    }

    .booking-card {
        position: static;
    }
}

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

    .header-inner {
        min-height: 64px;
    }

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

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

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

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

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

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

    .car-grid,
    .card-list,
    .vehicle-grid,
    .grid-3,
    .grid-4,
    .feature-list,
    .rule-list,
    .form-grid,
    .search-bar,
    .car-card-meta,
    .vehicle-card-meta,
    .gallery {
        grid-template-columns: 1fr;
    }

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

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

    .gallery-main,
    .listing-photo-frame,
    .listing-photo-placeholder {
        height: 260px;
        min-height: 260px;
    }

    .gallery-col .tile {
        min-height: 160px;
    }

    .footer-grid {
        gap: 12px;
    }

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