/* Customer portal layout. The shared menu/admin stylesheet stays unchanged. */
.customer-portal {
  --portal-soft: var(--soft);
  background: var(--bg);
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 18px;
  line-height: 1.5;
}
.portal-shell { min-height: 100vh; display: grid; grid-template-columns: 245px minmax(0, 1fr); }
.portal-sidebar {
  position: sticky; top: 0; height: 100vh; overflow-y: auto; display: flex; flex-direction: column;
  padding: 30px 22px 24px; background: var(--cei-surface); border-right: 1px solid var(--line);
}
.portal-brand { display: inline-flex; align-items: center; gap: 10px; color: var(--accent-dark); font-size: 25px; font-weight: 600; letter-spacing: -.7px; text-decoration: none; }
.portal-brand b { font-weight: 600; }
.portal-brand-mark { display: inline-grid; place-items: center; flex: 0 0 36px; width: 36px; height: 36px; border-radius: 50%; background: var(--cei-brand); color: var(--cei-surface); font-size: 25px; font-weight: 600; }
.portal-side-label { margin: 52px 0 8px; color: var(--muted); font-size: 14px; text-transform: uppercase; letter-spacing: 1.6px; font-weight: 600; }
.portal-side-note { margin: 0; color: var(--cei-ink); font-size: 17px; }
.portal-side-steps { list-style: none; margin: 26px 0 32px; padding: 0; display: grid; gap: 24px; }
.portal-side-steps li { display: flex; gap: 10px; align-items: flex-start; color: var(--muted); }
.portal-side-steps li > span { display: grid; place-items: center; flex: 0 0 27px; height: 27px; border-radius: 50%; background: var(--cei-line); font-size: 15px; font-weight: 600; }
.portal-side-steps strong { display: block; color: var(--cei-ink); font-size: 16px; font-weight: 600; }
.portal-side-steps small { display: block; margin-top: 3px; font-size: 15px; line-height: 1.6; }
.portal-side-steps li.is-current > span { background: var(--accent); color: var(--cei-surface); }
.portal-side-steps li.is-current strong { color: var(--accent-dark); }
.portal-help { display: flex; gap: 10px; padding: 16px 12px; margin-top: auto; border: 1px solid var(--line); border-radius: 14px; background: var(--cei-surface); }
.portal-help-icon { width: 28px; height: 28px; flex: 0 0 28px; display: grid; place-items: center; border-radius: 9px; color: var(--accent); background: var(--portal-soft); font-weight: 600; }
.portal-help strong { font-size: 16px; }
.portal-help p { margin: 7px 0; color: var(--muted); font-size: 15px; line-height: 1.6; }
.portal-help a { color: var(--accent); font-size: 15px; font-weight: 600; text-decoration: none; }
.portal-side-footer { display: flex; align-items: center; gap: 7px; margin-top: 20px; color: var(--muted); font-size: 15px; }
.portal-side-footer > span { width: 7px; height: 7px; background: var(--accent); border-radius: 50%; }
.portal-main { min-width: 0; }
.portal-topbar { height: 72px; display: flex; align-items: center; justify-content: space-between; padding: 0 clamp(24px, 4vw, 56px); background: var(--cei-surface); border-bottom: 1px solid var(--line); }
.portal-breadcrumb { color: var(--muted); font-size: 16px; }
.portal-breadcrumb > span { padding: 0 10px; color: var(--cei-muted); }
.portal-breadcrumb strong { color: var(--cei-ink); font-weight: 650; }
.portal-mobile-brand { display: none; }
.portal-support-link { display: inline-flex; align-items: center; gap: 8px; color: var(--accent); font-size: 16px; font-weight: 600; text-decoration: none; }
.portal-support-link svg { width: 17px; height: 17px; }
.customer-portal .access-shell, .customer-portal #menuView { width: min(1180px, 100%); min-height: 0; margin: 0 auto; padding: 32px clamp(24px, 4vw, 56px) 0; }
.customer-portal .access-shell { display: grid; align-content: start; gap: 24px; }
.customer-portal .panel { padding: clamp(24px, 3vw, 36px); border: 1px solid var(--line); border-radius: 20px; box-shadow: 0 12px 35px rgba(15, 91, 77, .055); background: var(--cei-surface); }
.customer-portal .eyebrow, .customer-portal .section-kicker { margin-bottom: 8px; font-size: 14px; letter-spacing: 1.4px; color: var(--accent); }
.customer-portal .portal-welcome { display: grid; grid-template-columns: 1.15fr .85fr; gap: 24px; align-items: center; min-height: 380px; }
.portal-welcome h1 { margin: 16px 0; font-size: clamp(34px, 3.5vw, 46px); line-height: 1.1; letter-spacing: -1.7px; font-weight: 600; }
.portal-welcome .intro { max-width: 510px; margin: 0; color: var(--muted); font-size: 18px; line-height: 1.85; }
.portal-start { display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 44px; margin-top: 22px; padding: 12px 18px; border-radius: 10px; background: var(--accent); color: var(--cei-surface); font-size: 16px; font-weight: 600; text-decoration: none; }
.portal-start:hover { background: var(--accent-dark); }
.portal-start svg { width: 17px; height: 17px; }
.portal-points { display: flex; flex-wrap: wrap; gap: 12px 18px; margin-top: 25px; }
.portal-points > span { display: inline-flex; align-items: center; gap: 8px; color: var(--cei-muted); font-size: 14px; white-space: nowrap; }
.portal-points svg { width: 28px; height: 28px; padding: 7px; border-radius: 9px; color: var(--accent); background: var(--portal-soft); }
.portal-hero-art { position: relative; display: grid; place-items: center; min-height: 278px; border-radius: 24px; background: var(--cei-surface); }
.portal-art-card { width: 83%; padding: 20px; border: 1px solid var(--cei-line); border-radius: 15px; background: var(--cei-surface); box-shadow: 0 16px 36px rgba(36, 97, 77, .12); transform: rotate(-4deg); }
.portal-art-head { display: flex; align-items: center; gap: 10px; margin-bottom: 22px; color: var(--accent-dark); font-size: 16px; }
.portal-art-head .portal-brand-mark { width: 27px; height: 27px; flex-basis: 27px; font-size: 18px; }
.portal-art-label { display: flex; justify-content: space-between; color: var(--cei-muted); font-size: 7px; font-weight: 600; letter-spacing: 1px; }
.portal-art-row { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 13px 0; border-bottom: 1px solid var(--cei-line); }
.portal-art-row > span { width: 64%; }
.portal-art-row b, .portal-art-row small, .portal-art-row > i { display: block; height: 7px; border-radius: 5px; background: var(--cei-line); }
.portal-art-row small { width: 64%; height: 5px; margin-top: 7px; background: var(--cei-subtle); }
.portal-art-row > i { width: 23px; }
.portal-art-row:nth-child(4) b { width: 80%; }
.portal-art-row:nth-child(5) b { width: 65%; }
.portal-art-bottom { display: flex; align-items: center; gap: 7px; margin-top: 17px; color: var(--accent); font-size: 13px; }
.portal-art-bottom svg { width: 14px; height: 14px; }
.portal-art-badge { position: absolute; right: 1%; bottom: 15%; display: grid; place-items: center; width: 49px; height: 49px; border: 4px solid var(--cei-surface); border-radius: 15px; background: var(--accent); color: var(--cei-surface); box-shadow: 0 8px 18px rgba(15, 118, 110, .18); transform: rotate(7deg); }
.portal-entry-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 28px; align-items: start; }
.customer-portal .access-card { width: auto; margin: 0; padding: 28px; border: 1px solid var(--line); border-radius: 18px; box-shadow: 0 12px 35px rgba(15, 91, 77, .055); background: var(--cei-surface); }
.customer-portal #accessForm { scroll-margin-top: 24px; }
.customer-portal .access-card h2 { font-size: 25px; letter-spacing: -.6px; }
.portal-form-intro { margin: 10px 0 18px; color: var(--muted); font-size: 16px; line-height: 1.7; }
.customer-portal .access-card .field { margin-bottom: 15px; }
.customer-portal .access-card button[type="submit"] { width: 100%; margin-top: 6px; }
.portal-guide { padding: 24px 8px; }
.portal-guide h2 { font-size: 25px; letter-spacing: -.6px; line-height: 1.4; }
.portal-guide ol { list-style: none; display: grid; gap: 23px; padding: 0; margin: 25px 0 0; }
.portal-guide li { display: flex; align-items: flex-start; gap: 14px; }
.portal-guide li > span { width: 29px; height: 29px; flex: 0 0 29px; display: grid; place-items: center; background: var(--cei-line); color: var(--accent-dark); font-size: 16px; font-weight: 600; border-radius: 50%; }
.portal-guide h3 { margin: 3px 0 6px; font-size: 17px; font-weight: 600; }
.portal-guide p:not(.eyebrow) { margin: 0; color: var(--muted); font-size: 16px; line-height: 1.7; }
.customer-portal button { min-height: 43px; padding: 11px 16px; border-radius: 10px; font-family: inherit; font-size: 16px; font-weight: 600; box-shadow: none; }
.customer-portal button svg { width: 17px; height: 17px; }
.customer-portal button:disabled { cursor: not-allowed; }
.customer-portal button:focus-visible, .customer-portal a:focus-visible, .customer-portal summary:focus-visible { outline: 3px solid var(--cei-muted); outline-offset: 3px; }
.customer-portal .ghost-button { border: 1px solid var(--line); background: var(--cei-surface); color: var(--cei-ink); }
.customer-portal .ghost-button:hover { background: var(--portal-soft); }
.customer-portal .save-draft-button { background: var(--portal-soft); border-color: var(--cei-line); color: var(--accent-dark); }
.customer-portal input, .customer-portal select, .customer-portal textarea { border: 1px solid var(--cei-line); border-radius: 9px; padding: 12px 13px; background: var(--cei-surface); color: var(--text); font-family: inherit; font-size: 17px; }
.customer-portal input:focus, .customer-portal select:focus, .customer-portal textarea:focus { outline: none; border-color: var(--cei-muted); box-shadow: 0 0 0 3px var(--cei-line); }
.customer-portal input::placeholder, .customer-portal textarea::placeholder { color: var(--cei-muted); }
.customer-portal .field > span { color: var(--cei-ink); font-size: 16px; font-weight: 650; }
.customer-portal .field.small { min-width: 0; }
.customer-portal .required-field { padding: 0; border: 0; background: transparent; }
.customer-portal .required-field em { border: 0; padding: 0; background: transparent; color: #927451; font-size: 13px; font-style: normal; }
.customer-portal .required-field.is-missing input { border-color: var(--danger); background: var(--cei-subtle); }
.customer-portal #menuView .portal-menu-heading { position: static; display: flex; flex-wrap: wrap; align-items: flex-start; gap: 20px; height: auto; padding: 0; border: 0; background: transparent; }
.customer-portal .portal-menu-heading .brand-mark { display: none; }
.customer-portal .portal-menu-heading h1 { font-size: 32px; font-weight: 600; letter-spacing: -.8px; }
.customer-portal #menuView .actions { display: flex; width: auto; gap: 8px; }
.customer-portal #menuView .actions button { width: auto; min-height: 43px; padding: 11px 14px; }
.customer-portal #menuView .layout { width: 100%; padding: 26px 0 0; gap: 24px; }
.customer-portal #menuView .step-progress { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; padding: 0 0 22px; border: 0; border-bottom: 3px solid var(--cei-line); border-radius: 0; background: transparent; box-shadow: none; }
.customer-portal #menuView .step-progress-item { display: flex; justify-content: flex-start; align-items: center; gap: 9px; min-height: 40px; padding: 5px; text-align: left; border: 0; border-radius: 9px; background: transparent; }
.customer-portal #menuView .step-progress-item.current, .customer-portal #menuView .step-progress-item:hover:not(:disabled) { background: var(--cei-line); }
.customer-portal #menuView .step-progress-item > span { width: 29px; height: 29px; flex-basis: 29px; background: var(--cei-line); color: var(--cei-muted); font-size: 16px; }
.customer-portal #menuView .step-progress-item.active > span, .customer-portal #menuView .step-progress-item.completed > span { background: var(--accent); color: var(--cei-surface); }
.customer-portal #menuView .step-progress-item strong { font-size: 15px; font-weight: 600; }
.customer-portal #menuView .step-progress-item small { display: block; margin-top: 4px; font-size: 14px; color: var(--muted); line-height: 1.35; }
.customer-portal #menuView .step-title-full { display: inline; }
.customer-portal #menuView .step-title-mobile { display: none; }
.customer-portal #menuView .step-progress-item[data-download-menu] { grid-column: auto; border: 0; padding: 5px; }
.customer-portal #menuView .work-grid { grid-template-columns: minmax(0, 1fr); gap: 24px; }
.customer-portal .business-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px; }
.customer-portal .family-inline-form { grid-template-columns: minmax(0, 1fr) 120px auto; gap: 16px; align-items: end; }
.customer-portal #menuView .item-form { grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr) 110px 140px; gap: 18px; align-items: start; }
.customer-portal .item-form .field { align-content: start; }
.customer-portal .portal-item-hint { grid-column: 1 / -1; margin-top: -5px; color: var(--muted); font-size: 15px; line-height: 1.6; }
.customer-portal h2 { font-size: 27px; font-weight: 600; letter-spacing: -.6px; }
.customer-portal .muted { max-width: 660px; font-size: 16px; line-height: 1.7; }
.customer-portal .save-status { padding: 6px 10px; border-radius: 20px; color: var(--accent-dark); background: var(--portal-soft); font-size: 14px; white-space: nowrap; }
.customer-portal .family-list { margin-top: 22px; }
.customer-portal .family-chip { border-color: var(--line); border-radius: 10px; background: var(--cei-subtle); }
.customer-portal .family-id, .customer-portal .family-vat-badge { font-size: 16px; }
.customer-portal .family-info small { font-size: 15px; }
.customer-portal .family-id-guide summary, .customer-portal .family-id-entry, .customer-portal .allergen-details summary { font-size: 17px; }
.customer-portal .allergen-details summary small { font-size: 15px; }
.customer-portal #summary { font-size: 17px; }
.customer-portal .notice, .customer-portal .item-feedback { font-size: 16px; }
.customer-portal .family-id-guide, .customer-portal .allergen-details { border: 1px solid var(--line); border-radius: 12px; background: var(--cei-surface); }
.customer-portal .allergen-option { color: var(--cei-ink); font-size: 16px; }
.customer-portal .allergen-option input { accent-color: var(--accent); }
.customer-portal .table-wrap { border: 1px solid var(--line); border-radius: 12px; }
.customer-portal th { padding: 14px; color: var(--cei-muted); background: var(--cei-subtle); font-size: 14px; text-transform: uppercase; letter-spacing: .4px; }
.customer-portal td { padding: 15px 14px; font-size: 16px; }
.customer-portal #menuView .table-wrap td::before { font-size: 14px; }
.customer-portal .row-actions button { width: 32px; min-height: 32px; padding: 7px; border: 1px solid var(--line); background: var(--cei-surface); color: var(--cei-muted); border-radius: 8px; }
.customer-portal .row-actions .danger-button { color: var(--danger); }
.customer-portal .row-actions button:hover { background: var(--portal-soft); }
.customer-portal .tag { background: var(--portal-soft); color: var(--cei-muted); font-size: 14px; }
.customer-portal .empty { font-size: 16px; padding: 28px; }
.customer-portal .submitted-banner { border-radius: 14px; box-shadow: none; }
.customer-portal #menuView[data-mobile-step="1"] .work-grid,
.customer-portal #menuView[data-mobile-step="1"] .table-panel,
.customer-portal #menuView[data-mobile-step="2"] .business-panel,
.customer-portal #menuView[data-mobile-step="2"] .item-panel,
.customer-portal #menuView[data-mobile-step="2"] .table-panel,
.customer-portal #menuView[data-mobile-step="3"] .business-panel,
.customer-portal #menuView[data-mobile-step="3"] .family-panel,
.customer-portal #menuView[data-mobile-step="1"] #exportButton,
.customer-portal #menuView[data-mobile-step="1"] #submitButton,
.customer-portal #menuView[data-mobile-step="2"] #exportButton,
.customer-portal #menuView[data-mobile-step="2"] #submitButton { display: none; }
.portal-page-footer { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 10px; max-width: 1180px; margin: 0 auto; padding: 26px clamp(24px, 4vw, 56px) 0; color: var(--cei-muted); font-size: 14px; }
.customer-portal .public-legal-links { margin: 0; padding: 15px 24px 24px; font-size: 14px; font-weight: 600; }
@media (max-width: 1100px) {
  .portal-shell { grid-template-columns: 215px minmax(0, 1fr); }
  .portal-sidebar { padding: 26px 16px; }
  .customer-portal .portal-welcome { grid-template-columns: 1.15fr .85fr; padding: 26px; }
  .portal-welcome h1 { font-size: 36px; }
  .portal-art-card { width: 90%; padding: 16px; }
  .portal-entry-grid { gap: 20px; }
  .customer-portal #menuView .item-form { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .customer-portal .toolbar { flex-wrap: wrap; }
}
@media (max-width: 850px) {
  .portal-shell { grid-template-columns: minmax(0, 1fr); }
  .portal-sidebar { display: none; }
  .portal-mobile-brand { display: inline-flex; font-size: 18px; }
  .portal-mobile-brand .portal-brand-mark { width: 30px; height: 30px; flex-basis: 30px; font-size: 18px; }
  .portal-breadcrumb { display: none; }
  .portal-topbar { height: 64px; padding: 0 24px; }
}
@media (max-width: 760px) {
  .customer-portal .access-shell, .customer-portal #menuView { padding: 22px 18px 0; }
  .customer-portal .portal-welcome { grid-template-columns: minmax(0, 1fr); gap: 24px; padding: 26px; }
  .portal-hero-art { min-height: 210px; }
  .portal-art-card { max-width: 290px; }
  .portal-entry-grid { grid-template-columns: minmax(0, 1fr); gap: 14px; }
  .portal-guide { padding: 18px 8px; }
  .customer-portal .panel { padding: 24px; }
  .customer-portal .business-grid { grid-template-columns: minmax(0, 1fr); gap: 18px; }
  .customer-portal #menuView .step-progress { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; padding-bottom: 16px; }
  .customer-portal #menuView .step-progress-item { gap: 8px; padding: 8px 4px; }
  .customer-portal #menuView .step-progress-item small { display: none; }
  .customer-portal #menuView .step-title-full { display: none; }
  .customer-portal #menuView .step-title-mobile { display: inline; }
  .customer-portal #menuView .step-progress-item[data-download-menu] { grid-column: 1 / -1; justify-content: center; padding-top: 12px; border-top: 1px solid var(--line); }
  .customer-portal .family-inline-form { grid-template-columns: minmax(0, 1fr) 100px; }
  .customer-portal .family-inline-form button { grid-column: 1 / -1; }
  .customer-portal .section-head { flex-wrap: wrap; gap: 12px; }
  .customer-portal .allergen-details > summary { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.35fr) 12px; gap: 10px; min-height: 56px; list-style: none; }
  .customer-portal .allergen-details > summary::-webkit-details-marker { display: none; }
  .customer-portal .allergen-details > summary small { min-width: 0; margin-left: 0; text-align: right; }
  .customer-portal .allergen-details > summary::after { content: ""; width: 8px; height: 8px; border-right: 2px solid var(--accent); border-bottom: 2px solid var(--accent); transform: rotate(45deg); justify-self: center; }
  .customer-portal .allergen-details[open] > summary::after { transform: rotate(225deg); }
  .customer-portal .filters { width: 100%; }
  .customer-portal .search-field { width: 100%; }
  .customer-portal #menuView .table-wrap { border: 0; border-radius: 0; }
  .customer-portal #menuView .table-wrap tr { border-radius: 12px; padding: 15px; background: var(--cei-surface); }
  .portal-page-footer { padding: 24px 18px 0; }
}
@media (max-width: 480px) {
  .portal-topbar { padding: 0 18px; }
  .customer-portal .access-shell, .customer-portal #menuView { padding: 18px 12px 0; }
  .customer-portal .portal-welcome, .customer-portal .panel, .customer-portal .access-card { padding: 22px 18px; border-radius: 16px; }
  .portal-welcome h1 { font-size: 35px; }
  .portal-hero-art { min-height: 200px; }
  .portal-points { gap: 12px; }
  .customer-portal #menuView .portal-menu-heading h1 { font-size: 29px; }
  .customer-portal #menuView .actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); width: 100%; }
  .customer-portal #menuView .actions button { width: 100%; font-size: 15px; padding: 10px 8px; }
  .customer-portal #menuView .item-form { grid-template-columns: minmax(0, 1fr); gap: 17px; }
  .customer-portal #menuView .step-progress-item { flex-direction: column; justify-content: center; gap: 6px; text-align: center; }
  .customer-portal #menuView .step-progress-item[data-download-menu] { flex-direction: row; }
  .customer-portal input, .customer-portal select, .customer-portal textarea { font-size: 18px; }
  .portal-page-footer { flex-direction: column; padding: 24px 16px 0; }
}
@media (max-width: 380px) {
  .customer-portal #menuView .item-form .allergen-grid { grid-template-columns: minmax(0, 1fr); }
}
@media (prefers-reduced-motion: reduce) {
  .customer-portal * { scroll-behavior: auto !important; transition: none !important; }
}
