/* FleetX flat interface. Last stylesheet: explicit overrides for legacy themes.
   Green-blue identity stays on actions; structure uses spacing and thin borders. */
:root {
  --fx-shadow-xs: none; --fx-shadow-sm: none; --fx-shadow-md: none;
  --fx-shadow-lg: none; --fx-shadow-brand: none;
  --fx-flat-line: #dbe5e7; --fx-flat-ink: #112b35;
}
/* Higher specificity deliberately beats legacy !important shadow declarations,
   including hover and pseudo-elements. Focus uses an outline, never a shadow. */
html body.fx-flat-ui.fx-flat-ui.fx-flat-ui.fx-flat-ui.fx-flat-ui *,
html body.fx-flat-ui.fx-flat-ui.fx-flat-ui.fx-flat-ui.fx-flat-ui *::before,
html body.fx-flat-ui.fx-flat-ui.fx-flat-ui.fx-flat-ui.fx-flat-ui *::after {
  box-shadow: none !important; text-shadow: none !important;
}
body.fx-flat-ui :is(.auction-card,.event-card,.stat-card,.kpi-card,.admin-card,.fx-why-card,.fx-why-journey,.btn,.b-tab,.auctions-tab-btn):hover {
  transform: none !important;
}
body.fx-flat-ui :is(.fx-ui-surface-glow,.fx-hero-bg-gradient) { display:none !important; }
body.fx-flat-ui :is(.fx-page-hero,.fx-buyer-profile,.fx-seller-profile,.navbar,.fx-auctions-panel,.fx-finance-kpi,.stat-card,.fx-stat-card,.kpi-card)::after,
body.fx-flat-ui :is(.fx-page-hero,.fx-auctions-panel,.fx-finance-kpi,.stat-card,.fx-stat-card,.kpi-card)::before {
  content: none !important; display:none !important;
}
body.fx-flat-ui :is(.section-title,[class*="page-header"],[class*="hero-wrap"])::after { display:none !important; content:none !important; }
body.fx-flat-ui :is(img,i,.fx-logo,.fx-logo-img,.fx-contact-icon,.hiw-tab-icon) { filter:none !important; }
body.fx-flat-ui :focus-visible { outline: 3px solid #168eb0 !important; outline-offset:4px; }
body.fx-flat-ui .container { max-width:1320px; width:100%; padding-inline:clamp(18px,3.5vw,48px); }
body.fx-flat-ui { overflow-x:clip; }
body.fx-flat-ui :is(main,.container,.fx-page-layout,.fx-profile-main,.admin-content,.fx-live-layout,.contact-grid) { min-width:0; }
body.fx-flat-ui :is(h1,h2,h3,p,.btn,.admin-nav-link) { overflow-wrap:break-word; }
body.fx-flat-ui .btn { min-height:44px; line-height:1.4; }
body.fx-flat-ui [hidden] { display:none !important; }
body.fx-flat-ui .fx-page-body--overlap { margin-top:0 !important; padding-top:32px; }
body.fx-flat-ui .fx-page-hero { border-radius:0 !important; border-bottom:1px solid var(--fx-flat-line); }
body.fx-flat-ui .fx-page-hero__title .verified-badge { position:static !important; display:inline-flex; align-items:center; gap:5px; vertical-align:middle; margin:8px; }
body.fx-flat-ui :is(.fx-page-hero__row,.fx-page-hero__actions,.admin-topbar,.ac-meta) { flex-wrap:wrap; }
body.fx-flat-ui :is(.fx-page-hero__chip,.fx-page-hero__eyebrow) { backdrop-filter:none; }

/* Navigation: collapse before long Arabic labels run out of room. */
body.fx-flat-ui.fx-flat-ui .navbar { position:fixed !important; border-bottom:1px solid var(--fx-flat-line); background:#fff !important; backdrop-filter:none !important; -webkit-backdrop-filter:none !important; transform:none !important; animation:none !important; }
body.fx-flat-ui .navbar-inner { min-height:76px; gap:20px; }
body.fx-flat-ui .navbar-actions { display:flex !important; align-items:center; }
body.fx-flat-ui .navbar-links { gap:clamp(10px,1.2vw,22px); }
body.fx-flat-ui .navbar-links > li > a { font-size:14px; white-space:nowrap; }
body.fx-flat-ui .navbar-actions { gap:10px; flex-shrink:0; }
body.fx-flat-ui .fx-nav-user-name { max-width:110px; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
body.fx-flat-ui .navbar-logo { flex-shrink:0; }
body.fx-flat-ui .nav-dropdown-content { border:1px solid var(--fx-flat-line); }
body.fx-flat-ui #mobileMenu { display:none; }

/* Homepage hero: no absolute-positioned image, floating signs or changing text. */
body.fx-flat-ui .fx-home-hero { background:#f4f9f7; margin-top:76px; padding-block:clamp(42px,6vw,84px); border-bottom:1px solid var(--fx-flat-line); }
body.fx-flat-ui .fx-home-hero__layout { display:grid; grid-template-columns:1fr 1.1fr; align-items:center; gap:clamp(28px,4vw,64px); }
body.fx-flat-ui .fx-home-hero__copy { min-width:0; text-align:start; }
body.fx-flat-ui .fx-home-hero__eyebrow { color:#127553; font-size:14px; font-weight:700; margin:0 0 20px; }
body.fx-flat-ui .fx-home-hero h1 { color:var(--fx-flat-ink); font-size:clamp(38px,4.7vw,68px); line-height:1.25; letter-spacing:-1px; margin:0 0 22px; }
body.fx-flat-ui .fx-home-hero h1 span { color:#10865e; }
body.fx-flat-ui .fx-home-hero .fx-hero-value { color:#47616a; font-size:clamp(16px,1.5vw,19px); max-width:520px; line-height:1.95; margin:0 0 28px; }
body.fx-flat-ui .fx-hero-cta-row { position:static; display:flex !important; flex-wrap:wrap; justify-content:flex-start; gap:12px; margin:0; }
body.fx-flat-ui .fx-hero-cta-btn { padding:14px 22px !important; border-radius:10px !important; font-size:15px !important; min-width:0; }
body.fx-flat-ui.fx-home-index .fx-hero-cta-btn.btn-primary { background:var(--fx-brand-gradient) !important; color:#082a28 !important; }
body.fx-flat-ui.fx-home-index .auction-card .btn-primary { background:var(--fx-brand-gradient) !important; color:#082a28 !important; }
body.fx-flat-ui .navbar-toggle svg { width:24px; height:24px; color:#0aad76; }
body.fx-flat-ui.fx-flat-ui .btn.btn-primary { background:var(--fx-brand-gradient) !important; }
body.fx-flat-ui .btn.btn-primary :is(i,svg) { color:inherit !important; }
body.fx-flat-ui .fx-hero-trust { display:flex !important; flex-wrap:wrap; justify-content:flex-start; gap:10px 20px; margin-top:26px; color:#48636d; font-size:13px; }
body.fx-flat-ui .fx-hero-trust span { padding:0; background:none; border:0; }
body.fx-flat-ui .fx-home-hero__visual { min-width:0; display:flex; flex-direction:column; gap:18px; }
body.fx-flat-ui .fx-home-hero__picture { display:block; width:100%; overflow:hidden; }
body.fx-flat-ui .fx-home-hero__picture img { display:block; width:155%; max-width:none; height:auto; margin-inline:-27.5%; margin-top:-18%; margin-bottom:-10%; object-fit:contain; animation:none !important; transform:none !important; }
body.fx-flat-ui .fx-hero-offers { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:16px; position:static; }
body.fx-flat-ui .fx-hero-offers:empty { display:none; }
body.fx-flat-ui .fx-hero-offer { display:grid; gap:5px; text-decoration:none; color:var(--fx-flat-ink); border-block:1px solid #cbded9; padding:14px 0; background:none; min-width:0; }
body.fx-flat-ui .fx-hero-offer__label { color:#127553; font-size:12px; }
body.fx-flat-ui .fx-hero-offer__car { font-size:15px; font-weight:700; overflow-wrap:anywhere; }
body.fx-flat-ui .fx-hero-offer__amount { font-family:Outfit,Tajawal,sans-serif; font-size:18px; }
body.fx-flat-ui .fx-home-hero__browse { color:#42636e; font-size:13px; text-decoration:none; display:flex; align-items:center; gap:8px; }

/* Sections have a single background, with content and vehicle cards directly on it. */
body.fx-flat-ui.fx-home-index :is(.fx-home-auctions,.fx-why-fleetx,.fx-home-contact) { padding-block:clamp(48px,6vw,84px) !important; background:#fff !important; }
body.fx-flat-ui.fx-home-index .fx-home-section-intro { text-align:right !important; margin-bottom:26px; }
body.fx-flat-ui.fx-home-index .section-title { color:var(--fx-flat-ink); font-size:clamp(27px,3vw,40px) !important; }
body.fx-flat-ui.fx-home-index .section-subtitle { max-width:720px; margin-inline:0; line-height:1.8; }
body.fx-flat-ui.fx-home-index :is(.fx-auctions-panel,.fx-home-tabs,.fx-hiw-browser,.browser-tabs,.browser-content.hiw-panel,.fx-contact-form-card,.contact-info-col) {
  background:transparent !important; border:0 !important; border-radius:0 !important; backdrop-filter:none !important;
}
body.fx-flat-ui.fx-home-index .fx-auctions-panel { padding:0 !important; }
body.fx-flat-ui.fx-home-index .fx-home-tabs { display:flex; gap:10px; justify-content:flex-start; padding:0 !important; margin:0 0 28px !important; flex-wrap:wrap; }
body.fx-flat-ui.fx-home-index .auctions-tab-btn { border:1px solid var(--fx-flat-line) !important; border-radius:9px !important; min-height:46px; padding:11px 18px; }
body.fx-flat-ui .fx-listing-grid { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:24px; }
body.fx-flat-ui .auction-card.fx-card-unified { width:100%; height:100%; min-width:0; border:1px solid var(--fx-flat-line) !important; border-radius:14px !important; overflow:hidden; transform:none !important; }
body.fx-flat-ui .ac-img-wrap { aspect-ratio:16/10; height:auto !important; }
body.fx-flat-ui .ac-img-wrap > img { width:100%; height:100%; object-fit:cover; }
body.fx-flat-ui .ac-body { padding:20px !important; }
body.fx-flat-ui .ac-title { font-size:19px !important; line-height:1.6; min-height:0; }
body.fx-flat-ui .ac-info-row { display:flex; flex-wrap:wrap; gap:16px; align-items:center; justify-content:space-between; }
body.fx-flat-ui .ac-price-val { font-size:25px !important; }
body.fx-flat-ui .ac-actions { margin-top:20px; }
body.fx-flat-ui .fx-listing-empty { padding:44px 0; border-block:1px solid var(--fx-flat-line); text-align:center; color:#58707b; }
body.fx-flat-ui .fx-listing-empty > i { font-size:40px; color:#168460; }
body.fx-flat-ui .fx-tab-footer { margin-top:26px; text-align:left; }
body.fx-flat-ui.fx-home-index .fx-hiw-section--dark { padding-block:clamp(48px,6vw,84px) !important; background:#0b2430 !important; }
body.fx-flat-ui.fx-home-index .fx-hiw-section--dark :is(#buyers-section,#sellers-section) { padding:0 !important; background:transparent !important; height:auto !important; min-height:0 !important; position:static !important; }
body.fx-flat-ui.fx-home-index .fx-hiw-section--dark #sellers-section { margin-top:64px !important; padding-top:48px !important; border-top:1px solid #29414b; }
body.fx-flat-ui.fx-home-index .fx-hiw-section--dark .container { grid-template-columns:minmax(180px,.35fr) minmax(0,1fr); gap:36px; }
body.fx-flat-ui.fx-home-index .fx-hiw-browser { padding:0 !important; overflow:visible !important; }
body.fx-flat-ui.fx-home-index .browser-tabs { gap:12px !important; padding:0 0 18px !important; border-bottom:1px solid #29414b !important; display:flex; flex-wrap:wrap; }
body.fx-flat-ui.fx-home-index .b-tab { flex:0 1 auto; border:1px solid #405560; border-radius:8px; padding:10px 18px; min-height:44px; }
body.fx-flat-ui.fx-home-index .browser-content.hiw-panel { padding:24px 0 0 !important; min-height:0 !important; }
body.fx-flat-ui :is(#buyers-section,#sellers-section) .browser-content.hiw-panel { background:transparent !important; border:0 !important; border-radius:0 !important; padding:24px 0 0 !important; min-height:0 !important; }
body.fx-flat-ui.fx-home-index .hiw-tab-content.active { align-items:center; gap:28px !important; }
body.fx-flat-ui.fx-home-index .hiw-tab-col { flex:1; min-width:0; }
body.fx-flat-ui.fx-home-index :is(.hiw-tab-content,.hiw-tab-col) { background:transparent !important; border:0 !important; border-radius:0 !important; }
body.fx-flat-ui.fx-home-index .hiw-tab-img { width:100%; height:210px !important; object-fit:cover; border-radius:12px !important; }
body.fx-flat-ui.fx-home-index .hiw-tab-title { line-height:1.6; }
body.fx-flat-ui.fx-home-index .hiw-tab-desc { line-height:1.9; }
body.fx-flat-ui.fx-home-index .fx-contact-form-card { padding:0 !important; }
body.fx-flat-ui.fx-home-index .contact-grid { gap:clamp(28px,6vw,80px); }
body.fx-flat-ui .fx-form-input, body.fx-flat-ui .fx-form-select, body.fx-flat-ui .fx-form-textarea { border:1px solid #cbdade; border-radius:8px; min-height:46px; }

/* Role workspaces: real content panels retain borders; nesting loses decoration. */
body.fx-flat-ui .admin-nav { display:flex !important; flex-direction:column; gap:6px; }
body.fx-flat-ui .admin-nav-link { display:flex !important; align-items:center; gap:12px; width:100%; min-height:46px; line-height:1.5; white-space:normal; padding:12px 16px; }
body.fx-flat-ui .admin-nav-link i { width:22px; flex:0 0 22px; text-align:center; }
body.fx-flat-ui :is(.admin-sidebar,.fx-profile-sidebar--home) { overscroll-behavior:contain; }
body.fx-flat-ui :is(.admin-card,.fx-profile-card,.fx-detail-block,.fx-live-card,.pbb-board) { border:1px solid var(--fx-flat-line); border-radius:12px; }
body.fx-flat-ui :is(.admin-card,.fx-profile-card) :is(.admin-card,.fx-profile-card) { border:0; border-radius:0; background:transparent; }
body.fx-flat-ui .fx-table-scroll { max-width:100%; overflow:auto; overscroll-behavior-inline:contain; }
body.fx-flat-ui .fx-live-flash { animation:fx-flat-price-feedback 700ms ease-out; }
@keyframes fx-flat-price-feedback { from { background-color:#d6f5e7; } to { background-color:transparent; } }

@media (max-width:1200px) {
  body.fx-flat-ui :is(.navbar-links,.navbar-actions .hide-on-mobile) { display:none !important; }
  body.fx-flat-ui .navbar-toggle { display:inline-flex !important; align-items:center; justify-content:center; width:46px; height:46px; }
  body.fx-flat-ui .navbar-inner { justify-content:space-between; min-height:72px; }
  body.fx-flat-ui .fx-home-hero { margin-top:72px; }
  body.fx-flat-ui #mobileMenu { position:fixed !important; inset:72px 0 0; margin:0; width:100%; max-height:calc(100dvh - 72px); overflow-y:auto; background:#fff !important; padding:18px clamp(18px,5vw,48px) 30px; border:0; border-radius:0; z-index:1500; }
  body.fx-flat-ui #mobileMenu.open { display:block !important; transform:none !important; opacity:1 !important; visibility:visible !important; }
  body.fx-flat-ui #mobileMenu ul { display:flex; flex-direction:column; gap:5px; max-width:640px; margin:0 auto; padding:0; }
  body.fx-flat-ui #mobileMenu li { width:100%; }
  body.fx-flat-ui #mobileMenu a { min-height:46px; display:flex; align-items:center; gap:12px; padding:12px; color:#183a43; border-radius:8px; }
  body.fx-flat-ui #mobileMenu .fx-mobile-cta-row { display:flex; gap:12px; flex-wrap:wrap; }
  body.fx-flat-ui.fx-mobile-menu-open { overflow:hidden; }
  body.fx-flat-ui.fx-mobile-menu-open .whatsapp-float { visibility:hidden; }
}
@media (max-width:992px) {
  body.fx-flat-ui .fx-home-hero__layout { grid-template-columns:1fr; gap:32px; }
  body.fx-flat-ui .fx-home-hero__copy { max-width:650px; }
  body.fx-flat-ui .fx-home-hero__visual { width:100%; max-width:680px; margin-inline:auto; }
  body.fx-flat-ui .fx-listing-grid { grid-template-columns:repeat(2,minmax(0,1fr)); gap:18px; }
  body.fx-flat-ui.fx-home-index .fx-hiw-section--dark .container { grid-template-columns:1fr; gap:24px; }
  body.fx-flat-ui.fx-home-index .fx-hiw-section--dark .hiw-dark-head { text-align:right !important; }
  body.fx-flat-ui .admin-content { margin-right:0 !important; width:100%; padding-inline:18px !important; }
  body.fx-flat-ui .admin-sidebar { max-width:min(320px,86vw); }
  body.fx-flat-ui .fx-admin-dashboard-topbar { display:none !important; }
}
@media (max-width:600px) {
  body.fx-flat-ui .fx-home-hero { padding-block:30px 40px; }
  body.fx-flat-ui .fx-home-hero h1 { font-size:38px; letter-spacing:0; }
  body.fx-flat-ui .fx-home-hero__eyebrow { margin-bottom:16px; font-size:12px; }
  body.fx-flat-ui .fx-home-hero .fx-hero-value { font-size:16px; }
  body.fx-flat-ui .fx-hero-cta-row > a { flex:1 1 100%; }
  body.fx-flat-ui .fx-home-hero__picture img { max-height:none; }
  body.fx-flat-ui .fx-hero-offers { grid-template-columns:1fr; gap:0; }
  body.fx-flat-ui .fx-hero-offer { grid-template-columns:1fr auto; align-items:center; }
  body.fx-flat-ui .fx-hero-offer__car { grid-column:1; }
  body.fx-flat-ui .fx-hero-offer__amount { grid-column:2; grid-row:1 / 3; font-size:17px; }
  body.fx-flat-ui .fx-listing-grid { grid-template-columns:1fr; }
  body.fx-flat-ui.fx-home-index .hiw-tab-content { flex-direction:column; }
  body.fx-flat-ui.fx-home-index .hiw-tab-col { width:100%; }
  body.fx-flat-ui.fx-home-index .hiw-tab-img { height:180px !important; }
  body.fx-flat-ui.fx-home-index .browser-tabs { gap:8px !important; }
  body.fx-flat-ui.fx-home-index .b-tab { flex:1; padding:10px 8px; font-size:13px; }
body.fx-flat-ui :is(.contact-grid,.fx-form-grid,.fx-settings-grid,.fx-settings-provider-grid,.fx-finance-kpis) { grid-template-columns:1fr !important; }
  body.fx-flat-ui :is(.fx-page-hero__actions,.admin-topbar,.fx-settings-savebar) { flex-direction:column; align-items:stretch; }
  body.fx-flat-ui .fx-page-hero__title { font-size:30px !important; }
  body.fx-flat-ui .fx-page-hero__meta { flex-wrap:wrap; }
}
@media (prefers-reduced-motion:reduce) {
  body.fx-flat-ui *, body.fx-flat-ui *::before, body.fx-flat-ui *::after { animation:none !important; transition:none !important; }
}
