:root{--ucs-green:#00694E;--ucs-green-dark:#00543E;--ucs-gold:#C9A227;
  --ucs-ink:#16202B;--ucs-muted:#5A6572;--ucs-line:#DFE5EC;--ucs-bg:#F5F7FA}
*{font-family:'Noto Sans Bengali',system-ui,sans-serif}
body{background:var(--ucs-bg);color:var(--ucs-ink);min-height:100vh;display:flex;flex-direction:column}
main{flex:1}
.ucs-navbar{background:linear-gradient(135deg,var(--ucs-green),var(--ucs-green-dark));box-shadow:0 2px 12px rgba(0,0,0,.12)}
.ucs-navbar .navbar-brand,.ucs-navbar .nav-link{color:#fff!important}
.ucs-navbar .nav-link:hover{color:var(--ucs-gold)!important}
.ucs-emblem{width:38px;height:38px;border-radius:50%;background:rgba(255,255,255,.15);display:grid;place-items:center;color:var(--ucs-gold);font-size:1.15rem}
.ucs-brand-bn{font-size:1.02rem;font-weight:700;line-height:1.2}
.ucs-brand-en{font-size:.72rem;opacity:.8}
.ucs-footer{background:#fff;border-top:1px solid var(--ucs-line);color:var(--ucs-muted)}
.card{border:1px solid var(--ucs-line);border-radius:12px;box-shadow:0 1px 3px rgba(16,32,48,.04)}
.card-header{background:#fff;border-bottom:1px solid var(--ucs-line);font-weight:600}
.btn-ucs{background:var(--ucs-green);border-color:var(--ucs-green);color:#fff}
.btn-ucs:hover{background:var(--ucs-green-dark);border-color:var(--ucs-green-dark);color:#fff}
.form-label{font-weight:500;font-size:.9rem;margin-bottom:.25rem}
.form-control,.form-select{border:1px solid var(--ucs-line);border-radius:8px;padding:.5rem .75rem}
.form-control:focus,.form-select:focus{border-color:var(--ucs-green);box-shadow:0 0 0 .18rem rgba(0,105,78,.14)}
.req::after{content:" *";color:#c0392b}
.auth-wrap{max-width:440px;margin:2.5rem auto}
.page-title{font-weight:700;color:var(--ucs-green-dark);margin-bottom:1.25rem}
.section-label{font-size:.78rem;font-weight:700;text-transform:uppercase;letter-spacing:.6px;color:var(--ucs-muted);border-bottom:1px solid var(--ucs-line);padding-bottom:.35rem;margin:1.25rem 0 .85rem}
.cat-card{transition:.15s;height:100%}
.cat-card:hover{transform:translateY(-2px);border-color:var(--ucs-green)}
.cat-icon{width:46px;height:46px;border-radius:10px;background:rgba(0,105,78,.09);color:var(--ucs-green);display:grid;place-items:center;font-size:1.3rem}
.demo-box{background:#fff;border:1px dashed var(--ucs-gold);border-radius:10px;padding:.85rem 1rem;font-size:.85rem}
.demo-box code{background:#FFF8E1;padding:.1rem .35rem;border-radius:4px;color:#7a5c00}
.stat-icon{font-size:1.6rem;width:46px;height:46px;display:grid;place-items:center;background:rgba(0,0,0,.03);border-radius:10px}
.stat-value{font-size:1.5rem;font-weight:700;line-height:1.1}

/* --- Step 3 --- */
.union-bar{background:linear-gradient(135deg,var(--ucs-green),var(--ucs-green-dark));color:#fff;border-radius:12px;padding:1rem 1.25rem;display:flex;flex-wrap:wrap;gap:1rem;justify-content:space-between;align-items:center}
.ucs-subnav .nav-link{color:rgba(255,255,255,.85);font-size:.88rem;padding:.4rem .85rem;border-radius:8px}
.union-bar .ucs-subnav .nav-link.active{background:#fff;color:var(--ucs-green-dark)}
.union-bar .ucs-subnav .nav-link:hover:not(.active){background:rgba(255,255,255,.15);color:#fff}
.trail{position:relative;padding-left:1.4rem}
.trail:before{content:"";position:absolute;left:.42rem;top:.4rem;bottom:.4rem;width:2px;background:var(--ucs-line)}
.trail-item{position:relative;padding-bottom:1rem}
.trail-item:before{content:"";position:absolute;left:-1.22rem;top:.3rem;width:11px;height:11px;border-radius:50%;background:#fff;border:2px solid var(--ucs-muted)}
.trail-approved:before,.trail-generated:before{border-color:#198754;background:#198754}
.trail-rejected:before{border-color:#dc3545;background:#dc3545}
.trail-returned:before{border-color:#ffc107;background:#ffc107}
.trail-submitted:before{border-color:var(--ucs-green);background:var(--ucs-green)}
.w-35{width:35%}
table th{font-weight:600}

/* --- Step 4 --- */
.sig-preview{min-height:64px;border:1px dashed var(--ucs-line);border-radius:8px;display:grid;place-items:center;background:#fff;padding:.4rem}
.sig-preview img{max-height:56px;max-width:100%;object-fit:contain}
.sig-preview-lg{min-height:130px}
.sig-preview-lg img{max-height:120px}

/* --- Step 7 --- */
.public-wrap{max-width:860px;margin:1.5rem auto}
.verify-icon{width:64px;height:64px;margin:0 auto 1rem;border-radius:50%;background:rgba(0,105,78,.09);color:var(--ucs-green);display:grid;place-items:center;font-size:1.9rem}
.verify-result.ok{border-left:5px solid #198754}
.verify-result.bad{border-left:5px solid #dc3545}
.w-40{width:40%}
.tracking-box{background:#F6F9F8;border:1px dashed var(--ucs-green);border-radius:10px;padding:1rem}
.tracking-no{font-family:monospace;font-size:1.35rem;font-weight:700;color:var(--ucs-green-dark);letter-spacing:1px}
.track-steps{display:flex;gap:.5rem;justify-content:space-between}
.track-step{flex:1;text-align:center;color:var(--ucs-muted);position:relative}
.track-step .dot{width:32px;height:32px;margin:0 auto .4rem;border-radius:50%;border:2px solid var(--ucs-line);background:#fff;display:grid;place-items:center;font-weight:700;font-size:.85rem}
.track-step.done .dot{background:#198754;border-color:#198754;color:#fff}
.track-step.done{color:#198754}
.track-step.current .dot{border-color:var(--ucs-green);color:var(--ucs-green);box-shadow:0 0 0 4px rgba(0,105,78,.12)}
.track-step.current{color:var(--ucs-green-dark);font-weight:600}

/* national seal */
.ucs-emblem-img{width:40px;height:40px;object-fit:contain;background:#fff;border-radius:50%;padding:3px}
.seal-lg{width:88px;height:88px;object-fit:contain}

/* --- Step 12: monthly register --- */
.register-table th{font-size:.78rem;white-space:nowrap}
.register-table td{font-size:.85rem}
.sign-space{height:50px}

@media print{
  .ucs-navbar,.ucs-footer,.union-bar,.d-print-none{display:none!important}
  body{background:#fff}
  .card{border:1px solid #999;box-shadow:none;break-inside:avoid;margin-bottom:10px}
  .card-header{background:#f0f0f0!important;-webkit-print-color-adjust:exact;print-color-adjust:exact}
  .badge{border:1px solid #999;color:#000!important;background:#fff!important}
  .table-striped>tbody>tr:nth-of-type(odd)>*{background:#fafafa!important;-webkit-print-color-adjust:exact}
  .print-header{margin-bottom:14px}
  main{padding:0!important}
  @page{size:A4 landscape;margin:12mm}
}

/* --- table breathing room and borders --- */
.card > .table-responsive > .table > thead > tr > th:first-child,
.card > .table-responsive > .table > tbody > tr > td:first-child,
.card > .table-responsive > .table > tbody > tr > th:first-child{
  padding-left:1rem
}
.card > .table-responsive > .table > thead > tr > th:last-child,
.card > .table-responsive > .table > tbody > tr > td:last-child,
.card > .table-responsive > .table > tbody > tr > th:last-child{
  padding-right:1rem
}

.card > .table-responsive{
  border-radius:0 0 12px 12px;
  overflow:hidden
}

.table > :not(caption) > * > *{
  padding-top:.55rem;
  padding-bottom:.55rem
}

/* vertical separators so columns read as columns */
.register-table > thead > tr > th,
.register-table > tbody > tr > td{
  border-right:1px solid #EDF1F5
}
.register-table > thead > tr > th:last-child,
.register-table > tbody > tr > td:last-child{
  border-right:0
}
.register-table > thead > tr > th{
  border-bottom:2px solid var(--ucs-line);
  background:#F4F7FA
}

/* summary tables: keep the numeric column off the edge */
.card .table .text-end:last-child{padding-right:1.15rem}

@media print{
  .register-table,
  .register-table th,
  .register-table td{border:1px solid #666!important}
  .register-table th{background:#e8e8e8!important;-webkit-print-color-adjust:exact;print-color-adjust:exact}
  .card > .table-responsive{overflow:visible}
}

/* applicant photo */
.applicant-photo{width:70px;height:88px;object-fit:cover;border:1px solid var(--ucs-line);border-radius:4px;background:#fff}

/* applicant photo */
.applicant-photo{width:70px;height:88px;object-fit:cover;border:1px solid var(--ucs-line);border-radius:4px;background:#fff}

/* photo box in the application form corner */

.photo-preview{width:120px;height:150px;border:2px dashed var(--ucs-line);border-radius:6px;
  background:#fff;display:grid;place-items:center;overflow:hidden}
.photo-preview img{width:100%;height:100%;object-fit:cover}
.photo-placeholder{font-size:.72rem;color:var(--ucs-muted);text-align:center;line-height:1.4}
.photo-corner .form-control-sm{font-size:.72rem;padding:.2rem .4rem}
@media (max-width:576px){
  
  .photo-preview{width:96px;height:120px}
}


@media (max-width:768px){
  
  
}

/* reserve the corner for the photo so fields don't run under it */


@media (max-width:768px){
  
  
  
}




/* passport photo — top-right, no vertical gap */
.photo-head{position:relative;min-height:auto}
.photo-head .section-label{border-bottom:1px solid var(--ucs-line);padding-bottom:.35rem;
  margin:0 0 1rem;padding-right:148px}
.photo-box{position:absolute;top:0;right:0;width:128px;text-align:center;z-index:2}
.photo-preview{width:128px;height:150px;border:2px dashed var(--ucs-line);border-radius:6px;
  background:#fff;display:grid;place-items:center;overflow:hidden;margin-bottom:.3rem}
.photo-preview img{width:100%;height:100%;object-fit:cover}
.photo-placeholder{font-size:.7rem;color:var(--ucs-muted);line-height:1.4}
.photo-box input[type=file]{font-size:.66rem;padding:.15rem .3rem}
.photo-box .form-text{font-size:.64rem;margin-top:.15rem}

/* keep the first two right-hand fields clear of the photo */
.photo-head ~ .row.g-3 > div:nth-child(2),
.photo-head ~ .row.g-3 > div:nth-child(4){padding-right:148px}

@media (max-width:768px){
  .photo-box{position:static;margin:0 auto 1rem}
  .photo-head .section-label{padding-right:0}
  .photo-head ~ .row.g-3 > div:nth-child(2),
  .photo-head ~ .row.g-3 > div:nth-child(4){padding-right:calc(var(--bs-gutter-x)*.5)}
}

/* workflow stage chips */
.stage-chip{display:inline-flex;align-items:center;gap:.4rem;background:#F4F7FA;
  border:1px solid var(--ucs-line);color:var(--ucs-muted);border-radius:20px;
  padding:.25rem .7rem;font-size:.78rem}
.stage-chip .stage-no{width:18px;height:18px;border-radius:50%;background:var(--ucs-muted);
  color:#fff;display:grid;place-items:center;font-size:.66rem;font-weight:700}
.stage-chip.done{background:#E8F5EE;border-color:#198754;color:#146c43}
.stage-chip.done .stage-no{background:#198754}
.stage-chip.current{background:rgba(0,105,78,.09);border-color:var(--ucs-green);
  color:var(--ucs-green-dark);font-weight:600}
.stage-chip.current .stage-no{background:var(--ucs-green)}

@media print{
  .table-responsive{overflow:visible!important}
  .row{display:block!important}
  .col-lg-7,.col-lg-5,.col-lg-12{width:100%!important;max-width:100%!important}
  .register-table{page-break-inside:auto}
  .register-table tr{page-break-inside:avoid;page-break-after:auto}
  .register-table thead{display:table-header-group}
}

/* certificate text editor */
.cert-text{font-size:.95rem;line-height:1.8}
.var-group{display:flex;flex-wrap:wrap;gap:.3rem}
.var-btn{font-size:.72rem;padding:.2rem .5rem}

/* heir table: consistent widths on every form, scroll instead of squeeze */
#heirTable{min-width:1050px;table-layout:fixed}
#heirTable .h-sl{width:52px}
#heirTable .h-name{width:17%}
#heirTable .h-id{width:15%}
#heirTable .h-rel{width:17%}
#heirTable .h-rem{width:12%}
#heirTable .h-del{width:40px}
#heirTable td{padding:.35rem .3rem}
#heirTable .form-control,#heirTable .form-select{min-width:0;width:100%}

/* public application form: wider so the heir table fits */
.public-wrap{max-width:1140px}
