
:root{
  --primary:#2563eb;
  --primary-soft:#eff6ff;
  --bg:#f3f4f6;
  --card-bg:#ffffff;
  --text-main:#111827;
  --text-muted:#6b7280;
  --border:#e5e7eb;
  --radius-card:14px;
  --hero-cyan:#0ea5a8;
  --hero-mint:#22c55e;
  --hero-amber:#f59e0b;
  --hero-ink:#0f172a;
}

/* ===== Reset / Base ===== */
*{ box-sizing:border-box; margin:0; padding:0; }
html,body{ width:100%; height:100%; overflow-x:hidden; }
body{
  background:var(--bg);
  color:var(--text-main);
  line-height:1.5;
  font-family:system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"Montserrat",sans-serif;
}
body.page-home{
  background:
    radial-gradient(1200px 520px at 10% -10%, rgba(8, 188, 158, 0.18), transparent 60%),
    radial-gradient(900px 420px at 90% 0%, rgba(218, 218, 6, 0.18), transparent 55%),
    linear-gradient(140deg, #f0fdf8 0%, #fff6d9 45%, #eef3ff 100%);
}
body.page-form,
body.page-preview-payment{
  background:
    radial-gradient(1200px 520px at 10% -10%, rgba(8, 188, 158, 0.18), transparent 60%),
    radial-gradient(900px 420px at 90% 0%, rgba(218, 218, 6, 0.18), transparent 55%),
    linear-gradient(140deg, #f0fdf8 0%, #fff6d9 45%, #eef3ff 100%);
}
body.page-static{
  background:
    radial-gradient(1200px 520px at 10% -10%, rgba(8, 188, 158, 0.18), transparent 60%),
    radial-gradient(900px 420px at 90% 0%, rgba(218, 218, 6, 0.18), transparent 55%),
    linear-gradient(140deg, #f0fdf8 0%, #fff6d9 45%, #eef3ff 100%);
}
a{ color:inherit; text-decoration:none; }

/* ===== Top bar ===== */
.top-bar{
  background:#08bc9e;
  color:#e5e7eb;
  padding:10px 14px;
  font-size:.85rem;
  text-align:center;
  line-height:1.35;
  word-break:break-word;
  width:100%;
}
.top-bar.top-bar-lang{
  display:flex;
  align-items:center;
  justify-content:center;
}

/* ===== Header / Navbar ===== */
header{
  background:#dada06;
  border-bottom:1px solid var(--border);
  position:sticky;
  top:0;
  z-index:30;
}
.nav{
  max-width:1200px;
  margin:0 auto;
  padding:10px 16px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  flex-wrap:wrap;
}
.logo-wrap{ display:flex; align-items:center; gap:8px; }
.logo-icon{
  width:32px; height:32px;
  border-radius:8px;
  background:var(--primary-soft);
  display:flex; align-items:center; justify-content:center;
  font-size:.9rem; color:var(--primary); font-weight:700;
}
.logo-text-main{ font-size:1.4rem; font-weight:600; }
.logo-text-sub{ font-size:.7rem; color:var(--text-muted); }

.nav-actions{
  display:flex; align-items:center; gap:8px;
  flex-wrap:wrap;
  justify-content:flex-end;
}

/* ===== Pills / Buttons ===== */
.pill{
  font-size:.75rem;
  padding:3px 8px;
  border-radius:999px;
  border:1px solid var(--border);
  color:var(--text-muted);
  background:#f9fafb;
}
.btn-primary,.btn-main{
  border:none;
  border-radius:999px;
  background:var(--primary);
  color:#fff;
  padding:8px 16px;
  font-size:.9rem;
  display:inline-flex;
  align-items:center;
  gap:6px;
  cursor:pointer;
  box-shadow:0 10px 24px rgba(37,99,235,.35);
  transition:transform .1s, box-shadow .1s;
}
.btn-primary:hover,.btn-main:hover{
  transform:translateY(-1px);
  box-shadow:0 12px 26px rgba(37,99,235,.45);
}
.btn-primary:active,.btn-main:active{
  transform:none;
  box-shadow:0 8px 18px rgba(37,99,235,.25);
}
.btn-secondary,.btn-ghost{
  border-radius:999px;
  border:1px solid #1e1f20;
  background:#f9fafb;
  color:#971010;
  padding:7px 12px;
  font-size:.85rem;
  display:inline-flex;
  align-items:center;
  gap:6px;
  cursor:pointer;
}

/* ===== Language toggle ===== */
.lang-toggle{
  display:inline-flex;
  border-radius:999px;
  border:1px solid var(--border);
  overflow:hidden;
}
.lang-btn{
  border:none;
  background:transparent;
  padding:6px 10px;
  font-size:.8rem;
  cursor:pointer;
  color:var(--text-muted);
}
.lang-btn.active{ background:var(--primary); color:#fff; }

/* ===== Main container ===== */
main{
  max-width:1200px;
  margin:0 auto;
  padding:14px 16px 40px;
}

/* ===== Hero (Home) ===== */
.hero{
  display:block;
  text-align:center;
}
.hero-copy{
  position:relative;
  padding:0;
  border-radius:0;
  background:transparent;
  border:none;
  box-shadow:none;
  overflow:visible;
  font-family:"Sora","Montserrat",system-ui,sans-serif;
  max-width:900px;
  margin:0 auto;
}
.hero-copy::before{
  display:none;
}
.hero-copy > *{
  position:relative;
  z-index:1;
}
.hero-title{
  position:relative;
  font-size:2.25rem;
  line-height:1.15;
  letter-spacing:-0.02em;
  color:var(--hero-ink);
  margin-bottom:14px;
}
.hero-steps{
  position:relative;
  display:grid;
  grid-template-columns:repeat(auto-fit, minmax(180px, 1fr));
  gap:12px;
  margin-bottom:16px;
}
.hero-step{
  background:transparent;
  border:none;
  border-radius:0;
  padding:0;
  display:grid;
  gap:6px;
  opacity:0;
  transform:translateY(8px);
  animation:hero-rise .6s ease forwards;
}
.hero-step:nth-child(2){ animation-delay:.08s; }
.hero-step:nth-child(3){ animation-delay:.16s; }
.step-index{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  width:44px;
  height:28px;
  border-radius:999px;
  font-size:.75rem;
  font-weight:700;
  letter-spacing:.14em;
  color:#ffffff;
  background:linear-gradient(135deg, var(--hero-cyan), var(--hero-mint));
  box-shadow:0 8px 16px rgba(14,165,168,0.28);
}
.step-text{
  font-size:.92rem;
  color:#1f2937;
}
.hero-features{
  position:relative;
  display:grid;
  grid-template-columns:repeat(auto-fit, minmax(240px, 1fr));
  gap:10px;
  margin-bottom:18px;
  max-width:760px;
  margin-left:auto;
  margin-right:auto;
  text-align:left;
}
.hero-feature{
  background:transparent;
  border:none;
  border-radius:0;
  padding:0;
  font-size:.9rem;
  color:#0f172a;
  display:flex;
  align-items:center;
  gap:8px;
  justify-content:flex-start;
  opacity:0;
  transform:translateY(8px);
  animation:hero-rise .6s ease forwards;
}
.hero-feature::before{
  content:"-";
  color:var(--hero-cyan);
  font-weight:700;
}
.hero-feature:nth-child(2){ animation-delay:.08s; }
.hero-feature:nth-child(3){ animation-delay:.16s; }
.hero-feature:nth-child(4){ animation-delay:.24s; }
.hero-cta-row{
  position:relative;
  display:flex;
  align-items:center;
  gap:12px;
  margin-bottom:6px;
  justify-content:center;
}
.hero-cta-btn{
  background:linear-gradient(135deg, #0ea5a8, #22c55e);
  border:1px solid rgba(14,165,168,0.35);
  box-shadow:
    0 16px 30px rgba(14,165,168,0.28),
    inset 0 1px 0 rgba(255,255,255,0.55);
}
.hero-cta-btn span{
  font-weight:700;
}
.hero-meta{
  position:relative;
  font-size:.88rem;
  color:var(--text-muted);
}
@keyframes hero-rise{
  to{
    opacity:1;
    transform:translateY(0);
  }
}
@media (prefers-reduced-motion: reduce){
  .hero-step,
  .hero-feature{
    animation:none;
    opacity:1;
    transform:none;
  }
}
@media (max-width:980px){
  .hero{
    text-align:center;
  }
}

.home-templates{
  margin-top:18px;
}
.home-templates-head{
  text-align:center;
  margin-bottom:12px;
}
.home-templates-head h2{
  font-size:1.15rem;
  margin-bottom:4px;
}
.home-templates-head small{
  color:var(--text-muted);
  font-size:.85rem;
}

/* ===== Static pages (About/Contact/Policies) ===== */
body.page-static main{
  max-width:1000px;
  margin:0 auto;
  padding:24px 16px 44px;
}
.static-content{
  display:flex;
  flex-direction:column;
  gap:12px;
}
.static-content h1{
  font-size:2rem;
  margin-bottom:4px;
}
.static-content h2{
  font-size:1.2rem;
  margin-top:6px;
}
.static-content p,
.static-content li{
  color:#1f2937;
}
.static-content ul{
  padding-left:18px;
}

/* ===== Footer ===== */
.site-footer{
  margin-top:24px;
  padding:18px 16px 14px;
  background:rgba(255,255,255,0.7);
  border-top:1px solid rgba(8,188,158,0.25);
  backdrop-filter: blur(6px);
}
.site-footer .footer-inner{
  max-width:1200px;
  margin:0 auto;
  display:flex;
  flex-wrap:wrap;
  align-items:center;
  justify-content:space-between;
  gap:12px;
}
.site-footer .footer-brand{
  display:flex;
  flex-direction:column;
  gap:2px;
}
.site-footer .footer-title{
  font-weight:700;
  color:#0f172a;
}
.site-footer .footer-sub{
  font-size:.85rem;
  color:var(--text-muted);
}
.site-footer .footer-links{
  display:flex;
  flex-wrap:wrap;
  gap:10px 14px;
}
.site-footer .footer-links a{
  color:#0f766e;
  font-weight:600;
  font-size:.9rem;
}
.site-footer .footer-bottom{
  max-width:1200px;
  margin:10px auto 0;
  font-size:.8rem;
  color:var(--text-muted);
  text-align:center;
}


/* ===== Card ===== */
.card{
  background:var(--card-bg);
  border-radius:var(--radius-card);
  padding:16px 16px 18px;
  box-shadow:0 12px 30px rgba(15,23,42,.08);
  border:1px solid rgba(148,163,184,.35);
}
.card-header{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  margin-bottom:10px;
}
.card-header h2{ font-size:1.05rem; }
.card-header small{ font-size:.78rem; color:var(--text-muted); }

/* =========================================================
   FORM PAGE LAYOUT (Clean)
   - Only LEFT form scrolls
   - RIGHT translator stays fixed (does not move)
   ========================================================= */
body.page-form{
  height:100vh;
  display:grid;
  grid-template-rows:auto auto 1fr auto; /* top-bar, header, content, footer */
  overflow:hidden;
}
body.page-form main{
  min-height:0;
  overflow:hidden; /* prevent page scroll */
  padding:16px;
}

/* Two columns full height */
body.page-form .main-grid{
  height:100%;
  min-height:0;
  display:grid;
  grid-template-columns:minmax(0, 1.15fr) minmax(0, .85fr);
  gap:18px;
  align-items:start;
}

/* LEFT: only scroll area */
body.page-form .form-card{
  height:100%;
  min-height:0;
  overflow-y:auto;
  padding-bottom:24px;
}

/* RIGHT: fixed panel (no scroll) */
body.page-form .right-column{
  height:100%;
  min-height:0;
  overflow:hidden;
  display:flex;
  flex-direction:column;
  gap:16px;
}

/* Translator pinned to top of right column */
body.page-form .sticky-translator{
  position:sticky;
  top:0;
  z-index:50;
}

/* Mobile: normal flow + page scroll */
@media (max-width:980px){
  body.page-form{
    height:auto;
    display:block;
    overflow:visible;
  }
  body.page-form main{
    overflow:visible;
    padding:14px 16px 40px;
  }
  body.page-form .main-grid{
    height:auto;
    display:flex;
    flex-direction:column;
  }
  body.page-form .form-card,
  body.page-form .right-column{
    height:auto;
    overflow:visible;
  }
  body.page-form .sticky-translator{
    position:static;
  }
}

/* ===== Form sections ===== */
.form-section-title{
  font-size:.95rem;
  margin:12px 0 6px;
  color:#232b3d;
  border-left:3px solid var(--primary);
  padding-left:8px;
}
.form-grid{
  display:grid;
  grid-template-columns:repeat(2, minmax(0, 1fr));
  gap:10px 14px;
}
@media (max-width:720px){
  .form-grid{ grid-template-columns:1fr; }
}
.form-group{ display:flex; flex-direction:column; gap:4px; }
label{ font-size:.82rem; color:#374151; }

input[type="text"],
input[type="date"],
input[type="email"],
textarea,
select{
  padding:7px 9px;
  border-radius:9px;
  border:1px solid #d1d5db;
  font-size:.9rem;
  outline:none;
  background:#f9fafb;
  transition:border .15s, box-shadow .15s, background .15s;
}
input[type="file"]{ font-size:.85rem; }
input:focus,textarea:focus,select:focus{
  border-color:var(--primary);
  background:#fff;
  box-shadow:0 0 0 1px rgba(37,99,235,.2);
}
textarea{ resize:vertical; min-height:60px; }
.full-width{ grid-column:1 / -1; }

.button-row{
  margin-top:14px;
  display:flex;
  flex-wrap:wrap;
  gap:8px;
  justify-content:flex-end;
}

/* Form: "fill more details" modal */
.form-modal-backdrop{
  position:fixed;
  inset:0;
  display:flex;
  align-items:center;
  justify-content:center;
  background:rgba(8, 188, 158, 0.18);
  backdrop-filter: blur(10px);
  opacity:0;
  pointer-events:none;
  transition:opacity .2s ease;
  z-index:9999;
}
.form-modal-backdrop.is-open{
  opacity:1;
  pointer-events:auto;
}
.form-modal{
  min-width:260px;
  max-width:380px;
  width:85%;
  padding:18px 20px;
  border-radius:18px;
  text-align:center;
  background:
    radial-gradient(circle at top, rgba(255,255,255,0.92), rgba(255,255,255,0.72)),
    linear-gradient(135deg, rgba(8,188,158,0.18), rgba(218,218,6,0.16));
  border:1px solid rgba(8,188,158,0.35);
  box-shadow:0 18px 40px rgba(15, 23, 42, 0.25);
  transform: translateY(6px) scale(0.98);
  transition: transform .2s ease;
}
.form-modal-backdrop.is-open .form-modal{
  transform: translateY(0) scale(1);
}
.form-modal-icon{
  width:42px;
  height:42px;
  margin:0 auto 10px;
  border-radius:50%;
  display:grid;
  place-items:center;
  background:linear-gradient(135deg, #08bc9e, #22c55e);
  color:#fff;
  font-size:20px;
}
.form-modal-title{
  font-weight:700;
  font-size:1.05rem;
  color:#111827;
  margin-bottom:4px;
}
.form-modal-sub{
  font-size:.9rem;
  color:#475569;
  margin-bottom:12px;
}
.form-modal-btn{
  border:none;
  border-radius:999px;
  padding:8px 18px;
  background:linear-gradient(135deg, #08bc9e, #22c55e);
  color:#fff;
  font-weight:600;
  cursor:pointer;
}
.form-modal-actions{
  display:flex;
  gap:10px;
  justify-content:center;
}
.form-modal-btn.ghost{
  background:rgba(8,188,158,0.12);
  color:#0f766e;
}
.form-modal-btn.danger{
  background:linear-gradient(135deg, #f59e0b, #f97316);
}
.form-modal-btn:hover{ filter:brightness(1.03); }

/* ===== Field controls (up/down/delete/rename) ===== */
.field-label-row{
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:10px;
}
.field-actions{
  display:flex;
  gap:6px;
  flex-wrap:wrap;
}
.icon-btn{
  border:1px solid var(--border);
  background:var(--card-bg);
  border-radius:10px;
  padding:5px 9px;
  font-size:12px;
  cursor:pointer;
  line-height:1;
}
.icon-btn:hover{ opacity:.9; }
.icon-btn.danger{ color:#b91c1c; }

/* ===== Add custom field box ===== */
.add-field-box{
  margin:12px 0 22px;
  padding:12px;
  border:1px dashed var(--border);
  border-radius:var(--radius-card);
  background:rgba(255,255,255,0.7);
}
.add-field-title{ font-weight:600; margin-bottom:10px; }
.add-field-row{
  display:flex;
  gap:10px;
  flex-wrap:wrap;
}
.add-field-row input,
.add-field-row select,
.add-field-row textarea{
  flex:1 1 160px;
}
.add-field-row textarea{
  min-height:42px;
  resize:vertical;
}

/* ===== Restore deleted fields box ===== */
.restore-box{
  margin-top:16px;
  padding:14px;
  border:1px solid var(--border);
  border-radius:var(--radius-card);
  background:var(--card-bg);
}
.restore-head{
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:10px;
  flex-wrap:wrap;
}
.restore-title{ font-weight:600; }
.restore-sub{
  color:var(--text-muted);
  font-size:13px;
  margin-top:6px;
}
.restore-list{
  margin-top:12px;
  display:flex;
  flex-direction:column;
  gap:8px;
}
.restore-item{
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:10px;
  padding:10px;
  border:1px solid var(--border);
  border-radius:12px;
  background:#fff;
}
.restore-name{ font-size:13px; }
.restore-actions{ display:flex; gap:6px; flex-wrap:wrap; }

/* ===== Translator card ===== */
.translator-card{
  padding:14px 16px;
  border-radius:10px;
  background:#f3f4ff;
  border:1px solid #d7dbff;
}
.translator-header{ font-weight:700; font-size:14px; margin-bottom:4px; }
.translator-subtitle{ font-size:12px; margin:0 0 8px; color:#555; }
.translator-label{ display:block; font-size:12px; font-weight:600; margin:6px 0 4px; }
.translator-textarea{
  width:100%;
  resize:vertical;
  min-height:44px;
  font-size:13px;
  padding:6px 8px;
  border-radius:8px;
  border:1px solid #d0d7e2;
  background:#fff;
}
.translator-button{
  margin-top:8px;
  margin-right:8px;
  padding:6px 12px;
  border-radius:999px;
  border:none;
  cursor:pointer;
  font-size:12px;
  font-weight:600;
  background:#2563eb;
  color:#fff;
}
.translator-button.secondary{ background:#e5e7eb; color:#111827; }
.translator-button:disabled{ opacity:.6; cursor:not-allowed; }
.translator-hint{ display:block; margin-top:6px; font-size:11px; color:#6b7280; }
.trans-lang-switch{
  display:flex;
  align-items:center;
  gap:6px;
  flex-wrap:wrap;
  margin-bottom:6px;
}
.trans-lang-label{ font-size:12px; color:#4b5563; margin-right:4px; }
.trans-lang-btn{
  border:none;
  border-radius:999px;
  padding:3px 10px;
  font-size:12px;
  cursor:pointer;
  background:#e5e7eb;
  color:#111827;
}
.trans-lang-btn.active{ background:#2563eb; color:#fff; }

/* =========================================================
   Preview-fit.js wrappers + Biodata paper styles
   (Used on choose-template + print)
   ========================================================= */
#biodataPreview{ width:100%; overflow:hidden; }
.preview-viewport{ width:100%; overflow:hidden; }
.preview-scale{ transform-origin:top center; margin:0 auto; }

.biodata-paper{
  width:210mm;
  min-height:297mm;
  max-width:210mm;
  margin:0 auto;
  padding:18mm;
  box-sizing:border-box;
  background-size:cover;
  background-repeat:no-repeat;
  background-position:center;
  overflow: hidden;   
}

/* Photo */
.biodata-main{
  display:grid;
  grid-template-columns:minmax(0, 2.1fr) minmax(0, 1fr);
  gap:16px;
  margin-top:10px;
}
@media (max-width:720px){
  .biodata-main{ grid-template-columns:1fr; }
} 
.trad-photo-box{
  width:145px;
  height:190px;
  border-radius:10px;
  border:1px solid rgba(255, 255, 255, 0);
  overflow:hidden;
  margin:0 auto;
  display:flex;
  align-items:center;
  justify-content:center;
  background:transparent;
}
#photoPreview{
  width:100%;
  height:100%;
  object-fit:cover;
  display:none;
}
.trad-photo-placeholder{
  font-size:.85rem;
  color:rgba(255, 255, 255, 0);
  text-align:center;
  padding:8px;
}

/* Biodata typography */
.biodata-header{
  text-align:center;
  margin-bottom:10px;
  border-bottom:2px solid rgba(255,255,255,.25);
  padding-bottom:6px;
}
.biodata-header h2{ font-size:1.3rem; margin-bottom:6px; }
.biodata-section{ margin-bottom:10px; }
.tpl-highlight{
  display:inline-block;
  padding:2px 10px;
  border-radius:999px;
}
.biodata-section-title{
  font-weight:700;
  font-size:1.2rem;
  border-bottom:1px dashed rgba(255,255,255,.35);
  margin-bottom:8px;
  padding-bottom:4px;
  text-align:center;
}
.biodata-row{ display:flex; gap:10px; font-size:1.2rem; margin:6px 0; }
.biodata-row.row-full{ flex-direction:column; gap:4px; }
.biodata-row .biodata-label,
.biodata-row .biodata-value{
  font-size:1em; /* keep labels and filled values the same size */
}
.biodata-label{ min-width:140px; font-weight:700; opacity:.95; }
.biodata-value{ flex:1; }
.biodata-footer{
  margin-top:12px;
  font-size:.78rem;
  border-top:1px dashed rgba(255,255,255,.3);
  padding-top:6px;
  text-align:center;
  opacity:.95;
}

/* Template: Marathi Traditional Red */
.biodata-paper-trad-red{
  background-image:url("../images/brown-bg.jpeg");
  background-size:100% 100% !important;
  color:#fff;
}
.biodata-paper-trad-red .trad-ganpati-line{
    text-align:center;
    font-size:1.2rem;
    color:#fff;
    font-weight:800;
    letter-spacing:.8px;
    margin-bottom:10px;
}
.biodata-paper-trad-red .biodata-label{ color:rgba(255,255,255,.9); }
.biodata-paper-trad-red .biodata-value{ color:#fff !important; }
.biodata-paper-trad-red .biodata-section-title{
  color:#fff;
  font-size:1.25rem;
  text-align:center;
}

/* Template: Kesar */
.biodata-paper-trad-kesar{
  background:#fffdf7;
  border:3px solid #c05621;
  border-radius:6px;
  color:#111827;
  box-shadow:0 8px 22px rgba(0,0,0,.10);
}
.biodata-paper-trad-kesar .biodata-header{
  background:linear-gradient(to right,#fed7aa,#ffedd5);
  border-radius:999px;
  padding:6px 14px;
  margin-bottom:12px;
  border:1px solid #c05621;
}
.biodata-paper-trad-kesar .biodata-header h2{ color:#7c2d12; }
.biodata-paper-trad-kesar .biodata-section-title{
  color:#c05621;
  border-bottom:1px dashed rgba(0,0,0,.25);
  font-size:1.25rem;
  text-align:center;
}
.biodata-paper-trad-kesar .biodata-footer{
  border-top:1px dashed rgba(0,0,0,.25);
  color:#7c2d12;
}

/* Fonts by language */
body[data-lang="en"] .biodata-paper,
body[data-lang="en"] .biodata-paper *{
  font-family:"Nunito",system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif !important;
  font-weight:400;
  font-size: 1.20rem;
}
body[data-lang="en"] .biodata-paper .biodata-section-title{
  font-weight:700 !important;
}
body[data-lang="en"] .biodata-paper .trad-ganpati-line{
  font-weight:700 !important;
}
body[data-lang="mr"] .biodata-paper .biodata-header h2,
body[data-lang="hi"] .biodata-paper .biodata-header h2,
body[data-lang="gu"] .biodata-paper .biodata-header h2{
  transform: translateY(-8px);
}
body[data-lang="mr"] .biodata-paper .biodata-main,
body[data-lang="hi"] .biodata-paper .biodata-main,
body[data-lang="gu"] .biodata-paper .biodata-main{
  margin-top: -10px;
}
body[data-lang="mr"] .biodata-paper,
body[data-lang="mr"] .biodata-paper *,
body[data-lang="hi"] .biodata-paper,
body[data-lang="hi"] .biodata-paper *,
body[data-lang="gu"] .biodata-paper,
body[data-lang="gu"] .biodata-paper *{
  font-family:"Khand",system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif !important;
  font-weight:300;
}
body[data-lang="mr"] .biodata-paper .biodata-value,
body[data-lang="hi"] .biodata-paper .biodata-value,
body[data-lang="gu"] .biodata-paper .biodata-value{
  font-size: 0.95em;
}

/* ===== Print: only biodata page ===== */
@media print{
  body{ background:#fff; }
  header,.top-bar,.hero,.form-card,.download-buttons,.template-grid,.lang-toggle,.pill,.translator-card{ display:none !important; }
  main{ padding:0 !important; margin:0 !important; max-width:100% !important; }
  .card.preview-card{ border:none !important; box-shadow:none !important; padding:0 !important; }
  #biodataPreview{ overflow:visible !important; }
  .preview-viewport{ overflow:visible !important; }
  .preview-scale{ transform:none !important; }
  .biodata-paper{
    width:210mm !important;
    min-height:297mm !important;
    max-width:210mm !important;
    padding:15mm !important;
    box-shadow:none !important;
    border:none !important;
    border-radius:0 !important;
    margin:0 !important;
  }
  }


/* ===== Bigger, cleaner inputs + more breathing space ===== */
.form-grid{
  gap: 14px 18px !important;
}

label{
  font-size: .9rem !important;
}

input[type="text"],
input[type="date"],
input[type="email"],
textarea,
select{
  padding: 11px 12px !important;
  border-radius: 12px !important;
  font-size: 1rem !important;
}

textarea{ min-height: 84px !important; }

/* Make cards less congested */
.card{ padding: 18px 18px 20px !important; }
.form-section-title{ margin-top: 16px !important; }

/* Smooth language change animation */
.i18n-animate{ transition: opacity .18s ease, transform .18s ease; }
.i18n-fade{ opacity: .2; transform: translateY(2px); }

/* ===== Responsive improvements ===== */
@media (max-width: 1100px){
  .form-grid{ grid-template-columns: 1fr !important; } /* reduce congestion */
}

/* ===== Modern scrollbar (single on left form) ===== */
body.page-form .form-card{
  scrollbar-width: thin;
  scrollbar-color: rgba(37,99,235,.55) rgba(0,0,0,0);
}

body.page-form .form-card::-webkit-scrollbar{
  width: 10px;
}

body.page-form .form-card::-webkit-scrollbar-track{
  background: transparent;
}

body.page-form .form-card::-webkit-scrollbar-thumb{
  background: rgba(37,99,235,.55);
  border-radius: 999px;
  border: 2px solid rgba(255,255,255,.7);
}

body.page-form .form-card::-webkit-scrollbar-thumb:hover{
  background: rgba(37,99,235,.75);
}

/* =========================================================
   OPTIONAL: If you also want form-page left scrollbar nicer
   ========================================================= */
body.page-form .form-card{
  padding-right: 14px !important;     /* space so text not touch scrollbar */
  scrollbar-gutter: stable;
}
body.page-form .form-card::-webkit-scrollbar-track{
  margin: 12px 0;
}

/* =========================================================
   FLAT UI (NO CARDS) — FORM PAGE ALSO
   Paste at END of style.css
   ========================================================= */

body.page-form{
  background:
    radial-gradient(1200px 520px at 10% -10%, rgba(8, 188, 158, 0.18), transparent 60%),
    radial-gradient(900px 420px at 90% 0%, rgba(218, 218, 6, 0.18), transparent 55%),
    linear-gradient(140deg, #f0fdf8 0%, #fff6d9 45%, #eef3ff 100%) !important;
}

/* Remove all card look on form page */
body.page-form .card,
body.page-form .form-card,
body.page-form .translator-card{
  background: transparent !important;
  border: none !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  padding: 0 !important;
}

body.page-form .card.form-card{
  background: transparent !important;
  border: none !important;
  border-radius: 0 !important;
  box-shadow: none !important;
}

/* Remove extra spacing created by card padding */
body.page-form .card-header{
  margin-bottom: 12px;
}

/* Make the page feel like sections on one sheet */
body.page-form .form-section-title{
  margin-top: 18px;
  padding-top: 14px;
  border-top: 1px solid #e5e7eb;   /* simple divider instead of card */
  border-left: none !important;
  padding-left: 0 !important;
}

/* =========================
   Collapsible Sections (Accordion)
   ========================= */
.form-section-title {
  cursor: pointer;
  user-select: none;
  position: relative;
  padding-right: 36px; /* space for arrow */
}

/* arrow icon using pseudo element (won't break i18n textContent changes) */
.form-section-title::after {
  content: "▾";
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%) rotate(0deg);
  transition: transform 180ms ease, opacity 180ms ease;
  opacity: 0.75;
  font-size: 18px;
  line-height: 1;
}

.form-section-title.is-collapsed::after {
  transform: translateY(-50%) rotate(-90deg);
  opacity: 0.6;
}

/* smooth hide/show */
.form-grid,
.add-field-box {
  overflow: hidden;
  transition: max-height 240ms ease, opacity 200ms ease, margin 200ms ease;
  will-change: max-height;
}

.form-grid.section-collapsed,
.add-field-box.section-collapsed {
  max-height: 0 !important;
  opacity: 0;
  margin-top: 0 !important;
  pointer-events: none;
}


/* Inputs look more “open” (less congested) */
body.page-form input[type="text"],
body.page-form input[type="date"],
body.page-form input[type="email"],
body.page-form textarea,
body.page-form select{
  background:#fff !important;
  border: 1px solid #d1d5db !important;
  border-radius: 10px;
  padding: 12px 12px;
  font-size: 15px;
}

/* Labels slightly stronger */
body.page-form label{
  font-size: 13px;
  font-weight: 600;
}

/* Form grid spacing */
body.page-form .form-grid{
  gap: 14px 18px;
}

/* Marathi/Hindi/Gujarati: tighter column gap */
body.page-form[data-lang="mr"] .form-grid,
body.page-form[data-lang="hi"] .form-grid,
body.page-form[data-lang="gu"] .form-grid{
  column-gap: 3px;
}

/* Personal section: make inputs full width like Education */

/* Translator area divider (instead of card) */
body.page-form .sticky-translator{
  padding: 10px 0 14px !important;
  border-bottom: 1px solid #e5e7eb;
}

/* Buttons separation */
body.page-form .button-row{
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid #e5e7eb;
}

/* Main content padding to look like a single page */
body.page-form main{
  background:#fff !important;
  padding: 18px 26px 26px 18px;
}

/* Nicer scrollbar (optional) */
body.page-form main::-webkit-scrollbar{ width: 10px; }
body.page-form main::-webkit-scrollbar-track{ background: transparent; margin: 12px 0; }
body.page-form main::-webkit-scrollbar-thumb{
  background: rgba(37,99,235,.40);
  border-radius: 999px;
  border: 2px solid rgba(255,255,255,.9);
}
body.page-form main::-webkit-scrollbar-thumb:hover{ background: rgba(37,99,235,.65); }

/* =========================================================
   FORM PAGE: Make LEFT bigger, RIGHT smaller
   Paste at END of style.css
   ========================================================= */

@media (min-width: 1000px){
  body.page-form .main-grid{
    grid-template-columns: minmax(0, 1.55fr) minmax(0, .75fr) !important;
    gap: 22px !important;
  }
}

/* Optional: reduce translator elements a bit so it feels compact */
body.page-form .translator-textarea{
  min-height: 38px;
}

body.page-form .translator-header{
  font-size: 13px;
}

body.page-form .translator-subtitle{
  font-size: 12px;
}


/* =========================================================
   FORCE MAIN (BROWSER) SCROLLBAR ON FAR RIGHT
   Paste at END of style.css
   ========================================================= */

/* Allow browser to scroll (right-side scrollbar) */
html, body{
  height: auto !important;
  overflow-y: auto !important;
}

/* Don't trap scrolling inside <main> */
body.page-form,
body.page-form main,
/* Remove any internal column scrollbars if present */
body.page-form .form-card,
body.page-form .right-column,
/* =========================================================
   FIX: Translator should stay sticky while page scrolls
   (works even if right side has only translator)
   ========================================================= */

body.page-form .main-grid{
  align-items: stretch !important;  /* make right column same height as left form */
}

body.page-form .right-column{
  align-self: stretch !important;   /* stretch to left column height */
}

/* Sticky translator stays below top-bar + header */
body.page-form .sticky-translator{
  position: sticky !important;
  top: 110px !important;            /* adjust if your header height changes */
  z-index: 50;
}

/* Mobile: normal flow */
@media (max-width: 900px){
  body.page-form .sticky-translator{
    position: static !important;
    top: auto !important;
  }
}

/* ================================
   FORM INPUT CONSISTENCY (same size)
   ================================ */
body.page-form .form-group input[type="text"],
body.page-form .form-group input[type="email"],
body.page-form .form-group input[type="date"],
body.page-form .form-group select{
  height: 52px;
  padding: 12px 14px;
  font-size: 16px;           /* mobile-friendly (prevents zoom on iPhone) */
  border-radius: 12px;
}

body.page-form .form-group textarea{
  min-height: 80px;          /* keep compact while still comfortable */
  padding: 12px 14px;
  font-size: 16px;
  border-radius: 12px;
}

body.page-form .form-group textarea.compact-textarea{
  min-height: 52px;
  height: 52px;
  resize: none;
}

/* ================================
   Add custom field: only Add button first
   ================================ */
body.page-form .add-field-box{
  margin-top: 18px;
  padding-top: 16px;
  border-top: 2px solid rgba(17,24,39,.08);
}

body.page-form .add-field-head{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
}

body.page-form .add-field-title{
  font-weight:700;
  font-size:16px;
}

/* panel layout */
body.page-form .add-field-panel{
  margin-top: 12px;
}

body.page-form .add-field-row{
  display:grid;
  grid-template-columns: 1fr 220px;
  gap: 12px;
}

body.page-form .add-field-row textarea{
  grid-column: 1 / -1;
}

@media (max-width: 900px){
  body.page-form .add-field-row{
    grid-template-columns: 1fr;
  }
}

/* ================================
   FORM PAGE THEME (match top bars)
   ================================ */
body.page-form{
  background:#ffffff;
}

body.page-form .form-section-title{
  border-left: 6px solid #08bc9e;
  padding-left: 12px;
  font-size: 18px;
  margin-top: 22px;
  margin-bottom: 14px;
  color:#111827;
}

/* nicer focus color (teal) */
body.page-form input:focus,
body.page-form textarea:focus,
body.page-form select:focus{
  border-color:#08bc9e !important;
  box-shadow:0 0 0 3px rgba(8,188,158,.18) !important;
}

/* buttons look like your theme */
body.page-form .btn-primary{
  background:#08bc9e !important;
  box-shadow:0 10px 22px rgba(8,188,158,.28) !important;
}

body.page-form .btn-secondary{
  border-color:#dada06 !important;
  color:#111827 !important;
  background:#fffef0 !important;
}

/* === FORM CONTROLS: consistent look for ALL input types === */
input[type="text"],
input[type="date"],
input[type="email"],
input[type="tel"],
input[type="number"],
textarea,
select{
  width:100%;
  padding:10px 12px;
  border-radius:12px;
  border:1px solid #d1d5db;
  font-size:1rem;
  outline:none;
  background:#fff;
  transition:border .15s, box-shadow .15s;
  line-height:1.25;
}

input:focus,
textarea:focus,
select:focus{
  border-color:var(--primary);
  box-shadow:0 0 0 3px rgba(37,99,235,.18);
}

/* --- Add Custom Field: collapsed button UI --- */
.add-field-box {
  margin-top: 14px;
  padding: 14px;
  border: 1px dashed #d1d5db;
  border-radius: 14px;
  background: #fafafa;
}

.add-field-toggle {
  border: 1px solid #e5e7eb;
  background: #fff;
  border-radius: 999px;
  padding: 10px 14px;
  cursor: pointer;
  font-weight: 600;
}

.add-field-box.open .add-field-toggle {
  background: #f9fafb;
}

.add-field-panel {
  margin-top: 12px;
}

.add-field-row1 {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 12px;
  align-items: center;
}

.add-field-value {
  margin-top: 10px;
  width: 100%;
}

.add-field-actions {
  margin-top: 10px;
  display: flex;
  gap: 10px;
  justify-content: flex-end;
}

.btn-ghost {
  border: 1px solid #e5e7eb;
  background: #fff;
  border-radius: 10px;
  padding: 10px 12px;
  cursor: pointer;
}

/* Mobile */
@media (max-width: 720px) {
  .add-field-row1 {
    grid-template-columns: 1fr;
  }
  .add-field-actions {
    justify-content: stretch;
  }
  .add-field-actions button {
    width: 100%;
  }
}

/* =========================================
   Futuristic Accordion Section Headers
   ========================================= */

/* stop any old arrow generated by ::after (prevents double arrow) */
.form-section-title::after { content: "" !important; }

.form-section-title {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;

  padding: 18px 18px;
  margin: 18px 0 10px;

  border-radius: 16px;
  border: 1px solid rgba(148, 163, 184, 0.35);
  background: linear-gradient(
    135deg,
    rgba(37, 99, 235, 0.10),
    rgba(168, 85, 247, 0.08)
  );

  box-shadow:
    0 12px 30px rgba(15, 23, 42, 0.10),
    inset 0 1px 0 rgba(255, 255, 255, 0.60);

  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);

  cursor: pointer;
  user-select: none;
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}

.form-section-title:hover {
  transform: translateY(-1px);
  border-color: rgba(37, 99, 235, 0.55);
  box-shadow:
    0 16px 40px rgba(15, 23, 42, 0.14),
    0 0 0 6px rgba(37, 99, 235, 0.08),
    inset 0 1px 0 rgba(255, 255, 255, 0.65);
}

/* subtle animated “neon line” */
.form-section-title::before {
  content: "";
  position: absolute;
  left: 14px;
  right: 14px;
  bottom: -1px;
  height: 2px;
  border-radius: 2px;
  background: linear-gradient(90deg, rgba(37,99,235,.0), rgba(37,99,235,.9), rgba(168,85,247,.9), rgba(168,85,247,.0));
  opacity: 0;
  transition: opacity .18s ease;
}

.form-section-title:hover::before {
  opacity: 1;
}

/* Form tabs: custom colors (1 pink, 2 violet, 3 orange) */
body.page-form .form-card .form-section-title:nth-of-type(1){
  background: linear-gradient(135deg, rgba(255, 182, 193, 0.22), rgba(255, 105, 180, 0.12));
  border-color: rgba(236, 72, 153, 0.35);
}
body.page-form .form-card .form-section-title:nth-of-type(1)::before{
  background: linear-gradient(90deg, rgba(236,72,153,0), rgba(236,72,153,.9), rgba(255,105,180,.9), rgba(236,72,153,0));
}
body.page-form .form-card .form-section-title:nth-of-type(1):hover{
  border-color: rgba(236, 72, 153, 0.55);
  box-shadow:
    0 16px 40px rgba(15, 23, 42, 0.14),
    0 0 0 6px rgba(236, 72, 153, 0.12),
    inset 0 1px 0 rgba(255, 255, 255, 0.65);
}

body.page-form .form-card .form-section-title:nth-of-type(2){
  background: linear-gradient(135deg, rgba(167, 139, 250, 0.22), rgba(139, 92, 246, 0.12));
  border-color: rgba(139, 92, 246, 0.35);
}
body.page-form .form-card .form-section-title:nth-of-type(2)::before{
  background: linear-gradient(90deg, rgba(139,92,246,0), rgba(139,92,246,.9), rgba(167,139,250,.9), rgba(139,92,246,0));
}
body.page-form .form-card .form-section-title:nth-of-type(2):hover{
  border-color: rgba(139, 92, 246, 0.55);
  box-shadow:
    0 16px 40px rgba(15, 23, 42, 0.14),
    0 0 0 6px rgba(139, 92, 246, 0.12),
    inset 0 1px 0 rgba(255, 255, 255, 0.65);
}

body.page-form .form-card .form-section-title:nth-of-type(3){
  background: linear-gradient(135deg, rgba(251, 191, 36, 0.22), rgba(249, 115, 22, 0.12));
  border-color: rgba(249, 115, 22, 0.35);
}
body.page-form .form-card .form-section-title:nth-of-type(3)::before{
  background: linear-gradient(90deg, rgba(249,115,22,0), rgba(249,115,22,.9), rgba(251,191,36,.9), rgba(249,115,22,0));
}
body.page-form .form-card .form-section-title:nth-of-type(3):hover{
  border-color: rgba(249, 115, 22, 0.55);
  box-shadow:
    0 16px 40px rgba(15, 23, 42, 0.14),
    0 0 0 6px rgba(249, 115, 22, 0.12),
    inset 0 1px 0 rgba(255, 255, 255, 0.65);
}

/* Right caret pill */
.form-section-title .section-caret {
  display: inline-flex;
  align-items: center;
  justify-content: center;

  width: 36px;
  height: 36px;

  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.40);

  background: rgba(255, 255, 255, 0.70);
  box-shadow: 0 10px 18px rgba(15, 23, 42, 0.10);

  transition: transform .18s ease, background .18s ease, border-color .18s ease;
}

.form-section-title.is-open .section-caret {
  transform: rotate(90deg);
  border-color: rgba(37, 99, 235, 0.55);
  background: rgba(239, 246, 255, 0.95);
}

/* Grid collapse animation (works with JS max-height) */
.form-grid.accordion-grid {
  overflow: hidden;
  max-height: 0px;
  opacity: 0;
  transform: translateY(-4px);
  transition: max-height .26s ease, opacity .18s ease, transform .18s ease;
  will-change: max-height;
}

.form-grid.accordion-grid.open {
  opacity: 1;
  transform: translateY(0);
}

/* Hide add-field-box when section is closed (JS sets hidden) */
.add-field-box[hidden] { display: none !important; }

@media (max-width: 720px) {
  .form-section-title {
    padding: 16px 14px;
    border-radius: 14px;
  }
  .form-section-title .section-caret {
    width: 34px;
    height: 34px;
  }
}

/* Respect reduced motion */
@media (prefers-reduced-motion: reduce) {
  .form-section-title,
  .form-grid.accordion-grid {
    transition: none !important;
  }
}


/* --- Form page: when translator card removed --- */
.page-form.no-translator .main-grid {
  grid-template-columns: 1fr !important;
}

.page-form.no-translator .right-column {
  display: none !important;
}

/* --- Inline IME suggestion popup --- */
.ime-suggest {
  position: absolute;
  z-index: 9999;
  min-width: 220px;
  max-width: 420px;
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  box-shadow: 0 18px 45px rgba(0, 0, 0, 0.10);
  padding: 6px;
}

.ime-suggest .ime-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 10px;
  cursor: pointer;
  user-select: none;
}

.ime-suggest .ime-item:hover {
  background: #f3f4f6;
}

.ime-suggest .ime-main {
  font-size: 16px;
  font-weight: 600;
}

.ime-suggest .ime-hint {
  font-size: 12px;
  color: #6b7280;
  margin-left: auto;
  white-space: nowrap;
}

/* ✅ Transliteration suggestion popup (Google Transliteration / candidate box) */
.goog-transliteration-candidate-box,
.goog-transliteration-candidate-box * {
  color: #05a864 !important;   /* suggestion font color */
}

/* each suggestion row */
.goog-transliteration-candidate {
  color: #05a864 !important;
}

/* highlighted/selected suggestion */
.goog-transliteration-candidate-selected {
  background: #05a864 !important;
  color: #ffffff !important;
}

/* "Enter/Space" hint text (if present as a node) */
.goog-transliteration-control,
.goog-transliteration-control * {
  color: #05a864 !important;
}

/* ✅ Template output font for Marathi + Hindi only (does NOT affect form inputs) */
.biodata-paper.lang-mr,
.biodata-paper.lang-hi {
  font-family: "Baloo 2", "Khand", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif !important;
  font-weight: 500 !important;
}

/* Optional: force all children too (if some elements override font-family) */
.biodata-paper.lang-mr *,
.biodata-paper.lang-hi * {
  font-family: inherit !important;
  font-weight: inherit !important;
}

/* =========================================================
   PREVIEW + PAYMENT PAGE ONLY (isolated)
   Applies ONLY when body has class page-preview-payment
   ========================================================= */
body.page-preview-payment main{
    max-width: 1200px;
    margin: 0 auto;
    padding: 18px 16px 40px;
  }

body.page-preview-payment .pp-grid{
    display: grid;
    grid-template-columns: minmax(0, 1fr) 420px; /* left flexible, right fixed */
    gap: 18px;
    align-items: start;
  margin-top: 14px;
}

  @media (max-width: 1100px){
  body.page-preview-payment .pp-grid{
      grid-template-columns: 1fr;
    }
  }

  @media (max-width: 680px){
  body.page-preview-payment main{
    padding: 12px 10px 28px;
  }

  body.page-preview-payment .pp-grid{
      gap: 12px;
    }
  }
  
body.page-preview-payment .pp-box{
    background: transparent;
    border: none;
    border-radius: 0;
    padding: 0;
  }

body.page-preview-payment .pp-preview-head{
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:10px;
    margin-bottom: 10px;
  }

body.page-preview-payment .pp-preview-title{
  font-size: 18px;
  font-weight: 700;
}

body.page-preview-payment .pp-preview-frame{
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 14px;
    padding: 12px;
    overflow: hidden;

    /* important: give fixed viewing area so scaling works */
    height: min(calc(100svh - 220px), 900px);
    min-height: 460px;

    display: flex;
    justify-content: center;
    align-items: flex-start;
  }

body.page-preview-payment .pp-preview-split{
  display: grid;
  grid-template-columns: minmax(0, 1fr) 240px;
  gap: 12px;
  align-items: start;
}

body.page-preview-payment .pp-preview-split.pp-preview-solo{
  grid-template-columns: 1fr;
}

body.page-preview-payment .pp-preview-pane{
  min-width: 0;
}

body.page-preview-payment .pp-template-pane{
  min-width: 0;
}

body.page-preview-payment .tpl-side-list{
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-height: min(calc(100vh - 240px), 900px);
  overflow: auto;
  padding-right: 4px;
}

body.page-preview-payment .tpl-card{
  display: flex;
  flex-direction: column;
  gap: 6px;
  cursor: pointer;
}

body.page-preview-payment .tpl-thumb{
  width: 100%;
  aspect-ratio: 210 / 297;
  min-height: 320px;
  position: relative;
  overflow: hidden;
  border-radius: 14px;
  border: 1px solid #e5e7eb;
  background-color: #ffffff;
  background-size: contain;
  background-position: center;
  background-repeat: no-repeat;
}

body.page-preview-payment .tpl-card.is-active .tpl-thumb{
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

body.page-preview-payment .tpl-meta{
  font-size: 12px;
  color: #6b7280;
}

body.page-preview-payment .tpl-name{
  font-weight: 600;
  color: #111827;
}

/* Preview page: template modal */
.template-modal{
  position: fixed;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  background: rgba(15, 23, 42, 0.55);
  z-index: 120;
  padding: 16px;
}
.template-modal.is-open{
  display: flex;
}
.template-modal-card{
  width: min(1100px, 96vw);
  max-height: 90vh;
  background:
    radial-gradient(1200px 520px at 10% -10%, rgba(8, 188, 158, 0.16), transparent 60%),
    radial-gradient(900px 420px at 90% 0%, rgba(218, 218, 6, 0.14), transparent 55%),
    linear-gradient(140deg, #f0fdf8 0%, #fff6d9 45%, #eef3ff 100%);
  border-radius: 18px;
  border: 1px solid #e5e7eb;
  box-shadow: 0 24px 60px rgba(15, 23, 42, 0.28);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.template-modal-head{
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 18px;
  border-bottom: 1px solid #e5e7eb;
}
.template-modal-title{
  font-size: 1rem;
  font-weight: 700;
}
.template-modal-close{
  border: 1px solid #e5e7eb;
  background: #f8fafc;
  color: #111827;
  border-radius: 999px;
  padding: 6px 12px;
  font-size: .85rem;
  cursor: pointer;
}
.template-modal-body{
  padding: 16px 18px 20px;
  overflow: auto;
}
.template-modal-grid{
  margin-top: 0;
}

.tpl-badge{
  position: absolute;
  top: 10px;
  right: -40px;
  transform: rotate(45deg);
  width: 140px;
  text-align: center;
  text-indent: 20px;
  font-size: 5px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #164c26;
  background: linear-gradient(135deg, #dcbe53, #b5f0db);
  padding: 4px 0;
  box-shadow: 0 6px 14px rgba(37, 235, 202, 0.123);
  pointer-events: none;
}

@media (max-width: 900px){
  body.page-preview-payment .pp-preview-split{
    grid-template-columns: 1fr;
  }
  body.page-preview-payment .tpl-side-list{
    max-height: none;
  }
}

/* ===== Choose-template / preview page: show preview without boxed container ===== */
body.page-preview-payment .pp-preview-box{
  background: transparent;
  border: none;
  box-shadow: none;
  padding: 0;
}
body.page-preview-payment .pp-preview-head,
body.page-preview-payment .pp-preview-actions{
  display: none;
}
body.page-preview-payment .pp-preview-frame{
    background: transparent;
    border: none;
    border-radius: 0;
    padding: 0;
    overflow: visible;
    height: auto;
    min-height: auto;
    max-height: none;
  }
body.page-preview-payment #biodataPreview{
  width: 100%;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  overflow: visible;
}

  @media (max-width: 680px){
  body.page-preview-payment .pp-preview-frame{
      height: auto;
      min-height: 360px;
      max-height: calc(100vh - 140px);
      padding: 10px;
      overflow: auto;
    }
  }
  
body.page-preview-payment #biodataPreview{
  width: 100%;
  display:flex;
  justify-content:center;
  align-items:flex-start;
}

/* Fixed A4 size in preview for all languages */
body.page-preview-payment .biodata-paper,
body.page-choose-template .biodata-paper{
  height: 297mm;
  max-height: 297mm;
}

/* Slightly larger preview font for Indic languages */
body.page-preview-payment[data-lang="mr"] .biodata-paper *,
body.page-preview-payment[data-lang="hi"] .biodata-paper *,
body.page-preview-payment[data-lang="gu"] .biodata-paper *{
  font-size: 1.30rem;
}

/* Nudge fields a bit left on preview for Indic languages */
body.page-preview-payment[data-lang="mr"] .biodata-paper .biodata-main,
body.page-preview-payment[data-lang="hi"] .biodata-paper .biodata-main,
body.page-preview-payment[data-lang="gu"] .biodata-paper .biodata-main{
  transform: translateX(-16mm);
}

body.page-preview-payment .pp-preview-actions{
    display:flex;
    gap:10px;
    flex-wrap:wrap;
    margin-top: 12px;
  }

  @media (max-width: 680px){
  body.page-preview-payment .pp-preview-actions .pay-top-btn{
      flex: 1 1 100%;
      text-align: center;
    }
  }

body.page-preview-payment .pay-top-btn{
  border: 1px solid #ff5a7a;
  background: #fff;
  color: #ff2e62;
  border-radius: 12px;
  padding: 10px 12px;
  cursor: pointer;
  font-weight: 600;
}

body.page-preview-payment .pay-download-btn{
  width: 100%;
  margin-top: 12px;
  border: 1px solid #ff5a7a;
  background: #fff;
  color: #ff2e62;
  border-radius: 14px;
  padding: 12px 14px;
  cursor: pointer;
  font-weight: 700;
}

body.page-preview-payment .pp-error{
  margin-top: 8px;
  color: #b91c1c;
  font-size: 13px;
}

/* Preview actions panel */
body.page-preview-payment .pp-actions-box{
  display: flex;
  flex-direction: column;
  gap: 16px;
}

body.page-preview-payment .pp-actions-title,
body.page-preview-payment .pp-downloads-title{
  font-weight: 700;
  font-size: 16px;
  margin-bottom: 8px;
}

body.page-preview-payment .pp-actions-buttons,
body.page-preview-payment .pp-downloads-buttons{
  display: flex;
  flex-direction: column;
  gap: 10px;
}

body.page-preview-payment .pp-action-btn{
  border: 1px solid rgba(8, 188, 158, 0.6);
  background: linear-gradient(135deg, #fff8d8, #e9fff6);
  color: #0f766e;
  border-radius: 12px;
  padding: 10px 12px;
  cursor: pointer;
  font-weight: 600;
  text-align: center;
}

body.page-preview-payment .pp-download-btn{
  border: 1px solid rgba(8, 188, 158, 0.6);
  background: linear-gradient(135deg, #08bc9e, #22c55e);
  color: #fff;
  border-radius: 12px;
  padding: 10px 12px;
  cursor: pointer;
  font-weight: 700;
  text-align: center;
  box-shadow:
    0 10px 22px rgba(8, 188, 158, 0.28),
    0 6px 16px rgba(218, 218, 6, 0.18);
}

body.page-preview-payment .pp-downloads-note{
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 6px;
}

/* ✅ Preview page: keep photo on right always (do NOT stack) */
body.page-preview-payment .biodata-paper .biodata-main,
body.page-choose-template .biodata-paper .biodata-main{
  grid-template-columns: minmax(0, 2.1fr) minmax(0, 1fr) !important;
}

/* ================================
   TEMPLATE FONT: Marathi / Hindi / Gujarati
   ================================ */

/* Marathi + Hindi -> Anek Devanagari */
body[data-lang="mr"] .biodata-paper,
body[data-lang="mr"] .biodata-paper *,
body[data-lang="hi"] .biodata-paper,
body[data-lang="hi"] .biodata-paper * {
  font-family: "Anek Devanagari", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif !important;
  font-weight: 400 !important;
  font-size: 1.12rem;
}

/* Gujarati -> Anek Gujarati */
body[data-lang="gu"] .biodata-paper,
body[data-lang="gu"] .biodata-paper * {
  font-family: "Anek Gujarati", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif !important;
  font-weight: 400 !important;
  font-size: 1.12rem;
}
body[data-lang="mr"] .biodata-paper .trad-ganpati-line,
body[data-lang="hi"] .biodata-paper .trad-ganpati-line,
body[data-lang="gu"] .biodata-paper .trad-ganpati-line,
body[data-lang="mr"] .biodata-paper .biodata-section-title,
body[data-lang="hi"] .biodata-paper .biodata-section-title,
body[data-lang="gu"] .biodata-paper .biodata-section-title{
  font-weight: 700 !important;
}
body[data-lang="mr"] .biodata-paper .biodata-header h2,
body[data-lang="hi"] .biodata-paper .biodata-header h2,
body[data-lang="gu"] .biodata-paper .biodata-header h2{
  font-weight: 400 !important;
}

/* Slightly larger type for Indic templates (preview) */
body[data-lang="mr"] .biodata-paper,
body[data-lang="hi"] .biodata-paper,
body[data-lang="gu"] .biodata-paper{
  font-size: 1.08rem;
  line-height: 1.60;
}

/* =========================================================
   Template:  trad_Red
   ========================================================= */
.biodata-paper-trad-red{
  background-image: url("../images/brown-bg.jpeg");
  background-size: 100% 100% !important;
  background-repeat: no-repeat;
  background-position: center;
  font-size: 1.12rem;
  color: #ffffff;
  --pad-l: 30mm;
  --pad-r: 16mm;
}

/* Ganpati line */
.biodata-paper-trad-red .trad-ganpati-line{
  text-align: center; 
  display: block;
  justify-content: center;
  align-items: center;
  font-size: 1.45rem;
  font-weight: 800;
  letter-spacing: 0.8px;
  margin-bottom: 10px;
  color: #ffffff;
  /* padding: 0mm 12mm 12mm 0mm;  */
}

/* Header */
.biodata-paper-trad-red .biodata-header{
  text-align: center;
  margin-bottom: 10px;
  padding-bottom: 6px;
  border-bottom: 2px solid rgba(255, 255, 255, 0);
}

.biodata-paper-trad-red .biodata-header h2{
  font-size: 1.2rem;
  margin-bottom: 4px;
  color: #ffffff;
}

/* Section title */
.biodata-paper-trad-red .biodata-section-title{
  color: hsl(0, 0%, 100%);
  border-bottom: 1px dashed rgb(255, 255, 255);
}

/* Label + value */
.biodata-paper-trad-red .biodata-label{
  color: #ffffff !important;  
}

.biodata-paper-trad-red .biodata-value{
  color: #ffffff !important;
  flex: 1 1 auto;
  min-width: 0;
  overflow-wrap: anywhere; /* long values won’t break layout */
}


/* Make header rows span full paper width (cancel asymmetric padding) */
.biodata-paper-trad-red .trad-ganpati-line,
.biodata-paper-trad-red .biodata-header{
  width: calc(100% + var(--pad-l) + var(--pad-r));
  margin-left: calc(-1 * var(--pad-l));
  margin-right: calc(-1 * var(--pad-r));
  text-align: center;
}

/* 4) All biodata rows (labels + values) size */
.biodata-paper-trad-red .biodata-row{
  font-size: 1.28rem;   /* slightly larger for better readability */
  display: flex;
  align-items: flex-start;
  gap: 69px;        /* 👈 increase gap between label and value */
  margin: 3px 0;    /* 👈 vertical gap between rows */
}



/* Footer */
.biodata-paper-trad-red .biodata-footer{
  border-top: 1px dashed rgba(255, 255, 255, 0);
  padding-top: 6px;
  margin-top: 12px;
  text-align: center;
  font-size: 0.78rem;
  color: #ffffff00;
  opacity: 0.95;
}

/* 1) Shift whole page content RIGHT:
   increase LEFT padding, decrease RIGHT padding */
.biodata-paper-trad-red{
  padding: 18mm 16mm 18mm 32mm;   /* top right bottom left */
}

/* 2) Keep photo column stable + reduce gap a bit */
.biodata-paper-trad-red .biodata-main{
  grid-template-columns: minmax(0, 2.3fr) minmax(0, 0.9fr);
  gap: 12px;
}

/* No photo (English only): let text use full width */
body[data-lang="en"] .biodata-paper.no-photo .biodata-main{
  grid-template-columns: 1fr !important;
}
body[data-lang="mr"] .biodata-paper.no-photo .biodata-main{
  grid-template-columns: 1fr !important;
}
body[data-lang="hi"] .biodata-paper.no-photo .biodata-main{
  grid-template-columns: 1fr !important;
}

body[data-lang="gu"] .biodata-paper.no-photo .biodata-photo{
  display: none !important;
}

/* 3) Optional: if values are too close to label, increase label width */
.biodata-paper-trad-red .biodata-label{
  min-width: 120px;  /* adjust 110px–140px */
}

/* No photo: center block but keep column alignment (non-English) */
body:not([data-lang="en"]) .biodata-paper.no-photo .biodata-row{
  display: grid;
  grid-template-columns: minmax(110px, 140px) 12px minmax(160px, 1fr);
  column-gap: 8px;
  justify-content: center;
  align-items: start;
  max-width: 85%;
  margin-left: auto;
  margin-right: auto;
}
body:not([data-lang="en"]) .biodata-paper.no-photo .biodata-row .biodata-label{
  text-align: left;
  min-width: 0;
}
body:not([data-lang="en"]) .biodata-paper.no-photo .biodata-row .biodata-colon{
  text-align: center;
}
body:not([data-lang="en"]) .biodata-paper.no-photo .biodata-row .biodata-value{
  text-align: left;
}

/* Remove section dotted/dashed lines */
.biodata-section-title{
  font-size: 1.35rem;              /* slightly larger */
  width: calc(100% + var(--pad-l) + var(--pad-r));
  margin-left: calc(-1 * var(--pad-l));
  margin-right: calc(-1 * var(--pad-r));
  text-align: center;
  /* 👇 move “upper side” (adjust as you like) */
  margin-top: -11px;     /* try -4px to -12px */
  margin-bottom: 2px;
}


.photo-upload-section {
  background: linear-gradient(to right, #d3dff4, #f4d8f4);
  border-radius: 12px;
  padding: 20px;
  color: rgb(235, 8, 8);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
  margin-top: 30px;
}

.photo-label {
  font-weight: bold;
  font-size: 1.2em;
  display: block;
  margin-bottom: 10px;
}

#photo {
  background-color: #fff;
  border: none;
  padding: 10px;
  border-radius: 6px;
}

.photo-preview {
  display: none;
  margin-top: 15px;
  max-width: 200px;
  border-radius: 8px;
  box-shadow: 0 0 8px rgba(255, 255, 255, 0.2);
}

/* ✅ Perfect alignment: Label | : | Value */
.biodata-row{
  display:grid;
  grid-template-columns: 55mm 4mm 1fr; /* label | : | value */
  column-gap: 4mm;
  align-items:start;
  margin: 6px 0;
  font-size: 1.2rem;
}

.biodata-label{ min-width:0; font-weight:700; opacity:.95; }
.biodata-colon{ font-weight:700; opacity:.95; text-align:center; }
.biodata-value{ min-width:0; overflow-wrap:anywhere; }

/* Full width rows (textarea fields): value on next line */
.biodata-row.row-full .biodata-value{
  grid-column: 3 / -1;
  grid-row: 2;
  margin-top: 2mm;
}

/* ✅ IMPORTANT: override old trad-red flex gap */
.biodata-paper-trad-red .biodata-row{
  display:grid !important;
  grid-template-columns: 33mm 4mm 1fr !important;
  column-gap: 6mm !important;
  gap: 3 !important;
}
.biodata-paper-trad-red .biodata-colon{
  color: rgba(255,255,255,.9) !important;
}

/* English labels: keep long words on one line */
body[data-lang="en"] .biodata-paper-trad-red .biodata-row{
  grid-template-columns: 35mm 4mm 1fr !important;
  column-gap: 13mm !important;
  font-size: 1rem;
}
body[data-lang="en"] .biodata-paper-trad-red:not(.no-photo) .biodata-row{
  column-gap: 8mm !important;
}
/* body[data-lang="en"] .biodata-paper-trad-red .biodata-label{
  white-space: nowrap;
}

body[data-lang="en"] .biodata-paper-trad-red{
  font-size: 0.55rem;
} */

body[data-lang="en"]  .biodata-paper-trad-red .biodata-paper{
  font-size: 0.55rem;
}

/* Remove underline below section titles */
.biodata-section-title{
  border-bottom: none !important;
  padding-bottom: 0 !important;
}

/* Template custom text color */
.biodata-paper.template-colored,
.biodata-paper.template-colored .biodata-label,
.biodata-paper.template-colored .biodata-value,
.biodata-paper.template-colored .biodata-colon,
.biodata-paper.template-colored .biodata-section-title,
.biodata-paper.template-colored .biodata-header h2,
.biodata-paper.template-colored .trad-ganpati-line,
.biodata-paper.template-colored .biodata-footer{
  color: var(--tpl-text) !important;
}

/* Watermark on preview pages */
.biodata-paper{
  position: relative;
}
body.page-preview-payment .tpl-watermark,
body.page-choose-template .tpl-watermark{
  display: flex;
}
.tpl-watermark{
  position: absolute;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  text-align: center;
  font-size: 2rem;
  font-weight: 600;
  letter-spacing: 1px;
  color: rgba(44, 5, 5, 0.221);
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.18);
  transform: rotate(-25deg);
  pointer-events: none;
  user-select: none;
}

@media print{
  .tpl-watermark{ display: none !important; }
}

/* Home: template grid with thumbnails */
.template-grid{
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 16px;
  margin-top: 10px;
}

.template-card{
  border: none;
  border-radius: 12px;
  background: transparent;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
  cursor: pointer;
  box-shadow: none;
  transition: transform .12s ease;
}

.template-card:hover{
  transform: translateY(-2px);
}

.template-card:active{
  transform: translateY(0) scale(0.99);
}

.template-card.active{
  box-shadow: none;
}

.template-thumb{
  width: 100%;
  aspect-ratio: 210 / 297;
  position: relative;
  overflow: hidden;
  height: auto;
  border-radius: 16px;
  border: 1px solid rgba(235, 37, 195, 0.35);
  background-color: #d160cb;
  background-size: contain;
  background-position: center;
  background-repeat: no-repeat;
  box-shadow:
    0 12px 26px rgba(15, 23, 42, 0.18),
    0 0 0 6px rgba(37, 99, 235, 0.05),
    inset 0 1px 0 rgba(255, 255, 255, 0.65);
}

@media (max-width: 720px){
  .template-grid{
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
  }
}

.template-card.active .template-thumb{
  outline: 2px solid #dc5cf6;
  outline-offset: 2px;
}

.template-card:active .template-thumb{
  box-shadow:
    0 10px 22px rgba(186, 16, 189, 0.22),
    0 0 0 8px rgba(139, 92, 246, 0.18),
    inset 0 1px 0 rgba(255, 255, 255, 0.7);
}

.template-mini{
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.template-btn{
  border: 1px solid rgba(8, 188, 158, 0.6);
  background: linear-gradient(135deg, #08bc9e, #22c55e);
  color: #fff;
  border-radius: 999px;
  padding: 8px 16px;
  font-size: .78rem;
  font-weight: 600;
  letter-spacing: .2px;
  box-shadow:
    0 10px 24px rgba(8, 188, 158, 0.4),
    0 0 16px rgba(218, 218, 6, 0.25),
    inset 0 1px 0 rgba(255, 255, 255, 0.55);
  cursor: pointer;
  transition: transform .12s ease, box-shadow .12s ease, filter .12s ease;
}

.template-btn-overlay{
  position: absolute;
  left: 37%;
  bottom: 14px;
  transform: translate(-50%, 0) scale(0.96);
  opacity: 0;
  pointer-events: none;
}

.template-card:hover .template-btn-overlay,
.template-card:focus-within .template-btn-overlay,
.template-card:active .template-btn-overlay{
  opacity: 1;
  pointer-events: auto;
  transform: translate(-50%, 0) scale(1);
}

.template-btn:hover{
  transform: translateY(-1px);
  box-shadow:
    0 10px 24px rgba(229, 37, 235, 0.55),
    0 0 20px rgba(250, 96, 219, 0.45),
    inset 0 1px 0 rgba(255, 255, 255, 0.55);
  filter: brightness(1.03);
}

.template-btn:active{
  transform: translateY(0) scale(0.98);
  box-shadow:
    0 6px 16px rgba(235, 37, 186, 0.35),
    0 0 12px rgba(96, 165, 250, 0.35),
    inset 0 1px 0 rgba(255, 255, 255, 0.6);
}

/* Subtle glow animation (thumbnail + button) */
.template-thumb{
  animation: thumbPulse 3.2s ease-in-out infinite;
}

.template-btn{
  animation: btnPulse 2.8s ease-in-out infinite;
}

@keyframes thumbPulse{
  0%, 100%{
    box-shadow:
      0 12px 26px rgba(33, 15, 42, 0.18),
      0 0 0 6px rgba(37, 99, 235, 0.05),
      inset 0 1px 0 rgba(255, 255, 255, 0.65);
  }
  50%{
    box-shadow:
      0 16px 30px rgba(15, 23, 42, 0.22),
      0 0 0 10px rgba(37, 99, 235, 0.10),
      inset 0 1px 0 rgba(255, 255, 255, 0.7);
  }
}

@keyframes btnPulse{
  0%, 100%{
    box-shadow:
      0 10px 24px rgba(199, 37, 235, 0.45),
      0 0 16px rgba(96, 165, 250, 0.35),
      inset 0 1px 0 rgba(255, 255, 255, 0.55);
    transform: translateY(0);
  }
  50%{
    box-shadow:
      0 14px 28px rgba(205, 37, 235, 0.55),
      0 0 22px rgba(96, 165, 250, 0.5),
      inset 0 1px 0 rgba(255, 255, 255, 0.65);
    transform: translateY(-1px);
  }
}

@media (prefers-reduced-motion: reduce){
  .template-thumb,
  .template-btn{
    animation: none !important;
  }
}
/* Keep section titles aligned when photo is present */
.biodata-paper .biodata-section-title{
  --section-title-shift-x: 0%;
  --section-title-shift-y: 0px;
  transform: translate(var(--section-title-shift-x), var(--section-title-shift-y));
}
.biodata-paper:not(.no-photo) .biodata-section-title{
  --section-title-shift-x: 18%;
}
.biodata-paper .biodata-section:first-of-type .biodata-section-title{
  --section-title-shift-y: -4px;
}
body[data-lang="mr"] .biodata-paper .biodata-section:first-of-type .biodata-section-title,
body[data-lang="hi"] .biodata-paper .biodata-section:first-of-type .biodata-section-title,
body[data-lang="gu"] .biodata-paper .biodata-section:first-of-type .biodata-section-title{
  --section-title-shift-y: -15px;
}
body[data-lang="mr"] .biodata-paper .biodata-section:nth-of-type(1) .biodata-section-title,
body[data-lang="mr"] .biodata-paper .biodata-section:nth-of-type(2) .biodata-section-title,
body[data-lang="hi"] .biodata-paper .biodata-section:nth-of-type(1) .biodata-section-title,
body[data-lang="hi"] .biodata-paper .biodata-section:nth-of-type(2) .biodata-section-title,
body[data-lang="gu"] .biodata-paper .biodata-section:nth-of-type(1) .biodata-section-title,
body[data-lang="gu"] .biodata-paper .biodata-section:nth-of-type(2) .biodata-section-title{
  font-weight: 700 !important;
  text-align: left;
  padding-left: 160px;
  position: relative;
}
body[data-lang="mr"] .biodata-paper .biodata-section:nth-of-type(1) .biodata-section-title::before,
body[data-lang="mr"] .biodata-paper .biodata-section:nth-of-type(2) .biodata-section-title::before,
body[data-lang="hi"] .biodata-paper .biodata-section:nth-of-type(1) .biodata-section-title::before,
body[data-lang="hi"] .biodata-paper .biodata-section:nth-of-type(2) .biodata-section-title::before,
body[data-lang="gu"] .biodata-paper .biodata-section:nth-of-type(1) .biodata-section-title::before,
body[data-lang="gu"] .biodata-paper .biodata-section:nth-of-type(2) .biodata-section-title::before{
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
}

/* More spacing for Family & Contact section titles */
.biodata-paper .biodata-section:nth-of-type(2) .biodata-section-title,
.biodata-paper .biodata-section:nth-of-type(3) .biodata-section-title{
  margin-top: 10px;
  margin-bottom: 12px;
}

