:root {
  --bg: #f6f8fb;
  --surface: #ffffff;
  --ink: #05284a;
  --muted: #64788c;
  --line: #dce7ef;
  --brand: #078fd3;
  --brand-dark: #05284a;
  --brand-soft: #e7f5fc;
  --accent: #a20045;
  --accent-soft: #f8e8f0;
  --danger: #d94b4b;
  --shadow: 0 18px 48px rgba(5, 40, 74, .13);
  --radius: 18px;
  font-family: "Tajawal", "IBM Plex Sans Arabic", "Segoe UI", Arial, sans-serif;
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  line-height: 1.7;
}

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

button,
input,
select,
textarea {
  font: inherit;
}

.wrap {
  width: min(1120px, calc(100% - 36px));
  margin-inline: auto;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(245, 247, 248, .92);
  border-bottom: 1px solid rgba(221, 230, 235, .9);
  backdrop-filter: blur(18px);
}

.nav {
  min-height: 74px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 900;
  font-size: 1.25rem;
}

.logo-img {
  display: block;
  width: 190px;
  height: 62px;
  object-fit: contain;
  object-position: center;
}

.topbar .logo-img {
  width: 168px;
  height: 56px;
}

.sidebar .logo,
.auth-side .logo,
.footer .logo {
  width: max-content;
  padding: 4px 10px;
  border-radius: 16px;
  background: #fff;
}

.sidebar .logo-img,
.auth-side .logo-img,
.footer .logo-img {
  width: 178px;
  height: 62px;
}

.logo-mark {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--brand), var(--accent));
  color: #fff;
  box-shadow: 0 12px 24px rgba(10, 60, 95, .24);
}

.links {
  display: flex;
  align-items: center;
  gap: 22px;
  color: var(--muted);
  font-weight: 800;
}

.links a:hover,
.links a.active {
  color: var(--brand-dark);
}

.lang-toggle {
  min-width: 92px;
}

.auth-card > .lang-toggle {
  justify-self: end;
  margin-bottom: 4px;
}

.lang-en {
  font-family: "Inter", "Segoe UI", Arial, sans-serif;
}

.lang-en .links,
.lang-en .nav-actions,
.lang-en .actions,
.lang-en .subscription-actions,
.lang-en .trust,
.lang-en .wallet-row,
.lang-en .features li,
.lang-en .app-shell,
.lang-en .dashboard,
.lang-en .sidebar,
.lang-en .side-links,
.lang-en .sidebar-actions,
.lang-en table,
.lang-en .field,
.lang-en input,
.lang-en textarea,
.lang-en select {
  direction: ltr;
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.btn {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 0 20px;
  border: 0;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--brand), var(--brand-dark));
  color: #fff;
  font-weight: 900;
  cursor: pointer;
  box-shadow: 0 14px 28px rgba(10, 60, 95, .24);
}

.btn:hover {
  background: linear-gradient(135deg, var(--brand-dark), #031b2c);
}

.btn.secondary {
  background: #fff;
  color: var(--brand-dark);
  box-shadow: inset 0 0 0 1px var(--line);
}

.btn.dark {
  background: var(--ink);
}

.hero {
  position: relative;
  overflow: hidden;
  padding: 82px 0 74px;
  background:
    linear-gradient(135deg, rgba(7, 143, 211, .1), rgba(162, 0, 69, .1)),
    var(--bg);
}

.hero:before {
  content: "";
  position: absolute;
  inset: -170px -15% auto auto;
  width: 560px;
  height: 560px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(162, 0, 69, .2), transparent 66%);
  pointer-events: none;
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(330px, .95fr);
  align-items: center;
  gap: 52px;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 16px;
  padding: 8px 14px;
  border-radius: 999px;
  background: var(--brand-soft);
  color: var(--brand-dark);
  font-size: .9rem;
  font-weight: 900;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 18px;
  font-size: clamp(2.35rem, 5vw, 4.6rem);
  line-height: 1.08;
  letter-spacing: 0;
}

.lead {
  max-width: 660px;
  color: var(--muted);
  font-size: 1.15rem;
}

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

.trust {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 28px;
}

.trust span {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 42px;
  padding: 7px 13px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, .86);
  color: var(--brand-dark);
  font-weight: 900;
  box-shadow: 0 10px 24px rgba(10, 60, 95, .08);
}

.trust .wallet-pill {
  border-color: rgba(10, 60, 95, .16);
  background: #fff;
  color: var(--brand-dark);
}

.wallet-pill img {
  width: 28px;
  height: 28px;
  object-fit: contain;
}

.trust-badge b {
  width: 26px;
  height: 26px;
  display: inline-grid;
  flex: 0 0 26px;
  place-items: center;
  border-radius: 9px;
  background: linear-gradient(135deg, var(--brand), var(--brand-dark));
  color: #fff;
  font-size: .9rem;
  font-style: normal;
  line-height: 1;
  box-shadow: 0 8px 18px rgba(10, 60, 95, .22);
}

.trust-badge.google-wallet b {
  background: conic-gradient(from 45deg, #4285f4, #34a853, #fbbc05, #ea4335, #4285f4);
}

.qr-mark {
  position: relative;
  background: #fff !important;
  box-shadow: inset 0 0 0 2px var(--brand-dark), 0 8px 18px rgba(10, 60, 95, .12) !important;
}

.qr-mark:before,
.qr-mark:after {
  content: "";
  position: absolute;
  inset: 6px;
  background:
    linear-gradient(var(--brand-dark), var(--brand-dark)) 0 0 / 6px 6px no-repeat,
    linear-gradient(var(--brand-dark), var(--brand-dark)) 100% 0 / 6px 6px no-repeat,
    linear-gradient(var(--brand-dark), var(--brand-dark)) 0 100% / 6px 6px no-repeat,
    linear-gradient(var(--accent), var(--accent)) 100% 100% / 5px 5px no-repeat;
}

.chart-mark {
  position: relative;
}

.chart-mark:before {
  content: "";
  position: absolute;
  bottom: 6px;
  right: 6px;
  width: 4px;
  height: 8px;
  border-radius: 3px;
  background: #fff;
  box-shadow: -7px -4px 0 #fff, -14px 3px 0 #fff;
}

.phone-scene {
  position: relative;
  min-height: 520px;
}

.pass {
  position: absolute;
  top: 28px;
  right: 54px;
  width: 315px;
  min-height: 455px;
  padding: 18px;
  border-radius: 34px;
  background: var(--brand-dark);
  color: #fff;
  box-shadow: var(--shadow);
  transform: rotate(-3deg);
}

.pass-inner {
  min-height: 420px;
  padding: 24px;
  border-radius: 26px;
  background: linear-gradient(160deg, var(--accent), #7a0b44 42%, var(--brand) 74%, var(--brand-dark));
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.pass-top {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  font-weight: 900;
}

.pass h2 {
  margin: 34px 0 18px;
  font-size: 1.85rem;
  line-height: 1.25;
}

.stamps {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 9px;
}

.stamp {
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  border-radius: 50%;
  border: 1px dashed rgba(255, 255, 255, .54);
  background: rgba(255, 255, 255, .15);
  font-weight: 900;
}

.stamp.done {
  background: #fff;
  color: var(--brand-dark);
  border-style: solid;
}

.qr {
  align-self: center;
  width: 110px;
  height: 110px;
  border: 10px solid #fff;
  border-radius: 18px;
  background:
    linear-gradient(90deg, #111 10px, transparent 10px 18px, #111 18px 28px, transparent 28px),
    linear-gradient(#111 10px, transparent 10px 18px, #111 18px 28px, transparent 28px),
    #fff;
  background-size: 36px 36px;
}

.float-card {
  position: absolute;
  left: 0;
  bottom: 60px;
  width: 220px;
  padding: 18px;
  border-radius: var(--radius);
  background: #fff;
  box-shadow: var(--shadow);
}

.float-card strong {
  display: block;
  color: var(--brand-dark);
  font-size: 2rem;
  line-height: 1;
}

section {
  padding: 74px 0;
}

.section-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 28px;
  margin-bottom: 30px;
}

.section-head h2 {
  margin-bottom: 8px;
  font-size: clamp(1.9rem, 3vw, 3rem);
  line-height: 1.2;
}

.section-head p {
  max-width: 620px;
  margin-bottom: 0;
  color: var(--muted);
}

.grid {
  display: grid;
  gap: 18px;
}

.grid.five {
  grid-template-columns: repeat(5, 1fr);
}

.grid.three {
  grid-template-columns: repeat(3, 1fr);
}

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

.card {
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  box-shadow: 0 12px 30px rgba(10, 60, 95, .06);
}

.service-card i,
.feature-card i {
  display: block;
  margin-bottom: 12px;
  font-size: 1.65rem;
  font-style: normal;
}

.service-card {
  min-height: 128px;
  font-weight: 900;
}

.feature-card p,
.card p {
  color: var(--muted);
}

.dark-band {
  background:
    linear-gradient(135deg, rgba(5, 40, 74, .97), rgba(162, 0, 69, .86)),
    var(--brand-dark);
  color: #fff;
}

.dark-band .eyebrow {
  background: rgba(255, 255, 255, .1);
  color: #f3d9c3;
}

.dark-band p {
  color: rgba(255, 255, 255, .72);
}

.wallet-list {
  display: grid;
  gap: 14px;
}

.wallet-badge {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 18px 20px;
  border: 1px solid rgba(255, 255, 255, .16);
  border-radius: 20px;
  background: rgba(255, 255, 255, .1);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .12);
}

.wallet-badge img {
  width: 58px;
  height: 58px;
  object-fit: contain;
  border-radius: 14px;
  box-shadow: 0 12px 24px rgba(0, 0, 0, .18);
}

.wallet-badge strong,
.wallet-badge span {
  display: block;
}

.wallet-badge strong {
  font-size: 1.05rem;
  font-weight: 900;
}

.wallet-badge span {
  margin-top: 4px;
  color: rgba(255, 255, 255, .72);
  font-weight: 700;
}

.wallet-row {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 18px 20px;
  border: 1px solid rgba(255, 255, 255, .12);
  border-radius: 18px;
  background: rgba(255, 255, 255, .06);
}

.wallet-row strong {
  flex: 1;
}

.wallet-row span {
  color: #f3d9c3;
  font-weight: 900;
}

.wallet-row-icon {
  position: relative;
  width: 42px;
  height: 42px;
  display: inline-grid;
  flex: 0 0 42px;
  place-items: center;
  border-radius: 14px;
  background: rgba(255, 255, 255, .14);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .2);
}

.wallet-row-icon:before,
.wallet-row-icon:after {
  content: "";
  position: absolute;
}

.card-icon:before {
  width: 22px;
  height: 15px;
  border-radius: 5px;
  border: 2px solid #fff;
}

.card-icon:after {
  width: 10px;
  height: 2px;
  right: 12px;
  bottom: 14px;
  border-radius: 2px;
  background: #f3d9c3;
}

.refresh-icon:before {
  width: 21px;
  height: 21px;
  border: 3px solid #fff;
  border-left-color: transparent;
  border-radius: 50%;
}

.refresh-icon:after {
  left: 10px;
  top: 11px;
  border-top: 6px solid transparent;
  border-bottom: 6px solid transparent;
  border-right: 8px solid #fff;
}

.bell-icon:before {
  width: 19px;
  height: 17px;
  top: 10px;
  border-radius: 12px 12px 6px 6px;
  border: 2px solid #fff;
  border-bottom-width: 3px;
}

.bell-icon:after {
  bottom: 9px;
  width: 8px;
  height: 4px;
  border-radius: 0 0 8px 8px;
  background: #f3d9c3;
}

.report-icon:before {
  width: 4px;
  height: 21px;
  bottom: 10px;
  right: 12px;
  border-radius: 5px;
  background: #fff;
  box-shadow: -8px 6px 0 #fff, -16px -3px 0 #f3d9c3;
}

.proximity-feature {
  background:
    linear-gradient(180deg, rgba(10, 60, 95, .06), rgba(255, 255, 255, 0));
}

.proximity-grid {
  display: grid;
  grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr);
  align-items: center;
  gap: 34px;
}

.proximity-copy h2 {
  font-size: clamp(1.9rem, 3vw, 3rem);
  line-height: 1.2;
}

.proximity-copy p {
  color: var(--muted);
  font-size: 1.05rem;
}

.proximity-media {
  margin: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  box-shadow: var(--shadow);
}

.proximity-media img {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
}

.zapier-feature {
  background:
    radial-gradient(circle at top left, rgba(182, 147, 117, .16), transparent 34%),
    #fff;
}

.zapier-grid {
  display: grid;
  grid-template-columns: minmax(260px, .8fr) minmax(0, 1.2fr);
  align-items: center;
  gap: 34px;
}

.zapier-card {
  min-height: 280px;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 10px;
  padding: 28px;
  border-radius: var(--radius);
  background:
    linear-gradient(135deg, rgba(10, 60, 95, .97), rgba(160, 0, 69, .86)),
    var(--brand-dark);
  color: #fff;
  text-align: center;
  box-shadow: var(--shadow);
}

.zapier-card span {
  padding: 8px 14px;
  border-radius: 999px;
  background: rgba(255, 255, 255, .12);
  color: #f3d9c3;
  font-weight: 900;
}

.zapier-card strong {
  font-size: clamp(2.4rem, 6vw, 4.6rem);
  line-height: 1;
}

.zapier-card small {
  color: rgba(255, 255, 255, .75);
  font-weight: 850;
}

.referral-feature {
  background:
    radial-gradient(circle at top left, rgba(182, 147, 117, .2), transparent 34%),
    linear-gradient(135deg, rgba(10, 60, 95, .07), rgba(7, 143, 211, .08)),
    #fff;
}

.referral-grid {
  display: grid;
  grid-template-columns: .9fr 1.1fr;
  gap: 34px;
  align-items: center;
}

.referral-visual {
  position: relative;
  min-height: 360px;
  padding: 28px;
  border-radius: 24px;
  background: #0a3c5f;
  box-shadow: var(--shadow);
  overflow: hidden;
}

.referral-visual:before {
  content: "";
  position: absolute;
  inset: 18px;
  border: 1px solid rgba(255, 255, 255, .14);
  border-radius: 20px;
}

.referral-node,
.referral-check,
.referral-reward {
  position: absolute;
  z-index: 1;
  display: grid;
  place-items: center;
  text-align: center;
  font-weight: 900;
}

.referral-node {
  width: 128px;
  height: 128px;
  border-radius: 50%;
  color: #fff;
  background: rgba(255, 255, 255, .12);
  border: 2px solid rgba(255, 255, 255, .28);
}

.referral-node.main {
  top: 54px;
  right: 42px;
}

.referral-node.friend {
  top: 54px;
  left: 42px;
}

.referral-line {
  position: absolute;
  z-index: 0;
  top: 116px;
  left: 158px;
  right: 158px;
  height: 4px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--accent), #fff, var(--brand));
}

.referral-check {
  right: 50%;
  bottom: 96px;
  width: 126px;
  height: 48px;
  transform: translateX(50%);
  border-radius: 999px;
  color: #2d250f;
  background: var(--accent);
}

.referral-reward {
  left: 50%;
  bottom: 32px;
  width: min(250px, calc(100% - 64px));
  min-height: 54px;
  transform: translateX(-50%);
  border-radius: 16px;
  color: #0a3c5f;
  background: #fff;
  box-shadow: 0 18px 30px rgba(0, 0, 0, .16);
}

.partners-section {
  background: #fff;
}

.partners-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}

.partners-grid.compact {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.partner-logo {
  display: grid;
  place-items: center;
  gap: 10px;
  min-height: 132px;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  color: var(--brand-dark);
  font-weight: 900;
  text-align: center;
  box-shadow: 0 12px 30px rgba(10, 60, 95, .05);
}

.partner-logo img {
  display: block;
  width: min(150px, 100%);
  height: 62px;
  object-fit: contain;
}

.partners-grid.compact .partner-logo {
  min-height: 94px;
  padding: 12px;
  box-shadow: none;
}

.partners-grid.compact .partner-logo img {
  height: 42px;
}

.admin-partners-preview {
  display: grid;
  gap: 12px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fbfd;
}

.admin-partners-preview.is-hidden-preview {
  opacity: .72;
}

.card-types-section {
  background: linear-gradient(180deg, #fff 0%, #f7fbfd 100%);
}

.card-types-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 14px;
}

.card-type-card {
  position: relative;
  min-height: 230px;
  padding: 22px;
  overflow: hidden;
}

.card-type-card:after {
  content: "";
  position: absolute;
  inset-inline-start: 20px;
  bottom: 18px;
  width: 44px;
  height: 4px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--accent), var(--brand-sky));
}

.card-type-card span {
  display: inline-grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: rgba(10, 60, 95, .08);
  color: var(--brand);
  font-weight: 900;
}

.card-type-card h3 {
  margin: 18px 0 10px;
}

.card-type-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.9;
  font-size: .95rem;
}

.tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 20px;
}

.tab {
  padding: 10px 18px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  color: var(--muted);
  font-weight: 900;
  cursor: pointer;
}

.tab.active {
  background: var(--brand);
  border-color: var(--brand);
  color: #fff;
}

.program-panel {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

.program-visual {
  display: grid;
  place-items: center;
  min-height: 260px;
  background:
    linear-gradient(135deg, rgba(7, 143, 211, .13), rgba(162, 0, 69, .12) 52%, transparent),
    #fff;
}

.mini-pass {
  width: min(310px, 100%);
  padding: 22px;
  border-radius: 24px;
  background: linear-gradient(135deg, var(--accent), var(--brand));
  color: #fff;
  box-shadow: var(--shadow);
}

.mini-pass .row {
  display: flex;
  gap: 9px;
  margin-top: 20px;
}

.mini-pass b {
  flex: 1;
  height: 46px;
  display: grid;
  place-items: center;
  border-radius: 13px;
  background: rgba(255, 255, 255, .18);
}

.pricing {
  background: #edf7f2;
}

.billing {
  display: inline-flex;
  gap: 5px;
  padding: 5px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
}

.billing button {
  min-width: 92px;
  padding: 9px 16px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  font-weight: 900;
  cursor: pointer;
}

.billing button.active {
  background: var(--ink);
  color: #fff;
}

.price-card {
  position: relative;
}

.price-card.featured {
  border-color: var(--brand);
  transform: translateY(-10px);
  box-shadow: var(--shadow);
}

.badge {
  display: inline-flex;
  padding: 7px 12px;
  border-radius: 999px;
  background: var(--accent);
  color: #2d250f;
  font-size: .82rem;
  font-weight: 900;
}

.price-card .badge {
  color: #fff;
}

.price {
  margin: 18px 0 6px;
  font-size: 2.7rem;
  line-height: 1;
  font-weight: 900;
}

.price small {
  color: var(--muted);
  font-size: .95rem;
}

.features {
  padding: 0;
  margin: 22px 0;
  list-style: none;
}

.features li {
  display: flex;
  gap: 9px;
  padding: 8px 0;
  border-bottom: 1px solid #eef4f1;
}

.features li:before {
  content: "✓";
  color: var(--brand);
  font-weight: 900;
}

.page-hero {
  padding: 70px 0 44px;
  background:
    linear-gradient(135deg, rgba(8, 167, 122, .12), transparent 45%),
    #fff;
  border-bottom: 1px solid var(--line);
}

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

.field {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-weight: 800;
}

.field input,
.field select,
.field textarea {
  width: 100%;
  min-height: 48px;
  padding: 10px 14px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: #fff;
  color: var(--ink);
}

.field textarea {
  min-height: 130px;
  resize: vertical;
}

.auth-layout {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1fr 1fr;
  background: #fff;
}

.auth-side {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 56px;
  background:
    linear-gradient(145deg, rgba(5, 40, 74, .96), rgba(162, 0, 69, .84)),
    var(--brand-dark);
  color: #fff;
}

.auth-side p {
  color: rgba(255, 255, 255, .78);
}

.auth-form {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 36px;
}

.auth-card {
  width: min(430px, 100%);
}

.join-page .auth-form,
.staff-page .auth-form {
  flex-direction: column;
  gap: 16px;
}

.join-page .join-help,
.staff-page .join-help {
  width: min(430px, 100%);
}

.app-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 270px minmax(0, 1fr);
  background: #f5f7f8;
}

.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  display: flex;
  flex-direction: column;
  padding: 22px;
  background:
    linear-gradient(180deg, var(--brand-dark), #031b2c),
    var(--brand-dark);
  color: #fff;
}

.side-links {
  display: grid;
  gap: 8px;
  margin-top: 34px;
  padding-bottom: 12px;
  overflow-y: auto;
  scrollbar-width: thin;
}

.side-links a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  border-radius: 14px;
  color: rgba(255, 255, 255, .74);
  font-weight: 850;
}

.side-links a.active,
.side-links a:hover {
  background: rgba(255, 255, 255, .1);
  color: #fff;
}

.role-card {
  margin: 18px 0;
  padding: 14px;
  border: 1px solid rgba(255, 255, 255, .14);
  border-radius: 14px;
  background: rgba(255, 255, 255, .08);
  color: #fff;
}

.role-card span {
  display: block;
  margin-bottom: 4px;
  color: rgba(255, 255, 255, .66);
  font-size: .82rem;
  font-weight: 850;
}

.role-card strong {
  display: block;
  line-height: 1.35;
}

.sidebar-actions {
  display: grid;
  gap: 10px;
  margin-top: auto;
  padding-top: 16px;
  border-top: 1px solid rgba(255, 255, 255, .12);
  background: linear-gradient(180deg, rgba(3, 27, 44, 0), #031b2c 18%);
}

.sidebar-actions .btn {
  width: 100%;
}

.logout-btn {
  width: 100%;
  background: rgba(162, 0, 69, .92);
}

.logout-btn:hover {
  background: #7d0035;
}

.btn.danger {
  background: #a00045;
  color: #fff;
  border-color: #a00045;
}

.btn.danger:hover {
  background: #7d0035;
  border-color: #7d0035;
}

.dashboard {
  min-width: 0;
  padding: 24px;
}

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

.dash-top h1 {
  margin: 0;
  font-size: clamp(1.8rem, 3vw, 2.6rem);
}

.dash-section {
  display: none;
}

.dash-section.active {
  display: block;
}

.merchant-dashboard .dash-top {
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background:
    linear-gradient(135deg, rgba(10, 60, 95, .08), rgba(182, 147, 117, .14)),
    #fff;
}

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

.stat-grid.admin-stats {
  grid-template-columns: repeat(3, 1fr);
}

.stat {
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  box-shadow: 0 12px 28px rgba(17, 34, 29, .05);
}

.stat span {
  color: var(--muted);
  font-weight: 850;
}

.stat strong {
  display: block;
  margin-top: 8px;
  font-size: 2rem;
  line-height: 1;
}

.table-wrap {
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
}

table {
  width: 100%;
  border-collapse: collapse;
  min-width: 720px;
}

th,
td {
  padding: 14px 16px;
  border-bottom: 1px solid #edf4f1;
  text-align: right;
}

th {
  color: var(--muted);
  font-size: .92rem;
}

.status {
  display: inline-flex;
  padding: 5px 10px;
  border-radius: 999px;
  background: var(--brand-soft);
  color: var(--brand-dark);
  font-weight: 900;
  font-size: .84rem;
}

.status.paused {
  background: #fff3d4;
  color: #94640b;
}

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

.compact-toolbar {
  margin-bottom: 0;
}

.compact-toolbar .btn {
  min-height: 36px;
  padding: 0 14px;
}

.search {
  width: min(360px, 100%);
  min-height: 44px;
  padding: 9px 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
}

.chart {
  height: 260px;
  display: flex;
  align-items: end;
  gap: 12px;
  padding: 20px;
}

.bar {
  flex: 1;
  min-width: 28px;
  border-radius: 14px 14px 4px 4px;
  background: linear-gradient(180deg, var(--accent), var(--brand));
  position: relative;
}

.bar strong {
  position: absolute;
  right: 50%;
  top: -26px;
  transform: translateX(50%);
  color: var(--brand-dark);
  font-size: .82rem;
  font-weight: 900;
}

.bar span {
  position: absolute;
  right: 50%;
  bottom: -28px;
  transform: translateX(50%);
  color: var(--muted);
  font-size: .82rem;
  font-weight: 800;
}

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

.tight-grid {
  gap: 10px;
}

#forgot-password-message,
#reset-password-message,
#change-password-message {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

td small {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  line-height: 1.6;
}

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

.table-actions .btn {
  min-height: 36px;
  padding: 8px 12px;
}

.notification-preview {
  position: relative;
  overflow: hidden;
  background:
    linear-gradient(135deg, rgba(7, 143, 211, .1), rgba(162, 0, 69, .12)),
    #fff;
}

.notification-preview:before {
  content: "🔔";
  position: absolute;
  top: 18px;
  left: 22px;
  width: 54px;
  height: 54px;
  display: grid;
  place-items: center;
  border-radius: 18px;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 1.5rem;
}

.notification-preview h3,
.notification-preview p,
.notification-preview ul {
  max-width: calc(100% - 74px);
}

.subscription-card {
  overflow: hidden;
}

.subscription-card h3 {
  margin: 8px 0 6px;
  font-size: 1.9rem;
}

.trial-panel {
  display: grid;
  gap: 10px;
  margin: 16px 0;
  padding: 16px;
  border: 1px solid rgba(182, 147, 117, .36);
  border-radius: 16px;
  background: linear-gradient(135deg, rgba(182, 147, 117, .16), rgba(10, 60, 95, .07));
}

.trial-panel[hidden] {
  display: none;
}

.trial-panel strong {
  color: var(--brand-dark);
  font-size: 1.05rem;
}

.trial-panel span {
  color: var(--muted);
  font-weight: 800;
}

.trial-panel .btn {
  justify-self: start;
}

.subscription-metrics {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin: 18px 0;
}

.subscription-metrics div {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #f8fbfa;
}

.subscription-metrics span {
  display: block;
  color: var(--muted);
  font-size: .85rem;
  font-weight: 850;
}

.subscription-metrics strong {
  display: block;
  margin-top: 6px;
  font-size: 1.15rem;
}

.usage-bar {
  height: 12px;
  overflow: hidden;
  border-radius: 999px;
  background: #e9f2f0;
}

.usage-bar span {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--brand), var(--accent));
  transition: width .35s ease;
}

.subscription-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 18px;
}

.collapsible-guide {
  padding: 0;
  overflow: hidden;
}

.collapsible-guide summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 16px 18px;
  cursor: pointer;
  list-style: none;
}

.collapsible-guide summary::-webkit-details-marker {
  display: none;
}

.collapsible-guide summary span {
  display: grid;
  gap: 3px;
}

.collapsible-guide summary strong {
  color: var(--brand-dark);
  font-size: 1rem;
}

.collapsible-guide summary small {
  color: var(--muted);
  font-weight: 800;
}

.collapsible-guide summary b {
  padding: 8px 12px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--brand-dark);
  font-size: .85rem;
  white-space: nowrap;
}

.collapsible-guide[open] summary {
  border-bottom: 1px solid var(--line);
}

.collapsible-guide[open] summary b {
  background: rgba(182, 147, 117, .18);
  color: var(--accent);
}

.collapsible-guide[open] summary b::before {
  content: "إخفاء ";
}

.collapsible-guide > p,
.collapsible-guide .guide-grid {
  margin: 16px 18px;
}

.guide-grid {
  align-items: start;
}

.guide-grid h3 {
  margin: 0 0 10px;
  font-size: 1.05rem;
}

.compact-fields {
  gap: 10px;
}

.customer-toolbar {
  align-items: stretch;
}

.filter-select {
  min-height: 46px;
  min-width: 170px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
  color: var(--brand-dark);
  font: inherit;
  font-weight: 800;
}

.integration-events {
  display: grid;
  gap: 8px;
  margin: 12px 0;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #f8fbfa;
}

.steps-list {
  margin: 14px 0;
  padding-inline-start: 22px;
  color: var(--muted);
  font-weight: 750;
}

.steps-list li {
  margin-bottom: 8px;
}

.check-row {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--muted);
  font-weight: 800;
}

.check-row input {
  width: auto;
}

.wallet-preview {
  min-height: 300px;
  margin-top: 16px;
  padding: 24px;
  border-radius: 28px;
  background: #0a3c5f;
  color: #fff;
  box-shadow: 0 22px 46px rgba(5, 40, 74, .22);
}

.wallet-preview-top,
.wallet-preview-bottom {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: center;
}

.wallet-preview-top strong,
.wallet-preview-bottom span {
  color: #b69375;
}

.wallet-preview-top span {
  font-weight: 800;
}

.wallet-preview-bottom {
  align-items: flex-start;
  margin-top: 20px;
}

.wallet-preview-bottom div {
  min-width: 0;
}

.wallet-preview-bottom div:last-child {
  text-align: left;
}

.wallet-preview-bottom strong {
  display: block;
  margin-top: 4px;
  font-size: 1.22rem;
  font-weight: 600;
}

.wallet-preview-bottom span {
  display: block;
  font-weight: 700;
}

.wallet-preview-bottom strong,
.wallet-preview-bottom span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

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

.wallet-preview-brand img {
  width: 74px;
  height: 38px;
  object-fit: contain;
  flex: 0 0 auto;
}

.wallet-preview-brand b {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.wallet-preview h4 {
  margin: 18px 0 0;
  font-size: 1rem;
  font-weight: 800;
  line-height: 1.55;
  text-align: right;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.wallet-stamps {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  margin: 30px 0 0;
}

.wallet-stamps span {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 48px;
  border: 1px solid rgba(255, 255, 255, .34);
  border-radius: 999px;
  background: rgba(255, 255, 255, .08);
  font-weight: 900;
  color: #fff;
  font-size: 1.15rem;
}

.wallet-stamps span.done {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
  box-shadow: 0 8px 16px rgba(0, 0, 0, .16);
}

.wallet-stamps span.done.stamp-cup::before {
  content: "";
  width: 24px;
  height: 16px;
  border-radius: 0 0 9px 9px;
  background: #fff;
  box-shadow: 14px 3px 0 -7px var(--accent), 15px 3px 0 -4px #fff;
}

.wallet-stamps span.done.stamp-cup::after {
  content: "";
  position: absolute;
  width: 28px;
  height: 3px;
  bottom: 11px;
  border-radius: 999px;
  background: #fff;
}

.wallet-stamps span.done.stamp-car::before {
  content: "";
  width: 31px;
  height: 14px;
  border-radius: 7px 7px 4px 4px;
  background: #fff;
  box-shadow: -8px 11px 0 -4px #fff, 8px 11px 0 -4px #fff;
}

.wallet-stamps strong {
  grid-column: 1 / -1;
  display: block;
  padding: 18px;
  border-radius: 18px;
  background: rgba(255, 255, 255, .12);
  font-size: 1.6rem;
  text-align: center;
}

.muted-note {
  margin-top: 16px;
  color: var(--muted);
  font-size: .92rem;
}

.gift-image-preview {
  display: grid;
  gap: 10px;
  justify-items: start;
  margin-top: -4px;
}

.gift-image-preview img,
.gift-share-image {
  width: 100%;
  max-height: 260px;
  object-fit: cover;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: #f8fbfd;
}

.gift-share-card {
  text-align: center;
}

.gift-share-card .features {
  text-align: right;
}

.merchant-gift-image-status {
  display: grid;
  grid-template-columns: 112px 1fr;
  align-items: center;
  gap: 14px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fbfd;
}

.merchant-gift-image-status img {
  width: 112px;
  height: 78px;
  object-fit: cover;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: #fff;
}

.merchant-gift-image-status .muted-note {
  margin: 4px 0 8px;
}

.link-button {
  border: 0;
  background: transparent;
  color: var(--brand);
  cursor: pointer;
  font: inherit;
  font-weight: 800;
  padding: 0;
}

.link-button:hover {
  color: var(--accent);
}

.wallet-logo-hint {
  margin: -8px 0 6px;
  line-height: 1.7;
}

.staff-card {
  display: grid;
  gap: 16px;
}

.staff-profile {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  padding: 12px;
  border: 1px solid rgba(10, 60, 95, .12);
  border-radius: 14px;
  background: linear-gradient(135deg, rgba(10, 60, 95, .06), rgba(182, 147, 117, .12));
}

.staff-profile span {
  display: block;
  color: var(--muted);
  font-size: .8rem;
  font-weight: 800;
}

.staff-profile strong {
  display: block;
  color: var(--brand-dark);
  font-size: .98rem;
  word-break: break-word;
}

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

.staff-summary div {
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #f8fbfd;
}

.staff-summary span {
  display: block;
  color: var(--muted);
  font-size: .84rem;
  font-weight: 800;
}

.staff-summary strong {
  display: block;
  color: var(--brand-dark);
  font-size: 1rem;
  word-break: break-word;
}

.staff-progress {
  padding: 16px;
  border-radius: 16px;
  background: linear-gradient(135deg, rgba(7, 143, 211, .1), rgba(182, 147, 117, .16));
}

.staff-progress span,
.staff-progress strong {
  display: block;
}

.staff-progress strong {
  margin-top: 6px;
  font-size: 1.3rem;
  color: var(--brand-dark);
}

.progress-track {
  height: 12px;
  margin-top: 12px;
  border-radius: 999px;
  background: #dce7ef;
  overflow: hidden;
}

.progress-track i {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--brand), var(--accent));
}

.join-page .auth-side {
  background:
    linear-gradient(135deg, rgba(10, 60, 95, .94), rgba(162, 0, 69, .82)),
    var(--brand-dark);
}

.join-help {
  margin-top: 16px;
}

.qr-page {
  min-height: 100vh;
  background:
    radial-gradient(circle at top right, rgba(7, 143, 211, .18), transparent 34%),
    radial-gradient(circle at bottom left, rgba(162, 0, 69, .14), transparent 30%),
    #f6f8fb;
}

.qr-poster {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 28px;
}

.qr-card {
  width: min(720px, 100%);
  text-align: center;
  padding: 38px;
}

.qr-card h1 {
  margin-bottom: 12px;
  font-size: clamp(2.1rem, 5vw, 4rem);
}

.qr-logo {
  width: 220px;
  max-width: 72%;
  margin-bottom: 18px;
}

.qr-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  align-items: start;
  margin: 24px auto;
}

.qr-box {
  width: min(430px, 100%);
  margin: 0 auto;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: #fff;
  box-shadow: 0 18px 38px rgba(5, 40, 74, .1);
}

.qr-box-title {
  display: block;
  margin-bottom: 12px;
  color: var(--brand-dark);
  font-weight: 800;
}

.qr-box img {
  display: block;
  width: 100%;
  aspect-ratio: 1;
}

.qr-link {
  overflow-wrap: anywhere;
  color: var(--muted);
  font-size: .92rem;
}

.footer {
  padding: 34px 0;
  background: var(--brand-dark);
  color: rgba(255, 255, 255, .72);
}

.footer-grid {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
}

.footer .logo {
  color: #fff;
}

@media (max-width: 980px) {
  .links {
    display: none;
  }

  .hero-grid,
  .program-panel,
  .proximity-grid,
  .referral-grid,
  .zapier-grid,
  .grid.two,
  .auth-layout {
    grid-template-columns: 1fr;
  }

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

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

  .grid.three,
  .stat-grid,
  .campaign-grid,
  .subscription-metrics {
    grid-template-columns: 1fr;
  }

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

  .price-card.featured {
    transform: none;
  }

  .app-shell {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: static;
    height: auto;
    display: block;
  }

  .side-links {
    grid-template-columns: repeat(2, 1fr);
    max-height: none;
    overflow: visible;
  }

  .sidebar-actions {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    margin-top: 18px;
    background: transparent;
  }
}

@media (max-width: 620px) {
  .wrap {
    width: min(100% - 24px, 1120px);
  }

  .nav-actions .btn.secondary,
  .nav-actions .btn.dark {
    display: none;
  }

  .hero {
    padding-top: 46px;
  }

  .phone-scene {
    min-height: 455px;
  }

  .referral-visual {
    min-height: 330px;
    padding: 20px;
  }

  .referral-node {
    width: 104px;
    height: 104px;
    font-size: .9rem;
  }

  .referral-node.main {
    right: 26px;
  }

  .referral-node.friend {
    left: 26px;
  }

  .referral-line {
    left: 120px;
    right: 120px;
  }

  .pass {
    width: min(310px, calc(100vw - 42px));
    right: 50%;
    transform: translateX(50%) rotate(-2deg);
  }

  .float-card {
    width: 190px;
    bottom: 12px;
  }

  .wallet-badge {
    align-items: flex-start;
  }

  .wallet-badge img {
    width: 50px;
    height: 50px;
  }

  .collapsible-guide summary {
    align-items: flex-start;
    flex-direction: column;
  }

  .collapsible-guide summary b {
    width: 100%;
    text-align: center;
  }

  .grid.five,
  .partners-grid,
  .card-types-grid,
  .staff-profile,
  .side-links,
  .sidebar-actions {
    grid-template-columns: 1fr;
  }

  .section-head,
  .toolbar,
  .dash-top {
    display: block;
  }

  .toolbar .btn,
  .dash-top .btn {
    margin-top: 12px;
  }

  .customer-toolbar {
    display: grid;
    gap: 10px;
  }

  .customer-toolbar .btn,
  .customer-toolbar .filter-select,
  .customer-toolbar .search {
    width: 100%;
    margin-top: 0;
  }

  .auth-side,
  .auth-form,
  .dashboard {
    padding: 22px;
  }

  .qr-grid {
    grid-template-columns: 1fr;
  }
}

@media print {
  .qr-page {
    background: #fff;
  }

  .qr-poster {
    min-height: auto;
    padding: 0;
  }

  .qr-card {
    box-shadow: none;
    border: 0;
  }

  .qr-card .actions {
    display: none;
  }
}
