@import url('/assets/fonts/fonts.css');

:root {
  --g1: #3f9d6d; --g2: #2e7fb8; --gm: #33929a; --deep: #033b45; --deep-2: #052e37;
  --grad: linear-gradient(105deg, var(--g2) 0%, var(--gm) 52%, var(--g1) 100%);
  --grad-r: linear-gradient(285deg, var(--g2) 0%, var(--gm) 52%, var(--g1) 100%);
  --ink: #0d2233; --ink-2: #3d5568; --ink-3: #7e91a3;
  --line: #e4ebf2; --line-2: #d2dfe9;
  --bg: #eef4f9; --card: #ffffff; --tint: #f6fafc;
  --ok: #17825c; --ok-bg: #e6f6ee; --warn: #a06a12; --warn-bg: #fdf2df;
  --dan: #b23b3b; --dan-bg: #fdecec; --info: #2e7fb8; --info-bg: #eaf3fa; --gold: #b8893a;
  --r: 16px; --r-s: 11px; --r-l: 26px;
  --sh-1: 0 1px 2px rgba(13,34,51,.05), 0 4px 14px rgba(13,34,51,.05);
  --sh-2: 0 2px 6px rgba(13,34,51,.07), 0 14px 38px rgba(13,34,51,.10);
  --sh-3: 0 30px 70px rgba(13,34,51,.20);
  --ui: 'IBM Plex Sans Arabic', 'Segoe UI', Tahoma, sans-serif;
  --disp: 'Aref Ruqaa', 'Amiri', serif;
  --serif: 'Amiri', 'Traditional Arabic', serif;
  --kufi: 'Reem Kufi', 'El Messiri', var(--ui);
  --mes: 'El Messiri', var(--ui);
  --ease: cubic-bezier(.22, 1, .36, 1);
  --spring: cubic-bezier(.34, 1.56, .64, 1);
}
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; }
body { direction: rtl; font-family: var(--ui); font-size: 15px; line-height: 1.8; color: var(--ink); background: var(--bg); -webkit-font-smoothing: antialiased; }
button, input, select, textarea { font: inherit; color: inherit; }
a { color: var(--g2); }
.ic { width: 1.25em; height: 1.25em; flex: none; display: inline-block; vertical-align: -.25em; }
.ic .f { fill: currentColor; stroke: none; }
.ic .tn { opacity: .55; }
.mono { direction: ltr; unicode-bidi: embed; font-variant-numeric: tabular-nums; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
[hidden] { display: none !important; }

/* أزرار */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 1px solid var(--line-2); background: #fff; color: var(--ink); border-radius: var(--r-s); padding: 9px 16px; font-size: 14.5px; font-weight: 600; cursor: pointer; transition: transform .25s var(--ease), box-shadow .25s var(--ease), background .2s, border-color .2s; white-space: nowrap; text-decoration: none; }
.btn:hover { transform: translateY(-2px); box-shadow: var(--sh-2); border-color: #c3d4e1; }
.btn:active { transform: translateY(0) scale(.97); }
.btn.p { background: var(--grad); color: #fff; border: 0; box-shadow: 0 6px 18px rgba(46,127,184,.28), inset 0 1px 0 rgba(255,255,255,.25); }
.btn.p:hover { box-shadow: 0 12px 28px rgba(46,127,184,.36), inset 0 1px 0 rgba(255,255,255,.25); }
.btn.d { background: var(--deep); color: #fff; border-color: var(--deep); }
.btn.ghost { background: transparent; border-color: transparent; }
.btn.ghost:hover { background: rgba(13,34,51,.05); box-shadow: none; }
.btn.sm { padding: 6px 11px; font-size: 13px; border-radius: 9px; }
.btn.lg { padding: 13px 24px; font-size: 16px; border-radius: 14px; }
.btn[disabled] { opacity: .55; pointer-events: none; }
.btn.danger { color: var(--dan); border-color: #efc9c9; }

/* حقول */
.field { display: grid; gap: 6px; margin-bottom: 14px; }
.field > span { font-size: 13.5px; font-weight: 600; color: var(--ink-2); }
.inp { width: 100%; border: 1px solid var(--line-2); background: #fff; border-radius: var(--r-s); padding: 10px 14px; font-size: 15px; outline: none; transition: border-color .2s, box-shadow .2s; }
.inp:focus { border-color: var(--g2); box-shadow: 0 0 0 4px rgba(46,127,184,.13); }
select.inp { appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--ink-3) 50%), linear-gradient(135deg, var(--ink-3) 50%, transparent 50%); background-position: 18px 52%, 13px 52%; background-size: 5px 5px; background-repeat: no-repeat; padding-left: 34px; }

.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); box-shadow: var(--sh-1); padding: 20px 22px; }
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 3px 11px; border-radius: 99px; font-size: 12.5px; font-weight: 600; background: var(--info-bg); color: var(--info); -webkit-print-color-adjust: exact; print-color-adjust: exact; }
.chip.ok { background: var(--ok-bg); color: var(--ok); }
.chip.warn { background: var(--warn-bg); color: var(--warn); }
.chip.gold { background: #f8efdf; color: var(--gold); }

/* إشعار */
.toast-wrap { position: fixed; inset-block-end: 22px; inset-inline-start: 50%; transform: translateX(50%); z-index: 9999; display: grid; gap: 8px; pointer-events: none; }
.toast { background: var(--deep); color: #fff; padding: 11px 20px; border-radius: 14px; box-shadow: var(--sh-3); font-weight: 600; font-size: 14px; animation: toastIn .5s var(--spring) both; display: flex; align-items: center; gap: 9px; }
.toast.err { background: var(--dan); }
.toast.out { animation: toastOut .35s var(--ease) forwards; }
@keyframes toastIn { from { opacity: 0; transform: translateY(20px) scale(.9); } }
@keyframes toastOut { to { opacity: 0; transform: translateY(12px) scale(.95); } }

.spin { width: 18px; height: 18px; border-radius: 50%; border: 2.4px solid rgba(255,255,255,.35); border-top-color: #fff; animation: rot .8s linear infinite; }
@keyframes rot { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; } }
