/* White Gold feature fixes — 2026-10-06
   Reversible UI/behavior polish layer. */

/* ---------------------------------------------------------
   BOOKING JOBS: keep Book / Remove aligned cleanly on right
--------------------------------------------------------- */
body.wg-fix-booking .availability-item{
  display:grid!important;
  grid-template-columns:minmax(0,1fr) 150px!important;
  align-items:center!important;
  gap:14px!important;
}
body.wg-fix-booking .availability-actions{
  width:150px!important;
  margin-left:auto!important;
  display:flex!important;
  flex-direction:column!important;
  align-items:stretch!important;
  justify-content:center!important;
  gap:8px!important;
}
body.wg-fix-booking .availability-actions .toggle,
body.wg-fix-booking .availability-actions .remove-resource{
  width:100%!important;
  min-width:0!important;
  min-height:44px!important;
  margin:0!important;
  border-radius:12px!important;
}
@media(max-width:520px){
  body.wg-fix-booking .availability-item{
    grid-template-columns:minmax(0,1fr) 128px!important;
    padding:12px!important;
  }
  body.wg-fix-booking .availability-actions{width:128px!important}
  body.wg-fix-booking .availability-actions .toggle,
  body.wg-fix-booking .availability-actions .remove-resource{
    font-size:9px!important;
    padding:10px 8px!important;
  }
}

/* ---------------------------------------------------------
   CUSTOMER & JOB HISTORY: Fuel-style module screen behavior
--------------------------------------------------------- */
body.wg-cjh-module-mode main > .grid,
body.wg-cjh-module-mode main > .links{
  display:none!important;
}
body.wg-cjh-module-mode .hero{
  margin-bottom:10px!important;
}
body.wg-cjh-module-mode #panel{
  display:block!important;
  margin-top:0!important;
}
.wg-module-backbar{
  display:flex;
  align-items:center;
  gap:9px;
  margin:0 0 10px;
}
.wg-module-backbar a{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-height:42px;
  padding:9px 13px;
  border-radius:12px;
  text-decoration:none;
  font-size:10px;
  font-weight:900;
  border:1px solid var(--border,#dfe5ec);
  background:var(--wg-surface,#fff);
  color:var(--wg-heading,#172033);
}
body.wg-fix-customer-history .module{
  cursor:pointer!important;
  transition:transform .1s ease,border-color .12s ease,box-shadow .12s ease!important;
}
body.wg-fix-customer-history .module:active{
  transform:scale(.985)!important;
  border-color:var(--gold,#d4af37)!important;
}

/* ---------------------------------------------------------
   MONTHLY MACHINE / OPERATOR: instant-feel and touch target
--------------------------------------------------------- */
body.wg-fix-monthly .toggle{
  min-height:46px!important;
  min-width:128px!important;
  border-radius:13px!important;
}
body.wg-fix-monthly .item{
  transition:border-color .1s ease,background .1s ease,opacity .1s ease!important;
}
body.wg-fix-monthly .item.wg-saving{
  opacity:.72!important;
  pointer-events:none!important;
}
body.wg-fix-monthly.operator-view .item-main{
  cursor:pointer!important;
  border-radius:11px;
  padding:2px;
}
body.wg-fix-monthly.operator-view .item-main:active{
  background:color-mix(in srgb,var(--wg-gold,#d4af37) 10%,transparent)!important;
}
body.wg-fix-monthly.operator-view .assignment-strip{
  cursor:pointer!important;
}
.wg-open-operator-hint{
  display:block;
  margin-top:6px;
  font-size:8px;
  font-weight:900;
  color:var(--wg-gold,#b28a00);
}

/* ---------------------------------------------------------
   EXPIRY CENTER: same app colour system; dark only in dark mode
--------------------------------------------------------- */
body.wg-fix-expiry{
  background:var(--wg-bg,#f3f6fa)!important;
  color:var(--wg-text,#263244)!important;
}
body.wg-fix-expiry header{
  background:var(--wg-surface,#fff)!important;
  color:var(--wg-heading,#172033)!important;
  border-bottom:1px solid var(--wg-border,#dfe5ec)!important;
}
body.wg-fix-expiry .hero,
body.wg-fix-expiry .card,
body.wg-fix-expiry .stat{
  background:var(--wg-surface,#fff)!important;
  color:var(--wg-text,#263244)!important;
  border-color:var(--wg-border,#dfe5ec)!important;
  box-shadow:0 8px 24px var(--wg-shadow,rgba(15,23,42,.07))!important;
}
body.wg-fix-expiry .hero h2,
body.wg-fix-expiry .title,
body.wg-fix-expiry .stat strong{
  color:var(--wg-heading,#172033)!important;
}
body.wg-fix-expiry .hero p,
body.wg-fix-expiry .meta,
body.wg-fix-expiry .stat span{
  color:var(--wg-muted,#667085)!important;
}
body.wg-fix-expiry .toolbar input,
body.wg-fix-expiry .toolbar select{
  background:var(--wg-input,#fff)!important;
  color:var(--wg-text,#263244)!important;
  border-color:var(--wg-border,#dfe5ec)!important;
}
body.wg-fix-expiry .card .meta b{
  color:var(--wg-heading,#172033)!important;
}
body.wg-fix-expiry .btn.dark{
  background:var(--wg-surface-3,#eef2f6)!important;
  color:var(--wg-heading,#172033)!important;
  border:1px solid var(--wg-border,#dfe5ec)!important;
}
html[data-wg-theme="dark"] body.wg-fix-expiry{
  background:#0b1118!important;color:#e8edf3!important;
}
html[data-wg-theme="dark"] body.wg-fix-expiry header,
html[data-wg-theme="dark"] body.wg-fix-expiry .hero,
html[data-wg-theme="dark"] body.wg-fix-expiry .card,
html[data-wg-theme="dark"] body.wg-fix-expiry .stat{
  background:#121b25!important;color:#e8edf3!important;border-color:#2b3947!important;
}
html[data-wg-theme="dark"] body.wg-fix-expiry .hero h2,
html[data-wg-theme="dark"] body.wg-fix-expiry .title,
html[data-wg-theme="dark"] body.wg-fix-expiry .stat strong,
html[data-wg-theme="dark"] body.wg-fix-expiry .card .meta b{color:#f8fafc!important}
html[data-wg-theme="dark"] body.wg-fix-expiry .hero p,
html[data-wg-theme="dark"] body.wg-fix-expiry .meta,
html[data-wg-theme="dark"] body.wg-fix-expiry .stat span{color:#a9b5c3!important}
html[data-wg-theme="dark"] body.wg-fix-expiry .toolbar input,
html[data-wg-theme="dark"] body.wg-fix-expiry .toolbar select{
  background:#0f1720!important;color:#e8edf3!important;border-color:#31404f!important;
}

/* ---------------------------------------------------------
   AI JOB ASSIGNMENT: same app theme + remove extra movement
--------------------------------------------------------- */
body.wg-fix-ai-job{
  background:var(--wg-bg,#f3f6fa)!important;
  color:var(--wg-text,#263244)!important;
}
body.wg-fix-ai-job header,
body.wg-fix-ai-job .hero,
body.wg-fix-ai-job .card{
  background:var(--wg-surface,#fff)!important;
  color:var(--wg-text,#263244)!important;
  border-color:var(--wg-border,#dfe5ec)!important;
  box-shadow:0 8px 24px var(--wg-shadow,rgba(15,23,42,.07))!important;
}
body.wg-fix-ai-job .hero h2,
body.wg-fix-ai-job .card h3,
body.wg-fix-ai-job .brand h1{color:var(--wg-heading,#172033)!important}
body.wg-fix-ai-job .hero p,
body.wg-fix-ai-job .brand p,
body.wg-fix-ai-job .conf{color:var(--wg-muted,#667085)!important}
body.wg-fix-ai-job .drop,
body.wg-fix-ai-job .file,
body.wg-fix-ai-job .field input,
body.wg-fix-ai-job .field select,
body.wg-fix-ai-job .field textarea{
  background:var(--wg-input,#fff)!important;
  color:var(--wg-text,#263244)!important;
  border-color:var(--wg-border,#dfe5ec)!important;
}
body.wg-fix-ai-job .match{
  background:var(--wg-green-bg,#eaf7ef)!important;
  border-color:color-mix(in srgb,var(--wg-green,#187a43) 28%,var(--wg-border,#dfe5ec))!important;
  color:var(--wg-text,#263244)!important;
}
body.wg-fix-ai-job .btn.dark{
  background:var(--wg-surface-3,#eef2f6)!important;
  color:var(--wg-heading,#172033)!important;
  border:1px solid var(--wg-border,#dfe5ec)!important;
}
body.wg-fix-ai-job *,
body.wg-fix-ai-job *::before,
body.wg-fix-ai-job *::after{
  scroll-behavior:auto!important;
}
body.wg-fix-ai-job .hero,
body.wg-fix-ai-job .card,
body.wg-fix-ai-job .drop{
  transform:none!important;
  animation:none!important;
}
html[data-wg-theme="dark"] body.wg-fix-ai-job{
  background:#0b1118!important;color:#e8edf3!important;
}
html[data-wg-theme="dark"] body.wg-fix-ai-job header,
html[data-wg-theme="dark"] body.wg-fix-ai-job .hero,
html[data-wg-theme="dark"] body.wg-fix-ai-job .card{
  background:#121b25!important;color:#e8edf3!important;border-color:#2b3947!important;
}
html[data-wg-theme="dark"] body.wg-fix-ai-job .hero h2,
html[data-wg-theme="dark"] body.wg-fix-ai-job .card h3,
html[data-wg-theme="dark"] body.wg-fix-ai-job .brand h1{color:#f8fafc!important}
html[data-wg-theme="dark"] body.wg-fix-ai-job .hero p,
html[data-wg-theme="dark"] body.wg-fix-ai-job .brand p,
html[data-wg-theme="dark"] body.wg-fix-ai-job .conf{color:#a9b5c3!important}
html[data-wg-theme="dark"] body.wg-fix-ai-job .drop,
html[data-wg-theme="dark"] body.wg-fix-ai-job .file,
html[data-wg-theme="dark"] body.wg-fix-ai-job .field input,
html[data-wg-theme="dark"] body.wg-fix-ai-job .field select,
html[data-wg-theme="dark"] body.wg-fix-ai-job .field textarea{
  background:#0f1720!important;color:#e8edf3!important;border-color:#31404f!important;
}
html[data-wg-theme="dark"] body.wg-fix-ai-job .match{
  background:#102119!important;border-color:#24593a!important;color:#dce8df!important;
}

/* ---------------------------------------------------------
   FULL ADMIN DARK MODE
--------------------------------------------------------- */
html[data-wg-theme="dark"] body.wg-fix-admin-dashboard{
  background:#0b1118!important;color:#e8edf3!important;
}
html[data-wg-theme="dark"] body.wg-fix-admin-dashboard .wg-static-admin-catalog,
html[data-wg-theme="dark"] body.wg-fix-admin-dashboard .wg-static-folder,
html[data-wg-theme="dark"] body.wg-fix-admin-dashboard .wg-catalog-folder-view,
html[data-wg-theme="dark"] body.wg-fix-admin-dashboard .admin-card,
html[data-wg-theme="dark"] body.wg-fix-admin-dashboard .management-section,
html[data-wg-theme="dark"] body.wg-fix-admin-dashboard .easy-manage-center{
  background:#121b25!important;
  color:#e8edf3!important;
  border-color:#2b3947!important;
}
html[data-wg-theme="dark"] body.wg-fix-admin-dashboard .wg-static-folder h3,
html[data-wg-theme="dark"] body.wg-fix-admin-dashboard .admin-card h3,
html[data-wg-theme="dark"] body.wg-fix-admin-dashboard h2,
html[data-wg-theme="dark"] body.wg-fix-admin-dashboard h3{
  color:#f8fafc!important;
}
html[data-wg-theme="dark"] body.wg-fix-admin-dashboard .wg-static-folder p,
html[data-wg-theme="dark"] body.wg-fix-admin-dashboard .admin-card p{
  color:#a9b5c3!important;
}
html[data-wg-theme="dark"] body.wg-fix-admin-dashboard .wg-tab-layout-bar,
html[data-wg-theme="dark"] body.wg-fix-admin-dashboard .wg-catalog-search-wrap,
html[data-wg-theme="dark"] body.wg-fix-admin-dashboard input,
html[data-wg-theme="dark"] body.wg-fix-admin-dashboard select{
  background:#0f1720!important;color:#e8edf3!important;border-color:#31404f!important;
}

/* ---------------------------------------------------------
   VEHICLE / OPERATOR ADMIN: clean relevant module centers
--------------------------------------------------------- */
.wg-relevant-center{
  margin:0 0 16px;
  padding:14px;
  border:1px solid var(--wg-border,#d9dee5);
  border-radius:18px;
  background:var(--wg-surface,#fff);
  box-shadow:0 8px 24px var(--wg-shadow,rgba(15,23,42,.07));
}
.wg-relevant-center h3{margin:0 0 4px;font-size:16px;color:var(--wg-heading,#172033)}
.wg-relevant-center p{margin:0 0 12px;font-size:10px;color:var(--wg-muted,#667085)}
.wg-relevant-grid{
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:10px;
}
.wg-relevant-card{
  min-height:105px;
  border:1px solid var(--wg-border,#d9dee5);
  border-radius:15px;
  padding:12px;
  background:var(--wg-surface-2,#fafafa);
  color:var(--wg-heading,#172033);
  text-decoration:none;
  display:flex;
  flex-direction:column;
  justify-content:center;
  align-items:flex-start;
  cursor:pointer;
  transition:transform .1s ease,border-color .12s ease,box-shadow .12s ease;
}
.wg-relevant-card:active{
  transform:scale(.985);
  border-color:var(--wg-gold,#d4af37);
  box-shadow:0 0 0 2px color-mix(in srgb,var(--wg-gold,#d4af37) 18%,transparent);
}
.wg-relevant-card .ico{font-size:25px;margin-bottom:7px}
.wg-relevant-card strong{font-size:11px}
.wg-relevant-card small{margin-top:4px;font-size:8px;color:var(--wg-muted,#667085);line-height:1.35}
html[data-wg-theme="dark"] .wg-relevant-center,
html[data-wg-theme="dark"] .wg-relevant-card{
  background:#121b25!important;color:#e8edf3!important;border-color:#2b3947!important;
}
html[data-wg-theme="dark"] .wg-relevant-center h3,
html[data-wg-theme="dark"] .wg-relevant-card strong{color:#f8fafc!important}
html[data-wg-theme="dark"] .wg-relevant-center p,
html[data-wg-theme="dark"] .wg-relevant-card small{color:#a9b5c3!important}
@media(max-width:720px){.wg-relevant-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}


/* ---------------------------------------------------------
   AI CENTER: match the rest of the app in light mode
--------------------------------------------------------- */
body.wg-fix-ai-center{
  background:var(--wg-bg,#f3f6fa)!important;
  color:var(--wg-text,#263244)!important;
}
body.wg-fix-ai-center header,
body.wg-fix-ai-center .section,
body.wg-fix-ai-center .expiry-center,
body.wg-fix-ai-center .hero-card{
  background:var(--wg-surface,#fff)!important;
  color:var(--wg-text,#263244)!important;
  border-color:var(--wg-border,#dfe5ec)!important;
  box-shadow:0 8px 24px var(--wg-shadow,rgba(15,23,42,.07))!important;
}
body.wg-fix-ai-center .head h1,
body.wg-fix-ai-center .section-head h2,
body.wg-fix-ai-center .expiry-center-head h2{
  color:var(--wg-heading,#172033)!important;
  text-shadow:none!important;
}
body.wg-fix-ai-center .head p,
body.wg-fix-ai-center .expiry-center-head p{color:var(--wg-muted,#667085)!important}
body.wg-fix-ai-center .ai-search,
body.wg-fix-ai-center .clear-filter,
body.wg-fix-ai-center .expiry-filters button{
  background:var(--wg-input,#fff)!important;
  color:var(--wg-text,#263244)!important;
  border-color:var(--wg-border,#dfe5ec)!important;
}
body.wg-fix-ai-center .tools{background:transparent!important}
body.wg-fix-ai-center .tool,
body.wg-fix-ai-center .expiry-panel{
  background:var(--wg-surface,#fff)!important;
  color:var(--wg-text,#263244)!important;
  border-color:var(--wg-border,#dce4ed)!important;
}
body.wg-fix-ai-center .tool h3,
body.wg-fix-ai-center .expiry-panel-head h3{color:var(--wg-heading,#172033)!important}
body.wg-fix-ai-center .tool p{color:var(--wg-muted,#667085)!important}
html[data-wg-theme="dark"] body.wg-fix-ai-center{
  background:#0b1118!important;color:#e8edf3!important;
}
html[data-wg-theme="dark"] body.wg-fix-ai-center header,
html[data-wg-theme="dark"] body.wg-fix-ai-center .section,
html[data-wg-theme="dark"] body.wg-fix-ai-center .expiry-center,
html[data-wg-theme="dark"] body.wg-fix-ai-center .hero-card{
  background:#121b25!important;color:#e8edf3!important;border-color:#2b3947!important;
}
html[data-wg-theme="dark"] body.wg-fix-ai-center .head h1,
html[data-wg-theme="dark"] body.wg-fix-ai-center .section-head h2,
html[data-wg-theme="dark"] body.wg-fix-ai-center .expiry-center-head h2{color:#f8fafc!important}
html[data-wg-theme="dark"] body.wg-fix-ai-center .tool,
html[data-wg-theme="dark"] body.wg-fix-ai-center .expiry-panel{
  background:#0f1720!important;color:#e8edf3!important;border-color:#2b3947!important;
}
html[data-wg-theme="dark"] body.wg-fix-ai-center .tool h3,
html[data-wg-theme="dark"] body.wg-fix-ai-center .expiry-panel-head h3{color:#f8fafc!important}
html[data-wg-theme="dark"] body.wg-fix-ai-center .tool p{color:#a9b5c3!important}

/* Vehicle & Operator admin full dark-mode coverage */
html[data-wg-theme="dark"] body.wg-fix-vehicle-admin,
html[data-wg-theme="dark"] body.wg-fix-operators-admin{
  background:#0b1118!important;color:#e8edf3!important;
}
html[data-wg-theme="dark"] body.wg-fix-vehicle-admin main,
html[data-wg-theme="dark"] body.wg-fix-operators-admin main{
  background:#0b1118!important;
}
html[data-wg-theme="dark"] body.wg-fix-vehicle-admin .easy-manage-center,
html[data-wg-theme="dark"] body.wg-fix-vehicle-admin .easy-manage-card,
html[data-wg-theme="dark"] body.wg-fix-vehicle-admin .admin-card,
html[data-wg-theme="dark"] body.wg-fix-vehicle-admin .vehicle-card,
html[data-wg-theme="dark"] body.wg-fix-operators-admin .stat,
html[data-wg-theme="dark"] body.wg-fix-operators-admin .card,
html[data-wg-theme="dark"] body.wg-fix-operators-admin .detail,
html[data-wg-theme="dark"] body.wg-fix-operators-admin .collapsible-panel{
  background:#121b25!important;
  color:#e8edf3!important;
  border-color:#2b3947!important;
}
html[data-wg-theme="dark"] body.wg-fix-operators-admin .stat strong,
html[data-wg-theme="dark"] body.wg-fix-operators-admin .card h2,
html[data-wg-theme="dark"] body.wg-fix-vehicle-admin h2,
html[data-wg-theme="dark"] body.wg-fix-vehicle-admin h3,
html[data-wg-theme="dark"] body.wg-fix-vehicle-admin .easy-manage-card strong{
  color:#f8fafc!important;
}
html[data-wg-theme="dark"] body.wg-fix-operators-admin .toolbar input,
html[data-wg-theme="dark"] body.wg-fix-operators-admin .toolbar select,
html[data-wg-theme="dark"] body.wg-fix-operators-admin input,
html[data-wg-theme="dark"] body.wg-fix-operators-admin select,
html[data-wg-theme="dark"] body.wg-fix-operators-admin textarea{
  background:#0f1720!important;color:#e8edf3!important;border-color:#31404f!important;
}
