/* G.M.C. ERP: tema elektro + kompaktniji prikaz (manje razmaka, tablice ne izlaze iz ekrana). */
@import url("theme-elektro.css");
@media screen and (min-width:761px){
  main.app-main section,main.app-main .formcard{padding:16px 18px}
  main.app-main section+section{margin-top:12px}
  main.app-main table:not(.gmc-keep) th{padding:7px 9px!important;font-size:12px!important}
  main.app-main table:not(.gmc-keep) td{padding:7px 9px!important;font-size:14px;line-height:1.3}
  main.app-main table:not(.gmc-keep) td{white-space:normal!important;overflow-wrap:break-word}
  main.app-main table:not(.gmc-keep) td.num,main.app-main table:not(.gmc-keep) td.ts-num,main.app-main table td .actions{white-space:nowrap!important;overflow-wrap:normal}
  main.app-main table:not(.gmc-keep) td a,main.app-main table:not(.gmc-keep) td b{white-space:normal!important}
  main.app-main table:not(.gmc-keep) td:first-child a,main.app-main table:not(.gmc-keep) td:first-child b{white-space:nowrap!important}
  main.app-main .table-wrap{overflow-x:auto;max-width:100%}
  main.app-main table .actions{flex-wrap:nowrap;gap:6px;margin:0}
  main.app-main table .actions .btn,main.app-main table .actions button{padding:5px 10px!important;font-size:13px!important;min-height:0!important;white-space:nowrap}
  main.app-main table .actions form{margin:0}
  main.app-main .formgrid{gap:10px 14px}
  main.app-main input,main.app-main select,main.app-main textarea{min-height:38px}
}

/* Padajući meniji: jedinstven, čist izgled u cijeloj aplikaciji */
main.app-main select,dialog select{
  -webkit-appearance:none;-moz-appearance:none;appearance:none;
  background:#fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5l5 5 5-5' fill='none' stroke='%230033a0' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") no-repeat right 12px center/12px 8px!important;
  border:1px solid #cfd8e3!important;border-radius:10px!important;
  padding:8px 36px 8px 12px!important;min-height:40px;font-size:14px;color:#0f1f3a;
  box-shadow:0 1px 2px rgba(15,31,58,.05);cursor:pointer;transition:border-color .15s,box-shadow .15s
}
main.app-main select:hover,dialog select:hover{border-color:#8fa3bf!important}
main.app-main select:focus,dialog select:focus{outline:0;border-color:#0033a0!important;box-shadow:0 0 0 3px rgba(0,51,160,.15)!important}
main.app-main select:disabled{background-color:#f3f6fa!important;cursor:not-allowed;opacity:.8}
main.app-main select option{font-size:14px;padding:6px}
main.app-main select[multiple]{background-image:none!important;padding-right:12px!important}

/* Računi / izlazni dokumenti: kompaktna forma "Novi dokument" u jednom redu i lista s redovima u jednoj liniji */
@media screen and (min-width:900px){
  main.app-main form.gmc-newdoc{display:grid!important;grid-template-columns:minmax(220px,2.2fr) minmax(140px,1fr) minmax(140px,1fr) minmax(180px,2fr) auto;gap:10px 12px;align-items:end}
  main.app-main form.gmc-newdoc>label{margin:0}
  main.app-main form.gmc-newdoc>button{margin:0;height:40px;white-space:nowrap;align-self:end}
}
main.app-main section.output-new .section-head{margin-bottom:6px}
main.app-main section.output-new .section-head p{margin:0}
main.app-main table.gmc-doclist td{white-space:nowrap!important;padding-top:6px!important;padding-bottom:6px!important;vertical-align:middle}
main.app-main table.gmc-doclist td.gmc-cust{white-space:normal!important;width:40%}
main.app-main table.gmc-doclist td.gmc-act{text-align:right;width:1%}
main.app-main table.gmc-doclist td.gmc-act .btn{padding:4px 10px!important;font-size:13px!important;min-height:0!important;white-space:nowrap!important}
main.app-main table.gmc-doclist .status-pill{white-space:nowrap}
/* GMC ne radi PDV-SL-2 (strani kupac): sakriveno odmah, bez trzanja */
main.app-main a[href*="page=vat_refund"]{display:none!important}
main.app-main form.doclist-filter{display:flex;gap:8px;align-items:center;flex-wrap:wrap;margin:0}
main.app-main form.doclist-filter select{min-width:170px;min-height:36px}
main.app-main form.doclist-filter input[type=search]{width:200px;min-height:36px}
main.app-main form.doclist-filter button{min-height:36px;padding:6px 14px}
@media screen and (min-width:900px){
  main.app-main form.gmc-newdoc{display:flex!important;flex-wrap:wrap;gap:10px 12px;align-items:flex-end}
  main.app-main form.gmc-newdoc>label{flex:1 1 140px;min-width:0}
  main.app-main form.gmc-newdoc>label.gmc-wide{flex:2 1 240px}
  main.app-main form.gmc-newdoc>button{flex:0 0 auto}
}
@media screen and (min-width:900px){
  main.app-main form.gmc-newdoc{flex-wrap:nowrap}
  main.app-main form.gmc-newdoc>label{flex:1 1 0!important;width:auto!important;min-width:0!important;max-width:none!important}
  main.app-main form.gmc-newdoc>label.gmc-wide{flex:1.8 1 0!important}
}
main.app-main section.output-list .section-head{align-items:center}
main.app-main form.doclist-filter{flex-wrap:nowrap}
main.app-main form.doclist-filter select{width:170px!important;flex:0 0 170px;margin:0!important}
main.app-main form.doclist-filter input[type=search]{width:200px!important;flex:0 0 200px;margin:0!important}
main.app-main form.doclist-filter button{flex:0 0 auto;margin:0!important}
@media screen and (min-width:900px){
  html body main.app-main form.formgrid.gmc-newdoc{display:grid!important;grid-template-columns:none!important;grid-auto-flow:column!important;grid-auto-columns:minmax(0,1fr)!important;gap:10px 12px!important;align-items:end!important}
  html body main.app-main form.formgrid.gmc-newdoc>*{grid-column:auto!important;grid-row:1!important}
  html body main.app-main form.formgrid.gmc-newdoc>label.gmc-wide{grid-column:span 2!important}
  html body main.app-main form.formgrid.gmc-newdoc>input[type=hidden]{display:none}
  html body main.app-main form.formgrid.gmc-newdoc>button{justify-self:stretch;white-space:nowrap;height:40px;margin:0!important}
}
@media screen and (min-width:900px){
  html body main.app-main form.formgrid.gmc-newdoc>*{min-width:0!important;width:auto!important;max-width:none!important}
  html body main.app-main form.formgrid.gmc-newdoc>label :is(input,select,.smart-combo){width:100%!important;min-width:0!important;max-width:none!important}
}
@media screen and (min-width:900px){
  html body main.app-main #mmc-new-document form.formgrid.gmc-newdoc{grid-auto-flow:row!important;grid-template-columns:minmax(0,2.2fr) minmax(0,1fr) minmax(0,1fr) minmax(0,1.8fr) auto!important}
  html body main.app-main #mmc-new-document form.formgrid.gmc-newdoc:has(select[name=doc_type]){grid-template-columns:minmax(0,1fr) minmax(0,2fr) minmax(0,1fr) minmax(0,1fr) minmax(0,1.6fr) auto!important}
  html body main.app-main #mmc-new-document form.formgrid.gmc-newdoc>label.gmc-wide{grid-column:auto!important}
}

/* ===== Mobitel ===== */
@media screen and (max-width:760px){
  main.app-main input,main.app-main select,main.app-main textarea{max-width:100%;min-width:0;box-sizing:border-box}
  main.app-main input[type=date]{-webkit-appearance:none;appearance:none;width:100%!important;min-width:0!important;display:block}
  main.app-main section,main.app-main .formcard{padding:12px!important}
  /* Novi dokument */
  html body main.app-main form.formgrid.gmc-newdoc{display:grid!important;grid-template-columns:minmax(0,1fr) minmax(0,1fr)!important;grid-auto-flow:row!important;gap:8px 10px!important}
  html body main.app-main form.formgrid.gmc-newdoc>*{grid-column:auto!important;grid-row:auto!important;min-width:0!important;width:auto!important;margin:0!important}
  html body main.app-main form.formgrid.gmc-newdoc>label.gmc-wide,html body main.app-main form.formgrid.gmc-newdoc>label:has(select[name=doc_type]),html body main.app-main form.formgrid.gmc-newdoc>button{grid-column:1/-1!important}
  html body main.app-main form.formgrid.gmc-newdoc>input[type=hidden]{display:none}
  /* Filter liste */
  main.app-main section.output-list .section-head{flex-direction:column;align-items:stretch;gap:8px}
  main.app-main form.doclist-filter{flex-wrap:wrap!important;width:100%}
  main.app-main form.doclist-filter select{flex:1 1 100%!important;width:100%!important}
  main.app-main form.doclist-filter input[type=search]{flex:1 1 0!important;width:auto!important;min-width:0!important}
  /* Lista računa: kompaktna kartica (broj + iznos, kupac, datum + status + PDF) */
  main.app-main table.gmc-doclist,main.app-main table.gmc-doclist tbody{display:block!important;width:100%!important}
  main.app-main table.gmc-doclist tr:first-child{display:none!important}
  main.app-main table.gmc-doclist tr{display:grid!important;grid-template-columns:minmax(0,1fr) auto auto;grid-template-areas:"b b u" "k k k" "d s p";gap:3px 8px;padding:9px 2px!important;border-bottom:1px solid #e3e9f1;align-items:center}
  main.app-main table.gmc-doclist td{display:block!important;padding:0!important;border:0!important;white-space:nowrap!important;width:auto!important;font-size:14px}
  main.app-main table.gmc-doclist td::before{content:none!important;display:none!important}
  main.app-main table.gmc-doclist td:nth-child(1){grid-area:b}
  main.app-main table.gmc-doclist td:nth-child(2){display:none!important}
  main.app-main table.gmc-doclist td:nth-child(3){grid-area:k;white-space:normal!important;color:#344054}
  main.app-main table.gmc-doclist td:nth-child(4){grid-area:d;color:#667085;font-size:13px}
  main.app-main table.gmc-doclist td:nth-child(5){grid-area:u;text-align:right}
  main.app-main table.gmc-doclist td:nth-child(6){grid-area:s}
  main.app-main table.gmc-doclist td:nth-child(7){grid-area:p}
  main.app-main table.gmc-doclist td.empty-row{grid-column:1/-1}
}
@media screen and (max-width:760px){
  main.app-main .products-filter-form,main.app-main form.search{display:flex!important;flex-wrap:wrap!important;gap:8px!important;min-width:0!important;width:100%!important;flex:1 1 100%!important}
  main.app-main .products-filter-form>*,main.app-main form.search>*{flex:1 1 140px!important;min-width:0!important;max-width:100%!important;width:auto!important}
  main.app-main .products-filter-form input[type=search],main.app-main .products-filter-form input[name=q],main.app-main form.search input[type=search]{flex:1 1 100%!important}
  main.app-main table.mobile-card-table .mobile-card-row{padding:8px 10px!important;margin:0 0 8px!important}
  main.app-main table.mobile-card-table .mobile-card-row>td{padding:4px 0!important}
}

@media screen and (max-width:760px){
  html body main.app-main .section-head.products-section-head{display:flex!important;flex-direction:column!important;align-items:stretch!important;gap:10px!important}
  html body main.app-main form:is(#_x,.products-filter-form){display:grid!important;grid-template-columns:1fr 1fr!important;gap:8px!important;min-width:0!important;width:100%!important;max-width:100%!important;flex:none!important}
  html body main.app-main form:is(#_x,.products-filter-form)>:is(#_y,*){min-width:0!important;width:100%!important;max-width:100%!important;flex:none!important}
  html body main.app-main form:is(#_x,.products-filter-form)>:is(#_y,.erp-ac-wrap,input[name=s],button){grid-column:1/-1!important}
  html body main.app-main form:is(#_x,.products-filter-form) .erp-ac-wrap input{width:100%!important;min-width:0!important;max-width:100%!important}
}

/* Mobitel: kompaktna lista artikala, KPI kartice, akcije */
@media screen and (max-width:760px){
  html body main.app-main table:is(#_x,.gmc-prodlist),html body main.app-main table:is(#_x,.gmc-prodlist) tbody{display:block!important;width:100%!important;min-width:0!important;border:0!important;background:none!important}
  html body main.app-main table:is(#_x,.gmc-prodlist) tr:first-child:has(th){display:none!important}
  html body main.app-main table:is(#_x,.gmc-prodlist) tr{display:grid!important;grid-template-columns:22px auto auto auto minmax(0,1fr) auto auto!important;grid-template-areas:"c s s s s a a" "c n n n n n n" "c j p t . m k"!important;column-gap:10px!important;row-gap:3px!important;align-items:center!important;padding:8px 10px!important;margin:0 0 6px!important;border:1px solid #dfe6ef!important;border-radius:10px!important;background:#fff!important;box-shadow:none!important}
  html body main.app-main table:is(#_x,.gmc-prodlist) td{display:block!important;padding:0!important;border:0!important;min-width:0!important;width:auto!important;background:none!important;text-align:left!important;font-size:13px!important;line-height:1.3!important}
  html body main.app-main table:is(#_x,.gmc-prodlist) td::before{content:none!important;display:none!important}
  html body main.app-main table:is(#_x,.gmc-prodlist) td.pc-chk{grid-area:c;align-self:start;padding-top:2px!important}
  html body main.app-main table:is(#_x,.gmc-prodlist) td.pc-chk input{width:18px!important;height:18px!important;margin:0!important}
  html body main.app-main table:is(#_x,.gmc-prodlist) td.pc-sku{grid-area:s;font-size:12px!important;color:#64748b}
  html body main.app-main table:is(#_x,.gmc-prodlist) td.prod-name{grid-area:n;font-size:14px!important;white-space:normal!important}
  html body main.app-main table:is(#_x,.gmc-prodlist) td.pc-jm{grid-area:j;color:#64748b}
  html body main.app-main table:is(#_x,.gmc-prodlist) td.pc-pdv{grid-area:p;color:#64748b}
  html body main.app-main table:is(#_x,.gmc-prodlist) td.pc-type{grid-area:t;color:#64748b}
  html body main.app-main table:is(#_x,.gmc-prodlist) td.pc-man{display:none!important}
  html body main.app-main table:is(#_x,.gmc-prodlist) td.pc-mpc{grid-area:m;text-align:right!important;white-space:nowrap!important;font-size:14px!important}
  html body main.app-main table:is(#_x,.gmc-prodlist) td.pc-mpc b::after{content:" KM";font-weight:600;font-size:11px;color:#64748b}
  html body main.app-main table:is(#_x,.gmc-prodlist) td.pc-stk{grid-area:k;text-align:right!important;white-space:nowrap!important;font-weight:700;min-width:44px}
  html body main.app-main table:is(#_x,.gmc-prodlist) td.pc-stk::after{content:" kom";font-weight:500;font-size:11px;color:#64748b}
  html body main.app-main table:is(#_x,.gmc-prodlist) td.pc-stk.prod-zero{color:#b91c1c}
  html body main.app-main table:is(#_x,.gmc-prodlist) td.pc-act{grid-area:a;justify-self:end}
  html body main.app-main table:is(#_x,.gmc-prodlist) td.pc-act .btn,html body main.app-main table:is(#_x,.gmc-prodlist) td.pc-act button{display:inline-flex!important;align-items:center!important;justify-content:center!important;padding:2px 8px!important;min-height:24px!important;height:24px!important;font-size:12px!important;line-height:1!important;border-radius:6px!important}
  html body main.app-main table:is(#_x,.gmc-prodlist) td.pc-act>div{gap:5px!important}
  html body main.app-main .table-scroll:has(> table:is(#_x,.gmc-prodlist)){overflow:visible!important;border:0!important;padding:0!important;background:none!important}
  html body main.app-main section:has(table:is(#_x,.gmc-prodlist)){padding:0!important;border:0!important;background:none!important;box-shadow:none!important}

  html body main.app-main section.gmc-bulk{padding:8px 10px!important}
  html body main.app-main section.gmc-bulk>div{gap:6px!important}
  html body main.app-main section.gmc-bulk .muted:last-child{display:none!important}
  html body main.app-main section.gmc-bulk button{padding:4px 10px!important;min-height:30px!important;font-size:12px!important}

  html body main.app-main .products-section-head>div{gap:6px!important}
  html body main.app-main .products-section-head>div>.btn{padding:6px 10px!important;min-height:32px!important;font-size:13px!important}

  html body .exec-kpis{gap:8px!important}
  html body .exec-kpis>.exec-kpi{padding:10px 12px!important;gap:0!important}
  html body .exec-kpis .exec-icon{display:none!important}
  html body .exec-kpis>.exec-kpi>span:last-child{width:100%!important;min-width:0!important}
  html body .exec-kpis>.exec-kpi small{white-space:nowrap!important;overflow:hidden!important;text-overflow:ellipsis!important}
  html body .exec-kpis>.exec-kpi b{white-space:nowrap!important;overflow-wrap:normal!important;word-break:normal!important;font-size:clamp(15px,4.9vw,20px)!important;overflow:hidden!important}
  html body .exec-kpis>.exec-kpi em{white-space:nowrap!important;overflow:hidden!important;text-overflow:ellipsis!important}
  html body main.app-main table:is(#_x,.gmc-prodlist) td.prod-name,html body main.app-main table:is(#_x,.gmc-prodlist) td.prod-name *{overflow-wrap:anywhere!important;word-break:break-word!important;white-space:normal!important}
  html body main.app-main section.gmc-bulk>div>b{flex:1 1 auto}
  html body main.app-main section.dash-panel{padding:8px!important}
  html body main.app-main section.dash-panel .section-head{padding:8px 8px 10px!important;display:flex!important;flex-direction:row!important;align-items:center!important;justify-content:space-between!important;gap:8px!important}
  html body main.app-main section.dash-panel .section-head h2{font-size:18px!important}
  html body main.app-main section.dash-panel .section-head .btn{white-space:nowrap!important;width:auto!important;padding:6px 12px!important;min-height:32px!important;font-size:13px!important}
}

/* Mobitel: sve ostale liste kao kompaktne kartice u 2 kolone */
@media screen and (max-width:760px){
  html body main.app-main table:is(#_x,.mobile-card-table) tr.mobile-card-row{display:grid!important;grid-template-columns:minmax(0,1fr) minmax(0,1fr)!important;column-gap:12px!important;row-gap:4px!important;padding:8px 12px!important;margin:0 0 8px!important;border-radius:10px!important}
  html body main.app-main table:is(#_x,.mobile-card-table) tr.mobile-card-row>td{display:block!important;padding:2px 0!important;border:0!important;min-width:0!important;min-height:0!important;width:auto!important;text-align:left!important;font-size:13px!important;line-height:1.3!important;overflow-wrap:anywhere!important}
  html body main.app-main table:is(#_x,.mobile-card-table) tr.mobile-card-row>td::before{display:block!important;width:auto!important;margin:0 0 1px!important;padding:0!important;font-size:10px!important;line-height:1.2!important;letter-spacing:.03em!important;text-align:left!important;color:#7a889b!important;white-space:nowrap!important;overflow:hidden!important;text-overflow:ellipsis!important}
  html body main.app-main table:is(#_x,.mobile-card-table) tr.mobile-card-row>td:is([data-label=""],:not([data-label])){grid-column:1/-1!important}
  html body main.app-main table:is(#_x,.mobile-card-table) tr.mobile-card-row>td:is([data-label=""],:not([data-label]))::before{display:none!important}
  html body main.app-main table:is(#_x,.mobile-card-table) tr.mobile-card-row>td:has(.btn,button,form){grid-column:1/-1!important}
  html body main.app-main table:is(#_x,.mobile-card-table) tr.mobile-card-row>td:has(.btn,button,form)>*{justify-content:flex-start!important}
  html body main.app-main table:is(#_x,.mobile-card-table) tr.mobile-card-row>td .btn,html body main.app-main table:is(#_x,.mobile-card-table) tr.mobile-card-row>td button{padding:3px 10px!important;min-height:28px!important;font-size:12px!important}
  html body main.app-main table:is(#_x,.mobile-card-table) tr.mobile-card-row>td:is(.ts-num,.num,.right){white-space:nowrap!important;overflow-wrap:normal!important}
  html body main.app-main code{white-space:normal!important;overflow-wrap:anywhere!important;word-break:break-all!important}
}

@media screen and (min-width:761px){html body main.app-main table:is(#_x,.gmc-prodlist) td.pc-sku,html body main.app-main table:is(#_x,.gmc-prodlist) td.pc-sku *{min-width:max-content!important;white-space:nowrap!important;word-break:normal!important;overflow-wrap:normal!important}}

/* A4 pregled: bez iOS povećanja teksta, list se samo umanji */
html{-webkit-text-size-adjust:100%!important;text-size-adjust:100%!important}
.gmc-a4,.gmc-a4 *,.pst-print,.pst-print *{-webkit-text-size-adjust:none!important;text-size-adjust:none!important}
.gmc-a4-wrap{width:100%;max-width:100%;overflow:hidden}
@media screen and (max-width:760px){
  html body main.app-main .gmc-a4{box-shadow:0 1px 8px #0003!important}
  html body main.app-main .gmc-a4 a[href^="tel"]{color:inherit!important;text-decoration:none!important}
}
@media print{.gmc-a4-wrap{height:auto!important;overflow:visible!important}}

@media screen and (max-width:760px){
  html body main.app-main table:is(#_x,.gmc-prodlist) tr:not(:has(td.pc-chk)){grid-template-columns:auto auto auto minmax(0,1fr) auto auto!important;grid-template-areas:"s s s s a a" "n n n n n n" "j p t . m k"!important}
  html body main.app-main table:is(#_x,.gmc-prodlist) .prod-lock{display:none!important}
  html body main.app-main table:is(#_x,.gmc-prodlist) td.pc-act:not(:has(.btn,button)){display:none!important}
}

/* Mobitel: Stanje skladišta kompaktno (šifra · vrijednost / naziv / stanje · NC · MPC) */
@media screen and (max-width:760px){
  html body main.app-main table:is(#_x,.gmc-stocklist),html body main.app-main table:is(#_x,.gmc-stocklist) tbody{display:block!important;width:100%!important;min-width:0!important;border:0!important;background:none!important}
  html body main.app-main table:is(#_x,.gmc-stocklist) tr:has(th){display:none!important}
  html body main.app-main table:is(#_x,.gmc-stocklist) tr{display:grid!important;grid-template-columns:auto auto minmax(0,1fr) auto!important;grid-template-areas:"s w . v" "n n n n" "q c c m"!important;column-gap:10px!important;row-gap:3px!important;align-items:baseline!important;padding:8px 12px!important;margin:0 0 6px!important;border:1px solid #dfe6ef!important;border-radius:10px!important;background:#fff!important;box-shadow:none!important}
  html body main.app-main table:is(#_x,.gmc-stocklist) tr.warnrow{border-color:#f5c27a!important;background:#fffaf2!important}
  html body main.app-main table:is(#_x,.gmc-stocklist) td{display:block!important;padding:0!important;border:0!important;min-width:0!important;width:auto!important;background:none!important;text-align:left!important;font-size:13px!important;line-height:1.3!important}
  html body main.app-main table:is(#_x,.gmc-stocklist) td::before{content:none!important}
  html body main.app-main table:is(#_x,.gmc-stocklist) td:is(.sc-rbr,.sc-lnc,.sc-vpc){display:none!important}
  html body main.app-main table:is(#_x,.gmc-stocklist) td.sc-sku{grid-area:s;color:#64748b;font-size:12px!important}
  html body main.app-main table:is(#_x,.gmc-stocklist) td.sc-wh{grid-area:w;color:#94a3b8;font-size:11px!important}
  html body main.app-main table:is(#_x,.gmc-stocklist) td.sc-val{grid-area:v;text-align:right!important;white-space:nowrap!important;font-weight:700;font-size:14px!important}
  html body main.app-main table:is(#_x,.gmc-stocklist) td.sc-val::after{content:" KM";font-size:11px;font-weight:600;color:#64748b}
  html body main.app-main table:is(#_x,.gmc-stocklist) td.sc-name{grid-area:n;font-size:14px!important;font-weight:600;white-space:normal!important;overflow-wrap:anywhere!important}
  html body main.app-main table:is(#_x,.gmc-stocklist) td.sc-name a{white-space:normal!important}
  html body main.app-main table:is(#_x,.gmc-stocklist) td.sc-qty{grid-area:q;font-weight:700;white-space:nowrap!important}
  html body main.app-main table:is(#_x,.gmc-stocklist) td.sc-nc{grid-area:c;color:#64748b;white-space:nowrap!important}
  html body main.app-main table:is(#_x,.gmc-stocklist) td.sc-nc::before{content:"NC "!important;display:inline!important;font-size:11px}
  html body main.app-main table:is(#_x,.gmc-stocklist) td.sc-mpc{grid-area:m;text-align:right!important;white-space:nowrap!important}
  html body main.app-main table:is(#_x,.gmc-stocklist) td.sc-mpc::before{content:"MPC "!important;display:inline!important;font-size:11px;color:#64748b}
  html body main.app-main .tablewrap:has(> table.gmc-stocklist){overflow:visible!important;border:0!important;padding:0!important;background:none!important}
  html body main.app-main section:has(table:is(#_x,.gmc-stocklist)){padding:8px 0 0!important;border:0!important;background:none!important;box-shadow:none!important}
  html body main.app-main section:has(table:is(#_x,.gmc-stocklist)) .section-head{padding:0 0 8px!important}
}

/* Mobitel: filteri u 2 kolone i male metrike (Stanje skladišta i slične stranice) */
@media screen and (max-width:760px){
  html body main.app-main section.formcard:has(> form.formgrid input[name=page][value=stock]){padding:10px!important}
  html body main.app-main form:is(#_x,.formgrid):has(input[name=page][value=stock]){display:grid!important;grid-template-columns:1fr 1fr!important;gap:8px!important}
  html body main.app-main form:is(#_x,.formgrid):has(input[name=page][value=stock])>label{margin:0!important;font-size:11px!important;min-width:0!important}
  html body main.app-main form:is(#_x,.formgrid):has(input[name=page][value=stock])>label:first-of-type{grid-column:1/-1!important}
  html body main.app-main form:is(#_x,.formgrid):has(input[name=page][value=stock])>label:is(#_y,label) :is(input,select){height:38px!important;min-height:38px!important;font-size:14px!important;margin-top:3px!important}
  html body main.app-main form:is(#_x,.formgrid):has(input[name=page][value=stock])>div{display:flex!important;gap:8px!important;align-items:end!important}
  html body main.app-main form:is(#_x,.formgrid):has(input[name=page][value=stock])>div>*{flex:1 1 0!important;height:38px!important;min-height:38px!important;display:inline-flex!important;align-items:center!important;justify-content:center!important;margin:0!important;padding:0 10px!important}
  html body main.app-main .metrics.compact{display:grid!important;grid-template-columns:repeat(3,minmax(0,1fr))!important;gap:6px!important;margin:8px 0!important}
  html body main.app-main .metrics.compact>:is(.card,.metric){padding:8px 10px!important;min-width:0!important;min-height:0!important;margin:0!important}
  html body main.app-main .metrics.compact>:is(.card,.metric) b,html body main.app-main .metrics.compact>:is(.card,.metric) strong{font-size:clamp(13px,4.2vw,18px)!important;white-space:nowrap!important;display:block!important;overflow:hidden!important;text-overflow:clip!important}
  html body main.app-main .metrics.compact>:is(.card,.metric) span,html body main.app-main .metrics.compact>:is(.card,.metric) small{font-size:10.5px!important;line-height:1.2!important;display:block!important}
}

/* Mobitel: kartica artikla (slike, cijene i stanje, dobavljači, barkodovi) */
html body main.app-main input:is(#_x,.smart-combo-input){padding-right:34px!important;text-overflow:ellipsis!important;white-space:nowrap!important;overflow:hidden!important}
@media screen and (max-width:760px){
  html body main.app-main nav:is(#_x,.mmc-entry-actions){display:grid!important;grid-template-columns:1fr 1fr!important;gap:6px!important;margin:0 0 10px!important}
  html body main.app-main nav:is(#_x,.mmc-entry-actions) .btn{display:flex!important;align-items:center!important;justify-content:center!important;width:100%!important;padding:6px 10px!important;min-height:32px!important;font-size:12.5px!important;white-space:nowrap!important}
  html body main.app-main #images form:is(#_x,#_y,.image-upload){display:grid!important;grid-template-columns:1fr!important;gap:8px!important;width:100%!important;min-width:0!important}
  html body main.app-main #images form:is(#_x,#_y,.image-upload) .dropzone{display:flex!important;flex-direction:column!important;align-items:flex-start!important;gap:6px!important;min-width:0!important;width:100%!important;padding:10px!important;box-sizing:border-box!important}
  html body main.app-main #images form:is(#_x,#_y,.image-upload) .dropzone input[type=file]{width:100%!important;max-width:100%!important;min-width:0!important}
  html body main.app-main #images form:is(#_x,#_y,.image-upload)>button{width:100%!important}
  html body main.app-main section#stock table.mobile-card-table tr.mobile-card-row{grid-template-columns:repeat(3,minmax(0,1fr))!important}
  html body main.app-main section#stock table.mobile-card-table tr.mobile-card-row>td:first-child{grid-column:1/-1!important}
  html body main.app-main section:is(#stock,#suppliers,#barcodes,#variants,#movements) table:not(:has(td)){display:none!important}
  html body main.app-main section:is(#suppliers,#barcodes,#variants) .mmc-hscroll:not(:has(td)){display:none!important}
  html body main.app-main section:is(#suppliers,#barcodes,#variants) form.inlineform{display:grid!important;grid-template-columns:1fr 1fr!important;gap:8px!important;width:100%!important;min-width:0!important}
  html body main.app-main section:is(#suppliers,#barcodes,#variants) form.inlineform>*{min-width:0!important;width:100%!important;max-width:100%!important;margin:0!important;flex:none!important}
  html body main.app-main section:is(#suppliers,#barcodes,#variants) form.inlineform>:is(select,.smart-combo){grid-column:1/-1!important}
  html body main.app-main section:is(#suppliers,#barcodes,#variants) form.inlineform>label.checks{display:flex!important;align-items:center!important;gap:6px!important}
  html body main.app-main section:is(#suppliers,#barcodes,#variants) form.inlineform>button{grid-column:auto!important}
  html body main.app-main section:is(#images,#stock,#suppliers,#barcodes,#variants,#movements){padding:12px!important}
  html body main.app-main section:is(#images,#stock,#suppliers,#barcodes,#variants,#movements) h2{font-size:18px!important;margin:0 0 6px!important}
  html body main.app-main section:is(#images,#suppliers) p.muted{font-size:12.5px!important;margin:0 0 8px!important}
}

/* Nadzorna ploča: kompaktno, da sve stane na jedan ekran monitora */
@media screen and (min-width:761px){
  html body main.app-main .exec-toolbar{margin-bottom:8px!important}
  html body main.app-main .exec-kpis{margin-bottom:10px!important;gap:10px!important}
  html body main.app-main .exec-kpis .exec-icon.red{background:#fde8e8;color:#b42318}
  html body main.app-main .exec-kpis>.exec-kpi{padding:9px 14px!important}
  html body main.app-main .dashboard-grid{gap:10px!important;margin-bottom:10px!important;align-items:stretch!important}
  html body main.app-main .dashboard-grid>.dash-panel{padding:10px 14px!important;margin:0!important}
  html body main.app-main .dashboard-grid>.dash-panel .section-head{padding:2px 4px 8px!important;margin:0 0 4px!important}
  html body main.app-main .dashboard-grid>.dash-panel .section-head h2{font-size:15px!important;margin:0!important}
  html body main.app-main .dashboard-grid>.dash-panel .section-head p{margin:0!important}
  html body main.app-main .dash-docs a{padding:6px 12px!important;min-height:0!important}
  html body main.app-main .dash-docs a small{line-height:1.25!important}
  html body main.app-main .attention-list{gap:6px!important}
  html body main.app-main .attention-list a{padding:7px 12px!important;min-height:0!important}
  html body main.app-main .dash-panel.mkr-exec,html body main.app-main .dash-panel.quick-panel{padding:8px 14px!important}
  html body main.app-main .dash-panel.mkr-exec .section-head,html body main.app-main .dash-panel.quick-panel .section-head{padding:2px 4px 6px!important}
  html body main.app-main .dash-panel.mkr-exec .section-head p,html body main.app-main .dash-panel.quick-panel .section-head p{display:none!important}
}

/* GMC: izvještaji (Izlaz → Izvještaji) – uredan A4 ispis za knjigovođu */
.or-print-sign{display:none}
@media print{
  html body main.app-main{width:100%!important;max-width:none!important;margin:0!important;padding:0!important}
  html body .or-document-head,html body section.rr-head.or-document-head{width:100%!important;margin:0 0 5mm!important;padding:0!important;border:0!important;box-shadow:none!important}
  html body .or-company-head{display:grid!important;grid-template-columns:1fr auto;align-items:end;border-bottom:1.5pt solid #1f2d3d!important;padding-bottom:3mm!important}
  html body .or-company-head>div>b{font-size:12.5pt!important}
  html body .or-company-head>div>span{font-size:8.5pt!important;color:#333!important}
  html body .or-company-head .or-title{grid-column:1/-1;text-align:center!important;margin-top:5mm}
  html body .or-title>span{font-size:8pt!important;letter-spacing:.12em;color:#555!important}
  html body .or-title h2{font-size:17pt!important;text-transform:uppercase;letter-spacing:.04em;margin-top:1mm!important}
  html body .or-print-meta{justify-content:center;gap:2mm 8mm!important;font-size:9.5pt!important;margin:4mm 0 1mm!important}
  html body .or-description{text-align:center;font-size:8.5pt!important;color:#555!important}
  html body .rr-result.or-document-result,html body .or-document-result>.tablewrap{width:100%!important;margin:0!important;padding:0!important}
  html body .or-document-result .or-table{width:100%!important;min-width:0!important;margin:0 auto!important;font-size:9.5pt!important}
  html body .or-document-result .or-table th{font-size:8.5pt!important;font-weight:700!important;background:#e9eef4!important;border-bottom:1.2pt solid #1f2d3d!important;-webkit-print-color-adjust:exact;print-color-adjust:exact}
  html body .or-document-result .or-table th,html body .or-document-result .or-table td{padding:1.6mm 1.8mm!important;line-height:1.3!important;border-color:#b9c3cf!important;vertical-align:middle!important}
  html body .or-document-result .or-table tbody tr:nth-child(even) td{background:#f6f8fa!important;-webkit-print-color-adjust:exact;print-color-adjust:exact}
  html body .or-document-result .or-table tfoot td{font-size:10pt!important;background:#e9eef4!important;border-top:1.5pt solid #1f2d3d!important;-webkit-print-color-adjust:exact;print-color-adjust:exact}
  html body .or-print-sign{display:grid!important;grid-template-columns:repeat(3,1fr);gap:4mm 10mm;margin-top:8mm;font-size:9pt;color:#222;break-inside:avoid}
  html body .or-print-sign>div:first-child{grid-column:1/-1;display:flex;justify-content:space-between;font-size:8.5pt;color:#444}
  html body .or-print-sign>div:not(:first-child){display:flex;flex-direction:column;gap:9mm;padding-top:4mm}
  html body .or-print-sign i{display:block;border-bottom:.8pt solid #333}
}

@media screen and (min-width:1100px){html body main.app-main .exec-kpis:has(.gmc-kpi-vat){grid-template-columns:repeat(5,minmax(0,1fr))!important}html body main.app-main .exec-kpis:has(.gmc-kpi-vat) .exec-kpi b{font-size:clamp(15px,1.35vw,22px)!important;white-space:nowrap}}
@media screen and (max-width:1099px){html body main.app-main .exec-kpis .gmc-kpi-vat{grid-column:1/-1}}
