/* Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Syne:wght@700;800&family=DM+Sans:ital,wght@0,300;0,400;0,500;0,600;1,400&display=swap');

/* ════════════════════════════════════════════════════════════
   CAR RENTAL — MASTER STYLESHEET
   Compatible: Chrome, Edge, Opera, Firefox, Safari
   ════════════════════════════════════════════════════════════ */

:root {
    --navy:         #0b1629;
    --navy-mid:     #0f2350;
    --blue:         #1967d2;
    --blue-dark:    #1254b0;
    --accent:       #f59e0b;
    --accent-dark:  #d97706;
    --bg:           #f4f7fb;
    --surface:      #ffffff;
    --surface-soft: #eff6ff;
    --border:       #dce6f5;
    --text:         #0b1629;
    --muted:        #64748b;
    --success:      #1a8f5c;
    --warning:      #c97a10;
    --danger:       #bf3f4d;
    --shadow:       0 4px 24px rgba(11,22,41,0.08);
    --shadow-lg:    0 12px 40px rgba(11,22,41,0.12);
    --radius:       14px;
    --radius-lg:    20px;
    --sidebar-w:    272px;
    --font-body:    'DM Sans', 'Segoe UI', Arial, sans-serif;
    --font-display: 'Syne', 'Segoe UI', Arial, sans-serif;
}

/* ─── RESET ───────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { overflow-x: hidden; scroll-behavior: smooth; }
body {
    font-family: var(--font-body);
    background: var(--bg);
    color: var(--text);
    font-size: 15px;
    line-height: 1.6;
    overflow-x: hidden;
    -webkit-text-size-adjust: 100%;
    -ms-text-size-adjust: 100%;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    -webkit-tap-highlight-color: rgba(0,0,0,0);
}
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; height: auto; }
h1,h2,h3,h4 { font-family: var(--font-display); font-weight: 800; line-height: 1.2; }

/* ─── APP SHELL ───────────────────────────────────────────── */
.app-shell {
    display: block;
    min-height: 100vh;
}

/* ─── SIDEBAR ─────────────────────────────────────────────── */
.sidebar {
    background: var(--navy);
    color: #f0f6ff;
    padding: 24px 18px;
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-orient: vertical;
    -webkit-box-direction: normal;
    -ms-flex-direction: column;
    flex-direction: column;
    gap: 20px;
    position: fixed;
    top: 0;
    left: 0;
    height: 100vh;
    width: var(--sidebar-w);
    overflow-y: auto;
    z-index: 100;
    border-right: 1px solid rgba(255,255,255,0.04);
}
.brand-block {
    padding: 6px 8px 18px;
    border-bottom: 1px solid rgba(255,255,255,0.08);
}
.brand-title {
    font-family: var(--font-display);
    font-size: 1.5rem;
    font-weight: 800;
    letter-spacing: -0.5px;
    color: #fff;
}
.brand-title span { color: var(--accent); }
.brand-subtitle {
    margin-top: 5px;
    color: rgba(255,255,255,0.5);
    font-size: 0.8rem;
}
.nav-list {
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-orient: vertical;
    -webkit-box-direction: normal;
    -ms-flex-direction: column;
    flex-direction: column;
    gap: 4px;
}
.nav-link {
    padding: 11px 14px;
    border-radius: 10px;
    color: rgba(255,255,255,0.65);
    -webkit-transition: background 0.2s, color 0.2s;
    transition: background 0.2s, color 0.2s;
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-align: center;
    -ms-flex-align: center;
    align-items: center;
    gap: 10px;
    font-size: 0.9rem;
    font-weight: 500;
    min-height: 44px;
}
.nav-link:hover { background: rgba(255,255,255,0.07); color: #fff; }
.nav-link.is-active { background: var(--blue); color: #fff; font-weight: 600; }
.sidebar-footer { margin-top: auto; padding-bottom: 8px; }

/* ─── HAMBURGER ───────────────────────────────────────────── */
.menu-toggle {
    display: none;
    position: fixed;
    top: 14px;
    left: 14px;
    z-index: 300;
    background: var(--navy);
    color: #fff;
    border: none;
    border-radius: 10px;
    width: 44px;
    height: 44px;
    font-size: 1.3rem;
    cursor: pointer;
    -webkit-box-align: center;
    -ms-flex-align: center;
    align-items: center;
    -webkit-box-pack: center;
    -ms-flex-pack: center;
    justify-content: center;
    -webkit-box-shadow: 0 4px 16px rgba(0,0,0,0.25);
    box-shadow: 0 4px 16px rgba(0,0,0,0.25);
    -ms-flex-negative: 0;
    flex-shrink: 0;
}
.sidebar-overlay {
    display: none;
    position: fixed;
    top: 0; right: 0; bottom: 0; left: 0;
    background: rgba(0,0,0,0.5);
    z-index: 200;
}
.sidebar-overlay.active { display: block; }

/* ─── MAIN CONTENT ────────────────────────────────────────── */
.main-content {
    padding: 28px 28px 40px;
    min-width: 0;
    margin-left: var(--sidebar-w);
}

/* ─── PAGE HEADER ─────────────────────────────────────────── */
.page-header {
    margin-bottom: 24px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--border);
}
.page-header h1 {
    margin: 0 0 4px;
    font-size: 1.7rem;
    font-weight: 800;
    letter-spacing: -0.5px;
    color: var(--navy);
}
.page-header p { margin: 0; color: var(--muted); font-size: 0.88rem; }

/* ─── HERO BANNER ─────────────────────────────────────────── */
.hero {
    background: linear-gradient(135deg, var(--navy) 0%, var(--navy-mid) 55%, var(--blue) 100%);
    color: #fff;
    padding: 28px 32px;
    border-radius: var(--radius-lg);
    -webkit-box-shadow: var(--shadow-lg);
    box-shadow: var(--shadow-lg);
    margin-bottom: 24px;
    position: relative;
    overflow: hidden;
}
.hero::before {
    content: '';
    position: absolute;
    top: -60px;
    right: -60px;
    width: 240px;
    height: 240px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(245,158,11,0.15) 0%, transparent 70%);
    pointer-events: none;
}
.hero h1, .hero h2 { margin: 0 0 6px; font-family: var(--font-display); }
.hero p { margin: 0; opacity: 0.75; }

/* ─── PANELS & CARDS ──────────────────────────────────────── */
.panel, .card, .table-wrap, .auth-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    -webkit-box-shadow: var(--shadow);
    box-shadow: var(--shadow);
}
.panel, .table-wrap, .auth-card { padding: 24px; }

/* ─── GRIDS ───────────────────────────────────────────────── */
.grid {
    display: grid;
    gap: 20px;
}
.grid-2 {
    display: grid;
    gap: 20px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
}
.grid-3 {
    display: grid;
    gap: 20px;
    grid-template-columns: repeat(3, minmax(0, 1fr));
}
.grid-4 {
    display: grid;
    gap: 20px;
    grid-template-columns: repeat(4, minmax(0, 1fr));
}
.card-grid {
    display: grid;
    gap: 20px;
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

/* ─── STATS CARDS ─────────────────────────────────────────── */
.stats-card {
    padding: 22px;
    border-left: 4px solid var(--blue);
    -webkit-transition: -webkit-transform 0.2s, -webkit-box-shadow 0.2s;
    transition: transform 0.2s, box-shadow 0.2s;
}
.stats-card:hover {
    -webkit-transform: translateY(-2px);
    -ms-transform: translateY(-2px);
    transform: translateY(-2px);
    -webkit-box-shadow: var(--shadow-lg);
    box-shadow: var(--shadow-lg);
}
.stats-label { color: var(--muted); font-size: 0.82rem; text-transform: uppercase; letter-spacing: .6px; font-weight: 600; }
.stats-value { margin-top: 10px; font-size: 2rem; font-weight: 800; font-family: var(--font-display); color: var(--navy); }

/* ─── TOOLBAR ─────────────────────────────────────────────── */
.toolbar {
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-pack: justify;
    -ms-flex-pack: justify;
    justify-content: space-between;
    gap: 14px;
    -webkit-box-align: center;
    -ms-flex-align: center;
    align-items: center;
    margin-bottom: 18px;
    -ms-flex-wrap: wrap;
    flex-wrap: wrap;
}
.toolbar-actions {
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    gap: 10px;
    -ms-flex-wrap: wrap;
    flex-wrap: wrap;
}

/* ─── CAR CARDS ───────────────────────────────────────────── */
.car-card { overflow: hidden; -webkit-transition: -webkit-transform 0.2s, -webkit-box-shadow 0.2s; transition: transform 0.2s, box-shadow 0.2s; }
.car-card:hover { -webkit-transform: translateY(-4px); -ms-transform: translateY(-4px); transform: translateY(-4px); -webkit-box-shadow: var(--shadow-lg); box-shadow: var(--shadow-lg); }
.car-card img { width: 100%; height: 200px; -o-object-fit: cover; object-fit: cover; }
.car-body { padding: 18px; }
.car-meta, .feature-list, .split, .inline-list {
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    gap: 10px;
    -ms-flex-wrap: wrap;
    flex-wrap: wrap;
}
.split {
    -webkit-box-pack: justify;
    -ms-flex-pack: justify;
    justify-content: space-between;
    -webkit-box-align: center;
    -ms-flex-align: center;
    align-items: center;
}
.meta-pill, .badge {
    display: -webkit-inline-box;
    display: -ms-inline-flexbox;
    display: inline-flex;
    -webkit-box-align: center;
    -ms-flex-align: center;
    align-items: center;
    padding: 5px 11px;
    border-radius: 999px;
    font-size: 0.78rem;
    font-weight: 600;
}
.meta-pill { background: var(--surface-soft); color: var(--blue); }
.badge-success { background: #d1fae5; color: #065f46; }
.badge-warning { background: #fef3c7; color: #92400e; }
.badge-danger  { background: #fee2e2; color: #991b1b; }
.badge-muted   { background: #e9edf4; color: #64748b; }
.price { font-size: 1.7rem; font-weight: 800; font-family: var(--font-display); color: var(--blue); }
.price small { font-size: 0.85rem; font-weight: 400; color: var(--muted); }

/* ─── BUTTONS ─────────────────────────────────────────────── */
.button {
    display: -webkit-inline-box;
    display: -ms-inline-flexbox;
    display: inline-flex;
    -webkit-box-align: center;
    -ms-flex-align: center;
    align-items: center;
    -webkit-box-pack: center;
    -ms-flex-pack: center;
    justify-content: center;
    gap: 7px;
    border: none;
    border-radius: 10px;
    padding: 10px 18px;
    font-weight: 600;
    cursor: pointer;
    font-size: 0.9rem;
    font-family: var(--font-body);
    min-height: 42px;
    touch-action: manipulation;
    white-space: nowrap;
    -webkit-transition: background 0.18s, -webkit-transform 0.15s, -webkit-box-shadow 0.18s;
    transition: background 0.18s, transform 0.15s, box-shadow 0.18s;
}
.button:hover { -webkit-transform: translateY(-1px); -ms-transform: translateY(-1px); transform: translateY(-1px); }
.button-primary { background: var(--blue); color: #fff; -webkit-box-shadow: 0 4px 14px rgba(25,103,210,0.3); box-shadow: 0 4px 14px rgba(25,103,210,0.3); }
.button-primary:hover { background: var(--blue-dark); -webkit-box-shadow: 0 6px 18px rgba(25,103,210,0.4); box-shadow: 0 6px 18px rgba(25,103,210,0.4); }
.button-accent { background: var(--accent); color: var(--navy); -webkit-box-shadow: 0 4px 14px rgba(245,158,11,0.3); box-shadow: 0 4px 14px rgba(245,158,11,0.3); font-weight: 700; }
.button-accent:hover { background: var(--accent-dark); }
.button-secondary { background: var(--surface-soft); color: var(--blue); border: 1px solid #c7deff; }
.button-secondary:hover { background: #dbeafe; }
.button-ghost { background: rgba(255,255,255,0.08); color: #fff; border: 1px solid rgba(255,255,255,0.15); }
.button-ghost:hover { background: rgba(255,255,255,0.15); }
.button-muted { background: #f1f5fb; color: var(--text); }
.button-muted:hover { background: #e2e8f3; }
.button-block { width: 100%; }
.button-danger { background: #fee2e2; color: #991b1b; }
.button-danger:hover { background: #fecaca; }

/* ─── MISC HELPERS ────────────────────────────────────────── */
.muted { color: var(--muted); }
.section-title { margin: 0 0 16px; font-size: 1.1rem; font-family: var(--font-display); font-weight: 800; letter-spacing: -0.3px; color: var(--navy); }
.notice { margin-bottom: 18px; padding: 14px 16px; border-radius: var(--radius); border: 1px solid var(--border); }
.notice-success { background: #ecfdf5; border-color: #a7f3d0; color: #065f46; }
.notice-error   { background: #fef2f2; border-color: #fecaca; color: #991b1b; }
.notice-warning { background: #fffbeb; border-color: #fde68a; color: #92400e; }

/* ─── INFO BANNER ─────────────────────────────────────────── */
.info-banner {
    margin-bottom: 18px;
    padding: 14px 16px;
    border-radius: var(--radius);
    background: #eff6ff;
    border: 1px solid #bfdbfe;
    color: #1e40af;
    font-size: 0.9rem;
}

/* ─── TABLES ──────────────────────────────────────────────── */
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; padding: 0; }
table { width: 100%; border-collapse: collapse; min-width: 520px; }
thead { background: linear-gradient(135deg, var(--navy) 0%, var(--blue) 100%); }
thead th {
    color: rgba(255,255,255,0.85);
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    padding: 13px 16px;
    font-weight: 600;
    white-space: nowrap;
}
tbody td {
    padding: 13px 16px;
    border-bottom: 1px solid var(--border);
    vertical-align: middle;
    word-break: break-word;
    font-size: 0.88rem;
}
tbody tr:last-child td { border-bottom: none; }
tbody tr:hover td { background: #f8faff; }

/* ─── AUTH PAGES ──────────────────────────────────────────── */
/* ─── AUTH FORM ONLY (login/signup — no image panel) ─────── */
.auth-form-only {
    width: 100%;
    max-width: 480px;
}

/* auth-shell: simple flex centering — works in all browsers */
.auth-shell {
    min-height: 100vh;
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-orient: vertical;
    -webkit-box-direction: normal;
    -ms-flex-direction: column;
    flex-direction: column;
    -webkit-box-align: center;
    -ms-flex-align: center;
    align-items: center;
    -webkit-box-pack: center;
    -ms-flex-pack: center;
    justify-content: center;
    padding: 40px 28px;
    background: linear-gradient(160deg, var(--navy) 0%, var(--navy-mid) 55%, var(--blue) 100%);
}

/* auth-grid: explicit two columns, no min() function */
.auth-grid {
    width: 100%;
    max-width: 1100px;
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    gap: 28px;
    -webkit-box-align: center;
    -ms-flex-align: center;
    align-items: center;
}

/* auth-visual: the image panel — !important ensures panel class never wins */
.auth-visual {
    color: #fff !important;
    background:
        linear-gradient(135deg, rgba(11,22,41,0.7), rgba(25,103,210,0.4)),
        url("https://images.unsplash.com/photo-1685143114226-84d683366af8?crop=entropy&cs=tinysrgb&fit=max&fm=jpg&q=80&w=1200") center/cover !important;
    padding: 40px !important;
    border-radius: 24px !important;
    min-height: 540px;
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-orient: vertical;
    -webkit-box-direction: normal;
    -ms-flex-direction: column;
    flex-direction: column;
    -webkit-box-pack: end;
    -ms-flex-pack: end;
    justify-content: flex-end;
    border: 1px solid rgba(255,255,255,0.1) !important;
    -webkit-box-shadow: none !important;
    box-shadow: none !important;
}
.auth-visual h1 { font-family: var(--font-display); font-size: 2rem; margin: 0 0 10px; }
.auth-visual p  { margin: 0; opacity: 0.75; }

.auth-card {
    background: #fff;
    border-radius: 24px;
    padding: 36px;
    border: 1px solid var(--border);
    -webkit-box-shadow: 0 24px 64px rgba(11,22,41,0.15);
    box-shadow: 0 24px 64px rgba(11,22,41,0.15);
}
.auth-card h1 { margin-top: 0; font-size: 1.6rem; margin-bottom: 6px; }

/* ─── FORM FIELDS ─────────────────────────────────────────── */
.field-group {
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-orient: vertical;
    -webkit-box-direction: normal;
    -ms-flex-direction: column;
    flex-direction: column;
    gap: 6px;
    margin-bottom: 16px;
}
.field-group label { font-size: 0.82rem; font-weight: 600; color: var(--navy); }
.input, select, textarea {
    width: 100%;
    padding: 11px 14px;
    border-radius: var(--radius);
    border: 1.5px solid var(--border);
    background: #fff;
    color: var(--text);
    font-size: 0.92rem;
    font-family: var(--font-body);
    min-height: 44px;
    -webkit-transition: border-color 0.2s, -webkit-box-shadow 0.2s;
    transition: border-color 0.2s, box-shadow 0.2s;
}
.input:focus, select:focus, textarea:focus {
    outline: none;
    border-color: var(--blue);
    -webkit-box-shadow: 0 0 0 3px rgba(25,103,210,0.1);
    box-shadow: 0 0 0 3px rgba(25,103,210,0.1);
}
textarea { min-height: 90px; resize: vertical; }

/* ─── DETAIL / CAR PAGE ───────────────────────────────────── */
.detail-grid { display: grid; grid-template-columns: 1.4fr 0.9fr; gap: 22px; }
.detail-photo { border-radius: var(--radius-lg); height: 400px; -o-object-fit: cover; object-fit: cover; width: 100%; }
.feature-list span {
    background: var(--surface-soft);
    border: 1px solid #c7deff;
    border-radius: 999px;
    padding: 6px 14px;
    font-size: 0.82rem;
    color: var(--blue);
    font-weight: 500;
}
.summary-box { position: -webkit-sticky; position: sticky; top: 24px; }

/* ─── PROFILE ─────────────────────────────────────────────── */
.stack {
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-orient: vertical;
    -webkit-box-direction: normal;
    -ms-flex-direction: column;
    flex-direction: column;
    gap: 18px;
}
.profile-grid { display: grid; grid-template-columns: 300px 1fr; gap: 22px; }

/* Avatar — picture on top, name below, all centered */
.avatar-wrap {
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-orient: vertical;
    -webkit-box-direction: normal;
    -ms-flex-direction: column;
    flex-direction: column;
    -webkit-box-align: center;
    -ms-flex-align: center;
    align-items: center;
    -webkit-box-pack: center;
    -ms-flex-pack: center;
    justify-content: center;
    text-align: center;
    width: 100%;
    gap: 10px;
    margin-bottom: 16px;
}
.avatar {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--navy), var(--blue));
    color: #fff;
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-align: center;
    -ms-flex-align: center;
    align-items: center;
    -webkit-box-pack: center;
    -ms-flex-pack: center;
    justify-content: center;
    font-size: 1.8rem;
    font-family: var(--font-display);
    font-weight: 800;
    -webkit-box-shadow: 0 8px 24px rgba(25,103,210,0.3);
    box-shadow: 0 8px 24px rgba(25,103,210,0.3);
    -ms-flex-negative: 0;
    flex-shrink: 0;
}
.avatar-img {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    -o-object-fit: cover;
    object-fit: cover;
    border: 3px solid var(--border);
    -webkit-box-shadow: 0 8px 24px rgba(25,103,210,0.2);
    box-shadow: 0 8px 24px rgba(25,103,210,0.2);
    display: block;
}
.center { text-align: center; }
.spaced > * + * { margin-top: 14px; }

/* ─── MODALS ──────────────────────────────────────────────── */
.modal-outer {
    display: none;
    position: fixed;
    top: 0; right: 0; bottom: 0; left: 0;
    background: rgba(11,22,41,0.55);
    z-index: 1001;
    padding: 20px;
    overflow-y: auto;
    -webkit-box-align: flex-start;
    -ms-flex-align: flex-start;
    align-items: flex-start;
    -webkit-box-pack: center;
    -ms-flex-pack: center;
    justify-content: center;
    -webkit-backdrop-filter: blur(4px);
    backdrop-filter: blur(4px);
}
.modal-outer.open { display: -webkit-box; display: -ms-flexbox; display: flex; }
.modal-inner {
    background: #fff;
    border-radius: var(--radius-lg);
    padding: 28px;
    width: 100%;
    margin: auto;
    -webkit-box-shadow: 0 32px 80px rgba(11,22,41,0.2);
    box-shadow: 0 32px 80px rgba(11,22,41,0.2);
    border: 1px solid var(--border);
}
[id$="Modal"] > div {
    border-radius: var(--radius-lg) !important;
    -webkit-box-shadow: 0 32px 80px rgba(11,22,41,0.2) !important;
    box-shadow: 0 32px 80px rgba(11,22,41,0.2) !important;
}

/* ─── TRANSACTION CARDS ───────────────────────────────────── */
.transaction-card-layout { display: grid; grid-template-columns: 200px 1fr; }
.transaction-img { width: 100%; height: 100%; min-height: 160px; -o-object-fit: cover; object-fit: cover; display: block; }

/* ─── PROFILE PANELS ──────────────────────────────────────── */
.profile-panel-flex {
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    gap: 28px;
    -webkit-box-align: flex-start;
    -ms-flex-align: flex-start;
    align-items: flex-start;
    -ms-flex-wrap: wrap;
    flex-wrap: wrap;
}
.profile-photo-col { -ms-flex-negative: 0; flex-shrink: 0; text-align: center; }
.profile-photo-box {
    width: 150px;
    height: 150px;
    border-radius: 14px;
    background: var(--surface-soft);
    overflow: hidden;
    margin: 0 auto 14px;
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-align: center;
    -ms-flex-align: center;
    align-items: center;
    -webkit-box-pack: center;
    -ms-flex-pack: center;
    justify-content: center;
    border: 2px solid var(--border);
}
.profile-info-col { -webkit-box-flex: 1; -ms-flex: 1; flex: 1; min-width: 0; }
.profile-info-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; margin-bottom: 18px; }
.profile-info-grid .full-width { grid-column: 1 / -1; }
.profile-info-label { font-size: 0.72rem; color: var(--muted); text-transform: uppercase; letter-spacing: .6px; font-weight: 600; }
.profile-info-value { margin: 4px 0 0; font-size: 0.92rem; color: var(--text); }

/* ─── MODAL PHOTO ROW ─────────────────────────────────────── */
.modal-photo-row {
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    gap: 16px;
    -webkit-box-align: flex-start;
    -ms-flex-align: flex-start;
    align-items: flex-start;
    margin-bottom: 18px;
    -ms-flex-wrap: wrap;
    flex-wrap: wrap;
}
.modal-photo-preview {
    width: 100px;
    height: 100px;
    border-radius: var(--radius);
    background: var(--surface-soft);
    overflow: hidden;
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-align: center;
    -ms-flex-align: center;
    align-items: center;
    -webkit-box-pack: center;
    -ms-flex-pack: center;
    justify-content: center;
    -ms-flex-negative: 0;
    flex-shrink: 0;
    border: 2px solid var(--border);
}
.modal-photo-preview img { width: 100%; height: 100%; -o-object-fit: cover; object-fit: cover; }
.modal-photo-actions { -webkit-box-flex: 1; -ms-flex: 1; flex: 1; min-width: 160px; }

/* ─── BUTTON ROW ──────────────────────────────────────────── */
.btn-row {
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    gap: 10px;
    -ms-flex-wrap: wrap;
    flex-wrap: wrap;
    margin-top: 20px;
}
.btn-row .button { -webkit-box-flex: 1; -ms-flex: 1; flex: 1; min-width: 100px; -webkit-box-pack: center; -ms-flex-pack: center; justify-content: center; }

/* ─── PAGE FLEX HEADER ────────────────────────────────────── */
.page-flex-header {
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-pack: justify;
    -ms-flex-pack: justify;
    justify-content: space-between;
    -webkit-box-align: center;
    -ms-flex-align: center;
    align-items: center;
    -ms-flex-wrap: wrap;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 20px;
}
.page-flex-header h2 { margin: 0; font-size: 1.4rem; font-family: var(--font-display); font-weight: 800; }

/* ─── STAFF PROFILE ───────────────────────────────────────── */
.staff-profile-view {
    display: grid;
    grid-template-columns: 200px 1fr;
    gap: 36px;
    margin-bottom: 28px;
    -webkit-box-align: start;
    -ms-flex-align: start;
    align-items: start;
    background: var(--surface);
    padding: 32px;
    border-radius: var(--radius-lg);
    -webkit-box-shadow: var(--shadow);
    box-shadow: var(--shadow);
    border: 1px solid var(--border);
}
.staff-profile-photo { text-align: center; }
.staff-profile-photo img {
    width: 170px;
    height: 170px;
    border-radius: var(--radius);
    -o-object-fit: cover;
    object-fit: cover;
    margin-bottom: 14px;
    -webkit-box-shadow: 0 8px 24px rgba(11,22,41,0.12);
    box-shadow: 0 8px 24px rgba(11,22,41,0.12);
    display: block;
    margin-left: auto;
    margin-right: auto;
    border: 3px solid var(--border);
}
.staff-profile-photo .button { width: 100%; }
.staff-profile-info h2 { margin: 0 0 6px; font-size: 1.6rem; }
.staff-profile-details {
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-orient: vertical;
    -webkit-box-direction: normal;
    -ms-flex-direction: column;
    flex-direction: column;
    gap: 12px;
    margin-top: 18px;
}
.staff-profile-item {
    display: grid;
    grid-template-columns: 130px 1fr;
    gap: 10px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--border);
}
.staff-profile-item:last-child { border-bottom: none; }
.staff-profile-label { font-weight: 600; color: var(--text); font-size: 0.85rem; }
.staff-profile-value { color: var(--muted); font-size: 0.85rem; }

/* ─── TAB BAR ─────────────────────────────────────────────── */
.tab-bar {
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    gap: 0;
    margin-bottom: 22px;
    border-bottom: 2px solid var(--border);
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}
.tab-btn {
    padding: 10px 18px;
    background: none;
    border: none;
    cursor: pointer;
    font-size: 0.88rem;
    font-weight: 600;
    color: var(--muted);
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
    -webkit-transition: color 0.2s;
    transition: color 0.2s;
    white-space: nowrap;
    -ms-flex-negative: 0;
    flex-shrink: 0;
    font-family: var(--font-body);
}
.tab-btn.active { color: var(--navy); border-bottom-color: var(--blue); }

/* ─── ACCENT STRIP ────────────────────────────────────────── */
.accent-strip {
    background: linear-gradient(135deg, var(--accent) 0%, var(--accent-dark) 100%);
    color: var(--navy);
    padding: 14px 20px;
    border-radius: var(--radius);
    font-weight: 600;
    font-size: 0.9rem;
}

/* ════════════════════════════════════════════════════════════
   TABLET ≤ 1080px
   ════════════════════════════════════════════════════════════ */
@media (max-width: 1080px) {
    :root { --sidebar-w: 230px; }
    .grid-4  { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .grid-3  { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .card-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .detail-grid { grid-template-columns: 1fr; }
    .profile-grid { grid-template-columns: 1fr; }
    .auth-grid { grid-template-columns: 1fr; }
    .auth-visual { display: none; }
    .page-header h1 { font-size: 1.45rem; }
    .staff-profile-view { grid-template-columns: 160px 1fr; gap: 22px; padding: 22px; }
}

/* ════════════════════════════════════════════════════════════
   MOBILE ≤ 768px
   ════════════════════════════════════════════════════════════ */
@media (max-width: 768px) {
    .menu-toggle { display: -webkit-box; display: -ms-flexbox; display: flex; }
    .app-shell { display: block; }
    .sidebar {
        position: fixed;
        top: 0; left: 0;
        height: 100vh;
        width: 270px;
        max-width: 85vw;
        -webkit-transform: translateX(-100%);
        -ms-transform: translateX(-100%);
        transform: translateX(-100%);
        -webkit-transition: -webkit-transform 0.28s ease;
        transition: transform 0.28s ease;
        z-index: 250;
    }
    .sidebar.open { -webkit-transform: translateX(0); -ms-transform: translateX(0); transform: translateX(0); }
    .main-content { padding: 68px 16px 28px; margin-left: 0; }
    .page-header h1 { font-size: 1.25rem; }
    .page-header p  { font-size: 0.82rem; }
    .grid-4,.grid-3,.grid-2,.card-grid { grid-template-columns: 1fr; }
    .stats-value { font-size: 1.6rem; }
    .toolbar {
        -webkit-box-orient: vertical;
        -webkit-box-direction: normal;
        -ms-flex-direction: column;
        flex-direction: column;
        -webkit-box-align: stretch;
        -ms-flex-align: stretch;
        align-items: stretch;
        gap: 10px;
    }
    .toolbar > *, .toolbar-actions { width: 100%; }
    .toolbar-actions .button { -webkit-box-flex: 1; -ms-flex: 1; flex: 1; }
    .hero { padding: 20px 16px; }
    .hero h2 { font-size: 1.1rem; }
    .car-card img { height: 170px; }
    .auth-shell { padding: 20px 16px; background: var(--bg); }
    .auth-grid { grid-template-columns: 1fr; gap: 0; }
    .auth-visual { display: none; }
    .auth-card { padding: 24px 18px; -webkit-box-shadow: none; box-shadow: none; }
    .detail-grid { grid-template-columns: 1fr; }
    .detail-photo { height: 200px; }
    .summary-box { position: static; }
    .panel, .table-wrap { padding: 16px; }
    .table-wrap { overflow-x: auto; }
    table { min-width: 480px; }
    thead th, tbody td { padding: 10px; font-size: 0.8rem; }
    .profile-grid { grid-template-columns: 1fr; }
    .avatar { width: 82px; height: 82px; font-size: 1.5rem; }
    .avatar-img { width: 82px; height: 82px; }
    .price { font-size: 1.4rem; }
    .button { padding: 10px 14px; font-size: 0.88rem; }
    .modal-inner .grid-2 { grid-template-columns: 1fr; }
    [id$="Modal"] .grid-2,
    [id$="Modal"] [style*="grid-template-columns: 1fr 1fr"],
    [id$="Modal"] [style*="grid-template-columns:1fr 1fr"] { grid-template-columns: 1fr !important; }
    [id$="Modal"] > div { padding: 20px 16px !important; border-radius: 16px !important; }
    .transaction-card-layout { grid-template-columns: 1fr; }
    .transaction-img { height: 170px; width: 100%; }
    .profile-panel-flex {
        -webkit-box-orient: vertical;
        -webkit-box-direction: normal;
        -ms-flex-direction: column;
        flex-direction: column;
        -webkit-box-align: center;
        -ms-flex-align: center;
        align-items: center;
        gap: 14px;
    }
    .profile-photo-col { width: 100%; text-align: center; }
    .profile-info-grid { grid-template-columns: 1fr; gap: 12px; }
    .profile-info-grid .full-width { grid-column: auto; }
    .staff-profile-view { grid-template-columns: 1fr; gap: 20px; padding: 18px; }
    .staff-profile-photo img { width: 130px; height: 130px; }
    .staff-profile-item { grid-template-columns: 1fr; gap: 2px; }
    .page-flex-header {
        -webkit-box-orient: vertical;
        -webkit-box-direction: normal;
        -ms-flex-direction: column;
        flex-direction: column;
        -webkit-box-align: flex-start;
        -ms-flex-align: flex-start;
        align-items: flex-start;
    }
    .page-flex-header .button { width: 100%; }
    .btn-row {
        -webkit-box-orient: vertical;
        -webkit-box-direction: normal;
        -ms-flex-direction: column;
        flex-direction: column;
        gap: 8px;
    }
    .btn-row .button { -webkit-box-flex: 0; -ms-flex: none; flex: none; width: 100%; }
    .modal-photo-row {
        -webkit-box-orient: vertical;
        -webkit-box-direction: normal;
        -ms-flex-direction: column;
        flex-direction: column;
        -webkit-box-align: center;
        -ms-flex-align: center;
        align-items: center;
    }
    .modal-photo-actions { width: 100%; text-align: center; }
}

/* ════════════════════════════════════════════════════════════
   SMALL MOBILE ≤ 420px
   ════════════════════════════════════════════════════════════ */
@media (max-width: 420px) {
    .main-content { padding: 62px 12px 20px; }
    .brand-title  { font-size: 1.3rem; }
    .stats-value  { font-size: 1.3rem; }
    .button       { padding: 9px 12px; font-size: 0.85rem; }
    .input, select, textarea { padding: 10px 12px; font-size: 0.9rem; }
    .page-header h1 { font-size: 1.1rem; }
    .panel, .auth-card { padding: 14px 12px; }
    .hero { padding: 16px 12px; }
    [id$="Modal"] { padding: 10px !important; }
    [id$="Modal"] > div { padding: 14px 12px !important; }
    .transaction-img { height: 140px; }
}

/* ─── PAGINATION ──────────────────────────────────────────── */
.pager {
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-align: center;
    -ms-flex-align: center;
    align-items: center;
    gap: 6px;
    -ms-flex-wrap: wrap;
    flex-wrap: wrap;
    margin-top: 22px;
    padding-top: 18px;
    border-top: 1px solid var(--border);
}
.pager-btn {
    display: -webkit-inline-box;
    display: -ms-inline-flexbox;
    display: inline-flex;
    -webkit-box-align: center;
    -ms-flex-align: center;
    align-items: center;
    -webkit-box-pack: center;
    -ms-flex-pack: center;
    justify-content: center;
    min-width: 36px;
    height: 36px;
    padding: 0 10px;
    border-radius: 8px;
    border: 1.5px solid var(--border);
    background: #fff;
    color: var(--text);
    font-size: .85rem;
    font-weight: 600;
    text-decoration: none;
    -webkit-transition: background .15s, border-color .15s, color .15s;
    transition: background .15s, border-color .15s, color .15s;
    cursor: pointer;
    font-family: var(--font-body);
}
.pager-btn:hover { background: var(--surface-soft); border-color: var(--blue); color: var(--blue); }
.pager-active { background: var(--blue) !important; border-color: var(--blue) !important; color: #fff !important; }
.pager-disabled { opacity: .4; cursor: default; pointer-events: none; }
.pager-ellipsis { color: var(--muted); padding: 0 4px; font-size: .85rem; }
.pager-info { margin-left: auto; font-size: .8rem; color: var(--muted); white-space: nowrap; }
