/**
 * YardPro Bank Panel — compiled stylesheet.
 *
 * NOTE: This file is normally produced by running the Tailwind standalone
 * CLI against assets/css/input.css + tailwind.config.js (see BUILD.md).
 * This checked-in copy is a hand-expanded equivalent so the live site
 * works today without requiring a local build first — once you run the
 * real build locally and re-upload, it replaces this file 1:1 by selector.
 *
 * Design tokens: brand blue gradient header, blue/green/amber status
 * colors, light-gray page background, white cards, soft shadows, medium
 * (12–16px) rounding — see tailwind.config.js for the source values.
 */

/* ================================================================= */
/* Reset / base                                                       */
/* ================================================================= */

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: #f1f5f9;
  color: #0f172a;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  padding-bottom: 1.75rem;
}

body.modal-open, body.lightbox-open { overflow: hidden; }

img, svg { display: block; max-width: 100%; }
img { height: auto; }
/* Safety net: an inline icon svg with no sizing utility class (e.g. a typo,
   or a class missing from this hand-authored stylesheet) should never
   balloon to the browser's default replaced-element size (~300x150) — any
   .w-*/.h-* utility class defined below still wins since a class selector
   outranks this bare element selector. */
svg { width: 1.25rem; height: 1.25rem; }

/* Any element toggled via the `hidden` boolean attribute must actually
   disappear — without `!important` an author rule that sets `display`
   on the same element (e.g. `.vehicle-list { display: flex }`,
   `.detail-skeleton { display: flex }`, `.pager { display: flex }`) wins
   over the browser's built-in `[hidden] { display: none }` rule regardless
   of selector specificity, since normal author CSS always beats
   user-agent CSS in the cascade. This single rule guards every current
   and future component against that class of "stuck on screen" bug. */
[hidden] { display: none !important; }

a { color: #1d4ed8; text-decoration: none; transition: color 150ms ease; }
a:hover { color: #2563eb; }

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

table { border-collapse: collapse; }

:focus { outline: none; }
:focus-visible {
  outline: none;
  box-shadow: 0 0 0 2px #fff, 0 0 0 4px #2563eb;
  border-radius: 4px;
}

.muted { color: #64748b; }
code { font-size: 0.85em; word-break: break-all; }

/* ================================================================= */
/* Utility subset (used directly in markup)                          */
/* ================================================================= */

.flex { display: flex; }
.inline-flex { display: inline-flex; }
.grid { display: grid; }
.block { display: block; }
.flex-col { flex-direction: column; }
.flex-wrap { flex-wrap: wrap; }
.flex-1 { flex: 1 1 0%; }
.flex-shrink-0 { flex-shrink: 0; }
.items-center { align-items: center; }
.items-start { align-items: flex-start; }
.justify-between { justify-content: space-between; }
.justify-center { justify-content: center; }
.justify-end { justify-content: flex-end; }
.min-w-0 { min-width: 0; }
.w-full { width: 100%; }

.gap-1 { gap: 0.25rem; }
.gap-1\.5 { gap: 0.375rem; }
.gap-2 { gap: 0.5rem; }
.gap-2\.5 { gap: 0.625rem; }
.gap-3 { gap: 0.75rem; }
.gap-4 { gap: 1rem; }
.gap-6 { gap: 1.5rem; }

.w-3 { width: 0.75rem; } .h-3 { height: 0.75rem; }
.w-3\.5 { width: 0.875rem; } .h-3\.5 { height: 0.875rem; }
.w-4 { width: 1rem; } .h-4 { height: 1rem; }
.w-4\.5 { width: 1.125rem; } .h-4\.5 { height: 1.125rem; }
.w-5 { width: 1.25rem; } .h-5 { height: 1.25rem; }
.w-6 { width: 1.5rem; } .h-6 { height: 1.5rem; }
.w-8 { width: 2rem; } .h-8 { height: 2rem; }
.w-9 { width: 2.25rem; } .h-9 { height: 2.25rem; }
.w-10 { width: 2.5rem; } .h-10 { height: 2.5rem; }
.w-11 { width: 2.75rem; } .h-11 { height: 2.75rem; }
.w-14 { width: 3.5rem; } .h-14 { height: 3.5rem; }

.text-xs { font-size: 0.75rem; line-height: 1.1rem; }
.text-sm { font-size: 0.875rem; line-height: 1.35rem; }
.text-base { font-size: 1rem; line-height: 1.5rem; }
.text-lg { font-size: 1.125rem; line-height: 1.6rem; }
.text-xl { font-size: 1.25rem; line-height: 1.7rem; }
.text-2xl { font-size: 1.5rem; line-height: 1.9rem; }
.text-3xl { font-size: 1.875rem; line-height: 2.2rem; }
.font-medium { font-weight: 500; }
.font-semibold { font-weight: 600; }
.font-bold { font-weight: 700; }
.font-extrabold { font-weight: 800; }
.uppercase { text-transform: uppercase; }
.capitalize { text-transform: capitalize; }
.tracking-wide { letter-spacing: 0.025em; }
.tracking-wider { letter-spacing: 0.05em; }
.tracking-tight { letter-spacing: -0.015em; }
.leading-tight { line-height: 1.2; }
.leading-relaxed { line-height: 1.6; }
.text-left { text-align: left; }
.text-center { text-align: center; }
.whitespace-nowrap { white-space: nowrap; }
.break-words { overflow-wrap: break-word; }
.list-none { list-style: none; margin: 0; padding: 0; }

.text-white { color: #fff; }
.text-slate-400 { color: #94a3b8; }
.text-slate-500 { color: #64748b; }
.text-slate-600 { color: #475569; }
.text-slate-700 { color: #334155; }
.text-slate-900 { color: #0f172a; }
.text-brand-700 { color: #1d4ed8; }
.text-brand-900 { color: #1e3a8a; }
.bg-white { background-color: #fff; }
.bg-slate-50 { background-color: #f8fafc; }
.bg-slate-100 { background-color: #f1f5f9; }
.bg-brand-50 { background-color: #eff6ff; }

.mt-0 { margin-top: 0; } .mt-1 { margin-top: 0.25rem; } .mt-2 { margin-top: 0.5rem; }
.mt-3 { margin-top: 0.75rem; } .mt-4 { margin-top: 1rem; } .mt-6 { margin-top: 1.5rem; }
.mb-1 { margin-bottom: 0.25rem; } .mb-2 { margin-bottom: 0.5rem; }
.mb-3 { margin-bottom: 0.75rem; } .mb-4 { margin-bottom: 1rem; } .mb-6 { margin-bottom: 1.5rem; }
.mx-auto { margin-left: auto; margin-right: auto; }
.ml-2 { margin-left: 0.5rem; } .mr-2 { margin-right: 0.5rem; }
.px-2 { padding-left: 0.5rem; padding-right: 0.5rem; }
.px-3 { padding-left: 0.75rem; padding-right: 0.75rem; }
.px-4 { padding-left: 1rem; padding-right: 1rem; }
.py-1 { padding-top: 0.25rem; padding-bottom: 0.25rem; }
.py-2 { padding-top: 0.5rem; padding-bottom: 0.5rem; }

.rounded-md { border-radius: 0.5rem; }
.rounded-lg { border-radius: 0.75rem; }
.rounded-xl { border-radius: 1rem; }
.rounded-2xl { border-radius: 1.25rem; }
.rounded-full { border-radius: 9999px; }

.opacity-0 { opacity: 0; }
.opacity-40 { opacity: 0.4; }
.opacity-55 { opacity: 0.55; }
.opacity-70 { opacity: 0.7; }
.opacity-80 { opacity: 0.8; }
.opacity-90 { opacity: 0.9; }

.relative { position: relative; }
.absolute { position: absolute; }
.fixed { position: fixed; }
.inset-0 { top: 0; right: 0; bottom: 0; left: 0; }

.overflow-hidden { overflow: hidden; }
.overflow-auto { overflow: auto; }
.overflow-x-auto { overflow-x: auto; }

.cursor-pointer { cursor: pointer; }
.select-none { user-select: none; }
.pointer-events-none { pointer-events: none; }
.transition { transition: all 150ms ease; }

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}

@keyframes ypbp-spin { to { transform: rotate(360deg); } }
.animate-spin { animation: ypbp-spin 0.8s linear infinite; }

/* ================================================================= */
/* Accessibility                                                      */
/* ================================================================= */

.skip-link {
  position: absolute; left: 0.5rem; top: 0.5rem; transform: translateY(-4rem);
  background: #1e3a8a; color: #fff; font-size: 0.875rem; font-weight: 600;
  padding: 0.5rem 1rem; border-radius: 0.75rem; z-index: 999; text-decoration: none;
  transition: transform 150ms ease;
}
.skip-link:focus { transform: translateY(0); }

a.credit-strip {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 40;
  display: flex; align-items: center; justify-content: center;
  height: 1.75rem; padding: 0 0.75rem;
  background: #fff; border-top: 1px solid #e2e8f0;
  font-size: 0.6875rem; color: #64748b; text-decoration: none;
  letter-spacing: 0.01em; white-space: nowrap;
}
a.credit-strip:hover, a.credit-strip:focus-visible { color: #475569; }
a.credit-strip strong { font-weight: 700; color: #1e3a8a; }

/* ================================================================= */
/* Splash screen                                                      */
/* ================================================================= */

.ypbp-splash {
  position: fixed; inset: 0; z-index: 9999;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1rem;
  background: linear-gradient(90deg, #1e3a8a 0%, #1d4ed8 60%, #2563eb 100%);
  color: #fff; transition: opacity 300ms ease;
}
.ypbp-splash.is-hidden { opacity: 0; pointer-events: none; }
.ypbp-splash-word { font-size: 1.5rem; font-weight: 700; letter-spacing: -0.015em; }
.ypbp-splash-sub { font-size: 0.8rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.15em; color: rgba(255,255,255,0.7); }
.ypbp-splash-spinner {
  width: 2rem; height: 2rem; border-radius: 9999px;
  border: 2px solid rgba(255,255,255,0.3); border-top-color: #fff;
  animation: ypbp-spin 0.8s linear infinite;
}

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

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.375rem;
  border: 0; border-radius: 0.75rem; padding: 0.65rem 1rem;
  font-size: 0.9rem; font-weight: 600; cursor: pointer; user-select: none;
  transition: all 150ms ease; text-decoration: none; color: inherit;
}
.btn:disabled { opacity: 0.5; cursor: not-allowed; }
.btn:active:not(:disabled) { transform: translateY(1px); }
.btn svg { flex-shrink: 0; }

.btn-primary {
  background: linear-gradient(90deg, #1e3a8a 0%, #1d4ed8 60%, #2563eb 100%);
  color: #fff; box-shadow: 0 1px 2px rgba(15,23,42,.04), 0 6px 16px rgba(15,23,42,.06);
}
.btn-primary:hover:not(:disabled) { filter: brightness(1.06); color: #fff; }

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

.btn-ghost { background: rgba(255,255,255,0.15); color: #fff; }
.btn-ghost:hover:not(:disabled) { background: rgba(255,255,255,0.25); color: #fff; }

.btn-small { padding: 0.5rem 0.75rem; font-size: 0.8125rem; border-radius: 0.6rem; }

.icon-btn {
  display: inline-flex; align-items: center; justify-content: center;
  width: 2.25rem; height: 2.25rem; border: 0; background: transparent; border-radius: 0.75rem;
  color: #64748b; cursor: pointer; transition: background 150ms ease, color 150ms ease;
}
.icon-btn:hover { background: #f1f5f9; color: #334155; }
.icon-btn-light { color: #fff; }
.icon-btn-light:hover { background: rgba(255,255,255,0.18); color: #fff; }

/* ================================================================= */
/* Cards                                                              */
/* ================================================================= */

.card {
  background: #fff; border: 1px solid #eef2f7; border-radius: 1rem;
  box-shadow: 0 1px 2px rgba(15,23,42,.04), 0 6px 16px rgba(15,23,42,.06);
  padding: 1.25rem; transition: box-shadow 200ms ease;
}

/* ================================================================= */
/* Form fields                                                        */
/* ================================================================= */

.field-label { display: block; font-size: 0.875rem; font-weight: 600; color: #334155; margin: 1rem 0 0.4rem; }
.field-label:first-child { margin-top: 0; }

.field-input {
  width: 100%; border-radius: 0.75rem; border: 1px solid #cbd5e1; background: #fff;
  padding: 0.65rem 0.85rem; font-size: 0.9rem; color: #0f172a;
  transition: border-color 150ms ease, box-shadow 150ms ease;
}
.field-input::placeholder { color: #94a3b8; }
.field-input:hover { border-color: #94a3b8; }
.field-input:focus { border-color: #2563eb; }

.field-select {
  appearance: none; -webkit-appearance: none; -moz-appearance: none;
  padding-right: 2.5rem;
  background-repeat: no-repeat;
  background-position: right 0.75rem center;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%2364748b' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
}

.field-hint, .hint { display: block; margin-top: 0.4rem; font-size: 0.78rem; font-weight: 400; color: #64748b; }

.field-input-icon { padding-left: 2.25rem; }
.field-with-icon { position: relative; }

/* ================================================================= */
/* Badges / status pills                                              */
/* ================================================================= */

.status-badge {
  display: inline-flex; align-items: center; gap: 0.25rem; border-radius: 9999px;
  padding: 0.25rem 0.65rem; font-size: 0.75rem; font-weight: 700; text-transform: capitalize;
}
.badge-inyard { background: #dbeafe; color: #1e40af; }
.badge-outward { background: #d1fae5; color: #065f46; }
.badge-pending { background: #fef3c7; color: #92400e; }
.badge-neutral { background: #f1f5f9; color: #475569; }
.status-active { background: #d1fae5; color: #065f46; }
.status-inactive { background: #f1f5f9; color: #475569; }

.pill {
  display: inline-flex; align-items: center; border-radius: 9999px; background: #eff6ff;
  color: #1d4ed8; font-size: 0.75rem; font-weight: 700; padding: 0.15rem 0.5rem;
}
.seq-badge {
  display: inline-flex; align-items: center; justify-content: center; min-width: 1.75rem;
  border-radius: 0.5rem; background: #1d4ed8; color: #fff; font-size: 0.75rem; font-weight: 700;
  padding: 0.15rem 0.4rem;
}
.stat-chip {
  display: inline-flex; align-items: center; gap: 0.25rem; border-radius: 9999px;
  background: #eff6ff; color: #1d4ed8; font-size: 0.875rem; font-weight: 600; padding: 0.4rem 0.75rem;
}

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

.alert, .flash { border-radius: 0.75rem; padding: 0.7rem 0.9rem; margin: 0.75rem 0; font-size: 0.9rem; border: 1px solid transparent; }
.alert-error, .flash-error, .alert-invalid, .alert-csrf, .alert-locked { background: #fef2f2; color: #991b1b; border-color: #fecaca; }
.alert-disabled { background: #fffbeb; color: #92400e; border-color: #fde68a; }
.flash-ok { background: #ecfdf5; color: #065f46; border-color: #a7f3d0; }

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

.app-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 3.35rem;
  padding: 0.45rem 1.1rem;
  background: linear-gradient(90deg, #1e3a8a 0%, #1d4ed8 60%, #2563eb 100%);
  color: #fff; box-shadow: 0 4px 20px rgba(30,64,175,0.25);
}
.app-header a { color: #fff; }
.header-nav {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.75rem;
  min-width: 0;
  flex: 0 1 auto;
}
.header-brand {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  min-width: 0;
  flex: 1 1 auto;
}
.header-logo { width: 2.25rem; height: 2.25rem; object-fit: contain; border-radius: 0.5rem; background: rgba(255,255,255,0.95); padding: 2px; flex-shrink: 0; }
.header-user { font-size: 0.875rem; color: rgba(255,255,255,0.85); }
.header-title-wrap { line-height: 1.25; min-width: 0; }
.header-title-wrap strong { display: block; }
.header-title-wrap .muted { color: rgba(255,255,255,0.85); font-size: 0.85rem; }
.header-yardpro-logo {
  height: 2.55rem;
  width: auto;
  max-width: 5.75rem;
  object-fit: contain;
  object-position: center;
  flex-shrink: 0;
  margin-left: 0.35rem;
  background: #fff;
  border-radius: 0.3rem;
  padding: 0;
  display: block;
}

.container { max-width: 1200px; margin: 0 auto; padding: 1.25rem; }

.page-toolbar { display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem; margin-bottom: 1rem; flex-wrap: wrap; }
.page-toolbar h1 { margin: 0 0 0.25rem; font-size: 1.5rem; color: #1e3a8a; letter-spacing: -0.01em; display: flex; align-items: center; gap: 0.5rem; }
.toolbar-stats { display: flex; align-items: center; gap: 0.5rem; }

.anim-page { animation: ypbp-fade-in 220ms ease both; }
.anim-rise { animation: ypbp-fade-up 260ms ease both; }
@keyframes ypbp-fade-in { from { opacity: 0; } to { opacity: 1; } }
@keyframes ypbp-fade-up { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }
@keyframes ypbp-slide-in { from { opacity: 0; transform: translateY(-12px); } to { opacity: 1; transform: translateY(0); } }
@keyframes ypbp-shimmer { 0% { background-position: 100% 0; } 100% { background-position: -100% 0; } }

/* ================================================================= */
/* Auth / login pages                                                 */
/* ================================================================= */

.page-auth {
  min-height: 100vh; display: grid; place-items: center;
  background: linear-gradient(160deg, #dbeafe 0%, #f1f5f9 45%, #e2e8f0 100%);
}
.auth-card {
  width: min(420px, 92vw); background: #fff; border-radius: 1rem;
  box-shadow: 0 1px 2px rgba(15,23,42,.04), 0 6px 16px rgba(15,23,42,.06);
  border: 1px solid #eef2f7; padding: 1.85rem; animation: ypbp-fade-up 280ms ease both;
}
.auth-wordmark { margin: 0; font-size: 1.3rem; font-weight: 700; color: #1e3a8a; letter-spacing: -0.01em; }
.auth-subtitle { margin: 0.3rem 0 0; font-size: 0.75rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.14em; color: #94a3b8; }
.auth-card .btn-primary { width: 100%; margin-top: 1.35rem; padding: 0.85rem 1rem; }

.page-bank-login {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background:
    radial-gradient(ellipse 80% 50% at 50% -10%, rgba(0, 86, 210, 0.08), transparent 55%),
    linear-gradient(180deg, #eef2f7 0%, #f8fafc 40%, #f1f5f9 100%);
}
.bank-login-hero {
  background: linear-gradient(90deg, #1e3a8a 0%, #1d4ed8 60%, #2563eb 100%);
  color: #fff; padding: 1.5rem 1.25rem 2rem; box-shadow: 0 4px 20px rgba(30,64,175,0.25); text-align: center;
}
.bank-login-hero-inner { max-width: 480px; margin: 0 auto; }
.bank-login-main { flex: 1; display: flex; flex-direction: column; align-items: center; padding: 1rem 1rem 2rem; margin-top: -1.5rem; }
.bank-login-foot { margin-top: 1.25rem; font-size: 0.875rem; text-align: center; color: #64748b; }

/* Dual-panel bank login */
.bp-login-shell {
  flex: 1;
  display: flex;
  flex-direction: column;
  width: 100%;
  max-width: 1040px;
  margin: 0 auto;
  padding: 1.25rem 1rem 2rem;
}
.bp-login-brand {
  display: flex;
  justify-content: center;
  align-items: center;
  margin-bottom: 1.35rem;
  padding-top: 0.35rem;
}
.bp-login-company-logo {
  height: 52px;
  width: auto;
  max-width: min(280px, 72vw);
  object-fit: contain;
  display: block;
}
.bp-login-split {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 0;
  align-items: stretch;
  background: #fff;
  border: 1px solid #e4e8ee;
  border-radius: 1.15rem;
  box-shadow:
    0 1px 2px rgba(15, 23, 42, 0.04),
    0 12px 32px rgba(15, 23, 42, 0.08);
  overflow: hidden;
  animation: ypbp-fade-up 280ms ease both;
}
.bp-login-panel {
  padding: 1.75rem 1.5rem 1.85rem;
  min-width: 0;
}
.bp-login-panel-repo {
  background: linear-gradient(165deg, #f8fafc 0%, #fff 55%);
}
.bp-login-panel-yardpro {
  background: #fff;
}
.bp-login-panel-inner {
  max-width: 360px;
  margin: 0 auto;
  width: 100%;
}
.bp-login-product-logo {
  height: 72px;
  width: auto;
  max-width: 160px;
  object-fit: contain;
  display: block;
  margin: 0 auto 0.85rem;
}
.bp-login-panel-title {
  margin: 0;
  text-align: center;
  font-size: 1.2rem;
  font-weight: 800;
  color: #0f172a;
  letter-spacing: -0.02em;
}
.bp-login-panel-sub {
  margin: 0.35rem 0 1.15rem;
  text-align: center;
  font-size: 0.8125rem;
  line-height: 1.45;
}
.bp-login-form .field-label { margin-top: 0.85rem; }
.bp-login-form .field-label:first-of-type { margin-top: 0; }
.bp-login-submit {
  width: 100%;
  margin-top: 1.25rem;
  padding: 0.8rem 1rem;
}
.bp-login-divider {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 1px;
  background: #e8ecf1;
  position: relative;
  align-self: stretch;
}
.bp-login-divider span {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: #fff;
  border: 1px solid #e4e8ee;
  color: #94a3b8;
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  width: 2rem;
  height: 2rem;
  border-radius: 9999px;
  display: grid;
  place-items: center;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.06);
}
.bp-login-panel .alert { margin-top: 0.85rem; margin-bottom: 0.25rem; }

@media (max-width: 820px) {
  .bp-login-shell { padding: 1rem 0.75rem 1.75rem; }
  .bp-login-company-logo { height: 44px; }
  .bp-login-split {
    grid-template-columns: 1fr;
  }
  .bp-login-divider {
    width: 100%;
    height: 1px;
  }
  .bp-login-divider span {
    top: 50%;
  }
  .bp-login-panel { padding: 1.5rem 1.15rem 1.6rem; }
  .bp-login-product-logo { height: 64px; }
}

/* ================================================================= */
/* Stat cards (bank dashboard)                                        */
/* ================================================================= */

.stats-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 0.75rem; margin-bottom: 1rem; }
.stat-card { display: flex; align-items: center; gap: 0.75rem; padding: 1rem; background: #fff; border: 1px solid #eef2f7; border-radius: 1rem; box-shadow: 0 1px 2px rgba(15,23,42,.04), 0 6px 16px rgba(15,23,42,.06); animation: ypbp-fade-up 260ms ease both; }
.stat-card-icon { flex-shrink: 0; width: 2.75rem; height: 2.75rem; border-radius: 0.75rem; display: grid; place-items: center; }
.stat-card-icon-brand { background: #eff6ff; color: #1d4ed8; }
.stat-card-icon-slate { background: #f1f5f9; color: #64748b; }
.stat-card-icon-inyard { background: #dbeafe; color: #1e40af; }
.stat-card-icon-released { background: #d1fae5; color: #065f46; }
.stat-card-body { flex: 1; min-width: 0; }
.stat-card-label { font-size: 0.68rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.03em; color: #94a3b8; }
.stat-card-value { margin-top: 0.15rem; font-size: 1.5rem; font-weight: 800; color: #0f172a; line-height: 1.15; }
.stat-card-value .stat-skel { display: inline-block; width: 3rem; height: 1.25rem; border-radius: 0.4rem !important; vertical-align: middle; }

@media (min-width: 768px) { .stats-grid { grid-template-columns: repeat(4, minmax(0,1fr)); } }

/* ================================================================= */
/* Filter bar                                                         */
/* ================================================================= */

.filter-panel { margin-bottom: 1rem; padding: 1rem; }
.filter-bar-row { display: flex; flex-wrap: wrap; align-items: center; gap: 0.65rem; justify-content: space-between; margin-bottom: 0.75rem; }
.search-form { position: relative; flex: 1 1 auto; min-width: 240px; max-width: 420px; display: flex; align-items: center; gap: 0.5rem; }
.search-form-wide { max-width: none; }
.search-form .field-input { padding-left: 2.25rem; }
.search-icon { position: absolute; left: 0.75rem; top: 50%; transform: translateY(-50%); color: #94a3b8; pointer-events: none; }

.status-tabs { display: flex; align-items: center; gap: 0.25rem; background: #f1f5f9; border-radius: 0.75rem; padding: 0.25rem; overflow-x: auto; margin-bottom: 0.25rem; }
.status-tab {
  display: inline-flex; align-items: center; gap: 0.35rem; border: 0; background: transparent;
  border-radius: 0.6rem; padding: 0.5rem 0.9rem; font-size: 0.875rem; font-weight: 600;
  color: #64748b; white-space: nowrap; cursor: pointer; transition: color 150ms ease, background 150ms ease, box-shadow 150ms ease;
}
.status-tab:hover { color: #334155; }
.status-tab.is-active { background: #fff; color: #1d4ed8; box-shadow: 0 1px 3px rgba(15,23,42,0.08); }

.filter-toggle-badge {
  display: inline-flex; align-items: center; justify-content: center; min-width: 1.1rem; height: 1.1rem;
  border-radius: 9999px; background: #fff; color: #1d4ed8; font-size: 0.62rem; font-weight: 700;
  padding: 0 0.25rem; line-height: 1;
}

/* Advanced filters — right-side drawer (not an always-expanded inline block) */
.filter-drawer[hidden] { display: none !important; }
.filter-drawer { position: fixed; inset: 0; z-index: 950; }
.filter-drawer-backdrop { position: absolute; inset: 0; background: rgba(15,23,42,0.45); }
.filter-drawer-panel {
  position: absolute; top: 0; right: 0; height: 100%; width: min(420px, 100vw);
  background: #fff; box-shadow: 0 2px 6px rgba(15,23,42,.06), 0 10px 24px rgba(15,23,42,.09);
  display: flex; flex-direction: column; animation: ypbp-drawer-in 220ms ease both;
}
.filter-drawer.is-closing .filter-drawer-panel { animation: ypbp-drawer-out 180ms ease both; }
.filter-drawer.is-closing .filter-drawer-backdrop { opacity: 0; transition: opacity 150ms ease; }
.filter-drawer-head { display: flex; align-items: center; justify-content: space-between; gap: 0.75rem; padding: 1rem 1.25rem; border-bottom: 1px solid #f1f5f9; }
.filter-drawer-head h2 { margin: 0; display: flex; align-items: center; gap: 0.5rem; font-size: 1rem; font-weight: 700; color: #1e3a8a; }
.filter-drawer-body { flex: 1; overflow: auto; padding: 1rem 1.25rem; }
.filter-drawer-foot { display: flex; justify-content: flex-end; gap: 0.6rem; padding: 1rem 1.25rem; border-top: 1px solid #f1f5f9; }
.filter-drawer-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 0.75rem; }
.filter-drawer-grid .field-label, .adv-grid .field-label { margin-top: 0; font-size: 0.78rem; }

/* Legacy aliases kept so any old references keep working */
.adv-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 0.75rem; }
.adv-actions { display: flex; justify-content: flex-end; gap: 0.6rem; padding: 1rem 1.25rem; border-top: 1px solid #f1f5f9; }

@keyframes ypbp-drawer-in { from { transform: translateX(100%); opacity: 0.6; } to { transform: translateX(0); opacity: 1; } }
@keyframes ypbp-drawer-out { from { transform: translateX(0); opacity: 1; } to { transform: translateX(100%); opacity: 0; } }

.filter-chips { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-top: 0.75rem; padding-top: 0.75rem; border-top: 1px solid #f1f5f9; }
.filter-chip {
  display: inline-flex; align-items: center; gap: 0.35rem; border: 0; border-radius: 9999px;
  background: #eff6ff; color: #1d4ed8; font-size: 0.8rem; font-weight: 600; padding: 0.35rem 0.7rem;
  cursor: pointer; transition: background 150ms ease;
}
.filter-chip:hover { background: #dbeafe; }
.filter-chip-clearall { background: #f1f5f9; color: #475569; }
.filter-chip-clearall:hover { background: #e2e8f0; }
.chip-x { font-size: 1rem; line-height: 1; opacity: 0.75; }

@media (max-width: 480px) { .filter-drawer-grid, .adv-grid { grid-template-columns: 1fr; } }

/* ================================================================= */
/* Vehicle list / cards                                               */
/* ================================================================= */

.vehicle-list { display: flex; flex-direction: column; gap: 0.65rem; }
.vehicle-card {
  position: relative; display: block; background: #fff; border: 1px solid #eef2f7; border-radius: 1rem;
  box-shadow: 0 1px 2px rgba(15,23,42,.04), 0 6px 16px rgba(15,23,42,.06);
  padding: 0.9rem; text-decoration: none; color: #0f172a;
  transition: box-shadow 200ms ease, transform 200ms ease;
}
.vehicle-card:hover { box-shadow: 0 2px 6px rgba(15,23,42,.06), 0 10px 24px rgba(15,23,42,.09); transform: translateY(-2px); }
.vehicle-card-new { animation: ypbp-slide-in 0.55s ease-out 1; box-shadow: 0 0 0 2px rgba(37,99,235,0.35), 0 1px 2px rgba(15,23,42,.04), 0 6px 16px rgba(15,23,42,.06); }
.vehicle-card-top { position: relative; display: flex; gap: 0.7rem; align-items: flex-start; padding-right: 1.6rem; }
.vehicle-card-chevron {
  position: absolute; right: 0; top: 50%; transform: translateY(-50%); color: #cbd5e1;
  transition: color 150ms ease, transform 150ms ease;
}
.vehicle-card:hover .vehicle-card-chevron { color: #2563eb; transform: translateY(-50%) translateX(2px); }
.vehicle-thumb { width: 68px; height: 68px; border-radius: 0.75rem; object-fit: cover; background: #f1f5f9; flex-shrink: 0; }
.vehicle-thumb-empty { background: linear-gradient(145deg, #dbeafe, #e2e8f0); }
.vehicle-card-main { flex: 1; min-width: 0; }
.vehicle-card-head { display: flex; flex-wrap: wrap; align-items: center; gap: 0.4rem 0.5rem; margin-bottom: 0.3rem; }
.vehicle-plate { font-size: 1.05rem; font-weight: 800; letter-spacing: 0.02em; color: #0f172a; }
.vehicle-meta-row { display: flex; gap: 0.5rem; font-size: 0.85rem; margin-top: 0.15rem; color: #475569; }
.meta-label {
  flex: 0 0 5rem; display: flex; align-items: center; gap: 0.25rem; color: #94a3b8; font-size: 0.66rem;
  font-weight: 700; text-transform: uppercase; letter-spacing: 0.03em; padding-top: 0.15rem;
}
.meta-icon { display: inline-flex; color: #94a3b8; flex-shrink: 0; }
.vehicle-dates {
  display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 0.5rem; margin-top: 0.65rem;
  margin-left: -0.9rem; margin-right: -0.9rem; margin-bottom: -0.9rem; padding: 0.65rem 0.9rem;
  border-top: 1px solid #f1f5f9; background: #f8fafc; border-radius: 0 0 1rem 1rem;
}
.date-label {
  display: flex; align-items: center; gap: 0.2rem; font-size: 0.66rem; color: #94a3b8; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.03em; margin-bottom: 0.15rem;
}

/* ================================================================= */
/* Empty / error / skeleton                                           */
/* ================================================================= */

.list-empty, .list-error { text-align: center; padding: 2.5rem 1.5rem; }
.list-empty h2, .list-error h2 {
  display: flex; align-items: center; justify-content: center; gap: 0.4rem;
  margin: 0.5rem 0 0.35rem; color: #1e3a8a; font-size: 1.15rem; font-weight: 700;
}
.empty-mark {
  width: 3.5rem;
  height: 3.5rem;
  margin: 0 auto;
  border-radius: 0.85rem;
  background: linear-gradient(145deg, #2563eb, #1e3a8a);
  display: grid;
  place-items: center;
  color: #fff;
  box-shadow: 0 4px 12px rgba(30, 64, 175, 0.25);
}
.empty-mark svg {
  width: 1.4rem;
  height: 1.4rem;
  stroke: currentColor;
}
.skeleton-card, .skeleton-block {
  border-radius: 1rem; background: linear-gradient(90deg, #e2e8f0 0%, #f1f5f9 40%, #e2e8f0 80%);
  background-size: 200% 100%; animation: ypbp-shimmer 1.2s ease-in-out infinite;
}
.skeleton-card { height: 148px; }
.list-loading { display: flex; flex-direction: column; gap: 0.75rem; }

/* ================================================================= */
/* Pagination                                                         */
/* ================================================================= */

.pager { display: flex; align-items: center; justify-content: center; gap: 1rem; margin: 1.5rem 0; flex-wrap: wrap; }
.pager-info { font-size: 0.875rem; font-weight: 600; color: #64748b; min-width: 10rem; text-align: center; }

/* ================================================================= */
/* Live update pill                                                   */
/* ================================================================= */

.live-new-pill {
  position: fixed; top: 4.75rem; left: 50%; transform: translateX(-50%); z-index: 900;
  border: 0; border-radius: 9999px; padding: 0.65rem 1.15rem;
  background: linear-gradient(90deg, #1e3a8a 0%, #1d4ed8 60%, #2563eb 100%);
  color: #fff; font-size: 0.9rem; font-weight: 700;
  box-shadow: 0 4px 20px rgba(30,64,175,0.25); cursor: pointer; white-space: nowrap;
  max-width: calc(100vw - 2rem); transition: filter 150ms ease;
}
.live-new-pill[hidden] { display: none !important; }
.live-new-pill:hover { filter: brightness(1.06); }

/* ================================================================= */
/* Vehicle detail                                                     */
/* ================================================================= */

.detail-page { padding-bottom: 2.5rem; animation: ypbp-fade-in 220ms ease both; }
.detail-shell { max-width: 640px; }
.detail-hero { position: relative; margin-bottom: 1rem; overflow: hidden; }
.detail-hero::before {
  content: ''; position: absolute; top: 0; left: 0; right: 0; height: 4px;
  background: linear-gradient(90deg, #1e3a8a 0%, #1d4ed8 60%, #2563eb 100%);
}
.detail-hero-top { display: flex; flex-wrap: wrap; align-items: center; gap: 0.6rem; }
.detail-plate { margin: 0; font-size: 1.6rem; font-weight: 800; letter-spacing: 0.02em; color: #0f172a; }
.detail-sub { margin-top: 0.45rem; color: #64748b; }
.detail-actions { display: flex; flex-wrap: wrap; gap: 0.6rem; margin-top: 1.1rem; }
.zip-btn-label, .zip-btn-loading { display: inline-flex; align-items: center; gap: 0.375rem; }
.detail-grid { display: grid; grid-template-columns: 1fr; gap: 1rem; margin-bottom: 1rem; }
.detail-section { margin-bottom: 1rem; }
.detail-section h2 { display: flex; align-items: center; gap: 0.5rem; margin: 0 0 0.85rem; font-size: 1.05rem; font-weight: 700; color: #1e3a8a; }
.dv-fields { display: grid; gap: 0.65rem; }
.dv-field { display: grid; grid-template-columns: 8.5rem 1fr; gap: 0.5rem; font-size: 0.9rem; }
.dv-label { display: flex; align-items: center; gap: 0.3rem; font-size: 0.68rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.04em; color: #94a3b8; padding-top: 0.15rem; }
.dv-icon { display: inline-flex; flex-shrink: 0; color: #94a3b8; }
.dv-value { font-weight: 600; color: #0f172a; overflow-wrap: break-word; }
.media-summary { display: flex; gap: 0.75rem; }
.media-stat { flex: 1; text-align: center; padding: 0.85rem 0.5rem; border-radius: 0.75rem; background: #f8fafc; border: 1px solid #f1f5f9; }
.media-stat strong { display: block; font-size: 1.5rem; font-weight: 700; color: #1d4ed8; }
.media-stat span { font-size: 0.68rem; font-weight: 700; text-transform: uppercase; color: #94a3b8; }

/* Media tabs (Photos / Videos / Documents) */
.media-tabs { display: flex; flex-wrap: wrap; gap: 0.4rem; margin-bottom: 1.1rem; border-bottom: 1px solid #f1f5f9; padding-bottom: 0.85rem; }
.media-tab {
  display: inline-flex; align-items: center; gap: 0.4rem; border: 0; background: #f8fafc;
  color: #64748b; font-size: 0.85rem; font-weight: 700; padding: 0.55rem 0.9rem; border-radius: 0.65rem;
  cursor: pointer; transition: background 150ms ease, color 150ms ease;
}
.media-tab:hover { background: #f1f5f9; color: #334155; }
.media-tab.is-active { background: #eff6ff; color: #1d4ed8; }
.media-tab-count {
  display: inline-flex; align-items: center; justify-content: center; min-width: 1.3rem; height: 1.3rem;
  border-radius: 9999px; background: rgba(100,116,139,0.14); font-size: 0.7rem; font-weight: 700; padding: 0 0.3rem;
}
.media-tab.is-active .media-tab-count { background: rgba(29,78,216,0.14); }
.media-panel[hidden] { display: none !important; }

.media-empty {
  display: flex; flex-direction: column; align-items: center; gap: 0.6rem;
  padding: 2.75rem 1rem; color: #94a3b8; text-align: center;
}
.media-empty svg { width: 2.25rem; height: 2.25rem; opacity: 0.7; }
.media-empty p { margin: 0; font-size: 0.9rem; font-weight: 600; }

.gallery-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 0.75rem; }
.gallery-item {
  display: block; width: 100%; padding: 0; border: 1px solid #e2e8f0; border-radius: 0.75rem;
  overflow: hidden; background: #f8fafc; cursor: pointer; text-align: left; font: inherit;
  color: inherit; transition: transform 200ms ease, box-shadow 200ms ease;
}
.gallery-item:hover { transform: translateY(-2px); box-shadow: 0 1px 2px rgba(15,23,42,.04), 0 6px 16px rgba(15,23,42,.06); }
.gallery-item img, .gallery-item .video-player { display: block; width: 100%; height: 120px; object-fit: cover; background: #e2e8f0; }
.video-item { cursor: default; }
.video-item:hover { transform: none; box-shadow: none; }
.video-item .video-player { height: 180px; background: #0f172a; }
.gallery-caption { display: block; padding: 0.5rem 0.6rem; font-size: 0.78rem; font-weight: 600; color: #475569; border-top: 1px solid #f1f5f9; }
.gallery-broken { display: grid; place-items: center; height: 120px; background: #f1f5f9; color: #94a3b8; font-size: 0.8rem; font-weight: 600; text-align: center; padding: 0.5rem; }
.doc-list { list-style: none; margin: 0; padding: 0; }
.doc-list-below { margin-top: 0.85rem; padding-top: 0.35rem; border-top: 1px solid #eef2f7; }
.doc-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0.75rem; padding: 0.85rem 0; border-bottom: 1px solid #f1f5f9; }
.doc-row:last-child { border-bottom: 0; padding-bottom: 0; }
.doc-image-grid { margin-bottom: 0.25rem; }
.doc-meta { display: flex; flex-direction: column; gap: 0.15rem; min-width: 0; }
.doc-actions { display: flex; flex-wrap: wrap; gap: 0.4rem; }

/* Loading skeleton — mirrors the final card shapes (hero / 2-col grid / media tabs) */
.detail-skeleton { display: flex; flex-direction: column; gap: 1rem; }
.skeleton-hero-top { display: flex; flex-wrap: wrap; align-items: center; gap: 0.6rem; margin-bottom: 0.75rem; }
.skeleton-pill { height: 1.5rem; width: 4.75rem; border-radius: 9999px; }
.skeleton-pill-sm { height: 1.4rem; width: 3.5rem; }
.skeleton-title { height: 1.9rem; width: 38%; border-radius: 0.5rem; }
.skeleton-line { height: 1rem; width: 55%; border-radius: 0.5rem; margin-top: 0.15rem; }
.skeleton-hero-actions { display: flex; flex-wrap: wrap; gap: 0.6rem; margin-top: 1.15rem; }
.skeleton-btn { height: 2.6rem; width: 10rem; border-radius: 0.75rem; }
.skeleton-grid { display: grid; grid-template-columns: 1fr; gap: 1rem; }
.skeleton-card-block { display: flex; flex-direction: column; gap: 0.7rem; }
.skeleton-heading { height: 1.05rem; width: 45%; border-radius: 0.4rem; margin-bottom: 0.35rem; }
.skeleton-field { height: 1rem; width: 100%; border-radius: 0.4rem; }
.skeleton-field.w-90 { width: 90%; }
.skeleton-field.w-75 { width: 75%; }
.skeleton-field.w-60 { width: 60%; }
.skeleton-media-tabs { display: flex; gap: 0.5rem; margin-bottom: 1rem; }
.skeleton-media-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 0.75rem; }
.skeleton-tile { height: 120px; border-radius: 0.75rem; }

@media (min-width: 768px) {
  .detail-grid { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .gallery-grid { grid-template-columns: repeat(4, minmax(0,1fr)); }
  .skeleton-grid { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .skeleton-media-grid { grid-template-columns: repeat(4, minmax(0,1fr)); }
}
@media (min-width: 640px) and (max-width: 767px) {
  .gallery-grid { grid-template-columns: repeat(3, minmax(0,1fr)); }
}

/* ================================================================= */
/* Owner dashboard table / modal                                      */
/* ================================================================= */

.table-card { padding: 0; overflow: hidden; }
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.data-table { width: 100%; border-collapse: collapse; font-size: 0.9rem; }
.data-table th, .data-table td { padding: 0.85rem 1rem; text-align: left; border-bottom: 1px solid #f1f5f9; vertical-align: top; }
.data-table th { font-size: 0.68rem; text-transform: uppercase; letter-spacing: 0.04em; color: #94a3b8; background: #f8fafc; font-weight: 700; }
.data-table tbody tr { transition: background 150ms ease; }
.data-table tbody tr:hover { background: #f8fafc; }
.bank-cell { display: flex; align-items: center; gap: 0.6rem; }
.table-logo { width: 32px; height: 32px; object-fit: contain; border-radius: 0.5rem; background: #f1f5f9; }
.matches-cell { max-width: 280px; }

.password-cell { white-space: nowrap; }
.password-value { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 0.8125rem; color: #1e293b; background: #f8fafc; padding: 0.125rem 0.375rem; border-radius: 0.375rem; }
.actions-cell { white-space: nowrap; display: flex; gap: 0.4rem; }

.modal[hidden] { display: none !important; }
.modal { position: fixed; inset: 0; z-index: 1000; display: grid; place-items: center; padding: 1rem; }
.modal-backdrop { position: absolute; inset: 0; background: rgba(15,23,42,0.45); animation: ypbp-fade-in 180ms ease both; }
.modal-panel {
  position: relative; z-index: 1; width: min(720px, 100%); max-height: min(92vh, 900px); overflow: auto;
  background: #fff; border-radius: 1rem; box-shadow: 0 2px 6px rgba(15,23,42,.06), 0 10px 24px rgba(15,23,42,.09);
  padding: 1.5rem; animation: ypbp-fade-up 220ms ease both;
}
.modal-head { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-bottom: 0.5rem; }
.modal-head h2 { margin: 0; font-size: 1.15rem; font-weight: 700; color: #1e3a8a; }

.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 1rem; }
.form-grid > div { min-width: 0; }
.field-block { margin-top: 1rem; }
.multi-select { margin-top: 0.5rem; max-height: 220px; overflow: auto; border: 1px solid #cbd5e1; border-radius: 0.75rem; padding: 0.35rem; background: #f8fafc; }
.check-row {
  display: flex; align-items: flex-start; gap: 0.5rem; margin: 0 !important; padding: 0.45rem 0.5rem;
  font-weight: 500 !important; border-radius: 0.5rem; transition: background 150ms ease;
}
.check-row:hover { background: #eff6ff; }
.check-row input { width: auto !important; margin: 0.2rem 0 0 !important; padding: 0 !important; }
.check-row.is-disabled { opacity: 0.55; }
.check-row .taken { color: #94a3b8; font-size: 0.78rem; font-style: normal; }
.logo-preview img { margin-top: 0.5rem; max-height: 64px; border-radius: 0.5rem; }
.modal-actions { display: flex; justify-content: flex-end; gap: 0.6rem; margin-top: 1.25rem; }

@media (min-width: 640px) { .form-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 639px) { .form-grid { grid-template-columns: 1fr; } }

/* ================================================================= */
/* Metric tiles                                                       */
/* ================================================================= */

.metric-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 1rem; }
.metric-card { border-radius: 1rem; padding: 1.15rem 1.2rem; color: #fff; min-height: 120px; box-shadow: 0 1px 2px rgba(15,23,42,.04), 0 6px 16px rgba(15,23,42,.06); animation: ypbp-fade-up 260ms ease both; }
.metric-blue { background: linear-gradient(145deg, #2563eb, #1e40af); }
.metric-green { background: linear-gradient(145deg, #10b981, #059669); }
.metric-label { font-size: 0.68rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.04em; opacity: 0.9; }
.metric-value { margin-top: 0.35rem; font-size: 1.9rem; font-weight: 800; line-height: 1.1; }
.metric-sub { margin-top: 0.65rem; font-size: 0.85rem; opacity: 0.92; }

/* ================================================================= */
/* Owner — Logs & Analytics                                          */
/* ================================================================= */

.timeline-toolbar { margin-top: 2rem; }
.card-heading {
  display: flex; align-items: center; gap: 0.5rem; margin: 0 0 1rem; font-size: 0.95rem;
  font-weight: 700; color: #1e3a8a;
}

.analytics-grid { display: flex; flex-direction: column; gap: 1rem; margin-bottom: 0.5rem; }
.analytics-top-row { display: grid; grid-template-columns: 1fr; gap: 1rem; }
.analytics-stat-row { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 1rem; }
.analytics-chart-card { display: flex; flex-direction: column; }
.chart-wrap { position: relative; min-height: 220px; }
.chart-empty { position: absolute; inset: 0; display: grid; place-items: center; margin: 0; }
.analytics-lists-row { display: grid; grid-template-columns: 1fr; gap: 1rem; }

@media (min-width: 640px) {
  .analytics-stat-row { grid-template-columns: 1fr; grid-auto-rows: 1fr; }
}
@media (min-width: 900px) {
  .analytics-top-row { grid-template-columns: 220px 1fr; }
  .analytics-lists-row { grid-template-columns: 1fr 1fr; }
}

.rank-list { list-style: none; margin: 0; padding: 0; }
.rank-row {
  display: flex; align-items: center; gap: 0.75rem; padding: 0.6rem 0; border-bottom: 1px solid #f1f5f9;
  cursor: pointer; background: none; border-left: 0; border-right: 0; border-top: 0; width: 100%; text-align: left;
  font: inherit; color: inherit; transition: background 150ms ease;
}
.rank-row:last-child { border-bottom: 0; }
button.rank-row:hover { background: #f8fafc; }
button.rank-row:disabled { cursor: default; opacity: 0.6; }
.rank-badge {
  flex-shrink: 0; display: inline-flex; align-items: center; justify-content: center; width: 1.625rem; height: 1.625rem;
  border-radius: 9999px; background: #eff6ff; color: #1d4ed8; font-size: 0.72rem; font-weight: 800;
}
.rank-body { flex: 1; min-width: 0; }
.rank-title { font-weight: 700; font-size: 0.88rem; color: #0f172a; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rank-sub { font-size: 0.76rem; color: #64748b; margin-top: 0.1rem; }
.rank-count { flex-shrink: 0; font-weight: 800; font-size: 0.95rem; color: #1e3a8a; white-space: nowrap; }
.rank-count-label { display: block; font-size: 0.62rem; font-weight: 600; color: #94a3b8; text-transform: uppercase; text-align: right; }

.logs-filter-row { flex-wrap: wrap; }
.logs-filter-row .field-select, .logs-filter-row input[type="date"] { flex: 1 1 160px; min-width: 140px; }

.timeline-card { padding: 0; overflow: hidden; }
.activity-timeline { list-style: none; margin: 0; padding: 0; }
.timeline-item {
  display: flex; align-items: flex-start; gap: 0.85rem; padding: 0.95rem 1.25rem; border-bottom: 1px solid #f1f5f9;
  animation: ypbp-fade-up 200ms ease both;
}
.activity-timeline li.timeline-empty { padding: 2.5rem 1.5rem; text-align: center; border-bottom: 0; }
.timeline-item:last-child { border-bottom: 0; }
.timeline-icon {
  flex-shrink: 0; display: inline-flex; align-items: center; justify-content: center; width: 2.25rem; height: 2.25rem;
  border-radius: 9999px; background: #eff6ff; color: #1d4ed8;
}
.timeline-icon-login { background: #dbeafe; color: #1e40af; }
.timeline-icon-search { background: #f1f5f9; color: #475569; }
.timeline-icon-view { background: #ede9fe; color: #6d28d9; }
.timeline-icon-download { background: #d1fae5; color: #065f46; }
.timeline-icon-warn { background: #fef3c7; color: #92400e; }
.timeline-body { flex: 1; min-width: 0; }
.timeline-top { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem; }
.timeline-bank { font-weight: 700; font-size: 0.88rem; color: #0f172a; }
.timeline-action { font-size: 0.72rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.03em; padding: 0.15rem 0.5rem; border-radius: 9999px; background: #f1f5f9; color: #475569; }
.timeline-details { margin: 0.3rem 0 0; font-size: 0.85rem; color: #334155; word-break: break-word; }
.timeline-meta { margin-top: 0.35rem; display: flex; flex-wrap: wrap; gap: 0.85rem; font-size: 0.76rem; color: #94a3b8; }
.timeline-meta span { display: inline-flex; align-items: center; gap: 0.3rem; }
.timeline-link {
  margin-top: 0.5rem; display: inline-flex; align-items: center; gap: 0.3rem; border: 0; background: #eff6ff;
  color: #1d4ed8; font-size: 0.78rem; font-weight: 700; padding: 0.3rem 0.65rem; border-radius: 9999px;
  cursor: pointer; transition: background 150ms ease;
}
.timeline-link:hover { background: #dbeafe; }

.modal-body { margin-top: 0.25rem; }
.preview-header { margin-bottom: 0.75rem; }
.preview-fields { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 0.75rem 1.25rem; }
.preview-field { display: flex; flex-direction: column; gap: 0.15rem; min-width: 0; }
.preview-field .field-hint { margin: 0; }
.preview-field strong { font-size: 0.9rem; color: #0f172a; word-break: break-word; }
.preview-media-heading { display: flex; align-items: center; gap: 0.4rem; margin: 1.1rem 0 0.5rem; font-size: 0.85rem; font-weight: 700; color: #1e3a8a; }
@media (max-width: 480px) { .preview-fields { grid-template-columns: 1fr; } }

/* ================================================================= */
/* Lightbox                                                            */
/* ================================================================= */

.lightbox[hidden] { display: none !important; }
.lightbox { position: fixed; inset: 0; z-index: 2000; display: grid; place-items: center; padding: 1rem; }
.lightbox-backdrop { position: absolute; inset: 0; background: rgba(15,23,42,0.85); }
.lightbox-panel { position: relative; z-index: 1; width: min(960px, 100%); max-height: 92vh; display: flex; align-items: center; justify-content: center; gap: 0.35rem; flex-wrap: wrap; }
.lightbox-figure { margin: 0; max-width: calc(100% - 6rem); text-align: center; }
.lightbox-figure img { max-width: 100%; max-height: 78vh; border-radius: 0.75rem; background: #0f172a; object-fit: contain; }
.lightbox-figure img.is-broken-img { min-width: 220px; min-height: 160px; opacity: 0.4; }
.lightbox-figure figcaption { margin-top: 0.65rem; color: #e2e8f0; font-size: 0.9rem; font-weight: 600; }
.lightbox-close, .lightbox-nav {
  display: inline-flex; align-items: center; justify-content: center;
  border: 0; background: rgba(255,255,255,0.1); color: #fff; border-radius: 9999px;
  cursor: pointer; line-height: 1; transition: background 150ms ease;
}
.lightbox-close { position: absolute; top: -0.25rem; right: 0.25rem; z-index: 2; width: 2.5rem; height: 2.5rem; }
.lightbox-nav { flex-shrink: 0; width: 2.75rem; height: 2.75rem; }
.lightbox-nav:hover, .lightbox-close:hover { background: rgba(255,255,255,0.2); }

/* ================================================================= */
/* System pages (404 / session expired)                              */
/* ================================================================= */

.page-system { min-height: 100vh; display: flex; flex-direction: column; background: #f1f5f9; }
.system-hero { background: linear-gradient(90deg, #1e3a8a 0%, #1d4ed8 60%, #2563eb 100%); color: #fff; padding: 1.5rem 1.25rem; box-shadow: 0 4px 20px rgba(30,64,175,0.25); }
.system-hero-inner { max-width: 560px; margin: 0 auto; }
.system-main { flex: 1; display: grid; place-items: center; padding: 2rem 1rem; }
.system-card { width: min(480px, 100%); text-align: center; animation: ypbp-fade-up 280ms ease both; }
.system-card h1 { margin: 0.25rem 0 0.5rem; color: #1e3a8a; font-size: 1.6rem; font-weight: 700; }
.system-code {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.35rem; margin-bottom: 0.75rem;
  padding: 0.35rem 0.75rem; border-radius: 0.5rem; background: #eff6ff; color: #1d4ed8;
  font-weight: 800; letter-spacing: 0.04em;
}
.system-actions { display: flex; flex-wrap: wrap; gap: 0.5rem; justify-content: center; margin-top: 1.25rem; }

/* ================================================================= */
/* Responsive (page-level)                                            */
/* ================================================================= */

@media (max-width: 640px) {
  .container { padding: 1rem; }
  .app-header {
    min-height: 0;
    padding: 0.45rem 0.85rem;
  }
  .header-brand {
    flex: 1 1 auto;
    max-width: none;
  }
  .header-yardpro-logo {
    height: 2.25rem;
    max-width: 5.25rem;
    padding: 0;
  }
  .page-toolbar { flex-direction: column; }
  .metric-grid { grid-template-columns: 1fr; }
  .vehicle-dates { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .vehicle-card-top { flex-direction: column; padding-right: 0; }
  .vehicle-thumb, .vehicle-thumb-empty { width: 100%; height: 160px; }
  .vehicle-card-chevron { display: none; }
  .meta-label { flex-basis: 4.5rem; }
  .stats-grid { gap: 0.5rem; }
  .stat-card { padding: 0.75rem; gap: 0.5rem; }
  .stat-card-icon { width: 2.25rem; height: 2.25rem; }
  .stat-card-value { font-size: 1.15rem; }
  .filter-bar-row { flex-direction: column; align-items: stretch; }
  .search-form { max-width: none; }
  .adv-grid { grid-template-columns: 1fr; }
  .dv-field { grid-template-columns: 1fr; gap: 0.15rem; }
  .skeleton-grid { grid-template-columns: repeat(2, 1fr); }
  .gallery-grid { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .live-new-pill { top: auto; bottom: 2.5rem; font-size: 0.85rem; padding: 0.7rem 1rem; }
  .lightbox-figure { max-width: 100%; }
  .lightbox-panel { flex-wrap: wrap; }
  .lightbox-nav { order: 3; }
  .data-table th, .data-table td { padding: 0.7rem 0.75rem; font-size: 0.85rem; }
}

/* ================================================================= */
/* Bank panel — professional inline listing (reference UI)            */
/* ================================================================= */

.page-bank-dashboard {
  background: #f3f5f8;
  -webkit-font-smoothing: antialiased;
}
.page-bank-dashboard .app-header {
  padding-left: 1rem;
  padding-right: 1rem;
}
.page-bank-dashboard .container.bp-dash {
  max-width: none;
  width: 100%;
  padding: 0.65rem 0.85rem 1.75rem;
}
@media (min-width: 1200px) {
  .page-bank-dashboard .container.bp-dash { padding: 0.75rem 1.1rem 1.75rem; }
}
.page-bank-dashboard .card {
  border-radius: 0.65rem;
  border-color: #e4e8ee;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.05);
  padding: 0.75rem 0.9rem;
}
.page-bank-dashboard .btn-primary,
.page-bank-dashboard .bp-download-now {
  background: #0056d2;
  box-shadow: 0 1px 3px rgba(0, 86, 210, 0.25);
}
.page-bank-dashboard .btn-primary:hover:not(:disabled),
.page-bank-dashboard .bp-download-now:hover:not(:disabled) {
  background: #0047b3;
  filter: none;
  box-shadow: 0 2px 6px rgba(0, 86, 210, 0.3);
}

/* Filter bar */
.bp-stats-strip {
  display: grid;
  grid-template-columns: repeat(8, minmax(0, 1fr));
  gap: 0.3rem;
  width: 100%;
  margin-bottom: 0.55rem;
  padding: 0.4rem 0.45rem;
}
.bp-stat-chip {
  display: flex;
  align-items: center;
  gap: 0.3rem;
  min-width: 0;
  padding: 0.3rem 0.35rem;
  border-radius: 0.45rem;
  background: #f8fafc;
  border: 1px solid #e8ecf1;
}
.bp-stat-chip-icon {
  flex-shrink: 0;
  width: 1.45rem;
  height: 1.45rem;
  border-radius: 0.32rem;
  display: grid;
  place-items: center;
}
.bp-stat-chip-icon svg { width: 0.8rem; height: 0.8rem; }
.bp-stat-chip-icon-yards { background: #eff6ff; color: #0056d2; }
.bp-stat-chip-icon-inactive { background: #f1f5f9; color: #64748b; }
.bp-stat-chip-icon-today-in { background: #dcfce7; color: #15803d; }
.bp-stat-chip-icon-today-out { background: #ffedd5; color: #c2410c; }
.bp-stat-chip-icon-inyard { background: #dcfce7; color: #15803d; }
.bp-stat-chip-icon-outward { background: #fee2e2; color: #b91c1c; }
.bp-stat-chip-icon-rows { background: #f1f5f9; color: #475569; }
.bp-stat-chip-icon-docs { background: #eff6ff; color: #0056d2; }
.bp-stat-chip-body { min-width: 0; flex: 1; }
.bp-stat-chip-label {
  font-size: 0.5rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  color: #8b95a5;
  line-height: 1.15;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.bp-stat-chip-value {
  margin-top: 0.04rem;
  font-size: 0.92rem;
  font-weight: 800;
  color: #0f172a;
  line-height: 1.1;
}
.bp-stat-chip-value .stat-skel {
  display: inline-block;
  width: 1.75rem;
  height: 0.75rem;
  border-radius: 0.3rem !important;
  vertical-align: middle;
}
.bp-stat-chip-action {
  width: 100%;
  text-align: left;
  cursor: pointer;
  font: inherit;
  color: inherit;
  transition: border-color 150ms ease, background 150ms ease, box-shadow 150ms ease;
}
.bp-stat-chip-action:hover {
  border-color: #93c5fd;
  background: #eff6ff;
  box-shadow: 0 1px 4px rgba(0, 86, 210, 0.12);
}
.bp-stat-chip-action.is-active {
  border-color: #22c55e;
  background: #f0fdf4;
  box-shadow: 0 0 0 1px rgba(34, 197, 94, 0.25);
}
#btn-today-release.bp-stat-chip-action.is-active {
  border-color: #f97316;
  background: #fff7ed;
  box-shadow: 0 0 0 1px rgba(249, 115, 22, 0.25);
}
.bp-stat-chip-cta {
  font-size: 0.72rem !important;
  color: #0056d2 !important;
  font-weight: 700 !important;
}
@media (max-width: 1100px) {
  .bp-stats-strip {
    grid-template-columns: repeat(8, minmax(5.5rem, 1fr));
    overflow-x: auto;
    gap: 0.28rem;
  }
}
@media (max-width: 720px) {
  .bp-stats-strip {
    grid-template-columns: repeat(8, minmax(5.25rem, 1fr));
  }
}

.bp-filter-bar { margin-bottom: 0.5rem; }
.bp-filter-top {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 0.4rem;
  width: 100%;
}
.bp-search-form {
  flex: 1.4 1 0;
  min-width: 140px;
  max-width: none;
  position: relative;
}
.bp-search-form .search-icon {
  position: absolute;
  left: 0.8rem;
  top: 50%;
  transform: translateY(-50%);
  color: #94a3b8;
  pointer-events: none;
}
.bp-search-input {
  padding: 0 0.75rem 0 2.15rem;
  width: 100%;
  height: 2.125rem;
  border-radius: 0.5rem;
  border: 1px solid #dde3ea;
  background: #f8fafc;
  font-size: 0.78rem;
  color: #0f172a;
}
.bp-search-input::placeholder { color: #94a3b8; }
.bp-search-input:focus { background: #fff; border-color: #93c5fd; }

.bp-inline-filters {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 0.35rem;
  flex: 2.6 1 0;
  min-width: 0;
  width: 100%;
}
.bp-filter-pill-wrap {
  position: relative;
  flex: 1 1 0;
  min-width: 0;
}
.bp-filter-pill {
  width: 100%;
  min-width: 0;
  max-width: none;
  height: 2.125rem;
  padding: 0 1.75rem 0 0.55rem;
  border-radius: 0.5rem;
  border: 1px solid #dde3ea;
  background: #fff;
  font-size: 0.78rem;
  font-weight: 600;
  color: #334155;
}
.bp-filter-pill-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.3rem;
  flex: 0 0 auto;
  height: 2.125rem;
  padding: 0 0.7rem;
  border-radius: 0.5rem;
  border: 1px solid #dde3ea;
  background: #fff;
  font-size: 0.78rem;
  font-weight: 600;
  color: #334155;
  cursor: pointer;
  white-space: nowrap;
  transition: border-color 150ms ease, background 150ms ease, color 150ms ease;
}
.bp-filter-pill-btn svg { width: 0.9rem; height: 0.9rem; color: #64748b; }
.bp-filter-pill-btn:hover,
.bp-filter-pill-btn.is-active {
  border-color: #93c5fd;
  background: #eff6ff;
  color: #0056d2;
}
.bp-filter-pill-btn.is-active svg { color: #0056d2; }

/* Excel export — keep green above shared pill hover rules */
.bp-filter-pill-btn.bp-excel-btn {
  color: #fff !important;
  border-color: #1d6f42 !important;
  background: #217346 !important;
  font-weight: 700;
  box-shadow: 0 1px 2px rgba(33, 115, 70, 0.28);
}
.bp-filter-pill-btn.bp-excel-btn:hover,
.bp-filter-pill-btn.bp-excel-btn:focus {
  color: #fff !important;
  border-color: #145a32 !important;
  background: #185c37 !important;
}
.bp-filter-pill-btn.bp-excel-btn svg {
  color: #fff !important;
}

.bp-sort-wrap {
  display: flex;
  align-items: center;
  gap: 0.3rem;
  flex: 0 0 auto;
  margin-left: auto;
}
.bp-sort-label { font-size: 0.78rem; font-weight: 600; color: #64748b; white-space: nowrap; }
.bp-sort-select {
  min-width: 5.5rem;
  width: auto;
  height: 2.125rem;
  padding: 0 1.85rem 0 0.55rem;
  border-radius: 0.5rem;
  border: 1px solid #dde3ea;
  font-size: 0.78rem;
  font-weight: 600;
  color: #334155;
  background: #fff;
}

.bp-filter-advanced {
  margin-top: 0.75rem;
  padding-top: 0.75rem;
  border-top: 1px solid #f1f5f9;
}
.bp-filter-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.55rem 0.65rem;
  align-items: end;
}
.bp-filter-grid .field-label {
  margin-top: 0;
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #94a3b8;
  font-weight: 700;
}
.bp-filter-grid-dates {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

/* Export bar */
.bp-export-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.65rem;
  margin-bottom: 0.65rem;
  padding: 0.7rem 1rem;
  background: #f8fafc;
}
.bp-export-left { display: flex; flex-wrap: wrap; align-items: center; gap: 0.45rem; }
.bp-export-label { font-size: 0.8125rem; font-weight: 600; color: #475569; }
.bp-export-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  height: 2rem;
  padding: 0 0.75rem;
  font-size: 0.8125rem;
  font-weight: 600;
  border-radius: 0.45rem;
  border: 1px solid #d1d9e3;
  background: #fff;
  color: #1e293b;
  box-shadow: 0 1px 1px rgba(15, 23, 42, 0.04);
}
.bp-export-btn svg { width: 0.95rem; height: 0.95rem; color: #64748b; }
.bp-export-btn:hover:not(:disabled) { background: #fff; border-color: #94a3b8; color: #0f172a; }
.bp-download-now {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  height: 2.25rem;
  padding: 0 1.15rem;
  font-size: 0.8125rem;
  font-weight: 700;
  border-radius: 0.45rem;
  white-space: nowrap;
}
.bp-download-now svg { width: 1rem; height: 1rem; }

/* List header + rows */
.vd-list-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  margin-bottom: 0.5rem;
  background: transparent;
  border: 0;
  box-shadow: none;
  border-radius: 0;
}
.vd-list { display: flex; flex-direction: column; gap: 0.6rem; min-width: 0; }

.vd-result-count {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.35rem 1rem 0.55rem;
  font-size: 0.8125rem;
  font-weight: 600;
  color: #475569;
  background: #f3f5f8;
  border-bottom: 1px solid #e8ecf1;
  position: sticky;
  left: 0;
  z-index: 6;
}
.vd-result-count strong {
  color: #0056d2;
  font-weight: 800;
  font-size: 0.95rem;
}

.vd-list-header {
  position: sticky;
  top: 0;
  z-index: 5;
  background: #f3f5f8;
  padding: 0.15rem 0 0.4rem;
  margin-bottom: 0.1rem;
}
.vd-list-header-inner {
  display: grid;
  grid-template-columns: 2.25rem minmax(13rem, 1.25fr) minmax(9.5rem, 1fr) minmax(10rem, 1.05fr) minmax(11rem, 1.1fr) minmax(10.5rem, 1fr);
  gap: 0.75rem;
  padding: 0 1rem;
  min-width: 1040px;
}
.vd-h-num { width: 2.25rem; }
.vd-h-col {
  font-size: 0.6rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #5a7eb8;
  line-height: 1.4;
}

.vd-row {
  display: grid;
  grid-template-columns: 2.25rem minmax(13rem, 1.25fr) minmax(9.5rem, 1fr) minmax(10rem, 1.05fr) minmax(11rem, 1.1fr) minmax(10.5rem, 1fr);
  gap: 0.75rem;
  padding: 0.9rem 1rem;
  align-items: start;
  min-width: 1040px;
  background: #fff;
  border: 1px solid #e4e8ee;
  border-radius: 0.65rem;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.04);
  transition: box-shadow 150ms ease, border-color 150ms ease;
}
.vd-row:hover {
  border-color: #c7daf5;
  box-shadow: 0 3px 10px rgba(0, 86, 210, 0.07);
}
.vd-row-new { animation: ypbp-slide-in 0.55s ease-out 1; background: #f0f7ff; border-color: #bfdbfe; }

.vd-col:not(.vd-col-num):not(.vd-col-media) {
  padding-right: 0.55rem;
  border-right: 1px solid #f0f3f7;
}
.vd-col-num { display: flex; justify-content: center; padding-top: 0.35rem; }
.vd-dot {
  display: block;
  width: 0.85rem;
  height: 0.85rem;
  border-radius: 999px;
  flex-shrink: 0;
  box-shadow: 0 0 0 2px #fff, 0 1px 3px rgba(15, 23, 42, 0.18);
}
.vd-dot-today {
  background: #22c55e;
  box-shadow: 0 0 0 2px #fff, 0 0 0 3px rgba(34, 197, 94, 0.35), 0 1px 3px rgba(15, 23, 42, 0.12);
}
.vd-dot-past {
  background: #2563eb;
}
.vd-seq {
  display: none;
}

.vd-agreement-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.45rem;
  margin-bottom: 0.25rem;
}
.vd-agreement-head .status-badge {
  flex-shrink: 0;
  margin-top: 0.1rem;
}
.vd-agreement-no {
  font-size: 0.86rem;
  font-weight: 800;
  color: #0f172a;
  word-break: break-all;
  margin-bottom: 0;
  line-height: 1.35;
  letter-spacing: -0.01em;
  min-width: 0;
  flex: 1;
}
.bp-filter-actions { display: flex; align-items: flex-end; }

.vd-borrower {
  font-size: 0.8rem;
  font-weight: 700;
  color: #334155;
  margin-bottom: 0.35rem;
  display: flex;
  align-items: center;
  gap: 0.3rem;
  line-height: 1.35;
}
.vd-reg-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-bottom: 0.45rem;
}
.vd-reg-row .vd-icon { color: #64748b; }
.vd-reg {
  font-size: 0.9rem;
  font-weight: 800;
  color: #0f172a;
  letter-spacing: 0.03em;
}
.vd-reg-segment {
  margin-left: 0.15rem;
  padding: 0.12rem 0.45rem;
  border-radius: 0.3rem;
  background: #f1f5f9;
  color: #475569;
  font-size: 0.68rem;
  font-weight: 700;
  line-height: 1.2;
  white-space: nowrap;
  max-width: 9rem;
  overflow: hidden;
  text-overflow: ellipsis;
}
.vd-col-agreement .vd-field {
  margin-top: 0.05rem;
}
.vd-col-agency .vd-field-agency-name .vd-label {
  font-weight: 800;
  color: #334155;
}
.vd-col-agency .vd-field-agency-name .vd-value {
  font-weight: 800;
}
.icon-btn-small {
  width: 1.4rem;
  height: 1.4rem;
  min-width: 1.4rem;
  border-radius: 0.35rem;
}
.vd-copy { color: #94a3b8; flex-shrink: 0; }
.vd-copy:hover { color: #0056d2; background: #eff6ff; }
.vd-copy svg { width: 0.8rem; height: 0.8rem; }

.page-bank-dashboard .vd-col-agreement .status-badge {
  margin-top: 0.1rem;
  font-size: 0.68rem;
  padding: 0.2rem 0.55rem;
}

.vd-field {
  display: grid;
  grid-template-columns: minmax(5.5rem, 52%) 1fr;
  gap: 0.2rem 0.5rem;
  font-size: 0.73rem;
  margin-bottom: 0.24rem;
  align-items: baseline;
}
.vd-label {
  color: #7b8798;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 0.22rem;
  line-height: 1.4;
}
.vd-value {
  color: #0f172a;
  font-weight: 600;
  word-break: break-word;
  line-height: 1.4;
  text-align: right;
}
.vd-value-strong {
  font-weight: 800;
  font-size: 0.76rem;
  color: #0f172a;
}
.vd-link { color: #0056d2; font-weight: 700; }
.vd-icon { flex-shrink: 0; color: #a0aab8; width: 0.75rem; height: 0.75rem; }
.vd-phone { color: #0056d2; font-weight: 700; text-decoration: none; }
.vd-phone:hover { text-decoration: underline; }

.vd-field .vd-value:has(.status-badge) {
  display: flex;
  justify-content: flex-end;
}
.vd-field .status-badge {
  font-size: 0.65rem;
  padding: 0.15rem 0.5rem;
  text-transform: lowercase;
}

.vd-field-days .vd-days-value {
  color: #0056d2;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}

/* Media column */
.vd-media-block {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  min-width: 0;
}
.vd-media-top {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  min-height: 1.25rem;
}
.vd-zip-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.2rem 0.45rem;
  font-size: 0.65rem;
  font-weight: 700;
  line-height: 1.2;
  border-radius: 0.35rem;
  border: 1px solid #c7daf5;
  background: #fff;
  color: #0056d2;
  white-space: nowrap;
  cursor: pointer;
  transition: background 150ms ease, border-color 150ms ease;
}
.vd-zip-btn svg { width: 0.75rem; height: 0.75rem; flex-shrink: 0; }
.vd-zip-btn:hover:not(:disabled) { background: #eff6ff; border-color: #93c5fd; color: #0047b3; }

.vd-media-gallery {
  width: 100%;
  display: block;
  border: 1px solid #e4e8ee;
  border-radius: 0.5rem;
  overflow: hidden;
  background: #f8fafc;
  cursor: pointer;
  padding: 0;
  text-align: left;
  transition: border-color 150ms ease, box-shadow 150ms ease;
}
.vd-media-gallery:hover { border-color: #93c5fd; box-shadow: 0 2px 6px rgba(0, 86, 210, 0.1); }
.vd-media-main { aspect-ratio: 4/3; background: #e8ecf1; display: grid; place-items: center; overflow: hidden; max-height: 88px; }
.vd-media-main-img { width: 100%; height: 100%; object-fit: cover; display: block; }
.vd-media-main-empty { color: #94a3b8; display: grid; place-items: center; width: 100%; height: 100%; min-height: 72px; }
.vd-media-thumbs { display: flex; gap: 0.2rem; padding: 0.3rem; background: #fff; }
.vd-media-thumb { width: 2.1rem; height: 2.1rem; border-radius: 0.28rem; overflow: hidden; flex-shrink: 0; border: 1px solid #e4e8ee; position: relative; }
.vd-media-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.vd-media-thumb-fade { opacity: 0.45; }
.vd-media-thumb-more::after {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.55);
}
.vd-media-more-label {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  z-index: 1;
  color: #fff;
  font-size: 0.62rem;
  font-weight: 800;
}

.vd-row-skeleton {
  height: 160px;
  border-radius: 0.75rem;
  border: 1px solid #e8ecf1;
  background: linear-gradient(90deg, #f1f5f9 25%, #e8ecf1 50%, #f1f5f9 75%);
  background-size: 200% 100%;
  animation: ypbp-shimmer 1.2s ease-in-out infinite;
}

/* Pagination */
.bp-pager {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.65rem;
  margin: 0.85rem 0 0.25rem;
  padding: 0.65rem 0.85rem;
  background: #fff;
  border: 1px solid #e8ecf1;
  border-radius: 0.75rem;
}
.bp-pager-info { font-size: 0.8125rem; font-weight: 600; color: #5c6778; }
.bp-pager-nav { display: flex; align-items: center; gap: 0.3rem; }
.pager-numbers { display: flex; align-items: center; gap: 0.2rem; flex-wrap: wrap; }
.pager-num {
  min-width: 1.85rem;
  height: 1.85rem;
  padding: 0 0.3rem;
  border-radius: 0.45rem;
  border: 1px solid #e2e8f0;
  background: #fff;
  color: #475569;
  font-size: 0.78rem;
  font-weight: 700;
  cursor: pointer;
  display: grid;
  place-items: center;
  transition: background 150ms ease, border-color 150ms ease;
}
.pager-num:hover:not(:disabled):not(.is-active) { background: #f8fafc; border-color: #cbd5e1; }
.pager-num.is-active { background: #0056d2; border-color: #0056d2; color: #fff; }
.pager-num:disabled { opacity: 0.45; cursor: not-allowed; }
.pager-arrow { padding: 0 0.4rem; }
.pager-arrow svg { width: 0.9rem; height: 0.9rem; }
.pager-ellipsis { padding: 0 0.2rem; color: #94a3b8; font-weight: 700; font-size: 0.78rem; }

/* Status badges — reference tones */
.page-bank-dashboard .badge-inyard { background: #dcfce7; color: #15803d; }
.page-bank-dashboard .badge-outward { background: #fee2e2; color: #b91c1c; }
.page-bank-dashboard .status-active { background: #e3f5ec; color: #047857; text-transform: lowercase; }
.page-bank-dashboard .badge-pending { background: #fef6e6; color: #b45309; }

.media-modal[hidden] { display: none !important; }
.media-modal { position: fixed; inset: 0; z-index: 1100; display: grid; place-items: center; padding: 1rem; }
.media-modal-backdrop { position: absolute; inset: 0; background: rgba(15,23,42,0.5); }
.media-modal-panel {
  position: relative; z-index: 1; width: min(920px, 100%); max-height: min(90vh, 800px);
  background: #fff; border-radius: 1rem; box-shadow: 0 20px 50px rgba(15,23,42,0.2);
  display: flex; flex-direction: column; overflow: hidden;
}
.media-modal-head {
  display: flex; align-items: flex-start; justify-content: space-between; gap: 0.75rem;
  padding: 1rem 1.25rem; border-bottom: 1px solid #f1f5f9;
}
.media-modal-head h2 { margin: 0; font-size: 1.05rem; font-weight: 800; color: #0f172a; }
.media-modal-head .muted { margin: 0.2rem 0 0; font-size: 0.8rem; }
.media-modal-body { flex: 1; overflow: auto; padding: 1rem 1.25rem 1.25rem; }
.media-modal-panel > .media-tabs { padding: 0 1.25rem; flex-shrink: 0; margin-bottom: 0.75rem; }
.media-panel[hidden] { display: none !important; }

@media (max-width: 1100px) {
  .vd-list-header-inner,
  .vd-row { min-width: 980px; }
}
@media (max-width: 900px) {
  .bp-filter-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .bp-export-bar { flex-direction: column; align-items: stretch; }
  .bp-export-left { justify-content: flex-start; }
  .bp-download-now { width: 100%; justify-content: center; }
}
@media (max-width: 1100px) {
  .bp-filter-top,
  .bp-inline-filters { flex-wrap: wrap; }
  .bp-search-form { flex: 1 1 100%; max-width: none; }
  .bp-filter-pill-wrap { flex: 1 1 7rem; }
}
@media (max-width: 640px) {
  .page-bank-dashboard .container.bp-dash { padding: 0.4rem 0.45rem 1.5rem; }
  .header-yardpro-logo { height: 2.25rem; max-width: 5.25rem; padding: 0; }
  .bp-filter-top { flex-direction: column; align-items: stretch; flex-wrap: wrap; }
  .bp-search-form { max-width: none; flex: 1 1 auto; }
  .bp-inline-filters { width: 100%; flex-wrap: wrap; }
  .bp-filter-pill-wrap { flex: 1 1 calc(50% - 0.35rem); }
  .bp-filter-pill { max-width: none; }
  .bp-filter-grid { grid-template-columns: 1fr; }
  .bp-pager { flex-direction: column; align-items: stretch; }
  .bp-pager-nav { justify-content: center; }
}
