:root {
    --hw-red:        #e31937;
    --hw-red-dark:   #c0152e;
    --hw-yellow:     #ffd700;
    --sidebar-bg:    #090d16;
    --sidebar-text:  #a0a3b1;
    --sidebar-active:#e31937;
    --topbar-h:      64px;
    --sidebar-w:     260px;
    --body-bg:       #eef2f8;
    --card-shadow:   0 2px 16px rgba(0,0,0,0.08);
    --card-radius:   14px;
}

/* ===================== RESET & BASE ===================== */
*, *::before, *::after { box-sizing: border-box; }
body {
    font-family: 'Segoe UI', -apple-system, BlinkMacSystemFont, sans-serif;
    background: radial-gradient(circle at 12% -20%, #fff7e8 0%, rgba(255,247,232,0) 38%), radial-gradient(circle at 88% -12%, #ffe0d7 0%, rgba(255,224,215,0) 34%), var(--body-bg);
    color: #333;
    margin: 0;
    font-size: 14px;
}
a { text-decoration: none; color: inherit; }
img { max-width: 100%; }

/* ===================== LAYOUT ===================== */
#sidebar {
    position: fixed;
    top: 0; left: 0;
    width: var(--sidebar-w);
    height: 100vh;
    background: linear-gradient(180deg, #090d16 0%, #101a2a 70%, #101c33 100%);
    z-index: 1000;
    display: flex;
    flex-direction: column;
    transition: transform 0.3s ease;
    overflow-y: auto;
}

#main-content {
    margin-left: var(--sidebar-w);
    width: calc(100% - var(--sidebar-w));
    max-width: calc(100vw - var(--sidebar-w));
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    transition: margin 0.3s ease;
    overflow-x: hidden;
}

/* ===================== SIDEBAR BRAND ===================== */
.sidebar-brand {
    padding: 14px;
    border-bottom: 1px solid rgba(255,255,255,0.07);
    display: flex;
    justify-content: center;
    flex-shrink: 0;
}
.sidebar-brand .brand-logo {
    width: 100%;
    max-width: 220px;
    border-radius: 14px;
    background: linear-gradient(145deg, rgba(255,255,255,0.12), rgba(255,255,255,0.02));
    border: 1px solid rgba(255,255,255,0.12);
    box-shadow: 0 10px 30px rgba(0,0,0,0.35), inset 0 0 0 1px rgba(255,255,255,0.04);
    padding: 6px;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.sidebar-brand .brand-logo:hover {
    transform: translateY(-1px);
    box-shadow: 0 14px 34px rgba(0,0,0,0.45), 0 0 0 1px rgba(255,209,0,0.22);
}
.sidebar-brand .brand-logo img {
    width: 100%;
    max-height: 74px;
    object-fit: contain;
    border-radius: 9px;
}

/* ===================== SIDEBAR NAV ===================== */
.sidebar-scroll { flex: 1; overflow-y: auto; padding: 12px 0; }
.sidebar-scroll::-webkit-scrollbar { width: 4px; }
.sidebar-scroll::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.1); border-radius: 2px; }

.nav-section {
    padding: 14px 22px 5px;
    font-size: 0.65rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.2px;
    color: rgba(255,255,255,0.3);
}

.sidebar-nav a {
    display: flex;
    align-items: center;
    gap: 11px;
    padding: 10px 22px;
    color: var(--sidebar-text);
    font-size: 0.875rem;
    font-weight: 500;
    transition: all 0.2s;
    border-left: 3px solid transparent;
    position: relative;
}
.sidebar-nav a i {
    width: 18px;
    text-align: center;
    font-size: 0.9rem;
    flex-shrink: 0;
}
.sidebar-nav a:hover {
    color: #fff;
    background: rgba(255,255,255,0.05);
    border-left-color: rgba(255,255,255,0.3);
}
.sidebar-nav a.active {
    color: #fff;
    background: rgba(227,25,55,0.15);
    border-left-color: var(--hw-red);
}
.sidebar-nav a .badge {
    margin-left: auto;
    background: var(--hw-red);
    font-size: 0.65rem;
}

.sidebar-footer {
    border-top: 1px solid rgba(255,255,255,0.07);
    padding: 14px 22px;
    flex-shrink: 0;
}
.sidebar-footer .user-info { display: flex; align-items: center; gap: 10px; }
.sidebar-footer .user-avatar {
    width: 34px; height: 34px;
    border-radius: 50%;
    object-fit: cover;
    background: var(--hw-red);
    display: flex; align-items: center; justify-content: center;
    color: #fff; font-weight: 700; font-size: 0.8rem;
    flex-shrink: 0;
}
.sidebar-footer .user-name {
    font-size: 0.825rem;
    font-weight: 600;
    color: #fff;
    line-height: 1.2;
}
.sidebar-footer .user-role {
    font-size: 0.68rem;
    color: rgba(255,255,255,0.35);
}

/* ===================== TOPBAR ===================== */
.topbar {
    height: var(--topbar-h);
    background: rgba(255,255,255,0.88);
    backdrop-filter: blur(14px);
    box-shadow: 0 1px 0 rgba(0,0,0,0.06);
    display: flex;
    align-items: center;
    padding: 0 24px;
    gap: 12px;
    position: sticky;
    top: 0;
    z-index: 99;
    flex-shrink: 0;
}
.topbar .sidebar-toggle {
    background: none; border: none; cursor: pointer;
    width: 36px; height: 36px;
    border-radius: 8px;
    display: flex; align-items: center; justify-content: center;
    color: #666; font-size: 1rem;
    transition: background 0.2s;
}
.topbar .sidebar-toggle:hover { background: var(--body-bg); color: #333; }
.topbar .page-title-area { flex: 1; min-width: 0; }
.topbar .page-title { font-size: 1rem; font-weight: 700; color: #222; margin: 0; }
.topbar .page-breadcrumb { font-size: 0.75rem; color: #888; margin: 0; }
.topbar .topbar-right { display: flex; align-items: center; gap: 8px; margin-left: auto; flex-shrink: 0; }

.topbar-icon-btn {
    background: none; border: none; cursor: pointer;
    width: 38px; height: 38px;
    border-radius: 10px;
    display: flex; align-items: center; justify-content: center;
    color: #666; font-size: 1rem;
    transition: all 0.2s; position: relative;
}
.topbar-icon-btn:hover { background: var(--body-bg); color: var(--hw-red); }

.topbar-user {
    display: flex; align-items: center; gap: 9px;
    cursor: pointer;
    padding: 5px 10px;
    border-radius: 10px;
    transition: background 0.2s;
}
.topbar-user:hover { background: var(--body-bg); }
.topbar-user img, .topbar-user .user-initials {
    width: 34px; height: 34px;
    border-radius: 50%;
    object-fit: cover;
}
.topbar-user .user-initials {
    background: var(--hw-red);
    color: #fff;
    font-weight: 700;
    font-size: 0.8rem;
    display: flex; align-items: center; justify-content: center;
}
.topbar-user .name { font-size: 0.85rem; font-weight: 600; color: #333; }
.topbar-user .role { font-size: 0.7rem; color: #888; }

/* ===================== CONTENT AREA ===================== */
.content-area {
    padding: 24px;
    flex: 1;
}

/* ===================== PAGE HEADER ===================== */
.page-header {
    display: flex; align-items: center; justify-content: space-between;
    margin-bottom: 24px;
    flex-wrap: wrap; gap: 12px;
}
.page-header h1 {
    font-size: 1.35rem;
    font-weight: 800;
    color: #1a1c23;
    margin: 0;
}
.page-header .subtitle {
    font-size: 0.8rem; color: #888; margin: 2px 0 0;
}

/* ===================== STAT CARDS ===================== */
.stat-card {
    background: #fff;
    border-radius: var(--card-radius);
    box-shadow: 0 8px 26px rgba(13, 18, 28, 0.08);
    padding: 22px;
    display: flex; align-items: center; gap: 16px;
    border: 1px solid rgba(0,0,0,0.04);
    transition: transform 0.2s, box-shadow 0.2s;
}
.stat-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 14px 36px rgba(0,0,0,0.16);
}
.stat-icon {
    width: 54px; height: 54px;
    border-radius: 14px;
    display: flex; align-items: center; justify-content: center;
    font-size: 1.4rem; color: #fff; flex-shrink: 0;
}
.stat-icon.red    { background: linear-gradient(135deg, #e31937, #c0152e); }
.stat-icon.blue   { background: linear-gradient(135deg, #0d6efd, #0a58ca); }
.stat-icon.green  { background: linear-gradient(135deg, #28a745, #1e7e34); }
.stat-icon.orange { background: linear-gradient(135deg, #fd7e14, #e96b02); }
.stat-icon.purple { background: linear-gradient(135deg, #6f42c1, #59339d); }
.stat-icon.teal   { background: linear-gradient(135deg, #20c997, #12a17a); }

.stat-info { flex: 1; min-width: 0; }
.stat-value {
    font-size: 1.75rem;
    font-weight: 800;
    color: #1a1c23;
    line-height: 1;
    margin-bottom: 3px;
}
.stat-label { font-size: 0.78rem; color: #888; font-weight: 500; }
.stat-change {
    font-size: 0.72rem; font-weight: 600;
    display: flex; align-items: center; gap: 3px;
    margin-top: 4px;
}
.stat-change.up { color: #28a745; }
.stat-change.down { color: #dc3545; }

/* ===================== CARDS ===================== */
.hw-card {
    background: #fff;
    border-radius: var(--card-radius);
    box-shadow: 0 10px 28px rgba(13, 18, 28, 0.08);
    border: 1px solid rgba(0,0,0,0.04);
}
.hw-card-header {
    padding: 18px 22px;
    border-bottom: 1px solid #f0f0f0;
    display: flex; align-items: center; justify-content: space-between;
    flex-wrap: wrap; gap: 8px;
}
.hw-card-header h5 {
    font-size: 0.95rem; font-weight: 700; color: #222; margin: 0;
    display: flex; align-items: center; gap: 8px;
}
.hw-card-body { padding: 22px; }
.hw-card-footer { padding: 14px 22px; border-top: 1px solid #f0f0f0; }

/* ===================== TABLES ===================== */
.table-hover tbody tr { transition: background 0.15s; }
.table thead th {
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #888;
    border-bottom: 2px solid #f0f0f0;
    padding: 10px 12px;
    white-space: nowrap;
    background: #fafafa;
}
.table tbody td { padding: 11px 12px; vertical-align: middle; font-size: 0.875rem; }
.table tbody tr:last-child td { border-bottom: none; }

/* ===================== BUTTONS ===================== */
.btn-hw-red {
    background: var(--hw-red);
    border-color: var(--hw-red);
    color: #fff;
    font-weight: 600;
}
.btn-hw-red:hover { background: var(--hw-red-dark); border-color: var(--hw-red-dark); color: #fff; }
.btn-hw-red:focus { box-shadow: 0 0 0 0.2rem rgba(227,25,55,0.3); }

.btn-action {
    width: 30px; height: 30px;
    border-radius: 7px;
    border: none; cursor: pointer;
    display: inline-flex; align-items: center; justify-content: center;
    font-size: 0.8rem; transition: all 0.2s;
    text-decoration: none;
}
.btn-action.edit   { background: #e8f0fe; color: #1a73e8; }
.btn-action.delete { background: #fce8e6; color: #d93025; }
.btn-action.view   { background: #e6f4ea; color: #188038; }
.btn-action:hover { opacity: 0.8; transform: scale(1.1); }

/* ===================== FORMS ===================== */
.form-label { font-weight: 600; font-size: 0.85rem; color: #444; margin-bottom: 5px; }
.form-control, .form-select {
    border-radius: 9px;
    border: 1.5px solid #e0e0e0;
    font-size: 0.875rem;
    padding: 9px 12px;
    transition: border-color 0.2s, box-shadow 0.2s;
}
.form-control:focus, .form-select:focus {
    border-color: var(--hw-red);
    box-shadow: 0 0 0 0.2rem rgba(227,25,55,0.15);
}
.form-control.is-invalid { border-color: #dc3545; }
.input-group-text { border-radius: 9px; font-size: 0.875rem; }

/* ===================== BADGES ===================== */
.badge { font-size: 0.7rem; font-weight: 600; padding: 4px 8px; border-radius: 6px; }

/* ===================== AVATAR ===================== */
.avatar {
    width: 36px; height: 36px;
    border-radius: 50%;
    object-fit: cover;
    background: var(--hw-red);
    color: #fff;
    display: inline-flex; align-items: center; justify-content: center;
    font-weight: 700; font-size: 0.8rem; flex-shrink: 0;
}
.avatar.lg { width: 56px; height: 56px; font-size: 1.1rem; }
.avatar.xl { width: 80px; height: 80px; font-size: 1.4rem; }

/* ===================== CAR CARD ===================== */
.car-card {
    background: #fff;
    border-radius: var(--card-radius);
    box-shadow: var(--card-shadow);
    border: 1px solid rgba(0,0,0,0.04);
    transition: transform 0.2s, box-shadow 0.2s;
    overflow: hidden;
}
.car-card:hover { transform: translateY(-4px); box-shadow: 0 10px 30px rgba(0,0,0,0.13); }
.car-card .car-photo {
    height: 160px;
    object-fit: cover;
    width: 100%;
    background: #f5f5f5;
    display: block;
}
.car-card .car-photo-placeholder {
    height: 160px;
    background: linear-gradient(135deg, #f5f5f5, #ebebeb);
    display: flex; align-items: center; justify-content: center;
    color: #ccc; font-size: 2.5rem;
}
.car-card .car-body { padding: 14px 16px 12px; }
.car-card .car-title {
    font-size: 0.9rem; font-weight: 700; color: #222;
    margin: 0 0 4px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.car-card .car-meta { font-size: 0.75rem; color: #888; display: flex; gap: 8px; flex-wrap: wrap; }
.car-card .car-footer {
    padding: 10px 16px;
    border-top: 1px solid #f5f5f5;
    display: flex; align-items: center; justify-content: space-between;
}

/* ===================== PHOTO UPLOAD ===================== */
.photo-upload-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
}
.photo-slot {
    border: 2px dashed #ddd;
    border-radius: 10px;
    aspect-ratio: 1;
    display: flex; flex-direction: column;
    align-items: center; justify-content: center;
    cursor: pointer; transition: all 0.2s;
    position: relative; overflow: hidden;
    background: #fafafa;
}
.photo-slot:hover { border-color: var(--hw-red); background: rgba(227,25,55,0.03); }
.photo-slot .slot-label {
    font-size: 0.75rem; font-weight: 600; color: #888;
    margin-top: 6px; text-transform: uppercase; letter-spacing: 0.5px;
}
.photo-slot .slot-icon { font-size: 1.5rem; color: #ccc; }
.photo-slot input[type=file] {
    position: absolute; inset: 0; opacity: 0; cursor: pointer;
}
.photo-slot .preview-img {
    position: absolute; inset: 0;
    width: 100%; height: 100%;
    object-fit: cover;
}
.photo-slot .remove-photo {
    position: absolute; top: 5px; right: 5px;
    background: rgba(220,53,69,0.9); color: #fff;
    border: none; border-radius: 50%;
    width: 22px; height: 22px;
    display: none; align-items: center; justify-content: center;
    font-size: 0.7rem; cursor: pointer; z-index: 2;
}
.photo-slot:hover .remove-photo.visible { display: flex; }

/* ===================== PUBLIC / LANDING ===================== */
.landing-hero {
    background: linear-gradient(135deg, #1a1c23 0%, #2d1010 60%, #1a0a0a 100%);
    min-height: 100vh; position: relative; overflow: hidden;
}
.landing-hero::before {
    content: '';
    position: absolute; inset: 0;
    background: radial-gradient(ellipse at 70% 50%, rgba(227,25,55,0.2) 0%, transparent 60%);
}
.hero-content { position: relative; z-index: 1; }
.hero-title {
    font-size: clamp(2.5rem, 6vw, 4.5rem);
    font-weight: 900;
    color: #fff;
    line-height: 1.05;
    letter-spacing: -1px;
}
.hero-title span { color: var(--hw-yellow); }
.hero-subtitle { font-size: 1.1rem; color: rgba(255,255,255,0.65); max-width: 480px; }

.feature-card {
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 16px;
    padding: 28px;
    text-align: center;
    transition: all 0.3s;
}
.feature-card:hover { background: rgba(255,255,255,0.07); border-color: rgba(227,25,55,0.4); transform: translateY(-4px); }
.feature-card .icon { font-size: 2.2rem; margin-bottom: 14px; }
.feature-card h5 { color: #fff; font-weight: 700; font-size: 1rem; }
.feature-card p { color: rgba(255,255,255,0.5); font-size: 0.85rem; margin: 0; }

.public-nav {
    background: rgba(26,28,35,0.95);
    backdrop-filter: blur(10px);
    position: sticky; top: 0; z-index: 999;
    border-bottom: 1px solid rgba(255,255,255,0.07);
}
.public-nav .navbar-brand {
    font-weight: 900; font-size: 1.1rem;
    color: #fff; letter-spacing: -0.3px;
}
.public-nav .navbar-brand span { color: var(--hw-yellow); }

/* ===================== LOGIN / REGISTER — PREMIUM SPLIT ===================== */
.auth-page {
    min-height: 100vh;
    position: relative;
    background:
        radial-gradient(ellipse 70% 60% at 15% 20%, rgba(232,25,44,0.22), transparent 55%),
        radial-gradient(ellipse 60% 50% at 85% 80%, rgba(255,160,40,0.16), transparent 55%),
        radial-gradient(ellipse 40% 40% at 50% 100%, rgba(255,215,0,0.08), transparent 60%),
        linear-gradient(135deg, #05060b 0%, #0d111c 50%, #14101a 100%);
    display: flex; align-items: center; justify-content: center;
    padding: 24px;
    overflow: hidden;
    font-family: 'Inter', system-ui, sans-serif;
}
.auth-page::before {
    content: '';
    position: absolute; inset: 0;
    background-image:
        linear-gradient(rgba(255,255,255,0.025) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255,255,255,0.025) 1px, transparent 1px);
    background-size: 56px 56px;
    mask-image: radial-gradient(ellipse 80% 80% at 50% 50%, black 30%, transparent 100%);
    pointer-events: none;
}
.auth-page::after {
    content: '';
    position: absolute; inset: 0;
    background:
        radial-gradient(circle 4px at 12% 18%, rgba(232,25,44,0.7), transparent),
        radial-gradient(circle 3px at 88% 22%, rgba(255,215,0,0.6), transparent),
        radial-gradient(circle 5px at 22% 78%, rgba(232,25,44,0.5), transparent),
        radial-gradient(circle 3px at 78% 82%, rgba(255,180,60,0.6), transparent);
    pointer-events: none;
    animation: authSparkle 8s ease-in-out infinite alternate;
}
@keyframes authSparkle { to { opacity: 0.4; transform: scale(1.05); } }

.auth-shell {
    position: relative; z-index: 1;
    width: 100%;
    max-width: 1080px;
    display: grid;
    grid-template-columns: 1.05fr 1fr;
    background: rgba(15,18,28,0.72);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 28px;
    box-shadow:
        0 40px 100px rgba(0,0,0,0.65),
        0 0 0 1px rgba(255,255,255,0.04),
        inset 0 1px 0 rgba(255,255,255,0.06);
    overflow: hidden;
    animation: authShellIn 0.7s cubic-bezier(.2,.8,.2,1) both;
}
@keyframes authShellIn { from { opacity: 0; transform: translateY(24px) scale(0.98); } to { opacity: 1; transform: none; } }

/* LEFT BRAND PANEL */
.auth-brand {
    position: relative;
    padding: 48px 44px;
    display: flex; flex-direction: column; justify-content: space-between;
    background:
        radial-gradient(circle at 30% 20%, rgba(232,25,44,0.35), transparent 55%),
        radial-gradient(circle at 80% 90%, rgba(255,140,30,0.25), transparent 50%),
        linear-gradient(150deg, #15192a 0%, #221423 60%, #2b1612 100%);
    color: #fff;
    overflow: hidden;
    min-height: 560px;
}
.auth-brand::before {
    content: '';
    position: absolute; inset: 0;
    background-image:
        linear-gradient(rgba(255,255,255,0.04) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255,255,255,0.04) 1px, transparent 1px);
    background-size: 40px 40px;
    mask-image: linear-gradient(140deg, black, transparent 80%);
    pointer-events: none;
}
.auth-brand::after {
    content: '';
    position: absolute; left: -40%; top: -30%;
    width: 180%; height: 80%;
    background: conic-gradient(from 140deg, transparent, rgba(232,25,44,0.18), transparent 35%);
    filter: blur(40px);
    pointer-events: none;
    animation: brandSpin 18s linear infinite;
}
@keyframes brandSpin { to { transform: rotate(360deg); } }
.auth-brand-inner { position: relative; z-index: 1; }
.auth-brand-logo {
    display: flex; align-items: center; justify-content: center;
    margin-bottom: 32px;
    padding: 22px 24px;
    border-radius: 22px;
    background: linear-gradient(160deg, rgba(255,255,255,0.07), rgba(255,255,255,0.02));
    border: 1px solid rgba(255,255,255,0.1);
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.08), 0 24px 60px rgba(0,0,0,0.4);
}
.auth-brand-logo img {
    width: 100%;
    max-width: 340px;
    max-height: 180px;
    object-fit: contain;
    filter: drop-shadow(0 14px 30px rgba(0,0,0,0.55));
}
.auth-brand-title {
    font-family: 'Rajdhani', 'Inter', sans-serif;
    font-size: clamp(1.3rem, 2.4vw, 1.8rem);
    font-weight: 700;
    line-height: 1.2;
    letter-spacing: 0.3px;
    text-transform: uppercase;
    margin-bottom: 14px;
}
.auth-brand-title .r { color: #ff5868; }
.auth-brand-title .g { color: #ffd34a; }
.auth-brand-sub {
    color: rgba(255,255,255,0.72);
    font-size: 0.95rem;
    line-height: 1.6;
    margin-bottom: 32px;
    max-width: 360px;
}
.auth-features { display: flex; flex-direction: column; gap: 14px; position: relative; z-index: 1; }
.auth-feature {
    display: flex; align-items: center; gap: 14px;
    padding: 12px 14px;
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 14px;
    backdrop-filter: blur(6px);
    transition: all 0.25s;
}
.auth-feature:hover { background: rgba(255,255,255,0.07); border-color: rgba(232,25,44,0.4); transform: translateX(4px); }
.auth-feature-icon {
    width: 40px; height: 40px; flex-shrink: 0;
    display: grid; place-items: center;
    border-radius: 11px;
    background: linear-gradient(135deg, #e8192c, #ff5868);
    color: #fff; font-size: 1rem;
    box-shadow: 0 8px 20px rgba(232,25,44,0.35);
}
.auth-feature-text strong { display: block; font-size: 0.88rem; font-weight: 700; color: #fff; }
.auth-feature-text span { display: block; font-size: 0.78rem; color: rgba(255,255,255,0.6); margin-top: 2px; }
.auth-brand-foot {
    position: relative; z-index: 1;
    margin-top: 36px;
    padding-top: 22px;
    border-top: 1px solid rgba(255,255,255,0.08);
    display: flex; align-items: center; gap: 18px;
    color: rgba(255,255,255,0.55);
    font-size: 0.78rem;
}
.auth-brand-foot .dot { width: 6px; height: 6px; border-radius: 50%; background: #2ecc71; box-shadow: 0 0 12px #2ecc71; }

/* RIGHT FORM PANEL */
.auth-form-side {
    position: relative;
    padding: 48px 48px 40px;
    background: rgba(8,10,17,0.55);
    display: flex; flex-direction: column; justify-content: center;
    color: #fff;
}
.auth-form-head { margin-bottom: 28px; }
.auth-form-head h1 {
    font-family: 'Rajdhani', 'Inter', sans-serif;
    font-size: clamp(1.6rem, 2.6vw, 2rem);
    font-weight: 700;
    letter-spacing: 0.3px;
    margin: 0 0 6px;
    color: #fff;
}
.auth-form-head p { color: rgba(255,255,255,0.6); font-size: 0.9rem; margin: 0; }
.auth-form-head .chip {
    display: inline-flex; align-items: center; gap: 7px;
    padding: 5px 12px;
    background: rgba(232,25,44,0.12);
    border: 1px solid rgba(232,25,44,0.35);
    border-radius: 100px;
    font-size: 0.72rem; font-weight: 700; letter-spacing: 0.6px;
    text-transform: uppercase;
    color: #ff7a8c;
    margin-bottom: 14px;
}
.auth-form-head .chip .pulse {
    width: 6px; height: 6px; border-radius: 50%;
    background: #ff5868; box-shadow: 0 0 10px #ff5868;
    animation: chipPulse 1.6s ease-in-out infinite;
}
@keyframes chipPulse { 50% { opacity: 0.4; transform: scale(0.85); } }

.auth-field { margin-bottom: 16px; }
.auth-field label {
    display: block;
    font-size: 0.78rem; font-weight: 600;
    color: rgba(255,255,255,0.75);
    margin-bottom: 7px;
    letter-spacing: 0.2px;
    text-transform: uppercase;
}
.auth-input-wrap {
    position: relative;
    display: flex; align-items: center;
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 12px;
    transition: all 0.22s;
}
.auth-input-wrap:focus-within {
    background: rgba(255,255,255,0.07);
    border-color: rgba(232,25,44,0.55);
    box-shadow: 0 0 0 4px rgba(232,25,44,0.12);
}
.auth-input-wrap .ico {
    width: 44px;
    display: grid; place-items: center;
    color: rgba(255,255,255,0.45);
    font-size: 0.9rem;
}
.auth-input-wrap input {
    flex: 1; min-width: 0;
    background: transparent;
    border: 0; outline: 0;
    color: #fff;
    padding: 13px 14px 13px 0;
    font-size: 0.94rem;
}
.auth-input-wrap input::placeholder { color: rgba(255,255,255,0.32); }
.auth-input-wrap .toggle {
    background: transparent; border: 0;
    width: 44px; height: 100%;
    color: rgba(255,255,255,0.45);
    cursor: pointer; font-size: 0.92rem;
    transition: color 0.18s;
}
.auth-input-wrap .toggle:hover { color: #fff; }

.auth-submit {
    width: 100%;
    padding: 14px 16px;
    border: 0;
    border-radius: 12px;
    background: linear-gradient(135deg, #e8192c 0%, #ff3a4a 60%, #ff8c1a 130%);
    background-size: 200% 100%;
    color: #fff; font-weight: 700; font-size: 0.95rem;
    letter-spacing: 0.4px;
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: 0 14px 32px rgba(232,25,44,0.35), inset 0 1px 0 rgba(255,255,255,0.18);
    display: inline-flex; align-items: center; justify-content: center; gap: 9px;
}
.auth-submit:hover { background-position: 100% 0; transform: translateY(-1px); box-shadow: 0 18px 40px rgba(232,25,44,0.5); }
.auth-submit:active { transform: translateY(0); }

.auth-divider {
    display: flex; align-items: center; gap: 12px;
    margin: 22px 0 18px;
    color: rgba(255,255,255,0.35);
    font-size: 0.72rem; letter-spacing: 1px; text-transform: uppercase;
}
.auth-divider::before, .auth-divider::after {
    content: ''; flex: 1; height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.12), transparent);
}
.auth-foot {
    text-align: center;
    font-size: 0.86rem;
    color: rgba(255,255,255,0.55);
}
.auth-foot a { color: #ff7a8c; font-weight: 700; transition: color 0.18s; }
.auth-foot a:hover { color: #fff; }
.auth-foot .sep { color: rgba(255,255,255,0.25); margin: 0 8px; }

.auth-alert {
    padding: 12px 14px;
    border-radius: 11px;
    font-size: 0.86rem;
    margin-bottom: 18px;
    display: flex; align-items: flex-start; gap: 10px;
}
.auth-alert.err { background: rgba(232,25,44,0.12); border: 1px solid rgba(232,25,44,0.4); color: #ffb4bc; }
.auth-alert.warn { background: rgba(255,180,30,0.12); border: 1px solid rgba(255,180,30,0.4); color: #ffd58a; }
.auth-alert ul { margin: 0; padding-left: 18px; }

.auth-mobile-logo { display: none; }

/* MOBILE */
@media (max-width: 900px) {
    .auth-shell { grid-template-columns: 1fr; max-width: 480px; }
    .auth-brand { display: none; }
    .auth-mobile-logo {
        display: flex;
        justify-content: center;
        margin-bottom: 20px;
    }
    .auth-mobile-logo img {
        width: 100%;
        max-width: 260px;
        max-height: 110px;
        object-fit: contain;
        filter: drop-shadow(0 10px 22px rgba(0,0,0,0.6));
    }
    .auth-form-side { padding: 36px 28px 32px; }
}
@media (max-width: 480px) {
    .auth-page { padding: 14px; }
    .auth-shell { border-radius: 22px; }
    .auth-form-side { padding: 28px 20px 24px; }
}

/* Legacy auth classes kept for backward compatibility (sidebar-style cards) */
.auth-card {
    background: rgba(255,255,255,0.98);
    border-radius: 22px;
    box-shadow: 0 28px 70px rgba(0,0,0,0.45);
    width: 100%; max-width: 470px;
    overflow: hidden;
}
.auth-card .auth-header {
    background: linear-gradient(132deg, #0f1729 0%, #1f2b42 48%, #342321 100%);
    padding: 26px 30px 22px;
    text-align: center;
}
.btn-auth {
    background: linear-gradient(135deg, #f03b2f, #d91e2b);
    border: none;
    color: #fff; font-weight: 700; padding: 12px;
    border-radius: 12px; width: 100%; font-size: 0.95rem;
    transition: all 0.2s;
}
.btn-auth:hover { background: linear-gradient(135deg, #e23227, #c31726); color: #fff; }

/* ===================== RESPONSIVE ===================== */
body, .app-wrapper { overflow-x: hidden; min-width: 0; }
#main-content { overflow-x: hidden; }

/* Sidebar collapsed on desktop */
body.sidebar-collapsed #sidebar { transform: translateX(-100%); }
body.sidebar-collapsed #main-content { margin-left: 0; }

.sidebar-overlay {
    display: none;
    position: fixed; inset: 0;
    background: rgba(0,0,0,0.5);
    z-index: 1049;
}
.sidebar-overlay.show { display: block; }

@media (max-width: 991.98px) {
    #sidebar {
        transform: translateX(-100%);
        z-index: 1050;
    }
    #sidebar.show { transform: translateX(0); }
    #main-content {
        margin-left: 0 !important;
        width: 100% !important;
        max-width: 100% !important;
    }
    .content-area { padding: 14px 12px; }
    .photo-upload-grid { grid-template-columns: repeat(2, 1fr); }
    .page-header { flex-direction: column; align-items: flex-start; gap: 8px; }
    .page-header h1 { font-size: 1.1rem; }
    .topbar { padding: 0 12px; gap: 8px; }
    .topbar .page-title { font-size: 0.9rem; }
    .topbar .page-breadcrumb { display: none; }
    .hw-card-body { padding: 14px; }
    .hw-card-header { padding: 12px 14px; }
    .hw-card-footer { padding: 10px 14px; }
    .stat-card { padding: 14px; }
    .table-responsive-x { overflow-x: auto; -webkit-overflow-scrolling: touch; }
    .sidebar-brand {
        padding: 12px 12px 10px;
    }
    .sidebar-brand .brand-logo {
        max-width: 190px;
    }
    .sidebar-brand .brand-logo img {
        max-height: 64px;
    }
}

@media (max-width: 767.98px) {
    .stat-card { padding: 12px; }
    .stat-value { font-size: 1.3rem; }
    .stat-icon { width: 44px; height: 44px; font-size: 1.1rem; border-radius: 10px; }
    .content-area { padding: 10px; }
    .row.g-4 { --bs-gutter-y: 0.75rem; --bs-gutter-x: 0.75rem; }
    .hw-card-body { overflow-x: auto; }
    .table { min-width: 520px; }
    .topbar { min-height: 58px; height: auto; }
    .topbar .page-title-area { margin-left: 2px !important; }
    .topbar .page-title {
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        max-width: 42vw;
    }
    .topbar .topbar-right { gap: 6px; }
    .topbar-icon-btn {
        width: 34px;
        height: 34px;
        border-radius: 9px;
        font-size: 0.92rem;
    }
    .topbar-user {
        padding: 3px;
        border-radius: 9px;
    }
    .topbar-user img, .topbar-user .user-initials {
        width: 30px;
        height: 30px;
    }

    /* Dashboard mobile fit */
    .dashboard-stats > [class*='col-'] { width: 50%; }
    .dashboard-stats .stat-card {
        min-height: 94px;
        align-items: center;
        gap: 10px;
    }
    .dashboard-stats .stat-label {
        font-size: 0.72rem;
        line-height: 1.2;
    }
    .dashboard-grid .hw-card-header {
        align-items: flex-start;
    }
    .dashboard-grid .hw-card-header .btn {
        width: 100%;
    }
    .dashboard-main .car-card .car-photo,
    .dashboard-main .car-card .car-photo-placeholder {
        height: 132px;
    }
    .dashboard-main .car-card .car-body {
        padding: 11px 12px 10px;
    }
    .dashboard-main .car-card .car-title {
        font-size: 0.84rem;
    }
    .dashboard-main .car-card .car-meta {
        font-size: 0.72rem;
    }
    .dashboard-main .car-card .car-footer {
        padding: 9px 12px;
        gap: 8px;
        flex-wrap: wrap;
    }
    .dashboard-main .btn-action {
        width: 32px;
        height: 32px;
        font-size: 0.78rem;
    }
}

@media (max-width: 575.98px) {
    .photo-upload-grid { grid-template-columns: repeat(3, 1fr); gap: 8px; }
    .stat-card { padding: 12px 10px; gap: 10px; }
    .stat-value { font-size: 1.2rem; }
    .topbar-user .name, .topbar-user .role { display: none; }
    .table thead th, .table tbody td { padding: 8px; font-size: 0.8rem; }
    .hw-card-body { padding: 12px 10px; }
    .content-area {
        padding: 8px;
    }
    .topbar {
        padding: 0 8px;
    }
    .topbar .sidebar-toggle {
        width: 34px;
        height: 34px;
    }
    .topbar .page-title {
        max-width: 36vw;
        font-size: 0.85rem;
    }
    .topbar .topbar-right .btn {
        padding: 5px 7px;
        font-size: 0.72rem;
    }

    .dashboard-stats {
        --bs-gutter-x: 0.55rem;
        --bs-gutter-y: 0.55rem;
    }
    .dashboard-stats .stat-card {
        padding: 10px 9px;
        border-radius: 11px;
        min-height: 88px;
    }
    .dashboard-stats .stat-icon {
        width: 38px;
        height: 38px;
        border-radius: 9px;
        font-size: 0.95rem;
    }
    .dashboard-stats .stat-value {
        font-size: 1.05rem;
        margin-bottom: 2px;
    }
    .dashboard-stats .stat-label {
        font-size: 0.68rem;
    }
    .dashboard-grid .hw-card-header h5 {
        font-size: 0.86rem;
        line-height: 1.3;
    }
    .dashboard-side .hw-card-body {
        padding: 10px;
    }

    /* Admin dashboard mobile */
    .admin-dashboard-stats {
        --bs-gutter-x: 0.55rem;
        --bs-gutter-y: 0.55rem;
    }
    .admin-dashboard-stats > [class*='col-'] {
        width: 50%;
    }
    .admin-dashboard-stats .stat-card {
        padding: 10px 9px;
        min-height: 90px;
        border-radius: 11px;
    }
    .admin-dashboard-stats .stat-icon {
        width: 38px;
        height: 38px;
        border-radius: 9px;
        font-size: 0.95rem;
    }
    .admin-dashboard-stats .stat-value {
        font-size: 1.05rem;
    }
    .admin-dashboard-stats .stat-label {
        font-size: 0.68rem;
        line-height: 1.2;
    }
    .admin-dashboard-grid .hw-card-header {
        align-items: flex-start;
    }
    .admin-dashboard-grid .hw-card-header .btn {
        width: 100%;
    }
}

/* ===================== SCROLLBAR ===================== */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #ddd; border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: #bbb; }

/* ===================== UTILITIES ===================== */
.text-hw-red { color: var(--hw-red) !important; }
.bg-hw-red { background: var(--hw-red) !important; }
.border-hw-red { border-color: var(--hw-red) !important; }
.fw-700 { font-weight: 700; }
.fw-800 { font-weight: 800; }
.rounded-10 { border-radius: 10px; }
.rounded-12 { border-radius: 12px; }
.gap-2 { gap: 8px; }
.cursor-pointer { cursor: pointer; }
