/* SDSF Phase 4.1 Fix Patch — compact premium light UI */
:root{--f41-ink:#18372e;--f41-line:#dde7df;--f41-soft:#f8fbf8;--f41-green:#17684d;--f41-gold:#d3ae44;--f41-red:#c8322a;--f41-blue:#2258c2}
.dashboard-body .dashboard-content{font-weight:400}
.dashboard-body h1,.dashboard-body h2,.dashboard-body h3{font-weight:600;letter-spacing:-.018em}
.dashboard-body input,.dashboard-body select,.dashboard-body textarea{font-size:13px;font-weight:400;min-height:36px}
.dashboard-body label{font-size:12px;font-weight:500}
.dashboard-body label:not(.f41-check){margin-bottom:0}
.dashboard-body label>input,.dashboard-body label>select,.dashboard-body label>textarea{margin-top:0!important;margin-bottom:0!important}
.f41-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;margin-bottom:14px}
.f41-grid>.dash-panel{margin:0}
.f41-fields{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}
.f41-field{display:flex;flex-direction:column;gap:0!important;margin:0!important;font-size:12px;font-weight:500;color:var(--f41-ink)}
.f41-field>span{display:block;margin:0 0 2px}
.f41-field input,.f41-field select,.f41-field textarea{width:100%;border-radius:10px;padding:9px 10px;border:1px solid #d5dfd9;background:#fff;color:#163e31;font-size:13px;font-weight:400;box-sizing:border-box}
.f41-field small{font-weight:400;color:#65756d;font-size:11px;line-height:1.4;margin-top:3px}
.f41-check{display:flex;align-items:center;gap:7px;font-size:12px;font-weight:400}
.f41-check input{width:15px;height:15px;min-height:auto}
.f41-form{display:flex;flex-direction:column;gap:11px;margin-top:13px}
.f41-form button{align-self:flex-start}
.f41-pay-method{margin:12px 0}
.f41-pay-grid{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:20px;align-items:center}
.f41-detail{display:grid;grid-template-columns:minmax(110px,1fr) minmax(170px,2fr) auto;gap:8px;align-items:center;padding:9px 0;border-bottom:1px solid var(--f41-line);font-size:12px}
.f41-detail span{color:#65766e}.f41-detail strong{font-weight:600;overflow-wrap:anywhere;color:var(--f41-ink);font-size:13px}
.f41-detail button{min-width:45px}
.f41-qr{width:172px;max-width:100%;height:172px;object-fit:contain;border:1px solid var(--f41-line);border-radius:12px;padding:6px;background:#fff}
.f41-price{font-size:31px;font-weight:600;color:var(--f41-green);letter-spacing:-.04em}
.f41-callout{border:1px solid #a9d3bc;border-radius:16px;background:linear-gradient(120deg,#eef9f2,#fffdf5);padding:14px 18px;display:flex;align-items:center;gap:15px;justify-content:space-between;margin-bottom:14px}
.f41-callout h2{margin:4px 0;font-size:19px}.f41-callout p{font-size:12px;color:#547261;margin:0}.f41-callout small{font-size:10px;letter-spacing:.1em;font-weight:600;color:#246b4b}
.f41-summary-card{display:grid;gap:6px}.f41-summary-card p{margin:0}
.f41-counts{display:flex;gap:9px;margin-top:12px;flex-wrap:wrap}
.f41-counts>div{background:#f6f8f6;padding:10px;border-radius:9px;min-width:78px;display:grid;gap:3px}
.f41-counts small{font-size:10px;color:#718077}.f41-counts strong{font-size:23px;font-weight:600}
.f41-inline{display:flex;flex-wrap:wrap;align-items:end;gap:6px}.f41-inline input,.f41-inline select{min-width:120px;max-width:210px;font-size:12px}.f41-inline button{white-space:nowrap}
.f41-brand-preview{max-width:170px;max-height:75px;object-fit:contain;background:white;border:1px solid var(--f41-line);padding:6px;border-radius:8px}
.f41-buttons{display:flex;gap:9px;flex-wrap:wrap;margin-top:12px}
.f41-bankproof{border-top:1px solid #e5eae5;margin-top:20px;padding-top:16px}.f41-bankproof h3{font-size:15px;font-weight:600}.f41-sponsor-line{font-size:12px;color:#667b6c;margin-top:6px}
.notice{background:#fff7dc;border:1px solid #f2e2a8;border-radius:12px;padding:11px 12px}

/* Tree */
.f41-tree-top{display:flex;justify-content:space-between;gap:14px;flex-wrap:wrap;align-items:center}
.f41-tree-sponsor{display:grid;gap:2px;background:#f8faf8;border:1px solid #dce8df;border-radius:14px;padding:12px 14px;min-width:220px}
.f41-tree-sponsor small{font-size:10px;text-transform:uppercase;letter-spacing:.08em;color:#6b7f73}
.f41-tree-sponsor strong{font-size:15px}
.f41-tree-stats{display:flex;gap:10px;flex-wrap:wrap}
.f41-stat-chip{display:grid;gap:2px;background:#fff;border:1px solid #dce8df;border-radius:14px;padding:10px 14px;min-width:95px}
.f41-stat-chip small{font-size:10px;color:#708279;text-transform:uppercase;letter-spacing:.06em}
.f41-stat-chip strong{font-size:21px;color:#1c5845}
.f41-tree-search{width:100%;max-width:360px;margin:8px 0 0;padding:10px;border:1px solid var(--f41-line);border-radius:10px}
.f41-tree-root-wrap{padding:8px 0}
.f41-tree-root-card,.f41-tree-card{position:relative;display:grid;gap:4px;background:linear-gradient(180deg,#fff,#f6faf7);border:1px solid #d6e5db;border-radius:16px;padding:14px 16px;min-width:220px;max-width:280px;box-shadow:0 6px 20px #1f4a380b}
.f41-tree-root-card{background:linear-gradient(180deg,#eef9f2,#fbfdfb);border-color:#b9d9c4}
.f41-tree-badge{display:inline-block;width:max-content;padding:3px 10px;border-radius:999px;background:#1e694d;color:#fff;font-size:10px;font-weight:600;letter-spacing:.08em}
.f41-tree-card strong,.f41-tree-root-card strong{font-size:15px;color:#193d31}
.f41-tree-card small,.f41-tree-root-card small{font-size:12px;color:#60776a}
.f41-status-wrap .status-badge{width:max-content}
.f41-tree-card em{font-style:normal;color:#577966;font-size:11px}
.f41-branch{margin:14px 0 0 26px;position:relative}.f41-branch[hidden]{display:none}
.f41-branch:before{content:'';position:absolute;left:-14px;top:0;bottom:0;width:2px;background:#d3e2d8}
.f41-branch>summary{list-style:none;cursor:pointer;position:relative;padding-left:12px}.f41-branch>summary::-webkit-details-marker{display:none}
.f41-branch>summary:before{content:'+';position:absolute;left:-2px;top:16px;width:16px;height:16px;line-height:16px;text-align:center;border-radius:50%;background:#edf5ef;color:#2d654b;font-weight:700;border:1px solid #d3e2d8}
.f41-branch[open]>summary:before{content:'−'}
.f41-children{margin-left:20px;padding-left:18px;border-left:2px dashed #d3e2d8}

/* Crop dialog */
.f41-crop-dialog{border:1px solid #d5e2da;border-radius:15px;max-width:min(95vw,465px);padding:16px;background:#fff;box-shadow:0 18px 65px #133a2b33}
.f41-crop-dialog::backdrop{background:#12251ba8}.f41-crop-dialog h2{font-size:17px;font-weight:600;margin:0 0 10px}
.f41-crop-dialog canvas{display:block;max-width:100%;max-height:310px;width:auto;height:auto;margin:8px auto;background:#f1f1f1;touch-action:none;border-radius:8px}
.f41-crop-controls{display:flex;justify-content:end;gap:9px;margin:12px 0 0}
.f41-crop-dialog small{font-size:11px;color:#65756d}

/* Printable credentials */
.f41-print-body{margin:0;background:#eff2f0;font-family:system-ui,'Segoe UI',sans-serif;color:#214837}
.f41-print-controls{padding:15px;text-align:center}.f41-print-controls button,.f41-print-controls a{display:inline-block;margin:0 6px;background:#16654a;color:white;border:0;border-radius:8px;padding:9px 14px;cursor:pointer;text-decoration:none;font-size:13px}
.f41-hi-heading{display:block;color:#355f4f;letter-spacing:.08em}
.f41-id-card{width:860px;max-width:calc(100vw - 40px);margin:25px auto;background:#fffdf6;border-radius:26px;overflow:hidden;border:2px solid #d3dacd;box-shadow:0 12px 45px #20433322;position:relative}
.f41-id-card.premium:before,.f41-id-card.premium:after{content:'';position:absolute;height:12px;left:0;right:0;background:linear-gradient(90deg,#15703f,#fecb00,#f18416,#fff,#168347)}
.f41-id-card.premium:before{top:0}.f41-id-card.premium:after{bottom:0}
.f41-id-topband{height:18px;background:linear-gradient(90deg,#0b6d41,#f6c84f,#ffffff,#f6c84f,#0b6d41)}
.f41-id-card header{padding:18px 28px;background:linear-gradient(180deg,#edf7ef,#fff7eb);display:flex;align-items:center;gap:16px;border-bottom:2px solid #d7d7c4}
.f41-id-card header img{width:72px;height:72px;object-fit:contain}.f41-id-card header strong{font-size:18px;letter-spacing:.03em;display:block;color:#194436}.f41-id-card header small{color:#637268;font-size:11px}
.f41-card-person{display:flex;gap:25px;align-items:center;padding:30px 32px;min-height:280px;background:radial-gradient(circle at top right,#f7fff3 0,#fff 44%)}
.f41-person-avatar{width:170px;height:205px;border-radius:18px;object-fit:cover;border:4px solid #e5eddf;box-shadow:0 10px 24px #22433412;background:#f6f6f2}.f41-avatar-placeholder{display:flex;align-items:center;justify-content:center;color:#849285;font-weight:700}
.f41-card-meta{display:grid;gap:10px;flex:1}.f41-id-ribbon{display:inline-block;width:max-content;padding:7px 16px;border-radius:999px;background:linear-gradient(90deg,#2256c3,#2965da);color:#fff;font-size:12px;font-weight:700;letter-spacing:.08em}
.f41-card-person h1{font-size:32px;margin:0;color:#1d4e3e}.f41-card-person p{font-size:18px;color:#8b743b;font-weight:700;margin:0}
.f41-id-meta-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;margin-top:6px}.f41-id-meta-grid>div{border:1px solid #e3ebdf;border-radius:14px;padding:10px 12px;background:#fbfdfb}.f41-id-meta-grid span{display:block;font-size:11px;color:#6e7e73;text-transform:uppercase;letter-spacing:.06em}.f41-id-meta-grid strong{font-size:14px;color:#1f4135}
.f41-id-note{font-size:12px;color:#5b6f64;line-height:1.55}
.f41-id-card footer{display:flex;justify-content:space-between;gap:12px;flex-wrap:wrap;background:#1f6548;color:#f5f3e5;font-size:11px;text-align:center;padding:12px 18px}

.f41-certificate{width:1120px;max-width:calc(100vw - 36px);box-sizing:border-box;min-height:760px;margin:25px auto;background:#fffcf3;border:5px solid #106c43;outline:4px solid #f4c84c;outline-offset:-14px;text-align:center;padding:26px 34px 30px;position:relative;box-shadow:0 14px 55px #23473424;overflow:hidden}
.f41-certificate.premium:before,.f41-certificate.premium:after{content:'';position:absolute;width:220px;height:220px;border-radius:50%;background:radial-gradient(circle,#f6fbe7,#ffffff00 70%);opacity:.95;bottom:26px}.f41-certificate.premium:before{left:-60px}.f41-certificate.premium:after{right:-60px}
.f41-cert-topline{font-size:14px;color:#22513f;font-weight:700;line-height:1.4;margin:4px 0 12px}
.f41-cert-head{display:grid;grid-template-columns:140px 1fr 170px;gap:18px;align-items:center}
.f41-cert-logo{width:120px;height:120px;object-fit:contain;justify-self:start}
.f41-cert-foundation{font-size:48px;line-height:1.04;font-weight:800;color:#d12223;text-shadow:0 1px 0 #fff}
.f41-cert-subtitle{display:inline-block;margin-top:14px;padding:10px 26px;border-radius:999px;background:linear-gradient(90deg,#2256c3,#2865dc);color:#fff;font-size:24px;font-weight:800;letter-spacing:.02em}
.f41-cert-badge{justify-self:end;padding:11px 14px;border-radius:14px;background:linear-gradient(135deg,#196947,#083e2a);color:#fff;font-size:14px;font-weight:700}
.f41-cert-body{position:relative;z-index:1;margin-top:28px}
.f41-cert-intro{font-size:28px;color:#224eaf;font-weight:700;margin:0 0 10px}
.f41-certificate h2{font-size:46px;color:#173f2f;margin:0 0 16px;font-weight:800}
.f41-cert-copy{font-size:23px;line-height:1.7;color:#203871;max-width:940px;margin:0 auto}
.f41-cert-data{display:flex;justify-content:center;gap:18px;flex-wrap:wrap;margin:20px 0 16px}.f41-cert-data span{padding:10px 16px;background:#f6fae8;border:1px solid #b9cb91;border-radius:999px;font-size:16px;color:#20422f}
.f41-cert-verify-box{margin:12px auto 0;max-width:90%;background:#f7f7f0;border:1px dashed #c6c39d;border-radius:12px;padding:12px 14px;font-size:11px;line-height:1.55;overflow-wrap:anywhere;color:#42564a}
.f41-cert-sign{display:flex;justify-content:space-between;align-items:end;gap:20px;margin-top:38px;position:relative;z-index:1}
.f41-sign-block{display:grid;gap:2px;text-align:center;min-width:220px}.f41-sign-block img{height:70px;max-width:170px;object-fit:contain;justify-self:center}.f41-sign-block b{font-size:22px;color:#e02218;font-weight:800}.f41-sign-block small{font-size:16px;color:#203871}
.f41-seal-wrap img{max-width:190px;max-height:190px;object-fit:contain}
.f41-cert-foot{margin-top:16px;padding-top:12px;border-top:2px solid #2f6c50;color:#f5f4e3;background:linear-gradient(90deg,#0d7143,#155137);font-weight:700;letter-spacing:.05em;padding:15px;border-radius:10px}

@media(max-width:900px){
 .f41-grid,.f41-fields,.f41-id-meta-grid{grid-template-columns:1fr}
 .f41-pay-grid{grid-template-columns:1fr}
 .f41-detail{grid-template-columns:105px minmax(0,1fr) auto}
 .f41-pay-method{margin-bottom:12px}
 .f41-callout{align-items:start;flex-direction:column}
 .f41-inline{align-items:stretch}.f41-inline .f41-field{width:100%}.f41-inline input,.f41-inline select{max-width:none}
 .f41-tree-top{align-items:stretch}.f41-tree-stats{width:100%}
 .f41-cert-head{grid-template-columns:1fr;justify-items:center}.f41-cert-badge{justify-self:center}
 .f41-cert-foundation{font-size:34px}.f41-cert-subtitle{font-size:18px}.f41-cert-intro{font-size:22px}.f41-certificate h2{font-size:32px}.f41-cert-copy{font-size:18px}
 .f41-cert-sign{flex-direction:column;align-items:center}.f41-cert-data{gap:8px}
}
@media(max-width:750px){
 .f41-id-card,.f41-certificate{max-width:calc(100vw - 18px)}
 .f41-card-person{padding:14px;gap:12px;flex-direction:column;align-items:flex-start}
 .f41-person-avatar{width:116px;height:138px}
 .f41-card-person h1{font-size:22px}.f41-id-card footer{flex-direction:column}
 .f41-certificate{padding:16px 10px 18px}.f41-cert-subtitle{padding:8px 12px}
}
@media print{body.f41-print-body{background:white!important;-webkit-print-color-adjust:exact;print-color-adjust:exact}.f41-print-controls{display:none}.f41-id-card,.f41-certificate{max-width:100%;margin:4mm auto;box-shadow:none;break-inside:avoid}@page{size:A4 landscape;margin:8mm}}

/* Integrated edition: zero-gap form labels, password toggle and compact inputs */
.auth-card label,.dashboard-body label{font-size:12px;font-weight:500;letter-spacing:0}
.auth-card label>input,.dashboard-body label>input,.auth-card label>select,.dashboard-body label>select{margin-top:0!important}
.password-control{position:relative;display:block;width:100%;margin:0}
.password-control input{width:100%;padding-right:66px!important;box-sizing:border-box;margin:0!important}
.password-control button{position:absolute;right:6px;top:50%;transform:translateY(-50%);border:0;border-radius:7px;background:#f0f6f1;color:#245842;padding:6px 10px;font-size:12px;font-weight:500;cursor:pointer}
.password-control button:hover{background:#dfefe3}

.f41-public-faq{display:grid;gap:10px;margin-top:15px}
.f41-public-faq details{background:#f8fbf8;border:1px solid #dce6df;border-radius:12px;padding:14px 16px}
.f41-public-faq summary{cursor:pointer;font-size:14px;font-weight:600;color:#1d4c38}
.f41-public-faq p{font-size:13px;line-height:1.65;color:#50665a;margin:10px 0 0}

.f41-gallery-placeholder{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:14px}
.f41-gallery-program{display:flex;flex-direction:column;gap:10px;min-height:200px;padding:24px 18px;border:1px solid #d9e8dc;border-radius:17px;background:linear-gradient(145deg,#f6fbf6,#fffdf5);text-decoration:none;color:#194332;box-sizing:border-box}
.f41-gallery-program img{width:68px;height:68px;object-fit:contain}
.f41-gallery-program strong{font-size:15px;font-weight:600}.f41-gallery-program span{font-size:12px;color:#627b6d}
@media(max-width:750px){.f41-gallery-placeholder{grid-template-columns:repeat(2,minmax(0,1fr))}.f41-gallery-program{min-height:165px;padding:15px}}

/* v4.1.2 admin compact tools */
.sdsf-member-filters{display:flex;flex-wrap:wrap;align-items:end;gap:8px;margin:12px 0 16px}
.sdsf-member-filters label{display:flex;flex-direction:column;gap:0;min-width:120px;font-size:12px;font-weight:500}
.sdsf-member-filters label input,.sdsf-member-filters label select{font-size:13px;min-height:35px;padding:7px 9px;border-radius:8px;border:1px solid #d8e5dc;max-width:210px}
.sdsf-member-filters .btn{margin-bottom:1px}
.sdsf-id-link{background:none;border:0;color:#126b4b;font-size:12px;font-weight:600;font-family:inherit;text-decoration:underline;text-underline-offset:2px;cursor:pointer;padding:3px}
.sdsf-id-link:hover{color:#0c4532}
.sdsf-actions{display:flex;gap:5px;flex-wrap:wrap}
.sdsf-pager{display:flex;align-items:center;justify-content:space-between;gap:12px;font-size:12px;color:#698070;margin-top:14px}.sdsf-pager>div{display:flex;gap:6px}
.sdsf-imp-banner{display:flex;align-items:center;justify-content:space-between;gap:12px;background:#fffae8;border:1px solid #e7d48a;padding:10px 13px;border-radius:12px;margin-bottom:15px}
.sdsf-imp-banner div{display:grid;gap:2px}.sdsf-imp-banner strong{font-size:13px;font-weight:600;color:#594b15}.sdsf-imp-banner small{font-size:11px;color:#706128}
.sdsf-detail-top{display:flex;gap:14px;align-items:center;flex-wrap:wrap;margin:0 0 16px}.sdsf-detail-top>div{flex:1}.sdsf-detail-top h2{font-size:19px;margin:0 0 3px}.sdsf-detail-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;margin-bottom:14px}.sdsf-detail-grid .dash-panel{margin:0}
.sdsf-facts{display:grid;grid-template-columns:minmax(110px,1fr) 2fr;gap:9px;margin:12px 0;font-size:13px}.sdsf-facts dt{color:#76857b}.sdsf-facts dd{margin:0;color:#213e32;overflow-wrap:anywhere}
@media(max-width:740px){.sdsf-detail-grid{grid-template-columns:1fr}.sdsf-member-filters label{flex:1 1 135px}.sdsf-imp-banner{flex-direction:column;align-items:stretch}}
