@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&family=Noto+Nastaliq+Urdu:wght@400;700&display=swap');

/* ── TOKENS ─────────────────────────────── */
:root {
  --blue:        #28A0DC;
  --blue-dark:   #1a7aad;
  --blue-deeper: #0f5a82;
  --blue-light:  #e5f4fc;
  --blue-bg:     #f0f8fd;

  --text:        #1a202c;
  --text-md:     #374151;
  --muted:       #6b7280;
  --border:      #e2e8f0;
  --bg:          #f5f7fa;
  --white:       #ffffff;

  --red:         #dc2626;
  --green:       #059669;
  --amber:       #d97706;

  --shadow-xs: 0 1px 2px rgba(0,0,0,.06);
  --shadow-sm: 0 1px 3px rgba(0,0,0,.08), 0 1px 2px rgba(0,0,0,.05);
  --shadow:    0 4px 8px rgba(0,0,0,.07),  0 2px 4px rgba(0,0,0,.04);
  --shadow-lg: 0 12px 24px rgba(0,0,0,.09), 0 4px 8px rgba(0,0,0,.05);

  --r:    8px;
  --r-lg: 14px;
  --r-xl: 20px;
  --t:    180ms ease;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

body {
  font-family: 'Inter', 'Segoe UI', system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

body.rtl {
  direction: rtl;
  font-family: 'Noto Nastaliq Urdu', 'Inter', sans-serif;
}

/* ── TOPBAR ─────────────────────────────── */
.topbar {
  background: var(--white);
  border-bottom: 1px solid var(--border);
  padding: 0 28px;
  height: 64px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  position: sticky;
  top: 0;
  z-index: 999;
  box-shadow: var(--shadow-xs);
}

.topbar .brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: var(--text);
}

.topbar .brand img {
  height: 36px;
  width: auto;
}

.topbar .brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
}

.topbar .brand-name {
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--blue);
  letter-spacing: -.2px;
}

.topbar .brand-sub {
  font-size: .72rem;
  color: var(--muted);
  font-weight: 500;
  letter-spacing: .3px;
  text-transform: uppercase;
}

.topbar .actions {
  display: flex;
  gap: 8px;
  align-items: center;
}

/* ── BUTTONS ────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 9px 18px;
  border-radius: var(--r);
  font-family: inherit;
  font-size: .875rem;
  font-weight: 600;
  text-decoration: none;
  border: none;
  cursor: pointer;
  transition: var(--t);
  white-space: nowrap;
  line-height: 1;
}

.btn-primary {
  background: var(--blue);
  color: var(--white);
  box-shadow: 0 2px 8px rgba(40,160,220,.35);
}
.btn-primary:hover {
  background: var(--blue-dark);
  box-shadow: 0 4px 12px rgba(40,160,220,.4);
  transform: translateY(-1px);
}

.btn-outline-blue {
  background: transparent;
  border: 1.5px solid var(--blue);
  color: var(--blue);
}
.btn-outline-blue:hover {
  background: var(--blue-light);
}

.btn-ghost {
  background: var(--blue-light);
  color: var(--blue-dark);
  border: 1px solid rgba(40,160,220,.2);
}
.btn-ghost:hover { background: #d0ebf8; }

.btn-white {
  background: var(--white);
  color: var(--blue);
  box-shadow: var(--shadow-sm);
}
.btn-white:hover { background: var(--blue-light); }

.btn-outline-white {
  background: transparent;
  border: 1.5px solid rgba(255,255,255,.7);
  color: var(--white);
}
.btn-outline-white:hover { background: rgba(255,255,255,.12); border-color: #fff; }

/* topbar button variants */
.btn-lang {
  background: var(--bg);
  color: var(--text-md);
  border: 1px solid var(--border);
  font-size: .82rem;
}
.btn-lang:hover { background: var(--border); }

.btn-call {
  background: var(--blue);
  color: #fff;
  font-size: .82rem;
  box-shadow: 0 2px 6px rgba(40,160,220,.3);
}
.btn-call:hover { background: var(--blue-dark); }

/* ── HERO ────────────────────────────────── */
.hero-section {
  background: linear-gradient(160deg, var(--blue) 0%, var(--blue-dark) 100%);
  padding: 64px 24px 80px;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.hero-section::after {
  content: '';
  position: absolute;
  bottom: -1px; left: 0; right: 0;
  height: 52px;
  background: var(--bg);
  clip-path: ellipse(55% 100% at 50% 100%);
}

.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(255,255,255,.18);
  border: 1px solid rgba(255,255,255,.3);
  color: rgba(255,255,255,.95);
  padding: 5px 14px;
  border-radius: 999px;
  font-size: .8rem;
  font-weight: 500;
  margin-bottom: 20px;
  letter-spacing: .3px;
}

.hero-section h1 {
  font-size: 2.6rem;
  font-weight: 800;
  color: #fff;
  letter-spacing: -.4px;
  line-height: 1.2;
  margin-bottom: 14px;
}

.hero-section p {
  color: rgba(255,255,255,.82);
  font-size: 1.08rem;
  max-width: 460px;
  margin: 0 auto;
}

/* ── CARDS BELOW HERO ───────────────────── */
.cards-section {
  padding: 0 24px 56px;
  margin-top: -44px;
  position: relative;
  z-index: 5;
}

.cards-row {
  display: flex;
  gap: 20px;
  justify-content: center;
  flex-wrap: wrap;
  max-width: 740px;
  margin: 0 auto;
}

.choice-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--r-xl);
  padding: 36px 28px;
  width: 340px;
  text-decoration: none;
  color: var(--text);
  box-shadow: var(--shadow-lg);
  transition: transform var(--t), box-shadow var(--t), border-color var(--t);
  display: flex;
  flex-direction: column;
}

.choice-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 20px 40px rgba(40,160,220,.15), 0 4px 8px rgba(0,0,0,.06);
  border-color: rgba(40,160,220,.3);
}

.choice-card .c-icon {
  width: 54px;
  height: 54px;
  border-radius: 14px;
  background: var(--blue-light);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.6rem;
  margin-bottom: 16px;
  flex-shrink: 0;
}

.choice-card:nth-child(2) .c-icon {
  background: #fff3e0;
}

.choice-card h2 {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 8px;
}

.choice-card p {
  color: var(--muted);
  font-size: .9rem;
  flex: 1;
  line-height: 1.65;
}

.c-cta {
  margin-top: 20px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--blue);
  font-size: .88rem;
  font-weight: 600;
}

/* ── CONTAINER ──────────────────────────── */
.container {
  max-width: 800px;
  margin: 36px auto;
  padding: 0 20px;
}

/* ── PAGE TITLE ─────────────────────────── */
.page-title {
  margin-bottom: 28px;
}

.page-title h1 {
  font-size: 1.75rem;
  font-weight: 800;
  color: var(--text);
  letter-spacing: -.25px;
}

.page-title p {
  color: var(--muted);
  margin-top: 5px;
  font-size: .92rem;
}

/* ── CARD ────────────────────────────────── */
.card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 26px 28px;
  margin-bottom: 18px;
  box-shadow: var(--shadow-sm);
}

.sec-label {
  font-size: .82rem;
  font-weight: 700;
  color: var(--blue);
  text-transform: uppercase;
  letter-spacing: .8px;
  margin-bottom: 18px;
  padding-bottom: 10px;
  border-bottom: 2px solid var(--blue-light);
  display: flex;
  align-items: center;
  gap: 8px;
}

.sec-label::before {
  content: '';
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--blue);
  flex-shrink: 0;
}

/* ── FORM ────────────────────────────────── */
.field { margin-bottom: 20px; }

.field label {
  display: block;
  font-weight: 600;
  font-size: .9rem;
  color: var(--text-md);
  margin-bottom: 7px;
}

.req { color: var(--red); margin-left: 2px; }

.field input[type=text],
.field input[type=date],
.field input[type=password],
.field input[type=email],
.field textarea,
.field select {
  width: 100%;
  padding: 10px 13px;
  border: 1.5px solid var(--border);
  border-radius: var(--r);
  font-size: .93rem;
  font-family: inherit;
  color: var(--text);
  background: var(--white);
  transition: border-color var(--t), box-shadow var(--t);
  -webkit-appearance: none;
  appearance: none;
}

.field input:focus,
.field textarea:focus,
.field select:focus {
  outline: none;
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(40,160,220,.14);
}

.field textarea { min-height: 120px; resize: vertical; }

.field select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3E%3Cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='m6 8 4 4 4-4'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 11px center;
  background-size: 18px;
  padding-right: 36px;
}

/* custom file upload */
.file-upload-area {
  border: 2px dashed var(--border);
  border-radius: var(--r);
  padding: 22px 16px;
  text-align: center;
  cursor: pointer;
  transition: var(--t);
  background: #fafcff;
  position: relative;
}

.file-upload-area:hover {
  border-color: var(--blue);
  background: var(--blue-bg);
}

.file-upload-area input[type=file] {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
  width: 100%;
  height: 100%;
}

.file-upload-area .fu-icon {
  font-size: 1.8rem;
  margin-bottom: 6px;
  display: block;
}

.file-upload-area .fu-title {
  font-weight: 600;
  font-size: .92rem;
  color: var(--text-md);
}

.file-upload-area .fu-sub {
  font-size: .8rem;
  color: var(--muted);
  margin-top: 3px;
}

/* radio as pills */
.radio-group { display: flex; flex-direction: column; gap: 7px; }

.radio-group label {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 13px;
  border: 1.5px solid var(--border);
  border-radius: var(--r);
  cursor: pointer;
  transition: var(--t);
  font-weight: 500;
  font-size: .9rem;
  color: var(--text-md);
}

.radio-group label:hover { border-color: var(--blue); background: var(--blue-bg); }

.radio-group input[type=radio] {
  width: 17px; height: 17px;
  accent-color: var(--blue);
  flex-shrink: 0;
}

/* confirmation checkbox */
.confirm-row {
  display: flex;
  align-items: flex-start;
  gap: 11px;
  padding: 14px 16px;
  background: var(--blue-bg);
  border: 1.5px solid rgba(40,160,220,.2);
  border-radius: var(--r);
}

.confirm-row input[type=checkbox] {
  width: 17px; height: 17px;
  margin-top: 3px;
  accent-color: var(--blue);
  flex-shrink: 0;
}

.hint {
  font-size: .8rem;
  color: var(--muted);
  margin-top: 5px;
}

/* submit */
.btn-submit {
  width: 100%;
  padding: 14px;
  font-size: 1rem;
  font-weight: 700;
  font-family: inherit;
  border: none;
  cursor: pointer;
  border-radius: var(--r);
  background: var(--blue);
  color: #fff;
  box-shadow: 0 4px 16px rgba(40,160,220,.4);
  transition: var(--t);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.btn-submit:hover {
  background: var(--blue-dark);
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(40,160,220,.45);
}

/* ── ALERTS ─────────────────────────────── */
.alert {
  padding: 13px 16px;
  border-radius: var(--r);
  margin-bottom: 20px;
  font-size: .9rem;
  font-weight: 500;
  display: flex;
  align-items: flex-start;
  gap: 8px;
}

.alert-error  { background: #fef2f2; color: #b91c1c; border: 1.5px solid #fecaca; }
.alert-success{ background: #f0fdf4; color: #166534; border: 1.5px solid #bbf7d0; }

/* ── THANK YOU ──────────────────────────── */
.success-wrap {
  text-align: center;
  padding: 50px 32px;
}

.s-icon {
  width: 76px;
  height: 76px;
  border-radius: 50%;
  background: var(--green);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 2.2rem;
  margin: 0 auto 24px;
  box-shadow: 0 8px 24px rgba(5,150,105,.3);
}

.success-wrap h1 {
  font-size: 1.75rem;
  font-weight: 800;
  color: var(--text);
}

.ref-box {
  display: inline-block;
  margin: 16px 0 8px;
  padding: 14px 32px;
  border-radius: var(--r);
  background: var(--blue-light);
  border: 2px solid var(--blue);
  font-size: 1.65rem;
  font-weight: 800;
  color: var(--blue-dark);
  letter-spacing: 2px;
}

/* ── ADMIN LOGIN ────────────────────────── */
.login-page {
  min-height: 100vh;
  background: linear-gradient(160deg, var(--blue) 0%, var(--blue-deeper) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.login-box {
  background: var(--white);
  border-radius: var(--r-xl);
  padding: 44px 36px;
  width: 100%;
  max-width: 380px;
  box-shadow: 0 32px 64px rgba(0,0,0,.2);
}

.login-head {
  text-align: center;
  margin-bottom: 28px;
}

.login-head img { height: 48px; margin-bottom: 12px; }

.login-head h1 {
  font-size: 1.45rem;
  font-weight: 800;
  color: var(--text);
}

.login-head p { font-size: .85rem; color: var(--muted); margin-top: 3px; }

/* ── ADMIN LAYOUT ───────────────────────── */
.admin-wrap { max-width: 1160px; margin: 32px auto; padding: 0 24px; }

.admin-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 24px;
}

.admin-bar h1 {
  font-size: 1.6rem;
  font-weight: 800;
  color: var(--text);
}

.stat-strip {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  margin-bottom: 24px;
}

.stat-pill {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 18px 24px;
  min-width: 160px;
  box-shadow: var(--shadow-sm);
}

.stat-pill .sp-label {
  font-size: .75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .5px;
  color: var(--muted);
}

.stat-pill .sp-val {
  font-size: 2rem;
  font-weight: 800;
  color: var(--blue);
  margin-top: 2px;
}

/* ── TABLE ──────────────────────────────── */
.tbl-wrap {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}

table { width: 100%; border-collapse: collapse; }

th, td { padding: 12px 16px; font-size: .87rem; text-align: left; }

th {
  background: var(--blue);
  color: #fff;
  font-weight: 600;
  letter-spacing: .2px;
  white-space: nowrap;
}

td { border-bottom: 1px solid var(--border); color: var(--text-md); }
tr:last-child td { border-bottom: none; }
tbody tr:hover td { background: var(--blue-bg); }

.badge {
  display: inline-flex;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: .75rem;
  font-weight: 600;
  background: var(--blue-light);
  color: var(--blue-dark);
}

/* ── VIEW SUBMISSION ────────────────────── */
.meta-strip {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 14px;
  padding: 12px 16px;
  background: var(--blue-bg);
  border-radius: var(--r);
  border: 1px solid rgba(40,160,220,.18);
  font-size: .85rem;
  color: var(--blue-dark);
  font-weight: 500;
  margin-bottom: 20px;
}

.detail-tbl th {
  background: var(--bg);
  color: var(--text-md);
  font-weight: 600;
  width: 36%;
}

.detail-tbl td { background: var(--white); }

.file-item {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  background: var(--blue-light);
  color: var(--blue-dark);
  border-radius: var(--r);
  text-decoration: none;
  font-size: .87rem;
  font-weight: 500;
  margin: 4px 4px 0 0;
  transition: var(--t);
}

.file-item:hover { background: #c5e5f5; }

/* ── FOOTER ─────────────────────────────── */
footer {
  text-align: center;
  color: var(--muted);
  padding: 32px 20px;
  font-size: .84rem;
  border-top: 1px solid var(--border);
  background: var(--white);
}

/* ── RESPONSIVE ─────────────────────────── */
@media (max-width: 640px) {
  .hero-section h1 { font-size: 1.9rem; }
  .hero-section { padding: 50px 16px 70px; }
  .choice-card { width: 100%; }
  .cards-section { padding: 0 16px 40px; }
  .card { padding: 18px 16px; }
  .login-box { padding: 28px 20px; }
  .topbar { padding: 0 16px; height: auto; min-height: 60px; padding-top: 10px; padding-bottom: 10px; }
  .topbar .brand-sub { display: none; }
  .admin-wrap { padding: 0 14px; }
}
