/* Mobile is the base interaction model; desktop retains its wider workspace. */
.mobile-nav,.mobile-steps,.mobile-editor-dock,.mobile-next{display:none}
.mobile-item-extra{grid-column:1/-1}.mobile-item-extra>summary,.mobile-item-tools>summary{display:none}
.mobile-item-extra-grid{display:contents}.mobile-item-extra:not([open])>div{display:contents}
.mobile-item-extra .fld{display:inline-flex;width:30%;margin-right:2%}.mobile-item-tools{display:contents}
.mobile-preview-dialog,.mobile-actions-dialog{color:var(--text);background:var(--panel);border:1px solid var(--line-2);border-radius:20px;padding:0}
.mobile-dialog-head{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:16px;border-bottom:1px solid var(--line);position:sticky;top:0;z-index:2;background:var(--panel)}
.mobile-dialog-head small{display:block;color:var(--faint);font-size:12px;margin-top:3px}.mobile-action-list{display:grid;gap:10px;padding:16px}
.mobile-preview-dialog{width:calc(100% - 16px);max-width:900px;max-height:calc(100dvh - 24px)}.mobile-paper-wrap{overflow:hidden;background:var(--preview-bg);padding:12px}.mobile-paper-wrap .paper{transform-origin:top left;margin:0}
@media screen and (max-width:700px){
 :root{--bar-h:64px;--mobile-bottom:calc(66px + env(safe-area-inset-bottom,0px));--r:18px}
 html{scroll-padding-top:128px}body{font-size:15px;line-height:1.5;-webkit-text-size-adjust:100%}button,a,input,select,textarea,summary{-webkit-tap-highlight-color:transparent}button,a,summary{touch-action:manipulation}
 .main,.view,.panel,.grid2,.grid3,.grid4,.fld,.card-box,.form-card{min-width:0}
 .bar{height:64px;min-height:64px;flex-wrap:nowrap;padding:8px 16px;gap:10px}.bar__title{font:700 20px/1.05 'Barlow Condensed',sans-serif;letter-spacing:.015em;min-width:0;overflow:hidden;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical}.menu-btn,.ws-search-button{width:44px;height:44px;min-width:44px;border-radius:14px}
 body[data-view='faktura'] .bar__actions{display:none}body:not([data-view='faktura']) .bar__actions{margin:0;width:44px;flex:none}.bar #btnNew{width:44px;height:44px;padding:0;font-size:0;border-radius:14px;background:var(--lime);color:#190b30;border-color:var(--lime)}.bar #btnNew svg{width:22px;height:22px;margin:0}
 .view--page{padding:20px 16px calc(var(--mobile-bottom) + 28px)}.page-head{gap:14px;align-items:stretch}.page-head>p,.page-head>div>p{font-size:14px;line-height:1.5}.page-head__actions,.actions{gap:8px;min-width:0}.page-head__actions{flex-wrap:wrap}.page-head__actions .btn{white-space:normal;line-height:1.25;padding:10px 12px}
 .btn,.btn--sm,.icon-btn,.add-item,.link-btn,.seg button,.list--cards .actions .btn,#arhivaTable .actions>.btn{min-height:44px;height:auto}.btn{border-radius:12px}.icon-btn{min-width:44px;width:44px}.link-btn{display:inline-flex;align-items:center}.side__info{min-width:32px;min-height:32px}.side .tab{min-height:48px}.side{padding-top:calc(20px + env(safe-area-inset-top,0px));padding-bottom:calc(24px + env(safe-area-inset-bottom,0px));overscroll-behavior:contain}
 input:not([type=checkbox]):not([type=radio]),select,textarea,.search,.cell-input{min-width:0;max-width:100%;font-size:16px!important;min-height:48px;border-radius:12px}input[type=date],input[type=month]{appearance:none;-webkit-appearance:none;min-inline-size:0}.fld>span{font-size:12px;line-height:1.4}.fld textarea{height:auto;min-height:96px}.fld,.grid2,.grid3,.grid4{gap:12px}.grid3,.grid4{grid-template-columns:minmax(0,1fr)}.grid4 [class*=span],.grid3 [class*=span]{grid-column:auto}.check{align-items:flex-start;min-height:44px;padding:8px 0}.check input{flex:none;width:22px;height:22px;margin-top:0}
 .mobile-nav{position:fixed;display:grid;grid-template-columns:repeat(4,1fr);inset:auto 0 0;z-index:45;background:var(--bar-bg);backdrop-filter:blur(24px);border-top:1px solid var(--line-2);padding:6px 8px calc(6px + env(safe-area-inset-bottom,0px));min-height:var(--mobile-bottom)}.mobile-nav button{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:3px;min-height:52px;border:0;border-radius:12px;background:none;color:var(--faint);font-size:11px;font-weight:600}.mobile-nav svg{width:22px;height:22px}.mobile-nav button[aria-current=page]{color:var(--accent);background:color-mix(in srgb,var(--accent) 8%,transparent)}
 body[data-view=faktura] .mobile-nav{display:none}.mobile-editor-dock{position:fixed;bottom:0;left:0;right:0;z-index:40;padding:8px 16px calc(12px + env(safe-area-inset-bottom,0px));background:var(--bar-bg);backdrop-filter:blur(24px);border-top:1px solid var(--line-2)}body[data-view=faktura] .mobile-editor-dock{display:block}.mobile-editor-dock>div:last-child{display:grid;grid-template-columns:1fr 1.25fr 48px;gap:8px}.mobile-editor-dock .btn{height:48px}.mobile-save-state{font-size:11px;line-height:1.4;min-height:20px;color:var(--dim);text-align:center}.mobile-more{font-size:25px;line-height:1}
 .workspace{display:block}.editor{padding:16px 16px calc(124px + env(safe-area-inset-bottom,0px));border:0}.workspace>.preview{display:none}.mobile-steps{position:sticky;top:64px;z-index:19;grid-template-columns:repeat(4,minmax(0,1fr));gap:4px;padding:10px 12px;background:var(--bar-bg);backdrop-filter:blur(18px);border-bottom:1px solid var(--line)}body[data-view=faktura] .mobile-steps{display:grid}.mobile-steps button{min-height:48px;display:flex;flex-direction:column;gap:4px;align-items:center;justify-content:center;background:transparent;border:0;color:var(--faint);font-size:11px;border-radius:12px}.mobile-steps button>span{display:grid;place-items:center;width:22px;height:22px;border:1px solid var(--line-2);border-radius:8px;font-size:11px}.mobile-steps button[aria-current=step]{color:var(--accent);background:color-mix(in srgb,var(--accent) 8%,transparent)}.mobile-steps button[aria-current=step]>span{background:var(--lime);color:#1a0b38;border-color:var(--lime)}
 #editor>.panel{display:none;padding:0;border:0;margin-bottom:20px;background:transparent}#editor>.mobile-panel-active{display:block}.panel__title{margin-bottom:18px;font-size:23px}.panel__title>span{display:none}.editor .grid2{grid-template-columns:repeat(2,minmax(0,1fr));gap:16px 12px}.editor .fld:has([data-f='mjesto']),.editor .fld:has([data-f='osnova']),.editor .fld:has([data-f='period']),.editor .fld:has([data-f='referenca']),.editor .fld:has([data-f='kupac.email']){grid-column:1/-1}.mobile-next{display:flex;gap:8px;justify-content:space-between;margin:24px 0}.mobile-next .btn{flex:1}.editor>.totals{display:none;margin-bottom:0}body[data-mobile-step='2'] .editor>.totals,body[data-mobile-step='3'] .editor>.totals{display:block}.ws-lock{padding:14px;gap:12px;margin-bottom:20px;border-radius:16px}.ws-lock p{font-size:12px}.ws-lock .actions{width:100%}.ws-lock .btn{flex:1;min-width:0;font-size:12px}
 .item{padding:16px;border-radius:18px;margin-bottom:12px}.item__head{flex-wrap:wrap;gap:8px;margin-bottom:16px}.item__sum{font-size:15px;margin-left:auto;order:1}.item__no{font-size:18px}.item__grupa-btn{order:3;margin:0!important;min-height:36px!important}.item__tools{order:2;margin-left:0}.item__tools>.icon-btn{width:40px;min-width:40px}.item__grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:14px 12px}.item__grid>.fld{grid-column:auto}.item__grid>.fld:has([data-k=vrsta]),.item__grid>.fld:has([data-k=opis]){grid-column:1/-1}.item__grid>.fld:has([data-k=cijena]){grid-column:2}.item__grid>.fld:has([data-k=kol]){grid-column:1}.mobile-item-extra{display:block;border-top:1px solid var(--line);padding-top:4px}.mobile-item-extra>summary{display:flex;align-items:center;min-height:44px;font-size:12px;color:var(--dim);cursor:pointer}.mobile-item-extra-grid,.mobile-item-extra:not([open])>div{display:none}.mobile-item-extra[open]>.mobile-item-extra-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px;padding-top:8px}.mobile-item-extra .fld{display:flex;width:auto;margin:0}.mobile-item-tools{display:block;position:relative}.mobile-item-tools>summary{display:grid;place-items:center;width:44px;height:44px;border:1px solid var(--line);border-radius:12px;font-size:22px;cursor:pointer;list-style:none}.mobile-item-tools>summary::-webkit-details-marker{display:none}.mobile-item-tools>.icon-btn{display:none}.mobile-item-tools[open]{display:flex;flex-wrap:wrap;gap:4px}.mobile-item-tools[open]>.icon-btn{display:grid}
 .kpis,#pgKpis.kpis--n4{gap:10px;margin-bottom:20px}.kpi{padding:16px 14px;border-radius:18px}.kpi b{font-size:28px;line-height:1.15}.kpi>span,.kpi small{font-size:11px}.balance{padding:22px;border-radius:22px;margin-bottom:12px}.balance__value{font-size:44px}.pg-top{gap:14px;margin-bottom:20px}.pg-top .seg{display:grid;grid-template-columns:1fr 1fr}.pg-top .seg button{padding:8px;font-size:12px;line-height:1.2}.card-box,.form-card{padding:18px;border-radius:20px}.card-box h2.section-title{font-size:22px}.ws-section-head{gap:12px}.ws-section-head h2{font-size:24px}.ws-section-head>button{font-size:12px}.ws-review-row{grid-template-columns:32px minmax(0,1fr) auto;gap:10px;padding:16px 0}.ws-review-row>span:last-child{display:none}.ws-review-row b{font-size:14px;line-height:1.4}.ws-review-row small{font-size:11px}.ws-review-amount{font-size:14px;white-space:nowrap}.ws-review-icon{width:32px;height:36px}.ws-overview-tools{gap:14px}.ws-accountant p,.ws-backup .hint{font-size:13px}.ws-accountant>.btn{width:100%;justify-content:space-between}.ws-backup .actions{display:grid;grid-template-columns:1fr}.ws-backup .btn{width:100%}.ws-review-filters{gap:4px;overflow:auto}.ws-review-filters button{min-height:44px;flex:1;padding:8px;font-size:12px;white-space:nowrap}
 .table-wrap{max-width:100%;overscroll-behavior-x:contain}.table-wrap:has(.mobile-records){border:0;overflow:visible;background:none}table.mobile-records,.mobile-records tbody{display:block;width:100%;min-width:0}.mobile-records thead,.mobile-records tfoot{display:none}.mobile-records tbody tr{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;margin-bottom:12px;padding:16px;border:1px solid var(--line);border-radius:18px;background:var(--panel)}.mobile-records td{display:block;min-width:0;border:0;padding:0;text-align:left!important;white-space:normal;overflow-wrap:anywhere}.mobile-records td:before{content:attr(data-mobile-label);display:block;font-size:10px;font-weight:600;letter-spacing:.04em;text-transform:uppercase;color:var(--faint);margin-bottom:4px}.mobile-records td:has(button),.mobile-records td:has(input),.mobile-records td:nth-child(1){grid-column:1/-1}.mobile-records td:last-child{grid-column:1/-1}.mobile-records td input{width:100%}.mobile-records .mobile-ledger-row>td{display:none}.mobile-records .mobile-ledger-row>.mobile-ledger-date,.mobile-records .mobile-ledger-row>.mobile-ledger-document,.mobile-records .mobile-ledger-row>.mobile-ledger-description,.mobile-records .mobile-ledger-row>.mobile-ledger-total,.mobile-records .mobile-ledger-row>.mobile-ledger-actions{display:block}.mobile-ledger-description{grid-column:1/-1}.mobile-ledger-description input{min-width:0;width:100%}.mobile-records .mobile-ledger-expanded>td{display:block}.mobile-ledger-total b{font-size:22px}.mobile-ledger-toggle{width:100%;justify-content:center;border-top:1px solid var(--line);margin-top:4px}
 .list--cards tbody tr{padding:16px;gap:14px 12px;border-radius:18px}.list--cards td{overflow-wrap:anywhere}.list--cards select,.list--cards input[type=date],#arhivaTable select,#arhivaTable input[type=date]{min-height:48px;height:48px}.list--cards .actions{gap:8px}.list--cards .actions .btn{min-height:44px}.list--cards .more-menu summary{min-width:44px;min-height:44px}.more-menu__list{right:0;min-width:min(280px,calc(100vw - 64px));z-index:25}.more-menu__list button{min-height:46px}.archive-doc-number{white-space:normal!important;text-align:left;overflow-wrap:anywhere}#arhivaTable tbody tr{grid-template-columns:minmax(0,1fr) minmax(96px,.65fr);padding:16px;gap:12px}#arhivaTable td[data-label='Iznos (KM)']>b{font-size:24px}#arhivaTable td[data-label='Fisk.']{display:none}#arhivaTable .archive-doc-number{font-size:15px}.archive-stat{border-radius:18px}.archive-head .btn{min-height:44px}.archive-search-row{gap:8px}.archive-results{font-size:12px}.arh-sum{margin-bottom:20px}
 .toolbar{flex-wrap:wrap;gap:8px}.toolbar>.search{width:100%;flex-basis:100%;height:48px}.izv-tools .btn{min-height:44px}.scan-drop{padding:16px;gap:10px}.scan-drop__hint{font-size:12px}.form-card__actions{display:flex;flex-wrap:wrap;gap:8px}.form-card__actions>.btn{flex:1}.card-box__head{flex-wrap:wrap;gap:10px}.card-box__head .actions{flex-wrap:wrap}.bnk-sel{min-width:0!important;max-width:100%}#bnkFilter{flex:1 1 100%!important}
 dialog{max-width:calc(100% - 16px);max-height:calc(100dvh - 24px);overscroll-behavior:contain;border-radius:20px}.pay-dialog,.info-dialog,.veze-dialog{width:calc(100% - 16px);padding:16px}.pay-dialog__head{flex-wrap:wrap;gap:12px}.pay-dialog__head .actions{display:flex;flex-wrap:wrap;width:100%}.pay-dialog__head .actions .btn{flex:1;white-space:normal}.pdf-dialog{height:calc(100dvh - 16px);padding:12px}.pdf-dialog iframe{min-height:180px;flex:1}.workspace-dialog{padding:0}.ws-dialog-head{padding:16px}.ws-dialog-body{padding:16px}.mobile-actions-dialog{position:fixed;top:auto;bottom:8px;width:calc(100% - 16px);margin:8px}.mobile-actions-dialog .btn{min-height:48px;justify-content:flex-start}.mobile-preview-dialog{padding:0}.toast{bottom:calc(var(--mobile-bottom) + 10px);font-size:13px;padding:14px 16px}body[data-view=faktura] .toast{bottom:110px}.conflict{inset:12px 12px auto;transform:none;max-width:calc(100% - 24px)}
}
@media screen and (min-width:701px){.mobile-item-extra{display:contents}.mobile-item-extra>div{display:contents!important}.mobile-item-extra .fld{display:flex;width:auto;margin:0}.mobile-item-tools>.icon-btn{display:grid}.mobile-ledger-toggle{display:none}}
@media print{.mobile-nav,.mobile-steps,.mobile-editor-dock,.mobile-next,.mobile-item-tools,.demo-banner{display:none!important}}
@media(prefers-reduced-motion:reduce){*{scroll-behavior:auto!important}}
.demo-banner{display:flex;align-items:center;gap:14px;padding:12px 20px;border-bottom:1px solid color-mix(in srgb,var(--accent) 30%,var(--line));background:color-mix(in srgb,var(--accent) 7%,var(--bg));font-size:12px}.demo-banner>div{flex:1;min-width:0}.demo-banner b{font-size:10px;letter-spacing:.14em;color:var(--accent);display:block}.demo-banner span{color:var(--dim)}.demo-banner button,.demo-banner a{display:inline-flex;align-items:center;justify-content:center;min-height:44px;padding:8px 12px;border:1px solid var(--line-2);border-radius:12px;background:none;color:var(--text);text-decoration:none;font:inherit;cursor:pointer}
@media(max-width:700px){.demo-banner{padding:10px 16px;gap:8px;flex-wrap:wrap}.demo-banner>div{flex-basis:100%}.demo-banner span{font-size:11px}.demo-banner button,.demo-banner a{min-height:44px;font-size:12px}}
.mobile-doc-status,.mobile-payment-toggle{display:none}
@media screen and (max-width:700px){
 #arhivaTable tr:not(.mobile-payment-open) td[data-label='Status'],#arhivaTable tr:not(.mobile-payment-open) td[data-label='Uplata']{display:none}
 #arhivaTable tbody tr{grid-template-areas:'document amount' 'customer customer' 'date date' 'status payment' 'actions actions'}
 .mobile-doc-status{display:inline-flex;align-items:center;min-height:26px;border-radius:8px;background:var(--field);border:1px solid var(--line);font-size:10px;color:var(--dim);padding:3px 7px;margin-top:6px}.mobile-payment-toggle{display:inline-flex}
 .mobile-editor-dock{bottom:var(--keyboard-inset,0px)}body.keyboard-open .mobile-nav{display:none}body.keyboard-open .mobile-editor-dock{padding-bottom:8px}body.keyboard-open .mobile-save-state{display:none}
}
@media screen and (min-width:901px) and (max-width:1500px){
 .bar{gap:10px}.bar__title{font-size:18px;white-space:normal;min-width:0}.bar__actions{gap:6px;min-width:0}.bar__actions .btn{padding:0 10px;font-size:13px}.save-state{max-width:110px;white-space:normal;font-size:11px}.ws-search-button{flex:none}.ws-search-button span,.ws-search-button kbd{display:none}
}
@media screen and (min-width:701px) and (max-width:1100px){body[data-view=faktura] .bar{height:auto;flex-wrap:wrap;min-height:64px;padding:10px 16px}body[data-view=faktura] .bar__actions{display:flex;flex-wrap:wrap;width:100%;margin-left:0}.bar__actions .btn{flex:1;min-height:40px}.save-state{display:none}}
.release-badge{display:flex;align-items:center;gap:7px;border:0;border-radius:6px;background:transparent;color:var(--dim);font:inherit;font-size:11px;min-height:44px;padding:8px 0;cursor:pointer;text-align:left}.release-badge b{font-weight:500}.release-badge:hover{color:var(--text)}.release-badge:focus-visible{outline:2px solid var(--accent);outline-offset:3px}.release-badge--side{margin-top:4px;opacity:.75}.release-dialog h3{font-size:18px;margin:22px 0 10px}.release-dialog h3:first-of-type{font-size:26px;margin-top:8px}.release-context{color:var(--accent);font-size:12px;text-transform:uppercase;letter-spacing:.06em}.release-features{padding-left:22px}.release-features>li{padding:8px 0 12px;border-bottom:1px solid var(--line)}.release-features p{margin:5px 0 0;color:var(--dim);font-size:14px;line-height:1.6}.release-limits{margin-top:20px;padding:14px;border:1px solid var(--line);border-radius:12px}.release-limits summary{cursor:pointer;min-height:32px}.release-limits li{margin:8px 0;color:var(--dim)}.release-settings{grid-column:1/-1}
@media(max-width:700px){.release-dialog .ws-dialog-body{font-size:14px}.release-features p{font-size:13px}.release-limits summary{min-height:44px}.release-badge--side{font-size:11px}}
@media print{.release-badge,.release-settings{display:none!important}}
/* Keep the item action legible in both themes. */
.item__head .item__grupa-btn{color:var(--accent);border-color:color-mix(in srgb,var(--accent) 50%,var(--line))}
