/* ============================================================
   سيرتي — الهوية الأساسية
   لوح ألوان أخضر غامق (ثقة) + ذهبي هادئ للمميز
   ============================================================ */
:root {
  /* الأخضر — الهوية */
  --g-950: #04231b;
  --g-900: #06352a;
  --g-800: #075e45;
  --g-700: #047857;
  --g-600: #059669;
  --g-100: #d8efe5;
  --g-50:  #eef7f3;

  /* الذهبي — للمميز والتأكيد */
  --gold:      #b08a2e;
  --gold-soft: #d6b25e;
  --gold-bg:   #faf3e0;

  --p1: var(--g-700);
  --p1-h: var(--g-800);

  --ink: #142019;
  --ink-2: #33433c;
  --muted: #62736b;
  --bg: #f5f8f6;
  --card: #ffffff;
  --line: #dfe7e2;
  --danger: #c2410c;
  --ok: #047857;

  --grad: linear-gradient(135deg, var(--g-800), var(--g-600));
  --radius: 12px;
  --shadow: 0 12px 32px -16px rgba(4, 35, 27, .25);
  --shadow-sm: 0 2px 8px -3px rgba(4, 35, 27, .12);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: 'Tajawal', sans-serif;
  background: var(--bg);
  color: var(--ink);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; }
a { color: var(--p1); text-decoration: none; }
button { font-family: inherit; cursor: pointer; }
input, select, textarea { font-family: inherit; }

/* أيقونات RemixIcon — ضبط موحد */
i[class^="ri-"], i[class*=" ri-"] { line-height: 1; vertical-align: -0.12em; }
.btn i, .badge i { font-size: 1.1em; }

/* ---------- أزرار ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  border: none; border-radius: 10px; padding: 11px 22px;
  font-size: 15px; font-weight: 700; line-height: 1;
  transition: background .15s ease, border-color .15s, color .15s, transform .12s;
  text-decoration: none; white-space: nowrap;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--p1); color: #fff; box-shadow: var(--shadow-sm); }
.btn-primary:hover { background: var(--p1-h); }
.btn-ghost { background: transparent; color: var(--ink-2); border: 1.5px solid var(--line); }
.btn-ghost:hover { border-color: var(--p1); color: var(--p1); }
.btn-light { background: #fff; color: var(--g-900); }
.btn-light:hover { background: var(--g-50); }
.btn-soft { background: var(--g-50); color: var(--g-800); }
.btn-soft:hover { background: var(--g-100); }
.btn-gold { background: var(--gold); color: #fff; }
.btn-gold:hover { background: #97751f; }
.btn-danger-soft { background: #fdf1ec; color: var(--danger); }
.btn-sm { padding: 7px 14px; font-size: 13px; border-radius: 8px; }
.btn-lg { padding: 15px 30px; font-size: 16.5px; border-radius: 12px; }
.btn[disabled] { opacity: .55; cursor: not-allowed; transform: none !important; }

/* ---------- حقول ---------- */
.field { margin-bottom: 14px; }
.field label { display: block; font-size: 13px; font-weight: 700; color: var(--ink-2); margin-bottom: 6px; }
.input, .field input, .field select, .field textarea {
  width: 100%; border: 1.5px solid var(--line); border-radius: 9px;
  padding: 10px 13px; font-size: 14.5px; background: #fff; color: var(--ink);
  transition: border-color .15s, box-shadow .15s; outline: none;
}
.field textarea { min-height: 90px; resize: vertical; line-height: 1.6; }
.input:focus, .field input:focus, .field select:focus, .field textarea:focus {
  border-color: var(--g-600); box-shadow: 0 0 0 3px rgba(5, 150, 105, .14);
}
.hint { font-size: 12px; color: var(--muted); margin-top: 5px; }
.err-msg { background: #fdf1ec; color: var(--danger); border: 1px solid #f5d8c8; border-radius: 9px; padding: 10px 14px; font-size: 13.5px; margin-bottom: 14px; }

/* ---------- شارات ---------- */
.badge { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; font-weight: 700; padding: 4px 11px; border-radius: 7px; }
.badge-free { background: var(--g-50); color: var(--g-800); border: 1px solid var(--g-100); }
.badge-price { background: #f1f5f3; color: var(--ink-2); border: 1px solid var(--line); }
.badge-owned { background: var(--g-100); color: var(--g-900); }
.badge-hybrid { background: #eef3fb; color: #1e4d8c; border: 1px solid #d9e5f5; }
.badge-premium { background: var(--gold-bg); color: var(--gold); border: 1px solid #ecd9a8; }

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

/* ---------- نوافذ ---------- */
.modal-backdrop {
  position: fixed; inset: 0; background: rgba(4, 35, 27, .6);
  backdrop-filter: blur(3px); z-index: 1000;
  display: flex; align-items: center; justify-content: center; padding: 20px;
  animation: fadeIn .18s ease;
}
.modal {
  background: #fff; border-radius: 16px; box-shadow: var(--shadow);
  width: 100%; max-width: 460px; max-height: 92vh; overflow: auto;
  padding: 26px; animation: popIn .22s cubic-bezier(.2, 1.2, .4, 1);
}
.modal h3 { margin: 0 0 6px; font-size: 20px; }
@keyframes fadeIn { from { opacity: 0; } }
@keyframes popIn { from { opacity: 0; transform: scale(.94) translateY(8px); } }

/* ---------- تنبيهات ---------- */
#toast-wrap { position: fixed; bottom: 22px; inset-inline-start: 50%; transform: translateX(50%); z-index: 2000; display: flex; flex-direction: column; gap: 8px; align-items: center; }
html[dir="ltr"] #toast-wrap { transform: translateX(-50%); }
.toast {
  background: var(--g-950); color: #fff; padding: 11px 22px; border-radius: 10px;
  font-size: 14px; font-weight: 500; box-shadow: var(--shadow);
  animation: toastIn .25s cubic-bezier(.2, 1.2, .4, 1);
}
.toast.ok { background: var(--g-800); }
.toast.err { background: #7c2d12; }
@keyframes toastIn { from { opacity: 0; transform: translateY(14px); } }

.spinner {
  width: 22px; height: 22px; border-radius: 50%;
  border: 3px solid rgba(255,255,255,.3); border-top-color: #fff;
  animation: spin .7s linear infinite; display: inline-block;
}
.spinner.dark { border-color: rgba(4,120,87,.2); border-top-color: var(--p1); }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- مبدّل اللغة ---------- */
.lang-switch {
  display: inline-flex; border: 1.5px solid var(--line); border-radius: 9px; overflow: hidden; background: #fff;
}
.lang-switch button { border: none; background: transparent; padding: 6px 13px; font-size: 13px; font-weight: 700; color: var(--muted); }
.lang-switch button.active { background: var(--g-900); color: #fff; }

/* ---------- الشعار ---------- */
.logo { display: inline-flex; align-items: center; gap: 9px; font-weight: 900; font-size: 21px; color: var(--ink); text-decoration: none; }
.logo .logo-mark {
  width: 34px; height: 34px; border-radius: 9px; background: var(--g-900);
  display: inline-flex; align-items: center; justify-content: center; color: #fff;
}
.logo .logo-mark svg { width: 18px; height: 18px; fill: var(--gold-soft); }

::-webkit-scrollbar { width: 9px; height: 9px; }
::-webkit-scrollbar-thumb { background: #c4d0c9; border-radius: 9px; }
::-webkit-scrollbar-thumb:hover { background: #9fb0a7; }
