*{box-sizing:border-box}body{margin:0;font-family:Inter,Arial,sans-serif;background:#f4f7f5;color:#17352a}a{text-decoration:none;color:inherit}.layout{display:flex;min-height:100vh}.sidebar{width:255px;background:linear-gradient(180deg,#0d5c43,#063b2c);color:#fff;position:fixed;inset:0 auto 0 0;padding:22px 15px;z-index:20}.side-brand{display:flex;align-items:center;gap:12px;padding:6px 8px 25px;font-size:17px}.side-brand b,.brand{display:grid;place-items:center;width:45px;height:45px;border-radius:13px;background:#d7b25c;color:#103d2e;font-weight:900}.side-brand small{opacity:.75;font-size:10px;letter-spacing:1px}.sidebar nav a{display:block;padding:12px 14px;border-radius:10px;margin:4px 0;color:#e9f5ef}.sidebar nav a:hover{background:rgba(255,255,255,.13)}.sidebar nav .logout{margin-top:25px;color:#ffdede}.main{margin-left:255px;width:calc(100% - 255px)}.topbar{height:72px;background:#fff;border-bottom:1px solid #e4ebe7;display:flex;align-items:center;justify-content:space-between;padding:0 28px;position:sticky;top:0;z-index:10}.topbar small{color:#81928b}.userpill{background:#eef6f1;padding:9px 13px;border-radius:20px;font-size:13px}.content{padding:26px;max-width:1500px;margin:auto}.hamb{display:none}.grid{display:grid;gap:18px}.cards{grid-template-columns:repeat(4,1fr)}.card{background:#fff;border:1px solid #e6ede9;border-radius:16px;padding:20px;box-shadow:0 5px 18px rgba(20,60,40,.05)}.stat strong{font-size:30px;display:block;margin-top:7px}.muted{color:#7b8c85;font-size:13px}.title{display:flex;justify-content:space-between;align-items:center;margin-bottom:18px}.title h2{margin:0}.btn{border:0;border-radius:9px;padding:10px 15px;cursor:pointer;font-weight:700}.primary{background:#0b6b4d;color:#fff}.gold{background:#d7b25c;color:#17352a}.danger{background:#b53b3b;color:#fff}.light{background:#eef4f1;color:#1e4a3a}.full{width:100%}table{width:100%;border-collapse:collapse;background:#fff;border-radius:12px;overflow:hidden}th,td{padding:11px 12px;border-bottom:1px solid #e8eeeb;text-align:left;font-size:13px;vertical-align:top}th{background:#edf5f1;color:#315c4c}input,select,textarea{width:100%;padding:10px 11px;border:1px solid #ccd9d2;border-radius:8px;background:#fff;color:#17352a}textarea{min-height:90px}.formgrid{display:grid;grid-template-columns:repeat(2,1fr);gap:14px}.formgrid.three{grid-template-columns:repeat(3,1fr)}label{font-size:12px;font-weight:700;display:block;margin:0 0 5px}.actions{display:flex;gap:7px;flex-wrap:wrap}.alert{padding:12px;border-radius:9px;margin-bottom:15px}.alert.danger{background:#fdeaea;color:#8c2424}.alert.ok{background:#e7f7ed;color:#17623e}.score{display:flex;gap:4px}.score button{min-width:38px;background:#f0f4f2;border:1px solid #d7e0db;border-radius:7px;padding:7px;cursor:pointer}.score button.active{background:#0b6b4d;color:white}.badge{padding:5px 8px;border-radius:20px;background:#e9f5ef;font-size:11px;font-weight:700}.login{min-height:100vh;display:grid;place-items:center;background:radial-gradient(circle at top,#e5f2eb,#f4f7f5)}.login-card{width:min(410px,92%);background:#fff;border-radius:22px;padding:36px;box-shadow:0 20px 60px rgba(0,60,40,.13);text-align:center}.login-card .brand{margin:auto}.login-card h1{margin:14px 0 0}.login-card p{margin:0 0 25px;color:#8b9a93}.login-card form{text-align:left}.login-card small{display:block;margin-top:20px;color:#8a9891}.section{margin-top:20px}.print-only{display:none}.table-wrap{overflow:auto}.notice{padding:14px;border-left:4px solid #d7b25c;background:#fffdf4}.progress{height:8px;background:#e4ebe7;border-radius:10px;overflow:hidden}.progress i{display:block;height:100%;background:#0b6b4d}.modal{position:fixed;inset:0;background:#0007;display:none;align-items:center;justify-content:center;z-index:50}.modal.show{display:flex}.modal-box{background:white;border-radius:18px;width:min(720px,94%);padding:24px;max-height:90vh;overflow:auto}.close{float:right;border:0;background:none;font-size:22px}@media(max-width:900px){.sidebar{transform:translateX(-100%);transition:.2s}.main{margin-left:0;width:100%}.open .sidebar{transform:none}.hamb{display:block;border:0;background:none;font-size:22px}.cards{grid-template-columns:repeat(2,1fr)}.formgrid,.formgrid.three{grid-template-columns:1fr}.content{padding:16px}.topbar{padding:0 16px}.userpill{display:none}}@media(max-width:560px){.cards{grid-template-columns:1fr}.title{align-items:flex-start;gap:10px;flex-direction:column}.card{padding:15px}}
@media print{.sidebar,.topbar,.no-print{display:none!important}.main{margin:0;width:100%}.content{padding:0}.print-only{display:block}body{background:white}table{box-shadow:none}th,td{font-size:10px}}
.logo-setting{display:flex;gap:24px;align-items:center;flex-wrap:wrap}.logo-preview{width:120px;height:120px;border:1px dashed #b8c9c0;border-radius:14px;background:#f7faf8;display:grid;place-items:center;overflow:hidden;color:#82928b;font-size:12px;text-align:center}.logo-preview img{width:100%;height:100%;object-fit:contain}.login-logo{overflow:hidden}.login-logo img{width:100%;height:100%;object-fit:contain}.kop-surat{display:flex;gap:16px;align-items:center;border-bottom:3px solid #17352a;padding-bottom:10px;margin-bottom:8px}.kop-logo{width:78px;min-width:78px;text-align:center}.kop-logo img{width:68px;height:68px;object-fit:contain}.kop-text{text-align:center;flex:1}.kop-foundation{font-size:11px;font-weight:700}.kop-school{font-size:20px;font-weight:900;text-transform:uppercase}.kop-address,.kop-meta{font-size:8px;margin-top:3px}.print-title{text-align:center;margin:10px 0 15px}@media print{.kop-surat{display:flex!important}.kop-school{font-size:16px}.kop-foundation{font-size:9px}.kop-address,.kop-meta{font-size:7px}.print-title{font-size:10px}}

/* ===== SIKAGURU MODERN UI ===== */
:root{--green:#0b6b4d;--green-dark:#063b2c;--green-soft:#eaf6f0;--gold:#d7b25c;--ink:#17352a;--muted:#7b8c85;--line:#e3ece7;--bg:#f4f7f5}
body{font-family:Inter,Arial,sans-serif;overflow-x:hidden}.layout{min-height:100vh}.sidebar{overflow-y:auto;overflow-x:hidden;scrollbar-width:thin}.side-brand{min-height:66px}.side-logo{width:45px;height:45px;min-width:45px;border-radius:13px;background:#d7b25c;color:#103d2e;display:grid;place-items:center;overflow:hidden}.side-logo img{width:100%;height:100%;object-fit:contain;background:#fff}.side-brand span{display:flex;flex-direction:column;gap:2px}.side-brand strong{font-size:15px;letter-spacing:.5px}.side-brand small{font-size:9px;letter-spacing:1.5px}.sidebar nav a{display:flex;align-items:center;gap:12px;min-height:46px;font-weight:600}.sidebar nav a:first-letter{font-size:17px}.sidebar nav a:hover{transform:translateX(2px);transition:.18s}.main{min-height:100vh}.content{min-height:calc(100vh - 72px);padding-bottom:45px}.topbar{backdrop-filter:blur(12px);background:rgba(255,255,255,.94)}.topbar-brand{display:flex;flex-direction:column;gap:2px}.topbar-brand small{font-size:11px}.dashboard-hero{position:relative;overflow:hidden;display:flex;justify-content:space-between;align-items:center;gap:30px;min-height:250px;padding:34px 38px;margin-bottom:22px;border-radius:24px;background:linear-gradient(125deg,#073c2d 0%,#0b6b4d 58%,#159267 100%);color:#fff;box-shadow:0 18px 40px rgba(4,70,48,.16)}.dashboard-hero:after{content:"";position:absolute;width:300px;height:300px;border-radius:50%;right:-90px;top:-110px;background:rgba(215,178,92,.16)}.dashboard-hero h1{font-size:34px;line-height:1.05;margin:9px 0}.dashboard-hero h1 span{color:#f0d58e}.dashboard-hero p{max-width:690px;color:#d8ebe3;margin:0 0 20px}.eyebrow,.login-mini{font-size:10px;font-weight:800;letter-spacing:2px;opacity:.78}.hero-actions{display:flex;gap:9px;flex-wrap:wrap}.hero-actions .light{background:rgba(255,255,255,.13);color:#fff;border:1px solid rgba(255,255,255,.18)}.hero-badge{position:relative;z-index:1;min-width:220px;padding:20px;border-radius:20px;background:rgba(255,255,255,.11);border:1px solid rgba(255,255,255,.15);display:flex;flex-direction:column;align-items:center;text-align:center;gap:5px}.hero-badge small{color:#d6e8e0}.hero-logo{width:70px;height:70px;border-radius:20px;display:grid;place-items:center;background:#fff;color:var(--green);font-weight:900;font-size:24px;margin-bottom:5px}.dashboard-title{margin-top:4px}.dashboard-stats{grid-template-columns:repeat(4,1fr)}.stat-link{position:relative;display:block;color:inherit;transition:transform .2s,box-shadow .2s}.stat-link:hover{transform:translateY(-3px);box-shadow:0 12px 28px rgba(20,60,40,.10)}.stat-icon{position:absolute;right:18px;top:18px;width:38px;height:38px;border-radius:12px;display:grid;place-items:center;background:var(--green-soft);color:var(--green);font-size:11px;font-weight:900}.stat strong{font-size:34px;margin:10px 0 3px}.stat small{color:var(--muted)}.dashboard-columns{display:grid;grid-template-columns:1.5fr 1fr;gap:18px;margin-top:18px}.dashboard-card{min-height:180px}.section-heading{display:flex;justify-content:space-between;margin-bottom:20px}.section-heading h3{margin:0 0 4px}.workflow{display:grid;grid-template-columns:1fr auto 1fr auto 1fr auto 1fr;align-items:center;gap:10px}.workflow div{background:#f7faf8;border:1px solid var(--line);padding:14px 10px;border-radius:14px;text-align:center}.workflow b{display:block;color:var(--green);font-size:18px;margin-bottom:4px}.workflow span{font-size:11px;font-weight:700}.workflow i{font-style:normal;color:#9bada4;font-weight:800}.quick-links{display:grid;gap:9px}.quick-links a{display:flex;justify-content:space-between;padding:12px 14px;border:1px solid var(--line);border-radius:12px;background:#fafcfb;font-weight:700;color:#275845}.quick-links a:hover{background:var(--green-soft)}.report-toolbar{align-items:center}.report-page{margin-top:18px;box-shadow:0 8px 24px rgba(20,60,40,.06)}.component-summary{display:flex;flex-wrap:wrap;gap:10px;margin-top:14px}.component-summary span{background:#f1f7f3;border:1px solid var(--line);border-radius:9px;padding:9px 11px;font-size:12px}.signature-panel{border:1px solid #dbe9e2;background:linear-gradient(180deg,#fff,#f8fbf9)}.signature-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:14px}.signature-box{border:1px solid var(--line);border-radius:15px;padding:12px;background:#fff}.signature-head{display:flex;flex-direction:column;gap:3px;margin-bottom:9px}.signature-head span{font-size:12px;color:var(--muted);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.signature-canvas{display:block;width:100%;height:130px;border:1px dashed #baccc3;border-radius:10px;background:linear-gradient(#fff,#fbfdfc);touch-action:none;cursor:crosshair}.signature-actions{display:flex;justify-content:flex-end;margin-top:8px}.signature-print{margin-top:38px}.signature-date{text-align:right;margin-bottom:10px;font-size:12px}.signature-print-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:12px;text-align:center}.signature-print-grid>div{min-height:170px}.sig-image-wrap{height:80px;display:flex;align-items:flex-end;justify-content:center}.sig-output{max-width:150px;max-height:72px;object-fit:contain}.signature-print-grid strong{font-size:12px}.report-identitas{margin-bottom:12px}
/* Login */
.login{position:relative;overflow:hidden;background:linear-gradient(135deg,#063b2c 0%,#0b6b4d 46%,#edf5f0 46%,#f7faf8 100%);display:grid;place-items:center;padding:25px}.login-bg-orb{position:fixed;border-radius:50%;pointer-events:none}.orb-a{width:280px;height:280px;left:-130px;bottom:-120px;background:rgba(215,178,92,.18)}.orb-b{width:360px;height:360px;right:-170px;top:-170px;background:rgba(255,255,255,.08)}.login-shell{width:min(1050px,100%);display:grid;grid-template-columns:1.1fr .9fr;gap:50px;align-items:center;position:relative;z-index:1}.login-intro{color:#fff;padding:25px}.login-intro h1{font-size:58px;line-height:.98;letter-spacing:-2px;margin:14px 0}.login-intro h1 span{color:#f0d58e}.login-intro p{max-width:580px;color:#d7ebe3;line-height:1.75}.login-features{display:flex;flex-wrap:wrap;gap:9px;margin-top:22px}.login-features span{font-size:11px;padding:8px 11px;border-radius:30px;background:rgba(255,255,255,.10);border:1px solid rgba(255,255,255,.14)}.login-card{width:100%;border:1px solid rgba(255,255,255,.7);box-shadow:0 25px 70px rgba(0,50,35,.18);padding:38px;border-radius:26px}.login-school-logo{width:76px;height:76px;border-radius:20px;margin:0 auto 18px;display:grid;place-items:center;background:#f1f7f3;color:var(--green);overflow:hidden;font-size:25px}.login-school-logo img{width:100%;height:100%;object-fit:contain}.login-label{text-align:center;color:var(--green);font-weight:800;font-size:11px;letter-spacing:1.5px;text-transform:uppercase}.login-card h2{margin:7px 0 4px;font-size:28px;text-align:center}.login-school-name{text-align:center;color:var(--muted);font-size:12px;margin:0 0 24px}.login-card form label{margin-top:12px}.login-card form input{min-height:45px}.login-button{min-height:46px;margin-top:17px;display:flex;justify-content:center;align-items:center;gap:12px}.login-card small{line-height:1.6}
@media(max-width:1000px){.dashboard-hero{padding:28px}.dashboard-hero h1{font-size:29px}.dashboard-columns{grid-template-columns:1fr}.dashboard-stats{grid-template-columns:repeat(2,1fr)}.login-shell{grid-template-columns:1fr;max-width:500px;gap:15px}.login-intro{text-align:center;padding:5px}.login-intro h1{font-size:42px}.login-intro p{margin-left:auto;margin-right:auto}.login-features{justify-content:center}.login{background:linear-gradient(160deg,#063b2c 0%,#0b6b4d 42%,#f5f9f6 42%,#f5f9f6 100%)} }
@media(max-width:700px){.sidebar{width:280px}.topbar{height:64px}.content{padding:14px 12px 35px}.dashboard-hero{min-height:0;flex-direction:column;align-items:flex-start;padding:24px 20px;border-radius:19px}.dashboard-hero h1{font-size:27px}.dashboard-hero p{font-size:12px;line-height:1.65}.hero-badge{display:none}.dashboard-stats{grid-template-columns:repeat(2,1fr);gap:10px}.stat strong{font-size:28px}.card{border-radius:14px}.workflow{grid-template-columns:1fr 1fr;gap:8px}.workflow i{display:none}.signature-grid,.signature-print-grid{grid-template-columns:1fr}.signature-box{padding:10px}.signature-canvas{height:115px}.report-page{padding:12px;margin-top:12px}.report-identitas{grid-template-columns:1fr!important}.table-wrap{margin-left:-2px;margin-right:-2px}.table-wrap table{min-width:600px}.component-summary{display:grid;grid-template-columns:1fr}.title{gap:10px}.title .actions{width:100%}.title .actions .btn{flex:1}.login{padding:14px}.login-intro{display:none}.login-shell{max-width:440px}.login-card{padding:28px 20px}.login-card h2{font-size:24px}.topbar-brand small{display:none}.userpill{display:none}.hamb{font-size:24px}.modal-box{max-height:84vh}.formgrid,.formgrid.three{grid-template-columns:1fr!important}}
@media(max-width:420px){.dashboard-stats{grid-template-columns:1fr 1fr}.stat{padding:14px}.stat-icon{right:12px;top:12px;width:32px;height:32px}.stat strong{font-size:25px}.workflow{grid-template-columns:1fr}.login-card{padding:24px 17px}.login-school-logo{width:68px;height:68px}}
@media print{html,body{background:#fff!important}.report-page{box-shadow:none;border:0;border-radius:0;margin:0;padding:0;min-height:0;page-break-after:always}.report-page:last-child{page-break-after:auto}.report-page .print-only{display:block!important}.signature-panel{display:none!important}.report-toolbar,.no-print{display:none!important}.content{padding:0!important}.main{margin:0!important;width:100%!important}.kop-surat{display:flex!important}.report-page table{width:100%;table-layout:fixed}.report-page th,.report-page td{font-size:9px;padding:6px 7px}.report-page th:nth-child(1){width:8%}.report-page th:nth-child(3){width:16%}.report-page th:nth-child(4){width:10%}.notes-print{margin-top:10px}.notice{font-size:9px;padding:9px}.component-summary span{font-size:9px;padding:6px}.signature-print{margin-top:25px}.signature-print-grid>div{min-height:150px;font-size:9px}.sig-output{max-width:130px;max-height:62px}.signature-date{font-size:9px}.print-title{font-size:10px}.print-title span{font-size:9px}.kop-school{font-size:16px}.kop-foundation{font-size:9px}.kop-address,.kop-meta{font-size:7px}}

.signature-upload-grid{display:grid;grid-template-columns:repeat(2,1fr);gap:16px}.signature-upload-box{border:1px solid var(--line);border-radius:16px;padding:15px;background:#fff}.upload-title{display:flex;flex-direction:column;gap:4px;margin-bottom:10px}.upload-title span{font-size:11px;color:var(--muted)}.signature-upload-preview{height:130px;border:1px dashed #baccc3;border-radius:12px;background:#fbfdfc;display:flex;align-items:center;justify-content:center;overflow:hidden;margin-bottom:10px;color:var(--muted);font-size:12px}.signature-upload-preview img{max-width:90%;max-height:110px;object-fit:contain}.signature-admin-actions{justify-content:flex-end;margin-top:14px}.signature-delete-row{display:flex;gap:8px;flex-wrap:wrap;margin-top:8px}.signature-delete-row form{margin:0}.report-saved-signature{height:115px;margin-bottom:0}.report-saved-signature img{max-height:95px}.signature-print-grid{grid-template-columns:repeat(2,1fr)}
@media(max-width:700px){.signature-upload-grid{grid-template-columns:1fr}.signature-print-grid{grid-template-columns:1fr}.signature-admin-actions .btn{width:100%}.signature-delete-row form{width:100%}.signature-delete-row .btn{width:100%}}
@media print{.signature-print-grid{grid-template-columns:repeat(2,1fr)}.signature-print-grid>div{min-height:145px}.signature-upload-preview{border:0;background:transparent}}
/* Perbaikan Laporan & Cetak */
.component-print-menu{margin-top:16px}.component-buttons{display:flex;gap:8px;flex-wrap:wrap}.component-page-action{display:flex;justify-content:flex-end;margin-bottom:10px}.empty-state{text-align:center;padding:45px 20px}.empty-state h3{margin-bottom:6px}.report-page{break-after:page;page-break-after:always}.report-page:last-child{break-after:auto;page-break-after:auto}
@media print{.component-page-action{display:none!important}.report-page{display:block!important;width:100%;min-height:0;break-after:page;page-break-after:always}.report-page:last-child{break-after:auto;page-break-after:auto}.report-page .table-wrap{overflow:visible}.report-page table{width:100%}}
@media(max-width:700px){.component-buttons .btn{flex:1 1 calc(50% - 8px);text-align:center}.report-toolbar .actions{display:grid;grid-template-columns:1fr 1fr}.report-toolbar .actions .btn{width:100%}}
/* FINAL REPORT PRINT FIX */
.signature-print-grid{grid-template-columns:repeat(3,minmax(0,1fr));gap:18px;align-items:start}
.signature-print-grid>div{min-height:175px}
@media print{
  .report-page{break-after:page!important;page-break-after:always!important;break-inside:auto!important;page-break-inside:auto!important}
  .report-page:not(:first-child){break-before:page!important;page-break-before:always!important}
  .report-page:last-child{break-after:auto!important;page-break-after:auto!important}
  .signature-print-grid{grid-template-columns:repeat(3,minmax(0,1fr))!important;gap:12px!important}
  .signature-print-grid>div{min-height:145px}
}
@media(max-width:700px){.signature-print-grid{grid-template-columns:1fr!important}}
/* ===== KOP SURAT PRINT - DESKTOP DISELARASKAN DENGAN MOBILE/TABLET ===== */
.kop-surat{max-width:100%;margin:0 auto 8px;padding:6px 0 9px;gap:12px;align-items:center;border-bottom:3px solid #17352a}
.kop-logo{width:68px;min-width:68px;display:flex;align-items:center;justify-content:center}
.kop-logo img{width:58px;height:58px;object-fit:contain}
.kop-text{min-width:0;line-height:1.18;padding:0 4px}
.kop-foundation{font-size:10px;font-weight:700;letter-spacing:.2px}
.kop-school{font-size:17px;font-weight:900;line-height:1.12;text-transform:uppercase}
.kop-address,.kop-meta{font-size:7.5px;line-height:1.3;margin-top:2px}
@media print{
  @page{size:A4 portrait;margin:12mm 14mm 13mm}
  .report-page{width:100%!important;max-width:none!important}
  .kop-surat{width:100%!important;max-width:100%!important;display:flex!important;gap:12px!important;padding:4px 0 8px!important;margin:0 auto 8px!important;border-bottom:3px double #17352a!important;align-items:center!important}
  .kop-logo{width:62px!important;min-width:62px!important}
  .kop-logo img{width:54px!important;height:54px!important}
  .kop-text{padding:0!important;text-align:center!important;line-height:1.15!important}
  .kop-foundation{font-size:9px!important;line-height:1.15!important}
  .kop-school{font-size:15px!important;line-height:1.1!important}
  .kop-address,.kop-meta{font-size:7px!important;line-height:1.25!important;margin-top:2px!important}
  .print-title{margin:8px 0 12px!important}
}
@media(max-width:700px){
  .kop-surat{gap:9px;padding:5px 0 8px}
  .kop-logo{width:55px;min-width:55px}.kop-logo img{width:48px;height:48px}
  .kop-foundation{font-size:8px}.kop-school{font-size:13px}.kop-address,.kop-meta{font-size:6.5px}
}


/* ===== LOGO DINAMIS & TANDA TANGAN PROPORSIONAL ===== */
.side-logo img{width:100%;height:100%;object-fit:contain;padding:5px;background:#fff}
.hero-badge{min-width:230px;min-height:190px;padding:18px 20px}
.hero-logo{width:92px;height:92px;border-radius:22px;padding:8px;background:rgba(255,255,255,.96);box-shadow:0 10px 24px rgba(0,0,0,.12);overflow:hidden}
.hero-logo img{width:100%;height:100%;object-fit:contain;display:block}
.login-school-logo{width:92px;height:92px;border-radius:23px;padding:8px;background:#fff;box-shadow:0 12px 28px rgba(0,60,42,.12)}
.login-school-logo img{width:100%;height:100%;object-fit:contain;display:block}
.signature-upload-preview{height:125px;padding:12px 18px}
.signature-upload-preview img{width:100%;max-width:210px;height:78px;max-height:78px;object-fit:contain;display:block}
.signature-canvas{height:105px}
.sig-image-wrap{height:86px;min-height:86px;display:flex;align-items:flex-end;justify-content:center;overflow:hidden}
.sig-output{width:185px;max-width:88%;height:68px;max-height:68px;object-fit:contain;display:block}
.report-saved-signature{height:105px;padding:8px 14px}
.report-saved-signature img{width:210px;max-width:92%;height:78px;max-height:78px;object-fit:contain}
@media(max-width:700px){
  .hero-badge{min-width:0;width:100%;min-height:0;padding:14px;flex-direction:row;justify-content:flex-start;text-align:left}
  .hero-logo{width:66px;height:66px;border-radius:17px;padding:6px;flex:0 0 66px}
  .login-school-logo{width:84px;height:84px}
  .signature-upload-preview{height:112px}
  .signature-upload-preview img{width:190px;height:68px;max-height:68px}
  .signature-canvas{height:100px}
  .sig-image-wrap{height:78px;min-height:78px}
  .sig-output{width:190px;height:64px;max-height:64px}
  .report-saved-signature{height:98px}
  .report-saved-signature img{height:70px;max-height:70px}
}
@media print{
  .sig-image-wrap{height:82px!important;min-height:82px!important}
  .sig-output{width:175px!important;max-width:88%!important;height:62px!important;max-height:62px!important}
  .report-saved-signature img{width:190px!important;height:68px!important;max-height:68px!important}
}

/* ===== KOP LOGO TENGAH + STEMPEL & E-STATEMENT ===== */
.kop-surat{flex-direction:column!important;justify-content:center!important;align-items:center!important;text-align:center!important;gap:3px!important;padding:6px 0 9px!important}
.kop-logo{width:100%!important;min-width:0!important;height:auto!important;display:flex!important;justify-content:center!important;align-items:center!important}
.kop-logo img{width:64px!important;height:64px!important;object-fit:contain!important;display:block!important}
.kop-text{width:100%!important;text-align:center!important}
.kop-foundation,.kop-school,.kop-address,.kop-meta{display:block!important;text-align:center!important}
.head-sign-cell{position:relative}
.head-name-stamp{position:relative;display:inline-block;min-height:28px;padding:0 4px}
.head-name-stamp strong{position:relative;z-index:1}
.school-stamp-output{position:absolute;z-index:2;width:64px;height:64px;object-fit:contain;left:-42px;top:-19px;opacity:.82;pointer-events:none}
.digital-head-canvas{display:block!important;width:100%!important;height:130px!important;min-height:130px!important}
.stamp-upload-preview{height:150px;border:1px dashed #baccc3;border-radius:12px;background:#fbfdfc;display:flex;align-items:center;justify-content:center;overflow:hidden;margin-bottom:10px;color:var(--muted);font-size:12px}
.stamp-upload-preview img{width:125px;height:125px;object-fit:contain}
.existing-digital-sign{margin-top:10px;padding-top:8px;border-top:1px solid var(--line);font-size:11px;color:var(--muted);display:flex;align-items:center;gap:8px;flex-wrap:wrap}
.existing-digital-sign img{width:190px;height:68px;object-fit:contain}
@media print{
  .kop-surat{display:flex!important;flex-direction:column!important;text-align:center!important;align-items:center!important}
  .kop-logo{width:100%!important}
  .kop-logo img{width:58px!important;height:58px!important}
  .school-stamp-output{width:58px!important;height:58px!important;left:-38px!important;top:-16px!important;opacity:.82}
  .head-name-stamp{min-height:25px}
  .sig-output{width:190px!important;max-width:190px!important;height:70px!important;max-height:70px!important;object-fit:contain!important}
}
@media(max-width:700px){
  .digital-head-canvas{width:100%!important;height:115px!important;min-height:115px!important}
  .stamp-upload-preview{height:125px}
  .stamp-upload-preview img{width:105px;height:105px}
  .school-stamp-output{width:52px;height:52px;left:-34px;top:-13px}
}
/* Penyesuaian posisi stempel sekolah pada blok Kepala Madrasah */
.head-sign-cell{position:relative;overflow:visible}
.head-sign-cell .sig-image-wrap{position:relative;z-index:2;height:82px;justify-content:center}
.head-sign-cell .sig-output{position:relative;z-index:2;max-width:155px;max-height:72px;object-fit:contain}
.head-sign-cell .head-name-stamp{position:relative;z-index:1;display:block}
.head-sign-cell .school-stamp-output{position:absolute;z-index:3;left:calc(50% - 112px);top:69px;width:72px;height:64px;max-width:72px;max-height:64px;object-fit:contain;opacity:.82;transform:rotate(-2deg);pointer-events:none}
@media print{
  .head-sign-cell .sig-image-wrap{height:82px}
  .head-sign-cell .sig-output{max-width:150px;max-height:68px}
  .head-sign-cell .school-stamp-output{left:calc(50% - 103px);top:67px;width:68px;height:60px;max-width:68px;max-height:60px;opacity:.82}
}
@media(max-width:700px){
  .head-sign-cell .school-stamp-output{left:calc(50% - 108px);top:68px;width:66px;height:58px;max-width:66px;max-height:58px}
}


/* ===== STEMPEL 3,8 CM DI AREA E-SIGNATUR KEPALA MADRASAH ===== */
.head-sign-cell{position:relative;overflow:visible}
.head-sign-cell .school-stamp-output{position:absolute;z-index:4;display:block;width:38mm;height:38mm;max-width:38mm;max-height:38mm;object-fit:contain;left:calc(50% - 50mm);top:30px;opacity:.84;transform:rotate(-2deg);pointer-events:none}
.head-sign-cell .sig-image-wrap{position:relative;z-index:2}
@media print{
  .head-sign-cell .school-stamp-output{width:38mm!important;height:38mm!important;max-width:38mm!important;max-height:38mm!important;left:calc(50% - 50mm)!important;top:28px!important;opacity:.84!important}
}
@media(max-width:700px){
  .head-sign-cell .school-stamp-output{width:38mm!important;height:38mm!important;max-width:38mm!important;max-height:38mm!important;left:calc(50% - 49mm)!important;top:28px!important}
}


/* ===== PENYESUAIAN STEMPEL 1 CM & TOMBOL SIMPAN ESIGNATUR ===== */
.head-sign-cell .school-stamp-output{
  width:10mm!important;height:10mm!important;max-width:10mm!important;max-height:10mm!important;
  left:calc(50% - 31mm)!important;top:49px!important;
  object-fit:contain!important;opacity:.86!important;transform:rotate(-2deg);
}
.signature-admin-card .signature-upload-box .signature-admin-save{display:flex;justify-content:flex-start;margin-top:6px}
.signature-admin-card .signature-upload-box .signature-admin-save .btn{margin:0!important}
.signature-admin-actions{display:none!important}
@media print{
  .head-sign-cell .school-stamp-output{width:10mm!important;height:10mm!important;max-width:10mm!important;max-height:10mm!important;left:calc(50% - 31mm)!important;top:49px!important;opacity:.86!important}
}
@media(max-width:700px){
  .head-sign-cell .school-stamp-output{width:10mm!important;height:10mm!important;max-width:10mm!important;max-height:10mm!important;left:calc(50% - 31mm)!important;top:49px!important}
}

/* ===== STEMPEL OTOMATIS MENEMPEL PADA NAMA KEPALA MADRASAH ===== */
.head-sign-cell .head-name-stamp{
  position:relative!important;
  display:inline-block!important;
  min-height:28px;
  padding:0 4px;
  z-index:1;
}
.head-sign-cell .head-name-stamp .school-stamp-output{
  position:absolute!important;
  z-index:4!important;
  width:10mm!important;
  height:10mm!important;
  max-width:10mm!important;
  max-height:10mm!important;
  object-fit:contain!important;
  left:-7mm!important;
  top:50%!important;
  transform:translateY(-50%) rotate(-2deg)!important;
  opacity:.86!important;
  pointer-events:none!important;
}
@media print{
  .head-sign-cell .head-name-stamp .school-stamp-output{
    width:10mm!important;height:10mm!important;
    max-width:10mm!important;max-height:10mm!important;
    left:-7mm!important;top:50%!important;
    transform:translateY(-50%) rotate(-2deg)!important;
  }
}

/* ===== STEMPEL BEHIND TEXT - E-SIGNATUR KEPALA MADRASAH ===== */
.head-sign-cell .head-name-stamp{position:relative!important;z-index:1!important;display:inline-block!important;}
.head-sign-cell .head-name-stamp strong{
  position:relative!important;
  z-index:3!important;
}
.head-sign-cell .head-name-stamp .school-stamp-output{
  position:absolute!important;
  z-index:1!important;
  left:-7mm!important;
  top:50%!important;
  transform:translateY(-50%) rotate(-2deg)!important;
  width:10mm!important;
  height:10mm!important;
  max-width:10mm!important;
  max-height:10mm!important;
  object-fit:contain!important;
  opacity:.86!important;
  pointer-events:none!important;
}
@media print{
  .head-sign-cell .head-name-stamp strong{z-index:3!important}
  .head-sign-cell .head-name-stamp .school-stamp-output{
    z-index:1!important;
    width:10mm!important;height:10mm!important;
    max-width:10mm!important;max-height:10mm!important;
    left:-7mm!important;top:50%!important;
    transform:translateY(-50%) rotate(-2deg)!important;
  }
}

/* ===== STEMPEL TIDAK OVERLAP DENGAN NAMA KEPALA MADRASAH ===== */
.head-sign-cell .head-name-stamp .school-stamp-output{
  left:-12mm!important;
  top:50%!important;
  transform:translateY(-50%) rotate(-2deg)!important;
  z-index:1!important;
}
.head-sign-cell .head-name-stamp strong{position:relative!important;z-index:3!important;}
@media print{
  .head-sign-cell .head-name-stamp .school-stamp-output{
    left:-12mm!important;
    top:50%!important;
    transform:translateY(-50%) rotate(-2deg)!important;
    z-index:1!important;
  }
}

/* ===== IDENTITAS LAPORAN CETAK: RAPI VERTIKAL ===== */
.report-identitas{display:block!important;margin:14px 0 16px!important;padding:8px 0!important;}
.report-identitas .identitas-row{display:grid!important;grid-template-columns:150px 18px minmax(0,1fr)!important;align-items:baseline!important;gap:0!important;min-height:24px!important;line-height:1.45!important;}
.report-identitas .identitas-label{font-weight:700!important;color:#263b33!important;}
.report-identitas .identitas-colon{font-weight:700!important;text-align:center!important;}
.report-identitas .identitas-row>b{font-weight:600!important;min-width:0!important;}
@media print{
  .report-identitas{display:block!important;margin:8px 0 12px!important;padding:0!important;}
  .report-identitas .identitas-row{grid-template-columns:145px 16px minmax(0,1fr)!important;min-height:21px!important;line-height:1.35!important;font-size:10.5pt!important;}
}
@media(max-width:700px){
  .report-identitas .identitas-row{grid-template-columns:125px 16px minmax(0,1fr)!important;font-size:12px!important;}
}

/* ===== CETAK LAPORAN: SAMAKAN DENGAN LAYOUT HP/TABLET ===== */
@media print{
  @page{size:A4 portrait;margin:10mm 11mm 10mm 11mm}
  html,body{width:100%!important;margin:0!important;padding:0!important;background:#fff!important;font-size:12px!important}
  #print-report{width:100%!important;max-width:none!important;margin:0!important;padding:0!important}
  .report-page{width:100%!important;max-width:none!important;margin:0!important;padding:8px 6px!important;box-sizing:border-box!important;border:0!important;box-shadow:none!important;border-radius:0!important;overflow:visible!important}
  .report-page .table-wrap{width:100%!important;overflow:visible!important;margin:8px 0!important}
  .report-page table{width:100%!important;max-width:100%!important;table-layout:fixed!important;border-collapse:collapse!important}
  .report-page th,.report-page td{font-size:9px!important;line-height:1.35!important;padding:5px 5px!important;word-wrap:break-word!important;overflow-wrap:anywhere!important;vertical-align:top!important}
  .report-page th:nth-child(1){width:7%!important}.report-page th:nth-child(2){width:67%!important}.report-page th:nth-child(3){width:14%!important}.report-page th:nth-child(4){width:12%!important}
  .kop-surat{width:100%!important;max-width:100%!important;box-sizing:border-box!important;margin:0 0 8px!important;padding:5px 0 7px!important;display:flex!important;flex-direction:column!important;align-items:center!important;justify-content:center!important;text-align:center!important;gap:2px!important}
  .kop-logo{width:58px!important;height:58px!important;display:flex!important;align-items:center!important;justify-content:center!important;flex:0 0 58px!important}
  .kop-logo img{width:54px!important;height:54px!important;max-width:54px!important;max-height:54px!important;object-fit:contain!important}
  .kop-text{width:100%!important;min-width:0!important;line-height:1.2!important}
  .kop-foundation{font-size:8.5px!important}.kop-school{font-size:15px!important;line-height:1.2!important}.kop-address,.kop-meta{font-size:7px!important;line-height:1.25!important}
  .print-title{font-size:10px!important;line-height:1.35!important;text-align:center!important;margin:5px 0 9px!important}.print-title span{font-size:9px!important}
  .report-identitas{width:100%!important;margin:7px 0 10px!important;padding:0!important}
  .report-identitas .identitas-row{width:100%!important;grid-template-columns:125px 14px minmax(0,1fr)!important;min-height:20px!important;font-size:10px!important;line-height:1.35!important;align-items:baseline!important}
  .report-identitas .identitas-label{font-weight:700!important}.report-identitas .identitas-colon{text-align:center!important}.report-identitas .identitas-row>b{font-weight:600!important}
  .component-summary{width:100%!important;display:grid!important;grid-template-columns:repeat(3,minmax(0,1fr))!important;gap:6px!important;margin:8px 0!important}.component-summary span{font-size:8.5px!important;padding:5px!important;line-height:1.3!important}
  .notes-print{margin-top:9px!important}.notes-print h3{font-size:10px!important;margin:7px 0 4px!important}.notice{font-size:8.5px!important;line-height:1.35!important;padding:6px!important}
  .signature-print{margin-top:18px!important}.signature-date{font-size:8.5px!important;margin-bottom:4px!important}.signature-print-grid{width:100%!important;display:grid!important;grid-template-columns:repeat(3,minmax(0,1fr))!important;gap:10px!important;align-items:start!important}.signature-print-grid>div{min-height:135px!important;font-size:8.5px!important;position:relative!important}.sig-output{max-width:120px!important;max-height:58px!important;object-fit:contain!important}.school-stamp-output{width:10mm!important;height:10mm!important;max-width:10mm!important;max-height:10mm!important;object-fit:contain!important}
  .head-name-stamp{position:relative!important;display:inline-block!important}.head-name-stamp strong{position:relative!important;z-index:3!important;white-space:nowrap!important}.head-name-stamp .school-stamp-output{position:absolute!important;left:-11mm!important;top:50%!important;transform:translateY(-50%)!important;z-index:1!important}
}
