/* Krój Inter (OFL) dołączony lokalnie – identyczny wygląd na macOS i Windows, bez zależności od Google Fonts. */
@font-face { font-family: 'Inter PM'; font-style: normal; font-display: swap; font-weight: 100 900; src: url(fonts/inter-latin-ext-wght-normal.woff2) format('woff2'); unicode-range: U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF; }
@font-face { font-family: 'Inter PM'; font-style: normal; font-display: swap; font-weight: 100 900; src: url(fonts/inter-latin-wght-normal.woff2) format('woff2'); unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD; }
/* =====================================================================
   PROCAL – design system (tokeny + komponenty)
   Wszystkie kolory, odstępy i promienie pochodzą z tokenów poniżej.
   Opis komponentów: docs/design-system.md, podgląd: /styleguide.html
   ===================================================================== */
:root {
  /* marka */
  --brand-900: #0f1b2e; --brand-800: #16253d; --brand-700: #22385a; --brand-600: #2e4a72;
  --primary: #2563eb; --primary-600: #1d4fd8; --primary-50: #eef4ff; --primary-100: #dbe7ff;
  /* neutralne */
  --bg: #f4f6fa; --surface: #ffffff; --surface-2: #f8fafd; --border: #e2e8f0; --border-strong: #cdd6e3;
  --text: #15233a; --text-2: #4b5a70; --text-3: #7a889c; --text-inverse: #ffffff;
  /* semantyka statusów (tło / tekst / obramowanie) */
  --ok-bg: #e8f7ef; --ok-fg: #12764f; --ok-bd: #bfe6d1;
  --warn-bg: #fff5e0; --warn-fg: #9a5b06; --warn-bd: #f2d7a3;
  --crit-bg: #feeef0; --crit-fg: #b4283a; --crit-bd: #f6c6cd;
  --info-bg: #edf4ff; --info-fg: #2b5394; --info-bd: #d2e1fb;
  --wait-bg: #f1f4f8; --wait-fg: #4b5a70; --wait-bd: #dce3ec;
  --accent-violet: #7c4dd6;
  /* wykresy */
  --chart-1: #2563eb; --chart-2: #7cb1ff; --chart-g: #e19a2c; --chart-limit: #d94c59; --chart-grid: #edf1f6; --chart-axis: #8593a6; --chart-ok: #3aa676;
  /* typografia */
  --font: "Inter PM", Inter, -apple-system, BlinkMacSystemFont, "Segoe UI Variable Text", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, "Cascadia Mono", Consolas, monospace;
  --fs-xs: 11px; --fs-sm: 12px; --fs-md: 13px; --fs-lg: 16px; --fs-xl: 20px; --fs-2xl: 26px; --fs-3xl: 40px;
  /* odstępy (siatka 4 px) */
  --s1: 4px; --s2: 8px; --s3: 12px; --s4: 16px; --s5: 20px; --s6: 24px; --s8: 32px;
  /* kształt */
  --r-sm: 7px; --r-md: 10px; --r-lg: 14px; --r-pill: 999px;
  --shadow-1: 0 1px 2px #1c36500d, 0 2px 8px #1c365008; --shadow-3: 0 24px 70px #0b17293d;
  --sidebar-w: 248px;
}
* { box-sizing: border-box }
body { margin: 0; background: var(--bg); font-family: var(--font); color: var(--text); font-size: var(--fs-md); -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; font-feature-settings: 'cv11', 'tnum' 0; font-synthesis: none }
button, input, select, textarea { font: inherit; color: inherit }
button { cursor: pointer }
:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px }

/* ---------- układ ---------- */
aside { position: fixed; inset: 0 auto 0 0; width: var(--sidebar-w); background: var(--brand-900); color: #dce7f8; padding: var(--s6) var(--s3); display: flex; flex-direction: column; z-index: 3; overflow-y: auto }
.brand { font-size: 23px; font-weight: 850; letter-spacing: 1px; padding: 0 var(--s3) var(--s1); color: #fff; display: flex; align-items: center; gap: 10px }
.brand i { display: inline-block; width: 11px; height: 11px; background: #4c93ff; border-radius: 3px; transform: rotate(45deg) }
.tagline { font-size: 10px; letter-spacing: 1.5px; color: #8298b9; padding: 0 var(--s3) var(--s6) }
.menu-label { font-size: 10px; color: #758aa9; font-weight: 800; letter-spacing: 1.7px; margin: var(--s4) var(--s3) var(--s2) }
.nav { border: 0; background: none; color: #afbed5; text-align: left; width: 100%; padding: 11px 12px; border-radius: var(--r-md); display: flex; gap: 12px; align-items: center; font-size: var(--fs-md); font-weight: 600 }
.nav:hover { background: var(--brand-700); color: #fff }
.nav.active { background: var(--brand-700); color: #fff; box-shadow: inset 3px 0 #6ba3ff }
.nav .ico { font-size: 16px; width: 20px; text-align: center }
.navcount { margin-left: auto; background: #314661; color: #bed0e8; border-radius: 8px; padding: 2px 7px; font-size: 10px }
.navcount.hot { background: #8a2a38; color: #ffdfe3 }
.navcount:empty { display: none }
.aside-bottom { margin-top: auto; padding: var(--s4) var(--s3) 0; border-top: 1px solid #2b3c56; font-size: var(--fs-xs); color: #8298b9; line-height: 1.8 }
main { margin-left: var(--sidebar-w); min-height: 100vh }
.topbar { min-height: 64px; background: var(--surface); border-bottom: 1px solid var(--border); display: flex; align-items: center; justify-content: space-between; gap: var(--s4); padding: var(--s2) var(--s8); position: sticky; top: 0; z-index: 2; flex-wrap: wrap }
.crumb { font-size: var(--fs-sm); color: var(--text-3) }
.crumb strong { color: var(--text) }
.topctl { display: flex; gap: var(--s3); align-items: center; flex-wrap: wrap; font-size: var(--fs-sm); color: var(--text-2) }
.topctl label { display: flex; gap: var(--s2); align-items: center }
.mode { font-size: 10px; font-weight: 800; letter-spacing: .6px; padding: 5px 9px; border-radius: var(--r-pill) }
.mode.server { background: var(--ok-bg); color: var(--ok-fg) } .mode.local { background: var(--warn-bg); color: var(--warn-fg) }
.asof-hist { background: var(--warn-bg); color: var(--warn-fg); font-size: var(--fs-xs); font-weight: 700; padding: 6px 10px; border-radius: var(--r-sm) }
.content { padding: var(--s8) 35px; max-width: 1540px; margin: auto }
.head { display: flex; justify-content: space-between; align-items: flex-start; gap: var(--s4); margin-bottom: var(--s6); flex-wrap: wrap }
.eyebrow { font-size: var(--fs-xs); text-transform: uppercase; letter-spacing: 1.5px; font-weight: 800; color: var(--primary) }
h1 { font-size: var(--fs-2xl); letter-spacing: -.6px; margin: 6px 0 }
h2 { font-size: var(--fs-lg); margin: 0 0 var(--s4) }
h3 { font-size: var(--fs-md); margin: 0 0 var(--s3) }
.sub { color: var(--text-3); font-size: var(--fs-md); line-height: 1.6 }
.section { display: none } .section.active { display: block }
.row { display: flex; gap: var(--s3); flex-wrap: wrap; align-items: center }
.grid { display: grid; gap: var(--s4) }
.kpis { grid-template-columns: repeat(4, minmax(0, 1fr)); margin-bottom: var(--s5) }
.split { grid-template-columns: 1.6fr 1fr } .two { grid-template-columns: 1fr 1fr }
.fields { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--s3) }

/* ---------- komponenty ---------- */
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg); padding: var(--s5); box-shadow: var(--shadow-1) }
.mt { margin-top: var(--s5) }
.btn { border: 1px solid var(--border-strong); border-radius: var(--r-md); background: var(--surface); padding: 9px 14px; color: #33435c; font-size: var(--fs-sm); font-weight: 700; display: inline-flex; gap: 6px; align-items: center; white-space: nowrap }
.btn:hover { background: var(--surface-2) }
.btn.primary { background: var(--primary); color: #fff; border-color: var(--primary) } .btn.primary:hover { background: var(--primary-600) }
.btn.danger { background: var(--crit-bg); color: var(--crit-fg); border-color: var(--crit-bd) }
.btn.ghost { border-color: transparent; background: none; color: var(--primary) }
.btn.sm { padding: 6px 10px; font-size: var(--fs-xs) }
.btn:disabled { opacity: .45; cursor: not-allowed }
select.btn { padding-right: 8px }
.pill { font-size: 10px; font-weight: 800; letter-spacing: .3px; padding: 5px 9px; border-radius: var(--r-pill); display: inline-block; white-space: nowrap; border: 1px solid transparent }
.pill.tone-ok { background: var(--ok-bg); color: var(--ok-fg); border-color: var(--ok-bd) }
.pill.tone-warn { background: var(--warn-bg); color: var(--warn-fg); border-color: var(--warn-bd) }
.pill.tone-crit { background: var(--crit-bg); color: var(--crit-fg); border-color: var(--crit-bd) }
.pill.tone-info { background: var(--info-bg); color: var(--info-fg); border-color: var(--info-bd) }
.pill.tone-wait { background: var(--wait-bg); color: var(--wait-fg); border-color: var(--wait-bd) }
.kpi-label { color: var(--text-3); font-size: var(--fs-xs); font-weight: 700 }
.kpi-num { font-size: 28px; font-weight: 850; letter-spacing: -1px; margin: 8px 0 4px }
.kpi-foot { font-size: var(--fs-xs); color: var(--text-3); line-height: 1.5 }
.value { font-weight: 800; font-size: var(--fs-xl); margin: 7px 0 }
.t-ok { color: var(--ok-fg) } .t-warn { color: var(--warn-fg) } .t-crit { color: var(--crit-fg) } .t-info { color: var(--primary) } .muted { color: var(--text-3) } .small { font-size: var(--fs-xs) }
table { width: 100%; border-collapse: collapse; font-size: var(--fs-sm) }
th { text-align: left; color: var(--text-3); font-size: 10px; text-transform: uppercase; letter-spacing: .6px; background: var(--surface-2); font-weight: 700 }
td, th { padding: 11px 12px; border-bottom: 1px solid #edf1f6; vertical-align: middle }
td { font-weight: 550 } tr:last-child td { border-bottom: 0 }
tr.clickable:hover td, td.clickable:hover { background: #f5f9ff; cursor: pointer }
tr.selected td { background: var(--primary-50) }
.num { font-variant-numeric: tabular-nums }
.table-wrap { overflow-x: auto }
.msgs { display: flex; flex-direction: column; gap: var(--s2); margin: var(--s4) 0 }
.msg { display: flex; gap: 10px; align-items: flex-start; border-radius: var(--r-md); padding: 10px 14px; font-size: var(--fs-sm); line-height: 1.55; border: 1px solid var(--border); background: var(--surface) }
.msg code { font-family: var(--mono); font-weight: 800; font-size: 10.5px; letter-spacing: .2px; white-space: nowrap; padding-top: 1px }
.msg.blok { background: var(--crit-bg); border-color: var(--crit-bd); color: var(--crit-fg) }
.msg.wstrz { background: var(--wait-bg); border-color: var(--wait-bd); color: var(--wait-fg) }
.msg.ostrz { background: var(--warn-bg); border-color: var(--warn-bd); color: var(--warn-fg) }
.msg.info { background: var(--info-bg); border-color: var(--info-bd); color: var(--info-fg) }
.msg.ok { background: var(--ok-bg); border-color: var(--ok-bd); color: var(--ok-fg) }
.info { background: var(--info-bg); padding: 13px 14px; border-radius: var(--r-md); color: var(--info-fg); font-size: var(--fs-sm); line-height: 1.6 }
.notice { background: var(--warn-bg); border: 1px solid var(--warn-bd); color: var(--warn-fg); padding: 13px 14px; border-radius: var(--r-md); font-size: var(--fs-sm); line-height: 1.6 }
.empty { padding: 28px; text-align: center; color: var(--text-3) }
.recommend { border-radius: var(--r-lg); background: linear-gradient(115deg, #173258, #1e4b85); color: #fff; padding: 26px 30px; display: flex; align-items: center; justify-content: space-between; gap: var(--s6); margin: var(--s4) 0 var(--s5); flex-wrap: wrap }
.recommend .big { font-size: var(--fs-3xl); font-weight: 850; letter-spacing: -1.5px }
.recommend .label { font-size: var(--fs-xs); color: #adc7ec; text-transform: uppercase; letter-spacing: 1.5px }
.recommend p { font-size: var(--fs-sm); color: #d8e5f6; margin: 6px 0 0; max-width: 720px; line-height: 1.5 }
.recommend .btn { background: #fff; color: #17437e; border-color: #fff }
.recommend.blocked { background: linear-gradient(115deg, #6f2f3d, #9b4552) }
.recommend.cond { background: linear-gradient(115deg, #6b4a12, #a06a14) }
.recommend.wait { background: linear-gradient(115deg, #4a5568, #64748b) }
.recommend.ok { background: linear-gradient(115deg, #10543c, #18805a) }
.instrument { display: flex; align-items: center; justify-content: space-between; gap: var(--s3); margin-bottom: var(--s5) }
.mini { font-size: 10px; letter-spacing: 1px; color: var(--text-3); font-weight: 700 }
.methods tr.decisive td { background: var(--primary-50); font-weight: 800 }
.formula { font-family: var(--mono); font-size: var(--fs-xs); color: var(--text-2) }
.field label { display: block; font-size: var(--fs-xs); color: var(--text-3); margin-bottom: 6px; font-weight: 600 }
.field input, .field select, .field textarea { width: 100%; border: 1px solid var(--border-strong); border-radius: var(--r-sm); padding: 9px 10px; background: var(--surface) }
.field input:disabled, .field select:disabled, .field textarea:disabled { background: var(--surface-2); color: var(--text-3) }
.field textarea { min-height: 84px; resize: vertical }
.chk { display: flex; gap: 8px; align-items: center; font-size: var(--fs-sm) } .chk input { width: auto }
.pts input, .pts select { width: 100%; border: 1px solid var(--border-strong); border-radius: var(--r-sm); padding: 7px; font-size: var(--fs-sm) }
.pts input:disabled { background: var(--surface-2) }
.pts td { padding: 6px } .pts td:last-child { white-space: nowrap; width: 90px }
.risk-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--s3) }
.cnum { font-size: 36px; font-weight: 850; letter-spacing: -1px }
.hbar { height: 8px; border-radius: 4px; background: #e9eff7; position: relative; min-width: 120px }
.hbar span { position: absolute; left: 0; top: 0; bottom: 0; border-radius: 4px } .hbar i { position: absolute; top: -3px; bottom: -3px; width: 2px; background: var(--chart-limit) }
.kv { display: grid; grid-template-columns: 1fr auto; gap: 6px 14px; font-size: var(--fs-sm) }
.kv span:nth-child(odd) { color: var(--text-3) } .kv span:nth-child(even) { font-weight: 750; text-align: right }
.step { display: flex; gap: 10px; align-items: center; padding: 12px 0; border-bottom: 1px solid var(--border); font-size: var(--fs-sm) } .step > :last-child { margin-left: auto }
.chart { width: 100%; height: auto; max-height: 330px; display: block } .chart text { font-size: 11px; fill: var(--chart-axis) }
.legend { display: flex; gap: 18px; font-size: var(--fs-xs); color: var(--text-3); flex-wrap: wrap; margin-top: var(--s2) }
.dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; margin-right: 6px }
.chartlabel { font-size: var(--fs-xs); color: var(--text-3); margin-top: 8px; line-height: 1.5 }
.modal-back { position: fixed; inset: 0; background: #0e2036a0; display: none; align-items: center; justify-content: center; z-index: 10; padding: 20px }
.modal-back.open { display: flex }
.modal { width: min(560px, 100%); background: var(--surface); border-radius: var(--r-lg); padding: 26px; box-shadow: var(--shadow-3); max-height: 92vh; overflow: auto }
.modal.wide { width: min(1000px, 100%) } .modal h2 { font-size: var(--fs-xl); margin: 0 }
.toast { position: fixed; right: 22px; bottom: 22px; background: var(--brand-900); color: #fff; padding: 13px 18px; border-radius: var(--r-md); font-size: var(--fs-sm); z-index: 20; max-width: 440px; box-shadow: var(--shadow-3); opacity: 0; transform: translateY(10px); transition: .25s; pointer-events: none; line-height: 1.5 }
.toast.show { opacity: 1; transform: none } .toast.err { background: #7d1f2c }
.loading { opacity: .55; pointer-events: none; transition: opacity .15s }
#printArea { display: none }
@media print { aside, .topbar, .content, .modal-back, .toast { display: none !important } main { margin: 0 } #printArea { display: block; padding: 10mm; font-size: 11px; color: #000 } #printArea h1 { font-size: 18px } #printArea table { font-size: 10px } #printArea td, #printArea th { padding: 5px; border: 1px solid #ccc } }
@media (max-width: 1100px) { aside { width: 72px; padding: 22px 8px } .brand { font-size: 0; padding: 0 0 26px 18px } .tagline, .menu-label, .nav .name, .aside-bottom, .navcount { display: none } .nav { justify-content: center } main { margin-left: 72px } .kpis { grid-template-columns: repeat(2, 1fr) } .split { grid-template-columns: 1fr } .risk-grid { grid-template-columns: 1fr 1fr } .content { padding: 24px } .topbar { padding: 8px 20px } }
@media (max-width: 680px) { .instrument { flex-direction: column; align-items: flex-start } .topctl select { max-width: 230px }  aside { position: fixed; inset: auto 0 0 0; width: 100%; height: 58px; flex-direction: row; overflow-x: auto; padding: 6px; z-index: 5 } .brand, .aside-bottom { display: none } .nav { width: 46px; flex-shrink: 0; padding: 10px } main { margin-left: 0; padding-bottom: 64px } .content { padding: 18px 16px } .kpis, .two, .fields, .risk-grid { grid-template-columns: 1fr } .head, .recommend { flex-direction: column; align-items: stretch } .recommend .big { font-size: 32px } table { min-width: 560px } .topbar { position: static } }

/* =====================================================================
   2.3.1 – dopracowanie interfejsu (nadpisuje wcześniejsze reguły)
   ===================================================================== */
:root { --sidebar-w: 236px; --ctl-h: 38px; --fs-md: 13.5px; }
body { font-size: var(--fs-md); line-height: 1.45; text-rendering: optimizeLegibility; }
table, .num, .kpi-num, .value { font-variant-numeric: tabular-nums; }
abbr[title] { text-decoration: underline dotted #9aa8bb; text-underline-offset: 3px; cursor: help; }

/* ikony */
.ico { width: 18px; height: 18px; flex: 0 0 18px; stroke: currentColor; fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.ico-sm { width: 15px; height: 15px; flex-basis: 15px; }

/* pasek boczny */
aside { padding: 20px 12px 16px; gap: 2px; }
.brand { font-size: 20px; letter-spacing: .6px; padding: 0 10px; gap: 10px; white-space: nowrap; }
.brand .logo { width: 30px; height: 30px; flex: 0 0 30px; }
.brand i { display: none; }
.tagline { font-size: 11px; letter-spacing: .2px; color: #8ea3c2; padding: 4px 10px 20px 50px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.menu-label { font-size: 10px; letter-spacing: 1.4px; margin: 14px 10px 6px; }
.nav { padding: 9px 10px; gap: 11px; font-size: 13px; border-radius: 8px; }
.nav .name { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.nav .ico { opacity: .85; } .nav.active .ico, .nav:hover .ico { opacity: 1; }
.nav.active { background: #23395c; box-shadow: inset 3px 0 #5b9bff; }
.aside-bottom { font-size: 11px; padding: 14px 10px 0; }

/* górny pasek */
.topbar { min-height: 58px; padding: 8px 28px; }
.topctl { gap: 14px; }
.topctl label { color: var(--text-3); font-size: 12px; }
.topctl select, .topctl input { max-width: 300px; }

/* jednolite kontrolki formularzy */
input, select, textarea { font-size: 13px; }
.field input, .field select, .field textarea, .btn, select.btn, input.btn, .pts input, .pts select { min-height: var(--ctl-h); border-radius: 8px; }
.field input, .field select, .pts input, .pts select, select.btn, input.btn { height: var(--ctl-h); padding: 0 12px; border: 1px solid var(--border-strong); background-color: var(--surface); color: var(--text); font-weight: 500; }
.field textarea { padding: 10px 12px; }
select, select.btn { -webkit-appearance: none; appearance: none; padding-right: 34px !important; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%237a889c' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 12px center; background-size: 12px; }
.field input:focus, .field select:focus, .field textarea:focus, .pts input:focus, select.btn:focus, input.btn:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px #2563eb22; }
.field label { font-size: 11.5px; color: var(--text-2); font-weight: 600; margin-bottom: 6px; }
.fields { gap: 14px 16px; }
input[type=date] { font-variant-numeric: tabular-nums; }
.btn { padding: 0 14px; font-weight: 650; gap: 7px; }
.btn.sm { min-height: 30px; height: 30px; padding: 0 10px; border-radius: 7px; }
.iconbtn { width: 32px; height: 32px; min-height: 32px; padding: 0; justify-content: center; border-radius: 8px; }

/* statusy z kropką */
.pill { display: inline-flex; align-items: center; gap: 6px; font-size: 10.5px; letter-spacing: .35px; padding: 4px 10px; line-height: 1.4; }
.pill::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: currentColor; opacity: .85; flex: 0 0 6px; }

/* tabele */
th { font-size: 10.5px; letter-spacing: .5px; white-space: nowrap; padding: 10px 12px; }
td { padding: 11px 12px; line-height: 1.4; }
td.num, th.num { text-align: right; }
.cell-main { font-weight: 650; color: var(--text); }
.cell-sub { display: block; font-size: 11.5px; color: var(--text-3); font-weight: 500; margin-top: 2px; }
.t-actions { width: 1%; white-space: nowrap; text-align: right; }
.table-wrap { border-radius: 10px; }
tr.clickable td:first-child, tr.clickable td.clickable { cursor: pointer; }

/* lista definicji (szczegóły obliczeń) */
.dl { display: grid; grid-template-columns: minmax(170px, 32%) 1fr; border-top: 1px solid var(--border); font-size: 13px; }
.dl > dt, .dl > dd { margin: 0; padding: 9px 4px; border-bottom: 1px solid #edf1f6; }
.dl > dt { color: var(--text-3); font-weight: 500; }
.dl > dd { color: var(--text); font-weight: 600; }
.dl > dd .muted { font-weight: 500; }
.dl-h { grid-column: 1 / -1; padding: 16px 4px 6px !important; font-size: 11px; font-weight: 800; letter-spacing: 1px; text-transform: uppercase; color: var(--primary); border-bottom: 1px solid var(--border) !important; }
.kv { max-width: 720px; }

/* okna */
.modal { padding: 0; }
.modal > .row:first-child { padding: 18px 24px; margin: 0 !important; border-bottom: 1px solid var(--border); position: sticky; top: 0; background: var(--surface); z-index: 1; border-radius: var(--r-lg) var(--r-lg) 0 0; }
#modalBody { padding: 20px 24px 24px; }
.modal h2 { font-size: 18px; }

/* nagłówki stron i karty */
h1 { font-size: 24px; } .head { margin-bottom: 20px; }
.card { padding: 20px 22px; }
.card h2 { font-size: 15px; }
.kpi-label { font-size: 11.5px; }
.recommend .big { font-size: 36px; }

/* responsywność */
@media (max-width: 1320px) { .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); } .split { grid-template-columns: 1fr; } .content { padding: 26px 28px; } }
@media (max-width: 1180px) { aside { width: 68px; padding: 18px 8px; } aside .brand { padding: 0 9px 18px; } aside .brand span, .tagline, .menu-label, .nav .name, .aside-bottom, .navcount { display: none; } .nav { justify-content: center; padding: 11px 0; } main { margin-left: 68px; } .fields { grid-template-columns: repeat(2, 1fr); } .risk-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 680px) { aside { width: 100%; height: 58px; padding: 6px; } main { margin-left: 0; } .fields { grid-template-columns: 1fr; } .dl { grid-template-columns: 1fr; } .dl > dt { border-bottom: 0; padding-bottom: 0; } .modal { border-radius: 12px; } }
/* kv: etykieta | wartość obok siebie, z liniami wierszy (zamiast rozsunięcia do krawędzi) */
.kv { grid-template-columns: minmax(150px, max-content) minmax(0, 1fr); gap: 0 24px; font-size: 13px; }
.kv > span { padding: 8px 0; border-bottom: 1px solid #edf1f6; }
.kv > span:nth-child(even) { text-align: left; font-weight: 650; }
.kv > span:nth-last-child(-n+2) { border-bottom: 0; }
.nav svg.ico { width: 18px; height: 18px; }

/* ---------- nagłówek aplikacji z logo PROMETROLOG ---------- */
:root { --appbar-h: 78px; --accent: #f47b20; }
.appbar { position: fixed; inset: 0 0 auto 0; height: var(--appbar-h); background: #fff; border-bottom: 1px solid var(--border); display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 0 28px 0 26px; z-index: 6; box-shadow: 0 1px 0 #0000000a, 0 4px 14px -10px #0f2a5233; }
.appbar-brand { display: flex; flex-direction: column; justify-content: center; min-width: 0; }
.logo-img { height: 38px; width: auto; display: block; }
.edition { font-size: 10.5px; font-weight: 700; letter-spacing: 2px; color: #50607a; margin: 6px 0 0 62px; white-space: nowrap; }
.appbar-right { display: flex; align-items: center; gap: 10px; min-width: 0; }
.roundbtn { width: 42px; height: 42px; border-radius: 50%; border: 1px solid var(--border-strong); background: #fff; color: #1e3a5f; display: inline-flex; align-items: center; justify-content: center; cursor: pointer; transition: background .15s, border-color .15s, color .15s; flex: 0 0 42px; }
.roundbtn:hover { background: #f3f6fa; border-color: #b9c6d8; color: var(--primary); }
.roundbtn:focus-visible, .logout:focus-visible { outline: none; box-shadow: 0 0 0 3px #2563eb33; }
.who { display: flex; flex-direction: column; align-items: flex-end; line-height: 1.25; margin: 0 6px 0 10px; white-space: nowrap; }
.who strong { font-size: 13.5px; color: var(--text); }
.who span { font-size: 12px; color: var(--text-3); }
.btn.logout { height: 42px; padding: 0 16px; border-radius: 10px; border: 1px solid #b9cbe6; background: #f2f6fc; color: #1e3a5f; font-weight: 700; }
.btn.logout:hover { background: #e7eef9; }
.asof { display: inline-flex; align-items: center; gap: 8px; height: 42px; padding: 0 6px 0 12px; border: 1px solid var(--border-strong); border-radius: 10px; font-size: 12px; color: var(--text-3); margin-right: 6px; }
.asof input { border: 0; height: 36px; padding: 0 6px; font: inherit; font-size: 13px; font-weight: 600; color: var(--text); background: transparent; outline: none; }
.appbar .mode { margin-right: 6px; }
.appbar .asof-hist { margin-right: 4px; }

/* pasek boczny pod nagłówkiem, aktywna pozycja jako jasna „pigułka” */
aside { top: var(--appbar-h); padding-top: 22px; }
main { padding-top: var(--appbar-h); }
.nav { padding: 11px 14px; font-weight: 600; color: #dbe5f4; border-radius: 10px; }
.nav.active { background: #fff; color: #0f2a52; box-shadow: inset 4px 0 0 var(--primary), 0 2px 8px -4px #0008; }
.nav.active .navcount { background: #e7eef9; color: #0f2a52; }
.nav:not(.active):hover { background: #ffffff14; }
.menu-label:first-child { margin-top: 0; }
.content { padding-top: 30px; }

/* modal konta */
.userlist { display: grid; gap: 8px; margin-top: 10px; }
.useritem { display: flex; align-items: center; gap: 12px; text-align: left; padding: 10px 12px; border: 1px solid var(--border); border-radius: 10px; background: #fff; cursor: pointer; font: inherit; }
.useritem:hover { border-color: #b9c6d8; background: #f7f9fc; }
.useritem.current { border-color: #9cc0f5; background: #f2f7ff; }
.useritem > span:nth-child(2) { flex: 1; }
.avatar { width: 36px; height: 36px; border-radius: 50%; background: #0f2a52; color: #fff; display: inline-flex; align-items: center; justify-content: center; font-size: 12.5px; font-weight: 700; letter-spacing: .5px; flex: 0 0 36px; }

@media (max-width: 1320px) { .appbar .mode, .asof > span { display: none; } }
@media (max-width: 1180px) { .edition { display: none; } .who { display: none; } .nav.active { box-shadow: none; } }
@media (max-width: 680px) { :root { --appbar-h: 60px; } .appbar { padding: 0 12px; } .logo-img { height: 24px; } .asof, .roundbtn[data-go], .roundbtn[data-act=about] { display: none; } .btn.logout { padding: 0 10px; font-size: 0; gap: 0; } aside { top: auto; } }
@media print { .appbar { display: none !important; } main { padding-top: 0; } }
:root { --sidebar-w: 252px; }
.modal-back { z-index: 20 !important; }
.dl { border-top: 0; } .dl > .dl-h:first-child { padding-top: 2px !important; }
.field select, .pts select, .risk-grid select { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%237a889c' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E") !important; background-repeat: no-repeat !important; background-position: right 12px center !important; background-size: 12px !important; padding-right: 34px !important; -webkit-appearance: none; appearance: none; }
table.reg th:first-child, table.reg td:first-child { min-width: 230px; }
table.reg td:nth-child(2) { min-width: 120px; }
@media (max-width: 1240px) { table.reg th:nth-child(2), table.reg td:nth-child(2) { display: none; } table.reg th:first-child, table.reg td:first-child { min-width: 200px; } }

/* =====================================================================
   2.3.2 – marka PROMETROLOG: pomarańczowe akcje, spokojniejsza typografia
   ===================================================================== */
:root {
  --primary: #e8670f; --primary-600: #cc5608; --primary-50: #fff5ed; --primary-100: #ffe4cf;
  --primary-ink: #b24e06;            /* pomarańczowy dla tekstu (kontrast ≥ 4,5:1) */
  --link: #1f4f8f;                   /* odnośniki i informacje – granat */
  --appbar-h: 64px;
}
:focus-visible { outline-color: var(--primary); }
.btn.primary { background: var(--primary); border-color: var(--primary); color: #fff; box-shadow: 0 1px 2px #b24e0626; }
.btn.primary:hover { background: var(--primary-600); border-color: var(--primary-600); }
.btn.ghost, .t-info { color: var(--link); }
.eyebrow { color: var(--primary-ink); letter-spacing: 1.2px; }
.field input:focus, .field select:focus, .field textarea:focus, .pts input:focus, select.btn:focus, input.btn:focus, .asof:focus-within { border-color: var(--primary); box-shadow: 0 0 0 3px #e8670f24; }
tr.selected td { background: var(--primary-50); }
.recommend .btn.primary { background: var(--primary); color: #fff; border-color: var(--primary); }
.roundbtn:hover { color: var(--primary-ink); border-color: #f2c4a2; background: var(--primary-50); }

/* nagłówek: niższy, większe logo, wersja jako znaczek */
.appbar { padding: 0 24px 0 22px; }
.appbar-brand { flex-direction: row; align-items: center; gap: 14px; }
.logo-img { height: 40px; }
.edition { display: none !important; }
.mode, .mode.local, .mode.server { display: inline-flex; align-items: center; height: 24px; padding: 0 10px; border-radius: 999px; background: #f1f4f8; color: #4b5a70; border: 1px solid #dce3ec; font-size: 11.5px; font-weight: 600; letter-spacing: 0; text-transform: none; white-space: nowrap; }
.asof, .roundbtn, .btn.logout { height: 40px; } .roundbtn { width: 40px; flex-basis: 40px; }
.btn.logout { background: #fff; border-color: var(--border-strong); }
.btn.logout:hover { background: #f6f8fb; }

/* menu boczne: akcent pomarańczowy, bez wersalików */
.menu-label { text-transform: none; letter-spacing: .2px; font-size: 11.5px; font-weight: 600; color: #7f93b3; }
.nav.active { box-shadow: inset 4px 0 0 var(--primary), 0 2px 8px -4px #0008; }
.nav.active .ico { color: var(--primary); }

/* mniej wersalików: nagłówki tabel, statusy, sekcje */
th { text-transform: none; letter-spacing: 0; font-size: 12px; font-weight: 600; color: var(--text-3); }
.pill { text-transform: none; letter-spacing: 0; font-size: 12px; font-weight: 600; padding: 3px 10px; white-space: nowrap; }
.dl-h { text-transform: none; letter-spacing: 0; font-size: 13px; color: var(--text); font-weight: 700; }

/* rejestr: stały układ kolumn – bez przewijania także w Safari */
table.reg { table-layout: fixed; width: 100%; min-width: 0; }
table.reg th:first-child, table.reg td:first-child { min-width: 0; }
table.reg td { overflow: hidden; text-overflow: ellipsis; }
table.reg .w-loc { width: 14%; } table.reg .w-cal { width: 11%; } table.reg .w-int { width: 10%; } table.reg .w-due { width: 13%; }
table.reg .w-risk { width: 10%; } table.reg .w-st { width: 15%; } table.reg .w-act { width: 52px; }
table.reg td:nth-child(2) { min-width: 0; }
.loc-sub { display: none; }
@media (max-width: 1240px) { table.reg .w-loc { display: none; } .loc-sub { display: block; } table.reg .w-st { width: 17%; } table.reg .w-risk { width: 11%; } }
.ghostbtn { border: 0; background: none; color: var(--text-3); cursor: pointer; display: inline-flex; align-items: center; justify-content: center; }
.ghostbtn:hover { background: var(--primary-50); color: var(--primary-ink); }
.cell-main.t-crit, .cell-sub.t-crit { color: var(--crit-fg); font-weight: 650; }
.cell-main.t-warn, .cell-sub.t-warn { color: var(--warn-fg); font-weight: 650; }

/* filtry nad tabelą */
.filters { display: flex; flex-wrap: wrap; gap: 8px; margin: -4px 0 14px; }
.chip { display: inline-flex; align-items: center; gap: 8px; height: 32px; padding: 0 12px; border-radius: 999px; border: 1px solid var(--border-strong); background: #fff; font-size: 12.5px; font-weight: 600; color: var(--text-2); cursor: pointer; }
.chip span { min-width: 20px; height: 20px; padding: 0 6px; border-radius: 999px; background: #eef2f7; color: var(--text-2); font-size: 11px; display: inline-flex; align-items: center; justify-content: center; }
.chip:hover { border-color: #b9c6d8; }
.chip.on { background: #0f2a52; border-color: #0f2a52; color: #fff; } .chip.on span { background: #ffffff26; color: #fff; }

/* kafelki KPI */
.kpi-card { display: flex; gap: 14px; align-items: flex-start; text-align: left; font: inherit; color: inherit; cursor: pointer; border: 1px solid var(--border); transition: border-color .15s, box-shadow .15s, transform .15s; }
.kpi-card:hover { border-color: #f2c4a2; box-shadow: 0 6px 18px -10px #0f2a5244; transform: translateY(-1px); }
.kpi-ico { width: 40px; height: 40px; flex: 0 0 40px; border-radius: 10px; background: #eef2f7; color: #33507a; display: inline-flex; align-items: center; justify-content: center; }
.kpi-ico.crit { background: var(--crit-bg); color: var(--crit-fg); } .kpi-ico.warn { background: var(--warn-bg); color: var(--warn-fg); } .kpi-ico.info { background: var(--primary-50); color: var(--primary-ink); }
.kpi-body { display: flex; flex-direction: column; min-width: 0; }
.kpi-card .kpi-label { font-size: 12.5px; font-weight: 600; color: var(--text-2); }
.kpi-card .kpi-num { font-size: 28px; font-weight: 750; letter-spacing: -.5px; margin: 4px 0 2px; color: var(--text); line-height: 1.15; }
.kpi-card .kpi-foot { font-size: 12px; color: var(--text-3); }

/* najbliższe terminy */
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 6px; }
.card-head h2 { margin: 0; }
.due-row { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(80px, 1fr) 150px; gap: 18px; align-items: center; padding: 12px 6px; border-bottom: 1px solid #edf1f6; cursor: pointer; border-radius: 8px; }
.due-row:hover { background: var(--surface-2); }
.due-name { min-width: 0; } .due-name .cell-main { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.due-bar { height: 6px; border-radius: 999px; background: #edf1f6; overflow: hidden; }
.due-bar span { display: block; height: 100%; border-radius: 999px; }
.bar-ok { background: #3aa676; } .bar-warn { background: #e0a030; } .bar-crit { background: #d4483a; }
.due-date { text-align: right; } .due-date .cell-main { display: block; }

/* formularz w oknie: sekcje i stopka z akcjami po prawej */
.form-sec { padding: 4px 0 18px; } .form-sec + .form-sec { border-top: 1px solid var(--border); padding-top: 18px; }
.form-sec-h { display: flex; align-items: baseline; gap: 10px; margin-bottom: 12px; }
.form-sec-h strong { font-size: 14px; } .form-sec-h span { font-size: 12px; color: var(--text-3); }
.modal-foot, #modalBody > .row:last-child:has(> .btn.primary) { display: flex; justify-content: flex-end; gap: 10px; margin: 6px -24px -24px; padding: 14px 24px; border-top: 1px solid var(--border); background: var(--surface-2); border-radius: 0 0 var(--r-lg) var(--r-lg); position: sticky; bottom: -24px; }

@media (max-width: 1320px) { .due-row { grid-template-columns: minmax(0, 1.4fr) minmax(60px, 1fr) 140px; } }
@media (max-width: 680px) { .due-row { grid-template-columns: 1fr auto; } .due-bar { display: none; } table.reg { table-layout: auto; min-width: 640px; } }
table.reg td { overflow: visible; text-overflow: clip; }
table.reg td:first-child { overflow: hidden; text-overflow: ellipsis; }
table.reg .w-loc { width: 13%; } table.reg .w-cal { width: 10%; } table.reg .w-risk { width: 10.5%; } table.reg .w-st { width: 16%; } table.reg .w-act { width: 60px; }
table.reg td.t-actions { padding-left: 4px; padding-right: 10px; }
.modal-foot, #modalBody > .row:last-child:has(> .btn.primary) { bottom: 0; }

/* =====================================================================
   2.3.3 – symbole, układ i skalowanie
   ===================================================================== */
:root { --sidebar-w: 264px; }
sub { font-size: .72em; line-height: 0; vertical-align: -.25em; font-weight: inherit; }
abbr[title] { text-decoration-color: #c3ccd8; }
.content { max-width: 1720px; }

/* menu: pełne nazwy, w razie potrzeby w dwóch liniach */
.nav .name { white-space: normal; line-height: 1.25; overflow: visible; text-overflow: clip; }

/* kv: etykieta po lewej, wartość wyrównana do prawej – czytelne w wąskich kartach */
.kv { grid-template-columns: minmax(0, 1fr) minmax(0, max-content); gap: 0 20px; max-width: none; }
.kv > span:nth-child(even) { text-align: right; overflow-wrap: anywhere; }
.dl-note { display: block; font-size: 12px; color: var(--text-3); font-weight: 400; margin-top: 2px; }
.dl > dt { line-height: 1.35; }

/* tabela metod */
.methods td:first-child { min-width: 200px; }
.methods tr.result td { border-top: 2px solid var(--border); background: var(--surface-2); }
.formula { font-family: var(--mono); font-size: 12px; color: var(--text-2); }

/* symulator */
.range-row { gap: 16px; align-items: center; flex-wrap: nowrap; }
input.range { flex: 1; min-width: 160px; accent-color: var(--primary); height: 24px; }
.range-scale { display: flex; justify-content: space-between; font-size: 11.5px; color: var(--text-3); margin: 2px 128px 0 2px; }
.num-unit { display: inline-flex; align-items: center; height: var(--ctl-h); border: 1px solid var(--border-strong); border-radius: 8px; background: #fff; overflow: hidden; flex: 0 0 auto; }
.num-unit input { width: 64px; border: 0; height: 100%; padding: 0 4px 0 12px; font-weight: 650; outline: none; background: transparent; }
.num-unit span { padding: 0 12px; color: var(--text-3); font-size: 12.5px; border-left: 1px solid var(--border); height: 100%; display: inline-flex; align-items: center; background: var(--surface-2); }
.num-unit:focus-within { border-color: var(--primary); box-shadow: 0 0 0 3px #e8670f24; }
.span2 { grid-column: 1 / -1; }
.chk { display: inline-flex !important; align-items: center; gap: 10px; font-size: 13px !important; font-weight: 500 !important; color: var(--text) !important; cursor: pointer; margin: 4px 0 0 !important; }
.chk input { width: 18px; height: 18px; accent-color: var(--primary); margin: 0; flex: 0 0 18px; }
.legend-list { display: grid; gap: 4px; margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--border); font-size: 12px; color: var(--text-3); line-height: 1.45; }
.legend-list strong { color: var(--text-2); font-weight: 650; }
#simVerdict .kv > span { padding: 9px 0; }

/* biblioteka typów: karty zamiast szerokiej tabeli pól */
.type-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(520px, 1fr)); gap: 18px; }
.type-card { display: flex; flex-direction: column; gap: 14px; }
.type-head { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; padding-bottom: 14px; border-bottom: 1px solid var(--border); }
.type-head input { font-weight: 650; }
.type-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.type-grid.two { grid-template-columns: 1fr 1fr; }
.type-card .field input { width: 100%; height: var(--ctl-h); padding: 0 12px; border: 1px solid var(--border-strong); border-radius: 8px; }
.type-card .field input:disabled { background: var(--surface-2); color: var(--text-2); }
.formula-row { display: flex; align-items: center; gap: 10px; font-family: var(--mono); font-size: 13px; color: var(--text-2); }
.formula-row input { flex: 1; min-width: 0; font-family: var(--font) !important; }
.hint { font-size: 11.5px; color: var(--text-3); margin-top: 5px; }

/* skalowanie */
@media (min-width: 1800px) { :root { --fs-md: 14px; } body { font-size: 14px; } td { padding: 12px 14px; } }
@media (max-width: 1500px) { .type-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 1320px) { .range-scale { margin-right: 120px; } }
@media (max-width: 1180px) { .type-cards { grid-template-columns: 1fr; } .type-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
@media (max-width: 860px) { .type-grid, .type-head { grid-template-columns: 1fr 1fr; } .content { padding: 22px 18px; } .appbar .who { display: none; } }
@media (max-width: 680px) { .type-grid, .type-head, .type-grid.two { grid-template-columns: 1fr; } .range-row { flex-wrap: wrap; } .range-scale { margin-right: 0; } .kpis { grid-template-columns: 1fr; } .methods td:first-child { min-width: 160px; } }
.stack { display: flex; flex-direction: column; gap: var(--s5, 20px); min-width: 0; }
.grid.top { align-items: start; }
/* suwak w kolorach marki */
input.range { -webkit-appearance: none; appearance: none; height: 6px; border-radius: 999px; background: #e3e8ef; outline: none; }
input.range::-webkit-slider-thumb { -webkit-appearance: none; width: 20px; height: 20px; border-radius: 50%; background: #fff; border: 2px solid var(--primary); box-shadow: 0 1px 4px #0003; cursor: pointer; }
input.range::-moz-range-thumb { width: 18px; height: 18px; border-radius: 50%; background: #fff; border: 2px solid var(--primary); cursor: pointer; }
input.range::-moz-range-progress { background: var(--primary); height: 6px; border-radius: 999px; }
input.range:focus-visible::-webkit-slider-thumb { box-shadow: 0 0 0 4px #e8670f33; }
.range-scale { position: relative; height: 16px; display: block; margin: 6px 0 0; width: calc(100% - 148px); }
.range-scale span { position: absolute; transform: translateX(-50%); white-space: nowrap; }
.range-scale span:first-child { transform: none; } .range-scale span:last-child { transform: translateX(-100%); }
@media (max-width: 680px) { .range-scale { width: 100%; } }
th { white-space: normal; }
table.reg th { white-space: nowrap; }
input.range { background: linear-gradient(to right, var(--primary) var(--p, 0%), #e3e8ef var(--p, 0%)); }
.grid > * { min-width: 0; }
@media (max-width: 1100px) { th, td { padding-left: 9px; padding-right: 9px; } }
@media (max-width: 680px) { .card > table, #printArea table, .card div > table:not(.table-wrap table) { display: block; overflow-x: auto; max-width: 100%; } }
@media (max-width: 680px) {
  .appbar .mode { display: none !important; }
  .appbar-brand { flex: 0 1 auto; min-width: 0; }
  .logo-img { height: 28px; max-width: 100%; object-fit: contain; object-position: left center; }
  .kpis { grid-template-columns: 1fr 1fr !important; gap: 10px; }
  .kpis .card { padding: 14px; }
  .kpi-card { flex-direction: column; gap: 8px; }
  .value, .kpi-num { font-size: 22px !important; }
  h1 { font-size: 21px; }
}
@media (max-width: 680px) { .section .card table { display: block; overflow-x: auto; max-width: 100%; } .table-wrap { overflow-x: auto; } }
@media (max-width: 680px) { .section .card table, #printArea table { min-width: 0 !important; } }

/* =====================================================================
   3.0 – moduły: rejestr, karta przyrządu, wydania, etykiety, import,
   orzekanie o zgodności, weryfikacja świadectw
   ===================================================================== */
.nav { padding: 8px 12px; }
.menu-label { margin: 16px 10px 6px; }
.section-label { font-size: 12px; font-weight: 700; color: var(--text-3); margin: 4px 2px 10px; }
.grid.kpis.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.kpi-card.static { cursor: default; } .kpi-card.static:hover { transform: none; box-shadow: none; border-color: var(--border); }
.fields.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.fields.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.field.inline { display: flex; align-items: center; gap: 10px; margin: 0; } .field.inline label { margin: 0; white-space: nowrap; } .field.inline select { width: auto; min-width: 150px; }
.req { font-size: 11px; color: var(--primary-ink); font-weight: 600; }
.modal-foot.inline { position: static; margin: 18px 0 0; padding: 14px 0 0; background: none; border-radius: 0; align-items: center; }
.modal-foot.inline .chk { margin-right: auto !important; }

/* pasek narzędzi rejestru */
.toolbar { display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap; margin-bottom: 14px; }
.toolbar .filters { margin: 0; }
.search { display: inline-flex; align-items: center; gap: 8px; height: 36px; padding: 0 12px; border: 1px solid var(--border-strong); border-radius: 999px; background: #fff; color: var(--text-3); min-width: 280px; }
.search input { border: 0; outline: none; background: transparent; font-size: 13px; width: 100%; color: var(--text); }
.search:focus-within { border-color: var(--primary); box-shadow: 0 0 0 3px #e8670f24; }
.search.wide { display: flex; width: 100%; margin: 4px 0 10px; border-radius: 8px; }
.inv { font-family: var(--mono); font-size: 12px; font-weight: 600; color: #1f4f8f; background: #eef4fb; border: 1px solid #d6e3f3; padding: 3px 7px; border-radius: 6px; white-space: nowrap; }
table.reg2 { table-layout: fixed; width: 100%; }
table.reg2 .w-inv { width: 92px; } table.reg2 .w-loc { width: 17%; } table.reg2 .w-life { width: 13%; } table.reg2 .w-due { width: 14%; } table.reg2 .w-st { width: 15%; } table.reg2 .w-who { width: 13%; }
table.reg2 td { overflow: hidden; text-overflow: ellipsis; } table.reg2 td:nth-child(4), table.reg2 td:nth-child(6) { overflow: visible; }
@media (max-width: 1240px) { table.reg2 .w-loc { display: none; } table.reg2 .w-who { width: 16%; } }
tr.subrow td { padding-top: 0; border-top: 0; }

/* karta przyrządu */
.crumbs { font-size: 12.5px; color: var(--text-3); margin: -4px 0 12px; } .crumbs a { color: var(--link); text-decoration: none; } .crumbs a:hover { text-decoration: underline; }
.card-hero { display: flex; justify-content: space-between; align-items: flex-start; gap: 20px; flex-wrap: wrap; }
.hero-actions { flex-wrap: wrap; justify-content: flex-end; gap: 8px; }
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--border); margin: 18px 0 18px; overflow-x: auto; }
.tab { border: 0; background: none; padding: 10px 14px; font: inherit; font-weight: 600; color: var(--text-3); border-bottom: 2px solid transparent; margin-bottom: -1px; cursor: pointer; white-space: nowrap; }
.tab:hover { color: var(--text); } .tab.on { color: var(--text); border-bottom-color: var(--primary); }
.tabcount { font-size: 11px; background: #eef2f7; color: var(--text-2); padding: 1px 7px; border-radius: 999px; margin-left: 4px; }
.timeline { list-style: none; margin: 6px 0 0; padding: 0; position: relative; }
.timeline::before { content: ''; position: absolute; left: 17px; top: 6px; bottom: 6px; width: 2px; background: #e6ebf2; }
.timeline li { display: flex; gap: 14px; padding: 8px 0; position: relative; }
.tl-dot { width: 36px; height: 36px; flex: 0 0 36px; border-radius: 50%; background: #fff; border: 2px solid #dfe6ef; display: inline-flex; align-items: center; justify-content: center; color: #33507a; z-index: 1; }
.tl-crit .tl-dot { border-color: var(--crit-bd); color: var(--crit-fg); background: var(--crit-bg); } .tl-ok .tl-dot { border-color: var(--ok-bd); color: var(--ok-fg); }
.tl-body { flex: 1; min-width: 0; padding: 6px 0 10px; border-bottom: 1px solid #f0f3f7; font-size: 13px; color: var(--text-2); }
.tl-head { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 2px; } .tl-head strong { color: var(--text); font-size: 13.5px; } .tl-head .muted { font-size: 12px; }

/* etykiety QR */
.qr-label { display: flex; gap: 8px; align-items: center; border: 1px dashed #c7d0dc; border-radius: 6px; background: #fff; padding: 6px; color: #0f1b2e; break-inside: avoid; }
.qr-label svg { display: block; }
.ql-text { min-width: 0; line-height: 1.2; } .ql-brand { font-size: 7px; letter-spacing: 1.2px; font-weight: 800; color: var(--primary-ink); }
.ql-inv { font-family: var(--mono); font-weight: 800; font-size: 13px; } .ql-name { font-size: 10px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; } .ql-sn, .ql-due { font-size: 9px; color: #333; }
.qr-label.size-s { width: 50mm; height: 25mm; } .qr-label.size-m { width: 70mm; height: 35mm; } .qr-label.size-l { width: 100mm; height: 50mm; }
.qr-label.size-l .ql-inv { font-size: 18px; } .qr-label.size-l .ql-name { font-size: 13px; } .qr-label.size-l .ql-sn, .qr-label.size-l .ql-due { font-size: 11px; }
.qr-label.size-s .ql-name { -webkit-line-clamp: 1; } .qr-label.size-s .ql-inv { font-size: 11px; }
.label-sheet { display: flex; flex-wrap: wrap; gap: 10px; padding: 14px; background: var(--surface-2); border-radius: 10px; border: 1px solid var(--border); }
.label-preview { display: inline-block; padding: 16px; background: var(--surface-2); border-radius: 10px; }
.checklist { max-height: 520px; overflow: auto; border: 1px solid var(--border); border-radius: 8px; }
.chk-row { display: flex; gap: 12px; align-items: flex-start; padding: 10px 12px; border-bottom: 1px solid #f0f3f7; cursor: pointer; font-size: 13px; }
.chk-row:hover { background: var(--surface-2); } .chk-row input { margin-top: 3px; width: 16px; height: 16px; accent-color: var(--primary); }
body.print-labels #printArea { padding: 6mm; }
@media print { body.print-labels #printArea .label-print { display: flex; flex-wrap: wrap; gap: 3mm; } body.print-labels .qr-label { border: 0.2mm solid #999; } }

/* import */
.stepper { display: flex; align-items: center; gap: 10px; margin: 0 0 18px; flex-wrap: wrap; }
.step-pill { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 600; color: var(--text-3); }
.step-pill span { width: 26px; height: 26px; border-radius: 50%; border: 2px solid var(--border-strong); display: inline-flex; align-items: center; justify-content: center; font-size: 12px; background: #fff; }
.step-pill.on { color: var(--text); } .step-pill.on span { border-color: var(--primary); color: var(--primary-ink); }
.step-pill.done span { background: var(--primary); border-color: var(--primary); color: #fff; }
.step-line { flex: 0 0 34px; height: 2px; background: var(--border); }
.dropzone { border: 2px dashed #cfd8e3; border-radius: 12px; padding: 38px 20px; display: flex; flex-direction: column; align-items: center; gap: 10px; text-align: center; background: var(--surface-2); transition: border-color .15s, background .15s; }
.dropzone.over { border-color: var(--primary); background: var(--primary-50); }
.dz-ico { width: 52px; height: 52px; border-radius: 14px; background: var(--primary-50); color: var(--primary-ink); display: inline-flex; align-items: center; justify-content: center; }
.dz-ico .ico { width: 26px; height: 26px; }
.map-grid { display: grid; gap: 0; } .map-row { display: grid; grid-template-columns: 220px 260px minmax(0, 1fr); gap: 16px; align-items: center; padding: 9px 0; border-bottom: 1px solid #f0f3f7; font-size: 13px; }
.map-row select { height: 34px; border: 1px solid var(--border-strong); border-radius: 8px; padding: 0 30px 0 10px; }
.done-card { text-align: center; display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 40px 24px; }
.done-ico { width: 56px; height: 56px; border-radius: 50%; background: var(--ok-bg); color: var(--ok-fg); display: inline-flex; align-items: center; justify-content: center; } .done-ico .ico { width: 28px; height: 28px; }

/* orzekanie o zgodności */
.cf-layout { display: grid; grid-template-columns: minmax(340px, 400px) minmax(0, 1fr); gap: 20px; align-items: start; }
.cf-form { position: sticky; top: calc(var(--appbar-h) + 16px); max-height: calc(100vh - var(--appbar-h) - 32px); overflow: auto; }
.cf-form .form-sec { padding-bottom: 14px; } .cf-form .fields { gap: 10px 12px; }
.cf-result { display: flex; flex-direction: column; gap: 18px; min-width: 0; } .cf-result > .grid { margin: 0; }
.verdict { border-radius: var(--r-lg); padding: 22px 26px; text-align: center; border: 1px solid; }
.verdict .v-label { font-size: 12px; font-weight: 700; letter-spacing: 1.2px; text-transform: uppercase; opacity: .8; }
.verdict .v-big { font-size: 34px; font-weight: 800; letter-spacing: -.5px; margin: 4px 0 6px; }
.verdict .v-sub { font-size: 13px; opacity: .9; }
.verdict.slim { padding: 14px 18px; text-align: left; } .verdict.slim .v-big { font-size: 22px; margin: 0 0 2px; }
.v-ok { background: var(--ok-bg); border-color: var(--ok-bd); color: var(--ok-fg); } .v-warn { background: var(--warn-bg); border-color: var(--warn-bd); color: var(--warn-fg); }
.v-crit { background: var(--crit-bg); border-color: var(--crit-bd); color: var(--crit-fg); } .v-wait { background: var(--wait-bg); border-color: var(--wait-bd); color: var(--wait-fg); }
.risk-card, .lim-card { border-left: 4px solid; } .r-crit { border-left-color: #d4483a; } .r-warn { border-left-color: #e0a030; } .r-info { border-left-color: #1f4f8f; } .lim-card { border-left-color: #3aa676; }
.risk-card .kpi-num, .lim-card .kpi-num { font-size: 26px; font-weight: 750; margin: 6px 0 6px; } .risk-card .kpi-foot, .lim-card .kpi-foot { font-size: 12px; color: var(--text-3); line-height: 1.45; }
.cf-chart { max-height: 340px; }
.cf-chart .z-acc { fill: #e9f7ef; } .cf-chart .z-guard { fill: #fdf3df; } .cf-chart .z-guard2 { fill: #fbe9df; } .cf-chart .z-rej { fill: #fdecec; }
.cf-chart .grid-l { stroke: #fff; stroke-width: 1; opacity: .8; } .cf-chart .axis { stroke: #b9c4d2; }
.cf-chart .pdf { fill: none; stroke: #1d3f8f; stroke-width: 2.4; } .cf-chart .tail { fill: #d4483a; opacity: .28; }
.cf-chart .l-spec { stroke: #d4483a; stroke-width: 1.6; stroke-dasharray: 6 4; } .cf-chart .l-acc { stroke: #2f9a66; stroke-width: 1.6; stroke-dasharray: 2 3; }
.cf-chart .l-y { stroke: #0f1b2e; stroke-width: 2; } .cf-chart text.lab { font-size: 12px; font-weight: 700; } .cf-chart text.l-spec { fill: #c23b2d; stroke: none; } .cf-chart text.l-acc { fill: #23824f; stroke: none; } .cf-chart .l-y-t { fill: #0f1b2e; }
.legend { display: flex; flex-wrap: wrap; gap: 6px 18px; justify-content: center; font-size: 12px; color: var(--text-2); margin-top: 8px; }
.legend span { display: inline-flex; align-items: center; gap: 6px; } .lg { width: 14px; height: 10px; border-radius: 3px; display: inline-block; border: 1px solid #0001; }
.lg.z-acc { background: #d4f0df; } .lg.z-guard { background: #f8e3b8; } .lg.z-rej { background: #f8d4d4; } .lg.pdfl { height: 3px; background: #1d3f8f; border: 0; } .lg.tailx { background: #d4483a55; }
.statement { font-size: 13.5px; line-height: 1.6; color: var(--text); margin: 6px 0 0; background: var(--surface-2); border: 1px solid var(--border); border-radius: 8px; padding: 12px 14px; }
details.calc { margin-top: 12px; border: 1px solid var(--border); border-radius: 8px; padding: 10px 12px; background: var(--surface-2); }
details.calc summary { cursor: pointer; font-weight: 600; font-size: 13px; }
.comps { display: grid; gap: 8px; margin: 10px 0; }
.comp-row { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, .8fr) minmax(0, .6fr) minmax(0, 1.2fr) 32px; gap: 6px; align-items: center; }
.comp-row input, .comp-row select { height: 34px; border: 1px solid var(--border-strong); border-radius: 7px; padding: 0 8px; min-width: 0; background-color: #fff; }

/* weryfikacja świadectw */
.ai-mode { display: flex; gap: 10px; align-items: flex-start; margin-top: 14px; padding: 12px 14px; border-radius: 10px; background: var(--wait-bg); border: 1px solid var(--wait-bd); font-size: 12.5px; color: var(--text-2); line-height: 1.5; }
.ai-mode.on { background: var(--primary-50); border-color: #f5cfb2; }
.samples { display: grid; gap: 10px; margin-top: 6px; }
.sample { display: flex; gap: 12px; align-items: center; text-align: left; padding: 12px 14px; border: 1px solid var(--border); border-radius: 10px; background: #fff; font: inherit; cursor: pointer; }
.sample:hover { border-color: #f2c4a2; background: var(--primary-50); } .sample .ico { color: var(--primary-ink); flex: 0 0 auto; }
.spinner { width: 34px; height: 34px; border-radius: 50%; border: 3px solid var(--primary-100); border-top-color: var(--primary); animation: spin 0.9s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.cc-layout { display: grid; grid-template-columns: minmax(320px, 0.85fr) minmax(0, 1.4fr); gap: 20px; align-items: start; }
.cc-doc { position: sticky; top: calc(var(--appbar-h) + 16px); max-height: calc(100vh - var(--appbar-h) - 32px); overflow: auto; }
.cc-main { display: flex; flex-direction: column; gap: 18px; min-width: 0; } #ccResult { display: flex; flex-direction: column; gap: 18px; } #ccResult > .grid { margin: 0; }
.pdf-frame { width: 100%; height: calc(100vh - var(--appbar-h) - 120px); min-height: 520px; border: 1px solid var(--border); border-radius: 8px; }
.cert-mock { background: #fff; border: 1px solid #d9dee6; box-shadow: 0 6px 20px -12px #0f2a5240; padding: 22px 22px 18px; font-family: Georgia, 'Times New Roman', serif; font-size: 12px; color: #111; }
.cm-head { display: flex; justify-content: space-between; gap: 10px; border-bottom: 2px solid #1f3b63; padding-bottom: 8px; }
.cm-acc { border: 2px solid #1f3b63; color: #1f3b63; font-weight: 700; padding: 3px 7px; font-family: var(--font); font-size: 11px; height: fit-content; }
.cm-title { text-align: center; font-weight: 700; font-size: 15px; letter-spacing: 1px; margin: 14px 0; } .cm-title span { font-size: 12px; letter-spacing: 0; font-weight: 400; }
.cert-mock table { width: 100%; border-collapse: collapse; font-size: 11.5px; } .cert-mock th, .cert-mock td { padding: 4px 6px; border: 1px solid #e3e6ea; text-align: left; text-transform: none; background: none; color: #111; font-weight: 400; letter-spacing: 0; }
.cm-t th { width: 38%; color: #555; } .cm-r th { font-weight: 700; } .cm-sub { margin: 12px 0 6px; font-weight: 700; } .cm-sign { margin-top: 14px; text-align: right; font-style: italic; color: #333; }
.cc-pts input { width: 100%; min-width: 70px; }
input.lowconf { background: #fff7e6 !important; border-color: #e7b35b !important; }
input.edited { background: #eef6ff !important; border-color: #8fb4e6 !important; }
.lg-chip { display: inline-block; width: 12px; height: 12px; border-radius: 3px; vertical-align: -2px; border: 1px solid; } .lg-chip.lowconf { background: #fff7e6; border-color: #e7b35b; } .lg-chip.edited { background: #eef6ff; border-color: #8fb4e6; }
.checklist-f { list-style: none; padding: 0; margin: 4px 0 0; font-size: 13px; }
.checklist-f li { display: flex; align-items: center; gap: 10px; padding: 7px 0; border-bottom: 1px solid #f0f3f7; }
.checklist-f li span { width: 20px; height: 20px; flex: 0 0 20px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; font-size: 11px; font-weight: 800; }
.checklist-f li em { margin-left: auto; font-style: normal; font-size: 11.5px; color: var(--text-3); white-space: nowrap; }
.checklist-f li.ok span { background: var(--ok-bg); color: var(--ok-fg); } .checklist-f li.no-blok span { background: var(--crit-bg); color: var(--crit-fg); } .checklist-f li.no-ostrz span { background: var(--warn-bg); color: var(--warn-fg); } .checklist-f li.no-info span { background: var(--wait-bg); color: var(--wait-fg); }
.checklist-f li.no-blok { color: var(--crit-fg); }
.msgs.tight { margin: 4px 0 0; gap: 6px; } .msgs.tight .msg { padding: 9px 12px; }
.cc-actions { display: flex; align-items: center; gap: 10px; justify-content: flex-end; flex-wrap: wrap; } .cc-actions > .muted, .cc-actions > .saved-note { margin-right: auto; }
.saved-note { display: inline-flex; gap: 8px; align-items: center; color: var(--ok-fg); font-weight: 600; font-size: 13px; }

@media (max-width: 1400px) { .cc-layout { grid-template-columns: 1fr; } .cc-doc { position: static; max-height: none; } .pdf-frame { height: 640px; } .fields.three { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 1180px) { .cf-layout { grid-template-columns: 1fr; } .cf-form { position: static; max-height: none; } .map-row { grid-template-columns: 1fr 1fr; } .map-row .cell-sub { grid-column: 1 / -1; } }
@media (max-width: 680px) { .grid.kpis.three { grid-template-columns: 1fr; } .fields.two, .fields.three { grid-template-columns: 1fr; } .search { min-width: 0; width: 100%; } .toolbar { flex-direction: column; align-items: stretch; } .verdict .v-big { font-size: 26px; } .map-row { grid-template-columns: 1fr; } .hero-actions { justify-content: flex-start; } .comp-row { grid-template-columns: 1fr 1fr; } }
@media print { body.print-labels .appbar, body.print-labels aside { display: none !important; } }
.msgs.tight .msg { flex-direction: column; align-items: flex-start; gap: 3px; } .msgs.tight .msg code { font-size: 10.5px; }
@media (max-width: 1240px) { table.reg2 th:nth-child(2), table.reg2 td:nth-child(2) { display: table-cell !important; } table.reg2 th.w-loc, table.reg2 td.w-loc { display: none !important; } }
@media (max-width: 680px) { table.reg2 { table-layout: auto; min-width: 700px; } }
table.reg2 th { white-space: normal; }
@media (max-width: 1240px) { table.reg2 .w-life { width: 16%; } table.reg2 .w-st { width: 19%; } table.reg2 .w-due { width: 15%; } table.reg2 .w-who { width: 14%; } }

/* 3.0.1 – orzekanie: dane nad wykresem */
.cf-input { padding: 18px 22px; margin-bottom: 18px; }
.cf-grid { display: flex; flex-wrap: wrap; gap: 14px 28px; align-items: flex-end; }
.cf-group { display: flex; flex-direction: column; gap: 6px; padding-right: 28px; border-right: 1px solid var(--border); }
.cf-group:last-child, .cf-group.grow { border-right: 0; padding-right: 0; } .cf-group.grow { flex: 1 1 340px; }
.cf-gh { font-size: 11px; font-weight: 700; letter-spacing: .8px; text-transform: uppercase; color: var(--primary-ink); }
.cf-gh span { text-transform: none; letter-spacing: 0; font-weight: 500; color: var(--text-3); margin-left: 6px; }
.cf-row { display: flex; gap: 10px; align-items: flex-end; }
.cf-row .field { margin: 0; width: 104px; } .cf-row .field.w-y { width: 150px; } .cf-row .field.w-unit { width: 84px; } .cf-row .field.w-rule { flex: 1; width: auto; min-width: 260px; } .cf-row .field.w-small { width: 110px; }
.cf-row .field input { font-weight: 650; }
.cf-row .field.w-y input { font-size: 15px; font-weight: 750; }
.cf-rule-note { margin-top: 10px; }
details.cf-more { margin-top: 14px; border-top: 1px solid var(--border); padding-top: 12px; }
details.cf-more summary { cursor: pointer; font-weight: 600; font-size: 13px; color: var(--text-2); }
.cf-more-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px 14px; margin-top: 14px; }
.calc-inline { margin-top: 16px; padding: 12px 14px; border: 1px solid var(--border); border-radius: 8px; background: var(--surface-2); }
.cf-top { display: grid; grid-template-columns: minmax(280px, 340px) minmax(0, 1fr); gap: 18px; align-items: stretch; }
.cf-verdict { text-align: left; display: flex; flex-direction: column; padding: 20px 22px; }
.cf-verdict .v-big { font-size: 30px; line-height: 1.1; }
.vk-list { margin-top: auto; padding-top: 14px; display: flex; flex-direction: column; }
.vk { display: flex; justify-content: space-between; gap: 12px; padding: 7px 0; border-top: 1px solid #0000001a; font-size: 13px; color: inherit; }
.vk span { opacity: .8; } .vk strong { font-variant-numeric: tabular-nums; color: var(--text); } .vk.em strong { font-size: 15px; }
.cf-chartcard { display: flex; flex-direction: column; justify-content: center; padding: 14px 16px 12px; }
.cf-chartcard .cf-chart { max-height: 380px; }
.cf-bottom { align-items: start; }
@media (max-width: 1320px) { .cf-more-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 1100px) { .cf-top { grid-template-columns: 1fr; } .cf-group { border-right: 0; padding-right: 0; } }
@media (max-width: 680px) { .cf-row { flex-wrap: wrap; } .cf-row .field, .cf-row .field.w-rule { width: calc(50% - 5px); min-width: 0; } .cf-row .field.w-rule { width: 100%; } .cf-more-grid { grid-template-columns: 1fr; } .cf-group { width: 100%; } }
.cf-grid { gap: 14px 22px; } .cf-group { padding-right: 22px; }
.cf-row .field { width: 86px; } .cf-row .field.w-y { width: 132px; } .cf-row .field.w-unit { width: 70px; } .cf-row .field.w-small { width: 84px; }
.cf-group.grow { flex: 1 1 250px; } .cf-row .field.w-rule { min-width: 170px; }
.cf-row .field.w-rule select { padding-left: 10px; padding-right: 30px !important; } .cf-row .field.w-small { width: 70px; }

/* =====================================================================
   3.1 – orzekanie (tryby, klient, ISO 286, wiele charakterystyk), hurt,
   raport audytora, powiadomienia, wydruki, podgląd PDF z zaznaczeniem
   ===================================================================== */
.cf-context { display: flex; flex-wrap: wrap; gap: 12px 16px; align-items: flex-end; padding-bottom: 14px; margin-bottom: 14px; border-bottom: 1px solid var(--border); }
.cf-context .field { margin: 0; } .cf-context .w-client { width: 250px; } .cf-context .w-ref { width: 220px; } .cf-context .w-inst { flex: 1; min-width: 220px; } .cf-context .w-small2 { width: 100px; } .cf-context .w-small3 { width: 160px; }
.seg { display: inline-flex; background: #eef2f7; border-radius: 10px; padding: 3px; gap: 2px; align-self: flex-end; height: 38px; }
.seg-b { border: 0; background: none; padding: 0 14px; border-radius: 8px; font: inherit; font-size: 13px; font-weight: 600; color: var(--text-2); cursor: pointer; white-space: nowrap; }
.seg-b.on { background: #fff; color: var(--text); box-shadow: 0 1px 3px #0f2a5226; }
.client-note { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 10px 12px; border-radius: 8px; background: var(--ok-bg); border: 1px solid var(--ok-bd); color: var(--ok-fg); font-size: 13px; margin-bottom: 14px; }
.client-note.dev { background: var(--warn-bg); border-color: var(--warn-bd); color: var(--warn-fg); }
.client-note > span { flex: 1 1 320px; } .client-note input { flex: 1 1 280px; height: 34px; border: 1px solid var(--warn-bd); border-radius: 7px; padding: 0 10px; background: #fff; }
.cf-row .field.w-fit { width: 130px; } .cf-row .u-suggest { height: var(--ctl-h); white-space: nowrap; }
.fit-hint { margin-top: 6px; min-height: 16px; max-width: 520px; }
.cf-rows { margin-top: 16px; }
.rows-t input { width: 100%; min-width: 60px; height: 34px; border: 1px solid var(--border-strong); border-radius: 7px; padding: 0 8px; background: #fff; font: inherit; }
.rows-t input.strong { font-weight: 700; } .rows-t input:disabled { background: var(--surface-2); color: var(--text-3); }
.rows-t td { padding: 6px 6px; vertical-align: middle; } .rows-t td:first-child input { min-width: 150px; } .rows-t .w-fit-in { min-width: 90px; }
.row-res { min-width: 150px; } .row-res .pill { white-space: nowrap; }
.multi-v { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; text-align: left; }
.mv-counts { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; } .mv-counts > span { display: inline-flex; gap: 4px; align-items: center; font-weight: 700; color: var(--text); }
.minibar { width: 180px; height: 18px; display: block; } .mb-rej { fill: #f8d4d4; } .mb-guard { fill: #f8e3b8; } .mb-acc { fill: #c9ebd6; } .mb-u { stroke: #1d3f8f; stroke-width: 2; } .mb-y { fill: #0f1b2e; stroke: #fff; stroke-width: 1.5; }
.lg.dot { width: 10px; height: 10px; border-radius: 50%; background: #0f1b2e; }
.grid.kpis.four { grid-template-columns: repeat(4, minmax(0, 1fr)); } .grid.kpis.five { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.r-glob { border-left-color: #7c4dd6; }
.kpi-card.mini { padding: 14px 16px; text-decoration: none; } .kpi-card.mini .kpi-num { font-size: 22px; }
.sug { border: 1px solid var(--border); border-radius: 10px; padding: 12px 14px; margin-bottom: 10px; } .sug h3 { margin: 0 0 6px; font-size: 14px; } .sug h3 .muted { font-weight: 500; margin-left: 8px; } .sug ul { margin: 0; padding-left: 18px; font-size: 13px; color: var(--text-2); }
.rep-sec { margin-top: 18px; } .rep-t tr.hl td { background: #fff7f5; } .rep-t td { font-size: 12.5px; }
.nt-rec { border: 1px solid var(--border); border-radius: 10px; padding: 10px 12px; margin-top: 10px; }
.nt-head { display: flex; gap: 10px; align-items: center; } .avatar.sm { width: 30px; height: 30px; flex-basis: 30px; font-size: 11px; }
.nt-rec ul { margin: 8px 0 0; padding-left: 18px; font-size: 13px; } .nt-rec li { margin: 3px 0; } .nt-rec li.k-PO_TERMINIE, .nt-rec li.k-OCENA_WPLYWU { color: var(--crit-fg); } .nt-rec li.k-ZWROT, .nt-rec li.k-TERMIN { color: var(--warn-fg); } .nt-rec li.sent { color: var(--text-3); }
.mail-frame { width: 100%; height: 420px; border: 1px solid var(--border); border-radius: 8px; background: #fff; }

/* podgląd PDF i źródło odczytu */
.pdfv { display: flex; flex-direction: column; gap: 12px; align-items: center; }
.pdfv-load { display: flex; flex-direction: column; gap: 10px; align-items: center; padding: 60px 0; }
.pdfv-page { position: relative; box-shadow: 0 6px 20px -12px #0f2a5255; border: 1px solid #dde3ea; background: #fff; }
.pdfv-page canvas { display: block; }
.pdfv-ov { position: absolute; inset: 0; pointer-events: none; }
.ev-box { position: absolute; border: 2px solid var(--primary); background: #e8670f22; border-radius: 4px; box-shadow: 0 0 0 4px #e8670f26; animation: evp 1.2s ease-out 1; }
@keyframes evp { 0% { box-shadow: 0 0 0 12px #e8670f00; } 40% { box-shadow: 0 0 0 6px #e8670f40; } 100% { box-shadow: 0 0 0 4px #e8670f26; } }
.ev-note { margin-top: 10px; font-size: 12.5px; color: var(--text-2); background: var(--surface-2); border: 1px solid var(--border); border-radius: 8px; padding: 8px 10px; }
.cert-mock .ev-on, .cert-mock tr.ev-on td, .cert-mock tr.ev-on th { background: #fde8d8 !important; outline: 2px solid var(--primary); outline-offset: -2px; }

/* wydruki A4 (Drukuj → Zapisz jako PDF) */
.print-doc { font-family: 'Inter PM', Inter, 'Segoe UI', Arial, sans-serif; color: #111; font-size: 10.5pt; }
.print-doc .pd-head { display: flex; justify-content: space-between; align-items: flex-start; border-bottom: 2px solid #1f3b63; padding-bottom: 8px; }
.print-doc .pd-head img { height: 34px; } .print-doc .pd-no { text-align: right; font-size: 9pt; line-height: 1.5; }
.print-doc h1 { font-size: 15pt; text-align: center; letter-spacing: .5px; margin: 14px 0 10px; } .print-doc h2 { font-size: 11pt; margin: 14px 0 6px; border-bottom: 1px solid #ccc; padding-bottom: 3px; }
.print-doc .pd-verdict { display: flex; gap: 12px; align-items: baseline; justify-content: center; padding: 8px; border: 1.5px solid; border-radius: 6px; margin-bottom: 10px; font-size: 12pt; } .print-doc .pd-verdict b { font-size: 15pt; }
.print-doc table { width: 100%; border-collapse: collapse; margin-bottom: 8px; }
.print-doc .pd-kv th { text-align: left; width: 34%; font-weight: 600; color: #444; background: none; text-transform: none; letter-spacing: 0; font-size: 9.5pt; }
.print-doc .pd-kv th, .print-doc .pd-kv td, .print-doc .pd-t th, .print-doc .pd-t td { border: 0.6pt solid #bbb; padding: 4px 6px; font-size: 9.5pt; }
.print-doc .pd-t th { background: #eef1f5; font-weight: 700; color: #222; text-transform: none; letter-spacing: 0; }
.print-doc .pd-grid { display: grid; grid-template-columns: 1fr 1.25fr; gap: 10px; align-items: start; } .print-doc .pd-chart .legend { font-size: 8pt; } .print-doc .cf-chart { max-height: none; }
.print-doc .pd-stmt { border: 0.8pt solid #999; padding: 8px 10px; border-radius: 4px; line-height: 1.5; margin: 10px 0; }
.print-doc .pd-sign { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; margin-top: 26px; } .print-doc .pd-sign div { display: flex; flex-direction: column; gap: 4px; } .print-doc .pd-sign span { font-size: 9pt; color: #555; } .print-doc .pd-sign i { border-bottom: 0.8pt solid #333; height: 30px; }
.print-doc .pd-foot { margin-top: 18px; font-size: 8pt; color: #666; border-top: 0.6pt solid #ccc; padding-top: 6px; }
.print-doc.report .pd-t td { font-size: 8.5pt; }
@media print {
  body.print-doc-mode .appbar, body.print-doc-mode aside, body.print-doc-mode main { display: none !important; }
  body.print-doc-mode #printArea { display: block !important; padding: 0; }
  body.print-doc-mode { background: #fff; }
  /* rozmiar strony ustawia każdy wydruk osobno (styl w #printArea) */
  .print-doc .pd-t tr { break-inside: avoid; }
}
@media (max-width: 1320px) { .grid.kpis.five { grid-template-columns: repeat(3, minmax(0, 1fr)); } .grid.kpis.four { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 680px) { .grid.kpis.five, .grid.kpis.four { grid-template-columns: 1fr 1fr; } .cf-context .w-client, .cf-context .w-ref, .cf-context .w-inst { width: 100%; } .seg { width: 100%; } .seg-b { flex: 1; padding: 0 6px; } }
.cf-grid { align-items: flex-start; } .cf-context .w-client { width: 230px; } .cf-context .w-ref { width: 200px; } .cf-context .w-inst { min-width: 200px; }
.nowrap { white-space: nowrap; }
@media (max-width: 680px) { .cf-context .w-client, .cf-context .w-ref, .cf-context .w-inst, .cf-context .w-small3 { width: 100%; } }

/* ===================== 3.2.1 – pasek górny, przycisk edycji, warianty interwału ===================== */
/* Pasek górny */
.appbar-right { gap: 8px; }
.asof { position: relative; height: 44px; gap: 10px; padding: 0 14px 0 6px; margin-right: 4px; border: 1px solid var(--border-strong); border-radius: 10px; background: #fff; cursor: pointer; transition: border-color .15s, box-shadow .15s; }
.asof:hover { border-color: #b9c6d8; }
.asof-ico { width: 32px; height: 32px; border-radius: 8px; background: var(--primary-50); color: var(--primary-ink); display: inline-flex; align-items: center; justify-content: center; flex: 0 0 32px; }
.asof-txt { display: flex; flex-direction: column; line-height: 1.1; }
.asof-lbl { font-size: 10.5px; font-weight: 700; letter-spacing: .5px; text-transform: uppercase; color: var(--text-3); }
.asof input { height: 20px; padding: 0; font-size: 14px; font-weight: 700; color: var(--text); font-variant-numeric: tabular-nums; cursor: pointer; width: 108px; }
.asof input::-webkit-calendar-picker-indicator { position: absolute; inset: 0; width: auto; height: auto; opacity: 0; cursor: pointer; }
.asof input::-webkit-datetime-edit-fields-wrapper { padding: 0; }
.asof-hist { height: 26px; display: inline-flex; align-items: center; padding: 0 10px; border-radius: 999px; font-size: 11.5px; font-weight: 700; border: 1px solid #f3d38a; }
.tb-tools { display: inline-flex; align-items: center; gap: 2px; }
.tbbtn { width: 40px; height: 40px; border-radius: 10px; border: 0; background: transparent; color: #44546a; display: inline-flex; align-items: center; justify-content: center; cursor: pointer; transition: background .15s, color .15s; }
.tbbtn .ico { width: 20px; height: 20px; flex-basis: 20px; stroke-width: 1.7; }
.tbbtn:hover { background: #f1f4f8; color: var(--primary-ink); }
.tbbtn:focus-visible, .userchip:focus-visible, .editbtn:focus-visible { outline: none; box-shadow: 0 0 0 3px #e8670f33; }
.tb-sep { width: 1px; height: 28px; background: var(--border); margin: 0 6px; }
.userchip { display: inline-flex; align-items: center; gap: 10px; height: 44px; padding: 0 10px 0 4px; border: 0; border-radius: 12px; background: transparent; cursor: pointer; text-align: left; transition: background .15s; }
.userchip:hover { background: #f1f4f8; }
.avatar { width: 36px; height: 36px; border-radius: 50%; background: linear-gradient(135deg, #f08a3c, #d65a08); color: #fff; font-size: 13px; font-weight: 800; letter-spacing: .3px; display: inline-flex; align-items: center; justify-content: center; flex: 0 0 36px; box-shadow: inset 0 0 0 2px #ffffff55; }
.userchip .who { align-items: flex-start; margin: 0; }
.userchip .who strong { font-size: 13.5px; }
.userchip .who span { font-size: 12px; }
.userchip .chev { color: var(--text-3); }
.btn.logout { height: 40px; padding: 0 14px; margin-left: 4px; border-radius: 10px; border: 1px solid var(--border-strong); background: #fff; color: #33445c; font-weight: 600; gap: 8px; }
.btn.logout:hover { background: #fff5ee; border-color: #f2c4a2; color: var(--primary-ink); }
@media (max-width: 1320px) { .asof > span { display: inline-flex !important; } .asof-txt { display: flex !important; } }
@media (max-width: 1180px) { .userchip .who, .userchip .chev { display: none !important; } .btn.logout span { display: none; } .btn.logout { padding: 0 11px; } }
@media (max-width: 860px) { .tb-sep { display: none; } .asof-lbl { display: none; } .asof { height: 40px; padding-right: 10px; } }
@media (max-width: 680px) { .asof, .tb-tools > :not([data-act=scanQr]) { display: none !important; } /* na telefonie zostaje aparat do etykiet QR */ .userchip { padding: 0; } .avatar { width: 34px; height: 34px; flex-basis: 34px; } }

/* Przycisk „Edytuj” w rejestrze */
.editbtn { display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 11px 0 9px; border: 1px solid var(--border-strong); border-radius: 8px; background: #fff; color: #33445c; font: inherit; font-size: 12.5px; font-weight: 600; cursor: pointer; white-space: nowrap; transition: background .15s, border-color .15s, color .15s; }
.editbtn .ico { color: var(--primary); }
.editbtn:hover { background: var(--primary-50); border-color: #f2c4a2; color: var(--primary-ink); }
tr.clickable:hover .editbtn { border-color: #c9d4e2; }
table.reg .w-act { width: 104px; }
table.reg td.t-actions { padding-right: 14px; }
@media (max-width: 1240px) { table.reg .w-act { width: 56px; } .editbtn span { display: none; } .editbtn { width: 34px; padding: 0; justify-content: center; } }

/* Warianty interwału */
.card-sub { margin: 4px 0 14px; font-size: 13px; color: var(--text-3); }
table.scen { width: 100%; table-layout: fixed; }
table.scen col.c-int { width: 150px; } table.scen col.c-st { width: 150px; } table.scen col.c-n { width: 96px; } table.scen col.c-lim { width: 150px; } table.scen col.c-p { width: 92px; }
table.scen th { white-space: normal; vertical-align: bottom; line-height: 1.25; }
table.scen .th-sub { font-size: 11px; font-weight: 500; color: var(--text-3); text-transform: none; letter-spacing: 0; }
table.scen td { vertical-align: middle; padding-top: 12px; padding-bottom: 12px; }
table.scen td.num { white-space: nowrap; font-variant-numeric: tabular-nums; }
.scen-T { display: block; font-weight: 700; color: var(--text); white-space: nowrap; }
.scen-tags { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 4px; }
.scen-tag { display: inline-flex; align-items: center; height: 19px; padding: 0 7px; border-radius: 999px; font-size: 10.5px; font-weight: 700; background: #eef2f7; color: #4b5a70; white-space: nowrap; }
.scen-tag.rec { background: var(--primary); color: #fff; }
.scen-tag.eco { background: var(--ok-bg); color: var(--ok-fg); }
tr.selected td { background: #fff6ef; }
tr.selected td:first-child { box-shadow: inset 3px 0 0 var(--primary); }
.lim { display: inline-flex; flex-direction: column; align-items: flex-end; gap: 5px; }
.lim-v { font-weight: 600; }
.lim.crit .lim-v { color: var(--crit-fg, #b42318); font-weight: 700; }
.lim-bar { position: relative; display: block; width: 92px; height: 5px; border-radius: 3px; background: #edf1f6; overflow: hidden; }
.lim-bar i { position: absolute; inset: 0 auto 0 0; border-radius: 3px; background: #2f9e6a; }
.lim.warn .lim-bar i { background: #e2a23a; } .lim.crit .lim-bar i { background: #d64545; }
.lim-bar b { position: absolute; top: 0; bottom: 0; left: 80%; width: 1.5px; background: #1e3a5f88; }
.scen-why { font-size: 12.5px; line-height: 1.45; color: var(--text-2, #3c4a5e); }
.scen-more { display: inline-flex; align-items: center; height: 18px; padding: 0 6px; margin-left: 2px; border-radius: 999px; background: #eef2f7; color: #4b5a70; font-size: 10.5px; font-weight: 700; cursor: help; }
@media (max-width: 1240px) { table.scen { table-layout: auto; min-width: 900px; } }
.asof-hist[hidden] { display: none !important; }
table.scen col.c-int { width: 128px; } table.scen col.c-st { width: 142px; } table.scen col.c-n { width: 84px; } table.scen col.c-lim { width: 138px; } table.scen col.c-p { width: 82px; }
table.scen td { padding-top: 10px; padding-bottom: 10px; }
.scen-why { font-size: 12.5px; line-height: 1.4; }

/* ===================== 3.3 – pliki karty przyrządu, zdjęcie i QR w nagłówku ===================== */
.card-hero.hero2 { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: start; gap: 24px; }
.hero-main { min-width: 0; padding-top: 4px; }
.hero-side { display: flex; flex-direction: column; align-items: flex-end; gap: 14px; }
.hero-photo { position: relative; width: 136px; height: 136px; border-radius: 14px; border: 1px solid var(--border); background: #f3f6f9; padding: 0; overflow: hidden; cursor: zoom-in; display: flex; align-items: center; justify-content: center; }
.hero-photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.hero-photo:hover { border-color: #c9d4e2; box-shadow: 0 6px 18px -10px #0f2a5240; }
.hero-photo.empty { flex-direction: column; gap: 6px; border: 2px dashed #cfd8e3; color: var(--text-3); font-size: 12.5px; font-weight: 600; cursor: pointer; text-align: center; }
.hero-photo.empty .ico { width: 26px; height: 26px; flex-basis: 26px; color: #9aa7b8; }
label.hero-photo.empty:hover, .hero-photo.empty.over { border-color: var(--primary); background: var(--primary-50); color: var(--primary-ink); }
div.hero-photo.empty { cursor: default; }
.hp-count { position: absolute; right: 6px; bottom: 6px; display: inline-flex; align-items: center; gap: 4px; height: 22px; padding: 0 7px; border-radius: 999px; background: #0f1b2ecc; color: #fff; font-size: 11px; font-weight: 700; }
.hp-count .ico { width: 13px; height: 13px; flex-basis: 13px; }
.hero-qr { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 6px 6px 5px; border: 1px solid var(--border); border-radius: 10px; background: #fff; cursor: pointer; color: var(--text-3); font: inherit; font-size: 11px; font-weight: 600; }
.hero-qr svg[role=img] { display: block; }
.hero-qr span { display: inline-flex; align-items: center; gap: 4px; }
.hero-qr:hover { border-color: #f2c4a2; color: var(--primary-ink); }
@media (max-width: 1100px) { .card-hero.hero2 { grid-template-columns: auto minmax(0, 1fr); } .hero-side { grid-column: 1 / -1; flex-direction: row-reverse; justify-content: space-between; align-items: flex-end; } .hero-qr svg[role=img] { width: 64px; height: 64px; } }
@media (max-width: 680px) { .card-hero.hero2 { gap: 14px; } .hero-photo { width: 88px; height: 88px; border-radius: 10px; } .hero-photo.empty span { font-size: 11px; } .hero-qr { display: none; } .hero-side { flex-direction: column; align-items: stretch; } }

.fimg { background: #eef2f6; }
.fimg-miss { display: flex; align-items: center; justify-content: center; width: 100%; height: 100%; font-size: 11px; color: var(--text-3); }
.ftype { display: inline-flex; align-items: center; justify-content: center; min-width: 40px; height: 26px; padding: 0 6px; border-radius: 6px; font-size: 10.5px; font-weight: 800; letter-spacing: .4px; background: #eef2f7; color: #4b5a70; }
.ftype.pdf { background: #fdecec; color: #b4283a; } .ftype.doc { background: #e8f0fd; color: #1f4f8f; } .ftype.xls { background: #e6f5ed; color: #19734a; } .ftype.img { background: var(--primary-50); color: var(--primary-ink); }
.ftype .ico { width: 15px; height: 15px; flex-basis: 15px; }

.fu-drop { padding: 26px 20px; }
.dz-hint { font-size: 12px; color: var(--text-3); }
.dropzone.busy { opacity: .8; }
.fu-stage { margin-top: 16px; }
.fu-stage-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 10px; margin-bottom: 8px; }
.fu-t td { vertical-align: middle; } .fu-t .fu-in { width: 100%; min-width: 140px; height: 36px; font-weight: 500; text-align: left; }
.fu-t tr.fu-err td { background: #fff7f7; }
.fu-stage-foot { justify-content: flex-end; gap: 8px; margin-top: 12px; }
.note-hist { display: flex; align-items: center; gap: 8px; padding: 10px 14px; margin-bottom: 16px; border-radius: 10px; background: var(--warn-bg); color: var(--warn-fg); font-size: 13px; }

.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 16px; }
.gal-item { margin: 0; }
.gal-item button { position: relative; display: block; width: 100%; aspect-ratio: 4 / 3; padding: 0; border: 1px solid var(--border); border-radius: 12px; overflow: hidden; background: #f3f6f9; cursor: zoom-in; }
.gal-item img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .25s; }
.gal-item button:hover img { transform: scale(1.03); }
.gal-item.main button { border: 2px solid var(--primary); }
.gal-main { position: absolute; left: 8px; top: 8px; height: 22px; display: inline-flex; align-items: center; padding: 0 8px; border-radius: 999px; background: var(--primary); color: #fff; font-size: 11px; font-weight: 700; }
.gal-item figcaption { display: flex; flex-direction: column; margin-top: 8px; font-size: 13px; line-height: 1.35; }
.gal-item figcaption span { font-size: 12px; color: var(--text-3); }
.files-tab > * + * { margin-top: 18px; }
.modal.wide:has(.fv) { width: min(1240px, 100%); }
.card-head h2 .tabcount { vertical-align: 2px; }
.fu-filters { margin: 4px 0 12px; }
table.files-t { width: 100%; }
table.files-t .w-ft { width: 56px; } table.files-t .w-fc { width: 22%; } table.files-t .w-fd { width: 15%; } table.files-t .w-fa { width: 150px; }
table.files-t td { vertical-align: middle; }
tr.f-arch td { opacity: .7; }
.f-acts { display: inline-flex; gap: 6px; }
.fbtn { display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 10px; border: 1px solid var(--border-strong); border-radius: 8px; background: #fff; color: #33445c; font: inherit; font-size: 12.5px; font-weight: 600; cursor: pointer; }
.fbtn .ico { color: var(--primary); }
.fbtn:hover { background: var(--primary-50); border-color: #f2c4a2; color: var(--primary-ink); }
@media (max-width: 860px) { table.files-t .w-fc, table.files-t .w-fd { display: none; } .fbtn span { display: none; } table.files-t .w-fa { width: 90px; } }

.doc-mini { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.doc-mini li + li { border-top: 1px solid var(--border); }
.doc-mini button { display: flex; align-items: center; gap: 12px; width: 100%; padding: 10px 4px; border: 0; background: none; text-align: left; font: inherit; cursor: pointer; border-radius: 8px; }
.doc-mini button:hover { background: #f6f8fb; }
.dm-t { display: flex; flex-direction: column; min-width: 0; } .dm-t strong { font-size: 13.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; } .dm-t span { font-size: 12px; color: var(--text-3); }
.empty-mini { padding: 14px 0 4px; color: var(--text-3); font-size: 13px; }
.linkbtn { border: 0; background: none; padding: 0; font: inherit; color: var(--link, #1f4f8f); font-weight: 600; cursor: pointer; text-decoration: underline; }

.fv { display: grid; grid-template-columns: minmax(0, 1fr) 280px; gap: 20px; }
.fv-stage { min-height: 60vh; max-height: 72vh; border-radius: 10px; background: #1b2433; display: flex; align-items: center; justify-content: center; overflow: hidden; }
.fv-stage img { max-width: 100%; max-height: 72vh; object-fit: contain; display: block; }
.fv-stage iframe { width: 100%; height: 72vh; border: 0; background: #fff; }
.fv-stage pre { width: 100%; height: 72vh; margin: 0; padding: 16px; overflow: auto; background: #fff; font-size: 12.5px; }
.fv-stage .spinner { border-color: #ffffff33; border-top-color: #fff; }
.fv-stage .empty-mini { color: #c9d4e2; }
.fv-side { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.dl.tight dt, .dl.tight dd { padding-top: 6px; padding-bottom: 6px; font-size: 13px; }
.dl.tight { grid-template-columns: 96px minmax(0, 1fr); }
.dl.tight dd { word-break: break-word; }
.sha { font-size: 11.5px; }
.fv-acts { display: flex; flex-direction: column; gap: 8px; } .fv-acts .btn { justify-content: flex-start; }
.btn.danger-ghost { color: var(--crit-fg); } .btn.danger-ghost:hover { background: var(--crit-bg); border-color: var(--crit-bd); }
.fv-nav { display: flex; align-items: center; justify-content: space-between; margin-top: auto; padding-top: 8px; border-top: 1px solid var(--border); }
@media (max-width: 860px) { .fv { grid-template-columns: 1fr; } .fv-stage { min-height: 40vh; } .fv-stage iframe, .fv-stage pre { height: 55vh; } }
.card-hero.hero2 .hero-actions { justify-content: flex-start; margin-top: 16px; padding-top: 16px; border-top: 1px solid var(--border); }
.card-hero.hero2 h1 { line-height: 1.15; }
.hero-photo { width: 156px; height: 156px; }
@media (max-width: 1100px) { .card-hero.hero2 { grid-template-columns: auto minmax(0, 1fr) auto; } .hero-side { grid-column: auto; flex-direction: column; } .hero-photo { width: 120px; height: 120px; } }
@media (max-width: 680px) { .card-hero.hero2 { grid-template-columns: auto minmax(0, 1fr); } .hero-side { display: none; } .card-hero.hero2 .hero-actions { margin-left: calc(-88px - 14px); } .hero-photo { width: 88px; height: 88px; } }
.fv-stage.pdf { display: block; overflow: auto; padding: 20px; background: #525a66; text-align: center; }
.fv-page { display: block; margin: 0 auto 16px; background: #fff; box-shadow: 0 4px 18px #0006; }
.dropzone.fu-drop { flex-direction: row; justify-content: flex-start; text-align: left; padding: 18px 20px; gap: 16px; }
.fu-drop .dz-ico { margin: 0; flex: 0 0 auto; }
.fu-txt { display: flex; flex-direction: column; gap: 3px; flex: 1 1 auto; min-width: 0; }
.fu-drop > .btn { flex: 0 0 auto; }
@media (max-width: 680px) { .dropzone.fu-drop { flex-wrap: wrap; } .fu-drop > .btn { width: 100%; justify-content: center; } }

/* ===================== 3.4 – kalkulator kosztu skutków przekroczenia MPE ===================== */
.fc-inrow { display: flex; gap: 8px; } .fc-inrow input { flex: 1 1 auto; min-width: 0; } .fc-inrow .btn { flex: 0 0 auto; }
.fc-meta { font-size: 12px; color: var(--ok-fg); margin-top: 4px; min-height: 0; } .fc-meta:empty { display: none; } .fc-meta.warn { color: var(--warn-fg); }
.fc-panel { grid-column: 1 / -1; border: 1px solid #f2c4a2; background: #fffaf6; border-radius: 12px; padding: 16px 18px; }
.fc-head { display: flex; justify-content: space-between; gap: 12px; margin-bottom: 12px; } .fc-head > div { display: flex; flex-direction: column; gap: 3px; } .fc-head span { font-size: 12.5px; color: var(--text-3); }
.fc-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.fc-g { margin: 0; border: 1px solid var(--border); border-radius: 10px; padding: 10px 12px 12px; background: #fff; min-width: 0; }
.fc-g legend { padding: 0 6px; font-size: 11.5px; font-weight: 700; letter-spacing: .4px; text-transform: uppercase; color: var(--primary-ink); }
.fc-fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px 12px; } .fc-fields .span2 { grid-column: 1 / -1; }
.fc-fields .field label { font-size: 12px; } .fc-fields .unit { color: var(--text-3); font-weight: 500; }
.fc-hint { font-size: 12px; color: var(--text-3); line-height: 1.4; }
.fc-result { margin-top: 14px; background: #fff; border: 1px solid var(--border); border-radius: 10px; padding: 6px 14px 12px; }
.fc-t { width: 100%; border-collapse: collapse; } .fc-t td { padding: 7px 4px; border-bottom: 1px solid #edf1f6; font-size: 13px; } .fc-t td.num { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.fc-t tfoot td { border-bottom: 0; padding-top: 10px; font-size: 14px; }
.fc-acts { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin-top: 10px; } .fc-btns { display: flex; gap: 8px; }
@media (max-width: 860px) { .fc-grid, .fc-fields { grid-template-columns: 1fr; } }
.fc-t { table-layout: auto; } .fc-t td { white-space: normal; } .fc-t td:nth-child(2) { word-break: break-word; }
@media (max-width: 680px) { .fc-t tbody td:nth-child(2) { display: none; } .fc-panel { padding: 12px; } .fc-acts .btn { width: 100%; justify-content: center; } .fc-btns { width: 100%; flex-direction: column; } }
.fc-panel table.fc-t { min-width: 0 !important; width: 100%; }
.fc-grid { align-items: start; }

/* ===================== 3.5 – ponowna ocena ryzyka ===================== */
.rk-top { justify-content: space-between; align-items: flex-start; gap: 20px; }
.rk-right { display: flex; flex-direction: column; align-items: flex-end; gap: 8px; text-align: right; }
.rk-right .btn { margin-top: 6px; white-space: nowrap; }
.rk-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 16px; margin-top: 10px; font-size: 13px; color: var(--text-2); }
.card.rk-editing { border-color: #f2c4a2; box-shadow: 0 0 0 3px #e8670f1a; }
.rk-banner { margin-top: 14px; padding: 9px 12px; border-radius: 8px; background: var(--primary-50); color: var(--primary-ink); font-size: 13px; font-weight: 600; }
.risk-grid .field.rk-changed select { border-color: var(--primary); background: #fff8f2; font-weight: 600; }
.rk-was { display: block; font-weight: 500; color: var(--primary-ink); font-size: 11.5px; margin-top: 2px; }
.rk-edit { margin-top: 18px; padding-top: 18px; border-top: 1px solid var(--border); }
.rk-cmp { width: 100%; max-width: 760px; border-collapse: collapse; }
.rk-cmp th { text-align: left; font-size: 12px; color: var(--text-3); font-weight: 600; padding: 6px 10px; border-bottom: 1px solid var(--border); }
.rk-cmp td { padding: 8px 10px; border-bottom: 1px solid #edf1f6; font-size: 13px; }
.rk-cmp td:first-child { color: var(--text-3); width: 30%; }
.rk-cmp tr.rk-diff td { background: #fff8f2; } .rk-cmp tr.rk-diff td:first-child { color: var(--primary-ink); font-weight: 600; box-shadow: inset 3px 0 0 var(--primary); }
.rk-same { margin-top: 8px; }
#riskPv .notice { margin-top: 10px; max-width: 760px; padding: 9px 12px; }
.rk-form { margin-top: 16px; max-width: 760px; } .rk-form textarea { width: 100%; resize: vertical; }
.rk-note { justify-content: flex-end; font-size: 12px; color: var(--text-3); line-height: 1.45; }
.req { color: var(--crit-fg); }
.rk-acts { justify-content: flex-start; gap: 8px; margin-top: 12px; }
.rk-hist { margin-top: 16px; border-top: 1px solid var(--border); padding-top: 12px; }
.rk-hist summary { cursor: pointer; font-weight: 700; font-size: 14px; list-style: revert; }
.rk-ht { margin-top: 10px; } .rk-ht td { vertical-align: top; } .rk-ht .pill { margin: 1px 0; }
@media (max-width: 860px) { .rk-top { flex-direction: column; } .rk-right { align-items: flex-start; text-align: left; flex-direction: row; flex-wrap: wrap; align-items: center; } }

/* ===================== 3.5 – widok historyczny (zamiast pola „Data oceny” na pasku) ===================== */
.hist-bar[hidden] { display: none !important; }
.hist-bar { display: inline-flex; align-items: stretch; height: 40px; border-radius: 10px; overflow: hidden; border: 1px solid #f3d38a; background: var(--warn-bg); margin-right: 6px; }
.hist-main { display: inline-flex; align-items: center; gap: 8px; padding: 0 12px; border: 0; background: none; color: var(--warn-fg); font: inherit; font-size: 13px; cursor: pointer; white-space: nowrap; }
.hist-main strong { font-variant-numeric: tabular-nums; }
.hist-main:hover { background: #fdf0c8; }
.hist-off { border: 0; border-left: 1px solid #f3d38a; background: #fff; color: #33445c; font: inherit; font-size: 12.5px; font-weight: 700; padding: 0 12px; cursor: pointer; white-space: nowrap; }
.hist-off:hover { background: #fff8f0; color: var(--primary-ink); }
body.hist-mode main { box-shadow: inset 0 3px 0 #f0b429; }
.um-sec { margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--border); }
.um-item { display: flex; align-items: center; gap: 12px; width: 100%; padding: 10px 12px; border: 1px solid var(--border); border-radius: 10px; background: #fff; text-align: left; font: inherit; cursor: pointer; }
.um-item:hover { border-color: #f2c4a2; background: var(--primary-50); }
.um-item .ico { color: var(--primary); width: 20px; height: 20px; flex-basis: 20px; }
.um-item > span { display: flex; flex-direction: column; gap: 2px; } .um-item > span > span { font-size: 12px; color: var(--text-3); }
.hist-uses { margin: 12px 0 16px; padding-left: 18px; font-size: 13px; line-height: 1.6; color: var(--text-2); }
@media (max-width: 1180px) { .hist-main span { display: none; } }
@media (max-width: 680px) { .hist-bar { height: 34px; } .hist-off { padding: 0 8px; font-size: 11.5px; } .hist-main { padding: 0 8px; } }
.row.rk-top { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: start; }
@media (max-width: 860px) { .row.rk-top { grid-template-columns: 1fr; } }

/* ===================== 3.6 – konfiguracja oceny ryzyka ===================== */
.rc-formula { display: flex; flex-direction: column; gap: 4px; padding: 12px 14px; margin-bottom: 14px; border-radius: 10px; background: #f6f8fb; border: 1px solid var(--border); }
.rc-formula > span:first-child { font-weight: 700; font-size: 14px; }
.rc-t { width: 100%; } .rc-t th { white-space: nowrap; } .rc-t td { vertical-align: top; padding: 6px 6px; }
.rc-t .rc-name { width: 22%; } .rc-t .rc-w { width: 76px; }
.rc-in { width: 100%; min-width: 90px; height: 36px; border: 1px solid var(--border-strong); border-radius: 7px; padding: 0 9px; font: inherit; font-size: 12.5px; background: #fff; }
.rc-in.num { text-align: right; min-width: 56px; font-weight: 700; }
.rc-in:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px #e8670f24; }
.rc-in:disabled { background: #f6f8fb; color: var(--text-2); }
tr.rc-stab td { background: #fbfcfd; }
.rc-cls { margin-top: 16px; }
.rc-scale { display: flex; height: 26px; margin-top: 12px; border-radius: 8px; overflow: hidden; font-size: 11px; font-weight: 700; }
.rc-scale .z { display: flex; align-items: center; justify-content: center; white-space: nowrap; overflow: hidden; min-width: 0; }
.rc-scale .lo { background: var(--ok-bg); color: var(--ok-fg); } .rc-scale .mid { background: var(--warn-bg); color: var(--warn-fg); } .rc-scale .hi { background: var(--crit-bg); color: var(--crit-fg); }
.set-pv { margin-top: 16px; border: 1px solid #f2c4a2; border-radius: 12px; padding: 12px 14px; background: #fffaf6; }
.set-pv-h { display: flex; flex-wrap: wrap; gap: 6px 14px; align-items: baseline; margin-bottom: 8px; } .set-pv-h span { font-size: 13px; color: var(--text-2); }
@media (max-width: 1100px) { .rc-t { min-width: 900px; } }

/* ===================== 3.6 – logowanie ===================== */
:root { --ok-zone: #2e7d5b; --tol-zone: #22385a; --ink-soft: #b9c7dc; }
.login-screen[hidden] { display: none !important; }
.login-screen { position: fixed; inset: 0; z-index: 200; display: grid; grid-template-columns: minmax(380px, 5fr) 7fr; background: var(--surface); overflow-y: auto; }
body.auth { overflow: hidden; }
/* lewy panel – jak PROMETROLOG: ciemne tło z siatką, wskaźnik, hasło i zapewnienia */
.auth-brand { position: relative; display: flex; flex-direction: column; gap: 40px; padding: 44px 52px; min-height: 100%; color: #e6edf7; overflow: hidden;
  background-color: var(--brand-900); background-image: linear-gradient(#ffffff08 1px, transparent 1px), linear-gradient(90deg, #ffffff08 1px, transparent 1px); background-size: 28px 28px; }
.ab-top { display: flex; align-items: center; }
.ab-logo { width: 230px; height: auto; display: block; }
.ab-gauge { margin-top: auto; }
.gauge { width: min(420px, 100%); height: auto; display: block; }
.g-band { fill: var(--tol-zone); } .g-ok { fill: var(--ok-zone); }
.g-nominal { stroke: #ffffff80; stroke-width: 1; stroke-dasharray: 3 4; }
.g-ticks line { stroke: #ffffff59; stroke-width: 1; } .g-ticks line.major { stroke: #ffffffb3; }
.g-pm { fill: #e8670f; } .g-fail { fill: #d64545; }
.g-now { stroke: #fff; stroke-width: 2; stroke-linecap: round; transition: transform 1.8s cubic-bezier(.2, .8, .2, 1); }
#abSweepR { transition: width 1.8s cubic-bezier(.2, .8, .2, 1); }
.g-lbl { fill: var(--ink-soft); font-size: 11px; font-family: var(--font); }
.ab-reading { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; margin: 6px 0 0; font-variant-numeric: tabular-nums; }
.ab-reading span { font-style: italic; font-size: 20px; color: var(--ink-soft); }
.ab-reading output { font-size: 44px; font-weight: 700; letter-spacing: -.02em; color: #fff; }
.ab-reading small { flex-basis: 100%; color: var(--ink-soft); font-size: 13px; }
.ab-copy h1 { margin: 0 0 14px; font-size: clamp(26px, 2.6vw, 34px); line-height: 1.15; letter-spacing: -.02em; font-weight: 700; color: #fff; max-width: 17ch; }
.ab-copy p { margin: 0; max-width: 46ch; line-height: 1.6; color: #c9d5e6; font-size: 15px; }
.ab-trust { list-style: none; margin: 0; padding: 22px 0 0; border-top: 1px solid #ffffff1f; display: grid; gap: 10px; font-size: 13px; color: var(--ink-soft); }
.ab-trust li { padding-left: 22px; position: relative; }
.ab-trust li::before { content: ""; position: absolute; left: 0; top: 5px; width: 9px; height: 9px; border-radius: 2px; background: var(--ok-zone); }
/* prawy panel – formularz */
.auth-main { display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 40px 24px 24px; background: var(--surface-2); }
.auth-card { width: min(420px, 100%); }
.auth-logo { display: block; width: 260px; max-width: 100%; height: auto; margin: 0 0 36px; }
.auth-step h2 { margin: 0 0 22px; font-size: 24px; letter-spacing: -.01em; font-weight: 700; color: var(--text); }
.auth-p { margin: -8px 0 20px; color: var(--text-2); font-size: 14px; line-height: 1.55; }
.lf { margin-bottom: 16px; }
.lf label { display: block; font-size: 13px; font-weight: 600; color: var(--text-2); margin-bottom: 6px; }
.lf input { width: 100%; height: 46px; border: 1px solid var(--border-strong); border-radius: var(--r-md); padding: 0 14px; font: inherit; font-size: 15px; color: var(--text); background: #fff; transition: border-color .15s, box-shadow .15s; }
.lf input:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-100); }
.pw { position: relative; } .pw input { padding-right: 46px; }
.pw-eye { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); width: 34px; height: 34px; border: 0; border-radius: 8px; background: none; color: var(--text-3); cursor: pointer; display: grid; place-items: center; }
.pw-eye:hover, .pw-eye.on { color: var(--primary-ink); background: var(--primary-50); }
.caps { margin-top: 6px; font-size: 12px; color: var(--warn-fg); }
.login-err { margin: 0 0 18px; padding: 11px 14px; border-radius: var(--r-md); background: var(--crit-bg); border: 1px solid var(--crit-bd); color: var(--crit-fg); font-size: 14px; line-height: 1.45; }
.login-err.ok { background: var(--ok-bg); border-color: #bfe3cf; color: var(--ok-fg); }
.auth-btn { width: 100%; height: 48px; margin-top: 6px; border: 0; border-radius: var(--r-md); background: var(--brand-900); color: #fff; font: inherit; font-size: 15px; font-weight: 600; cursor: pointer; transition: background .15s; }
.auth-btn:hover:not(:disabled) { background: var(--brand-700); }
.auth-btn:focus-visible { outline: none; box-shadow: 0 0 0 4px var(--primary-100); }
.auth-btn:disabled { opacity: .7; cursor: progress; }
.auth-link { display: block; margin: 16px 0 0; padding: 0; border: 0; background: none; color: var(--primary-ink); font: inherit; font-size: 14px; font-weight: 500; text-align: left; cursor: pointer; }
.auth-link:hover { text-decoration: underline; }
.auth-link.subtle { color: var(--text-3); font-weight: 400; margin-top: 12px; }
.login-demo { margin-top: 26px; padding: 12px 14px; border: 1px solid var(--border); border-radius: 12px; background: #fff; font-size: 13px; color: var(--text-2); }
.login-demo button { display: flex; justify-content: space-between; gap: 10px; width: 100%; padding: 6px 8px; border: 0; border-radius: 7px; background: none; font: inherit; font-size: 13px; color: var(--text-2); cursor: pointer; text-align: left; }
.login-demo button:hover { background: var(--primary-50); color: var(--primary-ink); }
.login-demo em { font-style: normal; color: var(--text-3); white-space: nowrap; }
.demo-note { margin: -18px 0 22px; padding: 9px 12px; border-radius: var(--r-sm); background: var(--warn-bg); color: var(--warn-fg); border: 1px solid var(--warn-bd); font-size: 13px; }
.dk-contact { margin: 16px 0 0; font-size: 13.5px; color: var(--text-2); line-height: 1.5; }
.dk-contact a { color: var(--primary-ink); }
.dk-link { display: flex; gap: 8px; align-items: center; margin-top: 12px; }
.dk-link input { flex: 1; min-width: 0; font-family: var(--mono, ui-monospace, monospace); font-size: 12.5px; }
.auth-foot { margin: 36px 0 0; font-size: 12px; color: var(--text-3); }
.auth-foot a { color: inherit; }
@media (max-width: 900px) {
  .login-screen { grid-template-columns: 1fr; }
  .auth-brand { display: none; }
  .auth-main { justify-content: flex-start; padding-top: 32px; }
  .auth-logo { width: 210px; margin-bottom: 26px; }
}
@media (prefers-reduced-motion: reduce) { .g-now, #abSweepR { transition: none; } }
.acct { display: flex; align-items: center; gap: 14px; } .acct > div { display: flex; flex-direction: column; gap: 2px; } .acct span { font-size: 13px; }
.avatar.lg { width: 52px; height: 52px; flex-basis: 52px; font-size: 18px; }

/* ===================== 3.7 – zdjęcia produktowe: całe urządzenie widoczne (bez przycinania) ===================== */
.hero-photo:not(.empty) { background: #fff; }
.hero-photo img, .gal-item img { object-fit: contain; padding: 6px; box-sizing: border-box; background: #fff; }
.gal-item button { background: #fff; }
/* 3.7: polskie nazwy komunikatów zamiast kodów (kod w podpowiedzi) */
.msg > code { font-family: inherit; font-size: 12px; font-weight: 700; letter-spacing: 0; white-space: nowrap; }
.cert-arch > summary { cursor: pointer; list-style: none; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.cert-arch > summary::-webkit-details-marker { display: none; }
.cert-arch > summary::before { content: '▸'; color: var(--text-3); font-size: 14px; }
.cert-arch[open] > summary::before { content: '▾'; }
.cert-arch .navcount { position: static; }
/* 3.7: sprawdzenia pośrednie – podsumowanie karty kontrolnej i sekcja dowodu */
.mini-kpi { border: 1px solid var(--border); border-radius: 12px; padding: 10px 14px; display: flex; flex-direction: column; gap: 2px; background: var(--surface-2, #f8fafc); }
.mini-kpi span { font-size: 12px; color: var(--text-3); }
.mini-kpi b { font-size: 16px; }
.mini-kpi small { font-size: 12px; color: var(--text-3); }
.k-proof { border: 1px solid var(--border); border-radius: 12px; padding: 10px 14px; background: #fafbfd; }
.k-proof > summary { cursor: pointer; }
#k_preview.msg { display: block; padding: 10px 12px; }
.pill-stack { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; }
.pill-stack .small { line-height: 1.35; }
.kv-table th { text-align: left; font-weight: 500; color: var(--text-3); vertical-align: top; }
.recent-cc { display: flex; flex-direction: column; gap: 8px; }
.recent-cc .sample { display: flex; align-items: center; gap: 10px; width: 100%; text-align: left; }
.cc-samples > summary { cursor: pointer; }
.cert-flow { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; margin-top: 16px; padding: 12px 14px; border: 1px solid var(--border); border-radius: 12px; background: #fafbfd; }
.scen-pick { display: block; margin-top: 6px; }
.scen-pick.warn { border-color: #e7b65c; color: #8a5a00; }
.recent-cc .sample { display: grid !important; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 12px; }

/* 3.8: clear grouped comparisons and large white plotting surfaces. */
table.scen {table-layout:auto; min-width:1000px; width:100%;}
table.scen th,table.scen td {padding:18px 16px; vertical-align:middle;}
table.scen th {font-size:12px;line-height:1.55; background:#f6f8fb;}
table.scen td:first-child {min-width:130px;}
table.scen td:nth-child(2) {min-width:145px;}
table.scen td:nth-child(3) {min-width:170px;}
table.scen .scen-why {min-width:210px; max-width:340px; font-size:13px; line-height:1.65; white-space:normal;}
.scen-metric {display:flex;align-items:baseline;justify-content:space-between;gap:18px;margin:6px 0;white-space:nowrap;font-size:12px;}
.scen-metric span {color:#637184;}.scen-metric b {font-size:13px;font-variant-numeric:tabular-nums;color:#223248;}
.scen-action {text-align:right; min-width:162px;}.scen-pick {margin:0 0 0 auto;white-space:nowrap;}
.scen-why details {margin-top:8px;}.scen-why summary {cursor:pointer;color:#315d9e;}.scen-why ul {padding-left:18px;}
.plot-scroll {overflow-x:auto;background:white;border:1px solid #e9edf2;border-radius:12px;margin:20px 0 16px;padding:12px 0;}
.chart.chart-large {max-height:none;min-width:720px;width:100%;height:auto;display:block;background:#fff;}
.chart-large text {font-size:13px;fill:#4a5b70;}.chart-large .plot-axis-title {font-size:14px;font-weight:600;fill:#283d56;}
.plot-caption {display:flex;justify-content:space-between;gap:16px;flex-wrap:wrap;font-size:13px;line-height:1.6;margin:12px 0;}
#drift>.card,#ctrlChart {padding:28px 32px;background:#fff;} #drift .legend,#simulator .legend {gap:18px;line-height:1.8;margin-top:18px;}
.pdf-actions {display:flex;flex-wrap:wrap;gap:8px;min-width:130px;margin:8px 0;}.source-pdf {display:block;width:100%;height:68vh;border:1px solid #dce3ec;background:#fff;margin:16px 0;}
.pdf-source-meta {line-height:1.7;overflow-wrap:anywhere;}
.case-banner {padding:18px 22px;border-left:4px solid #39796f;background:#f0f7f5;border-radius:8px;margin:0 0 20px;line-height:1.7;font-size:13px;}
.case-compare th,.case-compare td {padding:13px 16px;}.case-compare .num {font-variant-numeric:tabular-nums;}
@media(max-width:720px){#drift>.card,#ctrlChart {padding:18px 16px;} .chart.chart-large {min-width:700px;} .plot-scroll{margin-top:14px;} }

/* Keep the decision at the visible end of the row on a standard desktop. */
table.scen {table-layout:fixed;min-width:980px;}
table.scen th,table.scen td {padding:16px 10px;min-width:0!important;}
table.scen th:nth-child(1){width:11%;}table.scen th:nth-child(2){width:13%;}table.scen th:nth-child(3){width:17%;}table.scen th:nth-child(4){width:13%;}table.scen th:last-child{width:14%;}
table.scen:has(th:nth-child(7)) th:nth-child(5){width:14%;}
table.scen .scen-why {min-width:0;max-width:none;font-size:12px;line-height:1.6;overflow-wrap:break-word;}
.scen-metric {gap:7px;line-height:1.5;}.scen-metric span {white-space:normal;font-size:11px;}.scen-metric b{white-space:nowrap;font-size:12px;}
.scen-action .btn {white-space:normal;line-height:1.45;text-align:center;max-width:100%;}
.scen-tags{gap:6px;}.scen-tag{max-width:100%;font-size:10px;padding:0 6px;}

/* 3.9 – harmonogram, zlecenia, koszty */
.cal-section-title {display:flex;justify-content:space-between;align-items:center;gap:16px;margin:24px 0 12px}.cal-section-title h2 {margin:0}.cal-section-title label,.cal-calendar .card-head label {display:flex;gap:10px;align-items:center;font-weight:600}.cal-section-title select,.cal-calendar select {min-width:100px}
.cal-cost-grid {display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:18px}.cal-cost-card {display:grid;grid-template-columns:46px 1fr;gap:8px 16px;text-align:left;padding:22px;background:#fff;min-width:0;color:var(--text)}button.cal-cost-card {cursor:pointer;border:1px solid var(--border);font:inherit}button.cal-cost-card:hover {border-color:var(--accent,#ff690a);box-shadow:0 4px 14px #12243a0b}.cal-cost-icon {grid-row:1/4;background:#fff0e5;color:#df6107;border-radius:12px;padding:10px;align-self:start}.cal-cost-label {font-size:14px;font-weight:650;color:#5a6880}.cal-cost-card strong {font-size:clamp(21px,2.1vw,31px);line-height:1.2;overflow-wrap:anywhere;font-variant-numeric:tabular-nums}.cal-finance-foot {display:flex;align-items:center;flex-wrap:wrap;gap:7px;font-size:13px;color:#65748b;padding:12px 0 20px}.cal-finance-foot .btn {margin-left:auto}.cal-dashboard-plan {margin-bottom:28px}.cal-dashboard-plan .card-head {margin-bottom:18px}.cal-plan-stats {display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px;margin:18px 0}.cal-plan-stats button {border:1px solid #e3e9f2;border-radius:10px;background:#f8fafc;padding:14px 12px;text-align:left;font:inherit;font-size:13px;cursor:pointer}.cal-plan-stats strong {display:block;font-size:26px;margin-bottom:4px;color:#1b3554}.cal-plan-stats button:hover {border-color:#f98c40}.cal-months {display:grid;grid-template-columns:repeat(6,minmax(0,1fr));gap:10px;margin:20px 0}.cal-month {background:white;border:1px solid #dce4ef;border-radius:10px;padding:14px 12px;text-align:left;font:inherit;cursor:pointer;display:flex;flex-direction:column;gap:6px;color:#24405d}.cal-month span {font-size:14px;font-weight:650}.cal-month strong {font-size:26px;font-variant-numeric:tabular-nums}.cal-month small {color:#75849a;font-size:11px}.cal-month:hover,.cal-month.on {border-color:#ff741e;background:#fff6ef;box-shadow:0 0 0 1px #ff741e}.cal-toolbar {display:flex;align-items:flex-end;gap:16px;flex-wrap:wrap;margin:12px 0 20px}.cal-toolbar .field:first-child {flex:1;min-width:240px}.cal-toolbar .field {min-width:180px}.cal-toolbar>span {padding:10px}.cal-list .table-wrap {margin:0 -4px}.cal-schedule-table {min-width:950px}.cal-schedule-table td {padding-top:18px;padding-bottom:18px;vertical-align:top}.cal-schedule-table th:first-child {width:38px}.cal-schedule-table td:nth-child(2){min-width:210px}.cal-schedule-table td:nth-child(3){min-width:175px}.cal-schedule-table td:nth-child(4){min-width:180px}.cal-schedule-table td:nth-child(5){min-width:190px}.cal-schedule-table input[type=checkbox],.cal-receipt-row input[type=checkbox]{width:18px;height:18px;accent-color:#f97012}.cal-selection {display:flex;align-items:center;flex-wrap:wrap;gap:12px;border-top:1px solid #dfe7f0;padding:18px 0 0;margin-top:12px;position:sticky;bottom:0;background:white;z-index:2}.cal-selection>.row {margin-left:auto}.cal-form-grid {display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px 18px;margin:14px 0}.cal-form-grid .field {min-width:0}.cal-form-grid input,.cal-form-grid select {width:100%;min-width:0}.cal-bulk {background:#f7f9fc;border:1px solid #dee6ef;padding:14px;border-radius:10px;margin:16px 0}.cal-bulk summary {font-weight:650;cursor:pointer}.cal-plan-row,.cal-receipt-row {border:1px solid #dee6ef;border-radius:12px;padding:18px;margin:18px 0;background:#fff}.cal-plan-identity {display:flex;flex-wrap:wrap;align-items:baseline;gap:6px 14px;border-bottom:1px solid #edf1f6;padding-bottom:12px}.cal-plan-identity strong {font-size:17px;color:#163859}.cal-plan-identity>span:last-child {margin-left:auto}.cal-help {color:#62728a;font-size:13px;line-height:1.6;margin:16px 0}.cal-modal-actions {display:flex;justify-content:flex-end;gap:10px;flex-wrap:wrap;margin-top:22px;padding-top:18px;border-top:1px solid #e2e8f0}.cal-order-meta {display:grid;grid-template-columns:2fr 1fr 1fr;gap:20px;background:#f7f9fc;padding:18px;border-radius:12px;margin:0 0 18px}.cal-order-meta>div {display:flex;flex-direction:column;gap:6px}.cal-order-meta span,.cal-order-meta small {font-size:13px;color:#65748b}.cal-order-table td {padding-top:18px;padding-bottom:18px}.cal-voided {color:#7c879a;background:#fafbfc}.cal-voided td.num {text-decoration:line-through}.cal-print-preview {background:#f0f3f7;padding:16px}.cal-print-sheet {background:white;color:#142237;padding:24px;margin-bottom:20px}.cal-print-sheet h1 {font-size:22px;margin:14px 0}.cal-print-sheet p {font-size:13px;line-height:1.6}.cal-print-sheet table {width:100%;border-collapse:collapse;font-size:12px}.cal-print-sheet td,.cal-print-sheet th {border:1px solid #c9d2df;padding:8px;vertical-align:top;text-align:left}.cal-print-brand {font-weight:750;letter-spacing:.04em;font-size:14px}.cal-signatures {display:flex;justify-content:space-between;padding:30px 0;font-size:13px;gap:24px}
@media(max-width:1100px){.cal-cost-card {grid-template-columns:1fr;gap:10px}.cal-cost-icon {display:none}.cal-months{grid-template-columns:repeat(4,minmax(0,1fr))}}
@media(max-width:700px){.cal-cost-grid{grid-template-columns:1fr}.cal-cost-card{grid-template-columns:46px 1fr}.cal-cost-icon{display:block}.cal-months{grid-template-columns:repeat(3,minmax(0,1fr))}.cal-plan-stats{grid-template-columns:repeat(2,minmax(0,1fr))}.cal-form-grid,.cal-order-meta{grid-template-columns:1fr}.cal-dashboard-plan .card-head{align-items:flex-start;flex-direction:column}.cal-selection{position:static}.cal-selection>.row{margin-left:0}.cal-print-preview{padding:0}.cal-print-sheet{padding:12px}}
@media print {.cal-print-sheet{break-after:page;padding:0;margin:0}.cal-print-sheet:last-child{break-after:auto}.cal-print-sheet tr{break-inside:avoid}.cal-print-sheet thead{display:table-header-group}.cal-signatures{break-inside:avoid}#printArea .cal-print-sheet table{display:table;width:100%;overflow:visible}.cal-print-sheet h1{font-size:18px}.cal-print-sheet p{font-size:11px}}

.cal-section-title select,.cal-calendar .card-head select {background:#fff;border:1px solid #d9e1ed;border-radius:8px;padding:7px 12px;font:inherit;color:#33445c}

/* 3.10: obieg wyposażenia i finanse nadzoru */
.linklike{background:none;border:0;padding:0;font:inherit;color:var(--link,#1f4f8f);cursor:pointer;text-align:left;text-decoration:underline;text-underline-offset:2px}
.linklike:hover{color:var(--primary-ink,#b24e06)}
.cal-stat{border:1px solid #e3e9f2;border-radius:10px;background:#f8fafc;padding:14px 12px;font-size:13px;color:var(--text-2)}
.cal-stat strong{display:block;font-size:24px;margin-bottom:4px;color:#1b3554;font-variant-numeric:tabular-nums}
.cal-chart-card{margin:6px 0 4px}.cal-chart{width:100%;height:auto;display:block;margin:6px 0 8px;min-width:640px}.cal-chart-card{overflow-x:auto}
.cal-bar:hover rect[fill="transparent"]{fill:#f3f6fa}
.cal-legend{display:flex;gap:16px;flex-wrap:wrap;font-size:13px;color:var(--text-2)}.cal-legend i{display:inline-block;width:12px;height:12px;border-radius:3px;margin-right:6px;vertical-align:-1px}
.cal-cost-split{margin:18px 0}.cal-links{margin:8px 0 0;padding-left:18px;line-height:1.65;font-size:13.5px;color:var(--text-2)}.cal-links li{margin-bottom:6px}
tfoot td{border-top:2px solid var(--border);padding-top:12px}
tr[data-act]{cursor:pointer}tr[data-act]:hover td{background:#fbfcfe}
.cal-order-table .cell-main{display:block}.cal-cost-toolbar .field:first-child{flex:0 0 160px;min-width:140px}.cal-cost-toolbar .field{min-width:200px}

/* ===== 3.10: skalowanie wykresów i czytelność na 1440 / 1920 px oraz na telefonie =====
   Wykresy mają układ liczony z szerokości obszaru treści; --k (ustawiane w app.mjs) utrzymuje stały rozmiar tekstu w px. */
.chart text { font-size: calc(12px * var(--k, 1)); }
.chart.chart-large { min-width: 0; max-height: none; }
.chart-large text { font-size: calc(13px * var(--k, 1)); }
.chart-large .plot-axis-title { font-size: calc(15px * var(--k, 1)); }
.chart-large path, .chart-large circle, .chart-large rect:not(:first-of-type) { vector-effect: non-scaling-stroke; }
.cf-chart text.lab { font-size: calc(12.5px * var(--k, 1)); }
.cal-chart { min-width: 0; } .cal-chart text { font-size: calc(12px * var(--k, 1)); }
.cal-chart-card { overflow: visible; }
.plot-scroll { padding: 14px 10px; overflow-x: hidden; }
@media (max-width: 720px) {
  .chart.chart-large { min-width: 0; }
  .plot-scroll { padding: 8px 4px; margin: 12px 0; border-radius: 10px; }
  .chart-large text { font-size: calc(11.5px * var(--k, 1)); }
  .chart-large .plot-axis-title { font-size: calc(13px * var(--k, 1)); }
}

/* ===== 3.10: menu na telefonie (szuflada) i tabele jako karty ===== */
.navtoggle, .nav-scrim { display: none; }
@media (max-width: 680px) {
  .navtoggle { display: inline-flex; margin-right: 6px; }
  .appbar-brand { margin-right: auto; }
  aside { position: fixed !important; top: var(--appbar-h) !important; bottom: 0 !important; left: 0 !important; right: auto !important; width: min(86vw, 320px) !important; height: auto !important; flex-direction: column !important; overflow-x: hidden !important; overflow-y: auto !important; padding: 14px 10px 24px !important; transform: translateX(-104%); transition: transform .22s ease; z-index: 60; box-shadow: 0 0 40px #0b172955; }
  body.nav-open aside { transform: none; }
  aside .menu-label { display: block !important; }
  aside .nav { width: 100% !important; justify-content: flex-start !important; padding: 11px 12px !important; flex-shrink: 0; }
  aside .nav .name { display: inline !important; }
  aside .navcount { display: inline-block !important; } aside .navcount:empty { display: none !important; }
  body.nav-open .nav-scrim { display: block; position: fixed; inset: var(--appbar-h) 0 0 0; background: #0b172966; z-index: 59; }
  main { margin-left: 0 !important; padding-bottom: 0 !important; }
  .content { padding: 18px 14px 40px !important; }
  .head h1, .page-title, h1 { font-size: 24px; }
  /* tabele: wiersz = karta, etykieta kolumny po lewej */
  table.mstack { min-width: 0 !important; display: block; font-size: 13px; }
  table.mstack thead { display: none; }
  table.mstack tbody, table.mstack tfoot { display: block; }
  table.mstack tr { display: block; border: 1px solid var(--border); border-radius: 12px; padding: 6px 12px; margin: 0 0 10px; background: #fff; }
  table.mstack tr.selected { border-color: #f98c40; }
  table.mstack td { display: block; position: relative; padding: 8px 0 8px 38% !important; min-height: 20px; border-bottom: 1px dashed #edf1f6 !important; text-align: left !important; min-width: 0 !important; white-space: normal !important; }
  table.mstack td:last-child { border-bottom: 0 !important; }
  table.mstack td::before { content: attr(data-label); position: absolute; left: 0; top: 9px; width: calc(38% - 10px); font-size: 10.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .4px; color: var(--text-3); padding-top: 2px; }
  table.mstack td[data-label=""], table.mstack td.m-full { padding-left: 0 !important; }
  table.mstack td[data-label=""]::before, table.mstack td.m-full::before { display: none; }
  table.mstack td:first-child { font-size: 14px; }
  table.mstack td { overflow-wrap: anywhere; } table.mstack td .cell-main, table.mstack td .cell-sub { display: block; }
  table.mstack td:empty { display: none; }
  .table-wrap { overflow-x: visible; margin: 0 !important; }
  .card { padding: 16px 14px; border-radius: 14px; }
  .cal-plan-stats, .grid.kpis { grid-template-columns: 1fr 1fr !important; gap: 10px !important; }
  .cal-selection { position: sticky !important; bottom: 0; padding: 12px 0 !important; }
  .cal-selection > .row { width: 100%; display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
  .cal-selection > .row .primary { grid-column: 1 / -1; }
  .cal-toolbar .field, .cal-toolbar .field:first-child { flex: 1 1 100% !important; min-width: 0 !important; }
  .filters { gap: 6px; } .chip { padding: 7px 11px; font-size: 13px; }
  .modal { width: calc(100vw - 16px) !important; max-height: calc(100vh - 16px); }
  .cal-legend { gap: 10px; font-size: 12px; }
}
@media (min-width: 681px) and (max-width: 1180px) { aside .nav { position: relative; } }
@media (min-width: 1600px) { body { font-size: 14.5px; } td { font-size: 13.5px; } .content { max-width: 1680px; } }
.cal-chart-card{margin:18px 0 6px!important}
.cal-changes{margin:14px 0 0;background:#f7f9fc;border:1px solid #e2e8f0;border-radius:10px;padding:10px 14px;font-size:13px}.cal-changes summary{cursor:pointer;font-weight:650}.cal-changes ul{margin:10px 0 0;padding-left:18px;line-height:1.6}.cal-changes li{margin-bottom:8px}

/* ---------- 4.0: pakiety i moduły ---------- */
.nav.locked { opacity: .45 }
.nav.locked::after, .nav.archive::after { content: ''; margin-left: auto; width: 13px; height: 13px; flex-shrink: 0; background: currentColor; -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Crect x='5' y='11' width='14' height='10' rx='2' fill='none' stroke='black' stroke-width='2.4'/%3E%3Cpath d='M8 11V8a4 4 0 0 1 8 0v3' fill='none' stroke='black' stroke-width='2.4'/%3E%3C/svg%3E") center/contain no-repeat; mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Crect x='5' y='11' width='14' height='10' rx='2' fill='none' stroke='black' stroke-width='2.4'/%3E%3Cpath d='M8 11V8a4 4 0 0 1 8 0v3' fill='none' stroke='black' stroke-width='2.4'/%3E%3C/svg%3E") center/contain no-repeat }
.nav.archive { opacity: .75 }
.menu-label.locked { opacity: .55 }
.menu-label.locked::after { content: ' · poza pakietem'; letter-spacing: .4px; font-weight: 600; text-transform: none }
body.f-no-intervals [data-go="interval"], body.f-no-intervals [data-go="drift"], body.f-no-intervals [data-go="simulator"], body.f-no-intervals [data-goint],
body.f-no-certcheck [data-act="cwGoVerify"], body.f-no-certcheck [data-act="ccNew"],
body.f-no-conformity [data-go="conformity"], body.f-no-conformity [data-go="conformityBatch"] { display: none !important }
.lic-warn { display: flex; gap: 8px; align-items: center; padding: 9px 14px; border-radius: var(--r-md); margin-bottom: 14px; font-size: var(--fs-sm); font-weight: 600; border: 1px solid }
.lic-warn[hidden] { display: none }
.lic-warn.warn { background: var(--warn-bg); color: var(--warn-fg); border-color: var(--warn-bd) }
.lic-warn.crit { background: var(--crit-bg); color: var(--crit-fg); border-color: var(--crit-bd) }
.lock-card { display: flex; gap: 22px; align-items: flex-start; max-width: 780px }
.lock-card h2 { margin: 0 0 6px }
.lock-ico { width: 54px; height: 54px; border-radius: 14px; background: var(--primary-50); color: var(--primary); display: grid; place-items: center; flex-shrink: 0 }
.lock-ico .ico { width: 26px; height: 26px }
.lic-top { display: grid; grid-template-columns: 1fr minmax(300px, 420px); gap: 24px; align-items: center }
.lic-name { font-size: 30px; font-weight: 800; color: var(--text); margin: 2px 0 4px }
.lic-kv { display: grid; grid-template-columns: auto 1fr; gap: 8px 14px; align-items: center; font-size: var(--fs-sm) }
.lic-kv > span:nth-child(odd) { color: var(--text-3) }
.lic-kv > .pill { justify-self: start }
.lic-usage { display: flex; gap: 10px; align-items: center }
.lic-bar { flex: 1; height: 6px; border-radius: 4px; background: var(--surface-2); overflow: hidden; min-width: 80px }
.lic-bar span { display: block; height: 100%; background: var(--primary) }
.lic-bar span.crit { background: var(--crit-fg) }
.mods { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-top: 16px }
.mod { border: 1px solid var(--border); border-radius: var(--r-lg); padding: 14px 16px; background: var(--surface); display: flex; flex-direction: column; gap: 6px }
.mod.on { border-color: var(--ok-bd); box-shadow: inset 0 3px var(--ok-fg) }
.mod.off { background: var(--surface-2) }
.mod.off b { color: var(--text-2) }
.mod-h { display: flex; justify-content: space-between; gap: 8px; align-items: flex-start }
.mod p { margin: 0; font-size: var(--fs-sm); color: var(--text-2); line-height: 1.45; flex: 1 }
.lic-pk { display: grid; grid-template-columns: repeat(5, 1fr); gap: 10px; margin: 10px 0 16px }
.lic-opt { border: 1px solid var(--border); border-radius: var(--r-md); padding: 10px 12px; cursor: pointer; display: flex; flex-direction: column; gap: 3px; position: relative }
.lic-opt input { position: absolute; opacity: 0; pointer-events: none }
.lic-opt span { font-size: var(--fs-xs); color: var(--text-3) }
.lic-opt.sel { border-color: var(--primary); background: var(--primary-50); box-shadow: 0 0 0 1px var(--primary) }
.lic-add { display: flex; flex-wrap: wrap; gap: 8px 22px; padding: 4px 0 8px }
.lic-add .chk { display: flex; gap: 6px; align-items: center; font-size: var(--fs-sm); cursor: pointer }
.lic-add .chk.dis { color: var(--text-3); cursor: default }
.lic-sum { margin: 12px 0; display: flex; flex-wrap: wrap; gap: 6px; align-items: center; font-size: var(--fs-sm) }
.lic-cmp td.c { text-align: center } .lic-cmp th { white-space: nowrap }
.lic-cmp tr.cur td { background: var(--primary-50) }
.lic-cmp .yes { color: var(--ok-fg); font-weight: 800 }
@media (max-width: 1100px) { .mods { grid-template-columns: 1fr 1fr } .lic-pk { grid-template-columns: repeat(3, 1fr) } .lic-top { grid-template-columns: 1fr } }
@media (max-width: 680px) { .mods, .lic-pk { grid-template-columns: 1fr } .lock-card { flex-direction: column } .lic-name { font-size: 24px } }

/* =====================================================================
   ProMaintenance 2.0 – komponenty utrzymania ruchu (na bazie systemu PROMETROLOG)
   ===================================================================== */
.card.flush { padding: 0; overflow: hidden; } .card.flush .table-wrap { border-radius: var(--r-lg); }
.card.flush table th:first-child, .card.flush table td:first-child { padding-left: 20px; }
.field.inline { margin: 0; } .field.inline select, .field.inline input { min-width: 220px; }
.field.inline.search input { min-width: 280px; }
.muted { color: var(--text-3); } .small { font-size: 12px; } .nowrap { white-space: nowrap; }
.yr { font-size: 18px; min-width: 52px; text-align: center; }
/* pasek postępu zlecenia */
.pm-prog { display: inline-block; width: 70px; height: 6px; border-radius: 99px; background: #edf1f6; overflow: hidden; vertical-align: middle; margin-right: 8px; }
.pm-prog > span { display: block; height: 100%; background: var(--chart-ok); border-radius: 99px; }
.pm-prog + .cell-sub { display: inline; }
table.pm-t .w-due { width: 16%; } table.pm-t .w-prog { width: 12%; } table.pm-t .w-st { width: 15%; }
/* powiadomienia */
.note-row { display: flex; gap: 10px; align-items: flex-start; padding: 10px 2px; border-bottom: 1px solid #edf1f6; font-size: 13px; line-height: 1.45; }
.note-row:last-child { border-bottom: 0; } .note-row.clickable:hover { background: #fbfcfe; cursor: pointer; }
.bellbtn { position: relative; }
.bell-n { position: absolute; top: 4px; right: 3px; min-width: 17px; height: 17px; padding: 0 4px; border-radius: 99px; background: var(--crit-fg); color: #fff; font-size: 10px; font-weight: 800; display: inline-flex; align-items: center; justify-content: center; border: 2px solid #fff; }
/* realizacja wg maszyn */
.hbar-pm { display: flex; height: 8px; border-radius: 99px; background: #f1f4f8; overflow: hidden; }
.hbar-pm .ok { background: var(--chart-ok); } .hbar-pm .crit { background: var(--chart-limit); }
.step.clickable:hover { background: #fbfcfe; cursor: pointer; }
/* moje maszyny (operator) */
.mach-cards { grid-template-columns: repeat(3, minmax(0, 1fr)); margin-bottom: 20px; }
.mach-name { display: block; font-size: 17px; font-weight: 700; margin: 3px 0 2px; color: var(--text); }
/* checklista zlecenia */
.pm-tasks { list-style: none; margin: 8px 0 0; padding: 0; }
.pm-task { display: grid; grid-template-columns: 34px minmax(0, 1fr) auto; gap: 14px; padding: 14px 0; border-bottom: 1px solid #edf1f6; align-items: start; }
.pm-task:last-child { border-bottom: 0; } .pm-task.off { opacity: .55; }
.pm-n { width: 30px; height: 30px; border-radius: 50%; background: #f1f4f8; color: var(--text-2); font-weight: 700; display: inline-flex; align-items: center; justify-content: center; font-size: 13px; }
.pm-task.done .pm-n { background: var(--ok-bg); color: var(--ok-fg); }
.pm-top { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; } .pm-top strong { font-size: 14px; }
.pm-crit { font-size: 12.5px; color: var(--text-2); margin-top: 4px; line-height: 1.5; }
.pm-tags { gap: 6px; margin-top: 8px; }
.sf-chip { display: inline-flex; align-items: center; gap: 5px; height: 24px; padding: 0 9px; border-radius: 99px; background: var(--warn-bg); color: var(--warn-fg); border: 1px solid var(--warn-bd); font-size: 11.5px; font-weight: 600; text-decoration: none; }
.sf-chip .ico { width: 13px; height: 13px; } .sf-chip.meas { background: var(--info-bg); color: var(--info-fg); border-color: var(--info-bd); }
a.sf-chip { background: #fff; color: var(--link, #1f4f8f); border-color: var(--border-strong); }
.pm-res { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-top: 10px; padding: 8px 10px; background: var(--surface-2); border-radius: 8px; font-size: 12.5px; }
.pm-note { color: var(--text-2); }
.pm-act { display: flex; flex-direction: column; gap: 6px; align-items: flex-end; }
.pm-photo { max-width: 100%; max-height: 72vh; display: block; margin: 0 auto; border-radius: 10px; }
.sf-need { border-color: var(--warn-bd); box-shadow: 0 0 0 3px #fff5e0; }
.sf-list { display: grid; gap: 8px; margin-top: 10px; } .sf-item { padding: 10px 12px; border: 1px solid var(--border); border-radius: 10px; background: #fff; }
.res-seg { flex-wrap: wrap; height: auto; min-height: 38px; } .res-seg .seg-b { height: 32px; }
.meas-st { min-height: var(--ctl-h, 38px); display: flex; align-items: center; gap: 8px; }
/* harmonogram 12M */
table.sch-t { table-layout: fixed; min-width: 980px; }
table.sch-t th:first-child, table.sch-t td.sch-m { width: 230px; }
table.sch-t th:last-child { width: 70px; }
.sch-c { text-align: center; padding: 8px 4px !important; }
.sch-c.clickable:hover { background: #fff6ef; cursor: pointer; }
.sch-n { display: block; font-weight: 700; font-size: 13px; }
.sch-bar { display: flex; height: 6px; border-radius: 99px; overflow: hidden; margin: 4px auto 0; max-width: 54px; background: #f1f4f8; }
.b-ok { background: var(--chart-ok); } .b-crit { background: var(--chart-limit); } .b-info { background: #7cb1ff; } .b-wait { background: #c9d3df; }
.legend i { display: inline-block; width: 12px; height: 8px; border-radius: 3px; }
th.cur, td.cur { background: #fff8f2; }
tr.sch-sum td { background: var(--surface-2); font-weight: 700; }
.t-crit { color: var(--crit-fg); } .t-warn { color: var(--warn-fg); }
@media (max-width: 1180px) { .mach-cards { grid-template-columns: 1fr 1fr; } }
@media (max-width: 680px) { .mach-cards { grid-template-columns: 1fr; } .pm-task { grid-template-columns: 30px minmax(0, 1fr); } .pm-act { grid-column: 2; flex-direction: row; align-items: center; justify-content: flex-start; } .field.inline select, .field.inline input, .field.inline.search input { min-width: 0; width: 100%; } .head .row { width: 100%; } }
.step > :only-child { margin-left: 0; }
.urg { display: flex; justify-content: space-between; gap: 12px; align-items: center; padding: 6px 2px; } .urg:hover { background: #fbfcfe; cursor: pointer; }
[hidden] { display: none !important; }

/* ===================== ProMaintenance 2.0 – zgłoszenia i awarie UR ===================== */
.kpis-5 { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.kpis.kpis-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.kpis-5 .kpi-card .kpi-num { font-size: 22px; white-space: nowrap; } .kpis-5 .kpi-card { padding: 18px 16px; gap: 12px; }
@media (max-width: 1320px) { .kpis-5 { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 680px) { .kpis-5, .kpis.kpis-4 { grid-template-columns: 1fr 1fr; } }
.nowrap { white-space: nowrap; }
.clamp { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; max-width: 340px; }
.ur-t td { vertical-align: top; }
.ur-t .row-act { text-align: right; white-space: nowrap; }
.card-head.pad, .chartlabel.pad { padding-left: 20px; padding-right: 20px; } .card-head.pad { padding-top: 18px; } .chartlabel.pad { padding-bottom: 16px; }
.count-pill { font-size: 12.5px; color: var(--text-2); border: 1px solid var(--border); border-radius: 10px; padding: 6px 12px; white-space: nowrap; background: #fafbfd; }
.ur-fgrid { grid-template-columns: repeat(3, minmax(0, 1fr)) repeat(2, minmax(0, .8fr)) auto; gap: 12px; align-items: end; }
.ur-fgrid .field { margin: 0; }
@media (max-width: 1320px) { .ur-fgrid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 680px) { .ur-fgrid { grid-template-columns: 1fr; } }
/* pasek obiegu zgłoszenia */
.ur-flow { list-style: none; margin: 0 0 18px; padding: 0; display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 6px; counter-reset: s; }
.ur-flow li { position: relative; display: flex; align-items: center; gap: 8px; padding: 9px 12px; border-radius: 10px; background: #f3f6fa; color: var(--text-3); font-size: 12.5px; font-weight: 600; border: 1px solid var(--border); min-width: 0; }
.ur-flow li span { flex: 0 0 22px; height: 22px; border-radius: 50%; background: #fff; border: 1px solid var(--border-strong); display: inline-flex; align-items: center; justify-content: center; font-size: 11px; font-weight: 750; }
.ur-flow li em { font-style: normal; font-weight: 600; font-size: 11px; color: var(--warn-fg); margin-left: auto; white-space: nowrap; }
.ur-flow li.done { background: var(--ok-bg); color: var(--ok-fg); border-color: var(--ok-bd); } .ur-flow li.done span { background: var(--ok-fg); border-color: var(--ok-fg); color: #fff; }
.ur-flow li.cur { background: #fff; color: var(--text); border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-50); } .ur-flow li.cur span { background: var(--primary); border-color: var(--primary); color: #fff; }
@media (max-width: 1100px) { .ur-flow { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 680px) { .ur-flow { grid-template-columns: 1fr 1fr; } .ur-flow li em { display: none; } }
/* 5 × dlaczego */
.why-list { display: grid; gap: 8px; }
.why { display: flex; align-items: center; gap: 10px; }
.why-n { flex: 0 0 28px; height: 28px; border-radius: 8px; background: var(--primary-50); color: var(--primary); font-weight: 750; font-size: 12.5px; display: inline-flex; align-items: center; justify-content: center; }
.why input { flex: 1; min-width: 0; height: 38px; border: 1px solid var(--border-strong); border-radius: 9px; padding: 0 12px; font: inherit; font-size: 14px; background: #fff; }
.why input:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-50); }
.why-ro { margin: 0; padding-left: 22px; display: grid; gap: 6px; } .why-ro li::marker { color: var(--primary); font-weight: 750; }
.steps-n { margin: 0; padding-left: 20px; display: grid; gap: 8px; color: var(--text-2); font-size: 13.5px; } .steps-n b { color: var(--text); }
/* koszty */
.cost-t { width: 100%; } .cost-t td { padding: 8px 4px; border-bottom: 1px solid var(--border); } .cost-t tr.tot td { font-weight: 750; border-bottom: 0; border-top: 2px solid var(--text); }
.sticky-save { position: sticky; bottom: 0; background: linear-gradient(transparent, var(--bg) 30%); padding: 14px 0 6px; z-index: 2; }
.seg-wide { display: flex; height: auto; } .seg-wide .seg-b { flex: 1; padding: 10px 12px; white-space: normal; }
/* Pareto */
.par-list { margin-top: 8px; }
.par-row { display: grid; grid-template-columns: 30px minmax(0, 1.3fr) minmax(120px, 1fr) 110px; gap: 14px; align-items: center; padding: 12px 0; border-top: 1px solid var(--border); }
.par-n { width: 26px; height: 26px; border-radius: 50%; background: #eef2f7; color: var(--text-2); font-size: 12px; font-weight: 750; display: inline-flex; align-items: center; justify-content: center; }
.par-row.vital .par-n { background: var(--primary-50); color: var(--primary); }
.par-row:not(.vital) .cell-main { font-weight: 600; color: var(--text-2); }
.par-bar { height: 10px; border-radius: 5px; background: #edf1f6; overflow: hidden; } .par-bar span { display: block; height: 100%; border-radius: 5px; background: #b8c4d6; }
.par-row.vital .par-bar span { background: var(--chart-limit); }
.par-v { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
@media (max-width: 680px) { .par-row { grid-template-columns: 30px 1fr; } .par-bar { grid-column: 2; } .par-v { grid-column: 2; text-align: left; } }
.num, .kpi-num, .par-v, .cost-t td.num { font-variant-numeric: tabular-nums; }
.fields.f2 { grid-template-columns: 1fr 1fr; } @media (max-width: 680px) { .fields.f2 { grid-template-columns: 1fr; } }
.mini-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 2px; border-top: 1px solid var(--border); } .mini-row:first-of-type { border-top: 0; }
.mini-row > div { min-width: 0; } .mini-row .cell-main { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .mini-row .pill { flex: none; }
.field input[type=file] { height: auto; padding: 9px 10px; font-size: 13px; }
/* niezawodność */
details.defs > summary { list-style: none; display: flex; align-items: center; gap: 12px; cursor: pointer; } details.defs > summary::-webkit-details-marker { display: none; }
details.defs > summary h2 { margin: 0; } details.defs > summary .ico { margin-left: auto; transition: transform .15s; } details.defs[open] > summary .ico { transform: rotate(180deg); } details.defs[open] > summary { margin-bottom: 14px; }
.risk-row { display: flex; gap: 14px; align-items: flex-start; padding: 12px 0; border-top: 1px solid var(--border); } .risk-row:first-of-type { border-top: 0; }
.risk-score { flex: 0 0 46px; height: 46px; border-radius: 12px; display: inline-flex; align-items: center; justify-content: center; font-weight: 800; font-size: 17px; font-variant-numeric: tabular-nums; border: 1px solid; }
.risk-score.tone-crit { background: var(--crit-bg); color: var(--crit-fg); border-color: var(--crit-bd); } .risk-score.tone-warn { background: var(--warn-bg); color: var(--warn-fg); border-color: var(--warn-bd); } .risk-score.tone-info { background: var(--info-bg); color: var(--info-fg); border-color: var(--info-bd); } .risk-score.tone-ok { background: var(--ok-bg); color: var(--ok-fg); border-color: var(--ok-bd); }
.risk-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 6px; } .risk-top { display: flex; justify-content: space-between; gap: 10px; align-items: center; }
.risk-bar, .cost-bar { display: flex; height: 8px; border-radius: 4px; background: #edf1f6; overflow: hidden; } .risk-bar span, .cost-bar span { height: 100%; }
.cost-bar { height: 12px; border-radius: 6px; margin-top: 4px; }
.cost-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.cost-box { border: 1px solid var(--border); border-radius: 12px; padding: 12px 14px; display: grid; grid-template-columns: 10px 1fr; column-gap: 8px; row-gap: 2px; align-items: center; } .cost-box strong, .cost-box .small { grid-column: 2; } .cost-box strong { font-size: 17px; font-variant-numeric: tabular-nums; }
.cost-dot { width: 10px; height: 10px; border-radius: 3px; }
.imp-fgrid { grid-template-columns: repeat(2, minmax(0, 1fr)) repeat(2, minmax(0, .8fr)) auto; }
@media (max-width: 1320px) { .imp-fgrid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 680px) { .imp-fgrid { grid-template-columns: 1fr; } }
.mt0 { margin-top: 0; margin-bottom: 18px; }
/* raporty */
.rep-cards { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
@media (max-width: 1320px) { .rep-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); } } @media (max-width: 680px) { .rep-cards { grid-template-columns: 1fr; } }
.rep-card { display: flex; gap: 12px; align-items: center; text-align: left; font: inherit; color: inherit; cursor: pointer; padding: 14px 16px; border: 1px solid var(--border); transition: border-color .15s, box-shadow .15s; }
.rep-card:hover { border-color: #b9c6d8; } .rep-card.on { border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-50); }
.rep-txt { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; } .rep-txt strong { font-size: 14px; } .rep-txt span { font-size: 12px; color: var(--text-3); }
.rep-chk { flex: 0 0 26px; height: 26px; border-radius: 50%; background: #f1f4f8; color: var(--ok-fg); display: inline-flex; align-items: center; justify-content: center; } .rep-card.on .rep-chk { background: var(--ok-bg); }
.mt4 { margin-top: 4px; }
.rep-f { grid-template-columns: 1.6fr 1fr 1fr; } @media (max-width: 680px) { .rep-f { grid-template-columns: 1fr; } }
.rep-out { border: 1px solid var(--border); border-radius: 14px; padding: 14px; background: #fafbfd; } .rep-out-h { display: flex; justify-content: space-between; gap: 10px; align-items: center; flex-wrap: wrap; margin-bottom: 10px; }
.rep-btn { display: flex; gap: 12px; align-items: center; text-align: left; padding: 12px 14px; border: 1px solid var(--border-strong); border-radius: 12px; background: #fff; font: inherit; color: inherit; cursor: pointer; } .rep-btn:hover:not(:disabled) { border-color: var(--primary); } .rep-btn:disabled { opacity: .5; cursor: not-allowed; }
.rep-btn > span:last-child { display: flex; flex-direction: column; } .rep-btn > span:last-child span { font-size: 12px; color: var(--text-3); }
.rep-badge { flex: 0 0 auto; display: inline-flex; align-items: center; justify-content: center; width: 42px; height: 36px; border-radius: 9px; font-size: 11.5px; font-weight: 800; letter-spacing: .5px; }
.rep-badge.pdf { background: #fdecec; color: #b42318; } .rep-badge.xls { background: #e8f5ee; color: #1d7a46; }
.rep-use { display: flex; gap: 12px; align-items: flex-start; padding: 12px 0; border-top: 1px solid var(--border); } .rep-use div { display: flex; flex-direction: column; gap: 2px; }
.rep-sum { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 24px; } @media (max-width: 680px) { .rep-sum { grid-template-columns: 1fr; } }
.rep-prev td, .rep-prev th { font-size: 12px; white-space: nowrap; max-width: 220px; overflow: hidden; text-overflow: ellipsis; }
.print-doc .pd-desc { text-align: center; color: #555; font-size: 9.5pt; margin: -4px 0 8px; }
.print-doc.report .pd-t th { font-size: 8pt; } .print-doc.report .pd-t td { font-size: 8pt; overflow-wrap: break-word; hyphens: auto; } .print-doc .pd-note { font-size: 8pt; color: #666; margin: 2px 0 0; }
@media (max-width: 680px) { .cost-grid { grid-template-columns: 1fr; } .risk-top { flex-wrap: wrap; } }
/* etykiety QR – tabliczka A6 */
.qr-a6 { width: 105mm; height: 148mm; box-sizing: border-box; padding: 10mm 9mm 8mm; border: 1px solid #d7e0ea; border-radius: 6mm; background: #fff; color: #17243a; display: flex; flex-direction: column; align-items: center; text-align: center; gap: 2mm; break-inside: avoid; break-after: page; }
.qa-brand { font-size: 8.5pt; font-weight: 800; letter-spacing: .6px; text-transform: uppercase; color: var(--primary-ink, #c2410c); }
.qa-name { font-size: 20pt; font-weight: 800; line-height: 1.05; margin-top: 2mm; } .qa-code { font-family: var(--mono); font-size: 14pt; font-weight: 700; color: #475569; }
.qa-qr { width: 70mm; height: 70mm; padding: 4mm; border: 1px solid #d7e0ea; border-radius: 4mm; margin: 2mm 0; display: flex; align-items: center; justify-content: center; } .qa-qr svg { width: 100%; height: 100%; }
.qa-id { font-family: var(--mono); font-size: 10pt; font-weight: 700; color: #1f4f8f; } .qa-loc { font-size: 10pt; color: #64748b; } .qa-hint { margin-top: auto; font-size: 8pt; color: #64748b; }
.label-sheet.a6 { justify-content: center; } .label-sheet.a6 .qr-a6 { transform: scale(.82); transform-origin: top center; margin-bottom: -26mm; }
@media print { body.print-labels .appbar, body.print-labels aside, body.print-labels main { display: none !important; } body.print-labels #printArea { display: block !important; padding: 0; } body.print-labels .label-print.a6 .qr-a6 { border: 0; border-radius: 0; } }
/* dokumentacja maszyn */
.doc-row { display: flex; gap: 14px; align-items: center; padding: 12px 0; border-top: 1px solid var(--border); } .doc-row.arch { opacity: .75; }
.doc-badge { flex: 0 0 48px; height: 40px; border-radius: 9px; display: inline-flex; align-items: center; justify-content: center; font-size: 11px; font-weight: 800; letter-spacing: .4px; background: #eef4fb; color: #1f4f8f; } .doc-badge.u { background: #f1f5f9; color: #475569; }
.doc-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; } .doc-act { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
@media (max-width: 680px) { .doc-row { flex-wrap: wrap; } .doc-act { width: 100%; justify-content: flex-start; } }
.mono-s { font-family: var(--mono); font-size: 11px; }
/* magazyn części, powiadomienia */
.part-fgrid { grid-template-columns: 1.6fr 1fr 1.2fr auto; } @media (max-width: 1100px) { .part-fgrid { grid-template-columns: 1fr 1fr; } } @media (max-width: 680px) { .part-fgrid { grid-template-columns: 1fr; } }
.stock-bar { position: relative; height: 6px; width: 120px; border-radius: 3px; background: #edf1f6; margin: 4px 0 2px; } .stock-bar span { display: block; height: 100%; border-radius: 3px; background: var(--ok-fg); } .stock-bar span.low { background: var(--warn-fg); } .stock-bar span.zero { background: var(--crit-fg); }
.stock-bar i { position: absolute; top: -3px; width: 2px; height: 12px; background: #334155; border-radius: 1px; }
.chk-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px 14px; } @media (max-width: 680px) { .chk-grid { grid-template-columns: 1fr; } }
.mini-t { width: 100%; } .mini-t th, .mini-t td { font-size: 12.5px; padding: 7px 8px; border-bottom: 1px solid var(--border); text-align: left; vertical-align: top; } .mini-t .num { text-align: right; }
.switch { position: relative; display: inline-flex; flex: 0 0 auto; width: 40px; height: 22px; } .switch input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; z-index: 1; }
.switch span { position: absolute; inset: 0; border-radius: 11px; background: #cbd5e1; transition: background .15s; } .switch span::after { content: ''; position: absolute; left: 3px; top: 3px; width: 16px; height: 16px; border-radius: 50%; background: #fff; transition: transform .15s; box-shadow: 0 1px 2px #0003; }
.switch input:checked + span { background: var(--ok-fg); } .switch input:checked + span::after { transform: translateX(18px); } .switch input:disabled + span { opacity: .5; } .switch input:focus-visible + span { box-shadow: 0 0 0 3px var(--primary-50); }
.um-switch { cursor: pointer; } .um-switch > span:nth-child(2) { flex: 1; }
/* praca offline */
.offbar { position: sticky; top: var(--appbar-h); z-index: 5; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 8px 28px; font-size: 13px; border-bottom: 1px solid; }
.offbar.off { background: #fff7e6; color: #8a5300; border-color: #f3d38a; } .offbar.sync { background: var(--info-bg); color: var(--info-fg); border-color: var(--info-bd); } .offbar.err { background: var(--crit-bg); color: var(--crit-fg); border-color: var(--crit-bd); }
.offbar > span { flex: 1; min-width: 0; } .offbar .ico { flex: 0 0 auto; }
@media (max-width: 680px) { .offbar { padding: 8px 14px; } }
.sf-chip.pend { background: #fff7e6; color: #8a5300; border-color: #f3d38a; }
.ur-t td.num, .pm-t td.num { white-space: nowrap; }

/* ---------- karta maszyny: nagłówek ze zdjęciem i kodem QR (jak karta przyrządu w PROMETROLOG) ---------- */
.mhero { display: grid; grid-template-columns: 220px minmax(0, 1fr) auto; gap: 28px; align-items: start; padding: 24px; margin-bottom: var(--s5); }
.mh-photo { display: flex; flex-direction: column; gap: 8px; }
.mh-img, .mh-ph { width: 220px; height: 170px; border: 1px solid var(--border); border-radius: 14px; background: #fff; overflow: hidden; display: grid; place-items: center; padding: 0; }
.mh-img { cursor: zoom-in; display: block; position: relative; } .mh-img img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; display: block; }
.mh-img:focus-visible { outline: none; box-shadow: 0 0 0 3px var(--primary-100); }
.mh-ph { background: var(--surface-2); color: var(--text-3); gap: 6px; align-content: center; font-size: 12.5px; }
.mh-ph .ico { width: 38px; height: 38px; stroke-width: 1.3; }
.mh-photo-acts { display: flex; gap: 6px; } .mh-photo-acts .btn { flex: 1; justify-content: center; } .mh-photo-acts .btn.ghost { flex: 0 0 auto; }
.mh-main { min-width: 0; } .mh-main h1 { margin: 6px 0 4px; }
.mh-sub { color: var(--text-2); font-size: 14px; }
.mh-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; margin: 14px 0 0; font-size: 13.5px; }
.mh-k { color: var(--text-3); font-size: 12px; font-weight: 600; } .mh-k:not(:first-child) { margin-left: 10px; }
.mh-acts { margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--border); flex-wrap: wrap; }
.mh-qr { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 12px 12px 8px; border: 1px solid var(--border); border-radius: 14px; background: #fff; cursor: pointer; color: var(--text-2); font: inherit; font-size: 12.5px; font-weight: 600; }
.mh-qr:hover { border-color: var(--primary); color: var(--primary-ink); }
.mh-qr > svg { width: 132px; height: 132px; display: block; } .mh-qr span { display: inline-flex; align-items: center; gap: 5px; }
@media (max-width: 1100px) { .mhero { grid-template-columns: 180px minmax(0, 1fr); } .mh-img, .mh-ph { width: 180px; height: 140px; } .mh-qr { grid-column: 1 / -1; flex-direction: row; justify-self: start; padding: 8px 12px; } .mh-qr > svg { width: 64px; height: 64px; } }
@media (max-width: 640px) { .mhero { grid-template-columns: 1fr; padding: 16px; gap: 16px; } .mh-img, .mh-ph { width: 100%; height: 200px; } }

/* ---------- skaner etykiet QR ---------- */
.qr-wrap { position: relative; border-radius: 14px; overflow: hidden; background: #0b1220; aspect-ratio: 4 / 3; }
.qr-wrap video { width: 100%; height: 100%; object-fit: cover; display: block; }
.qr-frame { position: absolute; inset: 18% 24%; border: 3px solid #ffffffd9; border-radius: 18px; box-shadow: 0 0 0 9999px #0006; pointer-events: none; }
.qr-status { margin: 14px 0 12px; font-size: 14px; color: var(--text-2); }
.qr-status.warn { color: var(--warn-fg); }
.qr-status code { font-size: 12px; word-break: break-all; }

/* ===== Skalowanie i typografia 2.0 – Mac / Windows / tablet / telefon ===== */
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body { font-optical-sizing: auto; }
/* Windows (ClearType): bez wygładzania w skali szarości tekst wygląda ostrzej, ale Inter wymaga nieco większej grubości */
@supports not (-webkit-touch-callout: none) { @media (pointer: fine) { .pm-t td, .cell-sub { font-weight: 500; } } }
.pm-t th { white-space: nowrap; }
.pm-t td { vertical-align: top; }
.cell-main { overflow-wrap: anywhere; }
.inv { display: inline-block; line-height: 1.35; }
.parts-t td:first-child .inv, .iss-t td:first-child .inv, .ur-t td:first-child .inv { margin-bottom: 3px; }
.parts-t td:first-child .cell-main { display: block; }
.parts-t td:first-child { min-width: 220px; }
.iss-t td:nth-child(2), .iss-t td:nth-child(3) { min-width: 170px; }
/* chipy BHP i maszyn: jedna linia, zawijanie całych chipów */
.sf-chip { white-space: nowrap; flex: none; line-height: 1.2; max-width: 100%; }
.pm-tags { flex-wrap: wrap; gap: 6px; }
.parts-t td:nth-child(7) { min-width: 120px; }
.parts-t td:nth-child(7) .sf-chip { margin: 0 4px 4px 0; }
/* paski przewijania – cienkie na Windows/Linux */
aside, .table-wrap, .modal, .modal-body { scrollbar-width: thin; scrollbar-color: #c3ccd8 transparent; }
aside { scrollbar-color: #3a5378 transparent; }
.table-wrap::-webkit-scrollbar { height: 8px; } .table-wrap::-webkit-scrollbar-thumb { background: #c9d2de; border-radius: 8px; }
/* duże monitory: szersza treść, nieco większa czcionka */
@media (min-width: 2200px) { :root { --fs-md: 14.5px; } .content { max-width: 1960px; } }
/* laptopy 1280–1440 (Windows 1366/1536, MacBook Air) */
@media (max-width: 1440px) and (min-width: 1181px) { :root { --sidebar-w: 212px; } .content { padding-left: 26px; padding-right: 26px; } }
@media (max-width: 1460px) { .iss-t th:nth-child(8), .iss-t td:nth-child(8) { display: none; } .parts-t th:nth-child(2), .parts-t td:nth-child(2) { display: none; } }
@media (max-width: 1180px) and (min-width: 761px) { .content { padding-left: 20px; padding-right: 20px; } .iss-t th:nth-child(4), .iss-t td:nth-child(4) { display: none; } .parts-t th:nth-child(3), .parts-t td:nth-child(3), .parts-t th:nth-child(5), .parts-t td:nth-child(5) { display: none; } }
/* tablet pionowo 681–760 i telefony: tabele jako karty */
@media (max-width: 760px) and (min-width: 681px) {
  table.mstack { min-width: 0 !important; display: block; }
  table.mstack thead { display: none; } table.mstack tbody { display: block; }
  table.mstack tr { display: grid; grid-template-columns: 1fr 1fr; gap: 0 16px; border: 1px solid var(--border); border-radius: 12px; padding: 8px 14px; margin: 0 0 10px; background: #fff; }
  table.mstack td { display: block; position: relative; padding: 22px 0 8px !important; border-bottom: 1px dashed #edf1f6 !important; text-align: left !important; white-space: normal !important; }
  table.mstack td::before { content: attr(data-label); position: absolute; left: 0; top: 6px; font-size: 10.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .4px; color: var(--text-3); }
  table.mstack td:first-child { grid-column: 1 / -1; padding-top: 6px !important; } table.mstack td:first-child::before { display: none; }
  table.mstack td[data-label=""] { padding-top: 8px !important; } table.mstack td[data-label=""]::before { display: none; }
  table.mstack td:empty { display: none; }
  table.mstack td .cell-main, table.mstack td .cell-sub { display: block; }
}
@media (max-width: 680px) {
  table.mstack td:first-child { padding-left: 0 !important; } table.mstack td:first-child::before { display: none; }
  table.mstack td:first-child .inv { margin-bottom: 4px; }
  table.mstack td.row-act { padding-left: 0 !important; text-align: right !important; } table.mstack td.row-act::before { display: none; } table.mstack td.row-act:not(:has(*)) { display: none; }
  table.mstack td.row-act .btn { width: 100%; justify-content: center; }
  table.mstack tr.clickable:active { background: #f6f9fd; }
  .sf-chip { white-space: normal; height: auto; min-height: 24px; padding-top: 3px; padding-bottom: 3px; }
  .head h1, .page-title, h1 { font-size: 22px; line-height: 1.2; overflow-wrap: anywhere; }
}
/* dotyk: większe pola, brak powiększania iOS przy fokusie */
@media (pointer: coarse) {
  input:not([type=checkbox]):not([type=radio]):not(.range), select, textarea { font-size: 16px !important; }
  .btn, .chip, .nav, .roundbtn, .iconbtn { min-height: 40px; }
  .btn.sm { min-height: 36px; }
  .linklike { padding-top: 4px; padding-bottom: 4px; }
}
@media (hover: none) { .clickable:hover { background: inherit; } }

/* ===== Wyszukiwarka w listach wyboru ===== */
.combo { position: relative; width: 100%; }
.combo .combo-native { position: absolute; inset: 0; opacity: 0; pointer-events: none; width: 100%; height: 100%; }
.combo-in { width: 100%; padding-right: 34px !important; background-image: linear-gradient(45deg, transparent 50%, #7b8797 50%), linear-gradient(135deg, #7b8797 50%, transparent 50%); background-position: calc(100% - 17px) 50%, calc(100% - 12px) 50%; background-size: 5px 5px; background-repeat: no-repeat; text-overflow: ellipsis; }
.combo.open .combo-in { border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-50); }
.combo-list { display: none; position: fixed; z-index: 400; margin: 0; padding: 4px; list-style: none; max-height: min(320px, 46vh); overflow-y: auto; background: #fff; border: 1px solid var(--border-strong); border-radius: 10px; box-shadow: 0 14px 34px -12px #0f2a5240; scrollbar-width: thin; }
.combo.open .combo-list { display: block; }
.combo-list li { padding: 8px 10px; border-radius: 7px; cursor: pointer; font-size: 13px; line-height: 1.35; color: var(--text); }
.combo-list li.act { background: #eef4fb; }
.combo-list li.sel { font-weight: 650; }
.combo-list li mark { background: #ffe2c6; color: inherit; border-radius: 3px; padding: 0 1px; }
.combo-list li.combo-none { color: var(--text-3); cursor: default; }

/* ===== Zmiana szerokości kolumn ===== */
.pm-t thead th, #content table thead th { position: relative; }
.col-grip { position: absolute; top: 0; right: -4px; width: 9px; height: 100%; cursor: col-resize; z-index: 2; touch-action: none; }
.col-grip::after { content: ''; position: absolute; top: 25%; bottom: 25%; left: 4px; width: 1px; background: var(--border-strong); opacity: 0; transition: opacity .15s; }
thead:hover .col-grip::after { opacity: 1; }
.col-grip:hover::after, .col-grip.on::after { opacity: 1; width: 2px; left: 3px; background: var(--primary); top: 0; bottom: 0; }
body.col-resizing, body.col-resizing * { cursor: col-resize !important; user-select: none !important; }
table.cols-set th, table.cols-set td { overflow: hidden; text-overflow: ellipsis; }
table.cols-set .inv { max-width: 100%; overflow: hidden; text-overflow: ellipsis; vertical-align: top; }
@media (max-width: 760px) { .col-grip { display: none; } }

/* ===== Oddziały: przełącznik w górnym pasku, zakres użytkownika, import ===== */
.site-sw { display: inline-flex; align-items: center; gap: 6px; height: 36px; padding: 0 8px 0 10px; border: 1px solid var(--border); border-radius: 10px; background: #fff; color: var(--text-2); cursor: pointer; margin-right: 4px; }
.site-sw[hidden] { display: none; }
.site-tag { display: none; }
.site-sw:hover { border-color: var(--border-strong); }
.site-sw select { border: 0; background: transparent; font: inherit; font-size: 13px; font-weight: 600; color: var(--text); padding: 0 2px; height: 30px; max-width: 220px; cursor: pointer; outline: none; box-shadow: none; }
.scope-pick { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 10px; margin-top: 6px; max-height: 260px; overflow: auto; padding: 2px; }
.sp-site { border: 1px solid var(--border); border-radius: 10px; padding: 8px 10px; background: #fafbfd; }
.sp-site:has(> label input:checked) { border-color: var(--primary); background: #fff8f2; }
.sp-site:has(> label input:checked) .sp-areas { opacity: .45; pointer-events: none; }
.sp-areas { display: grid; gap: 2px; margin: 4px 0 0 24px; }
.sp-areas .chk { font-size: 12.5px; }
tr.f-err td { background: #fff5f5; }
.elsewhere { color: var(--info-fg, #2b5ea7) !important; }
@media (max-width: 680px) {
  .tb-tools > .site-sw:not([hidden]) { display: inline-flex !important; }
  .site-sw { position: relative; padding: 0 8px; height: 34px; gap: 4px; }
  .site-sw select { position: absolute; inset: 0; width: 100%; max-width: none; height: 100%; opacity: 0; }
  .site-tag { display: inline !important; font-size: 12px; font-weight: 700; color: var(--text); }
}

/* ===== Formularze: dopracowanie (Safari, wybór maszyn, zakres) ===== */
input::-webkit-contacts-auto-fill-button, input::-webkit-credentials-auto-fill-button { visibility: hidden; display: none !important; pointer-events: none; position: absolute; right: 0; }
.modal .form-sec:first-child { padding-top: 0; }
.mpick { border: 1px solid var(--border); border-radius: 12px; background: #fff; overflow: hidden; }
.mpick-bar { display: flex; align-items: center; gap: 10px; padding: 8px; border-bottom: 1px solid var(--border); background: #f8fafc; }
.mpick-q { flex: 1; height: 34px !important; min-height: 0 !important; font-size: 13px !important; }
.mpick-n { font-size: 12px; color: var(--text-3); white-space: nowrap; padding-right: 4px; }
.mpick-list { max-height: 240px; overflow: auto; padding: 6px 10px 10px; scrollbar-width: thin; }
.mpick-g + .mpick-g { margin-top: 6px; }
.mpick-gh { font-size: 10.5px; font-weight: 700; letter-spacing: .5px; text-transform: uppercase; color: var(--text-3); padding: 6px 2px 4px; }
.mpick-items, .sp-areas { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 4px 8px; }
.mpick-i { display: flex; align-items: center; gap: 8px; min-height: 32px; padding: 4px 8px; border: 1px solid transparent; border-radius: 8px; cursor: pointer; font-size: 13px; line-height: 1.25; color: var(--text); }
.mpick-i:hover { background: #f4f7fb; }
.mpick-i:has(input:checked) { background: #fff6ee; border-color: #f6c9a4; }
.mpick-i input { width: 16px !important; height: 16px; min-height: 0 !important; margin: 0; flex: none; accent-color: var(--primary); }
.mpick-i b { font-weight: 650; font-variant-numeric: tabular-nums; margin-right: 2px; }
.mpick-i[hidden], .mpick-g[hidden] { display: none; }
.scope-pick { display: grid; grid-template-columns: 1fr; gap: 10px; max-height: none; margin: 0; padding: 0; overflow: visible; }
.sp-site { border: 1px solid var(--border); border-radius: 12px; padding: 0; background: #fff; overflow: hidden; }
.sp-head { display: flex; align-items: center; gap: 10px; padding: 10px 12px; background: #f8fafc; border-bottom: 1px solid var(--border); cursor: pointer; font-size: 13.5px; }
.sp-head input { width: 16px !important; height: 16px; min-height: 0 !important; margin: 0; accent-color: var(--primary); }
.sp-name { font-weight: 650; color: var(--text); }
.sp-all { margin-left: auto; font-size: 12px; color: var(--text-3); }
.sp-areas { margin: 0; padding: 8px 10px 10px; }
.sp-site:has(.sp-head input:checked) { border-color: #f6c9a4; }
.sp-site:has(.sp-head input:checked) .sp-head { background: #fff6ee; }
.sp-site:has(.sp-head input:checked) .sp-all { color: var(--primary); font-weight: 650; }
.sp-site:has(.sp-head input:checked) .sp-areas { opacity: .45; pointer-events: none; }
.field .mpick-i, .mpick .mpick-i { display: flex !important; align-items: center; gap: 8px; margin: 0 !important; font-size: 13px !important; font-weight: 500 !important; color: var(--text) !important; text-transform: none !important; letter-spacing: 0 !important; }
.field .mpick-i input { margin: 0 !important; }
.fields.f3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.fields.f3 .span2 { grid-column: span 2; }
@media (max-width: 820px) { .fields.f3 { grid-template-columns: 1fr 1fr; } }
@media (max-width: 680px) { .fields.f3 { grid-template-columns: 1fr; } .fields.f3 .span2 { grid-column: auto; } }
.field label:empty { display: none; }
.form-sec-h span:empty { display: none; }
.mpick-i { border-color: var(--border); background: #fff; }
.mpick-i:hover { border-color: var(--border-strong); background: #fafcfe; }
/* reguły eskalacji – edycja */
.ar-list { display: grid; gap: 10px; }
.ar-row { display: grid; grid-template-columns: auto 1fr auto; align-items: start; gap: 14px; padding: 12px 14px; border: 1px solid var(--border); border-radius: 12px; background: #fff; }
.ar-row:has([data-ar-on]:not(:checked)) .ar-main, .ar-row:has([data-ar-on]:not(:checked)) .ar-when { opacity: .45; }
.ar-row .switch { margin-top: 2px; }
.ar-title { font-weight: 650; font-size: 13.5px; margin-bottom: 8px; color: var(--text); }
.ar-who { display: flex; flex-wrap: wrap; gap: 6px; }
.ar-who .mpick-i { min-height: 30px; font-size: 12.5px; }
.ar-when { display: flex; align-items: center; gap: 6px; white-space: nowrap; padding-top: 2px; font-size: 13px; color: var(--text-2); }
.ar-when input { width: 84px !important; height: 34px !important; min-height: 0 !important; text-align: right; }
.ar-when input[type=time] { width: 124px !important; text-align: left; }
@media (max-width: 680px) { .ar-row { grid-template-columns: auto 1fr; } .ar-when { grid-column: 2; } }
.mpick-q, .ar-when input { border: 1px solid var(--border-strong) !important; border-radius: 9px !important; padding: 0 12px !important; background: #fff !important; font: inherit; font-size: 13px !important; color: var(--text); outline: none; -webkit-appearance: none; appearance: none; box-shadow: none; }
.mpick-q:focus, .ar-when input:focus { border-color: var(--primary) !important; box-shadow: 0 0 0 3px var(--primary-50) !important; }
.mpick-q::placeholder { color: var(--text-3); }

/* obieg zgłoszenia: etap z podpisem (np. czeka na części) */
.ur-flow li .uf-t { display: flex; flex-direction: column; min-width: 0; line-height: 1.2; }
.ur-flow li .uf-t b { font-weight: inherit; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ur-flow li .uf-t em { display: inline-flex; align-items: center; gap: 4px; margin: 3px 0 0; font-size: 11px; font-weight: 650; color: var(--warn-fg); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ur-flow li .uf-t em .ico { width: 12px; height: 12px; flex: none; }
.ur-flow li.cur.wait { border-color: var(--warn-bd, #f1c27d); box-shadow: 0 0 0 3px #fdf3e1; background: #fffaf2; }
.ur-flow li.cur.wait span { background: var(--warn-fg); border-color: var(--warn-fg); }
.ur-flow li { min-height: 46px; }
/* ID zasobu QR na karcie maszyny */
.qr-id { display: flex; align-items: center; flex-wrap: wrap; gap: 10px 14px; }
.qr-inv { display: inline-flex !important; align-items: center; gap: 6px; }
.qr-inv .ico { width: 13px; height: 13px; }
.qr-acts { display: inline-flex; gap: 8px; flex-wrap: wrap; }
