/* =========================================================
   سامانه رزرو غذا — مجتمع سیدالشهدا (ع)
   استایل سفارشی مطابق طرح Stitch
   ========================================================= */

@font-face {
  font-family: "Vazirmatn";
  src: url("../fonts/Vazirmatn-Light.woff2") format("woff2");
  font-weight: 300;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Vazirmatn";
  src: url("../fonts/Vazirmatn-Regular.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Vazirmatn";
  src: url("../fonts/Vazirmatn-Medium.woff2") format("woff2");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Vazirmatn";
  src: url("../fonts/Vazirmatn-SemiBold.woff2") format("woff2");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Vazirmatn";
  src: url("../fonts/Vazirmatn-Bold.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Vazirmatn";
  src: url("../fonts/Vazirmatn-ExtraBold.woff2") format("woff2");
  font-weight: 800;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Vazirmatn";
  src: url("../fonts/Vazirmatn-Black.woff2") format("woff2");
  font-weight: 900;
  font-style: normal;
  font-display: swap;
}

:root {
  --brand-50: #fff2f0;
  --brand-100: #ffe2de;
  --brand-200: #ffcac4;
  --brand-500: #d32f2f;
  --brand-600: #c62828;
  --brand-700: #b71c1c;
  --brand-800: #8a1117;

  --cream-50: #ffffff;
  --cream-100: #fffdfb;
  --cream-200: #fff9f6;
  --cream-300: #fbf2ee;
  --cream-400: #f5ece7;
  --cream-500: #ece1dc;

  --warmgray-100: #948381;
  --warmgray-200: #695553;
  --warmgray-300: #433432;
  --warmgray-400: #2a1f1e;

  --amber: #ff9800;
  --amber-warm: #e65100;
  --amber-light: #fff3e0;

  --leaf: #2e7d32;
  --leaf-light: #e8f5e9;
  --leaf-accent: #43a047;

  --hero-from: #ba1a1a;
  --hero-via: #cf2d29;
  --hero-to: #df3b36;

  --radius-xl: 0.75rem;
  --radius-2xl: 1rem;
  --radius-3xl: 1.5rem;
  --container-max: 1440px;
}

/* ---------- Base ---------- */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: auto;
  overflow-x: hidden;
}

body {
  font-family: "Vazirmatn", system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  background-color: var(--cream-200);
  color: var(--warmgray-400);
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

::selection {
  background: var(--brand-100);
  color: var(--brand-700);
}

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

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

.container-app {
  width: 100%;
  max-width: var(--container-max);
  margin-inline: auto;
  padding-inline: 1rem;
}

@media (min-width: 576px) {
  .container-app {
    padding-inline: 1.5rem;
  }
}

@media (min-width: 992px) {
  .container-app {
    padding-inline: 2rem;
  }
}

/* ---------- Local Icons (img) ---------- */
.icon-img {
  display: inline-block;
  width: 1.25rem;
  height: 1.25rem;
  flex-shrink: 0;
  object-fit: contain;
  vertical-align: middle;
}

.icon-img.icon-xs { width: 12px; height: 12px; }
.icon-img.icon-sm { width: 14px; height: 14px; }
.icon-img.icon-md { width: 18px; height: 18px; }
.icon-img.icon-lg { width: 22px; height: 22px; }
.icon-img.icon-xl { width: 24px; height: 24px; }
.icon-img.icon-xxl { width: 32px; height: 32px; }

/* رنگ‌پذیری تقریبی با filter */
.icon-img.text-brand,
.icon-img.text-brand-600,
.icon-img.text-brand-700 {
  filter: invert(18%) sepia(86%) saturate(2800%) hue-rotate(346deg) brightness(90%) contrast(92%);
}

.icon-img.text-amber-warm {
  filter: invert(28%) sepia(97%) saturate(1800%) hue-rotate(8deg) brightness(95%) contrast(95%);
}

.icon-img.text-leaf {
  filter: invert(35%) sepia(70%) saturate(600%) hue-rotate(85deg) brightness(90%) contrast(90%);
}

.icon-img.text-warm-200 {
  filter: invert(35%) sepia(12%) saturate(500%) hue-rotate(320deg) brightness(95%) contrast(85%);
}

/* آیکون روشن روی بنر قرمز */
.icon-img.icon-on-dark {
  filter: brightness(0) invert(1);
  opacity: 0.95;
}

/* سازگاری با کلاس قدیمی .icon اگر جایی مانده باشد */
.icon {
  display: inline-block;
  width: 1.25rem;
  height: 1.25rem;
  flex-shrink: 0;
  background-color: currentColor;
  -webkit-mask-image: var(--i);
  mask-image: var(--i);
  -webkit-mask-size: contain;
  mask-size: contain;
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
  -webkit-mask-position: center;
  mask-position: center;
  vertical-align: middle;
}

.icon.xs { width: 12px; height: 12px; }
.icon.sm { width: 14px; height: 14px; }
.icon.md { width: 18px; height: 18px; }
.icon.lg { width: 22px; height: 22px; }
.icon.xl { width: 24px; height: 24px; }
.icon.xxl { width: 32px; height: 32px; }

/* Scrollbar */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

::-webkit-scrollbar-thumb {
  background: #e8d6d4;
  border-radius: 9999px;
}

.scrollbar-none {
  scrollbar-width: none;
}

.scrollbar-none::-webkit-scrollbar {
  display: none;
}

/* ---------- Utilities ---------- */
.warm-card {
  background: var(--cream-100);
  border: 1px solid var(--cream-400);
  border-radius: var(--radius-2xl);
  box-shadow: 0 4px 20px -2px rgba(186, 26, 26, 0.06), 0 2px 8px -1px rgba(0, 0, 0, 0.03);
}

.soft-panel {
  background: var(--cream-300);
  border: 1px solid var(--cream-400);
  border-radius: var(--radius-2xl);
}

.text-brand { color: var(--brand-500) !important; }
.text-brand-600 { color: var(--brand-600) !important; }
.text-brand-700 { color: var(--brand-700) !important; }
.text-warm-100 { color: var(--warmgray-100) !important; }
.text-warm-200 { color: var(--warmgray-200) !important; }
.text-warm-300 { color: var(--warmgray-300) !important; }
.text-warm-400 { color: var(--warmgray-400) !important; }
.text-amber-warm { color: var(--amber-warm) !important; }
.text-leaf { color: var(--leaf) !important; }
.text-cream-100 { color: #fff2f0 !important; }

.bg-brand { background-color: var(--brand-500) !important; }
.bg-brand-50 { background-color: var(--brand-50) !important; }
.bg-brand-100 { background-color: var(--brand-100) !important; }
.bg-cream-100 { background-color: var(--cream-100) !important; }
.bg-cream-200 { background-color: var(--cream-200) !important; }
.bg-cream-300 { background-color: var(--cream-300) !important; }
.bg-cream-400 { background-color: var(--cream-400) !important; }
.bg-amber-light { background-color: var(--amber-light) !important; }
.bg-leaf-light { background-color: var(--leaf-light) !important; }

.font-black { font-weight: 900 !important; }
.font-extrabold { font-weight: 800 !important; }
.font-nums { font-family: "Vazirmatn", Tahoma, sans-serif; }

.rounded-xl { border-radius: var(--radius-xl) !important; }
.rounded-2xl { border-radius: var(--radius-2xl) !important; }
.rounded-3xl { border-radius: var(--radius-3xl) !important; }

.line-clamp-1 {
  overflow: hidden;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 1;
  line-clamp: 1;
}

/* ---------- Header ---------- */
.app-header {
  position: sticky;
  top: 0;
  z-index: 1030;
  background: rgba(255, 253, 251, 0.95);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--cream-400);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.03);
}

.app-header-inner {
  min-height: 5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

/* لوگو چپ | منو راست (فیزیکی صفحه) */
.header-bar {
  direction: ltr;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 1rem;
}

.header-bar .brand-link {
  justify-self: start;
}

.header-bar .main-nav,
.header-bar .public-nav {
  direction: rtl;
  justify-self: center;
  grid-column: 2;
}

.header-bar .header-actions {
  direction: ltr;
  justify-self: end;
  grid-column: 3;
}

@media (max-width: 1199.98px) {
  .header-bar:not(:has(.public-nav)) {
    grid-template-columns: 1fr auto;
  }
  .header-bar:not(:has(.public-nav)) .header-actions {
    grid-column: 2;
  }
}

@media (max-width: 991.98px) {
  .header-bar {
    grid-template-columns: 1fr auto;
  }
  .header-bar .header-actions {
    grid-column: 2;
  }
}

.brand-link {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 0.875rem;
  direction: ltr;
}

.brand-text {
  direction: rtl;
  text-align: right;
}

.brand-logo {
  width: 3rem;
  height: 3rem;
  border-radius: var(--radius-2xl);
  background: var(--brand-50);
  border: 1px solid var(--brand-100);
  padding: 0.375rem;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
  flex-shrink: 0;
  transition: transform 0.3s ease;
}

.brand-link:hover .brand-logo {
  transform: scale(1.05);
}

.brand-logo img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.brand-title {
  font-size: 1.05rem;
  font-weight: 900;
  color: var(--brand-700);
  line-height: 1.2;
  white-space: nowrap;
}

.brand-subtitle {
  font-size: 0.7rem;
  color: var(--warmgray-200);
  font-weight: 500;
  white-space: nowrap;
}

.main-nav {
  display: none;
  align-items: center;
  gap: 0.375rem;
  background: var(--cream-300);
  padding: 0.375rem;
  border-radius: var(--radius-2xl);
  border: 1px solid var(--cream-400);
}

@media (min-width: 1200px) {
  .main-nav {
    display: flex;
  }
}

.main-nav .nav-link {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  padding: 0.5rem 1rem;
  border-radius: var(--radius-xl);
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--warmgray-200);
  white-space: nowrap;
  transition: all 0.2s ease;
}

.main-nav .nav-link:hover {
  color: var(--warmgray-400);
  background: var(--cream-200);
}

.main-nav .nav-link.active {
  background: var(--brand-500);
  color: #fff;
  font-weight: 700;
  box-shadow: 0 2px 8px rgba(211, 47, 47, 0.25);
}

.main-nav .nav-link.active .icon-img {
  filter: brightness(0) invert(1);
  opacity: 0.96;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-shrink: 0;
}

.wallet-widget {
  display: none;
  align-items: center;
  gap: 0.5rem;
  background: var(--cream-300);
  border: 1px solid var(--cream-400);
  padding: 0.35rem 0.875rem;
  border-radius: var(--radius-2xl);
  height: 2.75rem;
  position: relative;
}

@media (min-width: 576px) {
  .wallet-widget {
    display: flex;
  }
}

.wallet-widget--monitor {
  height: auto;
  min-height: 2.75rem;
  padding: 0.4rem 0.75rem;
  gap: 0.65rem;
}

.wallet-badge {
  position: absolute;
  top: -0.35rem;
  left: -0.35rem;
  min-width: 1.25rem;
  height: 1.25rem;
  padding: 0 0.35rem;
  border-radius: 999px;
  background: var(--brand-600);
  color: #fff;
  font-size: 0.7rem;
  font-weight: 800;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 6px rgba(211, 47, 47, 0.35);
  z-index: 2;
}

.wallet-metric {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  line-height: 1;
}

.wallet-metric-value {
  font-size: 1rem;
  font-weight: 800;
}

.wallet-metric-icon {
  width: 1rem;
  height: 1rem;
}

.wallet-metric.is-paid .wallet-metric-value {
  color: var(--leaf);
}

.wallet-metric.is-paid .wallet-metric-icon {
  filter: invert(36%) sepia(72%) saturate(550%) hue-rotate(88deg) brightness(92%) contrast(92%);
}

.wallet-metric.is-debt .wallet-metric-value {
  color: var(--brand-600);
}

.wallet-metric.is-debt .wallet-metric-icon {
  filter: invert(18%) sepia(82%) saturate(2800%) hue-rotate(346deg) brightness(90%) contrast(95%);
}

.wallet-metric-divider {
  width: 1px;
  align-self: stretch;
  background: var(--cream-400);
}

.wallet-widget .label {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--brand-700);
  white-space: nowrap;
}

.wallet-widget .amount {
  font-size: 0.875rem;
  font-weight: 800;
  white-space: nowrap;
}

.wallet-widget .unit {
  font-size: 0.7rem;
  color: var(--warmgray-200);
}

.btn-icon-add {
  width: 1.5rem;
  height: 1.5rem;
  border: 0;
  border-radius: 0.5rem;
  background: var(--brand-500);
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-right: 0.25rem;
  transition: background 0.2s, transform 0.15s;
}

.btn-icon-add:hover {
  background: var(--brand-600);
}

.btn-icon-add:active {
  transform: scale(0.95);
}

.btn-notify {
  position: relative;
  width: 2.75rem;
  height: 2.75rem;
  border-radius: var(--radius-2xl);
  background: var(--cream-300);
  border: 1px solid var(--cream-400);
  color: var(--warmgray-300);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
}

.btn-notify:hover {
  background: var(--cream-400);
  color: var(--brand-600);
}

.btn-notify .dot {
  position: absolute;
  top: 0.625rem;
  right: 0.625rem;
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 50%;
  background: var(--brand-500);
  box-shadow: 0 0 0 2px #fff;
}

.user-chip {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  background: var(--cream-300);
  padding: 0 0.875rem 0 0.5rem;
  height: 2.75rem;
  border-radius: var(--radius-2xl);
  border: 1px solid var(--cream-400);
}

.user-chip .meta {
  display: none;
  flex-direction: column;
  text-align: left;
}

@media (min-width: 768px) {
  .user-chip .meta {
    display: flex;
  }
}

.user-chip .name {
  font-size: 0.75rem;
  font-weight: 700;
  white-space: nowrap;
}

.user-chip .role {
  font-size: 0.625rem;
  color: var(--brand-600);
  font-weight: 600;
  white-space: nowrap;
}

.user-avatar {
  width: 2rem;
  height: 2rem;
  border-radius: var(--radius-xl);
  overflow: hidden;
  box-shadow: 0 0 0 2px rgba(211, 47, 47, 0.2);
  flex-shrink: 0;
}

.user-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  background: linear-gradient(to left, var(--hero-to), var(--hero-via), var(--hero-from));
  color: #fff;
  padding-top: 2rem;
  padding-bottom: 4.5rem;
  overflow: hidden;
}

@media (min-width: 576px) {
  .hero {
    padding-bottom: 6rem;
  }
}

.hero-blob {
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
  filter: blur(48px);
}

.hero-blob-1 {
  top: -6rem;
  left: -5rem;
  width: 24rem;
  height: 24rem;
  background: rgba(255, 226, 222, 0.1);
}

.hero-blob-2 {
  top: 50%;
  right: 25%;
  width: 20rem;
  height: 20rem;
  background: rgba(255, 152, 0, 0.15);
  filter: blur(32px);
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  padding: 0.25rem 0.75rem;
  border-radius: 9999px;
  font-size: 0.75rem;
  font-weight: 700;
  white-space: nowrap;
  background: rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.hero-badge.dark {
  background: rgba(0, 0, 0, 0.2);
  color: #ffe082;
  font-weight: 500;
  border: none;
}

.hero-badge.soft {
  background: rgba(255, 255, 255, 0.1);
  font-weight: 500;
  border: none;
}

.hero-badge .pulse-dot {
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 50%;
  background: #ffd54f;
  animation: pulse 1.5s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.45; }
}

.hero h1 {
  font-size: clamp(1.35rem, 3vw, 2.35rem);
  font-weight: 800;
  line-height: 1.4;
  letter-spacing: -0.02em;
  margin: 0.85rem 0 0.75rem;
  max-width: none;
}

.hero .lead {
  font-size: clamp(0.9rem, 1.4vw, 1.05rem);
  font-weight: 400;
  line-height: 1.8;
  color: rgba(255, 249, 246, 0.92);
  max-width: 36rem;
  margin: 0;
}

.hero-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 1.75rem;
  align-items: center;
  width: 100%;
  min-width: 0;
}

@media (min-width: 992px) {
  .hero-layout {
    grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
    gap: 2rem;
  }
}

.hero-content {
  max-width: none;
  min-width: 0;
  margin-inline: 0;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
}

@media (min-width: 992px) {
  .hero-content {
    text-align: right;
    align-items: flex-start;
  }

  .hero-badges {
    justify-content: flex-start;
  }

  .hero-actions {
    justify-content: flex-start;
  }

  .hero .lead {
    margin: 0;
  }
}

.hero-badges {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.75rem;
  margin-top: 1.35rem;
  width: 100%;
}

.hero-actions .btn-hero-light,
.hero-actions .btn-hero-ghost {
  flex: 1 1 auto;
  min-width: 10.5rem;
  max-width: 16rem;
  justify-content: center;
}

.value-badges--desktop {
  display: none;
  flex-wrap: wrap;
  gap: 0.625rem;
  margin-top: 1.25rem;
  width: auto;
  max-width: none;
}

@media (min-width: 992px) {
  .value-badges--desktop {
    display: flex;
  }
}

.value-badges--desktop .value-badge {
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  gap: 0.5rem;
  background: rgba(0, 0, 0, 0.25);
  backdrop-filter: blur(6px);
  padding: 0.375rem 0.875rem;
  border-radius: var(--radius-xl);
  border: 1px solid rgba(255, 255, 255, 0.15);
  font-size: 0.75rem;
  font-weight: 600;
  white-space: nowrap;
  min-height: 0;
  text-align: right;
  line-height: 1.2;
}

.value-badges--desktop .value-badge span {
  white-space: nowrap;
}

/* روبان‌های بادبزنی — پشت کارت همبرگر، از مرکز به دو طرف */
.value-badges--orbit {
  display: block;
  position: absolute;
  inset: 0 1rem;
  width: auto;
  height: auto;
  pointer-events: none;
  z-index: 1;
  overflow: hidden;
}

.orbit-chip {
  --fan: 0deg;
  --reach: calc(46% - 0.35rem);
  --delay: 0.4s;
  --in-top: 30%;
  --in-bot: 70%;
  --out-top: 5%;
  --out-bot: 95%;
  position: absolute;
  top: 50%;
  display: flex;
  align-items: center;
  height: 1.72rem;
  width: var(--reach);
  max-width: calc(50% - 0.9rem);
  font-size: 0.7rem;
  font-weight: 600;
  line-height: 1;
  color: rgba(255, 249, 246, 0.94);
  white-space: nowrap;
  --bob: 8px;
  --float: 3.8s;
  --phase: 0s;
  opacity: 0;
  z-index: 1;
  transform: translateY(-50%) rotate(0deg) scaleX(0.05);
}

.ribbon--right {
  left: 50%;
  justify-content: flex-end;
  direction: ltr;
  transform-origin: left center;
  padding-left: calc(var(--burger) / 2 + 0.45rem);
  padding-right: 0.7rem;
  background: linear-gradient(
    90deg,
    rgba(42, 31, 30, 0) 0%,
    rgba(42, 31, 30, 0.28) 16%,
    rgba(42, 31, 30, 0.78) 40%,
    rgba(42, 31, 30, 0.9) 100%
  );
  clip-path: polygon(
    0 var(--in-top),
    100% var(--out-top),
    100% var(--out-bot),
    0 var(--in-bot)
  );
}

.ribbon--left {
  right: 50%;
  justify-content: flex-start;
  direction: ltr;
  transform-origin: right center;
  padding-right: calc(var(--burger) / 2 + 0.45rem);
  padding-left: 0.7rem;
  background: linear-gradient(
    270deg,
    rgba(42, 31, 30, 0) 0%,
    rgba(42, 31, 30, 0.28) 16%,
    rgba(42, 31, 30, 0.78) 40%,
    rgba(42, 31, 30, 0.9) 100%
  );
  clip-path: polygon(
    0 var(--out-top),
    100% var(--in-top),
    100% var(--in-bot),
    0 var(--out-bot)
  );
}

.orbit-chip span {
  direction: rtl;
  flex: 1 1 auto;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ribbon--right span {
  text-align: right;
}

.ribbon--left span {
  text-align: left;
}

.hero-visual.is-visible .orbit-chip {
  opacity: 0.96;
  animation:
    ribbonIn 0.88s cubic-bezier(0.16, 1, 0.3, 1) var(--delay) both,
    ribbonFloat var(--float) ease-in-out calc(var(--phase) + 1.2s) infinite;
}

@keyframes ribbonIn {
  0% {
    opacity: 0;
    transform: translateY(-50%) rotate(0deg) scaleX(0.05);
  }
  100% {
    opacity: 0.96;
    transform: translateY(-50%) rotate(var(--fan)) scaleX(1);
  }
}

@keyframes ribbonFloat {
  0%, 100% {
    transform: translateY(-50%) rotate(var(--fan)) scaleX(1);
  }
  50% {
    transform: translateY(calc(-50% + var(--bob))) rotate(var(--fan)) scaleX(1);
  }
}

/* راست: بعضی دورتر، بعضی کوتاه‌تر — چپ کمی نامتقارن */
.orbit-1 { --fan: -21deg; --reach: calc(44% - 0.3rem); --delay: 0.34s; --in-top: 34%; --in-bot: 68%; --out-top: 2%; --out-bot: 98%; --bob: 9px; --float: 3.5s; --phase: 0s; }
.orbit-5 { --fan: -7deg;  --reach: calc(50% - 0.2rem); --delay: 0.46s; --in-top: 28%; --in-bot: 72%; --out-top: 8%; --out-bot: 90%; --bob: -8px; --float: 4.3s; --phase: 0.45s; }
.orbit-3 { --fan: 10deg;  --reach: calc(40% - 0.3rem); --delay: 0.4s;  --in-top: 32%; --in-bot: 66%; --out-top: 0%; --out-bot: 100%; --bob: 8px; --float: 3.8s; --phase: 0.2s; }
.orbit-7 { --fan: 20deg;  --reach: calc(47% - 0.25rem); --delay: 0.56s; --in-top: 36%; --in-bot: 74%; --out-top: 4%; --out-bot: 94%; --bob: -9px; --float: 4.1s; --phase: 0.7s; }

.orbit-2 { --fan: -19deg; --reach: calc(49% - 0.2rem); --delay: 0.38s; --in-top: 33%; --in-bot: 71%; --out-top: 1%; --out-bot: 97%; --bob: -8px; --float: 3.6s; --phase: 0.15s; }
.orbit-4 { --fan: -4deg;  --reach: calc(41% - 0.3rem); --delay: 0.5s;  --in-top: 30%; --in-bot: 69%; --out-top: 7%; --out-bot: 92%; --bob: 9px; --float: 4.4s; --phase: 0.55s; }
.orbit-6 { --fan: 7deg;   --reach: calc(46% - 0.25rem); --delay: 0.42s; --in-top: 27%; --in-bot: 73%; --out-top: 3%; --out-bot: 96%; --bob: -7px; --float: 3.3s; --phase: 0.3s; }
.orbit-8 { --fan: 22deg;  --reach: calc(48% - 0.2rem); --delay: 0.6s;  --in-top: 35%; --in-bot: 67%; --out-top: 6%; --out-bot: 93%; --bob: 8px; --float: 4.2s; --phase: 0.85s; }
.orbit-9 { --fan: -14deg; --reach: calc(36% - 0.35rem); --delay: 0.48s; --in-top: 26%; --in-bot: 74%; --out-top: 4%; --out-bot: 96%; --bob: 7px; --float: 3.9s; --phase: 0.1s; }
.orbit-10 { --fan: 15deg; --reach: calc(37% - 0.3rem); --delay: 0.54s; --in-top: 31%; --in-bot: 67%; --out-top: 2%; --out-bot: 98%; --bob: -9px; --float: 4.5s; --phase: 0.6s; }
.orbit-11 { --fan: 3deg;  --reach: calc(34% - 0.3rem); --delay: 0.62s; --in-top: 29%; --in-bot: 71%; --out-top: 6%; --out-bot: 92%; --bob: -8px; --float: 3.4s; --phase: 0.35s; }
.orbit-12 { --fan: -13deg; --reach: calc(35% - 0.3rem); --delay: 0.44s; --in-top: 33%; --in-bot: 66%; --out-top: 3%; --out-bot: 95%; --bob: 7px; --float: 4s; --phase: 0.5s; }

@media (max-width: 575.98px) {
  .ribbon-late:not(.ribbon-phone) {
    display: none;
  }

  .hero-visual {
    --burger: min(26vw, 7.5rem);
    overflow: visible;
  }

  .value-badges--orbit {
    overflow: visible;
    inset: 0 0.15rem;
  }

  .orbit-chip {
    height: auto;
    min-height: 1.5rem;
    font-size: 0.66rem;
    width: max-content;
    max-width: none;
  }

  .orbit-chip span {
    overflow: visible;
    text-overflow: clip;
    white-space: nowrap;
  }

  .ribbon--right,
  .ribbon--left {
    width: max-content;
    max-width: none;
  }

  /* چهار روبان در هر طرف، با فاصله یکسان */
  .orbit-1 { --fan: -27deg; --bob: 4px; }
  .orbit-5 { --fan: -9deg; --bob: -4px; }
  .orbit-9 { --fan: 9deg; --bob: 4px; }
  .orbit-3 { --fan: 27deg; --bob: -4px; }

  .orbit-2 { --fan: -27deg; --bob: -4px; }
  .orbit-4 { --fan: -9deg; --bob: 4px; }
  .orbit-10 { --fan: 9deg; --bob: -4px; }
  .orbit-6 { --fan: 27deg; --bob: 4px; }
}

@media (max-width: 575.98px) {
  .hero-badge {
    font-size: 0.68rem;
    white-space: normal;
    text-align: center;
    line-height: 1.35;
  }

  .hero-actions .btn-hero-light,
  .hero-actions .btn-hero-ghost {
    max-width: none;
    width: 100%;
  }

  .hero-visual {
    min-height: 22rem;
  }
}

.hero-visual {
  --burger: min(34vw, 10.25rem);
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  padding-block: 2.75rem 2rem;
  overflow: hidden;
  min-height: 24rem;
}

@media (min-width: 576px) {
  .hero-visual {
    --burger: min(34vw, 15rem);
    min-height: 26rem;
    padding-block: 3rem 2.25rem;
  }
}

@media (min-width: 992px) {
  .hero-visual {
    --burger: min(15.5rem, 40%);
    justify-content: center;
    padding-block: 1.75rem;
    min-height: 22rem;
    overflow: hidden;
  }
}

.hero-burger-wrap {
  position: relative;
  width: var(--burger);
  z-index: 3;
}

.hero-burger-glow {
  position: absolute;
  inset: -1rem;
  background: rgba(255, 104, 84, 0.25);
  border-radius: 50%;
  filter: blur(48px);
  pointer-events: none;
  transition: background 0.3s;
}

.hero-burger-wrap:hover .hero-burger-glow {
  background: rgba(255, 104, 84, 0.4);
}

.hero-burger {
  position: relative;
  width: 100%;
  aspect-ratio: 1;
  border-radius: var(--radius-3xl);
  overflow: hidden;
  isolation: isolate;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.35);
  z-index: 1;
}

.hero-visual.is-visible .hero-burger {
  animation: burgerCounter 3.8s ease-in-out 1.55s infinite;
}

.hero-burger img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: inherit;
  transform-origin: center;
  backface-visibility: hidden;
  transition: transform 0.75s cubic-bezier(0.33, 1, 0.68, 1);
}

.hero-burger-wrap:hover .hero-burger img {
  transform: scale(1.03);
}

@keyframes burgerCounter {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(9px); }
}

.hero-wave {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  width: 100%;
  overflow: hidden;
  line-height: 0;
  pointer-events: none;
  z-index: 3;
}

.hero-wave svg {
  display: block;
  width: 100%;
  height: 2.75rem;
  color: var(--cream-200);
}

@media (min-width: 576px) {
  .hero-wave svg {
    height: 4rem;
  }
}

/* ---------- Main ---------- */
.main-content {
  flex: 1;
  width: 100%;
  padding-block: 1rem 1.5rem;
}

@media (min-width: 576px) {
  .main-content {
    padding-block: 1.5rem;
  }
}

.section-gap > * + * {
  margin-top: 1.5rem;
}

/* Toolbar */
.control-toolbar {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  padding: 1rem;
}

@media (min-width: 768px) {
  .control-toolbar {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
  }
}

.toolbar-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: center;
}

.filter-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--cream-300);
  padding: 0.625rem 0.875rem;
  border-radius: var(--radius-xl);
  border: 1px solid var(--cream-400);
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--warmgray-300);
}

.filter-chip select {
  background: transparent;
  border: 0;
  padding: 0;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--warmgray-400);
  cursor: pointer;
  outline: none;
  max-width: 100%;
}

.btn-brand {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.625rem 1.25rem;
  border: 0;
  border-radius: var(--radius-xl);
  background: var(--brand-500);
  color: #fff;
  font-weight: 700;
  font-size: 0.75rem;
  white-space: nowrap;
  box-shadow: 0 4px 12px rgba(211, 47, 47, 0.2);
  transition: background 0.2s, transform 0.15s;
}

.btn-brand .icon-img {
  filter: brightness(0) invert(1);
  opacity: 0.96;
}

.btn-brand:hover {
  background: var(--brand-600);
  color: #fff;
}

.btn-brand:active {
  transform: scale(0.97);
}

.btn-soft {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.375rem;
  padding: 0.5rem 0.875rem;
  border: 0;
  border-radius: var(--radius-xl);
  background: var(--cream-300);
  color: var(--warmgray-400);
  font-weight: 700;
  font-size: 0.75rem;
  white-space: nowrap;
  transition: background 0.2s;
}

.btn-soft:hover {
  background: var(--cream-400);
  color: var(--warmgray-400);
}

/* Stats */
.stat-card {
  padding: 1.25rem;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.stat-label {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--warmgray-200);
}

.stat-icon {
  width: 2.5rem;
  height: 2.5rem;
  border-radius: var(--radius-xl);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  border: 1px solid transparent;
}

.stat-icon.brand {
  background: var(--brand-50);
  color: var(--brand-600);
  border-color: var(--brand-100);
}

.stat-icon.amber {
  background: var(--amber-light);
  color: var(--amber-warm);
  border-color: #ffe0b2;
}

.stat-value {
  font-size: 1.875rem;
  font-weight: 900;
  line-height: 1;
}

.stat-unit {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--warmgray-200);
}

.stat-hint {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.375rem 0.625rem;
  border-radius: var(--radius-xl);
}

.stat-hint.brand {
  color: var(--brand-600);
  background: var(--brand-50);
}

.stat-hint.amber {
  color: #78350f;
  background: var(--amber-light);
}

.progress-ring-wrap {
  position: relative;
  width: 4rem;
  height: 4rem;
  flex-shrink: 0;
}

.progress-ring-wrap span {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  font-weight: 900;
}

.progress-thin {
  height: 0.5rem;
  background: var(--cream-400);
  border-radius: 9999px;
  overflow: hidden;
}

.progress-thin .bar {
  height: 100%;
  border-radius: 9999px;
  background: var(--brand-500);
}

.progress-thin .bar.amber { background: var(--amber-warm); }
.progress-thin .bar.leaf { background: var(--leaf); }
.progress-thin .bar.w-41 { width: 41%; }
.progress-thin .bar.w-52 { width: 52%; }
.progress-thin .bar.w-31 { width: 31%; }
.progress-thin .bar.w-17 { width: 17%; }
.progress-thin .bar.w-75 { width: 75%; }
.progress-thin .bar.w-85 { width: 85%; }
.progress-thin .bar.w-94 { width: 94%; }
.progress-thin .bar.w-100 { width: 100%; }

.live-dot {
  position: relative;
  display: flex;
  width: 0.75rem;
  height: 0.75rem;
}

.live-dot::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: var(--brand-500);
  opacity: 0.75;
  animation: ping 1.2s cubic-bezier(0, 0, 0.2, 1) infinite;
}

.live-dot::after {
  content: "";
  position: relative;
  width: 0.75rem;
  height: 0.75rem;
  border-radius: 50%;
  background: var(--brand-600);
}

@keyframes ping {
  75%, 100% {
    transform: scale(2);
    opacity: 0;
  }
}

/* Org callout */
.org-callout {
  background: linear-gradient(to right, var(--cream-100), var(--cream-100), var(--brand-50));
  border: 1px solid rgba(255, 202, 196, 0.8);
  padding: 1.25rem;
  border-radius: var(--radius-2xl);
  display: flex;
  flex-direction: column;
  gap: 1rem;
  align-items: center;
  justify-content: space-between;
}

@media (min-width: 768px) {
  .org-callout {
    flex-direction: row;
  }
}

.org-icon {
  width: 3rem;
  height: 3rem;
  border-radius: var(--radius-2xl);
  background: var(--brand-100);
  color: var(--brand-700);
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--brand-200);
  flex-shrink: 0;
}

.badge-brand {
  display: inline-flex;
  padding: 0.125rem 0.5rem;
  border-radius: 9999px;
  background: var(--brand-500);
  color: #fff;
  font-size: 0.7rem;
  font-weight: 700;
}

/* Day tabs & search */
.day-toolbar {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

@media (min-width: 768px) {
  .day-toolbar {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
  }
}

.day-tabs {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  overflow-x: auto;
  padding-bottom: 0.25rem;
}

a.day-tab {
  text-decoration: none;
}

.day-tab {
  padding: 0.5rem 1rem;
  border-radius: var(--radius-xl);
  border: 1px solid var(--cream-400);
  background: var(--cream-100);
  color: var(--warmgray-200);
  font-weight: 700;
  font-size: 0.75rem;
  white-space: nowrap;
  transition: all 0.2s;
}

.day-tab:hover {
  background: var(--cream-300);
  color: var(--warmgray-400);
}

.day-tab.active {
  background: var(--brand-500);
  color: #fff;
  border-color: transparent;
  box-shadow: 0 2px 6px rgba(211, 47, 47, 0.2);
}

.day-tab.is-disabled,
span.day-tab {
  opacity: 0.38;
  cursor: not-allowed;
  pointer-events: none;
  background: transparent;
  border-color: transparent;
  color: var(--warmgray-200);
  box-shadow: none;
  font-weight: 500;
}

.month-menu-table th,
.month-menu-table td {
  vertical-align: middle;
  white-space: nowrap;
}

.month-menu-table tr.is-today {
  background: rgba(211, 47, 47, 0.06);
}

.month-menu-table tr.is-weekend {
  background: rgba(0, 0, 0, 0.02);
}

.month-menu-table tr.is-past {
  opacity: 0.72;
}

.badge-soft {
  display: inline-flex;
  align-items: center;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  background: rgba(211, 47, 47, 0.1);
  color: var(--brand-700, #b71c1c);
  font-size: 0.8rem;
  font-weight: 700;
}

.menu-card--disabled {
  opacity: 0.55;
  filter: grayscale(0.25);
}

.menu-card--disabled .btn-brand,
.menu-card--disabled .btn-soft {
  pointer-events: none;
}

a.wallet-widget,
a.user-chip {
  text-decoration: none;
  color: inherit;
}

a.wallet-widget:hover,
a.user-chip:hover {
  opacity: 0.92;
}

.search-box {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--cream-100);
  border: 1px solid var(--cream-400);
  padding: 0.5rem 0.75rem;
  border-radius: var(--radius-xl);
  width: 100%;
}

@media (min-width: 576px) {
  .search-box {
    width: 16rem;
  }
}

.search-box input {
  border: 0;
  background: transparent;
  outline: none;
  font-size: 0.75rem;
  color: var(--warmgray-400);
  width: 100%;
}

.search-box input::placeholder {
  color: var(--warmgray-100);
}

.btn-filter {
  width: 2.25rem;
  height: 2.25rem;
  border-radius: var(--radius-xl);
  background: var(--cream-100);
  border: 1px solid var(--cream-400);
  color: var(--warmgray-300);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: color 0.2s;
}

.btn-filter:hover {
  color: var(--brand-600);
}

/* Food table */
.food-table-wrap {
  overflow-x: auto;
}

.food-table {
  width: 100%;
  border-collapse: collapse;
  text-align: right;
  margin: 0;
}

.food-table thead th {
  background: var(--cream-300);
  border-bottom: 1px solid var(--cream-400);
  color: var(--warmgray-300);
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0.875rem 0.75rem;
  white-space: nowrap;
}

.food-table thead th:first-child {
  padding-inline: 1rem 0.75rem;
}

.food-table thead th:last-child {
  text-align: left;
  padding-inline: 0.75rem 1rem;
}

.food-table tbody tr {
  border-bottom: 1px solid var(--cream-400);
  transition: background 0.15s;
}

.food-table tbody tr:last-child {
  border-bottom: 0;
}

.food-table tbody tr:hover {
  background: var(--cream-200);
}

.food-table td {
  padding: 1rem 0.75rem;
  vertical-align: middle;
  white-space: nowrap;
}

.food-table td:first-child {
  padding-inline: 1rem 0.75rem;
  white-space: normal;
}

.food-table td:last-child {
  text-align: left;
  padding-inline: 0.75rem 1rem;
}

.food-cell {
  display: flex;
  align-items: center;
  gap: 0.875rem;
}

.food-thumb {
  position: relative;
  width: 4rem;
  height: 4rem;
  border-radius: var(--radius-2xl);
  overflow: hidden;
  background: var(--cream-500);
  flex-shrink: 0;
  border: 1px solid var(--brand-200);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
}

.food-thumb.amber-border { border-color: #ffe0b2; }
.food-thumb.green-border { border-color: #c8e6c9; }

.food-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.food-thumb .mini-icon {
  position: absolute;
  top: -0.25rem;
  right: -0.25rem;
  width: 1.5rem;
  height: 1.5rem;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.12);
  padding: 0.125rem;
  border: 1px solid var(--brand-200);
}

.food-thumb .mini-icon.amber { border-color: #ffe0b2; }
.food-thumb .mini-icon.green { border-color: #c8e6c9; }

.food-thumb .mini-icon img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.food-name {
  font-size: 0.875rem;
  font-weight: 700;
  color: var(--warmgray-400);
}

.food-desc {
  font-size: 0.75rem;
  color: var(--warmgray-200);
  margin-top: 0.25rem;
}

.food-meta {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 0.25rem;
  font-size: 0.7rem;
  font-weight: 600;
}

.tag {
  display: inline-flex;
  padding: 0.125rem 0.5rem;
  border-radius: 0.375rem;
  font-size: 0.625rem;
  font-weight: 800;
  white-space: nowrap;
  border: 1px solid transparent;
}

.tag.amber {
  background: var(--amber-light);
  color: var(--amber-warm);
  border-color: #ffe0b2;
}

.tag.brand {
  background: var(--brand-50);
  color: var(--brand-600);
  border-color: var(--brand-200);
}

.tag.leaf {
  background: var(--leaf-light);
  color: var(--leaf);
  border-color: #c8e6c9;
}

.cat-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.25rem 0.625rem;
  border-radius: 0.5rem;
  background: var(--cream-300);
  color: var(--warmgray-300);
  font-size: 0.75rem;
  font-weight: 600;
}

.price-main {
  font-size: 0.875rem;
  font-weight: 800;
  color: var(--brand-600);
}

.price-old {
  font-size: 0.7rem;
  color: var(--warmgray-100);
  text-decoration: line-through;
}

.capacity-block {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  width: 8rem;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  padding: 0.25rem 0.625rem;
  border-radius: 9999px;
  font-size: 0.7rem;
  font-weight: 700;
  border: 1px solid transparent;
}

.status-pill .dot {
  width: 0.375rem;
  height: 0.375rem;
  border-radius: 50%;
}

.status-pill.warning {
  background: var(--amber-light);
  color: var(--amber-warm);
  border-color: #ffe0b2;
}

.status-pill.warning .dot { background: var(--amber-warm); }

.status-pill.ok {
  background: var(--leaf-light);
  color: var(--leaf);
  border-color: #c8e6c9;
}

.status-pill.ok .dot { background: var(--leaf); }

.status-pill.full {
  background: var(--brand-50);
  color: var(--brand-700);
  border-color: var(--brand-200);
}

.status-pill.full .dot { background: var(--brand-600); }

.action-btns {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.375rem;
}

.btn-action {
  width: 2rem;
  height: 2rem;
  border-radius: 0.5rem;
  border: 0;
  background: var(--cream-300);
  color: var(--warmgray-300);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
}

.btn-action .icon-img {
  filter: invert(28%) sepia(18%) saturate(720%) hue-rotate(330deg) brightness(90%) contrast(90%);
  opacity: 0.92;
}

.btn-action:hover {
  background: var(--cream-400);
  color: var(--brand-600);
}

.btn-action:hover .icon-img {
  filter: invert(18%) sepia(82%) saturate(2800%) hue-rotate(346deg) brightness(90%) contrast(95%);
}

.btn-action.danger-soft {
  background: var(--brand-50);
  color: var(--brand-700);
}

.btn-action.danger-soft:hover {
  background: var(--brand-100);
}

.btn-action.danger-soft .icon-img {
  filter: invert(18%) sepia(82%) saturate(2800%) hue-rotate(346deg) brightness(90%) contrast(95%);
}

/* Lower cards */
.insight-card {
  padding: 1.25rem;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.insight-card h3 {
  font-size: 0.875rem;
  font-weight: 700;
  margin: 0;
}

.insight-card .sub {
  font-size: 0.75rem;
  color: var(--warmgray-200);
  margin-top: 0.25rem;
}

.bar-row {
  margin-bottom: 0.75rem;
}

.bar-row .labels {
  display: flex;
  justify-content: space-between;
  font-size: 0.75rem;
  font-weight: 700;
  margin-bottom: 0.25rem;
}

.rule-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.625rem;
  background: var(--cream-300);
  border-radius: var(--radius-xl);
  border: 1px solid var(--cream-400);
  gap: 0.5rem;
  margin-bottom: 0.625rem;
}

.rule-row .left {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.75rem;
  font-weight: 600;
  white-space: nowrap;
}

.rule-row .right {
  font-size: 0.75rem;
  font-weight: 800;
  white-space: nowrap;
}

.insight-note {
  padding: 0.75rem;
  border-radius: var(--radius-xl);
  background: var(--amber-light);
  border: 1px solid #ffe0b2;
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  font-size: 0.75rem;
  color: var(--warmgray-300);
  font-weight: 500;
}

.broadcast-textarea {
  width: 100%;
  padding: 0.75rem;
  border-radius: var(--radius-xl);
  background: var(--cream-300);
  border: 1px solid var(--cream-400);
  font-size: 0.75rem;
  color: var(--warmgray-400);
  resize: none;
  outline: none;
  font-family: inherit;
}

.broadcast-textarea:focus {
  border-color: var(--brand-500);
  box-shadow: 0 0 0 1px var(--brand-500);
}

.form-check-brand .form-check-input:checked {
  background-color: var(--brand-500);
  border-color: var(--brand-500);
}

/* Modal overrides */
.modal-content.app-modal {
  background: var(--cream-100);
  border: 1px solid var(--cream-400);
  border-radius: var(--radius-3xl);
  overflow: hidden;
  max-height: calc(100vh - 2rem);
  display: flex;
  flex-direction: column;
}

.modal-content.app-modal > form {
  display: flex;
  flex-direction: column;
  min-height: 0;
  max-height: inherit;
}

.modal-header.app-modal-header,
.modal-footer.app-modal-footer {
  background: var(--cream-300);
  border-color: var(--cream-400);
  padding: 1rem 1.5rem;
  flex-shrink: 0;
}

.modal-body.app-modal-body {
  padding: 1.5rem;
  overflow-y: auto;
  overscroll-behavior: contain;
  max-height: min(70vh, 36rem);
  flex: 1 1 auto;
}

.form-label-app {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--warmgray-400);
  margin-bottom: 0.25rem;
}

.form-label-app.is-required::after {
  content: " *";
  color: var(--brand-600);
  font-weight: 800;
}

.label-optional {
  font-size: 0.68rem;
  font-weight: 600;
  color: var(--warmgray-100);
  margin-right: 0.2rem;
}

.form-control-app,
.form-select-app {
  width: 100%;
  padding: 0.5rem 0.75rem;
  border-radius: var(--radius-xl);
  background: var(--cream-200);
  border: 1px solid var(--cream-400);
  font-size: 0.75rem;
  color: var(--warmgray-400);
  outline: none;
}

.form-control-app:focus,
.form-select-app:focus {
  border-color: var(--brand-500);
  box-shadow: 0 0 0 1px var(--brand-500);
}

.form-select-app option {
  background: var(--cream-100);
  color: var(--warmgray-400);
  padding: 0.55rem 0.7rem;
}

.day-check {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  padding: 0.375rem 0.75rem;
  border-radius: var(--radius-xl);
  background: var(--cream-300);
  border: 1px solid var(--cream-400);
  font-size: 0.75rem;
  font-weight: 600;
  cursor: pointer;
}

.day-check.active {
  background: var(--brand-50);
  border-color: var(--brand-200);
  color: var(--brand-700);
  font-weight: 700;
}

.modal-icon {
  width: 2.25rem;
  height: 2.25rem;
  border-radius: var(--radius-xl);
  background: var(--brand-500);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.modal-icon .icon-img {
  filter: brightness(0) invert(1);
  opacity: 0.96;
}

.btn-close-app {
  width: 2rem;
  height: 2rem;
  border: 0;
  border-radius: 50%;
  background: var(--brand-500);
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.btn-close-app .icon-img {
  filter: brightness(0) invert(1);
  opacity: 0.96;
}

.btn-close-app:hover {
  background: var(--brand-700);
  color: #fff;
}

.modal-backdrop + .modal-backdrop {
  display: none;
}

/* Footer */
.app-footer {
  width: 100%;
  background: var(--cream-100);
  border-top: 1px solid var(--cream-400);
  padding: 1.5rem 0;
  margin-top: 2.5rem;
}

.footer-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.85rem;
  text-align: center;
}

@media (min-width: 992px) {
  .footer-inner {
    flex-direction: row;
    justify-content: space-between;
    text-align: right;
  }
}

.deadline-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--cream-300);
  border: 1px solid var(--cream-400);
  padding: 0.5rem 1rem;
  border-radius: 9999px;
  font-size: 0.75rem;
  max-width: 100%;
}

.deadline-text {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.25rem 0.4rem;
  line-height: 1.4;
}

.footer-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0.75rem 1.25rem;
  font-size: 0.75rem;
  color: var(--warmgray-200);
}

.footer-meta .item {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
}

.footer-copy {
  font-size: 0.7rem;
  color: var(--warmgray-100);
  text-align: center;
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid var(--cream-400);
  line-height: 1.6;
  opacity: 1 !important;
  transform: none !important;
}

/* منوی موبایل بالاتر از هدر بچسبد تا روی اولین لینک نیفتد */
.offcanvas {
  --bs-offcanvas-zindex: 1080;
  z-index: 1080;
}

.offcanvas-backdrop {
  --bs-backdrop-zindex: 1070;
  z-index: 1070;
}

/* Mobile nav toggle */
.btn-menu {
  display: inline-flex;
  width: 2.75rem;
  height: 2.75rem;
  border-radius: var(--radius-2xl);
  background: var(--cream-300);
  border: 1px solid var(--cream-400);
  color: var(--warmgray-300);
  align-items: center;
  justify-content: center;
}

@media (min-width: 1200px) {
  .btn-menu {
    display: none;
  }
}

/* در صفحه عمومی، منوی دسکتاپ از lg ظاهر می‌شود */
@media (min-width: 992px) {
  body:has(.public-nav) .btn-menu {
    display: none;
  }
}

.offcanvas-nav .nav-link {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.75rem 1rem;
  border-radius: var(--radius-xl);
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--warmgray-300);
}

.offcanvas-nav .nav-link .icon-img {
  flex-shrink: 0;
  filter: invert(28%) sepia(18%) saturate(720%) hue-rotate(330deg) brightness(90%) contrast(90%);
  opacity: 0.9;
}

.offcanvas-nav .nav-link.active {
  background: var(--brand-500);
  color: #fff;
}

.offcanvas-nav .nav-link.active .icon-img {
  filter: brightness(0) invert(1);
  opacity: 0.96;
}

.offcanvas-submenu {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.offcanvas-submenu-toggle {
  width: 100%;
  border: 0;
  background: transparent;
  text-align: right;
  justify-content: space-between;
  cursor: pointer;
}

.offcanvas-submenu-label {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
}

.offcanvas-submenu.is-open > .offcanvas-submenu-toggle {
  background: var(--brand-50);
  color: var(--brand-700);
}

.offcanvas-submenu.is-open > .offcanvas-submenu-toggle .icon-img {
  filter: invert(18%) sepia(82%) saturate(2800%) hue-rotate(346deg) brightness(90%) contrast(95%);
}

.offcanvas-submenu-chevron {
  transition: transform 0.2s ease;
  transform: rotate(0deg);
}

.offcanvas-submenu.is-open .offcanvas-submenu-chevron {
  transform: rotate(-90deg);
}

.offcanvas-submenu-list {
  display: none;
  flex-direction: column;
  gap: 0.2rem;
  padding: 0.15rem 0.35rem 0.35rem 0.75rem;
}

.offcanvas-submenu.is-open .offcanvas-submenu-list {
  display: flex;
}

.offcanvas-nav .offcanvas-sublink {
  font-size: 0.8rem;
  padding: 0.6rem 0.9rem;
  background: var(--cream-200);
}

.offcanvas-nav .offcanvas-sublink.active {
  background: var(--brand-500);
  color: #fff;
}

/* ---------- Public Homepage ---------- */
.btn-outline-brand {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 0.55rem 1.1rem;
  border-radius: var(--radius-xl);
  border: 1px solid var(--brand-200);
  background: var(--cream-100);
  color: var(--brand-700);
  font-weight: 700;
  font-size: 0.8rem;
  white-space: nowrap;
  transition: all 0.2s;
}

.btn-outline-brand:hover {
  background: var(--brand-50);
  color: var(--brand-700);
}

.btn-hero-light {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.7rem 1.35rem;
  border-radius: var(--radius-xl);
  border: 0;
  background: #fff;
  color: var(--brand-700);
  font-weight: 800;
  font-size: 0.85rem;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
  transition: transform 0.15s, background 0.2s;
}

.btn-hero-light:hover {
  background: var(--cream-200);
  color: var(--brand-800);
  transform: translateY(-1px);
}

.btn-hero-ghost {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.7rem 1.2rem;
  border-radius: var(--radius-xl);
  border: 1px solid rgba(255, 255, 255, 0.35);
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  font-weight: 700;
  font-size: 0.85rem;
  backdrop-filter: blur(6px);
  transition: background 0.2s;
}

.btn-hero-ghost:hover {
  background: rgba(255, 255, 255, 0.22);
  color: #fff;
}

.section-block {
  padding-block: 2.5rem;
}

.section-head {
  text-align: center;
  max-width: 36rem;
  margin: 0 auto 1.75rem;
}

.section-head h2 {
  font-size: clamp(1.15rem, 2vw, 1.5rem);
  font-weight: 800;
  color: var(--warmgray-400);
  margin-bottom: 0.5rem;
}

.section-head p {
  font-size: 0.9rem;
  color: var(--warmgray-200);
  margin: 0;
  line-height: 1.7;
}

.step-card {
  padding: 1.35rem;
  height: 100%;
  text-align: center;
}

.step-num {
  width: 2.5rem;
  height: 2.5rem;
  margin: 0 auto 0.85rem;
  border-radius: 9999px;
  background: var(--brand-500);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 900;
  font-size: 0.95rem;
}

.step-card h3 {
  font-size: 0.95rem;
  font-weight: 800;
  margin-bottom: 0.4rem;
}

.step-card p {
  font-size: 0.8rem;
  color: var(--warmgray-200);
  margin: 0;
  line-height: 1.7;
}

.menu-card {
  overflow: hidden;
  height: 100%;
  transition: transform 0.2s, box-shadow 0.2s;
}

.menu-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 28px -6px rgba(186, 26, 26, 0.12);
}

.menu-card-img {
  position: relative;
  height: 10rem;
  overflow: hidden;
  border-radius: var(--radius-2xl) var(--radius-2xl) 0 0;
}

.menu-card-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform-origin: center;
  backface-visibility: hidden;
}

.menu-card-body {
  padding: 1rem 1.1rem 1.15rem;
}

.menu-card-body h3 {
  font-size: 0.9rem;
  font-weight: 800;
  margin-bottom: 0.35rem;
}

.menu-card-body p {
  font-size: 0.75rem;
  color: var(--warmgray-200);
  margin-bottom: 0.75rem;
  line-height: 1.6;
}

.menu-card-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}

.feature-item {
  display: flex;
  gap: 0.85rem;
  padding: 1.1rem;
  height: 100%;
}

.feature-icon {
  width: 2.75rem;
  height: 2.75rem;
  border-radius: var(--radius-xl);
  background: var(--brand-50);
  color: var(--brand-600);
  border: 1px solid var(--brand-100);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.feature-item h3 {
  font-size: 0.9rem;
  font-weight: 800;
  margin-bottom: 0.25rem;
}

.feature-item p {
  font-size: 0.78rem;
  color: var(--warmgray-200);
  margin: 0;
  line-height: 1.65;
}

.cta-band {
  background: linear-gradient(135deg, var(--hero-from), var(--hero-to));
  color: #fff;
  border-radius: var(--radius-3xl);
  padding: 2rem 1.5rem;
  text-align: center;
}

.cta-band h2 {
  font-size: clamp(1.1rem, 2vw, 1.4rem);
  font-weight: 800;
  margin-bottom: 0.5rem;
}

.cta-band p {
  font-size: 0.9rem;
  opacity: 0.92;
  margin-bottom: 1.25rem;
}

.public-nav {
  display: none;
  align-items: center;
  gap: 0.25rem;
  direction: rtl;
}

@media (min-width: 992px) {
  .public-nav {
    display: flex;
  }
}

.public-nav a {
  padding: 0.45rem 0.85rem;
  border-radius: var(--radius-xl);
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--warmgray-200);
  transition: all 0.2s;
}

.public-nav a:hover,
.public-nav a.active {
  color: var(--brand-700);
  background: var(--cream-300);
}

.hero-stats {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0;
  margin-top: 1.25rem;
  margin-bottom: 0.5rem;
  position: relative;
  z-index: 1;
  background: var(--cream-100);
  border: 1px solid var(--cream-400);
  border-radius: var(--radius-2xl);
  box-shadow: 0 10px 28px -8px rgba(186, 26, 26, 0.1);
  overflow: hidden;
}

@media (min-width: 768px) {
  .hero-stats {
    grid-template-columns: repeat(4, 1fr);
  }
}

.hero-stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 0.2rem;
  padding: 1rem 0.75rem;
  border-left: 1px solid var(--cream-400);
}

.hero-stat:nth-child(2n) {
  border-left: 0;
}

@media (min-width: 768px) {
  .hero-stat {
    border-left: 1px solid var(--cream-400);
  }
  .hero-stat:first-child {
    border-left: 0;
  }
  .hero-stat:nth-child(2n) {
    border-left: 1px solid var(--cream-400);
  }
}

.hero-stat strong {
  font-size: 1.25rem;
  font-weight: 900;
  color: var(--brand-600);
  line-height: 1.2;
}

.hero-stat span {
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--warmgray-200);
}

.trust-strip,
.trust-chip {
  display: none;
}

/* ---------- Motion & Scroll Reveal ---------- */
@media (prefers-reduced-motion: no-preference) {
  .reveal {
    opacity: 0;
    transform: translateY(14px);
    transition:
      opacity 1.25s cubic-bezier(0.16, 1, 0.3, 1),
      transform 1.25s cubic-bezier(0.16, 1, 0.3, 1);
    will-change: opacity, transform;
  }

  .reveal.is-visible {
    opacity: 1;
    transform: translateY(0);
  }

  .reveal-left {
    opacity: 0;
    transform: translateX(16px);
    transition:
      opacity 1.3s cubic-bezier(0.16, 1, 0.3, 1),
      transform 1.3s cubic-bezier(0.16, 1, 0.3, 1);
  }

  .reveal-left.is-visible {
    opacity: 1;
    transform: translateX(0);
  }

  .reveal-right {
    opacity: 0;
    transform: translateX(-16px);
    transition:
      opacity 1.3s cubic-bezier(0.16, 1, 0.3, 1),
      transform 1.3s cubic-bezier(0.16, 1, 0.3, 1);
  }

  .reveal-right.is-visible {
    opacity: 1;
    transform: translateX(0);
  }

  .reveal-scale {
    opacity: 0;
    transform: scale(0.985) translateY(12px);
    transition:
      opacity 1.3s cubic-bezier(0.16, 1, 0.3, 1),
      transform 1.3s cubic-bezier(0.16, 1, 0.3, 1);
  }

  .reveal-scale.is-visible {
    opacity: 1;
    transform: scale(1) translateY(0);
  }

  .reveal-soft {
    opacity: 0;
    transform: translateY(12px);
    transition:
      opacity 1.4s cubic-bezier(0.16, 1, 0.3, 1),
      transform 1.4s cubic-bezier(0.16, 1, 0.3, 1);
    will-change: opacity, transform;
  }

  .reveal-soft.is-visible {
    opacity: 1;
    transform: translateY(0);
  }

  .reveal-delay-1 { transition-delay: 0s; }
  .reveal-delay-2 { transition-delay: 0s; }
  .reveal-delay-3 { transition-delay: 0s; }
  .reveal-delay-4 { transition-delay: 0s; }
  .reveal-delay-5 { transition-delay: 0s; }

  .reveal-delay-1.is-visible { transition-delay: 0.06s; }
  .reveal-delay-2.is-visible { transition-delay: 0.14s; }
  .reveal-delay-3.is-visible { transition-delay: 0.22s; }
  .reveal-delay-4.is-visible { transition-delay: 0.3s; }
  .reveal-delay-5.is-visible { transition-delay: 0.38s; }

  /* ورود بنر هنگام لود */
  .hero-enter {
    opacity: 0;
    animation: heroFadeUp 1.1s cubic-bezier(0.33, 1, 0.68, 1) forwards;
  }

  .hero-enter-delay-1 { animation-delay: 0.08s; }
  .hero-enter-delay-2 { animation-delay: 0.16s; }
  .hero-enter-delay-3 { animation-delay: 0.24s; }
  .hero-enter-delay-4 { animation-delay: 0.32s; }
  .hero-enter-delay-5 { animation-delay: 0.4s; }

  @keyframes heroFadeUp {
    from {
      opacity: 0;
      transform: translateY(12px);
    }
    to {
      opacity: 1;
      transform: translateY(0);
    }
  }

  .hero-visual.hero-enter {
    animation-name: heroFadeIn;
  }

  @keyframes heroFadeIn {
    from {
      opacity: 0;
      transform: translateY(10px) scale(0.985);
    }
    to {
      opacity: 1;
      transform: translateY(0) scale(1);
    }
  }

  /* هاور زنده‌تر کارت‌ها */
  .step-card,
  .feature-item,
  .menu-card {
    transition:
      opacity 1.35s cubic-bezier(0.16, 1, 0.3, 1),
      transform 1.35s cubic-bezier(0.16, 1, 0.3, 1),
      box-shadow 0.8s ease;
  }

  .step-card.reveal-delay-1.is-visible,
  .feature-item.reveal-delay-1.is-visible,
  .menu-card.reveal-delay-1.is-visible { transition-delay: 0.06s; }
  .step-card.reveal-delay-2.is-visible,
  .feature-item.reveal-delay-2.is-visible,
  .menu-card.reveal-delay-2.is-visible { transition-delay: 0.14s; }
  .step-card.reveal-delay-3.is-visible,
  .feature-item.reveal-delay-3.is-visible,
  .menu-card.reveal-delay-3.is-visible { transition-delay: 0.22s; }
  .step-card.reveal-delay-4.is-visible,
  .feature-item.reveal-delay-4.is-visible,
  .menu-card.reveal-delay-4.is-visible { transition-delay: 0.3s; }
  .step-card.reveal-delay-5.is-visible,
  .feature-item.reveal-delay-5.is-visible,
  .menu-card.reveal-delay-5.is-visible { transition-delay: 0.38s; }

  .step-card:hover,
  .feature-item:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 28px -12px rgba(186, 26, 26, 0.12);
  }

  .menu-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 14px 32px -12px rgba(186, 26, 26, 0.14);
  }

  .menu-card-img img {
    transition: transform 0.75s cubic-bezier(0.33, 1, 0.68, 1);
  }

  .menu-card:hover .menu-card-img img {
    transform: scale(1.04);
  }

  .btn-brand,
  .btn-outline-brand,
  .btn-hero-light,
  .btn-hero-ghost {
    transition:
      transform 0.35s cubic-bezier(0.33, 1, 0.68, 1),
      background 0.3s ease,
      box-shadow 0.35s ease,
      color 0.3s ease;
  }

  .btn-brand:hover,
  .btn-hero-light:hover {
    transform: translateY(-1px);
  }

  .btn-brand:active,
  .btn-hero-light:active,
  .btn-hero-ghost:active {
    transform: translateY(0) scale(0.99);
  }

  .feature-icon {
    transition: transform 0.5s cubic-bezier(0.33, 1, 0.68, 1);
  }

  .feature-item:hover .feature-icon {
    transform: scale(1.05) rotate(-2deg);
  }

  .step-num {
    transition: transform 0.5s cubic-bezier(0.33, 1, 0.68, 1);
  }

  .step-card:hover .step-num {
    transform: scale(1.06);
  }

  .hero-stat {
    transition: background 0.4s ease;
  }

  .hero-stat:hover {
    background: var(--brand-50);
  }

  .hero-stat:hover strong {
    transform: scale(1.03);
  }

  .hero-stat strong {
    display: inline-block;
    transition: transform 0.45s cubic-bezier(0.33, 1, 0.68, 1);
  }

  /* هدر هنگام اسکرول */
  .app-header {
    transition: box-shadow 0.45s ease, backdrop-filter 0.45s ease;
  }

  .app-header.is-scrolled {
    box-shadow: 0 8px 24px -12px rgba(42, 31, 30, 0.18);
    backdrop-filter: blur(16px);
  }
}

@media (prefers-reduced-motion: reduce) {
  .reveal,
  .reveal-left,
  .reveal-right,
  .reveal-scale,
  .reveal-soft,
  .hero-enter {
    opacity: 1 !important;
    transform: none !important;
    filter: none !important;
    animation: none !important;
    transition: none !important;
  }

  .orbit-chip {
    opacity: 0.96 !important;
    transform: translateY(-50%) rotate(var(--fan)) scaleX(1) !important;
    animation: none !important;
    transition: none !important;
  }

  .hero-burger {
    animation: none !important;
  }
}

/* Review day chips + debtors */
.review-toolbar {
  flex-direction: column;
  align-items: stretch;
  gap: 0.875rem;
}

.review-day-chips {
  display: flex;
  gap: 0.5rem;
  overflow-x: auto;
  padding-bottom: 0.15rem;
}

.review-day-chip {
  display: inline-flex;
  flex-direction: column;
  gap: 0.15rem;
  min-width: 5.5rem;
  padding: 0.55rem 0.8rem;
  border-radius: var(--radius-xl);
  border: 1px solid var(--cream-400);
  background: var(--cream-100);
  color: var(--warmgray-300);
  text-decoration: none;
  transition: all 0.2s;
}

.review-day-chip:hover {
  background: var(--cream-300);
  color: var(--warmgray-400);
}

.review-day-chip.is-active {
  background: var(--brand-500);
  border-color: transparent;
  color: #fff;
  box-shadow: 0 2px 8px rgba(211, 47, 47, 0.22);
}

.review-day-chip-title {
  font-size: 0.78rem;
  font-weight: 800;
  white-space: nowrap;
}

.review-day-chip-sub {
  font-size: 0.68rem;
  opacity: 0.85;
}

.review-search {
  max-width: 22rem;
}

.debtor-list {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.debtor-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.9rem 1.1rem;
  border-radius: var(--radius-2xl);
  border: 1px solid var(--cream-400);
  background: var(--cream-100);
}

.debtor-name {
  font-weight: 800;
  color: var(--warmgray-400);
}

.debtor-meta {
  font-size: 0.75rem;
  color: var(--warmgray-200);
  margin-top: 0.2rem;
}

.debtor-amount {
  font-size: 1.05rem;
  font-weight: 800;
  text-align: left;
}

.debtor-side {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.35rem;
}

.debt-age-mild {
  background: #fff8f6;
  border-color: #f0d2cc;
}

.debt-age-mild .debtor-amount { color: #c62828; }

.debt-age-warn {
  background: #ffe8e4;
  border-color: #efb3aa;
}

.debt-age-warn .debtor-amount { color: #b71c1c; }

.debt-age-high {
  background: #ffd4ce;
  border-color: #e88b80;
}

.debt-age-high .debtor-amount,
.debt-age-high .debtor-name { color: #8e0000; }

.debt-age-critical {
  background: #ffc1b8;
  border-color: #d32f2f;
  box-shadow: inset 3px 0 0 #b71c1c;
}

.debt-age-critical .debtor-amount,
.debt-age-critical .debtor-name { color: #7f0000; }

.control-toolbar.review-toolbar {
  flex-direction: column !important;
  align-items: stretch !important;
}


.nav-dropdown {
  position: relative;
}

.nav-dropdown-toggle {
  border: 0;
  background: transparent;
  cursor: pointer;
}

.nav-dropdown.is-active > .nav-dropdown-toggle,
.nav-dropdown.is-open > .nav-dropdown-toggle {
  background: var(--brand-500);
  color: #fff;
  font-weight: 700;
  box-shadow: 0 2px 8px rgba(211, 47, 47, 0.25);
}

.nav-dropdown.is-active > .nav-dropdown-toggle .icon-img,
.nav-dropdown.is-open > .nav-dropdown-toggle .icon-img {
  filter: brightness(0) invert(1);
  opacity: 0.96;
}

.nav-dropdown-menu {
  display: none;
  position: absolute;
  top: calc(100% + 0.35rem);
  right: 0;
  min-width: 11.5rem;
  padding: 0.4rem;
  border-radius: var(--radius-xl);
  border: 1px solid var(--cream-400);
  background: var(--cream-100);
  box-shadow: 0 10px 28px -16px rgba(42, 31, 30, 0.35);
  z-index: 40;
}

.nav-dropdown.is-open .nav-dropdown-menu {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.nav-dropdown-item {
  display: block;
  padding: 0.55rem 0.75rem;
  border-radius: var(--radius-lg);
  color: var(--warmgray-300);
  text-decoration: none;
  font-size: 0.75rem;
  font-weight: 700;
}

.nav-dropdown-item:hover,
.nav-dropdown-item.active {
  background: var(--brand-50);
  color: var(--brand-700);
}

.print-only { display: none; }

@media print {
  .app-header,
  .app-footer,
  .no-print,
  .btn-menu,
  .offcanvas,
  .messages-wrap {
    display: none !important;
  }

  .print-only { display: block !important; }

  .main-content {
    padding: 0 !important;
  }

  .warm-card,
  .food-table-wrap {
    box-shadow: none !important;
    break-inside: avoid;
  }

  body {
    background: #fff !important;
  }
}

.wallet-monitor-icon {
  flex-shrink: 0;
  filter: invert(22%) sepia(70%) saturate(2200%) hue-rotate(346deg) brightness(90%) contrast(95%);
  opacity: 0.9;
}

/* Custom checkboxes */
input[type="checkbox"].app-check,
.day-check input[type="checkbox"],
.form-check-input.app-check {
  position: absolute;
  opacity: 0;
  pointer-events: none;
  width: 0;
  height: 0;
}

.day-check {
  position: relative;
}

.day-check .check-box {
  width: 1.05rem;
  height: 1.05rem;
  border-radius: 0.35rem;
  border: 1.5px solid var(--cream-400);
  background: var(--cream-100);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: all 0.15s ease;
}

.day-check .check-box::after {
  content: "";
  width: 0.35rem;
  height: 0.55rem;
  border: solid #fff;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg) scale(0);
  margin-top: -0.1rem;
  transition: transform 0.12s ease;
}

.day-check:has(input:checked),
.day-check.active {
  background: var(--brand-50);
  border-color: var(--brand-200);
  color: var(--brand-700);
  font-weight: 700;
}

.day-check:has(input:checked) .check-box,
.day-check.active .check-box {
  background: var(--brand-500);
  border-color: var(--brand-500);
}

.day-check:has(input:checked) .check-box::after,
.day-check.active .check-box::after {
  transform: rotate(45deg) scale(1);
}

input[type="checkbox"]:not(.app-check) {
  appearance: none;
  -webkit-appearance: none;
  width: 1.05rem;
  height: 1.05rem;
  border-radius: 0.35rem;
  border: 1.5px solid var(--cream-400);
  background: var(--cream-100);
  vertical-align: middle;
  cursor: pointer;
  position: relative;
}

.day-check input[type="checkbox"] {
  appearance: none;
  -webkit-appearance: none;
  position: absolute;
  opacity: 0;
  pointer-events: none;
  width: 0;
  height: 0;
}

input[type="checkbox"]:not(.app-check):checked {
  background: var(--brand-500);
  border-color: var(--brand-500);
}

input[type="checkbox"]:not(.app-check):checked::after {
  content: "";
  position: absolute;
  left: 0.32rem;
  top: 0.1rem;
  width: 0.28rem;
  height: 0.5rem;
  border: solid #fff;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

.day-check input[type="checkbox"]:checked::after {
  display: none;
}

/* File upload */
.file-upload {
  position: relative;
  display: block;
  cursor: pointer;
}

/* فقط داخل .file-upload پوشش کامل می‌دهد؛ وگرنه اینپوت معمولی می‌ماند */
.file-upload .file-upload-input {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
  z-index: 2;
  width: 100%;
  height: 100%;
}

.file-upload-ui {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  min-height: 7.5rem;
  padding: 1.25rem 1rem;
  border-radius: var(--radius-2xl);
  border: 1.5px dashed var(--cream-400);
  background: linear-gradient(180deg, var(--cream-100), var(--cream-200));
  text-align: center;
  transition: border-color 0.2s, background 0.2s, box-shadow 0.2s;
}

.file-upload:hover .file-upload-ui,
.file-upload:focus-within .file-upload-ui {
  border-color: var(--brand-500);
  box-shadow: 0 0 0 3px rgba(211, 47, 47, 0.08);
}

.file-upload.has-file .file-upload-ui {
  border-style: solid;
  border-color: var(--brand-200);
  background: var(--brand-50);
}

.file-upload-title {
  font-size: 0.85rem;
  font-weight: 800;
  color: var(--warmgray-400);
}

.file-upload-hint {
  font-size: 0.72rem;
  color: var(--warmgray-200);
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  padding: 0 0.5rem;
}



/* Related field + autocomplete */
.related-field {
  display: flex;
  align-items: stretch;
  gap: 0.5rem;
}

.related-field .ac-wrap {
  flex: 1;
}

.btn-related-add {
  width: 2.4rem;
  min-width: 2.4rem;
  border: 1px solid var(--cream-400);
  border-radius: var(--radius-xl);
  background: var(--brand-500);
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s;
}

.btn-related-add .icon-img {
  filter: brightness(0) invert(1);
}

.btn-related-add:hover {
  background: var(--brand-700);
}

.ac-wrap {
  position: relative;
  width: 100%;
}

.ac-native {
  position: absolute !important;
  opacity: 0 !important;
  pointer-events: none !important;
  width: 1px !important;
  height: 1px !important;
  inset: 0;
}

.ac-input {
  width: 100%;
}

.ac-list {
  display: none;
  position: absolute;
  top: calc(100% + 0.35rem);
  right: 0;
  left: 0;
  z-index: 1080;
  max-height: 15rem;
  overflow-y: auto;
  background: linear-gradient(180deg, #fffaf8 0%, var(--cream-100) 100%);
  border: 1px solid var(--brand-100);
  border-radius: var(--radius-xl);
  box-shadow: 0 16px 36px -18px rgba(183, 28, 28, 0.28), 0 4px 12px rgba(42, 31, 30, 0.08);
  padding: 0.4rem;
}

.ac-list.is-open {
  display: block;
  animation: acPop 0.16s ease-out;
}

@keyframes acPop {
  from { opacity: 0; transform: translateY(-4px); }
  to { opacity: 1; transform: translateY(0); }
}

.ac-option {
  width: 100%;
  border: 0;
  background: transparent;
  text-align: right;
  padding: 0.6rem 0.75rem;
  border-radius: var(--radius-lg);
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--warmgray-300);
  cursor: pointer;
  transition: background 0.12s, color 0.12s;
}

.ac-option + .ac-option {
  margin-top: 0.15rem;
}

.ac-option:hover {
  background: var(--brand-50);
  color: var(--brand-700);
}

.ac-option.is-selected {
  background: linear-gradient(90deg, var(--brand-50), transparent);
  color: var(--brand-700);
  box-shadow: inset 3px 0 0 var(--brand-500);
}

.ac-option.is-empty {
  color: var(--warmgray-100);
  font-weight: 500;
  font-style: italic;
}

.ac-empty {
  padding: 0.85rem;
  font-size: 0.75rem;
  color: var(--warmgray-200);
  text-align: center;
}

.ac-input {
  background-image: linear-gradient(45deg, transparent 50%, var(--brand-500) 50%), linear-gradient(135deg, var(--brand-500) 50%, transparent 50%);
  background-position: calc(0.75rem) calc(50% - 0.15rem), calc(1.1rem) calc(50% - 0.15rem);
  background-size: 0.35rem 0.35rem, 0.35rem 0.35rem;
  background-repeat: no-repeat;
  padding-left: 1.75rem;
  cursor: pointer;
}

.form-select-app {
  appearance: none;
  background-image: linear-gradient(45deg, transparent 50%, var(--brand-500) 50%), linear-gradient(135deg, var(--brand-500) 50%, transparent 50%);
  background-position: calc(0.75rem) calc(50% - 0.15rem), calc(1.1rem) calc(50% - 0.15rem);
  background-size: 0.35rem 0.35rem, 0.35rem 0.35rem;
  background-repeat: no-repeat;
  padding-left: 1.75rem;
}

.delivery-flash {
  margin-bottom: 0.85rem;
  padding: 0.7rem 0.9rem;
  border-radius: var(--radius-xl);
  font-size: 0.8rem;
  font-weight: 700;
}

.delivery-flash.is-success {
  background: #e8f5e9;
  color: #1b5e20;
  border: 1px solid #a5d6a7;
}

.delivery-flash.is-error {
  background: var(--brand-50);
  color: var(--brand-800);
  border: 1px solid var(--brand-200);
}

#quickAddCategoryModal {
  z-index: 1065;
}

body.modal-open .modal-backdrop ~ .modal-backdrop {
  z-index: 1060;
}

.filter-chip .ac-wrap {
  min-width: 10rem;
}

.filter-chip .ac-input {
  background: transparent;
  border: 0;
  padding: 0.15rem 0.25rem;
  min-width: 9rem;
  font-size: 0.75rem;
  font-weight: 700;
  box-shadow: none;
}
.filter-chip .ac-input:focus {
  box-shadow: none;
  border-color: transparent;
}
/* Food cards with optional image */
.food-card--media {
  overflow: hidden;
  padding: 0 !important;
  display: flex;
  flex-direction: column;
}
.food-card__media {
  height: 148px;
  background: linear-gradient(145deg, #fff5f5, #f3f0ec);
  overflow: hidden;
}
.food-card__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.food-card__media.is-empty,
.menu-card-img.is-empty {
  display: flex;
  align-items: center;
  justify-content: center;
}
.food-card__placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  color: var(--warmgray-200);
  opacity: 0.85;
  width: 100%;
  height: 100%;
  min-height: 148px;
}
.food-card__placeholder span {
  font-size: 0.78rem;
  font-weight: 700;
}
.food-card__body {
  flex: 1;
}

/* Past month rows locked */
.month-menu-table tr.is-locked {
  opacity: 0.55;
  background: rgba(0, 0, 0, 0.025);
}
.month-menu-table tr.is-locked .btn-soft.is-disabled,
.btn-soft.is-disabled {
  pointer-events: none;
  opacity: 0.55;
  cursor: not-allowed;
}
.month-menu-table tr.is-today {
  transition: background 0.35s ease, box-shadow 0.35s ease;
}
.month-menu-table tr.is-flash {
  animation: day-flash 1.8s cubic-bezier(0.22, 1, 0.36, 1);
}
@keyframes day-flash {
  0% {
    background: rgba(229, 57, 53, 0);
    box-shadow: inset 3px 0 0 transparent;
  }
  25% {
    background: rgba(229, 57, 53, 0.16);
    box-shadow: inset 3px 0 0 var(--brand-500, #e53935);
  }
  55% {
    background: rgba(229, 57, 53, 0.1);
    box-shadow: inset 3px 0 0 rgba(229, 57, 53, 0.55);
  }
  100% {
    background: rgba(229, 57, 53, 0.06);
    box-shadow: inset 3px 0 0 transparent;
  }
}
