@import url("https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;600;700;800&display=swap");
* { margin: 0px; padding: 0px; box-sizing: border-box; }
body { background: linear-gradient(135deg, rgb(15, 23, 42) 0%, rgb(30, 41, 59) 50%, rgb(15, 23, 42) 100%); font-family: "DM Sans", "Segoe UI", sans-serif; min-height: 100vh; padding: 20px; }
.container { max-width: 1400px; margin: auto; display: flex; gap: 20px; }
.main-content { flex: 1 1 0%; display: flex; flex-direction: column; gap: 20px; min-width: 0px; }
.sidebar { width: 260px; flex-shrink: 0; }
.sidebar-box { background: rgba(255, 255, 255, 0.95); backdrop-filter: blur(20px); padding: 20px; border-radius: 18px; box-shadow: rgba(0, 0, 0, 0.25) 0px 25px 50px; position: sticky; top: 20px; }
.sidebar-title { font-size: 13px; font-weight: 700; color: rgb(30, 41, 59); margin-bottom: 16px; padding-bottom: 12px; border-bottom: 2px solid rgb(226, 232, 240); text-transform: uppercase; letter-spacing: 1px; display: flex; align-items: center; gap: 8px; }
.sidebar-title::before { content: ""; width: 4px; height: 18px; background: linear-gradient(135deg, rgb(16, 185, 129), rgb(5, 150, 105)); border-radius: 2px; flex-shrink: 0; }
.upload-box, .review-box, .crop-box { background: rgba(255, 255, 255, 0.95); backdrop-filter: blur(20px); padding: 30px; border-radius: 22px; box-shadow: rgba(0, 0, 0, 0.15) 0px 25px 50px; border: 1px solid rgba(255, 255, 255, 0.2); }
.upload-box { text-align: center; background: linear-gradient(135deg, rgba(255, 255, 255, 0.98), rgba(240, 253, 244, 0.95)); }
.upload-box h1 { font-size: 24px; line-height: 1.3; font-weight: 800; background: linear-gradient(135deg, rgb(5, 150, 105), rgb(16, 185, 129)) text; -webkit-text-fill-color: transparent; margin-bottom: 20px; }
.pdf-note { color: rgb(220, 38, 38); font-weight: 600; font-size: 13px; text-align: center; margin-top: 12px; margin-bottom: 5px; background: linear-gradient(135deg, rgb(254, 242, 242), rgb(254, 226, 226)); display: inline-block; padding: 10px 20px; border-radius: 14px; border: 1px solid rgb(254, 202, 202); }
.review-box, .crop-box { display: none; }
.crop-box.open { display: flex; flex-direction: column; position: fixed; inset: 0px; width: 100vw; height: 100vh; max-width: 100vw; max-height: 100vh; margin: 0px; border-radius: 0px; z-index: 9999; overflow: auto; background: rgba(15, 23, 42, 0.98); }
.crop-box.open .crop-container { flex: 1 1 0%; max-height: none; }
.review-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-bottom: 20px; }
.review-grid input { width: 100%; padding: 12px 14px; border: 2px solid rgb(226, 232, 240); border-radius: 10px; font-size: 14px; transition: 0.3s; background: rgb(248, 250, 252); font-family: "DM Sans", sans-serif; }
.review-grid input:focus { border-color: rgb(16, 185, 129); background: rgb(255, 255, 255); outline: none; box-shadow: rgba(16, 185, 129, 0.1) 0px 0px 0px 4px; }
.review-grid label { font-size: 12px; font-weight: 600; color: rgb(100, 116, 139); display: block; margin-bottom: 6px; text-transform: uppercase; letter-spacing: 0.5px; }
.land-edit-table { width: 100%; border-collapse: separate; border-spacing: 0px; margin-top: 20px; border-radius: 14px; overflow: hidden; border: 2px solid rgb(226, 232, 240); }
.land-edit-table th, .land-edit-table td { padding: 12px; text-align: center; font-size: 13px; }
.land-edit-table th { background: linear-gradient(135deg, rgb(30, 41, 59), rgb(51, 65, 85)); color: rgb(255, 255, 255); font-weight: 600; text-transform: uppercase; font-size: 11px; letter-spacing: 0.5px; }
.land-edit-table td { border-bottom: 1px solid rgb(226, 232, 240); background: rgb(255, 255, 255); }
.land-edit-table input { width: 100%; border: 2px solid transparent; outline: none; text-align: center; padding: 8px; border-radius: 8px; transition: 0.3s; font-family: "DM Sans", sans-serif; }
.land-edit-table input:focus { border-color: rgb(16, 185, 129); background: rgb(240, 253, 244); }
button { padding: 12px 24px; border-width: medium; border-style: none; border-color: currentcolor; border-image: none; color: rgb(255, 255, 255); border-radius: 14px; cursor: pointer; font-size: 13px; font-weight: 600; margin-top: 10px; transition: 0.3s; box-shadow: rgba(0, 0, 0, 0.1) 0px 4px 15px; font-family: "DM Sans", sans-serif; letter-spacing: 0.3px; }
button:hover { transform: translateY(-2px); box-shadow: rgba(0, 0, 0, 0.2) 0px 8px 25px; }
.btn-extract { background: linear-gradient(135deg, rgb(16, 185, 129), rgb(5, 150, 105)); padding: 14px 32px; font-size: 15px; }
.btn-extract:hover { background: linear-gradient(135deg, rgb(5, 150, 105), rgb(4, 120, 87)); }
.btn-add-row { background: linear-gradient(135deg, rgb(59, 130, 246), rgb(13, 148, 136)); }
.btn-add-row:hover { background: linear-gradient(135deg, rgb(13, 148, 136), rgb(15, 118, 110)); }
.btn-crop-tool { background: linear-gradient(135deg, rgb(245, 158, 11), rgb(217, 119, 6)); }
.btn-crop-tool:hover { background: linear-gradient(135deg, rgb(217, 119, 6), rgb(180, 83, 9)); }
.btn-generate { background: linear-gradient(135deg, rgb(13, 148, 136), rgb(15, 118, 110)); }
.btn-generate:hover { background: linear-gradient(135deg, rgb(15, 118, 110), rgb(17, 94, 89)); }
.btn-print { background: linear-gradient(135deg, rgb(30, 41, 59), rgb(15, 23, 42)); }
.btn-print:hover { background: linear-gradient(135deg, rgb(51, 65, 85), rgb(30, 41, 59)); }
.btn-download { background: linear-gradient(135deg, rgb(6, 182, 212), rgb(8, 145, 178)); }
.btn-download:hover { background: linear-gradient(135deg, rgb(8, 145, 178), rgb(14, 116, 144)); }
.design-selector { margin: 15px 0px 0px; }
.design-options { display: flex; flex-direction: column; gap: 8px; }
.design-option { cursor: pointer; padding: 12px 14px; border: 2px solid rgb(226, 232, 240); border-radius: 14px; text-align: left; transition: 0.3s; display: flex; align-items: center; gap: 12px; background: rgb(255, 255, 255); }
.design-option:hover { border-color: rgb(16, 185, 129); background: rgb(240, 253, 244); transform: translateX(4px); }
.design-option.active { border-color: rgb(16, 185, 129); background: linear-gradient(135deg, rgb(236, 253, 245), rgb(209, 250, 229)); box-shadow: rgba(16, 185, 129, 0.2) 0px 4px 15px; }
.design-preview { flex-shrink: 0; }
.preview-cell { width: 50px; height: 32px; border-radius: 6px; display: flex; align-items: center; justify-content: center; font-size: 8px; font-weight: 600; color: rgb(255, 255, 255); text-align: center; line-height: 1.2; }
.style0-preview { background: linear-gradient(135deg, rgb(16, 185, 129), rgb(5, 150, 105)); }
.style1-preview { background: linear-gradient(135deg, rgb(5, 150, 105), rgb(4, 120, 87)); }
.style2-preview { background: linear-gradient(135deg, rgb(14, 165, 233), rgb(2, 132, 199)); }
.design-option span { font-size: 12px; font-weight: 600; color: rgb(71, 85, 105); }
.btn-delete { background: linear-gradient(135deg, rgb(239, 68, 68), rgb(220, 38, 38)); padding: 6px 12px; font-size: 11px; margin-top: 0px; border-radius: 8px; }
.btn-delete:hover { background: linear-gradient(135deg, rgb(220, 38, 38), rgb(185, 28, 28)); }
.btn-download-4x6 { background: linear-gradient(135deg, rgb(245, 158, 11), rgb(217, 119, 6)); padding: 12px 24px; font-size: 13px; }
.btn-download-4x6:hover { background: linear-gradient(135deg, rgb(217, 119, 6), rgb(180, 83, 9)); }
button.secondary-btn { background: linear-gradient(135deg, rgb(100, 116, 139), rgb(71, 85, 105)); margin-left: 5px; }
button.secondary-btn:hover { background: linear-gradient(135deg, rgb(71, 85, 105), rgb(51, 65, 85)); }
input[type="file"] { background: rgb(255, 255, 255); padding: 14px 20px; border-radius: 14px; border: 2px dashed rgb(16, 185, 129); cursor: pointer; font-size: 14px; transition: 0.3s; font-family: "DM Sans", sans-serif; }
input[type="file"]:hover { border-color: rgb(5, 150, 105); background: rgb(240, 253, 244); }
.crop-container { position: relative; overflow: auto; max-height: 500px; border: 2px solid rgb(226, 232, 240); margin-top: 15px; background: rgb(30, 41, 59); text-align: center; border-radius: 14px; }
#cropCanvas { cursor: crosshair; display: block; margin: 0px auto; }
.cards { display: flex; gap: 24px; flex-wrap: wrap; justify-content: center; padding: 24px; background: rgba(255, 255, 255, 0.95); backdrop-filter: blur(20px); border-radius: 22px; box-shadow: rgba(0, 0, 0, 0.15) 0px 25px 50px; }
.panel { width: 85.6mm; height: 54mm; border-radius: 4mm; overflow: hidden; position: relative; box-shadow: rgba(0, 0, 0, 0.2) 0px 20px 40px; color: rgb(0, 0, 0); background-size: 100% 100%; background-repeat: no-repeat; background-position: center center; transition: transform 0.3s, box-shadow 0.3s; }
.panel:hover { transform: translateY(-5px) scale(1.02); box-shadow: rgba(0, 0, 0, 0.3) 0px 30px 60px; }
.panel-front, .panel-back { background-color: rgb(255, 255, 255); }
.front-body { position: absolute; top: 11mm; left: 4mm; right: 4mm; display: flex; gap: 10px; }
.panel-head { display: none; position: absolute; top: 1.8mm; left: 7mm; width: calc(100% - 26.4567px); text-align: center; font-size: 14px; font-weight: 900; line-height: 1.1; color: rgb(11, 125, 53); letter-spacing: 0.6px; text-shadow: rgba(255, 255, 255, 0.8) 0px 1px 2px; }
.cards.has-head .panel-head { display: block; }
.photo { width: 20mm; height: 25mm; border: 1.5px solid rgb(11, 125, 53); border-radius: 4px; object-fit: cover; background: rgb(255, 255, 255); }
.details { flex: 1 1 0%; font-size: 8.5px; line-height: 1.4; font-weight: 600; }
.detail-row { margin-bottom: 1px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.label { color: rgb(11, 125, 53); font-weight: bold; display: inline-block; width: 58px; }
.value-text { color: rgb(34, 34, 34); }
.farmer-id-line { position: absolute; bottom: 13mm; left: 10mm; width: 56mm; font-size: 12.5px; font-weight: 800; line-height: 1.2; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; text-shadow: rgb(255, 255, 255) 0px 0px 3px, rgb(255, 255, 255) 0px 0px 3px, rgb(255, 255, 255) 0px 0px 5px; }
.farmer-id-line .label { width: auto; display: inline; font-weight: 800; }
.farmer-id-line .value-text { font-weight: 800; color: rgb(17, 17, 17); }
.address { width: 100%; margin: 0px 0px 1.2mm; font-size: 7.5px; line-height: 1.25; font-weight: bold; color: rgb(34, 34, 34); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.qr-front { position: absolute; right: 4mm; bottom: 12mm; background: rgb(255, 255, 255); padding: 2px; border-radius: 4px; border: 1px solid rgb(204, 204, 204); display: flex; align-items: center; justify-content: center; }
.land-wrapper { padding: 9mm 5mm 4mm; height: 100%; display: flex; flex-direction: column; justify-content: flex-start; }
.land-table-container { max-height: 30mm; overflow: hidden; border-radius: 0px; border-width: medium; border-style: none; border-color: currentcolor; border-image: none; background: transparent; }
.land-table { width: 100%; border-collapse: collapse; font-size: 7px; }
.land-table th, .land-table td { border: 0.3px solid rgb(0, 0, 0); padding: 1px 2px; line-height: 1; text-align: center; }
.land-table th { font-weight: bold; background: transparent; color: rgb(0, 0, 0); }
.land-table tr:not(:last-child) td { border-bottom: 1px solid rgb(238, 238, 238); }
.note { position: absolute; bottom: 5mm; left: 0px; width: 100%; font-size: 8px; text-align: center; color: red; font-weight: bold; }
@media print {
  @page { size: a4; margin: 10mm; }
  html, body { background: rgb(255, 255, 255); margin: 0px; padding: 0px; }
  body * { visibility: hidden; }
  .cards, .cards * { visibility: visible; }
  .cards { position: absolute; left: 10mm; top: 10mm; width: 190mm; display: flex; gap: 10mm; justify-content: flex-start; background: none; margin: 0px; box-shadow: none; padding: 0px; }
  .upload-box, .review-box, .crop-box, .sidebar-box { display: none !important; }
  .panel { box-shadow: none; margin: 0px; break-inside: avoid; print-color-adjust: exact; width: 86mm; height: 54mm; }
  .panel:hover { transform: none; }
}
:root { --sc-bg-1: #0f172a; --sc-bg-2: #1e293b; --sc-primary: #10b981; --sc-primary-dark: #059669; --sc-primary-darker: #047857; --sc-primary-soft: #ecfdf5; --sc-primary-soft-2: #d1fae5; --sc-primary-ring: rgba(16, 185, 129, 0.15); --sc-secondary: #0d9488; --sc-secondary-dark: #0f766e; --sc-secondary-darker: #115e59; --sc-accent: #f59e0b; --sc-accent-dark: #d97706; --sc-accent-darker: #b45309; --sc-info: #06b6d4; --sc-info-dark: #0891b2; --sc-text: #1e293b; --sc-muted: #64748b; --sc-border: #e2e8f0; }
html { text-size-adjust: 100%; }
body { background: linear-gradient(135deg, var(--sc-bg-1), var(--sc-bg-2), var(--sc-bg-1)); background-attachment: fixed; }
img, canvas { max-width: 100%; }
.sidebar-title { color: var(--sc-text); border-bottom-color: var(--sc-border); }
.sidebar-title::before { background: linear-gradient(135deg, var(--sc-primary), var(--sc-primary-dark)); }
.upload-box { background: linear-gradient(135deg, rgba(255,255,255,.98), color-mix(in srgb, var(--sc-primary-soft) 95%, transparent)); }
.upload-box h1 { background: linear-gradient(135deg, var(--sc-primary-dark), var(--sc-primary)); background-clip: text; -webkit-background-clip: text; -webkit-text-fill-color: transparent; }
.review-grid input:focus { border-color: var(--sc-primary); box-shadow: 0 0 0 4px var(--sc-primary-ring); }
.land-edit-table input:focus { border-color: var(--sc-primary); background: var(--sc-primary-soft); }
input[type="file"] { border-color: var(--sc-primary); max-width: 100%; }
input[type="file"]:hover { border-color: var(--sc-primary-dark); background: var(--sc-primary-soft); }
.design-option:hover { border-color: var(--sc-primary); background: var(--sc-primary-soft); }
.design-option.active { border-color: var(--sc-primary); background: linear-gradient(135deg, var(--sc-primary-soft), var(--sc-primary-soft-2)); box-shadow: 0 4px 15px var(--sc-primary-ring); }
.style0-preview { background: linear-gradient(135deg, var(--sc-primary), var(--sc-primary-dark)); }
.style1-preview { background: linear-gradient(135deg, var(--sc-primary-dark), var(--sc-primary-darker)); }
.btn-extract { background: linear-gradient(135deg, var(--sc-primary), var(--sc-primary-dark)); }
.btn-extract:hover { background: linear-gradient(135deg, var(--sc-primary-dark), var(--sc-primary-darker)); }
.btn-add-row { background: linear-gradient(135deg, var(--sc-secondary), var(--sc-secondary-dark)); }
.btn-add-row:hover { background: linear-gradient(135deg, var(--sc-secondary-dark), var(--sc-secondary-darker)); }
.btn-generate { background: linear-gradient(135deg, var(--sc-secondary), var(--sc-secondary-dark)); }
.btn-generate:hover { background: linear-gradient(135deg, var(--sc-secondary-dark), var(--sc-secondary-darker)); }
.btn-crop-tool, .btn-download-4x6 { background: linear-gradient(135deg, var(--sc-accent), var(--sc-accent-dark)); }
.btn-crop-tool:hover, .btn-download-4x6:hover { background: linear-gradient(135deg, var(--sc-accent-dark), var(--sc-accent-darker)); }
.btn-download { background: linear-gradient(135deg, var(--sc-info), var(--sc-info-dark)); }
.btn-print { background: linear-gradient(135deg, var(--sc-bg-2), var(--sc-bg-1)); }
.crop-box.open { background: color-mix(in srgb, var(--sc-bg-1) 98%, transparent); }
.review-box h3 { color: var(--sc-secondary) !important; }
.crop-box h3 { color: var(--sc-accent-dark) !important; }
.crop-box > p { color: rgb(203, 213, 225) !important; }
.panel, .cards img { user-select: none; -webkit-user-drag: none; }
button, .design-option, input[type="file"] { -webkit-tap-highlight-color: transparent; touch-action: manipulation; }
button:focus-visible, .design-option:focus-visible, input:focus-visible { outline: 3px solid var(--sc-primary); outline-offset: 2px; }
#cropCanvas { max-width: 100%; height: auto; touch-action: none; user-select: none; }
.crop-container { }
.land-edit-wrap { width: 100%; overflow-x: auto; }
@media (hover: none) {
  button:hover, .panel:hover, .design-option:hover { transform: none; }
}
@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: auto ease 0s 1 normal none running none !important; }
}
@media screen and (min-width: 1600px) {
  .container { max-width: 1560px; }
}
@media screen and (max-width: 1024px) {
  body { padding: 14px; }
  .container { flex-direction: column; gap: 16px; }
  .sidebar { width: 100%; }
  .sidebar-box { position: static; padding: 16px; }
  .design-options { flex-flow: wrap; }
  .design-option { flex: 1 1 160px; }
  .design-option:hover { transform: none; }
  .upload-box, .review-box, .crop-box { padding: 24px; }
}
@media screen and (max-width: 640px) {
  body { padding: 8px; }
  .container, .main-content { gap: 12px; }
  .upload-box, .review-box, .crop-box { padding: 16px; border-radius: 16px; }
  .upload-box h1 { font-size: 19px; line-height: 1.3; margin-bottom: 14px; }
  .sidebar-box { padding: 14px; border-radius: 14px; }
  .design-option { flex: 1 1 100%; }
  input[type="file"] { width: 100%; padding: 12px; font-size: 14px; }
  .pdf-note { display: block; padding: 10px 12px; font-size: 12px; }
  .review-grid { grid-template-columns: 1fr; gap: 12px; }
  .review-grid input, .land-edit-table input { font-size: 16px; }
  .land-edit-table { display: block; overflow-x: auto; white-space: nowrap; }
  .land-edit-table input { min-width: 84px; }
  button { min-height: 44px; padding: 12px 16px; }
  .btn-extract, .btn-add-row, .btn-crop-tool, .btn-generate, .btn-print, .btn-download-4x6, .btn-download, button.secondary-btn { width: 100%; margin-left: 0px; margin-top: 8px; }
  .btn-delete { width: auto; min-height: 36px; }
  .upload-box button[title] { width: auto; min-height: 36px; }
  .review-box br { display: none; }
  .cards { padding: 10px; gap: 16px; border-radius: 16px; }
  .crop-box.open { padding: 12px; }
  .crop-box.open .crop-container { margin-top: 8px; }
}
@media screen and (max-width: 380px) {
  .cards { overflow-x: auto; justify-content: flex-start; }
  .panel { flex-shrink: 0; }
}
@media screen and (max-height: 480px) and (orientation: landscape) {
  .crop-box.open { padding: 8px 16px; }
  .crop-container { max-height: none; }
}
.sc-seo { max-width: 1400px; margin: 24px auto 0px; padding: 0px; color: var(--sc-text); font-family: "DM Sans", "Segoe UI", sans-serif; }
.sc-seo .sc-card { background: rgba(255, 255, 255, 0.96); border-radius: 22px; padding: 30px; box-shadow: rgba(0, 0, 0, 0.15) 0px 25px 50px; line-height: 1.7; font-size: 15px; }
.sc-seo h2 { font-size: 22px; font-weight: 800; color: var(--sc-primary-dark); margin: 26px 0px 10px; line-height: 1.3; }
.sc-seo h2:first-of-type { margin-top: 0px; }
.sc-seo h3 { font-size: 16px; font-weight: 700; margin: 16px 0px 6px; }
.sc-seo p { margin: 0px 0px 12px; color: rgb(51, 65, 85); }
.sc-seo ul, .sc-seo ol { margin: 0px 0px 12px 22px; color: rgb(51, 65, 85); }
.sc-seo li { margin-bottom: 6px; }
.sc-seo a { color: var(--sc-primary-dark); font-weight: 600; }
.sc-seo .sc-crumbs { font-size: 13px; color: rgb(203, 213, 225); margin: 0px 0px 12px 4px; }
.sc-seo .sc-crumbs a { color: rgb(167, 243, 208); text-decoration: none; }
.sc-seo .sc-hi { color: var(--sc-muted); }
.sc-seo details { border: 2px solid var(--sc-border); border-radius: 14px; padding: 12px 16px; margin-bottom: 10px; background: rgb(255, 255, 255); }
.sc-seo details[open] { border-color: var(--sc-primary); background: var(--sc-primary-soft); }
.sc-seo summary { cursor: pointer; font-weight: 700; color: var(--sc-text); }
.sc-seo details p { margin: 10px 0px 0px; }
.sc-seo .sc-note { background: rgb(255, 251, 235); border: 1px solid rgb(253, 230, 138); border-radius: 14px; padding: 12px 16px; font-size: 13px; color: rgb(146, 64, 14); }
@media screen and (max-width: 640px) {
  .sc-seo { margin-top: 14px; }
  .sc-seo .sc-card { padding: 18px; border-radius: 16px; font-size: 14px; }
  .sc-seo h2 { font-size: 19px; }
}
@media print {
  .sc-seo { display: none !important; }
}



        @import url('https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;600;700;800&display=swap');

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

        body {
            background: linear-gradient(135deg, #0f172a 0%, #1e293b 50%, #0f172a 100%);
            font-family: 'DM Sans', 'Segoe UI', sans-serif;
            min-height: 100vh;
            padding: 20px;
        }

        .container {
            max-width: 1400px;
            margin: auto;
            display: flex;
            gap: 20px;
        }

        .main-content {
            flex: 1;
            display: flex;
            flex-direction: column;
            gap: 20px;
            min-width: 0;
        }

        .sidebar {
            width: 260px;
            flex-shrink: 0;
        }

        .sidebar-box {
            background: rgba(255, 255, 255, 0.95);
            backdrop-filter: blur(20px);
            padding: 20px;
            border-radius: 18px;
            box-shadow: 0 25px 50px rgba(0, 0, 0, 0.25);
            position: sticky;
            top: 20px;
        }

        .sidebar-title {
            font-size: 13px;
            font-weight: 700;
            color: #1e293b;
            margin-bottom: 16px;
            padding-bottom: 12px;
            border-bottom: 2px solid #e2e8f0;
            text-transform: uppercase;
            letter-spacing: 1px;
            display: flex;
            align-items: center;
            gap: 8px;
        }

        .sidebar-title::before {
            content: '';
            width: 4px;
            height: 18px;
            background: linear-gradient(135deg, #10b981, #059669);
            border-radius: 2px;
            flex-shrink: 0;
        }

        .upload-box,
        .review-box,
        .crop-box {
            background: rgba(255, 255, 255, 0.95);
            backdrop-filter: blur(20px);
            padding: 30px;
            border-radius: 22px;
            box-shadow: 0 25px 50px rgba(0, 0, 0, 0.15);
            border: 1px solid rgba(255, 255, 255, 0.2);
        }

        .upload-box {
            text-align: center;
            background: linear-gradient(135deg, rgba(255, 255, 255, 0.98), rgba(240, 253, 244, 0.95));
        }

        .upload-box h1 {
            font-size: 24px; line-height: 1.3;
            font-weight: 800;
            background: linear-gradient(135deg, #059669, #10b981);
            -webkit-background-clip: text;
            -webkit-text-fill-color: transparent;
            background-clip: text;
            margin-bottom: 20px;
        }

        .pdf-note {
            color: #dc2626;
            font-weight: 600;
            font-size: 13px;
            text-align: center;
            margin-top: 12px;
            margin-bottom: 5px;
            background: linear-gradient(135deg, #fef2f2, #fee2e2);
            display: inline-block;
            padding: 10px 20px;
            border-radius: 14px;
            border: 1px solid #fecaca;
        }

        .review-box,
        .crop-box {
            display: none;
        }

        /* Crop tool now opens as a true fullscreen modal overlay instead of
           an inline panel, so it is always fully visible regardless of
           where the user scrolled to on the page. */
        .crop-box.open {
            display: flex;
            flex-direction: column;
            position: fixed;
            inset: 0;
            width: 100vw;
            height: 100vh;
            max-width: 100vw;
            max-height: 100vh;
            margin: 0;
            border-radius: 0;
            z-index: 9999;
            overflow: auto;
            background: rgba(15, 23, 42, 0.98);
        }

        .crop-box.open .crop-container {
            flex: 1;
            max-height: none;
        }

        .review-grid {
            display: grid;
            grid-template-columns: 1fr 1fr;
            gap: 16px;
            margin-bottom: 20px;
        }

        .review-grid input {
            width: 100%;
            padding: 12px 14px;
            border: 2px solid #e2e8f0;
            border-radius: 10px;
            font-size: 14px;
            transition: all 0.3s;
            background: #f8fafc;
            font-family: 'DM Sans', sans-serif;
        }

        .review-grid input:focus {
            border-color: #10b981;
            background: #fff;
            outline: none;
            box-shadow: 0 0 0 4px rgba(16, 185, 129, 0.1);
        }

        .review-grid label {
            font-size: 12px;
            font-weight: 600;
            color: #64748b;
            display: block;
            margin-bottom: 6px;
            text-transform: uppercase;
            letter-spacing: 0.5px;
        }

        .land-edit-table {
            width: 100%;
            border-collapse: separate;
            border-spacing: 0;
            margin-top: 20px;
            border-radius: 14px;
            overflow: hidden;
            border: 2px solid #e2e8f0;
        }

        .land-edit-table th,
        .land-edit-table td {
            padding: 12px;
            text-align: center;
            font-size: 13px;
        }

        .land-edit-table th {
            background: linear-gradient(135deg, #1e293b, #334155);
            color: #fff;
            font-weight: 600;
            text-transform: uppercase;
            font-size: 11px;
            letter-spacing: 0.5px;
        }

        .land-edit-table td {
            border-bottom: 1px solid #e2e8f0;
            background: #fff;
        }

        .land-edit-table input {
            width: 100%;
            border: 2px solid transparent;
            outline: none;
            text-align: center;
            padding: 8px;
            border-radius: 8px;
            transition: all 0.3s;
            font-family: 'DM Sans', sans-serif;
        }

        .land-edit-table input:focus {
            border-color: #10b981;
            background: #f0fdf4;
        }

        button {
            padding: 12px 24px;
            border: none;
            color: #fff;
            border-radius: 14px;
            cursor: pointer;
            font-size: 13px;
            font-weight: 600;
            margin-top: 10px;
            transition: all 0.3s ease;
            box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
            font-family: 'DM Sans', sans-serif;
            letter-spacing: 0.3px;
        }

        button:hover {
            transform: translateY(-2px);
            box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
        }

        .btn-extract {
            background: linear-gradient(135deg, #10b981, #059669);
            padding: 14px 32px;
            font-size: 15px;
        }

        .btn-extract:hover {
            background: linear-gradient(135deg, #059669, #047857);
        }

        .btn-add-row {
            background: linear-gradient(135deg, #3b82f6, #0d9488);
        }

        .btn-add-row:hover {
            background: linear-gradient(135deg, #0d9488, #0f766e);
        }

        .btn-crop-tool {
            background: linear-gradient(135deg, #f59e0b, #d97706);
        }

        .btn-crop-tool:hover {
            background: linear-gradient(135deg, #d97706, #b45309);
        }

        .btn-generate {
            background: linear-gradient(135deg, #0d9488, #0f766e);
        }

        .btn-generate:hover {
            background: linear-gradient(135deg, #0f766e, #115e59);
        }

        .btn-print {
            background: linear-gradient(135deg, #1e293b, #0f172a);
        }

        .btn-print:hover {
            background: linear-gradient(135deg, #334155, #1e293b);
        }

        .btn-download {
            background: linear-gradient(135deg, #06b6d4, #0891b2);
        }

        .btn-download:hover {
            background: linear-gradient(135deg, #0891b2, #0e7490);
        }

        .design-selector {
            margin: 15px 0 0 0;
        }

        .design-options {
            display: flex;
            flex-direction: column;
            gap: 8px;
        }

        .design-option {
            cursor: pointer;
            padding: 12px 14px;
            border: 2px solid #e2e8f0;
            border-radius: 14px;
            text-align: left;
            transition: all 0.3s;
            display: flex;
            align-items: center;
            gap: 12px;
            background: #fff;
        }

        .design-option:hover {
            border-color: #10b981;
            background: #f0fdf4;
            transform: translateX(4px);
        }

        .design-option.active {
            border-color: #10b981;
            background: linear-gradient(135deg, #ecfdf5, #d1fae5);
            box-shadow: 0 4px 15px rgba(16, 185, 129, 0.2);
        }

        .design-preview {
            flex-shrink: 0;
        }

        .preview-cell {
            width: 50px;
            height: 32px;
            border-radius: 6px;
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 8px;
            font-weight: 600;
            color: #fff;
            text-align: center;
            line-height: 1.2;
        }

        .style0-preview {
            background: linear-gradient(135deg, #10b981, #059669);
        }

        .style1-preview {
            background: linear-gradient(135deg, #059669, #047857);
        }

        .style2-preview {
            background: linear-gradient(135deg, #0ea5e9, #0284c7);
        }

        .design-option span {
            font-size: 12px;
            font-weight: 600;
            color: #475569;
        }

        .btn-delete {
            background: linear-gradient(135deg, #ef4444, #dc2626);
            padding: 6px 12px;
            font-size: 11px;
            margin-top: 0;
            border-radius: 8px;
        }

        .btn-delete:hover {
            background: linear-gradient(135deg, #dc2626, #b91c1c);
        }

        .btn-download-4x6 {
            background: linear-gradient(135deg, #f59e0b, #d97706);
            padding: 12px 24px;
            font-size: 13px;
        }

        .btn-download-4x6:hover {
            background: linear-gradient(135deg, #d97706, #b45309);
        }

        button.secondary-btn {
            background: linear-gradient(135deg, #64748b, #475569);
            margin-left: 5px;
        }

        button.secondary-btn:hover {
            background: linear-gradient(135deg, #475569, #334155);
        }

        input[type="file"] {
            background: #fff;
            padding: 14px 20px;
            border-radius: 14px;
            border: 2px dashed #10b981;
            cursor: pointer;
            font-size: 14px;
            transition: all 0.3s;
            font-family: 'DM Sans', sans-serif;
        }

        input[type="file"]:hover {
            border-color: #059669;
            background: #f0fdf4;
        }

        .crop-container {
            position: relative;
            overflow: auto;
            max-height: 500px;
            border: 2px solid #e2e8f0;
            margin-top: 15px;
            background: #1e293b;
            text-align: center;
            border-radius: 14px;
        }

        #cropCanvas {
            cursor: crosshair;
            display: block;
            margin: 0 auto;
        }

        .cards {
            display: flex;
            gap: 24px;
            flex-wrap: wrap;
            justify-content: center;
            padding: 24px;
            background: rgba(255, 255, 255, 0.95);
            backdrop-filter: blur(20px);
            border-radius: 22px;
            box-shadow: 0 25px 50px rgba(0, 0, 0, 0.15);
        }

        .panel {
            width: 85.6mm;
            height: 54mm;
            border-radius: 4mm;
            overflow: hidden;
            position: relative;
            box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
            color: #000;
            background-size: 100% 100%;
            background-repeat: no-repeat;
            background-position: center;
            transition: transform 0.3s, box-shadow 0.3s;
        }

        .panel:hover {
            transform: translateY(-5px) scale(1.02);
            box-shadow: 0 30px 60px rgba(0, 0, 0, 0.3);
        }

        /* Card background images ab JS template registry (SC_TEMPLATES) se lagti hain */
        .panel-front, .panel-back { background-color: #ffffff; }

        .front-body {
            position: absolute;
            top: 11mm;
            left: 4mm;
            right: 4mm;
            display: flex;
            gap: 10px;
        }

        .panel-head {
            display: none;
            position: absolute;
            top: 1.8mm;
            left: 7mm;
            width: calc(100% - 7mm);
            text-align: center;
            font-size: 14px;
            font-weight: 900;
            line-height: 1.1;
            color: #0b7d35;
            letter-spacing: 0.6px;
            text-shadow: 0 1px 2px rgba(255, 255, 255, 0.8);
        }

        .cards.has-head .panel-head {
            display: block;
        }

        .photo {
            width: 20mm;
            height: 25mm;
            border: 1.5px solid #0b7d35;
            border-radius: 4px;
            object-fit: cover;
            background: #fff;
        }

        .details {
            flex: 1;
            font-size: 8.5px;
            line-height: 1.4;
            font-weight: 600;
        }

        .detail-row {
            margin-bottom: 1px;
            white-space: nowrap;
            overflow: hidden;
            text-overflow: ellipsis;
        }

        .label {
            color: #0b7d35;
            font-weight: bold;
            display: inline-block;
            width: 58px;
        }

        .value-text {
            color: #222;
        }

        .farmer-id-line {
            position: absolute;
            bottom: 13mm;
            left: 10mm;
            width: 56mm;
            font-size: 12.5px;
            font-weight: 800;
            line-height: 1.2;
            white-space: nowrap;
            overflow: hidden;
            text-overflow: ellipsis;
            text-shadow: 0 0 3px #fff, 0 0 3px #fff, 0 0 5px #fff;
        }

        .farmer-id-line .label {
            width: auto;
            display: inline;
            font-weight: 800;
        }

        .farmer-id-line .value-text {
            font-weight: 800;
            color: #111;
        }

        .address {
            width: 100%;
            margin: 0 0 1.2mm 0;
            font-size: 7.5px;
            line-height: 1.25;
            font-weight: bold;
            color: #222;
            display: -webkit-box;
            -webkit-line-clamp: 2;
            -webkit-box-orient: vertical;
            overflow: hidden;
        }

        .qr-front {
            position: absolute;
            right: 4mm;
            bottom: 12mm;
            background: #fff;
            padding: 2px;
            border-radius: 4px;
            border: 1px solid #ccc;
            display: flex;
            align-items: center;
            justify-content: center;
        }

        .land-wrapper {
            padding: 9mm 5mm 4mm 5mm;
            height: 100%;
            display: flex;
            flex-direction: column;
            justify-content: flex-start;
        }

        .land-table-container {
            max-height: 30mm;
            overflow: hidden;
            border-radius: 0;
            border: none;
            background: transparent;
        }

        .land-table {
            width: 100%;
            border-collapse: collapse;
            font-size: 7px;
        }

        .land-table th,
        .land-table td {
            border: 0.3px solid #000;
            padding: 1px 2px;
            line-height: 1;
            text-align: center;
        }

        .land-table th {
            font-weight: bold;
            background: transparent;
            color: #000;
        }

        .land-table tr:not(:last-child) td {
            border-bottom: 1px solid #eee;
        }

        .note {
            position: absolute;
            bottom: 5mm;
            left: 0;
            width: 100%;
            font-size: 8px;
            text-align: center;
            color: red;
            font-weight: bold;
        }

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

            html,
            body {
                background: #fff;
                margin: 0;
                padding: 0;
            }

            body * {
                visibility: hidden;
            }

            .cards,
            .cards * {
                visibility: visible;
            }

            .cards {
                position: absolute;
                left: 10mm;
                top: 10mm;
                width: 190mm;
                display: flex;
                gap: 10mm;
                justify-content: flex-start;
                background: none;
                margin: 0;
                box-shadow: none;
                padding: 0;
            }

            .upload-box,
            .review-box,
            .crop-box,
            .sidebar-box {
                display: none !important;
            }

            .panel {
                box-shadow: none;
                margin: 0;
                page-break-inside: avoid;
                -webkit-print-color-adjust: exact;
                print-color-adjust: exact;
                width: 86mm;
                height: 54mm;
            }

            .panel:hover {
                transform: none;
            }
        }
    


        /* ==========================================================
           SMARTCROPER.COM THEME  -  yahin se poori tool ka colour badlein
           (sirf in variables ki value change karni hai)
           ========================================================== */
        :root {
            --sc-bg-1: #0f172a;          /* page background (dark) */
            --sc-bg-2: #1e293b;          /* page background (mid)  */
            --sc-primary: #10b981;       /* main brand colour      */
            --sc-primary-dark: #059669;
            --sc-primary-darker: #047857;
            --sc-primary-soft: #ecfdf5;  /* light tint             */
            --sc-primary-soft-2: #d1fae5;
            --sc-primary-ring: rgba(16, 185, 129, 0.15);
            --sc-secondary: #0d9488;     /* teal buttons           */
            --sc-secondary-dark: #0f766e;
            --sc-secondary-darker: #115e59;
            --sc-accent: #f59e0b;        /* crop / 4x6 buttons     */
            --sc-accent-dark: #d97706;
            --sc-accent-darker: #b45309;
            --sc-info: #06b6d4;          /* download button        */
            --sc-info-dark: #0891b2;
            --sc-text: #1e293b;
            --sc-muted: #64748b;
            --sc-border: #e2e8f0;
        }

        html { -webkit-text-size-adjust: 100%; }
        body { background: linear-gradient(135deg, var(--sc-bg-1) 0%, var(--sc-bg-2) 50%, var(--sc-bg-1) 100%); background-attachment: fixed; }
        img, canvas { max-width: 100%; }

        .sidebar-title { color: var(--sc-text); border-bottom-color: var(--sc-border); }
        .sidebar-title::before { background: linear-gradient(135deg, var(--sc-primary), var(--sc-primary-dark)); }
        .upload-box { background: linear-gradient(135deg, rgba(255,255,255,.98), color-mix(in srgb, var(--sc-primary-soft) 95%, transparent)); }
        .upload-box h1 { background: linear-gradient(135deg, var(--sc-primary-dark), var(--sc-primary)); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
        .review-grid input:focus { border-color: var(--sc-primary); box-shadow: 0 0 0 4px var(--sc-primary-ring); }
        .land-edit-table input:focus { border-color: var(--sc-primary); background: var(--sc-primary-soft); }
        input[type="file"] { border-color: var(--sc-primary); max-width: 100%; }
        input[type="file"]:hover { border-color: var(--sc-primary-dark); background: var(--sc-primary-soft); }
        .design-option:hover { border-color: var(--sc-primary); background: var(--sc-primary-soft); }
        .design-option.active { border-color: var(--sc-primary); background: linear-gradient(135deg, var(--sc-primary-soft), var(--sc-primary-soft-2)); box-shadow: 0 4px 15px var(--sc-primary-ring); }
        .style0-preview { background: linear-gradient(135deg, var(--sc-primary), var(--sc-primary-dark)); }
        .style1-preview { background: linear-gradient(135deg, var(--sc-primary-dark), var(--sc-primary-darker)); }
        .btn-extract { background: linear-gradient(135deg, var(--sc-primary), var(--sc-primary-dark)); }
        .btn-extract:hover { background: linear-gradient(135deg, var(--sc-primary-dark), var(--sc-primary-darker)); }
        .btn-add-row { background: linear-gradient(135deg, var(--sc-secondary), var(--sc-secondary-dark)); }
        .btn-add-row:hover { background: linear-gradient(135deg, var(--sc-secondary-dark), var(--sc-secondary-darker)); }
        .btn-generate { background: linear-gradient(135deg, var(--sc-secondary), var(--sc-secondary-dark)); }
        .btn-generate:hover { background: linear-gradient(135deg, var(--sc-secondary-dark), var(--sc-secondary-darker)); }
        .btn-crop-tool, .btn-download-4x6 { background: linear-gradient(135deg, var(--sc-accent), var(--sc-accent-dark)); }
        .btn-crop-tool:hover, .btn-download-4x6:hover { background: linear-gradient(135deg, var(--sc-accent-dark), var(--sc-accent-darker)); }
        .btn-download { background: linear-gradient(135deg, var(--sc-info), var(--sc-info-dark)); }
        .btn-print { background: linear-gradient(135deg, var(--sc-bg-2), var(--sc-bg-1)); }
        .crop-box.open { background: color-mix(in srgb, var(--sc-bg-1) 98%, transparent); }
        .review-box h3 { color: var(--sc-secondary) !important; }
        .crop-box h3 { color: var(--sc-accent-dark) !important; }
        .crop-box > p { color: #cbd5e1 !important; }

        /* ---------- Behaviour helpers (all devices) ---------- */
        .panel, .cards img { -webkit-user-select: none; user-select: none; -webkit-user-drag: none; }
        button, .design-option, input[type="file"] { -webkit-tap-highlight-color: transparent; touch-action: manipulation; }
        button:focus-visible, .design-option:focus-visible, input:focus-visible { outline: 3px solid var(--sc-primary); outline-offset: 2px; }
        #cropCanvas { max-width: 100%; height: auto; touch-action: none; -webkit-user-select: none; user-select: none; }
        .crop-container { -webkit-overflow-scrolling: touch; }
        .land-edit-wrap { width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; }
        @media (hover: none) {
            button:hover, .panel:hover, .design-option:hover { transform: none; }
        }
        @media (prefers-reduced-motion: reduce) {
            * { transition: none !important; animation: none !important; }
        }

        /* ---------- Large screens ---------- */
        @media screen and (min-width: 1600px) {
            .container { max-width: 1560px; }
        }

        /* ---------- Tablet & small laptop ---------- */
        @media screen and (max-width: 1024px) {
            body { padding: 14px; }
            .container { flex-direction: column; gap: 16px; }
            .sidebar { width: 100%; }
            .sidebar-box { position: static; padding: 16px; }
            .design-options { flex-direction: row; flex-wrap: wrap; }
            .design-option { flex: 1 1 160px; }
            .design-option:hover { transform: none; }
            .upload-box, .review-box, .crop-box { padding: 24px; }
        }

        /* ---------- Phones ---------- */
        @media screen and (max-width: 640px) {
            body { padding: 8px; }
            .container, .main-content { gap: 12px; }
            .upload-box, .review-box, .crop-box { padding: 16px; border-radius: 16px; }
            .upload-box h1 { font-size: 19px; line-height:1.3; margin-bottom: 14px; }
            .sidebar-box { padding: 14px; border-radius: 14px; }
            .design-option { flex: 1 1 100%; }
            input[type="file"] { width: 100%; padding: 12px; font-size: 14px; }
            .pdf-note { display: block; padding: 10px 12px; font-size: 12px; }
            .review-grid { grid-template-columns: 1fr; gap: 12px; }
            .review-grid input, .land-edit-table input { font-size: 16px; } /* iOS zoom na ho */
            .land-edit-table { display: block; overflow-x: auto; white-space: nowrap; -webkit-overflow-scrolling: touch; }
            .land-edit-table input { min-width: 84px; }
            button { min-height: 44px; padding: 12px 16px; }
            .btn-extract, .btn-add-row, .btn-crop-tool, .btn-generate, .btn-print, .btn-download-4x6, .btn-download, button.secondary-btn {
                width: 100%; margin-left: 0; margin-top: 8px;
            }
            .btn-delete { width: auto; min-height: 36px; }
            .upload-box button[title] { width: auto; min-height: 36px; }
            .review-box br { display: none; }
            .cards { padding: 10px; gap: 16px; border-radius: 16px; }
            .crop-box.open { padding: 12px; }
            .crop-box.open .crop-container { margin-top: 8px; }
        }

        /* ---------- Very small phones (card 85.6mm fit) ---------- */
        @media screen and (max-width: 380px) {
            .cards { overflow-x: auto; justify-content: flex-start; }
            .panel { flex-shrink: 0; }
        }

        /* ---------- Landscape phones: crop tool ko poori height mile ---------- */
        @media screen and (max-height: 480px) and (orientation: landscape) {
            .crop-box.open { padding: 8px 16px; }
            .crop-container { max-height: none; }
        }

        /* ---------- SEO content section ---------- */
        .sc-seo { max-width: 1400px; margin: 24px auto 0; padding: 0; color: var(--sc-text); font-family: 'DM Sans', 'Segoe UI', sans-serif; }
        .sc-seo .sc-card { background: rgba(255,255,255,.96); border-radius: 22px; padding: 30px; box-shadow: 0 25px 50px rgba(0,0,0,.15); line-height: 1.7; font-size: 15px; }
        .sc-seo h2 { font-size: 22px; font-weight: 800; color: var(--sc-primary-dark); margin: 26px 0 10px; line-height: 1.3; }
        .sc-seo h2:first-of-type { margin-top: 0; }
        .sc-seo h3 { font-size: 16px; font-weight: 700; margin: 16px 0 6px; }
        .sc-seo p { margin: 0 0 12px; color: #334155; }
        .sc-seo ul, .sc-seo ol { margin: 0 0 12px 22px; color: #334155; }
        .sc-seo li { margin-bottom: 6px; }
        .sc-seo a { color: var(--sc-primary-dark); font-weight: 600; }
        .sc-seo .sc-crumbs { font-size: 13px; color: #cbd5e1; margin: 0 0 12px 4px; }
        .sc-seo .sc-crumbs a { color: #a7f3d0; text-decoration: none; }
        .sc-seo .sc-hi { color: var(--sc-muted); }
        .sc-seo details { border: 2px solid var(--sc-border); border-radius: 14px; padding: 12px 16px; margin-bottom: 10px; background: #fff; }
        .sc-seo details[open] { border-color: var(--sc-primary); background: var(--sc-primary-soft); }
        .sc-seo summary { cursor: pointer; font-weight: 700; color: var(--sc-text); }
        .sc-seo details p { margin: 10px 0 0; }
        .sc-seo .sc-note { background: #fffbeb; border: 1px solid #fde68a; border-radius: 14px; padding: 12px 16px; font-size: 13px; color: #92400e; }
        @media screen and (max-width: 640px) {
            .sc-seo { margin-top: 14px; }
            .sc-seo .sc-card { padding: 18px; border-radius: 16px; font-size: 14px; }
            .sc-seo h2 { font-size: 19px; }
        }
        @media print { .sc-seo { display: none !important; } }
    
/* Manual land record crop - scoped, does not change the website sidebar */
.land-crop-modal[hidden],#landCropOverlay[hidden]{display:none!important}
.land-crop-modal{position:fixed;inset:0;background:rgba(15,23,42,.96);z-index:10050;padding:20px;overflow:auto;color:#1e293b}
.land-crop-content{max-width:1100px;margin:auto;background:#fff;border-radius:18px;padding:20px}
.land-crop-header{display:flex;align-items:center;justify-content:space-between;gap:12px}
.land-crop-header h2{color:#059669;font-size:21px}
.land-crop-content p{margin:10px 0;line-height:1.5}
.land-crop-controls{display:flex;align-items:center;gap:12px;flex-wrap:wrap}
.land-crop-controls select{border:1px solid #94a3b8;border-radius:8px;padding:9px}
.land-crop-canvas-wrap{max-height:70vh;overflow:auto;background:#e2e8f0;border:1px solid #94a3b8;border-radius:12px;margin-top:15px}
#landCropCanvas{display:block;max-width:100%;height:auto;margin:auto;cursor:crosshair;touch-action:none}
#landCropOverlay{position:absolute;left:5mm;right:5mm;top:9mm;width:calc(100% - 10mm);height:32mm;object-fit:fill;background:#fff;z-index:3}
@media(max-width:640px){.land-crop-modal{padding:6px}.land-crop-content{padding:12px}.land-crop-header h2{font-size:16px}}


/* Carefully scoped layout corrections; do not repaint original templates. */
.portal-layout .app-main{min-width:0;width:100%;padding:18px}
.single-post-body .panel .label,.single-post-body .panel .value-text,.single-post-body .panel .farmer-id-line{font-family:'Comic Sans MS','Comic Neue',cursive}
.single-post-body .panel-front .farmer-id-line{bottom:12.3mm;left:10mm;width:55mm;font-size:11px;line-height:1.15;z-index:3}
.single-post-body .panel-front .panel-head{font-family:'Comic Sans MS','Comic Neue',cursive}
#landCropOverlay:not([hidden]){position:absolute;left:5mm;top:12mm;width:calc(100% - 10mm);height:30mm;object-fit:contain;object-position:center center;background:#fff;z-index:4}
.panel-back.has-land-crop .land-table-container{visibility:hidden}
@media(max-width:900px){.portal-layout .app-main{padding:10px}}

/* Surgical quality fix: render the footer disclaimer as vector text over a crisp
   solid green bar instead of enlarging the low-resolution embedded artwork. */
.single-post-body .panel-front::after,
.single-post-body .panel-back::after {
  content:"This card is only for personal use, not a Govt. issued card.";
  position:absolute!important;
  left:0!important;right:0!important;bottom:0!important;
  height:6.2mm!important;
  display:flex!important;align-items:center!important;
  padding-left:3.5mm!important;
  background:#006b4e!important;
  color:#ffffff!important;
  font-family:Arial,sans-serif!important;
  font-size:7px!important;
  font-weight:600!important;
  font-style:italic!important;
  letter-spacing:.08px!important;
  line-height:1.15!important;
  white-space:nowrap!important;
  z-index:20!important;
  pointer-events:none!important;
  border-radius:0 0 3mm 3mm;
}

/* Fix only crop placement and card label; preserve existing S0/S1/S2 artwork. */
.single-post-body #cardBackElement .land-table-container {
  position:relative!important;
  min-height:25mm;
  max-height:30mm;
  overflow:hidden!important;
}
.single-post-body #cardBackElement #landCropOverlay:not([hidden]) {
  position:absolute!important;
  top:0!important;
  left:0!important;
  right:auto!important;
  width:100%!important;
  height:100%!important;
  max-height:30mm!important;
  object-fit:contain!important;
  object-position:center top!important;
  background:#fff!important;
  z-index:5!important;
}
.single-post-body #cardFrontElement::before {
  content:"FARMER ID CARD";
  position:absolute!important;
  right:3.5mm!important;
  bottom:7.0mm!important;
  font-family:'Comic Sans MS','Comic Neue',cursive!important;
  font-size:8px!important;
  font-weight:700!important;
  line-height:1!important;
  color:#f5c948!important;
  text-shadow:0 1px 1px #13543d!important;
  z-index:9!important;
  pointer-events:none!important;
}

/* Targeted requested updates — no change to processing, card layout or other tools. */
body{background-color:#EDF7F6!important;background-image:radial-gradient(#9ca3af 1.5px,transparent 1.5px)!important;background-size:24px 24px!important}
.portal-layout .app-main{background:transparent!important}
.single-post-body .panel .agristack-brand-badge{position:absolute!important;top:1.5mm!important;left:2.5mm!important;width:26mm!important;height:7.5mm!important;background:#07533e!important;border-radius:2mm!important;z-index:16!important;display:flex!important;align-items:center!important;justify-content:center!important;box-sizing:border-box!important;padding:0.8mm 1.3mm!important}
.single-post-body .panel .agristack-brand-badge img{display:block!important;width:100%!important;height:100%!important;object-fit:contain!important}
.single-post-body #cardFrontElement::before{bottom:6.5mm!important;right:4mm!important;color:#f5c948!important;font-family:'Comic Sans MS','Comic Neue',cursive!important;font-size:8px!important;z-index:21!important;line-height:1!important;text-shadow:0 1px 1px #13543d!important}
/* Long guardian labels must not overlap the corresponding value. */
.single-post-body .detail-row:has(#father) .label{font-size:8px!important;letter-spacing:-.25px!important;white-space:normal!important;line-height:1.05!important}

/* Requested label placement only: larger bold yellow title on bottom green strip. */
.single-post-body #cardFrontElement::before {
  content:"FARMER ID CARD"!important;
  position:absolute!important;
  right:3mm!important;
  bottom:1.2mm!important;
  font-family:'Comic Sans MS','Comic Neue',cursive!important;
  font-weight:900!important;
  font-size:10.5px!important;
  line-height:1.1!important;
  color:#ffd23f!important;
  text-shadow:0 1px 1px #063d2d!important;
  z-index:25!important;
  pointer-events:none!important;
}


/* Editable land input boxes: off-white fill and a visible charcoal border. */
.single-post-body .land-edit-table tbody td{background:#f8f7f2!important}
.single-post-body .land-edit-table tbody input{
 background:#fffdf5!important;border:1.5px solid #565d62!important;
 color:#17212b!important;border-radius:7px!important;
 min-width:62px;min-height:34px;box-shadow:inset 0 1px 2px rgba(0,0,0,.05);
}
.single-post-body .land-edit-table tbody input:focus{
 background:#fff!important;border-color:#047857!important;
 box-shadow:0 0 0 2px rgba(4,120,87,.14)!important;
}

/* PDF land crop: show inside the table area, not above the address.
   Existing rules hide the entire parent when has-land-crop is set; override that. */
.single-post-body #cardBackElement.has-land-crop .land-table-container{
 visibility:visible!important;position:relative!important;overflow:hidden!important;
 min-height:25mm;max-height:30mm;
}
.single-post-body #cardBackElement.has-land-crop .land-table-container .land-table{
 visibility:hidden!important;
}
.single-post-body #cardBackElement .land-table-container #landCropOverlay:not([hidden]){
 display:block!important;visibility:visible!important;
 position:absolute!important;inset:0!important;left:0!important;top:0!important;
 width:100%!important;height:100%!important;max-height:none!important;
 padding:1mm!important;box-sizing:border-box!important;
 object-fit:contain!important;object-position:center center!important;
 background:#fffdf6!important;
 border:0.45mm solid rgba(24,30,30,.72)!important;
 border-radius:0.8mm!important;z-index:7!important;
}

/* Mobile form-control readability only; preserve existing tool typography. */
@media (max-width: 767px) {
  #pdfFile { font-size: 16px; max-width: 100%; }
}

/* Farmer tool responsive width protection inside UniiTools portal */
.portal-layout .app-main, .portal-layout .single-post-body, .portal-layout .container, .portal-layout .main-content {min-width:0;max-width:100%;}
.portal-layout .container{width:100%;}
.portal-layout .farmer-design-sidebar{flex:0 0 230px;max-width:230px;}
@media(max-width:1050px){.portal-layout .container{flex-direction:column}.portal-layout .farmer-design-sidebar{flex:initial;max-width:100%;width:100%}}
@media(max-width:640px){.portal-layout .upload-box,.portal-layout .review-box{max-width:100%;overflow-wrap:anywhere}}

/* Farmer tool layout isolation from global portal .container/.main-content rules. */
@media screen {
  .portal-layout .single-post-body > .container {
    display:flex !important;
    flex-direction:row !important;
    align-items:flex-start !important;
    gap:20px !important;
    width:100% !important;
    max-width:100% !important;
    margin:0 auto !important;
    padding:0 !important;
    background:transparent !important;
  }
  .portal-layout .single-post-body > .container > .farmer-design-sidebar {
    flex:0 0 230px !important;
    width:230px !important;
    min-width:0 !important;
    max-width:230px !important;
  }
  .portal-layout .single-post-body > .container > .main-content {
    display:flex !important;
    flex:1 1 0% !important;
    flex-direction:column !important;
    width:auto !important;
    min-width:0 !important;
    max-width:none !important;
    margin:0 !important;
    padding:0 !important;
    background:transparent !important;
    float:none !important;
    position:relative !important;
  }
  .portal-layout .single-post-body > .container > .main-content > .upload-box,
  .portal-layout .single-post-body > .container > .main-content > .review-box,
  .portal-layout .single-post-body > .container > .main-content > .cards {
    width:100% !important;
    max-width:100% !important;
    min-width:0 !important;
    margin-left:0 !important;
    margin-right:0 !important;
  }
}
@media screen and (max-width:1050px) {
  .portal-layout .single-post-body > .container {flex-direction:column !important;}
  .portal-layout .single-post-body > .container > .farmer-design-sidebar,
  .portal-layout .single-post-body > .container > .main-content {
    flex:1 1 auto !important;width:100% !important;max-width:100% !important;
  }
}

/* FIX: Full-width rows must not compress the upload/review column.
   The print actions, print dialog and SEO section are direct siblings of the main tool. */
@media screen {
  .portal-layout .single-post-body > .container {
    display:grid !important;
    grid-template-columns:230px minmax(0,1fr) !important;
    align-items:start !important;
    gap:20px !important;
    width:100% !important;
    max-width:100% !important;
  }
  .portal-layout .single-post-body > .container > .farmer-design-sidebar {
    grid-column:1 !important;grid-row:1 !important;
    width:230px !important;max-width:100% !important;
  }
  .portal-layout .single-post-body > .container > .main-content {
    grid-column:2 !important;grid-row:1 !important;
    width:100% !important;min-width:0 !important;max-width:100% !important;
  }
  .portal-layout .single-post-body > .container > #farmer-card-output-actions,
  .portal-layout .single-post-body > .container > #farmer-print-options,
  .portal-layout .single-post-body > .container > .sc-seo {
    grid-column:1 / -1 !important;min-width:0 !important;max-width:100% !important;
  }
  .portal-layout .single-post-body > .container > #farmer-print-options[hidden] {display:none !important;}
}
@media screen and (max-width:900px) {
  .portal-layout .single-post-body > .container {grid-template-columns:minmax(0,1fr) !important;}
  .portal-layout .single-post-body > .container > .farmer-design-sidebar,
  .portal-layout .single-post-body > .container > .main-content,
  .portal-layout .single-post-body > .container > #farmer-card-output-actions,
  .portal-layout .single-post-body > .container > #farmer-print-options,
  .portal-layout .single-post-body > .container > .sc-seo {
    grid-column:1 !important;grid-row:auto !important;width:100% !important;max-width:100% !important;
  }
}

/* Layout correction: full-width tool; selector immediately above card preview. */
@media screen {
  .portal-layout .single-post-body > .container {
    display:block !important; width:100% !important; max-width:100% !important;
    min-width:0 !important; margin:0 auto !important; padding:0 !important;
  }
  .portal-layout .single-post-body > .container > .main-content {
    display:flex !important; flex-direction:column !important;
    width:100% !important; max-width:100% !important; min-width:0 !important;
    margin:0 !important; padding:0 !important; float:none !important;
  }
  .portal-layout .single-post-body > .container > .main-content > .farmer-design-sidebar {
    display:block !important; width:100% !important; max-width:100% !important;
    min-width:0 !important; flex:none !important; margin:0 !important;
    position:static !important;
  }
  .portal-layout .single-post-body > .container > .main-content > .farmer-design-sidebar .sidebar-box {
    position:static !important; width:100% !important; box-sizing:border-box !important;
  }
  .portal-layout .single-post-body > .container > .main-content > .farmer-design-sidebar .design-options {
    display:flex !important; flex-direction:row !important; flex-wrap:wrap !important; gap:12px !important;
  }
  .portal-layout .single-post-body > .container > .main-content > .farmer-design-sidebar .design-option {
    flex:1 1 180px !important; max-width:350px !important; min-width:0 !important;
  }
  .portal-layout .single-post-body > .container > #farmer-card-output-actions,
  .portal-layout .single-post-body > .container > #farmer-print-options,
  .portal-layout .single-post-body > .container > .sc-seo {
    width:100% !important; max-width:100% !important; min-width:0 !important;
  }
  .portal-layout .single-post-body > .container > #farmer-print-options[hidden] {display:none !important;}
}
@media screen and (max-width:640px) {
  .portal-layout .single-post-body > .container > .main-content > .farmer-design-sidebar .design-option {flex:1 1 130px !important;}
}
@media print { .farmer-design-sidebar {display:none !important;} }

/* Mobile-only layout guard: keep editing controls readable without resizing PVC artwork. */
@media screen and (max-width: 767px) {
  .portal-layout, .portal-layout .app-main, .portal-layout .single-post-body,
  .portal-layout .single-post-body > .container,
  .portal-layout .single-post-body > .container > .main-content {
    width: 100% !important; max-width: 100% !important; min-width: 0 !important;
    box-sizing: border-box !important;
  }
  .portal-layout .single-post-body > .container > .main-content > .upload-box,
  .portal-layout .single-post-body > .container > .main-content > .review-box,
  .portal-layout .single-post-body > .container > .main-content > .farmer-design-sidebar,
  .portal-layout .single-post-body > .container > .main-content > .cards {
    width: 100% !important; max-width: 100% !important; min-width: 0 !important;
    box-sizing: border-box !important;
  }
  .portal-layout .single-post-body > .container > .main-content > .upload-box,
  .portal-layout .single-post-body > .container > .main-content > .review-box {
    padding: 16px !important;
  }
  .review-grid > div { min-width: 0; }
  .review-grid input, .review-grid select, .review-grid textarea,
  .upload-box input[type="file"] { max-width: 100%; width: 100%; min-width: 0; box-sizing: border-box; font-size: 16px; }
  .farmer-design-sidebar .sidebar-box { padding: 14px !important; }
  .farmer-design-sidebar .design-option { max-width: none !important; }
  .portal-layout .single-post-body > .container > .main-content > .cards {
    display: flex !important; flex-direction: column !important; align-items: center !important;
    justify-content: flex-start !important; gap: 16px !important; padding: 12px 4px !important;
    overflow-x: auto !important;
  }
  /* PVC cards retain 85.6 x 54 mm dimensions for export and print. */
  .cards > .panel { flex: 0 0 auto !important; transform: none !important; }
  .land-edit-wrap { max-width: 100%; overflow-x: auto; }
  #farmer-card-output-actions, #farmer-print-options { box-sizing: border-box; max-width: 100%; }
}

/* AgriStack total area directly below visible land rows; do not reserve empty table space. */
.single-post-body #cardBackElement:not(.has-land-crop) .land-table-container { min-height:0!important; }
.single-post-body #cardBackElement #agriCardTotalArea { flex:0 0 auto; margin-top:2px!important; }

/* Center the existing front-side FARMER ID CARD title within its right footer segment. */
.single-post-body #cardFrontElement::before {
  right:2mm!important;
  width:29mm!important;
  text-align:center!important;
  box-sizing:border-box!important;
}

/* Farmer ID directly below Aadhaar, in the same details column; keep the existing large lettering. */
/* Move the existing Farmer ID into the marked empty region below the details, left of the QR. */
.single-post-body .panel-front .details .farmer-id-line { position: absolute; top: 29mm; bottom: auto; left: 23mm; width: 43mm; margin-top: 0; font-size: 11px; font-weight: 800; line-height: 1.15; text-align: left; z-index: 3; }


/* Lightweight, compact informational footer; no animations or scripts. */
.sc-seo.agri-info-modern{margin-top:20px;color:#203b36}
.sc-seo.agri-info-modern .sc-card{background:#fff;border:1px solid #e1e9e6;border-radius:14px;padding:20px;box-shadow:none}
.sc-seo.agri-info-modern h2{font-size:17px;color:#08765b;margin:0 0 7px;line-height:1.35}
.sc-seo.agri-info-modern p{font-size:13px;line-height:1.55;margin:0;color:#52625f}
.sc-seo.agri-info-modern .agri-info-intro{padding-bottom:14px;border-bottom:1px solid #edf0ee}
.sc-seo.agri-info-modern .agri-info-privacy{padding:12px 0;border-bottom:1px solid #edf0ee}
.sc-seo.agri-info-modern .agri-info-privacy strong{display:block;font-size:14px;color:#08765b;margin-bottom:3px}
.sc-seo.agri-info-modern .agri-info-faq{padding-top:14px}
.sc-seo.agri-info-modern details{border:1px solid #e4eae7;border-radius:9px;margin-top:7px;background:#fff}
.sc-seo.agri-info-modern summary{cursor:pointer;padding:10px 12px;font-weight:600;font-size:13px;color:#253d37}
.sc-seo.agri-info-modern details p{padding:0 12px 11px}
.sc-seo.agri-info-modern .agri-info-help{margin-top:14px;padding:10px 12px;background:#f3f9f6;border-radius:9px}
.sc-seo.agri-info-modern .agri-info-disclaimer{margin-top:10px;font-size:12px;color:#65716c}
.sc-seo.agri-info-modern a{color:#007b60;text-decoration:underline;text-underline-offset:2px}
@media(max-width:640px){.sc-seo.agri-info-modern .sc-card{padding:14px}.sc-seo.agri-info-modern h2{font-size:16px}}
