:root {
  --green-dark: #14532d;
  --green-mid: #166534;
  --green: #15803d;
  --green-light: #22c55e;
  --green-pale: #dcfce7;
  --green-bg: #f0fdf4;
  --gold: #ca8a04;
  --text: #1a1a1a;
  --text-muted: #6b7280;
  --border: #d1d5db;
  --white: #ffffff;
   --green-dark: #1a4731; --green-mid: #2d7a4f; --green-light: #4caf7d;
  --gold: #e8a020; --cream: #fdf8f0; --warm: #fff9f0;
  --text: #1c1c1c; --mid: #444; --light: #777;
  --border: #d4c5a9; --shadow: rgba(26,71,49,0.12); --red: #c0392b;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: 'Mukta', 'Noto Sans Devanagari', sans-serif;
  background: linear-gradient(135deg, #f0fdf4 0%, #dcfce7 50%, #f0fdf4 100%);
  min-height: 100vh;
  color: var(--text);
}

/* Topbar */
.topbar {
  background: var(--green-dark);
  color: #fff;
  padding: 8px 24px;
  display: flex;
  align-items: center;
  gap: 16px;
}

.topbar-logo {
  width: 44px;
  height: 44px;
  background: #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
}

.topbar-title h1 {
  font-size: 18px;
  font-weight: 700;
}

.topbar-title p {
  font-size: 11px;
  opacity: 0.8;
}

.topbar-right {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 12px;
}

.user-badge, .balance-badge {
  background: rgba(255, 255, 255, 0.12);
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 8px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  transition: all 0.2s ease;
  color: #ffffff;
}

.user-badge:hover, .balance-badge:hover {
  background: rgba(255, 255, 255, 0.22);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.user-icon, .balance-icon {
  font-size: 14px;
  display: inline-flex;
  align-items: center;
}

#userName {
  font-weight: 600;
  max-width: 150px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#balanceAmount {
  font-weight: 700;
  color: #fbbf24;
}

/* Main Container */
.main {
  max-width: 1100px;
  margin: 24px auto;
  padding: 0 16px 40px;
}

/* Tabs */
.tabs {
  display: flex;
  background: var(--white);
  border-radius: 12px 12px 0 0;
  border: 1.5px solid var(--border);
  border-bottom: none;
  overflow: hidden;
}

.tab-btn {
  flex: 1;
  padding: 14px 24px;
  border: none;
  background: transparent;
  font-family: inherit;
  font-size: 15px;
  font-weight: 500;
  cursor: pointer;
  color: var(--text-muted);
  border-right: 1px solid var(--border);
  transition: all 0.2s;
}

.tab-btn:last-child {
  border-right: none;
}

.tab-btn.active {
  background: var(--green);
  color: #fff;
}

.tab-btn:hover:not(.active) {
  background: var(--green-bg);
}

/* Panel */
.panel {
  background: var(--white);
  border: 1.5px solid var(--border);
  border-top: none;
  border-radius: 0 0 12px 12px;
  padding: 24px;
}

/* Section Head */
.section-head {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--green-bg);
  border: 1px solid #bbf7d0;
  border-radius: 8px;
  padding: 10px 16px;
  margin-bottom: 18px;
}

.section-head .icon {
  font-size: 20px;
}

.section-head h3 {
  font-size: 15px;
  font-weight: 600;
  color: var(--green-dark);
}

/* Form Grid */
.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin-bottom: 20px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.form-group label {
  font-size: 13px;
  font-weight: 600;
  color: var(--green-dark);
}

.form-group input,
.form-group select {
  padding: 9px 12px;
  border: 1.5px solid var(--border);
  border-radius: 8px;
  font-family: inherit;
  font-size: 14px;
  color: var(--text);
  background: #fff;
  transition: border-color 0.2s;
}

.form-group input:focus,
.form-group select:focus {
  outline: none;
  border-color: var(--green);
  box-shadow: 0 0 0 3px rgba(21, 128, 61, 0.1);
}

/* Photo Box */
.photo-box {
  border: 2px dashed #86efac;
  border-radius: 10px;
  padding: 16px;
  text-align: center;
  cursor: pointer;
  background: var(--green-bg);
  transition: all 0.2s;
  min-height: 100px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.photo-box:hover {
  border-color: var(--green);
  background: #dcfce7;
}

.photo-hint {
  color: var(--text-muted);
  font-size: 13px;
}

/* Land Table */
.land-table-wrap {
  overflow-x: auto;
}

.land-header-row,
.land-data-row {
  display: grid;
  grid-template-columns: 34px 110px 110px 120px 70px 80px  40px;
  gap: 8px;
  align-items: center;
  margin-bottom: 6px;
}

.land-header-row span {
  font-size: 12px;
  font-weight: 700;
  color: var(--green-dark);
  padding: 0 4px;
}

.land-data-row input,
.land-data-row select {
  padding: 7px 9px;
  border: 1.5px solid var(--border);
  border-radius: 7px;
  font-family: inherit;
  font-size: 13px;
  width: 100%;
  background: #fff;
}

.sn-input {
  text-align: center;
  background: #f3f4f6 !important;
  color: #555;
}

/* Buttons */
.btn {
  padding: 10px 22px;
  border-radius: 8px;
  border: none;
  cursor: pointer;
  font-family: inherit;
  font-size: 14px;
  font-weight: 600;
  transition: all 0.18s;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.btn-green {
  background: var(--green);
  color: #fff;
}

.btn-green:hover {
  background: var(--green-mid);
}

.btn-outline {
  background: transparent;
  border: 1.5px solid var(--border);
  color: var(--text);
}

.btn-outline:hover {
  background: var(--green-bg);
  border-color: var(--green);
}

.btn-red {
  background: #dc2626;
  color: #fff;
  padding: 5px 9px;
  font-size: 18px;
  border-radius: 6px;
}

.btn-add {
  background: var(--green-pale);
  color: var(--green-dark);
  border: 1.5px dashed #86efac;
  padding: 7px 16px;
  font-size: 13px;
  border-radius: 7px;
}

.btn-add:hover {
  background: #bbf7d0;
}

.btn-row {
  display: flex;
  gap: 10px;
  margin-top: 20px;
  flex-wrap: wrap;
  align-items: center;
}

/* Preview Section */
#previewSection {
  display: none;
}

.preview-controls {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
  flex-wrap: wrap;
  gap: 10px;
}

.preview-controls p {
  color: var(--text-muted);
  font-size: 13px;
}

/* Card Print Area */
.card-print-area {
  background: #f0fdf4;
  padding: 20px;
  border-radius: 10px;
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 20px;
  padding-right: 10px;
}

.card-wrapper {
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* Card Front */
.card-front {
  width: 342px;
  height: 216px;
  background: #fff;
  border-radius: 2px;
  overflow: hidden;
  border: 1.5px solid #bbb;
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.22);
  position: relative;
  font-family: 'Mukta', 'Noto Sans Devanagari', sans-serif;
}

.template-img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 0;
  pointer-events: none;
}

.card-front-overlay {
  position: relative;
  z-index: 2;
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  background: transparent;
}
.logo-right{
 width: 25px;
 height: 30px;
 align-items: end;
 margin-top: 6px;
}
.logo-left{
 width: 90px;
 height: 25px;
 align-items: end;
 margin-top: 6px;
}

.cf-header {
  background: rgba(5, 148, 62, 0.93);
  padding: 4px 8px;
  display: flex;
  align-items: center;
  gap: 6px;
  height: 40px;
  backdrop-filter: blur(100%);
}

.cf-enroll {
  display: flex;
  align-items: end;
  gap: 6px;
  height: 20px;
}

.cf-enrollspace {
  color: #012c0d00;
  width: 150px;
  flex-shrink: 0;
  font-weight: 800;
  padding-right: 4px;
  text-align: end;
  line-height: 0.9;

}
.cf-enrollstart {
  color: #012c0d;
  width: 80px;
  flex-shrink: 0;
  font-weight: 600;
  font-size: 9px;
  padding-right: 4px;
  text-align: end;
  line-height: 0.9;

}
.cf-enrollend {
  color: #012c0d;
  width: 100px;
  flex-shrink: 0;
  font-weight: 600;
  font-size: 9px;
  text-align: end;
  line-height: 0.9;

}

.logo-pg{
width: 100px;
height: 30px;
display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.cf-emblem {
  width: 28px;
  height: 28px;
  background: #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.cf-emblem-txt {
  font-size: 5.5px;
  font-weight: 800;
  color: var(--green-dark);
  text-align: center;
  line-height: 1.2;
}

.cf-title {
  font-family: 'Noto Sans Devanagari', sans-serif;
  font-size: 16px;
  color: #ffffff;
  flex: 1;
  font-weight: 600;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.15);
}

.cf-title h2 {
  font-size: 9.5px;
  font-weight: 700;
  line-height: 1.3;
}

.cf-title p {
  font-size: 6.5px;
  opacity: 0.85;
  line-height: 1.2;
}

.cf-dept {
  color: #fff;
  font-size: 6px;
  text-align: right;
  opacity: 0.8;
  line-height: 1.5;
  flex-shrink: 0;
}

.cf-stripe {
  height: 3px;
  background: linear-gradient(90deg, #ca8a04, #fbbf24, #ca8a04);
}

.cf-body {
  padding: 0px 12px;
  display: flex;
  gap: 8px;
  height: 125px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0);
  backdrop-filter: blur(2px);
}
/*info and qr*/
.cf-infoqr {
  padding-top: 3px;
  display: flex;
  overflow: hidden;
  backdrop-filter: blur(2px);
}

.cf-bodybtm {
  display: flex;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.7);
  text-align: center;
  margin-left: 80px;
  backdrop-filter: blur(2px);
}

.cf-photo-col {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  flex-shrink: 0;
}


.cf-qr {
  height: 61px;
  width: 61px;
  display: flex;
  align-items: center;
  flex-shrink: 0;
  padding-left: 1px;
}

.cf-photo {
  width: 68px;
  height: 85px;
  border: 1.5px solid var(--green);
  border-radius: 4px;
  background: rgba(240, 253, 244, 0.8);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.cf-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

#qrDiv canvas {
  width: 60px !important;
  height: 60px !important;
  padding-top: 35;
}

.cf-info {
  flex: 1;
  margin-left: 8px;
  overflow: hidden;
}

.cf-inforow {
  flex: 1;
  overflow: hidden;
  background-color: #00000000;
}

.cf-inforow2 {
  flex: 1;
  overflow: hidden;
  padding-top: 3px;
}

.cf-row {
  display: flex;
  align-items: flex-end;
  margin-bottom: 2px;
}
.cf-enrolltxt {
  display: flex;
  align-items: flex-end;
  margin-bottom: 2px;
  text-align: end;
}

/* फ्रंट साइड के लेबल - बड़ा किया */
.cf-lbl {
  color: #000e06;
  width: 78px;
  flex-shrink: 0;
  font-weight: 900;
  font-size: 12px;
  line-height: 1.4;
}

.cf-lbl2 {
  color: #012c0d;
  width: 100%;
  flex-shrink: 0;
  font-weight: 900;
  font-size: 15px;
  line-height: 1.4;
}
.cf-lbleng {
  color: #012c0d;
  width: 100%;
  flex-shrink: 0;
  font-weight: 800;
  font-size: 12px;
  line-height: 0.4;
margin-bottom: 5px;
}

.cf-lbleng2 {
  color: #012c0d;
  width: 100%;
  flex-shrink: 0;
  font-weight: 800;
  font-size: 12px;
  line-height: 0.4;
}
.cf-lbllong {
  color: #012c0d;
  width: 100%;
  flex-shrink: 0;
  font-weight: 500;
  font-size: 11px;
  line-height: 1.1;

}



.cf-lbl5 {
  color: #012c0d;
  width: 60px;
  flex-shrink: 0;
  font-weight: 600;
  font-size: 11px;
  line-height: 1.1;

}


.cf-adressbox {
  min-height: 16px;
align-items: center;
margin-left: 8px;
margin-bottom: 3px;
}

.cf-adress {
  height: 15px;
  color: #012c0d;
  font-weight: 800;
  text-align: center;
  font-size: 10px;
}

.cf-adresstext {
    height: 15px;
  color: #012c0d;
  font-weight: 500;
  font-size: 10px;
    text-align: center;
}

.cf-adhar {
  color: #530101;
  margin-top: 5dp;
  flex-shrink: 0;
  font-weight: 800;
  margin-left: 80px;
  font-size: 14px;
  line-height: 1;

}

.cf-footertxt {
  color: #000;
  text-align: center;
  font-size: 12px;
  font-weight: 800;
  font-family: 'Times New Roman', Times, serif;
  line-height: 1;
  width: 100%;
}


/* */


/* */


/* फ्रंट साइड की वैल्यू - बड़ा किया */
.cf-val {
  color: #111;
  font-weight: 800;
  font-size: 9px;
  border-bottom: 0.5px solid #d1fae5;
  flex: 1;
  padding-bottom: 1px;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.cf-watermark {
  position: absolute;
  right: 6px;
  bottom: 26px;
  font-size: 44px;
  opacity: 0.05;
  pointer-events: none;
  z-index: 1;
}

.cf-footer {
  background: rgba(15, 126, 59, 0);
  color: #0a0202;
  display: flex;
  justify-content: center;
  align-items: center;
  height: 24px;
  position: relative;
  z-index: 2;
}

.cf-footer .card-no {
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 1px;
}

.cf-footer .issue-date {
  position: absolute;
  right: 8px;
  font-size: 7.5px;
  opacity: 0.8;
  font-family: 'Mukta', sans-serif;
  font-weight: 500;
}

/* Card Back */
.card-back {
  width: 342px;
  height: 216px;
  background: #fff;
  border-radius: 2px;
  overflow: hidden;
  border: 1.5px solid #bbb;
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.22);
  position: relative;
}

.card-back-overlay {
  position: relative;
  z-index: 2;
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  background: transparent;
}

.cb-watermark-img {
  position: absolute;
  top: 52%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 342px;
  height: auto;
  opacity: 0.32; /* Light watermark print-safe opacity */
  z-index: 1;
  pointer-events: none;
}

.cb-header {
  background: rgba(15, 126, 60, 0.959);
  color: #fff;
  padding: 5px 8px;
  font-size: 8px;
  font-weight: 700;
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 2%;
  backdrop-filter: blur(1px);
}

.cb-stripe {
  height: 3px;
  background: linear-gradient(90deg, #ca8a04, #fbbf24, #ca8a04);
}


.cb-heading {
  height: calc(216px - 40px - 3px - 24px);
  overflow: hidden;
  background: rgba(255, 255, 255, 0.7);
  backdrop-filter: blur(2px);
}

.cb-cardno {
   height: 15px;
  font-size: 12px;
text-align: center;
margin-left: 27px;
}

.cb-heading2 {
  height: 15px;
  background-color: #00000000;
  font-size: 12px;
  align-items: start;
  text-align: start;
  margin-left: 10px;
}

.cb-body {
  padding: 6px 8px;
  flex: 1;
  overflow: auto;
  background: transparent;
}

.cb-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 9px;
}

.cb-table th {
  background: rgba(15, 126, 60, 0.959);
  color: #fff;
  padding: 2px 6px;
  font-size: 9px;
  font-weight: 500;
}

.cb-table td {
  padding: 2px 6px;
  border-bottom: 0.5px solid #e5e7eb;
  color: #040404;
  font-size: 9px;
  padding-left: 10px;
  border-spacing: 20px;
  font-weight: 400;
  text-align: center;
    line-height: 0.8;    /* यह भी जोड़ें */
}

.cb-summary {
  display: flex;
  gap: 5px;
  margin-top: 6px;
}

.cb-stat {
  flex: 1;
  border: 1px solid #040404;
  border-radius: 4px;
  padding: 2px 2px;
  align-items:center;
  display:flex;
  justify-content:space-between;
}

.cb-stat .slbl {
  font-size: 9px;
  color: #080808;
  font-weight: 600;
margin-left: 8px;
}

.cb-stat .sval {
  font-size: 9px;
  font-weight: 800;
  margin-right: 8px;
  color: var(--green-dark);
}

.cb-note {
  margin-top: 6px;
  font-size: 6px;
  color: #6b7280;
  border-top: 0.5px solid #e5e7eb;
  padding-top: 4px;
  line-height: 1.5;
}

.cb-footer {
  background: rgba(20, 83, 45, 0);
  color: #110101;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 2px 2px;
  font-size: 10px;
}


.cb-footert1{
margin-left: 30px;
align-items: left;
}

.cb-footert2{
margin-right: 30px;
align-items: left;
}



/* new card */
.card { background:#fff; border-radius:14px; box-shadow:0 2px 16px var(--shadow); margin-bottom:22px; overflow:hidden; }
.ch { background:linear-gradient(135deg,var(--green-dark),var(--green-mid)); padding:13px 22px; display:flex; align-items:center; gap:9px; }
.ch h3 { color:#fff; font-size:0.97rem; font-weight:600; }
.cb { padding:20px 22px 16px; }
.ltop { display:flex; justify-content:space-between; align-items:center; margin-bottom:14px; }
.ltop span { font-size:0.82rem; color:var(--light); font-weight:600; }
.abtn { background:var(--green-mid); color:#fff; border:none; padding:8px 16px; border-radius:8px; font-size:0.83rem; font-family:inherit; font-weight:600; cursor:pointer; transition:background 0.2s; }
.abtn:hover { background:var(--green-dark); }
.llist { display:flex; flex-direction:column; gap:14px; }
.fg { display:flex; flex-direction:column; gap:4px; }
.fg.full { grid-column:1/-1; }
.lgrid { display:grid; grid-template-columns:repeat(auto-fill,minmax(190px,1fr)); gap:10px; }
.dbtn { background:none; border:1.5px solid #f5c6c6; color:var(--red); padding:4px 11px; border-radius:6px; font-size:0.78rem; cursor:pointer; font-family:inherit; }
.dbtn:hover { background:#fff5f5; }
.lnum { font-size:0.83rem; font-weight:700; color:var(--green-dark); background:#e6f5ed; padding:3px 12px; border-radius:20px; }





/* =============================================
   UP EMBLEM LOGO — CARD HEADER
   ============================================= */
.cf-logo-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 34px;
  height: 34px;
  overflow: hidden;
}
.cf-logo-wrap1 {
  justify-content: center;
  flex-shrink: 0;
  width: 34px;
  color: rgba(195, 216, 4, 0.85);
 font-size: 10px;
  height: 34px;
  line-height: 1.3;
  overflow: hidden;
}

.cf-logo-right {
  margin-left: auto;
}

.cf-emblem-img {
  width: 30px;
  height: 30px;
  object-fit: contain;
}

.cf-emblem-svg {
  width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
}





.cf-header-left {
  width: 90px;
  display: flex;
  justify-content: flex-start;
  align-items: center;
  flex-shrink: 0;
}

.cf-header-right {
  width: 90px;
  display: flex;
  justify-content: flex-end;
  align-items: center;
  flex-shrink: 0;
}

.cf-header-text {
  flex: 1;
  text-align: center;
}

.cf-subtitle {
  font-family: 'Noto Sans Devanagari', sans-serif;
  font-size: 9.5px;
  color: #ffffff;
  line-height: 1.2;
  font-weight: 400;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.15);
}


.pdf-upload-section {
  background: linear-gradient(135deg, #eff6ff 0%, #dbeafe 100%);
  border: 2px dashed #3b82f6;
  border-radius: 12px;
  padding: 16px 20px;
  margin-bottom: 22px;
}

.pdf-upload-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}

.pdf-upload-icon {
  font-size: 28px;
  flex-shrink: 0;
}

.pdf-upload-header h3 {
  font-size: 15px;
  font-weight: 700;
  color: #1d4ed8;
  margin-bottom: 2px;
}

.pdf-upload-header p {
  font-size: 12px;
  color: #3b82f6;
}

.pdf-upload-body {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

.pdf-upload-label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #2563eb;
  color: #fff;
  padding: 10px 20px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s;
  font-family: inherit;
  flex-shrink: 0;
}

.pdf-upload-label:hover {
  background: #1d4ed8;
}

.pdf-upload-btn-icon {
  font-size: 16px;
}

.pdf-upload-status {
  font-size: 13px;
  color: #6b7280;
  font-weight: 500;
  flex: 1;
}

/*logo*/
.logo-box{
  display: flex;
  flex-direction: column;
  align-items: center;
  line-height: 0.1;
  margin-top: -10px;
}

.logo-text{
  font-size: 20px;
  font-weight: bold;
  color: #fbbf24;
padding-bottom: 8px;

 }
.logo-space{
  height: 20px;
  font-size: 15px;
  font-weight: bold;
  color: #fbbf24;
padding-bottom: 8px;

 }
 .svg-logo{
  padding-top: 5px;
 }

.agri-logo {
  height: 35px;
  display: inline-flex;
  align-items: baseline;
  font-family: 'Poppins', sans-serif;
  font-weight: 800;
  line-height: 1;
  position: relative;
}
.text-agr{
color: #fff;
height: 22px;
  font-size: 20px;
margin-top: 8px;
}

.text-card { 
  color: #fbbf24; 
  height: 15px;
  font-size: 20px;
margin-top: 8px;
}
  
/* Hide only card on print */
@media print {
  .card-print-area, 
  .pvc-card-printable, 
  #farmer-card-front, 
  #farmer-card-back {
    display: none !important;
  }
}
