
:root{
  --bg:#f6f8fb;
  --surface:#ffffff;
  --surface-2:#f9fafb;
  --text:#0f172a;
  --muted:#64748b;
  --border:#e2e8f0;
  --primary:#2563eb;
  --primary-hover:#1d4ed8;
  --danger:#dc2626;
  --danger-hover:#b91c1c;
  --success:#16a34a;
  --warning:#d97706;
  --nav:#0f172a;
  --shadow:0 8px 28px rgba(15,23,42,.07);
  --radius:16px;
}

*{box-sizing:border-box}

html{scroll-behavior:smooth}

body{
  margin:0;
  font-family:Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
  background:
    radial-gradient(circle at top left, rgba(37,99,235,.06), transparent 28%),
    var(--bg);
  color:var(--text);
  line-height:1.45;
}

.topbar,
nav{
  background:rgba(15,23,42,.97);
  color:#fff;
  padding:14px 22px;
  display:grid;
  grid-template-columns:minmax(180px,240px) minmax(280px,1fr) auto;
  gap:18px;
  align-items:center;
  position:sticky;
  top:0;
  z-index:1000;
  box-shadow:0 6px 24px rgba(15,23,42,.18);
  backdrop-filter:blur(12px);
}

.brand{
  font-size:21px;
  font-weight:800;
  letter-spacing:-.02em;
  white-space:nowrap;
}

.nav-search{
  width:100%;
  display:flex;
  justify-content:center;
}

.nav-search form{
  width:min(680px,100%);
  display:flex;
  gap:8px;
}

.nav-search input{
  margin:0;
  width:100%;
  border:1px solid rgba(255,255,255,.12);
  background:rgba(255,255,255,.96);
  color:var(--text);
  border-radius:999px;
  padding:11px 16px;
  outline:none;
}

.nav-search input:focus{
  border-color:#60a5fa;
  box-shadow:0 0 0 4px rgba(96,165,250,.15);
}

.nav-search button{
  border-radius:999px;
  padding:10px 18px;
}

.nav-right,
.nav-links{
  display:flex;
  align-items:center;
  gap:14px;
  justify-content:flex-end;
  flex-wrap:wrap;
}

nav a,
.nav-right a,
.nav-links a{
  color:#e2e8f0;
  text-decoration:none;
  font-weight:650;
  font-size:14px;
  transition:.15s ease;
}

nav a:hover,
.nav-right a:hover,
.nav-links a:hover{
  color:#fff;
  transform:translateY(-1px);
}

.nav-user,
.who{
  color:#94a3b8;
  font-size:12px;
  padding-left:10px;
  border-left:1px solid #334155;
  white-space:nowrap;
}

main{
  width:min(1320px, calc(100% - 28px));
  margin:28px auto;
  padding-bottom:34px;
}

h1,h2,h3,h4{
  letter-spacing:-.025em;
  color:var(--text);
}

h1{font-size:32px;margin-top:0}
h2{font-size:24px}
h3{font-size:18px}

.card{
  background:rgba(255,255,255,.98);
  border:1px solid rgba(226,232,240,.9);
  border-radius:var(--radius);
  padding:22px;
  box-shadow:var(--shadow);
  margin-bottom:20px;
}

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

.grid4{
  display:grid;
  grid-template-columns:repeat(4,minmax(0,1fr));
  gap:18px;
}

.stat{
  background:linear-gradient(180deg,#fff,#fafcff);
  border:1px solid var(--border);
  padding:20px;
  border-radius:var(--radius);
  box-shadow:0 6px 22px rgba(15,23,42,.05);
}

.stat>div:first-child{
  color:var(--muted);
  font-size:13px;
  font-weight:700;
  text-transform:uppercase;
  letter-spacing:.04em;
}

.stat b{
  display:block;
  margin-top:6px;
  font-size:30px;
  letter-spacing:-.03em;
}

label{
  display:block;
  margin-bottom:4px;
  font-size:13px;
  font-weight:700;
  color:#334155;
}

input,select,textarea{
  width:100%;
  padding:11px 12px;
  margin:5px 0 14px;
  border:1px solid #cbd5e1;
  border-radius:10px;
  background:#fff;
  color:var(--text);
  font:inherit;
  transition:.15s ease;
}

input:focus,select:focus,textarea:focus{
  outline:none;
  border-color:#60a5fa;
  box-shadow:0 0 0 4px rgba(37,99,235,.10);
}

textarea{
  min-height:100px;
  resize:vertical;
}

button,.button{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:7px;
  padding:10px 15px;
  border:0;
  border-radius:10px;
  background:var(--nav);
  color:white;
  text-decoration:none;
  font-weight:750;
  font-size:14px;
  cursor:pointer;
  transition:transform .12s ease, box-shadow .12s ease, background .12s ease;
}

button:hover,.button:hover{
  transform:translateY(-1px);
  box-shadow:0 5px 14px rgba(15,23,42,.12);
}

.blue{background:var(--primary)}
.blue:hover{background:var(--primary-hover)}
.green{background:var(--success)}
.red{background:var(--danger)}
.red:hover{background:var(--danger-hover)}

.table-wrap{
  overflow-x:auto;
  border:1px solid var(--border);
  border-radius:12px;
}

table{
  width:100%;
  border-collapse:collapse;
  background:#fff;
}

th{
  text-align:left;
  padding:12px 12px;
  background:#f8fafc;
  border-bottom:1px solid var(--border);
  color:#475569;
  font-size:11px;
  text-transform:uppercase;
  letter-spacing:.06em;
}

td{
  text-align:left;
  padding:12px;
  border-bottom:1px solid #eef2f7;
  font-size:14px;
  vertical-align:top;
}

tr:last-child td{border-bottom:0}
tbody tr:hover{background:#fbfdff}

.flash{
  background:#fffbeb;
  color:#92400e;
  border:1px solid #fde68a;
  padding:12px 14px;
  border-radius:12px;
  margin-bottom:14px;
  box-shadow:0 4px 14px rgba(146,64,14,.05);
}

.notice{
  padding:13px 14px;
  background:#eff6ff;
  border:1px solid #bfdbfe;
  border-left:4px solid var(--primary);
  border-radius:10px;
  color:#1e3a8a;
}

.status{
  display:inline-flex;
  align-items:center;
  padding:5px 9px;
  border-radius:999px;
  background:#e2e8f0;
  font-size:11px;
  font-weight:800;
  letter-spacing:.02em;
}

.Open,.Working{
  background:#dbeafe;
  color:#1d4ed8;
}

.Recovered{
  background:#dcfce7;
  color:#166534;
}

.Closed,.Canceled{
  background:#e2e8f0;
  color:#475569;
}

.Hold{
  background:#fef3c7;
  color:#92400e;
}

.small{
  font-size:12px;
  color:var(--muted);
}

hr{
  border:0;
  height:1px;
  background:var(--border);
}

a{color:var(--primary)}
a:hover{color:var(--primary-hover)}

.danger-zone{
  border:1px solid #fecaca;
  background:linear-gradient(180deg,#fff,#fff7f7);
}

.danger-zone h3{
  color:#991b1b;
}

.danger-note{
  color:#7f1d1d;
  font-size:13px;
}

@media(max-width:1100px){
  .topbar,nav{
    grid-template-columns:1fr auto;
  }
  .nav-search{
    grid-column:1/-1;
    grid-row:2;
  }
}

@media(max-width:800px){
  .topbar,nav{
    display:flex;
    flex-direction:column;
    align-items:stretch;
    gap:11px;
  }

  .brand{text-align:center}

  .nav-right,.nav-links{
    justify-content:center;
    gap:10px;
  }

  .nav-user,.who{
    border-left:0;
    padding-left:0;
    width:100%;
    text-align:center;
  }

  .grid,.grid4{
    grid-template-columns:1fr;
  }

  main{
    width:min(100% - 18px,1320px);
    margin-top:16px;
  }

  .card{
    padding:16px;
    border-radius:13px;
  }

  h1{font-size:27px}
}



.photo-preview-card{
  display:inline-flex;
  flex-direction:column;
  width:220px;
  margin:8px 10px 12px 0;
  padding:8px;
  background:#fff;
  border:1px solid #dbe3ee;
  border-radius:14px;
  box-shadow:0 4px 14px rgba(15,23,42,.08);
  vertical-align:top;
}
.photo-preview-link{
  display:block;
  width:100%;
  height:165px;
  overflow:hidden;
  border-radius:10px;
  background:#f1f5f9;
}
.uploaded-photo-preview{
  width:100%;
  height:100%;
  object-fit:cover;
  display:block;
  transition:transform .18s ease;
}
.photo-preview-link:hover .uploaded-photo-preview{
  transform:scale(1.03);
}
.photo-preview-name{
  padding:8px 4px 2px;
  font-size:12px;
  font-weight:700;
  color:#475569;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
}



.photo-gallery{display:grid;grid-template-columns:repeat(auto-fill,minmax(180px,1fr));gap:14px;margin-top:12px}
.photo-card{background:#fff;border:1px solid #e2e8f0;border-radius:14px;overflow:hidden;box-shadow:0 5px 16px rgba(15,23,42,.07)}
.photo-card>a{display:block;aspect-ratio:4/3;background:#f1f5f9;overflow:hidden}
.photo-card img{width:100%;height:100%;object-fit:cover;display:block;transition:transform .15s ease}
.photo-card>a:hover img{transform:scale(1.035)}
.photo-card-footer{padding:9px;display:flex;align-items:center;justify-content:space-between;gap:8px}
.photo-name{font-size:12px;font-weight:750;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}
.photo-delete{padding:6px 8px;font-size:11px}



.sheriff-compact{
  padding:16px 20px !important;
}
.sheriff-compact h3{
  margin:0 0 12px 0 !important;
}
.sheriff-compact .grid,
.sheriff-compact .grid4{
  gap:10px !important;
  margin-bottom:8px !important;
}
.sheriff-compact label{
  margin-top:6px !important;
  margin-bottom:4px !important;
}
.sheriff-compact input{
  min-height:38px !important;
  padding:7px 10px !important;
}
.sheriff-compact button{
  margin-top:8px !important;
}

.recovery-compact{
  padding:16px 20px !important;
  margin-top:14px !important;
  margin-bottom:12px !important;
}
.recovery-compact h3{
  margin:0 0 6px 0 !important;
}
.recovery-compact p{
  margin:0 0 10px 0 !important;
}
.recovery-compact button{
  margin-top:0 !important;
  padding:10px 14px !important;
}



.vendor-order-controls{
  padding:18px 20px !important;
}
.vendor-status-actions form{
  margin:0;
}
.hold-status-box,
.hold-company-card{
  border:2px solid #facc15 !important;
  background:#fffbeb !important;
}
.hold-status-box{
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:16px;
  padding:12px 14px;
  border-radius:12px;
  flex-wrap:wrap;
}
.hold-timer-wrap{
  display:flex;
  flex-direction:column;
  gap:3px;
  min-width:150px;
  text-align:right;
}
.hold-timer-wrap span{
  font-size:11px;
  font-weight:800;
  opacity:.7;
}
.hold-timer{
  font-size:22px;
  font-variant-numeric:tabular-nums;
  letter-spacing:.5px;
}



.account-menu{
  position:relative;
}
.account-menu summary{
  cursor:pointer;
  list-style:none;
  display:flex;
  align-items:center;
  gap:6px;
  font-weight:700;
  white-space:nowrap;
}
.account-menu summary::-webkit-details-marker{
  display:none;
}
.account-caret{
  font-size:11px;
  opacity:.75;
}
.account-menu-panel{
  position:absolute;
  right:0;
  top:30px;
  width:220px;
  background:#fff;
  border:1px solid #dbe3ef;
  border-radius:12px;
  padding:7px;
  z-index:10000;
  box-shadow:0 14px 34px rgba(15,23,42,.18);
}
.account-menu-header{
  padding:10px;
  border-bottom:1px solid #e5e7eb;
  margin-bottom:5px;
  color:#0f172a;
}
.account-menu-header strong{
  display:block;
}
.account-menu-header span{
  display:block;
  margin-top:3px;
  font-size:10px;
  font-weight:800;
  opacity:.55;
}
.account-menu-panel a{
  display:block;
  color:#0f172a !important;
  text-decoration:none;
  padding:9px 10px;
  border-radius:8px;
}
.account-menu-panel a:hover{
  background:#f1f5f9;
}
.account-menu-panel .account-logout{
  color:#b91c1c !important;
  border-top:1px solid #e5e7eb;
  margin-top:5px;
  padding-top:10px;
}



:root{
  --bg:#f4f7fb;
  --surface:#ffffff;
  --surface-2:#f8fafc;
  --text:#0f172a;
  --muted:#64748b;
  --border:#dbe3ef;
  --nav:#111827;
  --nav-text:#f8fafc;
  --accent:#2563eb;
  --accent-hover:#1d4ed8;
  --danger:#b91c1c;
  --shadow:0 12px 30px rgba(15,23,42,.08);
}

html[data-theme="dark"]{
  --bg:#0b1220;
  --surface:#111827;
  --surface-2:#172033;
  --text:#e5edf8;
  --muted:#94a3b8;
  --border:#263349;
  --nav:#070d18;
  --nav-text:#f8fafc;
  --accent:#3b82f6;
  --accent-hover:#60a5fa;
  --danger:#f87171;
  --shadow:0 14px 34px rgba(0,0,0,.28);
}

body{
  background:var(--bg) !important;
  color:var(--text) !important;
  transition:background .18s ease,color .18s ease;
}

.card,
.stat,
.report-stat,
.report-filter{
  background:var(--surface) !important;
  color:var(--text) !important;
  border-color:var(--border) !important;
}

table{
  color:var(--text);
}

th{
  background:var(--surface-2) !important;
  color:var(--text) !important;
}

td{
  border-color:var(--border) !important;
}

input,
textarea,
select{
  background:var(--surface) !important;
  color:var(--text) !important;
  border-color:var(--border) !important;
}

input::placeholder,
textarea::placeholder{
  color:var(--muted);
}

.small,
.muted{
  color:var(--muted) !important;
}

/* TOP BAR */
nav{
  background:var(--nav) !important;
  color:var(--nav-text);
  border-bottom:1px solid rgba(255,255,255,.06);
  box-shadow:0 6px 20px rgba(0,0,0,.12);
}

.topbar-shell{
  width:100%;
  min-height:62px;
  display:flex;
  align-items:center;
  gap:18px;
  padding:8px 18px;
}

.topbar-brand{
  display:flex;
  align-items:center;
  gap:10px;
  color:var(--nav-text) !important;
  text-decoration:none;
  font-weight:900;
  white-space:nowrap;
}

.brand-mark{
  width:34px;
  height:34px;
  border-radius:10px;
  background:linear-gradient(135deg,#2563eb,#1d4ed8);
  color:#fff;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  font-size:12px;
  letter-spacing:.5px;
  box-shadow:0 6px 14px rgba(37,99,235,.28);
}

.brand-text{
  font-size:15px;
}

.topbar-search{
  flex:1;
  max-width:560px;
  display:flex;
  align-items:center;
  gap:7px;
  margin-left:auto;
}

.topbar-search input{
  width:100%;
  min-width:220px;
  height:38px;
  border-radius:999px !important;
  border:1px solid transparent !important;
  background:#fff !important;
  color:#0f172a !important;
  padding:0 16px !important;
}

.topbar-search button{
  height:38px;
  border-radius:999px;
  padding:0 15px;
}

.topbar-actions{
  display:flex;
  align-items:center;
  gap:6px;
  margin-left:auto;
}

.nav-pill{
  color:rgba(248,250,252,.86) !important;
  text-decoration:none;
  font-size:12px;
  font-weight:750;
  padding:8px 10px;
  border-radius:9px;
  border:0;
  background:transparent;
  cursor:pointer;
  white-space:nowrap;
}

.nav-pill:hover{
  color:#fff !important;
  background:rgba(255,255,255,.08);
}

.nav-pill-primary{
  background:#2563eb;
  color:#fff !important;
}

.nav-pill-primary:hover{
  background:#1d4ed8;
}

/* CLEAN ACTIVE NAVIGATION */
.nav-pill.nav-active{
  color:#fff !important;
  background:transparent !important;
  position:relative;
}
.nav-pill.nav-active::after{
  content:"";
  position:absolute;
  left:10px;
  right:10px;
  bottom:-10px;
  height:3px;
  border-radius:999px;
  background:#3b82f6;
  box-shadow:0 0 12px rgba(59,130,246,.45);
}
.nav-new-order{
  margin-left:4px;
  padding-inline:14px !important;
}
.nav-orders-panel{
  left:0;
  right:auto;
}

.nav-dropdown,
.account-menu{
  position:relative;
}

.nav-dropdown summary,
.account-menu summary{
  list-style:none;
}

.nav-dropdown summary::-webkit-details-marker,
.account-menu summary::-webkit-details-marker{
  display:none;
}

.nav-dropdown-panel,
.account-menu-panel{
  position:absolute;
  right:0;
  top:42px;
  min-width:205px;
  background:var(--surface);
  border:1px solid var(--border);
  border-radius:12px;
  padding:7px;
  z-index:10000;
  box-shadow:var(--shadow);
}

.nav-dropdown-panel a,
.account-menu-panel a{
  display:block;
  padding:9px 10px;
  color:var(--text) !important;
  text-decoration:none;
  border-radius:8px;
  font-size:13px;
}

.nav-dropdown-panel a:hover,
.account-menu-panel a:hover{
  background:var(--surface-2);
}

.caret{
  font-size:10px;
  opacity:.7;
}

.theme-toggle{
  width:40px;
  height:36px;
  border:1px solid rgba(255,255,255,.12);
  border-radius:10px;
  background:rgba(255,255,255,.06);
  color:#fff;
  display:flex;
  align-items:center;
  justify-content:center;
  position:relative;
  cursor:pointer;
  padding:0;
}

.theme-toggle:hover{
  background:rgba(255,255,255,.12);
}

.theme-icon{
  position:absolute;
  font-size:17px;
  line-height:1;
  transition:opacity .15s ease,transform .15s ease;
}

html[data-theme="light"] .theme-icon-sun{
  opacity:1;
  transform:scale(1);
}
html[data-theme="light"] .theme-icon-moon{
  opacity:0;
  transform:scale(.7);
}
html[data-theme="dark"] .theme-icon-sun{
  opacity:0;
  transform:scale(.7);
}
html[data-theme="dark"] .theme-icon-moon{
  opacity:1;
  transform:scale(1);
}

.account-summary{
  display:flex;
  align-items:center;
  gap:7px;
  cursor:pointer;
  color:var(--nav-text);
  padding:4px 6px;
  border-radius:10px;
}

.account-summary:hover{
  background:rgba(255,255,255,.08);
}

.account-avatar{
  width:31px;
  height:31px;
  border-radius:50%;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  background:#334155;
  color:#fff;
  font-size:12px;
  font-weight:900;
}

.account-label{
  font-size:12px;
  font-weight:750;
  max-width:110px;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
}

.account-menu-header{
  padding:10px;
  border-bottom:1px solid var(--border);
  margin-bottom:5px;
}

.account-menu-header strong{
  display:block;
  color:var(--text);
}

.account-menu-header span{
  display:block;
  color:var(--muted);
  margin-top:3px;
  font-size:10px;
  font-weight:800;
}

.account-logout{
  color:var(--danger) !important;
  border-top:1px solid var(--border);
  margin-top:5px;
}

/* Dark-mode adjustments for common status areas */
html[data-theme="dark"] .hold-status-box,
html[data-theme="dark"] .hold-company-card{
  background:#2a2412 !important;
  color:#fde68a !important;
  border-color:#854d0e !important;
}

html[data-theme="dark"] [style*="background:#f0fdf4"],
html[data-theme="dark"] [style*="background: #f0fdf4"]{
  background:#10281a !important;
}

html[data-theme="dark"] [style*="background:#fef2f2"],
html[data-theme="dark"] [style*="background: #fef2f2"]{
  background:#2b1518 !important;
}

@media(max-width:1100px){
  .topbar-shell{
    flex-wrap:wrap;
  }
  .topbar-search{
    order:3;
    max-width:none;
    width:100%;
  }
}

@media(max-width:760px){
  .brand-text,
  .account-label{
    display:none;
  }
  .topbar-actions{
    flex-wrap:wrap;
    justify-content:flex-end;
  }
}



/* DARK MODE CONTRAST FIXES */
html[data-theme="dark"]{
  color-scheme: dark;
}

html[data-theme="dark"] body{
  color:#e8eef8 !important;
}

html[data-theme="dark"] h1,
html[data-theme="dark"] h2,
html[data-theme="dark"] h3,
html[data-theme="dark"] h4,
html[data-theme="dark"] h5,
html[data-theme="dark"] h6,
html[data-theme="dark"] strong,
html[data-theme="dark"] b,
html[data-theme="dark"] label{
  color:#f8fafc !important;
}

/* Main links */
html[data-theme="dark"] main a:not(.button):not(.nav-pill),
html[data-theme="dark"] .card a:not(.button),
html[data-theme="dark"] table a{
  color:#7db4ff !important;
}

html[data-theme="dark"] main a:hover,
html[data-theme="dark"] .card a:hover,
html[data-theme="dark"] table a:hover{
  color:#b9d8ff !important;
}

/* Tables */
html[data-theme="dark"] table{
  background:#111827 !important;
  color:#e8eef8 !important;
}

html[data-theme="dark"] thead,
html[data-theme="dark"] thead tr,
html[data-theme="dark"] th{
  background:#172033 !important;
  color:#dbeafe !important;
}

html[data-theme="dark"] tbody,
html[data-theme="dark"] tbody tr{
  background:#111827 !important;
  color:#e8eef8 !important;
}

html[data-theme="dark"] tbody tr:nth-child(even){
  background:#0f1828 !important;
}

html[data-theme="dark"] tbody tr:hover{
  background:#18243a !important;
}

html[data-theme="dark"] td{
  background:transparent !important;
  color:#e8eef8 !important;
  border-color:#2a3952 !important;
}

/* Fix pale inline row backgrounds carried over from light mode */
html[data-theme="dark"] tr[style*="background"],
html[data-theme="dark"] td[style*="background"]{
  background:#111827 !important;
}

/* Muted/meta text */
html[data-theme="dark"] .muted,
html[data-theme="dark"] .small,
html[data-theme="dark"] small,
html[data-theme="dark"] .subtle{
  color:#9fb0c7 !important;
}

/* Status pills */
html[data-theme="dark"] .status,
html[data-theme="dark"] .badge,
html[data-theme="dark"] .pill{
  color:#e8eef8 !important;
}

/* Common status badge variants */
html[data-theme="dark"] [class*="status-open"],
html[data-theme="dark"] [class*="badge-open"]{
  background:#173a68 !important;
  color:#cfe5ff !important;
}

html[data-theme="dark"] [class*="status-working"],
html[data-theme="dark"] [class*="badge-working"]{
  background:#4a3612 !important;
  color:#fde68a !important;
}

html[data-theme="dark"] [class*="status-recovered"],
html[data-theme="dark"] [class*="badge-recovered"]{
  background:#123b2b !important;
  color:#bbf7d0 !important;
}

html[data-theme="dark"] [class*="status-closed"],
html[data-theme="dark"] [class*="badge-closed"]{
  background:#273449 !important;
  color:#dbeafe !important;
}

/* Inputs */
html[data-theme="dark"] input,
html[data-theme="dark"] textarea,
html[data-theme="dark"] select{
  background:#0d1626 !important;
  color:#f8fafc !important;
  border-color:#314158 !important;
}

html[data-theme="dark"] input[readonly],
html[data-theme="dark"] textarea[readonly]{
  background:#121d2d !important;
  color:#b8c6d9 !important;
}

html[data-theme="dark"] option{
  background:#111827 !important;
  color:#f8fafc !important;
}

/* Generic light backgrounds embedded in cards */
html[data-theme="dark"] [style*="background:#fff"],
html[data-theme="dark"] [style*="background: #fff"],
html[data-theme="dark"] [style*="background:white"],
html[data-theme="dark"] [style*="background: white"],
html[data-theme="dark"] [style*="background:#ffffff"],
html[data-theme="dark"] [style*="background: #ffffff"]{
  background:#111827 !important;
  color:#e8eef8 !important;
}

/* Keep top search intentionally light for readability */
html[data-theme="dark"] .topbar-search input{
  background:#f8fafc !important;
  color:#0f172a !important;
}

/* Buttons should never inherit washed-out text */
html[data-theme="dark"] button,
html[data-theme="dark"] .button{
  color:#fff;
}

/* Green check / acknowledgement indicators */
html[data-theme="dark"] [style*="background:#dcfce7"],
html[data-theme="dark"] [style*="background: #dcfce7"]{
  background:#123b2b !important;
  color:#bbf7d0 !important;
}

/* Warning / hold colors */
html[data-theme="dark"] [style*="background:#fef3c7"],
html[data-theme="dark"] [style*="background: #fef3c7"],
html[data-theme="dark"] [style*="background:#fffbeb"],
html[data-theme="dark"] [style*="background: #fffbeb"]{
  background:#33270c !important;
  color:#fde68a !important;
}

/* Danger/cancel colors */
html[data-theme="dark"] [style*="background:#fee2e2"],
html[data-theme="dark"] [style*="background: #fee2e2"],
html[data-theme="dark"] [style*="background:#fef2f2"],
html[data-theme="dark"] [style*="background: #fef2f2"]{
  background:#341619 !important;
  color:#fecaca !important;
}



.open-order-btn{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-width:58px;
  height:28px;
  padding:0 11px;
  border-radius:999px;
  background:#2563eb;
  color:#fff !important;
  font-size:10px;
  font-weight:850;
  text-decoration:none !important;
  letter-spacing:.02em;
  box-shadow:0 4px 10px rgba(37,99,235,.18);
}
.open-order-btn:hover{
  background:#1d4ed8;
  color:#fff !important;
  transform:translateY(-1px);
}

html[data-theme="dark"] .open-order-btn{
  background:#3b82f6;
  color:#fff !important;
}
html[data-theme="dark"] .open-order-btn:hover{
  background:#60a5fa;
  color:#08111f !important;
}

/* Final dark text cleanup */
html[data-theme="dark"] .card,
html[data-theme="dark"] .stat,
html[data-theme="dark"] .report-stat,
html[data-theme="dark"] .report-filter-card{
  color:#eef4ff !important;
}

html[data-theme="dark"] table tbody td,
html[data-theme="dark"] table tbody td *:not(.open-order-btn):not(.badge):not(.pill):not(.lot-badge){
  color:#dce7f7 !important;
}

html[data-theme="dark"] table tbody a:not(.open-order-btn){
  color:#79b8ff !important;
}

html[data-theme="dark"] table tbody a:not(.open-order-btn):hover{
  color:#b9dcff !important;
}

html[data-theme="dark"] .status,
html[data-theme="dark"] .badge,
html[data-theme="dark"] .report-status{
  color:#dce7f7 !important;
}

html[data-theme="dark"] .report-status{
  background:#172033 !important;
  border-color:#314158 !important;
}



.brand-logo-wrap{
  width:42px;
  height:38px;
  border-radius:9px;
  background:#fff;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  padding:4px;
  overflow:hidden;
}
.brand-logo-img{
  max-width:100%;
  max-height:100%;
  object-fit:contain;
}



:root{
  --app-bg:#f3f6fb;
  --app-surface:#ffffff;
  --app-surface-raised:#ffffff;
  --app-surface-soft:#f7f9fc;
  --app-text:#142033;
  --app-text-soft:#52627a;
  --app-border:#dbe3ef;
  --app-border-strong:#cbd5e1;
  --app-primary:#2563eb;
  --app-primary-hover:#1d4ed8;
  --app-success:#15803d;
  --app-warning:#b45309;
  --app-danger:#b91c1c;
  --app-shadow:0 12px 34px rgba(15,23,42,.08);
  --app-shadow-soft:0 5px 18px rgba(15,23,42,.06);
}

html[data-theme="dark"]{
  --app-bg:#09111f;
  --app-surface:#101a2b;
  --app-surface-raised:#142036;
  --app-surface-soft:#18243a;
  --app-text:#e6edf7;
  --app-text-soft:#9eacc0;
  --app-border:#28364d;
  --app-border-strong:#354760;
  --app-primary:#3b82f6;
  --app-primary-hover:#60a5fa;
  --app-success:#4ade80;
  --app-warning:#fbbf24;
  --app-danger:#fb7185;
  --app-shadow:0 14px 38px rgba(0,0,0,.34);
  --app-shadow-soft:0 6px 18px rgba(0,0,0,.22);
}

html[data-theme="dark"]{color-scheme:dark}

body{
  background:
    radial-gradient(circle at 8% -10%, rgba(37,99,235,.10), transparent 28%),
    var(--app-bg) !important;
  color:var(--app-text) !important;
}

main{
  width:min(1480px,calc(100% - 32px)) !important;
  margin:28px auto 44px !important;
}

h1,h2,h3,h4,h5,h6,
.card h1,.card h2,.card h3,
.data-card h1,.data-card h2,.data-card h3{
  color:var(--app-text) !important;
}

.small,.muted,p{
  color:var(--app-text-soft);
}

/* NAVIGATION */
nav.topbar{
  background:rgba(7,13,24,.96) !important;
  border-bottom:1px solid rgba(148,163,184,.13) !important;
  box-shadow:0 8px 28px rgba(0,0,0,.22) !important;
}

.topbar-shell{
  min-height:66px !important;
  gap:16px !important;
}

.topbar-search input{
  background:#f8fafc !important;
  border:1px solid transparent !important;
  color:#0f172a !important;
  box-shadow:none !important;
}

.topbar-search input:focus{
  border-color:#60a5fa !important;
  box-shadow:0 0 0 4px rgba(59,130,246,.18) !important;
}

.nav-pill{
  padding:9px 11px !important;
  border-radius:10px !important;
  font-size:12px !important;
}

.nav-pill-primary{
  background:#2563eb !important;
  box-shadow:0 5px 15px rgba(37,99,235,.24);
}

.nav-dropdown-panel,
.account-menu-panel{
  background:var(--app-surface-raised) !important;
  border-color:var(--app-border) !important;
  box-shadow:var(--app-shadow) !important;
}

.nav-dropdown-panel a,
.account-menu-panel a,
.account-menu-header strong{
  color:var(--app-text) !important;
}

.nav-dropdown-panel a:hover,
.account-menu-panel a:hover{
  background:var(--app-surface-soft) !important;
}

/* GLOBAL SURFACES */
.card,
.stat,
.report-stat,
.report-filter,
.billing-card,
.billing-stat,
.billing-toolbar,
.data-card,
.summary-card{
  background:var(--app-surface) !important;
  color:var(--app-text) !important;
  border:1px solid var(--app-border) !important;
  box-shadow:var(--app-shadow-soft) !important;
}

.card{
  border-radius:16px !important;
}

input,select,textarea{
  background:var(--app-surface-raised) !important;
  color:var(--app-text) !important;
  border-color:var(--app-border-strong) !important;
}

input:focus,select:focus,textarea:focus{
  border-color:var(--app-primary) !important;
  box-shadow:0 0 0 4px rgba(59,130,246,.13) !important;
}

/* DASHBOARD HEADING */
.page-heading{
  display:flex;
  align-items:flex-end;
  justify-content:space-between;
  gap:18px;
  margin-bottom:20px;
}

.page-heading h1{
  margin:3px 0 5px;
  font-size:34px;
}

.page-heading p{
  margin:0;
  font-size:13px;
  font-weight:600;
}

.eyebrow{
  display:block;
  color:var(--app-text-soft);
  font-size:10px;
  font-weight:900;
  letter-spacing:.11em;
}

.primary-action{
  background:var(--app-primary) !important;
  color:#fff !important;
  border-radius:11px !important;
  padding:11px 17px !important;
  box-shadow:0 7px 18px rgba(37,99,235,.22) !important;
}

.primary-action:hover{
  background:var(--app-primary-hover) !important;
}

/* SUMMARY CARDS */
.dashboard-summary{
  display:grid;
  grid-template-columns:repeat(4,minmax(0,1fr));
  gap:14px;
  margin-bottom:18px;
}

.summary-card{
  min-height:132px;
  padding:18px;
  border-radius:16px;
  position:relative;
  overflow:hidden;
}

.summary-card::before{
  content:"";
  position:absolute;
  left:0;
  top:0;
  bottom:0;
  width:4px;
  background:var(--app-primary);
}

.summary-card span{
  color:var(--app-text-soft);
  font-size:11px;
  font-weight:900;
  letter-spacing:.07em;
}

.summary-card strong{
  display:block;
  margin:8px 0 5px;
  font-size:34px;
  line-height:1;
  color:var(--app-text) !important;
}

.summary-card small,
.summary-card a{
  color:var(--app-text-soft) !important;
  font-size:11px;
  font-weight:700;
  text-decoration:none;
}

.summary-card a:hover{
  color:var(--app-primary) !important;
}

.summary-working::before{background:#8b5cf6}
.summary-recovered::before{background:#16a34a}
.summary-archive::before{background:#64748b}

/* DATA CARD / TABLE */
.data-card{
  border-radius:18px;
  padding:18px;
}

.data-card-header{
  display:flex;
  align-items:flex-end;
  justify-content:space-between;
  gap:14px;
  margin-bottom:14px;
}

.data-card-header h2{
  margin:3px 0 0;
  font-size:23px;
}

.record-count{
  background:var(--app-surface-soft);
  border:1px solid var(--app-border);
  color:var(--app-text-soft);
  padding:7px 10px;
  border-radius:999px;
  font-size:10px;
  font-weight:900;
  letter-spacing:.05em;
}

.pro-table-wrap{
  border:1px solid var(--app-border) !important;
  border-radius:13px !important;
  background:var(--app-surface) !important;
}

.current-orders-table{
  width:100%;
  min-width:1180px;
  border-collapse:separate;
  border-spacing:0;
  table-layout:auto !important;
  background:transparent !important;
}

.current-orders-table thead th{
  position:sticky;
  top:0;
  z-index:2;
  padding:13px 14px !important;
  background:var(--app-surface-soft) !important;
  color:var(--app-text-soft) !important;
  border-bottom:1px solid var(--app-border) !important;
  font-size:10px !important;
  font-weight:900 !important;
  letter-spacing:.07em !important;
}

.current-orders-table tbody td{
  padding:15px 14px !important;
  border-bottom:1px solid var(--app-border) !important;
  color:var(--app-text) !important;
  font-size:13px !important;
  vertical-align:middle !important;
  background:transparent !important;
}

.current-orders-table tbody tr:last-child td{
  border-bottom:0 !important;
}

.current-orders-table tbody tr{
  transition:background .14s ease;
}

.current-orders-table tbody tr:hover{
  background:rgba(37,99,235,.045) !important;
}

html[data-theme="dark"] .current-orders-table tbody tr:hover{
  background:rgba(96,165,250,.07) !important;
}

.current-orders-table .center{
  text-align:center !important;
  white-space:nowrap;
}

.current-orders-table .repo-number{
  font-weight:850;
  color:var(--app-primary) !important;
  white-space:nowrap;
}

.current-orders-table .vendor-name{
  font-weight:750;
}

.current-orders-table .plate{
  font-weight:900;
  white-space:nowrap;
}

/* UNIFIED BADGES */
.pro-badge{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-width:62px;
  height:27px;
  padding:0 11px;
  border-radius:999px;
  border:1px solid transparent;
  font-size:10px;
  font-weight:900;
  line-height:1;
  letter-spacing:.02em;
  white-space:nowrap;
}

.gps-yes,.skip-yes,.status-recovered,.payment-paid{
  background:#dcfce7;
  color:#166534;
  border-color:#bbf7d0;
}

.gps-no,.skip-no,.status-canceled,.status-cancelled,.payment-unpaid{
  background:#fee2e2;
  color:#991b1b;
  border-color:#fecaca;
}

.gps-unknown,.skip-unknown,.status-hold,.payment-partial{
  background:#fef3c7;
  color:#92400e;
  border-color:#fde68a;
}

.status-open,.status-working{
  background:#dbeafe;
  color:#1d4ed8;
  border-color:#bfdbfe;
}

.payment-not-due{background:#e0f2fe;color:#075985}
.status-closed,.payment-void{
  background:#e2e8f0;
  color:#475569;
  border-color:#cbd5e1;
}

.driver-assigned{
  min-width:92px;
  max-width:132px;
  overflow:hidden;
  text-overflow:ellipsis;
  background:#ede9fe;
  color:#6d28d9;
  border-color:#ddd6fe;
}

.driver-unassigned{
  min-width:92px;
  background:#e2e8f0;
  color:#475569;
  border-color:#cbd5e1;
}

html[data-theme="dark"] .gps-yes,
html[data-theme="dark"] .skip-yes,
html[data-theme="dark"] .status-recovered,
html[data-theme="dark"] .payment-paid{
  background:#123423 !important;
  color:#86efac !important;
  border-color:#215d3d !important;
}

html[data-theme="dark"] .gps-no,
html[data-theme="dark"] .skip-no,
html[data-theme="dark"] .status-canceled,
html[data-theme="dark"] .status-cancelled,
html[data-theme="dark"] .payment-unpaid{
  background:#3a1c24 !important;
  color:#fda4af !important;
  border-color:#6b2d3a !important;
}

html[data-theme="dark"] .gps-unknown,
html[data-theme="dark"] .skip-unknown,
html[data-theme="dark"] .status-hold,
html[data-theme="dark"] .payment-partial{
  background:#3e2d0d !important;
  color:#fcd34d !important;
  border-color:#755416 !important;
}

html[data-theme="dark"] .status-open,
html[data-theme="dark"] .status-working{
  background:#142f57 !important;
  color:#93c5fd !important;
  border-color:#24528a !important;
}

html[data-theme="dark"] .status-closed,
html[data-theme="dark"] .payment-not-due{background:#0c4a6e;color:#bae6fd}
html[data-theme="dark"] .payment-void{
  background:#243146 !important;
  color:#cbd5e1 !important;
  border-color:#40516b !important;
}

html[data-theme="dark"] .driver-assigned{
  background:#2e2450 !important;
  color:#c4b5fd !important;
  border-color:#5b4a88 !important;
}

html[data-theme="dark"] .driver-unassigned{
  background:#243146 !important;
  color:#cbd5e1 !important;
  border-color:#40516b !important;
}

.ack-pill{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  width:29px;
  height:29px;
  border-radius:50%;
  font-size:12px;
  font-weight:900;
}

.acknowledged{
  background:#dcfce7;
  color:#15803d;
  border:1px solid #bbf7d0;
}

.pending{
  background:#fef3c7;
  color:#b45309;
  border:1px solid #fde68a;
}

html[data-theme="dark"] .acknowledged{
  background:#123423;
  color:#86efac;
  border-color:#215d3d;
}

html[data-theme="dark"] .pending{
  background:#3e2d0d;
  color:#fcd34d;
  border-color:#755416;
}

.view-order-btn,
.open-order-btn{
  display:inline-flex !important;
  align-items:center !important;
  justify-content:center !important;
  min-width:66px !important;
  height:32px !important;
  padding:0 14px !important;
  border-radius:999px !important;
  background:var(--app-primary) !important;
  color:#fff !important;
  border:1px solid transparent !important;
  text-decoration:none !important;
  font-size:10px !important;
  font-weight:900 !important;
  letter-spacing:.03em;
  box-shadow:none !important;
}

.view-order-btn:hover,
.open-order-btn:hover{
  background:var(--app-primary-hover) !important;
  color:#fff !important;
  transform:translateY(-1px);
  box-shadow:0 7px 16px rgba(37,99,235,.22) !important;
}

.empty-state{
  padding:42px !important;
  text-align:center !important;
  color:var(--app-text-soft) !important;
}

.empty-state strong,
.empty-state span{
  display:block;
}

.empty-state strong{
  color:var(--app-text) !important;
  margin-bottom:4px;
}

/* DARK MODE: REMOVE OLD WASHED-OUT OVERRIDES */
html[data-theme="dark"] table,
html[data-theme="dark"] .current-orders-table{
  background:transparent !important;
}

html[data-theme="dark"] .current-orders-table tbody td,
html[data-theme="dark"] .current-orders-table tbody td *{
  color:inherit;
}

html[data-theme="dark"] .current-orders-table tbody td{
  color:var(--app-text) !important;
}

html[data-theme="dark"] .current-orders-table thead th{
  color:var(--app-text-soft) !important;
}

/* RESPONSIVE */
@media(max-width:1100px){
  .dashboard-summary{grid-template-columns:repeat(2,minmax(0,1fr))}
}

@media(max-width:760px){
  main{width:min(100% - 18px,1480px) !important}
  .page-heading{align-items:flex-start;flex-direction:column}
  .dashboard-summary{grid-template-columns:1fr}
  .data-card{padding:13px}
  .page-heading h1{font-size:29px}
}



/* Dealer-management-inspired operations shell. Company staff and repo vendors share the same visual system; permissions remain role-specific. */
.role-admin,.role-superadmin,.role-vendor.vendor-ops-shell{
  --ops-bg:#f5f7fb;--ops-card:#fff;--ops-ink:#13213a;--ops-muted:#718096;--ops-line:#e6ebf2;
  --ops-nav:#081424;--ops-nav2:#0e2036;--ops-blue:#2563eb;--ops-blue2:#1d4ed8;
  --ops-green:#0f9f76;--ops-amber:#d58a11;--ops-red:#d34b60;--ops-purple:#7254d8;
  background:var(--ops-bg)!important;
}
html[data-theme="dark"] .role-admin,html[data-theme="dark"] .role-superadmin,html[data-theme="dark"] .role-vendor.vendor-ops-shell{
  --ops-bg:#0a1220;--ops-card:#101a2b;--ops-ink:#e6edf7;--ops-muted:#9eacc0;--ops-line:#28364d;
}
.role-admin .ops-rail,.role-superadmin .ops-rail,.role-vendor.vendor-ops-shell .ops-rail{position:fixed;inset:0 auto 0 0;width:252px;background:radial-gradient(circle at 10% 0,rgba(37,99,235,.20),transparent 27%),linear-gradient(180deg,#091728,#07111e);color:#fff;padding:19px 13px 14px;display:flex;flex-direction:column;z-index:5000;border-right:1px solid rgba(255,255,255,.04);overflow-y:auto;overflow-x:hidden}
.ops-brand-row{height:48px;display:flex;align-items:center;gap:11px;padding:0 8px;margin-bottom:15px;color:#fff!important;text-decoration:none!important}.ops-brand-logo,.ops-brand-logo-wrap{width:39px;height:39px;flex:0 0 39px;border-radius:11px;display:grid;place-items:center;background:linear-gradient(145deg,#3b82f6,#1d4ed8);box-shadow:0 7px 18px rgba(37,99,235,.28);font-size:12px;font-weight:950;letter-spacing:.5px}.ops-brand-logo-wrap{background:#fff;padding:4px;overflow:hidden}.ops-brand-logo-wrap img{max-width:100%;max-height:100%;object-fit:contain}.ops-brand-copy{display:grid;gap:1px;min-width:0}.ops-brand-copy strong{font-size:13px;color:#fff;white-space:nowrap}.ops-brand-copy span{font-size:8px;font-weight:900;letter-spacing:1.55px;color:#88a0bd;white-space:nowrap}
.ops-workspace-card{padding:10px 9px;background:rgba(255,255,255,.055);border:1px solid rgba(255,255,255,.07);border-radius:12px;display:grid;grid-template-columns:34px minmax(0,1fr) 18px;align-items:center;gap:9px;margin:0 1px 18px;text-decoration:none!important}.ops-workspace-avatar{width:34px;height:34px;border-radius:9px;background:#173250;display:grid;place-items:center;font-weight:950;color:#afc9e8;font-size:10px}.ops-workspace-copy{display:grid;min-width:0}.ops-workspace-copy strong{font-size:10.5px;color:#fff;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.ops-workspace-copy small{font-size:8.5px;color:#8499b2;margin-top:2px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.ops-workspace-arrow{color:#869bb3;font-size:17px;text-align:center}
.ops-nav-label{font-size:8px;color:#617792;font-weight:950;letter-spacing:1.55px;margin:4px 11px 7px}.ops-side-nav{background:transparent!important;color:inherit!important;padding:0!important;display:grid!important;grid-template-columns:1fr!important;gap:3px!important;align-items:stretch!important;position:static!important;top:auto!important;z-index:auto!important;box-shadow:none!important;backdrop-filter:none!important;margin-bottom:16px!important}.ops-nav-link{min-height:38px;border:0;background:transparent;border-radius:9px;color:#9fb0c6!important;display:grid;grid-template-columns:26px minmax(0,1fr) auto;align-items:center;text-align:left;padding:0 9px;font-weight:750;font-size:11.5px;text-decoration:none!important;transition:.15s}.ops-nav-link .ops-nav-icon{font-size:14px;text-align:center;color:#8298b4}.ops-nav-link em{font-style:normal;font-size:8px;padding:2px 6px;border-radius:99px;background:#dc2626;color:white}.ops-nav-link:hover{background:rgba(255,255,255,.045);color:#dfe9f6!important}.ops-nav-link.active{background:linear-gradient(90deg,rgba(37,99,235,.19),rgba(37,99,235,.075));color:#fff!important;box-shadow:inset 2px 0 #4d8ef8}.ops-nav-link.active .ops-nav-icon{color:#6fa6ff}
.ops-more{display:block}.ops-more>summary{list-style:none;cursor:pointer}.ops-more>summary::-webkit-details-marker{display:none}.ops-more-caret{font-size:10px;color:#7890aa;transition:.15s}.ops-more[open] .ops-more-caret{transform:rotate(180deg)}.ops-more-panel{margin:3px 6px 6px 35px;display:grid;gap:1px;border-left:1px solid rgba(255,255,255,.08);padding-left:9px}.ops-more-panel a{padding:7px 8px;border-radius:7px;color:#8499b2!important;text-decoration:none!important;font-size:9.5px;font-weight:700}.ops-more-panel a:hover{background:rgba(255,255,255,.05);color:#fff!important}
.ops-rail-bottom{margin-top:auto;display:grid;gap:8px;padding-top:10px}.ops-theme-toggle{width:100%;min-height:36px;border:1px solid rgba(255,255,255,.08)!important;border-radius:9px!important;background:rgba(255,255,255,.035)!important;box-shadow:none!important;color:#8ea2bb!important;display:flex!important;justify-content:flex-start!important;padding:0 10px!important}.ops-theme-toggle:hover{background:rgba(255,255,255,.06)!important;transform:none!important}.ops-theme-label{font-size:10px;font-weight:800;margin-left:2px}.ops-user-row{display:grid;grid-template-columns:34px minmax(0,1fr) 22px;align-items:center;gap:8px;padding:9px 7px;border-top:1px solid rgba(255,255,255,.06)}.ops-user-avatar{width:34px;height:34px;border-radius:10px;background:#16304e;display:grid;place-items:center;color:#d8e8fb;font-size:10px;font-weight:950}.ops-user-copy{display:grid;min-width:0;text-decoration:none!important}.ops-user-copy strong{font-size:10px;color:#fff;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.ops-user-copy small{font-size:8px;color:#768ba5;margin-top:2px}.ops-logout{color:#7186a0!important;text-decoration:none!important;text-align:center;font-size:15px}.ops-logout:hover{color:#fff!important}
.ops-topbar{height:64px;background:rgba(255,255,255,.94);backdrop-filter:blur(12px);border-bottom:1px solid var(--ops-line);display:flex;align-items:center;justify-content:space-between;padding:0 26px;position:fixed;top:0;left:252px;right:0;z-index:4500}.ops-crumbs{display:flex;align-items:center;gap:9px;font-size:10.5px;min-width:0}.ops-crumbs span{color:#94a0b1;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.ops-crumbs b{font-weight:500;color:#c0c8d3}.ops-crumbs strong{font-weight:800;color:var(--ops-ink);white-space:nowrap}.ops-top-actions{display:flex;align-items:center;gap:8px}.ops-global-search{width:310px;height:38px;background:#f7f9fc;border:1px solid var(--ops-line);border-radius:9px;display:flex;align-items:center;gap:8px;padding:0 11px;color:#8795aa;margin:0}.ops-global-search input{border:0!important;outline:0!important;background:transparent!important;width:100%;font-size:10.5px;color:#182840!important;box-shadow:none!important;margin:0!important;padding:0!important}.ops-global-search input:focus{box-shadow:none!important}.ops-top-icon{position:relative;width:38px;height:38px;border-radius:9px;border:1px solid var(--ops-line);background:#fff;color:#63748a!important;font-size:14px;display:grid;place-items:center;text-decoration:none!important}.ops-top-icon i{position:absolute;top:-5px;right:-5px;min-width:16px;height:16px;padding:0 4px;border-radius:99px;background:#e24f63;color:#fff;font-size:7px;font-style:normal;display:grid;place-items:center;border:2px solid #fff}.ops-quick-menu{position:relative}.ops-quick-menu>summary{list-style:none}.ops-quick-menu>summary::-webkit-details-marker{display:none}.ops-quick-button{height:38px;border:0;border-radius:9px;background:#172740;color:#fff;padding:0 14px;font-size:10.5px;font-weight:850;display:flex;align-items:center;cursor:pointer;box-shadow:0 4px 12px rgba(13,28,47,.12)}.ops-quick-panel{position:absolute;right:0;top:46px;width:260px;padding:7px;background:var(--ops-card);border:1px solid var(--ops-line);border-radius:12px;box-shadow:0 18px 45px rgba(18,37,63,.16);display:grid;gap:3px}.ops-quick-panel a{padding:10px;border-radius:8px;text-decoration:none!important;display:grid;gap:2px}.ops-quick-panel a:hover{background:#f4f7fb}.ops-quick-panel strong{font-size:10.5px;color:var(--ops-ink)}.ops-quick-panel small{font-size:8.5px;color:var(--ops-muted)}
html[data-theme="dark"] .ops-topbar{background:rgba(16,26,43,.96)}html[data-theme="dark"] .ops-global-search{background:#172033}html[data-theme="dark"] .ops-global-search input{color:#e6edf7!important}html[data-theme="dark"] .ops-top-icon{background:#172033;color:#cbd5e1!important}html[data-theme="dark"] .ops-quick-panel a:hover{background:#18243a}
.role-admin main,.role-superadmin main,.role-vendor.vendor-ops-shell main{width:calc(100% - 252px)!important;max-width:none!important;margin:64px 0 0 252px!important;padding:26px 28px 44px!important;min-height:calc(100vh - 64px);box-sizing:border-box}.role-admin .flash,.role-superadmin .flash,.role-vendor.vendor-ops-shell .flash{max-width:none}
@media(max-width:900px){.role-admin .ops-rail,.role-superadmin .ops-rail,.role-vendor.vendor-ops-shell .ops-rail{width:76px;padding:16px 8px}.ops-brand-row{justify-content:center;padding:0}.ops-brand-copy,.ops-workspace-copy,.ops-workspace-arrow,.ops-nav-label,.ops-nav-link>span:not(.ops-nav-icon),.ops-nav-link em,.ops-more-panel,.ops-theme-label,.ops-user-copy,.ops-logout{display:none!important}.ops-workspace-card{display:flex;justify-content:center;padding:8px}.ops-nav-link{display:flex;justify-content:center;padding:0}.ops-more>summary{display:flex!important}.ops-rail-bottom{align-items:center}.ops-theme-toggle{width:42px!important;justify-content:center!important;padding:0!important;margin:0 auto}.ops-user-row{display:flex;justify-content:center;padding:8px 0}.ops-topbar{left:76px;padding:0 14px}.ops-global-search{width:230px}.role-admin main,.role-superadmin main,.role-vendor.vendor-ops-shell main{width:calc(100% - 76px)!important;margin-left:76px!important;padding:20px 16px 34px!important}}
@media(max-width:650px){.ops-global-search{display:none}.ops-crumbs span,.ops-crumbs b{display:none}.ops-topbar{height:58px}.role-admin main,.role-superadmin main,.role-vendor.vendor-ops-shell main{margin-top:58px!important}.ops-quick-button{padding:0 11px}.ops-top-icon{width:36px;height:36px}}

/* Make existing repo-vendor pages inherit the company-side card/table/form language. */
.role-vendor.vendor-ops-shell .card,
.role-vendor.vendor-ops-shell .data-card,
.role-vendor.vendor-ops-shell .stat{
  background:var(--ops-card)!important;
  color:var(--ops-ink)!important;
  border:1px solid var(--ops-line)!important;
  border-radius:13px!important;
  box-shadow:0 5px 15px rgba(18,37,63,.055)!important;
}
.role-vendor.vendor-ops-shell h1,
.role-vendor.vendor-ops-shell h2,
.role-vendor.vendor-ops-shell h3,
.role-vendor.vendor-ops-shell h4{color:var(--ops-ink)!important}
.role-vendor.vendor-ops-shell .small,
.role-vendor.vendor-ops-shell .muted{color:var(--ops-muted)!important}
.role-vendor.vendor-ops-shell .table-wrap{border:1px solid var(--ops-line)!important;border-radius:12px!important;overflow:auto!important}
.role-vendor.vendor-ops-shell table{background:transparent!important}
.role-vendor.vendor-ops-shell th{background:#fafbfc!important;color:#8996a8!important;border-color:var(--ops-line)!important}
.role-vendor.vendor-ops-shell td{color:#53647a!important;border-color:#edf1f5!important}
.role-vendor.vendor-ops-shell tbody tr:hover td{background:#fbfdff!important}
.role-vendor.vendor-ops-shell label{color:var(--ops-ink)!important}
.role-vendor.vendor-ops-shell input,
.role-vendor.vendor-ops-shell select,
.role-vendor.vendor-ops-shell textarea{background:var(--ops-card)!important;color:var(--ops-ink)!important;border-color:var(--ops-line)!important}
.role-vendor.vendor-ops-shell .button{border-radius:8px!important;font-size:10.5px!important;font-weight:850!important}
html[data-theme="dark"] .role-vendor.vendor-ops-shell th{background:#18243a!important}
html[data-theme="dark"] .role-vendor.vendor-ops-shell td{color:#b8c5d6!important;border-color:#28364d!important}
html[data-theme="dark"] .role-vendor.vendor-ops-shell tbody tr:hover td{background:#142036!important}



.nav-more{position:relative}
.nav-more summary{cursor:pointer;list-style:none;font-weight:700}
.nav-more summary::-webkit-details-marker{display:none}
.nav-more-menu{
  position:absolute;
  right:0;
  top:28px;
  min-width:185px;
  background:#0f172a;
  border:1px solid rgba(255,255,255,.12);
  border-radius:10px;
  padding:7px;
  z-index:9999;
  box-shadow:0 12px 30px rgba(0,0,0,.22);
}
.nav-more-menu a{display:block;padding:8px 10px;white-space:nowrap}
.chat-nav-pill{gap:6px}
.chat-nav-badge{display:inline-grid;place-items:center;min-width:19px;height:19px;padding:0 5px;border-radius:999px;background:#dc2626;color:#fff;font-size:10px;font-weight:900;line-height:1}



.recovery-provider-footer{width:min(1320px,calc(100% - 28px));margin:-10px auto 28px;padding:14px 18px;border:1px solid var(--border);border-left:4px solid #16a34a;border-radius:12px;background:var(--surface);color:var(--text);box-shadow:var(--shadow);font-size:12px;line-height:1.5}.recovery-provider-footer>div{font-weight:700}.recovery-provider-footer small{display:block;margin-top:4px;color:var(--muted)}



.vendor-update-overlay{
  position:fixed;inset:0;z-index:100000;display:flex;align-items:center;justify-content:center;
  padding:20px;background:rgba(2,6,23,.78);backdrop-filter:blur(8px);
}
.vendor-update-modal{
  width:min(620px,100%);max-height:calc(100vh - 40px);overflow:auto;
  background:var(--app-surface,var(--surface,#fff));color:var(--app-text,var(--text,#0f172a));
  border:1px solid var(--app-border,var(--border,#dbe3ef));border-radius:22px;padding:28px;
  box-shadow:0 30px 90px rgba(0,0,0,.45);
}
.vendor-update-icon{
  width:48px;height:48px;border-radius:14px;display:grid;place-items:center;margin-bottom:16px;
  background:#2563eb;color:#fff;font-weight:900;font-size:25px;box-shadow:0 10px 24px rgba(37,99,235,.28);
}
.vendor-update-eyebrow{font-size:11px;font-weight:900;letter-spacing:.11em;color:#2563eb;margin-bottom:8px}
.vendor-update-modal h2{margin:0 0 14px;font-size:27px;line-height:1.15}
.vendor-update-message{white-space:pre-line;font-size:15px;line-height:1.65;color:var(--app-text,var(--text,#0f172a))}
.vendor-update-once{
  margin:20px 0 14px;padding:11px 13px;border-radius:10px;background:var(--app-surface-soft,var(--surface-2,#f8fafc));
  border:1px solid var(--app-border,var(--border,#dbe3ef));font-size:11px;font-weight:850;letter-spacing:.04em;
  color:var(--app-text-soft,var(--muted,#64748b));
}
.vendor-update-modal form{margin:0}.vendor-update-close{width:100%;padding:13px 16px;background:#2563eb;font-size:14px}
.vendor-update-close:hover{background:#1d4ed8}
@media(max-width:600px){.vendor-update-modal{padding:21px;border-radius:18px}.vendor-update-modal h2{font-size:23px}}



.vendor-chat-alert-overlay{position:fixed;inset:0;z-index:100001;display:flex;align-items:center;justify-content:center;padding:20px;background:rgba(2,6,23,.78);backdrop-filter:blur(8px)}
.vendor-chat-alert-modal{width:min(620px,100%);background:var(--app-surface,var(--surface,#fff));color:var(--app-text,var(--text,#0f172a));border:1px solid var(--app-border,var(--border,#dbe3ef));border-radius:22px;padding:28px;box-shadow:0 30px 90px rgba(0,0,0,.45)}
.vendor-chat-alert-icon{width:50px;height:50px;border-radius:14px;display:grid;place-items:center;background:#2563eb;font-size:25px;margin-bottom:15px}.vendor-chat-alert-eyebrow{font-size:11px;font-weight:900;letter-spacing:.11em;color:#2563eb;margin-bottom:8px}.vendor-chat-alert-modal h2{margin:0 0 10px;font-size:26px}.vendor-chat-alert-job{display:inline-block;padding:6px 9px;border-radius:999px;background:rgba(37,99,235,.1);color:#2563eb;font-size:11px;font-weight:900;margin-bottom:13px}.vendor-chat-alert-message{white-space:pre-line;line-height:1.6;font-size:15px}.vendor-chat-alert-once,.vendor-chat-alert-prompt{margin-top:16px;padding:11px 13px;border:1px solid var(--app-border,var(--border));border-radius:11px;background:var(--app-surface-soft,var(--surface-2));font-size:12px}.vendor-chat-alert-prompt{border-color:#bfdbfe;background:#eff6ff;color:#1e3a8a}.vendor-chat-alert-actions{display:flex;gap:10px;flex-wrap:wrap;margin-top:16px}.vendor-chat-alert-actions form{margin:0;flex:1}.vendor-chat-alert-actions button{width:100%;padding:12px}.vendor-chat-alert-open{background:#2563eb}.vendor-chat-alert-disable{background:#475569}@media(max-width:600px){.vendor-chat-alert-modal{padding:21px}.vendor-chat-alert-actions{flex-direction:column}}
html[data-theme="dark"] .vendor-chat-alert-prompt{background:#10223a;color:#bfdbfe;border-color:#244b78}



.plate-lookup-row{display:grid;grid-template-columns:minmax(0,1fr) 82px auto;gap:8px;align-items:end}
.plate-lookup-row input,.plate-lookup-row select,.plate-lookup-row button{margin-bottom:0}
.plate-lookup-row button{min-height:43px;white-space:nowrap}
.plate-lookup-status{min-height:19px;margin-top:6px;font-size:11px;font-weight:800;letter-spacing:.02em}
.plate-lookup-status.working{color:var(--app-text-soft,var(--muted,#64748b))}
.plate-lookup-status.success{color:#16a34a}.plate-lookup-status.error{color:#dc2626}
@media(max-width:680px){.plate-lookup-row{grid-template-columns:minmax(0,1fr) 78px}.plate-lookup-row button{grid-column:1/-1;width:100%}}



.account-language-link{
  display:block;width:100%;border:0;background:transparent;color:var(--text)!important;
  text-align:left;padding:9px 10px;border-radius:8px;font:inherit;font-size:13px;cursor:pointer;
}
.account-language-link:hover{background:var(--surface-2);transform:none;box-shadow:none}
.language-overlay{position:fixed;inset:0;z-index:200000;display:flex;align-items:center;justify-content:center;padding:20px;background:rgba(3,7,18,.72);backdrop-filter:blur(8px)}
.language-overlay[hidden]{display:none!important}
.language-modal{width:min(560px,100%);background:var(--surface);color:var(--text);border:1px solid var(--border);border-radius:24px;padding:32px;box-shadow:0 30px 80px rgba(0,0,0,.32);text-align:center}
.language-badge{display:inline-flex;align-items:center;gap:8px;padding:7px 11px;border-radius:999px;background:#eff6ff;color:#1d4ed8;font-size:11px;font-weight:900;letter-spacing:.06em;margin-bottom:16px}
html[data-theme="dark"] .language-badge{background:#172554;color:#bfdbfe}
.language-modal h2{margin:0 0 8px;font-size:28px}.language-modal p{margin:0 auto 22px;max-width:420px;color:var(--muted)}
.language-options{display:grid;grid-template-columns:1fr 1fr;gap:14px}.language-choice{min-height:104px;border:1px solid var(--border);border-radius:16px;background:var(--surface-2);color:var(--text);padding:18px;display:flex;flex-direction:column;align-items:flex-start;justify-content:center;text-align:left}
.language-choice:hover{border-color:#60a5fa;box-shadow:0 8px 22px rgba(37,99,235,.12)}.language-choice strong{font-size:18px}.language-choice span{font-size:12px;color:var(--muted);margin-top:3px}.language-choice.primary{background:#2563eb;color:#fff;border-color:#2563eb}.language-choice.primary span{color:#dbeafe}
.language-saving{font-size:12px;color:var(--muted);min-height:18px;margin-top:14px}
@media(max-width:560px){.language-modal{padding:24px 18px}.language-options{grid-template-columns:1fr}}



.fast-upload-overlay{
  position:fixed;inset:0;z-index:99999;display:none;
  align-items:center;justify-content:center;background:rgba(2,6,23,.76);
  backdrop-filter:blur(5px)
}
.fast-upload-overlay.show{display:flex}
.fast-upload-box{
  width:min(440px,calc(100% - 30px));padding:22px;border-radius:16px;
  background:var(--app-surface,#fff);color:var(--app-text,#0f172a);
  border:1px solid var(--app-border,#dbe3ef);box-shadow:0 24px 60px rgba(0,0,0,.36)
}
.fast-upload-box strong,.fast-upload-box span{display:block}
.fast-upload-box span{margin-top:6px;color:var(--app-text-soft,#64748b);font-size:12px}
.fast-progress{height:9px;background:var(--app-surface-soft,#e2e8f0);border-radius:999px;overflow:hidden;margin-top:14px}
.fast-progress-bar{height:100%;width:0;background:#2563eb;transition:width .15s ease}
