.afc-root{--g1:#064e3b;--g2:#0d5c48;--g3:#15803d;--g4:#22c55e;font-family:'Outfit','Plus Jakarta Sans','Noto Sans Devanagari','Noto Sans Bengali',sans-serif;background:#f0fdf4;color:#334155;line-height:1.4;box-sizing:border-box}
.afc-root *{box-sizing:border-box}
.afc-hero{background:linear-gradient(135deg,#064e3b 0%,#0d5c48 40%,#15803d 80%,#22c55e 100%);padding:22px 16px 24px;text-align:center;color:#fff}
.afc-lang{display:flex;justify-content:center;gap:6px;margin-bottom:12px}
.afc-lang button{background:rgba(255,255,255,.15);color:#fff;border:1px solid rgba(255,255,255,.4);padding:5px 16px;border-radius:999px;font-weight:700;font-size:13px;cursor:pointer}
.afc-lang button.on{background:#fff;color:#15803d}
.afc-hero h2{font-size:clamp(22px,3.5vw,32px);font-weight:800;margin:0 0 6px;color:#fff}
.afc-hero p{margin:0;font-size:13.5px;opacity:.92}
.afc-notice{background:#fffbeb;border:1px solid #fde68a;border-left:5px solid #f59e0b;border-radius:10px;padding:12px 16px;color:#92400e;font-size:13px;font-weight:600;margin:16px auto;max-width:1240px}
.afc-main{display:grid;grid-template-columns:minmax(0,1fr) 440px;gap:28px;max-width:1240px;margin:0 auto;padding:0 16px 40px}
@media(max-width:1024px){.afc-main{grid-template-columns:1fr}}
.afc-side{position:sticky;top:20px;align-self:start}
@media(max-width:1024px){.afc-side{position:static}}
.afc-box{background:#fff;border-radius:14px;box-shadow:0 4px 20px rgba(0,0,0,.05);border:1px solid #e2e8f0;overflow:hidden;margin-bottom:20px}
.afc-bh{background:linear-gradient(90deg,#0d5c48,#15803d);padding:12px 18px;color:#fff;display:flex;justify-content:space-between;align-items:center}
.afc-bh h3{margin:0;font-size:15px;font-weight:700;color:#fff}
.afc-bb{padding:18px}
.afc-row{display:grid;grid-template-columns:1fr 1fr;gap:14px;margin-bottom:12px}
.afc-row.t3{grid-template-columns:1fr 1fr 1fr}
@media(max-width:600px){.afc-row,.afc-row.t3{grid-template-columns:1fr}}
.afc-fg{display:flex;flex-direction:column;gap:5px}
.afc-fg label{font-size:12.5px;font-weight:600;color:#374151}
.afc-req{color:#ef4444}
.afc-fg input,.afc-fg select{padding:9px 12px;border:1.5px solid #d1d5db;border-radius:8px;font-size:13.5px;background:#fafafa;width:100%}
.afc-fg input:focus,.afc-fg select:focus{border-color:#15803d;outline:none;background:#fff;box-shadow:0 0 0 3px rgba(21,128,61,.12)}
.afc-photo{border:2px dashed #86efac;border-radius:10px;padding:18px;text-align:center;background:#f0fdf4;cursor:pointer;color:#15803d;font-weight:700;font-size:13px}
.afc-photo img{width:100px;height:120px;object-fit:cover;border-radius:6px;border:2px solid #15803d}
.afc-badge{background:#dcfce7;color:#15803d;padding:4px 10px;border-radius:999px;font-size:11px;font-weight:700;border:1px solid #86efac}
.afc-tip{font-size:12px;color:#166534;background:#f0fdf4;padding:8px 12px;border-radius:6px;margin-bottom:10px;border:1px solid #86efac}
.afc-lt{overflow:auto;max-height:380px}
.afc-lt table{width:100%;border-collapse:collapse;font-size:12px}
.afc-lt th{background:#f0fdf4;color:#166534;padding:6px;border:1px solid #cbd5e1;text-align:left;font-size:11px;position:sticky;top:0}
.afc-lt td{padding:3px;border:1px solid #e2e8f0}
.afc-lt input{width:90px;padding:4px 6px;font-size:12px;border:1px solid #cbd5e1;border-radius:4px}
.afc-lt td:first-child input,.afc-lt td:first-child{width:auto}
.afc-btn{width:100%;padding:13px;background:linear-gradient(135deg,#15803d,#22c55e);color:#fff;border:none;border-radius:10px;font-size:14.5px;font-weight:800;cursor:pointer;display:flex;align-items:center;justify-content:center;gap:8px}
.afc-btn.dark{background:linear-gradient(135deg,#064e3b,#15803d)}
.afc-btn.alt{background:#064e3b}
.afc-add{margin-top:10px;background:#dcfce7;color:#15803d;border:1px dashed #86efac;padding:8px;border-radius:6px;font-weight:700;cursor:pointer;width:100%;font-size:12.5px}
.afc-x{color:#dc2626;background:none;border:none;cursor:pointer;font-size:14px}
.afc-acts{display:flex;gap:10px;flex-wrap:wrap}
.afc-acts>button{flex:1}
.afc-prev{background:#fff;border-radius:16px;box-shadow:0 12px 40px rgba(0,0,0,.12);border:1px solid #cbd5e1;padding:16px}
.afc-ph{display:flex;justify-content:space-between;align-items:center;font-weight:800;color:#0d5c48;font-size:14px;margin-bottom:10px}
.afc-live{font-size:11px;background:#22c55e;color:#fff;padding:2px 8px;border-radius:999px}
.afc-tabs{display:flex;gap:6px;background:#e2e8f0;padding:4px;border-radius:10px;margin-bottom:12px}
.afc-tabs button{flex:1;padding:8px 4px;border:none;background:transparent;border-radius:8px;font-size:12px;font-weight:700;color:#475569;cursor:pointer}
.afc-tabs button.on{background:#fff;color:#15803d;box-shadow:0 2px 6px rgba(0,0,0,.08)}
.afc-cards{overflow-x:auto;padding-bottom:4px}
.afc-cards .afc-card{margin:0 auto 16px}
.afc-mini{display:grid;grid-template-columns:1fr 1fr;gap:8px;margin-top:10px}
.afc-mini button,.afc-dl button{padding:9px 6px;border-radius:8px;font-size:12.5px;font-weight:700;cursor:pointer;border:1.5px solid}
.afc-dl{display:flex;gap:8px;margin-top:10px}.afc-dl button{flex:1;border:none;color:#fff}

/* ---------- ID CARD (380 x 240) ---------- */
.afc-card{width:380px;height:240px;background:#fff;border-radius:10px;overflow:hidden;border:1.5px solid #0d5c48;box-shadow:0 6px 18px rgba(0,0,0,.1);position:relative;display:flex;flex-direction:column;justify-content:space-between;flex-shrink:0;font-family:'Plus Jakarta Sans','Noto Sans Devanagari','Noto Sans Bengali',sans-serif;color:#000;line-height:1.2}
.afc-card *{box-sizing:border-box}
.afc-fh{background:linear-gradient(90deg,#07382c,#0d5c48 35%,#15803d 70%,#16a34a);padding:5px 10px;display:flex;align-items:center;justify-content:space-between;color:#fff;height:36px;flex-shrink:0}
.afc-fl{display:flex;align-items:center;gap:6px}
.afc-logo{height:27px;display:flex;align-items:center}
.afc-logo img{height:27px;width:auto;display:block}
.afc-fl>div:last-child{border-left:1px solid rgba(255,255,255,.35);padding-left:7px}
.afc-ct{font-size:12px;font-weight:800;line-height:1.1}.afc-ct span{color:#facc15}
.afc-cs{font-size:9px;opacity:.9;font-weight:600}
.afc-fb{padding:4px 8px;display:grid;grid-template-columns:78px 1fr 64px;gap:6px;align-items:center;flex:1;overflow:hidden;position:relative}
.afc-fb::before,.afc-bbody::before{content:'';position:absolute;inset:0;background:url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 600 350' opacity='0.1'><g fill='none' stroke='%2315803d' stroke-width='3'><path d='M100 200Q140 130 220 140Q290 150 330 200Q360 170 390 180Q430 190 450 220'/><circle cx='490' cy='140' r='14'/><path d='M490 154L490 230M490 180L440 200M490 180L520 220M480 230L460 295M500 230L520 295'/><path d='M30 300Q150 290 270 305T470 295T570 300'/></g></svg>") center/85% no-repeat;pointer-events:none}
.afc-fb>*,.afc-bbody>*{position:relative;z-index:1}
.afc-pbox{width:78px;height:94px;border:1.5px solid #15803d;background:#f0fdf4;overflow:hidden;position:relative}
.afc-pbox img{width:100%;height:100%;object-fit:cover;display:block}
.afc-pn{position:absolute;bottom:0;left:0;right:0;background:rgba(13,92,72,.9);color:#fff;font-size:7px;font-weight:800;text-align:center;text-transform:uppercase;padding:1px;white-space:nowrap;overflow:hidden}
.afc-d{font-size:8.8px;overflow:hidden}
.afc-d div{font-weight:700;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;margin-bottom:.5px}
.afc-d b{font-weight:800}
.afc-d .lo{font-size:8.6px;color:#1e293b}
.afc-qr{width:64px;height:64px;display:flex;align-items:center;justify-content:center}
.afc-qr img,.afc-qr canvas{width:64px!important;height:64px!important}
.afc-fid{text-align:center;height:22px;line-height:22px;font-size:13.5px;font-weight:900;color:#0f583e;letter-spacing:.5px;background:#fff;flex-shrink:0}
.afc-ff{background:#0d5c48;color:#fff;padding:3px 10px;display:flex;align-items:center;justify-content:space-between;height:24px;flex-shrink:0}
.afc-ff i{font-size:8px;opacity:.95}
.afc-ff em{margin-left:auto;background:linear-gradient(135deg,#15803d,#22c55e);font-style:normal;font-size:10px;font-weight:900;padding:1px 7px 1px 10px;clip-path:polygon(15% 0,100% 0,100% 100%,0 100%)}
.afc-bh2{background:#07382c;color:#fff;padding:4px 10px;display:flex;align-items:center;justify-content:space-between;height:28px;flex-shrink:0}
.afc-bh2 .t{font-size:10px;font-weight:700}.afc-bh2 .i{font-size:11.5px;font-weight:900;color:#4ade80}
.afc-bh2 .p{background:#15803d;font-size:8px;font-weight:800;padding:1px 5px;border-radius:3px}
.afc-bbody{padding:3px 6px;flex:1;display:flex;flex-direction:column;gap:2px;overflow:hidden;position:relative}
.afc-addr{font-size:8px;font-weight:700;color:#1e293b;border-bottom:1px solid #cbd5e1;padding-bottom:1px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.afc-lh{font-size:8.5px;font-weight:800;color:#0d5c48}
.afc-lt2{width:100%;border-collapse:collapse;font-size:7px;text-align:center}
.afc-lt2 th{background:#e2e8f0;color:#0f172a;font-weight:800;padding:1.5px .5px;border:1px solid #475569;font-size:6.2px}
.afc-lt2 td{padding:1px .5px;border:1px solid #64748b;font-weight:800;font-size:7px;height:11px}
.afc-an{margin-top:auto;font-size:4.8px;color:#64748b;line-height:1.05;text-align:justify;display:-webkit-box;-webkit-line-clamp:3;-webkit-box-orient:vertical;overflow:hidden}
.afc-bf{background:#f0fdf4;border-top:1px solid #86efac;padding:3px 8px;display:flex;align-items:center;justify-content:space-between;font-size:7.2px;font-weight:700;color:#166534;height:22px;flex-shrink:0}

/* ---------- MODAL ---------- */
.afc-modal{position:fixed;inset:0;background:rgba(15,23,42,.78);z-index:99999;display:none;align-items:center;justify-content:center;padding:16px;overflow-y:auto}
.afc-modal.on{display:flex}
.afc-md{background:#fff;width:100%;max-width:1120px;max-height:94vh;border-radius:16px;display:flex;flex-direction:column;overflow:hidden}
.afc-mh{background:linear-gradient(135deg,#064e3b,#15803d);color:#fff;padding:14px 20px;display:flex;justify-content:space-between;align-items:center;font-weight:800}
.afc-mh button{background:rgba(255,255,255,.2);border:none;color:#fff;width:34px;height:34px;border-radius:50%;cursor:pointer;font-size:18px}
.afc-mb{display:grid;grid-template-columns:380px 1fr;gap:20px;padding:20px;overflow-y:auto;background:#f8fafc}
@media(max-width:960px){.afc-mb{grid-template-columns:1fr}}
.afc-pane{background:#fff;border:1.5px solid #e2e8f0;border-radius:12px;padding:14px;margin-bottom:14px}
.afc-mode{display:flex;gap:8px;background:#f1f5f9;padding:4px;border-radius:10px;margin-top:8px}
.afc-mode button{flex:1;padding:10px;border:none;background:transparent;border-radius:8px;font-weight:700;font-size:13px;color:#475569;cursor:pointer}
.afc-mode button.on{background:#15803d;color:#fff}
.afc-bi{display:flex;align-items:center;justify-content:space-between;padding:10px 12px;background:#f8fafc;border:1.5px solid #e2e8f0;border-radius:10px;margin-bottom:10px;gap:8px}
.afc-bi.on{border-color:#22c55e;background:#f0fdf4}
.afc-bi label{display:flex;gap:10px;align-items:center;cursor:pointer;flex:1;min-width:0;font-size:13px;font-weight:800;color:#0f172a}
.afc-bi small{display:block;font-size:11px;color:#64748b;font-weight:600}
.afc-bi button{border:1px solid #cbd5e1;background:#fff;border-radius:6px;padding:4px 8px;cursor:pointer}
.afc-paper{background:#1e293b;border-radius:14px;padding:16px;max-height:68vh;overflow-y:auto}
.afc-sheet{background:#fff;margin:0 auto;max-width:560px;min-height:600px;padding:16px 14px;display:flex;flex-direction:column;gap:12px}
.afc-prv{display:flex;gap:8px;justify-content:center;padding:6px 4px;border:1px dashed #cbd5e1;border-radius:8px;background:#fafafa}
.afc-sc{width:240px;height:152px;overflow:hidden;flex-shrink:0}
.afc-sc .afc-card{transform:scale(.63);transform-origin:0 0;box-shadow:none}
.afc-empty{border:2px dashed #cbd5e1;border-radius:8px;padding:24px;text-align:center;color:#94a3b8;font-size:12px;font-weight:700}

/* ---------- PRINT ---------- */
#afc-print-sheet{display:none}
@media print{
 @page{size:A4 portrait;margin:0}
 body.afc-printing>*:not(#afc-print-sheet){display:none!important}
 body.afc-printing #afc-print-sheet{display:block!important}
 body.afc-printing{margin:0!important;padding:0!important;background:#fff!important}
 #afc-print-sheet *{-webkit-print-color-adjust:exact;print-color-adjust:exact}
 .afc-pg{width:210mm;height:297mm;padding:14mm 13.5mm;overflow:hidden;page-break-after:always;break-after:page}
 .afc-pg:last-child{page-break-after:auto;break-after:auto}
 .afc-pr{display:flex;justify-content:center;gap:4mm;margin-bottom:4.5mm}
 .afc-pc{width:89mm;height:56mm;overflow:hidden;border-radius:2mm;flex-shrink:0}
 .afc-pc .afc-card{transform:scale(.88);transform-origin:0 0;box-shadow:none;margin:0}
}

/* ---------- Theme-conflict hardening ---------- */
.afc-main>*{min-width:0}
.afc-root img,.afc-card img{max-width:none!important;border:0!important;box-shadow:none!important;margin:0!important;border-radius:0}
.afc-logo img{height:27px!important;width:auto!important}
.afc-photo img{border:2px solid #15803d!important;border-radius:6px!important;margin:0 auto!important;display:block}
.afc-root button{font-family:inherit;line-height:1.2;text-transform:none;letter-spacing:0;min-height:0;box-shadow:none}
.afc-root input,.afc-root select{margin:0;height:auto;max-width:100%;color:#111;box-shadow:none}
.afc-root table{margin:0;width:100%;table-layout:auto;border-spacing:0}
.afc-lt2{width:100%!important;table-layout:fixed!important}
.afc-lt2 th,.afc-lt2 td{padding:1px .5px!important;line-height:1.1!important;word-break:break-word;background-clip:padding-box}
.afc-lt td{background:#fff}
.afc-root h2,.afc-root h3{font-family:inherit;text-transform:none;letter-spacing:0}
.afc-card div,.afc-card span,.afc-card i,.afc-card em,.afc-card b{margin-top:0;font-family:inherit}
.afc-card{min-width:380px;max-width:none}
.afc-side .afc-btn,.afc-mini button,.afc-dl button{display:flex;align-items:center;justify-content:center}
/* Standalone full-page template */
body.afc-page{margin:0;background:#f0fdf4}
.afc-top{background:#fff;border-bottom:3px solid #15803d;padding:10px 16px;display:flex;justify-content:space-between;align-items:center;flex-wrap:wrap;gap:8px;font-family:'Outfit',sans-serif}
.afc-top a{color:#0d5c48;font-weight:800;font-size:20px;text-decoration:none}
.afc-top small{color:#64748b;font-size:12px;display:block;font-weight:500}
.afc-top nav a{font-size:13px;font-weight:700;margin-left:14px;color:#15803d}
.afc-foot{background:#064e3b;color:#d1fae5;text-align:center;padding:18px 16px;font-size:12.5px;font-family:'Outfit',sans-serif}
.afc-disc{max-width:960px;margin:20px auto;padding:14px 20px;background:#fff3cd;border:1px solid #ffc107;border-radius:10px;color:#856404;text-align:center;font-size:13.5px;font-family:'Outfit',sans-serif}
.afc-err{background:#fee2e2;color:#991b1b;padding:12px 16px;font:600 13px sans-serif;display:none}

.afc-drop{border:2px dashed #86efac;border-radius:10px;padding:18px;text-align:center;background:#f0fdf4;cursor:pointer;color:#15803d;font-weight:700;font-size:13.5px}
.afc-drop:hover{background:#dcfce7;border-color:#15803d}
.afc-pbar{height:8px;background:#e2e8f0;border-radius:99px;overflow:hidden;margin-top:12px}
.afc-pbar i{display:block;height:100%;width:0;background:linear-gradient(90deg,#15803d,#22c55e);transition:width .4s}
.afc-impst{margin-top:8px;font-size:12.5px;font-weight:600;color:#166534;line-height:1.5}

/* shared sheet layout (also used off-screen for PNG export) */
.afc-off{position:fixed;left:-20000px;top:0;background:#fff}
.afc-off .afc-card{box-shadow:none;margin:0}
.afc-hdw{width:380px;height:240px;margin:0 0 20px}
.afc-off .afc-pg{width:210mm;height:297mm;padding:14mm 13.5mm;overflow:hidden;background:#fff;box-sizing:border-box}
.afc-off .afc-pr{display:flex;justify-content:center;gap:4mm;margin-bottom:4.5mm}
.afc-off .afc-pc{width:89mm;height:56mm;overflow:hidden;border-radius:2mm;flex-shrink:0}
.afc-off .afc-pc .afc-card{transform:scale(.88);transform-origin:0 0}
.afc-dl{margin-top:8px}

.afc-ff{justify-content:center!important}
.afc-sl{font-size:10.5px;font-weight:800;letter-spacing:.3px;color:#fef9c3;white-space:nowrap;text-align:center}
.afc-kisan{display:block;flex-shrink:0}

.afc-kbadge{width:31px;height:31px;border-radius:50%;background:#fff;border:1.5px solid rgba(255,255,255,.7);display:flex;align-items:center;justify-content:center;overflow:hidden;flex-shrink:0}
.afc-kbadge img{width:92%!important;height:92%!important;object-fit:contain;display:block}
.afc-fh{height:46px!important}
.afc-kbadge{width:40px;height:40px;border-radius:12px}
.afc-kbadge img{width:100%!important;height:100%!important}
.afc-kbadge{background:transparent!important;border:0!important;border-radius:0!important;width:44px;height:44px;overflow:visible}
.afc-kbadge{width:40px!important;height:40px!important}
.afc-kbadge,.afc-kbadge img{filter:none!important;box-shadow:none!important;text-shadow:none!important;background:transparent!important}
