/* ═══ Bareedna — design tokens (flat / royal-gold) ═══ */
:root {
  --primary: #9a7415;
  --primary-dark: #7a5a0e;
  --primary-soft: #fbf3dc;
  --secondary: #c9a227;
  --accent: #b3261e;
  --accent-soft: #fbeae8;

  --bg: #fffef9;
  --bg-alt: #faf4e6;
  --surface: #ffffff;
  --surface-2: #fdf9ef;
  --fg: #241d10;
  --fg-muted: #6d6350;
  --fg-faint: #978c74;
  --border: #efe4c9;
  --border-strong: #e2d2ab;
  --success: #16a34a;
  --success-soft: #e8f7ed;
  --warning: #d97706;
  --warning-soft: #fdf3e3;

  --radius-xs: 6px;
  --radius-sm: 10px;
  --radius: 14px;
  --radius-lg: 20px;
  --radius-pill: 999px;

  --shadow-sm: 0 1px 2px rgba(36, 29, 16, .07);
  --shadow: 0 6px 24px rgba(36, 29, 16, .09);
  --shadow-lg: 0 18px 48px rgba(36, 29, 16, .16);

  --icon-sm: 16px;
  --icon-md: 20px;
  --icon-lg: 24px;

  --font-body: 'IBM Plex Sans Arabic', 'Segoe UI', system-ui, sans-serif;
  --font-head: 'Tajawal', 'IBM Plex Sans Arabic', system-ui, sans-serif;
  --ease: cubic-bezier(.16, 1, .3, 1);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--fg);
  line-height: 1.7;
  min-height: 100dvh;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 { font-family: var(--font-head); font-weight: 800; line-height: 1.25; letter-spacing: 0; }
a { color: inherit; }
button { font-family: inherit; }
ul { list-style: none; }
img { max-width: 100%; display: block; }

/* ═══ Layout primitives ═══ */
.container { width: 100%; max-width: 1140px; margin: 0 auto; padding: 0 1.5rem; }
.section { padding: 4.5rem 0; position: relative; }
.section.alt { background: var(--bg-alt); }
.section-head { text-align: center; max-width: 680px; margin: 0 auto 3rem; }
.section-head h2 { font-size: clamp(1.6rem, 3.6vw, 2.4rem); margin-bottom: .75rem; }
.section-head p { color: var(--fg-muted); font-size: 1.02rem; }

.eyebrow {
  display: inline-flex; align-items: center; gap: .4rem;
  font-size: .76rem; font-weight: 700; letter-spacing: .02em;
  color: var(--primary); background: var(--primary-soft);
  padding: .3rem .8rem; border-radius: var(--radius-pill); margin-bottom: .9rem;
}

.muted { color: var(--fg-muted); }
.small { font-size: .82rem; }
.mono { font-family: ui-monospace, 'SFMono-Regular', Menlo, monospace; direction: ltr; unicode-bidi: embed; }
.row { display: flex; align-items: center; gap: .6rem; }
.between { justify-content: space-between; }
.wrap { flex-wrap: wrap; }
.spacer { flex: 1; }
.stack { display: flex; flex-direction: column; gap: .6rem; }

/* ═══ Buttons ═══ */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  min-height: 44px; padding: .6rem 1.4rem; border-radius: var(--radius-pill);
  font-size: .92rem; font-weight: 700; font-family: var(--font-head);
  cursor: pointer; border: 1.5px solid transparent; text-decoration: none;
  transition: background-color .18s var(--ease), color .18s var(--ease),
              border-color .18s var(--ease), transform .18s var(--ease);
}
.btn:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover:not(:disabled) { background: var(--primary-dark); transform: translateY(-1px); }
.btn-ghost { border-color: var(--border-strong); background: var(--surface); color: var(--fg); }
.btn-ghost:hover:not(:disabled) { border-color: var(--primary); color: var(--primary); background: var(--primary-soft); }
.btn-soft { background: var(--primary-soft); color: var(--primary); }
.btn-soft:hover:not(:disabled) { background: #f4e6c4; }
.btn-danger { background: var(--accent-soft); color: var(--accent); }
.btn-danger:hover:not(:disabled) { background: #fbdada; }
.btn-sm { min-height: 36px; padding: .35rem .9rem; font-size: .82rem; }
.btn-block { width: 100%; }
.btn-icon { min-height: 38px; width: 38px; padding: 0; border-radius: var(--radius-sm); }

/* ═══ Badges & pills ═══ */
.badge {
  display: inline-flex; align-items: center; gap: .3rem;
  font-size: .73rem; font-weight: 700; padding: .2rem .65rem;
  border-radius: var(--radius-pill); background: var(--primary-soft); color: var(--primary);
  white-space: nowrap;
}
.badge.green { background: var(--success-soft); color: var(--success); }
.badge.red { background: var(--accent-soft); color: var(--accent); }
.badge.amber { background: var(--warning-soft); color: var(--warning); }
.badge.grey { background: var(--bg-alt); color: var(--fg-muted); }
.badge.dark { background: var(--fg); color: #fff; }

/* ═══ Public navbar ═══ */
.nav {
  position: sticky; top: 0; z-index: 40;
  background: rgba(255, 255, 255, .86); backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
}
.nav-inner { display: flex; align-items: center; gap: 1rem; height: 66px; }
.logo { display: flex; align-items: center; gap: .55rem; font-family: var(--font-head); font-weight: 800; font-size: 1.15rem; text-decoration: none; }
.logo-mark {
  width: 34px; height: 34px; border-radius: 10px;
  background: linear-gradient(135deg, #9a7415 0%, #d8b24b 100%);
  display: grid; place-items: center; color: #fff; flex: none;
}
.nav-links { display: flex; align-items: center; gap: 1.5rem; }
.nav-link {
  background: none; border: 0; cursor: pointer; font: inherit; font-size: .9rem; font-weight: 600;
  color: var(--fg-muted); transition: color .18s var(--ease);
}
.nav-link:hover, .nav-link:focus-visible { color: var(--primary); }
.nav-toggle { display: none; }

/* ═══ Hero ═══ */
.hero { padding: 4.5rem 0 3.5rem; background:
  radial-gradient(900px 380px at 85% -10%, var(--primary-soft), transparent 65%),
  radial-gradient(700px 340px at 10% 0%, #fdf6e3, transparent 60%); }
.hero-grid { display: grid; grid-template-columns: 1.05fr .95fr; gap: 3rem; align-items: center; }
.hero h1 { font-size: clamp(2rem, 4.6vw, 3.1rem); margin-bottom: 1rem; }
.hero h1 .hl { color: var(--primary); }
.hero-lead { color: var(--fg-muted); font-size: 1.06rem; max-width: 34rem; margin-bottom: 1.6rem; }
.hero-actions { display: flex; gap: .7rem; flex-wrap: wrap; margin-bottom: 1.4rem; }
.hero-proof { display: flex; gap: 1.6rem; flex-wrap: wrap; }
.hero-proof div strong { display: block; font-family: var(--font-head); font-size: 1.4rem; color: var(--fg); }
.hero-proof div span { font-size: .8rem; color: var(--fg-muted); }

/* address preview card */
.addr-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); box-shadow: var(--shadow-lg); overflow: hidden; }
.addr-head { padding: .8rem 1rem; border-bottom: 1px solid var(--border); display: flex; align-items: center; gap: .5rem; background: var(--surface-2); }
.dot { width: 10px; height: 10px; border-radius: 50%; background: var(--border-strong); }
.addr-body { padding: 1.2rem; }
.addr-line {
  display: flex; align-items: center; gap: .6rem; padding: .7rem .9rem;
  border: 1px dashed var(--border-strong); border-radius: var(--radius-sm); background: var(--surface-2);
  font-size: .95rem; font-weight: 600; direction: ltr; justify-content: flex-start;
}
.addr-line .tick { color: var(--success); flex: none; }
.mini-mail { display: flex; gap: .7rem; padding: .75rem .4rem; border-bottom: 1px solid var(--border); align-items: flex-start; }
.mini-mail:last-child { border-bottom: 0; }
.mini-avatar {
  width: 34px; height: 34px; border-radius: 50%; flex: none; display: grid; place-items: center;
  font-weight: 700; font-size: .8rem; background: var(--primary-soft); color: var(--primary);
  font-family: var(--font-head);
}
.mini-mail b { font-size: .86rem; font-weight: 700; display: block; }
.mini-mail p { font-size: .78rem; color: var(--fg-muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 260px; }

/* ═══ Feature grid ═══ */
.grid { display: grid; gap: 1.1rem; }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 1.5rem; box-shadow: var(--shadow-sm);
  transition: border-color .2s var(--ease), transform .2s var(--ease), box-shadow .2s var(--ease);
}
.card.hoverable:hover { border-color: var(--border-strong); transform: translateY(-3px); box-shadow: var(--shadow); }
.card-icon {
  width: 42px; height: 42px; border-radius: var(--radius-sm); background: var(--primary-soft);
  color: var(--primary); display: grid; place-items: center; margin-bottom: .9rem;
}
.card h3 { font-size: 1.03rem; margin-bottom: .4rem; }
.card p { font-size: .9rem; color: var(--fg-muted); }

/* steps */
.step-num {
  width: 30px; height: 30px; border-radius: 50%; background: var(--primary); color: #fff;
  display: grid; place-items: center; font-weight: 700; font-size: .85rem; flex: none;
  font-family: var(--font-head);
}
.step { display: flex; gap: .9rem; align-items: flex-start; }

/* ═══ Pricing ═══ */
.cycle-toggle { display: inline-flex; background: var(--bg-alt); border: 1px solid var(--border); border-radius: var(--radius-pill); padding: .25rem; gap: .2rem; margin: 0 auto; }
.cycle-toggle button {
  border: 0; background: transparent; cursor: pointer; font: inherit; font-weight: 700; font-size: .85rem;
  padding: .45rem 1.1rem; border-radius: var(--radius-pill); color: var(--fg-muted);
  transition: background-color .18s var(--ease), color .18s var(--ease);
}
.cycle-toggle button.active { background: var(--primary); color: #fff; }

.price-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.1rem; align-items: stretch; }
.price-card {
  position: relative; display: flex; flex-direction: column; gap: 1rem;
  background: var(--surface); border: 1.5px solid var(--border); border-radius: var(--radius-lg);
  padding: 1.6rem 1.4rem; transition: border-color .2s var(--ease), transform .2s var(--ease);
}
.price-card:hover { border-color: var(--border-strong); transform: translateY(-3px); }
.price-card.featured { border-color: var(--primary); box-shadow: var(--shadow); }
.price-card.featured::before {
  content: ''; position: absolute; inset: 0; border-radius: inherit; pointer-events: none;
  background: linear-gradient(180deg, var(--primary-soft), transparent 32%);
}
.price-tag { font-family: var(--font-head); font-weight: 800; font-size: 2rem; line-height: 1; }
.price-tag small { font-size: .8rem; font-weight: 600; color: var(--fg-muted); }
.price-old { text-decoration: line-through; color: var(--fg-faint); font-size: .85rem; }
.price-name { font-family: var(--font-head); font-weight: 700; font-size: 1.1rem; }
.price-desc { font-size: .82rem; color: var(--fg-muted); min-height: 2.4rem; }
.price-feats { display: flex; flex-direction: column; gap: .55rem; flex: 1; }
.price-feats li { display: flex; gap: .5rem; align-items: flex-start; font-size: .86rem; }
.price-feats li svg { flex: none; margin-top: .22rem; }
.price-feats li.off { color: var(--fg-faint); text-decoration: line-through; }
.ribbon {
  position: absolute; top: -12px; inset-inline-start: 50%; transform: translateX(50%);
  background: var(--primary); color: #fff; font-size: .7rem; font-weight: 700;
  padding: .25rem .8rem; border-radius: var(--radius-pill); white-space: nowrap;
}

/* ═══ Comparison table ═══ */
.table-wrap { overflow-x: auto; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); }
table { width: 100%; border-collapse: collapse; min-width: 620px; }
th, td { padding: .85rem 1rem; text-align: start; font-size: .88rem; border-bottom: 1px solid var(--border); }
thead th { background: var(--surface-2); font-family: var(--font-head); font-weight: 700; font-size: .85rem; color: var(--fg-muted); }
tbody tr:last-child td { border-bottom: 0; }
td.center, th.center { text-align: center; }
td.lead { font-weight: 700; }

/* ═══ FAQ ═══ */
.faq-item { border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); margin-bottom: .7rem; overflow: hidden; }
.faq-q {
  width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  background: none; border: 0; cursor: pointer; font: inherit; font-weight: 700; font-size: .96rem;
  padding: 1.05rem 1.2rem; text-align: start; color: var(--fg); font-family: var(--font-head);
  transition: background-color .18s var(--ease);
}
.faq-q:hover { background: var(--surface-2); }
.faq-q svg { flex: none; transition: transform .25s var(--ease); color: var(--fg-muted); }
.faq-q.open svg { transform: rotate(180deg); }
.faq-a { padding: 0 1.2rem 1.15rem; font-size: .9rem; color: var(--fg-muted); }

/* ═══ Final CTA + footer ═══ */
.cta-band {
  background: linear-gradient(120deg, #241d10 0%, #4a3a12 100%);
  color: #fff; border-radius: var(--radius-lg);
  padding: 3rem 2rem; text-align: center;
  border: 1px solid rgba(201, 162, 39, .35);
}
.cta-band h2 { font-size: clamp(1.5rem, 3.4vw, 2.1rem); margin-bottom: .7rem; }
.cta-band p { color: #d9cba6; max-width: 34rem; margin: 0 auto 1.6rem; }

.footer { border-top: 1px solid var(--border); background: var(--surface-2); padding: 3rem 0 2rem; }
.footer-grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1fr; gap: 2rem; margin-bottom: 2rem; }
.footer h4 { font-family: var(--font-head); font-size: .92rem; margin-bottom: .8rem; }
.footer li { font-size: .86rem; color: var(--fg-muted); padding: .22rem 0; }
.footer-bottom { border-top: 1px solid var(--border); padding-top: 1.2rem; display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; font-size: .82rem; color: var(--fg-muted); }

/* ═══ Auth screen ═══ */
.auth-wrap { min-height: 100dvh; display: grid; place-items: center; padding: 2rem 1rem;
  background: radial-gradient(700px 340px at 80% 0%, var(--primary-soft), transparent 60%), var(--bg-alt); }
.auth-card { width: 100%; max-width: 440px; background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-lg); box-shadow: var(--shadow-lg); padding: 2rem; }
.auth-card h1 { font-size: 1.5rem; margin-bottom: .35rem; }
.tabs { display: flex; background: var(--bg-alt); border: 1px solid var(--border); border-radius: var(--radius-pill); padding: .25rem; margin: 1.4rem 0 1.2rem; }
.tab { flex: 1; border: 0; background: transparent; cursor: pointer; font: inherit; font-weight: 700; font-size: .86rem;
  padding: .5rem; border-radius: var(--radius-pill); color: var(--fg-muted); transition: all .18s var(--ease); }
.tab.active { background: var(--primary); color: #fff; }

/* ═══ Forms ═══ */
label.field { display: block; margin-bottom: .9rem; }
label.field > span { display: block; font-size: .82rem; font-weight: 700; color: var(--fg-muted); margin-bottom: .35rem; }
input, select, textarea {
  width: 100%; min-height: 44px; padding: .6rem .9rem; font: inherit; font-size: .92rem;
  background: var(--surface); border: 1.5px solid var(--border); border-radius: var(--radius-sm);
  color: var(--fg); outline: none; transition: border-color .18s var(--ease), box-shadow .18s var(--ease);
}
textarea { min-height: 96px; resize: vertical; }
input:focus, select:focus, textarea:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(154, 116, 21, .16); }
input.invalid, select.invalid { border-color: var(--accent); }
.err { color: var(--accent); font-size: .78rem; margin-top: .25rem; display: flex; align-items: center; gap: .3rem; }
.hint { color: var(--fg-faint); font-size: .78rem; margin-top: .3rem; }
.input-group { display: flex; align-items: stretch; }
.input-group input { border-start-end-radius: 0; border-end-end-radius: 0; }
.input-group .suffix { display: flex; align-items: center; padding: 0 .8rem; background: var(--surface-2);
  border: 1.5px solid var(--border); border-inline-start: 0; border-start-end-radius: var(--radius-sm);
  border-end-end-radius: var(--radius-sm); font-size: .84rem; color: var(--fg-muted); white-space: nowrap; }

/* ═══ App shell ═══ */
.app { display: grid; grid-template-columns: 252px 1fr; min-height: 100dvh; background: var(--bg-alt); }
.side { background: var(--surface); border-inline-end: 1px solid var(--border); padding: 1.1rem .8rem; display: flex; flex-direction: column; gap: .3rem; position: sticky; top: 0; height: 100dvh; }
.side-brand { display: flex; align-items: center; gap: .55rem; padding: .4rem .6rem 1.1rem; font-family: var(--font-head); font-weight: 800; }
.side-nav { display: flex; flex-direction: column; gap: .2rem; flex: 1; }
.side-item {
  display: flex; align-items: center; gap: .7rem; padding: .68rem .8rem; border-radius: var(--radius-sm);
  border: 0; background: none; cursor: pointer; font: inherit; font-size: .9rem; font-weight: 600;
  color: var(--fg-muted); text-align: start; width: 100%;
  transition: background-color .16s var(--ease), color .16s var(--ease);
}
.side-item:hover { background: var(--bg-alt); color: var(--fg); }
.side-item.active { background: var(--primary-soft); color: var(--primary); }
.side-item .count { margin-inline-start: auto; font-size: .74rem; font-weight: 700; background: var(--primary); color: #fff; border-radius: var(--radius-pill); padding: .05rem .45rem; }
.side-user { border-top: 1px solid var(--border); padding-top: .8rem; display: flex; align-items: center; gap: .6rem; }
.avatar { width: 34px; height: 34px; border-radius: 50%; background: var(--primary-soft); color: var(--primary);
  display: grid; place-items: center; font-weight: 700; font-size: .82rem; flex: none; font-family: var(--font-head); }
.main { padding: 1.6rem; min-width: 0; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 1rem; flex-wrap: wrap; margin-bottom: 1.3rem; }
.page-head h1 { font-size: 1.5rem; }
.page-head p { color: var(--fg-muted); font-size: .88rem; }

/* ═══ Stat tiles ═══ */
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1rem; margin-bottom: 1.3rem; }
.stat { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 1.05rem 1.1rem; }
.stat span { font-size: .78rem; color: var(--fg-muted); display: flex; align-items: center; gap: .35rem; }
.stat strong { display: block; font-family: var(--font-head); font-size: 1.7rem; line-height: 1.3; }
.stat .bar { height: 5px; background: var(--bg-alt); border-radius: var(--radius-pill); overflow: hidden; margin-top: .45rem; }
.stat .bar i { display: block; height: 100%; background: var(--primary); border-radius: inherit; transition: width .5s var(--ease); }

/* ═══ Inbox ═══ */
.inbox { display: grid; grid-template-columns: 1.05fr 1.25fr; gap: 1rem; align-items: start; }
.list-pane, .read-pane { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
.pane-head { padding: .8rem 1rem; border-bottom: 1px solid var(--border); display: flex; gap: .6rem; align-items: center; background: var(--surface-2); flex-wrap: wrap; }
.pane-head .search { position: relative; flex: 1; min-width: 150px; }
.pane-head .search svg { position: absolute; inset-inline-start: .7rem; top: 50%; transform: translateY(-50%); color: var(--fg-faint); pointer-events: none; }
.pane-head .search input { padding-inline-start: 2.2rem; min-height: 38px; font-size: .86rem; }
.pane-head select { min-height: 38px; width: auto; font-size: .84rem; }
.msg-list { max-height: 620px; overflow-y: auto; }
.msg-row {
  display: flex; gap: .75rem; padding: .85rem 1rem; border-bottom: 1px solid var(--border);
  cursor: pointer; background: none; border-inline: 0; border-top: 0; width: 100%; text-align: start; font: inherit;
  transition: background-color .16s var(--ease);
}
.msg-row:hover { background: var(--surface-2); }
.msg-row.active { background: var(--primary-soft); }
.msg-row.unread .from { font-weight: 800; color: var(--fg); }
.msg-row .from { font-size: .88rem; font-weight: 600; }
.msg-row .snippet { font-size: .8rem; color: var(--fg-muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.msg-row .meta { font-size: .72rem; color: var(--fg-faint); white-space: nowrap; }
.msg-row .dot-unread { width: 7px; height: 7px; border-radius: 50%; background: var(--primary); flex: none; margin-top: .45rem; }
.msg-body { padding: 1.4rem; max-height: 620px; overflow-y: auto; }
.msg-body h2 { font-size: 1.15rem; margin-bottom: .8rem; }
.msg-body .body-text { white-space: pre-wrap; font-size: .93rem; color: #2a2417; line-height: 1.85; }
.msg-actions { display: flex; gap: .5rem; flex-wrap: wrap; }

/* ═══ Empty / loading states ═══ */
.empty { text-align: center; padding: 3rem 1.5rem; color: var(--fg-muted); }
.empty .ico { width: 56px; height: 56px; border-radius: 50%; background: var(--primary-soft); color: var(--primary);
  display: grid; place-items: center; margin: 0 auto 1rem; }
.empty h3 { font-family: var(--font-head); font-size: 1.05rem; color: var(--fg); margin-bottom: .4rem; }
.empty p { font-size: .88rem; max-width: 30rem; margin: 0 auto 1.2rem; }
.skeleton { border-radius: var(--radius-sm); background: linear-gradient(90deg, #f7f0dd 25%, #efe4c8 50%, #f7f0dd 75%);
  background-size: 200% 100%; animation: shimmer 1.4s infinite linear; }
@keyframes shimmer { from { background-position: 200% 0; } to { background-position: -200% 0; } }
.sk-row { height: 62px; margin-bottom: .5rem; }
.sk-line { height: 12px; margin-bottom: .6rem; }
.spinner { width: 18px; height: 18px; border-radius: 50%; border: 2px solid rgba(255,255,255,.35);
  border-top-color: #fff; animation: spin .7s linear infinite; }
.spinner.dark { border-color: var(--border-strong); border-top-color: var(--primary); }
@keyframes spin { to { transform: rotate(360deg); } }

/* ═══ Modal ═══ */
.overlay { position: fixed; inset: 0; z-index: 80; background: rgba(15, 23, 42, .55); backdrop-filter: blur(3px);
  display: flex; align-items: center; justify-content: center; padding: 1rem; animation: fade .2s var(--ease); }
.modal { background: var(--surface); border-radius: var(--radius-lg); box-shadow: var(--shadow-lg);
  width: 100%; max-width: 520px; max-height: 88dvh; overflow-y: auto; animation: pop .24s var(--ease); }
.modal-head { padding: 1.2rem 1.4rem; border-bottom: 1px solid var(--border); display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.modal-head h3 { font-size: 1.1rem; }
.modal-body { padding: 1.4rem; }
.modal-foot { padding: 1rem 1.4rem; border-top: 1px solid var(--border); display: flex; gap: .6rem; justify-content: flex-end; flex-wrap: wrap; }
.x-btn { border: 0; background: var(--bg-alt); color: var(--fg-muted); width: 32px; height: 32px; border-radius: var(--radius-xs);
  cursor: pointer; display: grid; place-items: center; transition: background-color .16s var(--ease); }
.x-btn:hover { background: var(--border); }

/* ═══ Toast ═══ */
.toast-wrap { position: fixed; bottom: 1.4rem; inset-inline-start: 1.4rem; z-index: 120; display: flex; flex-direction: column; gap: .5rem; }
.toast { display: flex; align-items: flex-start; gap: .6rem; background: var(--fg); color: #fff; padding: .8rem 1.1rem;
  border-radius: var(--radius-sm); font-size: .88rem; font-weight: 600; box-shadow: var(--shadow-lg);
  animation: slideIn .26s var(--ease); max-width: 340px; }
.toast svg { flex: none; margin-top: .15rem; }
.toast.success svg { color: #4ade80; }
.toast.error svg { color: #fca5a5; }
.toast.info svg { color: #e6c766; }

/* ═══ Animations ═══ */
@keyframes fadeUp { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes pop { from { opacity: 0; transform: scale(.96) translateY(8px); } to { opacity: 1; transform: none; } }
@keyframes slideIn { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
.fade-up { animation: fadeUp .5s var(--ease) both; }
.d1 { animation-delay: .06s; } .d2 { animation-delay: .12s; } .d3 { animation-delay: .18s; } .d4 { animation-delay: .24s; }

/* ═══ Utilities ═══ */
.hide { display: none !important; }
.mt-1 { margin-top: .5rem; } .mt-2 { margin-top: 1rem; } .mt-3 { margin-top: 1.6rem; }
.mb-1 { margin-bottom: .5rem; } .mb-2 { margin-bottom: 1rem; }
.center { text-align: center; }
.note { background: var(--primary-soft); border: 1px solid var(--border-strong); color: #6b4f06;
  border-radius: var(--radius-sm); padding: .8rem 1rem; font-size: .84rem; display: flex; gap: .6rem; align-items: flex-start; }
.note svg { flex: none; margin-top: .15rem; }
.note.plain { background: var(--surface-2); border-color: var(--border); color: var(--fg-muted); }
.code-box { background: #1d1810; color: #e7dcc2; border-radius: var(--radius-sm); padding: .9rem 1rem;
  font-family: ui-monospace, Menlo, monospace; font-size: .78rem; direction: ltr; text-align: left;
  overflow-x: auto; white-space: pre; }

/* ═══ Responsive ═══ */
@media (max-width: 1060px) {
  .price-grid { grid-template-columns: repeat(2, 1fr); }
  .stats { grid-template-columns: repeat(2, 1fr); }
  .inbox { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 900px) {
  .hero-grid { grid-template-columns: 1fr; gap: 2rem; }
  .grid-3 { grid-template-columns: 1fr 1fr; }
  .app { grid-template-columns: 1fr; }
  .side { position: static; height: auto; border-inline-end: 0; border-bottom: 1px solid var(--border); }
  .side-nav { flex-direction: row; overflow-x: auto; padding-bottom: .3rem; }
  .side-item { white-space: nowrap; }
  .side-brand, .side-user { display: none; }
  .mobile-topbar { display: flex !important; }
}

@media (max-width: 640px) {
  .section { padding: 3rem 0; }
  .hero { padding: 3rem 0 2rem; }
  .container, .main { padding-inline: 1rem; }
  .grid-3, .grid-2, .price-grid, .stats { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; gap: 1.4rem; }
  .nav-links { display: none; }
  .nav-toggle { display: grid; place-items: center; }
  .nav-links.open {
    display: flex; flex-direction: column; align-items: stretch; gap: .2rem;
    position: absolute; top: 66px; inset-inline: 0; background: var(--surface);
    border-bottom: 1px solid var(--border); padding: .8rem 1rem; box-shadow: var(--shadow);
  }
  .nav-links.open .nav-link { text-align: start; padding: .6rem 0; }
  .msg-list, .msg-body { max-height: none; }
  .toast-wrap { inset-inline: 1rem; }
  .toast { max-width: none; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important;
    transition-duration: .01ms !important; scroll-behavior: auto !important; }
}

/* ── bank-transfer payment panel ───────────────────────────── */
.pay-panel {
  background: linear-gradient(180deg, var(--surface) 0%, var(--surface-2) 100%);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-lg);
  padding: 1.3rem;
  box-shadow: var(--shadow);
  display: flex; flex-direction: column; gap: .9rem;
}
.pay-head { display: flex; align-items: center; justify-content: space-between; gap: .8rem; flex-wrap: wrap; }
.pay-ico {
  display: grid; place-items: center; width: 42px; height: 42px; flex: none;
  border-radius: 12px; background: var(--primary-soft); color: var(--primary);
}
.pay-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: .7rem; }
.pay-cell {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: .65rem .8rem;
  display: flex; flex-direction: column; gap: .15rem; min-width: 0;
}
.pay-cell b { font-size: .95rem; overflow-wrap: anywhere; }
.pay-steps { padding-inline-start: 1.3rem; display: flex; flex-direction: column; gap: .35rem; }
.pay-steps li { color: var(--fg-muted); font-size: .92rem; list-style: decimal; }
.pay-steps li::marker { color: var(--primary); font-weight: 700; }
.pay-claim { background: var(--surface); border: 1px dashed var(--border-strong); border-radius: var(--radius); padding: .9rem; }
.pay-form { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .6rem; margin-bottom: .6rem; }
.pay-notes { display: flex; flex-direction: column; gap: .35rem; border-top: 1px solid var(--border); padding-top: .7rem; }
.pay-strip {
  margin-top: 2.4rem; padding: 1.1rem 1.3rem; border-radius: var(--radius-lg);
  background: var(--surface); border: 1px solid var(--border-strong);
  display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap;
}
.badge.blue { background: var(--primary-soft); color: var(--primary); }

/* ── install-the-app card ──────────────────────────────────── */
.install-card {
  display: flex; align-items: center; gap: .9rem; flex-wrap: wrap;
  background: linear-gradient(120deg, var(--primary) 0%, var(--secondary) 100%);
  color: #fff; border-radius: var(--radius-lg); padding: 1rem 1.2rem;
  margin-bottom: 1.2rem; box-shadow: var(--shadow-lg);
}
.install-card .muted, .install-card .small { color: rgba(255, 255, 255, .82); }
.install-ico {
  display: grid; place-items: center; width: 42px; height: 42px; flex: none;
  border-radius: 12px; background: rgba(255, 255, 255, .16);
}
.install-card .btn-primary { background: #fff; color: var(--primary); }
.install-card .btn-primary:hover:not(:disabled) { background: #fff; transform: translateY(-1px); }
.install-card .btn-ghost { border-color: rgba(255, 255, 255, .45); background: rgba(255, 255, 255, .1); color: #fff; }
.install-card .btn-ghost:hover:not(:disabled) { background: rgba(255, 255, 255, .22); color: #fff; border-color: #fff; }
.install-card.compact { padding: .8rem 1rem; }

/* packaged Android app (no browser chrome) */
html.native-app .nav { padding-top: max(.6rem, env(safe-area-inset-top)); }
html.native-app body { padding-bottom: env(safe-area-inset-bottom); }

@media (max-width: 860px) {
  .pay-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .pay-form { grid-template-columns: 1fr; }
  .install-card { flex-direction: column; align-items: stretch; }
}

/* ═══ Direct-debit / OTP payment flow ═══ */
.badge.gold { background: linear-gradient(135deg, #fbf3dc, #f6e6bc); color: #7a5a0e; border: 1px solid #e6d29a; }
.ddx-steps { display: flex; align-items: center; gap: .5rem; flex-wrap: wrap; }
.ddx-step {
  display: flex; align-items: center; gap: .45rem; font-size: .8rem; font-weight: 700;
  color: var(--fg-faint); background: var(--surface); border: 1px solid var(--border);
  padding: .3rem .7rem; border-radius: var(--radius-pill);
}
.ddx-step b {
  display: grid; place-items: center; width: 20px; height: 20px; border-radius: 50%;
  background: var(--bg-alt); color: var(--fg-muted); font-size: .72rem;
}
.ddx-step.on { color: #6b4f06; border-color: var(--border-strong); background: var(--primary-soft); }
.ddx-step.on b { background: var(--primary); color: #fff; }
.ddx-step.done { color: var(--success); border-color: #cdeccd; background: var(--success-soft); }
.ddx-step.done b { background: var(--success); color: #fff; }
.ddx-phone { display: flex; align-items: stretch; gap: .5rem; }
.ddx-phone .cc {
  display: grid; place-items: center; padding: 0 .8rem; min-height: 44px; direction: ltr;
  background: var(--surface-2); border: 1.5px solid var(--border); border-radius: var(--radius-sm);
  font-weight: 700; color: var(--fg-muted); font-size: .9rem;
}
.ddx-phone input { flex: 1; font-family: ui-monospace, Menlo, monospace; direction: ltr; text-align: left; }
.otp-input {
  font-family: ui-monospace, 'SFMono-Regular', Menlo, monospace;
  text-align: center; letter-spacing: .62em; text-indent: .62em;
  font-size: 1.35rem; font-weight: 700; direction: ltr;
}
.ddx-timer { font-size: .78rem; color: var(--fg-muted); }
.ddx-amount {
  display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap;
  background: linear-gradient(120deg, #fdf7e6 0%, #f9edcf 100%);
  border: 1px solid #e8d6a4; border-radius: var(--radius); padding: .8rem 1rem;
}
.ddx-amount .amt { font-family: var(--font-head); font-size: 1.5rem; color: #6b4f06; }
.ddx-sms {
  display: flex; gap: .5rem; align-items: flex-start; font-size: .82rem;
  background: var(--surface-2); border: 1px dashed var(--border-strong);
  border-radius: var(--radius-sm); padding: .6rem .8rem; color: var(--fg-muted);
}
.ddx-sms code { background: #fff; border: 1px solid var(--border-strong); border-radius: 6px; padding: .05rem .4rem; font-weight: 700; color: #6b4f06; }

/* ── bank-transfer fallback inside the payment panel ── */
.ddx-fallback { border-top: 1px solid var(--border); padding-top: .8rem; }
.ddx-fallback summary { list-style: none; color: var(--fg-muted); font-weight: 600; }
.ddx-fallback summary::-webkit-details-marker { display: none; }
.ddx-fallback summary:hover { color: var(--primary); }
.ddx-fallback[open] summary { color: var(--primary); margin-bottom: .4rem; }
.pay-steps li::marker { color: var(--secondary); }
