/* ============================================================
   TALEEMI CARD — MAIN CSS
   Jamaat-e-Islami Zila Quaideen, Jinnah Town
   ============================================================ */

:root {
  --green:       #1a5c2e;
  --green-mid:   #2a7a3f;
  --green-light: #3a9a52;
  --green-pale:  #e8f5ec;
  --gold:        #c8922a;
  --gold-light:  #f0c060;
  --gold-pale:   #fdf6e3;
  --red:         #dc2626;
  --blue:        #1a56db;
  --text:        #1a1a1a;
  --text-mid:    #444;
  --text-muted:  #888;
  --border:      #dde8e1;
  --bg:          #f7faf8;
  --white:       #ffffff;
  --radius:      12px;
  --radius-sm:   8px;
  --shadow-sm:   0 1px 4px rgba(0,0,0,0.07);
  --shadow-md:   0 4px 16px rgba(0,0,0,0.10);
  --shadow-lg:   0 8px 32px rgba(0,0,0,0.14);
  --font:        'Inter', 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;
  display: flex;
  flex-direction: column;
}

.urdu { font-family: var(--font-urdu); direction: rtl; }

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

/* ── HEADER ── */
.site-header {
  background: var(--green);
  padding: 0;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
  gap: 16px;
}
.header-logo {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  flex-shrink: 0;
}
.logo-circle {
  width: 40px; height: 40px;
  border: 2px solid rgba(255,255,255,0.4);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 18px;
}
.logo-main {
  display: block;
  font-family: var(--font-urdu);
  font-size: 18px;
  color: var(--gold-light);
  line-height: 1.2;
}
.logo-sub { display: block; font-size: 10px; color: rgba(255,255,255,0.6); }
.header-nav { display: flex; gap: 4px; }
.header-nav a {
  padding: 8px 14px;
  font-size: 13px;
  font-weight: 500;
  color: rgba(255,255,255,0.75);
  text-decoration: none;
  border-radius: 6px;
  transition: all 0.15s;
}
.header-nav a:hover, .header-nav a.active { background: rgba(255,255,255,0.12); color: #fff; }
.nav-toggle { display: none; background: none; border: none; color: #fff; font-size: 22px; cursor: pointer; }

/* ── FOOTER ── */
.site-footer {
  background: var(--green);
  color: rgba(255,255,255,0.75);
  padding: 32px 0 0;
  margin-top: auto;
}
.footer-inner { display: flex; justify-content: space-between; align-items: flex-start; gap: 32px; padding-bottom: 24px; }
.footer-logo { font-size: 18px; color: var(--gold-light); margin-bottom: 8px; }
.footer-desc { font-size: 12px; color: rgba(255,255,255,0.5); max-width: 300px; }
.footer-links { display: flex; flex-direction: column; gap: 8px; }
.footer-links a { font-size: 13px; color: rgba(255,255,255,0.65); text-decoration: none; }
.footer-links a:hover { color: #fff; }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.12);
  padding: 14px 0;
  font-size: 12px;
  color: rgba(255,255,255,0.4);
  text-align: center;
}
.footer-bottom strong { color: rgba(255,255,255,0.7); }

/* ── BUTTONS ── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 28px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 600;
  border: none;
  cursor: pointer;
  text-decoration: none;
  transition: all 0.15s;
  line-height: 1;
}
.btn-primary   { background: var(--green); color: #fff; }
.btn-primary:hover { background: var(--green-mid); }
.btn-gold      { background: var(--gold); color: #fff; }
.btn-gold:hover { background: #a87820; }
.btn-outline   { background: transparent; border: 2px solid var(--green); color: var(--green); }
.btn-outline:hover { background: var(--green-pale); }
.btn-danger    { background: var(--red); color: #fff; }
.btn-sm        { padding: 8px 16px; font-size: 12px; }
.btn-lg        { padding: 16px 36px; font-size: 16px; }
.btn-block     { width: 100%; }
.btn:disabled  { opacity: 0.5; cursor: not-allowed; }

/* ── FORMS ── */
.form-group        { margin-bottom: 18px; }
.form-group label  { display: block; font-size: 13px; font-weight: 500; color: var(--text-mid); margin-bottom: 6px; }
.form-group label .req { color: var(--red); margin-left: 2px; }

.form-control, .form-select {
  width: 100%;
  padding: 10px 14px;
  border: 1.5px solid #d0d7df;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-family: var(--font);
  color: var(--text);
  background: var(--white);
  transition: border-color 0.15s, box-shadow 0.15s;
  outline: none;
}
.form-control:focus, .form-select:focus {
  border-color: var(--green);
  box-shadow: 0 0 0 3px rgba(26,92,46,0.12);
}
.form-control.error { border-color: var(--red); }
.form-control.success { border-color: var(--green-light); background: var(--green-pale); }
.form-hint { font-size: 11px; color: var(--text-muted); 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: 16px; }

textarea.form-control { resize: vertical; min-height: 90px; }

.checkbox-group { display: flex; flex-wrap: wrap; gap: 10px; }
.checkbox-item  { display: flex; align-items: center; gap: 6px; cursor: pointer; font-size: 13px; }
.checkbox-item input[type="checkbox"] { width: 16px; height: 16px; accent-color: var(--green); }

.radio-group { display: flex; flex-wrap: wrap; gap: 10px; }
.radio-pill  {
  padding: 8px 16px;
  border: 1.5px solid #d0d7df;
  border-radius: 20px;
  font-size: 13px;
  cursor: pointer;
  transition: all 0.15s;
  user-select: none;
}
.radio-pill.selected { border-color: var(--green); background: var(--green-pale); color: var(--green); font-weight: 500; }

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

/* ── ALERTS ── */
.alert { padding: 14px 18px; border-radius: var(--radius-sm); font-size: 14px; margin-bottom: 16px; }
.alert-success { background: #d1fae5; border: 1px solid #a7f3d0; color: #065f46; }
.alert-danger  { background: #fee2e2; border: 1px solid #fecaca; color: #991b1b; }
.alert-warning { background: #fff3cd; border: 1px solid #fde68a; color: #856404; }
.alert-info    { background: #dbeafe; border: 1px solid #bfdbfe; color: #1e40af; }

/* ── BADGES ── */
.badge { display: inline-block; padding: 3px 10px; border-radius: 12px; font-size: 11px; font-weight: 600; }
.badge-green   { background: var(--green-pale); color: var(--green); }
.badge-gold    { background: var(--gold-pale); color: #8a5c00; }
.badge-red     { background: #fee2e2; color: #991b1b; }
.badge-blue    { background: #dbeafe; color: #1e40af; }
.badge-grey    { background: #f0f0f0; color: #555; }

/* ── PROGRESS STEPS ── */
.steps {
  display: flex;
  align-items: center;
  margin-bottom: 32px;
  padding: 0 4px;
}
.step {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1;
  position: relative;
}
.step::after {
  content: '';
  flex: 1;
  height: 2px;
  background: var(--border);
  margin: 0 8px;
}
.step:last-child::after { display: none; }
.step.done::after, .step.active::after { background: var(--green); }
.step-num {
  width: 32px; height: 32px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 13px;
  font-weight: 600;
  flex-shrink: 0;
  border: 2px solid var(--border);
  background: var(--white);
  color: var(--text-muted);
}
.step.done .step-num  { background: var(--green); border-color: var(--green); color: #fff; }
.step.active .step-num { border-color: var(--green); color: var(--green); }
.step-label { font-size: 12px; font-weight: 500; color: var(--text-muted); white-space: nowrap; }
.step.done .step-label, .step.active .step-label { color: var(--green); }

/* ── SECTION HEADINGS ── */
.section-head       { margin-bottom: 28px; }
.section-eyebrow    { font-size: 11px; font-weight: 600; letter-spacing: 2px; text-transform: uppercase; color: var(--green-light); margin-bottom: 6px; }
.section-title      { font-size: 26px; font-weight: 700; color: var(--green); margin-bottom: 8px; }
.section-desc       { font-size: 15px; color: var(--text-mid); max-width: 600px; }

/* ── TABLE ── */
.table-wrap { overflow-x: auto; border-radius: var(--radius); border: 1px solid var(--border); }
.table { width: 100%; border-collapse: collapse; font-size: 13px; }
.table th { background: #f5f7f9; padding: 10px 14px; text-align: left; font-weight: 600; color: var(--text-mid); border-bottom: 1px solid var(--border); white-space: nowrap; }
.table td { padding: 12px 14px; border-bottom: 1px solid #f0f0f0; color: var(--text); }
.table tr:last-child td { border-bottom: none; }
.table tr:hover td { background: var(--green-pale); }

/* ── STATUS BADGES ── */
.s-new         { background: #e0e7ff; color: #3730a3; }
.s-pending     { background: #fff3cd; color: #856404; }
.s-review      { background: #dbeafe; color: #1e40af; }
.s-approved    { background: #d1fae5; color: #065f46; }
.s-rejected    { background: #fee2e2; color: #991b1b; }

/* ── SCORE CHIP ── */
.score-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 10px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 700;
}
.score-high   { background: #d1fae5; color: #065f46; }
.score-mid    { background: #fff3cd; color: #856404; }
.score-low    { background: #fee2e2; color: #991b1b; }

/* ── LOADING SPINNER ── */
.spinner {
  display: inline-block;
  width: 20px; height: 20px;
  border: 2px solid var(--border);
  border-top-color: var(--green);
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ── CHILD CARD ── */
.child-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 20px;
  margin-bottom: 16px;
  position: relative;
}
.child-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}
.child-card-title { font-size: 14px; font-weight: 600; color: var(--green); }
.btn-remove-child {
  background: #fee2e2;
  border: none;
  color: var(--red);
  width: 28px; height: 28px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 16px;
  display: flex; align-items: center; justify-content: center;
}
.add-child-btn {
  width: 100%;
  padding: 14px;
  border: 1.5px dashed var(--green-light);
  border-radius: var(--radius-sm);
  background: var(--green-pale);
  color: var(--green);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  text-align: center;
  transition: all 0.15s;
}
.add-child-btn:hover { background: #d4edda; }

/* ── SCHOOL SEARCH ── */
.school-search-wrap { position: relative; }
.school-suggestions {
  position: absolute;
  top: 100%;
  left: 0; right: 0;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-md);
  max-height: 200px;
  overflow-y: auto;
  z-index: 50;
  display: none;
}
.school-suggestions.show { display: block; }
.school-suggestion-item {
  padding: 10px 14px;
  cursor: pointer;
  font-size: 13px;
  border-bottom: 1px solid #f0f0f0;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.school-suggestion-item:hover { background: var(--green-pale); }
.school-suggestion-item:last-child { border-bottom: none; }
.school-type-tag { font-size: 10px; color: var(--text-muted); }
.school-add-new {
  padding: 10px 14px;
  font-size: 13px;
  color: var(--green);
  font-weight: 600;
  cursor: pointer;
}
.school-add-new:hover { background: var(--green-pale); }

/* ── TALEEMI CARD PREVIEW ── */
.tc-card-preview {
  width: 340px;
  height: 210px;
  background: linear-gradient(135deg, #1a5c2e 0%, #2a7a3f 60%, #1a4a28 100%);
  border-radius: 16px;
  padding: 20px 24px;
  color: #fff;
  position: relative;
  overflow: hidden;
  box-shadow: 0 8px 32px rgba(26,92,46,0.4);
}
.tc-card-preview::before {
  content: '';
  position: absolute;
  top: -40px; right: -40px;
  width: 160px; height: 160px;
  border-radius: 50%;
  background: rgba(255,255,255,0.05);
}

/* ── UTILITY ── */
.text-center { text-align: center; }
.text-right  { text-align: right; }
.text-green  { color: var(--green); }
.text-gold   { color: var(--gold); }
.text-muted  { color: var(--text-muted); }
.text-red    { color: var(--red); }
.fw-600      { font-weight: 600; }
.fw-700      { font-weight: 700; }
.mt-8  { margin-top: 8px; }
.mt-16 { margin-top: 16px; }
.mt-24 { margin-top: 24px; }
.mt-32 { margin-top: 32px; }
.mb-8  { margin-bottom: 8px; }
.mb-16 { margin-bottom: 16px; }
.mb-24 { margin-bottom: 24px; }
.d-flex { display: flex; }
.align-center { align-items: center; }
.gap-8  { gap: 8px; }
.gap-16 { gap: 16px; }

/* ── 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(--green); flex-direction: column; padding: 12px 0; }
  .header-nav.open { display: flex; }
  .nav-toggle { display: block; }
  .steps { overflow-x: auto; }
  .step-label { display: none; }
  .footer-inner { flex-direction: column; }
}
