:root{
  --maroon:#702632;
  --maroon-dark:#4c1822;
  --maroon-soft:#8d3a48;
  --cream:#fff7ee;
  --sand:#f8eadc;
  --ink:#2f2024;
  --muted:#7d6b70;
  --line:#ead9dc;
  --green:#147a4b;
  --red:#b3263b;
  --yellow:#a56a00;
  --shadow:0 18px 45px rgba(112,38,50,.12);
}
*{box-sizing:border-box}
body{margin:0;font-family:Inter,Segoe UI,Arial,sans-serif;background:#fbf5f1;color:var(--ink)}
a{color:inherit;text-decoration:none}
.app-shell{display:flex;min-height:100vh}
.sidebar{width:280px;background:linear-gradient(180deg,var(--maroon),var(--maroon-dark));color:white;padding:24px 18px;position:fixed;inset:0 auto 0 0;display:flex;flex-direction:column;gap:28px}
.brand{display:flex;align-items:center;gap:12px;padding:10px;border:1px solid rgba(255,255,255,.18);border-radius:18px;background:rgba(255,255,255,.06)}
.brand img{width:54px;height:54px;object-fit:contain;background:rgba(255,255,255,.08);border-radius:14px}
.brand strong{display:block;font-size:18px;letter-spacing:.3px}.brand span{display:block;font-size:12px;color:#f7d7dc;margin-top:3px}
.sidebar nav{display:flex;flex-direction:column;gap:7px}.sidebar nav a{padding:12px 14px;border-radius:13px;color:#ffe9ed;font-weight:600;font-size:14px}.sidebar nav a:hover,.sidebar nav a.active{background:#fff;color:var(--maroon)}
.sidebar-footer{margin-top:auto;font-size:13px;color:#f2d6db;display:flex;justify-content:space-between;gap:12px}.sidebar-footer a{text-decoration:underline}
.content{margin-left:280px;width:calc(100% - 280px);padding:28px;min-height:100vh}
.topbar{display:flex;justify-content:space-between;gap:18px;align-items:center;margin-bottom:22px}.topbar h1{margin:0;color:var(--maroon);font-size:30px}.topbar p{margin:6px 0 0;color:var(--muted)}
.card{background:#fff;border:1px solid var(--line);border-radius:22px;padding:22px;box-shadow:var(--shadow);margin-bottom:18px}.card-title{font-size:18px;margin:0 0 14px;color:var(--maroon)}
.grid{display:grid;gap:16px}.grid-4{grid-template-columns:repeat(4,minmax(0,1fr))}.grid-3{grid-template-columns:repeat(3,minmax(0,1fr))}.grid-2{grid-template-columns:repeat(2,minmax(0,1fr))}
.kpi{background:linear-gradient(135deg,#fff,var(--cream));border:1px solid var(--line);border-radius:20px;padding:20px}.kpi span{display:block;color:var(--muted);font-size:13px}.kpi strong{display:block;margin-top:8px;font-size:24px;color:var(--maroon)}
.btn{border:0;border-radius:12px;padding:11px 15px;font-weight:800;display:inline-flex;align-items:center;gap:8px;cursor:pointer;font-size:14px}.btn-primary{background:var(--maroon);color:white}.btn-primary:hover{background:var(--maroon-dark)}.btn-light{background:#f7e8eb;color:var(--maroon)}.btn-danger{background:#ffe6e9;color:#9c1b2d}.btn-outline{border:1px solid var(--line);background:white;color:var(--maroon)}.btn-sm{padding:7px 10px;border-radius:9px;font-size:12px}
.form-row{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:14px;margin-bottom:14px}.field label{display:block;font-size:12px;text-transform:uppercase;letter-spacing:.05em;color:#8a5962;font-weight:800;margin-bottom:6px}.field input,.field select,.field textarea{width:100%;border:1px solid #e7cbd0;background:#fff;border-radius:13px;padding:12px 12px;color:var(--ink);font-size:14px}.field textarea{min-height:76px;resize:vertical}.field input:focus,.field select:focus,.field textarea:focus{outline:2px solid #e8bdc5;border-color:var(--maroon)}
.table-wrap{overflow:auto;border:1px solid var(--line);border-radius:17px;background:white}table{width:100%;border-collapse:collapse}th,td{padding:13px 12px;border-bottom:1px solid var(--line);text-align:left;vertical-align:top;font-size:14px}th{background:#fff4f6;color:var(--maroon);font-size:12px;text-transform:uppercase;letter-spacing:.04em}tr:hover td{background:#fffafb}.num{text-align:right;white-space:nowrap}.center{text-align:center}.muted{color:var(--muted)}
.badge{display:inline-flex;border-radius:999px;padding:5px 9px;font-size:12px;font-weight:800}.badge-lunas{background:#e7f7ee;color:#0c6a3d}.badge-dp{background:#fff4d9;color:#8a5a00}.badge-belum{background:#ffe7eb;color:#9e1e31}
.alert{padding:12px 14px;border-radius:14px;margin-bottom:14px;font-weight:700}.alert-success{background:#e7f7ee;color:#0c6a3d}.alert-error{background:#ffe7eb;color:#9e1e31}.alert-info{background:#eef4ff;color:#244b84}
.invoice-items{display:flex;flex-direction:column;gap:14px}.invoice-item-card{border:1px solid var(--line);background:#fffdfc;border-radius:18px;padding:16px}.invoice-item-head{display:flex;justify-content:space-between;align-items:center;margin-bottom:12px}.invoice-item-head strong{color:var(--maroon)}.menu-detail{background:#fff6f7;border:1px dashed #d9adb5;border-radius:14px;padding:12px;margin-top:10px}.menu-row{display:grid;grid-template-columns:1.1fr 1.3fr .8fr 42px;gap:10px;margin-bottom:8px}.total-box{display:grid;grid-template-columns:1fr 260px;gap:18px;align-items:start}.summary-line{display:flex;justify-content:space-between;border-bottom:1px dashed var(--line);padding:10px 0}.summary-line strong{color:var(--maroon)}
.login-screen{min-height:100vh;display:grid;place-items:center;background:radial-gradient(circle at top left,#9c4353,var(--maroon-dark))}.login-card{width:min(440px,92vw);background:#fff;border-radius:28px;padding:34px;box-shadow:0 25px 70px rgba(0,0,0,.22)}.login-card img{width:86px;height:86px;object-fit:contain;display:block;margin:auto}.login-card h1{text-align:center;color:var(--maroon);margin:14px 0 4px}.login-card p{text-align:center;color:var(--muted);margin:0 0 22px}
.invoice-paper{background:var(--maroon);color:white;padding:34px;max-width:1120px;margin:0 auto;border-radius:6px;box-shadow:0 24px 60px rgba(0,0,0,.14)}.invoice-paper *{color:white}.invoice-header{display:flex;justify-content:space-between;gap:28px;align-items:flex-start}.invoice-brand{display:flex;align-items:center;gap:18px}.invoice-brand img{width:170px;height:110px;object-fit:contain}.invoice-address{border:1px solid rgba(255,255,255,.85);padding:14px 18px;min-width:340px;font-weight:700;font-size:13px;line-height:1.45}.invoice-intro{font-size:13px;line-height:1.45;margin:20px 0 10px;color:#ffeaf0}.invoice-title{border:1px solid rgba(255,255,255,.9);width:460px;margin:10px auto 18px;text-align:center;padding:7px;font-weight:900;letter-spacing:.08em;font-size:20px}.invoice-meta{display:grid;grid-template-columns:1fr 1fr;gap:30px;margin:14px 0 20px}.meta-row{display:grid;grid-template-columns:120px 15px 1fr;gap:8px;font-size:14px;margin:6px 0}.invoice-table th,.invoice-table td{border:1px solid rgba(255,255,255,.9);background:transparent;color:white}.invoice-table th{text-transform:none;letter-spacing:0;font-size:14px}.invoice-table tfoot td{font-weight:800}.invoice-notes{font-size:11px;line-height:1.5;margin-top:22px;color:#ffeaf0}.bank-box{border:1px solid rgba(255,255,255,.85);padding:10px;margin-top:10px;display:inline-block;min-width:540px;font-weight:800;white-space:pre-line}.print-actions{max-width:1120px;margin:0 auto 18px;display:flex;justify-content:flex-end;gap:10px}
@media (max-width:1000px){.sidebar{position:static;width:100%;height:auto}.app-shell{display:block}.content{margin-left:0;width:100%;padding:18px}.grid-4,.grid-3,.grid-2,.form-row,.total-box{grid-template-columns:1fr}.menu-row{grid-template-columns:1fr}.topbar{display:block}.invoice-header,.invoice-meta{display:block}.invoice-title{width:100%}}
@media print{body{background:white}.no-print,.sidebar,.topbar{display:none!important}.content{margin:0;width:100%;padding:0}.card{box-shadow:none;border:0}.invoice-paper{box-shadow:none;border-radius:0;max-width:100%;min-height:100vh}.app-shell{display:block}}

.grid-3-equal{grid-template-columns:repeat(3,minmax(0,1fr))}
.mini-card{padding:20px 20px 18px}
.card-head-inline{display:flex;justify-content:space-between;gap:14px;align-items:flex-start;margin-bottom:10px}
.small{font-size:13px}
.compact-grid-3{grid-template-columns:1.2fr .7fr auto}
.compact-grid-3 .stretch-2{grid-column:span 2}
.upload-grid{align-items:end}
.inline-actions{margin-top:10px;display:flex;gap:10px;flex-wrap:wrap}
.btn-full{width:100%;justify-content:center}
.info-list{margin:8px 0 0 18px;padding:0;color:var(--muted);display:flex;flex-direction:column;gap:8px}
.info-list strong{color:var(--maroon)}
.table-toolbar{display:flex;justify-content:space-between;align-items:flex-start;gap:18px;margin-bottom:16px}
.filter-bar{display:grid;grid-template-columns:1fr 1fr 1.4fr auto;gap:12px;align-items:end;margin-bottom:16px;padding:16px;border:1px solid var(--line);border-radius:18px;background:linear-gradient(180deg,#fff,#fff8f9)}
.field-search input{padding-left:12px}
.filter-actions{display:flex;gap:10px;align-items:end}
.soft-table-wrap{border-radius:20px;overflow:hidden}
.soft-table th{background:#eef0f3;color:#4a5568;font-size:13px;text-transform:none;letter-spacing:0;font-weight:700}
.soft-table td{border-bottom:1px solid #e9e0de}
.soft-table tbody tr:nth-child(odd) td{background:#fdf7f1}
.soft-table tbody tr:nth-child(even) td{background:#fff}
.soft-table tbody tr:hover td{background:#fff4f6}
.table-actions{display:flex;justify-content:center;gap:8px;flex-wrap:wrap}.inline-form{display:inline}
.status-pill{display:inline-flex;align-items:center;padding:6px 11px;border-radius:999px;font-size:12px;font-weight:700;border:1px solid transparent}
.status-active{background:#e8f8ef;color:#0b7b47;border-color:#ace4c3}
.status-draft{background:#fff1f3;color:#a32b40;border-color:#f4c7d0}
.btn-soft-blue{background:#dfe8ff;color:#244b84}
.btn-danger-outline{border:1px solid #f1bec7;background:#fff6f7;color:#c1253a}
.modal{position:fixed;inset:0;display:none;z-index:1200}
.modal.show{display:block}
.modal-backdrop{position:absolute;inset:0;background:rgba(44,20,28,.58);backdrop-filter:blur(6px)}
.modal-card{position:relative;width:min(760px,calc(100vw - 32px));margin:38px auto;background:#fff;border-radius:28px;box-shadow:0 26px 70px rgba(50,18,26,.35);overflow:hidden;border:1px solid rgba(112,38,50,.08)}
.modal-card-wide{width:min(980px,calc(100vw - 32px))}
.modal-header{display:flex;justify-content:space-between;gap:16px;padding:24px 24px 12px;border-bottom:1px solid #eee3e6}
.modal-header h2{margin:0;color:var(--maroon);font-size:18px}
.modal-header p{margin:6px 0 0;color:var(--muted);font-size:14px}
.modal-close{width:42px;height:42px;border:0;border-radius:999px;background:#ff4c4c;color:white;font-size:26px;cursor:pointer;line-height:1;box-shadow:0 10px 24px rgba(255,76,76,.28)}
.modal-body{padding:22px 24px 8px;max-height:70vh;overflow:auto}
.modal-footer{display:flex;justify-content:flex-end;gap:10px;padding:16px 24px 24px;border-top:1px solid #eee3e6}
body.modal-open{overflow:hidden}
.recipe-composition-card{margin-top:14px;padding:14px;border:1px dashed #dfbcc3;border-radius:18px;background:#fff8f8}
.recipe-grid-head,.recipe-row{display:grid;grid-template-columns:1.4fr .65fr 1fr 44px;gap:10px;align-items:center}
.recipe-grid-head{font-size:12px;text-transform:uppercase;letter-spacing:.05em;color:#8a5962;font-weight:800;margin:4px 0 10px}
.recipe-row{margin-bottom:10px}
.recipe-row select,.recipe-row input{width:100%;border:1px solid #e7cbd0;background:#fff;border-radius:12px;padding:11px 12px;color:var(--ink);font-size:14px}
.recipe-row select:focus,.recipe-row input:focus{outline:2px solid #e8bdc5;border-color:var(--maroon)}
@media (max-width:1000px){.grid-3-equal,.filter-bar,.compact-grid-3{grid-template-columns:1fr}.compact-grid-3 .stretch-2{grid-column:auto}.table-toolbar{display:block}.modal-card,.modal-card-wide{width:calc(100vw - 16px);margin:8px auto}.recipe-grid-head,.recipe-row{grid-template-columns:1fr}}

/* Patch Tahap 2 */
.recipe-kpi-grid{margin-bottom:16px}.recipe-kpi strong{font-size:28px}.recipe-kpi small,.estimate-kpis small{display:block;color:var(--muted);margin-top:6px;font-size:12px}.recipe-filter-bar-stage2{grid-template-columns:1fr 1fr .75fr 1.7fr auto}.pagination-summary{display:flex;justify-content:space-between;gap:14px;align-items:center;color:var(--muted);font-size:13px;margin:0 0 12px}.pagination{display:flex;flex-wrap:wrap;gap:8px;justify-content:flex-end;margin-top:16px}.page-link{border:1px solid var(--line);background:white;border-radius:10px;padding:9px 12px;color:var(--maroon);font-weight:800;font-size:13px}.page-link:hover,.page-link.active{background:var(--maroon);color:white;border-color:var(--maroon)}
.modal-card-xl{width:min(1180px,calc(100vw - 28px));margin:18px auto}.modal-card-xl .modal-body{max-height:calc(100vh - 185px)}.modal-grid-main{grid-template-columns:1fr 220px}.modal-grid-main .stretch-2{grid-column:auto}.sticky-modal-footer{position:sticky;bottom:0;background:#fff;z-index:2}.copy-recipe-box{display:grid;grid-template-columns:1fr auto;gap:12px;align-items:end;background:#fff4f6;border:1px solid var(--line);padding:14px;border-radius:16px;margin-bottom:14px}.copy-recipe-box .btn{height:43px;justify-content:center}.recipe-composition-card .invoice-item-head{position:sticky;top:-22px;background:#fff8f8;z-index:1;padding-top:4px}.recipe-row:hover input,.recipe-row:hover select{border-color:#cfa1aa}
.export-actions{display:flex;gap:10px;align-items:center;flex-wrap:wrap}.estimate-filter-card .table-toolbar{margin-bottom:12px}.estimate-filter-bar{grid-template-columns:1fr 1fr 1.6fr auto}.estimate-kpis{margin-bottom:16px}.estimate-summary-table input[type="checkbox"]{width:18px;height:18px;accent-color:var(--maroon)}.warning-card{border-color:#f0c1ca;background:linear-gradient(180deg,#fff,#fff8f8)}.warning-card .card-title{color:#9e1e31}
@media (max-width:1000px){.recipe-filter-bar-stage2,.estimate-filter-bar,.modal-grid-main,.copy-recipe-box{grid-template-columns:1fr}.pagination-summary{display:block}.pagination{justify-content:flex-start}.export-actions{margin-top:12px}.modal-card-xl{width:calc(100vw - 12px);margin:6px auto}.modal-card-xl .modal-body{max-height:calc(100vh - 145px)}}

/* Patch Tahap 2 - Fix UI Buku Resep */
.recipe-import-panel .card-title{margin-bottom:4px}
.recipe-import-form{display:grid;grid-template-columns:1fr 150px;gap:12px;align-items:end;margin-top:12px}
.recipe-file-zone{border:1px dashed #d9adb5;background:#fff8f8;border-radius:16px;padding:12px;display:flex;flex-direction:column;gap:7px;min-height:104px;justify-content:center}
.recipe-file-zone label{font-size:12px;text-transform:uppercase;letter-spacing:.05em;color:#8a5962;font-weight:800}
.recipe-file-zone span{font-size:12px;color:var(--muted);line-height:1.35}
.recipe-file-zone input[type=file]{font-size:13px;max-width:100%}
.recipe-file-zone input[type=file]::file-selector-button{border:0;border-radius:10px;background:#f7e8eb;color:var(--maroon);font-weight:800;padding:8px 11px;margin-right:10px;cursor:pointer}
.recipe-import-actions{display:flex;flex-direction:column;gap:8px}
.recipe-filter-bar-stage2.filter-bar-inline{display:grid!important;grid-template-columns:minmax(135px,.85fr) minmax(135px,.85fr) minmax(90px,.55fr) minmax(220px,1.6fr) auto!important;gap:10px!important;align-items:end!important}
.recipe-filter-bar-stage2 .field label{white-space:nowrap}.recipe-filter-bar-stage2 .filter-actions{display:flex!important;gap:8px!important;white-space:nowrap}
.modal[hidden]{display:none!important}.modal.show:not([hidden]){display:flex!important;align-items:flex-start;justify-content:center;overflow:auto}.modal.show:not([hidden]) .modal-backdrop{position:fixed}.modal.show:not([hidden]) .modal-card{z-index:2}
@media(max-width:760px){.recipe-filter-bar-stage2.filter-bar-inline{grid-template-columns:1fr!important}.recipe-import-form{grid-template-columns:1fr}.recipe-import-actions{flex-direction:row;flex-wrap:wrap}}

.payment-editor-head{display:flex;justify-content:space-between;gap:10px;align-items:center;margin:12px 0 10px;padding-top:10px;border-top:1px dashed var(--line)}
.payment-editor-head strong{color:var(--maroon)}
.payment-rows{display:flex;flex-direction:column;gap:8px;margin-bottom:8px}
.payment-row{display:grid;grid-template-columns:1fr 1fr 42px;gap:8px;align-items:center}
.payment-row select,.payment-row input{width:100%;border:1px solid #e7cbd0;background:#fff;border-radius:12px;padding:10px 11px;color:var(--ink);font-size:14px}
.payment-row select:focus,.payment-row input:focus{outline:2px solid #e8bdc5;border-color:var(--maroon)}
.invoice-summary-box .card{min-width:320px}
@media (max-width:1000px){.payment-row{grid-template-columns:1fr}.payment-editor-head{display:block}.payment-editor-head .btn{margin-top:8px}}

/* Patch Menu & Bahan Dapur */
.menu-filter-bar{grid-template-columns:minmax(180px,.8fr) minmax(280px,1.5fr) auto}
.ingredient-filter-bar{grid-template-columns:minmax(160px,.65fr) minmax(280px,1.7fr) auto}
.menu-card-grid{align-items:start}
.menu-category-card{background:linear-gradient(135deg,#fff,var(--cream));border:1px solid var(--line);border-radius:20px;padding:18px;min-height:230px;box-shadow:0 12px 30px rgba(112,38,50,.08)}
.menu-category-head{display:flex;justify-content:space-between;gap:12px;align-items:flex-start;border-bottom:1px dashed var(--line);padding-bottom:12px;margin-bottom:12px}
.menu-category-head span{color:var(--muted);font-size:13px;line-height:1.25}.menu-category-head strong{font-size:21px;color:var(--maroon);white-space:nowrap}
.menu-click-list{display:flex;flex-direction:column;gap:7px}
.menu-click-item{display:grid;grid-template-columns:1fr 32px;gap:8px;align-items:center;border-radius:13px;padding:3px 3px 3px 9px;transition:.16s ease;background:rgba(255,255,255,.28)}
.menu-click-item:hover{background:#fff4f6;box-shadow:inset 0 0 0 1px #ead9dc}
.menu-click-item a{color:var(--ink);font-weight:600;font-size:14px;line-height:1.35;display:block;padding:5px 0}
.menu-click-item a:hover{color:var(--maroon)}
.menu-click-item form{margin:0;display:flex;justify-content:flex-end}.menu-delete-btn{width:30px;height:30px;border:0;border-radius:10px;background:#ffe6e9;color:#9c1b2d;font-weight:900;cursor:pointer;line-height:1}.menu-delete-btn:hover{background:#ffd5db;color:#7d1120}
.warning-card .form-row{align-items:end}.soft-table a strong:hover{color:var(--maroon);text-decoration:underline}
@media(max-width:1000px){.menu-filter-bar,.ingredient-filter-bar{grid-template-columns:1fr}.menu-click-item{grid-template-columns:1fr 36px}.menu-category-card{min-height:auto}}

/* Patch Final Print Layout Invoice - samakan print preview dengan tampilan web */
.invoice-paper,.invoice-paper *{-webkit-print-color-adjust:exact!important;print-color-adjust:exact!important;color-adjust:exact!important}
.invoice-table .col-no{width:5.5%}.invoice-table .col-item{width:20%}.invoice-table .col-desc{width:35%}.invoice-table .col-qty{width:6%}.invoice-table .col-unit{width:8%}.invoice-table .col-price{width:12.5%}.invoice-table .col-total{width:13%}
@media print{
  @page{size:A4 portrait;margin:5mm}
  html,body{margin:0!important;padding:0!important;background:#fff!important;-webkit-print-color-adjust:exact!important;print-color-adjust:exact!important;color-adjust:exact!important}
  body{font-size:9.4pt!important;line-height:1.28!important}
  .app-shell{display:block!important;min-height:auto!important;background:#fff!important}
  .content{margin:0!important;width:100%!important;padding:0!important;background:#fff!important}
  .no-print,.sidebar,.topbar,.print-actions,.alert{display:none!important}
  .card{box-shadow:none!important;border:0!important;margin:0!important;padding:0!important}
  .invoice-paper{box-sizing:border-box!important;display:block!important;background:#702632!important;background-color:#702632!important;color:#fff!important;box-shadow:none!important;border-radius:0!important;width:190mm!important;max-width:190mm!important;min-height:auto!important;margin:0 auto!important;padding:6.5mm!important;overflow:visible!important;font-size:9.1pt!important;line-height:1.25!important}
  .invoice-paper *{color:#fff!important;text-shadow:none!important;box-shadow:none!important;background-color:transparent!important}
  .invoice-header{display:flex!important;justify-content:space-between!important;align-items:flex-start!important;gap:10mm!important;margin:0 0 5mm!important}
  .invoice-brand{display:flex!important;align-items:center!important;gap:4mm!important;flex:1 1 auto!important;min-width:0!important}
  .invoice-brand img{width:33mm!important;height:22mm!important;object-fit:contain!important;opacity:1!important;filter:none!important;flex:0 0 auto!important}
  .invoice-brand h2{font-size:15pt!important;margin:0!important;line-height:1.1!important}
  .invoice-brand p{font-size:9pt!important;margin:2mm 0 0!important;line-height:1.2!important}
  .invoice-address{display:block!important;width:74mm!important;min-width:74mm!important;max-width:74mm!important;border:1px solid rgba(255,255,255,.9)!important;padding:3mm 4mm!important;font-size:7.7pt!important;line-height:1.25!important;font-weight:700!important;background:#702632!important;background-color:#702632!important;margin-left:auto!important}
  .invoice-intro{font-size:7.7pt!important;line-height:1.28!important;margin:3.5mm 0 2.5mm!important;color:#ffeaf0!important}
  .invoice-paper hr{margin:0 0 2.5mm!important;border-top:1px solid rgba(255,255,255,.9)!important}
  .invoice-title{display:block!important;width:82mm!important;max-width:82mm!important;margin:0 auto 4mm!important;border:1px solid rgba(255,255,255,.9)!important;padding:2mm!important;text-align:center!important;font-size:13pt!important;line-height:1.1!important;letter-spacing:.08em!important;background:#702632!important;background-color:#702632!important}
  .invoice-meta{display:grid!important;grid-template-columns:1fr 1fr!important;gap:12mm!important;margin:0 0 4.5mm!important}
  .meta-row{display:grid!important;grid-template-columns:24mm 4mm 1fr!important;gap:1mm!important;font-size:7.8pt!important;margin:1.2mm 0!important;line-height:1.15!important}
  .meta-row span,.meta-row strong{font-size:7.8pt!important;line-height:1.15!important}
  .invoice-table{width:100%!important;table-layout:fixed!important;border-collapse:collapse!important;margin:0!important;background:#702632!important;background-color:#702632!important;font-size:7.7pt!important;line-height:1.23!important;page-break-inside:auto!important;break-inside:auto!important}
  .invoice-table thead{display:table-header-group!important}
  .invoice-table tbody{display:table-row-group!important}
  .invoice-table tfoot{display:table-row-group!important} /* cegah subtotal/DP/grand total diulang di tiap halaman */
  .invoice-table tr{page-break-inside:avoid!important;break-inside:avoid!important}
  .invoice-table th,.invoice-table td{background:#702632!important;background-color:#702632!important;color:#fff!important;border:1px solid rgba(255,255,255,.9)!important;padding:2.2mm 2mm!important;font-size:7.7pt!important;line-height:1.23!important;vertical-align:top!important;word-break:normal!important;overflow-wrap:break-word!important}
  .invoice-table th{font-weight:800!important;text-transform:none!important;letter-spacing:0!important;text-align:left!important;white-space:normal!important}
  .invoice-table small{font-size:6.9pt!important;line-height:1.23!important}
  .invoice-table .num{text-align:right!important;white-space:nowrap!important}
  .invoice-table .center{text-align:center!important}
  .invoice-table tfoot td{font-weight:800!important;white-space:nowrap!important;padding:2.1mm 2mm!important}
  .invoice-notes{font-size:6.8pt!important;line-height:1.25!important;margin-top:5mm!important;color:#ffeaf0!important;page-break-inside:avoid!important;break-inside:avoid!important}
  .bank-box{display:inline-block!important;min-width:82mm!important;max-width:120mm!important;border:1px solid rgba(255,255,255,.9)!important;padding:2.5mm 3mm!important;margin-top:3mm!important;font-size:8.2pt!important;line-height:1.25!important;font-weight:800!important;white-space:pre-line!important;background:#702632!important;background-color:#702632!important;page-break-inside:avoid!important;break-inside:avoid!important}
  a[href]::after{content:''!important}
}


/* Buku Menu export action buttons */
.menu-export-actions{display:flex;gap:10px;align-items:flex-end;justify-content:flex-end;flex-wrap:wrap}
.menu-export-actions .btn{white-space:nowrap}
@media (max-width:1000px){.menu-export-actions{justify-content:flex-start}}

.import-button-stack{display:flex;gap:10px;align-items:stretch;min-width:260px}.import-button-stack .btn{white-space:nowrap}
@media(max-width:900px){.import-button-stack{flex-direction:column;min-width:0;width:100%}}

/* Fix layout Import Buku Menu: cegah tombol import/template keluar dari card dan membuat horizontal scroll */
.recipe-import-panel{overflow:hidden;min-width:0}
.recipe-import-panel .recipe-import-form{display:grid;grid-template-columns:minmax(0,1fr) minmax(220px,auto);gap:12px;align-items:end;width:100%;max-width:100%}
.recipe-import-panel .recipe-file-zone{min-width:0;width:100%;box-sizing:border-box}
.recipe-import-panel .recipe-file-zone input[type=file]{width:100%;min-width:0}
.recipe-import-panel .import-button-stack{min-width:0;width:100%;display:grid;grid-template-columns:1fr 1fr;gap:10px;align-items:stretch}
.recipe-import-panel .import-button-stack .btn{min-width:0;width:100%;padding-left:12px;padding-right:12px;text-align:center;justify-content:center;white-space:normal;line-height:1.25}
@media(max-width:1280px){
  .recipe-import-panel .recipe-import-form{grid-template-columns:1fr}
  .recipe-import-panel .import-button-stack{grid-template-columns:1fr 1fr}
}
@media(max-width:760px){
  .recipe-import-panel .import-button-stack{grid-template-columns:1fr}
}

/* Patch Dashboard Sort + Delete Invoice */
.dashboard-filter{grid-template-columns:2fr 1fr 1fr 1fr 1.35fr auto!important;align-items:end}
.dashboard-filter .field-search{min-width:220px}
.dashboard-filter-actions .inline-actions{display:flex;gap:10px;align-items:center;flex-wrap:nowrap}
.card-head-row,.table-toolbar{display:flex;justify-content:space-between;align-items:flex-start;gap:16px}
.card-head-row .card-title,.table-toolbar .card-title{margin-bottom:4px}
.small{font-size:13px}
.dashboard-list-toolbar{margin-bottom:12px}
.sort-strip{display:flex;align-items:center;gap:8px;flex-wrap:wrap;background:#fff7f8;border:1px solid var(--line);border-radius:16px;padding:10px 12px;margin-bottom:14px}
.sort-label{font-size:12px;font-weight:900;text-transform:uppercase;letter-spacing:.04em;color:#8a5962;margin-right:4px}
.sort-chip{display:inline-flex;align-items:center;border:1px solid #ead0d5;border-radius:999px;padding:7px 11px;font-weight:800;font-size:12px;color:var(--maroon);background:#fff}
.sort-chip:hover,.sort-chip.active{background:var(--maroon);border-color:var(--maroon);color:#fff}
.table-actions{display:flex;align-items:center;justify-content:center;gap:7px;flex-wrap:wrap}
.action-nowrap{flex-wrap:nowrap}.inline-form{display:inline;margin:0}.btn-x{width:31px;height:31px;min-width:31px;padding:0;justify-content:center;font-size:18px;line-height:1;border-radius:9px}.pagination-actions{display:flex;align-items:center;justify-content:flex-end;gap:10px;margin-top:12px}.status-pill{display:inline-flex;align-items:center;padding:6px 11px;border-radius:999px;font-size:12px;font-weight:800;border:1px solid transparent}.status-active{background:#e8f8ef;color:#0b7b47;border-color:#ace4c3}
@media (max-width:1200px){.dashboard-filter{grid-template-columns:1fr 1fr!important}.dashboard-filter .field-search{min-width:0}}
@media (max-width:760px){.dashboard-filter{grid-template-columns:1fr!important}.card-head-row,.table-toolbar{display:block}.pagination-actions{justify-content:flex-start}.action-nowrap{flex-wrap:wrap}.sort-strip{align-items:flex-start}.sort-label{width:100%}}


/* Patch Dashboard Table Header Sorting + Full Width Filter/Upcoming */
.dashboard-wide-card,.upcoming-card-wide{width:100%}
.dashboard-filter-wide{display:grid;grid-template-columns:minmax(280px,2fr) minmax(150px,.75fr) minmax(160px,.8fr) minmax(160px,.8fr) auto;gap:12px;align-items:end;width:100%}
.dashboard-filter-wide .field{min-width:0}.dashboard-filter-wide .field input,.dashboard-filter-wide .field select{width:100%}
.dashboard-filter-wide .dashboard-filter-actions .inline-actions{display:flex;gap:10px;align-items:center;flex-wrap:nowrap}.dashboard-filter-wide .dashboard-filter-actions .btn{min-height:43px}
.upcoming-card-wide .table-wrap table{width:100%}
.sortable-table th{white-space:nowrap}.sortable-table .sort-th{display:flex;align-items:center;gap:8px;justify-content:flex-start;color:var(--maroon);font-weight:900;text-decoration:none;width:100%}.sortable-table .sort-th b{display:inline-flex;align-items:center;justify-content:center;width:22px;height:22px;border-radius:999px;background:#f5e5e8;color:#8a2032;font-size:12px;line-height:1}.sortable-table .sort-th.active b{background:var(--maroon);color:#fff}.sortable-table .sort-th:hover span{text-decoration:underline}.sortable-table .sort-th.align-right{justify-content:flex-end}.sortable-table th.num .sort-th{justify-content:flex-end}.dashboard-list-toolbar{margin-bottom:14px}.dashboard-list-toolbar .btn{white-space:nowrap}
@media(max-width:1200px){.dashboard-filter-wide{grid-template-columns:1.4fr 1fr 1fr}.dashboard-filter-wide .dashboard-filter-actions{grid-column:1/-1}.dashboard-filter-wide .dashboard-filter-actions .inline-actions{justify-content:flex-start}}
@media(max-width:760px){.dashboard-filter-wide{grid-template-columns:1fr}.dashboard-filter-wide .dashboard-filter-actions{grid-column:auto}.card-head-row,.table-toolbar{display:block}.pagination-actions{justify-content:flex-start}.sortable-table .sort-th,.sortable-table .sort-th.align-right,.sortable-table th.num .sort-th{justify-content:flex-start}.action-nowrap{flex-wrap:wrap}}

/* =========================================================
   Mobile & Tablet Friendly Patch - EP Catering System
   Fokus: sidebar hamburger, layout rapih tablet/HP, tabel aman scroll,
   form invoice tidak keluar layar, dan print invoice tetap tidak berubah.
   ========================================================= */
.mobile-header,.mobile-sidebar-backdrop{display:none}
.table-wrap{-webkit-overflow-scrolling:touch;max-width:100%}
.table-wrap table{min-width:780px}
.table-wrap::-webkit-scrollbar{height:8px}.table-wrap::-webkit-scrollbar-thumb{background:#e0bdc4;border-radius:99px}
.field input,.field select,.field textarea,.btn{max-width:100%}
img{max-width:100%}
.card,.kpi,.invoice-item-card,.menu-category-card{min-width:0}
.topbar h1{line-height:1.15}.topbar p{line-height:1.45}

@media(max-width:1280px){
  .content{padding:22px}
  .grid-4{grid-template-columns:repeat(2,minmax(0,1fr))}
  .grid-3,.menu-card-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
  .grid-2{grid-template-columns:1fr}
  .form-row{grid-template-columns:repeat(2,minmax(0,1fr))}
  .filter-bar,.menu-filter-bar,.ingredient-filter-bar,.estimate-filter-bar,.recipe-filter-bar-stage2.filter-bar-inline{grid-template-columns:repeat(2,minmax(0,1fr))!important}
  .filter-actions,.menu-export-actions{justify-content:flex-start;flex-wrap:wrap}
  .dashboard-filter-wide{grid-template-columns:repeat(2,minmax(0,1fr))!important}
  .dashboard-filter-wide .dashboard-filter-actions{grid-column:1/-1!important}
}

@media(max-width:1000px){
  body{padding-top:68px;font-size:14px}
  .mobile-header{display:flex;position:fixed;top:0;left:0;right:0;height:68px;background:linear-gradient(135deg,var(--maroon),var(--maroon-dark));color:white;z-index:1300;align-items:center;gap:12px;padding:10px 14px;box-shadow:0 10px 28px rgba(76,24,34,.22)}
  .mobile-menu-toggle{width:44px;height:44px;border:1px solid rgba(255,255,255,.25);border-radius:14px;background:rgba(255,255,255,.1);display:grid;place-items:center;gap:0;padding:10px;cursor:pointer;flex:0 0 auto}
  .mobile-menu-toggle span{display:block;width:20px;height:2px;background:#fff;border-radius:99px;margin:2px 0}
  .mobile-brand{display:flex;align-items:center;gap:10px;min-width:0;flex:1;color:#fff;font-weight:900;letter-spacing:.2px}
  .mobile-brand img{width:36px;height:36px;object-fit:contain;border-radius:10px;background:rgba(255,255,255,.08)}
  .mobile-brand span{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
  .mobile-invoice-btn{flex:0 0 auto;border-radius:12px;background:#fff;color:var(--maroon);font-weight:900;padding:10px 12px;font-size:13px}
  .mobile-sidebar-backdrop{display:block;position:fixed;inset:0;background:rgba(31,15,20,.46);z-index:1190;opacity:0;visibility:hidden;transition:.2s ease}
  .sidebar{position:fixed!important;top:0!important;left:0!important;bottom:0!important;width:min(82vw,310px)!important;height:100vh!important;z-index:1200!important;transform:translateX(-105%);transition:transform .22s ease;overflow-y:auto;padding:18px!important;gap:18px!important;box-shadow:18px 0 45px rgba(0,0,0,.18)}
  body.mobile-menu-open .sidebar{transform:translateX(0)}
  body.mobile-menu-open .mobile-sidebar-backdrop{opacity:1;visibility:visible}
  body.mobile-menu-open{overflow:hidden}
  .sidebar .brand{padding:9px}.sidebar .brand img{width:48px;height:48px}.sidebar .brand strong{font-size:16px}.sidebar nav a{padding:11px 12px;font-size:13.5px}
  .sidebar-footer{font-size:12px;padding-top:8px}
  .app-shell{display:block;min-height:calc(100vh - 68px)}
  .content{margin-left:0!important;width:100%!important;padding:16px!important;min-height:auto}
  .topbar{display:flex!important;align-items:flex-start;gap:12px;margin-bottom:16px}.topbar h1{font-size:24px}.topbar p{font-size:13px}.topbar .btn{display:none}
  .card{border-radius:18px;padding:16px;margin-bottom:14px}.card-title{font-size:16px}.kpi{padding:16px;border-radius:17px}.kpi strong{font-size:22px}
  .grid-4,.grid-3,.grid-2,.grid-3-equal,.menu-card-grid,.recipe-kpi-grid,.estimate-kpis{grid-template-columns:1fr!important;gap:12px!important}
  .form-row,.compact-grid-3,.modal-grid-main,.copy-recipe-box,.menu-row,.recipe-row,.payment-row{grid-template-columns:1fr!important}
  .form-row[style],.warning-card .form-row[style]{grid-template-columns:1fr!important}
  .field label{font-size:11px}.field input,.field select,.field textarea{font-size:14px;padding:11px;border-radius:12px}.field textarea{min-height:68px}
  .btn{padding:10px 13px;font-size:13px;border-radius:11px}.btn-sm{padding:7px 10px;font-size:12px}
  .table-toolbar,.card-head-row,.invoice-item-head,.payment-editor-head{display:flex!important;align-items:flex-start!important;justify-content:space-between!important;gap:10px!important;flex-wrap:wrap!important}
  .filter-bar,.dashboard-filter-wide,.menu-filter-bar,.ingredient-filter-bar,.estimate-filter-bar,.recipe-filter-bar-stage2.filter-bar-inline{grid-template-columns:1fr!important;padding:14px!important;border-radius:16px!important}
  .filter-actions,.inline-actions,.menu-export-actions,.export-actions{display:flex!important;flex-wrap:wrap!important;justify-content:flex-start!important;gap:8px!important}.filter-actions .btn,.inline-actions .btn{white-space:normal}
  .table-wrap{border-radius:14px;overflow-x:auto;overflow-y:hidden}.table-wrap table{min-width:760px}th,td{padding:11px 10px;font-size:13px}th{font-size:11px}
  .sortable-table .sort-th{gap:5px}.sortable-table .sort-th b{width:20px;height:20px;font-size:11px}
  .action-nowrap{flex-wrap:wrap!important}.table-actions{justify-content:flex-start}.btn-x{width:30px;height:30px;min-width:30px}
  .modal-card,.modal-card-wide,.modal-card-xl{width:calc(100vw - 14px)!important;margin:7px auto!important;border-radius:20px!important}.modal-header{padding:18px 18px 10px}.modal-body{padding:16px!important;max-height:calc(100vh - 150px)!important}.modal-footer{padding:12px 16px 16px;flex-wrap:wrap}.modal-close{width:38px;height:38px;font-size:23px}
  .menu-category-card{min-height:auto;padding:15px}.menu-category-head strong{font-size:18px}.menu-click-item{grid-template-columns:1fr 34px}.menu-click-item a{font-size:13.5px}
  .recipe-file-zone{padding:12px}.recipe-import-panel .recipe-import-form,.menu-import-card-fix .recipe-import-form{grid-template-columns:1fr!important}.recipe-import-panel .import-button-stack,.menu-import-card-fix .import-button-stack{width:100%!important;max-width:100%!important;grid-template-columns:1fr!important;display:grid!important}
  .total-box{grid-template-columns:1fr!important}.invoice-summary-box .card{min-width:0;width:100%}.summary-line{font-size:14px}
  .pagination,.pagination-actions{justify-content:flex-start!important;flex-wrap:wrap}
}

@media(max-width:680px){
  body{padding-top:62px}
  .mobile-header{height:62px;padding:9px 10px}.mobile-menu-toggle{width:40px;height:40px;border-radius:12px}.mobile-brand img{width:32px;height:32px}.mobile-brand span{font-size:14px}.mobile-invoice-btn{font-size:12px;padding:9px 10px}
  .content{padding:12px!important}.topbar{display:block!important}.topbar h1{font-size:22px}.topbar p{font-size:12.5px;margin-top:4px}
  .card{padding:14px;border-radius:16px}.kpi{padding:14px}.kpi strong{font-size:20px}.card-title{font-size:15.5px}
  .grid{gap:10px}.form-row{gap:10px;margin-bottom:10px}.invoice-item-card{padding:12px;border-radius:15px}.menu-detail{padding:10px}.menu-row{gap:8px}.payment-row{gap:8px}
  .field input,.field select,.field textarea{font-size:13.5px;padding:10px}.field label{font-size:10.5px;margin-bottom:5px}
  .btn{width:auto;justify-content:center}.btn-full,.filter-actions .btn-primary{width:100%}.dashboard-filter-wide .dashboard-filter-actions .inline-actions{width:100%;display:grid!important;grid-template-columns:1fr 1fr!important}.dashboard-filter-wide .dashboard-filter-actions .btn{width:100%}
  .table-toolbar .btn,.card-head-row .btn{margin-top:4px}.dashboard-list-toolbar .btn{width:100%}
  .table-wrap table{min-width:700px}th,td{font-size:12.5px;padding:10px 9px}.num{white-space:nowrap}
  .status-pill,.badge{font-size:11px;padding:5px 8px}.pagination-summary{font-size:12px}.page-link{font-size:12px;padding:8px 10px}
  .modal-header h2{font-size:16px}.modal-header p{font-size:12.5px}.modal-footer .btn{flex:1 1 auto}
  .print-actions{display:grid!important;grid-template-columns:1fr 1fr;gap:8px;padding:0 12px}.print-actions .btn{width:100%}
  .invoice-paper{border-radius:0;padding:18px;overflow-x:auto}.invoice-header,.invoice-meta{display:block}.invoice-brand{margin-bottom:12px}.invoice-address{min-width:0;width:100%;font-size:12px}.invoice-title{width:100%;font-size:17px}.invoice-table{min-width:720px}
}

@media(max-width:420px){
  .mobile-invoice-btn{display:none}.mobile-brand span{font-size:13px}.content{padding:10px!important}.card{padding:12px}.table-wrap table{min-width:660px}.dashboard-filter-wide .dashboard-filter-actions .inline-actions{grid-template-columns:1fr!important}.print-actions{grid-template-columns:1fr}
}

@media print{
  body{padding-top:0!important}.mobile-header,.mobile-sidebar-backdrop{display:none!important}.sidebar{transform:none!important}.table-wrap{overflow:visible!important}.table-wrap table{min-width:0!important}
}

/* =========================================================
   Handover Form / Form Serah Terima Catering
   ========================================================= */
.invoice-brand-logo-only img{width:360px;height:116px;object-fit:contain;object-position:left center}
.handover-actions{max-width:980px}
.handover-paper{max-width:980px;margin:0 auto;background:#fff;color:var(--maroon);padding:34px 42px;border-radius:10px;box-shadow:0 24px 60px rgba(112,38,50,.12);border:1px solid #e6cbd0;font-family:Georgia,'Times New Roman',serif;line-height:1.42}
.handover-paper *{color:var(--maroon)}
.handover-header{display:grid;grid-template-columns:1fr 1.1fr;gap:26px;align-items:center;margin-bottom:20px}
.handover-logo-box{background:var(--maroon);border-radius:8px;padding:14px 18px;min-height:118px;display:flex;align-items:center;justify-content:center;overflow:hidden}
.handover-logo-box img{width:100%;max-height:96px;object-fit:contain}
.handover-address-box{border:2px solid var(--maroon);padding:14px 16px;font-size:14px;line-height:1.45;font-weight:700;min-height:98px;display:flex;flex-direction:column;justify-content:center}
.handover-intro{font-size:15px;text-align:justify;margin:0 0 16px;padding-bottom:12px;border-bottom:2px solid var(--maroon)}
.handover-title{text-align:center;font-size:29px;letter-spacing:.04em;margin:10px 0 18px;font-weight:900;text-transform:uppercase}
.handover-lead{font-size:16px;margin:0 0 12px}
.handover-parties{display:grid;grid-template-columns:1fr 1fr;gap:18px;margin:12px 0 18px}
.handover-party-card{border:1.5px solid rgba(112,38,50,.45);border-radius:12px;padding:14px;background:#fffafa}
.handover-party-card h3{margin:0 0 10px;font-size:15px;letter-spacing:.06em;text-transform:uppercase}
.handover-party-card p{margin:12px 0 0;font-size:14px}
.handover-row{display:grid;grid-template-columns:120px 12px 1fr;gap:8px;margin:8px 0;font-size:15px}
.handover-row span{font-weight:500}.handover-row strong{font-weight:800}
.handover-statement,.handover-closing{font-size:15.5px;text-align:justify;margin:16px 0;line-height:1.55}
.handover-table{width:100%;border-collapse:collapse;margin:14px 0 16px;font-family:Georgia,'Times New Roman',serif}
.handover-table th,.handover-table td{border:1.5px solid var(--maroon);padding:7px 9px;background:#fff;color:var(--maroon);font-size:15px;vertical-align:middle}
.handover-table th{text-transform:none;letter-spacing:0;font-size:16px;font-weight:900;background:#fff6f7;color:var(--maroon)}
.handover-table td strong{font-weight:900;letter-spacing:.02em}.handover-table td small{font-size:11px;color:#93505b;font-family:Inter,Segoe UI,Arial,sans-serif}.handover-no{width:54px}.handover-qty{width:88px}.handover-jam{width:78px}.handover-trip{width:58px}.handover-note{width:88px}
.handover-date-line{font-size:16px;margin:20px 0 18px}
.handover-signatures{display:grid;grid-template-columns:repeat(3,1fr);gap:18px;text-align:center;margin-top:8px}
.handover-signatures div{min-height:130px;display:flex;flex-direction:column;justify-content:flex-start;gap:8px}.handover-signatures strong{font-size:16px}.handover-signatures span{font-size:15px}.handover-signatures em{font-style:normal;margin-top:auto;font-size:13px;color:#8a5962}
@media(max-width:900px){.handover-paper{padding:24px 20px}.handover-header,.handover-parties,.handover-signatures{grid-template-columns:1fr}.handover-title{font-size:23px}.handover-row{grid-template-columns:112px 10px 1fr}.handover-table{min-width:760px}.handover-paper{overflow-x:auto}.invoice-brand-logo-only img{width:280px;height:92px}}
@media(max-width:520px){.handover-paper{padding:18px 14px;border-radius:0}.handover-logo-box{min-height:94px;padding:12px}.handover-address-box,.handover-intro,.handover-statement,.handover-closing{font-size:13.5px}.handover-title{font-size:19px}.handover-row{grid-template-columns:1fr;gap:2px}.handover-row b{display:none}.handover-actions{grid-template-columns:1fr!important}.handover-actions .btn{width:100%}}
@media print{.handover-paper{box-shadow:none;border:0;border-radius:0;max-width:100%;padding:16mm 15mm;margin:0;overflow:visible;page-break-inside:auto}.handover-paper *{-webkit-print-color-adjust:exact!important;print-color-adjust:exact!important}.handover-header{display:grid!important;grid-template-columns:1fr 1.1fr!important}.handover-parties{display:grid!important;grid-template-columns:1fr 1fr!important}.handover-signatures{display:grid!important;grid-template-columns:repeat(3,1fr)!important}.handover-table{min-width:0!important;page-break-inside:auto}.handover-table tr{page-break-inside:avoid;break-inside:avoid}.handover-title{font-size:24px}.handover-logo-box{background:var(--maroon)!important}.handover-address-box{border-color:var(--maroon)!important}.handover-intro{border-bottom-color:var(--maroon)!important}.invoice-brand-logo-only img{width:300px;height:96px}}

/* =========================================================
   Patch: Serah Terima refinements + mobile bottom navigation
   ========================================================= */
.brand img,.mobile-brand img{object-fit:contain;background:rgba(255,255,255,.12)}
.invoice-no-link{color:inherit;text-decoration:none}.invoice-no-link:hover{color:var(--maroon);text-decoration:underline}
.handover-logo-box{background:transparent!important;border-radius:0!important;padding:0!important;min-height:auto!important;justify-content:flex-start!important}
.handover-logo-box img{width:100%!important;max-height:118px!important;object-fit:contain!important;object-position:left center!important}
.handover-table td small{display:block!important;margin-top:3px;line-height:1.3;font-weight:600;white-space:pre-line}
.handover-table td .handover-unit{margin-top:2px;font-size:10px;text-transform:none}
.handover-list-page .dashboard-filter-wide{grid-template-columns:1.55fr .75fr .8fr .8fr auto}
.mobile-bottom-nav{display:none}
@media(max-width:760px){
  body{padding-bottom:86px!important}
  .mobile-bottom-nav{position:fixed;left:0;right:0;bottom:0;height:70px;background:#fff;border-top:1px solid #ead9dc;box-shadow:0 -10px 28px rgba(47,32,36,.12);display:grid;grid-template-columns:1fr 1fr 76px 1fr 1fr;align-items:center;z-index:1180;padding:5px 8px 8px;border-radius:22px 22px 0 0}
  .mobile-bottom-nav a{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:3px;color:#9a858b;font-weight:800;font-size:11px;min-width:0;text-align:center;height:54px;border-radius:14px;line-height:1.12}
  .mobile-bottom-nav a.active{color:var(--maroon)}
  .mobile-bottom-nav .mbn-icon{font-size:20px;line-height:1}
  .mobile-bottom-main{width:64px!important;height:64px!important;border-radius:50%!important;background:var(--maroon)!important;color:#fff!important;margin:-30px auto 0;box-shadow:0 12px 28px rgba(112,38,50,.35);font-size:28px!important;display:flex!important;flex-direction:row!important;align-items:center!important;justify-content:center!important}
  .mobile-bottom-main span{line-height:1;transform:translateY(-1px)}
  .handover-list-page .dashboard-filter-wide{grid-template-columns:1fr!important}
}
@media(max-width:420px){.mobile-bottom-nav{height:66px;grid-template-columns:1fr 1fr 70px 1fr 1fr}.mobile-bottom-nav a{font-size:10.5px}.mobile-bottom-main{width:58px!important;height:58px!important;margin-top:-26px}}
@media print{body{padding-bottom:0!important}.mobile-bottom-nav{display:none!important}.handover-logo-box{background:transparent!important}.handover-logo-box img{max-height:100px!important}}
.invoice-paper .invoice-brand-logo-only img{filter:brightness(0) invert(1)!important}
@media print{.invoice-paper .invoice-brand-logo-only img{filter:brightness(0) invert(1)!important}}
.brand img,.mobile-brand img{background:#fff!important;padding:5px!important;border-radius:14px!important}
.mobile-brand img{padding:3px!important}

/* =========================================================
   Patch v3: logo warna, print serah terima, mobile lebih compact
   ========================================================= */
.sidebar .brand img,
.mobile-header .mobile-brand img{
  background:transparent!important;
  padding:0!important;
  border-radius:0!important;
  box-shadow:none!important;
}
.login-card img{background:transparent!important;padding:0!important;border-radius:0!important}
.invoice-paper .invoice-brand-logo-only img,
.handover-logo-box img{filter:none!important}

@media(max-width:1000px){
  .sidebar{width:292px!important;position:fixed!important;inset:0 auto 0 0!important;height:100vh!important;transform:translateX(-110%);transition:transform .25s ease!important;z-index:1200!important;box-shadow:0 18px 45px rgba(0,0,0,.18)!important}
  body.mobile-menu-open .sidebar{transform:translateX(0)!important}
  .content{margin-left:0!important;width:100%!important}
}

@media(max-width:760px){
  body{background:#f6f4f6!important;padding-bottom:78px!important}
  .mobile-header{height:60px!important;padding:10px 12px!important;gap:10px!important;background:linear-gradient(90deg,var(--maroon),var(--maroon-dark))!important;box-shadow:0 10px 28px rgba(112,38,50,.18)!important}
  .mobile-menu-toggle{width:42px!important;height:42px!important;border-radius:14px!important;background:rgba(255,255,255,.08)!important}
  .mobile-menu-toggle span{height:2px!important}
  .mobile-brand{gap:8px!important}
  .mobile-brand img{width:34px!important;height:34px!important}
  .mobile-brand span{font-size:13px!important}
  .mobile-invoice-btn{padding:8px 10px!important;font-size:11px!important;border-radius:10px!important}
  .content{padding:12px!important}
  .topbar{display:block!important;margin-bottom:14px!important}
  .topbar h1{font-size:18px!important;line-height:1.2!important}
  .topbar p{font-size:12px!important;line-height:1.45!important;margin-top:4px!important}
  .topbar .btn{display:none!important}
  .grid.grid-4{grid-template-columns:repeat(2,minmax(0,1fr))!important}
  .card{padding:14px!important;border-radius:18px!important;box-shadow:0 12px 28px rgba(47,32,36,.08)!important}
  .card-title{font-size:15px!important}
  .kpi{padding:12px!important;border-radius:16px!important}
  .kpi span{font-size:10.5px!important;line-height:1.35!important}
  .kpi strong{font-size:18px!important;line-height:1.2!important;margin-top:6px!important}
  .field label{font-size:10px!important;margin-bottom:5px!important}
  .field input,.field select,.field textarea{font-size:13px!important;padding:10px 11px!important;border-radius:12px!important}
  .btn{font-size:12px!important;padding:10px 12px!important;border-radius:10px!important}
  .small,.muted{font-size:12px!important}
  .table-wrap{border-radius:14px!important}
  th,td{font-size:12px!important;padding:10px 8px!important}
  .badge,.status-pill{font-size:10px!important;padding:5px 8px!important}
  .table-wrap table{min-width:640px!important}
  .invoice-paper{padding:14px!important}
  .invoice-address{font-size:11px!important;line-height:1.4!important}
  .invoice-title{font-size:16px!important}
  .handover-paper{padding:18px 14px!important}
  .handover-title{font-size:18px!important}
  .handover-lead,.handover-address-box,.handover-intro,.handover-statement,.handover-closing,.handover-row{font-size:13px!important}
  .handover-party-card h3{font-size:14px!important}
  .mobile-bottom-nav{height:66px!important;grid-template-columns:1fr 1fr 68px 1fr 1fr!important;padding:4px 6px 6px!important;border-radius:18px 18px 0 0!important}
  .mobile-bottom-nav a{font-size:9.5px!important;gap:2px!important;height:50px!important;border-radius:12px!important;line-height:1.08!important}
  .mobile-bottom-nav .mbn-icon{font-size:18px!important}
  .mobile-bottom-main{width:56px!important;height:56px!important;margin-top:-22px!important;font-size:24px!important;box-shadow:0 10px 24px rgba(112,38,50,.28)!important}
}

@media(max-width:480px){
  .grid.grid-4{grid-template-columns:1fr!important}
  .mobile-brand span{font-size:12.5px!important}
  .kpi strong{font-size:17px!important}
  .mobile-bottom-nav a{font-size:9px!important}
}

@media print{
  @page{size:A4 portrait;margin:8mm 7mm 9mm 7mm}
  .handover-paper{
    width:100%!important;
    max-width:none!important;
    margin:0!important;
    padding:0!important;
    border:0!important;
    border-radius:0!important;
    box-shadow:none!important;
    overflow:visible!important;
    font-size:8.4pt!important;
    line-height:1.22!important;
  }
  .handover-header{grid-template-columns:1fr 1.02fr!important;gap:5mm!important;align-items:center!important;margin:0 0 3mm!important}
  .handover-logo-box{padding:0!important;min-height:auto!important}
  .handover-logo-box img{max-height:20mm!important;width:auto!important;max-width:100%!important}
  .handover-address-box{min-height:auto!important;padding:2.5mm 3mm!important;font-size:7.7pt!important;line-height:1.28!important;border-width:1px!important}
  .handover-intro{font-size:7.6pt!important;line-height:1.28!important;margin:0 0 2.2mm!important;padding-bottom:2mm!important;border-bottom-width:1px!important}
  .handover-title{font-size:14pt!important;letter-spacing:.02em!important;margin:0 0 2.6mm!important}
  .handover-lead{font-size:8pt!important;margin:0 0 2mm!important}
  .handover-parties{grid-template-columns:1fr 1fr!important;gap:4mm!important;margin:0 0 2.6mm!important}
  .handover-party-card{padding:2.6mm 2.8mm!important;border-width:1px!important;border-radius:8px!important;background:#fff!important}
  .handover-party-card h3{font-size:8.4pt!important;margin:0 0 1.4mm!important}
  .handover-party-card p{margin:2mm 0 0!important;font-size:7.7pt!important;line-height:1.28!important}
  .handover-row{grid-template-columns:27mm 3mm 1fr!important;gap:1mm!important;margin:1mm 0!important;font-size:7.7pt!important;line-height:1.18!important}
  .handover-statement,.handover-closing{font-size:7.7pt!important;line-height:1.32!important;margin:2.2mm 0!important}
  .handover-table{width:100%!important;table-layout:fixed!important;margin:2.4mm 0 2mm!important;font-size:7.1pt!important;line-height:1.12!important;page-break-inside:auto!important}
  .handover-table th,.handover-table td{padding:1.35mm 1.1mm!important;font-size:7.1pt!important;line-height:1.12!important;border-width:1px!important}
  .handover-table th{font-size:7.2pt!important}
  .handover-table td strong{font-weight:800!important;letter-spacing:0!important}
  .handover-no{width:10mm!important}.handover-qty{width:16mm!important}.handover-jam{width:13mm!important}.handover-trip{width:11mm!important}.handover-note{width:14mm!important}
  .handover-date-line{font-size:7.8pt!important;margin:2.5mm 0 2.5mm!important}
  .handover-signatures{grid-template-columns:repeat(3,1fr)!important;gap:4mm!important;text-align:center!important;margin-top:0!important}
  .handover-signatures div{min-height:23mm!important;gap:1.5mm!important}
  .handover-signatures strong{font-size:8.1pt!important}
  .handover-signatures span{font-size:7.4pt!important;line-height:1.2!important}
  .handover-signatures em{font-size:6.8pt!important;margin-top:10mm!important;color:#8a5962!important}
}


/* Patch 2026-07-27: item tambahan serah terima + print multipage */
.handover-footer-block{display:block}
@media print{
  html,body,.app-shell,.content{
    height:auto!important;
    min-height:0!important;
    max-height:none!important;
    overflow:visible!important;
  }
  .handover-paper{
    display:block!important;
    position:static!important;
    height:auto!important;
    min-height:0!important;
    max-height:none!important;
    overflow:visible!important;
    page-break-inside:auto!important;
    break-inside:auto!important;
  }
  .handover-table{
    page-break-inside:auto!important;
    break-inside:auto!important;
  }
  .handover-table thead{display:table-header-group!important}
  .handover-table tbody{display:table-row-group!important}
  .handover-table tr{
    page-break-inside:avoid!important;
    break-inside:avoid-page!important;
  }
  .handover-table td small{
    display:block!important;
    margin-top:.8mm!important;
    font-size:6.2pt!important;
    line-height:1.2!important;
    color:#8a5962!important;
  }
  .handover-table td .handover-unit{
    margin-top:.5mm!important;
    font-size:5.8pt!important;
  }
  .handover-footer-block{
    display:block!important;
    page-break-inside:avoid!important;
    break-inside:avoid-page!important;
  }
}
