/* =====================================================
   منصة التوظيف - مدارس فرست للغات
   الهوية: الأزرق الكحلي + الذهبي
   ===================================================== */

@font-face {
  font-family: 'Cairo';
  src: url('../fonts/Cairo-Regular.ttf') format('truetype');
  font-weight: 100 900;
  font-display: swap;
}

:root {
  --navy: #1e3a6c;
  --navy-dark: #142a52;
  --navy-deep: #0d1d3b;
  --navy-light: #2c4f8c;
  --navy-50: #eef2f9;
  --gold: #d4a64a;
  --gold-light: #f6e7a6;
  --gold-dark: #7a4a16;
  --gold-grad: linear-gradient(90deg, #f7ebb5 0%, #fbdc7f 22%, #d9a94a 55%, #7a4a16 82%, #b98a3e 100%);
  --gold-grad-soft: linear-gradient(135deg, #f6d77a 0%, #d4a64a 50%, #9a6420 100%);
  --ink: #1c2434;
  --muted: #6b7489;
  --line: #e3e7ef;
  --bg: #f5f7fb;
  --white: #fff;
  --green: #1f8a5b;
  --red: #c0392b;
  --amber: #c98a12;
  --purple: #6b46c1;
  --blue: #2563eb;
  --radius: 14px;
  --shadow: 0 10px 30px rgba(20, 42, 82, .08);
  --shadow-lg: 0 20px 50px rgba(20, 42, 82, .16);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: 'Cairo', Tahoma, Arial, sans-serif;
  background: var(--bg);
  color: var(--ink);
  line-height: 1.8;
  font-size: 15px;
  direction: rtl;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

a { color: var(--navy); text-decoration: none; transition: .2s; }
a:hover { color: var(--gold-dark); }
img { max-width: 100%; display: block; }

.container { width: min(1200px, 92%); margin-inline: auto; }
main { flex: 1; }

/* ============ الشريط الذهبي ============ */
.gold-line { height: 4px; background: var(--gold-grad); }

/* ============ الهيدر ============ */
.site-header {
  background: var(--navy);
  color: #fff;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 4px 18px rgba(0,0,0,.18);
}
.site-header .container { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 10px 0; }
.brand { display: flex; align-items: center; gap: 12px; color: #fff; }
.brand:hover { color: #fff; }
.brand img { height: 58px; width: auto; filter: drop-shadow(0 3px 6px rgba(0,0,0,.3)); }
.brand-text strong { display: block; font-size: 1.15rem; font-weight: 800; line-height: 1.3; }
.brand-text small { display: block; font-size: .78rem; color: var(--gold-light); letter-spacing: .5px; }

.main-nav { display: flex; align-items: center; gap: 6px; }
.main-nav a {
  color: #dfe6f3; padding: 8px 16px; border-radius: 10px; font-weight: 600; font-size: .95rem;
}
.main-nav a:hover, .main-nav a.active { background: rgba(255,255,255,.09); color: #fff; }
.main-nav a.active { box-shadow: inset 0 -3px 0 var(--gold); }
.main-nav a.btn-admin {
  background: var(--gold-grad-soft); color: var(--navy-deep); font-weight: 800; margin-inline-start: 6px;
}
.main-nav a.btn-admin:hover { filter: brightness(1.08); color: var(--navy-deep); }

.nav-toggle { display: none; background: none; border: 0; color: #fff; font-size: 1.6rem; cursor: pointer; }

/* ============ الشريط المتحرك ============ */
.ticker {
  background: var(--navy-deep);
  color: #fff;
  display: flex;
  align-items: stretch;
  overflow: hidden;
  border-bottom: 1px solid rgba(212,166,74,.35);
}
.ticker-label {
  background: var(--gold-grad-soft);
  color: var(--navy-deep);
  font-weight: 800;
  padding: 10px 22px;
  white-space: nowrap;
  display: flex; align-items: center; gap: 8px;
  position: relative; z-index: 2;
  box-shadow: -8px 0 16px rgba(0,0,0,.35);
}
.ticker-label .dot { width: 9px; height: 9px; border-radius: 50%; background: #c0392b; animation: pulse 1.2s infinite; }
@keyframes pulse { 0%,100% { opacity: 1; transform: scale(1);} 50% { opacity: .4; transform: scale(.7);} }
.ticker-track { flex: 1; overflow: hidden; position: relative; }
.ticker-move {
  display: inline-flex; gap: 0; white-space: nowrap; padding: 10px 0;
  animation: ticker-rtl var(--ticker-speed, 40s) linear infinite;
}
.ticker:hover .ticker-move { animation-play-state: paused; }
@keyframes ticker-rtl { from { transform: translateX(0); } to { transform: translateX(50%); } }
.ticker-item {
  color: #fff; padding: 0 26px; display: inline-flex; align-items: center; gap: 10px; font-weight: 600;
  border-inline-start: 1px solid rgba(255,255,255,.15);
}
.ticker-item:hover { color: var(--gold-light); }
.ticker-item .tag { background: rgba(212,166,74,.2); color: var(--gold-light); font-size: .75rem; padding: 1px 10px; border-radius: 20px; }
.ticker-item .apply-now { background: var(--gold); color: var(--navy-deep); font-size: .75rem; padding: 2px 12px; border-radius: 20px; font-weight: 800; }

/* ============ الهيرو ============ */
.hero {
  background:
    radial-gradient(circle at 15% 20%, rgba(212,166,74,.18), transparent 40%),
    radial-gradient(circle at 85% 80%, rgba(255,255,255,.06), transparent 45%),
    linear-gradient(135deg, var(--navy) 0%, var(--navy-deep) 100%);
  color: #fff;
  padding: 70px 0 110px;
  position: relative;
  overflow: hidden;
}
.hero::after {
  content: ''; position: absolute; inset: auto 0 -1px 0; height: 70px;
  background: var(--bg);
  clip-path: ellipse(75% 100% at 50% 100%);
}
.hero .container { display: grid; grid-template-columns: 1.3fr 1fr; gap: 40px; align-items: center; position: relative; z-index: 1; }
.hero h1 { font-size: clamp(1.8rem, 3.6vw, 2.8rem); font-weight: 800; line-height: 1.45; margin-bottom: 16px; }
.hero h1 span { background: var(--gold-grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero p { color: #cfd8ea; font-size: 1.08rem; max-width: 560px; margin-bottom: 28px; }
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; }
.hero-logo { display: flex; justify-content: center; }
.hero-logo img { width: min(330px, 80%); filter: drop-shadow(0 24px 40px rgba(0,0,0,.45)); animation: float 6s ease-in-out infinite; }
@keyframes float { 0%,100% { transform: translateY(0);} 50% { transform: translateY(-12px);} }
.hero-stats { display: flex; gap: 30px; margin-top: 36px; flex-wrap: wrap; }
.hero-stats div strong { display: block; font-size: 1.8rem; color: var(--gold-light); font-weight: 800; line-height: 1.2; }
.hero-stats div span { color: #b9c4dc; font-size: .88rem; }

/* رقم المدرسة */
.hero-phone { display: inline-flex; align-items: center; gap: 12px; margin-top: 22px; color: #fff; background: rgba(255,255,255,.07); border: 1px solid rgba(212,166,74,.45); border-radius: 14px; padding: 8px 18px 8px 22px; }
.hero-phone:hover { color: #fff; background: rgba(255,255,255,.12); }
.hero-phone .ic { width: 42px; height: 42px; border-radius: 50%; background: var(--gold-grad-soft); display: grid; place-items: center; font-size: 1.2rem; }
.hero-phone small { display: block; color: #c8d2e6; font-size: .8rem; line-height: 1.4; }
.hero-phone b { display: block; font-size: 1.45rem; letter-spacing: 1.5px; color: var(--gold-light); line-height: 1.3; }
.contact-band { background: linear-gradient(135deg, var(--navy) 0%, var(--navy-deep) 100%); color: #fff; padding: 34px 0; margin-top: 30px; border-top: 4px solid var(--gold); }
.contact-band .container { display: flex; align-items: center; justify-content: space-between; gap: 20px; flex-wrap: wrap; }
.contact-band h3 { font-size: 1.35rem; }
.contact-band p { color: #c8d2e6; }
.contact-band .btn { font-size: 1.3rem; letter-spacing: 1px; }
.site-footer { margin-top: 0; }

/* ============ الأزرار ============ */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 11px 24px; border-radius: 11px; border: 0; cursor: pointer;
  font-family: inherit; font-size: .95rem; font-weight: 700; transition: .2s; line-height: 1.4;
  white-space: nowrap;
}
.btn-gold { background: var(--gold-grad-soft); color: var(--navy-deep); box-shadow: 0 6px 18px rgba(212,166,74,.35); }
.btn-gold:hover { transform: translateY(-2px); color: var(--navy-deep); box-shadow: 0 10px 24px rgba(212,166,74,.45); }
.btn-navy { background: var(--navy); color: #fff; }
.btn-navy:hover { background: var(--navy-dark); color: #fff; }
.btn-outline { background: transparent; color: var(--navy); border: 1.5px solid var(--navy); }
.btn-outline:hover { background: var(--navy); color: #fff; }
.btn-ghost-light { background: rgba(255,255,255,.08); color: #fff; border: 1.5px solid rgba(255,255,255,.3); }
.btn-ghost-light:hover { background: rgba(255,255,255,.16); color: #fff; }
.btn-light { background: var(--navy-50); color: var(--navy); }
.btn-light:hover { background: #dde5f3; }
.btn-danger { background: #fdecea; color: var(--red); }
.btn-danger:hover { background: var(--red); color: #fff; }
.btn-success { background: var(--green); color: #fff; }
.btn-success:hover { filter: brightness(1.1); color: #fff; }
.btn-sm { padding: 6px 14px; font-size: .85rem; border-radius: 9px; }
.btn-lg { padding: 14px 32px; font-size: 1.05rem; }
.btn-block { width: 100%; }

/* ============ الأقسام ============ */
.section { padding: 50px 0; }
.section-head { text-align: center; margin-bottom: 36px; }
.section-head h2 { font-size: 1.9rem; color: var(--navy); font-weight: 800; }
.section-head .bar { width: 90px; height: 4px; background: var(--gold-grad); border-radius: 4px; margin: 10px auto 12px; }
.section-head p { color: var(--muted); }

/* ============ فلتر الفئات ============ */
.cat-filter { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; margin-bottom: 30px; }
.cat-filter button {
  font-family: inherit; border: 1.5px solid var(--line); background: #fff; color: var(--ink);
  padding: 8px 18px; border-radius: 30px; cursor: pointer; font-weight: 600; font-size: .92rem; transition: .2s;
}
.cat-filter button:hover { border-color: var(--gold); }
.cat-filter button.active { background: var(--navy); color: #fff; border-color: var(--navy); }
.cat-filter button .n { background: var(--navy-50); color: var(--navy); border-radius: 20px; padding: 0 8px; margin-inline-start: 6px; font-size: .8rem; }
.cat-filter button.active .n { background: var(--gold); color: var(--navy-deep); }

/* ============ كروت الوظائف ============ */
.jobs-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(330px, 1fr)); gap: 22px; }
.job-card {
  background: #fff; border-radius: var(--radius); padding: 24px; box-shadow: var(--shadow);
  border: 1px solid var(--line); position: relative; overflow: hidden; transition: .25s;
  display: flex; flex-direction: column;
}
.job-card::before { content: ''; position: absolute; top: 0; right: 0; left: 0; height: 4px; background: var(--gold-grad); transform: scaleX(0); transform-origin: right; transition: .35s; }
.job-card:hover { transform: translateY(-5px); box-shadow: var(--shadow-lg); }
.job-card:hover::before { transform: scaleX(1); }
.job-card .job-top { display: flex; align-items: flex-start; gap: 14px; margin-bottom: 12px; }
.job-card .job-icon { width: 52px; height: 52px; min-width: 52px; border-radius: 12px; background: var(--navy-50); display: grid; place-items: center; font-size: 1.6rem; }
.job-card h3 { font-size: 1.15rem; color: var(--navy); font-weight: 800; line-height: 1.5; }
.job-card .cat { font-size: .82rem; color: var(--gold-dark); font-weight: 700; }
.job-card .new-tag { position: absolute; top: 16px; left: 16px; background: #c0392b; color: #fff; font-size: .72rem; padding: 2px 10px; border-radius: 20px; font-weight: 700; }
.job-meta { display: flex; flex-wrap: wrap; gap: 8px; margin: 6px 0 14px; }
.job-meta span { background: var(--bg); color: var(--muted); font-size: .8rem; padding: 3px 12px; border-radius: 20px; }
.job-card p.desc { color: var(--muted); font-size: .92rem; margin-bottom: 18px; flex: 1; }
.job-card .job-foot { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding-top: 14px; border-top: 1px dashed var(--line); }
.job-card .deadline { font-size: .82rem; color: var(--muted); }
.job-card .deadline b { color: var(--red); }

/* ============ خطوات ============ */
.steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.step { background: #fff; border-radius: var(--radius); padding: 26px 20px; text-align: center; box-shadow: var(--shadow); position: relative; }
.step .num { width: 54px; height: 54px; border-radius: 50%; margin: 0 auto 14px; display: grid; place-items: center; background: var(--navy); color: var(--gold-light); font-size: 1.4rem; font-weight: 800; border: 3px solid var(--gold); }
.step h4 { color: var(--navy); font-size: 1.05rem; margin-bottom: 6px; }
.step p { color: var(--muted); font-size: .88rem; }

/* ============ البطاقات والنماذج ============ */
.card { background: #fff; border-radius: var(--radius); box-shadow: var(--shadow); border: 1px solid var(--line); }
.card-head { padding: 18px 24px; border-bottom: 1px solid var(--line); display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; }
.card-head h3 { color: var(--navy); font-size: 1.1rem; font-weight: 800; display: flex; align-items: center; gap: 8px; }
.card-body { padding: 24px; }

.page-banner { background: linear-gradient(135deg, var(--navy) 0%, var(--navy-deep) 100%); color: #fff; padding: 40px 0 50px; position: relative; }
.page-banner::after { content: ''; position: absolute; bottom: 0; left: 0; right: 0; height: 4px; background: var(--gold-grad); }
.page-banner h1 { font-size: 1.8rem; font-weight: 800; }
.page-banner p { color: #c8d2e6; }
.breadcrumb { font-size: .85rem; color: var(--gold-light); margin-bottom: 6px; }
.breadcrumb a { color: var(--gold-light); }

.form-section { margin-bottom: 28px; }
.form-section-title {
  display: flex; align-items: center; gap: 10px; color: var(--navy); font-weight: 800; font-size: 1.05rem;
  padding-bottom: 10px; margin-bottom: 18px; border-bottom: 2px solid var(--navy-50);
}
.form-section-title .n { width: 30px; height: 30px; border-radius: 8px; background: var(--gold-grad-soft); color: var(--navy-deep); display: grid; place-items: center; font-size: .9rem; }

.grid { display: grid; gap: 18px; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
.col-span-2 { grid-column: span 2; }
.col-span-full { grid-column: 1 / -1; }

.field label { display: block; font-weight: 700; font-size: .9rem; margin-bottom: 6px; color: var(--ink); }
.field label .req { color: var(--red); }
.field .hint { font-size: .78rem; color: var(--muted); margin-top: 4px; }
.input, select.input, textarea.input {
  width: 100%; padding: 11px 14px; border: 1.5px solid var(--line); border-radius: 10px;
  font-family: inherit; font-size: .95rem; background: #fff; color: var(--ink); transition: .2s;
}
.input:focus { outline: none; border-color: var(--navy-light); box-shadow: 0 0 0 4px rgba(44,79,140,.12); }
textarea.input { resize: vertical; min-height: 100px; }
.input.ltr { direction: ltr; text-align: right; }
.field.error .input { border-color: var(--red); }
.field .err { color: var(--red); font-size: .8rem; margin-top: 4px; }

.radio-group { display: flex; gap: 10px; flex-wrap: wrap; }
.radio-group label {
  flex: 1; min-width: 110px; display: flex; align-items: center; justify-content: center; gap: 8px; cursor: pointer;
  border: 1.5px solid var(--line); border-radius: 10px; padding: 10px; font-weight: 600; margin: 0; transition: .2s;
}
.radio-group input { accent-color: var(--navy); }
.radio-group label:has(input:checked) { border-color: var(--navy); background: var(--navy-50); color: var(--navy); }

.dropzone {
  border: 2px dashed #c3cde0; border-radius: var(--radius); padding: 30px; text-align: center; cursor: pointer;
  background: var(--navy-50); transition: .2s; position: relative;
}
.dropzone:hover, .dropzone.drag { border-color: var(--gold); background: #fdf8ea; }
.dropzone input[type=file] { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.dropzone .icon { font-size: 2.4rem; }
.dropzone strong { display: block; color: var(--navy); margin: 6px 0 2px; }
.dropzone small { color: var(--muted); }
.dropzone .file-name { margin-top: 10px; color: var(--green); font-weight: 700; }

.check { display: flex; gap: 10px; align-items: flex-start; font-size: .92rem; cursor: pointer; }
.check input { margin-top: 6px; accent-color: var(--navy); width: 17px; height: 17px; }

/* ============ التنبيهات ============ */
.alert { padding: 14px 18px; border-radius: 11px; margin-bottom: 18px; font-weight: 600; border-inline-start: 4px solid; }
.alert-success { background: #e8f6ef; color: #146c45; border-color: var(--green); }
.alert-error { background: #fdecea; color: #a12a1e; border-color: var(--red); }
.alert-info { background: var(--navy-50); color: var(--navy); border-color: var(--navy); }
.alert-warning { background: #fff6e0; color: #8a5d00; border-color: var(--amber); }

/* ============ الشارات ============ */
.badge { display: inline-block; padding: 3px 12px; border-radius: 20px; font-size: .8rem; font-weight: 700; white-space: nowrap; }
.badge-blue { background: #e7efff; color: var(--blue); }
.badge-amber { background: #fff4dc; color: #9a6500; }
.badge-purple { background: #f0eafd; color: var(--purple); }
.badge-green { background: #e3f5ec; color: var(--green); }
.badge-gold { background: #fbf1d6; color: var(--gold-dark); }
.badge-red { background: #fdecea; color: var(--red); }
.badge-gray { background: #eef0f4; color: var(--muted); }

/* ============ صفحة النجاح والمتابعة ============ */
.success-box { text-align: center; padding: 40px 24px; }
.success-box .check-icon { width: 90px; height: 90px; border-radius: 50%; background: #e3f5ec; color: var(--green); display: grid; place-items: center; margin: 0 auto 18px; font-size: 3rem; }
.code-box { display: inline-block; background: var(--navy); color: var(--gold-light); font-size: 1.7rem; font-weight: 800; letter-spacing: 3px; padding: 12px 30px; border-radius: 12px; direction: ltr; margin: 14px 0; border: 2px dashed var(--gold); }

.timeline { position: relative; padding-inline-start: 30px; }
.timeline::before { content: ''; position: absolute; right: 9px; top: 6px; bottom: 6px; width: 2px; background: var(--line); }
.tl-item { position: relative; padding-bottom: 22px; }
.tl-item::before { content: ''; position: absolute; right: -27px; top: 6px; width: 14px; height: 14px; border-radius: 50%; background: #fff; border: 3px solid #c3cde0; }
.tl-item.done::before { background: var(--navy); border-color: var(--gold); }
.tl-item.current::before { background: var(--gold); border-color: var(--navy); box-shadow: 0 0 0 5px rgba(212,166,74,.25); }
.tl-item h5 { font-size: 1rem; color: var(--navy); }
.tl-item small { color: var(--muted); }

.progress-steps { display: flex; justify-content: space-between; position: relative; margin: 20px 0 34px; }
.progress-steps::before { content: ''; position: absolute; top: 20px; right: 5%; left: 5%; height: 4px; background: var(--line); border-radius: 4px; }
.progress-steps .ps { position: relative; z-index: 1; text-align: center; flex: 1; }
.progress-steps .ps .c { width: 44px; height: 44px; margin: 0 auto 8px; border-radius: 50%; background: #fff; border: 3px solid var(--line); display: grid; place-items: center; font-weight: 800; color: var(--muted); }
.progress-steps .ps.done .c { background: var(--navy); border-color: var(--gold); color: var(--gold-light); }
.progress-steps .ps.reject .c { background: var(--red); border-color: var(--red); color: #fff; }
.progress-steps .ps span { font-size: .85rem; font-weight: 700; color: var(--muted); }
.progress-steps .ps.done span { color: var(--navy); }

.interview-card { background: linear-gradient(135deg, var(--navy) 0%, var(--navy-dark) 100%); color: #fff; border-radius: var(--radius); padding: 24px; position: relative; overflow: hidden; }
.interview-card::after { content: '📅'; position: absolute; left: 18px; top: 10px; font-size: 5rem; opacity: .12; }
.interview-card h4 { color: var(--gold-light); margin-bottom: 14px; font-size: 1.15rem; }
.interview-card .row { display: flex; gap: 10px; margin-bottom: 8px; }
.interview-card .row b { min-width: 90px; color: #b9c4dc; font-weight: 600; }

.info-table { width: 100%; border-collapse: collapse; }
.info-table th, .info-table td { padding: 10px 12px; border-bottom: 1px solid var(--line); text-align: right; vertical-align: top; }
.info-table th { width: 170px; color: var(--muted); font-weight: 600; font-size: .9rem; background: #fafbfd; }

/* ============ الفوتر ============ */
.site-footer { background: var(--navy-deep); color: #b9c4dc; margin-top: 60px; }
.site-footer .container { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 30px; padding: 40px 0; }
.site-footer h4 { color: var(--gold-light); margin-bottom: 12px; }
.site-footer a { color: #b9c4dc; display: block; padding: 3px 0; }
.site-footer a:hover { color: #fff; }
.site-footer .foot-brand { display: flex; gap: 14px; align-items: center; margin-bottom: 12px; }
.site-footer .foot-brand img { height: 70px; }
.copy { text-align: center; padding: 14px; border-top: 1px solid rgba(255,255,255,.08); font-size: .85rem; }

/* ============ الحالات الفارغة ============ */
.empty { text-align: center; padding: 50px 20px; color: var(--muted); }
.empty .ic { font-size: 3rem; margin-bottom: 10px; }

/* =====================================================
   لوحة التحكم
   ===================================================== */
.admin-body { background: #f1f4f9; flex-direction: row; }
.sidebar {
  width: 260px; min-width: 260px; background: var(--navy); color: #fff; min-height: 100vh;
  position: sticky; top: 0; height: 100vh; overflow-y: auto; display: flex; flex-direction: column;
}
.sidebar .side-brand { text-align: center; padding: 24px 16px 18px; border-bottom: 1px solid rgba(255,255,255,.08); }
.sidebar .side-brand img { width: 96px; margin: 0 auto 8px; filter: drop-shadow(0 6px 12px rgba(0,0,0,.35)); }
.sidebar .side-brand strong { display: block; font-size: 1rem; }
.sidebar .side-brand small { color: var(--gold-light); font-size: .78rem; }
.side-nav { padding: 14px 12px; flex: 1; }
.side-nav .grp { font-size: .72rem; color: #8a9ac0; padding: 14px 12px 6px; font-weight: 700; letter-spacing: .5px; }
.side-nav a { display: flex; align-items: center; gap: 12px; color: #d3dcef; padding: 10px 14px; border-radius: 10px; font-weight: 600; font-size: .93rem; margin-bottom: 2px; }
.side-nav a .ic { width: 22px; text-align: center; }
.side-nav a:hover { background: rgba(255,255,255,.07); color: #fff; }
.side-nav a.active { background: var(--gold-grad-soft); color: var(--navy-deep); font-weight: 800; }
.side-nav a .cnt { margin-inline-start: auto; background: #c0392b; color: #fff; font-size: .72rem; padding: 0 8px; border-radius: 20px; }
.side-foot { padding: 14px; border-top: 1px solid rgba(255,255,255,.08); font-size: .85rem; }
.side-foot a { color: #ffb4ab; }

.admin-main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.topbar { background: #fff; padding: 14px 28px; display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 50; }
.topbar h1 { font-size: 1.25rem; color: var(--navy); font-weight: 800; }
.topbar .user { display: flex; align-items: center; gap: 10px; font-weight: 600; color: var(--muted); font-size: .9rem; }
.topbar .avatar { width: 38px; height: 38px; border-radius: 50%; background: var(--navy); color: var(--gold-light); display: grid; place-items: center; font-weight: 800; }
.admin-content { padding: 26px 28px; flex: 1; }
.side-toggle { display: none; background: none; border: 0; font-size: 1.5rem; cursor: pointer; color: var(--navy); }

.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(165px, 1fr)); gap: 18px; margin-bottom: 24px; }
.stat { background: #fff; border-radius: var(--radius); padding: 20px; box-shadow: var(--shadow); display: flex; align-items: center; gap: 16px; border: 1px solid var(--line); position: relative; overflow: hidden; }
.stat::after { content: ''; position: absolute; bottom: 0; right: 0; left: 0; height: 3px; background: var(--c, var(--navy)); }
.stat .ic { width: 54px; height: 54px; min-width: 54px; border-radius: 14px; display: grid; place-items: center; font-size: 1.5rem; background: var(--bgc, var(--navy-50)); }
.stat strong { display: block; font-size: 1.8rem; font-weight: 800; line-height: 1.1; color: var(--ink); }
.stat span { color: var(--muted); font-size: .85rem; font-weight: 600; }
a.stat:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); }

.dash-grid { display: grid; grid-template-columns: 1.4fr 1fr; gap: 22px; margin-bottom: 22px; }

.bars .bar-row { margin-bottom: 14px; }
.bars .bar-row .lbl { display: flex; justify-content: space-between; font-size: .9rem; font-weight: 600; margin-bottom: 5px; }
.bars .bar-row .lbl b { color: var(--navy); }
.bars .track { height: 11px; background: var(--navy-50); border-radius: 10px; overflow: hidden; }
.bars .fill { height: 100%; border-radius: 10px; background: var(--navy); transition: width 1s; }
.bars .fill.gold { background: var(--gold-grad-soft); }

.donut-wrap { display: flex; align-items: center; gap: 24px; flex-wrap: wrap; justify-content: center; }
.donut { width: 180px; height: 180px; border-radius: 50%; position: relative; }
.donut::after { content: ''; position: absolute; inset: 28px; background: #fff; border-radius: 50%; }
.donut .center { position: absolute; inset: 0; display: grid; place-items: center; z-index: 1; text-align: center; }
.donut .center strong { font-size: 1.8rem; color: var(--navy); display: block; line-height: 1; }
.donut .center small { color: var(--muted); }
.legend { list-style: none; }
.legend li { display: flex; align-items: center; gap: 8px; font-size: .88rem; margin-bottom: 6px; }
.legend i { width: 12px; height: 12px; border-radius: 4px; display: inline-block; }
.legend b { margin-inline-start: auto; padding-inline-start: 14px; }

/* جدول البيانات */
.table-wrap { overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; font-size: .9rem; }
.table th { background: #f7f9fc; color: var(--muted); font-weight: 700; text-align: right; padding: 12px 14px; border-bottom: 2px solid var(--line); white-space: nowrap; font-size: .83rem; }
.table td { padding: 12px 14px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.table tr:hover td { background: #fafbfe; }
.table .name { font-weight: 700; color: var(--navy); }
.table .sub { font-size: .78rem; color: var(--muted); }
.table .actions { display: flex; gap: 6px; flex-wrap: wrap; }
.table input[type=checkbox] { accent-color: var(--navy); width: 16px; height: 16px; }

.filters { display: flex; gap: 10px; flex-wrap: wrap; align-items: flex-end; }
.filters .field { min-width: 150px; flex: 1; }
.filters .field label { font-size: .8rem; }
.filters .input { padding: 8px 12px; font-size: .88rem; }

.status-tabs { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 18px; }
.status-tabs a { padding: 7px 16px; border-radius: 30px; background: #fff; border: 1px solid var(--line); color: var(--ink); font-weight: 600; font-size: .88rem; }
.status-tabs a.active { background: var(--navy); color: #fff; border-color: var(--navy); }
.status-tabs a .n { background: var(--navy-50); color: var(--navy); border-radius: 20px; padding: 0 8px; margin-inline-start: 4px; font-size: .78rem; }
.status-tabs a.active .n { background: var(--gold); color: var(--navy-deep); }

.pagination { display: flex; gap: 6px; justify-content: center; margin-top: 20px; flex-wrap: wrap; }
.pagination a, .pagination span { min-width: 38px; height: 38px; display: grid; place-items: center; border-radius: 10px; background: #fff; border: 1px solid var(--line); font-weight: 700; padding: 0 10px; }
.pagination .current { background: var(--navy); color: #fff; border-color: var(--navy); }

.bulk-bar { display: none; background: var(--navy); color: #fff; padding: 10px 16px; border-radius: 12px; margin-bottom: 14px; align-items: center; gap: 12px; flex-wrap: wrap; }
.bulk-bar.show { display: flex; }
.bulk-bar select { padding: 6px 10px; border-radius: 8px; border: 0; font-family: inherit; }

.stars { display: inline-flex; direction: ltr; gap: 2px; }
.stars input { display: none; }
.stars label { font-size: 1.6rem; color: #d6dbe5; cursor: pointer; transition: .15s; }
.stars label:hover, .stars label:hover ~ label, .stars input:checked ~ label { color: var(--gold); }
.stars { flex-direction: row-reverse; }
.stars-static { color: var(--gold); letter-spacing: 1px; }

.detail-grid { display: grid; grid-template-columns: 1.5fr 1fr; gap: 22px; }
.applicant-head { display: flex; align-items: center; gap: 18px; }
.applicant-head .av { width: 70px; height: 70px; border-radius: 18px; background: var(--gold-grad-soft); color: var(--navy-deep); display: grid; place-items: center; font-size: 1.8rem; font-weight: 800; }
.applicant-head h2 { color: var(--navy); font-size: 1.35rem; }

/* تسجيل الدخول */
.login-page { min-height: 100vh; display: grid; grid-template-columns: 1fr 1fr; }
.login-side { background: radial-gradient(circle at 30% 30%, rgba(212,166,74,.2), transparent 50%), linear-gradient(135deg, var(--navy) 0%, var(--navy-deep) 100%); color: #fff; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 40px; text-align: center; position: relative; }
.login-side::after { content: ''; position: absolute; top: 0; bottom: 0; left: 0; width: 5px; background: var(--gold-grad); }
.login-side img { width: 240px; margin-bottom: 20px; filter: drop-shadow(0 20px 40px rgba(0,0,0,.4)); }
.login-side h2 { font-size: 1.6rem; }
.login-side p { color: #c8d2e6; }
.login-form { display: flex; align-items: center; justify-content: center; padding: 40px; background: #fff; }
.login-form .box { width: min(400px, 100%); }
.login-form h1 { color: var(--navy); font-size: 1.7rem; margin-bottom: 4px; }
.login-form .sub { color: var(--muted); margin-bottom: 28px; }

/* ============ الطباعة / التقارير (A4 طولي رسمي) ============ */
.report-head, .report-foot, .report-sign { display: none; }
.report-head .rh-top { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 10px; }
.report-head .rh-right { text-align: right; font-weight: 700; line-height: 1.7; color: var(--navy); }
.report-head .rh-left { text-align: left; line-height: 1.8; font-size: 11px; }
.report-head .rh-left b { color: var(--navy); }
.report-head img { height: 82px; margin: 0 auto; }
.report-head .rh-rule { height: 4px; border-top: 2px solid var(--navy); border-bottom: 1px solid var(--gold); margin: 8px 0 10px; }
.report-head .rh-title { text-align: center; }
.report-head .rh-title h2 { display: inline-block; color: var(--navy); font-size: 17px; font-weight: 800; border: 1.5px solid var(--navy); padding: 3px 26px; border-radius: 6px; background: #f3f6fb; }
.report-head .rh-title div { font-size: 11px; color: #444; margin-top: 4px; }
.report-sign div { text-align: center; min-width: 150px; font-weight: 700; color: var(--navy); }
.report-sign div span { display: block; border-top: 1px dotted #777; margin-top: 42px; padding-top: 4px; font-weight: 400; color: #555; font-size: 11px; }
.report-foot { position: fixed; bottom: 0; left: 0; right: 0; border-top: 1px solid var(--gold); padding-top: 3px; font-size: 9.5px; color: #555; justify-content: space-between; }

@media print {
  @page { size: A4 portrait; margin: 12mm 11mm 16mm; }
  html, body, .admin-body { background: #fff !important; display: block; font-size: 11px; line-height: 1.55; color: #111; }
  .sidebar, .topbar, .no-print, .site-header, .site-footer, .ticker, .filters, .pagination, .status-tabs, .bulk-bar, .gold-line, .alert { display: none !important; }
  .admin-main { display: block; }
  .admin-content { padding: 0; }
  .card { box-shadow: none !important; border: 0 !important; margin: 0 !important; }
  .card-body { padding: 0 !important; }
  .card-head { padding: 6px 0 !important; border: 0 !important; }
  .report-head { display: block !important; margin-bottom: 10px; }
  .report-foot { display: flex !important; }
  .report-sign { display: flex !important; justify-content: space-around; margin-top: 34px; page-break-inside: avoid; }
  .table-wrap { overflow: visible !important; }
  .table { font-size: 10px; width: 100%; page-break-inside: auto; }
  .table tr { page-break-inside: avoid; }
  .table thead { display: table-header-group; }
  .table th { background: var(--navy) !important; color: #fff !important; padding: 5px 6px; font-size: 10px; white-space: normal; }
  .table td { padding: 4px 6px; border: 1px solid #c9d0dc; }
  .table th { border: 1px solid var(--navy); }
  .table tr:nth-child(even) td { background: #f6f8fb !important; }
  .table .sub { font-size: 9px; }
  .table a { color: #111; }
  .print-hide { display: none !important; }
  .badge { border: 0; padding: 0; background: none !important; font-size: 10px; color: #111 !important; font-weight: 600; }
  .detail-grid { display: block !important; }
  .info-table th, .info-table td { padding: 4px 8px; border: 1px solid #d5dbe5; font-size: 10.5px; }
  h4 { page-break-after: avoid; }
  .page-break { page-break-before: always; }
  * { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}

/* ============ متجاوب ============ */
@media (max-width: 992px) {
  .hero .container { grid-template-columns: 1fr; text-align: center; }
  .hero p { margin-inline: auto; }
  .hero-actions, .hero-stats { justify-content: center; }
  .hero-logo { order: -1; }
  .hero-logo img { width: 200px; }
  .steps { grid-template-columns: repeat(2, 1fr); }
  .dash-grid, .detail-grid { grid-template-columns: 1fr; }
  .site-footer .container { grid-template-columns: 1fr; }
  .grid-4 { grid-template-columns: repeat(2, 1fr); }

  .sidebar { position: fixed; right: -280px; z-index: 200; transition: .3s; }
  .sidebar.open { right: 0; box-shadow: -10px 0 40px rgba(0,0,0,.3); }
  .side-toggle { display: block; }
  .login-page { grid-template-columns: 1fr; }
  .login-side { padding: 30px; }
  .login-side img { width: 130px; }
  .login-side::after { top: auto; width: auto; height: 5px; right: 0; }
}
@media (max-width: 768px) {
  .nav-toggle { display: block; }
  .main-nav { position: absolute; top: 100%; right: 0; left: 0; background: var(--navy-dark); flex-direction: column; align-items: stretch; padding: 10px; display: none; }
  .main-nav.open { display: flex; }
  .main-nav a.btn-admin { margin: 6px 0 0; text-align: center; }
  .brand img { height: 46px; }
  .brand-text strong { font-size: 1rem; }
  .brand-text small { display: none; }
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .col-span-2 { grid-column: auto; }
  .jobs-grid { grid-template-columns: 1fr; }
  .steps { grid-template-columns: 1fr; }
  .progress-steps .ps span { font-size: .7rem; }
  .progress-steps .ps .c { width: 34px; height: 34px; font-size: .8rem; }
  .progress-steps::before { top: 15px; }
  .admin-content { padding: 18px 14px; }
  .topbar { padding: 12px 16px; }
  .ticker-label { padding: 10px 12px; font-size: .85rem; }
  .card-body { padding: 18px; }
  .code-box { font-size: 1.2rem; padding: 10px 16px; }
}

/* أعمدة تظهر في الطباعة فقط */
.report-only { display: none; }
@media print { .report-only { display: table-cell !important; } }
