/* ============================================================
   Event Pass — نظام التصميم
   لوحة الألوان: كرت دعوة فاخر بلمسة ليلية
   #1B1F3B ملكي داكن (خلفية) | #14172C أعمق (أسطح) | #FAF7F0 كريمي (نص/أسطح فاتحة)
   #C9A227 ذهبي (لهجة أساسية) | #6B8F71 أخضر مريّح (نجاح) | #B85C5C قرميدي (تنبيه)
   الخط: Cairo لعناوين، IBM Plex Sans Arabic للنصوص والبيانات
   العنصر المميز: حافة "تذكرة" مثقّبة (perforated ticket edge) على كروت الضيوف
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Cairo:wght@400;600;700;900&family=IBM+Plex+Sans+Arabic:wght@400;500;600&display=swap');

:root {
  --ink: #1B1F3B;
  --ink-deep: #12152A;
  --surface: #232849;
  --cream: #FAF7F0;
  --gold: #C9A227;
  --gold-soft: #E4C767;
  --sage: #6B8F71;
  --rose: #B85C5C;
  --slate: #9BA0B4;
  --line: rgba(250, 247, 240, 0.12);
  --radius: 18px;
  --shadow: 0 20px 50px rgba(10, 12, 30, 0.45);
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--ink);
  color: var(--cream);
  font-family: 'IBM Plex Sans Arabic', 'Cairo', sans-serif;
  min-height: 100vh;
}

body { direction: rtl; }

h1, h2, h3, .display {
  font-family: 'Cairo', sans-serif;
  font-weight: 800;
  margin: 0;
  letter-spacing: -0.01em;
}

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

.bg-radial {
  background:
    radial-gradient(1200px 600px at 15% -10%, rgba(201,162,39,0.16), transparent 60%),
    radial-gradient(900px 500px at 100% 10%, rgba(107,143,113,0.10), transparent 55%),
    var(--ink);
  min-height: 100vh;
}

.container { max-width: 1120px; margin: 0 auto; padding: 32px 24px 80px; }

.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 13px; color: var(--gold-soft); font-weight: 600;
  letter-spacing: 0.04em; margin-bottom: 10px;
}
.eyebrow::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: var(--gold); box-shadow: 0 0 0 4px rgba(201,162,39,0.18); }

.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--shadow);
}

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 13px 22px; border-radius: 12px; border: none; cursor: pointer;
  font-family: 'Cairo', sans-serif; font-weight: 700; font-size: 15px;
  transition: transform .15s ease, filter .15s ease;
}
.btn:active { transform: scale(0.98); }
.btn-gold { background: linear-gradient(135deg, var(--gold-soft), var(--gold)); color: var(--ink-deep); }
.btn-gold:hover { filter: brightness(1.08); }
.btn-outline { background: transparent; border: 1px solid var(--line); color: var(--cream); }
.btn-outline:hover { border-color: var(--gold); }
.btn-danger { background: rgba(184,92,92,0.15); color: #E8A3A3; border: 1px solid rgba(184,92,92,0.4); }
.btn-block { width: 100%; }
.btn:disabled { opacity: .5; cursor: not-allowed; }

.input, select, textarea {
  width: 100%; padding: 12px 14px; border-radius: 10px;
  border: 1px solid var(--line); background: var(--ink-deep); color: var(--cream);
  font-family: inherit; font-size: 15px;
}
.input:focus, select:focus, textarea:focus { outline: 2px solid var(--gold); outline-offset: 1px; }
label { display: block; font-size: 13px; color: var(--slate); margin-bottom: 6px; font-weight: 600; }
.field { margin-bottom: 16px; }

.grid { display: grid; gap: 16px; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
@media (max-width: 720px) { .grid-2, .grid-3 { grid-template-columns: 1fr; } }

.stat {
  display: flex; flex-direction: column; gap: 4px;
}
.stat .num { font-family: 'Cairo', sans-serif; font-size: 40px; font-weight: 900; color: var(--gold-soft); }
.stat .label { color: var(--slate); font-size: 14px; }

.table { width: 100%; border-collapse: collapse; }
.table th { text-align: right; font-size: 12px; color: var(--slate); font-weight: 600; padding: 10px 12px; border-bottom: 1px solid var(--line); }
.table td { padding: 12px; border-bottom: 1px solid var(--line); font-size: 14px; }
.table tr:last-child td { border-bottom: none; }

.badge { display: inline-flex; padding: 4px 10px; border-radius: 999px; font-size: 12px; font-weight: 600; }
.badge-success { background: rgba(107,143,113,0.18); color: #A8CBAE; }
.badge-pending { background: rgba(155,160,180,0.15); color: var(--slate); }
.badge-vip { background: rgba(201,162,39,0.18); color: var(--gold-soft); }

/* ==== كرت التذكرة — العنصر المميز: حافة مثقّبة كالتذاكر الحقيقية ==== */
.ticket {
  position: relative;
  background: linear-gradient(160deg, var(--surface), var(--ink-deep));
  border-radius: 22px;
  border: 1px solid var(--line);
  overflow: visible;
  box-shadow: var(--shadow);
}
.ticket-notch {
  position: absolute; width: 26px; height: 26px; background: var(--ink);
  border-radius: 50%; top: 50%; transform: translateY(-50%);
  border: 1px solid var(--line);
}
.ticket-notch.right { right: -13px; }
.ticket-notch.left { left: -13px; }
.ticket-perf {
  border-top: 2px dashed var(--line);
  margin: 0;
}
.ticket-top { padding: 26px 26px 18px; }
.ticket-bottom { padding: 18px 26px 26px; text-align: center; }
.ticket .qr-wrap { background: var(--cream); border-radius: 16px; padding: 16px; display: inline-block; }
.ticket .qr-wrap img { display: block; width: 220px; height: 220px; }

.topbar {
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px 24px; border-bottom: 1px solid var(--line);
}
.brand { display: flex; align-items: center; gap: 10px; font-family: 'Cairo'; font-weight: 800; font-size: 18px; }
.brand .dot { width: 10px; height: 10px; border-radius: 50%; background: var(--gold); }

.muted { color: var(--slate); }
.center { text-align: center; }
.flex { display: flex; align-items: center; }
.gap-8 { gap: 8px; } .gap-12 { gap: 12px; } .gap-16 { gap: 16px; }
.mt-8{margin-top:8px}.mt-16{margin-top:16px}.mt-24{margin-top:24px}.mt-32{margin-top:32px}
.mb-8{margin-bottom:8px}.mb-16{margin-bottom:16px}.mb-24{margin-bottom:24px}

.toast {
  position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%);
  background: var(--surface); border: 1px solid var(--line); padding: 14px 22px;
  border-radius: 12px; box-shadow: var(--shadow); font-weight: 600; z-index: 50;
  display: none;
}
.toast.show { display: block; }
.toast.success { border-color: var(--sage); color: #A8CBAE; }
.toast.error { border-color: var(--rose); color: #E8A3A3; }

#reader { border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line); }

.scan-flash {
  position: fixed; inset: 0; pointer-events: none; opacity: 0; z-index: 40;
  transition: opacity .25s ease;
}
.scan-flash.success { background: rgba(107,143,113,0.28); }
.scan-flash.error { background: rgba(184,92,92,0.28); }
.scan-flash.show { opacity: 1; }
