/* NPF shop — styles for the cart / checkout / tracking pages and the injected "add to cart" blocks.
   Uses the site's own theme variables (--nile-*, --foreground, …) so light and dark mode follow the site. */

[data-npf-hide] { display: none !important; }

.npf-shell,
.npf-buy,
.npf-price,
.npf-toast {
  --npf-text: var(--nile-text, var(--foreground, #0a2240));
  --npf-text2: var(--nile-text2, var(--muted-foreground, #455f82));
  --npf-line: var(--nile-stroke, var(--border, rgba(10, 34, 64, .14)));
  --npf-hair: var(--nile-hair, rgba(10, 34, 64, .1));
  --npf-accent: var(--nile-cy, var(--primary, #0b6f93));
  --npf-ok: var(--nile-gr, #2f7d32);
  --npf-bad: var(--destructive, #b3261e);
  --npf-warn: #9a5b00;
  --npf-info: #5b3fa8;
  --npf-field: var(--nile-panel-soft, rgba(255, 255, 255, .6));
}
.dark .npf-shell,
.dark .npf-buy,
.dark .npf-price,
.dark .npf-toast { --npf-bad: var(--destructive, #ff9b94); --npf-warn: #ffd88a; --npf-info: #c4b2ff; }

/* ───────── page shell ───────── */
.npf-shell {
  margin-inline: auto;
  padding: clamp(18px, 3vw, 38px);
  color: var(--npf-text);
  box-sizing: border-box;
}
.npf-shell *, .npf-shell *::before, .npf-shell *::after { box-sizing: border-box; }
.npf-shell.npf-narrow { max-width: 58rem; }
.npf-head { display: grid; gap: 8px; margin-bottom: 22px; }
.npf-head h1 { margin: 0; }
.npf-head p { margin: 0; color: var(--npf-text2); max-width: 62ch; }
.npf-head-ico {
  display: inline-grid; place-items: center; width: 56px; height: 56px; border-radius: 50%;
  color: var(--npf-ok); background: color-mix(in srgb, var(--npf-ok) 14%, transparent);
}
.npf-head-ico svg { width: 30px; height: 30px; }
.npf-muted { color: var(--npf-text2); font-size: .92em; }
.npf-center { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; margin-top: 18px; }
.npf-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 16px; }
.npf-link { color: var(--npf-accent); text-decoration: underline; text-underline-offset: 3px; display: inline-flex; gap: 6px; align-items: center; background: none; border: 0; padding: 0; font: inherit; cursor: pointer; }
.npf-ico { display: inline-flex; align-items: center; }
.npf-ico svg { width: 1.15em; height: 1.15em; }
.npf-shell :focus-visible, .npf-buy :focus-visible, .npf-toast :focus-visible {
  outline: 2px solid var(--nile-focus, var(--ring, #1688ae)); outline-offset: 2px;
}

/* ───────── buttons ───────── */
.npf-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 46px;
  padding: 12px 24px; border-radius: 999px; font-size: 14px; font-weight: 600; line-height: 1.3;
  cursor: pointer; text-decoration: none; white-space: normal; text-align: center; font-family: inherit;
}
.npf-btn:disabled, .npf-btn[disabled] { opacity: .5; cursor: not-allowed; }
.npf-btn-ghost { background: transparent; }
.npf-btn .npf-ico svg { width: 18px; height: 18px; }

/* ───────── empty / error states ───────── */
.npf-empty { display: grid; justify-items: center; gap: 12px; text-align: center; padding: clamp(28px, 6vw, 64px) 12px; }
.npf-empty h2 { margin: 0; font-size: 1.4rem; }
.npf-empty p { margin: 0; color: var(--npf-text2); max-width: 46ch; }
.npf-empty-ico {
  display: inline-grid; place-items: center; width: 56px; height: 56px; border-radius: 50%;
  color: var(--npf-accent); background: color-mix(in srgb, var(--npf-accent) 12%, transparent);
}
.npf-empty-ico svg { width: 26px; height: 26px; }

/* ───────── cart ───────── */
.npf-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(280px, 360px); gap: 18px; align-items: start; }
.npf-lines { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.npf-line {
  display: grid; grid-template-columns: 76px minmax(0, 1fr) auto auto; gap: 8px 16px; align-items: center; padding: 14px;
}
.npf-line.is-bad { opacity: .85; border-color: var(--npf-bad) !important; }
.npf-thumb {
  display: grid; place-items: center; width: 76px; height: 76px; border-radius: 16px; overflow: hidden;
  background: var(--nile-win, rgba(255, 255, 255, .5)); border: 1px solid var(--npf-hair);
}
.npf-thumb img { width: 100%; height: 100%; object-fit: contain; padding: 4px; }
.npf-line-info { display: grid; gap: 3px; min-width: 0; }
.npf-line-name { font-weight: 700; color: var(--npf-text); text-decoration: none; overflow-wrap: anywhere; }
.npf-line-name:hover { text-decoration: underline; }
.npf-line-ctrl { display: flex; align-items: center; gap: 8px; }
.npf-line-total { min-width: 90px; text-align: end; white-space: nowrap; }
.npf-remove {
  display: inline-grid; place-items: center; width: 40px; height: 40px; border-radius: 50%;
  border: 1px solid var(--npf-hair); background: transparent; color: var(--npf-text2); cursor: pointer;
}
.npf-remove:hover { color: var(--npf-bad); border-color: var(--npf-bad); }
.npf-low { color: var(--npf-bad); font-size: .85em; font-weight: 600; }
.npf-error-line { color: var(--npf-bad); margin: 0; font-size: .92em; }

.npf-qty { display: inline-flex; align-items: center; border: 1px solid var(--npf-line); border-radius: 999px; background: var(--npf-field); }
.npf-qty-btn {
  width: 38px; height: 38px; border: 0; border-radius: 50%; background: transparent; color: inherit;
  font-size: 20px; line-height: 1; cursor: pointer; font-family: inherit;
}
.npf-qty-btn:disabled { opacity: .35; cursor: not-allowed; }
.npf-qty-val { min-width: 30px; text-align: center; font-weight: 600; font-variant-numeric: tabular-nums; }

/* ───────── summary ───────── */
.npf-summary { padding: 20px; display: grid; gap: 12px; align-content: start; }
.npf-summary h2 { margin: 0; font-size: 1.15rem; }
.npf-summary p { margin: 0; }
.npf-sum { display: grid; gap: 8px; }
.npf-row { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.npf-sum-sub { color: var(--npf-text2); font-size: .9em; }
.npf-sum-total { border-top: 1px dashed var(--npf-hair); padding-top: 10px; margin-top: 2px; }
.npf-grand { font-size: 1.3em; }
.npf-was { color: var(--npf-text2); font-weight: 400; margin-inline-end: 4px; }
.npf-free { color: var(--npf-ok); }
.npf-nudge { color: var(--npf-ok); font-size: .9em; font-weight: 600; }
.npf-sum-items { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.npf-sum-items li { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 10px; align-items: center; }
.npf-order-items li { grid-template-columns: minmax(0, 1fr) auto; }
.npf-sum-items .npf-thumb { width: 48px; height: 48px; border-radius: 12px; }
.npf-sum-name { display: grid; gap: 1px; min-width: 0; overflow-wrap: anywhere; }

/* ───────── checkout form ───────── */
.npf-form { display: grid; grid-template-columns: minmax(0, 1fr) minmax(300px, 380px); gap: 18px; align-items: start; }
.npf-form-main { display: grid; gap: 14px; min-width: 0; }
.npf-form-main section, .npf-form-main fieldset { min-width: 0; margin: 0; }
.npf-form-main h2, .npf-form-main legend { font-size: 1.05rem; font-weight: 700; margin: 0 0 12px; padding: 0; }
.npf-form-main legend { padding-inline: 6px; margin-bottom: 8px; }
.npf-fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.npf-field { display: grid; gap: 6px; align-content: start; min-width: 0; }
.npf-field.is-wide { grid-column: 1 / -1; }
.npf-field label { font-size: 13px; font-weight: 600; }
.npf-shell .npf-field input, .npf-shell .npf-field select, .npf-shell .npf-field textarea, .npf-shell .npf-track-form input {
  width: 100%; min-height: 46px; padding: 10px 14px; border: 1px solid var(--input, var(--npf-line)); border-radius: 12px;
  background: var(--npf-field); color: var(--npf-text); font: inherit; font-size: 16px;
}
.npf-shell .npf-field textarea { resize: vertical; min-height: 72px; }
.npf-ltr { text-align: start; }
[dir="rtl"] .npf-ltr { text-align: right; }
.npf-shell [aria-invalid="true"] { border-color: var(--npf-bad) !important; }
.npf-err { color: var(--npf-bad); font-size: 12.5px; margin: 0; }
.npf-opt { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 14px; border: 1px solid var(--npf-hair); border-radius: 16px; cursor: pointer; }
.npf-opt input { width: 20px; height: 20px; accent-color: var(--npf-accent); margin: 0; }
.npf-opt-body { display: grid; gap: 2px; min-width: 0; }
.npf-opt-body small { color: var(--npf-text2); line-height: 1.5; }
.npf-opt-price { white-space: nowrap; }
.npf-form-main fieldset > div { display: grid; gap: 10px; }
.npf-badge-pill {
  display: inline-block; justify-self: start; margin-top: 4px; padding: 2px 10px; border-radius: 999px; font-size: 12px; font-weight: 700;
  color: var(--npf-ok); background: color-mix(in srgb, var(--npf-ok) 14%, transparent);
}
.npf-check { display: flex; gap: 10px; align-items: flex-start; cursor: pointer; }
.npf-check input { width: 20px; height: 20px; margin: 2px 0 0; accent-color: var(--npf-accent); flex: none; }
.npf-check a { color: var(--npf-accent); text-decoration: underline; }
.npf-terms { padding: 4px 6px; display: grid; gap: 6px; }
.npf-banner {
  margin-bottom: 16px; padding: 12px 16px; border-radius: 14px; border: 1px solid var(--npf-bad);
  color: var(--npf-bad); background: color-mix(in srgb, var(--npf-bad) 8%, transparent); font-weight: 600; scroll-margin-top: 110px;
}
.npf-banner a { color: inherit; }
.npf-hp { position: absolute; inset-inline-start: -10000px; width: 1px; height: 1px; overflow: hidden; }
.npf-req, .npf-vat { font-size: .85em; }
@media (min-width: 901px) { .npf-form > .npf-summary { position: sticky; top: 100px; } }

/* ───────── transfer / rails ───────── */
.npf-transfer {
  display: grid; gap: 8px; padding: 18px; border-radius: 20px; margin-top: 12px;
  border: 1px solid color-mix(in srgb, var(--npf-accent) 55%, transparent); background: color-mix(in srgb, var(--npf-accent) 8%, transparent);
}
.npf-transfer[hidden] { display: none; }
.npf-transfer h2, .npf-transfer p { margin: 0; }
.npf-amount { font-size: 1.05rem; }
.npf-rail { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; padding: 6px 0; }
.npf-rail-label { font-weight: 600; }
.npf-rail-value { font-weight: 700; direction: ltr; unicode-bidi: isolate; overflow-wrap: anywhere; }
.npf-copy {
  display: inline-flex; align-items: center; gap: 6px; padding: 6px 14px; border-radius: 999px; font: inherit; font-size: 13px;
  border: 1px solid var(--npf-line); background: transparent; color: var(--npf-text); cursor: pointer; min-height: 36px;
}
.npf-copied { color: var(--npf-ok); font-size: 13px; }

/* ───────── confirmation / tracking ───────── */
.npf-card {
  border: 1px solid var(--npf-line); border-radius: 22px; padding: 20px; margin-block: 14px;
  background: var(--nile-panel-strong, var(--card, transparent));
}
.npf-card > :first-child { margin-top: 0; }
.npf-dl { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 14px; margin: 0 0 16px; }
.npf-dl dt { font-size: 12px; color: var(--npf-text2); }
.npf-dl dd { margin: 2px 0 0; font-weight: 600; }
.npf-code { font-size: 1.3rem; letter-spacing: .02em; direction: ltr; unicode-bidi: isolate; text-align: start; }
[dir="rtl"] .npf-code { text-align: right; }
.npf-h2 { font-size: 1.05rem; font-weight: 700; margin: 18px 0 10px; }
.npf-notice { padding: 12px 16px; border-radius: 14px; border: 1px solid var(--npf-line); background: var(--npf-field); margin-block: 12px; }
.npf-notice.is-ok { border-color: var(--npf-ok); color: var(--npf-ok); }
.npf-notice.is-bad { border-color: var(--npf-bad); color: var(--npf-bad); }
.npf-notice a { color: inherit; text-decoration: underline; }
.npf-track-form { display: grid; grid-template-columns: 1fr 1fr auto; gap: 14px; align-items: end; }
.npf-steps { list-style: none; margin: 18px 0; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; counter-reset: s; }
.npf-steps li { display: grid; justify-items: center; gap: 8px; text-align: center; font-size: 13px; color: var(--npf-text2); position: relative; }
.npf-dot { width: 22px; height: 22px; border-radius: 50%; border: 2px solid var(--npf-line); background: transparent; display: block; }
.npf-steps .is-done { color: var(--npf-text); }
.npf-steps .is-done .npf-dot { background: var(--npf-ok); border-color: var(--npf-ok); }
.npf-steps .is-now { color: var(--npf-text); font-weight: 700; }
.npf-steps .is-now .npf-dot { border-color: var(--npf-accent); background: color-mix(in srgb, var(--npf-accent) 25%, transparent); }

/* ───────── injected on product pages ───────── */
.npf-buy { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; min-width: 0; }
.npf-buy-card { margin-top: 12px; }
.npf-buy .npf-add { flex: 1 1 auto; min-width: 150px; }
.npf-buy-home .npf-add { flex: 0 1 auto; }
/* the bar that follows you down a product page: one compact button, price in the info column */
.npf-buy-sticky { flex: none; flex-wrap: nowrap; gap: 0; }
.npf-buy-sticky .npf-add { flex: none; min-width: 0; min-height: 44px; padding-inline: 18px; white-space: nowrap; }
.npf-price-sticky { font-weight: 700; color: var(--npf-text) !important; font-size: 13px !important; }
.npf-in-cart { flex-basis: 100%; font-size: 12px; color: var(--npf-text2); min-height: 1em; }
.npf-in-cart:empty { display: none; }
.npf-price { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 12px; color: var(--npf-text); }
.npf-price strong { font-size: 1.6rem; line-height: 1.2; }
.npf-price small { color: var(--npf-text2); font-size: 12px; }
.npf-price-card strong { font-size: 1.1rem; }
.npf-price-card { margin-inline-start: 0; }
.npf-badge {
  position: absolute; top: -7px; inset-inline-end: -9px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 999px;
  background: var(--primary, #0e4f86); color: var(--primary-foreground, #fff); font-size: 11px; font-weight: 700; line-height: 18px;
  text-align: center; pointer-events: none; box-sizing: border-box; font-style: normal;
}
.npf-badge[hidden] { display: none; }
.nile-bottom-cart { position: relative; }

.npf-toast {
  position: fixed; inset-inline: 0; bottom: 24px; margin-inline: auto; width: max-content; max-width: calc(100% - 28px); z-index: 2147483000;
  display: flex; gap: 16px; align-items: center; padding: 12px 18px; border-radius: 14px; background: #0a2240; color: #fff;
  box-shadow: 0 18px 40px -16px rgba(0, 0, 0, .55); opacity: 0; transform: translateY(16px); pointer-events: none; transition: opacity .2s, transform .2s;
}
.npf-toast.is-on { opacity: 1; transform: none; pointer-events: auto; }
.npf-toast a { color: #9fe3ff; font-weight: 700; text-decoration: underline; white-space: nowrap; }

/* ───────── delivery location picker (shop/location-picker.js) ───────── */

.npf-loc { display: grid; gap: 10px; --npf-loc-h: 300px; }
.npf-loc-map {
  position: relative; height: var(--npf-loc-h); border-radius: 18px; overflow: hidden; isolation: isolate;
  border: 1px solid var(--npf-line); background: color-mix(in srgb, var(--npf-accent) 5%, var(--npf-field));
  touch-action: pan-y;            /* the page still scrolls vertically over the map */
}
.npf-loc-map.is-manual { display: grid; place-items: center; }
.npf-loc-placeholder { font-size: 40px; opacity: .35; line-height: 1; }
.npf-loc-busy {
  position: absolute; inset: 0; z-index: 3; display: grid; place-content: center; justify-items: center; gap: 10px;
  font-size: 13px; color: var(--npf-text2); background: color-mix(in srgb, var(--npf-field) 88%, transparent);
}
.npf-loc-busy[hidden] { display: none; }
.npf-loc-spin { width: 26px; height: 26px; border-radius: 50%; border: 3px solid var(--npf-hair); border-top-color: var(--npf-accent); animation: npf-loc-spin .85s linear infinite; }
@keyframes npf-loc-spin { to { transform: rotate(360deg); } }

.npf-loc-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.npf-loc-gps { min-height: 44px; padding-inline: 16px; border: 1px solid var(--npf-line); background: var(--npf-field); }
.npf-loc-gps.is-busy { opacity: .65; }
.npf-loc-clear { padding: 0; min-height: 0; font-size: 13px; text-decoration: underline; text-underline-offset: 3px; color: var(--npf-text2); }
.npf-loc-chip {
  display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 600; padding: 4px 10px;
  border-radius: 999px; border: 1px solid var(--npf-line); color: var(--npf-text2);
}
.npf-loc-chip[hidden] { display: none; }
.npf-loc-chip.is-gps { color: var(--npf-ok); border-color: color-mix(in srgb, var(--npf-ok) 45%, transparent); background: color-mix(in srgb, var(--npf-ok) 10%, transparent); }

.npf-loc-status { margin: 0; font-size: 13px; line-height: 1.6; color: var(--npf-text2); min-height: 1.4em; }
.npf-loc-status.is-bad { color: var(--npf-bad); }
.npf-loc-status.is-ok { color: var(--npf-ok); }
.npf-loc-warn {
  margin: 0; font-size: 13px; line-height: 1.6; padding: 9px 12px; border-radius: 12px;
  color: #7a5200; background: color-mix(in srgb, #f0b23a 16%, transparent); border: 1px solid color-mix(in srgb, #f0b23a 45%, transparent);
}
.dark .npf-loc-warn { color: #ffd88a; }
.npf-loc-warn[hidden] { display: none; }
.npf-loc-fail { display: grid; gap: 6px; padding: 10px 12px; border-radius: 12px; border: 1px solid color-mix(in srgb, var(--npf-bad) 35%, transparent); background: color-mix(in srgb, var(--npf-bad) 7%, transparent); }
.npf-loc-fail[hidden] { display: none; }
.npf-loc-fail p { margin: 0; }

.npf-loc-manual { border: 1px dashed var(--npf-line); border-radius: 14px; padding: 10px 14px; font-size: 13px; }
.npf-loc-manual summary { cursor: pointer; font-weight: 600; }
.npf-loc-manual-body { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; margin-top: 10px; }
.npf-loc-manual-body input {
  grid-column: 1 / -1; width: 100%; padding: 10px 12px; border-radius: 12px; border: 1px solid var(--npf-line);
  background: var(--npf-field); color: var(--npf-text); font: inherit; font-size: 16px;
}
.npf-loc-manual-body .npf-loc-apply { grid-column: 1 / -1; justify-self: start; min-height: 40px; border: 1px solid var(--npf-line); }
.npf-loc-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.npf-loc-priv { margin: 0; font-size: 12px; color: var(--npf-text2); }

/* pin (Leaflet divIcon — keeps the brand colour instead of Leaflet's default blue) */
.npf-loc-pin span {
  display: block; width: 22px; height: 22px; margin: 0 auto; border-radius: 50% 50% 50% 0;
  transform: rotate(-45deg); background: var(--primary, #0e4f86); border: 2px solid #fff;
  box-shadow: 0 8px 16px -6px rgba(0, 0, 0, .6);
}
.npf-loc .leaflet-container { background: color-mix(in srgb, var(--npf-accent) 5%, #e9eff3); font-family: inherit; }
.npf-loc .leaflet-control-attribution { font-size: 10px; background: rgba(255, 255, 255, .78); }
.npf-loc .leaflet-control-zoom a { color: #0a2240; }
.npf-loc .gm-style iframe + div { border-radius: 0; }

/* standalone page chrome (/ar/account/location — served without the Next.js header) */
.npf-sitebar {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 12px clamp(16px, 3vw, 34px); border-bottom: 1px solid var(--npf-line);
  background: color-mix(in srgb, var(--background, #fff) 76%, transparent);
}
.npf-sitebar__brand img { display: block; height: 38px; width: auto; }
.dark .npf-sitebar__brand img { filter: brightness(0) invert(1); } /* the wordmark file is navy */
.npf-sitebar .npf-link { font-size: 14px; text-decoration: none; }

/* saved-location page (/ar/account/location) */
.npf-locpage { display: grid; gap: 18px; }
.npf-locpage-card { padding: clamp(16px, 2.6vw, 26px); display: grid; gap: 14px; }
.npf-locpage-head { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; justify-content: space-between; }
.npf-locpage-head h2 { margin: 0; font-size: 1.15rem; }
.npf-loc-labels { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.npf-loc-labels .npf-pill {
  display: inline-flex; align-items: center; min-height: 40px; padding: 8px 16px; border-radius: 999px; cursor: pointer;
  border: 1px solid var(--npf-line); background: var(--npf-field); font-size: 13px; font-weight: 600; color: var(--npf-text);
}
.npf-loc-labels .npf-pill[aria-pressed="true"] { border-color: var(--npf-accent); color: var(--npf-accent); background: color-mix(in srgb, var(--npf-accent) 12%, transparent); }
.npf-loc-labels input[type="text"] {
  min-height: 40px; padding: 8px 12px; border-radius: 12px; border: 1px solid var(--npf-line);
  background: var(--npf-field); color: var(--npf-text); font: inherit; font-size: 16px; max-width: 220px;
}
.npf-locpage-actions { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.npf-locpage-meta { font-size: 12.5px; color: var(--npf-text2); }

/* ───────── customer accounts: message inside the register / sign-in forms ─────────
   Lives outside .npf-shell, so it carries its own colours (with the same fallbacks the shell uses). */
.npf-authmsg {
  display: block; margin: 4px 0; padding: 10px 14px; border-radius: 12px;
  border: 1px solid currentColor; font-size: .95rem; line-height: 1.7; text-align: start;
}
.npf-authmsg[hidden] { display: none; }
.npf-authmsg.is-bad { color: var(--destructive, #b3261e); background: color-mix(in srgb, currentColor 8%, transparent); }
.npf-authmsg.is-ok { color: var(--nile-gr, #2f7d32); background: color-mix(in srgb, currentColor 8%, transparent); }
.dark .npf-authmsg.is-bad { color: var(--destructive, #ff9b94); }
.dark .npf-authmsg.is-ok { color: #7ee2a8; }

/* ───────── customer accounts, part 2: e-mail confirmation, password reset, «طلباتي» ───────── */
.npf-notice p { margin: 0 0 8px; }
.npf-notice.is-warn { border-color: var(--npf-warn); background: color-mix(in srgb, var(--npf-warn) 9%, var(--npf-field)); }
.npf-notice.is-warn strong { display: block; margin-bottom: 4px; color: var(--npf-warn); }
.npf-notice.is-warn .npf-btn { min-height: 40px; padding: 8px 18px; }
.npf-ok { color: var(--npf-ok); }
.npf-warn-text { color: var(--npf-warn); }
.npf-form-simple { display: grid; gap: 14px; }
.npf-pw-show { display: inline-flex; gap: 8px; align-items: center; font-size: 14px; cursor: pointer; }
.npf-pw-show input { width: 18px; height: 18px; margin: 0; accent-color: var(--npf-accent); }

.npf-orders { display: grid; gap: 14px; margin-block: 14px; }
.npf-orders > .npf-muted { margin: 0; }
.npf-order { display: grid; gap: 12px; margin: 0; padding: 16px 18px; }
.npf-order-top { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; }
.npf-order-code { font-size: 1.1rem; }
.npf-order-meta { display: flex; flex-wrap: wrap; gap: 4px 18px; color: var(--npf-text2); font-size: 14px; }
.npf-order-meta strong { color: var(--npf-text); }
.npf-order-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.npf-order-actions .npf-btn { min-height: 40px; padding: 8px 18px; }
.npf-order-detail[hidden] { display: none; }
.npf-order-detail .npf-card { margin-block: 0; border-style: dashed; }
.npf-status {
  display: inline-block; padding: 3px 12px; border-radius: 999px; font-size: 12.5px; font-weight: 700;
  border: 1px solid currentColor; background: color-mix(in srgb, currentColor 8%, transparent); white-space: nowrap;
}
.npf-status.is-new { color: var(--npf-accent); }
.npf-status.is-confirmed { color: var(--npf-warn); }
.npf-status.is-shipped { color: var(--npf-info); }
.npf-status.is-delivered { color: var(--npf-ok); }
.npf-status.is-cancelled { color: var(--npf-bad); }
.npf-claim { display: grid; gap: 10px; }
.npf-claim .npf-h2 { margin: 0; }
.npf-claim p { margin: 0; }

/* ───────── small screens ───────── */
@media (max-width: 900px) {
  .npf-grid, .npf-form { grid-template-columns: 1fr; }
  .npf-fields { grid-template-columns: 1fr; }
  .npf-track-form { grid-template-columns: 1fr; }
  .npf-line { grid-template-columns: 64px minmax(0, 1fr); }
  .npf-line .npf-thumb { width: 64px; height: 64px; }
  .npf-line-ctrl { grid-column: 1 / -1; justify-content: space-between; }
  .npf-line-total { grid-column: 1 / -1; text-align: start; }
  .npf-qty-btn { width: 44px; height: 44px; }
  .npf-toast { bottom: 92px; }
  .npf-loc { --npf-loc-h: 280px; }
}
@media (max-width: 520px) {
  .npf-steps { grid-template-columns: 1fr; }
  .npf-steps li { grid-template-columns: auto 1fr; justify-items: start; text-align: start; gap: 12px; }
  .npf-loc { --npf-loc-h: 260px; }
  .npf-loc-gps { width: 100%; justify-content: center; }
  .npf-loc-labels input[type="text"] { max-width: none; width: 100%; }
}
@media (prefers-reduced-motion: reduce) {
  .npf-toast { transition: none; }
  .npf-loc-spin { animation-duration: 2.4s; }
}
