@import url('https://fonts.googleapis.com/css2?family=Bricolage+Grotesque:opsz,wght@12..96,400..800&family=Instrument+Sans:ital,wght@0,400..700;1,400..700&display=swap');

/* ============================================================================
   Milodea admin re-skin — OVERRIDE stylesheet for the 6Valley / HS "Front"
   Bootstrap-4 back-end theme (admin panel + seller/vendor panel, which share
   one layout + CSS stack).

   WHAT THIS IS: a last-loaded, high-specificity re-tone. It does NOT rewrite
   any blade, markup or JS. It only recolours / re-types the theme's existing
   surfaces onto the Milodea design system so the panels match the storefront.

   CONTRACT
   - Loaded LAST in every back-end master <head> (after style.css / toastr /
     custom.css / theme.minc619.css / @stack('css_or_js')), so it wins.
   - Only ever linked on back-end + admin/seller auth pages, so it cannot leak
     to the storefront. Every rule is still scoped under `body` for safety and
     to out-rank the bundle; the only non-`body` statements are the @import,
     this :root token block (custom props change nothing until referenced) and
     @media wrappers. No universal/global resets.
   - Brand declarations carry !important to beat the compiled HS bundle across
     all interactive states. font-family is NEVER !important and is applied
     only to text elements (never to icon containers), so the tio-* icon fonts
     are untouched.
   - Light-surface + green-accent, to mirror the storefront (white surfaces,
     RSA-flag green brand). The admin theme ships NO dark mode, so none is added
     here. Compact/mini sidebar mode is preserved (no width/display/position
     rules touch .navbar-vertical* — colours & type only).

   TOKENS: the exact storefront values, copied from
   public/assets/front-end/css/milodea-ds.css :root (Evergreen / light).
   ============================================================================ */

:root {
  /* surfaces / neutrals */
  --mld-bg:#F2F5F3; --mld-surface:#FFFFFF; --mld-surface-2:#E9EEEB; --mld-surface-3:#DCE4DF;
  --mld-ink:#0F1F19; --mld-ink-2:#44544D; --mld-ink-3:#5F6F68;
  /* brand green identity + AA fill (white text) + states */
  --mld-brand:#2F8F67; --mld-brand-fill:#237A57; --mld-brand-hover:#1E6A4B;
  --mld-brand-soft:#E3F4EB; --mld-brand-text:#237A57; --mld-brand-deep:#0E2F21;
  --mld-on-brand:#FFFFFF;
  /* accents / lines / focus */
  --mld-accent:#C23F1C; --mld-accent-soft:#FCEDE7; --mld-star:#C4821A;
  --mld-line:#D9E1DC; --mld-line-strong:#B9C6BF; --mld-focus:#2F8F67;
  /* brand focus ring, derived from --mld-brand #2F8F67 = rgb(47,143,103) */
  --mld-ring:0 0 0 .2rem rgba(47,143,103,.25);
  --mld-ring-strong:0 0 0 .2rem rgba(47,143,103,.4);
  /* radii */
  --mld-r-s:6px; --mld-r-m:10px; --mld-r-l:14px; --mld-r-pill:999px;
  /* shadows */
  --mld-shadow-1:0 1px 2px rgba(15,31,25,.06),0 1px 1px rgba(15,31,25,.04);
  --mld-shadow-2:0 6px 16px rgba(15,31,25,.08),0 1px 3px rgba(15,31,25,.06);
  /* fonts */
  --mld-font-display:"Bricolage Grotesque","Avenir Next","Segoe UI",system-ui,sans-serif;
  --mld-font-body:"Instrument Sans","Helvetica Neue",Arial,system-ui,sans-serif;
}

/* ---------------------------------------------------------------- 1. Base type
   body color/background/font-family: same specificity as the bundle's body
   rule, but this file loads last → it wins without !important. Icon fonts set
   their own font-family on the icon element, so they are unaffected. */
body {
  font-family: var(--mld-font-body);
  color: var(--mld-ink);
  background-color: var(--mld-bg);
}
body h1, body h2, body h3, body h4, body h5, body h6,
body .h1, body .h2, body .h3, body .h4, body .h5, body .h6,
body .page-header-title, body .page-title, body .card-title, body .card-header-title {
  font-family: var(--mld-font-display);
  letter-spacing: -.01em;
}

/* ------------------------------------------------------------------ 2. Buttons */
body .btn-primary {
  background-color: var(--mld-brand-fill) !important;
  border-color: var(--mld-brand-fill) !important;
  color: var(--mld-on-brand) !important;
}
body .btn-primary:hover, body .btn-primary:focus,
body .btn-primary:not(:disabled):not(.disabled):active,
body .btn-primary:not(:disabled):not(.disabled).active,
body .show > .btn-primary.dropdown-toggle {
  background-color: var(--mld-brand-hover) !important;
  border-color: var(--mld-brand-hover) !important;
  color: var(--mld-on-brand) !important;
}
body .btn-primary:focus, body .btn-primary.focus,
body .btn-primary:not(:disabled):not(.disabled):active:focus,
body .show > .btn-primary.dropdown-toggle:focus {
  box-shadow: var(--mld-ring-strong) !important;
}
body .btn-primary:disabled, body .btn-primary.disabled {
  background-color: var(--mld-brand) !important;
  border-color: var(--mld-brand) !important;
  opacity: .55;
}
body .btn-outline-primary {
  color: var(--mld-brand-text) !important;
  border-color: var(--mld-brand) !important;
}
body .btn-outline-primary:hover, body .btn-outline-primary:focus,
body .btn-outline-primary:not(:disabled):not(.disabled):active,
body .btn-outline-primary:not(:disabled):not(.disabled).active {
  background-color: var(--mld-brand-fill) !important;
  border-color: var(--mld-brand-fill) !important;
  color: var(--mld-on-brand) !important;
}
body .btn-outline-primary:focus, body .btn-outline-primary.focus {
  box-shadow: var(--mld-ring-strong) !important;
}
body .btn-soft-primary {
  background-color: var(--mld-brand-soft) !important;
  color: var(--mld-brand-text) !important;
}
body .btn-soft-primary:hover, body .btn-soft-primary:focus,
body .btn-soft-primary:not(:disabled):not(.disabled):active {
  background-color: var(--mld-brand-fill) !important;
  color: var(--mld-on-brand) !important;
}
body .btn-link { color: var(--mld-brand-text) !important; }
body .btn-link:hover, body .btn-link:focus { color: var(--mld-brand-hover) !important; }

/* ------------------------------------------------------ 3. Links / brand text */
body a:not([class]) { color: var(--mld-brand-text); }
body a:not([class]):hover { color: var(--mld-brand-hover); }
body .text-primary { color: var(--mld-brand-text) !important; }
body a.text-primary:hover, body a.text-primary:focus { color: var(--mld-brand-hover) !important; }
body .bg-primary { background-color: var(--mld-brand-fill) !important; color: var(--mld-on-brand) !important; }
body .bg-soft-primary { background-color: var(--mld-brand-soft) !important; }
body .border-primary { border-color: var(--mld-brand) !important; }
body .spinner-border.text-primary, body .spinner-grow.text-primary { color: var(--mld-brand) !important; }
body .progress-bar { background-color: var(--mld-brand-fill); } /* default only; .bg-* keeps semantic */
body .alert-primary {
  background-color: var(--mld-brand-soft) !important;
  border-color: var(--mld-brand) !important;
  color: var(--mld-brand-deep) !important;
}
body .alert-soft-primary {
  background-color: var(--mld-brand-soft) !important;
  color: var(--mld-brand-deep) !important;
}
/* login split-screen accent word (<span class="c1">) */
body .c1 { color: var(--mld-brand-text) !important; }

/* ------------------------------------------------------- 4. Forms / controls */
body .form-control, body .custom-select, body .form-select {
  border-color: var(--mld-line);
}
body .form-control:focus, body textarea.form-control:focus,
body .custom-select:focus, body .form-select:focus,
body .custom-file-input:focus ~ .custom-file-label,
body .select2-container--default.select2-container--focus .select2-selection,
body .select2-container--default .select2-selection--single:focus,
body .input-group.focus .form-control {
  border-color: var(--mld-brand) !important;
  box-shadow: var(--mld-ring) !important;
}
/* checkboxes / radios / switches (Bootstrap-4 custom-control) */
body .custom-control-input:checked ~ .custom-control-label::before {
  background-color: var(--mld-brand-fill) !important;
  border-color: var(--mld-brand-fill) !important;
}
body .custom-control-input:focus ~ .custom-control-label::before,
body .custom-control-input:focus:not(:checked) ~ .custom-control-label::before {
  box-shadow: var(--mld-ring) !important;
}
body .custom-control-input:focus:not(:checked) ~ .custom-control-label::before {
  border-color: var(--mld-brand) !important;
}
/* select2 results */
body .select2-container--default .select2-results__option--highlighted[aria-selected] {
  background-color: var(--mld-brand-fill) !important;
}
body .select2-container--default .select2-results__option[aria-selected=true] {
  background-color: var(--mld-brand-soft) !important;
  color: var(--mld-brand-text) !important;
}
/* 6Valley custom toggle switch (style.css .__inline-6) */
body .__inline-6 input:checked + .slider { background-color: var(--mld-brand-fill) !important; }
body .__inline-6 input:focus + .slider { box-shadow: 0 0 1px var(--mld-brand) !important; }

/* ------------------------------------------------- 5. Vertical sidebar (aside)
   Colours + type only — no layout rules, so mini/compact mode is preserved.
   The theme ships the aside as .bg-white; kept light so the brand logo reads. */
body .navbar-vertical-aside { border-color: var(--mld-line) !important; }
body .navbar-vertical .nav-link:hover,
body .navbar-vertical .nav-link:hover .nav-icon,
body .navbar-vertical-aside .nav-link:hover,
body .navbar-vertical-aside .nav-link:hover .nav-icon {
  color: var(--mld-brand-text) !important;
}
body .navbar-vertical .nav-link.active,
body .navbar-vertical .nav-link.active .nav-icon,
body .navbar-vertical .nav-item.active > .nav-link,
body .navbar-vertical .nav-item.active > .nav-link .nav-icon,
body .navbar-vertical-aside-has-menu.active > .nav-link,
body .navbar-vertical-aside-has-menu.active > .nav-link .nav-icon,
body .navbar-vertical-aside .nav-link.active {
  color: var(--mld-brand-text) !important;
  font-weight: 600;
}
/* active-item tint — background only (no border/margin), so no layout shift in
   mini mode and no LTR/RTL asymmetry. */
body .navbar-vertical .nav-link.active,
body .navbar-vertical .nav-item.active > .nav-link,
body .navbar-vertical-aside-has-menu.active > .nav-link {
  background-color: var(--mld-brand-soft) !important;
}

/* ----------------------------------------------------- 6. Top header / navbar */
body #header.navbar, body .navbar.navbar-container {
  background-color: var(--mld-surface) !important;
  border-bottom: 1px solid var(--mld-line) !important;
}

/* --------------------------------------------------------------- 7. Cards */
body .card {
  border: 1px solid var(--mld-line) !important;
  border-radius: var(--mld-r-l);
  box-shadow: var(--mld-shadow-1);
}
body .card-header {
  background-color: transparent;
  border-bottom: 1px solid var(--mld-line) !important;
}

/* --------------------------------------------------------------- 8. Tables */
body .table thead th {
  background-color: var(--mld-surface-2) !important;
  color: var(--mld-ink-2) !important;
  border-top: 0 !important;
  border-bottom: 1px solid var(--mld-line-strong) !important;
  font-weight: 600;
  letter-spacing: .01em;
}
body .table td, body .table th { border-color: var(--mld-line); }
body .table-hover tbody tr:hover { background-color: var(--mld-surface-2); }

/* --------------------------------------------------------------- 9. Badges */
body .badge-primary { background-color: var(--mld-brand-fill) !important; color: var(--mld-on-brand) !important; }
body .badge-soft-primary { background-color: var(--mld-brand-soft) !important; color: var(--mld-brand-text) !important; }

/* ----------------------------------------------------------- 10. Pagination */
body .page-item.active .page-link {
  background-color: var(--mld-brand-fill) !important;
  border-color: var(--mld-brand-fill) !important;
  color: var(--mld-on-brand) !important;
}
body .page-link { color: var(--mld-brand-text) !important; }
body .page-link:hover { background-color: var(--mld-brand-soft) !important; color: var(--mld-brand-text) !important; }
body .page-link:focus { box-shadow: var(--mld-ring) !important; }

/* ------------------------------------------------------- 11. Tabs / pills */
body .nav-tabs .nav-link.active { color: var(--mld-brand-text) !important; border-bottom-color: var(--mld-brand) !important; }
body .nav-tabs .nav-link:hover { color: var(--mld-brand-text) !important; }
body .nav-pills .nav-link.active, body .nav-pills .show > .nav-link {
  background-color: var(--mld-brand-fill) !important;
  color: var(--mld-on-brand) !important;
}

/* ---------------------------------------------- 12. Dropdown / list-group */
body .dropdown-item.active, body .dropdown-item:active {
  background-color: var(--mld-brand-fill) !important;
  color: var(--mld-on-brand) !important;
}
body .list-group-item.active {
  background-color: var(--mld-brand-fill) !important;
  border-color: var(--mld-brand-fill) !important;
  color: var(--mld-on-brand) !important;
}

/* ------------------------------------------------ 13. Page header / crumb */
body .page-header { border-bottom-color: var(--mld-line) !important; }
body .breadcrumb-item a { color: var(--mld-brand-text); }
body .breadcrumb-item a:hover { color: var(--mld-brand-hover); }
body .breadcrumb-item.active { color: var(--mld-ink-3); }
body .breadcrumb-item + .breadcrumb-item::before { color: var(--mld-ink-3); }
