:root {
  --ink: #172126;
  --muted: #68727d;
  --paper: #fbfaf7;
  --surface: #ffffff;
  --soft: #f7f7f4;
  --line: #e7e0d8;
  --red: #b9292f;
  --teal: #008b8b;
  --gold: #d79b28;
  --green: #2b8a5f;
  --shadow: 0 22px 60px rgba(23, 33, 38, 0.12);
  font-family: "Segoe UI", Tahoma, Arial, sans-serif;
}

.customer-complaint {
  display: none !important;
}

:root[data-theme="dark"] {
  --ink: #eef4f5;
  --muted: #a6b2ba;
  --paper: #101619;
  --surface: #172126;
  --soft: #202c31;
  --line: #314047;
  --red: #ff5c66;
  --teal: #25b9b6;
  --gold: #f0b94d;
  --green: #58c98b;
  --shadow: 0 22px 60px rgba(0, 0, 0, 0.34);
}

* {
  box-sizing: border-box;
}

html {
  max-width: 100%;
  overflow-x: hidden;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  max-width: 100%;
  overflow-x: hidden;
}

main,
section,
.workspace {
  max-width: 100%;
}

body:not([data-authenticated="true"]),
body[data-active-role="admin"],
body[data-active-role="store"] {
  background:
    linear-gradient(90deg, rgba(247, 245, 239, 0.88), rgba(247, 245, 239, 0.64)),
    url("assets/iraqflag.png") center / cover fixed no-repeat,
    var(--paper);
}

:root[data-theme="dark"] body:not([data-authenticated="true"]),
:root[data-theme="dark"] body[data-active-role="admin"],
:root[data-theme="dark"] body[data-active-role="store"] {
  background:
    linear-gradient(90deg, rgba(12, 17, 20, 0.9), rgba(12, 17, 20, 0.68)),
    url("assets/iraqflag.png") center / cover fixed no-repeat,
    var(--paper);
}

:root[data-theme="dark"] img {
  filter: saturate(0.92) brightness(0.88);
}

:root[data-theme="dark"] input,
:root[data-theme="dark"] textarea,
:root[data-theme="dark"] select {
  background: var(--soft);
  color: var(--ink);
}

:root[data-theme="dark"] input::placeholder,
:root[data-theme="dark"] textarea::placeholder {
  color: #7f8e96;
}

:root[data-theme="dark"] .topbar {
  background: rgba(16, 22, 25, 0.34);
}

:root[data-theme="dark"] .stack-list span,
:root[data-theme="dark"] .module-columns div,
:root[data-theme="dark"] .module-output,
:root[data-theme="dark"] .access-panel,
:root[data-theme="dark"] .session-pill,
:root[data-theme="dark"] .demo-login-row button,
:root[data-theme="dark"] .mvp-lab,
:root[data-theme="dark"] .order-document,
:root[data-theme="dark"] .flow-card,
:root[data-theme="dark"] .governorate-card,
:root[data-theme="dark"] .shipping-filter span,
:root[data-theme="dark"] .search-box,
:root[data-theme="dark"] .store-profile-card,
:root[data-theme="dark"] .store-profile-products span,
:root[data-theme="dark"] .product-grid article,
:root[data-theme="dark"] .product-detail-button,
:root[data-theme="dark"] .cart-controls span,
:root[data-theme="dark"] .cart-review,
:root[data-theme="dark"] .offers-strip,
:root[data-theme="dark"] .account-center,
:root[data-theme="dark"] .account-output,
:root[data-theme="dark"] .store-product-card,
:root[data-theme="dark"] .image-action-row button,
:root[data-theme="dark"] .shipping-price-grid label,
:root[data-theme="dark"] .production-config-grid article,
:root[data-theme="dark"] .status-log-list span,
:root[data-theme="dark"] .production-list span,
:root[data-theme="dark"] .notification-row,
:root[data-theme="dark"] .notification-list small,
:root[data-theme="dark"] .image-preview-panel,
:root[data-theme="dark"] .product-detail-card,
:root[data-theme="dark"] .dashboard,
:root[data-theme="dark"] .dash-top div,
:root[data-theme="dark"] .table-head,
:root[data-theme="dark"] .ops-card,
:root[data-theme="dark"] .application-preview,
:root[data-theme="dark"] .package-summary,
:root[data-theme="dark"] .ad-preview,
:root[data-theme="dark"] .coupon-preview,
:root[data-theme="dark"] .ranking-preview,
:root[data-theme="dark"] .user-preview,
:root[data-theme="dark"] .user-state,
:root[data-theme="dark"] .chips span,
:root[data-theme="dark"] .admin-actions button,
:root[data-theme="dark"] .finance-options button,
:root[data-theme="dark"] .order-detail-card,
:root[data-theme="dark"] .order-detail-card div,
:root[data-theme="dark"] .admin-state,
:root[data-theme="dark"] .finance-summary,
:root[data-theme="dark"] .site-commission-card,
:root[data-theme="dark"] .rent-due-card,
:root[data-theme="dark"] .commission-summary-grid div,
:root[data-theme="dark"] .rent-due-row,
:root[data-theme="dark"] .complaint-box,
:root[data-theme="dark"] .finance-bar,
:root[data-theme="dark"] .governorate-sales-card,
:root[data-theme="dark"] .sales-insights div,
:root[data-theme="dark"] .date-filter-row,
:root[data-theme="dark"] .hero-slide-editor,
:root[data-theme="dark"] .section-detail-head,
:root[data-theme="dark"] .section-hub,
:root[data-theme="dark"] .section-card-button,
:root[data-theme="dark"] .empty-state,
:root[data-theme="dark"] .empty-row {
  background: var(--soft);
}

:root[data-theme="dark"],
:root[data-theme="dark"] body,
:root[data-theme="dark"] main,
:root[data-theme="dark"] section,
:root[data-theme="dark"] article,
:root[data-theme="dark"] div,
:root[data-theme="dark"] h1,
:root[data-theme="dark"] h2,
:root[data-theme="dark"] h3,
:root[data-theme="dark"] h4,
:root[data-theme="dark"] h5,
:root[data-theme="dark"] h6,
:root[data-theme="dark"] strong,
:root[data-theme="dark"] label,
:root[data-theme="dark"] button,
:root[data-theme="dark"] a,
:root[data-theme="dark"] code,
:root[data-theme="dark"] dt,
:root[data-theme="dark"] dd {
  color: var(--ink);
}

:root[data-theme="dark"] small,
:root[data-theme="dark"] p,
:root[data-theme="dark"] span,
:root[data-theme="dark"] li {
  color: inherit;
}

:root[data-theme="dark"] .brand small,
:root[data-theme="dark"] .section-head p,
:root[data-theme="dark"] .dash-top small,
:root[data-theme="dark"] .metric-grid small,
:root[data-theme="dark"] .muted,
:root[data-theme="dark"] [class*="note"],
:root[data-theme="dark"] [class*="help"] {
  color: var(--muted);
}

:root[data-theme="dark"] .merchant-cta,
:root[data-theme="dark"] .customer-complaint {
  background: #151f22;
}

:root[data-theme="dark"] .lang-next,
:root[data-theme="dark"] .role-switch a.active,
:root[data-theme="dark"] .shipping-filter .active {
  background: rgba(37, 185, 182, 0.16);
}

:root[data-theme="dark"] .pill,
:root[data-theme="dark"] .production-config-grid article.ready,
:root[data-theme="dark"] .production-list span.ready {
  background: rgba(88, 201, 139, 0.16);
}

:root[data-theme="dark"] .pill.gold,
:root[data-theme="dark"] .outline-button.is-hidden,
:root[data-theme="dark"] .production-config-grid article.todo,
:root[data-theme="dark"] .production-list span.todo,
:root[data-theme="dark"] #orderBlockToggle.is-blocked {
  background: rgba(240, 185, 77, 0.16);
}

:root[data-theme="dark"] .catalog-filters input,
:root[data-theme="dark"] .catalog-filters select {
  background: var(--soft);
}

:root[data-theme="dark"] .phone-shell {
  background: #05090b;
}

:root[data-theme="dark"] .phone-screen {
  background:
    linear-gradient(180deg, rgba(16, 22, 25, 0.9), rgba(16, 22, 25, 0.78)),
    var(--customer-bg-image, url("assets/iraq-flag-mobile.png")) center top / cover no-repeat;
}

:root[data-theme="dark"] .primary-action {
  color: #fff;
}

:root[data-theme="dark"] .brand-mark,
:root[data-theme="dark"] .session-pill button,
:root[data-theme="dark"] .admin-actions button.active,
:root[data-theme="dark"] .finance-options button.active,
:root[data-theme="dark"] .status-buttons button.active,
:root[data-theme="dark"] .coverage-switch button.active,
:root[data-theme="dark"] .section-nav-button.active {
  color: #fff;
}

:root[data-theme="dark"] .brand-mark,
:root[data-theme="dark"] .session-pill button {
  background: rgba(5, 9, 11, 0.78);
  border: 1px solid rgba(255, 255, 255, 0.16);
  color: #fff;
}

:root[data-theme="dark"] .lang-toggle,
:root[data-theme="dark"] .theme-toggle,
:root[data-theme="dark"] .session-pill {
  background: rgba(5, 9, 11, 0.34);
}

:root[data-theme="dark"] .brand strong,
:root[data-theme="dark"] .section-head h1,
:root[data-theme="dark"] .section-head h2,
:root[data-theme="dark"] .section-head h3,
:root[data-theme="dark"] #store .section-head h2 {
  color: #fff;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input,
select {
  font: inherit;
}

.topbar {
  align-items: center;
  background: rgba(251, 250, 247, 0.32);
  border-bottom: 1px solid rgba(15, 20, 23, 0.12);
  box-shadow: 0 12px 36px rgba(15, 20, 23, 0.04);
  display: flex;
  gap: 28px;
  inset: 0 0 auto;
  justify-content: space-between;
  padding: 14px clamp(18px, 4vw, 56px);
  position: sticky;
  top: 0;
  z-index: 20;
  backdrop-filter: blur(7px) saturate(1.08);
}

.brand {
  align-items: center;
  display: flex;
  gap: 12px;
  min-width: 190px;
}

.brand-mark {
  align-items: center;
  background: var(--ink);
  border-radius: 8px;
  color: white;
  display: inline-flex;
  font-weight: 800;
  height: 44px;
  justify-content: center;
  width: 44px;
}

.brand strong,
.brand small {
  display: block;
  line-height: 1.2;
}

.brand small {
  color: var(--muted);
  font-size: 12px;
  margin-top: 3px;
}

.nav {
  display: flex;
  gap: 8px;
}

.nav a,
.lang-toggle,
.theme-toggle,
.install-app-button,
.mobile-layout-button {
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--muted);
  padding: 10px 13px;
}

.nav a:hover,
.lang-toggle:hover,
.theme-toggle:hover,
.install-app-button:hover,
.mobile-layout-button:hover {
  border-color: var(--teal);
  color: var(--ink);
}

.lang-toggle,
.theme-toggle,
.install-app-button,
.mobile-layout-button {
  align-items: center;
  background: rgba(255, 255, 255, 0.38);
  cursor: pointer;
  display: inline-flex;
  gap: 8px;
}

.theme-toggle {
  font-weight: 900;
}

.install-app-button {
  background: linear-gradient(135deg, var(--red), var(--teal));
  border-color: transparent;
  color: #fff;
  font-weight: 900;
  white-space: nowrap;
}

.mobile-layout-button {
  background: rgba(255, 255, 255, 0.38);
  color: var(--ink);
  font-weight: 900;
  white-space: nowrap;
}

.mobile-layout-button.active {
  background: linear-gradient(135deg, var(--teal), var(--green));
  border-color: transparent;
  color: #fff;
}

.install-app-button.is-installed {
  background: var(--green);
}

.pwa-install-sheet {
  align-items: center;
  background: rgba(10, 14, 16, 0.58);
  display: flex;
  inset: 0;
  justify-content: center;
  padding: 18px;
  position: fixed;
  z-index: 80;
}

.pwa-install-sheet[hidden] {
  display: none;
}

.pwa-install-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
  display: grid;
  gap: 12px;
  max-width: 480px;
  padding: 16px;
  width: min(100%, 480px);
}

.pwa-install-head {
  align-items: center;
  display: flex;
  gap: 12px;
  justify-content: space-between;
}

.pwa-install-card p,
.pwa-install-card li {
  color: var(--muted);
  line-height: 1.6;
}

.pwa-install-card ol {
  margin: 0;
  padding-inline-start: 22px;
}

.lang-next {
  background: #edf7f7;
  border-radius: 6px;
  color: var(--teal);
  font-weight: 800;
  padding: 3px 6px;
}

.role-switch {
  align-items: center;
  display: flex;
  gap: 6px;
}

.role-switch a {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  min-height: 36px;
  padding: 10px 12px;
  white-space: nowrap;
}

.role-switch a.active {
  background: #e9f6f4;
  border-color: rgba(0, 139, 139, 0.35);
  color: var(--teal);
}

.role-switch {
  display: none;
}

.session-pill {
  align-items: center;
  background: rgba(255, 255, 255, 0.38);
  border: 1px solid var(--line);
  border-radius: 8px;
  display: flex;
  gap: 8px;
  padding: 8px;
}

.session-pill span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.session-pill button {
  background: var(--ink);
  border: 0;
  border-radius: 8px;
  color: #fff;
  cursor: pointer;
  font-weight: 900;
  min-height: 32px;
  padding: 7px 10px;
}

body:not([data-authenticated="true"]) .nav,
body[data-authenticated="true"] .nav {
  display: none;
}

body:not([data-authenticated="true"]) .hero-actions {
  display: none;
}

body:not([data-authenticated="true"]) #customer,
body:not([data-authenticated="true"]) #store,
body:not([data-authenticated="true"]) #admin,
body:not([data-authenticated="true"]) #order-document,
body:not([data-authenticated="true"]) #build-plan,
body:not([data-authenticated="true"]) #complete {
  display: none;
}

body[data-authenticated="true"] .hero,
body[data-authenticated="true"] .flow,
body[data-authenticated="true"] .mvp-lab,
body[data-authenticated="true"] #order-document,
body[data-authenticated="true"] #build-plan {
  display: none;
}

body[data-active-role="customer"] #store,
body[data-active-role="customer"] #admin,
body[data-active-role="store"] #customer,
body[data-active-role="store"] #admin,
body[data-active-role="admin"] #customer,
body[data-active-role="admin"] #store {
  display: none;
}

.hero {
  align-items: center;
  display: grid;
  gap: clamp(24px, 4vw, 60px);
  grid-template-columns: minmax(300px, 0.9fr) minmax(320px, 1.15fr);
  min-height: calc(100vh - 73px);
  padding: clamp(28px, 5vw, 70px) clamp(18px, 5vw, 72px) 28px;
}

body:not([data-authenticated="true"]) .hero {
  background: transparent;
}

body:not([data-authenticated="true"]) .access-panel,
body:not([data-authenticated="true"]) .hero-visual {
  backdrop-filter: blur(10px);
  background: rgba(255, 255, 255, 0.84);
}

:root[data-theme="dark"] body:not([data-authenticated="true"]) .access-panel,
:root[data-theme="dark"] body:not([data-authenticated="true"]) .hero-visual {
  background: rgba(15, 20, 23, 0.82);
}

.hero-copy {
  max-width: 640px;
}

.eyebrow,
.section-head p {
  color: var(--red);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0;
  margin: 0 0 10px;
  text-transform: uppercase;
}

h1 {
  font-size: clamp(42px, 6vw, 82px);
  line-height: 0.98;
  margin: 0;
}

.hero-copy > p:not(.eyebrow) {
  color: var(--muted);
  font-size: 20px;
  line-height: 1.8;
  margin: 22px 0 0;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 30px;
}

.access-panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  display: grid;
  gap: 10px;
  margin-top: 22px;
  max-width: 460px;
  padding: 16px;
}

.access-panel > strong {
  font-size: 18px;
}

.access-panel label {
  display: grid;
  gap: 6px;
}

.access-panel label span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 900;
}

.access-panel input {
  border: 1px solid var(--line);
  border-radius: 8px;
  min-height: 42px;
  outline: 0;
  padding: 10px 12px;
}

.demo-login-row {
  display: grid;
  gap: 8px;
  grid-template-columns: repeat(3, 1fr);
}

.demo-login-row button {
  background: #f7f7f4;
  border: 1px solid var(--line);
  border-radius: 8px;
  cursor: pointer;
  font-weight: 900;
  min-height: 34px;
}

.startup-shortcuts {
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(185, 41, 47, 0.22);
  border-radius: 8px;
  display: grid;
  gap: 12px;
  margin-top: 14px;
  max-width: 460px;
  padding: 14px;
}

.startup-shortcuts > strong {
  color: var(--ink);
  font-size: 16px;
}

.startup-shortcuts div {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.startup-shortcuts button {
  justify-content: center;
  min-height: 42px;
}

.form-focus-pulse {
  animation: formFocusPulse 1.4s ease;
  box-shadow: 0 0 0 4px rgba(185, 41, 47, 0.16);
}

@keyframes formFocusPulse {
  0% { transform: translateY(0); }
  35% { transform: translateY(-4px); }
  100% { transform: translateY(0); }
}

.startup-form-modal {
  align-items: center;
  background: rgba(9, 12, 14, 0.46);
  backdrop-filter: blur(8px);
  display: flex;
  inset: 0;
  justify-content: center;
  padding: 18px;
  position: fixed;
  z-index: 230;
}

.startup-form-modal[hidden] {
  display: none;
}

.startup-form-panel {
  background: var(--surface);
  border: 1px solid rgba(185, 41, 47, 0.28);
  border-radius: 8px;
  box-shadow: 0 24px 70px rgba(9, 12, 14, 0.22);
  display: grid;
  gap: 16px;
  max-height: min(88vh, 760px);
  max-width: 560px;
  overflow: auto;
  padding: 18px;
  width: min(560px, 100%);
}

.startup-form-head {
  align-items: center;
  display: flex;
  gap: 12px;
  justify-content: space-between;
}

.startup-form-head strong {
  color: var(--ink);
  font-size: 20px;
}

.startup-form-body {
  display: grid;
  gap: 12px;
}

.primary-action,
.secondary-action,
.admin-button {
  border-radius: 8px;
  display: inline-flex;
  font-weight: 800;
  justify-content: center;
  min-height: 44px;
  padding: 12px 18px;
}

.primary-action {
  background: var(--red);
  color: white;
}

.secondary-action {
  border: 1px solid var(--line);
  color: var(--ink);
}

.hero-visual {
  border-radius: 8px;
  box-shadow: var(--shadow);
  min-height: 420px;
  overflow: hidden;
  position: relative;
}

.hero-slide-track,
.hero-slide-track img {
  height: 100%;
  inset: 0;
  position: absolute;
  width: 100%;
}

.hero-slide-track img {
  display: block;
  opacity: 0;
  object-fit: cover;
  transition: opacity 700ms ease;
}

.hero-splash-ad .hero-slide-track img {
  object-fit: contain;
}

.hero-splash-ad.size-banner .hero-slide-track img {
  object-fit: cover;
}

.hero-splash-ad.size-medium .hero-slide-track {
  inset: 26px;
}

.hero-splash-ad.size-icon .hero-slide-track {
  height: min(210px, 54%);
  inset: 50% auto auto 50%;
  transform: translate(-50%, -58%);
  width: min(210px, 54%);
}

.hero-splash-caption {
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.62), rgba(0, 0, 0, 0.08));
  bottom: 0;
  color: #fff;
  display: grid;
  gap: 5px;
  inset-inline: 0;
  padding: 54px 22px 22px;
  position: absolute;
  z-index: 3;
}

.hero-splash-caption strong,
.hero-splash-caption span {
  display: block;
}

.hero-splash-caption span {
  line-height: 1.5;
  opacity: 0.9;
}

.hero-slide-track img.active {
  opacity: 1;
}

.hero-slide-dots {
  bottom: 14px;
  display: flex;
  gap: 7px;
  left: 50%;
  position: absolute;
  transform: translateX(-50%);
  z-index: 2;
}

.hero-slide-dots span {
  background: rgba(255, 255, 255, 0.58);
  border-radius: 999px;
  height: 8px;
  width: 8px;
}

.hero-slide-dots span.active {
  background: #fff;
  width: 22px;
}

.hero-visual > img {
  display: block;
  height: 100%;
  object-fit: cover;
  width: 100%;
}

.flow {
  border-bottom: 1px solid var(--line);
  border-top: 1px solid var(--line);
  display: grid;
  grid-template-columns: repeat(3, 1fr);
}

.flow-step {
  min-height: 160px;
  padding: 28px clamp(18px, 4vw, 44px);
}

.flow-step + .flow-step {
  border-inline-start: 1px solid var(--line);
}

.flow-step span {
  color: var(--gold);
  display: block;
  font-weight: 900;
  margin-bottom: 14px;
}

.flow-step strong {
  display: block;
  font-size: 22px;
}

.flow-step p {
  color: var(--muted);
  line-height: 1.7;
  margin: 10px 0 0;
}

.workspace {
  padding: clamp(42px, 7vw, 86px) clamp(18px, 5vw, 72px);
}

.mvp-lab {
  background: #fff;
  padding: clamp(42px, 7vw, 82px) clamp(18px, 5vw, 72px);
}

.order-document {
  background: #f7f7f4;
  border-bottom: 1px solid var(--line);
  border-top: 1px solid var(--line);
  padding: clamp(42px, 7vw, 82px) clamp(18px, 5vw, 72px);
}

.build-plan {
  background: var(--surface);
  border-bottom: 1px solid var(--line);
  padding: clamp(42px, 7vw, 82px) clamp(18px, 5vw, 72px);
}

.completion-section {
  background: var(--ink);
  color: white;
  padding: clamp(42px, 7vw, 82px) clamp(18px, 5vw, 72px);
}

.completion-section .section-head p {
  color: var(--gold);
}

.completion-grid {
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(4, 1fr);
}

.completion-grid article {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 8px;
  min-height: 210px;
  padding: 20px;
}

.completion-grid span {
  color: var(--gold);
  display: block;
  font-weight: 900;
  margin-bottom: 14px;
}

.completion-grid strong {
  display: block;
  font-size: 22px;
}

.completion-grid p {
  color: rgba(255, 255, 255, 0.72);
  line-height: 1.7;
}

.section-head {
  margin-bottom: 28px;
}

.section-head h2 {
  font-size: clamp(30px, 4vw, 52px);
  margin: 0;
}

.mvp-grid {
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(4, 1fr);
}

.flow-card {
  background: #fbfaf7;
  border: 1px solid var(--line);
  border-radius: 8px;
  min-height: 320px;
  padding: 20px;
}

.flow-icon {
  align-items: center;
  background: var(--ink);
  border-radius: 8px;
  color: white;
  display: inline-flex;
  font-size: 13px;
  font-weight: 900;
  height: 44px;
  justify-content: center;
  min-width: 44px;
  padding: 0 10px;
}

.flow-card h3 {
  font-size: 22px;
  margin: 18px 0 10px;
}

.flow-card p {
  color: var(--muted);
  line-height: 1.7;
  margin: 0 0 18px;
}

.demo-field {
  display: grid;
  gap: 8px;
}

.demo-field span,
.validation-message {
  color: var(--muted);
  font-size: 13px;
}

.demo-field input {
  border: 1px solid var(--line);
  border-radius: 8px;
  min-height: 44px;
  outline: 0;
  padding: 10px 12px;
}

.demo-field input:focus {
  border-color: var(--teal);
}

.validation-message {
  display: block;
  line-height: 1.5;
  margin-top: 10px;
}

.validation-message.valid {
  color: var(--green);
  font-weight: 800;
}

.validation-message.invalid {
  color: var(--red);
  font-weight: 800;
}

.registration-form {
  border-top: 1px solid var(--line);
  display: grid;
  gap: 10px;
  margin-top: 16px;
  padding-top: 16px;
}

.registration-form label {
  display: grid;
  gap: 6px;
}

.registration-form span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.registration-form input {
  border: 1px solid var(--line);
  border-radius: 8px;
  min-height: 42px;
  outline: 0;
  padding: 10px 12px;
}

.registration-form input:focus {
  border-color: var(--teal);
}

.phone-confirm-modal {
  align-items: center;
  background: rgba(23, 33, 38, 0.52);
  display: flex;
  inset: 0;
  justify-content: center;
  padding: 18px;
  position: fixed;
  z-index: 40;
}

.phone-confirm-modal[hidden] {
  display: none;
}

.modal-panel {
  background: var(--surface);
  border-radius: 8px;
  box-shadow: var(--shadow);
  max-width: 430px;
  padding: 24px;
  width: 100%;
}

.modal-panel h3 {
  font-size: 24px;
  margin: 0 0 10px;
}

.modal-panel p {
  color: var(--muted);
  line-height: 1.7;
  margin: 0 0 14px;
}

.modal-panel > strong {
  background: #f7f7f4;
  border: 1px solid var(--line);
  border-radius: 8px;
  display: block;
  font-size: 22px;
  padding: 12px;
  text-align: center;
}

.modal-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 16px;
}

.address-preview,
.shipping-matrix,
.order-route {
  display: grid;
  gap: 8px;
}

.address-preview span,
.shipping-matrix span,
.shipping-matrix strong,
.order-route span {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  min-height: 40px;
  padding: 10px;
}

.shipping-matrix {
  grid-template-columns: 1fr;
}

.shipping-matrix strong {
  color: var(--teal);
}

.order-route span {
  position: relative;
}

.order-doc-grid {
  display: grid;
  gap: 18px;
  grid-template-columns: minmax(0, 1.35fr) minmax(280px, 0.65fr);
}

.order-paper,
.order-summary-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 14px 40px rgba(23, 33, 38, 0.08);
  padding: 22px;
}

.order-paper-head {
  align-items: center;
  border-bottom: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  padding-bottom: 16px;
}

.order-paper-head small,
.order-paper dt,
.order-summary-card p,
.summary-lines span,
#invoicePreviewNote {
  color: var(--muted);
}

.order-paper-head strong {
  display: block;
  font-size: 28px;
  margin-top: 4px;
}

#orderDocStatus {
  background: #e7f6ee;
  border-radius: 999px;
  color: var(--green);
  font-weight: 900;
  padding: 8px 12px;
}

.order-sections {
  display: grid;
  gap: 18px;
  grid-template-columns: 1fr 1fr;
  margin-top: 18px;
}

.order-paper h3,
.order-summary-card h3 {
  font-size: 21px;
  margin: 0 0 12px;
}

.order-paper dl {
  display: grid;
  gap: 10px;
  margin: 0;
}

.order-paper dl div,
.summary-lines div {
  align-items: center;
  background: #fbfaf7;
  border: 1px solid var(--line);
  border-radius: 8px;
  display: flex;
  justify-content: space-between;
  min-height: 42px;
  padding: 10px 12px;
}

.order-paper dd {
  font-weight: 800;
  margin: 0;
  text-align: end;
}

.order-paper a {
  color: var(--teal);
}

.order-lines {
  border: 1px solid var(--line);
  border-radius: 8px;
  margin-top: 18px;
  overflow: hidden;
}

.order-line {
  display: grid;
  gap: 10px;
  grid-template-columns: 1.5fr 0.7fr 1fr 1fr;
  min-height: 46px;
  padding: 12px;
}

.order-line + .order-line {
  border-top: 1px solid var(--line);
}

.order-line.head {
  background: #fbfaf7;
  color: var(--muted);
  font-weight: 900;
}

.delivery-options {
  display: grid;
  gap: 8px;
  margin: 16px 0;
}

.delivery-options button {
  background: #fbfaf7;
  border: 1px solid var(--line);
  border-radius: 8px;
  cursor: pointer;
  font-weight: 900;
  min-height: 42px;
  padding: 10px;
}

.delivery-options button.active {
  background: var(--teal);
  border-color: var(--teal);
  color: white;
}

.summary-lines {
  display: grid;
  gap: 9px;
  margin-bottom: 16px;
}

.summary-lines .final-total {
  background: var(--ink);
  color: white;
}

.summary-lines .final-total span {
  color: rgba(255, 255, 255, 0.72);
}

.build-plan-grid {
  display: grid;
  gap: 14px;
  grid-template-columns: 0.75fr 1.35fr 0.9fr;
}

.stack-card,
.module-card,
.mvp-checklist {
  background: #fbfaf7;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 20px;
}

.stack-card h3,
.module-card h3,
.mvp-checklist h3 {
  font-size: 22px;
  margin: 0 0 14px;
}

.stack-list {
  display: grid;
  gap: 9px;
}

.stack-list span {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  font-weight: 900;
  padding: 11px;
}

.module-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 14px;
}

.module-tabs button {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  cursor: pointer;
  font-weight: 900;
  min-height: 40px;
  padding: 9px 12px;
}

.module-tabs button.active {
  background: var(--teal);
  border-color: var(--teal);
  color: white;
}

.module-output {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  display: grid;
  gap: 14px;
  padding: 15px;
}

.module-output > strong {
  line-height: 1.6;
}

.section-workspace {
  align-items: start;
  direction: ltr;
  display: grid;
  gap: 10px 14px;
  grid-template-columns: minmax(210px, 0.28fr) minmax(0, 1fr);
  position: relative;
}

.section-hub {
  align-self: start;
  background: #f7f7f4;
  border: 1px solid var(--line);
  border-radius: 8px;
  display: grid;
  gap: 6px;
  grid-row: 1 / span 20;
  padding: 8px;
  position: sticky;
  top: 90px;
  direction: rtl;
}

.section-card-button {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  cursor: pointer;
  display: grid;
  gap: 8px;
  grid-template-columns: 34px 1fr;
  min-height: 46px;
  padding: 8px;
  text-align: inherit;
}

.section-card-button:hover {
  border-color: rgba(0, 139, 139, 0.45);
}

.section-card-button.active {
  background: #e9f6f4;
  border-color: rgba(0, 139, 139, 0.45);
}

.section-card-button span {
  align-items: center;
  background: var(--ink);
  border-radius: 8px;
  color: white;
  display: inline-flex;
  font-size: 12px;
  font-weight: 900;
  height: 30px;
  justify-content: center;
  width: 30px;
}

.section-card-button.active span {
  background: var(--teal);
}

.section-card-button strong {
  align-self: center;
  font-size: 13px;
  line-height: 1.4;
}

#store .section-hub {
  background: rgba(23, 33, 38, 0.88);
  border-color: rgba(185, 41, 47, 0.35);
  box-shadow: 0 18px 44px rgba(185, 41, 47, 0.22);
}

#admin,
#store {
  background: transparent;
}

#admin .section-workspace,
#store .section-workspace {
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.18), rgba(255, 255, 255, 0.04));
  border-radius: 8px;
  padding: 12px;
}

#admin .section-detail-head,
#store .section-detail-head,
#admin .dashboard,
#store .dashboard,
#admin .admin-card,
#store .admin-card,
#store .store-ops .ops-card,
#store .store-product-card,
#store .shipping-price-panel,
#store .product-create-form {
  backdrop-filter: blur(10px);
  background: rgba(255, 255, 255, 0.86);
}

:root[data-theme="dark"] #admin .section-detail-head,
:root[data-theme="dark"] #store .section-detail-head,
:root[data-theme="dark"] #admin .dashboard,
:root[data-theme="dark"] #store .dashboard,
:root[data-theme="dark"] #admin .admin-card,
:root[data-theme="dark"] #store .admin-card,
:root[data-theme="dark"] #store .store-ops .ops-card,
:root[data-theme="dark"] #store .store-product-card,
:root[data-theme="dark"] #store .shipping-price-panel,
:root[data-theme="dark"] #store .product-create-form {
  background: rgba(15, 20, 23, 0.84);
}

#store .section-card-button {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.12);
  color: #fff;
}

#store .section-card-button:hover,
#store .section-card-button.active {
  background: rgba(185, 41, 47, 0.34);
  border-color: rgba(255, 255, 255, 0.2);
}

#store .section-card-button span {
  background: rgba(255, 255, 255, 0.15);
  color: #fff;
}

#store .section-card-button.active span {
  background: var(--red);
}

#store .section-card-button strong {
  color: #fff;
}

#admin .section-hub {
  background: linear-gradient(155deg, color-mix(in srgb, var(--red) 58%, #111 42%), color-mix(in srgb, var(--teal) 48%, #111 52%));
  border-color: color-mix(in srgb, var(--teal) 48%, transparent);
  box-shadow: 0 18px 44px color-mix(in srgb, var(--teal) 24%, transparent);
}

#admin .section-card-button {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.12);
  color: #fff;
}

#admin .section-card-button:hover,
#admin .section-card-button.active {
  background: color-mix(in srgb, var(--teal) 45%, transparent);
  border-color: rgba(255, 255, 255, 0.2);
}

#admin .section-card-button span {
  background: color-mix(in srgb, var(--teal) 78%, #111 22%);
  color: #fff;
}

#admin .section-card-button.active span {
  background: var(--gold);
  color: #111;
}

#admin .section-card-button strong {
  color: #fff;
}

#admin .section-detail-head {
  border: 1px solid color-mix(in srgb, var(--teal) 30%, var(--line));
  box-shadow: inset 4px 0 0 var(--teal);
}

#admin .admin-card {
  border-color: color-mix(in srgb, var(--teal) 24%, var(--line));
}

#admin .admin-card h3,
#admin .section-detail-head strong {
  color: var(--red);
}

#admin .admin-button,
#admin .primary-action {
  background: linear-gradient(135deg, var(--red), var(--teal));
  color: #fff;
}

#admin .pill,
#admin .section-head p {
  color: var(--teal);
}

.section-detail-head {
  align-items: center;
  background: #f7f7f4;
  border: 1px solid var(--line);
  border-radius: 8px;
  display: flex;
  gap: 12px;
  justify-content: space-between;
  margin-bottom: 0;
  padding: 12px;
  grid-column: 2;
  grid-row: 1;
  direction: rtl;
}

.section-detail-head strong {
  font-size: 20px;
}

.section-back-button {
  max-width: 190px;
}

.section-panel {
  grid-column: 2;
  grid-row: 2;
  direction: rtl;
}

.section-workspace > .admin-columns,
.section-workspace > .admin-growth,
.section-workspace > .admin-marketing,
.section-workspace > .admin-trust,
.section-workspace > .store-ops {
  grid-column: 2;
  grid-row: 2;
  grid-template-columns: 1fr;
}

.module-columns {
  display: grid;
  gap: 10px;
  grid-template-columns: 1fr 1fr;
}

.module-columns div {
  background: #f7f7f4;
  border: 1px solid var(--line);
  border-radius: 8px;
  display: grid;
  gap: 8px;
  padding: 12px;
}

.module-columns span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.module-columns code {
  color: var(--ink);
  line-height: 1.6;
  white-space: normal;
}

.mvp-checklist ol {
  display: grid;
  gap: 10px;
  margin: 0;
  padding-inline-start: 22px;
}

.mvp-checklist li {
  line-height: 1.6;
}

.customer-grid {
  align-items: center;
  display: grid;
  gap: clamp(22px, 4vw, 56px);
  grid-template-columns: 380px 1fr;
}

#customer {
  background:
    linear-gradient(90deg, rgba(251, 250, 247, 0.92), rgba(251, 250, 247, 0.78)),
    var(--customer-bg-image, url("assets/iraq-flag-mobile.png")) center / min(520px, 92vw) auto no-repeat fixed;
  overflow: hidden;
  position: relative;
}

#customer .section-head,
#customer .customer-grid {
  position: relative;
  z-index: 1;
}

.phone-shell {
  background: #11191d;
  border-radius: 34px;
  box-shadow: var(--shadow);
  padding: 14px;
}

.phone-screen {
  background:
    linear-gradient(180deg, rgba(246, 244, 239, 0.9), rgba(246, 244, 239, 0.76)),
    var(--customer-bg-image, url("assets/iraq-flag-mobile.png")) center top / cover no-repeat;
  border-radius: 24px;
  min-height: 690px;
  overflow: hidden;
  padding: 22px;
}

.mobile-header {
  align-items: center;
  display: flex;
  gap: 12px;
}

.notification-badge {
  align-items: center;
  background: var(--danger);
  border-radius: 999px;
  color: white;
  display: inline-flex;
  font-size: 12px;
  font-weight: 800;
  height: 24px;
  justify-content: center;
  margin-inline-start: auto;
  min-width: 24px;
  padding: 0 8px;
}

.avatar,
.store-logo {
  align-items: center;
  border-radius: 8px;
  color: white;
  display: inline-flex;
  font-weight: 900;
  height: 46px;
  justify-content: center;
  width: 46px;
}

.store-logo.has-image {
  background: #fff;
  border: 1px solid var(--line);
  overflow: hidden;
  padding: 0;
}

.store-logo img,
.store-logo-preview img {
  height: 100%;
  object-fit: cover;
  width: 100%;
}

.store-logo.logo-size-medium {
  height: 56px;
  width: 70px;
}

.store-logo.logo-size-banner {
  height: 64px;
  width: 118px;
}

.store-card .store-logo.logo-size-banner {
  grid-row: span 2;
}

.avatar {
  background: var(--teal);
}

.mobile-header small,
.store-card small {
  color: var(--muted);
  display: block;
  margin-top: 3px;
}

.search-box {
  background: rgba(255, 255, 255, 0.86);
  border: 1px solid var(--line);
  border-radius: 8px;
  display: block;
  margin: 22px 0 14px;
  padding: 10px 12px;
  backdrop-filter: blur(10px);
}

.search-box span {
  color: var(--muted);
  display: block;
  font-size: 12px;
}

.search-box input {
  background: transparent;
  border: 0;
  outline: 0;
  padding: 7px 0 0;
  width: 100%;
}

.governorate-card,
.checkout-card,
.feature-panel,
.dashboard,
.admin-card,
.metric-grid article {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.governorate-card {
  align-items: center;
  display: grid;
  gap: 4px 12px;
  grid-template-columns: 1fr auto;
  padding: 14px;
}

.governorate-card small {
  color: var(--muted);
}

.governorate-card p {
  color: var(--muted);
  font-size: 12px;
  grid-column: 1 / -1;
  line-height: 1.5;
  margin: 6px 0 0;
}

.governorate-card button,
.admin-button {
  background: var(--ink);
  border: 0;
  color: white;
  cursor: pointer;
}

.shipping-filter {
  display: grid;
  gap: 8px;
  grid-template-columns: 1fr 1fr;
  margin-top: 12px;
}

.shipping-filter span {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  min-height: 38px;
  padding: 10px;
  text-align: center;
}

.shipping-filter .active {
  background: #edf7f7;
  border-color: rgba(0, 139, 139, 0.35);
  color: var(--teal);
}

.catalog-filters {
  display: grid;
  gap: 8px;
  grid-template-columns: 1fr 1fr;
  margin-bottom: 12px;
}

.catalog-filters input,
.catalog-filters select {
  background: white;
  border: 1px solid var(--line);
  border-radius: 8px;
  min-height: 38px;
  outline: 0;
  padding: 8px 10px;
  width: 100%;
}

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

.store-profile-button {
  background: var(--ink);
  border: 0;
  border-radius: 8px;
  color: #fff;
  font-size: 12px;
  font-weight: 900;
  min-height: 34px;
  padding: 8px 10px;
}

.store-profile-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  display: grid;
  gap: 8px;
  margin: 10px 0 12px;
  padding: 12px;
}

.store-profile-card[hidden] {
  display: none;
}

.store-profile-card span,
.store-profile-card small {
  color: var(--muted);
}

.store-profile-products {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.store-profile-products span {
  background: #f7f7f4;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 6px 8px;
}

.store-list {
  display: grid;
  gap: 12px;
  margin-top: 18px;
}

body[data-customer-store-page="true"] #customer .search-box,
body[data-customer-store-page="true"] #customer .governorate-card,
body[data-customer-store-page="true"] #customer .shipping-filter,
body[data-customer-store-page="true"] #customer .catalog-filters,
body[data-customer-store-page="true"] #customer .store-list,
body[data-customer-store-page="true"] #customer #customerStoreProfile,
body[data-customer-store-page="true"] #customer .offers-strip {
  display: none;
}

.customer-store-page {
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid var(--line);
  border-radius: 8px;
  display: grid;
  gap: 14px;
  margin-top: 18px;
  padding: 14px;
}

.customer-store-page[hidden] {
  display: none;
}

.customer-store-page-head {
  align-items: center;
  display: grid;
  gap: 14px;
  grid-template-columns: auto 1fr;
}

.store-page-logo {
  height: 74px;
  width: 74px;
}

.customer-store-page h3 {
  font-size: 22px;
  margin: 0;
}

.customer-store-page p {
  color: var(--muted);
  margin: 4px 0 0;
}

.customer-store-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 10px;
}

.customer-store-badges span {
  background: var(--soft);
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--ink);
  font-size: 12px;
  font-weight: 800;
  padding: 6px 9px;
}

.customer-store-products-title {
  border-top: 1px solid var(--line);
  padding-top: 12px;
}

.store-card {
  align-items: center;
  background: var(--surface);
  border: 1px solid transparent;
  border-radius: 8px;
  cursor: pointer;
  display: grid;
  gap: 12px;
  grid-template-columns: auto 1fr auto;
  padding: 13px;
}

.store-card.selected {
  border-color: var(--red);
  box-shadow: 0 8px 22px rgba(185, 41, 47, 0.18);
}

.toys {
  background: var(--red);
}

.tech {
  background: var(--teal);
}

.product-grid {
  display: grid;
  gap: 12px;
  grid-template-columns: 1fr 1fr;
  margin-top: 18px;
}

.product-grid article {
  background: white;
  border-radius: 8px;
  padding: 10px;
}

.product-grid article.is-unavailable {
  opacity: 0.72;
}

.product-art {
  background-position: center;
  background-size: cover;
  border-radius: 8px;
  height: 110px;
  margin-bottom: 10px;
}

.product-art.red {
  background: linear-gradient(135deg, #ffe3e2, #b9292f);
}

.product-art.teal {
  background: linear-gradient(135deg, #d8f7f4, #008b8b);
}

.product-grid strong,
.product-grid small {
  display: block;
}

.product-grid small {
  color: var(--muted);
  margin-top: 4px;
}

.customer-product-description {
  color: var(--ink);
  font-size: 13px;
  line-height: 1.55;
  margin: 8px 0 0;
}

.customer-product-description[hidden] {
  display: none;
}

.stock-badge {
  border-radius: 999px;
  display: inline-flex;
  font-size: 12px;
  font-weight: 900;
  justify-self: start;
  margin-top: 8px;
  padding: 5px 10px;
}

.stock-badge.available {
  background: rgba(0, 139, 139, 0.12);
  color: var(--green);
}

.stock-badge.unavailable {
  background: rgba(170, 35, 35, 0.12);
  color: #8b1016;
}


.product-detail-button {
  background: #f7f7f4;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink);
  font-weight: 900;
  margin-top: 8px;
  min-height: 34px;
  width: 100%;
}

.cart-controls {
  align-items: center;
  display: grid;
  gap: 6px;
  grid-template-columns: 32px 1fr 32px;
  margin-top: 10px;
}

.cart-controls button {
  background: var(--ink);
  border: 0;
  border-radius: 8px;
  color: white;
  cursor: pointer;
  font-weight: 900;
  height: 32px;
}

.cart-controls button:disabled,
#productDetailAdd:disabled {
  cursor: not-allowed;
  opacity: 0.48;
}

.cart-controls span {
  background: #f7f7f4;
  border: 1px solid var(--line);
  border-radius: 8px;
  font-weight: 900;
  min-height: 32px;
  padding: 7px;
  text-align: center;
}

#customer .cart-summary {
  display: none;
}

body[data-customer-cart-open="true"] #customer .cart-summary {
  align-items: center;
  display: flex;
}

.cart-summary {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  justify-content: space-between;
  margin-top: 12px;
  padding: 12px;
}

.cart-summary span {
  color: var(--muted);
  font-weight: 800;
}

#customer .cart-review {
  display: none;
}

body[data-customer-cart-open="true"] #customer .cart-review {
  display: grid;
}

.cart-review {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  gap: 8px;
  margin-top: 10px;
  padding: 12px;
}

.cart-review > strong {
  font-size: 14px;
}

.cart-review div div {
  border-top: 1px solid var(--line);
  display: grid;
  gap: 4px;
  padding-top: 8px;
}

.cart-review .cart-item-row {
  align-items: center;
  grid-template-columns: 1fr auto;
}

.cart-inline-controls {
  align-items: center;
  display: inline-flex;
  flex-wrap: wrap;
  gap: 6px;
  justify-content: flex-end;
}

.cart-inline-controls button {
  border: 1px solid var(--line);
  border-radius: 7px;
  min-height: 30px;
  padding: 5px 8px;
}

.cart-review span,
.cart-review small {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}

body #customer .checkout-card {
  display: none;
}

body > .checkout-card {
  display: none;
}

body[data-customer-checkout-open="true"]::before {
  background: rgba(9, 12, 14, 0.42);
  backdrop-filter: blur(7px);
  content: "";
  inset: 0;
  pointer-events: none;
  position: fixed;
  z-index: 120;
}

body[data-customer-checkout-open="true"] {
  overflow: hidden;
}

body[data-customer-checkout-open="true"] > .checkout-card {
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(12px);
  border: 1px solid var(--line);
  border-radius: 8px;
  display: block;
  left: 50%;
  margin: 0;
  max-height: min(86vh, 760px);
  max-width: min(720px, calc(100vw - 28px));
  overflow: auto;
  position: fixed;
  top: 50%;
  transform: translate(-50%, -50%);
  width: min(720px, calc(100vw - 28px));
  z-index: 130;
}

.checkout-modal-head {
  align-items: center;
  display: flex;
  gap: 12px;
  justify-content: space-between;
  margin-bottom: 14px;
}

.checkout-modal-head strong {
  color: var(--ink);
  font-size: 18px;
}

.checkout-modal-head .outline-button {
  flex: 0 0 auto;
  white-space: nowrap;
}

@media (max-width: 720px) {
  body[data-customer-checkout-open="true"] > .checkout-card {
    left: 50vw;
    max-height: calc(100vh - 28px);
    top: 50vh;
    width: calc(100vw - 24px);
  }

  .checkout-modal-head {
    align-items: stretch;
    flex-direction: column;
  }
}

.cart-checkout-action {
  margin-top: 6px;
  width: 100%;
}

.customer-cart-button {
  align-items: center;
  background: rgba(16, 16, 16, 0.9);
  border: 1px solid rgba(185, 41, 47, 0.45);
  border-radius: 999px;
  bottom: 22px;
  box-shadow: 0 12px 30px rgba(185, 41, 47, 0.24);
  color: #fff;
  display: inline-flex;
  gap: 8px;
  inset-inline-end: 22px;
  min-height: 48px;
  padding: 10px 14px;
  position: fixed;
  z-index: 80;
}

.customer-cart-button[hidden] {
  display: none;
}

.customer-cart-button strong {
  background: var(--red);
  border-radius: 999px;
  color: #fff;
  min-width: 24px;
  padding: 3px 7px;
  text-align: center;
}

.customer-cart-toast {
  background: rgba(16, 16, 16, 0.92);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 8px;
  bottom: 82px;
  color: #fff;
  inset-inline-end: 22px;
  max-width: min(320px, calc(100vw - 32px));
  opacity: 0;
  padding: 10px 13px;
  pointer-events: none;
  position: fixed;
  transform: translateY(8px);
  transition: opacity 0.2s ease, transform 0.2s ease;
  z-index: 81;
}

.customer-cart-toast.show {
  opacity: 1;
  transform: translateY(0);
}

.store-suspended-modal {
  align-items: center;
  background: rgba(9, 12, 14, 0.48);
  backdrop-filter: blur(8px);
  display: flex;
  inset: 0;
  justify-content: center;
  padding: 20px;
  position: fixed;
  z-index: 220;
}

.store-suspended-modal[hidden] {
  display: none;
}

.store-suspended-panel {
  background: var(--surface);
  border: 1px solid rgba(185, 41, 47, 0.35);
  border-radius: 8px;
  box-shadow: 0 24px 70px rgba(185, 41, 47, 0.28);
  color: var(--ink);
  display: grid;
  gap: 16px;
  max-width: 420px;
  padding: 24px;
  text-align: center;
  width: min(420px, 100%);
}

.store-suspended-panel strong {
  color: var(--red);
  font-size: 22px;
  line-height: 1.6;
}

.offers-strip {
  background: var(--ink);
  border-radius: 8px;
  color: white;
  margin-top: 18px;
  padding: 14px;
}

.offers-strip strong {
  display: block;
  margin-bottom: 10px;
}

.offers-strip div {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.offers-strip span {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
  padding: 7px 9px;
}

.feature-panel {
  padding: clamp(22px, 4vw, 40px);
}

.feature-panel h3,
.admin-card h3 {
  font-size: 26px;
  margin: 0 0 18px;
}

.check-list {
  display: grid;
  gap: 12px;
}

.check-list span {
  align-items: center;
  display: flex;
  gap: 10px;
  line-height: 1.6;
}

.check-list span::before {
  background: var(--green);
  border-radius: 50%;
  content: "";
  flex: 0 0 10px;
  height: 10px;
  width: 10px;
}

.checkout-card {
  margin-top: 24px;
  padding: 18px;
}

#customer .governorate-card,
#customer .checkout-card,
#customer .feature-panel,
#customer .store-card,
#customer .store-profile-card,
#customer .product-grid article,
#customer .cart-summary,
#customer .cart-review,
#customer .customer-complaint {
  background: rgba(255, 255, 255, 0.86);
  backdrop-filter: blur(12px);
}

#customer .checkout-form input,
#customer .checkout-form select,
#customer .registration-form input,
#customer .registration-form select,
#customer .cart-controls span {
  background: rgba(255, 255, 255, 0.82);
}

.checkout-form {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(2, 1fr);
  margin-top: 14px;
}

.checkout-form label {
  display: grid;
  gap: 6px;
}

.checkout-form .full-row,
.checkout-form button,
.checkout-form small {
  grid-column: 1 / -1;
}

.checkout-form span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.checkout-form input,
.checkout-form select {
  border: 1px solid var(--line);
  border-radius: 8px;
  min-height: 42px;
  outline: 0;
  padding: 10px 12px;
}

.checkout-form input:focus,
.checkout-form select:focus {
  border-color: var(--teal);
}

.login-form {
  margin-top: 14px;
}

.login-form > strong {
  grid-column: 1 / -1;
}

.registration-form select {
  border: 1px solid var(--line);
  border-radius: 8px;
  min-height: 42px;
  outline: 0;
  padding: 10px 12px;
}

#gpsToggle.gps-ready {
  background: #e7f6ee;
  border-color: rgba(43, 138, 95, 0.35);
  color: var(--green);
}

.merchant-cta {
  background: #f2f7f6;
  border: 1px solid rgba(0, 139, 139, 0.22);
  border-radius: 8px;
  margin-top: 18px;
  padding: 18px;
}

.merchant-cta p {
  color: var(--muted);
  line-height: 1.6;
  margin: 8px 0 14px;
}

.merchant-fields {
  display: grid;
  gap: 8px;
  grid-template-columns: repeat(2, 1fr);
}

.merchant-fields span {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--muted);
  min-height: 38px;
  padding: 10px;
}

.merchant-application-form {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.merchant-application-form label {
  display: grid;
  gap: 6px;
}

.merchant-application-form label.wide,
.merchant-application-form button,
.merchant-application-form small {
  grid-column: 1 / -1;
}

.merchant-application-form input {
  border: 1px solid var(--line);
  border-radius: 8px;
  min-height: 40px;
  padding: 9px 10px;
}

#registrationForm,
#merchantApplicationForm {
  display: none;
}

.startup-form-body #registrationForm,
.startup-form-body #merchantApplicationForm {
  display: grid;
}

.merchant-account-info,
.application-account-editor {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  display: grid;
  gap: 10px;
  margin-top: 12px;
  padding: 12px;
}

.merchant-account-info div,
.application-account-editor label {
  display: grid;
  gap: 5px;
}

.merchant-account-info span,
.merchant-account-info small,
.application-account-editor span,
.application-account-editor small {
  color: var(--muted);
}

.merchant-account-info code {
  background: var(--soft);
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink);
  padding: 8px 10px;
}

.application-account-editor input {
  border: 1px solid var(--line);
  border-radius: 8px;
  min-height: 40px;
  padding: 9px 10px;
}

.account-center {
  background: #fbfaf7;
  border: 1px solid var(--line);
  border-radius: 8px;
  margin-top: 18px;
  padding: 18px;
}

.account-center h3 {
  font-size: 22px;
  margin: 0 0 14px;
}

.account-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.account-tabs button {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  cursor: pointer;
  font-weight: 900;
  min-height: 38px;
  padding: 8px 11px;
}

.account-tabs button.active {
  background: var(--teal);
  border-color: var(--teal);
  color: white;
}

.account-output {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  display: grid;
  gap: 8px;
  margin-top: 12px;
  padding: 13px;
}

.account-output p {
  color: var(--muted);
  line-height: 1.6;
  margin: 0;
}

.api-status-panel {
  background: #e7f6ee;
  border: 1px solid rgba(43, 138, 95, 0.35);
  border-radius: 8px;
  bottom: 14px;
  box-shadow: var(--shadow);
  color: var(--green);
  font-size: 13px;
  font-weight: 900;
  max-width: min(360px, calc(100vw - 28px));
  padding: 10px 12px;
  position: fixed;
  right: 14px;
  z-index: 60;
}

.api-status-panel[data-tone="loading"] {
  background: #fff8ef;
  border-color: rgba(215, 155, 40, 0.32);
  color: #8a6219;
}

.api-status-panel[data-tone="warning"] {
  background: #fff1f0;
  border-color: rgba(180, 60, 52, 0.28);
  color: var(--danger);
}

.production-actions {
  border-top: 1px solid var(--line);
  display: grid;
  gap: 8px;
  margin-top: 14px;
  padding-top: 12px;
}

.production-actions small {
  color: var(--muted);
}

.order-tracking-list {
  display: grid;
  gap: 8px;
  margin-top: 4px;
}

.order-tracking-list strong {
  font-size: 14px;
}

.order-tracking-list span,
.order-tracking-list small {
  background: #f7f7f4;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--muted);
  line-height: 1.5;
  padding: 9px 10px;
}

.order-tracking-list span.active {
  background: #e7f6ee;
  border-color: rgba(43, 138, 95, 0.35);
  color: var(--green);
  font-weight: 900;
}

.order-detail-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  display: grid;
  gap: 10px;
  padding: 12px;
}

.order-detail-card div {
  background: #f7f7f4;
  border: 1px solid var(--line);
  border-radius: 8px;
  display: grid;
  gap: 6px;
  padding: 10px;
}

.order-detail-card strong {
  color: var(--ink);
}

.customer-complaint {
  background: #fff8ef;
  border: 1px solid rgba(215, 155, 40, 0.28);
  border-radius: 8px;
  margin-top: 18px;
  padding: 18px;
}

.customer-complaint h3 {
  font-size: 22px;
  margin: 0 0 10px;
}

.customer-complaint p,
.complaint-result span {
  color: var(--muted);
  line-height: 1.6;
}

.problem-options {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 14px 0;
}

.problem-options button {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  cursor: pointer;
  font-weight: 900;
  min-height: 38px;
  padding: 8px 11px;
}

.problem-options button.active {
  background: var(--gold);
  border-color: var(--gold);
  color: var(--ink);
}

.complaint-result {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  display: grid;
  gap: 8px;
  padding: 13px;
}

.complaint-result a {
  background: var(--green);
  border-radius: 8px;
  color: white;
  display: inline-flex;
  font-weight: 900;
  justify-content: center;
  padding: 10px;
  width: fit-content;
}

.store-rating-card {
  background: #f2f7f6;
  border: 1px solid rgba(0, 139, 139, 0.22);
  border-radius: 8px;
  margin-top: 18px;
  padding: 18px;
}

.store-rating-card h3 {
  font-size: 22px;
  margin: 0 0 10px;
}

.store-rating-card p {
  color: var(--muted);
  line-height: 1.6;
  margin: 0 0 14px;
}

.rating-breakdown {
  display: grid;
  gap: 10px;
}

.rating-breakdown label {
  align-items: center;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  display: grid;
  gap: 9px;
  grid-template-columns: 1fr minmax(110px, 0.9fr) 28px;
  min-height: 46px;
  padding: 10px;
}

.rating-breakdown span {
  color: var(--muted);
  font-weight: 800;
}

.rating-breakdown input {
  accent-color: var(--teal);
  width: 100%;
}

.rating-total {
  align-items: center;
  background: var(--ink);
  border-radius: 8px;
  color: white;
  display: flex;
  justify-content: space-between;
  margin-top: 12px;
  padding: 13px;
}

.rating-total span {
  color: rgba(255, 255, 255, 0.72);
}

.mini-form {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(2, 1fr);
  margin-top: 14px;
}

.mini-form span {
  background: #f7f7f4;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--muted);
  min-height: 42px;
  padding: 11px;
}

.split {
  background: #f2f7f6;
}

.dashboard {
  display: grid;
  grid-template-columns: 1fr;
  min-height: 420px;
  overflow: hidden;
}

.side-nav {
  background: var(--ink);
  color: white;
  display: grid;
  gap: 10px;
  grid-template-columns: 1.4fr repeat(3, minmax(120px, 0.6fr)) minmax(170px, 0.8fr);
  padding: 16px;
}

.side-nav strong {
  align-self: center;
  margin: 0;
}

.side-nav span,
.side-nav button {
  background: rgba(255, 255, 255, 0.08);
  border: 0;
  border-radius: 8px;
  color: #fff;
  cursor: pointer;
  font-weight: 900;
  padding: 12px;
  text-align: inherit;
}

.side-nav button:hover {
  background: rgba(255, 255, 255, 0.18);
}

.side-nav small {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  color: rgba(255, 255, 255, 0.78);
  padding: 12px;
}

.image-upload {
  display: grid;
  gap: 8px;
  margin: 12px 0;
}

.image-upload input {
  background: var(--soft);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px;
}

.product-create-form {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin: 14px 0;
  padding: 12px;
}

.product-create-form label {
  display: grid;
  gap: 6px;
}

.product-create-form .wide,
.product-create-form button {
  grid-column: 1 / -1;
}

.product-create-form input,
.product-create-form textarea {
  background: var(--soft);
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink);
  font: inherit;
  padding: 10px;
  width: 100%;
}

.shipping-price-panel {
  border-top: 1px solid var(--line);
  display: grid;
  gap: 12px;
  margin-top: 14px;
  padding-top: 14px;
}

.store-logo-editor {
  align-items: center;
  border-top: 1px solid var(--line);
  display: grid;
  gap: 12px;
  grid-template-columns: auto 1fr;
  margin-top: 14px;
  padding-top: 14px;
}

.store-logo-preview {
  align-items: center;
  background: var(--red);
  border-radius: 8px;
  color: #fff;
  display: inline-flex;
  font-weight: 900;
  height: 72px;
  justify-content: center;
  overflow: hidden;
  width: 72px;
}

.store-logo-preview.has-image {
  background: #fff;
  border: 1px solid var(--line);
}

.store-logo-preview.logo-size-medium {
  height: 78px;
  width: 96px;
}

.store-logo-preview.logo-size-banner {
  height: 82px;
  width: min(180px, 100%);
}

.store-logo-editor p,
.store-logo-editor small {
  color: var(--muted);
  display: block;
  margin: 4px 0 8px;
}

.store-logo-upload {
  display: inline-flex;
  width: fit-content;
}

.inline-field {
  display: grid;
  gap: 6px;
  margin-top: 10px;
}

.shipping-price-head {
  align-items: center;
  display: flex;
  gap: 10px;
  justify-content: space-between;
}

.shipping-price-grid {
  display: grid;
  gap: 8px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.shipping-price-grid label {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  display: grid;
  gap: 6px;
  padding: 10px;
}

.shipping-price-grid input {
  background: var(--soft);
  border: 1px solid var(--line);
  border-radius: 8px;
  font: inherit;
  padding: 8px;
  width: 100%;
}

.store-product-cards {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-top: 14px;
}

.store-products-toolbar {
  display: flex;
  grid-column: 1 / -1;
  justify-content: flex-end;
}

.store-products-toolbar .outline-button {
  max-width: 190px;
}

.store-product-cards[data-view-mode="list"] {
  grid-template-columns: 1fr;
}

.empty-state,
.empty-row {
  background: #f7f7f4;
  border: 1px dashed var(--line);
  border-radius: 8px;
  color: var(--muted);
  display: block;
  font-weight: 800;
  line-height: 1.5;
  padding: 12px;
  text-align: center;
}

.store-product-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  display: grid;
  gap: 8px;
  padding: 12px;
}

.store-product-cards[data-view-mode="list"] .store-product-card {
  align-items: start;
  grid-template-columns: minmax(180px, 0.35fr) minmax(0, 1fr);
}

.store-product-cards[data-view-mode="list"] .store-product-gallery {
  grid-row: span 5;
}

.store-product-gallery {
  display: grid;
  gap: 6px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.store-product-gallery img {
  aspect-ratio: 1;
  border-radius: 8px;
  object-fit: cover;
  width: 100%;
}

.store-product-image-item {
  display: grid;
  gap: 6px;
  min-width: 0;
}

.image-action-row {
  display: grid;
  gap: 4px;
  grid-template-columns: 1fr 1fr;
}

.image-action-row button {
  background: #f7f7f4;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink);
  cursor: pointer;
  font-size: 11px;
  font-weight: 900;
  min-height: 30px;
  padding: 6px;
}

.image-action-row button:disabled {
  cursor: default;
  opacity: 0.45;
}

.store-product-card p {
  color: var(--muted);
  margin: 0;
}

.store-product-actions {
  display: grid;
  gap: 8px;
  grid-template-columns: repeat(3, 1fr);
}

.order-extra-controls {
  display: grid;
  gap: 8px;
  margin-top: 12px;
}

.order-extra-controls input {
  border: 1px solid var(--line);
  border-radius: 8px;
  min-height: 40px;
  padding: 9px 10px;
}

.status-order-select {
  display: grid;
  gap: 6px;
  margin-top: 12px;
}

.status-order-select span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.status-order-select select {
  border: 1px solid var(--line);
  border-radius: 8px;
  min-height: 42px;
  padding: 9px 10px;
  width: 100%;
}

.status-log-list,
.notification-list,
.production-list {
  display: grid;
  gap: 8px;
}

.production-config-grid {
  display: grid;
  gap: 8px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.production-config-grid article {
  background: #f7f7f4;
  border: 1px solid var(--line);
  border-radius: 8px;
  display: grid;
  gap: 5px;
  min-width: 0;
  padding: 10px;
}

.production-config-grid article.ready {
  background: #e7f6ee;
  border-color: rgba(43, 138, 95, 0.35);
}

.production-config-grid article.todo {
  background: #fff8ef;
  border-color: rgba(215, 155, 40, 0.32);
}

.production-config-grid span {
  color: var(--muted);
  font-size: 12px;
  overflow-wrap: anywhere;
}

.production-config-grid small,
.production-list span.ready,
.production-list span.todo {
  font-weight: 900;
}

.production-list span.ready {
  background: #e7f6ee;
  border-color: rgba(43, 138, 95, 0.35);
  color: var(--green);
}

.production-list span.todo {
  background: #fff8ef;
  border-color: rgba(215, 155, 40, 0.32);
  color: #8a6219;
}

.status-log-list span,
.production-list span,
.notification-row,
.notification-list small {
  background: #f7f7f4;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--muted);
  line-height: 1.5;
  padding: 9px 10px;
  text-align: inherit;
}

.notification-row {
  cursor: pointer;
  font-weight: 800;
}

.notification-row.is-read {
  opacity: 0.62;
}

.backup-actions {
  display: grid;
  gap: 8px;
  grid-template-columns: repeat(3, 1fr);
}

.backup-actions small,
.production-readiness-note {
  color: var(--muted);
  grid-column: 1 / -1;
  line-height: 1.5;
}

.production-settings-panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  display: grid;
  gap: 10px;
  padding: 12px;
}

.production-settings-panel label {
  display: grid;
  gap: 6px;
}

.production-settings-panel label span,
.production-settings-panel small,
.permission-role-group > span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.production-settings-panel input,
.production-settings-panel select {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink);
  font: inherit;
  min-height: 40px;
  padding: 8px 10px;
}

.permission-role-group {
  background: var(--soft);
  border: 1px solid var(--line);
  border-radius: 8px;
  display: grid;
  gap: 8px;
  padding: 10px;
}

.permission-role-group label {
  align-items: center;
  display: flex;
  flex-direction: row;
  gap: 8px;
}

.production-settings-panel .inline-setting {
  align-items: center;
  display: flex;
  flex-direction: row;
  gap: 8px;
}

.permission-role-group input {
  min-height: auto;
  width: auto;
}

.production-settings-panel .inline-setting input {
  min-height: auto;
  width: auto;
}

.image-preview-panel {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  display: grid;
  gap: 10px;
  margin-top: 12px;
  padding: 12px;
}

.image-preview-grid {
  display: grid;
  gap: 8px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.image-preview-item {
  position: relative;
}

.image-preview-item img {
  aspect-ratio: 1;
  border-radius: 8px;
  height: auto;
  object-fit: cover;
  width: 100%;
}

.image-preview-item button {
  background: var(--ink);
  border: 0;
  border-radius: 999px;
  color: #fff;
  font-weight: 900;
  height: 24px;
  position: absolute;
  right: 6px;
  top: 6px;
  width: 24px;
}

.product-detail-modal {
  background: rgba(20, 20, 18, 0.45);
  display: grid;
  inset: 0;
  padding: 18px;
  place-items: center;
  position: fixed;
  z-index: 50;
}

.product-detail-modal[hidden] {
  display: none;
}

.product-detail-panel {
  max-width: 520px;
  position: relative;
  width: min(100%, 520px);
}

.modal-close {
  background: var(--ink);
  border: 0;
  border-radius: 999px;
  color: #fff;
  font-weight: 900;
  height: 32px;
  position: absolute;
  right: 14px;
  top: 14px;
  width: 32px;
}

.product-detail-gallery {
  display: grid;
  gap: 8px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.product-detail-gallery img {
  aspect-ratio: 1;
  border-radius: 8px;
  object-fit: cover;
  width: 100%;
}

.product-detail-meta {
  display: grid;
  gap: 8px;
}

.product-detail-meta div {
  align-items: center;
  border-bottom: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  padding-bottom: 6px;
}

.product-detail-meta dt {
  color: var(--muted);
  font-weight: 800;
}

.product-detail-meta dd {
  margin: 0;
}

.dash-content {
  padding: 24px;
}

.dash-top {
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(3, 1fr);
}

.dash-top div {
  background: #f7f7f4;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 18px;
}

.dash-top small,
.metric-grid small {
  color: var(--muted);
  display: block;
}

.dash-top strong,
.metric-grid strong {
  display: block;
  font-size: 32px;
  margin-top: 8px;
}

.order-table {
  border: 1px solid var(--line);
  border-radius: 8px;
  margin-top: 20px;
  overflow: hidden;
}

.store-order-filter {
  align-items: end;
  background: rgba(255, 255, 255, 0.72);
  border-bottom: 1px solid var(--line);
  display: grid;
  gap: 12px;
  grid-template-columns: 1.2fr minmax(130px, 0.6fr) minmax(130px, 0.6fr) minmax(150px, 0.7fr) auto;
  padding: 14px 16px;
}

.store-order-filter label {
  display: grid;
  gap: 6px;
}

.store-order-filter span,
.store-order-filter strong {
  color: var(--ink);
  font-size: 13px;
}

.store-order-filter input,
.store-order-filter select {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink);
  min-height: 38px;
  padding: 8px 10px;
}

.table-row {
  align-items: center;
  display: grid;
  gap: 12px;
  grid-template-columns: 1fr 1.2fr 1fr 1fr;
  min-height: 58px;
  padding: 0 16px;
}

.table-row + .table-row {
  border-top: 1px solid var(--line);
}

.store-order-row {
  cursor: pointer;
}

.store-order-row:hover,
.store-order-row.active {
  background: rgba(0, 139, 139, 0.1);
}

.store-order-row.active {
  box-shadow: inset 4px 0 0 var(--teal);
}

.store-order-details {
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid var(--line);
  border-radius: 8px;
  margin-top: 14px;
  padding: 16px;
}

.store-order-details[hidden] {
  display: none;
}

.store-order-details-head,
.store-order-item,
.store-order-totals {
  align-items: center;
  display: grid;
  gap: 12px;
}

.store-order-details-head {
  grid-template-columns: 1fr auto;
  margin-bottom: 14px;
}

.store-order-details-head span,
.store-order-item span,
.store-order-items small {
  color: var(--muted);
  display: block;
  font-size: 13px;
  line-height: 1.5;
}

.store-order-items {
  display: grid;
  gap: 10px;
}

.store-order-item {
  background: rgba(247, 247, 244, 0.74);
  border: 1px solid var(--line);
  border-radius: 8px;
  grid-template-columns: 58px 1fr auto;
  min-height: 72px;
  padding: 8px;
}

.store-order-item-image {
  align-items: center;
  aspect-ratio: 1;
  background: var(--soft);
  border: 1px solid var(--line);
  border-radius: 8px;
  display: flex;
  justify-content: center;
  overflow: hidden;
}

.store-order-item-image img {
  height: 100%;
  object-fit: cover;
  width: 100%;
}

.store-order-totals {
  border-top: 1px solid var(--line);
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-top: 14px;
  padding-top: 12px;
}

.store-order-totals span {
  display: grid;
  gap: 4px;
}

.store-order-totals small {
  color: var(--muted);
}

.table-head {
  background: #f7f7f4;
  color: var(--muted);
  font-weight: 800;
}

.pill {
  background: #e7f6ee;
  border-radius: 999px;
  color: var(--green);
  display: inline-flex;
  justify-content: center;
  padding: 6px 10px;
  width: fit-content;
}

.pill.gold {
  background: #fff4d9;
  color: #996b00;
}

.store-ops {
  display: grid;
  gap: 14px;
  grid-template-columns: 1.2fr 1fr 1fr;
  margin-top: 20px;
}

.ops-card {
  background: #f7f7f4;
  border: 1px solid var(--line);
  border-radius: 8px;
  min-height: 250px;
  padding: 18px;
}

.ops-card h3 {
  font-size: 20px;
  margin: 0 0 10px;
}

.ops-card p,
.ops-card small {
  color: var(--muted);
  line-height: 1.6;
}

.status-buttons,
.coverage-switch {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}

.status-buttons button,
.coverage-switch button,
.outline-button {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink);
  cursor: pointer;
  font-weight: 800;
  min-height: 38px;
  padding: 9px 11px;
}

.status-buttons button.active,
.coverage-switch button.active {
  background: var(--teal);
  border-color: var(--teal);
  color: white;
}

.status-preview {
  align-items: center;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  display: flex;
  justify-content: space-between;
  margin-top: 16px;
  padding: 12px;
}

.status-preview span {
  color: var(--muted);
}

.editor-row {
  align-items: center;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  display: flex;
  justify-content: space-between;
  margin-bottom: 9px;
  padding: 11px;
}

.outline-button {
  width: 100%;
}

.outline-button.is-hidden {
  background: #fff4d9;
  border-color: rgba(215, 155, 40, 0.45);
  color: #996b00;
}

.admin-layout {
  display: grid;
  gap: 20px;
}

.metric-grid {
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(4, 1fr);
}

.metric-grid article {
  padding: 20px;
}

.admin-columns {
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(3, 1fr);
}

.admin-card {
  min-height: 230px;
  padding: 22px;
}

.admin-card p {
  color: var(--muted);
  line-height: 1.7;
}

.content-editor-grid {
  display: grid;
  gap: 10px;
}

.content-editor-help {
  color: var(--muted);
  display: block;
  font-weight: 800;
  margin: -6px 0 12px;
}

.content-editor-grid label,
.hero-slide-editor label {
  display: grid;
  gap: 6px;
}

.content-editor-grid select,
.content-editor-grid textarea,
.hero-slide-editor input {
  border: 1px solid var(--line);
  border-radius: 8px;
  min-height: 42px;
  outline: 0;
  padding: 10px 12px;
  width: 100%;
}

.content-editor-grid textarea {
  resize: vertical;
}

.hero-slide-editor {
  background: #f7f7f4;
  border: 1px solid var(--line);
  border-radius: 8px;
  display: grid;
  gap: 10px;
  padding: 12px;
}

.hero-slide-editor label {
  grid-template-columns: minmax(120px, 0.7fr) 1fr minmax(120px, 0.5fr);
}

.hero-slide-editor span {
  align-self: center;
  color: var(--muted);
  font-weight: 900;
}

.admin-growth {
  display: grid;
  gap: 14px;
  grid-template-columns: 1.1fr 0.9fr;
}

.admin-marketing {
  display: grid;
  gap: 14px;
  grid-template-columns: 1fr 1fr;
}

.admin-trust {
  display: grid;
  gap: 14px;
  grid-template-columns: 1fr 1fr;
}

.application-preview,
.package-summary,
.ad-preview,
.coupon-preview,
.ranking-preview,
.user-preview,
.user-state {
  background: #f7f7f4;
  border: 1px solid var(--line);
  border-radius: 8px;
  display: grid;
  gap: 7px;
  margin-top: 16px;
  padding: 13px;
}

.application-preview small,
.package-summary span,
.ad-preview span,
.ad-preview small,
.ranking-preview span,
.user-preview small,
.user-state span,
#orderBlockNote,
#applicationState {
  color: var(--muted);
  line-height: 1.5;
}

.ad-preview img {
  aspect-ratio: 16 / 7;
  border-radius: 8px;
  object-fit: cover;
  width: 100%;
}

.ad-preview img.is-inactive {
  filter: grayscale(1);
  opacity: 0.45;
}

.ad-status-toggle.danger-action {
  border-color: rgba(190, 24, 35, 0.5);
  color: var(--red);
}

.placement-options button.is-inactive {
  border-color: rgba(190, 24, 35, 0.45);
  opacity: 0.78;
}

.placement-options button.is-inactive::after {
  background: rgba(190, 24, 35, 0.12);
  border-radius: 999px;
  color: var(--red);
  content: attr(data-status-label);
  font-size: 10px;
  font-weight: 900;
  margin-inline-start: 6px;
  padding: 2px 6px;
}

.ad-editor-grid {
  display: grid;
  gap: 10px;
  margin-top: 12px;
}

.ad-editor-grid label {
  display: grid;
  gap: 6px;
}

.ad-editor-grid input,
.ad-editor-grid select,
.inline-field select {
  border: 1px solid var(--line);
  border-radius: 8px;
  min-height: 42px;
  padding: 10px;
}

.customer-ad-slot {
  align-items: center;
  background: rgba(255, 255, 255, 0.86);
  border: 1px solid var(--line);
  border-radius: 8px;
  display: grid;
  gap: 10px;
  grid-template-columns: 88px 1fr;
  margin: 12px 0;
  overflow: hidden;
  padding: 8px;
}

.customer-ad-slot img {
  aspect-ratio: 1.4;
  border-radius: 6px;
  height: 64px;
  object-fit: cover;
  width: 88px;
}

.customer-ad-slot.size-icon {
  grid-template-columns: 52px 1fr;
}

.customer-ad-slot.size-icon img {
  aspect-ratio: 1;
  height: 48px;
  width: 48px;
}

.customer-ad-slot.size-medium img {
  height: 74px;
  width: 106px;
}

.customer-ad-slot.size-banner {
  grid-template-columns: 1fr;
}

.customer-ad-slot.size-banner img {
  aspect-ratio: 16 / 7;
  height: auto;
  width: 100%;
}

.customer-ad-slot strong,
.customer-ad-slot span {
  display: block;
}

.customer-ad-slot span {
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.45;
}

.hero-copy .customer-ad-slot {
  max-width: 520px;
}

.application-list {
  display: grid;
  gap: 8px;
  margin-top: 10px;
}

.application-row {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink);
  cursor: pointer;
  display: grid;
  gap: 4px;
  padding: 10px;
  text-align: inherit;
}

.application-row.active {
  border-color: var(--teal);
  box-shadow: inset 4px 0 0 var(--teal);
}

.application-row small {
  color: var(--muted);
}

.admin-store-list {
  display: grid;
  gap: 8px;
  margin-top: 12px;
}

.admin-store-row {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  cursor: pointer;
  display: grid;
  gap: 4px;
  padding: 10px;
}

.admin-store-row.active {
  border-color: var(--green);
  box-shadow: 0 0 0 2px rgba(0, 139, 139, 0.16);
}

.admin-store-row small {
  color: var(--muted);
}

.store-state-badge {
  background: rgba(0, 139, 139, 0.12);
  border-radius: 999px;
  color: var(--green);
  font-size: 12px;
  font-weight: 900;
  justify-self: start;
  padding: 4px 9px;
}

.selected-store-credentials {
  display: grid;
  gap: 10px;
  margin-top: 10px;
}

.application-actions,
.package-options,
.placement-options,
.coupon-options,
.ranking-options,
.rating-options {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 14px 0 10px;
}

.package-options button,
.placement-options button,
.coupon-options button,
.ranking-options button,
.rating-options button {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  cursor: pointer;
  font-weight: 900;
  min-height: 42px;
  padding: 10px 14px;
}

.package-options button.active,
.placement-options button.active,
.coupon-options button.active,
.ranking-options button.active,
.rating-options button.active {
  background: var(--gold);
  border-color: var(--gold);
  color: var(--ink);
}

.rating-options button {
  border-radius: 8px;
  min-width: 44px;
}

#orderBlockToggle {
  margin-top: 14px;
}

#orderBlockToggle.is-blocked {
  background: #fff4d9;
  border-color: rgba(185, 41, 47, 0.3);
  color: var(--red);
}

#orderBlockNote.invalid {
  color: var(--red);
  font-weight: 800;
}

.user-filter-row {
  margin-top: 14px;
}

.admin-user-list {
  border: 1px solid var(--line);
  border-radius: 8px;
  display: grid;
  gap: 8px;
  margin: 14px 0;
  max-height: 280px;
  overflow: auto;
  padding: 10px;
}

.admin-user-list > strong {
  color: var(--muted);
  font-size: 0.82rem;
}

.admin-user-row {
  background: rgba(255, 255, 255, 0.78);
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink);
  cursor: pointer;
  display: grid;
  gap: 4px;
  padding: 10px;
  text-align: start;
}

.admin-user-row.active {
  border-color: rgba(21, 128, 61, 0.6);
  box-shadow: 0 10px 24px rgba(21, 128, 61, 0.14);
}

.admin-user-row span,
.admin-user-row em {
  color: var(--muted);
  font-size: 0.82rem;
  font-style: normal;
}

:root[data-theme="dark"] .admin-user-row {
  background: rgba(8, 10, 14, 0.62);
  color: var(--ink);
}

.coupon-preview span {
  background: var(--red);
  border-radius: 8px;
  color: white;
  display: inline-flex;
  font-weight: 900;
  justify-content: center;
  padding: 10px;
  width: fit-content;
}

.outline-button.danger {
  color: var(--red);
}

#applicationState.valid {
  color: var(--green);
  font-weight: 800;
}

#applicationState.invalid {
  color: var(--red);
  font-weight: 800;
}

.chips,
.admin-actions,
.finance-options,
.complaint-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 18px;
}

.chips span,
.admin-actions button,
.finance-options button {
  background: #f4f4ef;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--ink);
  cursor: pointer;
  font-weight: 800;
  padding: 7px 11px;
}

.admin-actions button.active,
.finance-options button.active {
  background: var(--ink);
  border-color: var(--ink);
  color: white;
}

.admin-state,
.finance-summary,
.complaint-box {
  background: #f7f7f4;
  border: 1px solid var(--line);
  border-radius: 8px;
  display: grid;
  gap: 7px;
  margin-top: 18px;
  padding: 13px;
}

.finance-editor {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  display: grid;
  gap: 10px;
  margin-top: 16px;
  padding: 13px;
}

.finance-editor label {
  display: grid;
  gap: 6px;
}

.finance-editor label span,
.finance-editor small {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.finance-editor input {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink);
  font: inherit;
  min-height: 40px;
  padding: 8px 10px;
}

.admin-state span,
.finance-summary span,
.complaint-box span,
.complaint-box small {
  color: var(--muted);
}

.complaint-box strong {
  line-height: 1.5;
}

.finance-bar {
  background: #f0eee8;
  border-radius: 999px;
  height: 12px;
  margin-top: 28px;
  overflow: hidden;
}

.finance-bar span {
  background: linear-gradient(90deg, var(--gold), var(--red));
  display: block;
  height: 100%;
}

.governorate-sales-card,
.site-commission-card,
.rent-due-card,
.admin-invoice-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  display: grid;
  gap: 12px;
  margin-top: 16px;
  padding: 13px;
}

.admin-invoice-card label {
  display: grid;
  gap: 7px;
}

.commission-filter-row {
  align-items: end;
  display: grid;
  gap: 10px;
  grid-template-columns: minmax(150px, 1.1fr) repeat(2, minmax(130px, 0.8fr)) auto;
}

.commission-filter-row label {
  display: grid;
  gap: 6px;
}

.commission-filter-row span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.commission-filter-row input,
.commission-filter-row select {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink);
  min-height: 40px;
  outline: 0;
  padding: 8px 10px;
}

.commission-summary-grid {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

.commission-summary-grid div {
  background: var(--soft);
  border: 1px solid var(--line);
  border-radius: 8px;
  display: grid;
  gap: 6px;
  padding: 12px;
}

.commission-summary-grid span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.commission-summary-grid strong {
  color: var(--ink);
  font-size: 14px;
}

.rent-due-list {
  display: grid;
  gap: 10px;
}

.rent-due-row {
  align-items: center;
  background: var(--soft);
  border: 1px solid var(--line);
  border-radius: 8px;
  display: grid;
  gap: 10px;
  grid-template-columns: minmax(110px, 0.95fr) minmax(125px, 1fr) minmax(95px, 0.65fr) minmax(120px, 0.8fr) minmax(105px, 0.72fr) minmax(120px, 0.78fr) auto;
  padding: 12px;
}

.rent-due-row span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.rent-due-row span:first-child,
.rent-due-row strong {
  color: var(--ink);
  font-size: 14px;
}

.rent-due-row em {
  background: rgba(0, 139, 139, 0.12);
  border-radius: 999px;
  color: var(--teal);
  font-style: normal;
  font-weight: 900;
  padding: 7px 10px;
  text-align: center;
}

.rent-due-row.is-due em {
  background: rgba(185, 41, 47, 0.13);
  color: var(--red);
}

.rent-due-editor {
  display: grid;
  gap: 5px;
}

.rent-due-editor span {
  color: var(--muted);
  font-size: 11px;
}

.rent-due-editor input {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink);
  min-height: 36px;
  outline: 0;
  padding: 6px 8px;
  width: 100%;
}

.date-filter-row {
  align-items: end;
  background: var(--soft);
  border: 1px solid var(--line);
  border-radius: 8px;
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(3, minmax(130px, 1fr)) auto;
  padding: 10px;
}

.date-filter-row label {
  display: grid;
  gap: 6px;
}

.date-filter-row span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.date-filter-row input,
.date-filter-row select {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink);
  min-height: 40px;
  outline: 0;
  padding: 8px 10px;
}

.date-filter-row button {
  min-height: 40px;
}

.admin-invoice-card label span,
.admin-invoice-card small {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.admin-invoice-card select {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink);
  font: inherit;
  min-height: 42px;
  padding: 9px 11px;
}

.admin-invoice-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.store-ranking-list {
  display: grid;
  gap: 10px;
  margin-top: 14px;
}

.store-ranking-row {
  align-items: center;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  display: grid;
  gap: 10px;
  grid-template-columns: 46px minmax(0, 1fr) auto;
  padding: 10px;
}

.store-rank-number {
  align-items: center;
  background: var(--ink);
  border-radius: 8px;
  color: #fff;
  display: inline-flex;
  font-weight: 900;
  height: 38px;
  justify-content: center;
  width: 38px;
}

.store-ranking-row strong {
  color: var(--ink);
  display: block;
}

.store-ranking-row small {
  color: var(--muted);
  display: block;
  font-weight: 800;
  line-height: 1.5;
}

.store-ranking-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  justify-content: flex-end;
}

.store-ranking-actions button {
  background: #f4f4ef;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--ink);
  cursor: pointer;
  font-weight: 900;
  padding: 7px 9px;
}

.store-ranking-actions button:disabled {
  cursor: not-allowed;
  opacity: 0.45;
}

.admin-invoice-preview {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: #111;
  display: grid;
  gap: 14px;
  margin-top: 4px;
  padding: 16px;
}

.admin-invoice-preview[hidden] {
  display: none;
}

.admin-invoice-preview-head {
  align-items: center;
  border-bottom: 2px solid #111;
  display: flex;
  justify-content: space-between;
  padding-bottom: 10px;
}

.admin-invoice-preview-head strong {
  font-size: 18px;
}

.admin-invoice-preview-head span {
  background: #111;
  border-radius: 999px;
  color: #fff;
  font-weight: 900;
  padding: 6px 10px;
}

.admin-invoice-preview-grid,
.admin-invoice-totals {
  display: grid;
  gap: 8px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.admin-invoice-preview-grid div,
.admin-invoice-totals div {
  background: #f6f6f2;
  border: 1px solid #ddd8cc;
  border-radius: 8px;
  display: grid;
  gap: 4px;
  padding: 9px;
}

.admin-invoice-preview-grid span,
.admin-invoice-totals span {
  color: #555;
  font-size: 12px;
  font-weight: 800;
}

.admin-invoice-preview-grid strong,
.admin-invoice-totals strong {
  color: #111;
  font-size: 13px;
}

.admin-invoice-item {
  border-bottom: 1px solid #ddd8cc;
  display: grid;
  gap: 8px;
  grid-template-columns: minmax(120px, 1fr) 56px 84px 84px;
  padding: 8px 0;
}

.admin-invoice-item.head {
  background: #111;
  border-radius: 8px;
  color: #fff;
  font-weight: 900;
  padding: 9px;
}

.admin-invoice-totals div:last-child {
  background: #111;
  border-color: #111;
}

.admin-invoice-totals div:last-child span,
.admin-invoice-totals div:last-child strong {
  color: #fff;
}

.sales-chart-head {
  display: grid;
  gap: 4px;
}

.sales-chart-head span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.sales-chart {
  display: grid;
  gap: 8px;
}

.sales-bar-row {
  align-items: center;
  display: grid;
  gap: 8px;
  grid-template-columns: minmax(78px, 0.34fr) minmax(110px, 1fr) minmax(126px, 0.52fr);
}

.sales-bar-row > span {
  color: var(--ink);
  font-size: 12px;
  font-weight: 900;
}

.sales-bar-track {
  background: var(--soft);
  border: 1px solid var(--line);
  border-radius: 999px;
  height: 14px;
  overflow: hidden;
}

.sales-bar-track i {
  background: linear-gradient(90deg, var(--green), var(--teal));
  border-radius: inherit;
  display: block;
  height: 100%;
}

.sales-bar-row.is-lowest .sales-bar-track i {
  background: linear-gradient(90deg, var(--red), var(--gold));
}

.sales-bar-row strong {
  color: var(--muted);
  font-size: 12px;
  text-align: end;
}

.sales-insights {
  display: grid;
  gap: 8px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.sales-insights div {
  background: var(--soft);
  border: 1px solid var(--line);
  border-radius: 8px;
  display: grid;
  gap: 5px;
  padding: 10px;
}

.sales-insights span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.sales-insights strong {
  color: var(--ink);
  font-size: 13px;
}

html[dir="ltr"] .brand,
html[dir="ltr"] .mobile-header,
html[dir="ltr"] .check-list span {
  font-family: "Segoe UI", Arial, sans-serif;
}

@media (max-width: 980px) {
  html,
  body,
  main {
    max-width: 100%;
    overflow-x: hidden;
  }

  .topbar {
    align-items: stretch;
    flex-direction: column;
    gap: 8px;
    padding: 10px 12px;
    position: static;
  }

  .brand {
    min-width: 0;
  }

  .nav {
    overflow-x: auto;
    padding-bottom: 3px;
  }

  .role-switch {
    overflow-x: auto;
    padding-bottom: 3px;
    width: 100%;
  }

  .lang-toggle,
  .theme-toggle,
  .install-app-button,
  .mobile-layout-button,
  .session-pill {
    justify-content: center;
    width: 100%;
  }

  .hero,
  .customer-grid,
  .dashboard,
  .section-workspace,
  .admin-columns,
  .admin-growth,
  .admin-marketing,
  .admin-trust,
  .order-doc-grid,
  .build-plan-grid,
  .completion-grid,
  .mvp-grid,
  .store-ops {
    grid-template-columns: 1fr;
  }

  .hero {
    min-height: auto;
  }

  .flow,
  .metric-grid {
    grid-template-columns: 1fr 1fr;
  }

  .flow-step + .flow-step {
    border-inline-start: 0;
    border-top: 1px solid var(--line);
  }

  .phone-shell {
    justify-self: center;
    max-width: 390px;
    width: 100%;
  }

  .section-workspace {
    direction: rtl;
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-width: 100%;
    overflow-x: hidden;
    padding: 10px;
    width: 100%;
  }

  .section-hub {
    display: flex;
    gap: 8px;
    grid-column: auto;
    grid-row: auto;
    overflow-x: auto;
    padding: 8px;
    position: static;
    scroll-snap-type: x mandatory;
    width: 100%;
  }

  .section-card-button {
    flex: 0 0 clamp(138px, 34vw, 180px);
    grid-template-columns: 30px minmax(0, 1fr);
    min-height: 54px;
    scroll-snap-align: start;
  }

  .section-card-button strong {
    font-size: 12px;
    overflow-wrap: anywhere;
  }

  .section-detail-head,
  .section-panel,
  .section-workspace > .admin-columns,
  .section-workspace > .admin-growth,
  .section-workspace > .admin-marketing,
  .section-workspace > .admin-trust,
  .section-workspace > .store-ops {
    grid-column: auto;
    max-width: 100%;
    width: 100%;
  }

  .side-nav {
    gap: 8px;
    grid-template-columns: 1fr;
    padding: 12px;
  }

  .side-nav strong,
  .side-nav button,
  .side-nav small {
    min-width: 0;
    width: 100%;
  }

  .product-editor,
  .shipping-price-panel,
  .store-product-card {
    overflow: hidden;
  }
}

@media (min-width: 621px) and (max-width: 980px) {
  body:not([data-mobile-layout="true"]) .topbar {
    align-items: center;
    flex-direction: row;
    gap: 18px;
    padding: 14px clamp(18px, 4vw, 56px);
    position: sticky;
  }

  body:not([data-mobile-layout="true"]) .brand {
    min-width: 190px;
    width: auto;
  }

  body:not([data-mobile-layout="true"]) .lang-toggle,
  body:not([data-mobile-layout="true"]) .theme-toggle,
  body:not([data-mobile-layout="true"]) .install-app-button,
  body:not([data-mobile-layout="true"]) .mobile-layout-button,
  body:not([data-mobile-layout="true"]) .session-pill {
    width: auto;
  }

  body:not([data-mobile-layout="true"]) .section-workspace {
    direction: ltr;
    display: grid;
    gap: 10px 14px;
    grid-template-columns: minmax(210px, 0.28fr) minmax(0, 1fr);
    overflow: visible;
    padding: 12px;
  }

  body:not([data-mobile-layout="true"]) .section-hub {
    display: grid;
    gap: 6px;
    grid-column: auto;
    grid-row: 1 / span 20;
    overflow-x: visible;
    position: sticky;
    top: 90px;
    width: auto;
  }

  body:not([data-mobile-layout="true"]) .section-card-button {
    flex: initial;
    grid-template-columns: 34px 1fr;
    min-height: 46px;
  }

  body:not([data-mobile-layout="true"]) .section-card-button strong {
    font-size: 13px;
  }

  body:not([data-mobile-layout="true"]) .section-detail-head,
  body:not([data-mobile-layout="true"]) .section-panel,
  body:not([data-mobile-layout="true"]) .section-workspace > .admin-columns,
  body:not([data-mobile-layout="true"]) .section-workspace > .admin-growth,
  body:not([data-mobile-layout="true"]) .section-workspace > .admin-marketing,
  body:not([data-mobile-layout="true"]) .section-workspace > .admin-trust,
  body:not([data-mobile-layout="true"]) .section-workspace > .store-ops {
    grid-column: 2;
  }

  body:not([data-mobile-layout="true"]) .side-nav {
    grid-template-columns: 1.4fr repeat(3, minmax(120px, 0.6fr)) minmax(170px, 0.8fr);
    padding: 16px;
  }
}

@media (max-width: 620px) {
  html,
  body {
    width: 100%;
  }

  body {
    position: relative;
  }

  main {
    overflow-x: hidden;
    width: 100%;
  }

  .topbar {
    gap: 8px;
    padding: 8px 10px;
  }

  .brand {
    width: 100%;
  }

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

  .lang-toggle,
  .theme-toggle,
  .install-app-button,
  .mobile-layout-button {
    justify-content: center;
    min-height: 38px;
    padding: 8px 10px;
    width: 100%;
  }

  .session-pill {
    justify-content: space-between;
    width: 100%;
  }

  .workspace,
  .dashboard,
  .section-workspace,
  #customer,
  #store,
  #admin {
    max-width: 100vw;
    overflow-x: hidden;
    width: 100%;
  }

  .section-head {
    padding-inline: 16px;
  }

  body:not([data-authenticated="true"]),
  body[data-active-role="admin"],
  body[data-active-role="store"],
  :root[data-theme="dark"] body:not([data-authenticated="true"]),
  :root[data-theme="dark"] body[data-active-role="admin"],
  :root[data-theme="dark"] body[data-active-role="store"] {
    background:
      linear-gradient(180deg, rgba(247, 245, 239, 0.82), rgba(247, 245, 239, 0.7)),
      url("assets/iraqflag2.png") center top / cover fixed no-repeat,
      var(--paper);
  }

  body[data-active-role="admin"],
  body[data-active-role="store"] {
    background-attachment: scroll;
    background-size: cover;
  }

  :root[data-theme="dark"] body:not([data-authenticated="true"]),
  :root[data-theme="dark"] body[data-active-role="admin"],
  :root[data-theme="dark"] body[data-active-role="store"] {
    background:
      linear-gradient(180deg, rgba(12, 17, 20, 0.9), rgba(12, 17, 20, 0.72)),
      url("assets/iraqflag2.png") center top / cover fixed no-repeat,
      var(--paper);
  }

  h1 {
    font-size: 42px;
  }

  .hero-copy > p:not(.eyebrow) {
    font-size: 17px;
  }

  .hero-visual {
    min-height: 280px;
  }

  .flow,
  .metric-grid,
  .dash-top,
  .store-order-filter,
  .store-order-totals,
  .order-sections,
  .module-columns,
  .product-grid,
  .catalog-filters,
  .checkout-form,
  .mini-form,
  .merchant-fields,
  .product-create-form,
  .commission-filter-row,
  .store-product-actions,
  .backup-actions,
  .production-config-grid,
  .mvp-grid {
    grid-template-columns: 1fr;
  }

  .shipping-price-grid,
  .image-preview-grid,
  .product-detail-gallery {
    grid-template-columns: 1fr 1fr;
  }

  .store-product-cards,
  .store-product-cards[data-view-mode="list"] .store-product-card {
    grid-template-columns: 1fr;
  }

  .store-product-gallery {
    grid-template-columns: repeat(3, minmax(74px, 1fr));
    overflow-x: auto;
  }

  .store-order-details-head,
  .store-order-item {
    grid-template-columns: 1fr;
  }

  .store-order-item-image {
    width: 74px;
  }

  .section-card-button {
    flex: 0 0 min(168px, 46vw);
  }

  .section-detail-head {
    align-items: stretch;
    display: grid;
    grid-template-columns: 1fr auto;
    padding: 10px;
  }

  .section-detail-head strong {
    font-size: 18px;
  }

  .metric-grid {
    gap: 10px;
  }

  .metric-grid article,
  .dash-top div {
    min-height: 132px;
    padding: 14px;
  }

  .admin-card,
  .ops-card,
  .dashboard,
  .store-product-card,
  .governorate-card,
  .checkout-card,
  .feature-panel {
    max-width: 100%;
    overflow-x: hidden;
  }

  .table-row {
    grid-template-columns: 1fr 1fr;
    padding: 12px;
  }

  .order-line {
    grid-template-columns: 1fr 1fr;
  }

  .phone-screen {
    min-height: 0;
    background-position: center top;
  }

  #customer {
    background-attachment: scroll;
    background-position: center top;
    background-size: min(430px, 100vw) auto;
  }

  .side-nav {
    grid-template-columns: 1fr;
  }

  .api-status-panel {
    bottom: 8px;
    left: 8px;
    right: 8px;
    max-width: none;
  }

  .hero-slide-editor label {
    grid-template-columns: 1fr;
  }

  .date-filter-row {
    grid-template-columns: 1fr;
  }

  .commission-summary-grid {
    grid-template-columns: 1fr;
  }

  .rent-due-row {
    grid-template-columns: 1fr;
  }
}

:root[data-theme="dark"] #store .section-head,
:root[data-theme="dark"] #store .section-head *,
:root[data-theme="dark"] #store .store-dashboard,
:root[data-theme="dark"] #store .store-dashboard * {
  color: #fff;
}

:root[data-theme="dark"] #store .section-head p {
  color: var(--muted);
}

:root[data-theme="dark"] #store .store-dashboard {
  background: var(--soft);
}

:root[data-theme="dark"] .store-order-filter,
:root[data-theme="dark"] .store-order-details,
:root[data-theme="dark"] .store-order-item {
  background: rgba(23, 33, 38, 0.84);
  border-color: rgba(255, 255, 255, 0.12);
}

:root[data-theme="dark"] .store-order-filter input,
:root[data-theme="dark"] .store-order-filter select,
:root[data-theme="dark"] .store-order-item-image {
  background: var(--surface);
  border-color: rgba(255, 255, 255, 0.14);
}

:root[data-theme="dark"] #store .side-nav {
  background: rgba(5, 9, 11, 0.86);
  box-shadow: 0 18px 42px rgba(185, 41, 47, 0.22);
  color: #fff;
}

:root[data-theme="dark"] #store .side-nav strong,
:root[data-theme="dark"] #store .side-nav span,
:root[data-theme="dark"] #store .side-nav button,
:root[data-theme="dark"] #store .side-nav small,
:root[data-theme="dark"] #store .side-nav small strong {
  color: #fff;
}

:root[data-theme="dark"] #store .side-nav span,
:root[data-theme="dark"] #store .side-nav button,
:root[data-theme="dark"] #store .side-nav small {
  background: rgba(255, 255, 255, 0.1);
}

:root[data-theme="dark"] #admin .section-hub {
  background: rgba(5, 9, 11, 0.86);
  border-color: rgba(88, 201, 139, 0.36);
  box-shadow: 0 18px 44px rgba(88, 201, 139, 0.2);
}

:root[data-theme="dark"] #customer {
  background:
    linear-gradient(90deg, rgba(16, 22, 25, 0.94), rgba(16, 22, 25, 0.72)),
    var(--customer-bg-image, url("assets/iraq-flag-mobile.png")) center / min(520px, 92vw) auto no-repeat fixed;
}

:root[data-theme="dark"] #customer .governorate-card,
:root[data-theme="dark"] #customer .checkout-card,
:root[data-theme="dark"] #customer .feature-panel,
:root[data-theme="dark"] #customer .store-card,
:root[data-theme="dark"] #customer .store-profile-card,
:root[data-theme="dark"] #customer .product-grid article,
:root[data-theme="dark"] #customer .cart-summary,
:root[data-theme="dark"] #customer .cart-review,
:root[data-theme="dark"] #customer .customer-complaint,
:root[data-theme="dark"] #customer .search-box {
  background: rgba(23, 33, 38, 0.84);
  backdrop-filter: blur(12px);
}

:root[data-theme="dark"] #customer .checkout-form input,
:root[data-theme="dark"] #customer .checkout-form select,
:root[data-theme="dark"] #customer .registration-form input,
:root[data-theme="dark"] #customer .registration-form select,
:root[data-theme="dark"] #customer .cart-controls span {
  background: rgba(32, 44, 49, 0.86);
}

html[data-theme="dark"] #store > .section-head h2,
:root[data-theme="dark"] #store > .section-head h2,
html[data-theme="dark"] #store [data-i18n="storeTitle"],
:root[data-theme="dark"] #store [data-i18n="storeTitle"] {
  color: #fff !important;
  text-shadow: 0 1px 0 rgba(0, 0, 0, 0.18);
}

#store > .section-head h2,
#store [data-i18n="storeTitle"],
html[data-theme="dark"] #store > .section-head h2,
:root[data-theme="dark"] #store > .section-head h2,
html[data-theme="dark"] #store [data-i18n="storeTitle"],
:root[data-theme="dark"] #store [data-i18n="storeTitle"] {
  color: var(--title-red, #6f1117) !important;
  text-shadow: 0 2px 0 #050505, 0 0 16px rgba(111, 17, 23, 0.26);
}

.theme-admin-panel {
  background: var(--soft);
  border: 1px solid var(--line);
  border-radius: 8px;
  display: grid;
  gap: 10px;
  padding: 12px;
}

.theme-palette-options {
  display: grid;
  gap: 8px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.theme-palette-options button {
  align-items: center;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink);
  cursor: pointer;
  display: grid;
  font-weight: 900;
  gap: 7px;
  justify-items: start;
  min-height: 72px;
  padding: 10px;
  text-align: start;
}

.theme-palette-options button.active {
  border-color: var(--teal);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--teal) 18%, transparent);
}

.theme-palette-options i {
  display: grid;
  gap: 4px;
  grid-template-columns: repeat(3, 18px);
}

.theme-palette-options i::before,
.theme-palette-options i::after,
.theme-palette-options i {
  content: "";
}

.theme-palette-options i {
  background: var(--swatch-a);
  border-radius: 999px;
  height: 18px;
  width: 18px;
}

.theme-palette-options i::before {
  background: var(--swatch-b);
  border-radius: 999px;
  display: block;
  height: 18px;
  transform: translateX(22px);
  width: 18px;
}

.theme-palette-options i::after {
  background: var(--swatch-c);
  border-radius: 999px;
  display: block;
  height: 18px;
  transform: translate(44px, -18px);
  width: 18px;
}

.theme-switch-row {
  align-items: center;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  display: flex;
  gap: 12px;
  justify-content: space-between;
  padding: 10px 12px;
}

.theme-switch-row input {
  accent-color: var(--teal);
  height: 20px;
  width: 42px;
}

@media print {
  body * {
    visibility: hidden !important;
  }

  html[data-print-target="admin-invoice"] .admin-invoice-preview,
  html[data-print-target="admin-invoice"] .admin-invoice-preview * {
    visibility: visible !important;
  }

  html[data-print-target="admin-invoice"] .admin-invoice-preview {
    border: 0 !important;
    box-shadow: none !important;
    inset: 0;
    padding: 18px !important;
    position: absolute;
    width: calc(100% - 36px);
  }

  #order-document,
  #order-document * {
    visibility: visible !important;
  }

  #order-document {
    background: #fff !important;
    color: #111 !important;
    inset: 0;
    padding: 0 !important;
    position: absolute;
  }

  .topbar,
  .order-summary-card,
  .api-status-panel {
    display: none !important;
  }

  .order-doc-grid {
    display: block !important;
  }

  .order-paper {
    border: 0 !important;
    box-shadow: none !important;
    color: #111 !important;
  }
}
