:root{--navy:#17253d;--navy2:#223554;--blue:#2563eb;--blue-dark:#1d4ed8;--bg:#f3f6fa;--card:#fff;--border:#dce3ec;--text:#182235;--muted:#68758a;--success:#137a55;--danger:#c73737;--shadow:0 2px 10px rgba(25,38,61,.06)}*{box-sizing:border-box}html{font-family:Inter,ui-sans-serif,system-ui,-apple-system,"Segoe UI",sans-serif;color:var(--text);background:var(--bg)}body{margin:0;font-size:14px}a{color:#1e5acb;text-decoration:none}button,input,select,textarea{font:inherit}input,select,textarea{width:100%;border:1px solid #cdd6e2;border-radius:7px;padding:9px 10px;background:#fff;color:var(--text);outline:none}input:focus,select:focus,textarea:focus{border-color:#5890ed;box-shadow:0 0 0 3px rgba(37,99,235,.1)}textarea{resize:vertical}label{display:flex;flex-direction:column;gap:6px;font-weight:600;color:#344157}label small{font-weight:400;color:var(--muted)}.app-shell{min-height:100vh}.sidebar{position:fixed;inset:0 auto 0 0;width:235px;background:var(--navy);color:#fff;padding:22px 14px;display:flex;flex-direction:column;z-index:20}.brand{display:flex;align-items:center;gap:11px;color:#fff;padding:0 8px 24px;border-bottom:1px solid rgba(255,255,255,.1);font-weight:700;font-size:16px}.brand>span,.auth-brand>span{display:grid;place-items:center;width:39px;height:39px;border-radius:9px;background:#3175ef;color:#fff;font-weight:800}.brand small{display:block;color:#aebbd0;font-weight:400;font-size:11px;margin-top:2px}.sidebar nav{display:flex;flex-direction:column;gap:4px;margin-top:22px}.sidebar nav a{color:#cdd6e5;padding:11px 13px;border-radius:7px}.sidebar nav a:hover,.sidebar nav a.active{color:#fff;background:var(--navy2)}.logout-link{color:#cdd6e5;margin-top:auto;padding:11px 13px}.main-content{margin-left:235px;min-width:0}.topbar{height:72px;background:#fff;border-bottom:1px solid var(--border);display:flex;align-items:center;justify-content:space-between;padding:0 28px;position:sticky;top:0;z-index:10}.topbar>div:first-child{display:flex;align-items:center;gap:12px}.topbar h1{font-size:20px;margin:0}.menu-toggle{display:none;border:0;background:none;font-size:22px}.user-chip{display:flex;flex-direction:column;text-align:right}.user-chip small{color:var(--muted)}.content{padding:26px 28px;max-width:1550px;margin:auto}.card,.stat-card{background:var(--card);border:1px solid var(--border);border-radius:10px;box-shadow:var(--shadow)}.stats-grid{display:grid;grid-template-columns:repeat(4,1fr);gap:16px;margin-bottom:26px}.stat-card{padding:20px}.stat-card span{display:block;color:var(--muted);font-weight:600;margin-bottom:12px}.stat-card strong{display:block;font-size:25px}.stat-card small{color:#8a95a6}.section-heading,.page-actions{display:flex;align-items:center;justify-content:space-between;gap:18px;margin:18px 0 12px}.section-heading h2{font-size:17px;margin:0 0 3px}.section-heading p,.paste-card p{margin:0;color:var(--muted)}.btn{display:inline-flex;align-items:center;justify-content:center;border-radius:7px;padding:9px 14px;border:1px solid transparent;cursor:pointer;font-weight:600}.btn-primary{background:var(--blue);color:#fff}.btn-primary:hover{background:var(--blue-dark)}.btn-secondary{background:#fff;border-color:#cfd8e4;color:#344157}.btn:disabled{opacity:.5;cursor:not-allowed}.btn-block{width:100%}.table-wrap{overflow-x:auto}table{border-collapse:collapse;width:100%;white-space:nowrap}th{text-align:left;background:#f8fafc;color:#5c687a;font-size:12px;text-transform:uppercase;letter-spacing:.03em}th,td{padding:12px 13px;border-bottom:1px solid #e8edf3;vertical-align:middle}tbody tr:last-child td{border-bottom:0}td small{display:block;color:var(--muted);margin-top:3px}.empty{text-align:center;color:var(--muted);padding:30px}.actions{display:flex;gap:10px;align-items:center}.actions form{display:inline}.link-button,.text-button{border:0;background:none;color:#1e5acb;padding:0;cursor:pointer}.danger{color:var(--danger)}.badge{display:inline-block;padding:4px 8px;border-radius:20px;font-size:12px}.badge-success{background:#e5f6ef;color:var(--success)}.badge-muted{background:#edf0f4;color:#68758a}.form-card{padding:22px}.form-card.narrow{max-width:600px}.form-grid{display:grid;gap:17px}.form-grid.two{grid-template-columns:repeat(2,minmax(0,1fr))}.form-grid.five{grid-template-columns:repeat(5,minmax(130px,1fr))}.span-2{grid-column:span 2}.form-actions{display:flex;justify-content:flex-end;gap:9px;margin-top:20px}.check-label{flex-direction:row;align-items:center}.check-label input{width:auto}.filter-inline{display:flex;gap:8px}.filters{padding:18px}.alert{padding:11px 13px;border-radius:7px;margin-bottom:14px}.alert-success{background:#e6f7ef;color:#116b4c;border:1px solid #bde8d5}.alert-error{background:#fff0f0;color:#a92828;border:1px solid #f0c9c9}.muted{color:var(--muted)}.auth-page{min-height:100vh;display:grid;place-items:center;background:linear-gradient(145deg,#eef3fa,#e2e9f3);padding:20px}.auth-card{width:100%;max-width:420px;background:#fff;padding:28px;border:1px solid var(--border);border-radius:12px;box-shadow:0 12px 40px rgba(26,43,70,.12)}.auth-card form{display:flex;flex-direction:column;gap:16px}.auth-brand{display:flex;align-items:center;gap:12px;margin-bottom:26px}.auth-brand h1{margin:0;font-size:22px}.auth-brand p{margin:2px 0 0;color:var(--muted)}.setup-link{display:block;text-align:center;margin-top:18px;color:var(--muted)}.paste-card{padding:20px;margin-top:16px}.paste-defaults{display:grid;grid-template-columns:repeat(3,1fr);gap:12px;margin:16px 0}.paste-card textarea{margin-bottom:10px}.invoice-items-wrap{border:0;border-radius:0;box-shadow:none}.invoice-items input,.invoice-items select{min-width:95px;padding:7px}.invoice-items [name="item_name[]"]{min-width:220px}.invoice-items .calc{font-size:12px;color:#455268}.remove-item{border:0;background:#fbeaea;color:#b82e2e;border-radius:6px;font-size:20px;width:28px;height:28px;cursor:pointer}.totals{display:flex;justify-content:flex-end;gap:14px;margin-top:16px}.totals>div{min-width:190px;background:#fff;border:1px solid var(--border);border-radius:9px;padding:14px}.totals span{display:block;color:var(--muted);font-size:12px;margin-bottom:5px}.totals strong{font-size:17px}.company-picker{display:grid;grid-template-columns:minmax(130px,.7fr) minmax(180px,1.3fr);gap:6px}.text-button{align-self:flex-start;margin-top:2px}.invoice-summary{display:grid;grid-template-columns:repeat(4,1fr);gap:18px;padding:20px}.invoice-summary span{display:block;color:var(--muted);font-size:12px;margin-bottom:5px}.invoice-summary strong,.invoice-summary small{display:block}.invoice-summary small{color:var(--muted);margin-top:4px}.pagination{display:flex;gap:5px;justify-content:center;margin-top:18px}.pagination a{background:#fff;border:1px solid var(--border);padding:7px 10px;border-radius:6px}.pagination a.active{background:var(--blue);color:#fff}dialog{border:0;border-radius:11px;padding:0;width:min(680px,94vw);box-shadow:0 20px 60px rgba(0,0,0,.2)}dialog::backdrop{background:rgba(14,24,40,.55)}.modal-card{padding:24px;position:relative}.modal-card h2{margin-top:0}.modal-close{position:absolute;right:14px;top:12px;border:0;background:none;font-size:24px;cursor:pointer}.modal-card .form-actions .modal-close{position:static;font-size:14px}.page-actions>div{white-space:nowrap}
@media(max-width:1100px){.stats-grid{grid-template-columns:repeat(2,1fr)}.form-grid.five{grid-template-columns:repeat(3,1fr)}.invoice-summary{grid-template-columns:repeat(2,1fr)}.totals{flex-wrap:wrap}}
@media(max-width:760px){.sidebar{transform:translateX(-100%);transition:.2s}.sidebar.open{transform:none}.main-content{margin-left:0}.menu-toggle{display:block}.topbar{padding:0 16px}.content{padding:18px 14px}.stats-grid{grid-template-columns:1fr}.form-grid.two,.form-grid.five,.paste-defaults,.invoice-summary{grid-template-columns:1fr}.span-2{grid-column:auto}.page-actions,.section-heading{align-items:flex-start;flex-direction:column}.totals{flex-direction:column}.totals>div{width:100%}.filter-inline{width:100%;flex-direction:column}.company-picker{grid-template-columns:1fr}}

/* Invoice item editor */
.invoice-items-card{margin-top:16px;overflow:hidden}.invoice-items-heading{margin:0;padding:20px 20px 14px}.item-header-actions{display:flex;align-items:center;gap:8px;white-space:nowrap}.invoice-items-wrap{border:0;border-top:1px solid #e8edf3;border-radius:0;box-shadow:none}.invoice-items{table-layout:fixed;min-width:980px}.invoice-items .col-type{width:9%}.invoice-items .col-code{width:10%}.invoice-items .col-description{width:25%}.invoice-items .col-unit{width:15%}.invoice-items .col-qty{width:9%}.invoice-items .col-price{width:13%}.invoice-items .col-discount{width:13%}.invoice-items .col-action{width:6%}.invoice-items th{padding:11px 9px}.invoice-items td{padding:10px 9px}.invoice-items input,.invoice-items select{min-width:0;padding:8px}.invoice-items [name="item_name[]"]{min-width:0}.invoice-items [name="item_qty[]"]{min-width:82px}.invoice-items [name="item_price[]"],.invoice-items [name="item_discount[]"]{min-width:112px}.invoice-items .action-heading,.invoice-items .item-action{text-align:center}.item-row td{border-bottom:0;background:#fff}.item-calculation-row td{padding:0 14px 11px;border-bottom:1px solid #dfe6ee;background:#fff}.item-calculation{display:flex;align-items:center;justify-content:flex-end;gap:12px;padding:8px 10px;border:1px solid #e5eaf0;border-radius:7px;background:#f8fafc;color:#536075;white-space:normal}.item-calculation span{display:flex;align-items:baseline;gap:6px}.item-calculation small{color:#758195;font-size:11px;font-weight:600;text-transform:uppercase;letter-spacing:.02em}.item-calculation strong{color:#354258;font-size:12px}.item-calculation i{width:3px;height:3px;border-radius:50%;background:#a7b1bf}.remove-item{width:30px;height:30px}.remove-item:hover{background:#f6dada}.paste-modal{width:min(720px,94vw)}.paste-modal .modal-card{max-height:calc(100vh - 32px);overflow-y:auto}.paste-modal .modal-card h2{margin:0 36px 5px 0}.modal-description{margin:0;color:var(--muted);line-height:1.5}.paste-defaults{grid-template-columns:.8fr .8fr 1.4fr;gap:12px;margin:20px 0 16px}.paste-modal textarea{min-height:150px;margin-top:2px;font-family:ui-monospace,SFMono-Regular,Consolas,monospace;font-size:13px;line-height:1.55}.paste-status{min-height:20px;margin-top:8px;color:var(--muted);font-size:13px}.paste-status.has-warning{color:#9a6700}.paste-status.is-error{color:var(--danger)}
@media(max-width:1100px){.invoice-items{min-width:940px}}
@media(max-width:760px){.item-header-actions{width:100%;white-space:normal}.item-header-actions .btn{flex:1}.invoice-items-wrap{overflow:visible}.invoice-items{display:block;min-width:0;table-layout:auto}.invoice-items colgroup,.invoice-items thead{display:none}.invoice-items tbody{display:block;padding:12px}.invoice-items .item-row{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;padding:14px 14px 10px;border:1px solid var(--border);border-bottom:0;border-radius:9px 9px 0 0;background:#fff}.invoice-items .item-row td{display:flex;flex-direction:column;gap:5px;padding:0;border:0;min-width:0}.invoice-items .item-row td::before{content:attr(data-label);color:#667286;font-size:11px;font-weight:700;text-transform:uppercase}.invoice-items .item-row td:nth-child(3),.invoice-items .item-row td:nth-child(4){grid-column:span 2}.invoice-items .item-row .item-action{align-items:flex-start}.invoice-items .item-row .remove-item{margin-top:1px}.invoice-items input,.invoice-items select,.invoice-items [name="item_qty[]"],.invoice-items [name="item_price[]"],.invoice-items [name="item_discount[]"]{min-width:0}.item-calculation-row{display:block;margin-bottom:12px}.item-calculation-row td{display:block;padding:0;border:0}.item-calculation{justify-content:flex-start;flex-wrap:wrap;gap:8px 10px;border-radius:0 0 9px 9px;padding:10px 14px}.item-calculation span{flex-direction:column;gap:1px;min-width:110px}.item-calculation i{display:none}.paste-modal .form-actions{flex-direction:column-reverse}.paste-modal .form-actions .btn{width:100%}}

/* Dashboard: proporsi tabel faktur terbaru */
.latest-invoices-table{table-layout:fixed;min-width:820px}.latest-invoices-table .latest-date{width:9%}.latest-invoices-table .latest-ref{width:19%}.latest-invoices-table .latest-company{width:25%}.latest-invoices-table .latest-amount{width:11%}.latest-invoices-table th:nth-child(3),.latest-invoices-table th:nth-child(4),.latest-invoices-table td:nth-child(3),.latest-invoices-table td:nth-child(4){white-space:normal;line-height:1.4}.latest-invoices-table td:nth-child(2){overflow-wrap:anywhere;white-space:normal;font-size:12px;line-height:1.3}.latest-invoices-table th:nth-child(5),.latest-invoices-table th:nth-child(6),.latest-invoices-table td:nth-child(5),.latest-invoices-table td:nth-child(6){text-align:right}
@media(max-width:760px){.latest-invoices-table{min-width:780px}.latest-invoices-table .latest-date{width:10%}.latest-invoices-table .latest-ref{width:20%}.latest-invoices-table .latest-company{width:24%}.latest-invoices-table .latest-amount{width:11%}}

/* Compact desktop density */
@media(min-width:761px){
body{font-size:13px}
.sidebar{width:214px;padding:18px 12px}
.brand{gap:9px;padding:0 7px 19px;font-size:14px}
.brand>span{width:35px;height:35px;border-radius:8px}
.brand small{font-size:9px}
.sidebar nav{gap:2px;margin-top:17px}
.sidebar nav a{padding:9px 11px}
.logout-link{padding:9px 11px}
.main-content{margin-left:214px}
.topbar{height:62px;padding:0 23px}
.topbar h1{font-size:17px}
.user-chip{line-height:1.25}
.user-chip small{font-size:10px}
.content{padding:21px 23px}
.stats-grid{gap:13px;margin-bottom:21px}
.stat-card{padding:16px 17px}
.stat-card span{margin-bottom:8px;font-size:12px}
.stat-card strong{font-size:21px;line-height:1.2}
.stat-card small{font-size:10px}
.section-heading,.page-actions{gap:14px;margin:15px 0 10px}
.section-heading h2{font-size:15px}
.section-heading p{font-size:11px}
.card{border-radius:9px}
th,td{padding:10px 11px}
th{font-size:10px}
input,select,textarea{padding:7px 9px;border-radius:6px}
.btn{padding:7px 12px;border-radius:6px}
.form-card{padding:18px}
.form-grid{gap:14px}
.form-actions{gap:8px;margin-top:16px}
.filters{padding:15px}
.filter-inline{gap:7px}
.alert{padding:9px 11px;margin-bottom:11px}
.invoice-items-heading{padding:16px 17px 11px}
.item-header-actions{gap:7px}
.invoice-items th{padding:9px 8px}
.invoice-items td{padding:8px}
.invoice-items input,.invoice-items select{padding:6px 7px}
.item-calculation-row td{padding:0 12px 9px}
.item-calculation{padding:7px 9px}
.remove-item{width:28px;height:28px}
.totals{gap:11px;margin-top:13px}
.totals>div{min-width:175px;padding:11px 12px}
.totals strong{font-size:15px}
.invoice-summary{gap:14px;padding:17px}
.paste-modal .modal-card,.modal-card{padding:20px}
.paste-defaults{gap:10px;margin:16px 0 13px}
.paste-modal textarea{min-height:135px}
.pagination{margin-top:14px}
.pagination a{padding:6px 9px}
}

/* Faktur Keluaran action controls */
.invoice-actions{display:flex;align-items:center;justify-content:flex-start;gap:4px;white-space:nowrap}.invoice-action-icon{display:inline-flex;align-items:center;justify-content:center;width:27px;height:27px;padding:0;border:0;border-radius:6px;background:transparent;color:#1e5acb;cursor:pointer;transition:background-color 140ms ease,color 140ms ease}.invoice-action-icon:hover,.invoice-action-icon:focus-visible{background:#edf4ff;color:#174ca8;outline:0}.invoice-action-icon:focus-visible,.invoice-action-xml:focus-visible{box-shadow:0 0 0 2px rgba(37,99,235,.18)}.invoice-action-xml{display:inline-flex;align-items:center;justify-content:center;height:25px;padding:0 6px;border:1px solid #d7e2f1;border-radius:5px;background:#f8fbff;color:#1e5acb;font-size:10.5px;font-weight:700;line-height:1}.invoice-action-xml:hover{background:#edf4ff}.invoice-action-delete{color:#dc2626}.invoice-action-delete:hover,.invoice-action-delete:focus-visible{background:#fff1f2;color:#b91c1c}

/* Compact username menu in the header */
.user-menu{position:relative}.user-menu summary{display:flex;align-items:center;gap:6px;padding:7px 9px;border-radius:6px;cursor:pointer;font-weight:600;list-style:none}.user-menu summary::-webkit-details-marker{display:none}.user-menu summary:hover,.user-menu[open] summary{background:#f1f5f9}.user-menu-dropdown{position:absolute;right:0;top:calc(100% + 7px);min-width:125px;padding:5px;background:#fff;border:1px solid var(--border);border-radius:7px;box-shadow:0 8px 24px rgba(25,38,61,.14);z-index:30}.user-menu-dropdown a{display:flex;align-items:center;gap:8px;padding:8px 9px;border-radius:5px;color:#344157;white-space:nowrap}.user-menu-dropdown a:hover{background:#f3f6fa}
@media(min-width:761px){.user-menu summary{padding:6px 8px}}

/* Polished header user dropdown */
.user-menu{position:relative}.user-menu-trigger{display:flex;align-items:center;justify-content:space-between;gap:12px;min-width:112px;padding:7px 11px;background:#fff;border:1px solid #d7dee8;border-radius:11px;color:var(--text);font-weight:600;line-height:1.2;cursor:pointer;box-shadow:0 1px 2px rgba(25,38,61,.04);transition:border-color 150ms ease,background-color 150ms ease,box-shadow 150ms ease}.user-menu-trigger:hover{background:#f8fafc;border-color:#c7d1de}.user-menu-trigger:focus-visible{outline:0;border-color:#5890ed;box-shadow:0 0 0 3px rgba(37,99,235,.13)}.user-menu-chevron{flex:0 0 auto;color:#68758a;transition:transform 150ms ease}.user-menu.is-open .user-menu-chevron{transform:rotate(180deg)}.user-menu-dropdown{position:absolute;right:0;top:calc(100% + 8px);width:180px;padding:6px;background:#fff;border:1px solid #dce3ec;border-radius:11px;box-shadow:0 12px 32px rgba(25,38,61,.14);z-index:50;transform-origin:top right;animation:user-menu-in 150ms ease}.user-menu-dropdown[hidden]{display:none}.user-menu-dropdown a{display:flex;align-items:center;gap:9px;width:100%;padding:9px 10px;border-radius:8px;color:#344157;font-weight:500;line-height:1.25;white-space:nowrap;transition:background-color 140ms ease,color 140ms ease}.user-menu-dropdown a:hover,.user-menu-dropdown a:focus-visible{background:#f1f5f9;color:#182235;outline:0}.user-menu-dropdown svg{flex:0 0 auto;color:#667286}@keyframes user-menu-in{from{opacity:0;transform:translateY(-4px)}to{opacity:1;transform:translateY(0)}}
@media(min-width:761px){.user-menu-trigger{padding:6px 11px}}
@media(prefers-reduced-motion:reduce){.user-menu-trigger,.user-menu-chevron,.user-menu-dropdown,.user-menu-dropdown a{transition:none;animation:none}}

.user-menu-dropdown a:hover,.user-menu-dropdown a:focus-visible{background:#fff1f2;color:#182235}.user-menu-dropdown svg{color:#dc2626}

/* Compact desktop density — stage 2 */
@media(min-width:761px){
body{font-size:12px}
.sidebar{width:188px;padding:15px 10px}
.brand{gap:8px;padding:0 6px 16px;font-size:13px}
.brand>span{width:32px;height:32px;border-radius:7px;font-size:12px}
.brand small{font-size:8.5px;margin-top:1px}
.sidebar nav{gap:1px;margin-top:14px}
.sidebar nav a{padding:8px 9px;font-size:11.5px}
.main-content{margin-left:188px}
.topbar{height:55px;padding:0 18px}
.topbar h1{font-size:16px}
.content{padding:17px 18px}

.stats-grid{gap:10px;margin-bottom:17px}
.stat-card{padding:13px 14px}
.stat-card span{margin-bottom:6px;font-size:11px}
.stat-card strong{font-size:19px}
.stat-card small{font-size:9.5px}
.section-heading,.page-actions{gap:11px;margin:12px 0 8px}
.section-heading h2{font-size:14px}
.section-heading p{font-size:10.5px}
.card{border-radius:8px}

label{gap:4px;font-size:11.5px}
input,select,textarea{padding:6px 8px;border-radius:6px;font-size:11.5px}
.btn{padding:6px 10px;border-radius:6px;font-size:11.5px}
.form-card{padding:15px}
.form-grid{gap:11px}
.form-grid.five{gap:9px}
.form-actions{gap:7px;margin-top:13px}
.filters{padding:12px}
.filter-inline{gap:6px}
.alert{padding:8px 10px;margin-bottom:9px}

table{font-size:11.25px}
th,td{padding:7px 8px}
th{font-size:10.5px;letter-spacing:.02em}
.actions{gap:7px}
.badge{padding:3px 7px;font-size:10px}
.pagination{gap:4px;margin-top:11px}
.pagination a{padding:5px 8px}

.invoice-items-heading{padding:13px 14px 9px}
.item-header-actions{gap:6px}
.invoice-items{min-width:900px;font-size:11px}
.invoice-items th{padding:7px 6px;font-size:10px}
.invoice-items td{padding:6px}
.invoice-items input,.invoice-items select{padding:5px 6px;font-size:11px}
.invoice-items [name="item_qty[]"]{min-width:72px}
.invoice-items [name="item_price[]"],.invoice-items [name="item_discount[]"]{min-width:96px}
.item-calculation-row td{padding:0 10px 7px}
.item-calculation{gap:9px;padding:5px 8px}
.item-calculation small{font-size:9px}
.item-calculation strong{font-size:10.5px}
.remove-item{width:26px;height:26px;font-size:18px}
.totals{gap:9px;margin-top:10px}
.totals>div{min-width:158px;padding:9px 10px}
.totals span{font-size:10px;margin-bottom:3px}
.totals strong{font-size:13.5px}
.invoice-summary{gap:11px;padding:14px}

.modal-card,.paste-modal .modal-card{padding:17px}
.modal-card h2,.paste-modal .modal-card h2{font-size:16px}
.paste-defaults{gap:8px;margin:13px 0 11px}
.paste-modal textarea{min-height:120px;font-size:11px}
.paste-status{font-size:11px}

/* Faktur Keluaran: fit common desktop widths without changing table content. */
#bulk-form .table-wrap{overflow-x:auto}
#bulk-form table{table-layout:fixed;width:100%}
#bulk-form th:nth-child(1),#bulk-form td:nth-child(1){text-align:center}
#bulk-form th:nth-child(3),#bulk-form td:nth-child(3){white-space:normal;overflow-wrap:anywhere;line-height:1.3}
#bulk-form th:nth-child(4),#bulk-form td:nth-child(4),#bulk-form th:nth-child(5),#bulk-form td:nth-child(5){white-space:normal;line-height:1.3}
#bulk-form th:nth-child(6),#bulk-form td:nth-child(6){text-align:center}
#bulk-form th:nth-child(7),#bulk-form td:nth-child(7){text-align:right}
#bulk-form th:nth-child(8),#bulk-form td:nth-child(8){text-align:right}
#bulk-form th:nth-child(9),#bulk-form td:nth-child(9){white-space:normal;line-height:1.3}
#bulk-form td.actions{display:table-cell;font-size:10.5px;white-space:nowrap}
#bulk-form td.actions>*{margin-right:6px}
#bulk-form td.actions>*:last-child{margin-right:0}
#bulk-form input[type="checkbox"]{width:auto}

.latest-invoices-table{min-width:740px;font-size:11px}
.latest-invoices-table td:nth-child(2){font-size:10.5px}
}

/* Faktur Keluaran column widths are controlled only by its colgroup. */
@media(min-width:761px){
#bulk-form th:nth-child(7),#bulk-form td:nth-child(7),#bulk-form th:nth-child(8),#bulk-form td:nth-child(8),#bulk-form th:nth-child(9),#bulk-form td:nth-child(9),#bulk-form th:nth-child(10),#bulk-form td:nth-child(10){white-space:nowrap}
}

/* Faktur Keluaran table hierarchy and alignment */
.invoice-history-table thead th{padding-top:9px;padding-bottom:9px;background:#f7f9fc;color:#485568;font-size:11.5px;font-weight:600;letter-spacing:0;text-transform:none}.invoice-history-table tbody td{padding-top:10px;padding-bottom:10px;border-bottom-color:#e8edf3}.invoice-history-table tbody tr{transition:background-color 120ms ease}.invoice-history-table tbody tr:hover{background:#fafcff}.invoice-history-table th:nth-child(1),.invoice-history-table td:nth-child(1),.invoice-history-table th:nth-child(2),.invoice-history-table td:nth-child(2),.invoice-history-table th:nth-child(6),.invoice-history-table td:nth-child(6),.invoice-history-table th:nth-child(9),.invoice-history-table td:nth-child(9),.invoice-history-table th:nth-child(10),.invoice-history-table td:nth-child(10){text-align:center}.invoice-history-table th:nth-child(3),.invoice-history-table td:nth-child(3),.invoice-history-table th:nth-child(4),.invoice-history-table td:nth-child(4),.invoice-history-table th:nth-child(5),.invoice-history-table td:nth-child(5){text-align:left}.invoice-history-table th:nth-child(7),.invoice-history-table td:nth-child(7),.invoice-history-table th:nth-child(8),.invoice-history-table td:nth-child(8){text-align:right;white-space:nowrap}.invoice-history-table td:nth-child(2){white-space:nowrap}.invoice-history-table td:nth-child(3){font-size:12px;line-height:1.35}.invoice-history-table td:nth-child(4),.invoice-history-table td:nth-child(5){white-space:normal;line-height:1.4}.invoice-user-badge{display:inline-flex;align-items:center;justify-content:center;max-width:100%;padding:3px 7px;border-radius:7px;background:#eef3f8;color:#435166;font-size:11.5px;font-weight:600;line-height:1.2;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.invoice-actions{display:flex;align-items:center;justify-content:center;gap:4px}.invoice-history-table .invoice-action-icon{width:26px;height:26px;border:1px solid transparent;border-radius:7px}.invoice-history-table .invoice-action-icon:hover,.invoice-history-table .invoice-action-icon:focus-visible{border-color:#dce6f3}.invoice-history-table .invoice-action-delete:hover,.invoice-history-table .invoice-action-delete:focus-visible{border-color:#fecdd3}

/* Faktur Keluaran preference: uppercase and left-aligned */
.invoice-history-table thead th{padding-top:8px;padding-bottom:8px;color:#566276;font-size:11px;font-weight:700;letter-spacing:.025em;text-align:left;text-transform:uppercase}.invoice-history-table tbody td{padding-top:9px;padding-bottom:9px;text-align:left}.invoice-history-table th:nth-child(n),.invoice-history-table td:nth-child(n){text-align:left}.invoice-history-table td:nth-child(7),.invoice-history-table td:nth-child(8){white-space:nowrap}.invoice-actions{justify-content:flex-start;gap:4px}.invoice-history-table .invoice-action-icon{width:25px;height:25px}.invoice-history-table .invoice-action-xml{height:24px;padding:0 5px;font-size:10px}

/* Faktur Keluaran final order: Aksi then User */
@media(min-width:761px){
#bulk-form th:nth-child(6),#bulk-form td:nth-child(6){padding-left:5px;padding-right:4px}
#bulk-form th:nth-child(7),#bulk-form td:nth-child(7){padding-left:6px;padding-right:8px;white-space:nowrap}
#bulk-form th:nth-child(8),#bulk-form td:nth-child(8){padding-left:8px;padding-right:9px;white-space:nowrap}
#bulk-form th:nth-child(9),#bulk-form td:nth-child(9){white-space:nowrap}
#bulk-form th:nth-child(10),#bulk-form td:nth-child(10){padding-right:7px;white-space:nowrap}
}

.invoice-history-table .invoice-actions{gap:2px}.invoice-history-table .invoice-action-icon{width:24px;height:24px}

/* Faktur Keluaran: uniform left alignment */
#bulk-form .invoice-history-table th:nth-child(n),#bulk-form .invoice-history-table td:nth-child(n){text-align:left}
#bulk-form .invoice-history-table .invoice-actions{justify-content:flex-start}
#bulk-form .invoice-history-table .invoice-user-badge{justify-content:flex-start;text-align:left}

#bulk-form .invoice-history-table .invoice-user-badge{display:inline;background:transparent;color:inherit;border:0;border-radius:0;padding:0;font-size:inherit;font-weight:inherit;line-height:inherit;white-space:normal;overflow:visible;text-overflow:clip}

#bulk-form .invoice-history-table .invoice-actions{gap:2px}
#bulk-form .invoice-history-table .invoice-action-icon{flex:0 0 23px;width:23px;height:24px;margin:0;padding:0}

#bulk-form .invoice-history-table .invoice-actions{display:inline-flex;align-items:center;justify-content:flex-start;gap:0;width:auto;white-space:nowrap}
#bulk-form .invoice-history-table .invoice-actions>a,#bulk-form .invoice-history-table .invoice-actions>button{display:inline-flex;align-items:center;justify-content:center;flex:0 0 auto;width:auto;min-width:0;height:auto;margin:0;padding:1px}
#bulk-form .invoice-history-table .invoice-actions svg{display:block;width:15px;height:15px}

@media(min-width:761px){
.auth-brand h1{font-size:21px}
.invoice-action-xml{font-size:9.5px}
.invoice-items .calc{font-size:11px}
.invoice-summary span{font-size:11px}
.modal-card .form-actions .modal-close{font-size:13px}
.invoice-history-table thead th{font-size:10px}
.invoice-history-table td:nth-child(3){font-size:11px}
.invoice-history-table .invoice-action-xml{font-size:9px}
}

/* Dashboard transaction filters */
.dashboard-filters{display:flex;align-items:flex-end;gap:8px;margin-bottom:14px}.dashboard-filter-field{flex:1 1 180px;min-width:0}.dashboard-filter-period{flex:0 1 140px}.dashboard-custom-date{flex:0 1 150px}.dashboard-filter-actions{display:flex;flex:0 0 auto;gap:6px}.dashboard-filter-field[hidden]{display:none}
@media(max-width:1100px){.dashboard-filters{flex-wrap:wrap}.dashboard-filter-field{flex-basis:calc(33.333% - 6px)}}
@media(max-width:760px){.dashboard-filters{align-items:stretch}.dashboard-filter-field,.dashboard-filter-period,.dashboard-custom-date{flex:1 1 100%}.dashboard-filter-actions{width:100%}.dashboard-filter-actions .btn{flex:1}}
