/*------------------------------------------------------------------

[application-modern.css]

    Merchant Portal Facelift - CSS Override Layer
    Loaded AFTER all existing CSS to modernise the visual appearance
    without modifying any existing files.

    Covers:
      Section 1 - Flat design, softer corners, modern shadows, whitespace, transitions
      Section 2 - Typography (Inter font, sizing, weight, line-height)
      Section 3 - Colour palette refresh via CSS custom properties
      Section 4 - Navigation modernisation (main nav, side nav)
      Section 5 - Form inputs (height, focus ring, select styling)
      Section 6 - Buttons (padding, hover elevation)
      Section 7 - Tables (cleaner borders, row styling)
      Section 8 - Modals (radius, backdrop, shadow)
      Section 9 - Status badges (pill shape, chip pattern)

    To revert: remove this <link> from merchant_admin.php and
    restore the Google Fonts link from Inter back to Open Sans.

-------------------------------------------------------------------*/

/* =================================================================
   CSS Custom Properties (Section 3)
   ================================================================= */
:root {
  /* Primary palette */
  --mpo-primary:         #10b981;  /* emerald green */
  --mpo-primary-hover:   #059669;  /* darker emerald */
  --mpo-primary-light:   rgba(16, 185, 129, 0.12);

  /* Secondary palette */
  --mpo-secondary:       #3b82f6;  /* modern blue */
  --mpo-secondary-hover: #2563eb;
  --mpo-secondary-light: rgba(59, 130, 246, 0.12);

  /* Tertiary (muted) */
  --mpo-tertiary:        #6b7280;  /* grey-500 */
  --mpo-tertiary-hover:  #4b5563;

  /* Semantic colours */
  --mpo-success:         #10b981;
  --mpo-success-hover:   #059669;
  --mpo-info:            #3b82f6;
  --mpo-info-hover:      #2563eb;
  --mpo-warning:         #f59e0b;
  --mpo-warning-hover:   #d97706;
  --mpo-danger:          #ef4444;
  --mpo-danger-hover:    #dc2626;

  /* Surfaces */
  --mpo-bg:              #f8fafc;
  --mpo-bg-white:        #ffffff;
  --mpo-border:          #e2e8f0;
  --mpo-border-light:    #f1f5f9;

  /* Text */
  --mpo-text:            #1e293b;  /* slate-900 */
  --mpo-text-muted:      #64748b;  /* slate-500 */
  --mpo-text-on-dark:    #f1f5f9;

  /* Layout chrome */
  --mpo-topbar-bg:       #1e293b;
  --mpo-header-bg:       #ffffff;
  --mpo-footer-bg:       #1e293b;
  --mpo-modal-header-bg: #1e293b;

  /* Shadows */
  --mpo-shadow-sm:       0 1px 2px rgba(0,0,0,0.05);
  --mpo-shadow:          0 1px 3px rgba(0,0,0,0.08), 0 1px 2px rgba(0,0,0,0.06);
  --mpo-shadow-md:       0 4px 6px rgba(0,0,0,0.07), 0 2px 4px rgba(0,0,0,0.05);
  --mpo-shadow-lg:       0 10px 15px rgba(0,0,0,0.08), 0 4px 6px rgba(0,0,0,0.04);

  /* Radii */
  --mpo-radius:          8px;
  --mpo-radius-sm:       6px;
  --mpo-radius-lg:       12px;
  --mpo-radius-pill:     9999px;
}

/* =================================================================
   Section 2 - Typography
   ================================================================= */
/* Fix sticky footer: constrain footer to match wrapper's -61px margin */
#footer {
  line-height: 20px;
}
.push {
  height: 61px;
}
body {
  font-family: 'Inter', 'Open Sans', arial, sans-serif;
  font-size: 14px;
  line-height: 1.6;
  color: var(--mpo-text);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
h1, h2, h3, h4, h5, h6 {
  font-weight: 500;
  color: var(--mpo-text);
}
h2 { font-size: 22px; }
h3 { font-size: 17px; }

/* =================================================================
   Section 1 - Global flat design reset
   Kill all gradients, text-shadows, inset box-shadows, IE filters
   ================================================================= */

/* --- Universal gradient removal --------------------------------- */
.btn,
.btn-primary,
.btn-secondary,
.btn-tertiary,
.btn-success,
.btn-info,
.btn-warning,
.btn-danger,
.btn-inverse,
.accordion-group .accordion-heading,
.accordion-group.open .accordion-heading,
.breadcrumb,
.pagination ul li a,
.pagination ul li a:hover,
.pagination ul li.active a,
.progress .bar,
.progress-primary .bar,
.progress-secondary .bar,
.progress-tertiary .bar,
.shortcuts .shortcut,
.plan-actions,
.modal-header,
#main-nav > li > a,
#main-nav > li > a:hover,
#main-nav > li.open > a,
.table-bordered thead tr,
.table-highlight.table-bordered thead tr,
.dropdown-menu li > a:hover,
.dropdown-menu li > a:focus,
.dropdown-submenu:hover > a,
.nav-pills > li.active > a,
.nav-pills > li.active > a:hover,
.nav-stacked li.active a,
.nav-stacked li.active a:hover,
.ui-datepicker .ui-widget-header {
  background-image: none !important;
  filter: none !important;
  text-shadow: none;
}

/* --- Universal transition --------------------------------------- */
.btn,
a,
.badge,
.label,
.nav-pills > li > a,
.nav-stacked li a,
#main-nav > li > a,
#topbar #top-nav > ul > li > a,
.dropdown-menu li > a,
.pagination ul li a {
  transition: background-color 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease, color 0.15s ease;
}

/* =================================================================
   Section 1 + 3 - Buttons
   ================================================================= */

/* Base button */
.btn {
  border-radius: var(--mpo-radius-sm);
  padding: 7px 14px;
  font-weight: 500;
  border: 1px solid var(--mpo-border);
  background-color: var(--mpo-bg-white);
  color: var(--mpo-text);
  box-shadow: var(--mpo-shadow-sm);
  text-shadow: none;
}
.btn:hover,
.btn:focus {
  background-color: var(--mpo-bg);
  border-color: #cbd5e1;
  box-shadow: var(--mpo-shadow);
}

/* Primary */
.btn-primary,
.btn-primary:hover,
.btn-primary:focus,
.btn-primary:active,
.btn-primary.active,
.btn-primary.disabled,
.btn-primary[disabled] {
  color: #ffffff !important;
  border-color: transparent;
}
.btn-primary {
  background-color: var(--mpo-primary) !important;
  box-shadow: var(--mpo-shadow-sm);
}
.btn-primary:hover,
.btn-primary:focus {
  background-color: var(--mpo-primary-hover) !important;
  box-shadow: var(--mpo-shadow);
}
.btn-primary:active,
.btn-primary.active {
  background-color: var(--mpo-primary-hover) !important;
}

/* Secondary */
.btn-secondary,
.btn-secondary:hover,
.btn-secondary:focus,
.btn-secondary:active,
.btn-secondary.active,
.btn-secondary.disabled,
.btn-secondary[disabled] {
  color: #ffffff;
  border-color: transparent;
}
.btn-secondary {
  background-color: var(--mpo-secondary);
  box-shadow: var(--mpo-shadow-sm);
}
.btn-secondary:hover,
.btn-secondary:focus {
  background-color: var(--mpo-secondary-hover);
  box-shadow: var(--mpo-shadow);
}

/* Tertiary */
.btn-tertiary,
.btn-tertiary:hover,
.btn-tertiary:focus,
.btn-tertiary:active,
.btn-tertiary.active,
.btn-tertiary.disabled,
.btn-tertiary[disabled] {
  color: #ffffff;
  border-color: transparent;
}
.btn-tertiary {
  background-color: var(--mpo-tertiary);
}
.btn-tertiary:hover,
.btn-tertiary:focus {
  background-color: var(--mpo-tertiary-hover);
}

/* Success (Bootstrap) */
.btn-success {
  background-color: var(--mpo-success) !important;
  border-color: transparent;
  color: #ffffff;
}
.btn-success:hover,
.btn-success:focus {
  background-color: var(--mpo-success-hover) !important;
}

/* Info (Bootstrap) */
.btn-info {
  background-color: var(--mpo-info) !important;
  border-color: transparent;
  color: #ffffff;
}
.btn-info:hover,
.btn-info:focus {
  background-color: var(--mpo-info-hover) !important;
}

/* Warning (Bootstrap) */
.btn-warning {
  background-color: var(--mpo-warning) !important;
  border-color: transparent;
  color: #ffffff;
}
.btn-warning:hover,
.btn-warning:focus {
  background-color: var(--mpo-warning-hover) !important;
}

/* Danger (Bootstrap) */
.btn-danger {
  background-color: var(--mpo-danger) !important;
  border-color: transparent;
  color: #ffffff;
}
.btn-danger:hover,
.btn-danger:focus {
  background-color: var(--mpo-danger-hover) !important;
}

/* Inverse */
.btn-inverse {
  background-color: var(--mpo-text);
  border-color: transparent;
  color: #ffffff;
}
.btn-inverse:hover,
.btn-inverse:focus {
  background-color: #334155;
  color: #ffffff;
}

/* Disabled coloured buttons — gray out completely for clear at-a-glance distinction */
.btn-primary.disabled,
.btn-primary[disabled],
.btn-secondary.disabled,
.btn-secondary[disabled],
.btn-success.disabled,
.btn-success[disabled],
.btn-info.disabled,
.btn-info[disabled],
.btn-warning.disabled,
.btn-warning[disabled],
.btn-danger.disabled,
.btn-danger[disabled],
.btn-inverse.disabled,
.btn-inverse[disabled] {
  background-color: #cbd5e1 !important;
  color: #94a3b8 !important;
  border-color: transparent;
  opacity: 1;
  box-shadow: none;
}

/* Fix FA3 / Glyphicons conflict: Bootstrap 2 applies a Glyphicons sprite
   background to all [class^="icon-"] elements, but FA3 uses the same prefix
   and renders via ::before font glyphs. Both render, creating doubled icons. */
[class^="icon-"],
[class*=" icon-"] {
  background-image: none !important;
  background-position: 0 0 !important;
  width: auto;
  height: auto;
  margin-top: 0;
}
.btn [class^="icon-"],
.btn [class*=" icon-"] {
  vertical-align: baseline;
}

/* Preserve Bootstrap 2 btn-mini / btn-large sizing */
.btn-mini {
  padding: 2px 6px;
  font-size: 11px;
}
.btn-large {
  padding: 11px 19px;
  font-size: 16px;
}

/* Wizard Next button — primary action */
.btn-wizard-next {
  background-color: var(--mpo-primary) !important;
  border-color: transparent;
  color: #ffffff !important;
}
.btn-wizard-next:hover,
.btn-wizard-next:focus {
  background-color: var(--mpo-primary-hover) !important;
}

/* Wizard form-actions bar */
.fuelux .form-actions {
  background-color: var(--mpo-bg);
  border-top-color: var(--mpo-border);
}

/* =================================================================
   Section 1 + 3 - Topbar
   ================================================================= */
#topbar {
  background: var(--mpo-topbar-bg);
  border-bottom: 1px solid var(--mpo-border);
  padding: 10px 8px;
}
#topbar #top-nav > ul > li {
  color: var(--mpo-text-on-dark);
  font-size: 13px;
}
#topbar #top-nav > ul > li > a {
  color: var(--mpo-text-on-dark);
}
#topbar #top-nav > ul > li > a:hover {
  color: #ffffff;
}
#topbar #top-nav > ul > li > a > .caret {
  border-top-color: var(--mpo-text-on-dark);
}

/* =================================================================
   Section 4 - Header / Main Nav
   ================================================================= */
#header {
  background: var(--mpo-header-bg);
  border-bottom: 1px solid var(--mpo-border);
  box-shadow: var(--mpo-shadow-sm);
  /* Keep original height so logo and nav align */
  height: 69px;
}
#header .container {
  height: 70px;
  position: relative;
}
#header .nav-collapse {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
}
#main-nav {
  display: flex;
  align-items: stretch;
  height: 100%;
  margin: 0;
}
#main-nav > li {
  margin: 0;
  display: flex;
  align-items: stretch;
}
#main-nav > li > a,
#main-nav > li > a:hover,
#main-nav > li.open > a {
  color: var(--mpo-text-muted);
  background-color: transparent;
  background: transparent;
  border: none;
  border-bottom: 2px solid transparent;
  border-radius: 0;
  box-shadow: none;
  text-shadow: none;
  font-weight: 500;
  display: flex;
  align-items: center;
  padding: 0 14px;
  font-size: 14px;
}
#main-nav > li > a:hover,
#main-nav > li.open > a {
  color: var(--mpo-text);
  background-color: transparent;
  border-bottom-color: var(--mpo-border);
}
#main-nav > li.active > a {
  color: var(--mpo-primary);
  background: transparent;
  border-bottom: 2px solid var(--mpo-primary);
  font-weight: 600;
}
#main-nav > li > a [class^="icon-"],
#main-nav > li > a [class*=" icon-"] {
  font-size: 16px;
  vertical-align: middle;
  position: relative;
  top: -1px;
}
#main-nav .caret {
  border-top-color: var(--mpo-text-muted);
  opacity: 0.8;
}
#main-nav .active .dropdown-toggle .caret {
  border-top-color: var(--mpo-primary);
}

/* =================================================================
   Section 1 + 3 - Masthead
   Note: layout uses id="masthead no-print" (space in ID), so #masthead
   selectors never match. Use attribute or class selectors only.
   Only flex alignment is applied here — visual styling is left as-is
   since the original #masthead CSS rules also never matched.
   ================================================================= */
[id^="masthead"] {
  background: var(--mpo-bg);
  border-bottom: 1px solid var(--mpo-border);
}
.masthead-pad {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  min-height: 60px;
  padding: 5px 0;
}
.masthead-pad > .masthead-text {
  flex: 1;
}
.masthead-pad .masthead-text h2 {
  border-bottom: none;
  text-decoration: none;
  margin: 0;
}
.masthead-pad > .pull-right {
  float: none;
}
/* Restore original float:right visual order (reverse of DOM order) */
#daily_orders_lead_time      { order: 1; }
#daily_dinein_orders_lead_time { order: 2; }
#daily_delivery_orders_lead_time { order: 3; }
#orders_kds_button           { order: 4; }
#orders_screen_size          { order: 5; }
#menu_builder_menus          { order: 1; }

/* =================================================================
   Section 1 + 3 - Footer
   ================================================================= */
#footer {
  background: var(--mpo-footer-bg);
  border-top: 1px solid var(--mpo-border);
  box-shadow: none;
}

/* =================================================================
   Section 1 + 3 - Modals
   ================================================================= */
.modal {
  border: none;
  border-radius: var(--mpo-radius-lg);
  box-shadow: var(--mpo-shadow-lg);
}
.modal-header {
  background-color: var(--mpo-modal-header-bg);
  background: var(--mpo-modal-header-bg);
  border: none;
  border-bottom: 1px solid rgba(255,255,255,0.08);
  border-top-left-radius: var(--mpo-radius-lg);
  border-top-right-radius: var(--mpo-radius-lg);
  border-bottom-left-radius: 0;
  border-bottom-right-radius: 0;
  box-shadow: none;
  padding: 16px 20px;
}
.modal-header h3 {
  font-weight: 500;
  text-shadow: none;
}
.modal-header .close {
  text-shadow: none;
  opacity: 0.7;
}
.modal-header .close:hover {
  opacity: 1;
}
.modal-body {
  padding: 20px;
}
.modal-footer {
  border-radius: 0 0 var(--mpo-radius-lg) var(--mpo-radius-lg);
  border-top: 1px solid var(--mpo-border);
}
.modal-backdrop,
.modal-backdrop.fade.in {
  opacity: 0.35;
}

/* =================================================================
   Section 1 + 3 - Dropdowns
   ================================================================= */
.dropdown-menu {
  border: 1px solid var(--mpo-border);
  border-radius: var(--mpo-radius);
  box-shadow: var(--mpo-shadow-md);
}
.dropdown-menu li > a {
  border-radius: var(--mpo-radius-sm);
  font-size: 13px;
}
.dropdown-menu li > a:hover,
.dropdown-menu li > a:focus,
.dropdown-submenu:hover > a {
  background-color: var(--mpo-primary);
  background: var(--mpo-primary);
  color: #ffffff;
}

/* =================================================================
   Section 1 + 3 - Nav pills
   ================================================================= */
.nav-pills > li > a {
  border-radius: var(--mpo-radius-sm);
  color: var(--mpo-text);
  background-color: var(--mpo-bg);
}
.nav-pills > li > a:hover {
  background-color: var(--mpo-border);
  color: var(--mpo-text);
}
.nav-pills > li.active > a,
.nav-pills > li.active > a:hover {
  background-color: var(--mpo-primary);
  color: #ffffff;
}

/* =================================================================
   Section 4 - Nav stacked (sidebar tabs) - left-border accent
   ================================================================= */
.nav-stacked li a {
  color: var(--mpo-text-muted);
  font-weight: 500;
  background-color: var(--mpo-bg-white);
  border-radius: 0;
  border-left: 3px solid transparent;
  padding: 10px 15px;
}
.nav-stacked li a:hover {
  color: var(--mpo-text);
  background-color: var(--mpo-bg);
  border-left-color: var(--mpo-border);
}
.nav-stacked li.active a,
.nav-stacked li.active a:hover {
  color: var(--mpo-primary) !important;
  background-color: var(--mpo-primary-light) !important;
  border-left-color: var(--mpo-primary);
  text-shadow: none;
  font-weight: 600;
}
.nav-stacked .icon-chevron-right {
  color: var(--mpo-border);
}
.nav-stacked li.active .icon-chevron-right {
  color: var(--mpo-primary);
}
.nav-list > .active > a,
.nav-list > .active > a:hover {
  background-color: var(--mpo-primary);
  color: #ffffff;
}

/* =================================================================
   Section 1 + 3 - Accordion
   ================================================================= */
.accordion-group .accordion-heading {
  background-color: var(--mpo-bg);
  background: var(--mpo-bg);
  border: 1px solid var(--mpo-border);
  border-radius: var(--mpo-radius-sm);
  box-shadow: none;
  text-shadow: none;
}
.accordion-group .accordion-heading a {
  color: var(--mpo-text);
  font-weight: 500;
}
.accordion-group.open .accordion-heading {
  background-color: var(--mpo-primary);
  background: var(--mpo-primary);
  border-color: var(--mpo-primary);
  color: #ffffff;
  text-shadow: none;
}
.accordion-group.open .accordion-heading a {
  color: #ffffff;
}

/* =================================================================
   Section 1 + 3 - Breadcrumb
   ================================================================= */
.breadcrumb {
  background-color: var(--mpo-bg);
  background: var(--mpo-bg);
  border: 1px solid var(--mpo-border);
  border-radius: var(--mpo-radius-sm);
}

/* =================================================================
   Section 7 - Tables
   ================================================================= */
.table {
  border-collapse: separate;
  border-spacing: 0;
}
.table tbody tr td {
  padding-top: 12px;
  padding-bottom: 12px;
  border-top: 1px solid var(--mpo-border-light);
  vertical-align: middle;
}
/* Prevent date/time columns from wrapping */
.table .td-last-order,
.table td:has(.td-last-order) {
  white-space: nowrap;
}
/* Allow long emails/names to break gracefully */
.table .td-name {
  word-break: break-word;
}
.table-bordered {
  border: 1px solid var(--mpo-border);
  border-radius: var(--mpo-radius);
}
.table-bordered thead tr {
  background-color: var(--mpo-bg);
  background: var(--mpo-bg);
}
.table-bordered thead tr th,
.table-bordered thead th {
  color: var(--mpo-text-muted);
  font-weight: 600;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  border-left: 1px solid var(--mpo-border-light);
  border-right: none;
  border-bottom: 1px solid var(--mpo-border);
  box-shadow: none;
  padding-top: 10px;
  padding-bottom: 10px;
}
.table-bordered thead tr th:first-child {
  border-left: none;
}
.table-bordered tbody tr td {
  border-left: none;
  border-right: none;
  border-bottom: 1px solid var(--mpo-border-light);
}
.table-bordered tbody tr:last-child td {
  border-bottom: none;
}
/* Subtle alternate row tinting */
.table-striped tbody > tr:nth-child(odd) > td,
.table-striped tbody > tr:nth-child(odd) > th {
  background-color: var(--mpo-bg);
}
.table-striped tbody > tr:nth-child(even) > td,
.table-striped tbody > tr:nth-child(even) > th {
  background-color: var(--mpo-bg-white);
}

/* Highlight table variant */
.table-highlight.table-bordered thead tr {
  background-color: var(--mpo-modal-header-bg);
  background: var(--mpo-modal-header-bg);
}
.table-highlight.table-bordered thead th {
  text-shadow: none;
  border-left-color: rgba(255,255,255,0.06);
  box-shadow: none;
}
.table-highlight.table-bordered tbody tr:nth-child(odd) td,
.table-highlight.table-bordered tbody tr:nth-child(odd) th {
  background-color: var(--mpo-bg);
}

/* =================================================================
   Section 1 + 3 - Pagination
   ================================================================= */
.pagination ul li a {
  background-color: var(--mpo-bg-white);
  background: var(--mpo-bg-white);
  border: 1px solid var(--mpo-border);
  border-radius: var(--mpo-radius-sm);
  color: var(--mpo-text);
  text-shadow: none;
}
.pagination ul li a:hover {
  background-color: var(--mpo-bg);
  background: var(--mpo-bg);
  border-color: #cbd5e1;
  color: var(--mpo-text);
  text-shadow: none;
}
.pagination ul li.active a {
  background-color: var(--mpo-primary);
  background: var(--mpo-primary);
  border-color: var(--mpo-primary);
  color: #ffffff;
  box-shadow: none;
  text-shadow: none;
}

/* =================================================================
   Section 1 + 3 - Wells
   ================================================================= */
.well {
  background-color: var(--mpo-bg);
  border: 1px solid var(--mpo-border);
  border-radius: var(--mpo-radius);
  box-shadow: none;
}

/* =================================================================
   Section 9 - Labels & Badges (pill shape, chip pattern)
   ================================================================= */
.label {
  border-radius: var(--mpo-radius-pill);
  font-weight: 500;
  text-shadow: none;
  padding: 3px 8px;
  font-size: 11px;
}
.badge {
  text-shadow: none;
  border-radius: var(--mpo-radius-pill);
  font-weight: 500;
  padding: 3px 8px;
  font-size: 11px;
}

/* Chip-style tinted backgrounds (softer look) */
.label-success,
.badge-success {
  background-color: var(--mpo-success);
  color: #ffffff;
}
.label-warning,
.badge-warning {
  background-color: #fef3c7;
  color: #92400e;
}
.label-important,
.badge-important {
  background-color: #fee2e2;
  color: #991b1b;
}
.label-info,
.badge-info {
  background-color: #dbeafe;
  color: #1e40af;
}
.label-inverse,
.badge-inverse {
  background-color: var(--mpo-text);
  color: #ffffff;
}

/* Custom MPO variants */
.label.label-primary,
.badge.badge-primary {
  background-color: var(--mpo-success);
  color: #ffffff;
}
.label.label-secondary,
.badge.badge-secondary {
  background-color: #dbeafe;
  color: #1e40af;
}
.label.label-tertiary,
.badge.badge-tertiary {
  background-color: #f1f5f9;
  color: var(--mpo-text-muted);
}

/* Keep nav badge counts solid for visibility */
#main-nav .badge {
  background-color: var(--mpo-warning);
  color: #ffffff;
  padding: 2px 7px;
  font-size: 10px;
  margin-left: 4px;
}
#topbar .badge {
  padding: 2px 7px;
  font-size: 10px;
}
/* Keep the store status badge solid */
#topbar .badge-important {
  background-color: var(--mpo-danger);
  color: #ffffff;
}

/* =================================================================
   Section 1 + 3 - Alerts
   ================================================================= */
.alert {
  border-radius: var(--mpo-radius-sm);
  text-shadow: none;
}

/* =================================================================
   Section 1 + 3 - Progress bars
   ================================================================= */
.progress {
  border-radius: var(--mpo-radius-pill);
  box-shadow: none;
  background-color: var(--mpo-border);
}
.progress .bar {
  text-shadow: none;
  box-shadow: none;
}
.progress .bar,
.progress-primary .bar {
  background-color: var(--mpo-primary);
  background: var(--mpo-primary);
}
.progress-secondary .bar {
  background-color: var(--mpo-secondary);
  background: var(--mpo-secondary);
}
.progress-tertiary .bar {
  background-color: var(--mpo-tertiary);
  background: var(--mpo-tertiary);
}

/* =================================================================
   Section 5 - Form inputs (focus ring only — keep original sizing)
   ================================================================= */
input[type="text"],
input[type="password"],
input[type="email"],
input[type="url"],
input[type="search"],
input[type="tel"],
input[type="number"],
input[type="date"],
input[type="time"],
input[type="datetime-local"],
textarea,
select {
  border-color: var(--mpo-border);
  color: var(--mpo-text);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
input[type="text"]:focus,
input[type="password"]:focus,
input[type="email"]:focus,
input[type="url"]:focus,
input[type="search"]:focus,
input[type="tel"]:focus,
input[type="number"]:focus,
input[type="date"]:focus,
input[type="time"]:focus,
input[type="datetime-local"]:focus,
textarea:focus,
select:focus {
  border-color: var(--mpo-secondary);
  box-shadow: 0 0 0 3px var(--mpo-secondary-light);
  outline: none;
}
.control-label {
  font-weight: 500;
  color: var(--mpo-text);
}
/* Match button height to inputs in append/prepend groups */
.input-append .btn,
.input-prepend .btn {
  padding-top: 4px;
  padding-bottom: 4px;
}

/* Fulfilment lead time controls - vertically align buttons with text */
#daily_orders_lead_time > div,
#daily_dinein_orders_lead_time > div,
#daily_delivery_orders_lead_time > div {
  display: flex;
  align-items: center;
  gap: 8px;
}
#daily_orders_lead_time > div > .pull-left,
#daily_dinein_orders_lead_time > div > .pull-left,
#daily_delivery_orders_lead_time > div > .pull-left {
  float: none;
}

/* =================================================================
   Section 1 + 3 - Shortcuts (dashboard tiles)
   ================================================================= */
.shortcuts .shortcut {
  background-color: var(--mpo-bg-white);
  background: var(--mpo-bg-white);
  border: 1px solid var(--mpo-border);
  border-radius: var(--mpo-radius);
  box-shadow: var(--mpo-shadow-sm);
}
.shortcuts .shortcut:hover {
  background: var(--mpo-bg);
  box-shadow: var(--mpo-shadow);
  border-color: #cbd5e1;
}
.shortcuts .shortcut .shortcut-label {
  font-weight: 500;
  color: var(--mpo-text);
}
.shortcuts .shortcut .shortcut-icon {
  color: var(--mpo-primary);
}
.shortcuts .shortcut:hover .shortcut-icon {
  color: var(--mpo-primary-hover);
}

/* =================================================================
   Section 1 + 3 - Datepicker (jQuery UI)
   ================================================================= */
.ui-datepicker .ui-widget-header {
  background-color: var(--mpo-primary);
  background: var(--mpo-primary);
  border-color: var(--mpo-primary-hover);
  text-shadow: none;
  box-shadow: none;
}
.ui-datepicker td .ui-state-active {
  background: var(--mpo-primary);
  text-shadow: none;
}
.ui-datepicker td .ui-state-default:hover {
  background: var(--mpo-tertiary);
}
.ui-datepicker-today a {
  background-color: var(--mpo-tertiary);
}
.ui-datepicker-today a:hover {
  background-color: var(--mpo-primary);
}

/* =================================================================
   Section 1 + 3 - Sliders (jQuery UI)
   ================================================================= */
.ui-slider .ui-slider-range {
  text-shadow: none;
  box-shadow: none;
}
.ui-slider.slider-primary .ui-slider-range {
  background-color: var(--mpo-primary);
  background: var(--mpo-primary);
}
.ui-slider.slider-secondary .ui-slider-range {
  background-color: var(--mpo-secondary);
  background: var(--mpo-secondary);
}

/* =================================================================
   Section 1 + 3 - Login page
   ================================================================= */
body.login {
  font-family: 'Inter', 'Open Sans', arial, sans-serif;
  color: #94a3b8;
  background: #1e293b;
}
body.login h1 {
  color: var(--mpo-text);
  font-weight: 600;
  font-size: 24px;
}
.account-container {
  border-radius: var(--mpo-radius-lg);
  border: 1px solid var(--mpo-border);
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
  top: auto;
  margin-top: 80px;
}
/* Remove the "stacked cards" pseudo-element artifacts */
.account-container.stacked::before,
.account-container.stacked::after {
  display: none;
}
.account-container .content {
  padding: 32px 36px;
  color: var(--mpo-text);
}
.login-fields .field {
  margin-bottom: 1em;
}
.login-fields input,
.login-fields select {
  font-family: 'Inter', 'Open Sans', arial, sans-serif;
  font-size: 14px;
  color: var(--mpo-text);
  border: 1px solid var(--mpo-border);
  border-radius: var(--mpo-radius-sm);
  box-shadow: none;
  background-position: left center;
  padding: 9px 15px 9px 50px;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.login-fields .username-field,
.login-fields .password-field,
.login-fields .store-field {
  background-position: left center;
}
.login-fields input:focus,
.login-fields select:focus {
  border-color: var(--mpo-secondary);
  box-shadow: 0 0 0 3px var(--mpo-secondary-light);
  outline: none;
}
.login-actions .btn-primary {
  font-family: 'Inter', 'Open Sans', arial, sans-serif;
  font-size: 15px;
  font-weight: 600;
  padding: 10px 28px;
  border-radius: var(--mpo-radius-sm);
}
.login-extra {
  color: #94a3b8;
  font-size: 13px;
  margin: 2em auto;
  text-align: center;
  text-shadow: none;
}
.login-extra a {
  color: #cbd5e1;
}

/* =================================================================
   Section 1 + 3 - Validation
   ================================================================= */
.control-group span.error {
  border-radius: var(--mpo-radius-sm);
  text-shadow: none;
  background: var(--mpo-danger);
}
.control-group span.error::after {
  border-bottom-color: var(--mpo-danger);
}

/* =================================================================
   Section 1 + 3 - Order listing cards
   ================================================================= */
.order_listing {
  border: 1px solid var(--mpo-border);
  border-radius: var(--mpo-radius);
  box-shadow: var(--mpo-shadow);
}

/* =================================================================
   Section 1 + 3 - FAQ numbers
   ================================================================= */
.faq-container .faq-list li .faq-number {
  background: var(--mpo-primary);
  box-shadow: var(--mpo-shadow-sm);
  text-shadow: none;
}

/* =================================================================
   Section 1 + 3 - Pricing / Plans
   ================================================================= */
.plan-container.best-value .plan-header {
  background-color: var(--mpo-primary-hover);
}
.plan-container.best-value .plan-price {
  background-color: var(--mpo-primary);
}

/* =================================================================
   Menu Builder — prevent Available badges from wrapping
   ================================================================= */
.td-mi-available-for {
  white-space: nowrap;
}

/* =================================================================
   Responsive overrides
   ================================================================= */
@media (max-width: 767px) {
  #topbar {
    background: none;
    border-bottom: none;
  }
  #topbar #top-nav > ul > li a:hover {
    background: var(--mpo-primary);
    border-radius: var(--mpo-radius-sm);
  }
  /* Stack form inputs full-width on mobile */
  input[type="text"],
  input[type="password"],
  input[type="email"],
  input[type="search"],
  textarea,
  select {
    max-width: 100%;
  }
}

@media (max-width: 979px) {
  #header {
    height: auto;
  }
  #header .container {
    height: auto;
  }
  #header .nav-collapse {
    position: static;
    height: auto;
  }
  #header #main-nav {
    display: block;
    height: auto;
    margin-top: 0;
  }
  #header #main-nav > li {
    display: list-item;
  }
  #header #main-nav > li > a,
  #header #main-nav > li > a:hover {
    color: var(--mpo-text);
    background: none;
    border: none;
    border-bottom: none;
    border-radius: 0;
    box-shadow: none;
    padding: 10px 12px;
  }
  #header #main-nav > li.active > a {
    color: #ffffff;
    background: var(--mpo-primary);
    border-radius: var(--mpo-radius-sm);
    border-bottom: none;
  }
  #header #main-nav > li.active > a:hover {
    color: #ffffff;
    background: var(--mpo-primary);
  }
}
