@font-face { font-family: "Qomra"; src: url("/fonts/itfQomraArabic-Regular.otf") format("opentype"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Qomra"; src: url("/fonts/itfQomraArabic-Medium.ttf") format("truetype"); font-weight: 500; font-display: swap; }
@font-face { font-family: "Qomra"; src: url("/fonts/itfQomraArabic-Bold.otf") format("opentype"); font-weight: 700; font-display: swap; }
@font-face { font-family: "Qomra"; src: url("/fonts/itfQomraArabic-Black.ttf") format("truetype"); font-weight: 900; font-display: swap; }

:root {
  --green: #054239;
  --green-2: #0a5a4e;
  --green-3: #0f6e60;
  --green-soft: #e6efec;
  --gold: #b9975b;
  --gold-2: #d4b46a;
  --gold-soft: #f6efdf;
  --ink: #17231f;
  --muted: #66756f;
  --line: #e4e0d6;
  --bg: #f5f3ee;
  --card: #ffffff;
  --red: #b3261e;
  --red-soft: #fbeceb;
  --amber: #9a6a00;
  --amber-soft: #fdf3dc;
  --ok: #1e7b4f;
  --ok-soft: #e4f4ea;
  --radius: 14px;
  --shadow: 0 1px 2px rgba(5, 66, 57, .06), 0 6px 22px rgba(5, 66, 57, .07);
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body { font-family: "Qomra", Tahoma, Arial, sans-serif; color: var(--ink); background: var(--bg); font-size: 14.5px; line-height: 1.55; }
button, input, select, textarea { font: inherit; color: inherit; }
a { color: var(--green-3); }
.ltr { direction: ltr; unicode-bidi: embed; }
.num { font-variant-numeric: tabular-nums; }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 1px solid transparent; border-radius: 10px;
  padding: 7px 14px; font-weight: 500; cursor: pointer; background: var(--green); color: #fff; transition: background .15s, transform .05s; white-space: nowrap; }
.btn:hover { background: var(--green-2); }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .55; cursor: default; }
.btn.gold { background: var(--gold); color: #fff; }
.btn.gold:hover { background: #a7854b; }
.btn.ghost { background: transparent; color: var(--green); border-color: var(--line); }
.btn.ghost:hover { background: var(--green-soft); }
.btn.danger { background: var(--red); }
.btn.danger:hover { background: #8f1e18; }
.btn.okb { background: var(--ok); }
.btn.sm { padding: 4px 10px; font-size: 13px; border-radius: 8px; }
.btn svg { width: 16px; height: 16px; }

.field { display: flex; flex-direction: column; gap: 5px; margin-bottom: 12px; }
.field > label { font-weight: 500; font-size: 13.5px; color: #2c3b36; }
.field .hint { font-size: 13px; color: var(--muted); }
.input, select.input, textarea.input { width: 100%; border: 1px solid #d6d1c4; border-radius: 9px; padding: 7px 11px; background: #fff; outline: none; transition: border .15s, box-shadow .15s; }
.input:focus { border-color: var(--green-3); box-shadow: 0 0 0 3px rgba(15, 110, 96, .14); }
textarea.input { resize: vertical; min-height: 80px; }

.badge { display: inline-block; padding: 1px 9px; border-radius: 999px; font-size: 12px; font-weight: 500; white-space: nowrap; }
.badge.pending { background: var(--amber-soft); color: var(--amber); }
.badge.approved { background: var(--ok-soft); color: var(--ok); }
.badge.rejected { background: var(--red-soft); color: var(--red); }
.badge.incomplete { background: #eceae4; color: #5e5a50; }
.badge.gold { background: var(--gold-soft); color: #8a6d2f; }
.badge.green { background: var(--green-soft); color: var(--green); }

.toast-wrap { position: fixed; bottom: 22px; left: 50%; transform: translateX(-50%); z-index: 1000; display: flex; flex-direction: column; gap: 8px; align-items: center; pointer-events: none; }
.toast { background: var(--ink); color: #fff; padding: 11px 20px; border-radius: 12px; box-shadow: var(--shadow); max-width: min(92vw, 560px); white-space: pre-line; animation: tin .2s ease-out; }
.toast.err { background: var(--red); }
.toast.ok { background: var(--ok); }
@keyframes tin { from { opacity: 0; transform: translateY(8px); } }

.spinner { width: 22px; height: 22px; border: 3px solid rgba(5, 66, 57, .15); border-top-color: var(--green); border-radius: 50%; animation: spin .8s linear infinite; display: inline-block; }
@keyframes spin { to { transform: rotate(360deg); } }
.emblem { color: var(--gold-2); }

/* ---------- scrollbars in the visual identity ---------- */
::-webkit-scrollbar { width: 9px; height: 9px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(5, 66, 57, .22); border-radius: 99px; border: 2px solid transparent; background-clip: padding-box; }
::-webkit-scrollbar-thumb:hover { background: rgba(185, 151, 91, .75); border: 2px solid transparent; background-clip: padding-box; }
::-webkit-scrollbar-corner { background: transparent; }
::-webkit-scrollbar-button { display: none; height: 0; width: 0; }
.side ::-webkit-scrollbar-thumb { background: rgba(212, 180, 106, .35); border: 2px solid transparent; background-clip: padding-box; }
.side ::-webkit-scrollbar-thumb:hover { background: rgba(212, 180, 106, .7); border: 2px solid transparent; background-clip: padding-box; }
@supports not selector(::-webkit-scrollbar) {
  * { scrollbar-width: thin; scrollbar-color: rgba(5, 66, 57, .3) transparent; }
  .side * { scrollbar-color: rgba(212, 180, 106, .45) transparent; }
}
