/* Consistent icon, field, focus and responsive refinements. */
:root{--ui-ink:#234333;--ui-muted:#71816e;--ui-focus:#17805d;--ui-border:#dce5d7}
:where(a,button,input,select,textarea,summary):focus-visible{outline:2px solid var(--ui-focus);outline-offset:3px}
.btn,.icon-action,.icon-button{transition:background .16s,border-color .16s,box-shadow .16s;color:var(--ui-ink)}
.btn{min-height:40px;border-radius:9px}.btn.primary{color:white;background:linear-gradient(125deg,#0b4d3b,#156347);border-color:#0b4d3b;box-shadow:0 3px 9px #0b4d3b16}
.btn.primary:hover{background:#0b4d3b;box-shadow:0 5px 13px #0b4d3b27}.btn.danger{color:#ad6657}.btn:disabled{opacity:.55;cursor:wait}
.ui-action{gap:7px}.ui-action>.icon{width:16px;height:16px;flex-shrink:0}.save-more button.ui-action{display:flex;align-items:center;gap:9px}
.nav-item{border:1px solid transparent}.nav-item:hover{border-color:#c6a15b26;background:#ffffff0c}.nav-item .icon{width:19px;height:19px;opacity:.95}.nav-item.active{box-shadow:0 4px 14px #00000016}
.breadcrumb{font-size:12px}.global-search input{font-size:12px}.user-label strong{font-size:12px}.user-label small{font-size:10px}
.page-heading p,.dashboard-heading p{font-size:12px;color:#79886f}.page-heading .eyebrow,.dashboard-heading .eyebrow{font-size:9px;color:#829272}
.quick-card{border-radius:12px}.quick-icon{width:42px;height:42px;border-radius:12px;background:linear-gradient(140deg,#0f5b42,#327553);color:#f1f4de;border-color:#27724e;box-shadow:0 4px 10px #10513a1a}.quick-card.gold .quick-icon{color:#806323;background:linear-gradient(135deg,#f7efda,#e9d3a0);border-color:#e5d19f}.quick-card h3{font-size:15px}.quick-card p{font-size:10px;white-space:normal;line-height:1.55}.quick-top{margin-bottom:9px}
.stat-top{font-size:12px}.stat-bottom{font-size:10px;line-height:1.4;white-space:normal;padding-right:16px}.stat-value{letter-spacing:-.6px}.panel-heading h2{font-size:16px}.panel-heading p{font-size:11px}.text-link{font-size:12px}
.recent-panel th{font-size:11px}.recent-panel td{font-size:11px}.doc-number{font-size:11px}.cell-secondary{font-size:10px}.badge{font-size:10px}.tabs button,.tabs a{font-size:11px;min-height:33px}.task-row{font-size:11px}.task-note{font-size:10px}.donut-legend>div{font-size:10px}.table-action{display:inline-flex;align-items:center}.row-actions{gap:5px}.icon-action{min-width:30px;min-height:30px}
.ui-field{gap:8px}.field-label-text{display:flex;align-items:center;gap:7px;color:#44613b;min-height:23px;line-height:1.4;font-size:12px;font-weight:500}.field-label-text>.icon{width:17px;height:17px;color:#7b936e;flex-shrink:0}.required-indicator{color:#ae654b;font-weight:700;margin-left:1px}
.ui-field input:not([type=checkbox]):not([type=radio]),.ui-field select,.ui-field textarea{border:1px solid var(--ui-border);background:#fcfdfb;border-radius:9px;min-height:42px;font-size:13px;line-height:1.5;padding:10px 12px;transition:border-color .16s,box-shadow .16s,background .16s}
.ui-field input::placeholder,.ui-field textarea::placeholder{color:#a1ad97;font-size:12px}.ui-field input:hover,.ui-field select:hover,.ui-field textarea:hover{border-color:#bdcdb3}.ui-field input:focus,.ui-field select:focus,.ui-field textarea:focus{background:white;border-color:#52845e;box-shadow:0 0 0 3px #54826213;outline:none}.ui-field:focus-within>.field-label-text,.ui-field:focus-within>.field-label-text>.icon{color:#166046}.ui-field input:disabled{background:#eff3ea;border-style:dashed;color:#8a997e}
.section-symbol{width:35px;height:35px;background:#edf4e7;color:#3b7048;border:1px solid #deead5;border-radius:10px;display:inline-flex;justify-content:center;align-items:center;flex:none}.section-symbol .icon{width:19px;height:19px}.doc-form .section-heading .doc-step{width:23px;height:23px;font-size:10px;background:#edf3e8;color:#769166;box-shadow:none;margin-left:auto;order:3}.doc-form .section-heading h2{font-size:16px}.doc-form .section-heading{width:100%}.doc-form .doc-section-head{margin-bottom:17px}.doc-form .doc-section-head .doc-section-heading{width:auto}.doc-form-title-wrap .doc-title-icon{border-radius:13px;padding:11px;box-sizing:content-box}
.doc-form .form-layout>div,.doc-form .form-layout>aside{min-width:0}.doc-form .form-row-inline{grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:17px!important}.doc-form .form-row-inline.cols-4{grid-template-columns:repeat(3,minmax(0,1fr))!important}.doc-form .form-row-inline label,.doc-form .form-grid label{font-size:12px}.doc-form .bank-field{display:flex;gap:8px}.doc-form .customer-select-row{margin-bottom:16px}.doc-form .customer-card-col{font-size:12px}.doc-form .customer-card-label{font-size:11px}.doc-form .customer-card-empty{font-size:12px;padding:25px 16px}
.doc-form .items-table-wrap{overflow-x:auto;overscroll-behavior-x:contain;-webkit-overflow-scrolling:touch;padding:0 0 5px;border:1px solid #e2e9dc}.doc-form #items-table{min-width:880px;table-layout:fixed}.doc-form #items-table th{font-size:11px;padding:11px 7px}.doc-form #items-table td{padding:10px 6px!important;vertical-align:middle}.doc-form #items-table th:first-child{width:30px}.doc-form #items-table th:nth-child(2){width:250px}.doc-form #items-table th:nth-child(3){width:76px}.doc-form #items-table th:nth-child(4){width:66px}.doc-form #items-table th:nth-child(5){width:100px}.doc-form #items-table th:nth-child(6){width:116px}.doc-form #items-table th:nth-child(7){width:44px}.doc-form #items-table th:nth-child(8){width:108px}.doc-form #items-table th:nth-child(9){width:38px}.doc-form #items-table .col-product{min-width:0}.doc-form #items-table .col-product .item-inline{display:grid;grid-template-columns:76px minmax(0,1fr);gap:5px}.doc-form #items-table .item-name{grid-column:1/-1;width:100%;min-width:0!important;font-weight:500}.doc-form #items-table .item-code,.doc-form #items-table .item-desc{width:100%;min-width:0;max-width:none!important;font-size:11px}.doc-form #items-table td input,.doc-form #items-table td select{max-width:100%;font-size:12px;min-height:34px;border-color:#dce6d5}.doc-form #items-table .col-qty input,.doc-form #items-table .col-unit input,.doc-form #items-table .col-price input{width:100%;min-width:0!important}.doc-form #items-table .col-discount input{width:58px;min-width:0!important}.doc-form #items-table .col-discount select{width:46px;min-width:0!important}.doc-form #items-table .col-vat input{min-height:16px}.doc-form #items-table .col-total{font-size:12px}.doc-form .doc-items-toolbar{gap:9px}.doc-form .doc-items-toolbar .product-search-wrap{min-width:150px;padding:0 9px}.doc-form .doc-items-toolbar input{min-width:0!important}.doc-form .doc-items-hint{font-size:11px}
.doc-form .sidebar-panel label{font-size:12px}.doc-form .doc-form-sidebar .input-pair input{width:65%}.doc-form .doc-form-sidebar .input-pair select{width:35%}.doc-form .sidebar-panel{box-shadow:0 4px 16px #163d2807}.doc-form .grand-total-card{padding:18px;border-radius:13px}.doc-form .grand-total-card small{font-size:12px}.doc-form .amount-words{font-size:11px}.doc-form .note-tabs button{font-size:12px;min-height:42px}.doc-form .note-panel textarea{min-height:110px}.doc-form .upload-zone{cursor:pointer;transition:.16s}.doc-form .upload-zone:hover,.doc-form .upload-zone.drag-over{background:#edf5e5;border-color:#6e9460}.upload-zone input[type=file]{font-size:11px;min-width:0;width:100%}.upload-zone input::file-selector-button{border:0;background:#e6eddc;color:#406235;padding:7px 10px;border-radius:5px;cursor:pointer;margin-right:7px}.attachment-list{display:grid;gap:6px;margin-top:9px}.attachment-chip{display:flex;gap:7px;align-items:center;padding:8px;background:#f4f7ef;border-radius:6px;color:#638154;font-size:11px;overflow-wrap:anywhere}.attachment-chip>.icon{width:15px;height:15px}.attachment-chip.is-invalid{background:#fff0e8;color:#a4563c}
.password-control{position:relative;width:100%}.password-control>input{padding-right:43px!important}.password-toggle{position:absolute;right:6px;top:50%;transform:translateY(-50%);width:33px;height:32px;display:flex;align-items:center;justify-content:center;color:#789169;border-radius:6px}.password-toggle:hover{background:#eef4e7}.password-toggle .icon{width:18px;height:18px}.login-card .input-with-icon{position:relative}.login-card .input-with-icon>.icon{position:absolute;left:13px;top:50%;transform:translateY(-50%);width:18px;height:18px}.login-card .input-with-icon>input{padding-left:40px}.login-card .btn{justify-content:center;gap:10px;min-height:45px}.login-card .field-label-text{font-size:13px}
@media(min-width:1450px){.doc-form .form-row-inline{grid-template-columns:repeat(4,minmax(0,1fr))!important}.doc-form .form-row-inline.cols-4{grid-template-columns:repeat(3,minmax(0,1fr))!important}}
@media(max-width:1200px){.doc-form .form-layout{grid-template-columns:minmax(0,1fr) 280px}.doc-form .customer-detail.has-customer .customer-card-grid{grid-template-columns:1fr}.quick-card h3{font-size:13px}.quick-card p{font-size:9px}.stat-value{font-size:23px}.stat-top{font-size:11px}.stat-bottom{font-size:9px}}
@media(max-width:900px){.doc-form .form-layout{grid-template-columns:minmax(0,1fr)}.doc-form .form-summary.doc-form-sidebar{position:static;max-height:none;overflow:visible;display:grid;grid-template-columns:repeat(2,minmax(0,1fr));align-items:start}.doc-form .form-row-inline,.doc-form .form-row-inline.cols-4{grid-template-columns:repeat(2,minmax(0,1fr))!important}.doc-form-header .doc-form-actions .btn{flex:1 1 150px}.doc-form-title-wrap .doc-title-icon{width:25px;height:25px;padding:9px}.doc-form .doc-form-title-row{gap:20px}.doc-form .doc-items-toolbar .product-search-wrap{flex-basis:100%}.doc-form .doc-items-toolbar .btn{flex:1}.doc-form .customer-select-row{display:block}.doc-form .customer-select-field{width:100%}}
@media(max-width:600px){.content{padding-left:13px;padding-right:13px}.doc-form .form-row-inline,.doc-form .form-row-inline.cols-4{grid-template-columns:minmax(0,1fr)!important}.doc-form .form-summary.doc-form-sidebar{display:flex}.doc-form .form-section{padding:17px 15px}.doc-form .doc-section-head{align-items:flex-start;gap:10px;flex-wrap:wrap}.doc-form .section-heading h2{font-size:15px}.doc-form .section-heading .doc-step{display:none}.doc-form .doc-section-head .btn-sm{min-height:36px}.doc-form-header .doc-form-actions{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}.doc-form-header .doc-form-actions .btn{font-size:11px;padding:9px 8px;min-height:43px;white-space:normal}.doc-form-header .doc-form-actions .btn-lg{width:auto}.doc-form-title-wrap h1{font-size:23px}.doc-form-title-wrap p{font-size:11px}.doc-form .doc-form-header{padding:15px}.doc-form .form-section input,.doc-form .form-section select,.doc-form .form-section textarea,.doc-form .sidebar-panel input,.doc-form .sidebar-panel select,.doc-form .sidebar-panel textarea,.login-card input{font-size:16px}.doc-form .doc-items-toolbar input{font-size:14px}.doc-form .doc-form-footer{margin-left:-13px;margin-right:-13px;padding:10px 13px;gap:7px}.doc-form .doc-form-footer>span.muted{display:none}.doc-form .doc-form-footer .save-more{flex:1}.doc-form .doc-form-footer .save-more summary{width:100%}.doc-form .doc-form-footer>.btn{min-height:40px}.doc-form .note-tabs button{font-size:11px;padding:8px}.quick-card h3{font-size:13px}.quick-card p{font-size:9px}.quick-icon{width:35px;height:35px}.quick-icon .icon{width:19px;height:19px}.stat-value{font-size:21px}.stat-top{font-size:11px}.stat-bottom{font-size:9px}.recent-panel td,.recent-panel th{font-size:10px}.recent-panel .cell-secondary{font-size:9px}.table-wrap{overscroll-behavior-x:contain}.global-search input{font-size:11px}.login-brand h2{display:none}}
@media(prefers-reduced-motion:reduce){*,*::before,*::after{scroll-behavior:auto!important;transition:none!important;animation:none!important}}
@media print{.ui-icon,.password-toggle,.attachment-list{display:none!important}}

/* Larger, readable workspace typography. Keep printed document sizing independent. */
body{font-size:16px;line-height:1.65}
.sidebar nav a,.sidebar .nav-link{font-size:15px;min-height:44px}
.sidebar .nav-group,.sidebar .nav-title,.sidebar .nav-label{font-size:12px}
.topbar input,.topbar strong{font-size:15px}
.content label,.content .field-label-text,.doc-form .sidebar-panel label,.login-card .field-label-text{font-size:15px;line-height:1.6}
.content input,.content select,.content textarea,.doc-form .form-section input,.doc-form .form-section select,.doc-form .form-section textarea,.doc-form .sidebar-panel input,.doc-form .sidebar-panel select,.doc-form .sidebar-panel textarea,.login-card input{font-size:16px;line-height:1.5;min-height:44px}
.content input[type=checkbox],.content input[type=radio]{min-height:initial}
.content .btn,.doc-form-header .doc-form-actions .btn,.doc-form .note-tabs button,.tabs button,.tabs a,.admin-tabs a{font-size:14px;line-height:1.5;min-height:42px}
.page-heading h1,.doc-form-title-wrap h1{font-size:30px;line-height:1.4}
.content h2,.panel-heading h2,.doc-form .section-heading h2{font-size:20px;line-height:1.5}
.quick-card h3{font-size:17px}.quick-card p{font-size:13px;line-height:1.6}
.stat-top{font-size:14px}.stat-value{font-size:30px}.stat-bottom{font-size:12px}
.content .muted,.doc-form-title-wrap p,.panel-heading p,.doc-breadcrumb,.doc-form .amount-words,.doc-form .doc-items-hint,.demo-notice{font-size:13px;line-height:1.6}
.content table:not(.paper table) th,.recent-panel th,.document-table th{font-size:13px}
.content table:not(.paper table) td,.recent-panel td,.document-table td,.doc-number{font-size:14px}
.content .badge{font-size:12px}.page-footer{font-size:11px}
.doc-form #items-table{min-width:1060px}
.doc-form #items-table td input,.doc-form #items-table td select,.doc-form #items-table .item-code,.doc-form #items-table .item-desc,.doc-form #items-table .col-total{font-size:15px;min-height:40px}
.doc-form #items-table .col-discount input{width:68px}.doc-form #items-table .col-discount select{width:52px}
.doc-form #items-table .col-vat input{min-height:16px}
.doc-form .customer-detail p,.doc-form .customer-detail strong,.doc-form .grand-total-card small{font-size:14px}
.filter-chip{height:auto;min-height:44px}.filter-chip select,.filter-chip input[type=date],.filter-chip input[type=month],.filter-chip input[type=text]{font-size:15px}
@media(max-width:600px){
.page-heading h1,.doc-form-title-wrap h1{font-size:26px}
.content h2,.panel-heading h2,.doc-form .section-heading h2{font-size:18px}
.doc-form-header .doc-form-actions .btn,.doc-form .doc-form-footer .btn,.doc-form .note-tabs button{font-size:13px;white-space:normal}
.quick-card h3{font-size:16px}.quick-card p{font-size:12px}.stat-value{font-size:26px}.stat-top{font-size:13px}.stat-bottom{font-size:11px}
.doc-form #items-table td input,.doc-form #items-table td select,.doc-form .doc-items-toolbar input{font-size:16px}
}
.ui-field input:not([type=checkbox]):not([type=radio]),.ui-field select,.ui-field textarea{font-size:16px;min-height:44px}

/* Collapsible workspace navigation */
.mobile-toggle{display:inline-flex;flex:none;border:1px solid #dce6d9;border-radius:12px;background:#f5f8f0;transition:background .2s,transform .2s}
.mobile-toggle:hover{background:#eee5c9;transform:scale(1.06)}
.mobile-toggle:active{transform:scale(.94)}
.mobile-toggle .icon{transition:transform .3s}.sidebar-collapsed .mobile-toggle .icon{transform:rotate(90deg)}
.sidebar{transition:width .28s ease,transform .28s ease}.main-shell{transition:margin-left .28s ease}
.sidebar .nav-item{transition:background .2s,transform .2s,color .2s}.sidebar .nav-item:hover{transform:translateX(3px)}
.sidebar .brand{gap:8px;padding:12px 16px 10px}.sidebar .brand-logo{width:38px;height:38px}.sidebar .brand-text{font-size:17px;letter-spacing:1.1px}.sidebar .brand-text small{font-size:7px;letter-spacing:2.2px;margin-top:2px}
@media(min-width:1200px){
.sidebar-collapsed .sidebar{width:76px}
.sidebar-collapsed .main-shell{margin-left:76px}
.sidebar-collapsed .sidebar .brand{padding:14px 10px;justify-content:center}
.sidebar-collapsed .sidebar .brand-text,.sidebar-collapsed .sidebar .workspace-label,.sidebar-collapsed .sidebar .nav-item span,.sidebar-collapsed .sidebar .sidebar-bottom{display:none}
.sidebar-collapsed .sidebar nav{padding:0 10px}
.sidebar-collapsed .sidebar .nav-item{justify-content:center;padding:12px 0;min-height:46px;gap:0}
.sidebar-collapsed .sidebar .nav-item .icon{width:22px;height:22px;flex:none}
.sidebar-collapsed .sidebar .nav-caption{font-size:0;height:1px;padding:0;margin:14px 10px;background:#ffffff26}
.sidebar-collapsed .sidebar .nav-item i{display:none}
}
@media(max-width:1199px){
html{-webkit-text-size-adjust:100%}
.sidebar{width:min(300px,86vw);transform:translateX(-100%);padding-top:env(safe-area-inset-top);padding-bottom:env(safe-area-inset-bottom);-webkit-overflow-scrolling:touch}
.main-shell{margin-left:0!important}
.nav-open .sidebar{transform:translateX(0)}
.sidebar-backdrop{display:block;position:fixed;inset:0;z-index:29;background:#15382766;opacity:0;visibility:hidden;transition:opacity .28s,visibility .28s}
.nav-open .sidebar-backdrop{opacity:1;visibility:visible}
.mobile-toggle{display:inline-flex;min-width:44px;min-height:44px}
.mobile-toggle .icon{transform:none!important}
.sidebar-collapsed .sidebar{width:min(300px,86vw)}
.sidebar-collapsed .sidebar .brand{justify-content:flex-start;padding:12px 16px 10px}
.sidebar-collapsed .sidebar .brand-text,.sidebar-collapsed .sidebar .workspace-label,.sidebar-collapsed .sidebar .nav-item span,.sidebar-collapsed .sidebar .sidebar-bottom{display:initial}
.sidebar-collapsed .sidebar .brand-text{display:flex}
.sidebar-collapsed .sidebar nav{padding:0 14px}
.sidebar-collapsed .sidebar .nav-item{justify-content:flex-start;gap:11px;padding:10px 13px}
.sidebar-collapsed .sidebar .nav-caption{font-size:10px;height:auto;margin:0;padding:12px 8px 4px;background:none}
.sidebar .nav-item{min-height:44px}
.topbar{height:64px;padding:0 max(14px,env(safe-area-inset-right)) 0 max(14px,env(safe-area-inset-left));gap:10px}
.content{padding:16px 16px 28px}
.stats-grid,.report-page .report-stats{grid-template-columns:repeat(2,minmax(0,1fr))}
.dashboard-tables,.bottom-grid{grid-template-columns:1fr}
.table-wrap,.document-table-wrap,.items-table-wrap{overflow-x:auto;-webkit-overflow-scrolling:touch}
.filter-row,.document-filters,.filters{flex-wrap:wrap}
dialog{width:min(640px,calc(100vw - 24px));max-height:calc(100dvh - 24px)}
}
@media(max-width:834px){.bottom-grid{grid-template-columns:1fr}.task-panel{grid-column:auto}}
@media(prefers-reduced-motion:reduce){.sidebar,.main-shell,.mobile-toggle,.mobile-toggle .icon,.sidebar .nav-item,.sidebar-backdrop{transition:none}}
#pdf-modal[open]{display:flex;flex-direction:column;width:min(980px,calc(100vw - 24px));height:min(94dvh,1200px);max-height:calc(100dvh - 16px);margin:auto;padding:0;border:0;border-radius:18px;background:#fff;color:#173f30;box-shadow:0 24px 80px #0b4d3b55;overflow:hidden}
#pdf-modal::backdrop{background:#0b4d3bcc}
#pdf-modal .pdf-modal-bar{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:12px 14px;background:#0b4d3b;color:#fff}
#pdf-modal .pdf-modal-bar strong{font-size:16px;font-weight:650}
#pdf-modal .pdf-modal-close{display:inline-flex;align-items:center;justify-content:center;width:36px;height:36px;border:0;border-radius:10px;background:#ffffff22;color:#fff;cursor:pointer}
#pdf-modal .pdf-modal-close:hover{background:#c6a15b}
#pdf-modal iframe{flex:1;width:100%;min-height:0;border:0;background:#f6f3ec}

/* Document workspace: full-width items, open summaries, colour-coded groups. */
.doc-form .form-layout{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);grid-template-areas:'document customer' 'items items' 'payment totals' 'notes totals' 'extra upload';gap:22px;align-items:start}
.doc-form .form-layout>div,.doc-form .form-layout>.doc-form-sidebar{display:contents}
.doc-form #section-document{grid-area:document}.doc-form #section-customer{grid-area:customer}.doc-form #section-items{grid-area:items}.doc-form #section-payment{grid-area:payment}.doc-form #section-notes{grid-area:notes}.doc-form #section-totals{grid-area:totals}.doc-form #section-extra{grid-area:extra}.doc-form #section-upload{grid-area:upload}
.doc-form .form-layout section{margin:0;min-width:0;padding:24px;border:1px solid #dce9df;border-top:4px solid #50a880;border-radius:18px;box-shadow:0 6px 24px #153e2410;max-height:none;overflow:visible;background:linear-gradient(180deg,#eff9f2 0,#fff 105px)}
.doc-form #section-customer,.doc-form #section-notes,.doc-form #section-upload{border-color:#f0d8e2;border-top-color:#dc87aa;background:linear-gradient(180deg,#fff0f6 0,#fff 105px)}
.doc-form #section-items,.doc-form #section-totals{border-color:#eee0ae;border-top-color:#d8b84f;background:linear-gradient(180deg,#fff9df 0,#fff 105px)}
.doc-form .section-heading{margin-bottom:18px}.doc-form .section-symbol{background:#dff2e6;color:#25744f;border-radius:10px;padding:8px;width:38px;height:38px;flex:none}
.doc-form :is(#section-customer,#section-notes,#section-upload) .section-symbol{background:#f9dce9;color:#a84773}
.doc-form :is(#section-items,#section-totals) .section-symbol{background:#faedb6;color:#947014}
.doc-form .field-label-text{gap:8px;color:#345a45}.doc-form .field-label-text>.icon{color:#3a936b;width:18px;height:18px}
.doc-form :is(#section-customer,#section-notes,#section-upload) .field-label-text>.icon{color:#bd668c}
.doc-form :is(#section-items,#section-totals) .field-label-text>.icon{color:#a38722}
.doc-form .doc-form-sidebar .help-card{display:none}
.doc-form .customer-detail.has-customer .customer-card-grid{grid-template-columns:1fr 1fr}
.doc-form .form-row-inline,.doc-form .form-row-inline.cols-4{grid-template-columns:repeat(2,minmax(0,1fr))!important}
.doc-form .form-section .form-grid{gap:18px}.doc-form .grand-total-card{background:linear-gradient(120deg,#155b41,#288159);color:white;margin-top:20px}.doc-form .grand-total-card strong{font-size:34px;color:white}.doc-form .grand-total-card small{color:#e0f5e7}
.doc-form .doc-totals{margin-top:22px;padding-top:15px;border-top:1px dashed #d8cc9d}.doc-form .doc-totals>div{padding:9px 0;font-size:16px}
.doc-form .form-jumps{display:flex;gap:10px;flex-wrap:wrap;margin:18px 0 22px}.form-jumps a{display:flex;align-items:center;gap:8px;padding:10px 17px;background:#fff;border:1px solid #dce7dd;border-radius:24px;font-size:14px;color:#326547;transition:background .2s,transform .2s}.form-jumps a:hover{background:#e6f4e9;transform:translateY(-2px)}.form-jumps .icon{width:18px;height:18px}
.doc-form section[id]{scroll-margin-top:90px}.doc-form .doc-form-header{background:linear-gradient(115deg,#e9f6ed,#fffbea 66%,#fff0f6);border:1px solid #dce8dc}
.doc-form .doc-form-title-row{flex-wrap:wrap;gap:20px}.doc-form .doc-form-actions{flex-wrap:wrap}.doc-form .doc-items-toolbar{padding:15px;background:#fff9e6;border:1px solid #eee1b7;border-radius:12px;margin-bottom:16px}
.doc-form #items-table{min-width:1060px;width:100%;table-layout:auto}.doc-form #items-table th{background:#f5ecc9;color:#685626;padding:12px 8px}.doc-form #items-table td{padding:10px 6px}.doc-form .items-table-wrap{border-radius:10px;border:1px solid #eae2c5}
.doc-form .doc-form-footer{gap:12px;flex-wrap:wrap}.doc-form .doc-form-footer>.muted{margin-right:auto}.doc-form .doc-form-footer .btn{min-height:44px}
@media(max-width:900px){.doc-form .form-layout{grid-template-columns:minmax(0,1fr);grid-template-areas:'document' 'customer' 'items' 'payment' 'totals' 'notes' 'extra' 'upload'}.doc-form .form-layout>.doc-form-sidebar{display:contents}.doc-form .form-layout section{padding:20px}}
@media(max-width:600px){.doc-form .form-layout section{padding:17px}.doc-form .customer-detail.has-customer .customer-card-grid{grid-template-columns:1fr}.doc-form .form-row-inline,.doc-form .form-row-inline.cols-4{grid-template-columns:1fr!important}.doc-form .form-jumps{flex-wrap:nowrap;overflow:auto;gap:7px;padding-bottom:5px}.form-jumps a{white-space:nowrap;padding:8px 12px}.doc-form .doc-form-footer>.btn[value=new]{display:none}.doc-form .doc-form-footer>.btn{flex:1}.doc-form .doc-form-actions{width:100%}.doc-form .doc-totals>div{font-size:15px}}
@media(prefers-reduced-motion:no-preference){html{scroll-behavior:smooth}}
.doc-form .form-layout>div:first-child{display:contents}

/* Document lists use the filter/table directly without the metric strip. */
.summary-strip:has(~ .document-list-panel){display:none!important}

.document-table{width:100%;border-collapse:separate;border-spacing:0;min-width:860px}
.document-table thead th{background:linear-gradient(180deg,#14684f,#0b4d3b);color:#fff8e8;font-weight:650;font-size:13px;padding:12px 14px;border:0;border-bottom:3px solid #c6a15b;text-align:left;white-space:nowrap}
.document-table thead th.num{text-align:right}
.document-table tbody td{padding:14px;border-bottom:1px solid #efe8d6;vertical-align:middle;background:#fff;font-size:14px}
.document-table tbody tr:hover td{background:#fbf8f0}
.document-table .col-check{width:42px;text-align:center}
.document-table input[type=checkbox]{width:16px;height:16px;min-width:16px;padding:0;accent-color:#0b4d3b}
.document-table .col-more{width:56px;text-align:right}
.document-table .col-pdf{width:72px;text-align:center;white-space:nowrap}
.document-table .pdf-row{display:inline-flex;align-items:center;justify-content:center;width:32px;height:32px;border:1px solid #d7c08a;border-radius:8px;background:#fffdf6;color:#8a6a2f}
.document-table .pdf-row:hover{background:#0b4d3b;border-color:#0b4d3b;color:#f3e6c4}
.document-table .pdf-row .icon{width:16px;height:16px}
.recent-panel .th-ico{width:15px;height:15px;margin-right:6px;color:#f0d587;vertical-align:-3px}
.recent-panel .cell-ico{width:22px;height:22px;padding:4px;box-sizing:border-box;border-radius:6px;background:#f8f1df;color:#8b6d2f;border:1px solid #ead9ad;flex:none}
.recent-panel .cell-line{display:inline-flex;align-items:center;gap:8px;min-width:0;max-width:100%}
.recent-panel .cell-line-end{justify-content:flex-end;width:100%}
.recent-panel .doc-number{display:inline-flex;align-items:center;gap:8px;font-weight:650}
.recent-panel .doc-dot{width:8px;height:8px;border-radius:50%;background:#c9c3b2;flex:none}
.recent-panel .doc-number.is-done .doc-dot,.recent-panel .doc-number.is-ok .doc-dot{background:#0b4d3b}
.recent-panel .doc-number.is-wait .doc-dot{background:#c6a15b}
.recent-panel .doc-number.is-bad .doc-dot{background:#e7a3a8}
.recent-panel .cell-secondary{display:flex;align-items:center;gap:6px}
.recent-panel .cell-secondary .icon{width:13px;height:13px;color:#8d7a4e;flex:none}
.recent-panel .tabs button,.recent-panel .tabs a{display:inline-flex;align-items:center;gap:6px}
.recent-panel .tabs .icon{width:14px;height:14px;flex:none}
.recent-panel .col-pdf{width:64px;text-align:center;white-space:nowrap}
.recent-panel .pdf-row{display:inline-flex;align-items:center;justify-content:center;width:32px;height:32px;border:1px solid #d7c08a;border-radius:8px;background:#fffdf6;color:#8a6a2f}
.recent-panel .pdf-row:hover{background:#0b4d3b;border-color:#0b4d3b;color:#f3e6c4}
.recent-panel .pdf-row .icon{width:16px;height:16px}
.document-table .th-ico{width:15px;height:15px;margin-right:6px;color:#f0d587;vertical-align:-3px}
.document-table .cell-ico{width:22px;height:22px;padding:4px;box-sizing:border-box;border-radius:6px;background:#f8f1df;color:#8b6d2f;border:1px solid #ead9ad;flex:none}
.document-table .doc-date{display:inline-flex;align-items:center;gap:8px;color:#6d7d74;white-space:nowrap}
.document-table td.doc-date{display:table-cell}
.document-table .cell-line{display:inline-flex;align-items:center;gap:8px;min-width:0}
.document-table .cell-line-end{justify-content:flex-end;width:100%}
.document-table .status-ico{width:14px;height:14px;flex:none}
.document-table .doc-customer{color:#173f30;font-weight:600}
.document-table .doc-customer .cell-secondary{display:flex;align-items:center;gap:8px;margin-top:4px;color:#8d7a4e;font-weight:500}
.document-table td.num.strong{font-variant-numeric:tabular-nums;color:#0b4d3b}
.document-table .doc-number{display:inline-flex;align-items:center;gap:8px;font-weight:650;color:#6d7d74}
.document-table .doc-number.is-done,.document-table .doc-number.is-ok{color:#0b4d3b}
.document-table .doc-dot{width:8px;height:8px;border-radius:50%;background:#c9c3b2;flex:none}
.document-table .doc-number.is-done .doc-dot,.document-table .doc-number.is-ok .doc-dot{background:#0b4d3b}
.document-table .doc-number.is-wait .doc-dot{background:#c6a15b}
.document-table .doc-number.is-bad .doc-dot{background:#e7a3a8}
.document-table .status-cell{width:168px}
.doc-pop{position:relative;display:inline-flex}
.doc-pop-trigger{display:inline-flex;align-items:center;justify-content:space-between;gap:10px;min-width:148px;height:34px;padding:0 12px;border-radius:8px;border:1px solid #ead9ad;background:#fbf6ea;color:#8a7348;font-weight:650;line-height:1}
.doc-pop-trigger>span{display:inline-flex;align-items:center;gap:6px}
.status-pop[data-tone="done"] .doc-pop-trigger,.status-pop[data-tone="ok"] .doc-pop-trigger{background:#e8f3ec;color:#0b4d3b;border-color:#c9dfd2}
.status-pop[data-tone="bad"] .doc-pop-trigger{background:#fdecee;color:#c45b66;border-color:#f3d0d4}
.status-pop[data-tone="draft"] .doc-pop-trigger{background:#f7f8f3;color:#6d7d74;border-color:#e4ebe3}
.doc-pop-trigger .chev{width:0;height:0;border-left:4px solid transparent;border-right:4px solid transparent;border-top:5px solid currentColor;opacity:.75}
.more-trigger{min-width:36px;width:36px;height:36px;padding:0;justify-content:center;gap:3px;background:#fff;border:1px solid #e4d7b4;border-radius:8px;color:#0b4d3b}
.more-trigger span{width:3px;height:3px;border-radius:50%;background:currentColor;display:block}
.doc-pop-panel{position:fixed;z-index:80;margin:0;padding:6px 0;background:#fff;border:1px solid #eadfc8;border-radius:10px;box-shadow:0 12px 32px #163f2718;min-width:248px}
.doc-pop-panel a,.doc-pop-panel button{display:flex;align-items:center;gap:10px;width:100%;text-align:left;padding:9px 16px;background:none;border:0;color:#173f30;font-size:14px;font-weight:500;border-radius:0}
.doc-pop-panel .menu-ico,.more-pop .doc-pop-panel a .icon{width:18px;height:18px;min-width:18px;flex:none;display:inline-block;color:#0b4d3b;stroke:#0b4d3b}
.doc-pop-panel .is-danger .menu-ico{color:#c45b66;stroke:#c45b66}
.doc-pop-panel a:hover,.doc-pop-panel button:hover{background:#fbf8f0}
.doc-pop-panel hr{border:0;border-top:1px solid #efe6d4;margin:6px 0}
.doc-pop-panel .is-danger{color:#c45b66}
.doc-pop-empty{display:block;padding:10px 16px;color:#8d7a4e}
.more-pop .doc-pop-panel{min-width:168px}

.settings-layout{display:grid;grid-template-columns:minmax(0,1.7fr) minmax(280px,.75fr);gap:16px;align-items:start}
.settings-main,.settings-assets{display:flex;flex-direction:column;gap:16px;min-width:0}
.settings-card{background:#fff;border:1px solid #e4ebe3;border-radius:16px;padding:18px;box-shadow:0 8px 28px #163f270a}
.settings-head{display:flex;gap:12px;align-items:flex-start;margin-bottom:16px}
.settings-head>.icon{width:36px;height:36px;padding:8px;border-radius:10px;background:#f3f7ef;color:#0b4d3b}
.settings-head h2{font-size:16px;line-height:1.3}
.settings-head p{margin:2px 0 0;color:#7d8c82;font-size:12px;line-height:1.45}
.settings-fields{display:grid;grid-template-columns:1fr 1fr;gap:14px}
.settings-fields-3{grid-template-columns:repeat(3,minmax(0,1fr))}
.settings-page .span-2{grid-column:span 2}
.settings-page .field-hint{display:block;margin-top:6px;color:#8b978c;font-size:12px;line-height:1.4}
.number-grid{display:grid;grid-template-columns:1fr 1fr;gap:10px}
.settings-page .number-field{display:grid;grid-template-columns:28px minmax(0,1fr);column-gap:10px;row-gap:2px;align-items:center;padding:10px 12px;border:1px solid #e6ece4;border-radius:12px;background:#fbfcf8}
.settings-page .number-field>.icon{grid-row:1 / span 2;width:22px;height:22px;color:#0b4d3b}
.settings-page .number-field>span{display:flex;flex-direction:column;min-width:0}
.settings-page .number-field b{font-size:13px;line-height:1.3}
.settings-page .number-field small{color:#8b978c;font-size:11px}
.settings-page .number-field input{grid-column:1 / -1;margin-top:6px}
.accent-field{margin-top:14px}
.accent-control{display:flex;align-items:center;gap:12px}
.accent-control input[type=color]{width:54px;min-width:54px;height:40px;padding:4px;border-radius:10px}
.accent-control b{font-size:13px;letter-spacing:.04em;color:#3d5348}
.settings-save{position:sticky;bottom:12px;z-index:5;display:flex;align-items:center;justify-content:space-between;gap:12px;padding:12px 14px;background:#fff;border:1px solid #e4ebe3;border-radius:14px;box-shadow:0 10px 30px #163f2718}
.settings-save span{color:#6d7d74;font-size:13px}
.asset-preview{height:132px;display:grid;place-items:center;margin-bottom:14px;padding:12px;border:1px dashed #d5dece;border-radius:12px;background:#fbfcf8}
.asset-preview img{max-width:100%;max-height:108px;object-fit:contain}
.asset-preview>span{display:flex;align-items:center;gap:8px;color:#8b978c}
.asset-preview-sign{background:#fff}
.asset-card form,.signer-field{display:flex;flex-direction:column;gap:8px}
.signer-field{margin-bottom:12px}
.settings-page .signer-field input{pointer-events:auto;background:#fff;border:1px solid #d7e3d4;color:#173f30;opacity:1}
.settings-page .asset-file{gap:6px;color:#5d6e64;font-size:12px}
.settings-page .asset-card .btn{width:100%}
@media(max-width:1100px){.settings-layout,.settings-fields,.settings-fields-3,.number-grid{grid-template-columns:1fr}.settings-page .span-2{grid-column:auto}.settings-save{align-items:stretch;flex-direction:column}}

.billing-form .bill-bar{display:flex;justify-content:space-between;align-items:flex-end;gap:16px;margin-bottom:18px;padding:18px 20px;border:1px solid #e4d7b4;border-radius:16px;background:linear-gradient(115deg,#e9f6ed,#fffbea 62%,#fff);box-shadow:0 6px 20px #163f2710}
.billing-form .bill-kicker,.billing-form .bill-ref,.billing-form .bill-hint,.billing-form .bill-picked,.billing-form .bill-empty{display:flex;align-items:center;gap:8px;color:#6d7d74}
.billing-form .bill-kicker{margin-bottom:4px;color:#8b6d2f;font-weight:650;letter-spacing:.04em}
.billing-form .bill-kicker .icon,.billing-form .bill-ref .icon,.billing-form .bill-hint .icon,.billing-form .bill-picked .icon,.billing-form .bill-empty .icon,.billing-form .bill-grand small .icon{width:16px;height:16px;flex:none}
.billing-form .bill-bar h1{font-size:26px;color:#0b4d3b}
.billing-form .bill-ref{margin-top:6px}
.billing-form .bill-actions{display:flex;gap:8px;flex-wrap:wrap}
.billing-form .bill-layout{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:12px;align-items:start}
.billing-form #section-customer{grid-column:1;grid-row:1}
.billing-form #section-document{grid-column:2;grid-row:1}
.billing-form #section-customer,.billing-form #section-document{padding:12px 14px;border:1px solid #e4efe6;border-top:3px solid #0b4d3b;border-radius:14px;background:#fff;box-shadow:none}
.billing-form #section-customer .section-heading,.billing-form #section-document .section-heading{margin-bottom:8px;gap:8px}
.billing-form #section-customer .section-symbol,.billing-form #section-document .section-symbol{width:26px;height:26px;padding:4px;border:0;border-radius:8px;background:#e7f4ec;color:#0b4d3b}
.billing-form #section-customer .section-symbol .icon,.billing-form #section-document .section-symbol .icon{width:15px;height:15px}
.billing-form #section-customer .section-heading h2,.billing-form #section-document .section-heading h2{font-size:15px;line-height:1.3}
.billing-form #section-customer .doc-step,.billing-form #section-document .doc-step{width:20px;height:20px;font-size:10px}
.billing-form #section-customer .field-label-text,.billing-form #section-document .field-label-text{min-height:0;gap:5px;font-size:11px}
.billing-form #section-customer .field-label-text>.icon,.billing-form #section-document .field-label-text>.icon{width:14px;height:14px;color:#3a936b}
.billing-form #section-customer>label,.billing-form #section-document label{gap:3px}
.billing-form #section-customer input,.billing-form #section-customer select,.billing-form #section-document input,.billing-form #section-document select{min-height:32px;padding:4px 8px;font-size:13px;border-radius:8px}
.billing-form #section-items{grid-column:1 / -1;grid-row:2}
.billing-form #section-totals{grid-column:1 / -1;grid-row:3}
.billing-form .bill-card{height:100%;padding:20px;border:1px solid #e7efe4;border-top:4px solid #0b4d3b;border-radius:16px;background:#fff;box-shadow:0 4px 16px #163f270c}
.billing-form .bill-foot{display:grid;grid-template-columns:minmax(0,1fr) minmax(260px,340px);gap:22px;align-items:start}
.billing-form .bill-foot-note label,.billing-form .bill-foot-sum{display:flex;flex-direction:column;gap:8px}
.billing-form #section-items{border-top-color:#c6a15b}
.billing-form .section-heading{display:flex;align-items:center;gap:10px}
.billing-form .bill-fields{display:grid;grid-template-columns:1fr 1fr;gap:8px 10px}
.billing-form #customer-detail.customer-card{margin-top:10px;padding:0;border:0;background:transparent}
.billing-form #customer-detail.customer-card.has-customer{overflow:hidden;border:1px solid #eadfc4;border-radius:12px;background:linear-gradient(180deg,#fffdf8,#f7f1e2);box-shadow:inset 0 1px 0 #fff}
.billing-form #customer-detail .customer-card-empty{padding:14px;border:1px dashed #ead9ad;border-radius:12px;background:#fbf8f0}
.billing-form .bill-meta{display:grid;gap:0;color:#3d5648;font-size:12px;line-height:1.4}
.billing-form .bill-meta-addr{display:flex;align-items:flex-start;gap:8px;margin:0;padding:10px 12px;background:#fff;border-bottom:1px solid #efe4cc;color:#173f30;font-weight:650}
.billing-form .bill-meta-addr .icon{width:22px;height:22px;margin:0;padding:4px;box-sizing:border-box;border:1px solid #d7eadf;border-radius:7px;background:#f3faf6;color:#0b4d3b}
.billing-form .bill-meta dl{display:grid;grid-template-columns:1fr 1fr;gap:0;margin:0}
.billing-form .bill-meta dl>div{display:flex;flex-direction:column;align-items:flex-start;gap:2px;min-width:0;padding:8px 12px;border-top:1px solid #f3ead6}
.billing-form .bill-meta dl>div:nth-child(-n+2){border-top:0}
.billing-form .bill-meta dl>div:nth-child(odd){border-right:1px solid #f3ead6}
.billing-form .bill-meta dl>div:last-child:nth-child(odd){grid-column:1 / -1;border-right:0}
.billing-form .bill-meta dt{display:inline-flex;align-items:center;gap:4px;color:#8d7a4e;font-size:10px;font-weight:650;letter-spacing:.02em;white-space:nowrap}
.billing-form .bill-meta dt .icon{width:13px;height:13px;margin:0;color:#b0893e}
.billing-form .bill-meta dd{width:100%;margin:0;overflow:visible;color:#173f30;font-size:13px;font-weight:650;white-space:normal}
.billing-form .bill-fields label,.billing-form .bill-card>label,.billing-form .bill-side label{display:flex;flex-direction:column;gap:6px}
.billing-form .bill-hint{margin:-6px 0 12px}
.billing-form .table-wrap{overflow:auto;border:1px solid #efe8d6;border-radius:12px}
.billing-form .bill-table{width:100%;border-collapse:separate;border-spacing:0;min-width:720px}
.billing-form .bill-table th{background:linear-gradient(180deg,#14684f,#0b4d3b);color:#fff8e8;font-weight:650;font-size:13px;padding:12px 14px;border:0;border-bottom:3px solid #c6a15b;text-align:left;white-space:nowrap}
.billing-form .bill-table th.num,.billing-form .bill-table td.num{text-align:right}
.billing-form .bill-table .th-ico{width:15px;height:15px;margin-right:6px;color:#f0d587;vertical-align:-3px}
.billing-form .bill-table td{padding:12px 14px;border-bottom:1px solid #efe8d6;background:#fff;vertical-align:middle}
.billing-form .bill-table tr:hover td{background:#fbf8f0}
.billing-form .bill-table tr:has(input:checked) td{background:#f3faf6}
.billing-form .bill-table .col-check{width:46px;text-align:center}
.billing-form .bill-table input[type=checkbox]{width:18px;height:18px;min-height:18px;padding:0;accent-color:#0b4d3b}
.billing-form .cell-line{display:inline-flex;align-items:center;gap:8px}
.billing-form .cell-line-end{justify-content:flex-end;width:100%}
.billing-form .cell-line small{display:flex;align-items:center;gap:4px;color:#8d7a4e}
.billing-form .cell-line small .icon{width:12px;height:12px}
.billing-form .cell-ico{width:22px;height:22px;padding:4px;box-sizing:border-box;border-radius:6px;background:#f8f1df;color:#8b6d2f;border:1px solid #ead9ad;flex:none}
.billing-form .bill-table td input[type=number]{width:140px;min-height:40px}
.billing-form .bill-empty{margin-top:12px;padding:16px;border:1px dashed #ead9ad;border-radius:12px;background:#fbf8f0}
.billing-form .bill-picked{margin-bottom:12px;font-size:14px}
.billing-form .bill-picked b{color:#0b4d3b}
.billing-form .bill-grand{margin-bottom:16px;padding:16px;border-radius:14px;background:linear-gradient(135deg,#0b4d3b,#176548);color:#fff}
.billing-form .bill-grand small{display:flex;align-items:center;gap:6px;color:#efd486}
.billing-form .bill-grand strong{display:block;margin-top:4px;font-size:32px;letter-spacing:-.5px}
.billing-form .bill-grand span{display:block;margin-top:4px;color:#d7ecdf;font-size:13px}
.billing-form .bill-foot-sum .btn{margin-top:6px}
@media(max-width:980px){.billing-form .bill-layout,.billing-form .bill-foot,.billing-form .customer-detail.has-customer .customer-card-grid,.billing-form .bill-meta dl{grid-template-columns:1fr}.billing-form #section-customer,.billing-form #section-document,.billing-form #section-items,.billing-form #section-totals{grid-column:1;grid-row:auto}.billing-form .bill-bar{flex-direction:column;align-items:stretch}.billing-form .bill-fields,.billing-form .bill-meta dl{grid-template-columns:1fr}.billing-form .bill-meta dl>div{border-right:0}}

.admin-tabs a{display:inline-flex;align-items:center;gap:8px}
.admin-tabs a .icon{width:16px;height:16px;flex:none}
.master-page .filter-row{align-items:center}
.master-count{display:inline-flex;align-items:center;gap:6px;margin-left:auto;color:#6d7d74}
.master-count .icon{width:16px;height:16px;color:#8b6d2f}
.master-page .panel-heading{display:flex;justify-content:space-between;align-items:center;gap:12px;padding:16px 18px}
.master-page .panel-heading>div:first-child{display:flex;align-items:center;gap:12px}
.master-page .panel-heading>div:first-child>.icon{width:36px;height:36px;padding:8px;box-sizing:border-box;border-radius:10px;background:#f8f1df;color:#8b6d2f;border:1px solid #ead9ad}
.master-page .panel-heading p{color:#6d7d74;font-size:13px}
.document-table .doc-customer small{display:block;margin-top:2px;color:#8d7a4e;font-weight:500}
.user-status{display:inline-flex;align-items:center;gap:6px;height:30px;padding:0 10px;border-radius:999px;font-weight:650;white-space:nowrap}
.user-status .icon{width:14px;height:14px}
.user-status.is-on{background:#e8f3ec;color:#0b4d3b}
.user-status.is-off{background:#fdecee;color:#c45b66}
.master-page tr.is-clickable{cursor:pointer}
.report-page .filter-row{align-items:center}
.report-page .filter-chip input[type=month]{min-height:0;border:0;background:transparent;box-shadow:none;padding:8px 0;width:148px}
.report-page .report-company{display:inline-flex;align-items:center;gap:6px;margin-left:auto;color:#6d7d74;font-size:13px}
.report-page .report-company .icon{width:16px;height:16px;color:#8b6d2f}
.report-page .report-stats{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px;padding:16px 18px 4px}
.report-page .report-stat{padding:12px 14px;border:1px solid #efe8d6;border-radius:12px;background:#fffdf8}
.report-page .report-stat small{display:flex;align-items:center;gap:6px;color:#8d7a4e;font-size:12px}
.report-page .report-stat small .icon{width:14px;height:14px}
.report-page .report-stat strong{display:block;margin-top:4px;color:#0b4d3b;font-size:20px;letter-spacing:-.3px}
.report-page .report-stat.is-total{border-color:#0b4d3b;background:linear-gradient(135deg,#0b4d3b,#176548)}
.report-page .report-stat.is-total small{color:#efd486}
.report-page .report-stat.is-total strong{color:#fff}
.report-page .document-table tfoot td{padding:14px;background:#fbf8f0;border-top:2px solid #c6a15b;color:#0b4d3b;font-weight:700}
.report-page .empty{padding:36px 16px;text-align:center;color:#6d7d74}
.report-page .empty .icon{width:28px;height:28px;margin-bottom:8px;color:#c6a15b}
.report-page .empty h3{color:#0b4d3b}
@media(max-width:900px){.report-page .report-stats{grid-template-columns:1fr 1fr}.report-page .report-company{margin-left:0}}
.master-page .empty{padding:36px 16px}
.master-page .empty .icon{width:28px;height:28px;margin-bottom:8px;color:#c6a15b}
dialog .section-head .section-heading{display:flex;align-items:center;gap:8px}
.welcome-banner{height:auto!important;padding:0!important;overflow:hidden}
.welcome-banner img{display:block;width:100%;height:auto}
.stats-grid{gap:12px;margin-top:14px}
.stats-grid .stat-card{background:linear-gradient(165deg,#fffdf8,#f4efe2);border:1px solid #e7dcc0;border-radius:14px;box-shadow:0 6px 18px #0b4d3b0d}
.stats-grid .stat-card::before{content:"";position:absolute;inset:0 auto 0 0;width:4px;background:linear-gradient(#0b4d3b,#1d7a58)}
.stats-grid .stat-card:nth-child(even)::before{background:linear-gradient(#c6a15b,#e6d3a2)}
.stats-grid .stat-top{color:#8a7344;font-weight:650}
.stats-grid .stat-value{color:#0b4d3b}
.stats-grid .stat-value small{color:#c6a15b}
.stats-grid .stat-bottom{color:#6d7d74}
.stats-grid .stat-icon{background:linear-gradient(140deg,#0b4d3b,#1a6b4e);color:#f6edd4;border-radius:10px;box-shadow:0 4px 10px #0b4d3b22}
.stats-grid .stat-icon.gold{background:linear-gradient(140deg,#c6a15b,#e4cf96);color:#0b4d3b;box-shadow:0 4px 10px #c6a15b33}
.stats-grid .dot{background:#0b4d3b}
.stats-grid .dot.gold{background:#c6a15b}
.stats-grid .mini-bars{opacity:.7}
.stats-grid .mini-bars i{background:linear-gradient(#0b4d3b,#c6a15b)}
.stats-grid .stat-card:nth-child(even) .mini-bars i{background:linear-gradient(#c6a15b,#f3e6c4)}
#collect-dialog,#pay-dialog{border:0;border-radius:16px;padding:0;background:#fff;color:#173f30}
#collect-dialog{width:min(560px,calc(100vw - 32px))}
#pay-dialog{width:min(640px,calc(100vw - 32px))}
#collect-dialog::backdrop,#pay-dialog::backdrop{background:#0b4d3b66}
#collect-dialog form,#pay-dialog form{padding:18px 20px 20px}
#collect-dialog .collect-meta,#pay-dialog .collect-meta{display:grid;gap:8px;margin:4px 0 14px;padding:12px 14px;border:1px solid #efe8d6;border-radius:12px;background:#fbf8f0}
#collect-dialog .collect-meta div,#pay-dialog .collect-meta div{display:flex;justify-content:space-between;align-items:center;gap:12px}
#collect-dialog .collect-meta span,#pay-dialog .collect-meta span{display:inline-flex;align-items:center;gap:8px;color:#8d7a4e}
#collect-dialog .collect-meta strong,#pay-dialog .collect-meta strong{color:#0b4d3b;text-align:right}
#collect-dialog .cell-ico,#pay-dialog .cell-ico{width:22px;height:22px;padding:4px;box-sizing:border-box;border-radius:6px;background:#f8f1df;color:#8b6d2f;border:1px solid #ead9ad;flex:none}
#collect-dialog .collect-wht-controls,#pay-dialog .collect-wht-controls{display:flex;align-items:center;gap:8px}
#collect-dialog .collect-wht-controls select,#pay-dialog .collect-wht-controls select{flex:1}
#collect-dialog .collect-wht-controls strong,#pay-dialog .collect-wht-controls strong{min-width:92px;padding:8px 10px;border-radius:8px;background:#f8f1df;color:#0b4d3b;text-align:right}
#collect-dialog .collect-bank,#pay-dialog .collect-bank{display:grid;gap:8px;margin:0 0 12px;padding:12px;border:1px solid #d7eadf;border-radius:12px;background:#f3faf6}
#collect-dialog .collect-bank.is-hidden,#pay-dialog .collect-bank.is-hidden{display:none}
#collect-dialog .collect-bank p,#pay-dialog .collect-bank p{display:flex;align-items:center;gap:8px;margin:0;color:#173f30}
#collect-dialog .collect-bank-title,#pay-dialog .collect-bank-title{display:flex;align-items:center;gap:8px;margin:0 0 8px;color:#8d7a4e;font-size:12px;font-weight:650}
#collect-dialog .collect-note,#pay-dialog .collect-note{display:flex;flex-direction:column;gap:6px}
#collect-dialog .collect-actions,#pay-dialog .collect-actions,#installment-dialog .collect-actions{display:flex;justify-content:flex-end;gap:8px;margin-top:14px}
#pay-dialog .pay-route{display:grid;grid-template-columns:minmax(0,.85fr) minmax(0,1.15fr);gap:12px;margin:0 0 14px}
#pay-dialog .pay-route>div{padding:12px;border:1px solid #e4d7b4;border-radius:12px;background:#fffdf8}
#pay-dialog .pay-route>div:last-child{border-color:#d7eadf;background:#f3faf6}
#pay-dialog .pay-route strong{display:block;margin-bottom:4px;color:#0b4d3b}
#pay-dialog .pay-route small{color:#5d6f66;line-height:1.45}
#pay-dialog .pay-route label{display:flex;flex-direction:column;gap:4px;margin-top:8px}
@media(max-width:720px){#pay-dialog .pay-route{grid-template-columns:1fr}}
#installment-dialog{width:min(520px,calc(100vw - 32px));border:0;border-radius:16px;padding:0;background:#fff;color:#173f30}
#installment-dialog::backdrop{background:#0b4d3b66}
#installment-dialog form{padding:18px 20px 20px}
#installment-dialog .install-lead{margin:0 0 12px;color:#5d6f66}
#installment-dialog .collect-meta{display:grid;gap:8px;margin:4px 0 14px;padding:12px 14px;border:1px solid #efe8d6;border-radius:12px;background:#fbf8f0}
#installment-dialog .collect-meta div{display:flex;justify-content:space-between;align-items:center;gap:12px}
#installment-dialog .collect-meta span{display:inline-flex;align-items:center;gap:8px;color:#8d7a4e}
#installment-dialog .collect-meta strong{color:#0b4d3b;text-align:right}
#installment-dialog .cell-ico{width:22px;height:22px;padding:4px;box-sizing:border-box;border-radius:6px;background:#f8f1df;color:#8b6d2f;border:1px solid #ead9ad;flex:none}
#installment-dialog .install-percents{display:flex;gap:8px;margin:0 0 12px}
#installment-dialog .install-percents button{flex:1;min-height:40px;border:1px solid #d7c08a;border-radius:10px;background:#fffdf6;color:#0b4d3b;font-weight:650}
#installment-dialog .install-percents button.is-active{background:#0b4d3b;border-color:#0b4d3b;color:#f3e6c4}
#installment-dialog .install-amount{display:flex;justify-content:space-between;align-items:center;margin-top:12px;padding:12px 14px;border-radius:12px;background:#f3faf6}
#installment-dialog .install-amount strong{color:#0b4d3b;font-size:18px}
.install-bill{display:flex;justify-content:space-between;align-items:center;gap:12px;padding:16px;border:1px solid #d7eadf;border-radius:12px;background:#f3faf6}
.install-bill p{margin:0;color:#173f30}
.install-bill strong{color:#0b4d3b;font-size:20px;white-space:nowrap}
.avatar img{width:100%;height:100%;object-fit:cover;border-radius:50%}
.user-avatar{width:28px;height:28px;border-radius:50%;object-fit:cover;object-position:center top;border:1px solid #ead9ad;flex:none}
#user-dialog{width:min(720px,calc(100vw - 32px));border:0;border-radius:16px;padding:0;background:#fff;color:#173f30}
#user-dialog::backdrop{background:#0b4d3b66}
#user-dialog form{padding:18px 20px 20px}
#user-dialog .form-grid{display:grid;grid-template-columns:1fr 1fr;gap:12px}
#user-dialog .user-photo{display:flex;align-items:center;gap:14px;margin:0 0 14px;padding:12px;border:1px solid #ead9ad;border-radius:14px;background:#fffaf0}
#user-dialog .user-photo img,#user-dialog .user-photo-empty{width:76px;height:76px;border-radius:50%;object-fit:cover;object-position:center top;border:2px solid #e7d3a1;flex:none;background:#f8f1df;color:#8b6d2f}
#user-dialog .user-photo-empty{display:grid;place-items:center}
#user-dialog .user-photo p{margin:2px 0 8px;color:#8d7a4e;font-size:12px}
#user-dialog .user-photo strong{color:#0b4d3b}
#tax-dialog{width:min(720px,calc(100vw - 32px));border:0;border-radius:16px;padding:0;background:#fff;color:#173f30}
#tax-dialog::backdrop{background:#0b4d3b66}
#tax-dialog form{padding:18px 20px 20px}
#tax-dialog .form-grid{display:grid;grid-template-columns:1fr 1fr;gap:12px}
#tax-dialog .form-grid .span-2{grid-column:1 / -1}
#tax-dialog .collect-actions{display:flex;justify-content:flex-end;gap:8px;margin-top:14px}
.report-page .document-table tfoot .cell-ico{width:18px;height:18px;margin-right:6px;vertical-align:-4px}
.sidebar{background:#063729 url("sidebar-bg.jpg") center top / cover no-repeat}
.sidebar-bottom{background:transparent}
