/* ============================================================
   TALEEMI CARD — MAIN CSS v2 (Light & Attractive Theme)
   ============================================================ */

:root {
  /* Brand */
  --primary:       #1a6b3a;
  --primary-dark:  #134f2b;
  --primary-mid:   #228847;
  --primary-light: #2ea856;
  --primary-pale:  #edf8f1;
  --primary-50:    #f4fbf6;

  /* Accent */
  --gold:          #d4870a;
  --gold-light:    #f5a623;
  --gold-pale:     #fff8ec;
  --gold-50:       #fffdf7;

  /* Semantic */
  --red:           #e03131;
  --red-pale:      #fff5f5;
  --blue:          #2563eb;
  --blue-pale:     #eff6ff;

  /* Neutrals */
  --text:          #111827;
  --text-mid:      #374151;
  --text-muted:    #6b7280;
  --text-light:    #9ca3af;
  --border:        #e5e7eb;
  --border-mid:    #d1d5db;
  --bg:            #f9fafb;
  --bg-card:       #ffffff;
  --white:         #ffffff;

  /* Radius */
  --r-sm:   6px;
  --r-md:   10px;
  --r-lg:   14px;
  --r-xl:   20px;

  /* Shadows */
  --shadow-xs: 0 1px 2px rgba(0,0,0,0.05);
  --shadow-sm: 0 1px 4px rgba(0,0,0,0.06), 0 1px 2px rgba(0,0,0,0.04);
  --shadow-md: 0 4px 12px rgba(0,0,0,0.08), 0 2px 4px rgba(0,0,0,0.04);
  --shadow-lg: 0 10px 28px rgba(0,0,0,0.10), 0 4px 8px rgba(0,0,0,0.04);

  --font: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-urdu: 'Noto Nastaliq Urdu', serif;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  font-size: 15px;
  line-height: 1.6;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}
.urdu { font-family: var(--font-urdu); direction: rtl; }

/* ── CONTAINER ── */
.container { max-width: 1100px; margin: 0 auto; padding: 0 24px; }

/* ── HEADER ── */
.site-header {
  background: var(--white);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: var(--shadow-sm);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
  gap: 16px;
}
.header-logo {
  display: flex;
  align-items: center;
  gap: 11px;
  text-decoration: none;
  flex-shrink: 0;
}
.logo-circle {
  width: 38px; height: 38px;
  border-radius: 10px;
  background: var(--primary);
  display: flex; align-items: center; justify-content: center;
  font-size: 18px;
  box-shadow: var(--shadow-xs);
}
.logo-main {
  display: block;
  font-family: var(--font-urdu);
  font-size: 16px;
  color: var(--primary);
  line-height: 2.2;
  font-weight: 700;
}
.logo-sub { display: block; font-size: 10px; color: var(--text-muted); margin-top: -4px; }
.header-nav { display: flex; gap: 2px; align-items: center; }
.header-nav a {
  padding: 7px 13px;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-mid);
  text-decoration: none;
  border-radius: var(--r-md);
  transition: all .15s;
}
.header-nav a:hover { background: var(--primary-pale); color: var(--primary); }
.header-nav a.active { background: var(--primary-pale); color: var(--primary); font-weight: 600; }
.nav-register {
  background: var(--primary) !important;
  color: var(--white) !important;
  padding: 8px 18px !important;
  font-weight: 600 !important;
  box-shadow: var(--shadow-xs);
}
.nav-register:hover { background: var(--primary-dark) !important; }
.nav-toggle { display: none; background: none; border: none; color: var(--text); font-size: 22px; cursor: pointer; padding: 6px; }

/* ── FOOTER ── */
.site-footer {
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(circle at 12% 0%, rgba(201, 223, 31, .18), transparent 26%),
    radial-gradient(circle at 88% 10%, rgba(46, 168, 86, .14), transparent 24%),
    linear-gradient(135deg, #071a3a 0%, #0b2b5a 48%, #0e3b78 100%);
  color: rgba(255,255,255,0.78);
  padding: 54px 0 0;
  margin-top: auto;
}
.site-footer::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(255,255,255,.06) 1px, transparent 1px),
    linear-gradient(180deg, rgba(255,255,255,.045) 1px, transparent 1px);
  background-size: 72px 72px;
  mask-image: linear-gradient(180deg, rgba(0,0,0,.65), transparent 80%);
  pointer-events: none;
}
.site-footer .container {
  position: relative;
  z-index: 1;
}
.legacy-footer { display: none; }
.footer-inner {
  display: grid;
  grid-template-columns: minmax(280px, 1fr) auto;
  justify-content: space-between;
  align-items: center;
  gap: 48px;
  padding-bottom: 34px;
  border-bottom: 1px solid rgba(255,255,255,0.14);
}
.footer-logo {
  font-family: var(--font);
  font-size: 24px;
  color: #fff;
  margin-bottom: 10px;
  line-height: 1.15;
  font-weight: 900;
  letter-spacing: 0;
}
.footer-logo::after {
  content: "PROGRAM";
  display: block;
  width: fit-content;
  margin-top: 7px;
  padding-top: 7px;
  border-top: 3px solid #c9df1f;
  color: rgba(255,255,255,.86);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: .32em;
}
.footer-desc {
  font-size: 15px;
  color: rgba(255,255,255,0.68);
  max-width: 520px;
  line-height: 1.75;
}
.footer-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px;
  max-width: 520px;
}
.footer-links a {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 0 16px;
  border: 1px solid rgba(255,255,255,.16);
  border-radius: 999px;
  background: rgba(255,255,255,.06);
  font-size: 13px;
  color: rgba(255,255,255,0.82);
  text-decoration: none;
  transition: background .16s ease, color .16s ease, transform .16s ease, border-color .16s ease;
}
.footer-links a:hover {
  transform: translateY(-1px);
  background: rgba(201,223,31,.18);
  border-color: rgba(201,223,31,.42);
  color: #fff;
}
.footer-bottom {
  padding: 20px 0;
  text-align: center;
  font-size: 13px;
  color: rgba(255,255,255,0.52);
}
.footer-bottom strong { color: rgba(255,255,255,0.88); }

/* ── BUTTONS ── */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  gap: 7px; padding: 11px 24px;
  border-radius: var(--r-md);
  font-size: 14px; font-weight: 600;
  border: none; cursor: pointer;
  text-decoration: none;
  transition: all .15s;
  line-height: 1;
  white-space: nowrap;
}
.btn-primary   { background: var(--primary); color: #fff; box-shadow: var(--shadow-xs); }
.btn-primary:hover { background: var(--primary-dark); box-shadow: var(--shadow-sm); }
.btn-gold      { background: var(--gold); color: #fff; box-shadow: var(--shadow-xs); }
.btn-gold:hover { background: #b57209; }
.btn-outline   { background: #fff; border: 1.5px solid var(--border-mid); color: var(--text-mid); }
.btn-outline:hover { border-color: var(--primary); color: var(--primary); background: var(--primary-pale); }
.btn-outline-green { background: transparent; border: 1.5px solid var(--primary); color: var(--primary); }
.btn-outline-green:hover { background: var(--primary-pale); }
.btn-danger    { background: var(--red); color: #fff; }
.btn-sm        { padding: 7px 14px; font-size: 12px; }
.btn-lg        { padding: 14px 32px; font-size: 15px; }
.btn-block     { width: 100%; justify-content: center; }
.btn:disabled  { opacity: 0.5; cursor: not-allowed; }

/* ── FORMS ── */
.form-group { margin-bottom: 18px; }
.form-group label { display: block; font-size: 13px; font-weight: 600; color: var(--text-mid); margin-bottom: 6px; }
.req { color: var(--red); margin-left: 2px; }
.form-control, .form-select {
  width: 100%;
  padding: 10px 14px;
  border: 1.5px solid var(--border-mid);
  border-radius: var(--r-md);
  font-size: 14px;
  font-family: var(--font);
  color: var(--text);
  background: var(--white);
  outline: none;
  transition: border-color .15s, box-shadow .15s;
}
.form-control:focus, .form-select:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(26,107,58,0.10);
}
.form-control.error   { border-color: var(--red); }
.form-control.success { border-color: var(--primary-light); background: var(--primary-50); }
textarea.form-control { resize: vertical; min-height: 88px; }
.form-hint  { font-size: 12px; color: var(--text-light); margin-top: 4px; }
.form-error { font-size: 12px; color: var(--red); margin-top: 4px; display: none; }
.form-error.show { display: block; }
.form-row   { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form-row-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 12px; }

/* ── CARDS ── */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-sm);
}
.card-body   { padding: 24px; }
.card-header {
  padding: 16px 24px;
  border-bottom: 1px solid var(--border);
  font-size: 14px; font-weight: 600;
  color: var(--primary);
  display: flex; align-items: center; gap: 10px;
}

/* ── ALERTS ── */
.alert { padding: 13px 16px; border-radius: var(--r-md); font-size: 14px; margin-bottom: 16px; display: flex; align-items: flex-start; gap: 10px; }
.alert-success { background: #f0fdf4; border: 1px solid #bbf7d0; color: #15803d; }
.alert-danger  { background: var(--red-pale); border: 1px solid #fecaca; color: #b91c1c; }
.alert-warning { background: var(--gold-pale); border: 1px solid #fde68a; color: #92400e; }
.alert-info    { background: var(--blue-pale); border: 1px solid #bfdbfe; color: #1e40af; }

/* ── BADGES ── */
.badge { display: inline-block; padding: 3px 10px; border-radius: 20px; font-size: 11px; font-weight: 600; }
.badge-green  { background: var(--primary-pale); color: var(--primary); }
.badge-gold   { background: var(--gold-pale); color: var(--gold); }
.badge-red    { background: var(--red-pale); color: var(--red); }
.badge-blue   { background: var(--blue-pale); color: var(--blue); }
.badge-grey   { background: #f3f4f6; color: #374151; }

/* ── SECTION HEADINGS ── */
.section-eyebrow { font-size: 11px; font-weight: 600; letter-spacing: 2px; text-transform: uppercase; color: var(--primary-light); margin-bottom: 6px; }
.section-title   { font-size: 28px; font-weight: 700; color: var(--text); margin-bottom: 10px; line-height: 1.25; }
.section-desc    { font-size: 15px; color: var(--text-muted); max-width: 580px; }

/* ── TABLE ── */
.table-wrap { overflow-x: auto; border: 1px solid var(--border); border-radius: var(--r-lg); background: var(--white); }
.table { width: 100%; border-collapse: collapse; font-size: 13px; }
.table th { background: #f9fafb; padding: 11px 16px; text-align: left; font-weight: 600; color: var(--text-muted); border-bottom: 1px solid var(--border); white-space: nowrap; font-size: 12px; text-transform: uppercase; letter-spacing: .4px; }
.table td { padding: 13px 16px; border-bottom: 1px solid #f3f4f6; color: var(--text); vertical-align: middle; }
.table tr:last-child td { border-bottom: none; }
.table tbody tr:hover td { background: var(--primary-50); }

/* ── STATUS BADGES ── */
.s-new     { background: #eef2ff; color: #4338ca; }
.s-pending { background: #fefce8; color: #854d0e; }
.s-review  { background: var(--blue-pale); color: #1d4ed8; }
.s-approved { background: #f0fdf4; color: #15803d; }
.s-rejected { background: var(--red-pale); color: #b91c1c; }

/* ── SCORE CHIP ── */
.score-chip { display: inline-flex; align-items: center; gap: 4px; padding: 3px 10px; border-radius: 20px; font-size: 12px; font-weight: 700; }
.score-high { background: #f0fdf4; color: #15803d; }
.score-mid  { background: #fefce8; color: #854d0e; }
.score-low  { background: var(--red-pale); color: #b91c1c; }

/* ── MISC ── */
.text-muted  { color: var(--text-muted); }
.text-green  { color: var(--primary); }
.text-gold   { color: var(--gold); }
.text-red    { color: var(--red); }
.mono        { font-family: ui-monospace, monospace; font-size: 12px; }
.mb-8  { margin-bottom: 8px; }
.mb-16 { margin-bottom: 16px; }
.mt-16 { margin-top: 16px; }
.mt-24 { margin-top: 24px; }
.fw-600 { font-weight: 600; }

/* ── RESPONSIVE ── */
@media (max-width: 768px) {
  .form-row, .form-row-3 { grid-template-columns: 1fr; }
  .header-nav {
    display: none;
    position: absolute; top: 64px; left: 0; right: 0;
    background: var(--white);
    flex-direction: column;
    padding: 10px;
    border-bottom: 1px solid var(--border);
    box-shadow: var(--shadow-md);
  }
  .header-nav.open { display: flex; }
  .nav-toggle { display: block; }
  .footer-inner {
    grid-template-columns: 1fr;
    gap: 26px;
    align-items: flex-start;
  }
  .footer-links {
    justify-content: flex-start;
  }
  .container { padding: 0 16px; }
}

@media (max-width: 640px) {
  body {
    font-size: 14px;
  }
  .container {
    padding: 0 12px;
  }
  .site-footer {
    padding-top: 42px;
  }
  .footer-inner {
    gap: 22px;
    padding-bottom: 28px;
  }
  .footer-logo {
    font-size: 22px;
  }
  .footer-desc {
    font-size: 14px;
  }
  .footer-links {
    display: grid;
    grid-template-columns: 1fr 1fr;
    width: 100%;
    gap: 8px;
  }
  .footer-links a {
    justify-content: center;
    min-height: 42px;
    padding: 0 10px;
    text-align: center;
  }
  .footer-bottom {
    font-size: 12px;
    line-height: 1.6;
  }
  .table-wrap {
    margin-left: -12px;
    margin-right: -12px;
    border-radius: 0;
    border-left: 0;
    border-right: 0;
  }
}

@media (max-width: 380px) {
  .footer-links {
    grid-template-columns: 1fr;
  }
  .btn {
    width: 100%;
  }
}
