/* =============================================================
   SUCHANA STUDENT VERIFICATION - CLEAN REDESIGN CSS
   ============================================================= */

:root {
  --portal-bg: #090d16;
  --portal-card-bg: #0f172a;
  --portal-border: #1e293b;
  --portal-primary: #2563eb;
  --portal-success: #10b981;
  --portal-text: #f8fafc;
  --portal-muted: #94a3b8;
}

body.verify-page-body {
  margin: 0;
  padding: 0;
  background: radial-gradient(circle at top center, #0f172a 0%, #060911 100%);
  color: var(--portal-text);
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* Header */
.public-portal-header {
  background: rgba(15, 23, 42, 0.95);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.35);
}

.portal-header-inner {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0.9rem 1.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1.5rem;
}

.header-brand-group {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.portal-brand-logo {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: #ffffff;
  padding: 3px;
  box-shadow: 0 0 16px rgba(59, 130, 246, 0.4);
  object-fit: contain;
}

.header-brand-text .header-inst-title {
  margin: 0;
  font-family: 'Cinzel', serif;
  font-size: 1.3rem;
  font-weight: 800;
  color: #f8fafc;
  letter-spacing: 0.8px;
}

.header-brand-text .header-inst-sub {
  margin: 0.15rem 0 0;
  font-size: 0.72rem;
  font-weight: 700;
  color: #60a5fa;
}

.header-brand-text .header-inst-loc {
  margin: 0.1rem 0 0;
  font-size: 0.68rem;
  color: #94a3b8;
}

.header-nav-actions {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.header-badge-official {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  background: rgba(16, 185, 129, 0.12);
  border: 1px solid rgba(16, 185, 129, 0.3);
  padding: 0.4rem 0.8rem;
  border-radius: 20px;
  font-size: 0.78rem;
  font-weight: 700;
  color: #34d399;
}

.btn-outline-admin {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #e2e8f0;
  padding: 0.45rem 0.9rem;
  border-radius: 6px;
  font-size: 0.8rem;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  text-decoration: none;
  transition: all 0.2s ease;
}

.btn-outline-admin:hover {
  background: rgba(59, 130, 246, 0.2);
  border-color: #3b82f6;
  color: #ffffff;
}

/* =========================================================
   INPUT SECTION (Candidate Name + Date of Birth)
   ========================================================= */
.verify-input-section {
  padding: 2rem 1.5rem 1.5rem;
}

.verify-input-container {
  max-width: 820px;
  margin: 0 auto;
}

.verify-title-area {
  text-align: center;
  margin-bottom: 1.5rem;
}

.verify-title-area h2 {
  font-family: 'Cinzel', serif;
  font-size: 1.85rem;
  font-weight: 800;
  color: #ffffff;
  margin: 0 0 0.4rem;
}

.verify-title-area p {
  font-size: 0.92rem;
  color: #94a3b8;
  margin: 0;
}

.clean-search-card {
  background: rgba(15, 23, 42, 0.9);
  border: 1px solid rgba(59, 130, 246, 0.35);
  border-radius: 12px;
  padding: 1.6rem 2rem;
  box-shadow: 0 10px 35px rgba(0, 0, 0, 0.5), 0 0 20px rgba(37, 99, 235, 0.15);
}

.inputs-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 1.25rem;
  margin-bottom: 1.25rem;
}

.form-field {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.form-field label {
  font-size: 0.82rem;
  font-weight: 700;
  color: #cbd5e1;
}

.form-field .req {
  color: #ef4444;
}

.field-wrap {
  position: relative;
  display: flex;
  align-items: center;
}

.field-wrap .field-icon {
  position: absolute;
  left: 0.85rem;
  width: 18px;
  height: 18px;
  color: #60a5fa;
  pointer-events: none;
}

.field-wrap input {
  width: 100%;
  background: #020617;
  border: 1px solid #334155;
  border-radius: 8px;
  padding: 0.75rem 0.85rem 0.75rem 2.5rem;
  color: #ffffff;
  font-size: 0.92rem;
  font-weight: 600;
  outline: none;
  transition: all 0.2s ease;
}

.field-wrap input:focus {
  border-color: #3b82f6;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.25);
  background: #090e1a;
}

.btn-action-row {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.btn-show-docs {
  background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
  color: #ffffff;
  border: none;
  padding: 0.85rem 1.5rem;
  border-radius: 8px;
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  box-shadow: 0 4px 15px rgba(37, 99, 235, 0.4);
  transition: all 0.2s ease;
}

.btn-show-docs:hover {
  background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(37, 99, 235, 0.6);
}

.quick-samples {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem;
  padding-top: 0.5rem;
  border-top: 1px dashed rgba(255, 255, 255, 0.1);
  font-size: 0.75rem;
  color: #94a3b8;
}

.btn-sample-tag {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #cbd5e1;
  padding: 0.3rem 0.65rem;
  border-radius: 20px;
  font-size: 0.72rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-sample-tag:hover {
  background: rgba(59, 130, 246, 0.2);
  border-color: #3b82f6;
  color: #ffffff;
}

/* =========================================================
   DOCUMENTS WORKSPACE (Clean, Direct Showcase)
   ========================================================= */
.documents-workspace-section {
  padding: 0 1.5rem 3rem;
  flex: 1;
}

.documents-container {
  max-width: 1350px;
  margin: 0 auto;
}

/* Clean Verified Header */
.verified-clean-header {
  background: linear-gradient(135deg, rgba(6, 78, 59, 0.9) 0%, rgba(20, 83, 45, 0.8) 100%);
  border: 1px solid rgba(52, 211, 153, 0.4);
  border-radius: 10px;
  padding: 0.85rem 1.25rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.25rem;
  box-shadow: 0 4px 20px rgba(16, 185, 129, 0.2);
}

.v-left {
  display: flex;
  align-items: center;
  gap: 0.85rem;
}

.v-icon {
  width: 32px;
  height: 32px;
  color: #34d399;
}

.v-left h3 {
  margin: 0;
  font-family: 'Cinzel', serif;
  font-size: 1.2rem;
  font-weight: 800;
  color: #ffffff;
}

.v-left p {
  margin: 0.1rem 0 0;
  font-size: 0.75rem;
  color: #a7f3d0;
}

.v-pill {
  background: #10b981;
  color: #ffffff;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.6px;
  padding: 0.35rem 0.75rem;
  border-radius: 20px;
}

/* 4 Document Tabs Bar */
.doc-tabs-bar {
  background: #090e1a;
  border: 1px solid rgba(59, 130, 246, 0.3);
  border-radius: 10px;
  padding: 0.5rem 0.75rem;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.5rem;
  margin-bottom: 1.25rem;
}

.doc-tab-btn {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #cbd5e1;
  padding: 0.7rem 0.5rem;
  border-radius: 8px;
  font-size: 0.85rem;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  transition: all 0.2s ease;
}

.doc-tab-btn:hover {
  background: rgba(59, 130, 246, 0.2);
  border-color: #3b82f6;
  color: #ffffff;
}

.doc-tab-btn.active {
  background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
  border-color: #60a5fa;
  color: #ffffff;
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.4);
}

/* Stage Box */
.document-stage-box {
  background: #020617;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.6);
}

.doc-action-toolbar {
  background: #0f172a;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  padding: 0.75rem 1.25rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.doc-current-label {
  font-size: 0.92rem;
  font-weight: 700;
  color: #ffffff;
  margin-right: 0.5rem;
}

.doc-format-tag {
  font-size: 0.72rem;
  background: rgba(255, 255, 255, 0.08);
  padding: 0.2rem 0.5rem;
  border-radius: 4px;
  color: #94a3b8;
}

.doc-buttons-group {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.btn-doc-pdf {
  background: linear-gradient(135deg, #16a34a 0%, #15803d 100%);
  color: #ffffff;
  border: none;
  padding: 0.5rem 0.95rem;
  border-radius: 6px;
  font-size: 0.82rem;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  transition: all 0.2s;
}

.btn-doc-pdf:hover {
  background: linear-gradient(135deg, #22c55e 0%, #16a34a 100%);
}

.btn-doc-png {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #f1f5f9;
  padding: 0.5rem 0.9rem;
  border-radius: 6px;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  transition: all 0.2s;
}

.btn-doc-png:hover {
  background: rgba(255, 255, 255, 0.15);
  color: #ffffff;
}

.btn-doc-print {
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #cbd5e1;
  padding: 0.5rem 0.8rem;
  border-radius: 6px;
  font-size: 0.82rem;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.btn-doc-print:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #ffffff;
}

.zoom-pill {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  background: rgba(0, 0, 0, 0.4);
  padding: 2px 6px;
  border-radius: 6px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  margin-left: 0.35rem;
}

.btn-z {
  background: transparent;
  border: none;
  color: #cbd5e1;
  width: 26px;
  height: 26px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  border-radius: 4px;
}

.btn-z:hover {
  background: rgba(255, 255, 255, 0.15);
  color: #ffffff;
}

.btn-z svg {
  width: 14px;
  height: 14px;
}

#zoomText {
  font-size: 0.72rem;
  font-weight: 700;
  color: #94a3b8;
  min-width: 38px;
  text-align: center;
}

.doc-render-viewport {
  padding: 2.5rem 1rem 4.5rem 1rem;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  min-height: 580px;
  max-height: 86vh;
  background: radial-gradient(circle at center, #131c2d 0%, #080c14 100%);
  overflow-x: auto;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  position: relative;
  scrollbar-width: thin;
  scrollbar-color: #3b82f6 #0f172a;
}

.doc-render-viewport::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

.doc-render-viewport::-webkit-scrollbar-track {
  background: #0f172a;
}

.doc-render-viewport::-webkit-scrollbar-thumb {
  background: #3b82f6;
  border-radius: 4px;
}

.doc-scale-wrapper {
  display: flex;
  justify-content: center;
  align-items: flex-start;
  transform-origin: top center;
  transition: transform 0.15s ease-out;
  position: relative;
  margin: 0 auto;
  flex-shrink: 0;
  width: 1024px;
}

/* Footer */
.public-portal-footer {
  margin-top: auto;
  background: #020617;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding: 1.25rem 1.5rem;
}

.portal-footer-inner {
  max-width: 1400px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
}

.footer-left p {
  margin: 0;
  font-size: 0.8rem;
  color: #94a3b8;
}

.footer-sub {
  font-size: 0.7rem;
  color: #64748b;
  margin-top: 0.2rem !important;
}

.footer-link {
  color: #60a5fa;
  font-size: 0.78rem;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.footer-link:hover {
  text-decoration: underline;
}

/* =============================================================
   MOBILE RESPONSIVE OPTIMIZATIONS (Smartphones & Tablets)
   ============================================================= */
@media (max-width: 900px) {
  .portal-header-inner {
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 0.75rem 1rem;
    gap: 0.75rem;
  }

  .header-brand-group {
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 0.5rem;
  }

  .header-brand-text .header-inst-title {
    font-size: 1.15rem;
    letter-spacing: 0.5px;
    line-height: 1.25;
  }

  .header-brand-text .header-inst-sub {
    font-size: 0.68rem;
  }

  .header-brand-text .header-inst-loc {
    font-size: 0.62rem;
  }

  .header-nav-actions {
    width: 100%;
    justify-content: center;
    flex-wrap: wrap;
    gap: 0.5rem;
  }

  .verify-search-section {
    padding: 1.25rem 0.75rem;
  }

  .verify-search-card {
    padding: 1.25rem 1rem;
    border-radius: 14px;
  }

  .verify-search-header h2 {
    font-size: 1.25rem;
  }

  .inputs-grid {
    grid-template-columns: 1fr;
    gap: 0.85rem;
  }

  .input-field-group input {
    font-size: 16px !important; /* Prevents auto-zoom on iOS */
    height: 46px;
  }

  .btn-verify-submit {
    width: 100%;
    height: 48px;
    font-size: 0.95rem;
    justify-content: center;
  }

  .verification-badge-card {
    flex-direction: column;
    align-items: flex-start;
    padding: 1rem;
    gap: 0.85rem;
  }

  .badge-candidate-profile {
    width: 100%;
  }

  .badge-status-pill {
    width: 100%;
    justify-content: center;
  }

  /* Document Tabs Bar: Horizontal smooth touch scrolling */
  .doc-tabs-bar {
    display: flex !important;
    overflow-x: auto;
    gap: 0.45rem;
    padding: 4px;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    grid-template-columns: none;
  }

  .doc-tabs-bar::-webkit-scrollbar {
    display: none;
  }

  .doc-tab-btn {
    flex-shrink: 0;
    white-space: nowrap;
    padding: 0.65rem 0.95rem;
    font-size: 0.82rem;
  }

  /* Toolbar */
  .doc-action-toolbar {
    flex-direction: column;
    align-items: stretch;
    gap: 0.75rem;
    padding: 0.85rem 1rem;
  }

  .doc-title-group {
    flex-wrap: wrap;
    gap: 0.5rem;
  }

  .doc-toolbar-right {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    width: 100%;
    gap: 0.5rem;
  }

  .doc-zoom-controls {
    order: 2;
    margin-left: auto;
  }

  .doc-action-btns {
    order: 1;
    display: flex;
    width: 100%;
    gap: 0.5rem;
  }

  .doc-action-btns .btn-action {
    flex: 1;
    justify-content: center;
    height: 42px;
  }

  /* Document Viewport */
  .doc-viewport-container {
    padding: 0.75rem 0.25rem 1.5rem 0.25rem;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  .portal-footer-inner {
    flex-direction: column;
    text-align: center;
    gap: 0.75rem;
  }

  .footer-right {
    justify-content: center;
  }
}

@media (max-width: 480px) {
  .portal-brand-logo {
    width: 46px;
    height: 46px;
  }

  .header-brand-text .header-inst-title {
    font-size: 1.05rem;
  }

  .verify-search-card {
    padding: 1rem 0.75rem;
  }

  .doc-action-btns {
    flex-direction: column;
  }

  .doc-action-btns .btn-action {
    width: 100%;
  }

  .doc-zoom-controls {
    width: 100%;
    justify-content: center;
    margin-left: 0;
  }
}

/* Certificate QR Code Placement */
.cert-footer-center {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  margin-bottom: 5px;
}

.cert-qr-container {
  width: 96px;
  height: 96px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 5px;
  background: #ffffff;
  padding: 4px;
  border: 1.5px solid #d4af37;
  border-radius: 4px;
  box-sizing: border-box;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
  overflow: hidden;
}

.cert-qr-container canvas,
.cert-qr-container img,
.cert-qr-img {
  max-width: 100%;
  max-height: 100%;
  width: 100%;
  height: 100%;
  object-fit: contain;
  image-rendering: -webkit-optimize-contrast;
  image-rendering: crisp-edges;
  image-rendering: pixelated;
}

.cert-qr-container canvas[style*="none"],
.cert-qr-container img[style*="none"] {
  display: none !important;
}
