:root{--bg:#f3f6fb;--card:#fff;--ink:#1b2942;--muted:#64748b;--line:#e3e9f2;--primary:#4752b8;--primary-soft:#eef0ff;--red:#c03953;--green:#168463;--shadow:0 12px 34px rgba(28,47,92,.055)}*{box-sizing:border-box}body{margin:0;background:var(--bg);color:var(--ink);font:14px/1.55 Inter,'Segoe UI',Arial,sans-serif}a{text-decoration:none;color:inherit}button,input,select,textarea{font:inherit}button{cursor:pointer}.layout{display:flex;min-height:100vh}.sidebar{width:246px;min-width:246px;background:#fff;border-right:1px solid var(--line);padding:27px 14px;position:sticky;top:0;height:100vh}.brand{display:flex;align-items:center;gap:11px;padding:3px 12px 26px;font-weight:800;letter-spacing:.1px}.mark{background:linear-gradient(135deg,#bd2366,#4b38a7);color:#fff;padding:10px 12px;border-radius:12px}.brand small{display:block;color:var(--muted);font-weight:500;font-size:11px}.nav a{display:flex;align-items:center;gap:10px;padding:12px 14px;border-radius:12px;color:#63728c;font-weight:600;margin-bottom:5px}.nav a.active,.nav a:hover{background:var(--primary-soft);color:var(--primary)}.main{flex:1;min-width:0;padding:28px 34px 48px;max-width:1650px;margin:0 auto;width:100%}.top{display:flex;align-items:center;justify-content:space-between;margin-bottom:24px;gap:12px}.top h1{margin:0;font-size:25px;letter-spacing:-.6px}.sub{color:var(--muted);font-size:13px;margin-top:4px}.toolbar{display:flex;gap:9px;align-items:center;flex-wrap:wrap}.btn{border:1px solid var(--line);background:#fff;color:var(--ink);border-radius:10px;padding:10px 15px;font-weight:700;display:inline-flex;align-items:center;justify-content:center;gap:6px;min-height:41px}.btn:hover{filter:brightness(.98)}.btn.primary{background:var(--primary);border-color:var(--primary);color:#fff}.btn.danger{color:var(--red)}.btn.small{padding:6px 10px;min-height:30px;font-size:12px}.grid{display:grid;gap:16px}.metrics{grid-template-columns:repeat(4,minmax(0,1fr))}.card{background:var(--card);border:1px solid var(--line);border-radius:17px;padding:21px;box-shadow:var(--shadow);min-width:0}.metric .label{color:var(--muted);font-weight:600}.metric .value{font-size:29px;letter-spacing:-1px;font-weight:800;margin-top:8px}.metric .hint{font-size:12px;color:var(--muted)}.split{display:grid;grid-template-columns:1fr 1fr;gap:16px}.section-title{font-size:16px;font-weight:800;margin:0 0 14px}.table-scroll{overflow-x:auto}table{width:100%;border-collapse:collapse}th{font-size:12px;color:#66758a;background:#f8faff;text-align:left;letter-spacing:.2px}th,td{padding:12px 13px;border-bottom:1px solid var(--line);white-space:nowrap}tr:last-child td{border-bottom:0}td .muted{font-size:12px;color:var(--muted)}.pill{font-size:11px;font-weight:800;padding:5px 9px;border-radius:50px;background:#eef2f6;color:#53657c}.pill.green{color:#12785c;background:#e4f7f0}.pill.amber{color:#976100;background:#fff2d4}.actions{display:flex;gap:6px}.form-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px}.field label{display:block;color:#4a5871;font-size:12px;font-weight:750;margin-bottom:6px}.field input,.field select,.field textarea{width:100%;min-height:42px;padding:10px 12px;background:#fff;border:1px solid #d5deeb;border-radius:10px;outline:none;color:var(--ink)}.field input:focus,.field select:focus,.field textarea:focus{border-color:#6876d6;box-shadow:0 0 0 3px #6876d61a}.field.full{grid-column:1/-1}.field textarea{min-height:76px}.head-row{display:flex;justify-content:space-between;align-items:center;gap:10px;margin-bottom:14px}.notice{border-radius:11px;padding:12px 15px;background:#e9f5ef;color:#177456;margin-bottom:20px}.error{background:#fff0f0;color:#a12b43}.empty{color:var(--muted);padding:24px 0;text-align:center}.item-row{display:grid;grid-template-columns:120px minmax(0,1fr) 180px 38px;gap:8px;align-items:center;margin:9px 0}.item-row select,.item-row input{min-width:0;width:100%;height:40px;border:1px solid #d5deeb;border-radius:9px;padding:8px 10px}.item-row .remove{border:0;background:#fff0f3;color:var(--red);border-radius:9px;height:40px}.totals{display:flex;justify-content:flex-end;margin-top:20px}.totals table{max-width:340px}.totals td{padding:6px 10px}.totals tr:last-child{font-size:18px;font-weight:800;color:var(--green)}.login-wrap{min-height:100vh;display:grid;place-items:center;padding:24px}.login-box{width:min(440px,100%)}.login-box h1{margin:2px 0 4px;font-size:25px}.login-box .field{margin:15px 0}.login-box .btn{width:100%}.slip{max-width:820px;margin:auto;background:#fff;padding:38px 45px;color:#20232a;border:1px solid #dae0e9;box-shadow:var(--shadow);font-family:Arial,sans-serif}.slip-header{text-align:center;border-bottom:2px solid #29314c;padding-bottom:16px}.slip-header img{width:115px;max-height:105px;object-fit:contain}.slip-header h2{font-size:20px;margin:4px 0 3px}.slip-header p{margin:2px 0;font-size:12px}.slip-title{text-align:center;font-size:19px;font-weight:800;letter-spacing:1px;margin:25px 0 16px}.slip table th,.slip table td{background:#fff;white-space:normal;border:1px solid #394357;padding:7px 10px;font-size:13px}.slip table th{color:#25314c}.slip .block-heading{font-weight:800;margin:20px 0 7px}.slip .highlight{background:#f1f3ff;font-weight:800}.slip .remaining{background:#f0f8f5;font-weight:800}.signatures{display:grid;grid-template-columns:1fr 1fr;gap:50px;margin-top:45px;text-align:center}.signatures .sign{border-top:1px solid #9aa4b5;padding-top:7px;margin-top:65px;font-weight:700}.slip-foot{margin-top:20px;font-size:12px;color:#697484}.desktop-only{display:block}@media(max-width:1000px){.metrics{grid-template-columns:repeat(2,minmax(0,1fr))}.sidebar{width:205px;min-width:205px}.main{padding:24px 20px}}@media(max-width:680px){.layout{display:block}.sidebar{position:static;width:100%;height:auto;padding:8px 12px;border-bottom:1px solid var(--line)}.brand{padding:6px 4px;font-size:13px}.nav{display:flex;overflow-x:auto;gap:4px;padding-bottom:5px}.nav a{white-space:nowrap;font-size:12px;padding:8px}.main{padding:18px 12px 35px}.top{align-items:flex-start;flex-direction:column}.top h1{font-size:21px}.metrics{gap:10px}.metric{padding:16px}.metric .value{font-size:23px}.split,.form-grid{grid-template-columns:1fr}.item-row{grid-template-columns:92px minmax(0,1fr) 105px 30px;gap:4px}.item-row input,.item-row select{padding:6px;font-size:12px}.card{padding:16px}.slip{padding:20px 14px}.slip table td,.slip table th{font-size:11px;padding:6px}.signatures{gap:10px}}@media print{body{background:#fff}.sidebar,.top,.no-print,.notice{display:none!important}.layout,.main{padding:0!important;margin:0!important;display:block!important}.slip{border:0;box-shadow:none;max-width:none;width:100%;padding:8mm 10mm}.slip .remaining{background:#f0f8f5!important;print-color-adjust:exact}@page{size:A4;margin:10mm}}

/* UMK reference and installment quick actions */
.umk-helper{margin-top:22px;padding:18px;border:1px solid #dce5f5;border-radius:14px;background:#f7faff}
.umk-fields{display:flex;gap:10px;align-items:flex-end;flex-wrap:wrap;margin-top:14px}
.umk-fields .field{flex:1 1 290px;max-width:550px}.umk-fields .btn{min-height:42px}
@media(max-width:680px){.umk-helper{padding:13px}.umk-fields{display:grid;grid-template-columns:1fr}.umk-fields .field{max-width:unset}}

.signatures .signature-role{font-weight:500;font-size:12px;color:#334155;display:inline-block;margin-top:3px}

/* v1.0.5 slip actions */
.slip-actions{display:flex;flex-wrap:wrap;align-items:center;gap:6px;min-width:260px}
.inline-action{margin:0;display:inline-flex}
.slip-actions .btn{white-space:nowrap}
@media(max-width:900px){.slip-actions{min-width:240px}}
@media print{.sidebar,.top,.no-print{display:none!important}}

/* v1.0.6 brand and diagnostics */
.brand-logo{width:45px;height:45px;object-fit:contain;flex-shrink:0;background:transparent;border-radius:0}
.login-logo{display:block;width:170px;max-width:100%;height:auto;object-fit:contain;margin:0 auto 15px}
.diagnostics-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px}
.diag-item{border:1px solid var(--line);background:#f8faff;border-radius:11px;padding:12px;min-width:0;overflow-wrap:anywhere}
.diag-item span{color:var(--muted);display:block;font-size:12px}
.diag-item strong{display:block;font-size:16px;margin-top:6px}
.diagnostic-note{background:#eef1ff;color:#333d85}.diagnostic-note a{font-weight:800}
@media(max-width:900px){.diagnostics-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:480px){.diagnostics-grid{grid-template-columns:1fr}.brand-logo{width:37px;height:37px}}

/* v1.0.7: robust logo sizing, independent of cached rules */
.sidebar .brand{min-width:0;max-width:100%;overflow:hidden}
.sidebar .brand .brand-logo{display:block!important;width:44px!important;height:44px!important;max-width:44px!important;max-height:44px!important;flex:0 0 44px!important;object-fit:contain!important}
.sidebar .brand span{min-width:0;overflow-wrap:anywhere}
.login-box .login-logo{display:block!important;width:170px!important;height:170px!important;max-width:100%!important;object-fit:contain!important}
@media(max-width:680px){.sidebar .brand .brand-logo{width:38px!important;height:38px!important;max-width:38px!important;max-height:38px!important;flex-basis:38px!important}}

/* v1.0.8: tenor fields shown only for angsuran deductions */
.item-row .tenor-field{display:none}.item-row.tenor-row{grid-template-columns:120px minmax(150px,1fr) 80px 105px 155px 38px}.item-row.tenor-row .tenor-field{display:block}.item-row.tenor-row .tenor-field::placeholder{font-size:11px}@media(max-width:850px){.item-row.tenor-row{grid-template-columns:92px minmax(0,1fr) 98px 30px}.item-row.tenor-row .tenor-field{grid-column:auto;grid-row:auto}.item-row.tenor-row input[name="description[]"]{grid-column:2 / -1}.item-row.tenor-row .tenor-field{grid-column:2 / 3}.item-row.tenor-row input[name="amount[]"]{grid-column:3 / 4}.item-row.tenor-row .remove{grid-column:4}}


/* v1.0.11 — Faktur slip payroll A4 satu lembar, Chrome/Edge print */
@page { size: A4 portrait; margin: 8mm; }
@media print {
  html,body{width:100%!important;min-height:0!important;margin:0!important;padding:0!important;background:#fff!important}
  .layout,.main{display:block!important;width:100%!important;max-width:none!important;min-height:0!important;margin:0!important;padding:0!important}
  .sidebar,.top,.toolbar,.no-print,.notice,.diagnostic-note{display:none!important}
  .slip{box-sizing:border-box!important;display:block!important;width:194mm!important;max-width:194mm!important;min-height:0!important;max-height:none!important;margin:0 auto!important;padding:3mm 4mm!important;border:0!important;box-shadow:none!important;border-radius:0!important;font-family:Arial,sans-serif!important;font-size:10pt!important;line-height:1.25!important;overflow:visible!important;break-inside:avoid!important;page-break-inside:avoid!important;transform-origin:top center!important}
  .slip-header{padding:0 0 2mm!important;border-bottom:1px solid #29314c!important}
  .slip-header img{display:block!important;width:auto!important;height:auto!important;max-width:31mm!important;max-height:18mm!important;margin:0 auto 1mm!important;object-fit:contain!important}
  .slip-header h2{font-size:13pt!important;margin:0 0 1mm!important;line-height:1.2!important}
  .slip-header p{font-size:8pt!important;margin:0!important;line-height:1.22!important}
  .slip-title{font-size:12pt!important;margin:3mm 0 2mm!important;line-height:1.2!important}
  .slip table{width:100%!important;border-collapse:collapse!important;table-layout:fixed!important}
  .slip table th,.slip table td{font-size:9pt!important;line-height:1.15!important;padding:1.2mm 2mm!important;white-space:normal!important;overflow-wrap:anywhere!important;border:1px solid #394357!important}
  .slip .block-heading{font-size:10pt!important;margin:3mm 0 1.5mm!important}
  .slip>p{font-size:9pt!important;margin:3mm 0 0!important;line-height:1.2!important}
  .signatures{margin-top:5mm!important;gap:10mm!important;break-inside:avoid!important;page-break-inside:avoid!important;font-size:9pt!important}
  .signatures .sign{margin-top:16mm!important;padding-top:1mm!important;line-height:1.1!important}
  .slip-foot{margin-top:3mm!important;font-size:7.5pt!important;line-height:1.15!important}
  .slip .highlight,.slip .remaining{print-color-adjust:exact!important;-webkit-print-color-adjust:exact!important}
}

/* v1.0.12 — A4 proporsional, isi lebih besar dan memanfaatkan tinggi halaman */
@page { size: A4 portrait; margin: 9mm; }
@media print {
  .slip {
    width:192mm!important;max-width:192mm!important;
    padding:5mm 5mm!important;
    font-size:11pt!important;line-height:1.4!important;
  }
  .slip-header {padding-bottom:4mm!important;}
  .slip-header img {max-height:25mm!important;max-width:43mm!important;margin-bottom:2mm!important;}
  .slip-header h2 {font-size:16pt!important;margin:1mm 0!important;}
  .slip-header p {font-size:9pt!important;line-height:1.35!important;}
  .slip-title {font-size:14pt!important;margin:6mm 0 4mm!important;}
  .slip table th,.slip table td {
    font-size:10pt!important;line-height:1.28!important;
    padding:2.2mm 2.5mm!important;
  }
  .slip .block-heading {font-size:11pt!important;margin:5mm 0 2mm!important;}
  .slip>p {font-size:10pt!important;margin-top:5mm!important;line-height:1.35!important;}
  .signatures {margin-top:9mm!important;gap:14mm!important;font-size:10pt!important;}
  .signatures .sign {margin-top:23mm!important;padding-top:2mm!important;line-height:1.3!important;}
  .signatures .signature-role {font-size:9pt!important;}
  .slip-foot {margin-top:7mm!important;font-size:8pt!important;}
  .slip table tr {break-inside:avoid!important;page-break-inside:avoid!important;}
}


/* v1.0.13 — final invoice layout with real signature + company stamp */
.signatures{display:grid;grid-template-columns:1fr 1fr;gap:34px;align-items:end;margin-top:30px;text-align:center}
.sig-box{position:relative}
.sig-label{font-size:12px;margin-bottom:4px}
.sig-visual{position:relative;height:86px;display:flex;align-items:center;justify-content:center;margin-bottom:6px}
.sig-visual.employee{height:86px}
.sig-visual .stamp-img{position:absolute;left:50%;top:50%;transform:translate(-50%,-50%);width:90px;max-width:90px;opacity:.28;z-index:1;object-fit:contain}
.sig-visual .sign-img{position:relative;z-index:2;max-width:78px;max-height:62px;object-fit:contain;filter:grayscale(100%) contrast(1.2)}
.signatures .sign.sign-line{display:inline-block;min-width:140px;border-top:1px solid #9aa4b5;padding-top:5px;margin-top:0;font-weight:700;line-height:1.15}
.signatures .signature-role{font-weight:500;font-size:12px;color:#334155;display:inline-block;margin-top:3px}

@media print {
  .signatures{grid-template-columns:1fr 1fr!important;gap:12mm!important;margin-top:6mm!important;align-items:end!important}
  .sig-label{font-size:9pt!important;margin-bottom:1.2mm!important}
  .sig-visual{height:26mm!important;margin-bottom:1.5mm!important;break-inside:avoid!important;page-break-inside:avoid!important}
  .sig-visual.employee{height:26mm!important}
  .sig-visual .stamp-img{width:28mm!important;max-width:28mm!important;opacity:.26!important}
  .sig-visual .sign-img{max-width:24mm!important;max-height:18mm!important;filter:grayscale(100%) contrast(1.25)!important}
  .signatures .sign.sign-line{min-width:38mm!important;padding-top:1.2mm!important;font-size:9pt!important;line-height:1.15!important}
  .signatures .signature-role{font-size:8pt!important;margin-top:1mm!important}
}

@media (max-width:680px){
  .signatures{gap:14px}
  .sig-visual{height:78px}
  .sig-visual .stamp-img{width:76px;max-width:76px}
  .sig-visual .sign-img{max-width:72px;max-height:58px}
  .signatures .sign.sign-line{min-width:110px}
}


/* v1.0.14 — corporate A4 letterhead, true black signature, angled transparent stamp */
.slip-header{padding-bottom:14px;border-bottom:3px double #5a246f}
.corporate-head{display:flex;align-items:center;gap:18px;justify-content:center;text-align:left}
.slip-header .corporate-logo{width:125px;height:76px;max-width:125px;max-height:76px;object-fit:contain;flex-shrink:0}
.corporate-detail{min-width:0}
.corporate-detail h2{margin:0 0 5px;font-size:21px;line-height:1.2;letter-spacing:.35px;color:#241a38}
.corporate-detail p{margin:2px 0;font-size:11px;color:#495068}
.sig-visual .stamp-img{transform:translate(-50%,-50%) rotate(-9deg);width:108px;max-width:108px;opacity:.6}
.sig-visual .sign-img{max-width:112px;max-height:75px;filter:none}
@media print {
  .slip-header{padding:0 0 3mm!important;border-bottom:1.2pt double #5a246f!important}
  .corporate-head{display:flex!important;align-items:center!important;justify-content:center!important;text-align:left!important;gap:5mm!important}
  .slip-header .corporate-logo{display:block!important;width:31mm!important;max-width:31mm!important;height:21mm!important;max-height:21mm!important;margin:0!important;object-fit:contain!important}
  .corporate-detail h2{font-size:15pt!important;margin:0 0 1mm!important;letter-spacing:.15pt!important;line-height:1.15!important}
  .corporate-detail p{font-size:8.4pt!important;line-height:1.25!important;margin:.4mm 0!important}
  .slip-title{margin-top:5mm!important}
  .sig-visual .stamp-img{width:29mm!important;max-width:29mm!important;opacity:.58!important;transform:translate(-50%,-50%) rotate(-9deg)!important;print-color-adjust:exact!important;-webkit-print-color-adjust:exact!important}
  .sig-visual .sign-img{max-width:28mm!important;max-height:19mm!important;filter:none!important;print-color-adjust:exact!important;-webkit-print-color-adjust:exact!important}
  .sig-visual{height:25mm!important}
  .sig-visual.employee{height:25mm!important}
  .slip table th,.slip table td{font-size:9.7pt!important;padding:1.85mm 2.5mm!important}
  .signatures{margin-top:7mm!important}
}
@media(max-width:680px){.corporate-head{gap:8px}.slip-header .corporate-logo{width:65px;height:55px}.corporate-detail h2{font-size:15px}.corporate-detail p{font-size:9px}}

/* v1.0.15: hard image size bounds; prevents stale cached styles from exploding seal */
.slip .signatures .sig-visual{width:100%!important;height:95px!important;max-height:95px!important;position:relative!important}
.slip .signatures .sig-visual img.stamp-img{width:106px!important;height:106px!important;max-width:106px!important;max-height:106px!important;object-fit:contain!important;opacity:.34!important}
.slip .signatures .sig-visual img.sign-img{width:112px!important;height:76px!important;max-width:112px!important;max-height:76px!important;object-fit:contain!important}
@media print{.slip .signatures .sig-visual{height:27mm!important;max-height:27mm!important}.slip .signatures .sig-visual img.stamp-img{width:29mm!important;height:29mm!important;max-width:29mm!important;max-height:29mm!important}.slip .signatures .sig-visual img.sign-img{width:28mm!important;height:19mm!important;max-width:28mm!important;max-height:19mm!important}}

/* Invoice Project: separate A4 print style */
.project-paper{background:#fff;border:1px solid #dbe2ec;max-width:900px;margin:0 auto;padding:36px 44px;color:#1b2942;box-shadow:0 10px 30px #1b294218;font-family:Arial,sans-serif}
.project-head{display:flex;align-items:center;gap:18px;border-bottom:3px double #394a77;padding-bottom:16px}.project-head img{max-width:94px;height:66px;object-fit:contain}.project-head strong{font-size:19px}.project-head div div{font-size:11px;margin-top:4px}.project-heading{text-align:center;margin:24px 0}.project-heading h2{margin:0;font-size:22px;letter-spacing:2px}.project-heading p{margin:3px 0;color:#64748b}.project-meta{display:grid;grid-template-columns:1.5fr 1fr;gap:28px;margin:22px 0}.project-meta p{margin:5px 0 13px;line-height:1.4}.project-table{width:100%;border-collapse:collapse}.project-table th,.project-table td{border:1px solid #cad4e2;white-space:normal;padding:8px 9px;text-align:left;font-size:12px}.project-table th{background:#eef2f9;color:#1b2942}.project-summary{max-width:350px;margin:20px 0 0 auto}.project-summary>div{display:flex;justify-content:space-between;gap:16px;padding:7px;border-bottom:1px solid #dce3ed}.project-summary>.project-due{font-size:16px;border-top:2px solid #34446b}.project-notes{margin:18px 0;font-size:12px}.project-footer{margin-top:34px;display:grid;grid-template-columns:1fr 1fr;gap:30px;text-align:center;font-size:12px}.project-sign-space{height:68px}.project-footer small{color:#73829a}
@media(max-width:680px){.project-paper{padding:18px}.project-meta{grid-template-columns:1fr 1fr;gap:10px}.project-head strong{font-size:14px}}
@page{size:A4 portrait;margin:9mm}
@media print{.project-paper{width:192mm;max-width:192mm;padding:6mm 7mm!important;margin:0 auto!important;box-shadow:none!important;border:0!important;font-size:10pt}.project-head img{max-width:29mm;max-height:18mm}.project-table th,.project-table td{font-size:9pt;padding:1.5mm 2mm}.project-heading{margin:4mm 0}.project-meta{margin:4mm 0}.project-summary{margin:4mm 0 0 auto}.project-footer{margin-top:7mm}.project-sign-space{height:19mm}.project-paper tr,.project-footer{break-inside:avoid;page-break-inside:avoid}}

/* v1.0.17 Invoice Project — layout referensi corporate ungu-merah */
.corporate-project{--purple:#290c57;--red:#e60035;max-width:900px;margin:auto;padding:24px 28px!important;background:#fff;color:#1b2130;font-family:Arial,sans-serif;overflow:hidden}
.corporate-letterhead{display:flex;align-items:center;gap:25px;border-bottom:3px solid #d90035;padding:3px 0 14px;min-width:0}
.corporate-letterhead img{width:180px!important;max-width:31%!important;height:auto!important;max-height:145px!important;object-fit:contain;flex:0 0 auto}
.corporate-letterhead>div{border-left:1px solid #aaa;padding-left:20px;min-width:0}
.corporate-letterhead h2{font-size:18px;color:var(--purple);margin:0 0 4px;line-height:1.2}
.corporate-letterhead strong{font-size:11px;color:var(--red)}.corporate-letterhead p{margin:5px 0;font-size:11px;line-height:1.35}
.project-titlebar{display:grid;grid-template-columns:1fr 1fr;gap:16px;margin:18px 0 20px}
.project-titlebar h1{font-size:25px;color:var(--purple);margin:3px 0 5px}.project-titlebar p{font-size:12px;margin:5px 0}
.project-invoice-info{border:1px solid #ddd;border-radius:5px;overflow:hidden;font-size:11px}
.project-invoice-info>div{display:grid;grid-template-columns:39% 61%;border-bottom:1px solid #ddd;min-width:0}
.project-invoice-info>div:last-child{border:0}.project-invoice-info b,.project-invoice-info span{padding:6px 8px;overflow-wrap:anywhere}.project-invoice-info b{background:#faf8fc;color:var(--purple)}
.project-group-label{background:linear-gradient(100deg,var(--purple),var(--red));color:white;display:table;padding:4px 13px;border-radius:4px 4px 0 0;font-size:12px;margin:11px 0 0}
.corporate-table{width:100%;table-layout:fixed;border-collapse:collapse;margin:0 0 7px!important}
.corporate-table th{background:linear-gradient(105deg,var(--purple),var(--red));color:white;border:1px solid #ddd;text-align:center;font-size:10px;white-space:normal}
.corporate-table td{white-space:normal!important;border:1px solid #ddd!important;font-size:10px!important;padding:7px 5px!important;overflow-wrap:anywhere}
.corporate-table th:nth-child(1){width:5%}.corporate-table th:nth-child(2){width:27%}.corporate-table th:nth-child(3){width:17%}.corporate-table th:nth-child(4){width:7%}.corporate-table th:nth-child(5){width:9%}.corporate-table th:nth-child(6){width:17%}.corporate-table th:nth-child(7){width:18%}
.corporate-table .project-subtotal td{text-align:right;font-weight:bold;background:#faf9fb!important}.corporate-table .project-subtotal td:last-child{color:#dc123a;font-size:12px!important}
.project-bottom{display:grid;grid-template-columns:1fr 1fr;gap:18px;margin-top:16px}.project-payment h3{color:var(--purple);font-size:12px;margin:0 0 5px}.project-payment p{font-size:11px;border:1px solid #ddd;padding:9px;margin:0 0 12px;line-height:1.6}.corporate-project .project-summary{margin:0;width:100%;font-size:11px}.corporate-project .project-summary>div{padding:7px;border:1px solid #ddd;display:flex;justify-content:space-between;gap:10px}.corporate-project .project-summary .project-grand{background:linear-gradient(100deg,var(--purple),var(--red));color:white;font-weight:800;font-size:14px}.corporate-project .project-summary .project-approval{display:block;text-align:center;border:none;line-height:1.4;padding-top:12px}.corporate-project .project-approval .project-sign-space{height:44px}.project-footer-band{background:linear-gradient(100deg,var(--purple),var(--red));color:white;text-align:center;font-style:italic;padding:6px;margin:14px -28px -24px;font-size:11px}
@media(max-width:650px){.corporate-project{padding:13px!important}.corporate-letterhead{gap:10px}.corporate-letterhead img{width:100px!important}.corporate-letterhead>div{padding-left:10px}.corporate-letterhead h2{font-size:13px}.project-titlebar{grid-template-columns:1fr}.project-bottom{grid-template-columns:1fr}.project-footer-band{margin:12px -13px -13px}.corporate-project{overflow-x:auto}}
@media print{@page{size:A4 portrait;margin:9mm}.corporate-project{width:100%!important;max-width:100%!important;border:0!important;box-shadow:none!important;padding:0!important;overflow:visible!important;break-inside:auto!important}.corporate-letterhead img{max-width:35mm!important;max-height:25mm!important}.corporate-letterhead h2{font-size:13pt!important}.project-titlebar{margin:4mm 0!important}.project-titlebar h1{font-size:19pt!important}.corporate-table th,.corporate-table td{font-size:8pt!important;padding:1.4mm!important}.project-group-label{font-size:9pt!important;padding:1mm 3mm!important}.project-bottom{margin-top:3mm!important}.project-footer-band{margin:3mm 0 0!important}.corporate-table tr{break-inside:avoid;page-break-inside:avoid}.corporate-project{font-size:9pt!important;print-color-adjust:exact!important;-webkit-print-color-adjust:exact!important}}
/* v1.1.9 — RAB FTTH */
.rab-table{min-width:950px}.rab-table td{padding:7px 5px}.rab-table input{width:100%;min-width:75px;border:1px solid var(--line);border-radius:8px;padding:10px 8px;color:var(--ink)}.rab-table td:nth-child(2){min-width:230px}.rab-table td:nth-child(4){width:95px}.rab-table td:nth-child(5){width:145px}.rab-line{font-weight:750;white-space:nowrap}.rab-summary>div,.rab-total-table>div{display:flex;justify-content:space-between;gap:20px;padding:10px 0;border-bottom:1px solid var(--line)}.rab-summary .rab-grand,.rab-total-table .rab-grand{font-weight:800;color:var(--primary);font-size:18px;border-top:2px solid var(--line);margin-top:9px}.rab-letterhead{display:flex;gap:15px;align-items:center;border-bottom:2px solid var(--ink);padding-bottom:15px}.rab-letterhead img{width:75px;height:75px;object-fit:contain}.rab-letterhead h2{margin:0;font-size:18px}.rab-letterhead p{margin:2px 0;font-size:12px;color:var(--muted)}.rab-title{text-align:center;font-size:20px;margin:25px 0}.rab-info{display:grid;grid-template-columns:1fr 1fr;gap:9px;margin-bottom:20px}.rab-detail-table th,.rab-detail-table td{white-space:normal;padding:8px;border:1px solid #dce3ed}.rab-n{text-align:right;white-space:nowrap!important}.rab-total-table{max-width:450px;margin:18px 0 20px auto}.rab-sign{display:grid;grid-template-columns:1fr 1fr;gap:30px;text-align:center;margin:40px 0 25px}.rab-sign-line{border-top:1px solid #8790a0;margin:65px auto 0;max-width:220px;padding-top:6px;font-weight:700}
@media(max-width:680px){.rab-info{grid-template-columns:1fr}.rab-letterhead h2{font-size:14px}.rab-detail-table{min-width:760px}}
@media print{@page{size:A4 portrait;margin:12mm}.rab-print{width:100%;padding:0;border:0;box-shadow:none}.rab-print .table-scroll{overflow:visible}.rab-detail-table{width:100%;font-size:9px}.rab-detail-table th,.rab-detail-table td{padding:4px!important;overflow-wrap:anywhere}.rab-letterhead img{width:60px;height:60px}.rab-title{font-size:16px;margin:14px 0}.rab-info{font-size:11px;margin-bottom:10px}.rab-total-table{font-size:11px}.rab-sign{break-inside:avoid}.rab-print tr{break-inside:avoid}}

/* v1.2.0 HR attendance and cash advances */
.hr-space{margin-top:18px}.hr-head{display:flex;align-items:center;justify-content:space-between;gap:12px;flex-wrap:wrap}.hr-filter{display:flex;gap:8px;flex-wrap:wrap;align-items:center}.hr-filter input{min-height:41px;border:1px solid var(--line);border-radius:9px;padding:7px 10px}.hr-space .field{margin-bottom:12px}.hr-space .form-grid{align-items:end}.hr-space table td{white-space:normal}@media(max-width:680px){.hr-head{align-items:flex-start}.hr-space{margin-top:12px}}
/* v1.2.1 - camera scanner & printable employee ID card */
.scanner-frame{position:relative;min-height:220px;background:#111c33;color:#e1e9ff;border-radius:15px;overflow:hidden;margin-top:14px;display:grid;place-items:center}
.scanner-frame video{display:block;width:100%;height:260px;object-fit:cover}
.scanner-hint{position:absolute;bottom:0;left:0;right:0;text-align:center;padding:9px;background:#111c33dc;font-size:12px}
.id-print-area{margin-top:18px;display:flex;justify-content:center}
.id-card{width:86mm;height:54mm;border:1px solid #dce3ee;border-radius:12px;background:linear-gradient(155deg,#ffffff 75%,#e9eefe);box-shadow:0 10px 26px #17233f22;padding:4mm;overflow:hidden;color:#17233f;font-family:Arial,sans-serif}
.id-card-header{display:flex;align-items:center;gap:7px;border-bottom:1px solid #cdd6e6;padding-bottom:5px}.id-card-header img{width:28px;height:28px;object-fit:contain}.id-card-header b{font-size:9px;display:block;line-height:1.1}.id-card-header small{display:block;font-size:7px;letter-spacing:.4px}
.id-card-main{display:flex;align-items:center;gap:9px;margin-top:7px}.id-avatar{width:43px;height:43px;border-radius:7px;background:#e7ebfa;display:grid;place-items:center;color:#6a7392;font-weight:bold}.id-card-main strong{font-size:13px;display:block;line-height:1.2}.id-card-main div div{font-size:10px}.id-card-main small{font-size:8px}.id-card-main p{font-size:9px;margin:3px 0}
.id-code{text-align:center;margin-top:1px}.id-barcode{width:100%;max-width:250px;height:38px}.id-code small{font-size:8px;display:block;line-height:1}.id-footer{text-align:center;font-size:7px;color:#5a6880;margin-top:2px}
@media print{body:has(.id-print-area) .sidebar,body:has(.id-print-area) .top,body:has(.id-print-area) .no-print,body:has(.id-print-area) .notice{display:none!important}body:has(.id-print-area) .main{padding:0!important}body:has(.id-print-area) .id-print-area{display:block;margin:0}body:has(.id-print-area) .id-card{box-shadow:none;break-inside:avoid;print-color-adjust:exact;-webkit-print-color-adjust:exact}@page{size:A4;margin:10mm}}

/* v1.2.2 camera scanner compatibility */
.scan-reader{width:100%;min-height:180px;color:#fff} .scan-reader video{width:100%!important;max-height:340px;object-fit:contain;border-radius:8px}.scan-reader #html5Scanner__dashboard{background:#fff;color:#1b2940;padding:8px;border-radius:8px}.scan-reader button{cursor:pointer}.scanner-frame{overflow:hidden}.scanner-frame:has(.scan-reader video) .scanner-hint{position:static;padding:10px 0;color:#dbeafe;background:transparent}

/* v1.3.2 · refined Smarttech portrait CR80 ID card layout (anti-overlap) */
.smart-id-print-area{display:flex;gap:24px;flex-wrap:wrap;justify-content:center;align-items:flex-start;margin:20px 0 10px}
.smart-id-card{width:54mm;min-height:85.6mm;position:relative;display:flex;flex-direction:column;flex:0 0 auto;overflow:hidden;border-radius:14px;box-shadow:0 12px 30px #08183933;font-family:Arial,Helvetica,sans-serif;isolation:isolate;color:white;background:#0a2369;print-color-adjust:exact;-webkit-print-color-adjust:exact}
.smart-id-card::before{content:'';position:absolute;inset:0;background:radial-gradient(circle at 110% 38%,#2367db99,transparent 55%),linear-gradient(150deg,#0b1b55,#063887 65%,#09235f);z-index:-2}
.smart-id-front,.smart-id-back{padding-bottom:0}
.smart-id-brand{min-height:22mm;background:#f9fbff;display:flex;align-items:center;justify-content:center;gap:2mm;padding:3mm 2.5mm;color:#0e1973;text-align:left}
.smart-id-brand img{width:17mm;height:16mm;object-fit:contain}.smart-id-brand div{min-width:0}.smart-id-brand b,.smart-id-brand strong{display:block;font-size:11px;line-height:1.08;white-space:nowrap}.smart-id-brand small{font-size:5.4px;letter-spacing:1px;color:#9c1235}
.smart-id-waves{height:4mm;background:linear-gradient(160deg,#d31930 0 42%,#f5aa13 44% 60%,transparent 62%)}
.smart-id-body{display:flex;flex-direction:column;align-items:center;text-align:center;padding:1.8mm 2.6mm 0;gap:1.4mm;flex:1}
.smart-id-photo-wrap{width:25mm;height:30mm;border:2.5px solid #efba47;border-radius:8px;overflow:hidden;box-shadow:0 3px 12px #010d2988;background:#fff;flex:0 0 auto}
.smart-id-photo{width:100%;height:100%;object-fit:cover;display:block}
.smart-id-empty-photo{height:100%;display:flex;flex-direction:column;justify-content:center;align-items:center;color:#8b96ae;background:linear-gradient(130deg,#fff,#e5eaf6)}.smart-id-empty-photo span{font-size:13px;letter-spacing:1px}.smart-id-empty-photo small{font-size:7px}
.smart-id-person{width:100%;display:flex;flex-direction:column;align-items:center;gap:1.1mm;min-height:17mm}.smart-id-person strong{display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;font-size:13.2px;line-height:1.12;overflow-wrap:anywhere;max-width:100%}.smart-id-person span{display:block;font-size:8.4px;font-weight:bold;background:#c71d35;padding:2px 8px;border-radius:12px;max-width:92%;line-height:1.2;white-space:normal;overflow-wrap:anywhere}.smart-id-person small{font-size:6.9px;color:#e2eafa;line-height:1.15;max-width:100%;overflow-wrap:anywhere}
.smart-id-employee-code{margin:0;padding:1.2mm 3.4mm;border-radius:15px;color:#081a59;background:linear-gradient(90deg,#ffcc58,#e9a52b);font-weight:900;font-size:10.4px;line-height:1.1;max-width:88%;text-align:center;overflow-wrap:anywhere}
.smart-id-barcode{background:#fff;border-radius:5px;width:47mm;min-height:13mm;margin:0 auto;display:flex;align-items:center;justify-content:center;flex-direction:column;padding:1mm 2mm;color:#182446;gap:.6mm}.smart-id-front .smart-id-barcode{margin-top:auto}.smart-id-barcode .id-barcode{width:100%;height:7.2mm;max-width:none}.smart-id-barcode span{font-size:5.8px;letter-spacing:.7px;line-height:1;word-break:break-all;text-align:center}
.smart-id-bottom{position:static;background:linear-gradient(105deg,#d11d34,#ffb92c);min-height:6mm;display:flex;align-items:center;justify-content:center;font-size:6.1px;font-weight:bold;letter-spacing:.15px;text-align:center;padding:0 2mm;margin-top:1.6mm}
.smart-id-backhead{min-height:24mm;display:flex;gap:2mm;align-items:center;justify-content:center;padding:0 2.5mm}.smart-id-backhead img{width:17mm;height:17mm;object-fit:contain}.smart-id-backhead b,.smart-id-backhead strong{display:block;font-size:12px;line-height:1.12}
.smart-id-backband{height:5mm;background:linear-gradient(160deg,#e51b31 20%,#f5ad16 35% 46%,transparent 48%)}
.smart-id-backinfo{padding:2.2mm 5mm 0;display:grid;gap:2.2mm}.smart-id-backinfo div{border-bottom:1px solid #ffffff55;padding-bottom:1.1mm;min-height:8.5mm}.smart-id-backinfo small{display:block;color:#ffca59;font-size:5.8px;letter-spacing:.5px}.smart-id-backinfo b{font-size:8.8px;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;overflow-wrap:anywhere;line-height:1.18}
.smart-id-backcode{display:flex;flex-direction:column;align-items:center;color:#162248;background:#fff;border-radius:5px;padding:1mm 1.5mm;margin:2.5mm 5mm 0;min-height:13mm;gap:.5mm}.smart-id-backcode .id-barcode{width:100%;height:7mm}.smart-id-backcode span{font-size:5.7px;line-height:1;word-break:break-all;text-align:center}
.smart-id-notice{padding:2mm 5mm 1.8mm;font-size:6.5px;line-height:1.28;text-align:center;color:#f3f6ff}
.smart-id-web{position:static;min-height:7mm;display:grid;place-items:center;font-size:10.2px;font-weight:bold;background:linear-gradient(95deg,#bd1932,#ed9c1f);margin-top:auto;padding:0 2mm;text-align:center}
.smart-id-actions{display:flex;gap:10px;justify-content:center;flex-wrap:wrap;margin:10px 0 20px}.smart-id-actions .btn{min-width:250px;justify-content:center;text-align:center}.smart-card-tools{max-width:760px;margin:15px auto}.smart-card-tools input[type=file]{max-width:100%;font-size:13px}
@media(max-width:700px){.smart-id-print-area{gap:16px}.smart-id-actions .btn{min-width:0;width:100%}}
@media print{
 @page{size:A4 portrait;margin:12mm}
 body:has(.smart-id-print-area) .sidebar,body:has(.smart-id-print-area) .top,body:has(.smart-id-print-area) .no-print,body:has(.smart-id-print-area) .notice{display:none!important}
 body:has(.smart-id-print-area) .main{padding:0!important;max-width:none!important}
 body:has(.smart-id-print-area) .smart-id-print-area{display:flex!important;flex-wrap:nowrap!important;justify-content:flex-start!important;align-items:flex-start!important;gap:12mm!important;margin:0!important}
 body:has(.smart-id-print-area) .smart-id-card{box-shadow:none!important;border-radius:2mm!important;width:54mm!important;height:85.6mm!important;break-inside:avoid;page-break-inside:avoid;print-color-adjust:exact!important;-webkit-print-color-adjust:exact!important}
}

/* Corporate brand v1.2.5 */
:root{--bg:#f1f5fc;--card:#fff;--ink:#10265b;--muted:#667791;--line:#dce5f2;--primary:#142c79;--primary-soft:#eaf1ff;--red:#bf1e2e;--gold:#f5a900;--green:#147a5b;--shadow:0 12px 34px rgba(13,36,88,.065)}
body{background:var(--bg);color:var(--ink)}
.sidebar{background:linear-gradient(180deg,#0d2158 0%,#102e7c 67%,#09204f 100%);border-right:1px solid #0d2865;box-shadow:5px 0 28px rgba(16,37,85,.07)}
.sidebar .brand{color:#fff;padding:7px 10px 19px;border-bottom:1px solid rgba(255,255,255,.13);margin-bottom:15px;gap:11px}
.sidebar .brand small{color:#d4def5;font-size:10px;line-height:1.35;margin-top:4px}
.sidebar .brand .brand-logo{padding:0;background:transparent!important;border-radius:0;box-shadow:none}
.sidebar .nav a{color:#e5ebfb;transition:background .18s ease,transform .18s ease}
.sidebar .nav a:hover{background:rgba(255,255,255,.11);color:#fff;transform:translateX(2px)}
.sidebar .nav a.active{background:linear-gradient(100deg,#fff 0%,#f2f5fe 100%);color:#102a75;box-shadow:inset 4px 0 0 #e6a219,0 5px 18px rgba(0,0,0,.09)}
.main .top h1{color:#10275c;letter-spacing:-.5px}
.main .top{border-bottom:1px solid #dce5f2;padding-bottom:17px;margin-bottom:20px}
.card{border:1px solid #dce5f2;box-shadow:var(--shadow)}
.btn.primary,button.btn.primary{background:linear-gradient(115deg,#102a78,#21449f);border-color:#102c7d;color:#fff;box-shadow:0 4px 10px rgba(20,49,129,.12)}
.btn.primary:hover,button.btn.primary:hover{background:#102561}
.btn.danger{background:#b91f34;color:#fff}
input:focus,select:focus,textarea:focus{outline:2px solid rgba(245,169,0,.25);border-color:#31519e}
.section-title{color:#102a6b}.metric .value{color:#112d79}
.login-wrap{background:radial-gradient(circle at 19% 13%,rgba(245,169,0,.11),transparent 27%),radial-gradient(circle at 90% 85%,rgba(191,30,46,.09),transparent 25%),linear-gradient(135deg,#f6f8ff,#e9effb)}
.login-box{border-top:5px solid #dba019;box-shadow:0 26px 75px rgba(13,36,83,.13);padding:30px 28px}
.login-box .login-logo{display:block!important;width:min(100%,320px)!important;height:auto!important;max-height:145px!important;object-fit:contain!important;margin:0 auto 17px!important}
.login-box h1{color:#10275c}
.setup-logo{width:min(100%,290px);height:auto;max-height:128px;object-fit:contain;margin:2px auto 15px;display:block;filter:drop-shadow(0 10px 22px rgba(0,0,0,.14))}
.corporate-head .corporate-logo,.corporate-letterhead img,.rab-letterhead img{object-fit:contain}
.corporate-head .corporate-logo{max-width:180px!important;width:180px!important;max-height:80px!important;height:auto!important}
.corporate-letterhead,.rab-letterhead{border-bottom:3px solid #c11e2e}
.slip-title,.rab-title{color:#102a6e}
@media(max-width:680px){.sidebar{position:static;height:auto;width:100%;min-width:0;background:#102a70}.sidebar .brand{padding:8px 5px 10px}.sidebar .nav{padding-bottom:8px}.sidebar .nav a{color:#e5eafb}.main{padding:18px 12px 36px}.login-box{padding:23px 18px}}
@media print{.sidebar{display:none!important}.login-wrap{background:white!important}.corporate-letterhead,.rab-letterhead{-webkit-print-color-adjust:exact;print-color-adjust:exact}.slip-header img{max-width:43mm!important;max-height:23mm!important;width:auto!important;height:auto!important}}

/* Smarttech v1.2.6: progressive DB updater */
.db-update-head{display:flex;justify-content:space-between;align-items:center;gap:16px;flex-wrap:wrap}.db-modal[hidden]{display:none!important}.db-modal{position:fixed;inset:0;z-index:9999;background:rgba(7,19,45,.70);display:flex;align-items:center;justify-content:center;padding:18px}.db-dialog{width:min(100%,680px);max-height:90vh;overflow:auto;box-shadow:0 25px 70px #07122a75}.db-modal-open{overflow:hidden}.db-progress-track{height:16px;border-radius:999px;background:#e4eaf5;overflow:hidden;margin-top:18px}.db-progress-fill{height:100%;width:0;background:linear-gradient(90deg,#15338f,#d21c35,#efb744);transition:width .22s ease}.db-progress-line{display:flex;justify-content:space-between;gap:12px;margin:10px 0 16px}.db-step-list{margin-top:12px;max-height:220px;overflow:auto;border:1px solid #e1e6f2;border-radius:10px}.db-step{display:flex;justify-content:space-between;gap:15px;padding:9px 12px;border-bottom:1px solid #e1e6f2}.db-step:last-child{border-bottom:0}.db-step small{color:#486086}.db-dialog button:disabled{opacity:.55;cursor:not-allowed}@media(max-width:600px){.db-dialog{padding:16px}.db-update-head .btn{width:100%}}

/* v1.2.8 Database update completed notification */
.db-result-modal{z-index:10002}.db-success-dialog{width:min(100%,430px);padding:32px 26px;text-align:center;display:flex;flex-direction:column;align-items:center;gap:12px}.db-success-icon{display:grid;place-items:center;width:70px;height:70px;background:#e8f7ed;color:#17834c;border:2px solid #b6e5c8;border-radius:50%;font-size:38px;font-weight:800}.db-success-dialog h2{margin:0;color:#0e285a}.db-success-dialog p{margin:0;color:#435677;line-height:1.5}.db-success-dialog .db-success-meta{font-size:13px;padding:10px 12px;border-radius:9px;background:#f0f4fb;width:100%}.db-success-dialog button{min-width:150px;margin-top:6px}

/* v1.3.3 · Premium ID card preview studio and action bar — Smarttech corporate */
.smart-id-management .smart-section-heading{display:flex;align-items:center;gap:12px;margin-bottom:8px}
.smart-id-management .smart-section-heading .section-title{margin:0}
.smart-section-icon{width:42px;height:42px;display:grid;place-items:center;border-radius:12px;color:#fff;font-size:21px;background:linear-gradient(135deg,#0e2d79,#214da8);box-shadow:0 7px 16px rgba(14,45,121,.15);flex:0 0 auto}
.smart-section-desc{font-size:12px;color:#63738d}
.smart-id-management .toolbar{display:flex;flex-wrap:wrap;align-items:center;gap:6px}
.smart-id-management .toolbar form{display:inline-flex;margin:0}
.smart-id-management .toolbar .btn{white-space:normal;line-height:1.25;min-height:34px;padding:7px 11px}
.smart-id-management td:last-child{min-width:240px}
.smart-photo-panel{border:1px solid #dbe4f3;background:linear-gradient(130deg,#fff,#f8faff)}
.smart-photo-panel .toolbar{display:flex;flex-wrap:wrap;align-items:center;gap:12px}
.smart-photo-panel input[type=file]{flex:1 1 240px;min-width:0}
.smart-id-studio{width:min(100%,860px);margin:18px auto 28px;border:1px solid #d5e0f1;border-radius:20px;overflow:hidden;background:#fff;box-shadow:0 18px 48px rgba(13,36,88,.09)}
.smart-id-studio-heading{display:flex;align-items:center;justify-content:space-between;gap:14px;padding:22px 24px;background:linear-gradient(110deg,#081f54,#123889);color:#fff;border-bottom:3px solid #e4aa32}
.smart-id-studio-heading h2{margin:4px 0 5px;color:#fff;font-size:20px;line-height:1.22;letter-spacing:-.3px}
.smart-id-studio-heading p{margin:0;color:#d2dff8;font-size:12px;line-height:1.5}
.smart-studio-kicker{color:#eec26f;font-size:10px;font-weight:800;letter-spacing:1.7px}
.smart-studio-ready{display:inline-flex;align-items:center;gap:6px;flex-shrink:0;background:#ffffff1c;border:1px solid #ffffff3f;color:#dff4ea;border-radius:30px;padding:8px 12px;font-size:11px;font-weight:700;white-space:nowrap}
.smart-id-studio-stage{padding:28px 22px 24px;background:radial-gradient(circle at 20% 16%,#e4eafa 0%,transparent 43%),radial-gradient(circle at 94% 90%,#fcebdd 0%,transparent 30%),#f3f6fc}
.smart-id-studio-stage .smart-id-print-area{margin:0;gap:38px;align-items:flex-start}
.smart-id-studio-stage .smart-id-card{box-shadow:0 15px 32px rgba(8,28,70,.24),0 0 0 1px rgba(5,35,85,.06);transition:transform .2s ease,box-shadow .2s ease}
@media(hover:hover){.smart-id-studio-stage .smart-id-card:hover{transform:translateY(-3px);box-shadow:0 20px 38px rgba(8,28,70,.28)}}
.smart-id-studio-footer{padding:18px 22px;display:flex;align-items:center;justify-content:space-between;gap:18px;flex-wrap:wrap;border-top:1px solid #dce6f2;background:#fff}
.smart-id-studio-note{display:flex;align-items:flex-start;gap:9px;max-width:300px}
.smart-id-studio-note>span{width:27px;height:27px;border-radius:50%;display:grid;place-items:center;flex:0 0 auto;background:#e5f6ed;color:#117349;font-weight:800}
.smart-id-studio-note strong{display:block;color:#153264;font-size:12px;line-height:1.35}
.smart-id-studio-note small{display:block;color:#6b7b93;font-size:11px;line-height:1.4;margin-top:3px}
.smart-id-studio-footer .smart-id-actions{display:flex;align-items:center;justify-content:flex-end;gap:9px;margin:0;flex-wrap:wrap}
.smart-id-studio-footer .smart-id-actions .btn{display:inline-flex;justify-content:center;align-items:center;gap:7px;min-width:0!important;width:auto;min-height:41px;padding:10px 15px;border-radius:10px;font-size:12px;font-weight:700;text-decoration:none;white-space:normal;text-align:center}
.smart-id-action-scan{background:#f5f8ff;border:1px solid #cfdaf0;color:#113477}
.smart-id-action-scan:hover{background:#e9f0ff}
@media(max-width:720px){.smart-id-studio-heading{padding:18px 16px;align-items:flex-start;flex-direction:column}.smart-id-studio-heading h2{font-size:18px}.smart-id-studio-stage{padding:20px 10px}.smart-id-studio-stage .smart-id-print-area{gap:20px}.smart-id-studio-footer{padding:16px;align-items:stretch;flex-direction:column}.smart-id-studio-footer .smart-id-actions{justify-content:stretch;width:100%}.smart-id-studio-footer .smart-id-actions .btn{flex:1 1 170px}.smart-id-management td:last-child{min-width:210px}}
@media print{
 body:has(.smart-id-print-area) .smart-id-studio{width:auto!important;margin:0!important;padding:0!important;border:0!important;border-radius:0!important;box-shadow:none!important;overflow:visible!important;background:transparent!important}
 body:has(.smart-id-print-area) .smart-id-studio-stage{padding:0!important;background:none!important}
 body:has(.smart-id-print-area) .smart-id-studio-stage .smart-id-print-area{gap:12mm!important}
 body:has(.smart-id-print-area) .smart-id-studio-stage .smart-id-card{transform:none!important;box-shadow:none!important}
}

/* v1.3.4 Corporate motto on front/back ID cards */
.smart-id-bottom{font-size:7.1px;letter-spacing:.2px;font-weight:800}
.smart-id-backhead .smart-id-tagline{display:block;font-size:6.1px;line-height:1.25;color:#ffe2a0;margin-top:1.1mm;letter-spacing:.05px}

/* v1.3.5 — database migration availability notification */
.st-version-open{overflow:hidden}.st-version-overlay{position:fixed;inset:0;z-index:10030;background:rgba(8,20,47,.66);display:grid;place-items:center;padding:18px}.st-version-dialog{background:#fff;color:#152752;border:1px solid #dbe4f4;box-shadow:0 24px 80px #06142d80;border-radius:18px;padding:28px;width:min(100%,450px);display:flex;align-items:center;flex-direction:column;text-align:center;gap:12px}.st-version-icon{width:60px;height:60px;border-radius:50%;display:grid;place-items:center;background:#fff5df;color:#9d6500;font-size:36px;font-weight:700}.st-version-dialog h2{font-size:21px;margin:0;color:#0f285d}.st-version-dialog p{margin:0;line-height:1.5;font-size:14px}.st-version-detail{color:#506080}.st-version-warning{background:#f2f5fb;border-radius:9px;padding:10px 12px;color:#4c5b78;font-size:12px!important;width:100%}.st-version-actions{display:flex;gap:10px;width:100%;margin-top:6px}.st-version-actions>*{flex:1;display:flex;align-items:center;justify-content:center;text-decoration:none;min-height:42px}@media(max-width:440px){.st-version-actions{flex-direction:column}.st-version-dialog{padding:23px 18px}}

/* v1.4.1: Cash advance ledger alignment and edit actions */
.bon-balance-table,.bon-history-table{width:100%;border-collapse:collapse}
.bon-employee{display:flex;flex-direction:column;gap:4px;min-width:165px}
.bon-employee strong{font-size:12px;line-height:1.35;overflow-wrap:anywhere}
.bon-employee small{font-size:10px;color:var(--muted)}
.bon-num{text-align:right;white-space:nowrap;font-variant-numeric:tabular-nums}
.bon-balance strong{font-size:12px;color:var(--ink)}
.bon-actions{display:flex;align-items:center;gap:7px;flex-wrap:wrap}
.bon-actions form{margin:0}.bon-actions .btn{min-height:32px;padding:7px 12px;font-size:11px}
.bon-history-table td{vertical-align:middle}.bon-edit-panel[hidden],.bon-only-repayment[hidden],.bon-only-advance[hidden]{display:none!important}
.bon-edit-panel{scroll-margin-top:24px}.bon-edit-save{align-self:end}
@media(max-width:800px){.bon-balance-table,.bon-history-table{min-width:690px}.bon-actions{flex-wrap:nowrap}}
