
:root{--red:#ed1c24;--black:#0d0f11;--ink:#171a1d;--muted:#6b7278;--line:#d9dde1;--soft:#f4f5f6}
*{box-sizing:border-box}html,body{margin:0;min-height:100%}
body{font-family:"Segoe UI",Arial,sans-serif;color:var(--ink);background:#f2f3f4}.app-body{min-height:100vh;display:flex;flex-direction:column}
.hero{min-height:88px;background:#fff;display:grid;grid-template-columns:270px 1fr 310px;border-bottom:4px solid var(--red);box-shadow:0 1px 4px #0002}
.hero-brand{display:flex;align-items:center;background:#fff;padding:9px 26px}.hero-brand img{width:205px;display:block}
.hero-title{display:flex;flex-direction:column;align-items:center;justify-content:center;font-size:25px;font-weight:700;line-height:1.04;text-align:center}
.hero-title strong{font-size:29px;color:var(--red)}
.hero-actions{display:flex;align-items:center;justify-content:flex-end;gap:8px;padding:0 18px}
.hero-actions a,.hero-actions button{border:1px solid #cbd0d4;background:#fff;color:#222;text-decoration:none;border-radius:3px;padding:9px 10px;font-size:10px;font-weight:750;cursor:pointer}
.app-shell{width:100%;max-width:1600px;margin:0 auto;padding:13px 18px;flex:1}
.filter-card,.pressure-card,.white-card,.metrics-wrap{background:#fff;border:1px solid var(--line);border-radius:5px}
.filter-card{padding:14px 17px}.filter-grid{display:grid;grid-template-columns:repeat(6,minmax(145px,1fr));gap:11px 16px}
.field label{display:block;font-size:10.5px;font-weight:800;margin-bottom:5px}.field select{width:100%;height:38px;border:1px solid #cbd0d4;border-radius:3px;background:#fff;padding:0 9px;font-size:12px}
.field select:disabled{background:#f2f3f4;color:#444}.field small{display:block;min-height:14px;margin-top:3px;color:#666;font-size:9px}
.option-area{border-top:1px solid #e8eaec;margin-top:12px;padding-top:11px}.option-area-title{font-size:10px;font-weight:800;color:#777;margin-bottom:7px}
.option-grid{display:grid;grid-template-columns:repeat(6,minmax(120px,1fr));gap:8px}.option-card{border:1px solid #dde1e4;border-radius:4px;background:#fafbfb;padding:8px}
.option-label{font-size:10px;font-weight:800;margin-bottom:6px}.option-choices{display:flex;gap:5px;flex-wrap:wrap}
.option-chip{border:1px solid #cbd0d4;background:#fff;border-radius:3px;padding:5px 8px;display:flex;align-items:center;gap:5px;font-size:10.5px;cursor:pointer;min-height:30px}
.option-chip i{width:15px;height:15px;border:1.5px solid #b5bbc0;border-radius:2px;display:flex;align-items:center;justify-content:center;font-style:normal;font-size:10px}
.option-chip.selected{border-color:var(--red);background:#fff5f5;color:#a51015}.option-chip.selected i{border-color:var(--red);color:var(--red);font-weight:800}
.filter-status{text-align:right;margin-top:9px;font-size:10.5px;color:#666}
.config-summary{background:#fff;border:1px solid var(--line);border-left:4px solid var(--red);border-radius:5px;margin-top:10px;padding:11px 15px}
.config-summary-label{font-size:10px;font-weight:800;color:#666;margin-bottom:4px}.config-summary-text{font-size:16px;font-weight:800;line-height:1.35}
.important-note{background:#fff;border:2px solid var(--red);border-radius:5px;margin-top:10px;padding:12px 15px;color:var(--red)}
.important-note-title{font-size:11px;font-weight:850;margin-bottom:5px}.important-note-text{font-size:13px;font-weight:600;line-height:1.6;white-space:pre-line}
.metrics-wrap{margin-top:10px}.metrics{display:grid;grid-template-columns:repeat(3,1fr)}
.metric{display:grid;grid-template-columns:80px 1fr;align-items:center;min-height:112px;padding:12px 15px;border-right:1px solid var(--line)}.metric:last-child{border-right:0}
.mi{display:flex;align-items:center;justify-content:center;width:62px;height:62px;color:var(--red)}.mi img{width:62px;height:62px;object-fit:contain}
.svg-icon svg{width:60px;height:60px;fill:none;stroke:var(--red);stroke-width:3;stroke-linecap:round;stroke-linejoin:round}
.metric span{display:block;font-size:11px;font-weight:800}.metric b{display:block;color:var(--red);font-size:28px;margin-top:5px}.metric em{font-size:14px;font-style:normal;margin-left:4px}
.main-layout{display:grid;grid-template-columns:minmax(0,1.8fr) 300px 250px;gap:10px;margin-top:10px}.pressure-card,.white-card{min-height:390px}
.black-title{background:linear-gradient(#191c1e,#0e1012);color:#fff;padding:10px 14px;font-size:12px;font-weight:800}
.white-title{height:40px;display:flex;align-items:center;border-bottom:1px solid #e2e5e7;padding:0 14px;font-size:12px;font-weight:800}
.pressure-scroll{overflow:auto}.pressure-table{width:100%;min-width:820px;border-collapse:collapse;font-size:14px}
.pressure-table th,.pressure-table td{border-right:1px solid #e0e3e6;border-bottom:1px solid #e0e3e6;padding:9px 10px;text-align:center}
.pressure-table th{background:#f5f6f7;font-size:10.5px}.pressure-table th:first-child,.pressure-table td:first-child{text-align:left}.pressure-table td:first-child{font-weight:700}
.pressure-table td.note{color:var(--red);text-align:left;font-weight:600}.g0{background:#fff}.g1{background:#e1e5e8}.g0 td:first-child,.g1 td:first-child{border-left:4px solid var(--red)}
.info-body{padding:12px 14px}.kv{width:100%;border-collapse:collapse;font-size:11.5px}.kv td{padding:5px 0;border-bottom:1px solid #edf0f1;vertical-align:top}.kv td:first-child{font-weight:700;width:47%}.kv small{display:block;color:#777;margin-top:2px}
.check-list{display:grid;gap:9px}.check-row{display:grid;grid-template-columns:20px 1fr auto;align-items:center;gap:7px;font-size:11.5px}
.check-row i{width:17px;height:17px;border:1.5px solid #b6bcc1;border-radius:2px;display:flex;align-items:center;justify-content:center;font-style:normal}.check-row i.on{border-color:var(--red);color:var(--red);font-weight:800}.check-row b{font-size:10px}
.documents-wrap{margin-top:10px;min-height:auto}.documents{display:flex;gap:12px;flex-wrap:wrap;padding:12px 14px}
.doc{min-width:260px;border:1px solid var(--line);border-radius:3px;padding:8px 10px;display:flex;align-items:center;gap:10px;text-decoration:none;color:#222}
.doc>span{background:var(--red);color:#fff;border-radius:2px;padding:5px 6px;font-size:10px;font-weight:800}.doc div{font-size:10px}.doc b{display:block;font-size:11px;margin-top:2px}.doc i{margin-left:auto;font-style:normal;font-size:18px}
.empty{padding:20px;color:#777;font-size:12px}.edit-bar{text-align:right;margin:10px 0}.edit-bar a{display:inline-block;background:#111;color:#fff;text-decoration:none;padding:9px 13px;border-radius:3px;font-size:11px;font-weight:700}.hidden{display:none!important}
footer{margin-top:auto;min-height:36px;background:#111416;color:#fff;display:flex;align-items:center;justify-content:center;padding:7px 15px;font-size:9.5px}
.auth-body{min-height:100vh;display:grid;place-items:center;background:#f2f3f4}.auth-card{width:min(470px,92vw);background:#fff;border:1px solid #d8dde1;border-top:4px solid var(--red);padding:30px 34px;box-shadow:0 12px 30px #0002}
.auth-logo{display:block;width:205px;margin:0 auto 20px}.auth-title{text-align:center;display:flex;flex-direction:column;font-size:21px;font-weight:700;line-height:1.08}.auth-title strong{font-size:24px;color:var(--red)}
.auth-section-title{text-align:center;font-size:13px;font-weight:800;margin:22px 0 14px}.auth-card label{display:block;font-weight:700;font-size:12px;margin:13px 0 5px}.auth-card input{width:100%;padding:10px;border:1px solid #cbd0d4;border-radius:3px}
.primary{background:var(--red);color:#fff;border:0;border-radius:3px;padding:11px 14px;font-weight:800;cursor:pointer;width:100%;margin-top:17px}.link-button{text-decoration:none;display:block;text-align:center}.forgot-link{display:block;text-align:center;margin-top:14px;color:#555;font-size:11px;text-decoration:none}.forgot-link:hover{color:var(--red)}
.alert{padding:10px 12px;border-radius:3px;margin:10px 0;font-size:12px}.alert.error{background:#fff0f0;border:1px solid #e4b3b3;color:#8a2727}.alert.ok{background:#effaf2;border:1px solid #b9dfc2;color:#28673a}
/* admin/editor */
.simple-header{min-height:70px;background:#111416;border-bottom:4px solid var(--red);color:#fff;display:flex;align-items:center;gap:20px;padding:8px 23px}.simple-header img{width:130px;background:#fff}.simple-header h1{flex:1;margin:0;font-size:21px}.simple-header nav{display:flex;gap:10px;flex-wrap:wrap}.simple-header a{color:#fff;text-decoration:none;border:1px solid #6f757a;padding:7px 9px;font-size:10px}
.admin-shell,.edit-shell{max-width:1450px;margin:auto;padding:17px}.admin-card{background:#fff;border:1px solid var(--line);border-radius:4px;padding:15px;margin-bottom:13px}.admin-card h2{margin:0 0 12px;font-size:17px}
.db-card{display:flex;align-items:center;gap:20px}.db-card div{flex:1}.admin-form{display:grid;grid-template-columns:1.2fr 1.5fr 160px 1fr 110px;gap:9px;align-items:end}.admin-form input,.admin-form select,.edit-grid input,.edit-grid textarea{width:100%;padding:10px;border:1px solid #cbd0d4;border-radius:3px}.admin-form .primary{margin:0}
.table-scroll{overflow:auto}.admin-table,.edit-table{width:100%;border-collapse:collapse;font-size:11px}.admin-table th,.admin-table td,.edit-table th,.edit-table td{border:1px solid #dde1e4;padding:7px;vertical-align:top}.admin-table th,.edit-table th{background:#f4f5f6}.inline{display:inline-flex;gap:4px}.inline input{width:145px}
.upload-form{display:flex;gap:10px;align-items:center}.import-stats{display:grid;grid-template-columns:repeat(5,1fr);gap:9px;margin:13px 0}.import-stats>div{background:#f6f7f8;border-top:3px solid #888;padding:12px;text-align:center}.import-stats b{display:block;font-size:24px}.import-stats span{font-size:10px}.import-stats .good{border-color:#3aa75b}.import-stats .bad{border-color:var(--red)}.hint{font-size:10px;color:#777}.changed-list{padding:10px 12px;background:#f6f7f8;border:1px solid #dde1e4;margin:8px 0;font-size:12px;line-height:1.6}.backup-list{display:grid;gap:6px}.backup-row{display:flex;justify-content:space-between;align-items:center;border:1px solid #e0e3e5;padding:8px 10px}
.edit-summary{display:flex;justify-content:space-between;gap:15px;background:#111;color:#fff;padding:11px 14px;margin-bottom:12px}.edit-summary span{font-size:10px;color:#bbb}.edit-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:11px}.edit-grid label{font-size:11px;font-weight:700}.edit-grid input,.edit-grid textarea{display:block;margin-top:5px}.edit-grid .wide{grid-column:1/-1}.current-doc{display:block;color:#777;font-size:9px;margin:4px 0}.edit-table input,.edit-table textarea{width:100%;min-width:85px;border:1px solid #cdd2d6;padding:6px}.savebar{position:sticky;bottom:0;background:#fff;padding:9px;border-top:1px solid #ddd}.diag-ok{color:#22823a;font-weight:800}.diag-bad{color:var(--red);font-weight:800}

@media(max-width:1150px){
.hero{grid-template-columns:220px 1fr;min-height:78px}.hero-actions{grid-column:1/-1;justify-content:flex-end;min-height:42px;border-top:1px solid #eee}.hero-brand img{width:175px}.hero-title{font-size:21px}.hero-title strong{font-size:23px}
.filter-grid{grid-template-columns:repeat(3,1fr)}.option-grid{grid-template-columns:repeat(3,1fr)}.main-layout{grid-template-columns:1fr 1fr}.pressure-card{grid-column:1/-1}.admin-form{grid-template-columns:1fr 1fr}.edit-grid{grid-template-columns:1fr 1fr}}
@media(max-width:700px){
.hero{grid-template-columns:112px 1fr;min-height:66px}.hero-brand{padding:6px 8px}.hero-brand img{width:96px}.hero-title{font-size:14px;align-items:flex-start;text-align:left;padding:0 7px}.hero-title strong{font-size:16px}.hero-actions{overflow:auto;justify-content:flex-start;padding:6px 8px}.hero-actions a,.hero-actions button{padding:7px 8px;white-space:nowrap;font-size:9px}
.app-shell{padding:7px}.filter-grid{grid-template-columns:1fr 1fr;gap:8px}.option-grid{grid-template-columns:1fr 1fr}.metrics{grid-template-columns:1fr}.metric{border-right:0;border-bottom:1px solid var(--line);min-height:88px}.main-layout{grid-template-columns:1fr}.pressure-card,.white-card{min-height:auto}
.pressure-table{min-width:760px;font-size:12px}.pressure-table th:first-child,.pressure-table td:first-child{position:sticky;left:0;z-index:2;background:inherit;min-width:145px}.pressure-table th:first-child{background:#f5f6f7;z-index:3}
.auth-card{padding:25px 22px}.auth-title{font-size:17px}.auth-title strong{font-size:19px}.admin-form,.edit-grid{grid-template-columns:1fr}.db-card{display:block}.import-stats{grid-template-columns:1fr 1fr}.simple-header h1{font-size:15px}.simple-header nav{display:none}}
@page{size:A4 portrait;margin:6mm}
@media print{
  html,body{width:210mm;min-height:297mm;background:#fff!important}
  body{font-size:8pt;color:#111}
  .hero{min-height:18mm;display:grid;grid-template-columns:34mm 1fr;background:#fff;border-bottom:2px solid var(--red);box-shadow:none}
  .hero-brand{padding:0;align-items:center}.hero-brand img{width:31mm}
  .hero-title{font-size:10.5pt;line-height:1.05}.hero-title strong{font-size:12.5pt}
  .hero-actions,.filter-card,.edit-bar,footer,.documents-wrap{display:none!important}
  .app-shell{width:100%;max-width:none;padding:2mm 0;margin:0}
  .config-summary{margin:1.5mm 0;padding:1.6mm 2.4mm;border-left-width:2mm;break-inside:avoid}
  .config-summary-label{font-size:6.5pt}.config-summary-text{font-size:9.5pt;line-height:1.15}
  .important-note{margin:0 0 1.5mm;padding:1.6mm 2.4mm;break-inside:avoid}
  .important-note-title{font-size:6.5pt}.important-note-text{font-size:7.6pt;line-height:1.25}
  .metrics-wrap{margin:0 0 1.5mm;border-radius:0;break-inside:avoid}
  .metrics{grid-template-columns:repeat(3,1fr)}
  .metric{grid-template-columns:13mm 1fr;min-height:15mm;padding:1.3mm 1.5mm;border-right:1px solid #ddd}
  .mi{display:flex;width:11mm;height:11mm}.mi img{display:block;width:10.5mm;height:10.5mm;object-fit:contain}
  .metric span{font-size:6.6pt;line-height:1.1}.metric b{font-size:12pt;margin-top:.7mm}.metric em{font-size:7.5pt}
  .main-layout{display:block;margin-top:0}
  .pressure-card,.white-card{min-height:0;border-radius:0;break-inside:avoid}
  .pressure-card{margin-bottom:1.5mm}
  .black-title,.white-title{height:auto;padding:1.5mm 2mm;font-size:7.5pt}
  .pressure-scroll{overflow:visible}
  .pressure-table{min-width:0!important;width:100%;table-layout:fixed;font-size:6.7pt}
  .pressure-table th,.pressure-table td{padding:1mm .6mm;line-height:1.12;word-wrap:break-word}
  .pressure-table th{font-size:5.9pt}
  .pressure-table th:nth-child(1){width:24%}
  .pressure-table th:nth-child(2){width:11%}
  .pressure-table th:nth-child(3){width:15%}
  .pressure-table th:nth-child(4){width:10%}
  .pressure-table th:nth-child(5){width:15%}
  .pressure-table th:nth-child(6){width:25%}
  .pressure-table td:first-child,.pressure-table th:first-child{position:static!important;min-width:0!important}
  #basicInfo,#extrasInfo{display:inline-block;vertical-align:top;width:49%;margin:0;break-inside:avoid}
  #basicInfo{margin-right:1%}
  .info-body{padding:1.5mm 2mm}.kv{font-size:6.6pt}.kv td{padding:.7mm 0}
  .check-list{font-size:6.6pt;gap:1.2mm}.check-row{grid-template-columns:4mm 1fr auto;gap:1mm;font-size:6.6pt}.check-row i{width:3.5mm;height:3.5mm}.check-row b{font-size:6.2pt}
  a{color:#000!important;text-decoration:none!important}
}

/* TEST v1.2 – voden izbor */
.step-hidden{display:none!important}
.auto-step{opacity:.86}
.auto-step label:after{content:" · samodejno";font-weight:500;color:#8a8f94;font-size:9px}
.filter-footer{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-top:10px;border-top:1px solid #eceeef;padding-top:10px}
.filter-footer .filter-status{margin-top:0;margin-left:auto}
.reset-filters{border:1px solid #cbd0d4;background:#fff;color:#555;border-radius:3px;padding:7px 10px;font-size:9.5px;font-weight:750;cursor:pointer}
.reset-filters:hover{border-color:#ed1c24;color:#ed1c24}
.option-auto{background:#f5f6f7}
.option-auto .option-chip{cursor:default}
.option-auto .auto-label{display:block;color:#8a8f94;font-size:8.5px;margin-top:4px}
@media(max-width:700px){
  .filter-footer{align-items:flex-start;flex-direction:column}
  .filter-footer .filter-status{text-align:left;margin-left:0}
  .reset-filters{width:100%}
}

/* v1.3.2 – slovenski izbirnik datoteke */
.file-picker{display:flex;align-items:center;gap:9px;min-width:0}
.native-file-input{position:absolute!important;width:1px!important;height:1px!important;opacity:0!important;pointer-events:none!important}
.file-picker-btn{display:inline-flex;align-items:center;justify-content:center;min-height:36px;padding:8px 12px;border:1px solid #cbd0d4;border-radius:3px;background:#fff;color:#222;font-size:10.5px;font-weight:800;cursor:pointer;white-space:nowrap}
.file-picker-btn:hover{border-color:var(--red);color:var(--red)}
.file-picker-name{font-size:10.5px;color:#666;max-width:360px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
@media(max-width:700px){
  .upload-form{align-items:stretch;flex-direction:column}
  .file-picker{align-items:stretch;flex-direction:column}
  .file-picker-btn{width:100%}
  .file-picker-name{max-width:100%;white-space:normal}
}

/* v1.3.3 – bolj kompakten Excel upload */
.upload-form{display:grid!important;grid-template-columns:minmax(0,1fr) auto;gap:10px;align-items:center}
.upload-form .file-picker{min-width:0;width:100%;display:grid;grid-template-columns:auto minmax(180px,1fr);align-items:center}
.upload-form .file-picker-name{max-width:none;min-width:0;width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.upload-form .primary.small{width:auto!important;min-width:118px!important;max-width:135px;padding:9px 10px!important;margin:0!important;font-size:9.5px!important;white-space:nowrap}
@media(max-width:700px){
  .upload-form{grid-template-columns:1fr!important}
  .upload-form .file-picker{grid-template-columns:1fr}
  .upload-form .file-picker-name{white-space:normal}
  .upload-form .primary.small{width:100%!important;max-width:none!important}
}

/* Interna uporaba – PIŠEK - Vitli KRPAN d.o.o. */
.internal-use-notice{
  margin:14px auto 0;
  max-width:520px;
  padding:11px 13px;
  border-top:2px solid #ed1c24;
  background:#f6f6f6;
  color:#555;
  font-size:9.5px;
  line-height:1.45;
  text-align:left;
}
.internal-use-notice strong{display:block;color:#222;font-size:10px;letter-spacing:.5px;margin-bottom:5px}
.internal-use-notice p{margin:4px 0}
@media(max-width:700px){.internal-use-notice{margin-top:10px;font-size:9px}}
@media print{.internal-use-notice{display:none!important}}


/* =========================================================
   DEVELOPMENT v1.1 – SVETLI / TEMNI NAČIN
   ========================================================= */
.theme-toggle{
  position:fixed;top:12px;right:14px;z-index:10000;
  width:52px;height:28px;padding:2px 4px;
  display:flex;align-items:center;justify-content:space-between;
  border:1px solid #d5d8da;border-radius:18px;
  background:#fff;color:#202326;cursor:pointer;
  box-shadow:0 2px 8px rgba(0,0,0,.12);
  font-size:13px;line-height:1;
}
.theme-toggle .theme-sun,.theme-toggle .theme-moon{
  width:20px;height:20px;display:flex;align-items:center;justify-content:center;
  border-radius:50%;opacity:.38;transition:.18s ease;
}
.theme-toggle .theme-sun{opacity:1;background:#f0f1f2}
.theme-toggle.is-dark{background:#1d2023;border-color:#454b50;color:#f4f4f4}
.theme-toggle.is-dark .theme-sun{opacity:.35;background:transparent}
.theme-toggle.is-dark .theme-moon{opacity:1;background:#34393e}

html[data-theme="dark"]{color-scheme:dark}
html[data-theme="dark"] body{background:#111315;color:#e9e9e9}
html[data-theme="dark"] .topbar,
html[data-theme="dark"] .simple-header{background:#171a1d!important;border-color:#34383c!important;color:#f2f2f2}
html[data-theme="dark"] .topbar img,
html[data-theme="dark"] .simple-header img{background:#fff}
html[data-theme="dark"] a{color:#f1f1f1}
html[data-theme="dark"] .card,
html[data-theme="dark"] .admin-card,
html[data-theme="dark"] .login-card,
html[data-theme="dark"] .result-card,
html[data-theme="dark"] .edit-summary,
html[data-theme="dark"] .option-card,
html[data-theme="dark"] .pressure-card,
html[data-theme="dark"] .info-card,
html[data-theme="dark"] .doc-card,
html[data-theme="dark"] section{background:#1b1e21;color:#e9e9e9;border-color:#363b40}
html[data-theme="dark"] .option-auto{background:#202428}
html[data-theme="dark"] input,
html[data-theme="dark"] select,
html[data-theme="dark"] textarea{
  background:#24282c!important;color:#f1f1f1!important;border-color:#484e54!important;
}
html[data-theme="dark"] input::placeholder,
html[data-theme="dark"] textarea::placeholder{color:#969da3}
html[data-theme="dark"] label,
html[data-theme="dark"] .option-label,
html[data-theme="dark"] h1,
html[data-theme="dark"] h2,
html[data-theme="dark"] h3{color:#f1f1f1}
html[data-theme="dark"] small,
html[data-theme="dark"] .filter-status,
html[data-theme="dark"] .file-picker-name,
html[data-theme="dark"] .current-doc{color:#aeb4b9}
html[data-theme="dark"] table{color:#e9e9e9}
html[data-theme="dark"] th{background:#292d31!important;color:#f4f4f4;border-color:#41464b}
html[data-theme="dark"] td{background:#1d2023!important;color:#e9e9e9;border-color:#363b40}
html[data-theme="dark"] tr:nth-child(even) td{background:#202428!important}
html[data-theme="dark"] .option-chip,
html[data-theme="dark"] .reset-filters,
html[data-theme="dark"] .file-picker-btn{
  background:#24282c;color:#e9e9e9;border-color:#484e54
}
html[data-theme="dark"] .option-chip.selected{
  border-color:#ed1c24;color:#fff;background:#302326
}
html[data-theme="dark"] .internal-use-notice{background:#202326;color:#bfc4c8}
html[data-theme="dark"] .internal-use-notice strong{color:#fff}
html[data-theme="dark"] .alert.ok{background:#17251b;color:#bfe2c6}
html[data-theme="dark"] .alert.error{background:#321b1d;color:#ffc3c7}
html[data-theme="dark"] footer{background:#090a0b!important;color:#d6d6d6}

/* Tisk mora biti vedno svetel, ne glede na izbran način. */
@media print{
  .theme-toggle{display:none!important}
  html[data-theme="dark"]{color-scheme:light}
  html[data-theme="dark"] body{background:#fff!important;color:#000!important}
  html[data-theme="dark"] .card,
  html[data-theme="dark"] .admin-card,
  html[data-theme="dark"] .result-card,
  html[data-theme="dark"] .pressure-card,
  html[data-theme="dark"] .info-card,
  html[data-theme="dark"] section{background:#fff!important;color:#000!important;border-color:#ccc!important}
  html[data-theme="dark"] table,
  html[data-theme="dark"] th,
  html[data-theme="dark"] td{background:#fff!important;color:#000!important;border-color:#bbb!important}
  html[data-theme="dark"] h1,
  html[data-theme="dark"] h2,
  html[data-theme="dark"] h3,
  html[data-theme="dark"] label{color:#000!important}
}

/* DEVELOPMENT v1.1.1 – čitljivejši footer + avtor/verzija */
.app-footer{padding:14px 18px!important;text-align:center;line-height:1.45}
.app-footer .footer-main{font-size:12px!important;font-weight:750;letter-spacing:.15px;color:#fff}
.app-footer .footer-meta{margin-top:3px;font-size:11px!important;font-weight:500;color:#d2d2d2}
.login-app-meta{max-width:520px;margin:10px auto 0;text-align:center;font-size:10px;color:#777}
html[data-theme="dark"] .login-app-meta{color:#aeb4b9}
@media(max-width:700px){
 .app-footer{padding:12px 10px!important}
 .app-footer .footer-main{font-size:11px!important}
 .app-footer .footer-meta{font-size:10px!important}
}
@media print{.app-footer,.login-app-meta{display:none!important}}

/* DEVELOPMENT v1.1.2 – popravljen theme toggle */
html[data-theme="dark"] .hero,
html[data-theme="dark"] .filter-card,
html[data-theme="dark"] .config-summary,
html[data-theme="dark"] .important-note,
html[data-theme="dark"] .metrics-wrap,
html[data-theme="dark"] .pressure-card,
html[data-theme="dark"] .white-card,
html[data-theme="dark"] .documents-wrap,
html[data-theme="dark"] .auth-card,
html[data-theme="dark"] .admin-card{
  background:#1b1e21!important;
  color:#eceff1!important;
  border-color:#383d42!important;
}
html[data-theme="dark"] .hero-brand{background:#fff!important}
html[data-theme="dark"] .hero-title,
html[data-theme="dark"] .config-summary-text,
html[data-theme="dark"] .white-title,
html[data-theme="dark"] .black-title{color:#f2f2f2}
html[data-theme="dark"] .config-summary-label,
html[data-theme="dark"] .field small,
html[data-theme="dark"] .filter-status{color:#aeb4b9!important}
html[data-theme="dark"] .g0 td,
html[data-theme="dark"] .g1 td{background:#1f2327!important}
html[data-theme="dark"] .pressure-table th{background:#2a2f34!important}
html[data-theme="dark"] .kv td{border-color:#343a3f!important}
html[data-theme="dark"] .doc{background:#23272b!important;color:#eceff1!important;border-color:#444b51!important}
html[data-theme="dark"] .primary{background:#ed1c24!important;color:#fff!important}

.print-app-meta{display:none}

@media print{
  .app-footer{display:none!important}
  .print-app-meta{
    display:block!important;
    margin-top:3mm;
    padding-top:2mm;
    border-top:0.3mm solid #bbb;
    text-align:center;
    font-size:7pt;
    color:#555!important;
    background:#fff!important;
  }
  html[data-theme="dark"] .print-app-meta{color:#555!important}
}

/* DEVELOPMENT v1.1.3 – pravilna postavitev gumba teme */
.theme-toggle-inline{
  position:static!important;
  top:auto!important;
  right:auto!important;
  flex:0 0 auto;
  margin:0;
}
.hero-actions .theme-toggle-inline{
  width:56px;
  height:30px;
  margin-right:2px;
}
.simple-header .theme-toggle-inline{
  order:10;
  margin-left:auto;
  margin-right:8px;
  width:56px;
  height:30px;
}
.auth-theme-row{
  display:flex;
  justify-content:center;
  margin:10px 0 4px;
}
.auth-theme-row .theme-toggle-inline{
  width:58px;
  height:30px;
}
@media(max-width:700px){
  .hero-actions .theme-toggle-inline{
    width:54px;
    min-width:54px;
  }
  .simple-header .theme-toggle-inline{
    margin-left:0;
    margin-right:0;
  }
}

/* DEVELOPMENT v1.1.4 – robusten preklop teme */
html,body,.hero,.filter-card,.config-summary,.important-note,.metrics-wrap,.pressure-card,.white-card,.admin-card,.auth-card{
  transition:background-color .18s ease,color .18s ease,border-color .18s ease;
}
.theme-toggle{user-select:none;-webkit-user-select:none;touch-action:manipulation}
.theme-toggle:active{transform:scale(.96)}


/* DEVELOPMENT v1.1.5 – samo svetli način */
.theme-toggle,
.auth-theme-row{display:none!important}

html,
html[data-theme="dark"]{
  color-scheme:light!important;
}
html[data-theme="dark"] body,
body{
  background:#f2f3f4!important;
  color:#171a1d!important;
}

/* Footer v dveh ločenih vrsticah */
.app-footer{
  display:block!important;
  width:100%!important;
  padding:14px 18px!important;
  text-align:center!important;
}
.app-footer .footer-stack{
  display:flex!important;
  flex-direction:column!important;
  align-items:center!important;
  justify-content:center!important;
  width:100%!important;
  gap:4px!important;
}
.app-footer .footer-main,
.app-footer .footer-meta{
  display:block!important;
  width:100%!important;
  text-align:center!important;
  white-space:normal!important;
}
.app-footer .footer-main{
  font-size:12px!important;
  font-weight:750!important;
  color:#fff!important;
}
.app-footer .footer-meta{
  margin:0!important;
  padding:0!important;
  font-size:12px!important;
  font-weight:500!important;
  color:#d2d2d2!important;
}
@media(max-width:700px){
  .app-footer .footer-main{font-size:11px!important}
  .app-footer .footer-meta{font-size:10.5px!important}
}
@media print{
  .app-footer{display:none!important}
}

/* DEVELOPMENT v1.1.6 – leto izdelave + čas generiranja A4 */
@media print{
  .print-app-meta{
    display:block!important;
    margin-top:3mm!important;
    padding-top:2mm!important;
    border-top:.3mm solid #bbb!important;
    text-align:center!important;
    font-size:7.2pt!important;
    line-height:1.4!important;
    color:#555!important;
  }
  .print-app-meta .print-generated{
    margin-top:1mm!important;
    font-weight:600!important;
    color:#333!important;
  }
}

/* DEVELOPMENT v1.2 – nadzor aktivnosti */
.log-filters{display:grid;grid-template-columns:1fr 1fr 1.4fr auto auto;gap:10px;align-items:end}
.log-filters label{font-size:10px;font-weight:700}.log-filters input,.log-filters select{display:block;width:100%;margin-top:4px;padding:9px;border:1px solid #cbd0d4;border-radius:3px}
.secondary-button{display:inline-flex;align-items:center;justify-content:center;padding:9px 11px;border:1px solid #cbd0d4;border-radius:3px;text-decoration:none;color:#222;font-size:10px;font-weight:800}
.activity-stats{display:grid;grid-template-columns:repeat(4,1fr);gap:9px;margin-bottom:12px}.activity-stats div{background:#f5f6f7;border-top:3px solid #ed1c24;padding:11px;text-align:center}.activity-stats b{display:block;font-size:22px}.activity-stats span{font-size:9px;color:#666}
.admin-table td small{display:block;color:#777}.admin-table pre{white-space:pre-wrap;max-width:600px;font-size:9px}
@media(max-width:900px){.log-filters{grid-template-columns:1fr 1fr}.activity-stats{grid-template-columns:1fr 1fr}}
@media(max-width:600px){.log-filters{grid-template-columns:1fr}.activity-stats{grid-template-columns:1fr 1fr}}

/* DEVELOPMENT v1.3 – Predlogi in prijava napak */
.feedback-bar{display:flex;justify-content:flex-end;margin-top:10px}
.feedback-open-btn{
  border:1px solid #ed1c24;background:#fff;color:#b41218;
  padding:9px 13px;border-radius:3px;font-size:10.5px;font-weight:800;cursor:pointer
}
.feedback-open-btn:hover{background:#fff4f4}

.feedback-modal{
  position:fixed;inset:0;z-index:30000;background:rgba(0,0,0,.48);
  display:flex;align-items:center;justify-content:center;padding:18px
}
.feedback-dialog{
  width:min(560px,96vw);background:#fff;border-radius:6px;border-top:4px solid #ed1c24;
  box-shadow:0 24px 60px rgba(0,0,0,.28);padding:22px 24px;position:relative
}
.feedback-close{
  position:absolute;right:12px;top:9px;border:0;background:transparent;
  font-size:25px;line-height:1;color:#777;cursor:pointer
}
.feedback-dialog h2{margin:0 32px 15px 0;font-size:18px}
.feedback-dialog label{display:block;font-size:11px;font-weight:800;margin-top:12px}
.feedback-dialog select,.feedback-dialog textarea{
  width:100%;margin-top:5px;padding:10px;border:1px solid #cbd0d4;border-radius:3px;font:inherit
}
.feedback-config{background:#f4f5f6;border-left:3px solid #ed1c24;padding:9px 11px;margin-bottom:10px}
.feedback-config span{display:block;font-size:9px;color:#777}.feedback-config b{font-size:11px}
.feedback-actions{display:flex;justify-content:flex-end;gap:8px;margin-top:14px}
.feedback-result{min-height:18px;margin-top:9px;font-size:10.5px}
.feedback-result.success{color:#26723a}.feedback-result.error{color:#b3151b}

.feedback-admin-card{border-left:4px solid #aeb4b9}
.feedback-admin-card.status-novo{border-left-color:#ed1c24}
.feedback-admin-card.status-v-obravnavi{border-left-color:#d79a13}
.feedback-admin-card.status-rešeno{border-left-color:#2d9950}
.feedback-admin-head{display:flex;justify-content:space-between;align-items:center;gap:12px;border-bottom:1px solid #e3e6e8;padding-bottom:9px;margin-bottom:10px}
.feedback-badge{display:inline-block;padding:4px 7px;border-radius:12px;background:#eceff1;font-size:9px;font-weight:800;margin-right:7px}
.feedback-badge.type-napaka{background:#ffe8e9;color:#9e1117}
.feedback-badge.type-predlog{background:#e8f2ff;color:#205d9b}
.feedback-badge.type-opomba{background:#f0f0f0;color:#555}
.feedback-status{font-size:10px;font-weight:800}
.feedback-admin-grid{display:grid;grid-template-columns:1.5fr 1.2fr .8fr;gap:15px}
.feedback-admin-grid small,.feedback-message small{display:block;color:#777;font-size:9px;margin-bottom:3px}
.feedback-admin-grid b{font-size:11px}.feedback-admin-grid div{font-size:10px}
.feedback-message{background:#f7f8f8;border:1px solid #e4e7e9;padding:10px 12px;margin:12px 0}
.feedback-message p{margin:4px 0 0;font-size:12px;line-height:1.5}
.feedback-admin-actions{display:grid;grid-template-columns:auto 1fr;gap:12px;align-items:end}
.feedback-update-form{display:grid;grid-template-columns:180px 1fr auto;gap:9px;align-items:end}
.feedback-update-form label{font-size:9px;font-weight:700}.feedback-update-form select,.feedback-update-form textarea{display:block;width:100%;margin-top:4px;border:1px solid #cbd0d4;border-radius:3px;padding:7px}
.feedback-resolved{margin-top:9px;color:#777;font-size:9px}
@media(max-width:800px){
  .feedback-admin-grid{grid-template-columns:1fr}
  .feedback-admin-actions{grid-template-columns:1fr}
  .feedback-update-form{grid-template-columns:1fr}
  .feedback-actions{flex-direction:column}
  .feedback-actions button{width:100%}
}
@media print{
  .feedback-bar,.feedback-modal{display:none!important}
}

/* DEVELOPMENT v1.4 – SI / EN / DE */
.lang-switch{display:inline-flex;align-items:center;gap:2px;border:1px solid #cbd0d4;border-radius:3px;background:#fff;padding:2px;margin-right:4px}
.lang-switch button{border:0;background:transparent;color:#555;padding:5px 7px;font-size:9px;font-weight:800;cursor:pointer;border-radius:2px}
.lang-switch button.active{background:#ed1c24;color:#fff}
.lang-switch button:hover:not(.active){background:#f0f1f2;color:#111}
.auth-card>.lang-switch{position:absolute;right:12px;top:12px}
.auth-card{position:relative}
.lang-switch.floating{position:fixed;right:12px;top:12px;z-index:20000}
@media(max-width:700px){
 .hero-actions .lang-switch{min-width:auto;flex:0 0 auto}
 .lang-switch button{padding:5px 6px}
}
@media print{.lang-switch{display:none!important}}

/* v1.4.4 multilingual fixes */
.footer-meta span{font-weight:600}
.feedback-open-btn:disabled{opacity:1;cursor:pointer}
.lang-switch{z-index:20}
@media print{.lang-switch,.feedback-bar,.feedback-modal{display:none!important}}

/* v1.4.4 language-specific pseudo text */
html[lang="en"] .auto-step label:after{content:" · automatic"!important}
html[lang="de"] .auto-step label:after{content:" · automatisch"!important}
html[lang="sl"] .auto-step label:after{content:" · samodejno"!important}

/* DEVELOPMENT v1.5 – servisni zapisnik + zgodovina sprememb */
.service-open-btn{
  border:1px solid #333;background:#222;color:#fff;
  padding:9px 13px;border-radius:3px;font-size:10.5px;font-weight:800;cursor:pointer
}
.service-open-btn:hover{background:#000}
.service-dialog{max-height:92vh;overflow:auto}
.change-reason-card textarea{width:100%;padding:10px;border:1px solid #cbd0d4;border-radius:3px;font:inherit}
.change-reason-card p{font-size:10px;color:#666;line-height:1.5}
.service-record-card,.change-history-card{border-left:4px solid #222}
.service-block{background:#f7f8f8;border:1px solid #e3e6e8;padding:10px 12px;margin:10px 0}
.service-block small,.change-reason small{display:block;color:#777;font-size:9px;margin-bottom:4px}
.service-block p,.change-reason p{margin:0;font-size:11px;line-height:1.5}
.change-meta{font-size:10px;color:#555;margin-bottom:10px}
.change-reason{background:#fff7e9;border-left:3px solid #d79a13;padding:10px 12px;margin:10px 0}
@media print{#serviceLogBar,#serviceLogModal{display:none!important}}

/* DEVELOPMENT v1.5.1 – A4 PDF / tisk */
.service-record-actions{display:flex;gap:8px;flex-wrap:wrap;margin-top:10px}
@media(max-width:700px){.service-record-actions{flex-direction:column}.service-record-actions a{width:100%}}


/* ==========================================================
   KRPAN MACHINE PORTAL v1.6.0
   ========================================================== */
.portal-body{
  margin:0;
  min-height:100vh;
  display:flex;
  flex-direction:column;
  background:#f4f5f6;
  color:#111;
  font-family:Arial,Helvetica,sans-serif;
}
.portal-header{
  min-height:82px;
  background:#151719;
  border-bottom:4px solid #ed1c24;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:24px;
  padding:10px 32px;
  box-sizing:border-box;
}
.portal-brand{
  display:flex;
  align-items:center;
  gap:24px;
  min-width:0;
}
.portal-brand img{
  width:210px;
  max-height:58px;
  object-fit:contain;
  background:#fff;
}
.portal-brand-title{
  color:#fff;
  display:flex;
  flex-direction:column;
  line-height:1.05;
  white-space:nowrap;
}
.portal-brand-title strong{
  font-size:17px;
  letter-spacing:.3px;
}
.portal-brand-title span{
  font-size:13px;
  margin-top:4px;
  color:#ddd;
  font-weight:700;
}
.portal-actions{
  display:flex;
  align-items:center;
  justify-content:flex-end;
  gap:8px;
}
.portal-actions>a,
.portal-actions>button{
  border:1px solid #444;
  background:#202326;
  color:#fff;
  text-decoration:none;
  padding:8px 11px;
  border-radius:3px;
  font-size:10px;
  font-weight:800;
}
.portal-actions>a:hover{border-color:#ed1c24}
.portal-user{
  color:#ddd;
  font-size:10px;
  padding:0 7px;
  max-width:220px;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
}

.portal-shell{
  width:min(1480px,calc(100% - 48px));
  margin:0 auto;
  flex:1;
  padding:28px 0 34px;
}
.portal-intro{
  margin-bottom:20px;
}
.portal-intro h1{
  margin:0 0 5px;
  font-size:24px;
  line-height:1;
  letter-spacing:.4px;
}
.portal-intro p{
  margin:0;
  color:#666;
  font-size:12px;
}
.machine-grid{
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:22px;
  align-items:stretch;
}
.machine-card{
  position:relative;
  min-height:350px;
  background:#fff;
  border:1px solid #d5d8da;
  border-radius:10px;
  box-shadow:0 2px 8px rgba(0,0,0,.06);
  overflow:hidden;
  text-decoration:none;
  color:#111;
  display:flex;
  flex-direction:column;
  transition:transform .15s ease,box-shadow .15s ease,border-color .15s ease;
}
.machine-card.active{
  border-color:#ed1c24;
}
.machine-card.active:hover{
  transform:translateY(-2px);
  box-shadow:0 8px 24px rgba(0,0,0,.12);
}
.machine-image{
  height:235px;
  padding:15px 18px 4px;
  display:flex;
  align-items:center;
  justify-content:center;
  box-sizing:border-box;
}
.machine-image img{
  display:block;
  max-width:100%;
  max-height:100%;
  object-fit:contain;
}
.machine-card-body{
  padding:10px 22px 17px;
  text-align:center;
  display:flex;
  flex:1;
  flex-direction:column;
}
.machine-card h2{
  margin:0;
  font-size:16px;
  line-height:1.15;
}
.machine-card p{
  margin:7px 0 14px;
  color:#666;
  font-size:11px;
  line-height:1.35;
}
.machine-open{
  display:flex;
  align-items:center;
  justify-content:center;
  gap:10px;
  margin-top:auto;
  padding:10px 14px;
  background:#ed1c24;
  color:#fff;
  border-radius:4px;
  font-size:11px;
  font-weight:900;
}
.machine-open b{font-size:16px;line-height:1}
.machine-card.disabled{
  cursor:not-allowed;
  background:#f8f8f8;
}
.machine-card.disabled .machine-image,
.machine-card.disabled .machine-card-body{
  opacity:.55;
  filter:grayscale(15%);
}
.machine-card.disabled h2{color:#555}
.machine-coming{
  position:absolute;
  top:12px;
  right:12px;
  z-index:2;
  padding:6px 9px;
  border-radius:4px;
  background:#e4e5e6;
  color:#444;
  font-size:9px;
  font-weight:900;
  letter-spacing:.2px;
}
.portal-footer{
  min-height:48px;
  background:#151719;
  color:#ddd;
  display:grid;
  grid-template-columns:1fr 1fr 1fr;
  align-items:center;
  padding:0 32px;
  font-size:9px;
}
.portal-footer>div:nth-child(2){text-align:center}
.portal-footer>div:last-child{
  text-align:right;
  color:#79bfff;
  font-weight:800;
}

.portal-login-title span{font-size:12px}
.portal-login-title strong{font-size:19px}

@media(max-width:1050px){
  .machine-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
  .portal-brand img{width:165px}
  .portal-brand-title strong{font-size:14px}
}
@media(max-width:720px){
  .portal-header{
    padding:10px 14px;
    align-items:flex-start;
    flex-direction:column;
  }
  .portal-brand{gap:12px;width:100%}
  .portal-brand img{width:135px}
  .portal-brand-title{white-space:normal}
  .portal-actions{width:100%;justify-content:flex-start;flex-wrap:wrap}
  .portal-shell{width:calc(100% - 24px);padding-top:20px}
  .machine-grid{grid-template-columns:1fr;gap:14px}
  .machine-card{min-height:315px}
  .machine-image{height:210px}
  .portal-footer{grid-template-columns:1fr;text-align:center!important;gap:5px;padding:10px}
  .portal-footer>div,.portal-footer>div:nth-child(2),.portal-footer>div:last-child{text-align:center}
}
@media print{
  .portal-header,.portal-footer{display:none!important}
}


/* ==========================================================
   KRPAN PORTAL v1.6.1 – UI UNIFICATION
   ========================================================== */

/* LOGIN: both lines same visual weight/size; first one black */
.portal-login-title{
  text-align:center;
}
.portal-login-title span,
.portal-login-title strong{
  display:block;
  font-size:19px !important;
  line-height:1.12;
  letter-spacing:.2px;
}
.portal-login-title span{
  color:#111 !important;
  font-weight:800;
  margin-bottom:2px;
}
.portal-login-title strong{
  color:#ed1c24 !important;
  font-weight:900;
}

/* MACHINE PORTAL: use the same overall header/footer language as dashboard */
.portal-topbar{
  min-height:72px;
}
.portal-topbar .brand{
  display:flex;
  align-items:center;
  gap:18px;
}
.portal-topbar .brand img{
  width:180px;
  max-height:55px;
  object-fit:contain;
}
.portal-topbar .brand-title{
  display:flex;
  flex-direction:column;
  line-height:1.05;
}
.portal-topbar .brand-title span{
  font-size:11px;
  font-weight:700;
  color:#444;
}
.portal-topbar .brand-title strong{
  font-size:18px;
  font-weight:900;
  color:#111;
  margin-top:3px;
}
.portal-top-actions{
  display:flex;
  align-items:center;
  gap:7px;
}
.portal-top-actions .portal-user{
  font-size:10px;
  color:#555;
  padding:0 6px;
}
.portal-app-footer{
  margin-top:auto;
}

/* More readable portal introductory copy */
.portal-intro h1{
  font-size:26px;
}
.portal-intro p{
  font-size:14px;
  line-height:1.4;
  color:#555;
}

/* More readable descriptions on all machine cards */
.machine-card p{
  font-size:13px;
  line-height:1.4;
  color:#555;
  margin-top:8px;
}
.machine-card h2{
  font-size:17px;
}
.machine-coming{
  font-size:10px;
}

/* Reduce legacy portal header/footer influence */
.portal-header,
.portal-footer{
  display:none !important;
}

@media(max-width:720px){
  .portal-login-title span,
  .portal-login-title strong{
    font-size:16px !important;
  }
  .portal-topbar{
    min-height:auto;
  }
  .portal-topbar .brand img{
    width:135px;
  }
  .portal-topbar .brand-title strong{
    font-size:15px;
  }
  .portal-intro p{
    font-size:13px;
  }
}


/* v1.6.2: portal header intentionally uses EXACT dashboard hero typography/layout.
   No portal-specific font sizes for hero-brand / hero-title / hero-actions. */
.portal-body > .hero{
  flex:0 0 auto;
}


/* v1.6.6 – portal footer must be identical to dashboard footer.
   Exact dashboard HTML/classes are used; no portal-specific font override. */
.portal-body > .app-footer{
  flex:0 0 auto;
}
