/* ألوان هوية أيان (من ملف الهوية البصرية) */
:root {
  --brand: #2cc7af;       /* اللون الأساسي للشعار */
  --brand-dark: #0c7f72;  /* اللون الثاني للشعار */
  --ink: #041412;         /* الأسود المخضرّ */
  --grey: #898a8a;        /* الرمادي */
  --deep: #0a2e2a;        /* درجة غامقة من الأخضر للخلفيات */
  --tint: #e6f7f4;        /* درجة فاتحة من الأخضر */
  --bg: #f4f8f7;
  --card: #ffffff;
  --text: #041412;
  --muted: #5f6a68;
  --line: #dde8e6;
  --ok: #0c7f72;
  --err: #c0392b;
  --radius: 14px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font-family: "Segoe UI", Tahoma, "Noto Kufi Arabic", Arial, sans-serif;
  line-height: 1.8; font-size: 16px;
}
a { color: var(--brand-dark); }
h1, h2, h3 { line-height: 1.4; margin: 0 0 .6em; }
h1 { font-size: clamp(1.5rem, 4vw, 2.2rem); }
h2 { font-size: 1.35rem; }
.wrap { max-width: 1120px; margin: 0 auto; padding: 0 16px; }
.narrow { max-width: 760px; }
.section { padding: 48px 16px; }
.section.alt { background: #fff; border-block: 1px solid var(--line); }
.center { text-align: center; }
.muted { color: var(--muted); }
.small { font-size: .85rem; }
.nowrap { white-space: nowrap; }
.ltr { direction: ltr; text-align: right; unicode-bidi: isolate; }
.inline { display: inline; margin: 0; }

/* الشريط العلوي */
.topbar { background: var(--ink); color: #fff; position: sticky; top: 0; z-index: 10; border-bottom: 3px solid var(--brand); }
.topbar-in { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 64px; flex-wrap: wrap; }
.brand { display: flex; align-items: center; gap: 10px; color: #fff; text-decoration: none; font-weight: 700; font-size: 1.25rem; }
.brand small { color: var(--brand); font-weight: 500; font-size: .8rem; display: block; line-height: 1.2; }
.topbar nav { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.topbar nav a { color: #fff; text-decoration: none; }
.topbar nav a:hover { color: var(--brand); }
.who { color: #b9c9c6; font-size: .9rem; }

/* الأزرار */
.btn { display: inline-block; border: 0; border-radius: 10px; padding: 9px 18px; font: inherit; font-weight: 600; cursor: pointer; text-decoration: none; text-align: center; }
.btn-lg { padding: 13px 28px; font-size: 1.05rem; }
.btn-main { background: var(--brand); color: var(--ink) !important; }
.btn-main:hover { background: #25b39d; }
.btn-outline { background: transparent; border: 2px solid currentColor; color: var(--brand-dark); }
.hero .btn-outline { color: #fff; }
.btn-ghost { background: transparent; color: inherit; border: 1px solid var(--line); }
.topbar .btn-ghost { color: #fff; border-color: #ffffff55; }

/* الواجهة */
.hero { background: linear-gradient(135deg, var(--brand-dark), var(--deep) 60%, var(--ink)); color: #fff; padding: 72px 0 64px; }
.hero.small { padding: 44px 0 36px; }
.hero h1 span { color: var(--brand); display: block; }
.hero .tagline { color: var(--brand); font-weight: 600; margin: -6px 0 12px; }
.hero p { max-width: 640px; color: #d3e6e2; font-size: 1.1rem; }
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 24px; }
.values { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 28px; }
.values span { border: 1px solid #ffffff40; border-radius: 999px; padding: 2px 14px; font-size: .9rem; color: #d3e6e2; }
.flag { width: 36px; height: 24px; border-radius: 3px; box-shadow: 0 0 0 1px #00000022; vertical-align: middle; }
.stat .flag { width: 21px; height: 14px; }
.country-card .flag { margin-bottom: 8px; }

.grid { display: grid; gap: 18px; }
.countries { grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }
.three { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.four { grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.two { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: start; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; margin-bottom: 18px; }
.country-card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; text-decoration: none; color: var(--text); transition: transform .15s, box-shadow .15s; display: flex; flex-direction: column; }
.country-card:hover { transform: translateY(-3px); box-shadow: 0 10px 24px #0c7f7222; border-color: var(--brand); }
.country-card p { color: var(--muted); font-size: .95rem; flex: 1; }
.country-card .more { color: var(--brand-dark); font-weight: 600; }
.service { border-top: 4px solid var(--brand); }
.service b { display: block; font-size: 1.05rem; }
.service .num { color: var(--brand-dark); font-weight: 700; font-size: 1.4rem; }

.steps { list-style: none; padding: 0; margin: 0; display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); counter-reset: s; }
.steps li { background: var(--bg); border-radius: var(--radius); padding: 20px; counter-increment: s; position: relative; }
.steps li::before { content: counter(s); position: absolute; top: 16px; left: 16px; width: 32px; height: 32px; border-radius: 50%; background: var(--brand); color: var(--ink); font-weight: 700; display: grid; place-items: center; }
.steps b { display: block; font-size: 1.1rem; margin-bottom: 4px; }
.steps span { color: var(--muted); }
.ticks { padding: 0; list-style: none; }
.ticks li::before { content: "✓"; color: var(--brand-dark); font-weight: 700; margin-left: 8px; }

/* النماذج */
.form fieldset { border: 0; padding: 0; margin: 0 0 18px; }
.form legend { font-weight: 700; font-size: 1.1rem; color: var(--brand-dark); margin-bottom: 10px; padding-bottom: 6px; border-bottom: 2px solid var(--brand); width: 100%; }
.row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.field { display: block; margin-bottom: 14px; }
.field > span { display: block; font-weight: 600; margin-bottom: 4px; }
.field i, i.req { color: var(--err); font-style: normal; }
.field input, .field select, .field textarea, .filters input, .filters select {
  width: 100%; padding: 10px 12px; border: 1px solid #c8d6d3; border-radius: 10px; font: inherit; background: #fff; color: var(--text);
}
.field input:focus, .field select:focus, .field textarea:focus { outline: 2px solid var(--brand); border-color: var(--brand); }
.field small { color: var(--muted); display: block; }
.field em, .check em { color: var(--err); font-style: normal; font-size: .9rem; display: block; }
.has-error input, .has-error select { border-color: var(--err); }
.check { display: flex; gap: 8px; align-items: flex-start; margin: 10px 0 18px; flex-wrap: wrap; }
.check input { margin-top: 7px; accent-color: var(--brand-dark); }
.hp { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

.alert { border-radius: 10px; padding: 12px 16px; margin-bottom: 16px; }
.alert.error { background: #fdecea; color: var(--err); }
.alert.success { background: var(--tint); color: var(--brand-dark); }
.alert.info { background: #eef1f1; color: #3f4847; border-right: 4px solid var(--grey); }

.done .check-icon { width: 72px; height: 72px; margin: 0 auto 12px; border-radius: 50%; background: var(--brand); color: var(--ink); font-size: 2.2rem; display: grid; place-items: center; }
.code { font-size: 1.8rem; font-weight: 700; color: var(--brand-dark); letter-spacing: 1px; direction: ltr; }

/* لوحة الموظفين */
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 12px; margin-bottom: 14px; }
.stat { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; text-decoration: none; color: var(--text); border-top: 4px solid var(--line); }
.stat b { display: block; font-size: 1.6rem; color: var(--ink); }
.stat span { color: var(--muted); font-size: .9rem; }
.filters { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.filters input { flex: 2 1 240px; width: auto; }
.filters select { flex: 1 1 140px; width: auto; }
.table-wrap { overflow-x: auto; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); }
table { width: 100%; border-collapse: collapse; }
th, td { padding: 10px 14px; text-align: right; border-bottom: 1px solid var(--line); vertical-align: top; }
thead th { background: var(--tint); font-size: .9rem; }
.kv th { width: 34%; color: var(--muted); font-weight: 600; }
.pager { display: flex; gap: 16px; justify-content: center; margin-top: 14px; }

.badge { display: inline-block; padding: 2px 12px; border-radius: 999px; font-size: .85rem; font-weight: 600; white-space: nowrap; background: #eef1f1; color: var(--ink); }
.st-new { background: #e4f1fb; color: #1b5e8c; border-top-color: #1b5e8c; }
.st-review { background: #fff4dc; color: #8a6414; border-top-color: #d9a52b; }
.st-missing_docs { background: #fdecea; color: var(--err); border-top-color: var(--err); }
.st-submitted { background: var(--tint); color: var(--brand-dark); border-top-color: var(--brand); }
.st-accepted { background: #d5f3ec; color: #075c52; border-top-color: var(--brand-dark); }
.st-rejected { background: #eef1f1; color: #555; border-top-color: var(--grey); }
.stat.st-new, .stat.st-review, .stat.st-missing_docs, .stat.st-submitted, .stat.st-accepted, .stat.st-rejected { background: #fff; }

.file-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; flex-wrap: wrap; margin-bottom: 12px; }
.file-head .badge { font-size: 1rem; padding: 6px 16px; }
.docs { padding-right: 18px; margin: 0; }
.timeline { list-style: none; padding: 0; margin: 0; }
.timeline > li { border-right: 3px solid var(--brand); padding: 4px 14px 12px; margin-bottom: 10px; }
.timeline > li.internal { border-right-color: var(--grey); background: #f6f8f8; }
.timeline.compact > li { border: 0; padding: 6px 0; border-bottom: 1px solid var(--line); margin: 0; }
.tl-msg { white-space: pre-wrap; background: var(--bg); padding: 8px 12px; border-radius: 8px; margin: 6px 0; }
.tl-meta, .time { color: var(--muted); font-size: .85rem; }
.tag { font-size: .75rem; background: #e5ecea; padding: 1px 8px; border-radius: 6px; }
.tag.mail { background: var(--tint); color: var(--brand-dark); }
.changes { margin: 6px 0; padding-right: 18px; font-size: .92rem; }
del { color: var(--err); } ins { color: var(--brand-dark); text-decoration: none; }
.login { padding-top: 64px; }

.site-footer { background: var(--ink); color: #9db3af; padding: 20px 0; margin-top: 40px; font-size: .9rem; }
.site-footer .wrap { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.site-footer a { color: var(--brand); }

@media (max-width: 720px) {
  .row, .two { grid-template-columns: 1fr; }
  .topbar nav { gap: 10px; font-size: .9rem; }
  .brand small { display: none; }
  .section { padding: 32px 16px; }
  .hero { padding: 48px 0 40px; }
}

.prose h2 { margin-top: 1.4em; color: var(--brand-dark); font-size: 1.15rem; }
.prose ul { padding-right: 20px; }
