:root {
  --bg: #f5f0ea;
  --surface: #fffaf4;
  --card: #ffffff;
  --ink: #201b16;
  --muted: #786d62;
  --line: #e8dccf;
  --brand: #7a4f2b;
  --dark: #211a14;
  --shadow: 0 18px 42px rgba(37, 27, 18, .1);
}

* { box-sizing: border-box; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: Inter, Arial, Helvetica, sans-serif;
}
a { color: var(--brand); text-decoration: none; font-weight: 800; }
button {
  border: 0;
  border-radius: 999px;
  background: var(--brand);
  color: #fff;
  min-height: 40px;
  padding: 0 15px;
  font-weight: 800;
  cursor: pointer;
  transition: transform .16s ease, box-shadow .16s ease;
}
button:hover { transform: translateY(-1px); box-shadow: 0 10px 22px rgba(0,0,0,.12); }
button.secondary { background: var(--dark); }
button.soft { background: #efe6dc; color: var(--ink); box-shadow: none; }
button.danger { background: #9f1239; }
input, select, textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
  color: var(--ink);
  padding: 12px 13px;
  font: inherit;
  outline-color: var(--brand);
}
textarea { min-height: 82px; resize: vertical; }
label { display: grid; gap: 7px; color: var(--muted); font-size: 13px; font-weight: 800; }
.login-page {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 20px;
  background:
    radial-gradient(circle at top left, rgba(122,79,43,.18), transparent 34%),
    var(--bg);
}
.login-card {
  width: min(430px, 100%);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 24px;
  padding: 30px;
  box-shadow: var(--shadow);
}
.login-card h1 { margin: 0 0 8px; }
.login-card p { color: var(--muted); margin: 0 0 20px; }
.login-card form { display: grid; gap: 14px; }
.message { min-height: 20px; color: #b91c1c; }
.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding: 14px 18px;
  background: rgba(255,250,244,.9);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(16px);
}
.brand-title { display: grid; gap: 2px; }
.brand-title span { color: var(--muted); font-size: 12px; }
.topbar nav { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.shell {
  width: min(1240px, 100%);
  margin: 0 auto;
  padding: 20px;
  display: grid;
  gap: 18px;
}
.hero-panel {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 16px;
  padding: 24px;
  border-radius: 28px;
  background: #211a14;
  color: #fff;
  box-shadow: var(--shadow);
}
.hero-panel h1 { margin: 0 0 8px; font-size: clamp(28px, 5vw, 44px); }
.hero-panel p { margin: 0; color: rgba(255,255,255,.72); }
.tabs {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 2px;
}
.tab {
  flex: 0 0 auto;
  background: #fff;
  color: var(--ink);
  border: 1px solid var(--line);
  box-shadow: none;
}
.tab.active { background: var(--brand); color: #fff; border-color: var(--brand); }
.stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 14px;
}
.stat {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 22px;
  padding: 18px;
  box-shadow: 0 12px 30px rgba(37,27,18,.06);
}
.stat span { color: var(--muted); font-size: 13px; font-weight: 800; }
.stat strong { display: block; margin-top: 10px; font-size: 30px; }
.stat-alert {
  border-color: #fed7aa;
  background: linear-gradient(180deg, #fff7ed, #fff);
}
.stat-alert strong { color: #c2410c; }
.stat-label-with-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.notification-badge {
  min-width: 20px;
  height: 20px;
  padding: 0 6px;
  border-radius: 999px;
  background: #dc2626;
  color: #fff;
  font-size: 11px;
  font-weight: 900;
  line-height: 20px;
  text-align: center;
  box-shadow: 0 0 0 2px #fff;
}
.notification-badge[hidden] { display: none !important; }
.toast-stack {
  position: fixed;
  top: 76px;
  inset-inline-end: 18px;
  z-index: 40;
  display: grid;
  gap: 10px;
  max-width: min(360px, calc(100vw - 36px));
  pointer-events: none;
}
.order-toast {
  pointer-events: auto;
  padding: 14px 18px;
  border-radius: 16px;
  background: #1f2937;
  color: #fff;
  font-weight: 800;
  box-shadow: 0 16px 40px rgba(0, 0, 0, .18);
  transform: translateY(-10px);
  opacity: 0;
  transition: transform .25s ease, opacity .25s ease;
  cursor: pointer;
}
.order-toast.show {
  transform: translateY(0);
  opacity: 1;
}
.order-card-new-pulse,
.recent-order-card.order-card-new-pulse {
  animation: orderPulse 1.15s ease-in-out 3;
  border-color: #fca5a5 !important;
}
@keyframes orderPulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(220, 38, 38, .22); }
  50% { box-shadow: 0 0 0 12px rgba(220, 38, 38, 0); }
}
.stats-dashboard {
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
}
.dashboard-grid {
  display: grid;
  grid-template-columns: 1.1fr .9fr;
  gap: 16px;
}
.recent-orders-list {
  display: grid;
  gap: 10px;
}
.recent-order-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 14px;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #fff;
}
.recent-order-card {
  cursor: pointer;
  transition: transform .16s ease, box-shadow .16s ease, border-color .16s ease;
}
.recent-order-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 28px rgba(37, 27, 18, .08);
  border-color: rgba(122, 79, 43, .35);
}
.recent-order-items {
  display: block;
  font-size: 12px;
  line-height: 1.45;
}
.order-highlight {
  outline: 2px solid var(--brand);
  box-shadow: 0 0 0 4px rgba(122, 79, 43, .16);
}
.address-line {
  display: flex;
  gap: 8px;
  align-items: baseline;
  line-height: 1.5;
}
.address-label {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}
html[dir="rtl"] .address-line {
  flex-direction: row-reverse;
  text-align: right;
}
html[dir="rtl"] .order-details {
  direction: rtl;
}
html[dir="rtl"] .order-detail {
  text-align: right;
}
html[dir="rtl"] .order-detail span {
  letter-spacing: 0;
}
html[dir="rtl"] .order-items-block,
html[dir="rtl"] .order-line {
  direction: rtl;
  text-align: right;
}
html[dir="rtl"] .recent-order-row {
  direction: rtl;
  text-align: right;
}
html[dir="rtl"] .recent-order-meta {
  justify-items: start;
  text-align: start;
}
.recent-order-main {
  display: grid;
  gap: 4px;
  min-width: 0;
}
.recent-order-meta {
  display: grid;
  justify-items: end;
  gap: 6px;
  text-align: end;
}
.empty-block {
  padding: 12px 4px;
  margin: 0;
}
.toolbar {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.toolbar input,
.toolbar select {
  min-width: 180px;
  flex: 1 1 180px;
}
.filters-toolbar {
  margin-bottom: 16px;
}
.panel-head-stack {
  align-items: flex-start;
}
.panel-head-stack .toolbar {
  width: 100%;
  justify-content: flex-end;
}
.products-grid {
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
}
.product-card-top {
  display: flex;
  gap: 12px;
  align-items: flex-start;
}
.product-card-copy {
  display: grid;
  gap: 6px;
  min-width: 0;
}
.product-card-badges {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}
.product-card-desc {
  margin: 0;
  line-height: 1.5;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
}
.thumb-lg {
  width: 84px;
  height: 84px;
  flex-shrink: 0;
}
.order-card-premium {
  border: 1px solid rgba(234, 223, 210, .95);
  background: linear-gradient(180deg, #fff, #fffaf4);
}
.order-items-block {
  display: grid;
  gap: 8px;
  padding: 12px;
  border-radius: 14px;
  background: #faf6f1;
}
.item-card-compact {
  padding: 12px;
}
.product-modal .modal-body {
  display: grid;
  grid-template-columns: minmax(180px, 240px) 1fr;
  gap: 18px;
  align-items: start;
}
.modal-preview-col,
.modal-fields-col {
  display: grid;
  gap: 12px;
}
.modal-image-wrap .product-preview {
  max-width: none;
  width: 100%;
  height: 220px;
}
.product-modal-preview-name {
  margin: 0;
  font-size: 15px;
  font-weight: 800;
  text-align: center;
  line-height: 1.4;
}
.modal-footer,
.modal-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}
.modal-footer {
  justify-content: flex-end;
  padding-top: 8px;
  border-top: 1px solid var(--line);
  margin-top: 4px;
}
.modal-head {
  margin-bottom: 8px;
}
.panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 24px;
  padding: 18px;
  box-shadow: 0 12px 32px rgba(37,27,18,.06);
}
.panel-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
  flex-wrap: wrap;
}
.panel h2, .panel h3 { margin: 0; }
.grid-form {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 13px;
  align-items: end;
}
.compact-form { display: grid; gap: 10px; }
.check {
  display: flex;
  align-items: center;
  gap: 8px;
}
.check input { width: auto; }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; min-width: 760px; }
th, td {
  text-align: left;
  border-bottom: 1px solid var(--line);
  padding: 13px 10px;
  vertical-align: middle;
}
th { color: var(--muted); font-size: 12px; text-transform: uppercase; }
.list-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 13px;
}
.item-card, .order-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 14px;
  display: grid;
  gap: 10px;
}
.orders-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 16px;
}
.order-card {
  padding: 18px;
  box-shadow: 0 14px 34px rgba(37, 27, 18, .08);
}
.order-card-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
}
.order-card-head h3 {
  margin: 0 0 4px;
  font-size: 20px;
}
.order-details {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px 14px;
  padding: 14px;
  border-radius: 16px;
  background: #faf6f1;
}
.order-detail {
  display: grid;
  gap: 4px;
}
.order-detail.span-2 {
  grid-column: 1 / -1;
}
.order-detail span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .03em;
}
.order-detail strong {
  font-size: 14px;
  line-height: 1.45;
}
.order-total {
  color: var(--brand);
  font-size: 16px !important;
}
.order-items-list {
  display: grid;
  gap: 8px;
  padding-top: 4px;
}
.order-line {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  font-size: 13px;
  color: var(--muted);
}
.status-badge {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 0 12px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 900;
  white-space: nowrap;
}
.status-new { background: #ffedd5; color: #c2410c; }
.status-accepted { background: #dbeafe; color: #1d4ed8; }
.status-preparing { background: #ede9fe; color: #6d28d9; }
.status-delivery { background: #fef9c3; color: #a16207; }
.status-delivered { background: #dcfce7; color: #166534; }
.status-cancelled { background: #fee2e2; color: #b91c1c; }
.empty-orders {
  grid-column: 1 / -1;
  text-align: center;
  padding: 28px;
}
.row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.thumb {
  width: 66px;
  height: 66px;
  object-fit: cover;
  border-radius: 16px;
  border: 1px solid var(--line);
}
.muted { color: var(--muted); font-size: 13px; }
.pill {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 10px;
  border-radius: 999px;
  background: #efe6dc;
  color: var(--ink);
  font-size: 12px;
  font-weight: 900;
}
.pill.active { background: #dcfce7; color: #166534; }
.pill.off { background: #fee2e2; color: #991b1b; }
.pill.warn { background: #fef3c7; color: #92400e; }
.stat-alert strong { color: #b45309; }
.warn-text { color: #b45309; font-size: 12px; margin-top: 4px; }
.row-alert { background: #fffbeb; }
.actions-cell { display: flex; flex-wrap: wrap; gap: 6px; }
.subscription-banner {
  display: grid;
  gap: 4px;
  padding: 14px 18px;
  background: #fef3c7;
  color: #92400e;
  border-bottom: 1px solid #fcd34d;
}
.subscription-banner[hidden] { display: none !important; }
.read-only-admin .write-control,
.read-only-admin .status-actions button,
.read-only-admin #addProductBtn,
.read-only-admin .item-card .row button,
.read-only-admin #categoryForm button[type="submit"],
.read-only-admin #settingsForm button[type="submit"],
.read-only-admin #productForm button[type="submit"] {
  opacity: 0.55;
  pointer-events: none;
}
.read-only-admin #categoryForm input,
.read-only-admin #categoryForm select,
.read-only-admin #settingsForm input,
.read-only-admin #settingsForm select,
.read-only-admin #settingsForm textarea,
.read-only-admin #productForm input,
.read-only-admin #productForm select,
.read-only-admin #productForm textarea {
  background: #f8fafc;
}
.view { display: none; }
.view.active { display: grid; gap: 18px; }
.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 30;
  display: none;
  place-items: center;
  padding: 18px;
  background: rgba(20, 14, 9, .55);
}
.modal-backdrop.show { display: grid; }
.modal {
  width: min(720px, 100%);
  max-height: 90vh;
  overflow-y: auto;
  background: #fff;
  border-radius: 24px;
  padding: 20px;
  box-shadow: var(--shadow);
}
.modal form { display: grid; gap: 12px; }
.status-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  padding-top: 4px;
}
.status-actions button,
.status-btn {
  min-height: 36px;
  padding: 0 12px;
  font-size: 12px;
  background: #efe6dc;
  color: var(--ink);
  box-shadow: none;
}
.status-actions button.active,
.status-btn.active {
  background: var(--brand);
  color: #fff;
}
.status-btn.danger {
  background: #fee2e2;
  color: #b91c1c;
}
.status-btn.danger.active {
  background: #b91c1c;
  color: #fff;
}
@media (max-width: 760px) {
  .topbar, .hero-panel { align-items: flex-start; flex-direction: column; }
  .shell { padding: 14px; }
  .dashboard-grid { grid-template-columns: 1fr; }
  .recent-order-row {
    flex-direction: column;
    align-items: stretch;
  }
  .recent-order-meta {
    justify-items: start;
    text-align: start;
    grid-template-columns: auto 1fr;
    align-items: center;
  }
  .order-details { grid-template-columns: 1fr; }
  .panel-head-stack .toolbar {
    justify-content: stretch;
  }
  .toolbar input,
  .toolbar select,
  .toolbar button {
    width: 100%;
    flex: 1 1 100%;
  }
  .product-modal .modal-body {
    grid-template-columns: 1fr;
  }
  .orders-grid {
    grid-template-columns: 1fr;
  }
}
.branding-preview {
  display: grid;
  grid-template-columns: 180px 1fr;
  gap: 16px;
  margin-bottom: 18px;
}
.settings-name-preview {
  margin: 0 0 16px;
  padding: 12px 14px;
  border-radius: 14px;
  background: #faf6f1;
  font-size: 18px;
  font-weight: 800;
  color: var(--ink);
}
.store-status-panel .panel-head-stack {
  align-items: center;
}
.store-open-switch {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
  user-select: none;
  font-weight: 800;
}
.store-open-switch input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}
.store-open-switch-ui {
  width: 52px;
  height: 30px;
  border-radius: 999px;
  background: #cbd5e1;
  position: relative;
  transition: background .2s ease;
  flex: 0 0 auto;
}
.store-open-switch-ui::after {
  content: '';
  position: absolute;
  top: 3px;
  inset-inline-start: 3px;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 2px 8px rgba(15, 23, 42, .18);
  transition: transform .2s ease;
}
.store-open-switch input:checked + .store-open-switch-ui {
  background: #16a34a;
}
.store-open-switch input:checked + .store-open-switch-ui::after {
  transform: translateX(22px);
}
html[dir="rtl"] .store-open-switch input:checked + .store-open-switch-ui::after {
  transform: translateX(-22px);
}
.store-open-field {
  grid-column: 1 / -1;
}
.weekly-hours-panel {
  grid-column: 1 / -1;
  display: grid;
  gap: 12px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #faf6f1;
}
.weekly-hours-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: baseline;
  flex-wrap: wrap;
}
.weekly-hours-editor {
  display: grid;
  gap: 10px;
}
.weekly-hours-row {
  display: grid;
  grid-template-columns: minmax(120px, 1.1fr) repeat(2, minmax(120px, 1fr));
  gap: 10px;
  align-items: end;
  padding: 10px 12px;
  border-radius: 14px;
  background: #fff;
  border: 1px solid var(--line);
}
.weekly-day-toggle {
  margin: 0;
  font-weight: 800;
}
@media (max-width: 760px) {
  .weekly-hours-row {
    grid-template-columns: 1fr;
  }
}
.order-card-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  align-items: center;
}

.order-type-badge {
  display: inline-flex;
  align-items: center;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 700;
}

.order-type-badge.delivery {
  background: #dbeafe;
  color: #1d4ed8;
}

.order-type-badge.pickup {
  background: #fef3c7;
  color: #b45309;
}

.delivery-area-form {
  margin-bottom: 1rem;
}

.delivery-area-card .row {
  justify-content: space-between;
  gap: 0.75rem;
}

.coupon-form {
  margin-bottom: 16px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--line);
}
.coupon-card .row {
  align-items: flex-start;
}
.brand-preview-card {
  display: grid;
  gap: 8px;
}
.brand-preview-card.banner img {
  width: 100%;
  height: 140px;
  object-fit: cover;
}
.brand-preview-card img {
  width: 120px;
  height: 120px;
  object-fit: cover;
  border-radius: 20px;
  border: 1px solid var(--line);
  background: #fff;
}
.preview-label {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .03em;
}
.image-preview-wrap {
  display: grid;
  gap: 8px;
}
.product-preview {
  width: 100%;
  max-width: 280px;
  height: 180px;
  object-fit: cover;
  border-radius: 18px;
  border: 1px solid var(--line);
  background: #faf6f1;
}
@media (max-width: 760px) {
  .branding-preview { grid-template-columns: 1fr; }
}

.lang-toggle {
  min-width: 44px;
  padding: 0 12px;
  font-weight: 900;
}

html[dir="rtl"] body {
  font-family: Tahoma, Arial, sans-serif;
}
html[dir="rtl"] th,
html[dir="rtl"] td {
  text-align: right;
}
html[dir="rtl"] .panel-head,
html[dir="rtl"] .order-card-head,
html[dir="rtl"] .row,
html[dir="rtl"] .order-line,
html[dir="rtl"] .hero-panel {
  direction: rtl;
}
html[dir="rtl"] .tabs {
  direction: rtl;
}
html[dir="rtl"] .check {
  flex-direction: row-reverse;
  justify-content: flex-end;
}
html[dir="rtl"] .status-actions {
  direction: rtl;
}
html[dir="rtl"] .recent-order-meta {
  justify-items: start;
  text-align: start;
}
html[dir="rtl"] .modal-footer,
html[dir="rtl"] .modal-actions {
  direction: rtl;
}

.order-actions-row {
  display: flex;
  gap: 0.5rem;
  margin-top: 0.75rem;
  flex-wrap: wrap;
}

.whatsapp-btn {
  color: #15803d;
  border-color: #bbf7d0;
  background: #f0fdf4;
}

.receipt-modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.55);
  display: none;
  place-items: center;
  z-index: 1200;
  padding: 1rem;
}

.receipt-modal-backdrop.show {
  display: grid;
}

.receipt-modal {
  width: min(100%, 420px);
  max-height: 92vh;
  overflow: auto;
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 24px 60px rgba(15, 23, 42, 0.25);
}

.receipt-modal-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 1rem 1rem 0.5rem;
  border-bottom: 1px solid #e5e7eb;
}

.receipt-modal-toolbar h2 {
  margin: 0;
  font-size: 1rem;
}

.receipt-modal-actions {
  display: flex;
  gap: 0.5rem;
}

.receipt-paper {
  padding: 1rem 1.1rem 1.25rem;
  color: #111827;
  font-family: "Courier New", Courier, monospace;
  font-size: 12px;
  line-height: 1.45;
  background: #fff;
}

.receipt-header {
  text-align: center;
  margin-bottom: 0.75rem;
}

.receipt-logo {
  width: 56px;
  height: 56px;
  object-fit: contain;
  margin: 0 auto 0.5rem;
  display: block;
}

.receipt-store-name {
  margin: 0 0 0.25rem;
  font-size: 15px;
  font-weight: 700;
  font-family: inherit;
}

.receipt-title {
  margin: 0;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #6b7280;
}

.receipt-meta,
.receipt-totals {
  display: grid;
  gap: 0.35rem;
}

.receipt-row {
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
}

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

.receipt-row-block strong {
  white-space: pre-wrap;
  font-weight: 600;
}

.receipt-divider {
  border-top: 1px dashed #9ca3af;
  margin: 0.75rem 0;
}

.receipt-items-head {
  font-weight: 700;
  margin-bottom: 0.35rem;
}

.receipt-items-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 11px;
}

.receipt-items-table th,
.receipt-items-table td {
  padding: 0.25rem 0;
  vertical-align: top;
}

.receipt-items-table th {
  font-weight: 700;
  border-bottom: 1px solid #d1d5db;
}

.receipt-items-table td:last-child,
.receipt-items-table th:last-child {
  text-align: end;
}

.receipt-items-table td:nth-child(2),
.receipt-items-table th:nth-child(2),
.receipt-items-table td:nth-child(3),
.receipt-items-table th:nth-child(3) {
  text-align: center;
  white-space: nowrap;
}

.receipt-total-row {
  font-size: 13px;
  font-weight: 700;
  padding-top: 0.25rem;
  border-top: 1px solid #111827;
  margin-top: 0.25rem;
}

.receipt-thanks {
  text-align: center;
  margin: 0.85rem 0 0;
  font-size: 11px;
}

.receipt-paper[dir="rtl"] .receipt-items-table td:last-child,
.receipt-paper[dir="rtl"] .receipt-items-table th:last-child {
  text-align: start;
}

.receipt-paper[dir="rtl"] .receipt-row {
  direction: rtl;
}

@media print {
  @page {
    margin: 8mm;
    size: auto;
  }

  body.printing-receipt * {
    visibility: hidden;
  }

  body.printing-receipt #receiptModal,
  body.printing-receipt #receiptModal * {
    visibility: visible;
  }

  body.printing-receipt #receiptModal {
    position: absolute;
    inset: 0;
    display: block !important;
    background: #fff;
    padding: 0;
  }

  body.printing-receipt .receipt-modal {
    width: 80mm;
    max-width: 80mm;
    margin: 0 auto;
    max-height: none;
    overflow: visible;
    box-shadow: none;
    border-radius: 0;
  }

  body.printing-receipt .no-print,
  body.printing-receipt .receipt-modal-toolbar {
    display: none !important;
  }

  body.printing-receipt #receiptPrintArea {
    position: absolute;
    left: 0;
    top: 0;
    width: 80mm;
    padding: 0;
  }

  body.printing-receipt .topbar,
  body.printing-receipt .shell,
  body.printing-receipt .toast-stack,
  body.printing-receipt .subscription-banner {
    display: none !important;
  }
}
html[dir="rtl"] .toolbar {
  direction: rtl;
}

.panel-subcard {
  margin-bottom: 18px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.72);
}

.panel-subcard-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
  flex-wrap: wrap;
}

.panel-subcard-head .soft + .soft {
  margin-inline-start: 0;
}

.kuwait-missing-count {
  margin: 0 0 12px;
}

.panel-subcard-head h3 {
  margin: 0 0 4px;
}

.kuwait-governorate-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 12px;
}

.kuwait-governorate-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px 10px;
  align-items: center;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
}

.kuwait-governorate-inputs {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.kuwait-governorate-field {
  display: grid;
  gap: 4px;
}

.kuwait-governorate-field span {
  font-size: 12px;
}

.kuwait-governorate-min-hint {
  grid-column: 1 / -1;
  margin: 0;
  font-size: 12px;
}

.kuwait-governorate-name {
  font-weight: 800;
}

.kuwait-governorate-meta {
  grid-column: 1 / -1;
}

.kuwait-governorate-enabled {
  justify-self: start;
}

.kuwait-setup-save {
  grid-column: 1 / -1;
  justify-self: start;
}

.kuwait-setup-note {
  margin: 12px 0 0;
}

.subscription-blocked-page {
  display: grid;
  place-items: center;
  min-height: calc(100vh - 72px);
  padding: 24px;
}

.subscription-blocked-card {
  width: min(100%, 520px);
  padding: 32px 28px;
  border-radius: 20px;
  border: 1px solid var(--line);
  background: #fff;
  text-align: center;
  box-shadow: 0 18px 40px rgba(15, 23, 42, 0.08);
}

.subscription-blocked-card h1 {
  margin: 0 0 12px;
  font-size: 1.5rem;
}

.subscription-blocked-card p {
  margin: 0 0 20px;
  color: var(--muted);
}

.subscription-blocked-card .soft + .soft {
  margin-inline-start: 8px;
}

.cleanup-note {
  margin: 0 0 12px;
}

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

.confirm-modal h2 {
  margin: 0 0 10px;
}

.confirm-modal p {
  margin: 0 0 16px;
  color: var(--muted);
}
