/* BTC Accounts ERP v4.2 — Modern UI/UX + A4 Print Optimization
   Presentation-only layer. Business logic, routes, permissions and data flow remain unchanged. */
:root{
  --ux-bg:#f4f6fa;--ux-surface:#ffffff;--ux-surface-2:#f8f9fc;--ux-text:#172033;--ux-muted:#6b7486;
  --ux-border:#e4e8f0;--ux-border-strong:#d7dce7;--ux-primary:#26358f;--ux-primary-2:#425bd2;
  --ux-success:#137a59;--ux-warning:#9d620d;--ux-danger:#b63845;
  --ux-radius-sm:9px;--ux-radius:14px;--ux-radius-lg:18px;
  --ux-shadow-sm:0 1px 2px rgba(15,23,42,.03),0 6px 18px rgba(15,23,42,.045);
  --ux-shadow:0 12px 34px rgba(15,23,42,.07);--ux-focus:0 0 0 3px rgba(52,87,213,.16);
  --ux-control:44px;
}
html{scroll-behavior:smooth;text-rendering:optimizeLegibility}body{background:var(--ux-bg);color:var(--ux-text);-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}
::selection{background:#dfe5ff;color:#101b54}a,button,input,select,textarea{transition:border-color .16s ease,box-shadow .16s ease,background-color .16s ease,color .16s ease,transform .16s ease,opacity .16s ease}
:focus{outline:none}:focus-visible{outline:3px solid rgba(52,87,213,.23);outline-offset:2px}.skip-link{position:fixed;left:14px;top:-80px;z-index:9999;background:#fff;color:#111d57;padding:10px 14px;border-radius:9px;box-shadow:var(--ux-shadow);font-weight:800}.skip-link:focus{top:14px}

/* App shell / navigation */
.pro-app{grid-template-columns:282px minmax(0,1fr);background:var(--ux-bg)}
.pro-sidebar{padding:16px 12px;background:linear-gradient(180deg,#111d57 0%,#0b163f 56%,#08112e 100%);border-right:1px solid rgba(255,255,255,.045);box-shadow:10px 0 32px rgba(10,20,55,.06);transition:width .22s ease,transform .22s ease,padding .22s ease}
.pro-sidebar nav{padding:0 2px 14px;scrollbar-width:thin;scrollbar-color:#354372 transparent}.pro-sidebar nav::-webkit-scrollbar{width:5px}.pro-sidebar nav::-webkit-scrollbar-thumb{background:#354372;border-radius:99px}
.pro-brand{min-height:64px;border-bottom:1px solid rgba(255,255,255,.07);margin:0 2px 10px;padding:4px 7px 14px}.pro-brand b{font-size:13px;letter-spacing:.04em}.pro-brand small{font-size:9px;color:#9eabd0}
.nav-label{padding:9px 11px 5px;color:#7785ac;font-size:9px;letter-spacing:.14em}.pro-sidebar nav a{min-height:42px;padding:9px 11px;border-radius:10px;color:#bec8df}.pro-sidebar nav a i{width:27px;height:27px;border-radius:8px;background:rgba(255,255,255,.055)}.pro-sidebar nav a:hover{background:rgba(255,255,255,.085);transform:translateX(1px)}.pro-sidebar nav a.active{background:linear-gradient(90deg,rgba(76,103,218,.30),rgba(255,255,255,.07));box-shadow:inset 3px 0 #8ea1ff,0 6px 16px rgba(0,0,0,.07)}
.pro-sidebar-footer{padding:13px 8px 2px}.pro-sidebar-footer>a{padding:6px 0;color:#aeb9d5}.pro-sidebar-footer>a:hover{color:#fff}
.pro-topbar{height:78px;padding:0 26px;background:rgba(255,255,255,.92);border-bottom:1px solid rgba(224,228,237,.9);backdrop-filter:blur(16px);box-shadow:0 1px 0 rgba(17,29,87,.02)}.pro-topbar .menu-toggle{display:grid;flex:0 0 auto}.pro-topbar h1{font-size:20px;letter-spacing:-.025em}.pro-topbar .eyebrow{font-size:9px;letter-spacing:.12em}.topbar-actions{min-width:0}.user-menu{gap:8px}.user-copy{min-width:0;max-width:180px}.user-copy b,.user-copy small{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.avatar{border-radius:11px}
.pro-page{padding:26px 28px 42px;max-width:1740px}.page-actions{margin-bottom:16px}.page-actions>p{margin:0;max-width:820px}.page-actions h2,.page-actions h3{margin-top:0}
body.sidebar-collapsed.pro-app{grid-template-columns:86px minmax(0,1fr)}body.sidebar-collapsed .pro-sidebar{padding-inline:10px}body.sidebar-collapsed .pro-brand{justify-content:center}body.sidebar-collapsed .pro-brand>span:last-child,body.sidebar-collapsed .nav-label,body.sidebar-collapsed .pro-sidebar nav a span,body.sidebar-collapsed .pro-sidebar-footer b,body.sidebar-collapsed .pro-sidebar-footer small,body.sidebar-collapsed .pro-sidebar-footer>a{display:none}body.sidebar-collapsed .pro-sidebar nav a{justify-content:center;padding-inline:8px}body.sidebar-collapsed .pro-sidebar nav a i{margin:0}body.sidebar-collapsed .pro-sidebar-footer>div{display:flex;justify-content:center}

/* Cards / hierarchy */
.card,.form-section{border:1px solid var(--ux-border);border-radius:var(--ux-radius);box-shadow:var(--ux-shadow-sm);background:var(--ux-surface)}.card{overflow:clip}.card-head{padding:18px 20px;min-height:64px;background:linear-gradient(180deg,#fff,#fefeff);border-bottom:1px solid #edf0f5}.card-head h2,.card-head h3{letter-spacing:-.015em}.card-head p{line-height:1.5}.card-body{padding:20px}.form-section{padding:22px;box-shadow:0 5px 18px rgba(15,23,42,.035)}.form-section>h3{font-size:17px}.form-section>.muted{max-width:800px}.grid{gap:18px}.grid.two{gap:20px}.muted{color:var(--ux-muted)}.eyebrow{color:#7a8498;font-size:10px;letter-spacing:.12em}.empty{padding:44px 18px;color:var(--ux-muted)}.empty b{color:var(--ux-text)}

/* Buttons and interaction states */
.btn,.icon-btn{min-height:40px}.btn{border-radius:10px;padding:10px 15px;background:linear-gradient(180deg,#30419d,#243288);box-shadow:0 7px 18px rgba(37,51,143,.14);font-weight:760;letter-spacing:.005em}.btn:hover:not(:disabled){filter:none;background:linear-gradient(180deg,#2b3b93,#202d7d);box-shadow:0 9px 20px rgba(37,51,143,.18);transform:translateY(-1px)}.btn:active:not(:disabled){transform:translateY(0);box-shadow:0 3px 10px rgba(37,51,143,.14)}.btn.secondary{background:#eef1ff;color:#26358f;box-shadow:none}.btn.secondary:hover:not(:disabled){background:#e4e9ff}.btn.outline{background:#fff;color:#263044;border:1px solid var(--ux-border-strong);box-shadow:none}.btn.outline:hover:not(:disabled){background:#f8f9fc;border-color:#cfd5e2}.btn.danger{background:#fff4f5;color:var(--ux-danger);box-shadow:none}.btn:disabled,.icon-btn:disabled{opacity:.58;cursor:not-allowed;transform:none!important}.btn.is-loading{position:relative;pointer-events:none}.btn.is-loading:before{content:"";width:13px;height:13px;border:2px solid currentColor;border-right-color:transparent;border-radius:50%;animation:ux-spin .7s linear infinite}@keyframes ux-spin{to{transform:rotate(360deg)}}
.icon-btn{width:40px;height:40px;border-radius:10px;background:#fff;border:1px solid var(--ux-border);box-shadow:0 2px 7px rgba(15,23,42,.03)}.icon-btn:hover{background:#f7f8fb;border-color:#d7dce6}.actions{gap:9px}

/* Forms */
.field{gap:7px}.field label{font-size:12px;color:#344054;font-weight:760}.field input,.field select,.field textarea,.filterbar input,.filterbar select,.select-search{min-height:var(--ux-control);border:1px solid var(--ux-border-strong);border-radius:10px;padding:10px 12px;background:#fff;color:var(--ux-text);box-shadow:inset 0 1px 1px rgba(15,23,42,.018)}.field textarea{min-height:118px;line-height:1.55}.field input::placeholder,.field textarea::placeholder,.filterbar input::placeholder,.select-search::placeholder{color:#9aa3b3}.field input:hover,.field select:hover,.field textarea:hover,.filterbar input:hover,.filterbar select:hover,.select-search:hover{border-color:#c7cedb}.field input:focus,.field select:focus,.field textarea:focus,.filterbar input:focus,.filterbar select:focus,.select-search:focus{border-color:#7087e0;box-shadow:var(--ux-focus)}.field input:disabled,.field select:disabled,.field textarea:disabled{background:#f4f6f8;color:#80899a;cursor:not-allowed}.field input[aria-invalid="true"],.field select[aria-invalid="true"],.field textarea[aria-invalid="true"],.field input:invalid:not(:placeholder-shown){border-color:#db7b85}.field-error{display:block;margin-top:1px;font-size:11px;color:var(--ux-danger)}.required{font-weight:900}.optional{font-size:10px}.filterbar{grid-template-columns:minmax(260px,1fr) minmax(170px,230px) auto;gap:10px;align-items:end}.select-search{margin-bottom:8px;background:#fbfcfe}.quick-add{min-height:42px;border-radius:10px}

/* Tables */
.table-wrap{width:100%;overflow:auto;overscroll-behavior-inline:contain;scrollbar-width:thin;scrollbar-color:#cad1dd transparent}.table-wrap::-webkit-scrollbar{height:8px}.table-wrap::-webkit-scrollbar-thumb{background:#cad1dd;border-radius:99px}.data-table{border-collapse:separate;border-spacing:0;min-width:720px}.data-table th{position:sticky;top:0;z-index:2;background:#f7f8fb;color:#687386;padding:11px 14px;font-size:10px;letter-spacing:.065em;border-bottom:1px solid #e3e7ef;white-space:nowrap}.data-table td{padding:13px 14px;border-bottom:1px solid #edf0f5;color:#273044}.data-table tbody tr{transition:background-color .14s ease}.data-table tbody tr:hover{background:#fafbfe}.data-table td.right,.data-table th.right{font-variant-numeric:tabular-nums}.data-table a.strong{color:#223486}.data-table a.strong:hover{text-decoration:underline;text-underline-offset:3px}.data-table small{margin-top:2px}.pagination{gap:6px}.pagination a{min-width:34px;text-align:center;border-color:var(--ux-border);background:#fff}.pagination a:hover{background:#f4f6fb}.pagination a.active{background:#26358f;border-color:#26358f}
.badge,.pill{padding:5px 9px;font-size:11px;line-height:1.2;border:1px solid transparent}.badge.paid,.badge.active,.badge.present,.badge.delivered-received,.badge.approved{border-color:#caeee0}.badge.overdue,.badge.void,.badge.cancelled,.badge.archived,.badge.inactive{border-color:#f2d2d5}.badge.partially-paid,.badge.late,.badge.in-transit,.badge.ready-to-send{border-color:#f2dfb8}

/* Dashboard */
.dashboard-welcome{padding:23px 24px!important;border-left:4px solid #3548aa}.dashboard-welcome h2{font-size:22px;letter-spacing:-.025em;margin:5px 0 7px}.dashboard-welcome p{margin:0;line-height:1.6}.dashboard-kpis{gap:12px}.dashboard-kpi{min-height:116px;border:1px solid var(--ux-border);border-radius:14px;background:#fff;box-shadow:var(--ux-shadow-sm);transition:transform .17s ease,box-shadow .17s ease,border-color .17s ease}.dashboard-kpi:hover{transform:translateY(-2px);border-color:#d7ddeb;box-shadow:var(--ux-shadow)}.dashboard-kpi b{font-variant-numeric:tabular-nums}.dashboard-main-grid{gap:18px}.quick-action-list a{transition:background .15s ease,transform .15s ease}.quick-action-list a:hover{transform:translateX(2px)}.pro-chart{overflow:hidden}

/* Documents & invoice form */
.document-items{border-color:var(--ux-border);border-radius:12px}.item-head{background:#f6f8fb}.item-row{gap:10px}.item-row:not(.item-head):hover{background:#fcfdff}.totals-panel{border:1px solid var(--ux-border);box-shadow:none;background:#fbfcff;border-radius:12px}.total-line{font-variant-numeric:tabular-nums}
.doc-actionbar{position:sticky;top:12px;z-index:20;padding:9px;background:rgba(245,247,251,.92);backdrop-filter:blur(12px);border:1px solid #e3e7ef;border-radius:12px;box-shadow:0 8px 24px rgba(15,23,42,.08)}
.print-shell{background:#edf0f5;padding:20px 14px 40px}.print-actions{position:sticky;top:10px;z-index:30;display:flex;justify-content:center;gap:8px;margin:0 auto 16px;width:max-content;max-width:calc(100% - 20px);padding:8px;border:1px solid #dce1e9;border-radius:12px;background:rgba(255,255,255,.94);backdrop-filter:blur(10px);box-shadow:0 8px 24px rgba(15,23,42,.08)}
.official-document{max-width:210mm;border-radius:2px}.official-document.invoice-pro{overflow:hidden}.invoice-table{table-layout:fixed}.invoice-table th,.invoice-table td{overflow-wrap:anywhere}.invoice-table th:nth-child(2),.invoice-table td:nth-child(2){width:auto}.invoice-table th:nth-child(3),.invoice-table td:nth-child(3){width:10%}.invoice-table th:nth-child(4),.invoice-table td:nth-child(4),.invoice-table th:nth-child(5),.invoice-table td:nth-child(5){width:17%}.invoice-company h1{line-height:1.08}.invoice-contact span{line-height:1.35}.invoice-bill{overflow-wrap:anywhere}.invoice-summary b{font-variant-numeric:tabular-nums}.doc-table{table-layout:fixed}.doc-table td,.doc-table th{overflow-wrap:anywhere}.doc-box{overflow-wrap:anywhere}.signature-block,.invoice-signature{break-inside:avoid}
.verification-card-grid{gap:18px}.verification-details dl{margin:0}.verification-details dt{color:#70798b}.verification-qr small{overflow-wrap:anywhere}

/* Reports */
.report-header{padding:2px 0 4px}.report-title h2{font-size:26px;letter-spacing:-.025em}.report-kpis{gap:11px}.report-kpi{min-height:92px;padding:15px;border-radius:12px;box-shadow:var(--ux-shadow-sm)}.report-kpi b{font-variant-numeric:tabular-nums}.report-visuals{gap:16px}.report-bar-track{height:8px}.aging-box{min-height:82px}.report-filter{margin-bottom:18px}.report-print-masthead,.report-print-approval{display:none}

/* Mail / content / settings */
.mail-status,.seo-stat,.editor-side-card,.contact-pro-card,.aging-box{box-shadow:0 3px 12px rgba(15,23,42,.03)}.mail-row{min-height:62px}.mail-row:focus-within{box-shadow:inset 3px 0 #4057c7}.mail-body{overflow-wrap:anywhere}.content-editor-grid{gap:20px}.content-editor-side{top:96px}.pro-editor{min-height:460px!important}.settings-savebar{border:1px solid var(--ux-border);box-shadow:0 10px 30px rgba(15,23,42,.10);border-radius:13px}
.toast{border-radius:11px;box-shadow:0 7px 18px rgba(15,23,42,.06);animation:ux-toast-in .2s ease}@keyframes ux-toast-in{from{opacity:0;transform:translateY(-5px)}to{opacity:1;transform:none}}

/* Authentication */
.auth-shell{background:#f6f7fb}.auth-main{background:#fff}.auth-main .public-brand{margin-bottom:28px}.auth-main form{width:min(460px,100%)}.auth-card,.auth-main>.card{border-radius:18px}.auth-visual{position:relative;overflow:hidden}.auth-visual:after{content:"";position:absolute;width:420px;height:420px;border:1px solid rgba(255,255,255,.10);border-radius:50%;right:-180px;bottom:-170px;box-shadow:0 0 0 90px rgba(255,255,255,.025)}

/* Public frontend */
.pro-public{background:#fff}.pro-public-header{border-bottom:1px solid rgba(228,232,240,.9);box-shadow:0 6px 22px rgba(16,27,84,.055)}.pro-public-header .public-nav{gap:20px}.pro-public-header .public-nav>a:not(.btn){position:relative;padding:8px 0}.pro-public-header .public-nav>a:not(.btn):after{content:"";position:absolute;left:0;right:100%;bottom:2px;height:2px;background:#334bb5;transition:right .18s ease}.pro-public-header .public-nav>a:not(.btn):hover:after,.pro-public-header .public-nav>a.active:after{right:0}.public-hero{padding:88px 0 80px}.public-hero h1{letter-spacing:-.045em}.public-hero p{line-height:1.72}.public-section{padding:68px 0}.service-card,.content-card,.trust-panel,.public-cta{box-shadow:0 10px 30px rgba(17,29,87,.055)}.service-card,.content-card{transition:transform .18s ease,box-shadow .18s ease,border-color .18s ease}.service-card:hover,.content-card:hover{transform:translateY(-3px);box-shadow:0 16px 36px rgba(17,29,87,.085);border-color:#dbe0ec}.article-body{font-size:16px;line-height:1.78}.article-body h2,.article-body h3{scroll-margin-top:110px}.article-body img{border-radius:12px}.public-footer{margin-top:0}

/* Accessible / useful motion */
@media (prefers-reduced-motion:reduce){*,*:before,*:after{scroll-behavior:auto!important;transition:none!important;animation:none!important}}

/* Laptop / tablet */
@media(max-width:1240px){.pro-app{grid-template-columns:248px minmax(0,1fr)}.pro-sidebar{padding-inline:10px}.pro-page{padding:22px}.dashboard-kpis{grid-template-columns:repeat(2,minmax(0,1fr))}.report-kpis{grid-template-columns:repeat(3,minmax(0,1fr))}.filterbar{grid-template-columns:minmax(220px,1fr) minmax(160px,220px) auto}.item-row{grid-template-columns:42px minmax(140px,.75fr) minmax(180px,1.2fr) 84px 110px 110px 40px}}
@media(max-width:980px){.pro-app{display:block}.pro-sidebar{position:fixed;width:282px;left:-300px;top:0;bottom:0;height:100dvh;z-index:60;box-shadow:18px 0 46px rgba(8,17,47,.22)}.pro-sidebar.open{left:0}.pro-topbar{padding:0 16px}.pro-page{padding:18px}.overlay.show{display:block;position:fixed;inset:0;background:rgba(5,12,31,.5);backdrop-filter:blur(2px);z-index:55}.dashboard-main-grid,.mail-grid,.report-visuals,.content-editor-grid,.contact-pro-grid,.about-pro-grid{grid-template-columns:1fr}.content-editor-side{position:static;grid-template-columns:repeat(2,minmax(0,1fr))}.grid.four,.report-filter .grid.four{grid-template-columns:repeat(2,minmax(0,1fr))}body.sidebar-collapsed.pro-app{display:block}.invoice-contact-grid{grid-template-columns:repeat(2,1fr)}}
@media(max-width:720px){:root{--ux-control:46px}.container{width:min(100% - 28px,1180px)}.pro-topbar{height:68px}.pro-topbar .eyebrow,.top-create,.user-copy{display:none}.pro-page{padding:14px 13px 28px}.page-actions,.report-header,.content-admin-head,.seo-admin-tools,.settings-section-head{align-items:stretch;display:grid;gap:12px}.page-actions .actions,.report-header .actions{width:100%}.page-actions .actions>.btn,.report-header .actions>.btn,.report-header .actions>a{flex:1}.card-head{padding:15px 16px}.card-body,.form-section{padding:16px}.grid.two,.grid.three,.grid.four,.report-filter .grid.four,.content-editor-side,.mail-status-grid,.report-kpis,.aging-grid,.seo-overview,.contact-directory,.about-values{grid-template-columns:1fr}.dashboard-kpis{grid-template-columns:1fr 1fr}.dashboard-kpi{min-height:105px}.filterbar{grid-template-columns:1fr}.filterbar .btn{width:100%}.actions{gap:8px}.btn{min-height:42px}.data-table{min-width:0!important}.table-wrap{overflow:visible}.data-table.responsive-table thead{display:none}.data-table.responsive-table,.data-table.responsive-table tbody,.data-table.responsive-table tr,.data-table.responsive-table td{display:block;width:100%}.data-table.responsive-table tbody{padding:10px}.data-table.responsive-table tr{margin-bottom:10px;border:1px solid var(--ux-border);border-radius:12px;background:#fff;box-shadow:0 3px 12px rgba(15,23,42,.035);overflow:hidden}.data-table.responsive-table tr:last-child{margin-bottom:0}.data-table.responsive-table td{display:grid;grid-template-columns:minmax(105px,34%) minmax(0,1fr);gap:12px;padding:9px 12px;border-bottom:1px solid #eef1f5;text-align:left!important;overflow-wrap:anywhere}.data-table.responsive-table td:last-child{border-bottom:0}.data-table.responsive-table td:before{content:attr(data-label);font-size:9px;letter-spacing:.06em;text-transform:uppercase;color:#7a8495;font-weight:850}.data-table.responsive-table td[data-empty-row="1"]{display:block;text-align:center!important}.data-table.responsive-table td[data-empty-row="1"]:before{display:none}.data-table.responsive-table td .btn{width:100%}.item-head{display:none}.item-row{grid-template-columns:1fr 1fr;padding:14px}.item-row>span:first-child{display:none}.item-row .field:nth-child(2),.item-row .field:nth-child(3){grid-column:1/-1}.item-row .field label{display:block}.item-amount{align-self:center}.invoice-title-row{display:grid}.invoice-dates{min-width:0}.official-document.invoice-pro{padding:18px}.invoice-head{grid-template-columns:64px minmax(0,1fr);gap:14px}.invoice-head-logo{width:62px;height:56px}.invoice-company h1{font-size:18px}.invoice-table{font-size:8px}.doc-actionbar{position:static;margin-inline:8px}.doc-actionbar .btn,.doc-actionbar form{flex:1}.doc-actionbar form .btn{width:100%}.print-shell{padding:8px 0 24px}.print-actions{position:static}.public-hero{padding:58px 0 54px}.public-section{padding:50px 0}.article-body{font-size:15px}.public-nav{max-height:calc(100dvh - 68px);overflow:auto}.contact-ribbon{display:none}}
@media(max-width:480px){.dashboard-kpis{grid-template-columns:1fr}.pro-topbar{padding-inline:11px}.pro-topbar h1{font-size:17px}.topbar-actions{gap:6px}.user-menu{gap:5px}.avatar,.icon-btn{width:38px;height:38px}.dashboard-welcome{padding:18px!important}.dashboard-welcome-actions{display:grid}.dashboard-welcome-actions .btn{width:100%}.invoice-contact-grid{grid-template-columns:1fr}.invoice-head{grid-template-columns:52px minmax(0,1fr)}.invoice-head-logo{width:50px;height:48px}.invoice-company h1{font-size:16px}.invoice-number{font-size:19px}.invoice-bill h2{font-size:16px}.content-search{grid-template-columns:1fr}}

/* PRINT SYSTEM — A4-safe, no UI chrome, clean page flow */
@page{size:A4;margin:0}
@media print{
  html,body{background:#fff!important;color:#111!important;-webkit-print-color-adjust:exact!important;print-color-adjust:exact!important;box-shadow:none!important}
  body{font-size:9pt;line-height:1.35}.skip-link,.sidebar,.pro-sidebar,.topbar,.pro-topbar,.overlay,.print-actions,.doc-actionbar,.no-print,.public-header,.public-footer,.contact-ribbon,.report-filter,.report-header .actions,.settings-savebar,.pagination{display:none!important}
  .main{display:block!important;margin:0!important;padding:0!important;min-width:0!important}.page,.pro-page{display:block!important;width:210mm!important;max-width:none!important;margin:0!important;padding:9mm 9mm 11mm!important;overflow:visible!important}
  .print-shell{display:block!important;width:210mm!important;max-width:210mm!important;margin:0!important;padding:0!important;background:#fff!important;overflow:visible!important}
  a{color:inherit!important;text-decoration:none!important}*{text-shadow:none!important}.card,.form-section{box-shadow:none!important;border-color:#d9dde5!important;background:#fff!important}.card{overflow:visible!important}.card-head{background:#fff!important;padding:4mm 4.5mm!important;min-height:0!important}.card-body{padding:4mm 4.5mm!important}
  .table-wrap{overflow:visible!important;border:0!important}.data-table,.data-table.responsive-table{display:table!important;width:100%!important;min-width:0!important;max-width:100%!important;border-collapse:collapse!important;table-layout:fixed!important;font-size:7.6pt!important}.data-table thead,.data-table.responsive-table thead{display:table-header-group!important}.data-table tbody,.data-table.responsive-table tbody{display:table-row-group!important;padding:0!important}.data-table tr,.data-table.responsive-table tr{display:table-row!important;margin:0!important;border:0!important;border-radius:0!important;box-shadow:none!important;background:#fff!important;break-inside:avoid-page}.data-table th,.data-table td,.data-table.responsive-table td{display:table-cell!important;width:auto!important;padding:2.2mm 1.8mm!important;border:1px solid #dfe3e9!important;vertical-align:top!important;text-align:left!important;overflow-wrap:anywhere!important;word-break:normal!important}.data-table th{position:static!important;background:#f1f3f7!important;color:#333c4c!important;font-size:6.8pt!important;white-space:normal!important}.data-table td:before,.data-table.responsive-table td:before{display:none!important}.data-table .right,.data-table.responsive-table .right{text-align:right!important}.data-table .btn{display:none!important}
  thead{display:table-header-group}tfoot{display:table-footer-group}tr,img,.doc-box,.aging-box,.report-kpi,.report-bar-row,.signature-block,.invoice-signature{break-inside:avoid-page;page-break-inside:avoid}
  h1,h2,h3{break-after:avoid-page;page-break-after:avoid}.badge,.pill{border:1px solid #cfd4dc!important;background:#fff!important;color:#222!important;padding:1mm 2mm!important;font-size:6.5pt!important}

  /* Management report */
  .report-print-masthead{display:grid!important;grid-template-columns:19mm minmax(0,1fr) auto;gap:4mm;align-items:center;border-bottom:1.2mm solid #293595;padding-bottom:4mm;margin-bottom:5mm}.report-print-masthead img{width:18mm;height:15mm;object-fit:contain}.report-print-masthead h1{font-size:14pt!important;margin:0 0 1mm;color:#293595!important}.report-print-masthead p{margin:0;font-size:7.5pt;color:#5f6777}.report-print-masthead .report-print-period{text-align:right;font-size:7.5pt}.report-print-masthead .report-print-period b{display:block;font-size:8pt;margin-bottom:1mm}
  .report-header{display:block!important;margin:0 0 4mm!important}.report-header .report-title .eyebrow{display:none}.report-header .report-title h2{font-size:12pt!important;margin:0 0 1mm}.report-header .report-title p{font-size:7.4pt;margin:0}.report-period{display:none!important}
  .report-kpis{display:grid!important;grid-template-columns:repeat(3,1fr)!important;gap:2.5mm!important;margin:4mm 0!important}.report-kpi{min-height:0!important;padding:3mm!important;box-shadow:none!important;border-radius:2mm!important}.report-kpi small{font-size:6.3pt!important}.report-kpi b{font-size:10pt!important;margin-top:1mm!important}.report-visuals{display:grid!important;grid-template-columns:1fr 1fr!important;gap:3mm!important}.report-section{break-inside:auto!important;page-break-inside:auto!important;margin-top:4mm!important}.report-visuals>.card{break-inside:avoid-page;page-break-inside:avoid}.report-bar-list{gap:2mm!important}.report-bar-row{grid-template-columns:minmax(32mm,.65fr) minmax(35mm,1fr) auto!important;gap:2mm!important}.report-bar-label,.report-bar-value{font-size:7pt!important}.report-bar-track{height:2mm!important}.aging-grid{grid-template-columns:repeat(2,1fr)!important;gap:2mm!important}.aging-box{min-height:0!important;padding:2.5mm!important}.aging-box span{font-size:6pt!important}.aging-box b{font-size:9pt!important}.report-section>.card-head{break-after:avoid-page;page-break-after:avoid}.chart{height:42mm!important;min-height:42mm!important}.chart-bars{height:32mm!important}.chart-col small{font-size:5.8pt!important}.grid.two.report-section{grid-template-columns:1fr!important;gap:4mm!important}.report-print-approval{display:grid!important;grid-template-columns:1fr 45mm;gap:12mm;align-items:end;margin-top:8mm;padding-top:4mm;border-top:1px solid #d8dde5;break-inside:avoid-page}.report-print-approval p{margin:0;font-size:7pt;color:#626b7b}.report-print-signature{padding-top:11mm;border-bottom:1px solid #333;text-align:center;font-size:7pt}

  /* Official documents / invoices / estimates */
  .official-document{display:block!important;width:210mm!important;max-width:210mm!important;min-height:0!important;margin:0!important;padding:11mm 13mm!important;border:0!important;border-radius:0!important;box-shadow:none!important;overflow:visible!important;background:#fff!important}
  .official-document.invoice-pro{padding:10mm 13mm 9mm!important}.invoice-head{grid-template-columns:24mm minmax(0,1fr)!important;gap:5mm!important}.invoice-head-logo{width:24mm!important;height:20mm!important}.invoice-company h1{font-size:17pt!important}.invoice-company .tagline,.invoice-company .address{font-size:7pt!important}.invoice-blue-line{height:1.1mm!important;margin:4mm 0 3mm!important}.invoice-contact-grid{grid-template-columns:repeat(4,minmax(0,1fr))!important;gap:3mm!important;padding-bottom:3mm!important}.invoice-contact small{font-size:5.2pt!important}.invoice-contact span{font-size:6.1pt!important}.invoice-title-row{display:flex!important;padding:4mm 0!important;gap:8mm!important}.invoice-number{font-size:15pt!important}.invoice-label{font-size:6.5pt!important}.invoice-dates{min-width:48mm!important;gap:1.4mm!important}.invoice-date-row{grid-template-columns:18mm 1fr!important;gap:3mm!important;font-size:6.6pt!important}.invoice-bill{padding:4mm!important;margin:1mm 0 4mm!important;border-radius:2mm!important;break-inside:avoid-page}.invoice-bill h2{font-size:12pt!important;margin:1.5mm 0 .8mm!important}.invoice-bill p{font-size:6.7pt!important}.invoice-table{width:100%!important;max-width:100%!important;table-layout:fixed!important;border-collapse:collapse!important}.invoice-table thead{display:table-header-group!important}.invoice-table tr{break-inside:avoid-page}.invoice-table th{padding:2.5mm 2.2mm!important;font-size:6pt!important}.invoice-table td{padding:2.6mm 2.2mm!important;font-size:6.7pt!important;overflow-wrap:anywhere!important}.invoice-item-note{font-size:5.8pt!important}.invoice-table th:nth-child(1),.invoice-table td:nth-child(1){width:8mm!important}.invoice-table th:nth-child(3),.invoice-table td:nth-child(3){width:14mm!important}.invoice-table th:nth-child(4),.invoice-table td:nth-child(4),.invoice-table th:nth-child(5),.invoice-table td:nth-child(5){width:29mm!important}.invoice-summary-wrap{margin-top:3mm!important}.invoice-summary{width:73mm!important}.invoice-summary div{grid-template-columns:1fr 29mm!important;gap:4mm!important;padding:1mm 0!important;font-size:6.8pt!important}.invoice-summary .grand,.invoice-summary .due{font-size:9pt!important;padding-top:2mm!important}.invoice-notes{margin-top:5mm!important;padding-top:2.5mm!important;min-height:0!important;break-inside:avoid-page}.invoice-notes h3{font-size:6.5pt!important}.invoice-notes p{font-size:6.2pt!important}.invoice-bottom{margin-top:8mm!important;gap:8mm!important;break-inside:avoid-page}.invoice-signature{width:50mm!important;font-size:6.2pt!important}.invoice-signature img{height:12mm!important}.invoice-generated{font-size:5.5pt!important}.invoice-generated img{width:7mm!important;height:7mm!important}.invoice-public-ref{font-size:5pt!important}

  /* Generic receipt / verification documents */
  .doc-head{gap:5mm!important;padding-bottom:3mm!important}.doc-head img{width:18mm!important;height:18mm!important}.doc-company h1{font-size:15pt!important}.doc-company p{font-size:7pt!important}.doc-title{margin:6mm 0!important}.doc-title h2{font-size:15pt!important}.doc-meta{gap:4mm!important;margin:4mm 0!important}.doc-box{padding:3mm!important;border-radius:2mm!important}.doc-table{width:100%!important;table-layout:fixed!important;margin-top:4mm!important}.doc-table thead{display:table-header-group!important}.doc-table th,.doc-table td{padding:2.5mm!important;font-size:7.3pt!important}.doc-summary{width:70mm!important;margin:4mm 0 4mm auto!important}.doc-summary div{padding:1.3mm!important}.signature-block{margin-top:10mm!important;width:55mm!important}.signature-block img{height:14mm!important}.doc-footer{position:static!important;left:auto!important;right:auto!important;bottom:auto!important;margin-top:8mm!important;padding-top:2.5mm!important;font-size:6.5pt!important;break-inside:avoid-page}.verification-card-grid{grid-template-columns:minmax(0,1fr) 48mm!important;gap:5mm!important}.verification-details dl{font-size:7pt!important}.verification-qr{padding:3mm!important}.verification-qr svg{max-width:42mm!important;height:auto!important}.verification-qr small{font-size:5.5pt!important}.verification-security-note{font-size:6.5pt!important;break-inside:avoid-page}

  /* Avoid accidental extra blank pages */
  .official-document>:last-child,.pro-page>:last-child{margin-bottom:0!important}body:after{display:none!important}
}
/* v4.2 print regression refinement: keep business document numbers intact. */
.invoice-number{white-space:nowrap}
@media print{.invoice-number{white-space:nowrap!important;font-size:14pt!important;letter-spacing:-.02em!important}}
@media print{
  .report-invoice-table th:nth-child(1),.report-invoice-table td:nth-child(1){width:32mm!important;white-space:nowrap!important;font-size:6.8pt!important}
  .report-invoice-table th:nth-child(2),.report-invoice-table td:nth-child(2){width:21mm!important;white-space:nowrap!important}
  .report-invoice-table th:nth-child(3),.report-invoice-table td:nth-child(3){width:34mm!important}
  .report-invoice-table th:nth-child(4),.report-invoice-table td:nth-child(4){width:20mm!important;white-space:nowrap!important}
  .report-invoice-table th:nth-child(5),.report-invoice-table td:nth-child(5),.report-invoice-table th:nth-child(6),.report-invoice-table td:nth-child(6){width:26mm!important}
  .report-invoice-table th:nth-child(7),.report-invoice-table td:nth-child(7){width:29mm!important}
}
@media print{.doc-summary,.invoice-summary-wrap,.invoice-notes,.report-print-approval{break-inside:avoid-page!important;page-break-inside:avoid!important}}
