@font-face {
  font-family: "Montserrat Arabic";
  src: url("/assets/montserrat-arabic.ttf") format("truetype");
  font-display: swap;
}

:root {
  color-scheme: light;
  --primary: #0d9b76;
  --primary-dark: #0a7c5e;
  --primary-soft: #e7f5f0;
  --gold: #c5972c;
  --ink: #1f2a27;
  --muted: #5f6b67;
  --line: #dfe6e3;
  --bg: #f6f8f7;
  --card: #ffffff;
  --error: #b3261e;
  --error-soft: #fdecea;
}

* { box-sizing: border-box; }

html, body { margin: 0; }

body {
  background: var(--bg);
  color: var(--ink);
  font-family: "Montserrat Arabic", system-ui, -apple-system, "Segoe UI", Tahoma, sans-serif;
  font-size: 16px;
  line-height: 1.7;
  -webkit-text-size-adjust: 100%;
}

.page {
  max-width: 520px;
  margin: 0 auto;
  padding: 24px 16px 40px;
}

.brand {
  display: flex;
  justify-content: center;
  margin-bottom: 8px;
}
.brand img { width: 120px; height: 120px; }

h1 {
  font-size: 1.6rem;
  margin: 0 0 4px;
  text-align: center;
  color: var(--primary-dark);
}

.lead {
  text-align: center;
  color: var(--muted);
  margin: 0 0 24px;
  text-wrap: balance;
}

.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 20px 16px;
}

.label {
  display: block;
  font-weight: 600;
  margin: 0 0 10px;
}

.chips {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  margin-bottom: 20px;
}

.chip {
  font: inherit;
  font-size: 1.05rem;
  padding: 12px 4px;
  border-radius: 12px;
  border: 1.5px solid var(--line);
  background: #fff;
  color: var(--ink);
  cursor: pointer;
}
.chip small { display: block; font-size: .75rem; color: var(--muted); line-height: 1.2; }
.chip[aria-pressed="true"] {
  border-color: var(--primary);
  background: var(--primary-soft);
  color: var(--primary-dark);
  font-weight: 700;
}
.chip[aria-pressed="true"] small { color: var(--primary-dark); }

.field { margin-bottom: 16px; }

.input-wrap { position: relative; }

input[type="text"], input[type="tel"], input[inputmode="numeric"] {
  width: 100%;
  font: inherit;
  padding: 12px 14px;
  border: 1.5px solid var(--line);
  border-radius: 12px;
  background: #fff;
  color: var(--ink);
}
input:focus { outline: none; border-color: var(--primary); }

.amount-input { direction: ltr; text-align: center; font-size: 1.15rem; padding-left: 52px; padding-right: 52px; }
.suffix {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--muted);
  pointer-events: none;
}
.ltr { direction: ltr; text-align: right; }

.optional { color: var(--muted); font-weight: 400; font-size: .9rem; }

.divider { border: 0; border-top: 1px solid var(--line); margin: 20px 0 16px; }

.error {
  display: none;
  background: var(--error-soft);
  color: var(--error);
  border-radius: 12px;
  padding: 10px 14px;
  margin-bottom: 14px;
}
.error.show { display: block; }

.btn {
  display: block;
  width: 100%;
  font: inherit;
  font-size: 1.1rem;
  font-weight: 700;
  padding: 14px;
  border: 0;
  border-radius: 14px;
  background: var(--primary);
  color: #fff;
  cursor: pointer;
  text-align: center;
  text-decoration: none;
}
.btn:disabled { background: #b8c7c2; cursor: not-allowed; }
.btn.secondary { background: #fff; color: var(--primary-dark); border: 1.5px solid var(--primary); }

.note {
  color: var(--muted);
  font-size: .9rem;
  margin: 14px 0 0;
  text-align: center;
}

.footer {
  text-align: center;
  margin-top: 28px;
  color: var(--muted);
  font-size: .95rem;
}
.footer a { color: var(--primary-dark); font-weight: 600; }
.footer p { margin: 6px 0; }

.status {
  text-align: center;
  padding: 28px 16px;
}
.status h1 { margin-bottom: 8px; }
.status p { color: var(--muted); margin: 0 0 20px; }
.status .actions { display: grid; gap: 10px; }

.spinner {
  display: inline-block;
  width: 18px; height: 18px;
  border: 2px solid rgba(255,255,255,.5);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin .8s linear infinite;
  vertical-align: -3px;
  margin-left: 8px;
}
@keyframes spin { to { transform: rotate(360deg); } }

@media (max-width: 360px) {
  .chips { grid-template-columns: repeat(2, 1fr); }
}
