/* Halla «اكشط حظك». Colours from the Halla logo; Brother Bold (EN display), GE Dinar One (AR display), IBM Plex Sans Arabic (text). */
@font-face { font-family: "Brother"; src: url(/fonts/brother-bold.ttf) format("truetype"); font-weight: 700; font-display: swap; }
@font-face { font-family: "GE Dinar One"; src: url(/fonts/ge-dinar-one-medium.otf) format("opentype"); font-weight: 500; font-display: swap; }
@font-face { font-family: "Plex Ar"; src: url(/fonts/ibm-plex-sans-arabic-400-arabic.woff2) format("woff2"); font-weight: 400; font-display: swap; unicode-range: U+0600-06FF, U+0750-077F, U+FB50-FDFF, U+FE70-FEFF, U+200C-200E, U+060C; }
@font-face { font-family: "Plex Ar"; src: url(/fonts/ibm-plex-sans-arabic-600-arabic.woff2) format("woff2"); font-weight: 600; font-display: swap; unicode-range: U+0600-06FF, U+0750-077F, U+FB50-FDFF, U+FE70-FEFF, U+200C-200E, U+060C; }
@font-face { font-family: "Plex Ar"; src: url(/fonts/ibm-plex-sans-arabic-700-arabic.woff2) format("woff2"); font-weight: 700; font-display: swap; unicode-range: U+0600-06FF, U+0750-077F, U+FB50-FDFF, U+FE70-FEFF, U+200C-200E, U+060C; }
@font-face { font-family: "Plex Ar"; src: url(/fonts/ibm-plex-sans-arabic-400-latin.woff2) format("woff2"); font-weight: 400; font-display: swap; unicode-range: U+0000-00FF, U+2000-206F; }
@font-face { font-family: "Plex Ar"; src: url(/fonts/ibm-plex-sans-arabic-600-latin.woff2) format("woff2"); font-weight: 600; font-display: swap; unicode-range: U+0000-00FF, U+2000-206F; }
@font-face { font-family: "Plex Ar"; src: url(/fonts/ibm-plex-sans-arabic-700-latin.woff2) format("woff2"); font-weight: 700; font-display: swap; unicode-range: U+0000-00FF, U+2000-206F; }

:root {
  --green: #1A8B4B; --green-2: #2BB24C; --green-deep: #0E5C31; --night: #0F1A14; --night-2: #16261D;
  --red: #9C1C31; --red-hot: #E1252F; --gold: #F5B21B; --gold-2: #FFD36B;
  --cream: #FFF6E6; --cream-2: #F6E9D2; --ink: #1F2623; --ink-2: #4A5550; --char: #3A4440;
  --bg: var(--cream); --fg: var(--ink); --muted: var(--ink-2); --card: #fff; --line: rgba(31,38,35,.12);
  --disp: "GE Dinar One", "Plex Ar", system-ui, sans-serif;
  --text: "Plex Ar", system-ui, -apple-system, "Segoe UI", sans-serif;
  --r: 22px; --pad: clamp(16px, 4vw, 40px);
  color-scheme: light;
}
html[lang="en"] { --disp: "Brother", "Plex Ar", system-ui, sans-serif; }
.dark { --bg: var(--night); --fg: var(--cream); --muted: #C9BFAE; --card: rgba(255,246,230,.06); --line: rgba(255,246,230,.14); color-scheme: dark; }

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--fg); font: 400 17px/1.55 var(--text); -webkit-font-smoothing: antialiased; overflow-x: hidden; }
h1, h2, h3 { font-family: var(--disp); font-weight: 500; line-height: 1.12; margin: 0; letter-spacing: 0; }
html[lang="en"] h1, html[lang="en"] h2, html[lang="en"] h3 { font-weight: 700; letter-spacing: -.01em; }
p { margin: 0; }
button, input { font: inherit; color: inherit; }
a { color: inherit; }
[hidden] { display: none !important; }
.num, .code { font-family: var(--text); font-variant-numeric: tabular-nums; direction: ltr; unicode-bidi: isolate; }

/* Top bar */
.bar { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px var(--pad); }
.logo { display: inline-flex; background: var(--cream); border-radius: 14px; padding: 6px 12px; box-shadow: 0 6px 20px -12px rgba(0,0,0,.4); }
.logo img { height: 34px; width: auto; display: block; }
.chip-btn { appearance: none; border: 1.5px solid var(--line); background: var(--card); color: var(--fg); border-radius: 999px; padding: 8px 16px; font-weight: 600; font-size: 15px; cursor: pointer; min-height: 44px; }
.chip-btn:focus-visible, .btn:focus-visible, input:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; }

/* Buttons and fields */
.btn { appearance: none; border: 0; border-radius: 18px; min-height: 60px; padding: 14px 26px; font: 600 20px/1.2 var(--text); cursor: pointer; display: inline-flex; align-items: center; justify-content: center; gap: 10px; text-decoration: none;
  background: var(--green); color: #fff; box-shadow: 0 1px 0 rgba(255,255,255,.25) inset, 0 14px 30px -14px rgba(14,92,49,.8); transition: transform .12s ease, background .2s; width: 100%; }
.btn:active { transform: translateY(1px) scale(.99); }
.btn.red { background: var(--red); box-shadow: 0 1px 0 rgba(255,255,255,.2) inset, 0 14px 30px -14px rgba(156,28,49,.8); }
.btn.ghost { background: transparent; color: var(--fg); border: 1.5px solid var(--line); box-shadow: none; }
.btn[disabled] { opacity: .55; cursor: progress; }
.field { display: grid; gap: 8px; }
.field label { font-weight: 600; font-size: 15px; color: var(--muted); }
.field input { width: 100%; min-height: 62px; border-radius: 16px; border: 2px solid var(--line); background: var(--card); padding: 12px 18px; font-size: 22px; font-weight: 600; transition: border-color .2s; }
.field input:focus { border-color: var(--green); outline: none; }
.field input.ltr { direction: ltr; text-align: start; letter-spacing: .06em; }
html[dir="rtl"] .field input.ltr { text-align: right; }

/* Status note */
.note { border-radius: 16px; padding: 14px 18px; font-weight: 600; display: flex; gap: 10px; align-items: flex-start; }
.note.err { background: rgba(225,37,47,.1); color: var(--red); }
.note.warn { background: rgba(245,178,27,.18); color: #7A5200; }
.note b { display: block; }

/* Swirl motif: «داير في داير» */
.swirl { position: absolute; pointer-events: none; aspect-ratio: 1; }
.swirl i { position: absolute; inset: 0; border-radius: 50%; border: 2px dashed rgba(43,178,76,.28); animation: spin 40s linear infinite; }
.swirl i:nth-child(2) { inset: 14%; border-color: rgba(225,37,47,.28); border-style: dotted; animation-duration: 28s; animation-direction: reverse; }
.swirl i:nth-child(3) { inset: 30%; border-color: rgba(245,178,27,.32); animation-duration: 18s; }
@keyframes spin { to { transform: rotate(1turn); } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; } }

/* SAMPLE ribbon: shown on every screen until admin switches to LIVE */
.sample-ribbon { position: fixed; top: 0; left: 50%; translate: -50% 0; z-index: 60; pointer-events: none; padding: 5px 18px 7px; border-radius: 0 0 14px 14px;
  font: 700 13px/1.2 "Plex Ar", system-ui, sans-serif; letter-spacing: .08em; color: #fff; white-space: nowrap;
  background: repeating-linear-gradient(135deg, #E1252F 0 12px, #B81C26 12px 24px); box-shadow: 0 6px 16px -6px rgba(0,0,0,.5); }
.sample-ribbon.big { font-size: clamp(14px, 2.2vmin, 30px); padding: .4em 1.4em .5em; }
