/* ============================================================
   TALEEMI CARD â€” CARD PAGE CSS
   Screen + Print styles
   ============================================================ */

/* â”€â”€ PAGE WRAPPER â”€â”€ */
.card-page-wrap { min-height: 80vh; background: #f4f7f5; }

/* â”€â”€ LOOKUP FORM â”€â”€ */
.card-lookup-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 70vh;
  padding: 40px 20px;
}
.card-lookup-card {
  background: #fff;
  border: 1px solid #dde8e1;
  border-radius: 16px;
  padding: 44px 40px;
  max-width: 460px;
  width: 100%;
  text-align: center;
  box-shadow: 0 4px 20px rgba(0,0,0,0.06);
}
.card-lookup-icon { font-size: 52px; margin-bottom: 16px; }
.card-lookup-card h1 { font-size: 22px; font-weight: 700; color: #1a5c2e; margin-bottom: 8px; }
.card-lookup-card p { font-size: 14px; color: #888; margin-bottom: 24px; }
.card-lookup-links {
  margin-top: 20px;
  font-size: 13px;
  color: #aaa;
  display: flex;
  justify-content: center;
  gap: 10px;
}
.card-lookup-links a { color: #1a5c2e; text-decoration: none; }
.card-lookup-links a:hover { text-decoration: underline; }

/* â”€â”€ CARD SELECT â”€â”€ */
.card-select-list { display: flex; flex-direction: column; gap: 10px; text-align: left; }
.card-select-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
  border: 1.5px solid #dde8e1;
  border-radius: 10px;
  cursor: pointer;
  transition: all .15s;
}
.card-select-item:hover { border-color: #1a5c2e; background: #f7fbf8; }
.card-select-item input[type="radio"] { accent-color: #1a5c2e; width: 16px; height: 16px; flex-shrink: 0; }
.csi-content { flex: 1; }
.csi-name { font-weight: 600; color: #1a5c2e; font-size: 14px; }
.csi-meta { font-size: 12px; color: #888; margin-top: 2px; }
.csi-balance { font-size: 12px; color: #1a5c2e; margin-top: 4px; }
.csi-arrow { color: #ccc; font-size: 18px; }

/* â”€â”€ QR VERIFY â”€â”€ */
.card-verify-wrap { display: flex; justify-content: center; padding: 40px 20px; }
.card-verify-card {
  background: #fff;
  border: 1px solid #dde8e1;
  border-radius: 16px;
  padding: 36px;
  max-width: 440px;
  width: 100%;
  box-shadow: 0 4px 20px rgba(0,0,0,0.07);
}
.verify-status {
  text-align: center;
  font-size: 18px;
  font-weight: 800;
  letter-spacing: 1px;
  padding: 12px;
  border-radius: 10px;
  margin-bottom: 20px;
}
.verify-valid   { background: #d1fae5; color: #065f46; }
.verify-invalid { background: #fee2e2; color: #991b1b; }
.card-verify-card h2 { font-size: 18px; font-weight: 700; color: #1a5c2e; margin-bottom: 4px; }
.verify-for { font-size: 14px; color: #888; margin-bottom: 20px; }
.verify-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.verify-grid div span { display: block; font-size: 10px; color: #aaa; text-transform: uppercase; letter-spacing: .5px; margin-bottom: 3px; }
.verify-grid div strong { font-size: 14px; color: #1a1a1a; }

/* â”€â”€ CARD VIEW PAGE â”€â”€ */
.card-view-wrap { max-width: 780px; margin: 0 auto; padding: 28px 20px 60px; }
.card-view-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
  flex-wrap: wrap;
  gap: 12px;
}
.card-view-header h1 { font-size: 22px; font-weight: 700; color: #1a5c2e; }
.card-view-header p { font-size: 14px; color: #888; }
.card-view-actions { display: flex; gap: 10px; }

.print-instruction {
  background: #fffbeb;
  border: 1px solid #fde68a;
  border-radius: 9px;
  padding: 12px 16px;
  font-size: 13px;
  color: #856404;
  margin-bottom: 20px;
}

/* â”€â”€ CARD PRINT SHEET (screen display) â”€â”€ */
.card-print-sheet {
  background: #fff;
  border: 1px solid #dde8e1;
  border-radius: 16px;
  padding: 32px;
  margin-bottom: 20px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}
.print-label {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: #aaa;
  margin-bottom: 12px;
}

/* â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•
   TALEEMI CARD FRONT
   85mm Ã— 54mm (credit card size)
   At 96dpi screen: ~322px Ã— 204px
   â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â• */
.tc-card-front {
  width: 340px;
  height: 214px;
  background: linear-gradient(135deg, #1a5c2e 0%, #2d7a42 55%, #1a4a28 100%);
  border-radius: 14px;
  padding: 16px 20px;
  color: #fff;
  position: relative;
  overflow: hidden;
  box-shadow: 0 8px 28px rgba(26,92,46,0.3);
  font-family: 'Inter', sans-serif;
}
.card-bg-pattern {
  position: absolute;
  top: -40px; right: -40px;
  width: 180px; height: 180px;
  border-radius: 50%;
  background: rgba(255,255,255,0.05);
  pointer-events: none;
}
.card-bg-pattern::after {
  content: '';
  position: absolute;
  bottom: -80px; left: -60px;
  width: 140px; height: 140px;
  border-radius: 50%;
  background: rgba(200,146,42,0.08);
}

/* Card top row */
.card-top-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 10px;
}
.card-org { display: flex; align-items: center; gap: 8px; }
.card-org-logo { font-size: 18px; }
.card-org-name { font-size: 9px; font-weight: 700; color: #fff; letter-spacing: .5px; }
.card-org-sub { font-size: 7px; color: rgba(255,255,255,0.5); margin-top: 1px; }
.card-title-urdu {
  font-family: 'Noto Nastaliq Urdu', serif;
  font-size: 13px;
  color: #f0c060;
  direction: rtl;
  text-align: right;
  line-height: 2;
}
.card-title-urdu small {
  display: block;
  font-size: 8px;
  color: rgba(255,255,255,0.45);
  line-height: 2;
}

/* QR on card */
.card-qr-section {
  position: absolute;
  right: 16px;
  top: 50%;
  transform: translateY(-50%);
  background: #fff;
  border-radius: 6px;
  padding: 3px;
  box-shadow: 0 1px 4px rgba(0,0,0,0.15);
}
.card-qr-section svg {
  display: block;
  width: 68px;
  height: 68px;
}
.card-qr-img {
  width: 68px;
  height: 68px;
  background: #fff;
  border-radius: 6px;
  padding: 3px;
  display: block;
}

/* Card holder */
.card-holder-section { margin-top: 4px; }
.card-holder-label { font-size: 7px; letter-spacing: 1.5px; text-transform: uppercase; color: rgba(255,255,255,0.4); margin-bottom: 2px; }
.card-holder-name { font-size: 13px; font-weight: 600; color: #fff; margin-bottom: 2px; }
.card-number { font-size: 9px; color: rgba(255,255,255,0.35); letter-spacing: 1px; font-family: monospace; }

/* Card bottom */
.card-bottom-row {
  display: flex;
  gap: 16px;
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid rgba(255,255,255,0.12);
}
.card-meta-item {}
.cmi-label { font-size: 7px; letter-spacing: 1px; text-transform: uppercase; color: rgba(255,255,255,0.4); margin-bottom: 2px; }
.cmi-value { font-size: 11px; font-weight: 700; color: #f0c060; }

/* â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•
   TALEEMI CARD BACK
   â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â• */
.tc-card-back {
  width: 340px;
  height: 214px;
  background: #f0f7f2;
  border: 1px solid #c8e0d0;
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 8px 28px rgba(26,92,46,0.12);
  font-family: 'Inter', sans-serif;
  position: relative;
}
.card-back-stripe {
  height: 36px;
  background: #333;
  width: 100%;
}
.card-back-body {
  padding: 10px 16px 10px;
  display: flex;
  flex-direction: column;
  height: calc(100% - 36px);
  justify-content: space-between;
}
.card-back-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 8px;
}
.card-back-logo {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 16px;
}
.cb-logo-title {
  font-family: 'Noto Nastaliq Urdu', serif;
  font-size: 11px;
  color: #1a5c2e;
  direction: rtl;
  line-height: 2;
}
.card-back-student { text-align: right; }
.cbs-label { font-size: 7px; letter-spacing: 1px; text-transform: uppercase; color: #aaa; }
.cbs-name { font-size: 12px; font-weight: 600; color: #1a5c2e; }
.cbs-meta { font-size: 9px; color: #888; }

.card-back-terms { flex: 1; margin: 6px 0; }
.cbt-title { font-size: 8px; font-weight: 700; text-transform: uppercase; letter-spacing: .5px; color: #888; margin-bottom: 4px; }
.card-back-terms ul { padding-left: 12px; }
.card-back-terms ul li { font-size: 7.5px; color: #555; line-height: 1.6; margin-bottom: 1px; }

.card-back-bottom {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  padding-top: 6px;
  border-top: 1px solid #c8e0d0;
}
.card-back-contact { font-size: 7px; color: #888; line-height: 1.6; }
.card-back-app { font-size: 8px; color: #888; font-family: monospace; }

/* â”€â”€ CARD DETAILS PANEL (screen only) â”€â”€ */
.card-details-panel {
  background: #fff;
  border: 1px solid #dde8e1;
  border-radius: 12px;
  padding: 24px;
  margin-top: 16px;
}
.card-details-panel h3 { font-size: 15px; font-weight: 600; color: #1a5c2e; margin-bottom: 14px; }
.cdp-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 12px; }
.cdp-grid div span { display: block; font-size: 11px; color: #aaa; text-transform: uppercase; letter-spacing: .5px; margin-bottom: 3px; }
.cdp-grid div strong { font-size: 14px; color: #1a1a1a; }

/* â”€â”€ SHARED BUTTON/FORM STYLES â”€â”€ */
.btn { display: inline-flex; align-items: center; gap: 7px; padding: 11px 22px; border-radius: 9px; font-size: 14px; font-weight: 600; border: none; cursor: pointer; text-decoration: none; transition: all .15s; }
.btn-primary { background: #1a5c2e; color: #fff; }
.btn-primary:hover { background: #2a7a3f; }
.btn-outline-green { background: transparent; border: 2px solid #1a5c2e; color: #1a5c2e; }
.btn-outline-green:hover { background: #e8f5ec; }
.btn-lg { padding: 14px 32px; font-size: 15px; }
.btn-block { width: 100%; justify-content: center; }
.form-group { margin-bottom: 16px; text-align: left; }
.form-group label { display: block; font-size: 13px; font-weight: 500; color: #444; margin-bottom: 5px; }
.form-control { width: 100%; padding: 11px 14px; border: 1.5px solid #d0d7df; border-radius: 8px; font-size: 14px; font-family: 'Inter', sans-serif; outline: none; transition: border-color .15s; }
.form-control:focus { border-color: #1a5c2e; box-shadow: 0 0 0 3px rgba(26,92,46,0.1); }
.form-hint { font-size: 11px; color: #aaa; margin-top: 4px; }
.alert { padding: 12px 16px; border-radius: 8px; font-size: 14px; margin-bottom: 16px; }
.alert-danger { background: #fee2e2; border: 1px solid #fecaca; color: #991b1b; }
.mono { font-family: monospace; font-size: 12px; }
.table-wrap { overflow-x: auto; border: 1px solid #dde8e1; border-radius: 8px; }
.table { width: 100%; border-collapse: collapse; font-size: 13px; }
.table th { background: #f5f7f9; padding: 9px 14px; text-align: left; font-weight: 600; color: #666; border-bottom: 1px solid #eee; }
.table td { padding: 10px 14px; border-bottom: 1px solid #f5f5f5; }
.table tr:last-child td { border-bottom: none; }

/* â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•
   PRINT STYLES
   â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â• */
@media print {
  /* Hide everything except the cards */
  .no-print,
  .site-header,
  .landing-header,
  .public-header,
  .card-public-header,
  .site-footer,
  .landing-nav,
  .landing-menu,
  .card-view-header,
  .print-instruction,
  .card-details-panel,
  .card-page-wrap > *:not(.card-view-wrap) { display: none !important; }

  * { -webkit-print-color-adjust: exact !important; print-color-adjust: exact !important; }

  html, body { margin: 0; padding: 0; background: #fff !important; }

  body * {
    visibility: hidden;
  }

  .card-print-sheet,
  .card-print-sheet * {
    visibility: visible;
  }

  .card-view-wrap { padding: 0; margin: 0; max-width: 100%; }

  .card-print-sheet {
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    padding: 0 !important;
    margin: 0 !important;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20mm;
    page-break-inside: avoid;
  }

  .tc-card-front,
  .tc-card-back {
    /* Credit card: 85.6mm Ã— 53.98mm */
    width: 85.6mm !important;
    height: 53.98mm !important;
    border-radius: 3mm !important;
    page-break-inside: avoid !important;
    break-inside: avoid !important;
  }

  .card-qr-img {
    width: 20mm !important;
    height: 20mm !important;
  }

  /* Adjust font sizes for print */
  .card-org-name { font-size: 6pt !important; }
  .card-org-sub  { font-size: 5pt !important; }
  .card-title-urdu { font-size: 10pt !important; }
  .card-holder-label { font-size: 5pt !important; }
  .card-holder-name  { font-size: 9pt !important; }
  .card-number       { font-size: 6pt !important; }
  .cmi-label { font-size: 5pt !important; }
  .cmi-value { font-size: 8pt !important; }
  .card-back-stripe { height: 10mm !important; }
  .cbs-name { font-size: 8pt !important; }
  .cbs-meta { font-size: 6pt !important; }
  .card-back-terms ul li { font-size: 5.5pt !important; }
  .card-back-contact { font-size: 5pt !important; }
  .card-back-app { font-size: 5pt !important; }
  .cb-logo-title { font-size: 8pt !important; }

  @page { size: A4; margin: 15mm; }
}

/* â”€â”€ RESPONSIVE â”€â”€ */
@media (max-width: 600px) {
  .card-lookup-card { padding: 28px 20px; }
  .tc-card-front, .tc-card-back { width: 100%; max-width: 340px; }
  .card-view-header { flex-direction: column; align-items: flex-start; }
  .card-view-actions { width: 100%; }
  .card-view-actions .btn { flex: 1; justify-content: center; }
  .cdp-grid { grid-template-columns: 1fr; }
}
/* Card page public shell */
.card-public-page {
  background: #f4f7f5;
}

.card-public-header {
  position: sticky;
  top: 0;
  left: auto;
  right: auto;
  z-index: 80;
  background:
    radial-gradient(circle at 85% -20%, rgba(201, 223, 31, .18), transparent 26%),
    linear-gradient(90deg, #052d18 0%, #0b542d 56%, #176f3b 100%);
  border-bottom: 1px solid rgba(255,255,255,.12);
  box-shadow: 0 18px 40px rgba(6, 50, 28, .18);
  padding: 0;
}

.card-public-header .header-inner {
  height: 96px;
  grid-template-columns: auto 1fr auto;
  gap: 44px;
}

.card-public-header .landing-logo,
.card-public-header .landing-nav a,
.card-public-header .landing-menu {
  color: #fff;
  text-shadow: none;
}

.card-public-header .landing-logo strong {
  color: #fff;
  font-size: 26px;
}

.card-public-header .landing-logo em {
  color: rgba(255,255,255,.9);
  font-size: 23px;
}

.card-public-header .landing-mark {
  color: #fff;
  border-color: rgba(255,255,255,.38);
  background: rgba(255,255,255,.08);
}

.card-public-header .landing-logo {
  min-width: 286px;
}

.card-public-header .landing-mark,
.card-public-header .landing-mark svg {
  width: 58px;
  height: 58px;
}

.card-public-header .landing-nav a {
  opacity: 1;
  font-size: 15px;
  padding-top: 12px;
  padding-bottom: 15px;
}

.card-public-header .landing-nav {
  justify-content: flex-start;
  gap: 26px;
}

.card-public-header .landing-nav a:hover,
.card-public-header .landing-nav a.active {
  color: #fff;
}

.card-public-header .nav-register {
  height: 48px;
  padding: 0 22px !important;
  background: #c9df1f;
  color: #102718 !important;
  border-color: transparent;
  box-shadow: 0 12px 26px rgba(0,0,0,.16);
}

.card-public-header .landing-menu span {
  background: #fff;
}

.card-view-header {
  background: #fff;
  border: 1px solid #dde8e1;
  border-radius: 14px;
  padding: 16px 18px;
  box-shadow: 0 2px 10px rgba(15, 40, 28, 0.05);
}

.print-card-btn {
  min-width: 130px;
  background: #0b5d32 !important;
  color: #fff !important;
  border-color: #0b5d32 !important;
  box-shadow: 0 8px 18px rgba(11, 93, 50, 0.18);
}

@media (max-width: 900px) {
  .card-public-header .header-inner {
    height: 86px;
    grid-template-columns: auto auto;
  }

  .card-public-header .landing-nav {
    top: 86px;
    background: rgba(3, 45, 24, .98);
    border: 0;
    box-shadow: 0 20px 48px rgba(3, 28, 16, .32);
  }
}
