/* ==========================================================================
   NEEF Registered Applicant Portal Stylesheet (ng/)
   Extends Core Brand Design System
   ========================================================================== */

/* Portal Body & Structure */
.portal-body {
  background-color: #0A0B0E;
  color: #F8FAFC;
  font-family: var(--font-sans);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.portal-wrapper {
  display: flex;
  flex: 1;
  min-height: calc(100vh - 72px);
}

/* Portal Top Header Bar */
.portal-topbar {
  background-color: #0A0B0E;
  border-bottom: 1px solid #23272F;
  height: 72px;
  position: sticky;
  top: 0;
  z-index: 40;
  display: flex;
  align-items: center;
  padding: 0 1.5rem;
}

.portal-topbar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
}

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

.portal-brand-tag {
  background: rgba(184, 138, 68, 0.2);
  color: #D8B26E;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 0.25rem 0.6rem;
  border-radius: 6px;
  border: 1px solid rgba(184, 138, 68, 0.35);
}

/* Sidebar Navigation:
   Disabled on applicant portal routes, fully active and responsive on Admin Console (~/) */
.portal-sidebar {
  display: none;
}

.admin-body .portal-sidebar,
body.admin-body .portal-sidebar,
#admin-sidebar {
  display: flex !important;
  flex-direction: column;
  justify-content: space-between;
  width: 275px;
  min-width: 275px;
  background-color: #FFFFFF !important;
  border-right: 1px solid #E2E8F0 !important;
  box-shadow: 1px 0 3px 0 rgba(0, 0, 0, 0.02) !important;
  position: sticky;
  top: 72px;
  height: calc(100vh - 72px);
  overflow-y: auto;
  z-index: 50;
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

@media (max-width: 991px) {

  .admin-body .portal-sidebar,
  body.admin-body .portal-sidebar,
  #admin-sidebar {
    position: fixed;
    top: 72px;
    left: 0;
    bottom: 0;
    height: calc(100vh - 72px);
    transform: translateX(-100%);
    box-shadow: none;
  }

  .admin-body .portal-sidebar.open,
  body.admin-body .portal-sidebar.open,
  #admin-sidebar.open {
    transform: translateX(0);
    box-shadow: 12px 0 40px rgba(0, 0, 0, 0.7);
  }
}

.sidebar-menu {
  padding: 1.5rem 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.sidebar-section-title {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: #64748B;
  font-weight: 700;
  padding: 0.75rem 0.75rem 0.35rem 0.75rem;
}

.sidebar-link {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  padding: 0.75rem 1rem;
  border-radius: 10px;
  color: #000000;
  text-decoration: none;
  font-size: 0.92rem;
  font-weight: 600;
  transition: all 0.2s ease;
}

.sidebar-link:hover {
  background: #F1F5F9;
  color: #047857;
}

.sidebar-link.active {
  background: var(--color-emerald);
  color: #FFFFFF;
  box-shadow: 0 4px 12px rgba(13, 122, 85, 0.35);
}

.sidebar-link-badge {
  margin-left: auto;
  background: #B88A44;
  color: #062319;
  font-size: 0.72rem;
  font-weight: 800;
  padding: 0.15rem 0.45rem;
  border-radius: 100px;
}

.sidebar-widget {
  margin: 1rem;
  padding: 1.25rem;
  background: rgba(6, 35, 25, 0.6);
  border: 1px solid rgba(184, 138, 68, 0.25);
  border-radius: 14px;
}

/* Main Content Area */
.portal-main {
  flex: 1;
  padding: 2.25rem;
  max-width: 1300px;
  margin: 0 auto;
  width: 100%;
}

.portal-main .card {
  color: var(--color-text);
}

@media (max-width: 768px) {
  .portal-main {
    padding: 1.25rem;
  }
}

/* Portal Banner */
.portal-welcome-banner {
  background: linear-gradient(135deg, #0B3828 0%, #062319 100%);
  border: 1px solid rgba(184, 138, 68, 0.3);
  border-radius: 18px;
  padding: 2.25rem;
  color: #FFFFFF;
  margin-bottom: 2rem;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 1.5rem;
  box-shadow: var(--shadow-md);
  position: relative;
  overflow: hidden;
}

.portal-welcome-banner::after {
  content: '';
  position: absolute;
  top: -40%;
  right: -10%;
  width: 320px;
  height: 320px;
  background: radial-gradient(circle, rgba(13, 122, 85, 0.3) 0%, transparent 70%);
  pointer-events: none;
}

/* Stat Cards */
.portal-stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.5rem;
  margin-bottom: 2rem;
}

.portal-stat-card {
  background: #FFFFFF;
  border: 1px solid var(--color-border);
  border-radius: 16px;
  padding: 1.5rem;
  box-shadow: var(--shadow-sm);
  display: flex;
  align-items: flex-start;
  gap: 1.25rem;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.portal-stat-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
}

.stat-icon-box {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.35rem;
  flex-shrink: 0;
}

.stat-icon-emerald {
  background: rgba(13, 122, 85, 0.12);
  color: var(--color-emerald);
}

.stat-icon-gold {
  background: rgba(184, 138, 68, 0.15);
  color: var(--color-gold);
}

.stat-icon-blue {
  background: rgba(59, 130, 246, 0.12);
  color: #2563EB;
}

.stat-val {
  font-family: var(--font-display);
  font-size: 1.65rem;
  font-weight: 800;
  color: var(--color-forest);
  line-height: 1.2;
}

.stat-label {
  font-size: 0.82rem;
  color: var(--color-text-muted);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-top: 0.2rem;
}

/* Stepper / Timeline */
.stepper-timeline {
  display: flex;
  justify-content: space-between;
  position: relative;
  margin: 2rem 0;
}

.stepper-timeline::before {
  content: '';
  position: absolute;
  top: 20px;
  left: 30px;
  right: 30px;
  height: 3px;
  background: var(--color-border);
  z-index: 1;
}

.step-node {
  position: relative;
  z-index: 2;
  text-align: center;
  flex: 1;
  padding: 0 4px;
}

.step-dot {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: #FFFFFF;
  border: 3px solid var(--color-border);
  color: var(--color-text-muted);
  font-weight: 800;
  font-size: 0.95rem;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 0.75rem auto;
  transition: all 0.3s ease;
}

.step-node.completed .step-dot {
  background: var(--color-emerald);
  border-color: var(--color-emerald);
  color: #FFFFFF;
}

.step-node.active .step-dot {
  background: var(--color-forest);
  border-color: var(--color-gold);
  color: #D8B26E;
  box-shadow: 0 0 0 4px rgba(184, 138, 68, 0.25);
}

.step-title {
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--color-forest);
  line-height: 1.25;
}

.step-desc {
  font-size: 0.75rem;
  color: var(--color-text-muted);
  margin-top: 0.15rem;
  line-height: 1.3;
}

@media (max-width: 640px) {
  .step-node {
    padding: 0 2px;
  }

  .step-dot {
    width: 34px;
    height: 34px;
    font-size: 0.82rem;
    margin-bottom: 0.45rem;
  }

  .stepper-timeline::before {
    top: 17px;
    left: 20px;
    right: 20px;
  }

  .step-title {
    font-size: 0.72rem;
    line-height: 1.2;
  }

  .step-desc {
    font-size: 0.65rem;
    line-height: 1.2;
  }
}

/* Application Form Sections */
.form-step-section {
  background: #FFFFFF;
  border: 1px solid var(--color-border);
  border-radius: 16px;
  padding: 2rem;
  margin-bottom: 2rem;
  box-shadow: var(--shadow-sm);
}

.form-step-header {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.5rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--color-border);
}

.form-step-number {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  background: var(--color-forest);
  color: #D8B26E;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
}

/* ==========================================================================
   Gaviro Floating Bottom Navigation Capsule Bar
   (Home, Apply, Submissions, Notices, Me)
   ========================================================================== */
.portal-bottom-nav {
  position: fixed !important;
  bottom: 0.85rem !important;
  left: 50% !important;
  right: auto !important;
  transform: translateX(-50%) !important;
  margin: 0 auto !important;
  z-index: 9999 !important;
  background: rgba(7, 21, 9, 0.95);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border: 1px solid rgba(116, 219, 19, 0.4);
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.65), 0 0 0 1px rgba(255, 255, 255, 0.05);
  border-radius: 9999px;
  padding: 6px 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  max-width: 95vw;
  width: max-content;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.portal-bottom-nav-item {
  color: #A1C4A5;
  text-decoration: none;
  padding: 4px 11px;
  border-radius: 9999px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  font-size: 11px;
  font-weight: 600;
  line-height: 1.1;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  white-space: nowrap;
  position: relative;
}

.portal-bottom-nav-item:hover {
  color: #FFFFFF;
  background: rgba(255, 255, 255, 0.06);
}

.portal-bottom-nav-item.active {
  background: linear-gradient(135deg, #246A14 0%, #74DB13 100%);
  color: #061309;
  font-weight: 900;
  padding: 6px 14px;
  flex-direction: row;
  align-items: center;
  gap: 6px;
  box-shadow: 0 4px 14px rgba(116, 219, 19, 0.35);
}

.portal-bottom-nav-item.active:hover {
  background: linear-gradient(135deg, #246A14 0%, #86ED20 100%);
  color: #061309;
}

.portal-bottom-nav-icon {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  transition: transform 0.2s ease, stroke 0.2s ease;
}

.portal-bottom-nav-item.active .portal-bottom-nav-icon {
  stroke: #061309;
  stroke-width: 2.2;
}

.portal-bottom-nav-item:active {
  transform: scale(0.95);
}

.portal-bottom-nav-label {
  letter-spacing: -0.01em;
}

.portal-bottom-nav-badge {
  position: absolute;
  top: -4px;
  right: -6px;
  background: #EF4444;
  color: #FFFFFF;
  border-radius: 9999px;
  font-size: 9px;
  font-weight: 800;
  min-width: 15px;
  height: 15px;
  padding: 0 3px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1.5px solid #071509;
  line-height: 1;
}

.portal-bottom-nav-item.active .portal-bottom-nav-badge {
  border-color: #246A14;
}

/* Ensure bottom space so floating capsule never obstructs content or forms */
.portal-main,
.portal-content,
.portal-body {
  padding-bottom: 6rem !important;
}

@media (max-width: 380px) {
  .portal-bottom-nav {
    padding: 4px 6px;
    gap: 2px;
  }

  .portal-bottom-nav-item {
    padding: 3px 7px;
    font-size: 10px;
  }

  .portal-bottom-nav-item.active {
    padding: 5px 10px;
  }

  .portal-bottom-nav-icon {
    width: 18px;
    height: 18px;
  }
}

/* ==========================================================================
   NEEF 2026/2027 Enhanced Portal Design Tokens & Components
   ========================================================================== */

/* ==========================================================================
   NEEF 2026/2027 High-Security Biometric Identity Card (Mature Institutional Architecture)
   CR80 Standard / Mobile-First Fluid Scaled Engine
   ========================================================================== */

.neef-id-card-wrapper {
  width: 100%;
  max-width: 500px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  box-sizing: border-box;
}

/* Action Toolbar Grid */
.neef-id-actions-bar {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 0.5rem;
  width: 100%;
  margin-top: 0.75rem;
}

.btn-action-card {
  font-size: 0.82rem;
  font-weight: 800;
  padding: 0.65rem 0.85rem;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  cursor: pointer;
  text-decoration: none;
  white-space: nowrap;
  transition: all 0.2s ease;
  background: linear-gradient(135deg, #0D7A55 0%, #10B981 100%);
  color: #FFFFFF;
  border: 1.5px solid #34D399;
  box-shadow: 0 3px 12px rgba(16, 185, 129, 0.35);
}

.btn-action-card:hover {
  transform: translateY(-1px);
  box-shadow: 0 5px 15px rgba(16, 185, 129, 0.45);
}

.btn-action-card.gold {
  background: linear-gradient(135deg, #F59E0B 0%, #D97706 100%);
  border-color: #FCD34D;
  box-shadow: 0 3px 12px rgba(245, 158, 11, 0.4);
}

.btn-action-card.secondary {
  background: rgba(30, 41, 59, 0.85);
  border-color: rgba(226, 185, 78, 0.5);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.btn-action-card.bank {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.25);
}

/* Mobile Segmented View Switcher (Front / Back / Both) */
.neef-card-view-switcher {
  display: flex;
  background: rgba(4, 24, 17, 0.85);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  padding: 3px;
  border-radius: 9999px;
  border: 1.5px solid rgba(212, 175, 55, 0.45);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.35);
  margin-bottom: 0.25rem;
  width: 100%;
  max-width: 440px;
  justify-content: center;
  gap: 3px;
  box-sizing: border-box;
}

.neef-card-view-switcher button {
  flex: 1 1 auto;
  background: transparent;
  border: none;
  color: #CBD5E1;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0.4rem 0.65rem;
  border-radius: 9999px;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
  text-align: center;
}

.neef-card-view-switcher button.active {
  background: linear-gradient(135deg, #0D7A55 0%, #10B981 100%);
  color: #FFFFFF;
  border: 1px solid #34D399;
  box-shadow: 0 2px 8px rgba(16, 185, 129, 0.4);
}

.neef-card-view-switcher button:hover:not(.active) {
  color: #FDE68A;
}

.neef-id-card-stage {
  width: 100%;
  max-width: 500px;
  margin: 0 auto;
  position: relative;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  transition: height 0.25s ease;
  overflow: visible;
}

.neef-id-card-scaler {
  width: 500px;
  transform-origin: top center;
  transform: scale(var(--card-scale, 1));
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.25rem;
  transition: transform 0.2s ease;
}

.neef-download-modal {
  position: fixed;
  inset: 0;
  background: rgba(2, 23, 14, 0.85);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 99999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.neef-download-modal-box {
  background: #042417;
  border: 1.5px solid rgba(226, 185, 78, 0.6);
  border-radius: 18px;
  width: 100%;
  max-width: 480px;
  padding: 1.75rem 1.5rem;
  text-align: center;
  color: #FFFFFF;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.8), 0 0 30px rgba(212, 175, 55, 0.25);
}

.neef-modal-check {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: linear-gradient(135deg, #0D7A55 0%, #10B981 100%);
  color: #FFFFFF;
  font-size: 1.5rem;
  font-weight: 800;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 0.85rem;
  box-shadow: 0 4px 14px rgba(16, 185, 129, 0.4);
}

.neef-id-card-container {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.25rem;
  box-sizing: border-box;
}

/* High-Security PVC Biometric Identity Card - Dynamic Content-Fitting Container */
.neef-id-card {
  width: 500px !important;
  height: 315px !important;
  min-width: 500px !important;
  min-height: 315px !important;
  max-width: 500px !important;
  max-height: 315px !important;
  border-radius: 14px;
  padding: 0.85rem 1.15rem 0.75rem 1.15rem;
  color: #FFFFFF;
  position: relative;
  overflow: hidden;
  box-sizing: border-box !important;
  background:
    radial-gradient(ellipse at 85% 15%, rgba(212, 175, 55, 0.2) 0%, transparent 55%),
    radial-gradient(ellipse at 15% 85%, rgba(16, 185, 129, 0.2) 0%, transparent 60%),
    linear-gradient(142deg, #021F14 0%, #033321 28%, #054D32 65%, #03281A 100%);
  border: 2px solid rgba(226, 185, 78, 0.85);
  box-shadow:
    0 0 0 1px rgba(254, 240, 138, 0.35) inset,
    0 16px 36px -6px rgba(0, 0, 0, 0.7),
    0 0 28px rgba(212, 175, 55, 0.3);
  font-family: var(--font-sans);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 0.35rem;
  transition: box-shadow 0.3s ease;
  user-select: none;
}

.neef-id-card:hover {
  box-shadow:
    0 0 0 1px rgba(254, 240, 138, 0.5) inset,
    0 20px 42px -6px rgba(0, 0, 0, 0.75),
    0 0 35px rgba(212, 175, 55, 0.4);
}

/* Guilloche Pattern Background */
.neef-guilloche-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  opacity: 0.16;
  z-index: 1;
}

/* Microtext Security Strip */
.neef-id-microtext-ribbon {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 10px;
  background: linear-gradient(90deg, #92400E 0%, #D97706 50%, #92400E 100%);
  overflow: hidden;
  white-space: nowrap;
  display: flex;
  align-items: center;
  z-index: 3;
}

.neef-id-microtext-ribbon span {
  font-family: monospace;
  font-size: 5.5px;
  font-weight: 800;
  letter-spacing: 0.14em;
  color: #FEF3C7;
  text-transform: uppercase;
}

/* Card Header */
.neef-id-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  padding-top: 0.25rem;
  padding-bottom: 0.35rem;
  border-bottom: 1.5px solid rgba(226, 185, 78, 0.4);
  position: relative;
  z-index: 2;
  gap: 0.4rem;
}

.neef-id-crest-box {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  min-width: 0;
}

.neef-id-coat-img {
  height: 34px;
  width: auto;
  object-fit: contain;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.5));
  flex-shrink: 0;
}

.neef-id-titles {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.neef-id-sovereign-tag {
  font-size: 0.48rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #FDE68A;
  line-height: 1.1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.neef-id-institution-name {
  font-size: clamp(0.64rem, 2.2vw, 0.82rem);
  font-weight: 900;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: #FFFFFF;
  line-height: 1.15;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.5);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.neef-id-sub-motto {
  font-size: 0.44rem;
  font-weight: 600;
  color: #A7F3D0;
  letter-spacing: 0.04em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.neef-id-header-right {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.15rem;
  flex-shrink: 0;
}

.neef-id-validity-tag {
  font-size: 0.54rem;
  font-weight: 900;
  color: #FEF08A;
  background: rgba(0, 0, 0, 0.45);
  border: 1px solid rgba(226, 185, 78, 0.5);
  border-radius: 4px;
  padding: 1px 5px;
  letter-spacing: 0.05em;
  white-space: nowrap;
}

.neef-id-security-class {
  font-size: 0.42rem;
  color: #CBD5E1;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  white-space: nowrap;
}

/* Card Body */
.neef-id-body {
  display: grid;
  grid-template-columns: 88px 1fr;
  gap: 0.75rem;
  align-items: center;
  margin: 0.2rem 0;
  position: relative;
  z-index: 2;
}

/* Biometric Portrait Frame */
.neef-id-photo-column {
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
  flex-shrink: 0;
}

.neef-id-photo-frame {
  width: 88px;
  height: 110px;
  border-radius: 8px;
  overflow: hidden;
  border: 2px solid #E2B94E;
  background: #032316;
  box-shadow:
    0 0 0 1px rgba(254, 240, 138, 0.4) inset,
    0 6px 14px rgba(0, 0, 0, 0.55),
    0 0 12px rgba(212, 175, 55, 0.35);
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

.neef-id-photo-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Overlapping Holographic Biometric Seal on Photo Corner */
.neef-id-photo-holo-seal {
  position: absolute;
  bottom: -4px;
  right: -4px;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(254, 240, 138, 0.95) 0%, rgba(212, 175, 55, 0.85) 60%, rgba(180, 83, 9, 0.9) 100%);
  border: 1px solid #FFFFFF;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.5);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: #042417;
  font-size: 0.32rem;
  font-weight: 900;
  text-align: center;
  line-height: 1;
  pointer-events: none;
  z-index: 4;
}

/* Bio & Structured Data Grid */
.neef-id-data-column {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 0.25rem;
  min-width: 0;
}

.neef-id-chip-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.1rem;
}

.neef-id-emv-chip {
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.neef-id-accred-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  background: rgba(16, 185, 129, 0.25);
  border: 1px solid #34D399;
  border-radius: 9999px;
  padding: 1px 6px;
  font-size: 0.48rem;
  font-weight: 800;
  color: #34D399;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.neef-id-holder-name {
  font-size: clamp(0.88rem, 2.8vw, 1.12rem);
  font-weight: 900;
  color: #FFFFFF;
  line-height: 1.15;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  text-shadow: 0 2px 6px rgba(0, 0, 0, 0.5);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* High-Density Two-Column Tabular Grid */
.neef-id-tabular-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.2rem 0.5rem;
  background: rgba(0, 0, 0, 0.25);
  padding: 0.35rem 0.45rem;
  border-radius: 7px;
  border: 1px solid rgba(226, 185, 78, 0.25);
}

.neef-id-field-cell {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
  min-width: 0;
}

.neef-id-field-label {
  font-size: 0.44rem;
  font-weight: 700;
  text-transform: uppercase;
  color: #CBD5E1;
  letter-spacing: 0.05em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.neef-id-field-val {
  font-size: 0.64rem;
  font-weight: 800;
  color: #FFFFFF;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.neef-id-field-val.gold {
  color: #FEF08A;
  font-family: monospace;
  letter-spacing: 0.03em;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.5);
}

.neef-id-field-val.phone-highlight {
  color: #38BDF8;
  font-weight: 800;
  font-family: monospace;
}

.neef-id-field-val.nin-highlight {
  color: #A7F3D0;
  font-weight: 800;
  font-family: monospace;
}

/* Card Footer */
.neef-id-footer {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  border-top: 1.5px solid rgba(226, 185, 78, 0.35);
  padding-top: 0.35rem;
  position: relative;
  z-index: 2;
  gap: 0.4rem;
}

.neef-id-qr-block {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  min-width: 0;
}

.neef-id-qr-box {
  width: 36px;
  height: 36px;
  background: #FFFFFF;
  border-radius: 4px;
  padding: 2px;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.neef-id-qr-box img,
.neef-id-qr-box svg {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.neef-id-qr-meta {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.neef-id-qr-status {
  font-size: 0.5rem;
  font-weight: 900;
  color: #34D399;
  letter-spacing: 0.04em;
  display: flex;
  align-items: center;
  gap: 0.2rem;
  white-space: nowrap;
}

.neef-id-qr-hint {
  font-size: 0.42rem;
  color: #CBD5E1;
  font-weight: 500;
  white-space: nowrap;
}

.neef-id-sig-block {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  text-align: right;
  flex-shrink: 0;
}

.neef-id-sig-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.2rem;
  background: rgba(226, 185, 78, 0.2);
  border: 1px solid rgba(226, 185, 78, 0.6);
  border-radius: 9999px;
  padding: 1px 5px;
  font-size: 0.42rem;
  font-weight: 800;
  color: #FEF08A;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  white-space: nowrap;
}

.neef-id-sig-script {
  font-family: 'Brush Script MT', 'Segoe Script', cursive, serif;
  font-size: 0.85rem;
  color: #FFFFFF;
  font-weight: 700;
  line-height: 1.1;
  margin-top: 0.1rem;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.5);
  white-space: nowrap;
}

.neef-id-sig-title {
  font-size: 0.4rem;
  color: #E2E8F0;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-weight: 600;
  white-space: nowrap;
}

/* ==========================================================================
   CARD BACK (REVERSE SIDE)
   ========================================================================== */
.neef-id-card-back {
  width: 500px !important;
  height: 315px !important;
  min-width: 500px !important;
  min-height: 315px !important;
  max-width: 500px !important;
  max-height: 315px !important;
  border-radius: 14px;
  background:
    radial-gradient(ellipse at 50% 10%, rgba(212, 175, 55, 0.15) 0%, transparent 60%),
    linear-gradient(142deg, #02170E 0%, #03281A 40%, #043823 75%, #021A11 100%);
  border: 2px solid rgba(226, 185, 78, 0.85);
  box-shadow:
    0 0 0 1px rgba(254, 240, 138, 0.3) inset,
    0 16px 36px -6px rgba(0, 0, 0, 0.7),
    0 0 25px rgba(212, 175, 55, 0.25);
  padding: 0 0 0.75rem 0;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 0.35rem;
  box-sizing: border-box !important;
  overflow: hidden;
  position: relative;
  user-select: none;
}

.neef-id-mag-stripe {
  width: 100%;
  height: 30px;
  background: linear-gradient(180deg, #0B1320 0%, #1E293B 50%, #0F172A 100%);
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  border-bottom: 1px solid rgba(0, 0, 0, 0.6);
  position: relative;
  margin-top: 0.65rem;
}

.neef-id-back-content {
  padding: 0.45rem 1rem 0 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  position: relative;
  z-index: 2;
}

.neef-id-terms-list {
  font-size: 0.5rem;
  color: #F8FAFC;
  line-height: 1.4;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.neef-id-terms-list strong {
  color: #FDE68A;
}

/* Machine Readable Zone (MRZ) */
.neef-id-mrz-box {
  background: rgba(0, 0, 0, 0.55);
  border: 1px solid rgba(226, 185, 78, 0.35);
  border-radius: 5px;
  padding: 0.3rem 0.55rem;
  margin: 0.25rem 1rem 0 1rem;
  font-family: 'Courier New', Courier, monospace;
  font-size: clamp(0.48rem, 1.8vw, 0.6rem);
  color: #F8FAFC;
  letter-spacing: 0.08em;
  line-height: 1.3;
  font-weight: 700;
  text-align: left;
  overflow: hidden;
}

/* ==========================================================================
   MOBILE-FIRST SCREEN FIT SCALING RULES (320px - 560px)
   ========================================================================== */
@media (max-width: 560px) {
  .portal-main {
    padding: 0.75rem 0.65rem 5.5rem 0.65rem !important;
  }

  .neef-id-card-wrapper {
    max-width: 100%;
    padding: 0;
  }

  .neef-card-view-switcher {
    max-width: 100%;
    padding: 3px;
    gap: 2px;
  }

  .neef-card-view-switcher button {
    font-size: 0.7rem;
    padding: 0.35rem 0.5rem;
  }

  .neef-id-card {
    border-radius: 12px;
    padding: 0.75rem 0.75rem 0.65rem 0.75rem;
    gap: 0.35rem;
  }

  .neef-id-body {
    grid-template-columns: 78px 1fr;
    gap: 0.55rem;
    margin: 0.15rem 0;
  }

  .neef-id-photo-frame {
    width: 78px;
    height: 98px;
  }

  .neef-id-photo-holo-seal {
    width: 26px;
    height: 26px;
    font-size: 0.28rem;
    bottom: -3px;
    right: -3px;
  }

  .neef-id-holder-name {
    font-size: 0.85rem;
  }

  .neef-id-tabular-grid {
    grid-template-columns: 1fr 1fr;
    gap: 0.15rem 0.35rem;
    padding: 0.25rem 0.35rem;
  }

  .neef-id-field-val {
    font-size: 0.58rem;
  }

  .neef-id-field-label {
    font-size: 0.4rem;
  }

  .neef-id-coat-img {
    height: 28px;
  }

  .neef-id-qr-box {
    width: 32px;
    height: 32px;
  }

  .neef-id-back-content {
    padding: 0.35rem 0.65rem 0 0.65rem;
  }

  .neef-id-mrz-box {
    margin: 0.25rem 0.65rem 0 0.65rem;
    padding: 0.25rem 0.35rem;
    font-size: 0.46rem;
    letter-spacing: 0.04em;
  }
}

@media (max-width: 375px) {
  .neef-id-card {
    padding: 0.65rem 0.55rem 0.55rem 0.55rem;
  }

  .neef-id-body {
    grid-template-columns: 70px 1fr;
    gap: 0.45rem;
  }

  .neef-id-photo-frame {
    width: 70px;
    height: 88px;
  }

  .neef-id-holder-name {
    font-size: 0.8rem;
  }

  .neef-id-field-val {
    font-size: 0.54rem;
  }

  .neef-id-field-label {
    font-size: 0.38rem;
  }

  .neef-id-institution-name {
    font-size: 0.58rem;
  }
}


/* Status Badges for 9 Phases */
.badge-status-pending {
  background: rgba(245, 158, 11, 0.15);
  color: #F59E0B;
  border: 1px solid rgba(245, 158, 11, 0.35);
}

.badge-status-review {
  background: rgba(59, 130, 246, 0.15);
  color: #60A5FA;
  border: 1px solid rgba(59, 130, 246, 0.35);
}

.badge-status-approved {
  background: rgba(16, 185, 129, 0.18);
  color: #34D399;
  border: 1px solid rgba(16, 185, 129, 0.45);
}

.badge-status-rejected {
  background: rgba(239, 68, 68, 0.15);
  color: #F87171;
  border: 1px solid rgba(239, 68, 68, 0.35);
}

.badge-status-disbursed {
  background: rgba(216, 178, 110, 0.2);
  color: #F5D38A;
  border: 1px solid rgba(216, 178, 110, 0.5);
}

/* Print ID Styles */
@media print {
  body * {
    visibility: hidden;
  }

  .neef-id-card-container,
  .neef-id-card-container * {
    visibility: visible;
  }

  .neef-id-card-stage {
    width: 100%;
    max-width: 500px;
    margin: 0 auto;
    position: relative;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    transition: height 0.25s ease;
    overflow: visible;
  }

  .neef-id-card-scaler {
    width: 500px;
    transform-origin: top center;
    transform: scale(var(--card-scale, 1));
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.25rem;
    transition: transform 0.2s ease;
  }

  .neef-download-modal {
    position: fixed;
    inset: 0;
    background: rgba(2, 23, 14, 0.85);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
  }

  .neef-download-modal-box {
    background: #042417;
    border: 1.5px solid rgba(226, 185, 78, 0.6);
    border-radius: 18px;
    width: 100%;
    max-width: 480px;
    padding: 1.75rem 1.5rem;
    text-align: center;
    color: #FFFFFF;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.8), 0 0 30px rgba(212, 175, 55, 0.25);
  }

  .neef-modal-check {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: linear-gradient(135deg, #0D7A55 0%, #10B981 100%);
    color: #FFFFFF;
    font-size: 1.5rem;
    font-weight: 800;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 0.85rem;
    box-shadow: 0 4px 14px rgba(16, 185, 129, 0.4);
  }

  .neef-id-card-container {
    position: absolute;
    top: 20px;
    left: 20px;
    margin: 0;
    max-width: 100%;
  }

  .no-print {
    display: none !important;
  }
}