/* MyFoods Design System Foundation */

:root {
  --mf-sys-font: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;

  --mf-sys-bg: #F7F2EA;
  --mf-sys-bg-soft: #FBF8F2;
  --mf-sys-surface: #FFFFFF;
  --mf-sys-surface-muted: #F3EEE6;
  --mf-sys-text: #1F2328;
  --mf-sys-muted: #5F6864;
  --mf-sys-slate: #27415A;
  --mf-sys-deep: #123D34;
  --mf-sys-green: #2F7D46;
  --mf-sys-sage: #7FA691;
  --mf-sys-border: #E7DDD2;
  --mf-sys-border-strong: #D8CCBF;
  --mf-sys-danger: #B42318;
  --mf-sys-warning: #8A5A16;
  --mf-sys-ring: rgba(47, 125, 70, .18);
  --mf-sys-shadow-soft: 0 10px 28px rgba(31, 35, 40, .06);
  --mf-sys-shadow-panel: 0 18px 48px rgba(31, 35, 40, .10);

  --mf-sys-display: clamp(44px, 4vw, 52px);
  --mf-sys-page-title: clamp(32px, 3vw, 38px);
  --mf-sys-section-title: clamp(24px, 2.2vw, 28px);
  --mf-sys-card-title: clamp(18px, 1.4vw, 20px);
  --mf-sys-modal-title: clamp(22px, 2vw, 26px);
  --mf-sys-body: clamp(15px, 1.1vw, 16px);
  --mf-sys-small: clamp(13px, .95vw, 14px);
  --mf-sys-label: 13px;
  --mf-sys-button: clamp(14px, 1vw, 15px);

  --font-body: var(--mf-sys-font);
  --font-display: var(--mf-sys-font);
  --mf-font-body: var(--mf-sys-font);
  --mf-font-display: var(--mf-sys-font);
  --mf-font-ui: var(--mf-sys-font);
  --mf-pft-font: var(--mf-sys-font);
  --mf-font: var(--mf-sys-font);
}

/* Admin mobile navigation and action menus */
@media (max-width: 900px) {
  body.mf-admin-authenticated .page-body {
    padding-bottom: calc(172px + env(safe-area-inset-bottom)) !important;
    scroll-padding-bottom: calc(172px + env(safe-area-inset-bottom)) !important;
  }

  body.mf-admin-authenticated .mobile-nav {
    position: fixed !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    z-index: 120 !important;
    display: grid !important;
    grid-template-columns: repeat(5, minmax(0, 1fr)) !important;
    gap: 4px !important;
    overflow: visible !important;
    padding: 8px 8px calc(8px + env(safe-area-inset-bottom)) !important;
    background: rgba(255, 255, 255, .98) !important;
    border-top: 1px solid var(--mf-sys-border) !important;
    box-shadow: 0 -10px 30px rgba(31, 35, 40, .10) !important;
  }

  body.mf-admin-authenticated .mobile-nav-item {
    min-width: 0 !important;
    max-width: none !important;
    min-height: 52px !important;
    padding: 7px 4px !important;
    border: 1px solid transparent !important;
    border-radius: 14px !important;
    background: transparent !important;
    box-shadow: none !important;
    white-space: normal !important;
    overflow: hidden !important;
  }

  body.mf-admin-authenticated .mobile-nav-item.active {
    color: var(--mf-sys-deep) !important;
    background: rgba(47, 125, 70, .10) !important;
    border-color: transparent !important;
    box-shadow: none !important;
  }

  body.mf-admin-authenticated .mobile-nav-item:focus-visible {
    outline: 2px solid rgba(47, 125, 70, .36) !important;
    outline-offset: 2px !important;
  }

  body.mf-admin-authenticated .mobile-nav-item:not(:focus-visible) {
    outline: 0 !important;
  }

  body.mf-admin-authenticated .mobile-nav-item span {
    display: block !important;
    max-width: 100% !important;
    color: inherit !important;
    font-size: 11px !important;
    line-height: 1.12 !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: clip !important;
  }

  body.mf-admin-authenticated .admin-more-panel {
    display: block !important;
    position: fixed !important;
    left: 0 !important;
    right: 0 !important;
    bottom: calc(72px + env(safe-area-inset-bottom)) !important;
    z-index: 130 !important;
    pointer-events: none !important;
  }

  body.mf-admin-authenticated .admin-more-menu {
    width: min(360px, calc(100vw - 24px)) !important;
    margin: 0 auto 10px !important;
    padding: 10px !important;
    border: 1px solid var(--mf-sys-border) !important;
    border-radius: 20px !important;
    background: var(--mf-sys-surface) !important;
    box-shadow: 0 18px 48px rgba(31, 35, 40, .22) !important;
    grid-template-columns: 1fr 1fr !important;
    gap: 8px !important;
    pointer-events: auto !important;
  }

  body.mf-admin-authenticated .admin-more-menu.is-open {
    display: grid !important;
  }

  body.mf-admin-authenticated .admin-more-item {
    min-height: 44px !important;
    border-radius: 14px !important;
    border: 1px solid var(--mf-sys-border) !important;
    background: #FFFFFF !important;
    color: var(--mf-sys-text) !important;
    font-size: 13px !important;
    font-weight: 700 !important;
  }

  body.mf-admin-authenticated .admin-mobile-list,
  body.mf-admin-authenticated .taxonomy-list,
  body.mf-admin-authenticated .site-setting-groups,
  body.mf-admin-authenticated .media-grid {
    padding-bottom: 28px !important;
  }

  body.mf-admin-authenticated .contact-card {
    grid-template-columns: minmax(0, 1fr) !important;
    min-width: 0 !important;
    overflow: hidden !important;
  }

  body.mf-admin-authenticated .contact-card > *,
  body.mf-admin-authenticated .contact-card-head,
  body.mf-admin-authenticated .contact-card-head > div {
    min-width: 0 !important;
    max-width: 100% !important;
  }

  body.mf-admin-authenticated .contact-card .admin-mobile-meta {
    max-width: 100% !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
  }

  body.mf-admin-authenticated .contact-card .contact-message {
    overflow-wrap: anywhere !important;
  }

  body.mf-admin-authenticated .contact-card .admin-row-actions {
    width: auto !important;
    max-width: 100% !important;
    min-width: 0 !important;
    justify-self: stretch !important;
    grid-template-columns: minmax(0, 1fr) !important;
  }

  body.mf-admin-authenticated .contact-card .admin-row-actions .admin-action-btn {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    box-sizing: border-box !important;
  }
}

/* Portal sidebar contrast: tricolor wordmark needs a light surface, not a dark rail. */
body.mf-admin-portal > .sidebar,
body.mf-business-portal > .sidebar,
body:not(.mf-admin-guest):has(.admin-main) > .sidebar,
body:not(.mf-business-guest):has(.business-main) > .sidebar {
  background: linear-gradient(180deg, #FBF8F2 0%, #F3EEE6 100%) !important;
  color: var(--mf-sys-text) !important;
  border-right: 1px solid var(--mf-sys-border-strong) !important;
  box-shadow: inset -1px 0 0 rgba(255,255,255,.72) !important;
}

body.mf-admin-portal > .sidebar .sidebar-logo,
body.mf-business-portal > .sidebar .sidebar-logo,
body:not(.mf-admin-guest):has(.admin-main) > .sidebar .sidebar-logo,
body:not(.mf-business-guest):has(.business-main) > .sidebar .sidebar-logo {
  background: transparent !important;
  border-bottom: 1px solid var(--mf-sys-border) !important;
}

body.mf-admin-portal > .sidebar .brand-logo-img,
body.mf-business-portal > .sidebar .brand-logo-img,
body:not(.mf-admin-guest):has(.admin-main) > .sidebar .brand-logo-img,
body:not(.mf-business-guest):has(.business-main) > .sidebar .brand-logo-img {
  background: transparent !important;
  border: 0 !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  padding: 0 !important;
  filter: none !important;
}

body.mf-admin-portal > .sidebar .logo-sub,
body.mf-admin-portal > .sidebar .brand-subtitle,
body.mf-business-portal > .sidebar .logo-sub,
body.mf-business-portal > .sidebar .brand-subtitle,
body.mf-business-portal > .sidebar small,
body:not(.mf-admin-guest):has(.admin-main) > .sidebar .logo-sub,
body:not(.mf-business-guest):has(.business-main) > .sidebar .brand-subtitle,
body:not(.mf-business-guest):has(.business-main) > .sidebar small {
  color: var(--mf-sys-slate) !important;
  opacity: 1 !important;
}

body.mf-admin-portal > .sidebar .nav-label,
body.mf-business-portal > .sidebar .nav-label,
body:not(.mf-admin-guest):has(.admin-main) > .sidebar .nav-label,
body:not(.mf-business-guest):has(.business-main) > .sidebar .nav-label {
  color: var(--mf-sys-slate) !important;
  opacity: .78 !important;
}

body.mf-admin-portal > .sidebar a,
body.mf-admin-portal > .sidebar button,
body.mf-admin-portal > .sidebar .nav-item,
body.mf-admin-portal > .sidebar .admin-pill,
body.mf-business-portal > .sidebar a,
body.mf-business-portal > .sidebar button,
body.mf-business-portal > .sidebar .nav-item,
body.mf-business-portal > .sidebar .betrieb-name,
body.mf-business-portal > .sidebar .betrieb-status,
body:not(.mf-admin-guest):has(.admin-main) > .sidebar a,
body:not(.mf-admin-guest):has(.admin-main) > .sidebar button,
body:not(.mf-admin-guest):has(.admin-main) > .sidebar .nav-item,
body:not(.mf-admin-guest):has(.admin-main) > .sidebar .admin-pill,
body:not(.mf-business-guest):has(.business-main) > .sidebar a,
body:not(.mf-business-guest):has(.business-main) > .sidebar button,
body:not(.mf-business-guest):has(.business-main) > .sidebar .nav-item,
body:not(.mf-business-guest):has(.business-main) > .sidebar .betrieb-name,
body:not(.mf-business-guest):has(.business-main) > .sidebar .betrieb-status {
  color: var(--mf-sys-text) !important;
  opacity: 1 !important;
}

body.mf-admin-portal > .sidebar .nav-item.active,
body.mf-admin-portal > .sidebar .nav-item:hover,
body.mf-business-portal > .sidebar .nav-item.active,
body.mf-business-portal > .sidebar .nav-item:hover,
body:not(.mf-admin-guest):has(.admin-main) > .sidebar .nav-item.active,
body:not(.mf-admin-guest):has(.admin-main) > .sidebar .nav-item:hover,
body:not(.mf-business-guest):has(.business-main) > .sidebar .nav-item.active,
body:not(.mf-business-guest):has(.business-main) > .sidebar .nav-item:hover {
  background: rgba(47,125,70,.08) !important;
  color: var(--mf-sys-deep) !important;
  border-color: transparent !important;
  box-shadow: inset 3px 0 0 rgba(47,125,70,.72) !important;
}

body.mf-admin-portal > .sidebar .nav-item:not(.active):focus:not(:focus-visible),
body.mf-business-portal > .sidebar .nav-item:not(.active):focus:not(:focus-visible) {
  outline: 0 !important;
  box-shadow: none !important;
}

body.mf-admin-portal > .sidebar .nav-badge,
body.mf-business-portal > .sidebar .nav-badge,
body:not(.mf-admin-guest):has(.admin-main) > .sidebar .nav-badge,
body:not(.mf-business-guest):has(.business-main) > .sidebar .nav-badge {
  background: var(--mf-sys-deep) !important;
  color: #FFFFFF !important;
}

html,
body {
  max-width: 100%;
  overflow-x: hidden;
}

body,
button,
input,
select,
textarea {
  font-family: var(--mf-sys-font) !important;
}

body {
  color: var(--mf-sys-text) !important;
  background: var(--mf-sys-bg) !important;
  font-size: var(--mf-sys-body) !important;
  line-height: 1.55 !important;
}

h1,
h2,
h3,
h4,
.hero h1,
.hero-title,
.mf-hero-title,
.page-title,
.topbar-title,
.card-title,
.section-title,
.modal-title,
.auth-title,
.customer-area-title,
.customer-panel-title,
.footer-title,
.footer-col-title,
.footer-brand-title,
.mf-guest-intro h1 {
  font-family: var(--mf-sys-font) !important;
  color: var(--mf-sys-text) !important;
  letter-spacing: -0.02em !important;
}

.hero h1,
.mf-hero-title,
.hero-title {
  font-size: var(--mf-sys-display) !important;
  font-weight: 680 !important;
  line-height: 1.08 !important;
}

h1,
.page-title,
.admin-section-head h2,
.topbar-title {
  font-size: var(--mf-sys-page-title) !important;
  font-weight: 680 !important;
  line-height: 1.15 !important;
}

h2,
.section-title {
  font-size: var(--mf-sys-section-title) !important;
  font-weight: 650 !important;
  line-height: 1.2 !important;
}

h3,
.card-title,
.customer-panel-title,
.business-form-section-title {
  font-size: var(--mf-sys-card-title) !important;
  font-weight: 650 !important;
  line-height: 1.25 !important;
}

.modal-title,
.auth-title {
  font-size: var(--mf-sys-modal-title) !important;
  font-weight: 680 !important;
  line-height: 1.15 !important;
}

p,
li,
.hero-sub,
.auth-sub,
.modal-subtitle,
.footer-copy,
.admin-layout-note,
.customer-panel-sub,
.mf-muted,
.muted,
.text-muted {
  font-size: var(--mf-sys-body) !important;
  font-weight: 400 !important;
  line-height: 1.55 !important;
}

.mf-admin-portal .admin-layout-note {
  border: 0 !important;
  outline: 0 !important;
  box-shadow: none !important;
  background: transparent !important;
  padding: 0 !important;
}

small,
.small,
.form-hint,
.admin-mobile-meta,
.footer-note,
.footer-bottom,
.site-footer-bottom,
.kpi-label,
.stat-label,
.metric-label {
  font-size: var(--mf-sys-small) !important;
  font-weight: 400 !important;
  line-height: 1.45 !important;
}

label,
.form-label,
.field label {
  color: var(--mf-sys-slate) !important;
  font-size: var(--mf-sys-label) !important;
  font-weight: 600 !important;
  line-height: 1.3 !important;
}

.btn,
button,
.button,
.primary-btn,
.btn-primary,
.btn-outline,
.btn-ghost,
.map-link {
  font-family: var(--mf-sys-font) !important;
  font-size: var(--mf-sys-button) !important;
  font-weight: 650 !important;
  line-height: 1.2 !important;
  min-height: 42px !important;
  border-radius: 14px !important;
}

.btn-primary,
.primary-btn,
.button,
button[type="submit"] {
  background: var(--mf-sys-deep) !important;
  border-color: var(--mf-sys-deep) !important;
  color: #FFFFFF !important;
}

.btn-primary:hover,
.primary-btn:hover,
.button:hover,
button[type="submit"]:hover {
  background: var(--mf-sys-green) !important;
  border-color: var(--mf-sys-green) !important;
  color: #FFFFFF !important;
}

.btn-outline {
  background: var(--mf-sys-surface) !important;
  border: 1px solid var(--mf-sys-border-strong) !important;
  color: var(--mf-sys-deep) !important;
}

.btn-ghost {
  background: transparent !important;
  border-color: transparent !important;
  color: var(--mf-sys-deep) !important;
}

input,
select,
textarea,
.form-input,
.form-select,
.form-control,
.field input,
.field select,
.field textarea {
  font-family: var(--mf-sys-font) !important;
  color: var(--mf-sys-text) !important;
  -webkit-text-fill-color: var(--mf-sys-text) !important;
  background: var(--mf-sys-surface) !important;
  border: 1px solid var(--mf-sys-border-strong) !important;
  border-radius: 14px !important;
  box-shadow: none !important;
  min-height: 46px !important;
  font-size: 15px !important;
  line-height: 1.35 !important;
}

input:focus,
select:focus,
textarea:focus,
.form-input:focus,
.field input:focus,
.field select:focus,
.field textarea:focus {
  outline: 0 !important;
  border-color: var(--mf-sys-green) !important;
  box-shadow: 0 0 0 3px var(--mf-sys-ring) !important;
}

input::placeholder,
textarea::placeholder {
  color: #69736F !important;
  opacity: 1 !important;
}

.topbar-search,
.hero-search,
.search-bar,
.contact-search,
.search-input-wrap {
  position: relative !important;
  display: flex !important;
  align-items: center !important;
  gap: 10px !important;
  background: var(--mf-sys-surface) !important;
  border: 1px solid var(--mf-sys-border-strong) !important;
  border-radius: 999px !important;
  box-shadow: 0 10px 26px rgba(31, 35, 40, .055) !important;
  outline: 0 !important;
  overflow: hidden !important;
}

.hero-search {
  min-height: 64px !important;
  padding: 6px !important;
}

.topbar-search,
.search-bar {
  min-height: 48px !important;
}

.topbar-search::before,
.hero-search::before,
.search-bar::before,
.contact-search::before {
  content: none !important;
}

.topbar-search:focus-within,
.hero-search:focus-within,
.search-bar:focus-within,
.contact-search:focus-within {
  border-color: var(--mf-sys-green) !important;
  box-shadow: 0 0 0 3px var(--mf-sys-ring), 0 10px 26px rgba(31, 35, 40, .055) !important;
}

.topbar-search input,
.hero-search input,
.search-bar input,
.contact-search input,
.search-input-wrap input,
input[type="search"] {
  flex: 1 1 auto !important;
  min-width: 0 !important;
  min-height: 46px !important;
  background: transparent !important;
  border: 0 !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  outline: 0 !important;
  padding: 0 14px !important;
}

.hero-search .btn,
.hero-search button,
.topbar-search .btn,
.topbar-search button {
  flex: 0 0 auto !important;
  min-height: 50px !important;
  padding: 0 24px !important;
  border-radius: 999px !important;
}

@media (min-width: 1200px) {
  .mf-home-hero-inner,
  .hero-inner {
    max-width: 1280px !important;
  }

  .main {
    max-width: 1280px !important;
    padding-inline: clamp(32px, 4.5vw, 72px) !important;
  }

  .restaurant-grid {
    gap: 24px !important;
  }
}

.card,
.admin-card,
.business-card,
.dashboard-card,
.panel,
.section-card,
.kpi-card,
.stat-card,
.settings-card,
.profile-card,
.menu-card,
.order-card,
.cms-card,
.media-card,
.customer-area-card,
.customer-panel-card,
.restaurant-card,
.content-card,
.hero-card {
  background: var(--mf-sys-surface) !important;
  border: 1px solid var(--mf-sys-border) !important;
  border-radius: 22px !important;
  box-shadow: var(--mf-sys-shadow-soft) !important;
}

.modal-overlay,
.auth-overlay,
#authOverlay,
#addressOverlay {
  background: rgba(15, 23, 42, .42) !important;
  backdrop-filter: blur(4px) !important;
}

.modal,
.auth-card {
  background: var(--mf-sys-surface) !important;
  border: 1px solid var(--mf-sys-border) !important;
  border-radius: 24px !important;
  box-shadow: var(--mf-sys-shadow-panel) !important;
}

.logo,
.footer-brand-logo,
.auth-logo,
.sidebar-logo,
.modal-title-block,
.mf-mobile-business-brand,
.mf-portal-mobile-brand {
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
  padding: 0 !important;
}

.modal-subtitle {
  white-space: normal !important;
  overflow: visible !important;
  text-overflow: clip !important;
  max-width: 100% !important;
}

.logo img,
.footer-brand-logo img,
.auth-logo img,
.sidebar-logo img,
.modal-title-block img,
.modal-brand-mark,
.brand-logo-img,
.mf-mobile-business-brand img,
.mf-portal-mobile-brand img,
footer .logo img,
.site-footer .logo img {
  content: url("/assets/brand/myfoods-logo-tricolor.svg") !important;
  display: block !important;
  width: auto !important;
  max-width: 190px !important;
  height: auto !important;
  max-height: 42px !important;
  object-fit: contain !important;
  object-position: left center !important;
  background: transparent !important;
  border: 0 !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  outline: 0 !important;
  padding: 0 !important;
}

.sidebar-logo .brand-logo-img,
.sidebar-logo img {
  max-width: 168px !important;
}

footer,
.footer,
.site-footer {
  position: relative !important;
  background: linear-gradient(180deg, #FCFAF6 0%, #F3EEE6 100%) !important;
  color: var(--mf-sys-text) !important;
  border-top: 1px solid var(--mf-sys-border-strong) !important;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .78) !important;
}

.site-footer {
  padding: 44px clamp(22px, 4.5vw, 64px) 22px !important;
}

.footer-inner,
.site-footer-inner {
  width: min(1240px, 100%) !important;
  max-width: 1240px !important;
  margin-inline: auto !important;
  display: grid !important;
  grid-template-columns: minmax(300px, 1.2fr) repeat(3, minmax(170px, .75fr)) !important;
  gap: clamp(24px, 3.2vw, 44px) !important;
  align-items: start !important;
}

footer h1,
footer h2,
footer h3,
footer h4,
footer .footer-title,
footer .footer-col-title,
footer .footer-brand-title,
.site-footer h1,
.site-footer h2,
.site-footer h3,
.site-footer h4,
.site-footer .footer-title,
.site-footer .footer-col-title,
.site-footer .footer-brand-title {
  color: var(--mf-sys-slate) !important;
  font-size: 14px !important;
  font-weight: 700 !important;
  line-height: 1.25 !important;
  letter-spacing: .08em !important;
  text-transform: uppercase !important;
  margin: 0 0 14px !important;
}

.footer-copy,
.footer-copy *,
footer p,
footer small,
.site-footer p,
.site-footer small {
  color: #33413C !important;
  font-size: 15.5px !important;
  line-height: 1.55 !important;
}

.footer-links {
  display: grid !important;
  gap: 7px !important;
}

.footer-links a,
footer a,
.site-footer a {
  color: var(--mf-sys-deep) !important;
  font-size: 15.5px !important;
  font-weight: 600 !important;
  line-height: 1.35 !important;
  min-height: 36px !important;
}

.footer-note,
.footer-bottom,
.site-footer-bottom {
  color: var(--mf-sys-muted) !important;
  border-top: 1px solid rgba(39, 65, 90, .16) !important;
  font-size: 0 !important;
  margin-top: 20px !important;
  padding-top: 16px !important;
}

.footer-note::before,
.footer-bottom::before,
.site-footer-bottom::before {
  content: "\00A9 MyFoods.ch" !important;
  color: var(--mf-sys-muted) !important;
  font-size: 14px !important;
  line-height: 1.45 !important;
}

body.mf-business-guest,
body.mf-admin-guest {
  background:
    radial-gradient(circle at 12% 0%, rgba(127, 166, 145, .24), transparent 30%),
    radial-gradient(circle at 88% 18%, rgba(47, 125, 70, .12), transparent 28%),
    linear-gradient(135deg, #FBF8F2 0%, #F5EEE3 100%) !important;
}

body.mf-business-guest #authModal,
body.mf-admin-guest #adminLoginModal {
  position: fixed !important;
  inset: 0 !important;
  display: grid !important;
  align-items: center !important;
  justify-content: center !important;
  min-height: 100dvh !important;
  width: 100vw !important;
  max-width: 100vw !important;
  padding: clamp(22px, 4vw, 56px) !important;
  background: transparent !important;
  backdrop-filter: none !important;
  overflow-x: hidden !important;
  overflow-y: auto !important;
}

body.mf-business-guest #authModal {
  grid-template-columns: minmax(320px, 520px) minmax(460px, 520px) !important;
  gap: clamp(26px, 5vw, 56px) !important;
}

body.mf-admin-guest #adminLoginModal {
  grid-template-columns: minmax(300px, 520px) !important;
  gap: 18px !important;
}

body.mf-business-guest #authModal .modal,
body.mf-admin-guest #adminLoginModal .modal {
  margin: 0 auto !important;
  justify-self: center !important;
}

body.mf-business-guest #authModal .modal {
  width: min(100%, 520px) !important;
  max-width: 520px !important;
}

body.mf-admin-guest #adminLoginModal .modal {
  width: min(100%, 460px) !important;
  max-width: 460px !important;
}

body.mf-business-guest #authModal .modal-header {
  align-items: flex-start !important;
}

body.mf-business-guest #authModal .modal-title-block {
  width: 100% !important;
  align-items: flex-start !important;
}

.mf-guest-intro {
  color: var(--mf-sys-text) !important;
  max-width: 500px !important;
}

body.mf-admin-guest .mf-guest-intro {
  text-align: center !important;
  margin: 0 auto 4px !important;
}

.mf-guest-intro h1 {
  margin: 16px 0 12px !important;
  color: var(--mf-sys-text) !important;
  font-size: clamp(30px, 3.1vw, 38px) !important;
  font-weight: 680 !important;
  line-height: 1.15 !important;
  letter-spacing: -0.03em !important;
}

body.mf-admin-guest .mf-guest-intro h1 {
  font-size: clamp(28px, 2.6vw, 34px) !important;
}

.mf-guest-intro p {
  max-width: 46ch !important;
  margin: 0 !important;
  color: #33413C !important;
  font-size: 15px !important;
  line-height: 1.55 !important;
}

body.mf-admin-guest .mf-guest-intro p {
  margin-inline: auto !important;
}

body.mf-admin-guest .mf-admin-guest-intro img,
body.mf-admin-guest .mf-admin-guest-intro .mf-guest-points {
  display: none !important;
}

.mf-guest-kicker {
  min-height: 32px !important;
  color: var(--mf-sys-deep) !important;
  font-size: 13px !important;
  font-weight: 700 !important;
  letter-spacing: .07em !important;
}

.mf-guest-points li {
  color: var(--mf-sys-slate) !important;
  font-size: 15px !important;
  font-weight: 500 !important;
  line-height: 1.45 !important;
}

body.mf-business-guest #authModal .modal-close,
body.mf-business-guest #authModal .form-actions .btn-ghost,
body.mf-business-guest #authModal .form-actions button:first-child,
body.mf-admin-guest #toast.show,
body.mf-admin-guest .toast.show {
  display: none !important;
}

body.mf-admin-guest #adminLoginEmail:not(:focus-visible) {
  border-color: var(--mf-sys-border-strong) !important;
  box-shadow: none !important;
}

.kpi-value,
.stat-value,
.metric-value,
.dashboard-card .value,
.card-value {
  font-family: var(--mf-sys-font) !important;
  color: var(--mf-sys-slate) !important;
  font-size: clamp(24px, 2.4vw, 32px) !important;
  font-weight: 680 !important;
  line-height: 1 !important;
}

.admin-business-name,
.admin-mobile-section-label,
.nav-label,
.nav-item.active,
.badge,
.admin-pill,
.nav-badge,
.map-link {
  font-weight: 700 !important;
}

@media (max-width: 768px) {
  .topbar-search {
    display: none !important;
  }

  .hero h1,
  .mf-hero-title,
  .hero-title {
    font-size: clamp(32px, 9vw, 38px) !important;
    line-height: 1.08 !important;
  }

  h1,
  .page-title,
  .topbar-title {
    font-size: clamp(26px, 7vw, 30px) !important;
  }

  h2,
  .section-title {
    font-size: clamp(21px, 5.8vw, 24px) !important;
  }

  .hero-search {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) auto !important;
    min-height: auto !important;
    padding: 6px !important;
    border-radius: 22px !important;
  }

  .hero-search input,
  .hero-search input:focus,
  .hero-search input:focus-visible {
    min-height: 46px !important;
    padding: 0 12px !important;
  }

  .hero-search .btn,
  .hero-search button {
    min-width: 104px !important;
    max-width: 130px !important;
    min-height: 46px !important;
    padding: 0 13px !important;
  }

  .footer-inner,
  .site-footer-inner {
    grid-template-columns: 1fr !important;
    gap: 16px !important;
  }

  .site-footer {
    padding: 32px 18px 18px !important;
  }

  body.mf-business-guest #authModal,
  body.mf-admin-guest #adminLoginModal {
    grid-template-columns: 1fr !important;
    align-items: start !important;
    padding: 16px 14px max(24px, env(safe-area-inset-bottom)) !important;
    gap: 12px !important;
  }

  .mf-guest-intro {
    max-width: none !important;
  }

  .mf-guest-intro h1,
  body.mf-admin-guest .mf-guest-intro h1 {
    font-size: clamp(28px, 8vw, 34px) !important;
    line-height: 1.14 !important;
    margin: 10px 0 8px !important;
  }

  .mf-guest-intro p,
  .mf-guest-points li {
    font-size: 14px !important;
  }

  body.mf-business-guest .mf-guest-points {
    display: none !important;
  }

  body.mf-business-guest #authModal .modal,
  body.mf-admin-guest #adminLoginModal .modal {
    width: 100% !important;
    max-width: none !important;
    border-radius: 22px !important;
  }
}

/* Customer Account Shell
   The logged-in customer area is a full account workspace, not a narrow auth modal. */
#customerAreaOverlay.customer-account-overlay {
  position: fixed !important;
  inset: 0 !important;
  display: none !important;
  align-items: center !important;
  justify-content: center !important;
  width: 100vw !important;
  height: 100dvh !important;
  padding: clamp(16px, 3vw, 32px) !important;
  overflow-x: hidden !important;
  overflow-y: auto !important;
  background: rgba(15, 23, 42, .34) !important;
  backdrop-filter: blur(3px) !important;
  -webkit-backdrop-filter: blur(3px) !important;
}

#customerAreaOverlay.customer-account-overlay.open {
  display: flex !important;
}

#customerAreaOverlay .customer-area-card,
#customerAreaOverlay .customer-account-shell {
  width: min(1280px, calc(100vw - 48px)) !important;
  min-width: 0 !important;
  height: min(860px, calc(100dvh - 48px)) !important;
  min-height: min(720px, calc(100dvh - 48px)) !important;
  max-height: calc(100dvh - 48px) !important;
  margin: 0 auto !important;
  padding: 0 !important;
  display: flex !important;
  flex-direction: column !important;
  overflow: hidden !important;
  background: #FFFFFF !important;
  border: 1px solid var(--mf-sys-border) !important;
  border-radius: 28px !important;
  box-shadow: 0 32px 92px rgba(31, 35, 40, .26) !important;
  transform: none !important;
}

#customerAreaOverlay .customer-area-header {
  flex: 0 0 auto !important;
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 18px !important;
  min-width: 0 !important;
  padding: 24px clamp(24px, 3vw, 34px) !important;
  border-bottom: 1px solid var(--mf-sys-border) !important;
  background: linear-gradient(180deg, #FFFFFF 0%, #FCFAF6 100%) !important;
}

#customerAreaOverlay .customer-area-title {
  color: var(--mf-sys-text) !important;
  font-size: clamp(26px, 2.2vw, 34px) !important;
  font-weight: 680 !important;
  line-height: 1.12 !important;
  letter-spacing: -.025em !important;
}

#customerAreaOverlay .customer-area-sub {
  max-width: 72ch !important;
  margin-top: 6px !important;
  color: var(--mf-sys-muted) !important;
  font-size: 15px !important;
  line-height: 1.45 !important;
  white-space: normal !important;
  overflow-wrap: anywhere !important;
}

#customerAreaOverlay .customer-area-close {
  flex: 0 0 auto !important;
  min-width: 108px !important;
}

#customerAreaOverlay .customer-area-body {
  flex: 1 1 auto !important;
  min-height: 0 !important;
  min-width: 0 !important;
  display: grid !important;
  grid-template-columns: minmax(220px, 250px) minmax(0, 1fr) !important;
  overflow: hidden !important;
  background: #F8F3EA !important;
}

#customerAreaOverlay .customer-area-nav {
  min-width: 0 !important;
  padding: 22px !important;
  display: flex !important;
  flex-direction: column !important;
  gap: 10px !important;
  overflow-x: hidden !important;
  overflow-y: auto !important;
  background: #F3EEE6 !important;
  border-right: 1px solid var(--mf-sys-border) !important;
  border-bottom: 0 !important;
}

#customerAreaOverlay .customer-area-tab {
  width: 100% !important;
  min-width: 0 !important;
  min-height: 48px !important;
  padding: 0 16px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 10px !important;
  color: var(--mf-sys-slate) !important;
  background: transparent !important;
  border: 1px solid transparent !important;
  border-radius: 16px !important;
  box-shadow: none !important;
  text-align: left !important;
  white-space: normal !important;
}

#customerAreaOverlay .customer-area-tab span:first-child {
  min-width: 0 !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  color: inherit !important;
}

#customerAreaOverlay .customer-area-tab.active {
  color: var(--mf-sys-deep) !important;
  background: #FFFFFF !important;
  border-color: var(--mf-sys-border-strong) !important;
  box-shadow: 0 10px 24px rgba(31, 35, 40, .07) !important;
}

#customerAreaOverlay .customer-area-panel {
  min-width: 0 !important;
  width: 100% !important;
  overflow-x: hidden !important;
  overflow-y: auto !important;
  padding: clamp(22px, 3vw, 34px) !important;
  outline: 0 !important;
  scrollbar-gutter: stable !important;
}

#customerAreaOverlay .customer-panel-grid {
  width: 100% !important;
  min-width: 0 !important;
  display: grid !important;
  grid-template-columns: repeat(auto-fit, minmax(min(360px, 100%), 1fr)) !important;
  gap: 20px !important;
  align-items: stretch !important;
  overflow: visible !important;
}

#customerAreaOverlay .customer-panel-card,
#customerAreaOverlay .order-history-card,
#customerAreaOverlay .address-card,
#customerAreaOverlay .order-history-empty,
#customerAreaOverlay .account-empty {
  min-width: 0 !important;
  max-width: 100% !important;
  overflow-x: hidden !important;
  overflow-wrap: anywhere !important;
  word-break: normal !important;
}

#customerAreaOverlay .customer-panel-card {
  padding: clamp(20px, 2.5vw, 28px) !important;
  border-radius: 22px !important;
}

#customerAreaOverlay .customer-panel-card.full,
#customerAreaOverlay .customer-security-password,
#customerAreaOverlay .customer-security-recovery {
  grid-column: 1 / -1 !important;
}

#customerAreaOverlay .customer-panel-title {
  margin-bottom: 8px !important;
  color: var(--mf-sys-text) !important;
  font-size: clamp(18px, 1.6vw, 21px) !important;
}

#customerAreaOverlay .customer-panel-sub {
  margin: 0 0 18px !important;
  color: var(--mf-sys-muted) !important;
  font-size: 15px !important;
  line-height: 1.55 !important;
  overflow-wrap: anywhere !important;
}

#customerAreaOverlay .customer-summary-list {
  display: grid !important;
  gap: 12px !important;
  margin: 0 !important;
}

#customerAreaOverlay .customer-summary-list > div {
  display: grid !important;
  grid-template-columns: minmax(110px, .42fr) minmax(0, 1fr) !important;
  gap: 14px !important;
  align-items: start !important;
  padding: 12px 0 !important;
  border-bottom: 1px solid rgba(216, 204, 191, .72) !important;
}

#customerAreaOverlay .customer-summary-list > div:last-child {
  border-bottom: 0 !important;
}

#customerAreaOverlay .customer-summary-list dt {
  margin: 0 !important;
  color: var(--mf-sys-muted) !important;
  font-size: 13px !important;
  font-weight: 700 !important;
}

#customerAreaOverlay .customer-summary-list dd,
#customerAreaOverlay .customer-value {
  min-width: 0 !important;
  margin: 0 !important;
  color: var(--mf-sys-text) !important;
  font-size: 15px !important;
  font-weight: 600 !important;
  overflow-wrap: anywhere !important;
}

#customerAreaOverlay .account-form-grid,
#customerAreaOverlay .customer-form-grid {
  width: 100% !important;
  display: grid !important;
  grid-template-columns: repeat(2, minmax(280px, 1fr)) !important;
  gap: 18px !important;
}

#customerAreaOverlay .form-group,
#customerAreaOverlay .field,
#customerAreaOverlay .settings-row {
  min-width: 0 !important;
}

#customerAreaOverlay .form-input,
#customerAreaOverlay input,
#customerAreaOverlay select,
#customerAreaOverlay textarea {
  width: 100% !important;
  min-width: 0 !important;
  max-width: 100% !important;
}

#customerAreaOverlay input[type="checkbox"],
#customerAreaOverlay input[type="radio"] {
  width: 20px !important;
  min-width: 20px !important;
  max-width: 20px !important;
  height: 20px !important;
  min-height: 20px !important;
  flex: 0 0 20px !important;
  margin-top: 2px !important;
}

#customerAreaOverlay .customer-email-input {
  text-overflow: ellipsis !important;
}

#customerAreaOverlay .account-actions,
#customerAreaOverlay .address-actions,
#customerAreaOverlay .order-history-footer {
  min-width: 0 !important;
  display: flex !important;
  flex-wrap: wrap !important;
  gap: 10px !important;
  align-items: center !important;
}

#customerAreaOverlay .account-actions .btn,
#customerAreaOverlay .address-actions .btn,
#customerAreaOverlay .order-history-footer .btn {
  flex: 0 1 auto !important;
  max-width: 100% !important;
  white-space: normal !important;
  text-align: center !important;
}

#customerAreaOverlay .address-list,
#customerAreaOverlay .order-history-list {
  width: 100% !important;
  display: grid !important;
  gap: 16px !important;
  overflow: visible !important;
}

#customerAreaOverlay .address-card {
  padding: 18px !important;
  background: #FFFFFF !important;
  border-radius: 18px !important;
}

#customerAreaOverlay .address-head,
#customerAreaOverlay .order-history-head {
  min-width: 0 !important;
  display: flex !important;
  align-items: flex-start !important;
  justify-content: space-between !important;
  gap: 16px !important;
}

#customerAreaOverlay .address-head > div,
#customerAreaOverlay .order-history-head > div {
  min-width: 0 !important;
}

#customerAreaOverlay .address-title,
#customerAreaOverlay .address-sub,
#customerAreaOverlay .order-history-title,
#customerAreaOverlay .order-history-sub,
#customerAreaOverlay .order-history-items {
  max-width: 100% !important;
  overflow-wrap: anywhere !important;
}

#customerAreaOverlay .customer-security-grid {
  grid-template-columns: minmax(0, 1fr) !important;
}

#customerAreaOverlay .security-alert,
#customerAreaOverlay .security-rule-list,
#customerAreaOverlay .account-empty,
#customerAreaOverlay .order-history-empty {
  max-width: 100% !important;
  color: var(--mf-sys-text) !important;
  line-height: 1.55 !important;
}

@media (max-width: 1080px) {
  #customerAreaOverlay .customer-area-body {
    grid-template-columns: 1fr !important;
    grid-template-rows: auto minmax(0, 1fr) !important;
  }

  #customerAreaOverlay .customer-area-nav {
    display: grid !important;
    grid-template-columns: repeat(auto-fit, minmax(128px, 1fr)) !important;
    padding: 14px clamp(16px, 3vw, 24px) !important;
    border-right: 0 !important;
    border-bottom: 1px solid var(--mf-sys-border) !important;
    overflow: visible !important;
  }
}

@media (max-width: 720px) {
  #customerAreaOverlay.customer-account-overlay {
    align-items: stretch !important;
    padding: 0 !important;
  }

  #customerAreaOverlay .customer-area-card,
  #customerAreaOverlay .customer-account-shell {
    width: 100vw !important;
    height: 100dvh !important;
    min-height: 100dvh !important;
    max-height: 100dvh !important;
    border-radius: 0 !important;
    border: 0 !important;
  }

  #customerAreaOverlay .customer-area-header {
    padding: 16px 16px 14px !important;
    align-items: flex-start !important;
  }

  #customerAreaOverlay .customer-area-title {
    font-size: 24px !important;
  }

  #customerAreaOverlay .customer-area-sub {
    font-size: 13.5px !important;
  }

  #customerAreaOverlay .customer-area-close {
    min-width: 44px !important;
    min-height: 44px !important;
    padding: 0 12px !important;
  }

  #customerAreaOverlay .customer-area-nav {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 8px !important;
    padding: 12px !important;
  }

  #customerAreaOverlay .customer-area-tab {
    min-height: 44px !important;
    padding: 0 10px !important;
    justify-content: center !important;
    text-align: center !important;
  }

  #customerAreaOverlay .customer-area-tab span:first-child {
    text-overflow: clip !important;
  }

  #customerAreaOverlay .customer-area-panel {
    padding: 16px 14px 28px !important;
    scrollbar-gutter: auto !important;
  }

  #customerAreaOverlay .customer-panel-grid,
  #customerAreaOverlay .account-form-grid,
  #customerAreaOverlay .customer-form-grid {
    grid-template-columns: 1fr !important;
    gap: 14px !important;
  }

  #customerAreaOverlay .customer-panel-card {
    padding: 18px !important;
    border-radius: 18px !important;
  }

  #customerAreaOverlay .customer-summary-list > div {
    grid-template-columns: 1fr !important;
    gap: 4px !important;
  }

  #customerAreaOverlay .address-head,
  #customerAreaOverlay .order-history-head,
  #customerAreaOverlay .order-history-footer {
    display: grid !important;
    grid-template-columns: 1fr !important;
  }

  #customerAreaOverlay .address-actions,
  #customerAreaOverlay .account-actions {
    display: grid !important;
    grid-template-columns: 1fr !important;
    width: 100% !important;
  }

  #customerAreaOverlay .address-actions .btn,
  #customerAreaOverlay .account-actions .btn {
    width: 100% !important;
  }
}

/* Production media upload and public image display */
.mf-media-controls {
  display: grid;
  grid-template-columns: repeat(2, minmax(260px, 1fr));
  gap: 18px;
  margin-bottom: 24px;
}

.mf-media-card,
.mf-dish-media-panel {
  display: grid;
  gap: 14px;
  padding: 18px;
  border: 1px solid var(--mf-sys-border, #D8E3D7);
  border-radius: 20px;
  background: #FFFFFF;
}

.mf-dish-media-panel {
  grid-template-columns: 148px minmax(0, 1fr);
  align-items: start;
  margin: 16px 0;
}

.mf-media-preview {
  width: 100%;
  min-height: 132px;
  display: grid;
  place-items: center;
  overflow: hidden;
  border: 1px dashed var(--mf-sys-border, #D8E3D7);
  border-radius: 18px;
  background: linear-gradient(135deg, #F7FAF4, #FFFFFF);
  color: var(--mf-sys-muted, #667368);
  font-size: 14px;
  font-weight: 650;
}

.mf-media-preview.is-logo {
  min-height: 108px;
}

.mf-media-preview.is-dish {
  min-height: 118px;
}

.mf-media-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.mf-media-preview.is-logo img {
  object-fit: contain;
  padding: 12px;
  background: #FFFFFF;
}

.mf-media-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.mf-menu-table-item {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.mf-menu-item-thumb,
.menu-item-image {
  width: 58px;
  height: 58px;
  flex: 0 0 58px;
  object-fit: cover;
  border-radius: 16px;
  border: 1px solid var(--mf-sys-border, #D8E3D7);
  background: #F6F8F4;
}

.mf-menu-item-emoji {
  width: 58px;
  height: 58px;
  flex: 0 0 58px;
  display: grid;
  place-items: center;
  border-radius: 16px;
  background: #F6F8F4;
  font-size: 24px;
}

.restaurant-img-photo,
.sheet-cover-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.menu-item-image {
  width: 64px;
  height: 64px;
}

@media (max-width: 760px) {
  .mf-media-controls,
  .mf-dish-media-panel {
    grid-template-columns: 1fr;
  }

  .mf-media-actions {
    display: grid;
    grid-template-columns: 1fr;
  }

  .mf-media-actions .btn {
    width: 100%;
  }
}

/* MYFOODS LIVE HOME SPACING FIX 20260521 */
@media (min-width: 921px) {
  body .hero.mf-home-hero {
    min-height: 360px !important;
    padding-top: 42px !important;
    padding-bottom: 48px !important;
  }

  body .mf-home-hero-inner {
    display: grid !important;
    grid-template-columns: minmax(0, 560px) minmax(340px, 520px) !important;
    align-items: center !important;
    gap: 72px !important;
  }

  body .mf-home-copy {
    margin-top: 0 !important;
  }

  body .hero-tag {
    margin-bottom: 18px !important;
  }

  body .hero h1 {
    margin-bottom: 18px !important;
  }

  body .hero-sub {
    margin-bottom: 26px !important;
  }

  body .mf-home-picture {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    min-height: 260px !important;
  }

  body .mf-home-picture img {
    width: 100% !important;
    max-height: 310px !important;
    object-fit: cover !important;
    border-radius: 28px !important;
  }

  body .topbar-search {
    border: 1px solid #d8ccbf !important;
    box-shadow: 0 8px 24px rgba(31,35,40,.05) !important;
  }

  body .topbar-search input {
    border: 0 !important;
    outline: 0 !important;
    box-shadow: none !important;
  }
}

@media (max-width: 920px) {
  body .hero.mf-home-hero {
    min-height: auto !important;
    padding-top: 28px !important;
    padding-bottom: 36px !important;
  }

  body .hero-tag {
    margin-bottom: 16px !important;
  }

  body .hero h1 {
    margin-bottom: 16px !important;
  }

  body .hero-sub {
    margin-bottom: 22px !important;
  }
}
