:root {
  /* ---------- Gold scale ---------- */
  --gold-50: #fff7e3;
  --gold-100: #ffefc6;
  --gold-200: #ffe7ac;
  --gold-300: #fbd987;
  --gold-400: #f7cd6b;
  --gold-500: #efb63b;
  --gold-600: #d99a25;
  --gold-700: #a9760f;

  /* Legacy aliases still used by admin / login / qr markup */
  --gold: #efb63b;
  --gold-light: #f7cd6b;
  --gold-dark: #b9860a;

  /* ---------- Ink / paper (dark surfaces) ---------- */
  --ink-950: #08080b;
  --ink-900: #0e0e12;
  --ink-850: #14141a;
  --ink-800: #1b1b23;
  --ink-700: #26262f;
  --paper: #f5f3ee;
  --paper-muted: #a9a498;
  --line: rgba(255, 255, 255, 0.10);

  /* ---------- Light surfaces (admin / login) ---------- */
  --black: #111111;
  --black-soft: #1c1c1c;
  --white: #ffffff;
  --gray-bg: #f4f2ec;
  --gray-text: #565247;
  --gray-border: #e5e1d6;
  --success: #1c9d5f;
  --danger: #d84b3c;

  /* ---------- Shape & motion ---------- */
  --radius-lg: 22px;
  --radius-md: 14px;
  --radius-sm: 10px;
  --shadow-soft: 0 12px 34px rgba(17, 17, 17, 0.10);
  --shadow-card: 0 4px 16px rgba(17, 17, 17, 0.06);
  --ease: cubic-bezier(0.16, 1, 0.3, 1);

  font-synthesis: none;
}

* {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  padding: 0;
}

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

body {
  font-family: "Plus Jakarta Sans", "Noto Kufi Arabic", -apple-system, BlinkMacSystemFont,
    "Segoe UI", "Segoe UI Arabic", "Noto Sans Arabic", Tahoma, Roboto, sans-serif;
  background: var(--gray-bg);
  color: var(--black);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  min-height: 100vh;
}

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

img {
  max-width: 100%;
  display: block;
}

button {
  font-family: inherit;
  cursor: pointer;
}

input, textarea, select {
  font-family: inherit;
}

/* ---------- Scrollbar polish ---------- */
::-webkit-scrollbar {
  width: 8px;
}
::-webkit-scrollbar-thumb {
  background: var(--gray-border);
  border-radius: 8px;
}

/* ---------- Utility ---------- */
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.spinner {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.4);
  border-top-color: #fff;
  animation: spin 0.7s linear infinite;
  display: inline-block;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* ---------- Toast ---------- */
.toast {
  position: fixed;
  bottom: calc(24px + env(safe-area-inset-bottom));
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: var(--ink-800);
  color: var(--paper);
  padding: 12px 22px;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 14px;
  font-weight: 500;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.35);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease, transform 0.25s ease;
  z-index: 999;
  display: flex;
  align-items: center;
  gap: 8px;
}

.toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
  pointer-events: auto;
}

.toast.error {
  background: var(--danger);
  border-color: transparent;
  color: #fff;
}

.toast.success {
  background: var(--success);
  border-color: transparent;
  color: #fff;
}

@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
}
