/* =====================================================
   ASAP Academy — LPP System Design Tokens
   ===================================================== */
:root {
  /* Brand colors extracted from the ASAP Academy logo */
  --brand-deep: #0F3B3A;         /* dark green */
  --brand-deep-2: #0A2A29;
  --brand-cyan: #2FB4D9;          /* accent cyan */
  --brand-cyan-soft: #E8F6FB;
  --brand-green-soft: #EAF3F1;
  --ivory: #FBFAF6;               /* warm off-white */
  --white: #FFFFFF;
  --ink: #0E1B1B;
  --ink-2: #34474B;
  --muted: #7D8B8E;
  --line: #E4E8E9;
  --line-2: #EEF1F1;
  --danger: #C0392B;
  --success: #1E8A5A;
  --warning: #B8860B;

  --radius-sm: 10px;
  --radius: 14px;
  --radius-lg: 22px;
  --shadow-sm: 0 1px 2px rgba(15, 59, 58, 0.05), 0 1px 3px rgba(15, 59, 58, 0.06);
  --shadow: 0 6px 20px -8px rgba(15, 59, 58, 0.18), 0 2px 6px rgba(15, 59, 58, 0.06);
  --shadow-lg: 0 24px 60px -20px rgba(15, 59, 58, 0.22);
  --font-ar: 'IBM Plex Sans Arabic', 'Tajawal', system-ui, -apple-system, sans-serif;
  --font-serif: 'Amiri', 'Noto Naskh Arabic', serif;
}

/* ---------- reset ---------- */
* { box-sizing: border-box; }
html, body { padding: 0; margin: 0; }
body {
  font-family: var(--font-ar);
  background: var(--ivory);
  color: var(--ink);
  direction: rtl;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  line-height: 1.6;
}
a { color: var(--brand-deep); text-decoration: none; }
img { max-width: 100%; display: block; }
button { font-family: inherit; cursor: pointer; }

/* ---------- layout ---------- */
.container { max-width: 1180px; margin: 0 auto; padding: 0 24px; }
.container-sm { max-width: 780px; margin: 0 auto; padding: 0 24px; }

/* ---------- top nav ---------- */
.top-nav {
  background: var(--white);
  border-bottom: 1px solid var(--line);
  padding: 18px 0;
  position: sticky; top: 0; z-index: 20;
  backdrop-filter: blur(8px);
}
.top-nav .inner {
  display: flex; justify-content: space-between; align-items: center;
}
.brand { display: flex; align-items: center; gap: 12px; }
.brand img { height: 44px; }
.brand-text { display: flex; flex-direction: column; line-height: 1.15; }
.brand-text .primary { font-weight: 700; color: var(--brand-deep); font-size: 16px; }
.brand-text .sub { font-size: 12px; color: var(--muted); }
.top-nav .links { display: flex; gap: 8px; align-items: center; }
.top-nav .links a {
  padding: 8px 14px; border-radius: 999px; font-size: 14px; color: var(--ink-2);
}
.top-nav .links a:hover { background: var(--brand-green-soft); color: var(--brand-deep); }

/* ---------- hero ---------- */
.hero {
  background:
    radial-gradient(circle at 88% 12%, rgba(47,180,217,0.10) 0%, transparent 50%),
    linear-gradient(180deg, var(--white) 0%, var(--ivory) 100%);
  padding: 80px 0 60px;
  border-bottom: 1px solid var(--line);
  position: relative;
  overflow: hidden;
}
.hero::before {
  content: ''; position: absolute; inset: auto -80px -40px auto;
  width: 380px; height: 380px; border-radius: 50%;
  background: radial-gradient(circle, rgba(47,180,217,0.10), transparent 70%);
  pointer-events: none;
}
.hero-eyebrow {
  display: inline-block; padding: 6px 14px; border-radius: 999px;
  background: var(--brand-cyan-soft); color: var(--brand-deep);
  font-size: 13px; font-weight: 500; letter-spacing: 0.5px;
  border: 1px solid rgba(47,180,217,0.25);
}
.hero h1 {
  margin: 22px 0 14px; line-height: 1.25; color: var(--brand-deep);
  font-weight: 700; letter-spacing: -0.5px; max-width: 780px;
  display: flex; flex-direction: column; gap: 6px;
}
.hero h1 .hero-title-ar { font-size: 44px; }
.hero h1 .hero-title-en {
  font-size: 22px; color: var(--ink-2); font-weight: 500;
  letter-spacing: 0.3px; direction: ltr; text-align: right;
  font-family: 'Segoe UI', -apple-system, system-ui, sans-serif;
}
.hero h1 .accent {
  color: var(--brand-cyan); letter-spacing: 1px;
  padding-inline-start: 8px; font-family: 'Segoe UI', sans-serif;
}
@media (max-width: 700px) { .hero h1 .hero-title-ar { font-size: 34px; } }
.hero p.lead {
  font-size: 18px; color: var(--ink-2); max-width: 680px; margin: 0 0 30px;
}
.hero-meta { display: flex; gap: 28px; flex-wrap: wrap; margin-top: 8px; }
.hero-meta .m {
  display: flex; align-items: center; gap: 10px; font-size: 14px; color: var(--ink-2);
}
.hero-meta .m .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--brand-cyan); }

/* ---------- cards ---------- */
.card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  padding: 40px;
}
.card.tight { padding: 28px; }
.card-title {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 24px;
}
.card-title h2 { margin: 0; color: var(--brand-deep); font-size: 22px; font-weight: 700; }
.card-title .hint { color: var(--muted); font-size: 13px; }

/* ---------- progress ---------- */
.progress {
  display: flex; align-items: center; justify-content: space-between;
  margin: 30px 0 40px; gap: 6px;
}
.progress .step {
  flex: 1;
  display: flex; align-items: center; gap: 10px; min-width: 0;
}
.progress .step .num {
  width: 34px; height: 34px; border-radius: 50%;
  display: grid; place-items: center; background: var(--white);
  border: 2px solid var(--line); color: var(--muted);
  font-weight: 700; font-size: 14px; flex: none;
  transition: all 0.25s ease;
}
.progress .step .label { font-size: 13px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.progress .step.active .num { background: var(--brand-deep); border-color: var(--brand-deep); color: var(--white); box-shadow: 0 6px 14px rgba(15,59,58,0.25); }
.progress .step.active .label { color: var(--brand-deep); font-weight: 600; }
.progress .step.done .num { background: var(--brand-cyan); border-color: var(--brand-cyan); color: var(--white); }
.progress .step.done .label { color: var(--ink-2); }
.progress .bar {
  flex: 1; height: 2px; background: var(--line); margin: 0 -6px; min-width: 10px;
  transition: background 0.25s ease;
}
.progress .bar.done { background: var(--brand-cyan); }

/* ---------- form ---------- */
.form-step { display: none; animation: fadeIn 0.35s ease; }
.form-step.active { display: block; }
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: none; }
}

.form-grid {
  display: grid; grid-template-columns: repeat(2, 1fr); gap: 22px;
}
.form-grid .full { grid-column: 1 / -1; }
@media (max-width: 700px) { .form-grid { grid-template-columns: 1fr; } }

.field label {
  display: block; font-size: 14px; color: var(--ink); font-weight: 600; margin-bottom: 8px;
}
.field label .req { color: var(--danger); margin-inline-start: 3px; }
.field .hint { display: block; margin-top: 6px; font-size: 12px; color: var(--muted); }
.field input, .field select, .field textarea {
  width: 100%; padding: 13px 14px; font-family: inherit; font-size: 15px;
  background: var(--white); color: var(--ink); border: 1px solid var(--line);
  border-radius: var(--radius-sm); outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.field input:focus, .field select:focus, .field textarea:focus {
  border-color: var(--brand-cyan);
  box-shadow: 0 0 0 4px rgba(47,180,217,0.15);
}
.field textarea { resize: vertical; min-height: 100px; }
.field.error input, .field.error select, .field.error textarea { border-color: var(--danger); }
.field .error-msg { color: var(--danger); font-size: 12px; margin-top: 6px; display: none; }
.field.error .error-msg { display: block; }

/* radio card group */
.radio-group { display: grid; gap: 12px; grid-template-columns: 1fr 1fr; }
@media (max-width: 700px) { .radio-group { grid-template-columns: 1fr; } }
.radio-card {
  position: relative; padding: 16px 18px; border-radius: var(--radius);
  border: 1.5px solid var(--line); cursor: pointer; background: var(--white);
  transition: all 0.15s ease;
  display: flex; align-items: center; gap: 12px;
}
.radio-card:hover { border-color: var(--brand-cyan); background: var(--brand-cyan-soft); }
.radio-card input { position: absolute; opacity: 0; inset: 0; cursor: pointer; }
.radio-card .indicator {
  width: 22px; height: 22px; border-radius: 50%; border: 2px solid var(--line);
  display: grid; place-items: center; flex: none;
  transition: all 0.15s ease;
}
.radio-card .indicator::after {
  content: ''; width: 10px; height: 10px; border-radius: 50%; background: var(--brand-cyan);
  transform: scale(0); transition: transform 0.15s ease;
}
.radio-card.selected { border-color: var(--brand-deep); background: var(--brand-green-soft); }
.radio-card.selected .indicator { border-color: var(--brand-deep); }
.radio-card.selected .indicator::after { transform: scale(1); background: var(--brand-deep); }
.radio-card .rc-title { font-weight: 600; color: var(--ink); font-size: 15px; }
.radio-card .rc-desc { font-size: 12px; color: var(--muted); margin-top: 2px; }

/* file upload */
.file-drop {
  position: relative; border: 2px dashed var(--line); border-radius: var(--radius);
  padding: 30px 24px; text-align: center; background: var(--ivory);
  transition: all 0.15s ease;
  cursor: pointer;
}
.file-drop:hover { border-color: var(--brand-cyan); background: var(--brand-cyan-soft); }
.file-drop.has-file { border-color: var(--brand-deep); background: var(--brand-green-soft); }
.file-drop input { position: absolute; opacity: 0; inset: 0; cursor: pointer; }
.file-drop .icon { font-size: 28px; margin-bottom: 8px; }
.file-drop .primary-text { font-weight: 600; color: var(--ink); margin-bottom: 4px; }
.file-drop .secondary-text { font-size: 12px; color: var(--muted); }
.file-drop .file-name { display: block; margin-top: 8px; font-size: 13px; color: var(--brand-deep); font-weight: 600; }

/* prerequisite notice */
.prereq-notice {
  display: flex; gap: 14px; padding: 18px 20px;
  background: var(--brand-green-soft); border-inline-start: 4px solid var(--brand-deep);
  border-radius: var(--radius-sm); color: var(--ink-2); font-size: 14px;
  line-height: 1.75;
}
.prereq-notice p { margin: 4px 0 0; }
.prereq-icon {
  width: 40px; height: 40px; border-radius: 50%;
  background: var(--white); color: var(--brand-deep);
  display: grid; place-items: center; font-size: 20px; flex: none;
  border: 1.5px solid var(--brand-deep);
}

/* soft-block notice — when experience < 2 years (warning, not blocker) */
.softblock-notice {
  display: flex; gap: 14px; padding: 20px 22px; margin-top: 24px;
  background: #FDF9EE; border-inline-start: 4px solid var(--warning);
  border-radius: var(--radius-sm); color: var(--ink);
  animation: fadeIn 0.35s ease;
}
.softblock-notice h4 { margin: 0 0 6px; color: var(--warning); font-size: 15px; }
.softblock-notice p { margin: 0 0 6px; font-size: 14px; line-height: 1.75; color: var(--ink-2); }
.softblock-notice p:last-child { margin-bottom: 0; }
.softblock-icon {
  width: 40px; height: 40px; border-radius: 50%;
  background: var(--white); color: var(--warning);
  display: grid; place-items: center; font-size: 22px; flex: none;
  border: 1.5px solid var(--warning); font-weight: 700;
}

/* requirement blocks — numbered */
.requirement-block {
  margin-top: 28px; padding: 22px 22px 18px;
  background: var(--ivory); border: 1px solid var(--line);
  border-radius: var(--radius); position: relative;
}
.requirement-header {
  display: flex; gap: 14px; margin-bottom: 18px; align-items: flex-start;
}
.req-num {
  width: 34px; height: 34px; border-radius: 50%;
  background: var(--brand-deep); color: var(--white);
  display: grid; place-items: center; font-weight: 700; font-size: 15px; flex: none;
  font-family: 'Segoe UI', sans-serif;
}
.requirement-header h4 { margin: 0 0 4px; color: var(--brand-deep); font-size: 16px; font-weight: 700; }
.requirement-header p { margin: 0; font-size: 13px; color: var(--ink-2); line-height: 1.7; }

/* checkboxes */
.check-line {
  display: flex; align-items: flex-start; gap: 10px;
  padding: 12px 0; font-size: 14px; color: var(--ink-2);
}
.check-line input { margin-top: 4px; accent-color: var(--brand-deep); width: 18px; height: 18px; }
.check-line a { color: var(--brand-cyan); text-decoration: underline; }

/* buttons */
.btn {
  padding: 13px 28px; font-size: 15px; font-weight: 600; font-family: inherit;
  border: none; border-radius: var(--radius-sm); cursor: pointer;
  transition: all 0.15s ease;
  display: inline-flex; align-items: center; gap: 8px;
}
.btn-primary {
  background: var(--brand-deep); color: var(--white);
  box-shadow: 0 6px 14px -4px rgba(15,59,58,0.35);
}
.btn-primary:hover { background: var(--brand-deep-2); transform: translateY(-1px); box-shadow: 0 10px 24px -6px rgba(15,59,58,0.35); }
.btn-primary:disabled { background: var(--muted); cursor: not-allowed; transform: none; box-shadow: none; }
.btn-secondary {
  background: var(--white); color: var(--brand-deep);
  border: 1.5px solid var(--brand-deep);
}
.btn-secondary:hover { background: var(--brand-green-soft); }
.btn-accent {
  background: var(--brand-cyan); color: var(--white);
  box-shadow: 0 6px 14px -4px rgba(47,180,217,0.35);
}
.btn-accent:hover { background: #269ec0; }
.btn-danger { background: var(--white); color: var(--danger); border: 1.5px solid var(--danger); }
.btn-danger:hover { background: #FEECEC; }
.btn-ghost { background: transparent; color: var(--ink-2); }
.btn-ghost:hover { background: var(--line-2); }
.btn-sm { padding: 8px 14px; font-size: 13px; }

.form-actions {
  display: flex; justify-content: space-between; gap: 12px;
  margin-top: 36px; padding-top: 26px; border-top: 1px solid var(--line);
}
.form-actions .left { display: flex; gap: 10px; }
.form-actions .right { display: flex; gap: 10px; margin-inline-start: auto; }

/* summary review */
.review-block { padding: 18px 0; border-bottom: 1px solid var(--line-2); }
.review-block:last-child { border-bottom: none; }
.review-block h3 { margin: 0 0 12px; font-size: 15px; color: var(--brand-deep); }
.review-row { display: flex; padding: 6px 0; font-size: 14px; }
.review-row .k { min-width: 200px; color: var(--muted); }
.review-row .v { color: var(--ink); font-weight: 500; }

/* success page */
.success-wrap {
  text-align: center; padding: 40px 20px;
}
.success-badge {
  width: 88px; height: 88px; margin: 0 auto 24px;
  border-radius: 50%; background: var(--brand-green-soft);
  display: grid; place-items: center; color: var(--brand-deep); font-size: 44px;
  border: 2px solid var(--brand-deep);
}
.success-wrap h2 { color: var(--brand-deep); margin: 0 0 12px; font-size: 26px; }
.success-wrap p { color: var(--ink-2); max-width: 520px; margin: 0 auto 20px; font-size: 15px; }
.ref-badge {
  display: inline-flex; align-items: center; gap: 10px; margin: 20px 0;
  padding: 14px 22px; background: var(--brand-deep); color: var(--white);
  border-radius: var(--radius); font-weight: 700; font-size: 18px; letter-spacing: 0.5px;
}

/* footer */
.footer {
  background: var(--brand-deep); color: rgba(255,255,255,0.75);
  padding: 40px 0 30px; margin-top: 80px; font-size: 14px;
}
.footer .inner { display: flex; justify-content: space-between; align-items: center; gap: 20px; flex-wrap: wrap; }
.footer a { color: var(--brand-cyan); }
.footer .brand-text .primary { color: var(--white); }
.footer .brand-text .sub { color: rgba(255,255,255,0.55); }

/* toast */
.toast {
  position: fixed; bottom: 20px; inset-inline-start: 50%; transform: translateX(50%);
  padding: 12px 22px; background: var(--brand-deep); color: var(--white);
  border-radius: var(--radius-sm); box-shadow: var(--shadow-lg);
  opacity: 0; pointer-events: none; transition: all 0.25s ease; z-index: 100;
  font-size: 14px;
}
.toast.show { opacity: 1; transform: translateX(50%) translateY(-4px); }
.toast.error { background: var(--danger); }
.toast.success { background: var(--success); }

/* =====================================================
   Admin dashboard specific
   ===================================================== */
.admin-shell { min-height: 100vh; background: var(--ivory); }
.admin-topbar {
  background: var(--brand-deep); color: var(--white); padding: 14px 0;
}
.admin-topbar .inner { display: flex; justify-content: space-between; align-items: center; }
.admin-topbar .brand-text .primary { color: var(--white); }
.admin-topbar .brand-text .sub { color: rgba(255,255,255,0.7); }
.admin-topbar .btn-ghost { color: var(--white); }
.admin-topbar .btn-ghost:hover { background: rgba(255,255,255,0.1); }

.stats-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; margin: 32px 0; }
@media (max-width: 900px) { .stats-grid { grid-template-columns: repeat(2, 1fr); } }
.stat {
  background: var(--white); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 22px; box-shadow: var(--shadow-sm);
}
.stat .label { font-size: 13px; color: var(--muted); margin-bottom: 6px; }
.stat .value { font-size: 30px; font-weight: 700; color: var(--brand-deep); }
.stat.pending .value { color: var(--warning); }
.stat.accepted .value { color: var(--success); }
.stat.rejected .value { color: var(--danger); }

.filter-bar {
  display: flex; justify-content: space-between; align-items: center;
  background: var(--white); padding: 16px 20px; border-radius: var(--radius);
  border: 1px solid var(--line); box-shadow: var(--shadow-sm);
  margin-bottom: 16px; gap: 14px; flex-wrap: wrap;
}
.filter-bar .tabs { display: flex; gap: 6px; }
.filter-bar .tab {
  padding: 8px 14px; border-radius: 999px; font-size: 13px; color: var(--ink-2);
  cursor: pointer; border: 1px solid transparent;
}
.filter-bar .tab:hover { background: var(--line-2); }
.filter-bar .tab.active { background: var(--brand-deep); color: var(--white); }

.table-wrap {
  background: var(--white); border: 1px solid var(--line); border-radius: var(--radius);
  overflow: hidden; box-shadow: var(--shadow-sm);
}
table { width: 100%; border-collapse: collapse; }
table th, table td {
  padding: 14px 18px; text-align: right; font-size: 14px;
  border-bottom: 1px solid var(--line-2);
}
table th { background: var(--brand-green-soft); color: var(--brand-deep); font-weight: 600; font-size: 13px; }
table tr:last-child td { border-bottom: none; }
table tr:hover td { background: var(--ivory); cursor: pointer; }

.badge {
  display: inline-block; padding: 4px 10px; border-radius: 999px;
  font-size: 12px; font-weight: 600;
}
.badge.pending { background: #FDF4DB; color: var(--warning); }
.badge.accepted { background: #D9F0E3; color: var(--success); }
.badge.rejected { background: #FBE3DF; color: var(--danger); }

/* modal */
.modal-overlay {
  position: fixed; inset: 0; background: rgba(15,27,27,0.55);
  display: none; align-items: center; justify-content: center; z-index: 60;
  padding: 20px;
  backdrop-filter: blur(4px);
}
.modal-overlay.open { display: flex; }
.modal {
  background: var(--white); border-radius: var(--radius-lg); width: 100%; max-width: 780px;
  max-height: 90vh; overflow-y: auto; box-shadow: var(--shadow-lg);
}
.modal-head {
  padding: 22px 28px; border-bottom: 1px solid var(--line);
  display: flex; justify-content: space-between; align-items: center;
  position: sticky; top: 0; background: var(--white); z-index: 2;
}
.modal-head h3 { margin: 0; color: var(--brand-deep); font-size: 18px; }
.modal-body { padding: 24px 28px; }
.modal-foot { padding: 18px 28px; border-top: 1px solid var(--line); display: flex; gap: 10px; justify-content: flex-end; background: var(--ivory); border-radius: 0 0 var(--radius-lg) var(--radius-lg); }
.close-x { background: none; border: none; font-size: 22px; color: var(--muted); cursor: pointer; padding: 6px; }
.close-x:hover { color: var(--ink); }

.suggestion-banner {
  padding: 14px 18px; border-radius: var(--radius-sm);
  background: var(--brand-cyan-soft); border: 1px solid rgba(47,180,217,0.3);
  color: var(--brand-deep); font-size: 14px; margin-bottom: 20px;
  display: flex; align-items: center; gap: 12px;
}
.suggestion-banner .icon { font-size: 20px; }

/* login card */
.login-wrap {
  min-height: 100vh; display: grid; place-items: center; padding: 20px;
  background: linear-gradient(135deg, var(--brand-deep) 0%, var(--brand-deep-2) 100%);
}
.login-card {
  width: 100%; max-width: 420px; background: var(--white); border-radius: var(--radius-lg);
  padding: 40px; box-shadow: var(--shadow-lg); text-align: center;
}
.login-card img { height: 60px; margin: 0 auto 22px; }
.login-card h2 { margin: 0 0 6px; color: var(--brand-deep); font-size: 22px; }
.login-card .sub { color: var(--muted); font-size: 13px; margin-bottom: 26px; }
.login-card .field { text-align: right; margin-bottom: 16px; }
.login-card .btn-primary { width: 100%; justify-content: center; }
