@font-face {
  font-family: "Estedad";
  src: url("/fonts/estedad-arabic.woff2") format("woff2");
  font-display: swap;
  unicode-range: U+0600-06FF, U+0750-077F, U+08A0-08FF, U+FB50-FDFF, U+FE70-FEFF;
}
@font-face {
  font-family: "Estedad";
  src: url("/fonts/estedad-latin.woff2") format("woff2");
  font-display: swap;
  unicode-range: U+0000-024F;
}
:root {
  color-scheme: light;
  --green: #087554;
  --green-dark: #00523d;
  --green-bright: #22c58e;
  --mint: #e8f7f0;
  --yellow: #ffc34d;
  --cream: #fff6e6;
  --paper: #fffef9;
  --ink: #12382f;
  --muted: #72847e;
  --line: #e0ece6;
  --danger: #b14646;
  --shadow: 0 22px 60px rgba(0, 82, 61, 0.1);
}
* { box-sizing: border-box; }
html { min-height: 100%; background: var(--cream); scroll-behavior: smooth; }
body {
  min-height: 100vh;
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(circle at 8% 8%, rgba(255, 195, 77, 0.16), transparent 22rem),
    radial-gradient(circle at 96% 26%, rgba(34, 197, 142, 0.1), transparent 26rem),
    var(--cream);
  font-family: "Estedad", Tahoma, sans-serif;
  -webkit-font-smoothing: antialiased;
}
button, input { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
button:focus-visible, a:focus-visible, input:focus-visible { outline: 3px solid rgba(255, 195, 77, 0.7); outline-offset: 3px; }
[hidden] { display: none !important; }
a { color: inherit; }
.site-header {
  position: sticky;
  z-index: 30;
  top: 0;
  display: flex;
  min-height: 76px;
  align-items: center;
  justify-content: space-between;
  padding: 10px clamp(18px, 4vw, 58px);
  border-bottom: 1px solid rgba(0, 82, 61, 0.08);
  background: rgba(255, 250, 240, 0.9);
  backdrop-filter: blur(20px);
}
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--green-dark); text-decoration: none; }
.brand-mark { width: 46px; height: 46px; object-fit: contain; }
.brand strong, .brand small { display: block; }
.brand strong { font-size: 22px; font-weight: 850; letter-spacing: -0.04em; line-height: 1; }
.brand small { margin-top: 5px; color: var(--muted); font-size: 9px; }
.header-actions { display: flex; align-items: center; gap: 9px; }
.member-chip { overflow: hidden; max-width: 210px; padding: 8px 13px; border: 1px solid var(--line); border-radius: 999px; background: rgba(255, 255, 255, 0.74); text-overflow: ellipsis; white-space: nowrap; font-size: 11px; }
.text-button { padding: 8px 11px; border: 0; color: var(--green); background: transparent; cursor: pointer; font-weight: 700; }
main { width: min(980px, calc(100% - 32px)); margin: 0 auto; }
.center-card { display: grid; min-height: calc(100vh - 76px); place-content: center; justify-items: center; gap: 16px; color: var(--muted); }
.loader { width: 44px; height: 44px; border: 3px solid rgba(8, 117, 84, 0.15); border-top-color: var(--green); border-radius: 50%; animation: spin 0.8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.login-layout { display: grid; min-height: calc(100vh - 76px); align-items: center; grid-template-columns: minmax(0, 1.1fr) minmax(340px, 0.7fr); gap: clamp(42px, 8vw, 110px); padding: 58px 0 90px; }
.hero-brand { display: flex; align-items: center; justify-content: flex-end; gap: 18px; margin-bottom: 38px; direction: ltr; }
.hero-brand img { width: 108px; height: 108px; object-fit: contain; }
.hero-brand strong { color: var(--green-dark); font-size: clamp(50px, 7vw, 82px); font-weight: 850; letter-spacing: -0.06em; }
.eyebrow { margin: 0 0 8px; color: var(--green); font-size: 10px; font-weight: 800; }
.login-intro h1 { max-width: 640px; margin: 0; color: var(--green-dark); font-size: clamp(42px, 6vw, 72px); font-weight: 900; letter-spacing: -0.055em; line-height: 1.25; }
.login-description { max-width: 590px; margin: 24px 0; color: var(--muted); font-size: 15px; line-height: 2; }
.feature-row { display: flex; flex-wrap: wrap; gap: 8px; }
.feature-row span { padding: 9px 14px; border: 1px solid rgba(8, 117, 84, 0.13); border-radius: 999px; background: rgba(255, 255, 255, 0.58); color: var(--green); font-size: 10px; }
.login-card, .panel-card, .content-section { border: 1px solid rgba(8, 117, 84, 0.1); border-radius: 28px; background: rgba(255, 254, 249, 0.94); box-shadow: var(--shadow); }
.login-card { display: grid; gap: 19px; padding: clamp(26px, 4vw, 40px); }
.login-card h2, .section-heading h2, .panel-card h2 { margin: 0; font-size: 20px; }
.login-card p, .section-heading p, .panel-card p { margin: 6px 0 0; color: var(--muted); font-size: 11px; line-height: 1.8; }
label { display: grid; gap: 8px; color: #45645b; font-size: 11px; font-weight: 700; }
input { width: 100%; min-height: 51px; padding: 0 15px; border: 1px solid #d8e6e0; border-radius: 16px; color: var(--ink); background: white; transition: 0.2s ease; }
input:focus { border-color: var(--green); box-shadow: 0 0 0 4px rgba(8, 117, 84, 0.08); }
input:disabled { color: #8a9994; background: #f2f6f4; }
.primary-button { min-height: 51px; padding: 0 20px; border: 0; border-radius: 16px; color: white; background: linear-gradient(135deg, var(--green), var(--green-dark)); box-shadow: 0 13px 28px rgba(0, 82, 61, 0.18); cursor: pointer; font-weight: 800; }
.primary-button:hover { filter: brightness(1.06); }
.primary-button:disabled { cursor: wait; opacity: 0.65; }
.form-link { justify-self: center; }
.form-message { padding: 11px 13px; border-radius: 13px; color: var(--green) !important; background: var(--mint); }
.form-message.error { color: var(--danger) !important; background: #f9e7e4; }
.app-shell { width: min(100%, 860px); margin: 0 auto; padding: 34px 0 130px; }
.page-view { animation: reveal 0.25s ease; }
@keyframes reveal { from { opacity: 0; transform: translateY(7px); } }
.welcome-row, .page-heading, .section-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; }
.welcome-row { margin-bottom: 20px; }
.welcome-row h1, .page-heading h1 { margin: 0; color: var(--green-dark); font-size: clamp(27px, 4vw, 40px); letter-spacing: -0.035em; }
.referral-badge { max-width: 190px; overflow: hidden; padding: 8px 13px; border: 1px solid rgba(8, 117, 84, 0.12); border-radius: 999px; color: var(--green); background: rgba(255, 255, 255, 0.74); direction: ltr; text-overflow: ellipsis; white-space: nowrap; font-size: 10px; }
.wallet-card { position: relative; overflow: hidden; min-height: 260px; padding: clamp(24px, 5vw, 42px); border-radius: 31px; color: white; background: radial-gradient(circle at 10% 12%, rgba(255, 195, 77, 0.32), transparent 14rem), linear-gradient(140deg, #22c58e 0%, #087554 62%, #00523d 100%); box-shadow: 0 28px 65px rgba(0, 82, 61, 0.24); }
.wallet-card::before, .wallet-card::after { position: absolute; border: 1px solid rgba(255, 255, 255, 0.17); border-radius: 50%; content: ""; }
.wallet-card::before { width: 280px; height: 280px; left: -100px; bottom: -210px; }
.wallet-card::after { width: 180px; height: 180px; left: 34px; bottom: -145px; }
.wallet-topline { position: relative; z-index: 1; display: flex; align-items: center; justify-content: space-between; font-size: 12px; }
.live-dot { display: inline-flex; align-items: center; gap: 6px; color: #d8f6ec; }
.live-dot::before { width: 7px; height: 7px; border-radius: 50%; background: var(--yellow); content: ""; box-shadow: 0 0 0 4px rgba(255, 195, 77, 0.16); }
.wallet-balance { position: relative; z-index: 1; display: block; margin-top: 22px; font-size: clamp(48px, 8vw, 72px); letter-spacing: -0.045em; line-height: 1; }
.wallet-unit { position: relative; z-index: 1; display: block; margin-top: 10px; color: #d6f3e9; font-size: 12px; }
.wallet-actions { position: relative; z-index: 1; display: flex; flex-wrap: wrap; gap: 9px; margin-top: 27px; }
.wallet-actions button { display: inline-flex; min-height: 43px; align-items: center; gap: 7px; padding: 0 14px; border: 1px solid rgba(255, 255, 255, 0.22); border-radius: 14px; color: rgba(255, 255, 255, 0.82); background: rgba(255, 255, 255, 0.1); }
.wallet-actions small { color: #ffe09d; }
.wallet-action-icon { display: grid; width: 23px; height: 23px; place-items: center; border-radius: 50%; color: var(--green); background: white; font-size: 19px; line-height: 1; }
.quick-actions { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin: 18px 0; padding: 13px; border: 1px solid rgba(8, 117, 84, 0.09); border-radius: 25px; background: rgba(255, 254, 249, 0.86); box-shadow: 0 15px 45px rgba(0, 82, 61, 0.06); }
.quick-actions button { display: grid; min-width: 0; min-height: 132px; place-content: center; justify-items: center; gap: 5px; padding: 12px 8px; border: 0; border-radius: 18px; color: var(--ink); background: transparent; cursor: pointer; transition: 0.2s ease; }
.quick-actions button:hover { background: var(--mint); transform: translateY(-2px); }
.quick-actions strong { font-size: 11px; }
.quick-actions small { color: var(--muted); font-size: 8px; white-space: nowrap; }
.quick-icon { display: grid; width: 48px; height: 48px; place-items: center; margin-bottom: 4px; border-radius: 17px; color: var(--green); background: var(--mint); }
.quick-icon svg { width: 26px; height: 26px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.quick-actions button:nth-child(2) .quick-icon, .quick-actions button:nth-child(4) .quick-icon { background: #fff0ca; }
.featured-section { margin-top: 18px; }
.content-section { margin-top: 18px; padding: clamp(20px, 4vw, 30px); box-shadow: 0 16px 50px rgba(0, 82, 61, 0.06); }
.section-heading { margin-bottom: 18px; }
.section-heading.compact { align-items: flex-start; margin-bottom: 20px; }
.featured-heading > span { color: var(--muted); font-size: 9px; }
.featured-stores { display: grid; gap: 18px; }
.featured-store { padding-top: 16px; border-top: 1px solid #edf3ef; }
.featured-store:first-child { padding-top: 0; border-top: 0; }
.featured-store-head { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-bottom: 12px; }
.featured-store-head h3 { margin: 0; font-size: 15px; }
.featured-store-head a { color: var(--green); font-size: 9px; font-weight: 850; }
.product-strip { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 9px; }
.product-card { display: grid; min-width: 0; grid-template-columns: auto minmax(0, 1fr); align-items: center; gap: 9px; padding: 13px; border: 1px solid var(--line); border-radius: 17px; background: #fffefa; }
.product-rank { display: grid; width: 34px; height: 34px; place-items: center; border-radius: 12px; color: var(--green-dark); background: #fff0c8; font-size: 10px; font-weight: 900; }
.product-copy { min-width: 0; }
.product-copy strong, .product-copy small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.product-copy strong { font-size: 10px; }
.product-copy small { margin-top: 4px; color: var(--muted); font-size: 8px; }
.featured-empty { padding: 15px; border: 1px dashed #cbded5; border-radius: 16px; color: var(--muted); background: #fffefa; font-size: 9px; text-align: center; }
.access-section { margin-top: 18px; }
.application-access { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.application-card { display: grid; min-width: 0; min-height: 100px; align-items: center; grid-template-columns: auto minmax(0, 1fr) auto; gap: 12px; padding: 14px; border: 1px solid var(--line); border-radius: 19px; color: var(--ink); background: #fffefa; text-decoration: none; transition: 0.18s ease; }
.application-card:hover { transform: translateY(-2px); border-color: #bcd9cc; box-shadow: 0 14px 34px rgba(0, 82, 61, 0.08); }
.application-card.staff { border-color: #efd498; background: #fff9ec; }
.application-mark { display: grid; width: 45px; height: 45px; place-items: center; border-radius: 15px; color: white; background: linear-gradient(135deg, var(--green-bright), var(--green)); font-size: 15px; font-weight: 900; }
.application-card.staff .application-mark { background: linear-gradient(135deg, var(--yellow), #b87913); }
.application-copy { min-width: 0; }
.application-copy strong, .application-copy small, .application-copy em { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.application-copy strong { font-size: 11px; }
.application-copy small { margin-top: 4px; color: var(--muted); font-size: 9px; }
.application-copy em { margin-top: 5px; color: #789088; font-size: 8px; font-style: normal; }
.application-card > b { color: var(--green); font-size: 9px; white-space: nowrap; }
.application-card.staff > b { color: #8a5a12; }
.holding-workspace-entry { display: grid; min-height: 118px; align-items: center; grid-template-columns: auto minmax(0, 1fr) auto; gap: 15px; margin-top: 14px; padding: 18px; border: 1px solid #1b4f41; border-radius: 21px; color: white; background: linear-gradient(135deg, #102d26, #21654f); box-shadow: 0 18px 42px rgba(8, 70, 52, 0.16); text-decoration: none; transition: 0.18s ease; }
.holding-workspace-entry:hover { transform: translateY(-2px); box-shadow: 0 24px 50px rgba(8, 70, 52, 0.22); }
.holding-workspace-entry > span:not(.holding-workspace-mark) { display: grid; min-width: 0; gap: 4px; }
.holding-workspace-entry small { color: #acd1c5; font-size: 8px; }
.holding-workspace-entry strong { font-size: 13px; }
.holding-workspace-entry em { overflow: hidden; color: #d8e8e2; font-size: 8px; font-style: normal; text-overflow: ellipsis; white-space: nowrap; }
.holding-workspace-entry > b { color: white; font-size: 9px; white-space: nowrap; }
.holding-workspace-mark { display: grid; width: 50px; height: 50px; place-items: center; border-radius: 16px; color: #173d32; background: #f2c860; font-size: 17px; font-weight: 900; }
.metric-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin: 18px 0; }
.metric-grid article { padding: 18px; border: 1px solid var(--line); border-radius: 19px; background: rgba(255, 254, 249, 0.8); }
.metric-grid span { display: block; color: var(--muted); font-size: 9px; }
.metric-grid strong { display: block; margin-top: 7px; color: var(--green); font-size: clamp(17px, 3vw, 25px); }
.timeline, .purchase-list, .cart-list { display: grid; gap: 8px; }
.timeline-item, .purchase-item, .cart-item { display: grid; align-items: center; grid-template-columns: auto minmax(0, 1fr) auto; gap: 12px; padding: 14px 0; border-bottom: 1px solid #edf3ef; }
.timeline-item:last-child, .purchase-item:last-child { border-bottom: 0; }
.activity-icon { display: grid; width: 40px; height: 40px; place-items: center; border-radius: 14px; color: var(--green); background: var(--mint); font-weight: 900; }
.activity-icon.negative { color: var(--danger); background: #f9e8e5; }
.item-copy { min-width: 0; }
.item-copy strong, .item-copy small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.item-copy strong { font-size: 11px; }
.item-copy small { margin-top: 4px; color: var(--muted); font-size: 9px; }
.item-amount { direction: ltr; color: var(--green); font-size: 11px; font-weight: 850; }
.item-amount.negative { color: var(--danger); }
.page-heading { display: block; margin-bottom: 24px; }
.page-heading p:last-child { max-width: 650px; color: var(--muted); line-height: 1.9; }
.store-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 13px; }
.store-card { position: relative; display: block; min-height: 195px; padding: 21px; border: 1px solid var(--line); border-radius: 23px; color: var(--ink); background: var(--paper); box-shadow: 0 16px 42px rgba(0, 82, 61, 0.07); text-decoration: none; transition: 0.18s ease; }
.store-card:hover { transform: translateY(-3px); border-color: #bcd9cc; box-shadow: 0 22px 50px rgba(0, 82, 61, 0.11); }
.store-arrow { position: absolute; left: 20px; top: 22px; color: var(--green); font-size: 19px; }
.store-mark { display: grid; width: 52px; height: 52px; place-items: center; border-radius: 18px; color: white; background: linear-gradient(135deg, var(--green-bright), var(--green)); font-size: 18px; font-weight: 900; }
.store-card h2 { margin: 24px 0 5px; font-size: 17px; }
.store-card p { margin: 0; color: var(--muted); font-size: 9px; }
.store-status { display: inline-block; margin-top: 14px; padding: 5px 9px; border-radius: 999px; color: var(--green); background: var(--mint); font-size: 8px; }
.empty-state { display: grid; min-height: 230px; place-content: center; justify-items: center; padding: 34px; border: 1px dashed #cbded5; border-radius: 24px; color: var(--muted); background: rgba(255, 254, 249, 0.58); text-align: center; }
.empty-state strong { margin-bottom: 7px; color: var(--ink); font-size: 16px; }
.settings-grid { display: grid; grid-template-columns: minmax(280px, 0.72fr) minmax(0, 1.28fr); gap: 15px; }
.panel-card { padding: clamp(21px, 4vw, 31px); box-shadow: 0 15px 45px rgba(0, 82, 61, 0.06); }
#profileForm { display: grid; align-content: start; gap: 16px; }
.referral-metrics { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; margin-bottom: 18px; }
.referral-metrics span { padding: 14px; border-radius: 15px; color: var(--muted); background: var(--mint); font-size: 9px; }
.referral-metrics strong { display: block; color: var(--green); font-size: 23px; }
.referral-tree { display: grid; max-height: 520px; overflow: auto; gap: 7px; padding-left: 4px; }
.referral-person { display: flex; min-height: 47px; align-items: center; gap: 10px; padding: 8px 11px; border: 1px solid #e7efeb; border-radius: 14px; background: #fffefa; }
.referral-person[data-depth="1"] { border-color: #c7dfd4; background: var(--mint); }
.person-avatar { display: grid; flex: 0 0 auto; width: 31px; height: 31px; place-items: center; border-radius: 11px; color: white; background: var(--green); font-size: 10px; }
.person-copy { min-width: 0; }
.person-copy strong, .person-copy small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.person-copy strong { font-size: 10px; }
.person-copy small { color: var(--muted); direction: ltr; text-align: right; font-size: 8px; }
.management-link { display: flex; justify-content: space-between; gap: 18px; margin-top: 16px; padding: 16px 19px; border-radius: 17px; color: var(--muted); background: rgba(255, 254, 249, 0.7); font-size: 10px; }
.management-link a { color: var(--green); font-weight: 800; }
.bottom-nav { position: fixed; z-index: 40; right: 50%; bottom: max(13px, env(safe-area-inset-bottom)); display: grid; width: min(560px, calc(100% - 24px)); padding: 7px; transform: translateX(50%); grid-template-columns: repeat(4, 1fr); gap: 3px; border: 1px solid rgba(8, 117, 84, 0.1); border-radius: 24px; background: rgba(255, 254, 249, 0.94); box-shadow: 0 20px 55px rgba(0, 82, 61, 0.17); backdrop-filter: blur(18px); }
.bottom-nav button { display: grid; min-height: 58px; place-content: center; justify-items: center; gap: 3px; border: 0; border-radius: 17px; color: #8ba098; background: transparent; cursor: pointer; font-size: 8px; }
.bottom-nav button span { display: grid; width: 25px; height: 25px; place-items: center; }
.bottom-nav svg { width: 23px; height: 23px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.bottom-nav button.active { color: var(--green); background: var(--mint); font-weight: 850; }
.bottom-nav button.active svg { fill: rgba(8, 117, 84, 0.08); }
.toast { position: fixed; z-index: 60; right: 50%; bottom: 100px; max-width: calc(100% - 36px); padding: 12px 16px; transform: translateX(50%); border-radius: 14px; color: white; background: var(--green-dark); box-shadow: var(--shadow); font-size: 10px; }
.toast.error { background: var(--danger); }
@media (max-width: 820px) {
  .login-layout { grid-template-columns: 1fr; gap: 38px; padding-top: 36px; }
  .hero-brand { justify-content: center; margin-bottom: 28px; }
  .login-intro { text-align: center; }
  .login-description { margin-right: auto; margin-left: auto; }
  .feature-row { justify-content: center; }
  .settings-grid { grid-template-columns: 1fr; }
  .store-grid { grid-template-columns: 1fr 1fr; }
  .product-strip { grid-template-columns: 1fr 1fr; }
  .holding-workspace-entry { grid-template-columns: auto minmax(0, 1fr); }
  .holding-workspace-entry > b { grid-column: 2; }
  .application-access { grid-template-columns: 1fr; }
}
@media (max-width: 580px) {
  .site-header { min-height: 66px; padding: 8px 13px; }
  .brand { gap: 7px; }
  .brand-mark { width: 39px; height: 39px; }
  .brand strong { font-size: 18px; }
  .brand small { display: none; }
  .member-chip { display: none !important; }
  main { width: min(100% - 22px, 980px); }
  .login-layout { min-height: calc(100vh - 66px); padding: 28px 0 85px; }
  .hero-brand img { width: 82px; height: 82px; }
  .hero-brand strong { font-size: 50px; }
  .login-intro h1 { font-size: clamp(37px, 12vw, 54px); }
  .login-card { border-radius: 23px; }
  .app-shell { padding-top: 24px; }
  .welcome-row { align-items: flex-start; }
  .welcome-row h1 { font-size: 25px; }
  .referral-badge { max-width: 118px; }
  .wallet-card { min-height: 244px; padding: 22px; border-radius: 26px; }
  .wallet-balance { font-size: 46px; }
  .wallet-actions { display: grid; grid-template-columns: 1fr 1fr; }
  .wallet-actions button { justify-content: center; padding: 0 7px; font-size: 8px; }
  .wallet-action-icon { width: 20px; height: 20px; }
  .quick-actions { gap: 4px; padding: 8px 4px; border-radius: 22px; }
  .quick-actions button { min-height: 116px; padding: 9px 2px; }
  .quick-actions strong { font-size: 9px; }
  .quick-actions small { display: none; }
  .quick-icon { width: 43px; height: 43px; border-radius: 15px; }
  .metric-grid { gap: 7px; }
  .metric-grid article { padding: 13px 9px; border-radius: 16px; text-align: center; }
  .metric-grid span { min-height: 28px; }
  .metric-grid strong { font-size: 14px; }
  .content-section { padding: 18px; border-radius: 22px; }
  .featured-heading { align-items: flex-start; flex-direction: column; }
  .product-strip { grid-template-columns: 1fr; }
  .application-card { grid-template-columns: auto minmax(0, 1fr); }
  .application-card > b { grid-column: 2; }
  .timeline-item, .purchase-item { gap: 8px; }
  .activity-icon { width: 35px; height: 35px; border-radius: 12px; }
  .item-amount { font-size: 9px; }
  .store-grid { grid-template-columns: 1fr; }
  .store-card { min-height: 170px; }
  .management-link { display: grid; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: 0.01ms !important; }
}
