html,
body {
  background: #030814 !important;
  margin: 0;
  padding: 0;
  font-family: "Segoe UI", Arial, sans-serif;
}

body {
  background:
    radial-gradient(circle at 18% 18%, rgba(36, 99, 235, 0.18), transparent 32%),
    radial-gradient(circle at 82% 22%, rgba(255, 40, 100, 0.14), transparent 28%),
    radial-gradient(circle at 50% 85%, rgba(0, 190, 255, 0.10), transparent 30%),
    linear-gradient(180deg, #040914 0%, #020611 100%) !important;
  background-attachment: fixed;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image: radial-gradient(rgba(255,255,255,.18) 1px, transparent 1px);
  background-size: 3px 3px;
  opacity: .05;
  z-index: 0;
}

.c-app,
.c-body,
.c-wrapper,
.c-main,
.mst-main-shell {
  background: transparent !important;
}

.c-app,
.c-body,
.c-wrapper {
  position: relative;
}

.c-wrapper {
  margin-left: 258px;
  transition: margin-left .22s ease;
}

/* SIDEBAR */
.c-sidebar {
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  width: 258px !important;
  flex: 0 0 258px !important;
  background:
    radial-gradient(circle at 0% 20%, rgba(0,120,255,0.14), transparent 35%),
    radial-gradient(circle at 100% 0%, rgba(255,48,110,0.10), transparent 28%),
    linear-gradient(180deg, #07101c 0%, #040b15 100%) !important;
  border-right: 1px solid rgba(255,255,255,.06) !important;
  box-shadow:
    inset -1px 0 0 rgba(255,255,255,.03),
    12px 0 36px rgba(0,0,0,.22),
    0 0 24px rgba(0,120,255,.05) !important;
  z-index: 1030;
  transition: transform .22s ease;
  overflow: visible !important;
}

.c-sidebar::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(rgba(255,255,255,.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.02) 1px, transparent 1px);
  background-size: 120px 120px;
  opacity: .08;
}

.c-sidebar::after {
  content: "";
  position: absolute;
  top: 0;
  right: -18px;
  width: 40px;
  height: 100%;
  pointer-events: none;
  background: linear-gradient(90deg, rgba(0,110,255,.10), transparent 70%);
  filter: blur(16px);
  opacity: .8;
}

.c-sidebar .c-sidebar-brand {
  min-height: 82px !important;
  border-bottom: 1px solid rgba(255,255,255,.06) !important;
  background: rgba(255,255,255,.01) !important;
  box-shadow: 0 12px 24px rgba(0,0,0,.12);
}

.mst-sidebar-brand-wrap {
  height: 82px !important;
  padding: 18px 20px !important;
  display: flex;
  align-items: center;
  justify-content: flex-start;
}

.mst-sidebar-logo {
  max-width: 166px !important;
  height: auto;
}

.c-sidebar .c-sidebar-nav {
  padding-top: 12px !important;
  display: flex;
  flex-direction: column;
  min-height: calc(100vh - 82px);
}

.c-sidebar .mst-nav-bottom {
  margin-top: auto;
}

.c-sidebar .c-sidebar-nav-link {
  min-height: 46px !important;
  padding: 10px 15px !important;
  margin: 3px 10px !important;
  border-radius: 13px !important;
  color: #dbe7f5 !important;
  font-size: 14px !important;
  font-weight: 500 !important;
  line-height: 1.2 !important;
  transition: all .18s ease !important;
}

.c-sidebar .c-sidebar-nav-icon {
  color: #7dd3fc !important;
  font-size: 16px !important;
  margin-right: 12px !important;
  width: 18px !important;
  text-align: center;
}

.c-sidebar .c-sidebar-nav-link:hover {
  background: rgba(255,255,255,.04) !important;
  box-shadow: 0 0 12px rgba(0,140,255,.07);
  color: #fff !important;
}

.c-sidebar .c-sidebar-nav-link.c-active {
  background: linear-gradient(90deg, rgba(255,48,110,0.20), rgba(0,120,255,0.08)) !important;
  box-shadow:
    inset 2px 0 0 rgba(255,70,120,0.95),
    0 0 12px rgba(255,60,120,0.09),
    0 0 14px rgba(0,120,255,0.04) !important;
  color: #fff !important;
}

.c-sidebar .c-sidebar-nav-link.c-active .c-sidebar-nav-icon {
  color: #a5ecff !important;
  filter: drop-shadow(0 0 8px rgba(125,211,252,.34));
}

/* QUICK INVOICE SUBMENU */
.c-sidebar .mst-nav-group > .c-sidebar-nav-link {
  position: relative;
}

.c-sidebar .mst-nav-caret {
  margin-left: auto;
  font-size: 11px;
  color: rgba(155, 176, 204, 0.95);
  transition: transform .20s ease, color .18s ease;
}

.c-sidebar .mst-nav-group.mst-nav-group-open .mst-nav-caret {
  transform: rotate(180deg);
  color: #a5ecff;
}

.c-sidebar .mst-nav-submenu {
  list-style: none;
  margin: 2px 12px 6px 22px;
  padding: 0 0 0 10px;
  border-left: 1px solid rgba(255, 255, 255, 0.12);
  max-height: 0;
  overflow: hidden;
  transition: max-height .24s ease;
}

.c-sidebar .mst-nav-group.mst-nav-group-open .mst-nav-submenu {
  max-height: 520px;
}

.c-sidebar .mst-nav-submenu .c-sidebar-nav-link {
  min-height: 36px !important;
  padding: 8px 10px !important;
  margin: 3px 0 3px 5px !important;
  border-radius: 10px !important;
  font-size: 13px !important;
}

.c-sidebar .mst-nav-submenu .c-sidebar-nav-icon {
  font-size: 13px !important;
  width: 16px !important;
  margin-right: 9px !important;
}

.c-sidebar .mst-nav-submenu .c-sidebar-nav-link:hover {
  background: rgba(255, 255, 255, 0.05) !important;
}

.c-sidebar .mst-nav-submenu .c-sidebar-nav-link.c-active {
  background: linear-gradient(90deg, rgba(255, 49, 112, 0.18), rgba(0, 120, 255, 0.08)) !important;
  box-shadow:
    inset 2px 0 0 rgba(255, 70, 120, 0.92),
    0 0 12px rgba(255, 60, 120, 0.10) !important;
}

/* HAMBURGER */
.mst-hamburger {
  background: transparent;
  border: 0;
  color: #e5eefb;
  font-size: 26px !important;
  cursor: pointer;
  padding: 0 4px;
  margin-right: 6px;
}

body.mst-sidebar-collapsed .c-sidebar {
  transform: translateX(-258px) !important;
}

body.mst-sidebar-collapsed .c-wrapper {
  margin-left: 0 !important;
}

/* TOPBAR */
.mst-topbar {
  position: relative;
  display: flex;
  align-items: center;
  gap: 16px;
  min-height: 86px !important;
  padding: 0 26px !important;
  background: linear-gradient(90deg, rgba(6,14,26,0.92), rgba(5,12,24,0.88)) !important;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(255,255,255,.05) !important;
  box-shadow:
    inset 0 -1px 0 rgba(255,255,255,.03),
    0 8px 22px rgba(0,0,0,.18) !important;
  overflow: visible !important;
}

.mst-topbar::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(90,180,255,.28), transparent);
  pointer-events: none;
}

.mst-topbar::before {
  content: "";
  position: absolute;
  left: 18px;
  right: 18px;
  bottom: -18px;
  height: 38px;
  pointer-events: none;
  background:
    radial-gradient(circle at 18% 50%, rgba(90,180,255,.22), transparent 18%),
    radial-gradient(circle at 52% 50%, rgba(120,140,255,.16), transparent 20%),
    radial-gradient(circle at 82% 50%, rgba(255,60,120,.16), transparent 18%);
  filter: blur(18px);
  opacity: .95;
}

.mst-topbar-title {
  color: #f8fbff;
  font-size: 22px !important;
  font-weight: 600 !important;
  letter-spacing: .1px;
}

.mst-topbar-logo {
  display: flex;
  align-items: center;
  flex-shrink: 0;
}

.mst-topbar-logo-img {
  height: 38px;
  width: auto;
  display: block;
  object-fit: contain;
}

@media (min-width: 992px) {
  body:not(.mst-sidebar-collapsed) .mst-topbar-logo {
    display: none;
  }

  body.mst-sidebar-collapsed .mst-topbar-logo {
    display: flex;
  }
}

.mst-topbar-spacer {
  flex: 1;
}

.mst-topbar-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.mst-topbar-user,
.mst-topbar-logout {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 50px !important;
  padding: 0 18px !important;
  font-size: 16px !important;
  border-radius: 16px !important;
  border: 1px solid rgba(255,255,255,.06);
  background: rgba(255,255,255,.025);
  color: #dbe7f5 !important;
  text-decoration: none !important;
}

.mst-topbar-avatar {
  width: 34px !important;
  height: 34px !important;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(255,43,71,.55);
  color: #f8fbff;
  font-size: 15px !important;
  font-weight: 700;
}

.mst-topbar-caret {
  font-size: 12px;
  color: #94a3b8;
}

/* MAIN */
.mst-main-shell {
  padding: 22px 24px 30px !important;
}

.mst-page-shell {
  min-height: calc(100vh - 140px);
  border-radius: 28px;
  background:
    radial-gradient(circle at 30% 0%, rgba(52,104,255,.10), transparent 24%),
    radial-gradient(circle at 82% 20%, rgba(255,40,100,.08), transparent 22%),
    rgba(6,12,24,.62) !important;
  border: 1px solid rgba(255,255,255,.05);
  box-shadow:
    0 18px 46px rgba(0,0,0,.22),
    0 0 22px rgba(0,120,255,.035) !important;
  position: relative;
  overflow: hidden;
  padding: 30px;
}

.mst-page-shell::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(rgba(255,255,255,.02) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.015) 1px, transparent 1px);
  background-size: 120px 120px;
  opacity: .10;
}

/* MOBILE */
@media (max-width: 991px) {
  .mst-topbar-logo {
    display: flex;
    visibility: visible;
  }

  body.mst-mobile-sidebar-open .mst-topbar-logo {
    display: none;
  }

  #sidebar.c-sidebar,
  .c-sidebar {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    bottom: 0 !important;
    width: 268px !important;
    min-width: 268px !important;
    max-width: 268px !important;
    height: 100vh !important;
    margin-left: 0 !important;
    transform: translateX(-268px) !important;
    transition: transform .30s ease !important;
    z-index: 10050 !important;
    display: block !important;
  }

  body.mst-mobile-sidebar-open #sidebar.c-sidebar,
  body.mst-mobile-sidebar-open .c-sidebar {
    transform: translateX(0) !important;
  }

  .c-wrapper,
  .c-sidebar + .c-wrapper,
  body .c-wrapper {
    margin-left: 0 !important;
    left: 0 !important;
    width: 100% !important;
  }

  body.mst-mobile-sidebar-open::after {
    content: "";
    position: fixed;
    inset: 0;
    background: rgba(2, 6, 17, 0.68);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    z-index: 10040;
  }

  .mst-topbar {
    min-height: 70px !important;
    padding: 0 14px !important;
  }

  .mst-topbar-user {
    display: none !important;
  }

  .mst-main-shell {
    padding: 14px !important;
  }

  .c-sidebar .mst-nav-submenu {
    margin-right: 10px;
  }

  .c-sidebar .mst-nav-submenu .c-sidebar-nav-link {
    min-height: 36px !important;
    font-size: 13px !important;
  }

  .mst-page-shell {
    padding: 18px;
    min-height: calc(100vh - 110px);
  }

  .mst-sidebar-logo {
    max-width: 144px !important;
  }
}

@media (max-width: 767.98px) {
  .mst-topbar-title {
    font-size: 18px !important;
  }

  .mst-topbar-logout {
    min-height: 42px !important;
    padding: 0 12px !important;
    font-size: 14px !important;
  }

  .mst-topbar-avatar {
    width: 28px !important;
    height: 28px !important;
    font-size: 13px !important;
  }

  .mst-page-shell {
    border-radius: 22px;
    padding: 16px;
  }
}

/* LOGIN PAGE */
.mst-login-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 32px;
  background:
    radial-gradient(circle at 20% 20%, rgba(255, 42, 88, 0.16), transparent 40%),
    radial-gradient(circle at 80% 25%, rgba(0, 190, 255, 0.14), transparent 42%),
    radial-gradient(circle at 50% 80%, rgba(90, 180, 255, 0.10), transparent 35%),
    linear-gradient(180deg, #020514 0%, #040a12 100%);
}

.mst-login-shell {
  width: min(460px, 100%);
  padding: 18px;
}

.mst-login-card {
  border-radius: 24px;
  padding: 30px 28px;
  background: rgba(15, 20, 38, 0.72);
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.35), 0 2px 18px rgba(0, 120, 255, 0.18);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

.mst-login-brand {
  display: flex;
  justify-content: center;
  margin-bottom: 22px;
}

.mst-login-logo {
  max-width: 170px;
  height: auto;
}

.mst-login-header {
  text-align: center;
  margin-bottom: 26px;
}

.mst-login-header h1 {
  margin: 0 0 12px;
  font-size: 26px;
  font-weight: 700;
  color: #f6f9ff;
  letter-spacing: 0.2px;
}

.mst-login-header p {
  margin: 0;
  color: rgba(235, 245, 255, 0.75);
  font-size: 15px;
}

.mst-login-form {
  display: grid;
  gap: 18px;
}

.mst-form-label {
  display: flex;
  flex-direction: column;
  gap: 8px;
  color: rgba(235, 245, 255, 0.80);
  font-size: 14px;
  font-weight: 500;
}

.mst-form-label input {
  height: 52px;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(8, 14, 29, 0.70);
  padding: 0 16px;
  color: #f5f9ff;
  font-size: 15px;
  outline: none;
  transition: border-color 0.18s ease, box-shadow 0.18s ease;
}

.mst-form-label input:focus {
  border-color: rgba(255, 44, 100, 0.75);
  box-shadow: 0 0 0 4px rgba(255, 44, 100, 0.16);
}

.mst-form-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.mst-form-checkbox {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: rgba(235, 245, 255, 0.78);
  font-size: 14px;
}

.mst-form-checkbox input {
  width: 16px;
  height: 16px;
  accent-color: #ff2c64;
}

.mst-form-forgot {
  font-size: 14px;
  color: rgba(255, 255, 255, 0.75);
  text-decoration: none;
  transition: color 0.18s ease;
}

.mst-form-forgot:hover {
  color: rgba(255, 255, 255, 0.95);
}

.mst-btn {
  width: 100%;
  display: inline-flex;
  justify-content: center;
  align-items: center;
  gap: 10px;
  padding: 16px 18px;
  border-radius: 16px;
  font-size: 16px;
  font-weight: 700;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.mst-btn-primary {
  background: linear-gradient(90deg, rgba(255, 49, 112, 0.90), rgba(255, 179, 82, 0.82));
  color: #040a17;
  box-shadow: 0 14px 28px rgba(255, 60, 110, 0.25);
}

.mst-btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 18px 40px rgba(255, 60, 110, 0.35);
}

@media (max-width: 480px) {
  .mst-login-card {
    padding: 24px 18px;
  }

  .mst-login-header h1 {
    font-size: 22px;
  }
}

/* =============================================
   SECTION TITLE BAR
   ============================================= */
.mst-page-title-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 20px;
}

.mst-page-title-bar--inner {
  margin-top: 28px;
}

.mst-section-title {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0;
  color: #f6f9ff;
  font-size: 20px;
  font-weight: 700;
  letter-spacing: 0.3px;
}

.mst-section-title-icon {
  color: #7dd3fc;
  font-size: 18px;
  filter: drop-shadow(0 0 6px rgba(125,211,252,.35));
}

.mst-title-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

/* =============================================
   CARD COMPONENT
   ============================================= */
.mst-card {
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 16px;
  margin-bottom: 20px;
  background: rgba(8, 14, 29, 0.50);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  overflow: hidden;
}

.mst-card-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 20px;
  background: rgba(255, 255, 255, 0.03);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  border-left: 3px solid rgba(0, 140, 255, 0.65);
  color: #dbe7f5;
  font-size: 14px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.6px;
}

.mst-card-header i {
  color: #7dd3fc;
  font-size: 15px;
}

.mst-card-body {
  padding: 20px;
}

/* =============================================
   FORM GRID SYSTEM
   ============================================= */
.mst-form-grid {
  display: grid;
  gap: 16px;
}

.mst-form-grid-1 { grid-template-columns: 1fr; }
.mst-form-grid-2 { grid-template-columns: repeat(2, 1fr); }
.mst-form-grid-3 { grid-template-columns: repeat(3, 1fr); }
.mst-form-grid-4 { grid-template-columns: repeat(3, 1fr); }

/* Full-width override inside any grid */
.mst-col-full {
  grid-column: 1 / -1;
}

/* =============================================
   FORM LABELS & INPUTS (shared)
   ============================================= */
/* =============================================
   PAYEE FORM
   ============================================= */

/* =============================================
   BUTTON SYSTEM
   ============================================= */
.mst-btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 11px 20px;
  border-radius: 12px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  border: 1px solid transparent;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
  background: linear-gradient(90deg, rgba(255, 49, 112, 0.90), rgba(255, 179, 82, 0.82));
  color: #040a17;
  box-shadow: 0 6px 18px rgba(255, 60, 110, 0.22);
  min-height: 44px;
}

.mst-btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 26px rgba(255, 60, 110, 0.34);
}

.mst-btn-secondary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 11px 20px;
  border-radius: 12px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  border: 1px solid rgba(0, 140, 255, 0.50);
  background: rgba(0, 120, 255, 0.12);
  color: #7dd3fc;
  transition: background 0.15s ease, border-color 0.15s ease;
  min-height: 44px;
}

.mst-btn-secondary:hover {
  background: rgba(0, 120, 255, 0.22);
  border-color: rgba(0, 140, 255, 0.75);
}

.mst-btn-danger-outline {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 11px 20px;
  border-radius: 12px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  border: 1px solid rgba(220, 50, 50, 0.50);
  background: rgba(220, 50, 50, 0.08);
  color: #f87171;
  transition: background 0.15s ease, border-color 0.15s ease;
  min-height: 44px;
}

.mst-btn-danger-outline:hover {
  background: rgba(220, 50, 50, 0.18);
  border-color: rgba(220, 50, 50, 0.75);
}

.mst-btn-danger-sm {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 10px;
  font-size: 14px;
  cursor: pointer;
  border: 1px solid rgba(220, 50, 50, 0.45);
  background: rgba(220, 50, 50, 0.12);
  color: #f87171;
  transition: background 0.15s ease;
  padding: 0;
}

.mst-btn-danger-sm:hover {
  background: rgba(220, 50, 50, 0.28);
}

/* =============================================
   SELECT – DARK THEME FIX
   ============================================= */
select {
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%237dd3fc' d='M1 1l5 5 5-5'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  background-size: 12px 8px;
  padding-right: 34px !important;
  cursor: pointer;
}

/* =============================================
   VEHICLE CARD
   ============================================= */
.mst-vehicle-card-header {
  justify-content: space-between;
}

.mst-vehicle-header-left {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 15px;
  font-weight: 700;
  color: #f6f9ff;
}

.mst-vehicle-header-left i {
  color: #7dd3fc;
}

.mst-vehicle-groups {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 20px;
}

.mst-vehicle-group {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.mst-vehicle-group-title {
  color: #94a3b8;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  padding-bottom: 6px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
}

.mst-vehicle-group-title i {
  color: #7dd3fc;
}

/* =============================================
   TEAMS ROW
   ============================================= */
.mst-team-row {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 16px;
  margin-bottom: 12px;
  background: rgba(8, 14, 29, 0.50);
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.mst-team-row-number {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 36px;
  padding-top: 36px;
}

.row-number {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 8px;
  background: rgba(0, 120, 255, 0.18);
  border: 1px solid rgba(0, 140, 255, 0.30);
  color: #7dd3fc;
  font-size: 13px;
  font-weight: 700;
}

.mst-team-row-fields {
  flex: 1;
  min-width: 0;
}

.mst-team-row-action {
  display: flex;
  align-items: center;
  padding-top: 34px;
}

.mst-team-row textarea.notes {
  height: 62px;
  resize: vertical;
  padding-top: 10px;
  padding-bottom: 10px;
}

/* =============================================
   RESPONSIVE – TABLET (≤ 900px)
   ============================================= */
@media (max-width: 900px) {
  .mst-form-grid-3 {
    grid-template-columns: repeat(2, 1fr);
  }

  .mst-form-grid-4 {
    grid-template-columns: repeat(2, 1fr);
  }

  .mst-vehicle-groups {
    grid-template-columns: 1fr 1fr;
  }

  .mst-vehicle-groups .mst-vehicle-group:first-child {
    grid-column: 1 / -1;
  }
}

/* =============================================
   RESPONSIVE – MOBILE (≤ 600px)
   ============================================= */
@media (max-width: 600px) {
  .mst-form-grid-2,
  .mst-form-grid-3,
  .mst-form-grid-4 {
    grid-template-columns: 1fr;
  }

  .mst-vehicle-groups {
    grid-template-columns: 1fr;
  }

  .mst-vehicle-groups .mst-vehicle-group:first-child {
    grid-column: 1;
  }

  .mst-team-row {
    flex-wrap: wrap;
  }

  .mst-team-row-number {
    padding-top: 0;
    align-items: flex-start;
    min-width: auto;
  }

  .mst-team-row-action {
    padding-top: 0;
    width: 100%;
    justify-content: flex-end;
  }

  .mst-page-title-bar {
    flex-direction: column;
    align-items: flex-start;
  }

  .mst-title-actions {
    width: 100%;
  }

  .mst-btn-primary,
  .mst-btn-secondary,
  .mst-btn-danger-outline {
    width: 100%;
    justify-content: center;
  }

  .mst-card-body {
    padding: 14px;
  }
}

/* PAYEE FORM – heading kept for any legacy reference */

/* FACTORING FORM */
.mst-factoring-form {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.mst-factoring-card {
  margin-bottom: 0;
}

.mst-factoring-settings-grid,
.mst-factoring-reserve-grid {
  align-items: end;
}

.mst-factoring-key-field input {
  border-color: rgba(0, 190, 255, 0.28);
  background: rgba(0, 190, 255, 0.08);
  color: #a5ecff;
  font-weight: 700;
}

.mst-input-suffix-wrap {
  position: relative;
}

.mst-input-suffix-wrap input {
  padding-right: 38px;
}

.mst-input-suffix {
  position: absolute;
  top: 50%;
  right: 12px;
  transform: translateY(-50%);
  color: #94a3b8;
  font-size: 13px;
  font-weight: 700;
  pointer-events: none;
}

/* TEAM FORM – heading and actions replaced by mst-page-title-bar system */

/* ORDERS FORM – heading replaced by mst-page-title-bar system */

/* =============================================
   ORDER BLOCK
   ============================================= */
.mst-order-block {
  margin-bottom: 28px;
}

.mst-order-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  padding: 16px 20px;
  margin-bottom: 16px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 14px;
  border-left: 4px solid rgba(255, 49, 112, 0.70);
}

.mst-order-header-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.mst-order-header-icon {
  color: #fb7185;
  font-size: 18px;
  filter: drop-shadow(0 0 6px rgba(255,49,112,.30));
}

.mst-order-title {
  margin: 0;
  color: #f6f9ff;
  font-size: 18px;
  font-weight: 700;
}

/* =============================================
   CARD HEADER SPLIT (left label + right button)
   ============================================= */
.mst-card-header-split {
  justify-content: space-between;
}

.mst-card-header-left {
  display: flex;
  align-items: center;
  gap: 10px;
}

/* =============================================
   BUTTON SIZE MODIFIER
   ============================================= */
.mst-btn-sm {
  padding: 8px 14px !important;
  font-size: 13px !important;
  min-height: 36px !important;
  border-radius: 10px !important;
}

/* =============================================
   ROUTE SECTION
   ============================================= */
.mst-order-route-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-bottom: 20px;
}

.mst-route-col {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.mst-route-col-title {
  color: #94a3b8;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  padding-bottom: 8px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
}

.mst-route-col-title i {
  color: #7dd3fc;
}

.origin,
.destination {
  width: 100%;
  height: 46px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(8, 14, 29, 0.70);
  padding: 0 14px;
  color: #f5f9ff;
  font-size: 14px;
  outline: none;
  transition: border-color 0.18s ease, box-shadow 0.18s ease;
  box-sizing: border-box;
}

.origin:focus,
.destination:focus {
  border-color: rgba(255, 44, 100, 0.75);
  box-shadow: 0 0 0 3px rgba(255, 44, 100, 0.16);
}

.mst-route-stats {
  display: flex;
  align-items: flex-end;
  gap: 16px;
  flex-wrap: wrap;
}

.mst-route-stats .mst-form-label {
  flex: 1;
  min-width: 120px;
}

.mst-route-miles-action {
  display: flex;
  align-items: flex-end;
  padding-bottom: 2px;
}

/* =============================================
   ACCESSORIAL ROW
   ============================================= */
.accessorial-row {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 14px;
  margin-bottom: 10px;
  background: rgba(8, 14, 29, 0.42);
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.07);
}

.mst-acc-main {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: flex-end;
}

.mst-acc-main > .mst-form-label {
  flex: 1;
  min-width: 130px;
}

/* display:contents makes dynamic children flow into the parent flex row */
.accessorial-fields {
  display: contents;
}

.mst-acc-action {
  display: flex;
  align-items: center;
  padding-top: 30px;
  flex-shrink: 0;
}

/* =============================================
   FINANCIAL SUMMARY BAR
   ============================================= */
.mst-order-summary {
  border: 1px solid rgba(255, 255, 255, 0.10);
  border-radius: 16px;
  padding: 20px;
  background: rgba(8, 14, 29, 0.55);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-top: 3px solid rgba(0, 190, 255, 0.35);
}

.mst-order-summary-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}

.mst-order-summary-item {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.mst-order-summary-label {
  color: #94a3b8;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.6px;
}

.mst-order-summary-item input {
  height: 48px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.10);
  background: rgba(255, 255, 255, 0.04);
  padding: 0 14px;
  color: #dbe7f5;
  font-size: 16px;
  font-weight: 600;
  outline: none;
  text-align: right;
  box-sizing: border-box;
  width: 100%;
}

.mst-order-summary-highlight {
  border-radius: 12px;
  padding: 10px 14px;
  background: rgba(0, 190, 255, 0.06);
  border: 1px solid rgba(0, 190, 255, 0.20);
}

.mst-order-summary-highlight .mst-order-summary-label {
  color: #7dd3fc;
}

.mst-order-summary-highlight input {
  background: transparent;
  border: none;
  color: #a5ecff;
  font-size: 22px;
  font-weight: 700;
  padding: 0;
  height: auto;
  text-align: left;
}

/* =============================================
   RESPONSIVE – ORDERS (≤ 900px)
   ============================================= */
@media (max-width: 900px) {
  .mst-order-summary-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* =============================================
   RESPONSIVE – ORDERS (≤ 600px)
   ============================================= */
@media (max-width: 600px) {
  .mst-order-route-grid {
    grid-template-columns: 1fr;
  }

  .mst-order-summary-grid {
    grid-template-columns: 1fr 1fr;
  }

  .mst-order-header {
    flex-direction: column;
    align-items: flex-start;
  }

  .mst-order-header .mst-btn-danger-outline {
    width: 100%;
    justify-content: center;
  }

  .mst-acc-main {
    flex-direction: column;
  }

  .mst-acc-main > .mst-form-label {
    min-width: 100%;
  }

  .mst-acc-action {
    padding-top: 0;
    align-self: flex-end;
  }

  .mst-route-stats {
    flex-direction: column;
  }

  .mst-route-stats .mst-form-label,
  .mst-route-miles-action {
    width: 100%;
  }

  .mst-route-miles-action .mst-btn-secondary {
    width: 100%;
    justify-content: center;
  }
}

.mst-company-fees-form {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.mst-company-card {
  margin-bottom: 0;
}

.mst-company-cap-grid {
  align-items: end;
}

.mst-company-key-field input {
  border-color: rgba(0, 190, 255, 0.28);
  background: rgba(0, 190, 255, 0.08);
  color: #a5ecff;
  font-weight: 700;
}

.mst-company-fee-head,
.mst-company-fee-row {
  display: grid;
  grid-template-columns: 1.3fr .9fr .9fr 1fr;
  gap: 12px;
  align-items: center;
}

.mst-company-fee-head {
  padding: 8px 10px;
  color: #9bb0cc;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .5px;
}

.mst-company-fee-row {
  margin-bottom: 10px;
  padding: 12px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(8, 14, 29, 0.42);
}

.mst-company-fee-row .fee-title {
  color: #dbe7f5;
  font-weight: 600;
}

.mst-company-fee-row select,
.mst-company-fee-row input {
  width: 100%;
  min-width: 0;
  height: 44px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(8, 14, 29, 0.70);
  padding: 0 12px;
  color: #f5f9ff;
  font-size: 14px;
  outline: none;
  box-sizing: border-box;
}

.mst-company-fee-row select {
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%2394a3b8' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
  padding-right: 34px;
}

.mst-company-fee-row-auto input {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.10);
}

.mst-company-fee-row-highlight {
  border-color: rgba(0, 190, 255, 0.24);
  background: rgba(0, 190, 255, 0.06);
}

.mst-company-fee-row-highlight .fee-title {
  color: #a5ecff;
}

.mst-company-summary-grid {
  display: grid;
  gap: 10px;
}

.mst-company-summary-row {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 12px;
  align-items: center;
  padding: 12px 14px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(8, 14, 29, 0.42);
  color: #dbe7f5;
}

.mst-company-summary-row .summary-label {
  font-weight: 700;
  color: #f6f9ff;
}

.mst-company-summary-row-highlight {
  border-color: rgba(255, 255, 255, 0.14);
}

.mst-company-summary-row-highlight span:nth-child(2),
.mst-company-summary-row-highlight span:nth-child(3) {
  font-weight: 700;
}

.mst-company-summary-row-remaining {
  border-color: rgba(0, 190, 255, 0.30);
  background: rgba(0, 190, 255, 0.07);
}

/* =============================================
   RESPONSIVE – COMPANY + FACTORING
   ============================================= */
@media (max-width: 900px) {
  .mst-company-fee-head,
  .mst-company-fee-row {
    grid-template-columns: 1.2fr 1fr 1fr 1fr;
    gap: 10px;
  }

  .mst-factoring-reserve-grid .mst-col-full {
    grid-column: 1 / -1;
  }
}

@media (max-width: 700px) {
  .mst-company-fee-head {
    display: none;
  }

  .mst-company-fee-row {
    grid-template-columns: 1fr 1fr;
    gap: 10px;
  }

  .mst-company-fee-row .fee-title {
    grid-column: 1 / -1;
  }

  .mst-company-summary-row {
    grid-template-columns: 1fr;
    gap: 6px;
  }
}

@media (max-width: 600px) {
  .mst-factoring-settings-grid,
  .mst-factoring-reserve-grid,
  .mst-company-cap-grid {
    grid-template-columns: 1fr;
  }

  .mst-company-fee-row {
    grid-template-columns: 1fr;
  }

  .mst-company-fee-row select,
  .mst-company-fee-row input,
  .mst-input-suffix-wrap input {
    width: 100%;
  }
}

/* =============================================
   EMPLOYEES MODULE (CORE)
   ============================================= */
.mst-employees-module {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.mst-employees-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.mst-emp-stat-card .mst-card-body {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.mst-emp-stat-label {
  font-size: 12px;
  font-weight: 600;
  color: #94a3b8;
  text-transform: uppercase;
  letter-spacing: 0.6px;
}

.mst-emp-stat-value {
  font-size: 24px;
  line-height: 1.1;
  color: #f6f9ff;
}

.mst-emp-toolbar-grid {
  gap: 12px;
}

.mst-emp-header-actions {
  flex-wrap: wrap;
}

.mst-emp-directory-controls {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 12px;
  margin-top: 12px;
}

.mst-emp-inline-field {
  max-width: 120px;
}

.mst-emp-inline-field select {
  min-width: 96px;
}

.mst-emp-inline-check span {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.mst-emp-checkbox-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 10px;
}

.mst-emp-checkbox-row .mst-form-label {
  min-width: 280px;
}

.mst-emp-chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.mst-emp-chip {
  border: 1px solid rgba(255, 255, 255, 0.15);
  background: rgba(8, 14, 29, 0.52);
  color: #dbe7f5;
  border-radius: 999px;
  min-height: 34px;
  padding: 0 14px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}

.mst-emp-chip.is-active {
  border-color: rgba(255, 49, 112, 0.65);
  background: rgba(255, 49, 112, 0.20);
  color: #f8fbff;
}

.mst-emp-table-wrap {
  overflow-x: auto;
}

.mst-emp-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 1080px;
}

.mst-emp-table th,
.mst-emp-table td {
  padding: 12px 10px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  color: #dbe7f5;
  text-align: left;
  font-size: 14px;
  vertical-align: middle;
}

.mst-emp-table th {
  color: #94a3b8;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  font-size: 11px;
  font-weight: 700;
}

.mst-emp-table td strong {
  display: block;
  color: #f6f9ff;
  font-weight: 700;
}

.mst-emp-table td span {
  color: #94a3b8;
  font-size: 12px;
}

.mst-emp-table input[type="checkbox"] {
  width: 16px;
  height: 16px;
  accent-color: #00beff;
}

.mst-emp-status {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  font-size: 12px;
  font-weight: 700;
}

.mst-emp-status-active {
  color: #86efac;
  border-color: rgba(34, 197, 94, 0.38);
  background: rgba(34, 197, 94, 0.12);
}

.mst-emp-status-onboarding {
  color: #facc15;
  border-color: rgba(250, 204, 21, 0.35);
  background: rgba(250, 204, 21, 0.12);
}

.mst-emp-status-inactive {
  color: #f87171;
  border-color: rgba(248, 113, 113, 0.35);
  background: rgba(248, 113, 113, 0.12);
}

.mst-emp-row-actions {
  white-space: nowrap;
}

.mst-emp-row-btn {
  min-width: 64px;
  height: 34px;
  padding: 0 10px;
  border-radius: 9px;
  border: 1px solid rgba(0, 190, 255, 0.35);
  background: rgba(0, 190, 255, 0.12);
  color: #7dd3fc;
  font-size: 13px;
  font-weight: 700;
  margin-right: 6px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
}

.mst-emp-row-btn-danger {
  border-color: rgba(220, 50, 50, 0.45);
  background: rgba(220, 50, 50, 0.12);
  color: #f87171;
}

.mst-emp-table-count {
  color: #94a3b8;
  font-size: 12px;
  font-weight: 600;
}

.mst-emp-feedback {
  border: 1px solid rgba(0, 190, 255, 0.35);
  background: rgba(0, 190, 255, 0.12);
  color: #b8edff;
  border-radius: 10px;
  padding: 10px 12px;
  font-size: 13px;
  font-weight: 600;
}

.mst-emp-feedback.is-success {
  border-color: rgba(34, 197, 94, 0.35);
  background: rgba(34, 197, 94, 0.12);
  color: #a7f3d0;
}

.mst-emp-feedback.is-error {
  border-color: rgba(248, 113, 113, 0.4);
  background: rgba(248, 113, 113, 0.12);
  color: #fecaca;
}

.mst-emp-feedback.is-info {
  border-color: rgba(56, 189, 248, 0.4);
  background: rgba(56, 189, 248, 0.12);
  color: #bae6fd;
}

.mst-emp-advanced-filters {
  margin-top: -4px;
}

.mst-emp-modal {
  position: fixed;
  inset: 0;
  z-index: 1150;
}

.mst-emp-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(2, 6, 18, 0.72);
  backdrop-filter: blur(2px);
}

.mst-emp-modal-dialog {
  position: relative;
  z-index: 1;
  width: min(86vw, 1320px);
  margin: 4vh auto;
}

.mst-emp-modal-dialog-sm {
  width: min(92vw, 560px);
}

.mst-emp-modal-body {
  max-height: 86vh;
  overflow: auto;
}

.mst-emp-mode-pill {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  border-radius: 999px;
  padding: 0 14px;
  border: 1px solid rgba(255, 49, 112, 0.45);
  color: #ffd0e1;
  background: rgba(255, 49, 112, 0.15);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.mst-emp-tabs {
  display: flex;
  flex-wrap: nowrap;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 6px;
  margin-bottom: 16px;
}

.mst-emp-tab {
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(8, 14, 29, 0.50);
  color: #dbe7f5;
  border-radius: 10px;
  height: 38px;
  padding: 0 12px;
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
  cursor: pointer;
}

.mst-emp-tab.is-active {
  border-color: rgba(0, 190, 255, 0.45);
  background: rgba(0, 190, 255, 0.15);
  color: #b8edff;
}

.mst-emp-profile-form {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.mst-emp-subsection {
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(8, 14, 29, 0.42);
  border-radius: 12px;
  padding: 14px;
  margin-bottom: 12px;
}

.mst-emp-subsection h3 {
  margin: 0 0 12px;
  color: #f6f9ff;
  font-size: 14px;
  font-weight: 700;
}

.mst-emp-repeatable-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 12px;
}

.mst-emp-repeat-row {
  display: grid;
  grid-template-columns: 1.3fr 1fr 1fr auto;
  gap: 10px;
}

.mst-emp-document-row {
  grid-template-columns: repeat(7, minmax(120px, 1fr)) auto;
}

.mst-emp-attachment-row {
  grid-template-columns: repeat(8, minmax(120px, 1fr)) auto;
}

.mst-emp-repeat-row input,
.mst-emp-repeat-row select,
.mst-emp-repeat-row textarea {
  height: 42px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(8, 14, 29, 0.70);
  padding: 0 12px;
  color: #f5f9ff;
  font-size: 14px;
}

.mst-emp-inline-remove {
  height: 42px;
  border-radius: 10px;
  border: 1px solid rgba(220, 50, 50, 0.45);
  background: rgba(220, 50, 50, 0.12);
  color: #f87171;
  font-size: 13px;
  font-weight: 700;
  padding: 0 12px;
  cursor: pointer;
}

.mst-emp-note-item {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  align-items: center;
}

.mst-emp-note-meta {
  color: #94a3b8;
  font-size: 12px;
}

.mst-emp-conditional-block {
  padding-top: 8px;
}

.mst-emp-static-list {
  margin: 8px 0 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.mst-emp-static-list li {
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(8, 14, 29, 0.48);
  border-radius: 10px;
  padding: 10px 12px;
  color: #dbe7f5;
  font-size: 13px;
}

.mst-emp-tab-panel {
  display: none;
}

.mst-emp-tab-panel.is-active {
  display: block;
}

.mst-emp-form-actions {
  margin-top: 8px;
}

.mst-emp-inline-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.mst-emp-pagination {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 16px;
}

.mst-emp-pagination #pageLabel {
  color: #dbe7f5;
  font-size: 13px;
  font-weight: 700;
  min-width: 120px;
  text-align: center;
}

.mst-emp-detail-item {
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(8, 14, 29, 0.50);
  border-radius: 12px;
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.mst-emp-detail-item span {
  color: #94a3b8;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  font-weight: 700;
}

.mst-emp-detail-item strong {
  color: #f6f9ff;
  font-size: 14px;
  word-break: break-word;
}

.mst-field-error {
  display: block;
  margin-top: 6px;
  color: #fca5a5;
  font-size: 12px;
  font-weight: 600;
}

@media (max-width: 1200px) {
  .mst-employees-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .mst-emp-toolbar-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .mst-emp-repeat-row {
    grid-template-columns: 1fr 1fr;
  }

  .mst-emp-document-row,
  .mst-emp-attachment-row {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 700px) {
  .mst-employees-stats,
  .mst-emp-toolbar-grid {
    grid-template-columns: 1fr;
  }

  .mst-emp-modal-dialog,
  .mst-emp-modal-dialog-sm {
    width: calc(100vw - 12px);
    margin: 6px auto;
  }

  .mst-emp-modal-body {
    max-height: 92vh;
  }

  .mst-emp-directory-controls {
    flex-direction: column;
    align-items: stretch;
  }

  .mst-emp-inline-field {
    max-width: 100%;
  }

  .mst-emp-repeat-row {
    grid-template-columns: 1fr;
  }

  .mst-emp-document-row,
  .mst-emp-attachment-row {
    grid-template-columns: 1fr;
  }

  .mst-emp-mode-pill {
    display: none;
  }
}

/* mst-orders-actions replaced by mst-page-title-bar system */

/* mst-order-block, order-header, remove-order, mst-order-block h3 replaced by new order block system above */

/* origins/destinations layout */
.origins-list,
.destinations-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 10px;
}

/* add-origin, add-destination, add-accessorial button styles handled by mst-btn-secondary + mst-btn-sm */

/* accessorials-section replaced by card-body */

/* accessorial-row, accessorial-fields, accessorials-summary replaced by new mst-acc-main/action system above */

/* remove-accessorial handled by mst-btn-danger-sm */

.calculate-miles:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.mst-form-section {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 18px;
  margin-bottom: 30px;
}

.mst-vehicle-actions {
  display: flex;
  gap: 12px;
  margin-bottom: 20px;
}

/* mst-vehicle-actions replaced by mst-title-actions in mst-page-title-bar */

/* mst-vehicle-block styling now handled by .mst-card */

/* mst-section-group replaced by .mst-vehicle-group */

/* =============================================
   SHARED FORM LABEL (used by all tabs)
   ============================================= */
.mst-form-label {
  display: flex;
  flex-direction: column;
  gap: 8px;
  color: rgba(235, 245, 255, 0.80);
  font-size: 14px;
  font-weight: 500;
}

.mst-form-label span {
  font-weight: 600;
}

.mst-form-label input,
.mst-form-label select,
.mst-form-label textarea {
  height: 48px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(8, 14, 29, 0.70);
  padding: 0 14px;
  color: #f5f9ff;
  font-size: 15px;
  outline: none;
  transition: border-color 0.18s ease, box-shadow 0.18s ease;
}

.mst-form-label input:focus,
.mst-form-label select:focus,
.mst-form-label textarea:focus {
  border-color: rgba(255, 44, 100, 0.75);
  box-shadow: 0 0 0 3px rgba(255, 44, 100, 0.16);
}

.mst-form-label textarea {
  height: 80px;
  resize: vertical;
  padding-top: 12px;
  padding-bottom: 12px;
}

