/* =========================================================
   MISTER FAST ENTERPRISE THEME V1.0
   Shared tokens and portal adapters
   Brand: Royal Blue #003DA5 / Yellow Gold #FFC400 / White
   ========================================================= */

:root{
  --mf-blue:#003DA5;
  --mf-blue-700:#002C78;
  --mf-blue-900:#071B3A;
  --mf-yellow:#FFC400;
  --mf-yellow-700:#D49A00;
  --mf-white:#FFFFFF;
  --mf-bg:#F3F7FC;
  --mf-surface:#FFFFFF;
  --mf-surface-soft:#F8FAFD;
  --mf-line:#D8E3F0;
  --mf-text:#0A2348;
  --mf-muted:#6B7E99;
  --mf-success:#12A875;
  --mf-danger:#D92D20;
  --mf-warning:#A86F00;
  --mf-shadow:0 14px 35px rgba(0,45,115,.09);
  --mf-shadow-soft:0 7px 20px rgba(0,45,115,.06);
  --mf-radius-sm:10px;
  --mf-radius:16px;
  --mf-radius-lg:22px;
  --mf-sidebar-width:258px;
  --mf-font:"Prompt","Kanit","Noto Sans Thai",Tahoma,Arial,sans-serif;
}

*{box-sizing:border-box}
html{color-scheme:light}
body.mf-enterprise-theme,
body.mf-enterprise-theme *{
  font-family:var(--mf-font);
}
body.mf-enterprise-theme{
  margin:0;
  background:var(--mf-bg);
  color:var(--mf-text);
  accent-color:var(--mf-blue);
}

/* Typography */
body.mf-enterprise-theme h1,
body.mf-enterprise-theme h2,
body.mf-enterprise-theme h3,
body.mf-enterprise-theme h4{
  color:var(--mf-text);
  letter-spacing:-.02em;
}
body.mf-enterprise-theme small{color:var(--mf-muted)}
body.mf-enterprise-theme a{transition:.18s ease}
body.mf-enterprise-theme button,
body.mf-enterprise-theme input,
body.mf-enterprise-theme select,
body.mf-enterprise-theme textarea{font:inherit}

/* Shared buttons */
.mf-btn,
body.mf-enterprise-theme button.mf-btn,
body.mf-enterprise-theme a.mf-btn{
  min-height:42px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:8px;
  padding:10px 16px;
  border:1px solid transparent;
  border-radius:12px;
  text-decoration:none;
  font-weight:800;
  cursor:pointer;
}
.mf-btn-primary{background:var(--mf-blue);color:#fff}
.mf-btn-primary:hover{background:var(--mf-blue-700)}
.mf-btn-yellow{background:var(--mf-yellow);color:var(--mf-blue-900)}
.mf-btn-yellow:hover{filter:brightness(1.04)}
.mf-btn-ghost{background:#fff;color:var(--mf-blue);border-color:var(--mf-line)}
.mf-btn-danger{background:var(--mf-danger);color:#fff}

/* Shared cards / panels / KPIs */
.mf-card,
.mf-panel,
.mfc-panel,
.mfc-booking-panel,
.mfdrv-card,
body.mf-enterprise-theme section.panel,
body.mf-enterprise-theme .card.section{
  background:var(--mf-surface);
  border:1px solid var(--mf-line);
  border-radius:var(--mf-radius-lg);
  box-shadow:var(--mf-shadow-soft);
}
.mf-kpi,
.mfc-kpis article,
.mf-kpis article,
.mfdrv-kpi,
body.mf-enterprise-theme section.kpis article{
  background:var(--mf-surface);
  border:1px solid var(--mf-line);
  border-radius:18px;
  box-shadow:var(--mf-shadow-soft);
}
.mfc-kpis article b,
.mf-kpis article b,
.mfdrv-kpi b,
body.mf-enterprise-theme section.kpis article b{
  color:var(--mf-blue);
}

/* Shared table */
body.mf-enterprise-theme table{
  width:100%;
  border-collapse:collapse;
}
body.mf-enterprise-theme th{
  color:var(--mf-text);
  background:#F5F8FC;
  font-weight:800;
  text-align:left;
}
body.mf-enterprise-theme th,
body.mf-enterprise-theme td{
  padding:13px 12px;
  border-bottom:1px solid var(--mf-line);
  vertical-align:top;
}
body.mf-enterprise-theme tbody tr:hover{background:#F8FBFF}

/* Shared inputs */
body.mf-enterprise-theme input:not([type="checkbox"]):not([type="radio"]),
body.mf-enterprise-theme select,
body.mf-enterprise-theme textarea{
  border:1px solid #C7D8EE;
  border-radius:12px;
  background:#fff;
  color:var(--mf-text);
  outline:none;
}
body.mf-enterprise-theme input:focus,
body.mf-enterprise-theme select:focus,
body.mf-enterprise-theme textarea:focus{
  border-color:var(--mf-blue);
  box-shadow:0 0 0 3px rgba(0,61,165,.12);
}

/* Shared status chips */
.mf-status-chip,
.status,
.tag{
  display:inline-flex;
  align-items:center;
  gap:6px;
  padding:6px 10px;
  border-radius:999px;
  font-size:12px;
  font-weight:800;
}
.mf-status-chip.is-online,
.mf-status.approved,
.status.approve{background:#E7F8F1;color:#087653}
.mf-status-chip.is-pending,
.mf-status.pending,
.status.pending{background:#FFF3C4;color:#805B00}
.mf-status-chip.is-danger,
.status.suspend{background:#FDECEC;color:#A11F17}

/* =========================================================
   Sidebar adapters
   ========================================================= */
body.mf-enterprise-theme aside,
body.mf-enterprise-theme .mf-sidebar,
body.mf-enterprise-theme .mfdrv-sidebar,
body.mf-enterprise-theme .mf514-sidebar{
  background:linear-gradient(180deg,var(--mf-blue-700),var(--mf-blue-900));
  color:#fff;
}
body.mf-enterprise-theme aside .brand,
body.mf-enterprise-theme .mf-brand,
body.mf-enterprise-theme .mfdrv-brand,
body.mf-enterprise-theme .mf514-brand{
  color:#fff;
}
body.mf-enterprise-theme aside nav a,
body.mf-enterprise-theme .mf-sidebar nav a,
body.mf-enterprise-theme .mfdrv-nav a,
body.mf-enterprise-theme .mf514-menu>a,
body.mf-enterprise-theme .mf514-menu>button{
  color:#fff;
}
body.mf-enterprise-theme aside nav a:hover,
body.mf-enterprise-theme aside nav a.active,
body.mf-enterprise-theme .mf-sidebar nav a:hover,
body.mf-enterprise-theme .mf-sidebar nav a.active,
body.mf-enterprise-theme .mfdrv-nav a:hover,
body.mf-enterprise-theme .mfdrv-nav a.is-active,
body.mf-enterprise-theme .mf514-menu>button:hover,
body.mf-enterprise-theme .mf514-menu>button.is-active{
  background:var(--mf-yellow);
  color:var(--mf-blue-900);
}

/* =========================================================
   Admin portal
   ========================================================= */
body.mf-enterprise-theme.mf-portal-admin{
  min-height:100vh;
}
body.mf-enterprise-theme.mf-portal-admin main{
  background:var(--mf-bg);
}
body.mf-enterprise-theme.mf-portal-admin header h1{color:var(--mf-blue-900)}
body.mf-enterprise-theme.mf-portal-admin .panel-head>div>small{
  color:var(--mf-yellow-700);
  font-weight:900;
}

/* =========================================================
   Customer portal
   ========================================================= */
body.mf-enterprise-theme.mf-portal-customer .mfc-topbar{
  border-bottom-color:var(--mf-line);
  box-shadow:0 5px 18px rgba(0,45,115,.04);
}
body.mf-enterprise-theme.mf-portal-customer .mfc-hero{
  background:linear-gradient(135deg,var(--mf-blue),var(--mf-blue-900));
}
body.mf-enterprise-theme.mf-portal-customer .mfc-brand span{
  background:var(--mf-blue);
  color:var(--mf-yellow);
}
body.mf-enterprise-theme.mf-portal-customer .mfc-actions a.primary,
body.mf-enterprise-theme.mf-portal-customer .mfc-request-card footer a.primary{
  background:var(--mf-yellow);
  color:var(--mf-blue-900);
}

/* =========================================================
   Driver portal
   ========================================================= */
body.mf-enterprise-theme.mf-portal-driver .mfdrv-topbar{
  background:#fff;
  border-bottom:1px solid var(--mf-line);
}
body.mf-enterprise-theme.mf-portal-driver .mfdrv-live-badge i,
body.mf-enterprise-theme.mf-portal-driver .mfdrv-online i{
  background:var(--mf-success);
}
body.mf-enterprise-theme.mf-portal-driver .mfdrv-top-actions a{
  background:var(--mf-yellow);
  color:var(--mf-blue-900);
  border-radius:11px;
  text-decoration:none;
  font-weight:800;
}

/* =========================================================
   Drop Point portal
   ========================================================= */
body.mf-enterprise-theme.mf-portal-drop-point .mf-topbar{
  background:#fff;
  border-bottom:1px solid var(--mf-line);
}
body.mf-enterprise-theme.mf-portal-drop-point .mf-panel-head small{
  color:var(--mf-yellow-700);
  font-weight:900;
}

/* =========================================================
   Developer portal
   ========================================================= */
body.mf-enterprise-theme.mf-portal-developer{
  background:var(--mf-bg);
}
body.mf-enterprise-theme.mf-portal-developer .wrap{
  width:min(1240px,calc(100% - 32px));
  margin:24px auto 60px;
}
body.mf-enterprise-theme.mf-portal-developer .top{
  padding:26px;
  border-radius:var(--mf-radius-lg);
  background:linear-gradient(135deg,var(--mf-blue),var(--mf-blue-900));
  color:#fff;
  box-shadow:var(--mf-shadow);
}
body.mf-enterprise-theme.mf-portal-developer .top h1,
body.mf-enterprise-theme.mf-portal-developer .top p{color:#fff}
body.mf-enterprise-theme.mf-portal-developer .top .btn-yellow{
  background:var(--mf-yellow);
  color:var(--mf-blue-900);
}
body.mf-enterprise-theme.mf-portal-developer .top .btn-dark{
  background:#fff;
  color:var(--mf-blue);
}
body.mf-enterprise-theme.mf-portal-developer .top .btn-red{
  background:var(--mf-danger);
  color:#fff;
}

/* =========================================================
   LiveMapChat WEB adapter
   No layout dimensions are changed here.
   ========================================================= */
body.mf-enterprise-theme.mf-portal-livemapchat .mf514-window{
  background:var(--mf-bg);
}
body.mf-enterprise-theme.mf-portal-livemapchat .mf514-chat-pane,
body.mf-enterprise-theme.mf-portal-livemapchat .mf514-map-toolbar{
  background:#fff;
}
body.mf-enterprise-theme.mf-portal-livemapchat .mf602-mode.is-active,
body.mf-enterprise-theme.mf-portal-livemapchat .mf514-send{
  background:var(--mf-blue);
  color:#fff;
}
body.mf-enterprise-theme.mf-portal-livemapchat .mf3243-sidebar-auth.is-login{
  background:var(--mf-yellow);
  color:var(--mf-blue-900);
}

/* =========================================================
   Responsive
   ========================================================= */
@media(max-width:900px){
  :root{--mf-sidebar-width:220px}
}
@media(max-width:640px){
  body.mf-enterprise-theme .mf-card,
  body.mf-enterprise-theme .mf-panel,
  body.mf-enterprise-theme section.panel,
  body.mf-enterprise-theme .card.section{
    border-radius:16px;
  }
}
