:root {
  --ink: #13211d;
  --muted: #64736d;
  --paper: #f6f8f3;
  --surface: #ffffff;
  --surface-2: #eef3ec;
  --line: #dce5da;
  --green: #0b6f5c;
  --green-dark: #084e42;
  --amber: #d89a1c;
  --red: #b53a2f;
  --blue: #2f6fb6;
  --radius: 8px;
}

* {
  box-sizing: border-box;
}
[hidden] { display: none !important; }
.nav-label-compact { display: none; }
.user-summary { display: grid; gap: 2px; line-height: 1.2; }

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  overflow-x: hidden;
  color: var(--ink);
  background: var(--paper);
  font-family: Inter, "Segoe UI", Arial, sans-serif;
  line-height: 1.5;
  letter-spacing: 0;
}

button,
input,
select,
textarea {
  font: inherit;
  letter-spacing: 0;
}

button {
  cursor: pointer;
}

button:disabled,
input:disabled,
select:disabled,
textarea:disabled {
  cursor: not-allowed;
  opacity: 0.58;
}

img {
  display: block;
  max-width: 100%;
}

.app-shell {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(246, 248, 243, 0.94);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(14px);
}

.topbar {
  width: min(1240px, calc(100% - 32px));
  min-height: 74px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.brand {
  min-width: 204px;
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: inherit;
  text-decoration: none;
}

.brand-mark {
  width: 44px;
  height: 44px;
  display: block;
  flex-shrink: 0;
  object-fit: cover;
  border-radius: var(--radius);
}

.brand strong,
.brand small {
  display: block;
}

.brand small {
  color: var(--muted);
  font-size: 0.78rem;
}

.topbar-actions,
.nav-actions,
.language-switch,
.session-box,
.toolbar-row,
.hero-actions,
.dialog-actions,
.admin-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.topbar-actions {
  justify-content: flex-end;
  flex-wrap: wrap;
  min-width: 0;
}

.nav-actions,
.language-switch,
.session-box {
  padding: 4px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.session-box {
  min-height: 50px;
  padding-inline: 10px;
  color: var(--muted);
  font-size: 0.86rem;
  font-weight: 800;
}

.nav-tab,
.language-button {
  min-height: 40px;
  padding: 0 13px;
  color: var(--muted);
  background: transparent;
  border: 0;
  border-radius: 6px;
  font-weight: 800;
}

.nav-tab.active {
  color: #fff;
  background: var(--green-dark);
}

.nav-tab b {
  min-width: 19px;
  height: 19px;
  display: inline-grid;
  place-items: center;
  margin-inline-start: 5px;
  padding: 0 5px;
  color: #fff;
  background: var(--red);
  border-radius: 999px;
  font-size: 0.68rem;
}

.nav-tab.active b {
  color: var(--green-dark);
  background: #fff;
}

.language-button.active {
  color: var(--green-dark);
  background: var(--surface-2);
}

.primary-action,
.secondary-action,
.ghost-button,
.danger-button,
.success-button,
.icon-button {
  min-height: 42px;
  padding: 0 16px;
  border: 1px solid transparent;
  border-radius: var(--radius);
  font-weight: 900;
}

.primary-action {
  color: #fff;
  background: var(--green);
  box-shadow: 0 12px 24px rgba(11, 111, 92, 0.2);
}

.secondary-action {
  color: var(--ink);
  background: #fff;
  border-color: rgba(19, 33, 29, 0.16);
}

.ghost-button {
  color: var(--green-dark);
  background: var(--surface-2);
  border-color: var(--line);
}

.danger-button {
  color: #fff;
  background: var(--red);
}

.success-button {
  color: #fff;
  background: var(--blue);
}

.compact {
  min-height: 34px;
  padding: 0 10px;
}

.full-width {
  width: 100%;
}

.hero {
  position: relative;
  min-height: min(620px, calc(100svh - 96px));
  isolation: isolate;
  overflow: hidden;
}

.hero img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: -2;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(90deg, rgba(8, 26, 22, 0.84), rgba(8, 26, 22, 0.48) 54%, rgba(8, 26, 22, 0.05)),
    linear-gradient(0deg, rgba(19, 33, 29, 0.12), rgba(19, 33, 29, 0.12));
}

.hero-content {
  width: min(1240px, calc(100% - 32px));
  margin: 0 auto;
  padding: 84px 0 70px;
  color: #fff;
}

.eyebrow,
.section-kicker,
.muted {
  margin: 0;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 900;
  text-transform: uppercase;
}

.hero .eyebrow {
  color: #ffe2a6;
}

.hero h1 {
  max-width: 820px;
  margin: 12px 0 18px;
  font-size: 3.35rem;
  line-height: 1.03;
  letter-spacing: 0;
}

.hero p {
  max-width: 720px;
  margin: 0;
  color: rgba(255, 255, 255, 0.9);
  font-size: 1.1rem;
}

.hero-actions {
  flex-wrap: wrap;
  margin-top: 28px;
}

.workspace {
  width: min(1240px, calc(100% - 32px));
  margin: 28px auto 56px;
}

.auth-hub {
  display: grid;
  gap: 14px;
  max-width: 860px;
  margin: 0 auto 18px;
}

.auth-mode-switch {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
  padding: 6px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.auth-mode-switch button {
  min-width: 0;
  min-height: 46px;
  padding: 7px 10px;
  color: var(--muted);
  background: transparent;
  border: 0;
  border-radius: 6px;
  font-weight: 900;
}

.auth-mode-switch button.active {
  color: #fff;
  background: var(--green-dark);
}

.auth-panel {
  width: 100%;
}

.screen-header {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 18px;
}

.screen-header h1,
.screen-header h2,
.form-panel h2 {
  margin: 4px 0 0;
  line-height: 1.12;
}

.auth-grid,
.client-layout,
.checkout-layout,
.admin-layout,
.form-grid,
.account-grid,
.stats-grid,
.segment-summary {
  display: grid;
  gap: 16px;
}

.auth-grid > *,
.client-layout > *,
.checkout-layout > *,
.admin-layout > *,
.form-grid > *,
.account-grid > *,
.stats-grid > *,
.segment-summary > *,
.merchant-product-card > * {
  min-width: 0;
}

.auth-grid,
.admin-layout {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.catalog-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(240px, 290px);
  gap: 20px;
  align-items: start;
}
.catalog-layout > * { min-width: 0; }
.auth-mode-switch.catalog-tabs { max-width: 460px; margin-bottom: 20px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.catalog-filters { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.catalog-filters > label { min-width: 0; }
.catalog-filters input, .catalog-filters select { width: 100%; min-width: 0; }
.shop-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.selected-shop, .category-tags { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.selected-shop { padding-block: 20px 4px; }
.category-picker { min-width: 0; border: 1px solid var(--line); border-radius: 8px; padding: 12px; margin: 0; }
.category-picker legend { padding-inline: 4px; font-weight: 700; font-size: 0.88rem; }
.category-options { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.category-options label, .checkbox-label { display: flex; align-items: center; gap: 8px; overflow-wrap: anywhere; }
.category-options input[type="checkbox"], .checkbox-label input[type="checkbox"] { width: 18px; height: 18px; min-height: 18px; flex: 0 0 18px; padding: 0; }
.platform-settings-page form + form { margin-top: 36px; padding-top: 24px; border-top: 1px solid var(--line); }
.taxonomy-row { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 16px; border: 0; border-bottom: 1px solid var(--line); padding: 12px 0 20px; margin: 0 0 16px; min-width: 0; }
.taxonomy-row label { min-width: 0; }
.taxonomy-row legend, .version-settings legend { font-weight: 700; }
.version-settings { border: 0; padding: 16px 0; margin: 0; display: grid; gap: 16px; min-width: 0; }
.availability-confirmation { margin-block: 20px; }
.update-gate { position: fixed; inset: 0; z-index: 10000; display: grid; place-items: center; padding: max(24px, env(safe-area-inset-top)) 24px; background: var(--surface, white); overflow: auto; }
.update-gate[hidden] { display: none; }
.update-gate-content { width: min(100%, 460px); display: grid; gap: 18px; text-align: center; justify-items: center; overflow-wrap: anywhere; }
.update-gate-content h1 { font-size: 28px; }
.update-gate-content a { text-decoration: none; }
@media (max-width: 1050px) {
  .catalog-filters { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .catalog-layout { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 640px) {
  .catalog-filters, .category-options { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .shop-grid, .taxonomy-row { grid-template-columns: minmax(0, 1fr); }
  .catalog-filters > label:first-child, .catalog-filters > .catalog-filter-wide { grid-column: 1 / -1; }
  .update-gate-content h1 { font-size: 24px; }
}

.client-layout {
  grid-template-columns: minmax(240px, 290px) minmax(0, 1fr) minmax(260px, 320px);
  align-items: start;
}

.checkout-layout {
  grid-template-columns: minmax(0, 1fr) minmax(300px, 420px);
  align-items: start;
}

.form-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.account-grid,
.stats-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.segment-summary {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-bottom: 18px;
}

.full-span {
  grid-column: 1 / -1;
}

.form-panel,
.store-rail,
.catalog-area,
.cart-panel,
.admin-panel,
.stat-card,
.segment-card,
.order-card,
.admin-card,
.account-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: 0 12px 34px rgba(19, 33, 29, 0.06);
}

.form-panel,
.store-rail,
.cart-panel,
.admin-panel {
  padding: 18px;
}

.welcome-panel {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 18px;
}

label {
  display: grid;
  gap: 7px;
  color: var(--ink);
  font-size: 0.88rem;
  font-weight: 900;
}

.form-panel form,
.form-panel {
  display: grid;
  gap: 14px;
}

input,
select,
textarea {
  width: 100%;
  min-width: 0;
  max-width: 100%;
  min-height: 44px;
  color: var(--ink);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 10px 12px;
  outline: 0;
}

textarea {
  resize: vertical;
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--green);
  box-shadow: 0 0 0 3px rgba(11, 111, 92, 0.13);
}

.status-message {
  min-height: 22px;
  margin: 0;
  color: var(--green-dark);
  font-weight: 900;
}

.toast {
  position: fixed;
  left: 50%;
  bottom: 22px;
  z-index: 90;
  max-width: min(420px, calc(100% - 24px));
  padding: 11px 16px;
  color: #fff;
  background: var(--green-dark);
  border-radius: var(--radius);
  box-shadow: 0 14px 34px rgba(19, 33, 29, 0.28);
  font-weight: 900;
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, 12px);
  transition: opacity 160ms ease, transform 160ms ease;
}

.toast.visible {
  opacity: 1;
  transform: translate(-50%, 0);
}

.notice {
  margin: 0;
  padding: 12px;
  color: #7a4d00;
  background: #fff1c9;
  border: 1px solid #f0d88e;
  border-radius: var(--radius);
  font-weight: 800;
}

.store-list,
.history-list,
.cart-items,
.order-items {
  display: grid;
  gap: 10px;
}

.rail-header,
.cart-header,
.product-foot,
.cart-total,
.order-head,
.order-foot,
.admin-card-header,
.store-meta-row,
.invoice-top,
.invoice-total {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.product-foot > div {
  display: grid;
  gap: 2px;
}

.rail-header h3,
.cart-header h3,
.form-panel h2,
.admin-panel h2 {
  margin: 0;
}

.rail-header span,
.cart-header span,
.pill {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 0 9px;
  color: var(--green-dark);
  background: var(--surface-2);
  border-radius: 999px;
  font-size: 0.76rem;
  font-weight: 900;
}

.pill.pending,
.pill.new {
  color: #7a4d00;
  background: #fff1c9;
}

.pill.approved,
.pill.accepted,
.pill.ready,
.pill.delivered {
  color: var(--green-dark);
  background: #dff2e9;
}

.pill.rejected,
.pill.suspended,
.pill.cancelled {
  color: #7b2019;
  background: #ffe1dc;
}

.pill.preparing {
  color: #1f4f82;
  background: #e0edff;
}

.store-card-static {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
}

.store-cover {
  position: relative;
  display: block !important;
  padding: 0 !important;
}

.store-cover-image {
  width: 100%;
  height: 92px;
  object-fit: cover;
}

.store-logo {
  position: absolute;
  inset-inline-start: 10px;
  bottom: 8px;
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  object-fit: cover;
  color: #fff !important;
  background: var(--green-dark);
  border: 2px solid #fff;
  border-radius: 6px;
  font-size: 0.78rem !important;
  font-weight: 900;
}

.store-card-static > div:last-child {
  display: grid;
  gap: 6px;
  padding: 10px;
}

.store-card-static span {
  color: var(--muted);
  font-size: 0.86rem;
}

.map-link {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  min-height: 30px;
  padding: 0 10px;
  color: var(--blue);
  background: #e9f2ff;
  border: 1px solid #cfe2ff;
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 900;
  text-decoration: none;
}

.map-link.inverse {
  color: #fff;
  background: rgba(255, 255, 255, 0.16);
  border-color: rgba(255, 255, 255, 0.36);
}

.catalog-area {
  overflow: hidden;
}

.product-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  padding: 16px;
}

.merchant-product-list {
  display: grid;
  gap: 14px;
  margin-top: 18px;
}

.merchant-product-card {
  display: grid;
  grid-template-columns: 190px minmax(0, 1fr);
  gap: 16px;
  padding: 16px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: 0 12px 34px rgba(19, 33, 29, 0.06);
}

.merchant-product-card > img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: var(--radius);
}

.merchant-product-fields {
  display: grid;
  gap: 12px;
}

.merchant-product-actions,
.order-actions,
.order-contact {
  display: flex;
  align-items: center;
  gap: 10px;
}

.merchant-product-actions {
  flex-wrap: wrap;
}

.merchant-product-actions .file-field {
  flex: 1 1 240px;
}

.toggle-field {
  display: inline-flex;
  grid-template-columns: none;
  align-items: center;
  min-height: 44px;
  padding: 0 12px;
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.toggle-field input {
  width: 18px;
  min-height: 18px;
  margin: 0;
}

.product-card {
  display: grid;
  grid-template-rows: auto 1fr auto;
  gap: 12px;
  min-height: 330px;
  padding: 14px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.product-image {
  width: 100%;
  height: 150px;
  object-fit: cover;
  border-radius: var(--radius);
  background: var(--surface-2);
}

.product-card h3 {
  margin: 8px 0 4px;
  font-size: 1.05rem;
}

.product-card p {
  min-height: 42px;
  margin: 0;
  color: var(--muted);
  font-size: 0.9rem;
}

.price {
  color: var(--red);
  font-weight: 900;
}

.cart-panel {
  position: sticky;
  top: 94px;
}

.cart-line {
  display: grid;
  gap: 8px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.cart-line small,
.order-head span,
.account-card span,
.admin-card p {
  color: var(--muted);
}

.qty-controls {
  display: grid;
  grid-template-columns: 34px 1fr 34px;
  align-items: center;
  gap: 8px;
}

.qty-controls button {
  width: 34px;
  height: 34px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface-2);
  font-weight: 900;
}

.qty-controls strong {
  text-align: center;
}

.cart-total {
  min-height: 56px;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
  font-size: 1.08rem;
}

.shop-hero {
  position: relative;
  min-height: 260px;
  display: flex;
  align-items: end;
  overflow: hidden;
  margin-bottom: 18px;
  padding: 24px;
  color: #fff;
  border-radius: var(--radius);
}

.shop-hero > img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: -2;
}

.shop-hero-content {
  max-width: 760px;
}

.shop-logo {
  width: 58px;
  height: 58px;
  display: grid;
  place-items: center;
  margin-bottom: 10px;
  object-fit: cover;
  color: #fff;
  background: var(--green-dark);
  border: 2px solid rgba(255, 255, 255, 0.92);
  border-radius: var(--radius);
  font-weight: 900;
}

.shop-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(0deg, rgba(8, 26, 22, 0.78), rgba(8, 26, 22, 0.15));
}

.shop-hero h1 {
  margin: 10px 0 6px;
  font-size: 2.2rem;
}

.stat-card,
.segment-card,
.account-card,
.order-card,
.admin-card {
  padding: 14px;
}

.segment-card {
  display: grid;
  gap: 6px;
  width: 100%;
  min-height: 76px;
  color: var(--ink);
  text-align: left;
}

button.segment-card {
  border-color: var(--line);
}

.segment-card.active {
  border-color: var(--green);
  box-shadow: inset 0 0 0 1px var(--green);
}

.segment-card span {
  color: var(--muted);
  font-size: 0.86rem;
  font-weight: 800;
}

.stat-card span {
  color: var(--muted);
  font-size: 0.84rem;
  font-weight: 900;
}

.stat-card strong {
  display: block;
  margin-top: 8px;
  font-size: 1.7rem;
}

.account-card {
  display: grid;
  gap: 6px;
}

.account-card code {
  padding: 4px 7px;
  background: var(--surface-2);
  border-radius: 6px;
}

.order-card,
.admin-card {
  display: grid;
  gap: 12px;
}

.order-items {
  padding: 10px;
  background: var(--surface-2);
  border-radius: var(--radius);
}

.order-items div {
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

.order-contact {
  align-items: flex-start;
  flex-wrap: wrap;
  padding: 10px;
  color: var(--muted);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.order-contact span {
  flex: 1 1 210px;
  min-width: 0;
  overflow-wrap: anywhere;
}

.order-contact a {
  color: var(--blue);
}

.shop-phone-link {
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  min-height: 36px;
  max-width: 100%;
  color: var(--green-dark);
  font-weight: 700;
  overflow-wrap: anywhere;
  text-underline-offset: 3px;
}

.shop-phone-link bdi {
  white-space: nowrap;
}

.order-shop-contacts {
  display: grid;
  gap: 8px;
  border-block-start: 1px solid var(--line);
  padding-block-start: 8px;
}

.order-shop-contact {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 4px 16px;
  min-width: 0;
}

.order-shop-contact strong {
  overflow-wrap: anywhere;
}

.order-global-status {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  color: var(--muted);
  font-size: 0.8rem;
}

.order-shops {
  min-width: 0;
}

.order-shop {
  padding-block: 12px;
  border-block-start: 1px solid var(--line);
}

.order-shop-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
  margin-block-end: 10px;
}

.order-shop-head h3 {
  margin: 0;
  font-size: 1rem;
  overflow-wrap: anywhere;
}

.order-shop-items {
  display: grid;
  gap: 8px;
  margin-block-end: 4px;
}

.order-shop-line {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, auto);
  gap: 12px;
  overflow-wrap: anywhere;
}

.order-shop-line > span:last-child {
  text-align: end;
}

.order-actions {
  flex-wrap: wrap;
  justify-content: flex-end;
}

.admin-card {
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
}

.admin-actions {
  flex-wrap: wrap;
  justify-content: flex-end;
}

.reject-field {
  max-width: 440px;
  margin-top: 10px;
}

.empty-state {
  display: grid;
  place-items: center;
  gap: 4px;
  min-height: 120px;
  padding: 20px;
  text-align: center;
  background: var(--surface-2);
  border: 1px dashed var(--line);
  border-radius: var(--radius);
}

.empty-state span {
  color: var(--muted);
}

.invoice-dialog,
.registry-dialog {
  width: min(900px, calc(100% - 24px));
  border: 0;
  border-radius: var(--radius);
  padding: 0;
}

.invoice-dialog::backdrop,
.registry-dialog::backdrop {
  background: rgba(19, 33, 29, 0.48);
}

.dialog-header,
.dialog-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 18px;
  border-bottom: 1px solid var(--line);
}

.registry-dialog .dialog-header {
  gap: 12px;
}

.registry-dialog .dialog-header strong {
  min-width: 0;
  overflow-wrap: anywhere;
}

.registry-dialog .icon-button {
  flex: 0 0 38px;
}

.registry-image {
  display: block;
  width: 100%;
  height: auto;
}

.registry-view-button {
  display: block;
  margin-block: 12px;
}

.registry-note {
  margin: 0;
  color: var(--muted);
  font-size: 0.85rem;
  font-weight: 400;
}

.registration-wide {
  grid-column: 1 / -1;
}

.field-requirement {
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 400;
}

.registration-notice {
  white-space: pre-line;
  overflow-wrap: anywhere;
}

.registration-settings-page {
  max-width: 1040px;
}

.registration-settings-form {
  display: grid;
  gap: 16px;
}

.settings-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.settings-section {
  min-width: 0;
  padding-block: 20px;
  border-block-start: 1px solid var(--line);
}

.settings-section > summary {
  cursor: pointer;
  font-size: 1.1rem;
  font-weight: 800;
  padding-block: 8px;
}

.settings-field,
.settings-text {
  min-width: 0;
  margin: 24px 0 0;
  padding: 16px 0;
  border: 0;
  border-block-start: 1px solid var(--line);
}

.settings-field legend,
.settings-text legend {
  max-width: 100%;
  padding-inline-end: 12px;
  font-weight: 800;
  overflow-wrap: anywhere;
}

.settings-translations {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin-block-start: 12px;
}

.settings-translations label {
  min-width: 0;
}

.settings-required {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 500;
}

.settings-required input {
  flex: 0 0 20px;
  width: 20px;
  min-height: 20px;
  height: 20px;
  accent-color: var(--green-dark);
}

.annual-fee-field {
  max-width: 320px;
}

.settings-preview {
  scroll-margin-top: 90px;
}

@media (max-width: 640px) {
  .settings-translations {
    grid-template-columns: 1fr;
  }
}

.dialog-actions {
  justify-content: flex-end;
  border-top: 1px solid var(--line);
  border-bottom: 0;
}

.icon-button {
  width: 38px;
  padding: 0;
  font-size: 1.3rem;
  background: var(--surface-2);
  border-color: var(--line);
}

.invoice-sheet {
  padding: 24px;
  overflow-x: auto;
}

.invoice-meta {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px 18px;
  margin: 20px 0;
}

.invoice-meta p {
  margin: 0;
}

.invoice-table {
  width: 100%;
  border-collapse: collapse;
}

.invoice-table th,
.invoice-table td {
  padding: 10px;
  text-align: left;
  border-bottom: 1px solid var(--line);
}

.invoice-total {
  margin-top: 18px;
  font-size: 1.2rem;
}

html[dir="rtl"] body,
html[dir="rtl"] .store-card-static,
html[dir="rtl"] .segment-card,
html[dir="rtl"] .invoice-table th,
html[dir="rtl"] .invoice-table td {
  text-align: right;
}

html[dir="rtl"] .hero-overlay {
  background:
    linear-gradient(270deg, rgba(8, 26, 22, 0.84), rgba(8, 26, 22, 0.48) 54%, rgba(8, 26, 22, 0.05)),
    linear-gradient(0deg, rgba(19, 33, 29, 0.12), rgba(19, 33, 29, 0.12));
}

@media print {
  body > *:not(.invoice-dialog) {
    display: none !important;
  }

  .invoice-dialog {
    position: static;
    width: 100%;
    box-shadow: none;
  }

  .dialog-header,
  .dialog-actions {
    display: none;
  }
}

@media (max-width: 1080px) {
  .client-layout,
  .checkout-layout,
  .admin-layout {
    grid-template-columns: 1fr;
  }

  .cart-panel {
    position: static;
  }

  .account-grid,
  .stats-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 820px) {
  .app-shell {
    background: #f6f8f3;
    backdrop-filter: none;
  }

  .topbar {
    min-height: 68px;
    padding: 8px 0;
  }

  .screen-header,
  .welcome-panel {
    align-items: stretch;
    flex-direction: column;
  }

  .topbar-actions {
    flex: 1;
    flex-wrap: nowrap;
  }

  .nav-actions {
    position: fixed;
    inset-inline: 0;
    bottom: 0;
    z-index: 70;
    width: 100%;
    min-height: 64px;
    display: flex;
    gap: 2px;
    padding: 6px 6px calc(6px + env(safe-area-inset-bottom));
    background: rgba(255, 255, 255, 0.97);
    border: 0;
    border-top: 1px solid var(--line);
    border-radius: 0;
    box-shadow: 0 -8px 24px rgba(19, 33, 29, 0.08);
    backdrop-filter: blur(14px);
  }

  .nav-tab {
    flex: 1;
    min-width: 0;
    min-height: 50px;
    padding: 4px 3px;
    font-size: 0.75rem;
    line-height: 1.08;
  }

  .language-switch {
    width: auto;
    flex: 0 0 auto;
  }

  .language-button {
    min-width: 42px;
    padding: 0 7px;
  }

  .session-box {
    width: auto;
    min-width: 0;
  }

  .user-summary {
    min-width: 0;
  }

  .user-summary strong,
  .user-summary small {
    display: block;
    max-width: 130px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .hero {
    min-height: min(610px, calc(100svh - 68px));
  }

  .hero h1 {
    font-size: 2.3rem;
  }

  .form-grid,
  .product-grid,
  .account-grid,
  .invoice-meta {
    grid-template-columns: 1fr;
  }

  .stats-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .segment-summary {
    grid-auto-flow: column;
    grid-auto-columns: minmax(156px, 1fr);
    grid-template-columns: none;
    overflow-x: auto;
    padding-bottom: 4px;
  }

  .toolbar-row {
    align-items: stretch;
    flex-direction: column;
  }

  .admin-card {
    grid-template-columns: 1fr;
  }

  .merchant-product-card {
    grid-template-columns: 120px minmax(0, 1fr);
  }

  .client-layout .catalog-area {
    order: 1;
  }

  .client-layout .store-rail {
    order: 2;
  }

  .client-layout .cart-panel {
    order: 3;
  }

  body {
    padding-bottom: calc(64px + env(safe-area-inset-bottom));
  }

  .toast {
    bottom: calc(76px + env(safe-area-inset-bottom));
  }
}

@media (max-width: 560px) {
  .workspace,
  .topbar,
  .hero-content {
    width: min(100% - 20px, 1240px);
  }

  .product-foot,
  .order-head,
  .order-foot,
  .admin-card-header {
    align-items: stretch;
    flex-direction: column;
  }

  .brand {
    min-width: 0;
  }

  .brand small,
  .user-summary,
  .guest-label {
    display: none;
  }

  .brand-mark {
    width: 40px;
    height: 40px;
  }

  .session-box {
    min-height: 46px;
    padding: 4px;
  }

  .session-box:has(.guest-label) {
    display: none;
  }

  .auth-mode-switch {
    grid-template-columns: 1fr;
  }

  .auth-mode-switch button {
    min-height: 42px;
  }

  .merchant-product-card {
    grid-template-columns: 1fr;
  }

  .merchant-product-card > img {
    max-height: 210px;
  }

  .stats-grid {
    gap: 10px;
  }

  .stat-card strong {
    font-size: 1.25rem;
  }

  .invoice-table {
    min-width: 620px;
  }
}
/* Account and store delivery surfaces share the existing application layout. */
.account-page, .legal-page { max-width: 920px; margin-inline: auto; }
.account-page .form-panel { margin-block: 24px; }
.legal-page p { line-height: 1.75; overflow-wrap: anywhere; }
.legal-page h2 { margin-top: 28px; font-size: 20px; }
.legal-footer { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px 24px; padding: 24px 16px calc(28px + env(safe-area-inset-bottom)); font-size: 13px; border-top: 1px solid #d9dfe3; }
.legal-footer a, .legal-page a, .consent-field a { color: #136548; text-decoration: underline; }
.consent-field { display: flex; align-items: flex-start; gap: 10px; line-height: 1.6; }
.consent-field input { width: 20px; height: 20px; min-width: 20px; margin-top: 3px; }
.account-section { padding-block: 24px; border-top: 1px solid #d9dfe3; }
.danger-zone { border-inline-start: 3px solid #b73b3b; }
.blocked-list { list-style: none; padding: 0; }
.blocked-list li { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-block: 12px; }
.report-details { margin-top: 16px; font-size: 13px; }
.report-details summary { cursor: pointer; padding-block: 8px; }
.report-details form { display: grid; gap: 10px; margin-top: 8px; }
.report-item { padding-block: 20px; border-bottom: 1px solid #d9dfe3; }
.report-item p { white-space: pre-wrap; overflow-wrap: anywhere; }
.report-item time { display: block; margin-bottom: 12px; font-size: 12px; }
.admin-panel { background: transparent; border: 0; border-radius: 0; box-shadow: none; padding: 0; }
.admin-layout { margin-top: 24px; }
body { padding-top: env(safe-area-inset-top); padding-left: env(safe-area-inset-left); padding-right: env(safe-area-inset-right); }
input, textarea, select { font-size: 16px; }
@media (max-width: 640px) {
  .screen-header { flex-wrap: wrap; }
  .nav-actions { overflow-x: auto; }
  .nav-tab { position: relative; min-height: 50px; flex: 1 1 0; }
  .nav-tab span { white-space: nowrap; }
  .nav-tab b { position: absolute; top: 2px; inset-inline-end: 2px; min-width: 14px; height: 14px; font-size: 9px; }
  .session-box { display: none; }
  .invoice-table { font-size: 11px; }
}
@media (max-width: 380px) {
  .nav-tab { font-size: 10px; padding-inline: 1px; }
  .nav-tab:has(.nav-label-compact) .nav-label { display: none; }
  .nav-tab .nav-label-compact { display: inline; }
}
.pagination { display: flex; align-items: center; justify-content: center; gap: 16px; margin-block: 24px; min-height: 44px; }
.pagination button { width: 44px; height: 44px; padding: 0; font-size: 28px; border: 1px solid #cbd7d0; border-radius: 6px; background: white; color: #0b5044; cursor: pointer; }
.pagination button:disabled { opacity: .4; cursor: default; }
.pagination span { min-width: 80px; text-align: center; font-variant-numeric: tabular-nums; }
[dir="rtl"] .pagination button { transform: rotate(180deg); }
