@import url('https://fonts.googleapis.com/css2?family=Noto+Sans+Devanagari:wght@400;500;600;700;800&display=swap');
:root{--navy:#17243b;--blue:#315efb;--blue2:#eaf0ff;--text:#172033;--muted:#697386;--line:#e1e6ef;--bg:#f5f7fb;--white:#fff;--green:#16845b;--shadow:0 12px 35px rgba(23,36,59,.08)}
*{box-sizing:border-box}body{margin:0;background:var(--bg);color:var(--text);font-family:"Noto Sans Devanagari",Arial,sans-serif;font-size:14px}
.topbar{height:74px;background:#fff;border-bottom:1px solid var(--line);display:flex;align-items:center;justify-content:space-between;padding:0 5%;position:sticky;top:0;z-index:20}
.brand{display:flex;align-items:center;gap:12px}.brand-mark{width:44px;height:44px;border-radius:50%;overflow:hidden;display:flex;align-items:center;justify-content:center;border:2px solid var(--navy);background:#fff}
.brand-mark img{width:100%;height:100%;object-fit:cover}
.trust-logo-img{width:58px;height:58px;border-radius:50%;object-fit:cover;border:1.5px solid #000;display:inline-block}
.container{max-width:1120px;margin:36px auto;padding:0 20px}.page-heading{display:flex;justify-content:space-between;gap:25px;align-items:flex-start;margin-bottom:25px}.eyebrow{font-size:11px;letter-spacing:1.4px;color:var(--blue);font-weight:800}.page-heading h1,.view-header h1,.admin-head h1{margin:5px 0 7px;font-size:30px;line-height:1.25}.page-heading p{margin:0;color:var(--muted)}.reference-badge{background:var(--blue2);color:var(--blue);padding:9px 14px;border-radius:20px;font-weight:700;white-space:nowrap}
.progress-wrap{background:#fff;border:1px solid var(--line);border-radius:12px;padding:13px 16px;margin-bottom:18px}.progress-label{display:flex;justify-content:space-between;font-size:12px;color:var(--muted);margin-bottom:7px}.progress{height:5px;background:#edf0f5;border-radius:10px;overflow:hidden}.progress span{display:block;height:100%;background:var(--blue);border-radius:10px;transition:.3s}
.step-navigator { display: flex; gap: 12px; margin-bottom: 16px; }
.step-tab { flex: 1; display: flex; align-items: center; gap: 10px; padding: 12px 16px; border-radius: 12px; background: #fff; border: 1.5px solid var(--line); cursor: pointer; transition: all 0.2s ease; user-select: none; box-shadow: 0 2px 6px rgba(0,0,0,0.03); }
.step-tab:hover { background: #eff6ff; border-color: #bfdbfe; }
.step-tab.active { background: #315efb; color: #fff; border-color: #315efb; box-shadow: 0 4px 14px rgba(49, 94, 251, 0.25); }
.step-tab.completed { background: #f0fdf4; border-color: #bbf7d0; color: #166534; }
.step-tab .tab-num { width: 28px; height: 28px; border-radius: 50%; background: #e2e8f0; color: #475569; display: grid; place-items: center; font-weight: 800; font-size: 12px; flex-shrink: 0; }
.step-tab.active .tab-num { background: rgba(255,255,255,0.25); color: #fff; }
.step-tab.completed .tab-num { background: #dcfce7; color: #15803d; }
.step-tab .tab-label { font-size: 13px; font-weight: 700; line-height: 1.2; }
.step-tab .tab-sub { font-size: 10px; opacity: 0.8; font-weight: 500; }
@media(max-width:768px) { .step-navigator { flex-direction: column; gap: 8px; } }
.form-section{display:none;background:#fff;border:1px solid var(--line);border-radius:16px;box-shadow:var(--shadow);padding:30px}.form-section.active{display:block}.section-head{display:flex;gap:14px;align-items:center;padding-bottom:23px;border-bottom:1px solid var(--line);margin-bottom:25px}.section-number{width:42px;height:42px;border-radius:12px;background:var(--blue2);color:var(--blue);display:grid;place-items:center;font-weight:800}.section-head h2{font-size:20px;margin:0}.section-head p{margin:2px 0 0;color:var(--muted);font-size:11px}
.profile-layout{display:grid;grid-template-columns:1fr 215px;gap:30px}.fields-grid{display:grid;grid-template-columns:1fr 1fr;gap:18px}.form-group{min-width:0}.form-group.span-2{grid-column:span 2}.form-group label{display:block;font-size:12px;font-weight:700;margin-bottom:7px}.form-group label span{color:#e44848}.form-group input,.form-group textarea,.form-group select,.input-prefix{width:100%;border:1px solid #d9dfe9;background:#fff;border-radius:9px;min-height:44px;padding:10px 12px;font:inherit;color:var(--text);outline:none;transition:.15s}.form-group textarea{resize:vertical}.form-group input:focus,.form-group textarea:focus,.form-group select:focus,.input-prefix:focus-within{border-color:#8ea5ff;box-shadow:0 0 0 3px #edf1ff}.input-prefix{display:flex;align-items:center;padding:0 11px;gap:8px}.input-prefix input{border:0;box-shadow:none;padding:0}.input-prefix b{color:var(--muted)}
.photo-card{border:1px solid var(--line);background:#fafbfe;border-radius:13px;padding:15px;align-self:start}.photo-title{font-weight:800;font-size:12px;margin-bottom:10px}.photo-preview{height:220px;border:1.5px dashed #bfc7d7;border-radius:10px;display:flex;flex-direction:column;align-items:center;justify-content:center;text-align:center;color:var(--muted);overflow:hidden;background:#fff}.photo-preview img{width:100%;height:100%;object-fit:cover}.camera{font-size:28px;color:#a5aec0;margin-bottom:7px}.photo-preview strong{font-size:12px;color:var(--text)}.photo-preview small{font-size:10px;margin-top:5px}.file-input{display:none}.upload-btn{display:block;text-align:center;margin-top:10px;background:var(--navy);color:#fff;border-radius:8px;padding:9px;font-size:12px;font-weight:700;cursor:pointer}
.info-note{background:#f6f8fc;border:1px solid var(--line);padding:11px 13px;border-radius:8px;color:var(--muted);font-size:12px;margin-bottom:14px}.table-card{border:1px solid var(--line);border-radius:10px;overflow:auto}.entry-table{width:100%;border-collapse:collapse;min-width:760px}.entry-table th{background:#f8f9fc;color:#5d6779;font-size:11px;text-align:left;font-weight:800}.entry-table th,.entry-table td{border-bottom:1px solid var(--line);padding:9px}.entry-table tr:last-child td{border-bottom:0}.entry-table td input{width:100%;border:0;outline:0;background:transparent;font:inherit;min-width:65px}.entry-table td input:focus{background:#f5f7ff;border-radius:5px;padding:6px}.two-cards{display:grid;grid-template-columns:1fr 1fr;gap:18px;margin-top:22px}.two-cards .form-group{background:#fafbfe;padding:14px;border-radius:10px;border:1px solid var(--line)}.add-row{border:1px dashed #9aa8c1;background:#fff;color:var(--blue);font-weight:700;border-radius:8px;padding:8px 13px;margin-top:12px;cursor:pointer}.declaration-card{margin-top:24px;background:#fffaf0;border:1px solid #f0ddb1;border-radius:10px;padding:15px}.check-row{display:flex;gap:11px;align-items:flex-start}.check-row input{margin-top:5px;width:17px;height:17px}.check-row label{font-size:12px;line-height:1.7;color:#555}
.form-footer{display:flex;justify-content:space-between;align-items:center;margin-top:18px}.footer-right{display:flex;align-items:center;gap:14px;margin-left:auto}.save-hint{color:#8a93a3;font-size:11px}.btn{border:0;border-radius:9px;padding:11px 18px;font:inherit;font-weight:800;cursor:pointer;text-decoration:none;display:inline-flex;align-items:center;justify-content:center}.btn.primary{background:var(--blue);color:#fff}.btn.success{background:var(--green);color:#fff}.btn.ghost{background:#fff;border:1px solid var(--line);color:var(--navy)}
.site-footer{text-align:center;color:#8a93a3;font-size:11px;padding:28px}.success-page{min-height:100vh;display:grid;place-items:center;padding:20px}.success-card{background:#fff;border:1px solid var(--line);border-radius:18px;box-shadow:var(--shadow);width:min(580px,100%);padding:45px;text-align:center}.success-icon{width:62px;height:62px;background:#e8f7f0;color:var(--green);border-radius:50%;display:grid;place-items:center;margin:0 auto 18px;font-size:30px;font-weight:800}.success-card h1{font-size:26px;margin:8px 0}.success-card p{color:var(--muted)}.application-no{margin:25px 0;background:#f7f8fb;border:1px solid var(--line);padding:15px;border-radius:10px}.application-no span{display:block;color:var(--muted);font-size:11px}.application-no strong{font-size:22px;letter-spacing:1px}.success-actions{display:flex;gap:10px;justify-content:center}
.admin-page{padding:35px 20px}.admin-wrap{max-width:1200px;margin:auto}.admin-head{display:flex;justify-content:space-between;align-items:end;margin-bottom:22px}.search{background:#fff;border:1px solid var(--line);padding:10px;border-radius:10px;margin-bottom:12px}.search input{border:0;outline:0;width:100%;font:inherit}.admin-table{width:100%;border-collapse:collapse;background:#fff;border:1px solid var(--line);border-radius:12px;overflow:hidden}.admin-table th,.admin-table td{padding:12px;border-bottom:1px solid var(--line);text-align:left;font-size:12px}.admin-table th{background:#f8f9fc;color:#697386}.admin-table a{color:var(--blue);font-weight:800;text-decoration:none}
.view-wrap{max-width:1040px;margin:30px auto;background:#fff;padding:35px 45px;border:1px solid var(--line);border-radius:15px;box-shadow:var(--shadow)}.view-header{display:flex;justify-content:space-between;align-items:center;border-bottom:1px solid var(--line);padding-bottom:18px;margin-bottom:20px}.view-header h1{font-size:24px}.record-grid{display:grid;grid-template-columns:1fr 150px;gap:25px}.record-item{display:flex;border-bottom:1px solid var(--line);padding:9px 0;gap:15px}.record-item span{width:170px;color:var(--muted);font-size:12px}.record-item strong{font-size:13px}.record-photo{height:170px;border:1px solid var(--line);border-radius:10px;display:grid;place-items:center;color:var(--muted);overflow:hidden}.record-photo img{width:100%;height:100%;object-fit:cover}.record-text{border:1px solid var(--line);border-radius:10px;padding:14px;min-height:100px;font-size:13px;line-height:1.7}.record-text span{display:block;color:var(--muted);font-size:11px;font-weight:800;margin-bottom:6px}
@media(max-width:800px){
  .topbar{height:auto;padding:12px 16px;flex-wrap:wrap;gap:10px}
  .brand strong{font-size:13px;line-height:1.2}
  .brand span{font-size:10px}
  .container{margin:18px auto;padding:0 12px}
  .page-heading{flex-direction:column;gap:10px;align-items:flex-start}
  .page-heading h1{font-size:22px}
  .reference-badge{display:inline-block;margin-top:4px}
  .form-section{padding:18px 14px}
  .profile-layout{grid-template-columns:1fr;gap:20px}
  .photo-card{order:-1;width:100%;max-width:280px;margin:0 auto 15px auto}
  .photo-preview{height:180px}
  .fields-grid{grid-template-columns:1fr;gap:14px}
  .form-group.span-2{grid-column:auto}
  .two-cards{grid-template-columns:1fr;gap:14px}
  .form-footer{flex-direction:column-reverse;align-items:stretch;gap:12px}
  .footer-right{flex:1;flex-direction:column;width:100%;gap:10px}
  .footer-right .btn, .form-footer .btn{width:100%;justify-content:center}
  .save-hint{display:none}
  
  /* Submitted Details & View Page Mobile Formatting */
  .view-wrap{margin:10px 6px;padding:18px 12px;border-radius:12px}
  .view-header{flex-direction:column;align-items:flex-start;gap:12px}
  .view-header h1{font-size:20px}
  .record-grid{display:flex !important;flex-direction:column !important;gap:16px !important}
  .record-photo{order:-1 !important;width:140px !important;height:170px !important;margin:0 auto 10px auto !important}
  .record-item{flex-direction:column;align-items:flex-start;gap:3px;padding:8px 0;border-bottom:1px dashed #cbd5e1}
  .record-item span{width:100% !important;font-size:11px;font-weight:700;color:var(--muted)}
  .record-item strong{font-size:13.5px;color:#0f172a;word-break:break-word}
  
  .admin-head{align-items:flex-start;flex-direction:column;gap:12px}
  .admin-head h1{font-size:20px}
  .admin-page{padding:16px 10px}
}
@media(max-width:480px){
  .auth-card-wrap{margin:20px auto;padding:0 8px}
  .auth-card{padding:24px 14px;border-radius:12px}
  .auth-card h2{font-size:19px}
  .btn{padding:10px 14px;font-size:13px}
  .step-tab{padding:10px 12px}
  .step-tab .tab-label{font-size:12px}
}
.trust-header { text-align: center !important; width: 100% !important; margin-bottom: 18px; padding-bottom: 12px; border-bottom: 2px solid #000; }
.trust-header .top-mantra { text-align: center !important; font-size: 14px; font-weight: 800; color: #000; margin-bottom: 3px; letter-spacing: 0.5px; }
.trust-header .trust-title { text-align: center !important; font-size: 28px; font-weight: 900; color: #000; margin: 3px 0 5px 0; font-family: 'Noto Sans Devanagari', Arial, sans-serif; letter-spacing: 0.5px; text-transform: uppercase; }
.trust-header .trust-address { text-align: center !important; font-size: 14px; font-weight: 700; color: #000; margin-bottom: 6px; }
.trust-header .trust-sub { display: flex !important; justify-content: center !important; align-items: center !important; gap: 12px; font-size: 13px; font-weight: 700; color: #000; margin-top: 4px; text-align: center !important; }
.trust-header .award-badge { border: 1.5px solid #000; background: #e2e8f0; padding: 3px 14px; font-weight: 900; border-radius: 4px; font-size: 13px; color: #000; box-shadow: 2px 2px 0px #000; }

.declaration-card { text-align: justify; text-justify: inter-word; line-height: 1.65; color: #000; font-weight: 600; font-size: 13px; }
.declaration-card b { font-weight: 900; font-size: 14px; color: #000; }

.trust-footer { margin-top: 25px; padding-top: 15px; border-top: 1.5px solid #0f172a; }
.trust-footer .sig-row { display: grid; grid-template-columns: 1fr 1fr 1fr; text-align: center; gap: 15px; }
.trust-footer .sig-post { font-weight: 800; font-size: 14px; color: #0f172a; }
.trust-footer .sig-space { height: 35px; }
.trust-footer .sig-name { font-size: 13px; font-weight: 700; color: #1e293b; }
.trust-footer .sig-phone { font-size: 12px; font-weight: 600; color: #475569; }

@page {
  size: A4 portrait;
  margin: 8mm 10mm;
}

@media print {
  html, body {
    background: #fff !important;
    margin: 0 !important;
    padding: 0 !important;
    font-size: 11px !important;
    color: #000 !important;
    height: 100% !important;
  }
  .no-print, .topbar, .site-footer {
    display: none !important;
  }
  .view-wrap {
    max-width: 100% !important;
    margin: 0 !important;
    padding: 16px 20px !important;
    border: 2px solid #000 !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    box-sizing: border-box !important;
    min-height: 98% !important;
    display: flex !important;
    flex-direction: column !important;
    justify-content: space-between !important;
  }
  .trust-logo-img { width: 50px !important; height: 50px !important; border: 1.5px solid #000 !important; margin-bottom: 2px !important; -webkit-print-color-adjust: exact !important; print-color-adjust: exact !important; }
  .trust-header {
    margin-bottom: 10px !important;
    padding-bottom: 6px !important;
    border-bottom: 2px solid #000 !important;
  }
  .trust-header .top-mantra { font-size: 11px !important; font-weight: 800 !important; margin-bottom: 2px !important; color: #000 !important; }
  .trust-header .trust-title { font-size: 21px !important; font-weight: 900 !important; margin: 2px 0 !important; letter-spacing: 0.5px; color: #000 !important; }
  .trust-header .trust-address { font-size: 11px !important; font-weight: 700 !important; margin-bottom: 3px !important; color: #000 !important; }
  .trust-header .trust-sub { font-size: 11px !important; font-weight: 700 !important; gap: 6px !important; margin-top: 2px !important; color: #000 !important; }
  .trust-header .award-badge { padding: 2px 10px !important; font-size: 11px !important; font-weight: 900 !important; border: 1.5px solid #000 !important; background: #e2e8f0 !important; box-shadow: none !important; color: #000 !important; -webkit-print-color-adjust: exact !important; print-color-adjust: exact !important; }

  .record-grid {
    grid-template-columns: 1fr 125px !important;
    gap: 15px !important;
    margin-bottom: 10px !important;
  }
  .record-item {
    padding: 3.5px 0 !important;
    border-bottom: 1px solid #475569 !important;
  }
  .record-item span {
    width: 140px !important;
    font-size: 11px !important;
    font-weight: 700 !important;
    color: #000 !important;
  }
  .record-item strong {
    font-size: 11.5px !important;
    font-weight: 700 !important;
    color: #000 !important;
  }
  .record-photo {
    width: 125px !important;
    height: 155px !important;
    border: 1.5px solid #000 !important;
    border-radius: 4px !important;
  }

  h2 {
    font-size: 13px !important;
    font-weight: 800 !important;
    margin: 10px 0 4px 0 !important;
    padding-bottom: 2px !important;
    border-bottom: 1.5px solid #000 !important;
    color: #000 !important;
  }

  .entry-table {
    min-width: 0 !important;
    width: 100% !important;
    margin-bottom: 10px !important;
  }
  .entry-table th, .entry-table td {
    padding: 5px 7px !important;
    font-size: 10.5px !important;
    border: 1px solid #334155 !important;
    color: #000 !important;
  }
  .entry-table th {
    background: #e2e8f0 !important;
    font-weight: 800 !important;
    -webkit-print-color-adjust: exact !important;
    print-color-adjust: exact !important;
  }

  .two-cards {
    gap: 10px !important;
    margin-top: 8px !important;
    margin-bottom: 10px !important;
  }
  .record-text {
    padding: 6px 10px !important;
    min-height: 45px !important;
    font-size: 10.5px !important;
    line-height: 1.45 !important;
    border: 1px solid #334155 !important;
    border-radius: 4px !important;
  }
  .record-text span {
    font-size: 10px !important;
    font-weight: 800 !important;
    margin-bottom: 3px !important;
    color: #000 !important;
  }

  .declaration-card {
    margin-top: 10px !important;
    padding: 6px 10px !important;
    font-size: 10.5px !important;
    line-height: 1.45 !important;
    text-align: justify !important;
    text-justify: inter-word !important;
    color: #000 !important;
    font-weight: 600 !important;
    border: 1px solid #334155 !important;
    border-radius: 4px !important;
    background: #fff8f0 !important;
    -webkit-print-color-adjust: exact !important;
    print-color-adjust: exact !important;
  }
  .declaration-card b {
    font-weight: 900 !important;
    font-size: 11px !important;
    color: #000 !important;
  }

  .trust-footer {
    margin-top: 20px !important;
    padding-top: 8px !important;
    border-top: 1.5px solid #000 !important;
  }
  .trust-footer .sig-post { font-size: 12px !important; font-weight: 800 !important; color: #000 !important; }
  .trust-footer .sig-space { height: 35px !important; }
  .trust-footer .sig-name { font-size: 11px !important; font-weight: 700 !important; color: #000 !important; }
  .trust-footer .sig-phone { font-size: 10px !important; font-weight: 600 !important; color: #000 !important; }
}

.auth-card-wrap{max-width:480px;margin:40px auto;padding:0 15px}
.auth-card{background:#fff;border:1px solid var(--line);border-radius:16px;box-shadow:var(--shadow);padding:35px;text-align:center}
.auth-icon{font-size:36px;margin-bottom:12px}
.auth-card h2{margin:8px 0;font-size:22px}
.auth-card p{color:var(--muted);font-size:13px;margin-bottom:20px}
.user-badge{background:#e0e7ff;color:#3730a3;padding:6px 12px;border-radius:20px;font-weight:600;font-size:12px;display:inline-flex;align-items:center;gap:6px}

/* GLOBAL LOADER SYSTEM */
.global-loader-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(15, 23, 42, 0.65);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 99999;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}
.global-loader-overlay.active {
  opacity: 1;
  visibility: visible;
}
.loader-card {
  background: #ffffff;
  padding: 28px 36px;
  border-radius: 16px;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.25);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  max-width: 380px;
  text-align: center;
}
.spinner-ring {
  width: 46px;
  height: 46px;
  border: 4px solid #e2e8f0;
  border-top-color: #315efb;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}
@keyframes spin {
  to { transform: rotate(360deg); }
}
.loader-text {
  font-size: 15px;
  font-weight: 800;
  color: #0f172a;
  margin-top: 4px;
}
.loader-subtext {
  font-size: 12px;
  color: #64748b;
  margin-top: -6px;
}
.btn-spinner {
  display: inline-block;
  width: 15px;
  height: 15px;
  border: 2px solid rgba(255,255,255,0.3);
  border-top-color: #ffffff;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin-right: 6px;
  vertical-align: middle;
}
.save-toast {
  position: fixed;
  bottom: 24px;
  right: 24px;
  background: #0f172a;
  color: #fff;
  padding: 10px 16px;
  border-radius: 30px;
  font-size: 12px;
  font-weight: 700;
  box-shadow: 0 10px 25px rgba(0,0,0,0.2);
  display: flex;
  align-items: center;
  gap: 8px;
  z-index: 9999;
  opacity: 0;
  transform: translateY(10px);
  transition: all 0.3s ease;
  pointer-events: none;
}
.save-toast.active {
  opacity: 1;
  transform: translateY(0);
}
