/* ==========================================================================
   LorryZone brand tokens
   Source of truth: LorryZone_Brand_Guidelines.pdf
   ========================================================================== */
:root {
  /* Brand blue (primary UI interaction color) */
  --lz-blue-light: #4da6ff;
  --lz-blue-primary: #1a6bcc;
  --lz-blue-dark: #0d47a1;
  --lz-blue-sky: #ebf5ff;

  /* Neutrals */
  --lz-black: #1d1d1f;
  --lz-text-secondary: #6e6e73;
  --lz-grouped-bg: #f2f2f7;
  --lz-white: #ffffff;

  /* Typography */
  --lz-font: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;

  /* Radii */
  --lz-radius-sm: 6px;
  --lz-radius-md: 10px;
  --lz-radius-lg: 14px;
  --lz-radius-pill: 980px;

  /* Elevation (soft, layered shadows) */
  --lz-shadow-flat: 0 2px 10px rgba(29, 29, 31, 0.06);
  --lz-shadow-raised: 0 6px 18px rgba(29, 29, 31, 0.1);
  --lz-shadow-float: 0 20px 50px -12px rgba(29, 29, 31, 0.18), 0 4px 12px rgba(29, 29, 31, 0.06);
  --lz-shadow-overlay: 0 24px 60px -16px rgba(29, 29, 31, 0.25);

  /* Motion */
  --lz-duration-fast: 80ms;
  --lz-duration-base: 200ms;
  --lz-duration-slow: 400ms;
  --lz-easing: cubic-bezier(0.4, 0, 0.2, 1);
}

/* ==========================================================================
   Site-wide typography (Inter, applied broadly across admin + customer areas)
   ========================================================================== */
body {
  font-family: var(--lz-font);
}

/* ==========================================================================
   Client-area background (applies to every logged-in client-portal page;
   login/register keep their own rule below with the darker overlay)
   ========================================================================== */
body.customers {
  background: linear-gradient(180deg, rgba(245, 247, 251, 0.93) 0%, rgba(238, 241, 247, 0.93) 100%), url("../images/custom/login-bg.png");
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  background-attachment: fixed;
  min-height: 100vh;
  overflow-x: hidden;
}
html:has(body.customers) {
  overflow-x: hidden;
}

/* ==========================================================================
   Client-area navigation — left sidebar on desktop, top bar + off-canvas
   drawer on mobile/tablet
   ========================================================================== */
.lz-client-shell {
  display: flex;
  align-items: flex-start;
  position: relative;
}
/* Toggle button lives as a sibling of <nav> now (moved out of the sidebar's
   own scroll container, which clips anything positioned outside its box via
   overflow-x: hidden). It's only meaningful for the desktop sidebar layout,
   so keep it hidden until the >=992px block re-enables it. */
body.customers .lz-sidebar-toggle {
  display: none;
}
body.customers .navbar.header.lz-sidebar {
  background: #fff;
  border: none;
  box-shadow: var(--lz-shadow-flat);
  margin-bottom: 0;
}
body.customers .navbar.header.lz-sidebar .navbar-brand {
  height: auto;
  padding: 14px 15px;
}
body.customers .navbar.header.lz-sidebar .navbar-brand img {
  max-height: 38px;
}
body.customers .navbar.header.lz-sidebar .navbar-nav > li > a {
  color: #475467;
  font-weight: 500;
  transition: color var(--lz-duration-base) var(--lz-easing);
}
body.customers .navbar.header.lz-sidebar .navbar-nav > li > a:hover,
body.customers .navbar.header.lz-sidebar .navbar-nav > li.active > a {
  color: var(--lz-blue-primary);
  background: var(--lz-blue-sky);
}
body.customers .navbar.header.lz-sidebar .client-profile-image-small {
  border: 2px solid #e4e8ec;
  transition: border-color var(--lz-duration-base) var(--lz-easing);
}
body.customers .navbar.header.lz-sidebar .client-profile-image-small:hover {
  border-color: var(--lz-blue-primary);
}

/* Profile card (logo -> card -> nav list, matching admin aside.php pattern) */
body.customers .lz-profile-card-wrap {
  padding: 0 14px;
  margin: 14px 0 10px;
}
body.customers .lz-profile-card {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 8px 10px;
  border: 1px solid #e4e8ec;
  border-radius: var(--lz-radius-md);
  background: #fff;
  box-shadow: var(--lz-shadow-flat);
  text-decoration: none;
  transition:
    background-color var(--lz-duration-base) var(--lz-easing),
    box-shadow var(--lz-duration-base) var(--lz-easing);
}
body.customers .lz-profile-card:hover,
body.customers .lz-profile-card:focus {
  background: var(--lz-grouped-bg);
  box-shadow: var(--lz-shadow-raised);
  text-decoration: none;
}
body.customers .lz-profile-card-avatar {
  width: 34px;
  height: 34px;
  flex: 0 0 34px;
  border-radius: 50%;
  object-fit: cover;
}
body.customers .lz-profile-card-text {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  line-height: 1.3;
}
body.customers .lz-profile-card-name {
  font-weight: 600;
  font-size: 13.5px;
  color: var(--lz-black);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
body.customers .lz-profile-card-email {
  font-weight: 400;
  font-size: 12px;
  color: var(--lz-text-secondary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
body.customers .lz-profile-card-caret {
  flex: 0 0 auto;
  color: var(--lz-text-secondary);
  font-size: 13px;
}

/* Nav list rows: icon + label, rounded active/hover highlight */
body.customers .lz-nav-list {
  padding: 0 10px !important;
}
body.customers .lz-nav-list > li {
  margin-bottom: 2px;
}
body.customers .lz-nav-list > li > a {
  display: flex;
  align-items: center;
  gap: 10px;
  border-radius: var(--lz-radius-md) !important;
}
body.customers .lz-nav-list-label {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Desktop / tablet-landscape: true left sidebar */
@media (min-width: 992px) {
  body.customers .navbar.header.lz-sidebar {
    position: sticky;
    top: 0;
    align-self: flex-start;
    width: 212px;
    flex: 0 0 212px;
    height: 100vh;
    overflow-y: auto;
    overflow-x: hidden;
    border-right: 1px solid #e4e8ec;
    transition: width var(--lz-duration-slow) var(--lz-easing);
  }
  body.customers .navbar.header.lz-sidebar .container {
    width: 100%;
    padding: 0;
    display: flex;
    flex-direction: column;
    height: 100%;
  }
  body.customers .navbar.header.lz-sidebar .navbar-header {
    float: none;
    width: 100%;
    padding: 18px 16px;
    border-bottom: 1px solid #eceef1;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
  }
  body.customers .navbar.header.lz-sidebar .navbar-header .navbar-toggle {
    display: none;
  }
  body.customers .navbar.header.lz-sidebar .navbar-brand {
    float: none;
    display: block;
    padding: 0;
    margin: 0;
    min-width: 0;
  }
  body.customers .navbar.header.lz-sidebar .navbar-brand img {
    max-width: 100%;
  }
  body.customers .lz-sidebar-toggle {
    position: absolute;
    top: 20px;
    left: 199px;
    z-index: 6;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 26px;
    height: 26px;
    padding: 0;
    border: 1px solid #e4e8ec;
    border-radius: 50%;
    background: #fff;
    color: var(--lz-text-secondary);
    cursor: pointer;
    box-shadow: var(--lz-shadow-raised);
    transition:
      background-color var(--lz-duration-base) var(--lz-easing),
      color var(--lz-duration-base) var(--lz-easing),
      border-color var(--lz-duration-base) var(--lz-easing),
      left var(--lz-duration-slow) var(--lz-easing);
  }
  body.customers .lz-sidebar-toggle:hover,
  body.customers .lz-sidebar-toggle:focus {
    background: var(--lz-grouped-bg);
    color: var(--lz-blue-primary);
    border-color: var(--lz-blue-primary);
  }
  body.customers .navbar.header.lz-sidebar .navbar-collapse {
    display: block !important;
    height: auto !important;
    flex: 1;
    width: 100%;
    padding: 12px 0;
    border-top: none;
    box-shadow: none;
  }
  body.customers .navbar.header.lz-sidebar .navbar-nav {
    float: none;
    margin: 0;
    width: 100%;
  }
  body.customers .navbar.header.lz-sidebar .navbar-nav > li {
    float: none;
    width: 100%;
    height: auto;
  }
  body.customers .navbar.header.lz-sidebar .navbar-nav > li > a {
    display: flex;
    align-items: center;
    padding: 8px 14px;
    font-size: 13.5px;
    line-height: 1.4;
    border-radius: 0;
    height: auto;
  }
  body.customers .navbar.header.lz-sidebar .navbar-nav > li > a i {
    width: 20px;
    margin-right: 10px;
    text-align: center;
  }
  body.customers .navbar.header.lz-sidebar .navbar-nav .dropdown-menu {
    position: static;
    float: none;
    box-shadow: none;
    border: none;
    padding-left: 12px;
    width: 100%;
  }
  body.customers #wrapper {
    flex: 1;
    min-width: 0;
  }
  /* Content region must genuinely reflow to whatever width remains next to
     the sidebar. Bootstrap 3's .container is a fixed-width box keyed off
     viewport breakpoints (750/970/1170/1200px) — it does not know a 212px
     sidebar has eaten into the available space, so it kept forcing a
     page-level horizontal scrollbar. Make it fluid inside the customer
     portal only. */
  body.customers #wrapper .container {
    width: 100%;
    max-width: 100%;
  }

  /* Profile-card dropdown: contain it to the sidebar/card width instead of
     Bootstrap's default shrink-to-fit box, which was overflowing left past
     the sidebar edge and floating over the main content area. */
  body.customers .lz-profile-card-wrap {
    position: relative;
  }
  body.customers .lz-profile-dropdown {
    position: absolute;
    top: calc(100% + 6px);
    left: 0;
    right: 0;
    width: auto;
    min-width: 0;
    max-width: none;
    margin: 0;
    box-sizing: border-box;
    border-radius: var(--lz-radius-md);
  }
  /* The nested "Language" submenu uses Bootstrap's dropdown-submenu.pull-left
     pattern, which is meant for wide top-bar menus and floats sideways here,
     overflowing the narrow sidebar dropdown. Force it inline/static instead. */
  body.customers .lz-profile-dropdown .dropdown-submenu {
    position: static;
  }
  body.customers .lz-profile-dropdown .dropdown-submenu > .dropdown-menu {
    position: static;
    float: none;
    left: auto;
    right: auto;
    margin: 0;
    width: 100%;
    box-shadow: none;
    border: none;
    padding-left: 12px;
  }

  /* Collapsed icon-only rail */
  body.customers .lz-client-shell.lz-sidebar-collapsed .navbar.header.lz-sidebar {
    width: 64px;
    flex: 0 0 64px;
  }
  body.customers .lz-client-shell.lz-sidebar-collapsed .lz-sidebar-toggle {
    left: 51px;
  }
  body.customers .lz-client-shell.lz-sidebar-collapsed .navbar-header {
    flex-direction: column;
    padding: 16px 10px;
    gap: 10px;
  }
  body.customers .lz-client-shell.lz-sidebar-collapsed .navbar-brand img {
    max-width: 32px;
    max-height: 32px;
  }
  body.customers .lz-client-shell.lz-sidebar-collapsed .lz-profile-card-wrap {
    padding: 0 10px;
  }
  body.customers .lz-client-shell.lz-sidebar-collapsed .lz-profile-card {
    justify-content: center;
    gap: 0;
    padding: 8px;
  }
  body.customers .lz-client-shell.lz-sidebar-collapsed .lz-profile-card-text,
  body.customers .lz-client-shell.lz-sidebar-collapsed .lz-profile-card-caret,
  body.customers .lz-client-shell.lz-sidebar-collapsed .lz-nav-list-label {
    display: none;
  }
  body.customers .lz-client-shell.lz-sidebar-collapsed .lz-nav-list {
    padding: 0 6px !important;
  }
  body.customers .lz-client-shell.lz-sidebar-collapsed .lz-nav-list > li > a {
    justify-content: center;
    padding: 8px 0;
  }
  body.customers .lz-client-shell.lz-sidebar-collapsed .lz-nav-list > li > a i {
    margin-right: 0;
  }
  /* Dropdown is irrelevant while collapsed (profile card no longer shows a
     caret to open it); keep it hidden to avoid a stray floating panel. */
  body.customers .lz-client-shell.lz-sidebar-collapsed .lz-profile-dropdown {
    display: none !important;
  }
}

/* Mobile / tablet-portrait: compact top bar with off-canvas drawer,
   unchanged Bootstrap collapse behaviour */
@media (max-width: 991px) {
  body.customers .navbar.header.lz-sidebar {
    width: 100%;
  }
}

/* ==========================================================================
   Client-area footer — not used in this theme, hidden entirely
   ========================================================================== */
body.customers .footer {
  display: none;
}

/* ==========================================================================
   Login / register pages: hide the app chrome entirely, full-page centered card
   ========================================================================== */
body.customers_login,
body.register {
  background: linear-gradient(180deg, rgba(245, 247, 251, 0.93) 0%, rgba(238, 241, 247, 0.93) 100%), url("../images/custom/login-bg.png");
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  background-attachment: fixed;
  min-height: 100vh;
}
body.customers_login .navbar.header,
body.register .navbar.header,
body.customers_login .footer,
body.register .footer {
  display: none;
}
body.customers_login #wrapper,
body.register #wrapper {
  display: flex;
  align-items: center;
  min-height: 100vh;
}
body.customers_login #content,
body.register #content {
  width: 100%;
}

.login-logo-wrap {
  margin-bottom: 18px;
}
.login-logo-wrap a.login-logo {
  display: inline-block;
}
.login-logo-wrap a.login-logo img {
  max-height: 48px;
  width: auto;
  max-width: 220px;
  height: auto;
}

.login-heading {
  font-size: 26px !important;
  font-weight: 700 !important;
  color: var(--lz-black);
  letter-spacing: -0.3px;
}

.login-form .panel_s,
#register-form .panel_s {
  border: none;
  border-radius: var(--lz-radius-lg);
  box-shadow: var(--lz-shadow-float);
  overflow: hidden;
}
.login-form .panel-body,
#register-form .panel-body {
  padding: 40px 36px;
}

.login-form label,
#register-form label {
  font-weight: 600;
  color: #344054;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.4px;
}

.login-form .form-control,
#register-form .form-control {
  border: 1.5px solid #e4e8ec;
  background: #fff;
  border-radius: var(--lz-radius-md);
  height: 46px;
  box-shadow: none;
  transition:
    border-color var(--lz-duration-base) var(--lz-easing),
    box-shadow var(--lz-duration-base) var(--lz-easing);
}
.login-form .form-control:focus,
#register-form .form-control:focus {
  border-color: var(--lz-blue-primary);
  box-shadow: 0 0 0 3px var(--lz-blue-sky);
}
/* Kill the browser's blue/yellow autofill tint so fields stay white */
.login-form input:-webkit-autofill,
#register-form input:-webkit-autofill {
  -webkit-box-shadow: 0 0 0 1000px #fff inset;
  -webkit-text-fill-color: #101828;
}

/* Bootstrap-select (e.g. Country) renders as a button, not an input, so the
   .form-control height/border rules above never reach it on their own. */
.login-form .bootstrap-select,
#register-form .bootstrap-select {
  width: 100% !important;
  box-sizing: border-box;
}
.login-form .bootstrap-select > .btn,
#register-form .bootstrap-select > .btn {
  box-sizing: border-box;
  width: 100%;
  border: 1.5px solid #e4e8ec;
  background: #fff;
  border-radius: var(--lz-radius-md);
  height: 46px;
  line-height: 24px;
  padding: 10px 30px 10px 16px;
  box-shadow: none;
}
.login-form .bootstrap-select > .btn:focus,
#register-form .bootstrap-select > .btn:focus {
  border-color: var(--lz-blue-primary);
  box-shadow: 0 0 0 3px var(--lz-blue-sky);
  outline: none;
}

.login-form .btn-block,
#register-form .btn-block {
  border-radius: var(--lz-radius-md);
  height: 46px;
  font-weight: 600;
  letter-spacing: 0.2px;
  transition:
    transform var(--lz-duration-fast) var(--lz-easing),
    box-shadow var(--lz-duration-base) var(--lz-easing);
}
.login-form .btn-primary.btn-block,
#register-form .btn-primary.btn-block {
  background: var(--lz-blue-primary);
  border-color: var(--lz-blue-primary);
  box-shadow: 0 4px 14px rgba(26, 107, 204, 0.28);
}
.login-form .btn-primary.btn-block:hover,
#register-form .btn-primary.btn-block:hover {
  background: var(--lz-blue-dark);
  border-color: var(--lz-blue-dark);
  box-shadow: 0 6px 18px rgba(26, 107, 204, 0.35);
  transform: translateY(-1px);
}
.login-form .btn-default.btn-block,
#register-form .btn-default.btn-block {
  border: 1.5px solid #e4e8ec;
  background: #fff;
  color: #344054;
}
.login-form .btn-default.btn-block:hover,
#register-form .btn-default.btn-block:hover {
  border-color: #cbd2d9;
  background: #f8fafc;
}

.login-form a.text-muted {
  font-size: 13px;
  color: #667085 !important;
}
.login-form a.text-muted:hover {
  color: var(--lz-blue-primary) !important;
}

/* ==========================================================================
   Global Perfex Admin Reskin
   Scoped to the default admin body wrapper; brand-aligns buttons, focus
   states, panels/cards, sidebar menu, status badges, and scrollbars.
   ========================================================================== */

/* Primary buttons */
.btn-primary {
  background-color: var(--lz-blue-primary);
  border-color: var(--lz-blue-primary);
  color: #fff !important;
  transition:
    background-color var(--lz-duration-base) var(--lz-easing),
    border-color var(--lz-duration-base) var(--lz-easing),
    transform var(--lz-duration-fast) var(--lz-easing),
    box-shadow var(--lz-duration-base) var(--lz-easing);
}
.btn-primary:hover,
.btn-primary:focus,
.btn-primary:active {
  background-color: var(--lz-blue-dark) !important;
  border-color: var(--lz-blue-dark) !important;
  color: #fff !important;
  box-shadow: var(--lz-shadow-raised);
  transform: translateY(-1px);
}

/* Focus states (3px brand-blue ring, visible substitute for outline removal) */
.form-control:focus,
a:focus,
.btn:focus,
.btn-primary:focus,
button:focus,
input:focus,
select:focus,
textarea:focus {
  outline: none;
  border-color: var(--lz-blue-primary);
  box-shadow: 0 0 0 3px var(--lz-blue-sky);
}

/* Panels / cards */
.panel_s,
.panel,
.panel-body,
.panel-heading {
  border-radius: var(--lz-radius-lg);
}
.panel_s,
.panel {
  border: 1px solid #eceef1;
  box-shadow: var(--lz-shadow-flat);
  transition: box-shadow var(--lz-duration-base) var(--lz-easing);
}
.panel_s:hover,
.panel:hover {
  box-shadow: var(--lz-shadow-raised);
}
.panel-heading {
  border-top-left-radius: var(--lz-radius-lg);
  border-top-right-radius: var(--lz-radius-lg);
}

/* Admin sidebar search-filter: only active while the box has a term, and
   fully inert (no leftover inline styles) once cleared. Forces matched
   submenus into normal document flow so they can't collide with any
   absolute-positioned flyout state the collapse plugin leaves behind. */
.vp-sidebar-search-wrap {
  position: relative;
}
.vp-sidebar-search-icon {
  position: absolute;
  left: 10px;
  top: 50%;
  transform: translateY(-50%);
  color: #9ca3af;
  font-size: 12px;
  pointer-events: none;
}
#sidebar-menu-search {
  height: 32px;
  font-size: 13px;
  padding-left: 28px;
  width: 100%;
}
body.sidebar-searching #side-menu > li.vp-search-hidden {
  display: none !important;
}
body.sidebar-searching .nav-second-level.vp-search-open {
  display: block !important;
  position: static !important;
  height: auto !important;
  max-height: none !important;
  overflow: visible !important;
}
body.sidebar-searching .nav-second-level > li.vp-search-hidden {
  display: none !important;
}

/* Sidebar menu accents */
#sidebar-menu .active > a,
#sidebar-menu li a:hover {
  background: var(--lz-blue-sky);
  color: var(--lz-blue-primary) !important;
  border-left: 3px solid var(--lz-blue-primary);
  transition:
    background-color var(--lz-duration-base) var(--lz-easing),
    color var(--lz-duration-base) var(--lz-easing);
}
#sidebar-menu .active > a i,
#sidebar-menu li a:hover i {
  color: var(--lz-blue-primary);
}

/* Status badges (semantic colors preserved, brand red/orange never used here) */
label.label-success,
label.label-warning,
label.label-danger,
label.label-info,
label.label-default {
  border-radius: var(--lz-radius-pill);
  padding: 4px 12px;
  font-weight: 600;
  letter-spacing: 0.2px;
}

/* Custom scrollbars (thin, rounded, brand-blue-tinted) */
.table-responsive,
.dataTables_scrollBody,
.overflow-y,
.overflow-auto {
  scrollbar-width: thin;
  scrollbar-color: var(--lz-blue-light) transparent;
}
.table-responsive::-webkit-scrollbar,
.dataTables_scrollBody::-webkit-scrollbar,
.overflow-y::-webkit-scrollbar,
.overflow-auto::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}
.table-responsive::-webkit-scrollbar-track,
.dataTables_scrollBody::-webkit-scrollbar-track,
.overflow-y::-webkit-scrollbar-track,
.overflow-auto::-webkit-scrollbar-track {
  background: transparent;
}
.table-responsive::-webkit-scrollbar-thumb,
.dataTables_scrollBody::-webkit-scrollbar-thumb,
.overflow-y::-webkit-scrollbar-thumb,
.overflow-auto::-webkit-scrollbar-thumb {
  background-color: var(--lz-blue-light);
  border-radius: var(--lz-radius-pill);
}
.table-responsive::-webkit-scrollbar-thumb:hover,
.dataTables_scrollBody::-webkit-scrollbar-thumb:hover,
.overflow-y::-webkit-scrollbar-thumb:hover,
.overflow-auto::-webkit-scrollbar-thumb:hover {
  background-color: var(--lz-blue-primary);
}
