/* Layout: sticky brand bar + scrollable tab strip, one working view below, edit panel as an overlay sheet. RTL throughout. */
/* Qaf brand: teal from the logo letter, leaf green from the crown. Accent is a deeper teal so white text on buttons stays readable. */
:root{
  --bg:#F2F7F6; --surface:#FFFFFF; --ink:#0F2826; --muted:#557370; --line:#D6E5E2;
  --brand:#17A89B; --leaf:#5DB563;
  --accent:#0E7C72; --accent-ink:#FFFFFF; --accent-soft:#DDF1EE;
  --gold:#9A6A12; --gold-soft:#F6EBD6;
  --danger:#B4382E; --danger-soft:#F8E2DF; --warn:#8F6200; --warn-soft:#FBF0D2;
  --shadow:0 1px 2px rgba(15,40,38,.06),0 8px 24px rgba(15,40,38,.06);
  --f-display:"Changa","Segoe UI",Tahoma,sans-serif;
  --f-body:"Changa","Segoe UI",Tahoma,sans-serif;
}
@media (prefers-color-scheme:dark){:root:not([data-theme="light"]){
  --bg:#0B1716; --surface:#122220; --ink:#E3F0EE; --muted:#8FAAA6; --line:#223835;
  --brand:#2CC0B1; --leaf:#74C77A;
  --accent:#3CC4B5; --accent-ink:#04201D; --accent-soft:#14403B;
  --gold:#D9A94E; --gold-soft:#3A2F1A; --danger:#E5776C; --danger-soft:#3D201D; --warn:#E2B54B; --warn-soft:#3A3018;
  --shadow:0 1px 2px rgba(0,0,0,.3); color-scheme:dark}}
:root[data-theme="dark"]{
  --bg:#0B1716; --surface:#122220; --ink:#E3F0EE; --muted:#8FAAA6; --line:#223835;
  --brand:#2CC0B1; --leaf:#74C77A;
  --accent:#3CC4B5; --accent-ink:#04201D; --accent-soft:#14403B;
  --gold:#D9A94E; --gold-soft:#3A2F1A; --danger:#E5776C; --danger-soft:#3D201D; --warn:#E2B54B; --warn-soft:#3A3018;
  --shadow:0 1px 2px rgba(0,0,0,.3); color-scheme:dark}
*{box-sizing:border-box}
body{background:var(--bg);color:var(--ink);font-family:var(--f-body);font-size:15px;line-height:1.6}
.wrap{max-width:1180px;margin:0 auto;padding-left:max(16px,env(safe-area-inset-left,0px));padding-right:max(16px,env(safe-area-inset-right,0px))}
header.top{position:sticky;top:env(safe-area-inset-top,0px);z-index:20;background:var(--surface);border-bottom:1px solid var(--line)}
.brandrow{display:flex;align-items:center;justify-content:space-between;gap:12px;padding-block:12px 4px}
.brand{font-family:var(--f-display);font-size:1.35rem;font-weight:700;letter-spacing:0;display:flex;align-items:center;gap:10px}
.brand img{height:40px;width:auto;display:block}
.brand .bt{display:grid;line-height:1.15}
.brand .bt small{font-family:var(--f-body);font-size:.72rem;font-weight:400;color:var(--brand);letter-spacing:0}
.today{color:var(--muted);font-size:.85rem}
nav.tabs{display:flex;gap:4px;overflow-x:auto;scrollbar-width:none;padding-block:6px 0}
nav.tabs::-webkit-scrollbar{display:none}
.tab{border:0;background:none;color:var(--muted);font:inherit;font-weight:500;padding:8px 12px 10px;border-bottom:2px solid transparent;cursor:pointer;white-space:nowrap}
.tab[aria-selected="true"]{color:var(--accent);border-bottom-color:var(--accent)}
.tab:focus-visible,button:focus-visible,input:focus-visible,select:focus-visible,textarea:focus-visible{outline:2px solid var(--accent);outline-offset:2px}
main{padding-block:20px 48px;display:grid;gap:20px}
h1,h2,h3{font-family:var(--f-display);font-weight:600;margin:0;text-wrap:balance}
h1{font-size:1.5rem} h2{font-size:1.15rem} h3{font-size:1rem}
.sub{color:var(--muted);font-size:.88rem;margin:2px 0 0}
.bar{display:flex;flex-wrap:wrap;gap:10px;align-items:center;justify-content:space-between}
.bar .tools{display:flex;gap:8px;flex-wrap:wrap;align-items:center}
.btn{font:inherit;font-weight:600;border-radius:8px;border:1px solid var(--line);background:var(--surface);color:var(--ink);padding:8px 14px;cursor:pointer;display:inline-flex;align-items:center;gap:6px}
.btn.primary{background:var(--accent);color:var(--accent-ink);border-color:var(--accent)}
.btn.danger{color:var(--danger);border-color:var(--danger)}
.btn.danger.armed{background:var(--danger);color:#fff}
.btn.sm{padding:4px 10px;font-size:.85rem;font-weight:500}
.btn:disabled{opacity:.5;cursor:not-allowed}
input,select,textarea{font:inherit;color:var(--ink);background:var(--surface);border:1px solid var(--line);border-radius:8px;padding:8px 10px;width:100%}
.search{max-width:260px}
.kpis{display:grid;grid-template-columns:repeat(auto-fit,minmax(170px,1fr));gap:12px}
.kpi{background:var(--surface);border:1px solid var(--line);border-radius:12px;padding:14px 16px;display:grid;gap:2px}
.kpi .l{color:var(--muted);font-size:.82rem}
.kpi .v{font-family:var(--f-display);font-size:1.55rem;font-weight:600;font-variant-numeric:tabular-nums;line-height:1.3}
.kpi .v small{font-family:var(--f-body);font-size:.8rem;color:var(--muted);font-weight:400;margin-inline-start:4px}
.kpi .n{font-size:.8rem;color:var(--muted)}
.kpi.lead{background:var(--accent);border-color:var(--accent);color:var(--accent-ink)}
.kpi.lead .l,.kpi.lead .n,.kpi.lead .v small{color:var(--accent-ink);opacity:.85}
.grid2{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,420px),1fr));gap:16px}
.panel{background:var(--surface);border:1px solid var(--line);border-radius:12px;padding:16px;display:grid;gap:12px;min-width:0;align-content:start}
.panel-h{display:flex;justify-content:space-between;align-items:baseline;gap:8px;flex-wrap:wrap}
.tablebox{overflow-x:auto;min-width:0}
table{width:100%;border-collapse:collapse;font-size:.9rem}
th{text-align:start;font-weight:500;color:var(--muted);font-size:.8rem;padding:8px 10px;border-bottom:1px solid var(--line);white-space:nowrap}
td{padding:9px 10px;border-bottom:1px solid var(--line);vertical-align:middle}
tr.click{cursor:pointer} tr.click:hover td{background:var(--accent-soft)}
.num{font-variant-numeric:tabular-nums;white-space:nowrap}
.pill{display:inline-block;font-size:.76rem;font-weight:500;padding:1px 9px;border-radius:999px;background:var(--line);color:var(--ink);white-space:nowrap}
.pill.ok{background:var(--accent-soft);color:var(--accent)}
.pill.warn{background:var(--warn-soft);color:var(--warn)}
.pill.bad{background:var(--danger-soft);color:var(--danger)}
.pill.gold{background:var(--gold-soft);color:var(--gold)}
.pill.demo{background:transparent;border:1px dashed var(--muted);color:var(--muted)}
.list{display:grid;gap:0}
.li{display:flex;justify-content:space-between;gap:10px;padding:9px 0;border-bottom:1px solid var(--line);align-items:center}
.li:last-child{border-bottom:0}
.li .who{min-width:0} .li .who b{font-weight:600} .li .who div{color:var(--muted);font-size:.8rem}
.meter{height:6px;border-radius:99px;background:var(--line);overflow:hidden}
.meter span{display:block;height:100%;background:var(--accent);border-radius:99px}
.meter.over span{background:var(--danger)}
.empty{color:var(--muted);text-align:center;padding:28px 12px;border:1px dashed var(--line);border-radius:10px}
.chart svg{width:100%;height:auto;display:block}
.legend{display:flex;gap:14px;font-size:.8rem;color:var(--muted)}
.legend i{display:inline-block;width:10px;height:10px;border-radius:3px;margin-inline-end:5px;vertical-align:middle}
.ai{background:var(--gold-soft);border:1px solid var(--line);border-radius:12px;padding:14px 16px;display:grid;gap:8px}
.ai .t{white-space:pre-wrap;font-size:.92rem}
.note{font-size:.82rem;color:var(--muted)}
.banner{border:1px solid var(--line);background:var(--warn-soft);color:var(--ink);border-radius:10px;padding:10px 14px;font-size:.88rem;display:flex;gap:10px;align-items:center;justify-content:space-between;flex-wrap:wrap}
/* sheet */
.overlay{position:fixed;inset:0;background:rgba(10,20,18,.45);z-index:50;display:flex;justify-content:flex-start;align-items:stretch}
.sheet{background:var(--surface);width:min(560px,100%);height:100%;overflow-y:auto;padding:max(20px,env(safe-area-inset-top,0px)) max(18px,env(safe-area-inset-right,0px)) max(24px,env(safe-area-inset-bottom,0px)) max(18px,env(safe-area-inset-left,0px));display:grid;gap:16px;align-content:start;box-shadow:var(--shadow)}
.sheet-h{display:flex;justify-content:space-between;align-items:center;gap:8px}
.x{border:0;background:none;font-size:1.5rem;color:var(--muted);cursor:pointer;line-height:1}
form.f{display:grid;grid-template-columns:1fr 1fr;gap:12px}
form.f label{display:grid;gap:4px;font-size:.84rem;color:var(--muted);min-width:0}
form.f .full{grid-column:1/-1}
@media (max-width:520px){form.f{grid-template-columns:1fr}}
.sp-wrap{display:grid;gap:8px;border:1px solid var(--line);border-radius:10px;padding:10px}
#spRows{display:grid;gap:8px}
.sp-row{display:grid;grid-template-columns:minmax(0,2fr) minmax(0,1fr) minmax(0,1.3fr) auto;gap:6px;align-items:center}
@media (max-width:520px){.sp-row{grid-template-columns:1fr 1fr auto}.sp-row .sp-d{grid-column:1/-1}}
.kr-row{display:grid;grid-template-columns:minmax(0,2.4fr) minmax(0,1fr) auto;gap:6px;align-items:center}
#kafRows{display:grid;gap:6px}
input[readonly]{background:var(--bg);color:var(--muted)}
.r-lines{list-style:none;margin:4px 0 0;padding:0;display:grid;gap:2px}.r-lines li{display:flex;justify-content:space-between;gap:12px;border-bottom:1px dashed var(--line);padding-block:2px}
.kf-lines b{flex:1;border-bottom:1px solid #8FAAA6;min-height:5mm;color:#16302d;font-weight:600}
.actions{display:flex;gap:8px;justify-content:space-between;flex-wrap:wrap}
dl.kv{display:grid;grid-template-columns:auto 1fr;gap:6px 16px;margin:0;font-size:.9rem}
dl.kv dt{color:var(--muted)} dl.kv dd{margin:0}
.receipt{border:1px solid var(--line);border-radius:12px;padding:18px;display:grid;gap:10px;background:var(--bg)}
.receipt .rh{display:flex;justify-content:space-between;align-items:flex-start;gap:10px;border-bottom:1px dashed var(--line);padding-bottom:10px}
.receipt .amt{font-family:var(--f-display);font-size:1.9rem;font-weight:700;font-variant-numeric:tabular-nums}
.toast{position:fixed;bottom:calc(16px + env(safe-area-inset-bottom,0px));left:50%;transform:translateX(-50%);background:var(--ink);color:var(--bg);padding:9px 16px;border-radius:8px;z-index:60;font-size:.9rem}
@media (prefers-reduced-motion:no-preference){.sheet{animation:in .18s ease-out}@keyframes in{from{transform:translateX(-24px);opacity:.6}}}

/* brand touches */
header.top{border-bottom:2px solid var(--brand)}
.kpi.lead{background:linear-gradient(135deg,var(--accent),var(--brand))}
.receipt .rh img{height:64px;width:auto}
.receipt .tag{color:var(--brand);font-size:.8rem}
.brand img{height:46px}
.brand .bt span{white-space:nowrap}
@media (max-width:640px){
  #today,#today+span{display:none}
  .brand{font-size:1.1rem;gap:8px}
  .brand img{height:38px}
  .brand .bt small{display:none}
  .who-me{gap:6px;flex-wrap:wrap;justify-content:flex-end}
  #meName{max-width:9em;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
}

/* orphan form extras */
.form-h{grid-column:1/-1;font-size:.95rem;color:var(--accent);border-bottom:1px solid var(--line);padding-bottom:4px;margin-top:6px}
.photo-field{display:flex;align-items:center;gap:10px;flex-wrap:wrap}
.photo-field img,#phPrev{width:84px;height:104px;object-fit:cover;border-radius:8px;border:1px solid var(--line)}
.o-photo{width:84px;height:104px;object-fit:cover;border-radius:8px;border:1px solid var(--line)}
#famRows{display:grid;gap:8px}
.fam-row{display:grid;grid-template-columns:1.4fr 1fr 1.1fr 1.2fr 1fr 1fr auto;gap:6px;align-items:center}
@media (max-width:700px){.fam-row{grid-template-columns:1fr 1fr;padding-bottom:8px;border-bottom:1px dashed var(--line)}.fam-row .fm-n{grid-column:1/-1}}

/* sponsorship sheet: screen preview + print */
body.printing > header.top, body.printing > .wrap, body.printing > #layer{display:none}
#printRoot{background:#E9EFEE;min-height:100vh;padding-bottom:40px;color:#0F2826;color-scheme:light}
.kf-bar{position:sticky;top:env(safe-area-inset-top,0px);z-index:5;display:flex;gap:10px;align-items:center;flex-wrap:wrap;background:#fff;border-bottom:2px solid #17A89B;padding-block:10px;padding-left:max(16px,env(safe-area-inset-left,0px));padding-right:max(16px,env(safe-area-inset-right,0px))}
.kf-bar .btn{background:#fff;color:#0F2826;border-color:#D6E5E2}
.kf-bar .btn.primary{background:#0E7C72;color:#fff;border-color:#0E7C72}
.kf-opt{display:flex;gap:6px;align-items:center;font-size:.85rem;color:#557370}
.kf-opt input{width:auto}
.a4{width:210mm;min-height:297mm;max-width:calc(100% - 32px);margin:20px auto;background:#fff;padding:14mm 14mm 12mm;box-shadow:0 4px 24px rgba(15,40,38,.12);display:flex;flex-direction:column;gap:5mm;font-family:var(--f-body);font-size:10.5pt;line-height:1.55}
.kf-head{display:grid;grid-template-columns:1fr auto 32mm;gap:6mm;align-items:center;border-bottom:1.2mm solid #17A89B;padding-bottom:4mm}
.kf-org{display:flex;gap:3mm;align-items:center}
.kf-org img{height:22mm;width:auto}
.kf-org b{display:block;font-size:13pt;font-family:var(--f-display)}
.kf-org small{display:block;color:#17A89B;font-size:8.5pt}
.kf-title{text-align:center}
.kf-title h1{font-size:18pt;color:#0E7C72;margin:0}
.kf-no{display:inline-block;margin-top:2mm;border:1px solid #0E7C72;border-radius:2mm;padding:.5mm 3mm;font-size:9.5pt}
.kf-no b{font-variant-numeric:tabular-nums}
.kf-photo{width:32mm;height:40mm;border:1px solid #D6E5E2;border-radius:2mm;overflow:hidden;display:grid;place-items:center;background:#F2F7F6;color:#8FAAA6;font-size:8pt;justify-self:end}
.kf-photo img{width:100%;height:100%;object-fit:cover}
.kf-sec h2{font-size:11.5pt;color:#fff;background:#0E7C72;display:inline-block;padding:.6mm 4mm;border-radius:1.5mm;margin:0 0 2.5mm}
.kv-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:1.6mm 5mm}
.kv-row{display:grid;gap:0;border-bottom:1px dotted #B9CFCB;padding-bottom:1mm}
.kv-row span{font-size:8.5pt;color:#557370}
.kv-row b{font-weight:500}
.kv-row.wide{grid-column:span 2}
.kf-contact{display:contents}
#printRoot.hide-contact .kf-contact{display:none}
.kf-table{width:100%;border-collapse:collapse;margin-top:3mm;font-size:9pt}
.kf-table th{background:#DDF1EE;color:#0F2826;font-weight:500;padding:1.4mm 2mm;border:1px solid #C7DEDA;text-align:start}
.kf-table td{padding:1.4mm 2mm;border:1px solid #D6E5E2}
.kf-note{border:1px solid #D6E5E2;border-radius:2mm;padding:3mm 4mm;margin:0;background:#F7FBFA;white-space:pre-wrap}
.kf-amount{display:flex;align-items:center;gap:6mm;justify-content:space-between;border:1px solid #17A89B;border-radius:2mm;padding:3mm 5mm;background:#F2FAF8}
.kf-amount div span{display:block;font-size:9pt;color:#557370}
.kf-amount div b{font-size:16pt;font-family:var(--f-display);color:#0E7C72;font-variant-numeric:tabular-nums}
.kf-amount p{margin:0;font-size:10pt;color:#0F2826;max-width:60%}
.kf-amount small{color:#557370}
.kf-lines{display:grid;grid-template-columns:1fr 1fr;gap:5mm 8mm}
.kf-lines div{display:flex;gap:2mm;align-items:flex-end;font-size:9.5pt;color:#557370}
.kf-lines i{flex:1;border-bottom:1px solid #8FAAA6;height:5mm}
.kf-foot{margin-top:auto;border-top:1px solid #D6E5E2;padding-top:2.5mm;display:flex;justify-content:space-between;gap:4mm;font-size:8pt;color:#557370;flex-wrap:wrap}
@media screen and (max-width:820px){
  .a4{width:auto;min-height:0;padding:16px;font-size:13px;margin:12px auto}
  .kf-head{grid-template-columns:1fr 26mm}.kf-title{grid-column:1/-1;grid-row:2}
  .kv-grid{grid-template-columns:1fr 1fr}.kf-amount{flex-direction:column;align-items:flex-start}.kf-amount p{max-width:none}
  .kf-table{display:block;overflow-x:auto}
}
@page{size:A4;margin:0}
@media print{
  body{background:#fff!important}
  body.printing > *:not(#printRoot){display:none!important}
  .kf-bar{display:none!important}
  #printRoot{background:#fff;padding:0;min-height:0}
  .a4{margin:0;box-shadow:none;width:210mm;min-height:297mm;max-width:none;padding:14mm 14mm 12mm;font-size:10.5pt}
  .kf-head{grid-template-columns:1fr auto 32mm}.kf-title{grid-column:auto;grid-row:auto}
  .kv-grid{grid-template-columns:repeat(3,1fr)}.kf-amount{flex-direction:row;align-items:center}.kf-amount p{max-width:60%}
  *{-webkit-print-color-adjust:exact;print-color-adjust:exact}
}
/* keep the sheet to one A4 page */
.a4{gap:4mm;padding:12mm 13mm 10mm}
.kf-head{padding-bottom:3mm}
.kf-photo{width:29mm;height:36mm}
.kf-head{grid-template-columns:1fr auto 29mm}
.kv-grid{gap:1.2mm 5mm}
.kf-sec h2{margin-bottom:2mm;font-size:11pt}
.kf-lines{gap:4mm 8mm}
@media print{
  .a4{padding:12mm 13mm 10mm;font-size:10pt;height:296mm;min-height:0;overflow:hidden}
  .kf-head{grid-template-columns:1fr auto 29mm}
}
@media screen and (max-width:820px){
  .kf-head{grid-template-columns:minmax(0,1fr) 26mm}
  .kf-photo{width:26mm;height:32mm}
  .kf-org{min-width:0}
  #printRoot{overflow-x:hidden}
}

/* ---------- vouchers & reports ---------- */
.doc-head{display:flex;justify-content:space-between;align-items:center;gap:6mm;border-bottom:1mm solid #17A89B;padding-bottom:2.5mm}
.doc-title{text-align:start}
.doc-title h1{font-size:16pt;color:#0E7C72;margin:0;text-align:end}
.doc-meta{display:flex;gap:4mm;font-size:9pt;color:#557370;justify-content:flex-end;flex-wrap:wrap}
.doc-meta b{color:#0F2826;font-weight:600;font-variant-numeric:tabular-nums}
.a4-vouchers{gap:0;padding:8mm 12mm}
.voucher{height:136mm;display:flex;flex-direction:column;gap:2.5mm;position:relative;overflow:hidden}
.v-copy{position:absolute;top:24mm;inset-inline-start:0;font-size:8pt;color:#0E7C72;border:1px solid #17A89B;border-radius:1.5mm;padding:.3mm 2.5mm}
.v-body{display:grid;gap:2.2mm;margin-top:7mm}
.v-line{display:flex;gap:3mm;align-items:baseline;border-bottom:1px dotted #B9CFCB;padding-bottom:1mm;min-width:0}
.v-line span{font-size:9pt;color:#557370;white-space:nowrap}
.v-line b{font-weight:500;flex:1;min-width:0}
.v-line .fill{display:inline-block;width:60mm}
.v-row{display:grid;grid-template-columns:1fr 1fr;gap:6mm}
.v-amount{display:flex;gap:3mm;align-items:center;background:#F2FAF8;border:1px solid #17A89B;border-radius:2mm;padding:1.5mm 4mm;justify-self:start}
.v-amount span{font-size:9pt;color:#557370}
.v-amount b{font-family:var(--f-display);font-size:15pt;color:#0E7C72;font-variant-numeric:tabular-nums}
.v-note{font-size:8.5pt;color:#557370;margin:0}
.v-sign{display:grid;grid-template-columns:1fr 1fr 1fr;gap:6mm;margin-top:auto;align-items:end}
.v-sign div{display:grid;gap:1mm;font-size:8.5pt;color:#557370}
.v-sign b{color:#0F2826;font-weight:500;min-height:4mm}
.v-sign i{border-bottom:1px solid #8FAAA6;height:6mm}
.v-stamp{border:1px dashed #8FAAA6;border-radius:50%;width:24mm;height:24mm;display:grid!important;place-items:center;justify-self:center;font-size:8pt}
.v-thanks{text-align:center;color:#0E7C72;font-size:9.5pt;margin:0}
.voucher .kf-foot{margin-top:0}
.cut{border-top:1px dashed #8FAAA6;text-align:center;font-size:7pt;color:#8FAAA6;line-height:0;margin:5mm 0}
.cut::after{content:"✂"}
.rep-stats{display:grid;grid-template-columns:repeat(4,1fr);gap:3mm}
.rep-stat{border:1px solid #D6E5E2;border-radius:2mm;padding:2mm 3mm;display:grid;background:#F7FBFA}
.rep-stat span{font-size:8.5pt;color:#557370}
.rep-stat b{font-family:var(--f-display);font-size:13pt;color:#0E7C72;font-variant-numeric:tabular-nums}
.rep-stat small{font-size:8pt;color:#557370}
.kf-table.rep td{font-variant-numeric:tabular-nums}
.kf-table tfoot td{background:#F2FAF8;font-weight:600;border:1px solid #C7DEDA;padding:1.4mm 2mm}
.empty-cell{text-align:center;color:#8FAAA6}
.a4.flow{min-height:0}
@media screen and (max-width:820px){
  .a4-vouchers{padding:16px}.voucher{height:auto;padding-bottom:12px}.v-copy{position:static;justify-self:start}
  .v-row{grid-template-columns:1fr}.v-sign{grid-template-columns:1fr 1fr}.rep-stats{grid-template-columns:1fr 1fr}
  .doc-head{flex-wrap:wrap}
}
@media print{
  .a4.flow{height:auto;min-height:0;overflow:visible}
  #printRoot.flow .a4{height:auto;overflow:visible}
  .a4-vouchers{padding:8mm 12mm}
  .voucher{height:136mm;padding-bottom:0}.v-copy{position:absolute}.v-row{grid-template-columns:1fr 1fr}.v-sign{grid-template-columns:1fr 1fr 1fr}
  .rep-stats{grid-template-columns:repeat(4,1fr)}
  .kf-table tr{break-inside:avoid}
  .kf-sec{break-inside:auto}
  .kf-sec h2{break-after:avoid}
}

/* privacy toggle on family sheets */
.nm-hid{display:none;color:#8FAAA6;font-weight:400}
#printRoot.hide-names .nm{display:none}
#printRoot.hide-names .nm-hid{display:inline}

/* intake form: mirrors the association's paper form */
.intake{gap:3mm;padding:10mm 12mm 8mm;font-size:10pt}
.if-head{display:grid;grid-template-columns:1fr auto 30mm;gap:6mm;align-items:center}
.if-org{display:grid;gap:.5mm}
.if-org b{font-family:var(--f-display);font-size:12pt;color:#0F2826}
.if-org small{font-size:8.5pt;color:#557370}
.if-logo img{height:30mm;width:auto;display:block}
.if-no{border:1.2px solid #0F2826;border-radius:2mm;padding:2mm 3mm;text-align:center;font-size:8.5pt;color:#557370;display:grid;gap:1mm;justify-self:end;min-width:30mm}
.if-no b{font-size:11pt;color:#0F2826;font-variant-numeric:tabular-nums}
.intake .kf-photo{width:30mm;height:38mm;border:1.5px solid #0F2826}
.if-title{text-align:center;font-size:16pt;color:#0F2826;margin:0;border-bottom:1.5px solid #0F2826;padding-bottom:1.5mm;width:70%;justify-self:center;align-self:center;margin-inline:auto}
.if-title small{font-size:9pt;color:#557370;font-weight:400}
.if-cell{display:flex;gap:2mm;align-items:baseline;padding:2mm 3mm;border-bottom:1px solid #9FB5B1;min-width:0}
.if-cell span{white-space:nowrap;color:#0F2826;font-weight:600;font-size:9.5pt}
.if-cell span::after{content:" :"}
.if-cell b{font-weight:400;flex:1;min-width:0;min-height:5mm}
.if-name .if-cell{border:1.2px solid #0F2826;border-radius:2mm}
.if-grid{display:grid;grid-template-columns:1fr 1fr;border:1.2px solid #0F2826;border-radius:2mm;overflow:hidden}
.if-grid .if-cell:nth-child(odd){border-inline-end:1px solid #9FB5B1}
.if-grid .if-cell.wide{grid-column:1/-1;border-inline-end:0}
.if-sub{font-size:11pt;margin:1mm 0 0;color:#0F2826;text-align:center}
.if-sub:has(+ .if-box){text-align:start}
.if-table{width:100%;border-collapse:collapse;border:1.2px solid #0F2826;font-size:9pt}
.if-table th{border:1px solid #0F2826;padding:1.2mm;font-weight:600;background:#F2F7F6}
.if-table td{border-inline:1px solid #0F2826;border-bottom:1px dotted #9FB5B1;height:6.5mm;padding:0 1.5mm}
.if-table td:first-child{text-align:center;width:9mm}
.if-box{border:1.2px solid #0F2826;border-radius:2mm;min-height:24mm;padding:2mm 3mm;white-space:pre-wrap;background-image:repeating-linear-gradient(transparent 0 6.5mm,#D6E5E2 6.5mm 6.8mm);line-height:6.8mm}
.if-addr{border-radius:2mm}
.if-signs{margin-top:2mm}
@media screen and (max-width:820px){
  .if-head{grid-template-columns:1fr 26mm}.if-logo{display:none}.if-grid{grid-template-columns:1fr}.if-grid .if-cell{border-inline-end:0!important}
  .if-table{display:block;overflow-x:auto}.if-title{width:auto}
}
@media print{.intake{height:296mm;overflow:hidden}}
.intake > *{flex-shrink:0}
.intake .if-cell{padding:1.5mm 3mm}
.intake .if-table td{height:6mm}
.intake .if-box{min-height:20mm}
.intake .if-logo img{height:26mm}
.intake .kf-photo{height:34mm;width:27mm}
.intake .if-head{grid-template-columns:1fr auto 30mm}
.intake .kf-foot{margin-top:auto}
.bank-line{flex-basis:100%;color:#0E7C72;font-size:8.5pt;font-weight:500}
.bank-line b{font-variant-numeric:tabular-nums;font-weight:700}
.danger-zone{border-color:var(--danger)}
.danger-zone h2{color:var(--danger)}
.voucher{gap:1.8mm}
.voucher .v-body{gap:1.8mm;margin-top:6mm}
.voucher .v-stamp{width:20mm;height:20mm}
.voucher .v-sign i{height:4mm}
.voucher .kf-foot{padding-top:1.5mm;gap:1mm 4mm;font-size:7.5pt}
.voucher .bank-line{font-size:8pt}
