/**
 * MISTER FAST LiveMapChat WEB Theme V1.0
 * WEB module only — never loaded by /modules/livemapchat/?view=mini
 * Presentation-only patch. Existing APIs, DB, Login, Map and Chat engines remain unchanged.
 */

body.mf-web-theme-v1{
  --mf-web-blue:#003da5;
  --mf-web-blue-2:#052e73;
  --mf-web-navy:#061f49;
  --mf-web-yellow:#ffc400;
  --mf-web-white:#ffffff;
  --mf-web-bg:#edf3fb;
  --mf-web-soft:#f7faff;
  --mf-web-line:#dce6f3;
  --mf-web-text:#082b5b;
  --mf-web-muted:#64748b;
  --mf-web-green:#19a463;
  --mf-web-red:#e5484d;
  --mf-web-orange:#f59e0b;
  --mf-web-shadow:0 12px 34px rgba(6,31,73,.12);
  --mf-web-shadow-soft:0 6px 22px rgba(6,31,73,.08);
  --mf-web-radius:18px;
  background:var(--mf-web-bg);
  color:var(--mf-web-text);
  font-family:"Prompt","Kanit","Noto Sans Thai",Arial,sans-serif;
}

/* Keep this theme fully isolated inside WEB. */
body.mf-web-theme-v1 *,
body.mf-web-theme-v1 *::before,
body.mf-web-theme-v1 *::after{
  box-sizing:border-box;
}

/* Main application window */
body.mf-web-theme-v1 .mf514-window{
  width:100%;
  min-height:100vh;
  background:var(--mf-web-bg);
  border:0;
  border-radius:0;
  box-shadow:none;
  overflow:visible;
}

/* Enterprise title bar */
body.mf-web-theme-v1 .mf514-titlebar{
  min-height:68px;
  padding:0 20px;
  background:var(--mf-web-white);
  color:var(--mf-web-text);
  border-top:4px solid var(--mf-web-yellow);
  border-bottom:1px solid var(--mf-web-line);
  box-shadow:0 4px 16px rgba(6,31,73,.05);
  position:sticky;
  top:0;
  z-index:900;
}

body.mf-web-theme-v1 .mf514-title{
  gap:12px;
}

body.mf-web-theme-v1 .mf514-title > span{
  width:42px;
  height:42px;
  display:grid;
  place-items:center;
  overflow:hidden;
  color:transparent;
  background:
    url("images/mf-web-mark-v1.png") center/contain no-repeat;
  border-radius:50%;
  flex:0 0 42px;
}

body.mf-web-theme-v1 .mf514-title b{
  color:var(--mf-web-navy);
  font-size:16px;
  letter-spacing:.01em;
}

body.mf-web-theme-v1 .mf514-title small{
  color:var(--mf-web-muted);
  font-size:11px;
}

body.mf-web-theme-v1 .mf514-status{
  min-height:34px;
  padding:7px 12px;
  color:var(--mf-web-text);
  background:#f1f6fc;
  border:1px solid var(--mf-web-line);
  border-radius:999px;
  font-weight:800;
}

body.mf-web-theme-v1 .mf514-status i,
body.mf-web-theme-v1 .mf545-chat-brand small i{
  background:var(--mf-web-green);
  box-shadow:0 0 0 4px rgba(25,164,99,.13);
}

/* Strict 3-panel web workspace */
body.mf-web-theme-v1 .mf514-grid{
  display:grid;
  grid-template-columns:220px minmax(480px,1fr) 390px;
  align-items:start;
  gap:0;
  min-height:calc(100vh - 68px);
  background:var(--mf-web-bg);
}

/* Sidebar */
body.mf-web-theme-v1 .mf514-sidebar{
  position:sticky;
  top:68px;
  height:calc(100vh - 68px);
  padding:16px 12px;
  background:
    radial-gradient(circle at 0 0,rgba(255,196,0,.12),transparent 28%),
    linear-gradient(180deg,var(--mf-web-blue) 0%,var(--mf-web-blue-2) 100%);
  color:#fff;
  border-right:0;
  overflow:auto;
  scrollbar-width:thin;
}

body.mf-web-theme-v1 .mf514-brand{
  min-height:58px;
  padding:8px 10px 14px;
  display:grid;
  grid-template-columns:40px 1fr;
  grid-template-rows:auto auto;
  gap:0 10px;
  color:#fff;
  text-decoration:none;
  border-bottom:1px solid rgba(255,255,255,.16);
}

body.mf-web-theme-v1 .mf514-brand > span{
  grid-row:1 / 3;
  width:40px;
  height:40px;
  color:transparent;
  background:url("images/mf-web-mark-v1.png") center/contain no-repeat;
}

body.mf-web-theme-v1 .mf514-brand b{
  align-self:end;
  font-size:15px;
  line-height:1.1;
}

body.mf-web-theme-v1 .mf514-brand small{
  color:rgba(255,255,255,.72);
  font-size:10px;
}

body.mf-web-theme-v1 .mf514-user{
  margin:13px 0;
  padding:11px;
  background:rgba(255,255,255,.1);
  border:1px solid rgba(255,255,255,.14);
  border-radius:14px;
  backdrop-filter:blur(8px);
}

body.mf-web-theme-v1 .mf514-user b,
body.mf-web-theme-v1 .mf514-user small,
body.mf-web-theme-v1 .mf514-user em{
  color:#fff;
}

body.mf-web-theme-v1 .mf514-user small{
  opacity:.72;
}

body.mf-web-theme-v1 .mf514-menu{
  display:grid;
  gap:5px;
}

body.mf-web-theme-v1 .mf514-menu button{
  min-height:46px;
  padding:9px 11px;
  display:grid;
  grid-template-columns:28px 1fr;
  align-items:center;
  gap:8px;
  color:#fff;
  background:transparent;
  border:1px solid transparent;
  border-radius:12px;
  text-align:left;
  transition:.16s ease;
}

body.mf-web-theme-v1 .mf514-menu button span{
  font-size:18px;
}

body.mf-web-theme-v1 .mf514-menu button b{
  display:block;
  color:inherit;
  font-size:13px;
  white-space:normal;
}

body.mf-web-theme-v1 .mf514-menu button:hover{
  background:rgba(255,255,255,.11);
  border-color:rgba(255,255,255,.16);
  transform:translateX(2px);
}

body.mf-web-theme-v1 .mf514-menu button.is-active{
  color:var(--mf-web-navy);
  background:var(--mf-web-yellow);
  border-color:var(--mf-web-yellow);
  box-shadow:0 8px 18px rgba(0,0,0,.14);
}

/* Map/main workspace */
body.mf-web-theme-v1 .mf514-map-pane{
  min-width:0;
  background:var(--mf-web-bg);
  border:0;
}

body.mf-web-theme-v1 .mf514-map-toolbar{
  min-height:86px;
  padding:12px 16px;
  display:grid;
  grid-template-columns:minmax(150px,.7fr) minmax(380px,1.5fr) auto;
  align-items:center;
  gap:12px;
  background:rgba(255,255,255,.96);
  border-bottom:1px solid var(--mf-web-line);
  box-shadow:0 4px 14px rgba(6,31,73,.05);
  position:sticky;
  top:68px;
  z-index:700;
  backdrop-filter:blur(12px);
}

body.mf-web-theme-v1 .mf534-map-title b{
  color:var(--mf-web-navy);
  font-size:18px;
}

body.mf-web-theme-v1 .mf534-map-title small{
  color:var(--mf-web-muted);
  line-height:1.3;
}

body.mf-web-theme-v1 .mf514-routebar{
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:7px;
  padding:0;
  background:transparent;
}

body.mf-web-theme-v1 .mf514-routebar button{
  min-height:54px;
  padding:7px 9px;
  background:var(--mf-web-soft);
  border:1px solid var(--mf-web-line);
  border-radius:13px;
  color:var(--mf-web-text);
}

body.mf-web-theme-v1 .mf514-routebar button:hover{
  border-color:rgba(0,61,165,.4);
  background:#fff;
}

body.mf-web-theme-v1 .mf514-routebar button.is-active{
  color:var(--mf-web-navy);
  background:#fff8d6;
  border-color:var(--mf-web-yellow);
  box-shadow:0 4px 12px rgba(255,196,0,.16);
}

body.mf-web-theme-v1 .mf514-routebar button b{
  color:inherit;
  font-size:12px;
}

body.mf-web-theme-v1 .mf514-routebar button small{
  color:var(--mf-web-muted);
  font-size:9px;
}

body.mf-web-theme-v1 .mf514-kpis{
  gap:6px;
}

body.mf-web-theme-v1 .mf514-kpis span{
  min-width:66px;
  padding:7px 9px;
  background:#fff;
  border:1px solid var(--mf-web-line);
  border-radius:12px;
}

body.mf-web-theme-v1 .mf514-kpis b{
  color:var(--mf-web-blue);
  font-size:16px;
}

body.mf-web-theme-v1 .mf514-kpis small{
  color:var(--mf-web-muted);
  font-size:9px;
}

/* Leaflet/map area */
body.mf-web-theme-v1 .mf514-map-wrap{
  min-height:calc(100vh - 154px);
  background:#dce8f5;
  border:0;
  position:relative;
  overflow:hidden;
}

body.mf-web-theme-v1 #mf514Map{
  min-height:calc(100vh - 154px);
  background:#dce8f5;
}

body.mf-web-theme-v1 .leaflet-control-zoom,
body.mf-web-theme-v1 .leaflet-control-layers{
  border:0!important;
  border-radius:12px!important;
  overflow:hidden;
  box-shadow:var(--mf-web-shadow-soft)!important;
}

body.mf-web-theme-v1 .leaflet-control-zoom a{
  color:var(--mf-web-blue)!important;
  border-color:var(--mf-web-line)!important;
}

/* Map floating panels */
body.mf-web-theme-v1 .mf532-radius-panel,
body.mf-web-theme-v1 .mf514-estimate{
  background:rgba(255,255,255,.96);
  border:1px solid rgba(220,230,243,.95);
  border-radius:var(--mf-web-radius);
  box-shadow:var(--mf-web-shadow);
  backdrop-filter:blur(12px);
}

body.mf-web-theme-v1 .mf532-radius-panel{
  max-width:390px;
  padding:14px;
}

body.mf-web-theme-v1 .mf532-radius-head b{
  color:var(--mf-web-navy);
}

body.mf-web-theme-v1 .mf532-radius-head small,
body.mf-web-theme-v1 .mf532-radius-summary small{
  color:var(--mf-web-muted);
}

body.mf-web-theme-v1 .mf532-radius-head strong{
  color:var(--mf-web-blue);
  background:#edf4ff;
  border-radius:999px;
  padding:5px 9px;
}

body.mf-web-theme-v1 input[type="range"][data-mf532-radius]{
  accent-color:var(--mf-web-yellow);
}

body.mf-web-theme-v1 .mf532-radius-presets button{
  color:var(--mf-web-blue);
  background:#fff;
  border:1px solid var(--mf-web-line);
  border-radius:9px;
}

body.mf-web-theme-v1 .mf532-radius-presets button.is-active{
  color:var(--mf-web-navy);
  background:var(--mf-web-yellow);
  border-color:var(--mf-web-yellow);
}

body.mf-web-theme-v1 .mf514-estimate button,
body.mf-web-theme-v1 .mf54-nearest-driver button.is-primary{
  color:var(--mf-web-navy);
  background:var(--mf-web-yellow);
  border-color:var(--mf-web-yellow);
  font-weight:900;
}

body.mf-web-theme-v1 .mf514-locate,
body.mf-web-theme-v1 .mf52-map-fullscreen,
body.mf-web-theme-v1 .mf521-map-quick button{
  color:var(--mf-web-blue);
  background:#fff;
  border:1px solid var(--mf-web-line);
  box-shadow:var(--mf-web-shadow-soft);
}

body.mf-web-theme-v1 .mf514-locate:hover,
body.mf-web-theme-v1 .mf52-map-fullscreen:hover,
body.mf-web-theme-v1 .mf521-map-quick button:hover{
  color:var(--mf-web-navy);
  background:var(--mf-web-yellow);
  border-color:var(--mf-web-yellow);
}

/* Driver section */
body.mf-web-theme-v1 .mf6192-driver-section{
  margin:14px;
  padding:0;
  background:#fff;
  border:1px solid var(--mf-web-line);
  border-radius:var(--mf-web-radius);
  box-shadow:var(--mf-web-shadow-soft);
  overflow:hidden;
}

body.mf-web-theme-v1 .mf6192-driver-head{
  min-height:62px;
  padding:12px 16px;
  background:linear-gradient(90deg,#fff,#f7faff);
  border-bottom:1px solid var(--mf-web-line);
}

body.mf-web-theme-v1 .mf6192-driver-head b{
  color:var(--mf-web-navy);
  font-size:15px;
}

body.mf-web-theme-v1 .mf6192-driver-head small{
  color:var(--mf-web-muted);
}

body.mf-web-theme-v1 .mf6192-driver-head > span{
  color:var(--mf-web-blue);
  background:#edf4ff;
  border-radius:999px;
  padding:7px 11px;
}

body.mf-web-theme-v1 .mf6192-driver-list{
  padding:10px;
}

body.mf-web-theme-v1 .mf6192-driver-list > *{
  border-color:var(--mf-web-line)!important;
  border-radius:13px!important;
  box-shadow:none!important;
}

body.mf-web-theme-v1 .mf6192-driver-empty{
  color:var(--mf-web-muted);
  padding:18px;
}

/* Chat pane */
body.mf-web-theme-v1 .mf514-chat-pane{
  position:sticky;
  top:68px;
  height:calc(100vh - 68px);
  min-width:0;
  background:#fff;
  border-left:1px solid var(--mf-web-line);
  box-shadow:-6px 0 20px rgba(6,31,73,.05);
  overflow:hidden;
}

body.mf-web-theme-v1 .mf514-chat-head{
  min-height:66px;
  padding:10px 13px;
  background:linear-gradient(135deg,var(--mf-web-blue),var(--mf-web-blue-2));
  color:#fff;
  border-bottom:0;
}

body.mf-web-theme-v1 .mf545-auth-state{
  background:#fff!important;
  color:var(--mf-web-blue)!important;
  border:2px solid rgba(255,255,255,.75)!important;
}

body.mf-web-theme-v1 .mf545-chat-brand b,
body.mf-web-theme-v1 .mf545-chat-brand small{
  color:#fff;
}

body.mf-web-theme-v1 .mf514-chat-head-actions em{
  color:#fff;
  background:rgba(255,255,255,.14);
  border:1px solid rgba(255,255,255,.18);
  border-radius:999px;
  padding:5px 8px;
}

body.mf-web-theme-v1 .mf601-context{
  margin:0;
  padding:10px 12px;
  background:#f8fbff;
  border-bottom:1px solid var(--mf-web-line);
}

body.mf-web-theme-v1 .mf601-context-icon{
  color:var(--mf-web-blue);
  background:#eaf2ff;
}

body.mf-web-theme-v1 .mf601-context b{
  color:var(--mf-web-navy);
}

body.mf-web-theme-v1 .mf601-context small,
body.mf-web-theme-v1 .mf601-context em{
  color:var(--mf-web-muted);
}

body.mf-web-theme-v1 .mf601-member-button{
  color:var(--mf-web-blue);
  background:#fff;
  border:1px solid var(--mf-web-line);
  border-radius:11px;
}

/* Role tabs / room buttons */
body.mf-web-theme-v1 .mf615-role-tabs,
body.mf-web-theme-v1 [class*="role-tabs"]{
  background:#fff;
  border-bottom:1px solid var(--mf-web-line);
}

body.mf-web-theme-v1 .mf615-role-tabs button,
body.mf-web-theme-v1 [class*="role-tabs"] button{
  color:var(--mf-web-text);
  background:#fff;
}

body.mf-web-theme-v1 .mf615-role-tabs button.is-active,
body.mf-web-theme-v1 [class*="role-tabs"] button.is-active{
  color:var(--mf-web-navy);
  background:#fff8d6;
  box-shadow:inset 0 -3px 0 var(--mf-web-yellow);
}

/* Chat messages and composer: enhance existing UI without altering structure */
body.mf-web-theme-v1 .mf514-chat-pane [class*="message-list"],
body.mf-web-theme-v1 .mf514-chat-pane [class*="chat-list"],
body.mf-web-theme-v1 .mf514-chat-pane [data-mf56-messages]{
  background:
    radial-gradient(circle at 100% 0,rgba(0,61,165,.04),transparent 28%),
    #f5f8fc;
}

body.mf-web-theme-v1 .mf514-chat-pane [class*="bubble"]{
  border-radius:15px!important;
  border-color:var(--mf-web-line)!important;
  box-shadow:0 3px 10px rgba(6,31,73,.05)!important;
}

body.mf-web-theme-v1 .mf514-chat-pane [class*="composer"]{
  background:#fff;
  border-top:1px solid var(--mf-web-line);
}

body.mf-web-theme-v1 .mf514-chat-pane textarea,
body.mf-web-theme-v1 .mf514-chat-pane input[type="text"]{
  color:var(--mf-web-text);
  background:#f5f8fc;
  border:1px solid var(--mf-web-line);
  border-radius:14px;
}

body.mf-web-theme-v1 .mf514-chat-pane textarea:focus,
body.mf-web-theme-v1 .mf514-chat-pane input[type="text"]:focus{
  border-color:var(--mf-web-blue);
  box-shadow:0 0 0 3px rgba(0,61,165,.10);
  outline:0;
}

body.mf-web-theme-v1 .mf514-chat-pane button[type="submit"],
body.mf-web-theme-v1 .mf514-chat-pane [data-chat-send]{
  color:var(--mf-web-navy);
  background:var(--mf-web-yellow);
  border-color:var(--mf-web-yellow);
}

/* Existing edge handle remains functional, but visually web-native. */
body.mf-web-theme-v1 .mf59-edge-handle{
  color:var(--mf-web-blue);
  background:#fff;
  border:1px solid var(--mf-web-line);
  box-shadow:var(--mf-web-shadow-soft);
}

/* Web responsiveness is independent from Mini. */
@media (max-width:1280px){
  body.mf-web-theme-v1 .mf514-grid{
    grid-template-columns:190px minmax(430px,1fr) 350px;
  }

  body.mf-web-theme-v1 .mf514-map-toolbar{
    grid-template-columns:minmax(130px,.55fr) minmax(330px,1.45fr);
  }

  body.mf-web-theme-v1 .mf514-kpis{
    display:none;
  }
}

@media (max-width:1020px){
  body.mf-web-theme-v1 .mf514-grid{
    grid-template-columns:76px minmax(420px,1fr) 340px;
  }

  body.mf-web-theme-v1 .mf514-brand{
    display:flex;
    justify-content:center;
    padding:8px 0 14px;
  }

  body.mf-web-theme-v1 .mf514-brand b,
  body.mf-web-theme-v1 .mf514-brand small,
  body.mf-web-theme-v1 .mf514-user div,
  body.mf-web-theme-v1 .mf514-menu button b{
    display:none;
  }

  body.mf-web-theme-v1 .mf514-user{
    display:grid;
    place-items:center;
    padding:8px;
  }

  body.mf-web-theme-v1 .mf514-menu button{
    grid-template-columns:1fr;
    justify-items:center;
    padding:9px;
  }

  body.mf-web-theme-v1 .mf514-map-toolbar{
    grid-template-columns:1fr;
    position:relative;
    top:auto;
  }

  body.mf-web-theme-v1 .mf534-map-title{
    display:none;
  }

  body.mf-web-theme-v1 .mf514-map-wrap,
  body.mf-web-theme-v1 #mf514Map{
    min-height:calc(100vh - 144px);
  }
}

@media (max-width:820px){
  body.mf-web-theme-v1{
    min-width:760px;
    overflow-x:auto;
  }

  body.mf-web-theme-v1 .mf514-grid{
    grid-template-columns:72px minmax(400px,1fr) 320px;
  }
}

/* =========================================================
   V1.1 LIVE SCREEN CORRECTION
   - Remove oversized blank toolbar area
   - Keep map, chat and sidebar aligned to one viewport
   - Improve chat role tabs and compact room header
   ========================================================= */

body.mf-web-theme-v1{
  overflow:hidden;
}

body.mf-web-theme-v1 .mf514-window{
  height:100vh;
  min-height:100vh;
  overflow:hidden;
}

/* Keep the title bar compact and always visible. */
body.mf-web-theme-v1 .mf514-titlebar{
  height:58px;
  min-height:58px;
  padding:0 16px;
}

body.mf-web-theme-v1 .mf514-grid{
  height:calc(100vh - 58px);
  min-height:0;
  grid-template-columns:246px minmax(520px,1fr) 360px;
  overflow:hidden;
}

body.mf-web-theme-v1 .mf514-sidebar{
  top:58px;
  height:calc(100vh - 58px);
  padding:14px 11px;
}

body.mf-web-theme-v1 .mf514-chat-pane{
  top:58px;
  height:calc(100vh - 58px);
}

/* The previous toolbar inherited tall legacy rules.
   V1.1 forces one compact enterprise row. */
body.mf-web-theme-v1 .mf514-map-pane{
  height:calc(100vh - 58px);
  overflow:auto;
  scrollbar-width:thin;
}

body.mf-web-theme-v1 .mf514-map-toolbar{
  position:relative;
  top:auto;
  min-height:74px;
  height:74px;
  padding:8px 12px;
  grid-template-columns:150px minmax(350px,1fr) auto;
  gap:10px;
  overflow:hidden;
}

body.mf-web-theme-v1 .mf534-map-title{
  min-width:0;
}

body.mf-web-theme-v1 .mf534-map-title b{
  font-size:16px;
}

body.mf-web-theme-v1 .mf534-map-title small{
  display:block;
  max-width:145px;
  font-size:10px;
}

body.mf-web-theme-v1 .mf514-routebar{
  height:58px;
  align-items:stretch;
}

body.mf-web-theme-v1 .mf514-routebar button{
  min-height:58px;
  height:58px;
  display:grid;
  grid-template-columns:30px 1fr;
  align-items:center;
  gap:6px;
  padding:6px 8px;
}

body.mf-web-theme-v1 .mf514-routebar button > span{
  font-size:19px;
}

body.mf-web-theme-v1 .mf514-routebar button b{
  font-size:11px;
  line-height:1.15;
}

body.mf-web-theme-v1 .mf514-routebar button small{
  display:block;
  margin-top:2px;
  font-size:8px;
  line-height:1.2;
}

body.mf-web-theme-v1 .mf514-kpis span{
  min-width:58px;
  padding:5px 7px;
}

body.mf-web-theme-v1 .mf514-kpis b{
  font-size:14px;
}

/* Map fills the remaining visible web workspace. */
body.mf-web-theme-v1 .mf514-map-wrap,
body.mf-web-theme-v1 #mf514Map{
  min-height:calc(100vh - 132px);
  height:calc(100vh - 132px);
}

/* Place floating map tools cleanly without covering route controls. */
body.mf-web-theme-v1 .mf532-radius-panel{
  left:16px;
  bottom:18px;
  width:min(390px,calc(100% - 32px));
}

body.mf-web-theme-v1 .mf514-estimate{
  right:16px;
  top:16px;
}

body.mf-web-theme-v1 .mf514-locate{
  right:16px;
  bottom:86px;
}

body.mf-web-theme-v1 .mf52-map-fullscreen{
  right:16px;
  bottom:138px;
}

/* Sidebar proportions matching the live WEB screenshot. */
body.mf-web-theme-v1 .mf514-brand{
  min-height:64px;
  grid-template-columns:44px 1fr;
}

body.mf-web-theme-v1 .mf514-brand > span{
  width:44px;
  height:44px;
}

body.mf-web-theme-v1 .mf514-menu button{
  min-height:54px;
  grid-template-columns:34px 1fr;
  border-radius:14px;
}

body.mf-web-theme-v1 .mf514-menu button span{
  font-size:21px;
}

body.mf-web-theme-v1 .mf514-menu button b{
  font-size:14px;
}

/* Chat header and current room become compact and readable. */
body.mf-web-theme-v1 .mf514-chat-head{
  min-height:58px;
  height:58px;
  padding:8px 12px;
}

body.mf-web-theme-v1 .mf601-context{
  min-height:66px;
  padding:8px 11px;
}

body.mf-web-theme-v1 .mf601-context b{
  font-size:14px;
}

body.mf-web-theme-v1 .mf601-context small{
  font-size:10px;
}

/* Actual role menu classes used by the current chat build. */
body.mf-web-theme-v1 .mf615-role-chat-tabs,
body.mf-web-theme-v1 .mf615-role-tabs,
body.mf-web-theme-v1 [data-mf615-role-tabs]{
  display:grid!important;
  grid-template-columns:repeat(4,minmax(0,1fr))!important;
  min-height:48px!important;
  padding:0!important;
  background:#fff!important;
  border-bottom:1px solid var(--mf-web-line)!important;
  overflow:hidden!important;
}

body.mf-web-theme-v1 .mf615-role-chat-tabs button,
body.mf-web-theme-v1 .mf615-role-tabs button,
body.mf-web-theme-v1 [data-mf615-role-tabs] button{
  min-width:0!important;
  min-height:48px!important;
  padding:6px 4px!important;
  color:var(--mf-web-text)!important;
  background:#fff!important;
  border:0!important;
  border-right:1px solid var(--mf-web-line)!important;
  border-radius:0!important;
  font-size:10px!important;
  font-weight:800!important;
  white-space:nowrap!important;
  overflow:hidden!important;
  text-overflow:ellipsis!important;
}

body.mf-web-theme-v1 .mf615-role-chat-tabs button:last-child,
body.mf-web-theme-v1 .mf615-role-tabs button:last-child,
body.mf-web-theme-v1 [data-mf615-role-tabs] button:last-child{
  border-right:0!important;
}

body.mf-web-theme-v1 .mf615-role-chat-tabs button.is-active,
body.mf-web-theme-v1 .mf615-role-tabs button.is-active,
body.mf-web-theme-v1 [data-mf615-role-tabs] button.is-active{
  color:var(--mf-web-navy)!important;
  background:#fff8d6!important;
  box-shadow:inset 0 -3px 0 var(--mf-web-yellow)!important;
}

/* Prevent old mini/mobile rules from taking control inside WEB. */
body.mf-web-theme-v1 [class*="mini-shell"],
body.mf-web-theme-v1 .mf514-window.is-expanded{
  max-width:none!important;
  border-radius:0!important;
}

@media (max-width:1280px){
  body.mf-web-theme-v1 .mf514-grid{
    grid-template-columns:210px minmax(470px,1fr) 340px;
  }

  body.mf-web-theme-v1 .mf514-map-toolbar{
    grid-template-columns:120px minmax(330px,1fr);
  }
}

@media (max-width:1100px){
  body.mf-web-theme-v1 .mf514-grid{
    grid-template-columns:82px minmax(440px,1fr) 330px;
  }

  body.mf-web-theme-v1 .mf514-brand b,
  body.mf-web-theme-v1 .mf514-brand small,
  body.mf-web-theme-v1 .mf514-user div,
  body.mf-web-theme-v1 .mf514-menu button b{
    display:none!important;
  }

  body.mf-web-theme-v1 .mf514-brand{
    display:flex;
    justify-content:center;
  }

  body.mf-web-theme-v1 .mf514-menu button{
    grid-template-columns:1fr;
    justify-items:center;
  }
}

/* =========================================================
   V1.2 ENTERPRISE VISUAL POLISH
   WEB presentation only. No engine or data changes.
   ========================================================= */

/* Workspace proportions */
body.mf-web-theme-v1 .mf514-grid{
  grid-template-columns:232px minmax(560px,1fr) 372px;
}

/* Cleaner sidebar hierarchy */
body.mf-web-theme-v1 .mf514-sidebar{
  padding:12px 10px 18px;
  background:
    radial-gradient(circle at 12% 0,rgba(255,196,0,.16),transparent 24%),
    linear-gradient(180deg,#003da5 0%,#06347d 58%,#082b5b 100%);
}

body.mf-web-theme-v1 .mf514-brand{
  min-height:60px;
  margin-bottom:8px;
  padding:6px 8px 12px;
}

body.mf-web-theme-v1 .mf514-user{
  margin:8px 0 12px;
  padding:9px;
}

body.mf-web-theme-v1 .mf514-menu{
  gap:7px;
}

body.mf-web-theme-v1 .mf514-menu button{
  min-height:50px;
  border-radius:13px;
  background:rgba(255,255,255,.035);
}

body.mf-web-theme-v1 .mf514-menu button:hover{
  background:rgba(255,255,255,.12);
}

body.mf-web-theme-v1 .mf514-menu button.is-active{
  position:relative;
  background:linear-gradient(135deg,#ffd32a 0%,#ffc400 100%);
}

body.mf-web-theme-v1 .mf514-menu button.is-active::before{
  content:"";
  position:absolute;
  left:-10px;
  top:11px;
  bottom:11px;
  width:4px;
  border-radius:0 4px 4px 0;
  background:#fff;
}

/* Map toolbar becomes a real enterprise command bar */
body.mf-web-theme-v1 .mf514-map-toolbar{
  height:68px;
  min-height:68px;
  padding:7px 11px;
  grid-template-columns:132px minmax(390px,1fr) auto;
  background:rgba(255,255,255,.985);
}

body.mf-web-theme-v1 .mf514-routebar{
  height:52px;
  gap:6px;
}

body.mf-web-theme-v1 .mf514-routebar button{
  height:52px;
  min-height:52px;
  border-radius:12px;
  background:#f5f8fc;
}

body.mf-web-theme-v1 .mf514-routebar button.is-active{
  background:#fff7cc;
  box-shadow:inset 0 0 0 1px rgba(255,196,0,.25);
}

body.mf-web-theme-v1 .mf514-routebar button > span{
  width:29px;
  height:29px;
  display:grid;
  place-items:center;
  border-radius:9px;
  background:#fff;
  box-shadow:0 3px 8px rgba(6,31,73,.07);
}

body.mf-web-theme-v1 .mf514-kpis{
  display:flex;
  align-items:center;
  gap:5px;
}

body.mf-web-theme-v1 .mf514-kpis span{
  min-width:56px;
  border-radius:10px;
  box-shadow:0 2px 8px rgba(6,31,73,.04);
}

/* More visible map */
body.mf-web-theme-v1 .mf514-map-wrap,
body.mf-web-theme-v1 #mf514Map{
  height:calc(100vh - 126px);
  min-height:calc(100vh - 126px);
}

/* Google-like map buttons */
body.mf-web-theme-v1 .leaflet-bar a,
body.mf-web-theme-v1 .mf514-locate,
body.mf-web-theme-v1 .mf52-map-fullscreen,
body.mf-web-theme-v1 .mf521-map-quick button{
  width:40px;
  height:40px;
  min-width:40px;
  min-height:40px;
  display:grid;
  place-items:center;
  border-radius:11px!important;
  background:#fff!important;
  color:#003da5!important;
}

body.mf-web-theme-v1 .leaflet-control-zoom{
  display:grid;
  gap:5px;
  background:transparent!important;
  box-shadow:none!important;
  overflow:visible;
}

body.mf-web-theme-v1 .leaflet-control-zoom a{
  border:1px solid var(--mf-web-line)!important;
  box-shadow:0 5px 14px rgba(6,31,73,.11);
}

/* Search radius card */
body.mf-web-theme-v1 .mf532-radius-panel{
  width:min(410px,calc(100% - 32px));
  padding:13px 15px;
  border-radius:16px;
}

body.mf-web-theme-v1 .mf532-radius-head{
  margin-bottom:8px;
}

body.mf-web-theme-v1 .mf532-radius-presets{
  display:grid;
  grid-template-columns:repeat(6,1fr);
  gap:5px;
}

body.mf-web-theme-v1 .mf532-radius-presets button{
  min-height:30px;
  padding:4px;
  font-size:10px;
}

/* Driver results card */
body.mf-web-theme-v1 .mf6192-driver-section{
  margin:12px;
  border-radius:16px;
}

body.mf-web-theme-v1 .mf6192-driver-head{
  min-height:56px;
  padding:10px 14px;
}

body.mf-web-theme-v1 .mf6192-driver-list{
  display:grid;
  gap:8px;
  padding:9px;
}

/* Chat: compact, clear and messenger-like */
body.mf-web-theme-v1 .mf514-chat-pane{
  background:#f7f9fc;
}

body.mf-web-theme-v1 .mf514-chat-head{
  background:
    radial-gradient(circle at 100% 0,rgba(255,196,0,.18),transparent 30%),
    linear-gradient(135deg,#003da5,#062f72);
}

body.mf-web-theme-v1 .mf545-auth-state{
  width:42px!important;
  height:42px!important;
  min-width:42px!important;
  min-height:42px!important;
  border-radius:13px!important;
  color:#082b5b!important;
  background:#fff7d6!important;
  border-color:#ffc400!important;
}

body.mf-web-theme-v1 .mf601-context{
  background:#fff;
  box-shadow:0 3px 12px rgba(6,31,73,.04);
}

body.mf-web-theme-v1 .mf615-role-chat-tabs,
body.mf-web-theme-v1 .mf615-role-tabs,
body.mf-web-theme-v1 [data-mf615-role-tabs]{
  min-height:44px!important;
}

body.mf-web-theme-v1 .mf615-role-chat-tabs button,
body.mf-web-theme-v1 .mf615-role-tabs button,
body.mf-web-theme-v1 [data-mf615-role-tabs] button{
  min-height:44px!important;
  height:44px!important;
  padding:5px 3px!important;
  font-size:10px!important;
}

body.mf-web-theme-v1 .mf514-chat-pane [class*="message-list"],
body.mf-web-theme-v1 .mf514-chat-pane [class*="chat-list"],
body.mf-web-theme-v1 .mf514-chat-pane [data-mf56-messages]{
  background:
    linear-gradient(rgba(247,249,252,.94),rgba(247,249,252,.94)),
    radial-gradient(circle at 20% 15%,rgba(0,61,165,.08),transparent 18%);
}

body.mf-web-theme-v1 .mf514-chat-pane [class*="composer"]{
  padding:9px!important;
  background:#fff;
  box-shadow:0 -5px 16px rgba(6,31,73,.05);
}

body.mf-web-theme-v1 .mf514-chat-pane textarea,
body.mf-web-theme-v1 .mf514-chat-pane input[type="text"]{
  min-height:42px;
  background:#f4f7fb;
}

/* Better empty/error states without adding fake data */
body.mf-web-theme-v1 .mf514-chat-pane [class*="empty"],
body.mf-web-theme-v1 .mf514-chat-pane [class*="error"],
body.mf-web-theme-v1 .mf6192-driver-empty{
  color:#64748b;
  font-size:12px;
  line-height:1.55;
  text-align:center;
}

/* Scrollbars */
body.mf-web-theme-v1 .mf514-sidebar::-webkit-scrollbar,
body.mf-web-theme-v1 .mf514-map-pane::-webkit-scrollbar,
body.mf-web-theme-v1 .mf514-chat-pane::-webkit-scrollbar{
  width:7px;
  height:7px;
}

body.mf-web-theme-v1 .mf514-sidebar::-webkit-scrollbar-thumb{
  background:rgba(255,255,255,.22);
  border-radius:999px;
}

body.mf-web-theme-v1 .mf514-map-pane::-webkit-scrollbar-thumb,
body.mf-web-theme-v1 .mf514-chat-pane::-webkit-scrollbar-thumb{
  background:#c8d5e6;
  border-radius:999px;
}

/* Medium desktop */
@media (max-width:1360px){
  body.mf-web-theme-v1 .mf514-grid{
    grid-template-columns:208px minmax(500px,1fr) 350px;
  }

  body.mf-web-theme-v1 .mf514-map-toolbar{
    grid-template-columns:112px minmax(360px,1fr);
  }

  body.mf-web-theme-v1 .mf514-kpis{
    display:none;
  }
}

/* Narrow web window: preserve WEB shell, do not become Mini */
@media (max-width:1080px){
  body.mf-web-theme-v1 .mf514-grid{
    grid-template-columns:76px minmax(460px,1fr) 330px;
  }

  body.mf-web-theme-v1 .mf514-map-toolbar{
    grid-template-columns:1fr;
    height:auto;
    min-height:64px;
  }

  body.mf-web-theme-v1 .mf534-map-title{
    display:none;
  }

  body.mf-web-theme-v1 .mf514-map-wrap,
  body.mf-web-theme-v1 #mf514Map{
    height:calc(100vh - 122px);
    min-height:calc(100vh - 122px);
  }
}

