/* RED94 Portal – slog (samo rdeči odtenki, enoten za vse vloge) */
:root {
    --red: #c41e3a;
    --red-dark: #a01730;
    --red-soft: #fbeaed;
    --ink: #222;
    --ink-2: #555;
    --muted: #8a8f98;
    --line: #e3e5e8;
    --bg: #f0f2f5;
    --head-bg: #e8eaed;
    --card: #fff;
    --radius: 6px;
    --shadow: 0 1px 3px rgba(0,0,0,.06), 0 1px 2px rgba(0,0,0,.04);
    --sidebar-w: 220px;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html { height: 100%; }
body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    font-size: 15px; line-height: 1.45; color: var(--ink); background: var(--bg);
    display: flex; flex-direction: column; min-height: 100vh;
}
a { color: var(--red); }
button { font: inherit; cursor: pointer; }
input, select, textarea { font: inherit; color: inherit; }
.muted { color: var(--muted); }
.small { font-size: .8rem; }
.ic { width: 18px; height: 18px; flex-shrink: 0; vertical-align: middle; }
[hidden] { display: none !important; }

/* ---------- glava ---------- */
.header {
    background: var(--head-bg); border-bottom: 4px solid var(--red);
    height: 76px; padding: 0 2rem; display: flex; align-items: center; gap: 1.5rem;
    position: relative; z-index: 30; flex-shrink: 0;
}
.logo-link { display: block; height: 100%; position: relative; }
.logo { height: 120px; position: relative; top: -2px; filter: drop-shadow(0 4px 10px rgba(0,0,0,.15)); }
.header-right { margin-left: auto; display: flex; align-items: center; gap: 1.5rem; }
.user-info { text-align: right; line-height: 1.25; }
.user-name { font-weight: 600; }
.user-role { color: var(--ink-2); font-size: .82rem; }
.header-link { color: var(--red); font-weight: 600; font-size: .9rem; text-decoration: none; white-space: nowrap; }
.header-link:hover { text-decoration: underline; }
.hamburger { display: none; background: none; border: 0; width: 40px; height: 40px; padding: 9px 8px; flex-direction: column; justify-content: space-between; }
.hamburger span { display: block; height: 3px; background: var(--red); border-radius: 2px; transition: transform .25s, opacity .25s; }
.hamburger.active span:nth-child(1) { transform: translateY(8px) rotate(45deg); }
.hamburger.active span:nth-child(2) { opacity: 0; }
.hamburger.active span:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }

/* ---------- zavihki ---------- */
.tabs-container { background: #fff; border-bottom: 1px solid var(--line); box-shadow: var(--shadow); flex-shrink: 0; position: relative; z-index: 20; }
.tabs { list-style: none; display: flex; justify-content: center; gap: 3rem; }
.tab-link {
    display: block; padding: .95rem .25rem .8rem; color: #9a9ea6; font-weight: 600; text-decoration: none;
    border-bottom: 3px solid transparent; white-space: nowrap; transition: color .15s, border-color .15s;
}
.tab-link:hover { color: var(--ink); }
.tab-link.active { color: var(--red); border-bottom-color: var(--red); }

/* ---------- postavitev ---------- */
.main-container { flex: 1; display: flex; min-height: 0; }
.sidebar {
    width: var(--sidebar-w); background: #fff; border-right: 3px solid var(--red); flex-shrink: 0;
    display: flex; flex-direction: column; overflow-y: auto;
}
#sidebar-menu { flex: 1; }
.sidebar-section { padding: 1.1rem 0 .6rem; border-bottom: 1px solid #f1f2f4; }
.sidebar-title { padding: 0 1rem; font-size: .66rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); font-weight: 700; margin-bottom: .4rem; }
.sidebar-menu { list-style: none; }
.sidebar-menu a {
    display: block; padding: .6rem 1rem; color: var(--ink); text-decoration: none; font-size: .9rem;
    border-left: 3px solid transparent;
}
.sidebar-menu a:hover { background: var(--bg); color: var(--red); border-left-color: var(--red); }
.sidebar-menu a.active { background: var(--red); color: #fff; border-left-color: var(--red-dark); }
.language-switch { display: flex; justify-content: center; gap: .4rem; padding: 1rem; border-top: 1px solid var(--line); }
.lang-link { background: none; border: 1px solid transparent; color: var(--red); font-weight: 700; font-size: .8rem; padding: .3rem .65rem; border-radius: 4px; }
.lang-link.active { background: var(--red); color: #fff; }
.sidebar-overlay { display: none; }
.content { flex: 1; min-width: 0; padding: 2rem 2.25rem 4rem; }

/* ---------- osnovni elementi ---------- */
.page-head { display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; margin-bottom: 1.25rem; }
.page-head h1 { color: var(--red); font-size: 1.35rem; }
.section-title { font-size: 1rem; color: var(--ink-2); margin: 2rem 0 .75rem; }
.panel { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); padding: 1.25rem 1.5rem; margin-top: 1.25rem; }
.panel h2 { font-size: 1rem; margin-bottom: 1rem; }
.empty, .loading { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); padding: 2.5rem 1rem; text-align: center; color: var(--muted); }
.alert { padding: .8rem 1rem; border-radius: var(--radius); margin-bottom: 1rem; font-size: .92rem; }
.alert-error { background: #fdecee; color: #8a1428; border: 1px solid #f6c5cd; }
.alert-info { background: #fff; border: 1px dashed var(--red); color: var(--ink-2); }

.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: .45rem;
    min-height: 40px; padding: .55rem 1.1rem; border-radius: var(--radius); border: 1px solid transparent;
    font-weight: 600; font-size: .92rem; text-decoration: none; background: #eceef1; color: var(--ink);
    transition: background .15s, transform .05s; white-space: nowrap;
}
.btn:active { transform: scale(.98); }
.btn:disabled { opacity: .55; cursor: default; }
.btn-primary { background: var(--red); color: #fff; }
.btn-primary:hover { background: var(--red-dark); }
.btn-danger { background: #fff; color: var(--red); border-color: var(--red); }
.btn-danger:hover { background: var(--red); color: #fff; }
.btn-ghost { background: transparent; border-color: var(--line); color: var(--ink-2); }
.btn-ghost:hover { border-color: var(--red); color: var(--red); }
.btn-small { min-height: 32px; padding: .3rem .7rem; font-size: .82rem; }
.btn-icon { min-height: 36px; width: 36px; padding: 0; }
.btn-block { width: 100%; }
.ib { display: inline-flex; align-items: center; justify-content: center; width: 32px; height: 32px; border-radius: 4px; border: 0; background: transparent; color: var(--muted); }
.ib:hover { background: var(--bg); color: var(--ink); }
.ib.danger:hover { color: var(--red); background: var(--red-soft); }
.ib:disabled { cursor: default; }
.ib.bill.on { color: var(--red); }

.chip { display: inline-flex; align-items: center; gap: .35rem; font-size: .82rem; font-weight: 600; color: var(--ink); }
.chip::before { content: ''; width: 9px; height: 9px; border-radius: 50%; background: var(--c, var(--red)); flex-shrink: 0; }
.chip-muted { color: var(--muted); font-weight: 500; }
.chip-muted::before { background: #c9ccd1; }
.tag { display: inline-block; font-size: .74rem; padding: .1rem .5rem; border-radius: 99px; border: 1px solid var(--c, var(--red)); color: var(--c, var(--red)); background: #fff; }
.tag-lg { font-size: .9rem; padding: .35rem .9rem; }
.tag.inactive { opacity: .45; }
.tag-list { display: flex; flex-wrap: wrap; gap: .6rem; }
.badge { display: inline-block; font-size: .74rem; font-weight: 700; padding: .18rem .55rem; border-radius: 4px; background: #eceef1; color: var(--ink-2); white-space: nowrap; }
.badge-in_progress, .badge-in_production, .badge-ready { background: var(--red-soft); color: var(--red); }
.badge-completed, .badge-delivered { background: #e9ecef; color: #3c4148; }
.badge-late { background: var(--red); color: #fff; }

/* ---------- obrazci ---------- */
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: .9rem 1rem; margin-bottom: 1rem; }
.form-grid.one { grid-template-columns: 1fr; }
.field { display: flex; flex-direction: column; gap: .3rem; }
.field.full, .check.full { grid-column: 1 / -1; }
.field > span { font-size: .82rem; font-weight: 600; color: var(--ink-2); }
.field small { color: var(--muted); font-size: .76rem; }
.field input, .field select, .field textarea, .toolbar select, .trackbar input, .trackbar select, .bulkbar select {
    width: 100%; padding: .6rem .7rem; border: 1px solid #d5d8dc; border-radius: var(--radius); background: #fff; min-height: 40px;
}
.field input[type=color] { padding: .2rem; height: 40px; }
.field input:focus, .field select:focus, .field textarea:focus, .trackbar input:focus, .trackbar select:focus, .ts-cell:focus {
    outline: none; border-color: var(--red); box-shadow: 0 0 0 3px rgba(196,30,58,.12);
}
.field input:disabled { background: #f6f7f8; color: var(--muted); }
.check { display: flex; align-items: center; gap: .5rem; font-size: .9rem; cursor: pointer; }
.check input { width: 18px; height: 18px; accent-color: var(--red); }
.tag-picker { display: flex; flex-wrap: wrap; gap: .45rem; }
.chip-check input { position: absolute; opacity: 0; pointer-events: none; }
.chip-check span { display: inline-block; padding: .35rem .8rem; border-radius: 99px; border: 1px solid var(--c); color: var(--c); font-size: .85rem; cursor: pointer; user-select: none; }
.chip-check input:checked + span { background: var(--c); color: #fff; }
.chip-check input:focus-visible + span { box-shadow: 0 0 0 3px rgba(196,30,58,.25); }

/* ---------- modalno okno ---------- */
.modal-backdrop { position: fixed; inset: 0; background: rgba(20,22,26,.45); z-index: 100; display: flex; align-items: flex-start; justify-content: center; padding: 6vh 1rem 1rem; overflow-y: auto; }
.modal { background: #fff; border-radius: 8px; width: 100%; max-width: 620px; box-shadow: 0 20px 50px rgba(0,0,0,.25); border-top: 4px solid var(--red); }
.modal-head { display: flex; align-items: center; justify-content: space-between; padding: 1rem 1.25rem .5rem; }
.modal-head h2 { font-size: 1.1rem; color: var(--red); }
.modal-x { background: none; border: 0; font-size: 1.6rem; line-height: 1; color: var(--muted); width: 36px; height: 36px; }
.modal-body { padding: .5rem 1.25rem 1.25rem; }
.modal-error { background: #fdecee; color: #8a1428; padding: .6rem .8rem; border-radius: var(--radius); margin-bottom: .8rem; font-size: .9rem; }
.modal-actions { display: flex; justify-content: flex-end; gap: .6rem; flex-wrap: wrap; }
.confirm-text { margin-bottom: 1rem; }
.password-box { background: var(--bg); border: 1px dashed var(--red); border-radius: var(--radius); padding: 1rem; text-align: center; margin: .8rem 0; }
.password-box code { font-size: 1.4rem; letter-spacing: .08em; font-weight: 700; user-select: all; }

/* ---------- obvestila, tekoči časovnik ---------- */
.toast { position: fixed; left: 50%; bottom: 1.5rem; transform: translateX(-50%); z-index: 200; padding: .7rem 1.2rem; border-radius: var(--radius); color: #fff; font-weight: 600; box-shadow: 0 8px 24px rgba(0,0,0,.2); max-width: calc(100vw - 2rem); }
.toast-ok { background: #2b2f36; }
.toast-error { background: var(--red); }
.timer-pill {
    position: fixed; right: 1.25rem; bottom: 1.25rem; z-index: 90; display: flex; align-items: center; gap: .55rem;
    background: #fff; border: 2px solid var(--red); border-radius: 99px; padding: .35rem .4rem .35rem .9rem; box-shadow: 0 6px 18px rgba(0,0,0,.18); cursor: pointer; max-width: calc(100vw - 2rem);
}
.timer-pill b { font-variant-numeric: tabular-nums; color: var(--red); }
.pill-name { max-width: 180px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: .85rem; }
.pill-stop { width: 30px; height: 30px; border-radius: 50%; border: 0; background: var(--red); color: #fff; font-size: .7rem; }
.dot { width: 9px; height: 9px; border-radius: 50%; background: var(--red); animation: pulse 1.4s infinite; flex-shrink: 0; }
@keyframes pulse { 50% { opacity: .35; } }

/* ---------- pregled ---------- */
.stats-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 1rem; }
.stat-card { display: block; background: #fff; border-radius: var(--radius); box-shadow: var(--shadow); padding: 1.1rem 1.25rem; text-decoration: none; color: inherit; border-left: 3px solid transparent; transition: border-color .15s; }
a.stat-card[href]:hover { border-left-color: var(--red); }
.stat-card.warn { border-left-color: var(--red); }
.stat-label { color: var(--ink-2); font-size: .82rem; margin-bottom: .3rem; }
.stat-value { font-size: 1.7rem; font-weight: 700; color: var(--red); font-variant-numeric: tabular-nums; }
.quick { display: flex; gap: .7rem; flex-wrap: wrap; margin-top: 1.25rem; }
.bar-row { display: grid; grid-template-columns: minmax(100px, 220px) 1fr 60px; gap: .8rem; align-items: center; margin-bottom: .55rem; font-size: .9rem; }
.bar-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bar-track { height: 10px; background: var(--bg); border-radius: 5px; overflow: hidden; }
.bar-fill { display: block; height: 100%; border-radius: 5px; }
.bar-val { text-align: right; font-variant-numeric: tabular-nums; }
.running-row { display: flex; align-items: center; gap: .6rem; padding: .45rem 0; border-bottom: 1px solid #f1f2f4; flex-wrap: wrap; }

/* ---------- časovnik ---------- */
.trackbar {
    background: #fff; border-radius: var(--radius); box-shadow: var(--shadow); padding: .75rem;
    display: grid; grid-template-columns: minmax(180px, 2fr) minmax(140px, 1.2fr) minmax(130px, 1fr) auto auto auto auto auto;
    gap: .6rem; align-items: center; border-left: 4px solid #d5d8dc;
}
.trackbar.running { border-left-color: var(--red); }
.trackbar.manual { grid-template-columns: minmax(180px, 2fr) minmax(140px, 1.2fr) minmax(130px, 1fr) auto auto; }
.trackbar.manual .tb-manual { grid-column: 1 / -3; }
.trackbar.is-break { grid-template-columns: 1fr auto auto auto; }
.tb-break-label { display: flex; align-items: center; gap: .5rem; font-weight: 600; color: var(--ink-2); }
.btn-icon-text { display: inline-flex; align-items: center; gap: .35rem; background: none; border: 1px solid transparent; color: var(--muted); padding: .4rem .5rem; border-radius: var(--radius); min-height: 40px; max-width: 160px; }
.btn-icon-text span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: .85rem; }
.btn-icon-text:hover { border-color: var(--line); color: var(--ink); }
.tb-bill { width: 40px; height: 40px; border-radius: var(--radius); border: 1px solid transparent; background: none; color: #c9ccd1; }
.tb-bill.on { color: var(--red); }
.tb-bill:hover { border-color: var(--line); }
.tb-clock { font-size: 1.45rem; font-weight: 700; font-variant-numeric: tabular-nums; min-width: 105px; text-align: right; }
.trackbar.running .tb-clock { color: var(--red); }
.tb-main { min-width: 110px; }
.tb-modes { display: flex; flex-direction: column; gap: 2px; }
.mode-btn { display: flex; align-items: center; gap: .3rem; background: none; border: 0; color: #b4b8be; padding: .15rem .3rem; border-radius: 4px; font-size: .72rem; }
.mode-btn span { display: none; }
.mode-btn.active, .mode-btn:hover { color: var(--red); }
.tb-manual { display: flex; align-items: center; gap: .5rem; flex-wrap: wrap; }
.tb-manual input[type=date] { width: auto; }
.tb-manual input[type=time] { width: 110px; }
.tb-hours { width: 90px !important; }
.tb-or { color: var(--muted); font-size: .85rem; }

.toolbar { display: flex; align-items: center; justify-content: space-between; gap: .8rem; flex-wrap: wrap; margin: 1.25rem 0 .9rem; }
.toolbar select { width: auto; min-width: 200px; }
.seg { display: inline-flex; background: #fff; border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; flex-wrap: wrap; }
.seg button { border: 0; background: none; padding: .55rem .9rem; font-size: .85rem; color: var(--ink-2); border-right: 1px solid var(--line); }
.seg button:last-child { border-right: 0; }
.seg button.active { background: var(--red); color: #fff; }
.bulkbar { display: flex; align-items: center; gap: .6rem; flex-wrap: wrap; background: var(--red-soft); border: 1px solid #f3c3cc; padding: .6rem .8rem; border-radius: var(--radius); margin-bottom: .9rem; }
.bulkbar select { width: auto; min-height: 32px; padding: .3rem .5rem; }
.period-total { display: flex; gap: 1.5rem; justify-content: flex-end; font-size: .9rem; margin-bottom: .6rem; }
.day { background: #fff; border-radius: var(--radius); box-shadow: var(--shadow); margin-bottom: 1rem; overflow: hidden; }
.day-head { display: flex; justify-content: space-between; padding: .6rem 1rem; background: #f7f8f9; border-bottom: 1px solid var(--line); font-size: .85rem; color: var(--ink-2); }
.entry { display: grid; grid-template-columns: 28px 1fr auto; gap: .6rem; align-items: center; padding: .6rem 1rem; border-bottom: 1px solid #f1f2f4; }
.entry:last-child { border-bottom: 0; }
.entry:hover { background: #fcfcfd; }
.entry-check { width: 17px; height: 17px; accent-color: var(--red); }
.entry-desc { font-weight: 500; overflow-wrap: anywhere; }
.entry-meta { display: flex; flex-wrap: wrap; align-items: center; gap: .35rem .6rem; margin-top: .15rem; }
.entry-right { display: flex; align-items: center; gap: .6rem; }
.entry-range { color: var(--ink-2); font-size: .85rem; font-variant-numeric: tabular-nums; white-space: nowrap; }
.entry-dur { font-weight: 700; font-variant-numeric: tabular-nums; min-width: 66px; text-align: right; }
.entry-actions { display: flex; opacity: .35; transition: opacity .15s; }
.entry:hover .entry-actions, .entry:focus-within .entry-actions { opacity: 1; }
.entry-break { background: #fafafa; }
.entry-break .entry-dur { color: var(--muted); }

/* ---------- tabele ---------- */
.table-wrap { background: #fff; border-radius: var(--radius); box-shadow: var(--shadow); overflow-x: auto; }
table.grid { width: 100%; border-collapse: collapse; font-size: .9rem; }
table.grid th { text-align: left; font-size: .76rem; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); font-weight: 700; padding: .75rem .9rem; background: #f7f8f9; border-bottom: 1px solid var(--line); white-space: nowrap; }
table.grid td { padding: .7rem .9rem; border-bottom: 1px solid #f1f2f4; vertical-align: middle; }
table.grid tr:last-child td { border-bottom: 0; }
table.grid .num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
table.grid tr.inactive td { opacity: .5; }
td.actions { text-align: right; white-space: nowrap; }
.row-actions { display: inline-flex; align-items: center; gap: .2rem; }

/* tedenska evidenca */
.week-nav { display: flex; align-items: center; gap: .4rem; flex-wrap: wrap; }
.week-label { font-weight: 600; min-width: 200px; text-align: center; }
table.timesheet { min-width: 760px; }
table.timesheet th, table.timesheet td { text-align: center; }
table.timesheet .ts-row-head { text-align: left; min-width: 180px; }
table.timesheet th.is-today, table.timesheet td.is-today { background: var(--red-soft); }
table.timesheet tfoot th { background: #f7f8f9; color: var(--ink); font-size: .85rem; border-top: 1px solid var(--line); }
.ts-cell { width: 64px; text-align: center; padding: .45rem .3rem; border: 1px solid #d5d8dc; border-radius: 4px; font-variant-numeric: tabular-nums; background: #fff; }
.ts-cell.multi { background: #f3f4f6; color: var(--muted); cursor: not-allowed; }
.ts-total { font-weight: 700; font-variant-numeric: tabular-nums; }
.table-wrap + .btn { margin-top: .9rem; }
.content > p.muted.small { margin-top: .6rem; }

/* gantogram */
.gantt-wrap { background: #fff; border-radius: var(--radius); box-shadow: var(--shadow); overflow-x: auto; }
.gantt { min-width: 760px; }
.gantt-row { display: grid; grid-template-columns: 220px 1fr; border-bottom: 1px solid #f1f2f4; min-height: 46px; }
.gantt-head { min-height: 34px; background: #f7f8f9; border-bottom: 1px solid var(--line); }
.gantt-label { padding: .5rem .9rem; display: flex; flex-direction: column; justify-content: center; border-right: 2px solid var(--red); font-size: .88rem; overflow: hidden; }
.gantt-label b { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-weight: 600; }
.gantt-track { position: relative; }
.gantt-month { position: absolute; top: 0; bottom: 0; padding: .5rem .4rem; font-size: .74rem; color: var(--muted); border-left: 1px solid var(--line); white-space: nowrap; }
.gantt-grid { position: absolute; top: 0; bottom: 0; border-left: 1px solid #f3f4f6; }
.gantt-today { position: absolute; top: 0; bottom: 0; width: 2px; background: var(--red); opacity: .55; z-index: 2; }
.gantt-bar { position: absolute; top: 10px; height: 26px; border-radius: 4px; color: #fff; font-size: .74rem; font-weight: 600; padding: 0 .5rem; display: flex; align-items: center; overflow: hidden; white-space: nowrap; min-width: 6px; z-index: 1; }
.gantt-bar span { overflow: hidden; text-overflow: ellipsis; }
.status-new { background: #b9bdc4; }
.status-in_progress { background: var(--red); }
.status-completed { background: #6b7079; }
.status-late { background: repeating-linear-gradient(45deg, #7a1124, #7a1124 6px, #9b1730 6px, #9b1730 12px); }
.legend { display: flex; gap: 1.2rem; flex-wrap: wrap; margin-top: .9rem; font-size: .85rem; color: var(--ink-2); }
.legend span { display: inline-flex; align-items: center; gap: .4rem; }
.legend i { width: 14px; height: 14px; border-radius: 3px; display: inline-block; }
.legend-today { width: 3px !important; background: var(--red); }

/* profil */
.two-col { display: grid; grid-template-columns: 1.4fr 1fr; gap: 1.25rem; align-items: start; }
.two-col .panel { margin-top: 0; }

/* ---------- prijava ---------- */
.login-page { align-items: center; justify-content: center; padding: 1rem; }
.login-box { background: #fff; width: 100%; max-width: 380px; padding: 2rem; border-radius: 8px; box-shadow: 0 8px 30px rgba(0,0,0,.08); border-top: 4px solid var(--red); text-align: center; }
.login-logo { width: 130px; margin-bottom: .5rem; }
.login-sub { color: var(--muted); font-size: .88rem; margin-bottom: 1.5rem; }
.login-box form { text-align: left; display: flex; flex-direction: column; gap: 1rem; }
.login-box .field input { font-size: 16px; }
.login-lang { margin-top: 1.5rem; display: flex; justify-content: center; gap: 1rem; font-size: .85rem; }
.login-lang a { color: var(--muted); text-decoration: none; }
.login-lang a.active { color: var(--red); font-weight: 700; }

/* ================= TABLICA ================= */
@media (max-width: 1100px) {
    .tabs { gap: 2rem; }
    .content { padding: 1.5rem; }
    .trackbar { grid-template-columns: 1fr 1fr 1fr; }
    .trackbar .tb-desc { grid-column: 1 / -1; }
    .trackbar .tb-clock { text-align: left; }
    .trackbar.manual { grid-template-columns: 1fr 1fr 1fr; }
    .trackbar.manual .tb-manual { grid-column: 1 / -1; }
    .trackbar.is-break { grid-template-columns: 1fr auto auto; }
    .tb-modes { flex-direction: row; }
    .mode-btn span { display: inline; }
    .two-col { grid-template-columns: 1fr; }
}

/* ================= TELEFON ================= */
@media (max-width: 768px) {
    body { font-size: 15px; }
    .header { height: 58px; padding: 0 .75rem; gap: .5rem; }
    .hamburger { display: flex; }
    .logo { height: 70px; top: -1px; }
    .user-info { display: none; }
    .header-right { gap: .9rem; }
    .header-link { font-size: .82rem; }

    .tabs-container { overflow-x: auto; -webkit-overflow-scrolling: touch; scrollbar-width: none; }
    .tabs-container::-webkit-scrollbar { display: none; }
    .tabs { justify-content: flex-start; gap: 1.5rem; padding: 0 1rem; width: max-content; min-width: 100%; }
    .tabs li:first-child { margin-left: auto; }
    .tabs li:last-child { margin-right: auto; }
    .tab-link { padding: .8rem .1rem .65rem; font-size: .9rem; }

    .sidebar {
        position: fixed; top: 0; bottom: 0; left: 0; z-index: 60; width: 260px;
        transform: translateX(-105%); transition: transform .25s ease; box-shadow: 4px 0 20px rgba(0,0,0,.15);
    }
    .sidebar.open { transform: none; }
    .sidebar-overlay { display: block; position: fixed; inset: 0; background: rgba(0,0,0,.4); z-index: 55; opacity: 0; pointer-events: none; transition: opacity .25s; }
    .sidebar-overlay.open { opacity: 1; pointer-events: auto; }
    .sidebar-menu a { padding: .8rem 1.1rem; font-size: .95rem; }

    .content { padding: 1rem .85rem 6rem; }
    .page-head h1 { font-size: 1.15rem; }
    .page-head .btn { min-height: 38px; }

    .stats-grid { grid-template-columns: 1fr 1fr; gap: .7rem; }
    .stat-card { padding: .85rem 1rem; }
    .stat-value { font-size: 1.35rem; }
    .bar-row { grid-template-columns: 1fr 70px 52px; }

    .form-grid { grid-template-columns: 1fr; }
    .field input, .field select, .field textarea, .trackbar input, .trackbar select { font-size: 16px; min-height: 44px; }
    .modal-backdrop { padding: 0; align-items: flex-end; }
    .modal { max-width: none; border-radius: 12px 12px 0 0; max-height: 92vh; overflow-y: auto; }
    .modal-actions .btn { flex: 1; min-height: 46px; }

    .trackbar, .trackbar.manual { grid-template-columns: 1fr 1fr; gap: .5rem; }
    .trackbar .tb-desc, .trackbar.manual .tb-manual { grid-column: 1 / -1; }
    .trackbar .tb-tags { max-width: none; }
    .trackbar .tb-clock { grid-column: 1 / 2; font-size: 1.6rem; }
    .trackbar .tb-main { grid-column: 2 / 3; min-height: 48px; }
    .trackbar .tb-modes { grid-column: 1 / -1; justify-content: center; gap: 1rem; }
    .trackbar.is-break { grid-template-columns: 1fr 1fr; }
    .trackbar.is-break .tb-break-label { grid-column: 1 / -1; }
    .tb-manual input[type=date] { flex: 1 1 100%; }
    .tb-manual input[type=time] { flex: 1; width: auto; }
    .tb-hours { flex: 1; width: auto !important; }
    .mode-btn { font-size: .82rem; padding: .4rem .5rem; }

    .toolbar { margin: 1rem 0 .7rem; }
    .toolbar select { width: 100%; }
    .seg { width: 100%; }
    .seg button { flex: 1; padding: .6rem .3rem; font-size: .8rem; }

    .entry { grid-template-columns: 24px 1fr; padding: .7rem .75rem; }
    .entry-right { grid-column: 2; flex-wrap: wrap; gap: .35rem .7rem; }
    .entry-dur { margin-left: auto; }
    .entry-actions { opacity: 1; width: 100%; justify-content: flex-end; margin-top: -.2rem; }
    .ib { width: 40px; height: 40px; }
    .period-total { justify-content: space-between; }

    /* tabele kot kartice */
    table.cards-on-mobile thead { display: none; }
    table.cards-on-mobile, table.cards-on-mobile tbody, table.cards-on-mobile tr, table.cards-on-mobile td { display: block; width: 100%; }
    table.cards-on-mobile tr { padding: .7rem .9rem; border-bottom: 1px solid var(--line); }
    table.cards-on-mobile td { border: 0; padding: .2rem 0; display: flex; justify-content: space-between; gap: 1rem; text-align: right; }
    table.cards-on-mobile td::before { content: attr(data-label); color: var(--muted); font-size: .8rem; text-align: left; flex-shrink: 0; }
    table.cards-on-mobile td:first-child { font-size: 1rem; text-align: left; justify-content: flex-start; padding-bottom: .4rem; }
    table.cards-on-mobile td:first-child::before { display: none; }
    table.cards-on-mobile td.actions { justify-content: flex-end; padding-top: .4rem; }
    table.cards-on-mobile td.actions::before { display: none; }
    table.grid .num { text-align: right; }

    .week-nav { width: 100%; justify-content: space-between; }
    .week-label { min-width: 0; flex: 1; font-size: .9rem; }
    .gantt-row { grid-template-columns: 140px 1fr; }
    .timer-pill { right: .75rem; bottom: .75rem; left: .75rem; justify-content: space-between; }
    .pill-name { max-width: none; flex: 1; }
}
@media (max-width: 380px) {
    .header-link { font-size: .76rem; }
    .stats-grid { grid-template-columns: 1fr; }
}

/* ================= v5.1: projekti, dobavitelji, obvestila ================= */
.neg { color: var(--red); }
.code { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: .82em; font-weight: 700; color: var(--ink-2); background: #eef0f2; padding: .05rem .35rem; border-radius: 3px; }
tr.clickable { cursor: pointer; }
tr.clickable:hover td { background: #fcf5f6; }
tr.attention td { background: #fff7f8; }
tr.attention td:first-child { box-shadow: inset 3px 0 0 var(--red); }
.back-link { display: inline-flex; align-items: center; gap: .35rem; color: var(--ink-2); text-decoration: none; font-size: .88rem; margin-bottom: .6rem; }
.back-link:hover { color: var(--red); }
.detail-head { align-items: flex-start; }
.detail-head h1 { margin: .2rem 0; }
.code-line { display: flex; align-items: center; gap: .5rem; flex-wrap: wrap; }
.head-actions { display: flex; gap: .5rem; flex-wrap: wrap; }
.notes { background: #fafafa; border-left: 3px solid var(--line); padding: .6rem .8rem; border-radius: 4px; font-size: .92rem; margin: .4rem 0 0; }
.panel-head { display: flex; align-items: center; justify-content: space-between; gap: .6rem; margin-bottom: .8rem; flex-wrap: wrap; }
.panel-head h2 { margin: 0; }
h3.sub { font-size: .85rem; color: var(--ink-2); margin: 1rem 0 .3rem; }
.stats-grid.fin .stat-card.accent { border-left-color: var(--red); background: linear-gradient(180deg, #fff, #fff7f8); }
.stat-sub { font-size: .78rem; color: var(--muted); margin-top: .15rem; }
.budget-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem 2rem; margin-top: 1rem; background: #fff; padding: .9rem 1.1rem; border-radius: var(--radius); box-shadow: var(--shadow); }
.pct-bar { height: 8px; background: var(--bg); border-radius: 4px; overflow: hidden; margin: .3rem 0 .15rem; min-width: 70px; }
.pct-bar span { display: block; height: 100%; background: #6b7079; border-radius: 4px; }
.pct-bar.warn span { background: #e0566e; }
.pct-bar.over span { background: var(--red); }
.pct-warn, .pct-over { color: var(--red); font-weight: 700; }
.hours-cell { font-variant-numeric: tabular-nums; }
table.grid.compact td, table.grid.compact th { padding: .55rem .7rem; }
.table-wrap.flat { box-shadow: none; }
.info-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: .9rem 1.2rem; }
.info-grid > div { display: flex; flex-direction: column; gap: .15rem; }
.info-grid span { font-size: .76rem; color: var(--muted); text-transform: uppercase; letter-spacing: .03em; }
.kv { display: flex; justify-content: space-between; gap: 1rem; padding: .45rem 0; border-bottom: 1px solid #f1f2f4; font-size: .9rem; }
.month-row { display: grid; grid-template-columns: 70px 1fr 110px; gap: .7rem; align-items: center; padding: .35rem 0; font-size: .85rem; }
.mbars { display: flex; flex-direction: column; gap: 3px; }
.mbar { display: block; height: 8px; border-radius: 4px; min-width: 2px; }
.mbar.rev, .lg-rev { background: #c9ccd1; }
.mbar.prof, .lg-prof { background: var(--red); }
.mbar.prof.neg { background: repeating-linear-gradient(45deg, #7a1124, #7a1124 4px, #c41e3a 4px, #c41e3a 8px); }
.mval { text-align: right; font-variant-numeric: tabular-nums; line-height: 1.25; }
.alert-action { display: flex; align-items: center; gap: .6rem; background: var(--red-soft); border: 1px solid #f3c3cc; color: #7a1124; font-weight: 600; flex-wrap: wrap; }
.alert-action .btn { margin-left: auto; }
.action-box { border-left: 4px solid var(--red); }
.action-box h2 { color: var(--red); }
.action-row { display: flex; gap: .6rem; flex-wrap: wrap; }
.rev-pill { font-size: .74rem; font-weight: 700; border: 1px solid var(--red); color: var(--red); padding: .1rem .5rem; border-radius: 99px; }
.rev-history { list-style: none; }
.rev-history li { padding: .55rem 0 .55rem .9rem; border-left: 2px solid var(--line); position: relative; }
.rev-history li::before { content: ''; position: absolute; left: -6px; top: .85rem; width: 10px; height: 10px; border-radius: 50%; background: #c9ccd1; }
.rev-history li.current::before { background: var(--red); }
.rev-group { margin-bottom: .8rem; opacity: .7; }
.rev-group.current { opacity: 1; }
.rev-label { font-size: .8rem; font-weight: 700; color: var(--ink-2); margin-bottom: .3rem; display: flex; gap: .4rem; align-items: center; }
.file-list { list-style: none; }
.file-row { display: flex; align-items: center; gap: .6rem; padding: .5rem 0; border-bottom: 1px solid #f1f2f4; }
.file-row .ic { color: var(--muted); }
.file-main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.file-name { font-weight: 600; overflow-wrap: anywhere; text-decoration: none; }
.file-name:hover { text-decoration: underline; }
.upload-btn { cursor: pointer; }
.check.small { font-size: .8rem; white-space: nowrap; }
.comments { display: flex; flex-direction: column; gap: .6rem; margin-bottom: .8rem; }
.comment { background: #f6f7f8; border-radius: 8px; padding: .6rem .8rem; max-width: 85%; }
.comment.mine { background: var(--red-soft); align-self: flex-end; }
.comment-body { margin-top: .2rem; font-size: .92rem; overflow-wrap: anywhere; }
.comment-form { display: flex; gap: .6rem; align-items: flex-end; }
.comment-form textarea { flex: 1; padding: .6rem .7rem; border: 1px solid #d5d8dc; border-radius: var(--radius); resize: vertical; min-height: 44px; }
.counts { display: inline-flex; gap: .5rem; color: var(--muted); font-size: .8rem; align-items: center; }
.counts .ic { width: 14px; height: 14px; }
.timeline { list-style: none; display: flex; margin: 1rem 0 0; background: #fff; border-radius: var(--radius); box-shadow: var(--shadow); padding: 1.1rem .5rem .8rem; overflow-x: auto; }
.timeline li { flex: 1; min-width: 88px; display: flex; flex-direction: column; align-items: center; gap: .4rem; position: relative; font-size: .78rem; color: var(--muted); text-align: center; }
.timeline li::before { content: ''; position: absolute; top: 11px; left: -50%; width: 100%; height: 2px; background: var(--line); z-index: 0; }
.timeline li:first-child::before { display: none; }
.timeline li.done::before, .timeline li.now::before { background: var(--red); }
.tl-dot { width: 24px; height: 24px; border-radius: 50%; border: 2px solid var(--line); background: #fff; z-index: 1; display: flex; align-items: center; justify-content: center; color: #fff; }
.tl-dot .ic { width: 14px; height: 14px; }
.timeline li.done .tl-dot { background: var(--red); border-color: var(--red); }
.timeline li.now .tl-dot { border-color: var(--red); box-shadow: 0 0 0 4px rgba(196,30,58,.15); }
.timeline li.now { color: var(--red); font-weight: 700; }
.timeline li.done { color: var(--ink-2); }
.badge-sent { background: #fff; color: var(--red); border: 1px solid var(--red); }
.badge-confirmed, .badge-shipped { background: var(--red-soft); color: var(--red); }
.badge-declined { background: #3c4148; color: #fff; }
.badge-inquiry { background: #fff; color: var(--ink-2); border: 1px dashed #b4b8be; }
.status-sent { background: #e0566e; }
.status-confirmed { background: #d13a54; }
.status-inquiry { background: repeating-linear-gradient(45deg, #d5d8dc, #d5d8dc 5px, #e9ebee 5px, #e9ebee 10px); }
.gantt-row.clickable { cursor: pointer; }
.gantt-row.clickable:hover .gantt-label b { color: var(--red); }

/* zvonec */
.bell-wrap { position: relative; }
.bell { position: relative; background: none; border: 0; color: var(--ink-2); width: 38px; height: 38px; border-radius: 50%; display: flex; align-items: center; justify-content: center; }
.bell:hover { background: rgba(0,0,0,.05); color: var(--red); }
.bell .ic { width: 22px; height: 22px; }
.bell-count { position: absolute; top: 2px; right: 1px; background: var(--red); color: #fff; font-size: .66rem; font-weight: 700; min-width: 17px; height: 17px; border-radius: 9px; display: flex; align-items: center; justify-content: center; padding: 0 4px; border: 2px solid var(--head-bg); }
.bell-panel { position: absolute; right: 0; top: 46px; width: 360px; max-height: 70vh; overflow-y: auto; background: #fff; border-radius: 8px; box-shadow: 0 12px 34px rgba(0,0,0,.2); border-top: 3px solid var(--red); z-index: 80; }
.bell-head { display: flex; justify-content: space-between; align-items: center; padding: .7rem .9rem; border-bottom: 1px solid var(--line); }
.bell-item { display: flex; flex-direction: column; gap: .15rem; padding: .65rem .9rem; border-bottom: 1px solid #f1f2f4; color: var(--ink); text-decoration: none; font-size: .88rem; }
.bell-item:hover { background: var(--bg); }
.bell-item.unread { background: #fff7f8; box-shadow: inset 3px 0 0 var(--red); }
.bell-item small { color: var(--muted); }
.bell-empty { padding: 1.2rem .9rem; }

/* časovnik: nedavno, pozabljen */
.recent { display: flex; flex-wrap: wrap; align-items: center; gap: .45rem; margin-top: .7rem; }
.recent-chip { display: inline-flex; align-items: center; gap: .4rem; background: #fff; border: 1px solid var(--line); border-radius: 99px; padding: .3rem .75rem .3rem .5rem; font-size: .82rem; max-width: 320px; overflow: hidden; white-space: nowrap; }
.recent-chip .ic { width: 14px; height: 14px; color: var(--red); }
.recent-chip span { overflow: hidden; text-overflow: ellipsis; }
.recent-chip:hover { border-color: var(--red); }
.forgot { margin-bottom: .7rem; }
.timer-pill.forgot { background: var(--red); }
.timer-pill.forgot b, .timer-pill.forgot .pill-name { color: #fff; }

@media (max-width: 768px) {
    .budget-row { grid-template-columns: 1fr; }
    .head-actions { width: 100%; }
    .head-actions .btn { flex: 1; }
    .info-grid { grid-template-columns: 1fr 1fr; }
    .bell-panel { position: fixed; left: .5rem; right: .5rem; top: 62px; width: auto; }
    .header-right { gap: .6rem; }
    .comment { max-width: 95%; }
    .comment-form { flex-direction: column; align-items: stretch; }
    .month-row { grid-template-columns: 58px 1fr 92px; }
    .recent-chip { max-width: 100%; }
    .file-row { flex-wrap: wrap; }
    .file-main { flex-basis: calc(100% - 80px); }
}

/* popravki v5.1 */
.stats-grid.fin { grid-template-columns: repeat(6, minmax(0, 1fr)); }
.stats-grid.fin .stat-value { font-size: 1.4rem; white-space: nowrap; }
@media (max-width: 1250px) { .stats-grid.fin { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 768px) { .stats-grid.fin { grid-template-columns: 1fr 1fr; } .stats-grid.fin .stat-value { font-size: 1.15rem; } }
.page-head + p.muted { margin: -.5rem 0 1rem; }

/* vabila, nastavitev gesla */
.login-title { font-size: 1.15rem; color: var(--red); margin: .2rem 0 .6rem; }
.login-text { color: var(--ink-2); font-size: .92rem; margin-bottom: 1.2rem; text-align: left; }
.login-back { margin-top: 1.1rem; font-size: .88rem; }
.login-back a { color: var(--ink-2); }
.login-box > .btn { margin-top: .4rem; }
.alert-ok { background: #edf7ef; border: 1px solid #c6e6cc; color: #1e5b2a; text-align: left; }
.badge-invited { background: #fff; color: var(--ink-2); border: 1px dashed #b4b8be; }
.invite-link { display: flex; gap: .5rem; margin: .8rem 0; }
.invite-link input { flex: 1; padding: .55rem .7rem; border: 1px solid #d5d8dc; border-radius: var(--radius); font-size: .85rem; background: #f7f8f9; }

/* ================= v5.3: faze projekta, potek za stranko, vrste projektov ================= */
.ok { color: #2e7d4f; }
.psum { margin: .2rem 0 1rem; }
.psum-bar { height: 10px; background: var(--bg); border-radius: 5px; overflow: hidden; }
.psum-bar span { display: block; height: 100%; background: var(--red); border-radius: 5px; transition: width .3s; }
.psum-text { font-size: .9rem; margin-top: .45rem; color: var(--ink-2); }
.event-box { display: inline-flex; align-items: center; gap: .45rem; background: #fff; border: 1px solid var(--line); border-left: 4px solid var(--red); padding: .55rem .9rem; border-radius: var(--radius); margin: .2rem 0 1rem; font-size: .92rem; }
.ptl { border-top: 1px solid var(--line); }
.ptl-row { display: grid; grid-template-columns: minmax(240px, 34%) 1fr auto; align-items: center; gap: .8rem; padding: .5rem 0; border-bottom: 1px solid #f1f2f4; }
.ptl-label { display: grid; grid-template-columns: 26px 1fr; column-gap: .55rem; align-items: center; }
.ptl-dot { grid-row: span 2; width: 24px; height: 24px; border-radius: 50%; border: 2px solid #c9ccd1; display: flex; align-items: center; justify-content: center; font-size: .72rem; font-weight: 700; color: var(--muted); background: #fff; }
.ptl-dot .ic { width: 14px; height: 14px; }
.ptl-name { font-weight: 600; font-size: .92rem; }
.ptl-meta { font-size: .78rem; color: var(--muted); }
.ptl-meta .ic { width: 13px; height: 13px; vertical-align: -2px; }
.ptl-track { position: relative; height: 22px; background: repeating-linear-gradient(90deg, transparent, transparent 59px, #f3f4f6 59px, #f3f4f6 60px); border-radius: 4px; }
.ptl-bar { position: absolute; top: 5px; height: 12px; border-radius: 6px; min-width: 6px; background: #d5d8dc; }
.ptl-today { position: absolute; top: -4px; bottom: -4px; width: 2px; background: var(--red); opacity: .5; z-index: 2; }
.ptl-actions { display: flex; gap: .1rem; }
.ptl-actions .ib { width: 28px; height: 28px; font-size: .9rem; }
.ptl-row.s-done .ptl-dot { background: var(--red); border-color: var(--red); color: #fff; }
.ptl-row.s-done .ptl-bar { background: #6b7079; }
.ptl-row.s-done .ptl-name { color: var(--ink-2); }
.ptl-row.s-in_progress .ptl-dot { border-color: var(--red); color: var(--red); box-shadow: 0 0 0 4px rgba(196,30,58,.13); }
.ptl-row.s-in_progress .ptl-bar { background: var(--red); }
.ptl-row.s-in_progress .ptl-state { color: var(--red); }
.ptl-row.s-late .ptl-dot { border-color: #7a1124; color: #7a1124; }
.ptl-row.s-late .ptl-bar { background: repeating-linear-gradient(45deg, #7a1124, #7a1124 5px, #c41e3a 5px, #c41e3a 10px); }
.ptl-row.s-late .ptl-state { color: #7a1124; }
.switch-line { padding: .3rem .6rem; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; }
.trackbar .tb-sub { grid-column: 1 / -1; display: flex; align-items: center; gap: .6rem; border-top: 1px dashed var(--line); padding-top: .5rem; }
.trackbar .tb-sub label { display: flex; align-items: center; gap: .5rem; }
.trackbar .tb-phase { width: auto; min-width: 220px; min-height: 34px; padding: .3rem .5rem; }
.type-card.inactive { opacity: .55; }
.type-card h2 { display: flex; align-items: center; gap: .5rem; }
.tpl { border: 1px solid var(--line); border-radius: var(--radius); padding: .7rem .9rem; margin-bottom: .7rem; }
.tpl-head { display: flex; align-items: center; gap: .5rem; margin-bottom: .4rem; }
.tpl-actions { margin-left: auto; display: flex; }
.tpl-steps { margin: 0 0 0 1.2rem; font-size: .88rem; columns: 2; column-gap: 2rem; }
.tpl-steps li { padding: .12rem 0; break-inside: avoid; }
.tpl-steps li span:first-child { margin-right: .4rem; }
.steps-table input[name=s_name] { width: 100%; min-width: 180px; padding: .4rem .5rem; border: 1px solid #d5d8dc; border-radius: 4px; }
.steps-table .num-in { width: 64px; padding: .4rem; border: 1px solid #d5d8dc; border-radius: 4px; }
.steps-table select { padding: .35rem; border: 1px solid #d5d8dc; border-radius: 4px; max-width: 150px; }
.steps-table td.c { text-align: center; }
.steps-table .nowrap { white-space: nowrap; }
.steps-table input[type=checkbox] { width: 17px; height: 17px; accent-color: var(--red); }
.modal:has(.steps-table) { max-width: 860px; }
@media (max-width: 768px) {
    .ptl-row { grid-template-columns: 1fr auto; }
    .ptl-track { display: none; }
    .tpl-steps { columns: 1; }
    .trackbar .tb-sub { flex-wrap: wrap; }
    .trackbar .tb-phase { min-width: 0; width: 100%; font-size: 16px; }
    .trackbar .tb-sub label { flex: 1; flex-wrap: wrap; }
    .event-box { display: flex; }
    .steps-table thead { display: none; }
    .steps-table tr { display: grid; grid-template-columns: 1fr 70px; gap: .3rem .5rem; padding: .5rem 0; border-bottom: 1px solid var(--line); }
    .steps-table td { padding: 0; border: 0; }
    .steps-table td:nth-child(1) { grid-column: 1 / -1; }
}

/* poročilo za stranko */
.modal:has(.rep-preview) { max-width: 760px; }
.rep-preview { background: #f7f8f9; border-radius: var(--radius); padding: .8rem 1rem; margin: .4rem 0 .6rem; }
.rep-totals { display: flex; gap: 1.2rem; flex-wrap: wrap; font-size: .9rem; margin-bottom: .5rem; }
.rep-phases { list-style: none; columns: 2; column-gap: 1.5rem; font-size: .84rem; }
.rep-phases li { display: flex; justify-content: space-between; gap: .5rem; padding: .15rem 0; break-inside: avoid; border-bottom: 1px dotted #dfe1e4; }
.rep-log { max-height: 260px; overflow-y: auto; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); }
.rep-entry { display: grid; grid-template-columns: 26px 78px 1fr 46px; gap: .4rem; align-items: center; padding: .3rem .5rem; border-bottom: 1px solid #f1f2f4; }
.rep-entry input[type=text] { width: 100%; padding: .3rem .45rem; border: 1px solid #e1e3e6; border-radius: 4px; font-size: .85rem; }
.rep-entry.off { opacity: .45; }
.rep-entry.off input[type=text] { text-decoration: line-through; }
@media (max-width: 768px) { .rep-phases { columns: 1; } .rep-entry { grid-template-columns: 26px 1fr 46px; } .rep-entry .muted { display: none; } }

/* v5.5 – režija in rezultat podjetja */
.stats-grid.fin.company { grid-template-columns: repeat(3, minmax(0, 1fr)); margin-top: 1rem; }
@media (max-width: 768px) { .stats-grid.fin.company { grid-template-columns: 1fr; } }
.overhead-panel h3 { font-size: .95rem; margin: .4rem 0 .6rem; }
.overhead-panel tfoot td { font-weight: 700; border-top: 2px solid var(--line, #dde1e6); }
.internal-hint { margin: -.3rem 0 .2rem; grid-column: 1 / -1; }

/* v5.5 – predogled (admin gleda kot druga vloga) */
.preview-bar { position: sticky; top: 0; z-index: 200; display: flex; align-items: center; justify-content: center; gap: 1rem; flex-wrap: wrap;
    padding: .55rem 1rem; background: #1f2328; color: #fff; font-size: .9rem; font-weight: 600; text-align: center; }
.preview-bar .btn { background: var(--red); color: #fff; border-color: var(--red); }
@media (max-width: 768px) { .preview-bar { font-size: .8rem; gap: .5rem; padding: .45rem .75rem; } }

/* v5.5 – stranke: potek projektov, dokumenti */
.grid tr.group-row td { background: #f6f7f9; font-weight: 700; font-size: .85rem; color: var(--ink-2); padding-top: .55rem; padding-bottom: .55rem; }
.cp-cust { display: none; }
.switch-sm { display: inline-flex; align-items: center; gap: .4rem; cursor: pointer; font-size: .85rem; }
.switch-sm input { width: 18px; height: 18px; accent-color: var(--red); }
.pv-search { max-width: 320px; width: 100%; }
@media (max-width: 768px) {
    .grid.cards-on-mobile tr.group-row { display: none; }
    .cp-cust { display: block; }
}

/* v5.6 – dopolnitev podatkov podjetja */
.login-box.wide { max-width: 640px; }
.login-box .cp-sub { font-size: 1rem; margin: 1.2rem 0 .6rem; color: var(--ink-2); }
.login-box .form-grid .full { grid-column: 1 / -1; }
.login-box .form-grid .full > .field { margin: 0; }
.field.has-error input { border-color: var(--red); box-shadow: 0 0 0 3px var(--red-soft); }
.company-block { font-size: .9rem; line-height: 1.5; }
.company-block .muted { font-size: .8rem; }
.badge-missing { background: #fff4e5; color: #8a5200; }
.panel .sub-h { font-size: 1rem; margin: 1.4rem 0 .7rem; padding-top: 1rem; border-top: 1px solid var(--line); }

/* v5.6 – uvoz iz MS Plannerja */
.import-intro p { margin-top: 0; }
.pl-steps, .pl-rules { margin: .4rem 0 1rem 1.2rem; padding: 0; line-height: 1.6; font-size: .92rem; }
.drop-zone { display: flex; flex-direction: column; align-items: center; gap: .35rem; padding: 2rem 1rem; border: 2px dashed var(--line); border-radius: 8px;
    cursor: pointer; text-align: center; color: var(--ink-2); transition: border-color .15s, background .15s; }
.drop-zone:hover, .drop-zone.over { border-color: var(--red); background: var(--red-soft); }
.drop-zone.busy { opacity: .6; pointer-events: none; }
.drop-zone .ic { width: 28px; height: 28px; color: var(--red); }
.pl-summary { display: flex; flex-wrap: wrap; gap: .6rem 1.4rem; margin: .4rem 0 .8rem; font-size: .92rem; }
.pl-summary b { font-size: 1.15rem; color: var(--red); margin-right: .2rem; }
.pl-phases { margin-bottom: .8rem; }
.pl-table input[type=text], .pl-table select { width: 100%; min-width: 0; padding: .3rem .45rem; font-size: .85rem; }
.pl-table .pl-code { width: 6.5rem; font-family: ui-monospace, monospace; }
.pl-table .pl-action { margin-top: .3rem; width: 6.5rem; }
.pl-table td { vertical-align: top; }
.pl-table .pl-orig { display: block; margin-top: .25rem; }
.pl-table tr.inactive td { opacity: .55; }
.pl-table tr.pl-err td { background: #fff6f7; }
.pl-msg { font-size: .78rem; color: #8a5200; line-height: 1.35; margin-bottom: .2rem; }
.pl-msg.err { color: var(--red); font-weight: 600; }
.pl-notes summary { font-size: .78rem; color: var(--muted); cursor: pointer; }
.pl-notes pre { white-space: pre-wrap; font-family: inherit; font-size: .78rem; margin: .3rem 0 0; color: var(--ink-2); max-width: 340px; }
.pl-done { columns: 2; margin: 1rem 0; padding-left: 1.1rem; font-size: .9rem; line-height: 1.7; }
@media (max-width: 768px) { .pl-done { columns: 1; } .pl-table .pl-code, .pl-table .pl-action { width: 100%; } .pl-notes pre { max-width: none; } }
@media (min-width: 769px) {
    .pl-table [data-f=name] { min-width: 260px; }
    .pl-table [data-f=customer] { min-width: 190px; }
}

/* v5.7 – brisanje računov */
.del-links { margin: .3rem 0 .8rem 1.2rem; padding: 0; line-height: 1.6; }
.del-name { user-select: all; background: #f6f7f9; padding: .1rem .35rem; border-radius: 4px; }

/* v5.8 – iskalni izbirnik (projekt s številko) */
.ss { position: relative; min-width: 0; }
.ss .ss-input { width: 100%; text-overflow: ellipsis; }
.bulkbar .ss .ss-input, .toolbar .ss .ss-input { padding: .45rem .6rem; border: 1px solid var(--line); border-radius: var(--radius); font: inherit; font-size: .9rem; background: #fff; min-width: 220px; }
.ss-list { position: absolute; z-index: 400; left: 0; right: 0; top: calc(100% + 2px); min-width: 260px; max-height: 300px; overflow-y: auto; margin: 0; padding: .25rem 0;
    list-style: none; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: 0 8px 24px rgba(0,0,0,.12); text-align: left; }
.ss-list li { padding: .45rem .7rem; font-size: .88rem; cursor: pointer; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ss-list li.hi, .ss-list li:hover { background: var(--red-soft); color: var(--red); }
.ss-list li.ss-empty { color: var(--muted); font-style: italic; }
.ss-list li.ss-none { color: var(--muted); cursor: default; }
.modal .ss-list { max-height: 240px; }

/* v5.8 – razvrščanje tabel */
.grid th.sortable { cursor: pointer; user-select: none; position: relative; white-space: nowrap; }
.grid th.sortable:hover { color: var(--red); }
.grid th.sort-asc::after, .grid th.sort-desc::after { content: '▲'; font-size: .6rem; margin-left: .3rem; color: var(--red); vertical-align: 1px; }
.grid th.sort-desc::after { content: '▼'; }
.grid th[data-sort-n]::before { content: attr(data-sort-n); display: inline-grid; place-items: center; width: 15px; height: 15px; margin-right: .25rem;
    border-radius: 50%; background: var(--red); color: #fff; font-size: .62rem; font-weight: 700; vertical-align: 1px; }
.grid tr.sort-hidden { display: none; }
.sort-btn { display: none; margin-bottom: .5rem; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
@media (max-width: 768px) { .sort-btn { display: inline-flex; } }

/* v5.8 – gantogram: povečava leto / mesec / teden */
.gantt.zoom-month, .gantt.zoom-week { min-width: 0; width: max-content; }
.gantt.zoom-month .gantt-row, .gantt.zoom-week .gantt-row { grid-template-columns: 220px auto; }
.gantt.zoom-month .gantt-label, .gantt.zoom-week .gantt-label { position: sticky; left: 0; z-index: 3; background: #fff; }
.gantt.zoom-month .gantt-head .gantt-label, .gantt.zoom-week .gantt-head .gantt-label { background: #f7f8f9; }
.gantt-month.major { color: var(--ink-2); font-weight: 700; }
.gantt.zoom-week .gantt-month { font-size: .7rem; padding: .5rem .3rem; }
.gantt-grid.major { border-left-color: #e3e5e8; }
.gantt-weekend { position: absolute; top: 0; bottom: 0; background: #f6f7f9; }
@media (max-width: 768px) { .gantt.zoom-month .gantt-row, .gantt.zoom-week .gantt-row { grid-template-columns: 140px auto; } }

/* v5.8 – prva stran: nadaljuj z delom, roki, finančni tok */
.resume-card { border-left: 4px solid var(--red); }
.resume-head { display: flex; align-items: center; gap: .6rem; flex-wrap: wrap; margin-bottom: .4rem; }
.resume-head b { font-size: 1.05rem; }
.resume-head .dot { width: 10px; height: 10px; border-radius: 50%; background: var(--red); animation: pulse 1.4s infinite; }
.resume-project { font-size: 1.25rem; font-weight: 700; color: var(--ink); margin: .2rem 0 .8rem; }
.resume-main { display: flex; justify-content: space-between; align-items: center; gap: 1rem; flex-wrap: wrap; }
.resume-clock { font-size: 2rem; font-weight: 700; color: var(--red); font-variant-numeric: tabular-nums; }
.resume-form { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .8rem; margin-bottom: .9rem; }
.resume-form .field { margin: 0; }
.resume-actions { display: flex; gap: .6rem; flex-wrap: wrap; }
.resume-recent { display: flex; align-items: center; gap: .5rem; flex-wrap: wrap; margin-top: .9rem; padding-top: .8rem; border-top: 1px solid var(--line); }
.chip-btn { border: 1px solid var(--line); background: #fff; border-radius: 999px; padding: .3rem .75rem; font-size: .82rem; cursor: pointer; color: var(--ink-2); }
.chip-btn:hover { border-color: var(--red); color: var(--red); }
.dl-table tr.dl-late td:first-child { box-shadow: inset 3px 0 0 var(--red); }
.cf-wrap { position: relative; }
.cf-chart { width: 100%; height: auto; display: block; }
.cf-grid { stroke: #eef0f2; stroke-width: 1; }
.cf-tick { font-size: 11px; fill: #8a8f98; }
.cf-tick.cf-cur { fill: var(--ink); font-weight: 700; }
.cf-split { stroke: #c9ccd1; stroke-width: 1; }
.cf-hit { fill: transparent; }
.cf-g.cf-fc path { opacity: .45; }
.cf-g.hover .cf-hit { fill: rgba(0,0,0,.035); }
.cf-tip { position: absolute; z-index: 5; min-width: 170px; background: #fff; border: 1px solid var(--line); border-radius: 6px; box-shadow: 0 6px 18px rgba(0,0,0,.12);
    padding: .5rem .65rem; font-size: .8rem; line-height: 1.55; pointer-events: none; }
.cf-tip .sw { display: inline-block; width: 9px; height: 9px; border-radius: 2px; margin-right: .35rem; }
.cf-tip .sw.in { background: #2f6f9f; } .cf-tip .sw.out { background: #c41e3a; }
.cf-legend { margin: 0 0 .4rem; }
.cf-legend .cf-fc-key i { background: repeating-linear-gradient(45deg, #c9ccd1 0 2px, #fff 2px 4px); }
.cf-table .cf-fc-row td { color: var(--muted); }
.cf-table .cf-cur-row td { background: #fafbfc; font-weight: 600; }
@media (max-width: 768px) { .resume-form { grid-template-columns: 1fr; } .resume-clock { font-size: 1.6rem; } .cf-table { font-size: .78rem; } }
.resume-card { margin-bottom: 1rem; }

/* v5.8 – preklic naročila dobavitelju */
.badge-cancelled { background: #eceef1; color: #8a8f98; text-decoration: line-through; }
.btn-danger-text { color: var(--red); }
.btn-danger-text:hover { background: var(--red-soft); }

/* v5.8 – prva stran: povzetek naročil */
.os-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1.6rem; }
.os-col h3 { font-size: .95rem; margin: 0 0 .5rem; }
.os-chips { display: flex; flex-wrap: wrap; gap: .4rem; margin-bottom: .6rem; }
.os-chip { font-size: .78rem; padding: .2rem .55rem; border-radius: 999px; background: #f1f2f4; color: var(--ink-2); }
.os-chip b { color: var(--ink); }
.os-chip.ok { background: #e9f4ee; } .os-chip.soon { background: #fff4e5; } .os-chip.late, .os-chip.warn { background: var(--red-soft); }
.os-chip.late b, .os-chip.warn b { color: var(--red); }
.os-list { list-style: none; margin: 0; padding: 0; }
.os-list li a { display: flex; justify-content: space-between; gap: .8rem; padding: .5rem 0; border-bottom: 1px solid var(--line); color: inherit; text-decoration: none; align-items: center; }
.os-list li a:hover .os-name { color: var(--red); }
.os-name { display: flex; flex-direction: column; min-width: 0; font-size: .88rem; font-weight: 600; }
.os-name small { font-weight: 400; }
.os-meta { display: flex; flex-direction: column; align-items: flex-end; gap: .15rem; flex-shrink: 0; font-size: .75rem; }
.tm { font-weight: 600; } .tm.late { color: var(--red); } .tm.soon { color: #a15c00; } .tm.ok { color: #2c7a4b; } .tm.none { color: var(--muted); }
.os-all { display: inline-block; margin-top: .6rem; font-size: .85rem; color: var(--red); font-weight: 600; text-decoration: none; }
@media (max-width: 900px) { .os-grid { grid-template-columns: 1fr; } }

/* v5.8.1 – finančni tok: kompaktno, brez raztezanja */
.cf-panel h2 { margin: 0; }
.cf-head { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; flex-wrap: wrap; margin-bottom: .4rem; }
.cf-kpis { display: flex; gap: 1.2rem; flex-wrap: wrap; font-size: .85rem; color: var(--ink-2); }
.cf-chart { width: auto; height: auto; max-width: 100%; }
.cf-svg { width: 100%; }
.cf-legend { font-size: .8rem; }
.cf-details { margin-top: .4rem; }
.cf-details summary { cursor: pointer; font-size: .85rem; color: var(--red); font-weight: 600; padding: .3rem 0; }
.cf-details .cf-table { font-size: .82rem; }

/* ---------- tehnična dokumentacija po kosih, naročilnice ---------- */
.parts-panel { position: relative; }
.parts-panel .head-actions { display: flex; gap: .5rem; align-items: center; flex-wrap: wrap; }
.parts-search { padding: .3rem .55rem; border: 1px solid var(--line); border-radius: var(--radius); width: 160px; font-size: .9rem; }
.parts-empty { border: 2px dashed var(--line); border-radius: 8px; padding: 2rem 1rem; text-align: center; color: var(--muted); margin: .4rem 0; }
.parts-hint { margin-top: .5rem; }
.parts-table td { vertical-align: top; }
.parts-table .actions { white-space: nowrap; text-align: right; }
.parts-table .group-actions { float: right; font-weight: 400; }
.fmt-chips { display: inline-flex; flex-wrap: wrap; gap: .25rem; }
.fmt-chip { display: inline-block; font-size: .7rem; font-weight: 700; letter-spacing: .03em; padding: .12rem .4rem; border-radius: 4px; background: #eef2f6; color: #2f4a63; border: 1px solid #d5dde6; text-decoration: none; line-height: 1.3; margin-right: .2rem; }
a.fmt-chip:hover { background: #2f6f9f; border-color: #2f6f9f; color: #fff; }
.part-archive { margin-top: .35rem; padding: .35rem .5rem; background: var(--bg); border-radius: var(--radius); display: grid; gap: .25rem; }
.part-archive .fmt-chip { opacity: .75; }
.rev-badge { background: var(--head-bg); color: var(--ink-2); font-size: .72rem; padding: .05rem .35rem; border-radius: 4px; margin-left: .25rem; font-weight: 600; }
.drop-overlay { display: none; position: absolute; inset: 0; border: 2px dashed var(--red); border-radius: 8px; background: rgba(251,234,237,.88); color: var(--red-dark); font-weight: 700; align-items: center; justify-content: center; z-index: 5; pointer-events: none; }
.parts-panel.dropping .drop-overlay { display: flex; }
.modal:has(.po-table) { max-width: 1000px; }
.po-table input[type=number] { width: 80px; }
.po-table input[type=text] { width: 100%; min-width: 120px; padding: .3rem .45rem; border: 1px solid var(--line); border-radius: var(--radius); }
.po-table input[readonly] { background: var(--bg); color: var(--ink-2); }
.po-table select { max-width: 190px; padding: .3rem .4rem; border: 1px solid var(--line); border-radius: var(--radius); }
.po-table input[type=number] { padding: .3rem .45rem; border: 1px solid var(--line); border-radius: var(--radius); }
.po-table tr.focus-row td { background: #fffaf0; }
.po-table tr.warn-row td { background: #fdf3f4; }
.po-summary { margin: .6rem 0 .2rem; font-size: .9rem; }
.po-created { margin: .4rem 0 .8rem 1.1rem; display: grid; gap: .35rem; }
.recv-table { margin-bottom: .6rem; width: 100%; }
.recv-table input { width: 90px; padding: .3rem .45rem; border: 1px solid var(--line); border-radius: var(--radius); }
.po-pill { background: var(--red-soft); color: var(--red-dark); }
.link-btn { background: none; border: 0; padding: 0; color: var(--red); cursor: pointer; text-decoration: underline; font: inherit; }
.link-btn.small { font-size: .8rem; }
.warn-text { color: #b4261a; }
.ok-text { color: #23774a; }
@media (max-width: 768px) {
    .parts-search { width: 100%; }
    .parts-panel .head-actions { width: 100%; }
    .po-table select, .po-table input[type=number] { max-width: none; width: 100%; }
    .parts-table .group-actions { float: none; display: block; }
}
.modal .table-wrap:has(.po-table) { margin-bottom: .9rem; }

/* ---------- serijska proizvodnja ---------- */
.badge-pass { background: #23774a; color: #fff; }
.badge-fail { background: #b4261a; color: #fff; }
.printer-chip { display: flex; align-items: center; gap: .5rem; flex-wrap: wrap; font-size: .88rem; }
.pchip { display: inline-flex; align-items: center; gap: .3rem; padding: .25rem .6rem; border-radius: 99px; border: 1px solid var(--line); background: #fff; }
.pchip.ok { border-color: #9fd1b4; background: #eef8f2; color: #1d6b40; }
.pchip.warn { border-color: #f0b8b0; background: #fdf1ef; color: #9a2a1d; }
.zb-select { padding: .25rem .4rem; border: 1px solid var(--line); border-radius: var(--radius); }
.zb-steps { margin: .4rem 0 .4rem 1.2rem; display: grid; gap: .4rem; }
.po-progress { display: flex; align-items: center; gap: .6rem; margin-top: .6rem; font-size: .9rem; }
.po-progress .bar { flex: 1; max-width: 320px; height: 8px; background: var(--head-bg); border-radius: 99px; overflow: hidden; }
.po-progress .bar i { display: block; height: 100%; background: #23774a; }
.po-progress.small { margin: 0; min-width: 140px; }
.station-grid { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 1rem; align-items: start; }
.station-form { display: grid; gap: .8rem; }
.st-meta { display: flex; justify-content: space-between; align-items: end; gap: 1rem; flex-wrap: wrap; }
.st-meta label, .st-row label, .st-note { display: grid; gap: .25rem; font-size: .85rem; color: var(--ink-2); }
.station-form input[type=text], .station-form input[type=date] { font-size: 1.15rem; padding: .55rem .7rem; border: 1px solid var(--line); border-radius: var(--radius); min-width: 0; }
.station-form input[inputmode=decimal] { width: 150px; font-variant-numeric: tabular-nums; }
.st-step { border: 1px solid var(--line); border-radius: 8px; padding: .7rem .85rem; display: grid; gap: .5rem; }
.st-head { display: flex; justify-content: space-between; gap: .6rem; flex-wrap: wrap; align-items: baseline; }
.st-row { display: flex; gap: .8rem; flex-wrap: wrap; align-items: end; }
.st-row .grow { flex: 1; min-width: 180px; }
.st-row .grow input { width: 100%; }
.st-live { font-weight: 700; font-size: 1.05rem; padding-bottom: .55rem; }
.okno { display: flex; gap: .5rem; }
.okno label { display: inline-flex !important; align-items: center; gap: .4rem; padding: .55rem 1.1rem; border: 2px solid var(--line); border-radius: 8px; font-weight: 700; font-size: 1.05rem; color: var(--ink); cursor: pointer; }
.okno input { width: 18px; height: 18px; }
.okno .ok:has(input:checked) { border-color: #23774a; background: #eef8f2; }
.okno .nok:has(input:checked) { border-color: #b4261a; background: #fdf1ef; }
.check.big { font-size: 1.05rem; }
.check.big input { width: 22px; height: 22px; }
.btn-big { font-size: 1.1rem; padding: .8rem 1.4rem; }
.st-actions { display: flex; justify-content: flex-end; }
.big-result { border-radius: 10px; padding: 1rem 1.2rem; display: grid; gap: .3rem; justify-items: start; }
.big-result .r { font-size: 2rem; font-weight: 800; letter-spacing: .04em; line-height: 1; }
.big-result.pass { background: #eef8f2; color: #1d6b40; border: 2px solid #23774a; }
.big-result.fail { background: #fdf1ef; color: #9a2a1d; border: 2px solid #b4261a; }
.label-canvas { max-width: 100%; height: auto; border: 1px solid var(--line); background: #fff; image-rendering: pixelated; margin-top: .4rem; }
.big-result .label-canvas { width: 260px; }
.label-preview { margin: .6rem 0; display: grid; gap: .3rem; justify-items: start; }
.label-preview img { max-width: 100%; border: 1px solid var(--line); }
.modal:has(.prod-editor) { max-width: 900px; }
.prod-editor h3.sub { margin: 1rem 0 .3rem; }
.steps-box { display: grid; gap: .45rem; margin: .4rem 0; }
.step-row { display: flex; gap: .4rem; align-items: center; flex-wrap: wrap; background: var(--bg); padding: .45rem; border-radius: var(--radius); }
.step-row input, .step-row select { padding: .35rem .45rem; border: 1px solid var(--line); border-radius: var(--radius); }
.step-row .s-label { flex: 1; min-width: 160px; }
.step-row .s-num { width: 105px; }
.step-row .s-short { width: 70px; }
.step-btns { display: inline-flex; gap: .15rem; margin-left: auto; }
.step-add { display: flex; gap: .4rem; flex-wrap: wrap; }
.zpl-adv { margin: .5rem 0; }
.zpl-adv textarea { width: 100%; font-family: ui-monospace, Menlo, Consolas, monospace; font-size: .8rem; }
.unit-head { margin-bottom: .6rem; font-size: 1.05rem; }
.unit-results { margin: .8rem 0; width: 100%; }
tr.inactive td { opacity: .55; }
.filters { grid-template-columns: repeat(5, minmax(0, 1fr)); }
@media (max-width: 900px) {
    .station-grid { grid-template-columns: 1fr; }
    .filters { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 768px) {
    .station-form input[inputmode=decimal] { width: 100%; }
    .st-row label { flex: 1; }
    .filters { grid-template-columns: 1fr; }
    .step-row .s-num, .step-row .s-short { width: calc(50% - .3rem); }
}

/* ---------- integracije: OneDrive, DHL ---------- */
.alert-ok { background: #eef8f2; color: #1d6b40; border: 1px solid #9fd1b4; }
.alert-warn { background: #fff7e6; color: #7a4b00; border: 1px solid #f1d29a; }
.integ-card .panel-head { align-items: center; }
.integ-card pre.cfg { background: var(--bg); padding: .7rem .9rem; border-radius: var(--radius); font-size: .82rem; overflow-x: auto; }
.integ-actions { display: flex; gap: .5rem; flex-wrap: wrap; margin: .8rem 0 1rem; }
.pk-rows { display: grid; gap: .4rem; margin: .3rem 0 .5rem; }
.pk-row { display: flex; gap: .35rem; align-items: center; flex-wrap: wrap; }
.pk-row input, .pk-row select { padding: .35rem .45rem; border: 1px solid var(--line); border-radius: var(--radius); }
.pk-row .pk-name { flex: 1; min-width: 160px; }
.pk-row .s-num { width: 80px; }
.od-trail { margin-bottom: .4rem; font-size: .9rem; }
.od-list { list-style: none; max-height: 340px; overflow-y: auto; border: 1px solid var(--line); border-radius: var(--radius); margin-bottom: .8rem; }
.od-list li { border-bottom: 1px solid var(--line); }
.od-list li:last-child { border-bottom: 0; }
.od-list li.muted, .od-list li.warn-text { padding: .6rem .8rem; }
.od-folder { display: flex; align-items: center; gap: .4rem; width: 100%; text-align: left; background: none; border: 0; padding: .55rem .8rem; }
.od-folder:hover { background: var(--bg); }
.od-strip { display: flex; align-items: center; gap: .5rem; flex-wrap: wrap; font-size: .88rem; margin: .5rem 0 0; padding: .45rem .7rem; background: #f3f7fb; border: 1px solid #d5dde6; border-radius: var(--radius); }
.od-strip:empty { display: none; }
.ship-printer { margin-bottom: .6rem; }
.customs-box { margin-top: .4rem; }
.rates-box { margin: .8rem 0; }
.rate-list { display: grid; gap: .4rem; margin-top: .5rem; }
.rate { display: flex; align-items: center; gap: .7rem; padding: .55rem .8rem; border: 2px solid var(--line); border-radius: 8px; cursor: pointer; }
.rate span { flex: 1; }
.rate-price { font-size: 1.05rem; }
.rate:has(input:checked) { border-color: var(--red); background: var(--red-soft); }
.modal:has(.rates-box) { max-width: 760px; }
@media (max-width: 768px) { .pk-row .s-num { width: calc(25% - .4rem); } }

/* ---------- e-računi ---------- */
.modal:has(.erac-lines) { max-width: 980px; }
.erac-lines input { width: 100%; padding: .3rem .45rem; border: 1px solid var(--line); border-radius: var(--radius); }
.erac-lines td:nth-child(1) { min-width: 260px; }
.erac-lines .l-qty, .erac-lines .l-vat { width: 70px; }
.erac-lines .l-unit { width: 60px; }
.erac-lines .l-price { width: 100px; }
.erac-lines tr.cost-row td { background: #fffaf0; }
.erac-suggest { display: flex; gap: .4rem; align-items: center; flex-wrap: wrap; margin-bottom: .6rem; }
.erac-totals { display: flex; gap: 1.4rem; justify-content: flex-end; margin: .6rem 0; flex-wrap: wrap; }
.erac-totals div { display: grid; text-align: right; }
.erac-totals span { font-size: .75rem; color: var(--muted); text-transform: uppercase; }
.erac-status { display: flex; gap: .6rem; align-items: center; flex-wrap: wrap; margin-top: .8rem; }
.erac-items tfoot td { border-top: 1px solid var(--line); }
.erac-q-lines { margin-top: .6rem; }
@media (max-width: 768px) {
    .erac-lines td:nth-child(1) { min-width: 180px; }
}

/* ---------- kakovost: neskladnosti, 8D, merila ---------- */
.badge-ncr-open { background: #fff; color: var(--red); border: 1px solid var(--red); }
.badge-ncr-analysis, .badge-ncr-actions { background: var(--red-soft); color: var(--red); }
.badge-ncr-verify { background: #f6e3e7; color: #7a1124; border: 1px dashed #c41e3a; }
.badge-ncr-closed { background: #e9ecef; color: #3c4148; }
.badge-q-valid { background: #23774a; color: #fff; }
.badge-q-due { background: #fff4e5; color: #8a5200; }
.badge-q-expired { background: #b4261a; color: #fff; }
.badge-q-none { background: #fff; color: var(--ink-2); border: 1px dashed #b4b8be; }
.page-head h1 .badge { font-size: .72rem; vertical-align: middle; margin-left: .4rem; }
.ncr-flow { display: flex; gap: 0; margin: 0 0 1rem; flex-wrap: wrap; }
.ncr-flow span { flex: 1; min-width: 90px; text-align: center; padding: .45rem .5rem; font-size: .8rem; background: #fff; color: var(--muted); border-bottom: 3px solid var(--line); }
.ncr-flow span.done { color: var(--ink-2); border-bottom-color: #e0566e; }
.ncr-flow span.cur { color: var(--red); font-weight: 700; border-bottom-color: var(--red); }
.ncr-desc { margin-top: 1rem; padding: .8rem 1rem; background: var(--bg); border-radius: var(--radius); line-height: 1.5; white-space: normal; }
.ncr-form textarea { width: 100%; }
.form-actions { display: flex; justify-content: flex-end; gap: .6rem; margin: .5rem 0 1.25rem; }
.d8-step { display: grid; grid-template-columns: 46px 1fr; gap: .8rem; padding: .8rem 0; border-top: 1px solid var(--line); }
.d8-step:first-child { border-top: 0; }
.d8-k { width: 40px; height: 40px; border-radius: 50%; background: var(--red); color: #fff; font-weight: 700; display: flex; align-items: center; justify-content: center; font-size: .85rem; }
.d8-main { display: flex; flex-direction: column; gap: .3rem; }
.d8-main textarea { width: 100%; }
.why-box, .ish-box { margin-top: .4rem; padding: .7rem .8rem; background: var(--bg); border-radius: var(--radius); display: flex; flex-direction: column; gap: .35rem; }
.why { display: grid; grid-template-columns: 70px 1fr; gap: .5rem; align-items: center; font-size: .85rem; }
.ish-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: .5rem .8rem; }
.ish-grid label { display: flex; flex-direction: column; gap: .2rem; font-size: .8rem; color: var(--ink-2); }
.info-grid.wide { grid-template-columns: 1fr; }
.info-grid.wide > div > div { line-height: 1.45; }
.plain-list { list-style: none; margin: 0; padding: 0; }
.plain-list li { padding: .4rem 0; border-bottom: 1px solid #f1f2f4; font-size: .9rem; }
.st-gauge { margin-top: .5rem; }
.gauge-pick { display: flex; flex-direction: column; gap: .2rem; font-size: .82rem; color: var(--ink-2); max-width: 420px; }
.bar-track.stack { display: flex; }
.bar-track.stack i { display: block; height: 100%; }
.seg-internal, .lg-internal { background: #7a1124; }
.seg-supplier, .lg-supplier { background: #c41e3a; }
.seg-customer, .lg-customer { background: #e0566e; }
i.lg { display: inline-block; width: 9px; height: 9px; border-radius: 2px; margin: 0 .25rem 0 .6rem; }
.q-stats { margin-bottom: 1rem; }
.recv-table .rej-input { width: 80px; }
.step-row .s-gauge_type { width: 150px; }
@media (max-width: 768px) {
    .d8-step { grid-template-columns: 1fr; }
    .why { grid-template-columns: 1fr; }
}
/* polja zunaj .field (8D, merila na postaji, iskanje) – enak videz kot obrazci */
.d8-main textarea, .why input, .ish-grid input, .gauge-pick select, .toolbar input[type=search] {
    width: 100%; padding: .55rem .7rem; border: 1px solid #d5d8dc; border-radius: var(--radius); background: #fff; min-height: 40px; font: inherit;
}
.d8-main textarea:focus, .why input:focus, .ish-grid input:focus, .gauge-pick select:focus, .toolbar input[type=search]:focus {
    outline: none; border-color: var(--red); box-shadow: 0 0 0 3px rgba(196,30,58,.12);
}
.d8-main textarea:disabled, .why input:disabled, .ish-grid input:disabled { background: #f6f7f8; color: var(--muted); }
.toolbar input[type=search] { width: auto; min-width: 240px; flex: 1; max-width: 360px; }
.gauge-pick select { margin-top: .25rem; }
/* dolg obrazec neskladnosti: shranjevanje vedno pri roki */
.ncr-form .form-actions { position: sticky; bottom: 0; z-index: 5; background: linear-gradient(180deg, rgba(240,242,245,0), var(--bg) 40%); padding: .9rem 0 .6rem; margin: 0; }
@media (max-width: 768px) { .toolbar input[type=search] { max-width: none; min-width: 0; width: 100%; } .why input, .ish-grid input, .gauge-pick select { font-size: 16px; min-height: 44px; } }
td.nowrap { white-space: nowrap; }
a.alert { text-decoration: none; }
/* mobilno: vsebina se ne sme odrezati na desni */
.station-grid > *, .two-col > *, .st-step, .st-step > * { min-width: 0; }
.panel-head { flex-wrap: wrap; }
@media (max-width: 768px) {
    .gauge-pick { max-width: none; }
    .st-head { flex-direction: column; gap: .15rem; }
    .bar-row { grid-template-columns: 44px minmax(0, 1fr) auto; }
}

/* ---------- izvozna dokumentacija ---------- */
.modal.modal-wide { max-width: 980px; width: calc(100% - 2rem); }
.xl-rows, .xb-rows, .duty-rows { display: grid; gap: .4rem; margin: .3rem 0 .5rem; }
.xl-row, .xb-row, .duty-row { display: flex; gap: .35rem; align-items: center; flex-wrap: wrap; }
.xl-row input, .xl-row select, .xb-row input, .xb-row select, .duty-row input { padding: .4rem .5rem; border: 1px solid #d5d8dc; border-radius: var(--radius); background: #fff; min-height: 36px; font: inherit; }
.xl-row .xl-product, .xb-row .xb-product { flex: 1; min-width: 200px; }
.xl-row .s-num, .xb-row .s-num { width: 100px; }
.xb-row .s-short { width: 62px; }
.xb-row .xb-type { width: 120px; }
.xb-no { width: 1.6rem; color: var(--muted); font-size: .85rem; }
.duty-row .d-type { flex: 2; min-width: 180px; } .duty-row .d-rate { width: 130px; } .duty-row .d-note { flex: 3; min-width: 180px; }
.xp-totals { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: .6rem; margin: 1rem 0 .6rem; padding: .7rem .9rem; background: var(--bg); border-radius: var(--radius); }
.xp-totals span { display: block; font-size: .74rem; color: var(--muted); text-transform: uppercase; letter-spacing: .03em; }
.alert ul { margin: .3rem 0 0 1.1rem; padding: 0; }
.xi-box { margin: .6rem 0; } .xi-box summary { cursor: pointer; font-size: .9rem; }
tr.row-muted td { color: var(--ink-2); background: #fafbfc; }
.ship-xdoc { margin: .4rem 0 .6rem; }
@media (max-width: 768px) {
    .xl-row .s-num, .xb-row .s-num { width: calc(50% - .3rem); }
    .xb-row .s-short { width: calc(33% - .3rem); }
    .xb-row .xb-type, .xl-row .xl-product, .xb-row .xb-product { width: 100%; min-width: 0; }
}

.xl-head, .xb-head { display: flex; gap: .35rem; font-size: .74rem; color: var(--muted); text-transform: uppercase; letter-spacing: .03em; margin-top: .3rem; }
.xl-head .xh-p, .xb-head .xh-p { flex: 1; min-width: 200px; } .xl-head .xh-n, .xb-head .xh-n { width: 100px; } .xb-head .xh-s { width: 62px; } .xb-head .xh-t { width: 120px; }
.xl-head::after { content: ''; width: 34px; } .xb-head::after { content: ''; width: 34px; }
@media (max-width: 768px) { .xl-head, .xb-head { display: none; } }

/* ---------- v5.16 varnost ---------- */
.sec-panel { margin-top: 1.25rem; }
.sec-row { display: flex; justify-content: space-between; align-items: center; gap: 1rem; padding: .9rem 0; border-top: 1px solid var(--line, #e6e8eb); }
.sec-row:first-of-type { border-top: 0; }
.sec-row h3 { font-size: .98rem; margin: 0 0 .2rem; }
.sec-row p { margin: .15rem 0; }
.sec-actions { display: flex; gap: .5rem; flex-wrap: wrap; align-items: center; justify-content: flex-end; flex-shrink: 0; }
.sec-checks { list-style: none; margin: 0; padding: 0; }
.sec-checks li { display: flex; gap: .6rem; align-items: flex-start; padding: .45rem 0; border-top: 1px solid var(--line, #e6e8eb); }
.sec-checks li:first-child { border-top: 0; }
.sec-checks li .ic { flex-shrink: 0; width: 18px; height: 18px; margin-top: 2px; }
.sec-checks li.ok .ic { color: #1f8a4c; }
.sec-checks li.bad .ic { color: var(--red); }
.sec-checks li span { display: flex; flex-direction: column; gap: .1rem; min-width: 0; }
.sec-checks li b { font-weight: 600; font-size: .92rem; }
.sec-checks li small { color: var(--ink-2); }
.sec-stats { margin-bottom: 1rem; }
.sec-audit td { vertical-align: top; }
.sec-audit tr.warn td:nth-child(3) { color: var(--red); font-weight: 600; }
.pager { display: flex; gap: .5rem; justify-content: space-between; margin-top: .75rem; }
.backup-codes { columns: 2; column-gap: 1.5rem; padding-left: 1.4rem; margin: .75rem 0 1rem; }
.backup-codes li { margin: .2rem 0; }
.backup-codes code { font-size: 1.02rem; letter-spacing: .04em; }
.twofa-box { max-width: 440px; }
.twofa-steps { padding-left: 1.2rem; margin: .5rem 0 1rem; text-align: left; }
.twofa-steps li { margin: .5rem 0; line-height: 1.45; }
.twofa-qr { margin: .6rem 0 .4rem; width: 190px; height: 190px; background: #fff; }
.twofa-qr svg { width: 100%; height: 100%; display: block; }
.twofa-secret { display: block; font-size: .95rem; letter-spacing: .06em; background: #f4f5f7; padding: .45rem .6rem; border-radius: 4px; margin-top: .3rem; word-break: break-all; user-select: all; }
.twofa-actions { display: flex; gap: .5rem; margin-bottom: 1rem; }
.code-input { font-size: 1.35rem !important; letter-spacing: .25em; text-align: center; font-variant-numeric: tabular-nums; }
.login-box .check { margin: .25rem 0 1rem; }
.login-text.small { font-size: .82rem; }
@media (max-width: 640px) {
    .sec-row { flex-direction: column; align-items: stretch; }
    .sec-actions { justify-content: flex-start; }
    .backup-codes { columns: 1; }
}
@media print {
    .login-page .twofa-actions, .login-page .btn, .login-page .login-logo { display: none !important; }
    .login-page { background: #fff !important; }
}

/* ---------- v5.18 naloge ---------- */
.tk-stats { margin-bottom: 1rem; }
.tk-group { padding-top: .9rem; }
.tk-h { font-size: .82rem; text-transform: uppercase; letter-spacing: .06em; margin: 0 0 .4rem; color: var(--ink-2); }
.tk-h.b-overdue { color: var(--red); }
.tk-h.b-today { color: #b26a00; }
.tk-list { list-style: none; margin: 0; padding: 0; }
.tk-item { display: grid; grid-template-columns: 28px minmax(0, 1fr) auto auto; gap: .75rem; align-items: center; padding: .6rem 0; border-top: 1px solid var(--line, #e6e8eb); }
.tk-list .tk-item:first-child { border-top: 0; }
.tk-check { width: 22px; height: 22px; border-radius: 50%; border: 2px solid #b9bdc4; background: #fff; display: inline-flex; align-items: center; justify-content: center; cursor: pointer; padding: 0; color: #fff; }
.tk-check:hover { border-color: #1f8a4c; }
.tk-check .ic { width: 14px; height: 14px; }
.tk-check.static { border-style: dashed; cursor: default; }
.tk-item.done .tk-check { background: #1f8a4c; border-color: #1f8a4c; }
.tk-item.done .tk-title { text-decoration: line-through; color: var(--ink-2); }
.tk-title { font-weight: 600; line-height: 1.35; overflow-wrap: anywhere; }
.tk-meta { font-size: .82rem; color: var(--ink-2); margin-top: .1rem; overflow-wrap: anywhere; }
.tk-meta a { color: inherit; }
.tk-kind { display: inline-block; font-size: .7rem; font-weight: 600; text-transform: uppercase; letter-spacing: .04em; color: var(--ink-2); background: #f1f2f4; border-radius: 3px; padding: 1px 5px; vertical-align: 1px; }
.tk-kind.ncr { background: #fff1e0; color: #8a5200; }
.tk-due { text-align: right; white-space: nowrap; font-size: .85rem; }
.tk-date { font-weight: 600; font-variant-numeric: tabular-nums; }
.tk-item.b-overdue .tk-date { color: var(--red); }
.tk-item.b-today .tk-date { color: #b26a00; }
.tk-late { display: block; font-size: .75rem; color: var(--red); font-weight: 600; }
.tk-actions { display: flex; gap: .25rem; }
.tk-num { font-weight: 700; }
.tk-num.b-overdue { color: var(--red); }
.tk-num.b-today { color: #b26a00; }
.tk-team .tk-expand td { background: #fafbfc; padding: .4rem 1rem; }
.tk-alert { color: var(--red); font-weight: 600; margin: 0 0 .4rem; }
.home-tasks .tk-list.compact .tk-item { padding: .45rem 0; }
.ph-assignee { color: var(--ink-2); }
.ics-box { margin-top: .5rem; }
.ics-url { display: flex; gap: .4rem; margin-bottom: .3rem; }
.ics-url input { flex: 1; min-width: 0; font-size: .82rem; padding: .35rem .5rem; border: 1px solid var(--line, #d7dbe0); border-radius: 4px; background: #f7f8fa; }
@media (max-width: 640px) {
    .tk-item { grid-template-columns: 26px minmax(0, 1fr) auto; }
    .tk-actions { grid-column: 2 / -1; justify-content: flex-start; }
}

/* ---------- v5.18 zdravje projekta ---------- */
.hdot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; margin-right: .4rem; vertical-align: 1px; flex-shrink: 0; }
.hdot.h-green { background: #2f8f5b; }
.hdot.h-amber { background: #d08a00; }
.hdot.h-red { background: var(--red); box-shadow: 0 0 0 3px rgba(196, 30, 58, .15); }
.h-text-red { color: var(--red); }
.h-text-amber { color: #8a5a00; }
.health-panel.h-red { border-left: 4px solid var(--red); }
.health-panel.h-amber { border-left: 4px solid #d08a00; }
.health-panel h2 { display: flex; align-items: center; gap: .2rem; }
.h-reasons { margin: .3rem 0 .6rem; padding-left: 1.2rem; }
.h-reasons li { margin: .2rem 0; }
.h-reasons li.h-red { color: var(--red); font-weight: 600; }
.h-reasons li.h-amber { color: #8a5a00; }
.impact-box { border: 1px solid var(--line, #e6e8eb); border-radius: 6px; padding: .6rem .8rem; margin: .6rem 0; background: #fffafa; }
.impact-box.h-amber { background: #fffbf2; }
.impact-head { font-size: .92rem; }
.impact-head .ic { width: 16px; height: 16px; vertical-align: -3px; }
.impact-chain { margin: .4rem 0 0; padding-left: 1.3rem; font-size: .88rem; }
.impact-chain li { margin: .15rem 0; }
.impact-chain li::marker { content: '→ '; color: var(--ink-2); }
.attention-panel { border-left: 4px solid var(--red); }
.att-list { list-style: none; margin: 0; padding: 0; }
.att-list li { padding: .5rem 0; border-top: 1px solid var(--line, #e6e8eb); }
.att-list li:first-child { border-top: 0; }
.att-list a { color: inherit; text-decoration: none; }
.att-list a:hover b { text-decoration: underline; }
.att-ms a { color: inherit; }
.att-ok { display: flex; align-items: center; gap: .5rem; }
.ptl-dot.ms { background: #6a3fb5; color: #fff; }

/* ---------- v5.19 telefon: pogled »Danes« ---------- */
.mb { max-width: 560px; margin: 0 auto; }
.mb-date { font-size: .9rem; color: var(--ink-2); margin: .2rem 0 .6rem; text-transform: capitalize; }
.mb-offline { background: #fff4e0; color: #7a4b00; border-radius: 8px; padding: .5rem .8rem; font-size: .88rem; margin-bottom: .6rem; display: flex; gap: .4rem; align-items: center; }
.mb-timer { background: #fff; border-radius: 14px; box-shadow: var(--shadow); padding: 1.1rem; text-align: center; margin-bottom: 1rem; }
.mb-timer.running { border: 2px solid var(--red); }
.mb-proj { font-weight: 600; margin-bottom: .2rem; overflow-wrap: anywhere; }
.mb-clock { font-size: 2.8rem; font-weight: 800; font-variant-numeric: tabular-nums; color: var(--red); margin: .2rem 0 .8rem; letter-spacing: .02em; }
.mb-big { width: 100%; min-height: 64px; border: 0; border-radius: 12px; font-size: 1.25rem; font-weight: 800; color: #fff; display: flex; align-items: center; justify-content: center; gap: .5rem; cursor: pointer; }
.mb-big .ic { width: 24px; height: 24px; }
.mb-big.start { background: #1f8a4c; }
.mb-big.start:disabled { background: #b9bdc4; }
.mb-big.stop { background: var(--red); }
.mb-pick { display: flex; flex-wrap: wrap; gap: .4rem; margin-bottom: .8rem; justify-content: center; }
.mb-chip { border: 1px solid var(--line, #d7dbe0); background: #f7f8fa; border-radius: 999px; padding: .5rem .8rem; font-size: .9rem; cursor: pointer; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mb-chip.on { background: var(--red); color: #fff; border-color: var(--red); }
.mb-chip.late:not(.on) { border-color: var(--red); color: var(--red); }
.mb-other { width: 100%; padding: .55rem; border-radius: 8px; border: 1px solid var(--line, #d7dbe0); font-size: 16px; background: #fff; }
.mb-sel { margin-top: .5rem; }
.mb-list { background: #fff; border-radius: 14px; box-shadow: var(--shadow); padding: .9rem 1rem; margin-bottom: 1rem; }
.mb-list h2 { font-size: 1rem; margin: 0 0 .4rem; }
.mb-task { display: flex; align-items: center; gap: .7rem; padding: .65rem 0; border-top: 1px solid var(--line, #e6e8eb); }
.mb-task:first-of-type { border-top: 0; }
.mb-task .tk-check { width: 28px; height: 28px; flex-shrink: 0; }
.mb-tmain { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.mb-task.b-overdue .small { color: var(--red); }
.mb-task .ib { width: 44px; height: 44px; }
.mb-actions { display: grid; gap: .5rem; margin-bottom: 1.5rem; }
.mb-actions .btn { min-height: 48px; }

/* ---------- v5.20 oprema, inventura, identi, olajšave ---------- */
.mono { font-family: ui-monospace, SFMono-Regular, Consolas, monospace; letter-spacing: .02em; }
.qr-code-big { font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-size: 1.5rem; font-weight: 800; letter-spacing: .04em; margin: .4rem 0; overflow-wrap: anywhere; }
.input-btn { display: flex; gap: .4rem; }
.input-btn input { flex: 1; min-width: 0; }
.id-badge { background: #eef2ff; color: #2b3a8c; font-family: ui-monospace, SFMono-Regular, Consolas, monospace; }
.id-preview { background: var(--bg, #f4f5f7); border-radius: 8px; padding: .6rem .8rem; margin-bottom: .8rem; }
.id-preview .qr-code-big { display: block; margin: .1rem 0 0; font-size: 1.3rem; }
.as-st-active { background: #e7f4ec; color: #1f6b3f; }
.as-st-service { background: #fdecea; color: #b4261a; }
.as-st-lent { background: #eef2ff; color: #2b3a8c; }
.as-st-missing { background: #fff4e5; color: #8a5200; }
.as-st-retired { background: #eceef1; color: #8a8f98; }
.as-due-soon { color: #8a5200; font-weight: 600; }
.as-due-overdue { color: var(--red); font-weight: 700; }
.as-filters { flex-wrap: wrap; gap: .5rem; }
.as-filters input[type=search] { min-width: 180px; flex: 1; }
.as-table td.chk, .as-table th.chk { width: 32px; text-align: center; }
.as-quick { display: flex; flex-wrap: wrap; gap: .5rem; margin: .6rem 0 1rem; }
.as-quick .btn-big { min-height: 52px; font-size: 1rem; }
.as-card-grid { display: grid; grid-template-columns: 1fr 220px; gap: 1rem; align-items: start; }
.as-side { text-align: center; }
.as-photo { width: 100%; max-height: 240px; object-fit: contain; border-radius: 8px; margin-bottom: .5rem; background: #f4f5f7; }
.as-qr { display: block; margin: .6rem auto .2rem; image-rendering: pixelated; }
.as-qr-url { overflow-wrap: anywhere; }
.as-history { list-style: none; margin: 0; padding: 0; }
.as-history li { padding: .4rem 0; border-top: 1px solid var(--line, #e6e8eb); }
.as-history li:first-child { border-top: 0; }
.as-mine { display: grid; gap: .5rem; }
.as-mine-row { display: flex; align-items: center; gap: .8rem; padding: .8rem 1rem; margin: 0; }
.as-mine-main { flex: 1; min-width: 0; color: inherit; text-decoration: none; overflow-wrap: anywhere; }
.stat-card.on { outline: 2px solid var(--red); }
.inv-scan { transition: background .25s; }
.inv-scan-row { display: flex; flex-wrap: wrap; gap: .8rem; align-items: flex-end; }
.inv-scan-row .field { margin: 0; }
.inv-input { display: flex; gap: .4rem; align-items: flex-end; flex: 1; min-width: 240px; }
.inv-input .field { flex: 1; }
.inv-input input { font-size: 1.1rem; font-family: ui-monospace, SFMono-Regular, Consolas, monospace; }
.inv-flash { margin-top: .7rem; padding: .6rem .8rem; border-radius: 8px; font-size: 1.05rem; }
.flash-ok .inv-flash { background: #e7f4ec; color: #1f6b3f; }
.flash-dup .inv-flash { background: #eef2ff; color: #2b3a8c; }
.flash-warn .inv-flash { background: #fff4e5; color: #8a5200; }
.flash-bad .inv-flash { background: #fdecea; color: #b4261a; }
.inv-r-ok { color: #1f6b3f; } .inv-r-warn { color: #8a5200; } .inv-r-bad { color: #b4261a; } .inv-r-dup { color: #2b3a8c; }
.pct-line { display: flex; align-items: center; gap: .6rem; margin: .4rem 0 .8rem; }
.pct-line .pct-bar { flex: 1; height: 10px; background: #e6e8eb; border-radius: 5px; overflow: hidden; }
.pct-line .pct-bar span { display: block; height: 100%; background: #23774a; }
.inv-last li { padding: .3rem 0; }
.scan-cam { position: relative; background: #000; border-radius: 10px; overflow: hidden; aspect-ratio: 4 / 3; max-height: 60vh; }
.scan-video video { width: 100%; height: 100%; object-fit: cover; display: block; }
.scan-frame { position: absolute; inset: 18% 22%; border: 3px solid rgba(255, 255, 255, .85); border-radius: 12px; box-shadow: 0 0 0 9999px rgba(0, 0, 0, .25); pointer-events: none; }
.scan-last { margin-top: .5rem; min-height: 1.3em; }
.qr-owner { text-align: center; }
.rr-strip { margin: -.4rem 0 1rem; }
.rr-panel { border-left: 4px solid var(--red); }
.tax-warnings .tax-warn { padding: .3rem 0; }
.tax-warnings .ic { color: var(--red); width: 16px; height: 16px; vertical-align: -3px; }
.tax-lines td { padding: .45rem .6rem; }
.tax-lines tr.total td { border-top: 2px solid var(--ink, #222); }
.tax-months { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: .5rem; }
.tax-month { border: 1px solid var(--line, #e6e8eb); border-radius: 8px; padding: .5rem .6rem; display: flex; flex-direction: column; gap: .15rem; font-size: .9rem; }
.tax-month.done { background: #f3faf6; border-color: #cfe8d9; }
.tax-month.future { opacity: .55; }
.tax-labor input { width: 90px; text-align: right; }
.tax-labor td.need input { border-color: var(--red); background: #fff5f6; }
.tax-labor td { vertical-align: top; }
@media (max-width: 768px) {
    .as-card-grid { grid-template-columns: 1fr; }
    .as-quick .btn-big { flex: 1 1 45%; }
    .inv-scan-row { flex-direction: column; align-items: stretch; }
    .inv-input { min-width: 0; }
}

/* ---- v5.21/5.22: prejeti računi, predlogi agentov, ključi ---- */
.rcv-sugg li { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 6px 0; }
.rcv-other { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--line); }
.ap-list { display: grid; gap: 12px; }
.ap-card .ap-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 8px; margin-bottom: 6px; }
.ap-summary { white-space: normal; background: var(--bg); border-left: 3px solid var(--line); padding: 8px 12px; margin: 8px 0; }
.ap-payload { margin: 6px 0 10px; }
.ap-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.ag-switch.off { border-left: 4px solid var(--red); }
code.key-once { display: block; word-break: break-all; padding: 10px; background: var(--bg); border: 1px dashed var(--line); font-size: 13px; }
.seg .count { display: inline-block; min-width: 18px; padding: 0 5px; margin-left: 4px; border-radius: 9px; background: var(--red); color: #fff; font-size: 11px; line-height: 18px; }

/* =====================================================================
   v5.22 – PRENOVLJEN VIDEZ (body.v2). Klasičen videz: Moj profil → Videz.
   Rdeča = znamka (logotip, črta, aktivni zavihek, glavni gumb) in »ukrepaj zdaj« (zamuda, napaka).
   Statusi imajo pomensko barvo IN obliko (berljivo tudi pri barvni slepoti). Kontrast WCAG AA.
   ===================================================================== */
@font-face { font-family: 'IBM Plex Sans'; font-style: normal; font-weight: 400; font-display: swap; src: url(fonts/ibm-plex-sans-latin-400-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; }
@font-face { font-family: 'IBM Plex Sans'; font-style: normal; font-weight: 400; font-display: swap; src: url(fonts/ibm-plex-sans-latin-ext-400-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: 'IBM Plex Sans'; font-style: normal; font-weight: 500; font-display: swap; src: url(fonts/ibm-plex-sans-latin-500-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; }
@font-face { font-family: 'IBM Plex Sans'; font-style: normal; font-weight: 500; font-display: swap; src: url(fonts/ibm-plex-sans-latin-ext-500-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: 'IBM Plex Sans'; font-style: normal; font-weight: 600; font-display: swap; src: url(fonts/ibm-plex-sans-latin-600-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; }
@font-face { font-family: 'IBM Plex Sans'; font-style: normal; font-weight: 600; font-display: swap; src: url(fonts/ibm-plex-sans-latin-ext-600-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: 'IBM Plex Sans'; font-style: normal; font-weight: 700; font-display: swap; src: url(fonts/ibm-plex-sans-latin-700-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; }
@font-face { font-family: 'IBM Plex Sans'; font-style: normal; font-weight: 700; font-display: swap; src: url(fonts/ibm-plex-sans-latin-ext-700-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: 'IBM Plex Mono'; font-style: normal; font-weight: 500; font-display: swap; src: url(fonts/ibm-plex-mono-latin-500-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; }
@font-face { font-family: 'IBM Plex Mono'; font-style: normal; font-weight: 500; font-display: swap; src: url(fonts/ibm-plex-mono-latin-ext-500-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: 'IBM Plex Mono'; font-style: normal; font-weight: 600; font-display: swap; src: url(fonts/ibm-plex-mono-latin-600-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; }
@font-face { font-family: 'IBM Plex Mono'; font-style: normal; font-weight: 600; font-display: swap; src: url(fonts/ibm-plex-mono-latin-ext-600-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; }

body.v2 {
    --ink: #1c1e21; --ink-2: #4a4f57; --muted: #646a73; --line: #e2e5e9; --bg: #f4f5f7; --head-bg: #ffffff; --radius: 8px;
    --shadow: 0 1px 2px rgba(16,18,22,.05);
    /* pomenske barve: ozadje / besedilo */
    --s-neutral-bg: #eef0f2; --s-neutral: #3c4148;
    --s-info-bg: #e8f0fe;    --s-info: #1f4e9c;
    --s-wait-bg: #fff1d6;    --s-wait: #7a4b00;
    --s-ok-bg: #e6f4ec;      --s-ok: #1d6b40;
    --s-bad-bg: #b42318;     --s-bad: #ffffff; --bad: #b42318; --bad-soft: #fdf0f0;
    font-family: 'IBM Plex Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-feature-settings: 'tnum' 0;
}
body.v2 .code, body.v2 .mono, body.v2 .id-badge, body.v2 .qr-code-big, body.v2 .pl-code { font-family: 'IBM Plex Mono', ui-monospace, Consolas, monospace; }
body.v2 .num, body.v2 .stat-value, body.v2 td, body.v2 .money { font-variant-numeric: tabular-nums; }
body.v2 a { color: var(--ink); text-underline-offset: 2px; }
body.v2 a:hover { color: var(--red); }

/* glava in zavihki */
body.v2 .header { background: #fff; border-bottom: 3px solid var(--red); }
body.v2 .header-link { color: var(--ink-2); }
body.v2 .header-link:hover { color: var(--red); }
body.v2 .tab-link { color: var(--ink-2); font-weight: 500; }
body.v2 .tab-link:hover { color: var(--ink); }
body.v2 .tab-link.active { color: var(--ink); font-weight: 600; border-bottom-color: var(--red); }

/* stranski meni: brez rdeče stene, aktivno = bela ploščica z rdečo oznako */
body.v2 .sidebar { border-right: 1px solid var(--line); background: var(--bg); }
body.v2 .sidebar-section { border-bottom-color: var(--line); }
body.v2 .sidebar-title { color: var(--muted); font-size: .7rem; }
body.v2 .sidebar-menu a { color: var(--ink-2); border-left: 0; margin: 1px .5rem; border-radius: 6px; padding: .55rem .75rem; }
body.v2 .sidebar-menu a:hover { background: #fff; color: var(--ink); }
body.v2 .sidebar-menu a.active { background: #fff; color: var(--ink); font-weight: 600; box-shadow: inset 3px 0 0 var(--red), var(--shadow); }
body.v2 .lang-link { color: var(--ink-2); }
body.v2 .lang-link.active { background: var(--ink); color: #fff; }

/* naslovi in številke: grafitno */
body.v2 .page-head h1 { color: var(--ink); font-size: 1.5rem; font-weight: 700; letter-spacing: -.01em; }
body.v2 .panel { border: 1px solid var(--line); box-shadow: none; border-radius: 10px; }
body.v2 .panel h2 { font-size: 1.02rem; font-weight: 600; }
body.v2 .modal { border-top: 0; border-radius: 12px; }
body.v2 .modal-head h2 { color: var(--ink); }
body.v2 .stat-card { border: 1px solid var(--line); box-shadow: none; border-radius: 10px; border-left-width: 1px; }
body.v2 a.stat-card[href]:hover { border-color: #c9ccd1; border-left-color: #c9ccd1; }
body.v2 .stat-value { color: var(--ink); }
body.v2 .stat-card.warn { background: var(--bad-soft); border-color: #f3c4c0; }
body.v2 .stat-card.warn .stat-value { color: var(--bad); }
body.v2 .stat-card.warn .stat-label { color: #8a1c12; }
body.v2 .neg, body.v2 .warn-text { color: var(--bad); }
body.v2 .ok-text { color: var(--s-ok); }
body.v2 .attention-panel { border-left: 1px solid #f3c4c0; background: linear-gradient(var(--bad-soft), var(--bad-soft)) left / 4px 100% no-repeat, #fff; }
body.v2 .alert-action { background: var(--s-wait-bg); border-color: #f1d9a6; color: var(--s-wait); }
body.v2 .alert-error { background: var(--bad-soft); border-color: #f3c4c0; color: #8a1c12; }
body.v2 .alert-info { border: 1px solid var(--line); background: #fff; }

/* gumbi: rdeč samo glavni ukrep v glavi strani in v oknih; v razdelkih nevtralni */
body.v2 .btn { border-radius: 8px; background: #fff; border-color: #d5d8dd; color: var(--ink); }
body.v2 .btn:hover { border-color: #b9bdc4; }
body.v2 .btn-primary { background: var(--red); border-color: var(--red); color: #fff; }
body.v2 .btn-primary:hover { background: var(--red-dark); border-color: var(--red-dark); }
body.v2 .panel .btn-primary, body.v2 .panel-head .btn-primary { background: #fff; border-color: var(--ink); color: var(--ink); }
body.v2 .panel .btn-primary:hover, body.v2 .panel-head .btn-primary:hover { background: var(--ink); color: #fff; }
body.v2 .resume-card .btn-primary, body.v2 .action-box .btn-primary, body.v2 .ap-actions .btn-primary, body.v2 .panel button[type=submit].btn-primary { background: var(--ink); border-color: var(--ink); color: #fff; }
body.v2 .modal .btn-primary, body.v2 .station-form .btn-primary { background: var(--red); border-color: var(--red); }
body.v2 .btn-ghost { background: #fff; border-color: #d5d8dd; color: var(--ink); }
body.v2 .btn-ghost:hover { border-color: #b9bdc4; color: var(--ink); }
body.v2 .btn-danger { background: #fff; color: var(--bad); border-color: #f3c4c0; }
body.v2 .btn-danger:hover { background: var(--bad); color: #fff; border-color: var(--bad); }
body.v2 .ib { color: var(--ink-2); }
body.v2 .ib.danger:hover { color: var(--bad); background: var(--bad-soft); }
body.v2 .field input:focus, body.v2 .field select:focus, body.v2 .field textarea:focus { border-color: #1f4e9c; box-shadow: 0 0 0 3px rgba(31,78,156,.15); }
body.v2 .check input { accent-color: var(--ink); }
body.v2 .toast-error { background: var(--bad); }
body.v2 .seg button.active, body.v2 .seg .active { background: var(--ink); color: #fff; border-color: var(--ink); }

/* statusi: oblika + barva (○ novo · ● v delu · ◷ čaka · ✓ v redu · ▲ ukrep) */
body.v2 .badge { display: inline-flex; align-items: center; gap: .35rem; border-radius: 999px; padding: .2rem .6rem; font-weight: 600; font-size: .75rem; border: 0;
    background: var(--s-neutral-bg); color: var(--s-neutral); text-decoration: none; }
body.v2 .badge::before { content: ''; width: 7px; height: 7px; border-radius: 50%; box-sizing: border-box; border: 1.6px solid currentColor; flex-shrink: 0; }
body.v2 .badge.rev-badge::before, body.v2 .badge.id-badge::before, body.v2 .badge.badge-plain::before { display: none; }
/* v delu – modra, polna pika */
body.v2 .badge-in_progress, body.v2 .badge-in_production, body.v2 .badge-shipped, body.v2 .badge-ncr-analysis, body.v2 .badge-ncr-actions { background: var(--s-info-bg); color: var(--s-info); }
body.v2 .badge-in_progress::before, body.v2 .badge-in_production::before, body.v2 .badge-shipped::before, body.v2 .badge-ncr-analysis::before, body.v2 .badge-ncr-actions::before { background: currentColor; }
/* čaka – jantarna, romb */
body.v2 .badge-sent, body.v2 .badge-missing, body.v2 .badge-q-due, body.v2 .badge-ncr-verify, body.v2 .badge-invited { background: var(--s-wait-bg); color: var(--s-wait); }
body.v2 .badge-sent::before, body.v2 .badge-missing::before, body.v2 .badge-q-due::before, body.v2 .badge-ncr-verify::before, body.v2 .badge-invited::before { border-radius: 1px; transform: rotate(45deg); width: 6px; height: 6px; }
/* v redu – zelena, kljukica */
body.v2 .badge-completed, body.v2 .badge-delivered, body.v2 .badge-confirmed, body.v2 .badge-ready, body.v2 .badge-pass, body.v2 .badge-q-valid, body.v2 .badge-ncr-closed { background: var(--s-ok-bg); color: var(--s-ok); }
body.v2 .badge-completed::before, body.v2 .badge-delivered::before, body.v2 .badge-confirmed::before, body.v2 .badge-ready::before, body.v2 .badge-pass::before, body.v2 .badge-q-valid::before, body.v2 .badge-ncr-closed::before {
    width: 4px; height: 8px; border-width: 0 2px 2px 0; border-radius: 0; transform: rotate(45deg) translate(-1px, -1px); }
/* ukrepaj – rdeča polna, trikotnik */
body.v2 .badge-late, body.v2 .badge-fail, body.v2 .badge-declined, body.v2 .badge-q-expired, body.v2 .badge-ncr-open, body.v2 .badge-ncr { background: var(--s-bad-bg); color: var(--s-bad); }
body.v2 .badge-late::before, body.v2 .badge-fail::before, body.v2 .badge-declined::before, body.v2 .badge-q-expired::before, body.v2 .badge-ncr-open::before, body.v2 .badge-ncr::before {
    border: 0; border-radius: 0; width: 8px; height: 7px; background: currentColor; clip-path: polygon(50% 0, 100% 100%, 0 100%); }
/* nevtralno */
body.v2 .badge-inquiry, body.v2 .badge-q-none { background: #fff; color: var(--s-neutral); box-shadow: inset 0 0 0 1px #c9ccd1; }
body.v2 .badge-cancelled { background: var(--s-neutral-bg); color: var(--muted); text-decoration: line-through; }
body.v2 .badge-cancelled::before { display: none; }
body.v2 .pchip.ok { background: var(--s-ok-bg); border-color: #b9dcc8; color: var(--s-ok); }
body.v2 .pchip.warn { background: var(--s-wait-bg); border-color: #f1d9a6; color: var(--s-wait); }

/* telefon */
@media (max-width: 768px) {
    body.v2 .page-head h1 { font-size: 1.25rem; }
    body.v2 .header { border-bottom-width: 3px; }
    /* kartice: naslov čez vso širino, ostalo v dveh stolpcih (oznaka nad vrednostjo) – pol nižje */
    body.v2 table.cards-on-mobile tr { display: grid; grid-template-columns: 1fr 1fr; gap: .45rem 1rem; padding: .8rem .9rem; }
    body.v2 table.cards-on-mobile td { display: flex; flex-direction: column; align-items: flex-start; justify-content: flex-start; gap: 0; text-align: left; padding: 0; min-width: 0; }
    body.v2 table.cards-on-mobile td::before { font-size: .7rem; text-transform: uppercase; letter-spacing: .04em; margin-bottom: .05rem; }
    body.v2 table.cards-on-mobile td:first-child, body.v2 table.cards-on-mobile td.actions { grid-column: 1 / -1; flex-direction: row; align-items: center; flex-wrap: wrap; gap: .4rem; }
    body.v2 table.cards-on-mobile td.actions { justify-content: flex-end; }
    body.v2 table.cards-on-mobile td:empty { display: none; }
    body.v2 table.cards-on-mobile tr.attention { background: var(--bad-soft); box-shadow: inset 3px 0 0 var(--bad); }
    body.v2 table.cards-on-mobile tr td { background: transparent; box-shadow: none; }
    /* spodnja vrstica */
    body.v2.has-bnav .content { padding-bottom: 6.5rem; }
    body.v2.has-bnav .timer-pill { bottom: calc(68px + .75rem + env(safe-area-inset-bottom)); }
    body.v2.has-bnav .toast { bottom: calc(76px + env(safe-area-inset-bottom)); }
}
.bnav { display: none; }
@media (max-width: 768px) {
    body.v2.has-bnav .bnav { display: grid; grid-template-columns: repeat(5, 1fr); position: fixed; left: 0; right: 0; bottom: 0; z-index: 80;
        background: #fff; border-top: 1px solid var(--line); padding-bottom: env(safe-area-inset-bottom); box-shadow: 0 -2px 10px rgba(16,18,22,.06); }
    .bnav a, .bnav button { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; min-height: 60px; font: inherit; font-size: .7rem; font-weight: 500;
        color: var(--ink-2); text-decoration: none; background: none; border: 0; position: relative; }
    .bnav .ic { width: 22px; height: 22px; }
    .bnav .on { color: var(--ink); font-weight: 600; }
    .bnav .on::after { content: ''; position: absolute; top: 0; left: 30%; right: 30%; height: 3px; border-radius: 0 0 3px 3px; background: var(--red); }
    .bnav .bn-scan .ic { width: 26px; height: 26px; color: var(--red); }
    .bnav .bn-count { position: absolute; top: 8px; left: calc(50% + 6px); background: var(--red); color: #fff; font-size: .65rem; font-weight: 700; border-radius: 9px; padding: 0 5px; line-height: 16px; }
}
.home-more > summary { cursor: pointer; font-weight: 600; padding: .2rem 0; }
.home-more[open] > summary { margin-bottom: .8rem; }

/* ---------- v5.22: lupina aplikacije (grafitni stranski meni, zgornja vrstica z iskanjem) ---------- */
body.v2 { --sidebar-w: 248px; --nav-bg: #16181b; --nav-hover: #23262b; --nav-active: #2c3036; --nav-ink: #a9aeb6; --nav-ink-strong: #ffffff; }
body.v2 .header { height: 60px; padding: 0 1.25rem 0 0; gap: 1rem; background: #fff; border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 40; }
/* logotip kot v izvirniku: pravokoten, 120 px, »visi« iz glave čez vrh stranskega menija */
body.v2 .logo-link { width: var(--sidebar-w); height: 60px; background: var(--nav-bg); display: flex; align-items: flex-start; padding-left: 1.1rem; flex-shrink: 0; position: relative; z-index: 45; }
body.v2 .logo { height: 120px; width: auto; top: 0; border-radius: 0; filter: drop-shadow(0 4px 10px rgba(0,0,0,.25)); }
body.v2 .sidebar { padding-top: 72px !important; }
body.v2 .header-right { gap: .5rem; }
body.v2 .user-chip { display: flex; align-items: center; gap: .6rem; text-decoration: none; color: var(--ink); padding: .3rem .6rem .3rem .3rem; border-radius: 999px; }
body.v2 .user-chip:hover { background: var(--bg); color: var(--ink); }
body.v2 .avatar { width: 34px; height: 34px; border-radius: 50%; background: var(--ink); color: #fff; display: inline-flex; align-items: center; justify-content: center; font-size: .8rem; font-weight: 600; flex-shrink: 0; }
body.v2 .user-info { display: flex; flex-direction: column; text-align: left; line-height: 1.2; }
body.v2 .user-name { font-size: .88rem; }
body.v2 .user-role { font-size: .75rem; color: var(--muted); }
body.v2 .header-link { display: inline-flex; align-items: center; gap: .4rem; color: var(--ink-2); font-weight: 500; padding: .5rem .6rem; border-radius: 8px; }
body.v2 .header-link:hover { background: var(--bg); color: var(--ink); text-decoration: none; }
body.v2 .bell { color: var(--ink-2); width: 40px; height: 40px; border-radius: 8px; }
body.v2 .bell:hover { background: var(--bg); color: var(--ink); }
body.v2 .bell-count { border-color: #fff; }
body.v2 .bell-panel { border-top: 0; border-radius: 12px; border: 1px solid var(--line); box-shadow: 0 16px 40px rgba(16,18,22,.16); top: 50px; }
body.v2 .hamburger span { background: var(--ink); }

/* iskanje */
.gsearch { display: none; }
body.v2 .gsearch { position: relative; display: flex; align-items: center; gap: .5rem; flex: 0 1 520px; margin-left: .75rem; height: 40px; padding: 0 .75rem;
    background: var(--bg); border: 1px solid var(--line); border-radius: 10px; color: var(--muted); }
body.v2 .gsearch:focus-within { background: #fff; border-color: #1f4e9c; box-shadow: 0 0 0 3px rgba(31,78,156,.15); }
body.v2 .gsearch input { flex: 1; min-width: 0; border: 0; background: transparent; outline: none; font: inherit; font-size: .92rem; color: var(--ink); height: 100%; }
body.v2 .gsearch input::-webkit-search-cancel-button { display: none; }
body.v2 kbd { font-family: 'IBM Plex Mono', ui-monospace, monospace; font-size: .7rem; color: var(--ink-2); background: #fff; border: 1px solid var(--line); border-bottom-width: 2px; border-radius: 4px; padding: 0 .3rem; }
body.v2 .gsearch-panel { position: absolute; top: 46px; left: 0; right: 0; min-width: 360px; max-height: 70vh; overflow-y: auto; background: #fff; border: 1px solid var(--line); border-radius: 12px;
    box-shadow: 0 16px 40px rgba(16,18,22,.18); z-index: 90; padding: .35rem 0 0; }
.gs-group { padding: .25rem .35rem; }
.gs-title { font-size: .68rem; font-weight: 600; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); padding: .4rem .65rem .25rem; }
.gs-item { display: flex; align-items: center; gap: .65rem; padding: .5rem .65rem; border-radius: 8px; text-decoration: none; color: var(--ink); }
.gs-item .ic { color: var(--muted); }
.gs-item.hi, .gs-item:hover { background: var(--bg); color: var(--ink); }
.gs-item.hi .ic { color: var(--red); }
.gs-main { display: flex; flex-direction: column; min-width: 0; }
.gs-main b { font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.gs-main small { color: var(--muted); font-size: .78rem; }
.gs-empty { padding: 1rem; color: var(--muted); text-align: center; }
.gs-foot { display: flex; gap: 1rem; padding: .5rem .9rem; border-top: 1px solid var(--line); margin-top: .25rem; font-size: .72rem; color: var(--muted); background: #fafbfc; border-radius: 0 0 12px 12px; }

/* stranski meni */
body.v2 .main-container { min-height: calc(100vh - 60px); }
body.v2 .sidebar { width: var(--sidebar-w); background: var(--nav-bg); border-right: 0; position: sticky; top: 60px; height: calc(100vh - 60px); padding: .5rem 0 0; }
body.v2 #sidebar-menu { padding: .25rem .6rem 1rem; display: flex; flex-direction: column; gap: 2px; }
body.v2 .sidebar-menu { list-style: none; }
body.v2 .sidebar-menu a, body.v2 .nav-group > .tab-link { display: flex; align-items: center; gap: .7rem; padding: .55rem .7rem; margin: 0; border-radius: 8px; box-shadow: none;
    color: var(--nav-ink); font-size: .9rem; font-weight: 500; text-decoration: none; border: 0; border-bottom: 0; }
body.v2 .sidebar-menu a .ic, body.v2 .nav-group > .tab-link .ic { width: 18px; height: 18px; opacity: .9; }
body.v2 .sidebar-menu a:hover, body.v2 .nav-group > .tab-link:hover { background: var(--nav-hover); color: var(--nav-ink-strong); }
body.v2 .nav-home a.active, body.v2 .nav-group > .tab-link.active { color: var(--nav-ink-strong); font-weight: 600; background: transparent; box-shadow: none; }
body.v2 .nav-home a.active { background: var(--nav-active); }
body.v2 .nav-group > .tab-link.active .ic { color: #ff5a6e; opacity: 1; }
body.v2 .nav-group .sidebar-menu { margin: 2px 0 6px; }
body.v2 .nav-group .sidebar-menu a { padding: .45rem .7rem .45rem 2.35rem; font-size: .86rem; font-weight: 400; }
body.v2 .nav-group .sidebar-menu a.active { background: var(--nav-active); color: var(--nav-ink-strong); font-weight: 500; box-shadow: inset 3px 0 0 var(--red); }
body.v2 .nav-group + .nav-group, body.v2 .nav-home + .nav-group { margin-top: 1px; }
body.v2 .language-switch { border-top: 1px solid #2a2d33; padding: .8rem; }
body.v2 .lang-link { color: var(--nav-ink); }
body.v2 .lang-link:hover { color: #fff; }
body.v2 .lang-link.active { background: var(--nav-active); color: #fff; }
body.v2 .sidebar::-webkit-scrollbar { width: 8px; }
body.v2 .sidebar::-webkit-scrollbar-thumb { background: #2f3339; border-radius: 4px; }
body.v2 .content { padding: 1.75rem 2.25rem 4rem; max-width: 1480px; }
body.v2 .preview-bar { z-index: 210; }

/* tabele, obrazci, okna */
body.v2 table.grid th { font-size: .7rem; letter-spacing: .05em; color: var(--muted); font-weight: 600; background: #fafbfc; }
body.v2 table.grid td { border-color: #eef0f2; }
body.v2 table.grid tbody tr:hover td { background: #fafbfc; }
body.v2 .field input, body.v2 .field select, body.v2 .field textarea { border-color: #d5d8dd; border-radius: 8px; }
body.v2 .field > span { color: var(--ink); font-weight: 500; }
body.v2 .modal-backdrop { background: rgba(16,18,22,.5); backdrop-filter: blur(2px); }
body.v2 .modal { box-shadow: 0 24px 60px rgba(16,18,22,.3); }
body.v2 .modal-head { padding: 1.1rem 1.4rem .4rem; }
body.v2 .modal-body { padding: .5rem 1.4rem 1.4rem; }
body.v2 .toast { border-radius: 10px; }
body.v2 .toast-ok { background: var(--ink); }
body.v2 .empty, body.v2 .loading { border: 1px solid var(--line); box-shadow: none; border-radius: 10px; }
body.v2 .timer-pill { border: 1px solid var(--line); box-shadow: 0 8px 24px rgba(16,18,22,.18); }
body.v2 .timer-pill b { color: var(--ink); }
body.v2 .dot { background: #1d6b40; }
body.v2 .back-link { color: var(--ink-2); }

@media (max-width: 1100px) {
    body.v2 .gsearch kbd { display: none; }
    body.v2 .user-info { display: none; }
}
@media (max-width: 768px) {
    body.v2 .header { height: 56px; padding: 0 .5rem; gap: .25rem; }
    body.v2 .logo-link { width: auto; height: 56px; background: none; padding: 0 .25rem; }
    body.v2 .logo { height: 70px; width: auto; }
    body.v2 .sidebar { padding-top: 1rem !important; }
    body.v2 .gsearch { flex: 1 1 auto; min-width: 0; margin-left: .25rem; padding: 0 .6rem; height: 38px; }
    body.v2 .gsearch-panel { position: fixed; top: 60px; left: .5rem; right: .5rem; min-width: 0; max-height: calc(100vh - 140px); }
    body.v2 .gs-foot { display: none; }
    body.v2 .header-link .hl-text { display: none; }
    body.v2 .header-link { display: none; }
    body.v2 .user-chip { padding: 0; }
    body.v2 .sidebar { position: fixed; top: 0; height: 100%; width: 280px; padding-top: 1rem; z-index: 60; }
    body.v2 .content { padding: 1rem .85rem 6.5rem; }
}

/* ---------- v5.22: prijavne strani (prijava, pozabljeno geslo, dvostopenjska, profil podjetja, stran nalepke) ---------- */
body.login-page { font-family: 'IBM Plex Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif; color: #1c1e21;
    background: radial-gradient(1200px 600px at 15% -10%, rgba(196,30,58,.28), transparent 60%), radial-gradient(900px 500px at 110% 110%, rgba(196,30,58,.12), transparent 60%), #16181b; }
body.login-page .login-box { border-top: 0; border-radius: 16px; padding: 2.4rem 2.2rem 2rem; box-shadow: 0 30px 80px rgba(0,0,0,.45); max-width: 400px; }
body.login-page .login-box.wide { max-width: 680px; }
body.login-page .login-logo { width: 130px; height: auto; border-radius: 0; margin-bottom: 1rem; }
body.login-page .login-sub { color: #646a73; margin-bottom: 1.6rem; }
body.login-page .login-title { color: #1c1e21; font-weight: 700; }
body.login-page .field > span { color: #1c1e21; font-weight: 500; }
body.login-page .field input, body.login-page .field select { border-radius: 10px; border-color: #d5d8dd; min-height: 46px; }
body.login-page .field input:focus { border-color: #1f4e9c; box-shadow: 0 0 0 3px rgba(31,78,156,.15); }
body.login-page .btn { border-radius: 10px; min-height: 46px; }
body.login-page .btn-primary { background: #c41e3a; }
body.login-page .login-lang a.active { color: #1c1e21; }
body.login-page .login-box a { color: #4a4f57; }

/* ---------- v5.23: prejeti računi, prodaja v tujino, tarife ---------- */
.rcv-lines input, .rcv-lines select { width: 100%; min-width: 70px; padding: .4rem .5rem; border: 1px solid #d5d8dd; border-radius: 6px; font: inherit; font-size: .88rem; background: #fff; }
.rcv-lines td:first-child input { min-width: 220px; }
.rcv-lines .rl-code { margin-top: .3rem; }
.rcv-checks { margin-top: 1rem; }
.rcv-actions { display: flex; flex-wrap: wrap; align-items: center; gap: .6rem; margin-top: 1rem; }
.rcv-photo { margin-top: .75rem; }
.oss-meter { display: flex; align-items: center; gap: 1rem; flex-wrap: wrap; margin-bottom: .6rem; }
.oss-meter .bar { flex: 1 1 260px; height: 10px; background: var(--bg); border-radius: 5px; overflow: hidden; }
.oss-meter .bar i { display: block; height: 100%; background: var(--ink); border-radius: 5px; }
.rates-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(90px, 1fr)); gap: .5rem .75rem; }
.rates-grid .full { grid-column: 1 / -1; }
.erac-lines .l-kind { min-width: 90px; }

/* ---------- v5.24: samodejno izpolnjevanje podatkov podjetja ---------- */
.creg-pop { position: fixed; z-index: 2000; background: #fff; border: 1px solid var(--line); border-radius: 10px; box-shadow: 0 12px 32px rgba(16,18,20,.18); max-height: 360px; overflow-y: auto; padding: .3rem; font-size: .88rem; }
.creg-row { display: grid; grid-template-columns: 1fr; gap: .1rem; width: 100%; text-align: left; background: none; border: 0; border-radius: 7px; padding: .5rem .6rem; cursor: pointer; color: var(--ink); font: inherit; }
.creg-row:hover, .creg-row.on { background: var(--bg); }
.creg-name { font-weight: 600; }
.creg-meta { color: var(--ink-2); font-size: .82rem; }
.creg-tags { display: flex; flex-wrap: wrap; align-items: center; gap: .35rem; margin-top: .15rem; font-size: .75rem; }
.creg-tags .code { font-family: 'IBM Plex Mono', monospace; }
.creg-tag { border-radius: 999px; padding: 0 .45rem; line-height: 1.5; background: #eef0f2; color: var(--ink-2); font-weight: 600; }
.creg-tag.ok { background: #e3f3ea; color: #1d6b40; }
.creg-tag.bad { background: #fde8eb; color: #a3172f; }
.creg-src { color: var(--muted); margin-left: auto; }
.creg-foot { color: var(--muted); font-size: .72rem; padding: .35rem .6rem .2rem; border-top: 1px solid var(--line); margin-top: .2rem; }
.creg-card .creg-counts { display: flex; flex-wrap: wrap; gap: 1.2rem; margin: .4rem 0 .8rem; }
.creg-card .creg-counts b { display: block; font-size: 1.15rem; }

/* ---------- v5.25: Finance ---------- */
.tabs-inline { display: flex; flex-wrap: wrap; gap: .25rem; border-bottom: 1px solid var(--line); margin: .5rem 0 1rem; }
.tabs-inline a { padding: .55rem .85rem; color: var(--ink-2); text-decoration: none; font-size: .9rem; font-weight: 500; border-bottom: 2px solid transparent; margin-bottom: -1px; }
.tabs-inline a:hover { color: var(--ink); }
.tabs-inline a.on { color: var(--ink); border-bottom-color: var(--red); font-weight: 600; }
.tabs-inline .count { font-size: .75rem; color: var(--muted); margin-left: .2rem; }
.tax-tabs { margin-top: 0; }
.fin-month { display: flex; align-items: center; gap: .5rem; }
.fin-month b { min-width: 7.5rem; text-align: center; }
.fin-delta { font-weight: 600; }
.fin-delta.up { color: #1d6b40; }
.fin-delta.down { color: #a3172f; }
.fin-series tr.cur td { font-weight: 600; background: var(--bg); }
.fin-cols { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; margin-top: 1rem; }
.fin-cols .panel { margin: 0; }
.fin-list li { display: flex; justify-content: space-between; gap: .75rem; padding: .45rem 0; border-bottom: 1px solid var(--line); }
.fin-list li:last-child { border-bottom: 0; }
.fin-list li > span { white-space: nowrap; text-align: right; }
.fin-inv tfoot td, .grid tfoot td { border-top: 2px solid var(--line); padding-top: .6rem; }
.link-btn[data-scroll] { color: inherit; text-decoration: underline; }
@media (max-width: 900px) { .fin-cols { grid-template-columns: 1fr; } }

/* ---------- v5.25: Povezave ---------- */
.conn-hub .sub { margin: 1.1rem 0 .55rem; }
.conn-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: .75rem; }
.conn-tile { border: 1px solid var(--line); border-radius: 10px; padding: .85rem .95rem; background: #fff; display: flex; flex-direction: column; gap: .35rem; }
.conn-tile.is-off { background: var(--bg); }
.conn-tile.is-off .conn-top b { color: var(--muted); }
.conn-tile.is-planned { border-style: dashed; background: transparent; }
.conn-top { display: flex; justify-content: space-between; align-items: flex-start; gap: .5rem; }
.conn-top .pchip { white-space: nowrap; }
.conn-tile p { margin: 0; }
.conn-actions { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem .8rem; margin-top: auto; padding-top: .3rem; }
.conn-actions .switch { display: inline-flex; align-items: center; gap: .35rem; font-size: .82rem; cursor: pointer; }
.conn-actions .switch input { width: 18px; height: 18px; accent-color: var(--red); }
.integ-card.flash, .creg-card.flash { box-shadow: 0 0 0 3px rgba(196,30,58,.35); transition: box-shadow .3s; }

/* ---------- v5.26: Prodaja ---------- */
.pl-board { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(230px, 1fr); gap: .75rem; overflow-x: auto; padding-bottom: .5rem; align-items: start; }
.pl-col { background: var(--bg); border: 1px solid var(--line); border-radius: 10px; padding: .55rem; min-height: 220px; transition: background .15s, border-color .15s; }
.pl-col header { display: flex; flex-wrap: wrap; align-items: baseline; gap: .1rem .5rem; padding: .15rem .25rem .55rem; border-bottom: 2px solid var(--line); margin-bottom: .55rem; }
.pl-col header b { flex: 1 1 100%; font-size: .92rem; }
.pl-col.over, .pl-zone.over { border-color: var(--red); background: #fdf1f3; }
.pl-cards { display: flex; flex-direction: column; gap: .5rem; }
.pl-card { background: #fff; border: 1px solid var(--line); border-radius: 8px; padding: .55rem .65rem; cursor: grab; box-shadow: 0 1px 2px rgba(0,0,0,.04); }
.pl-card:active { cursor: grabbing; }
.pl-card.rot { border-left: 3px solid var(--red); }
.pl-card .pl-title { font-weight: 600; color: var(--ink); text-decoration: none; display: block; line-height: 1.3; }
.pl-card .pl-title:hover { text-decoration: underline; }
.pl-foot { display: flex; align-items: center; gap: .5rem; margin-top: .4rem; font-size: .82rem; }
.pl-foot .pl-next { margin-left: auto; white-space: nowrap; }
.pl-rot { color: #a3172f; margin-top: .25rem; }
.pl-empty { text-align: center; padding: 1.2rem .3rem; border: 1px dashed var(--line); border-radius: 8px; }
.pl-drop { display: grid; grid-template-columns: 1fr 1fr; gap: .75rem; margin-top: .75rem; }
.pl-zone { border: 2px dashed var(--line); border-radius: 10px; padding: .9rem; text-align: center; font-weight: 600; color: var(--ink-2); }
.pl-zone.won { color: #1d6b40; } .pl-zone.lost { color: #a3172f; }
.dragging .pl-zone { border-style: solid; }
.pl-closed { margin-top: 1rem; }
.avatar.sm { width: 24px; height: 24px; font-size: .62rem; border-radius: 50%; background: var(--ink); color: #fff; display: inline-flex; align-items: center; justify-content: center; font-weight: 600; flex-shrink: 0; }
.deal-stages { display: flex; gap: 3px; margin: .25rem 0 1rem; overflow-x: auto; }
.deal-stages button { flex: 1 1 0; min-width: 96px; border: 0; background: var(--bg); color: var(--ink-2); padding: .55rem .5rem; font: inherit; font-size: .82rem; cursor: pointer; clip-path: polygon(0 0, calc(100% - 8px) 0, 100% 50%, calc(100% - 8px) 100%, 0 100%, 8px 50%); }
.deal-stages button:first-child { clip-path: polygon(0 0, calc(100% - 8px) 0, 100% 50%, calc(100% - 8px) 100%, 0 100%); }
.deal-stages button.past { background: #e3f3ea; color: #1d6b40; }
.deal-stages button.cur { background: var(--red); color: #fff; font-weight: 600; }
.deal-grid { display: grid; grid-template-columns: minmax(260px, 360px) 1fr; gap: 1rem; align-items: start; }
.deal-grid .panel { margin-top: 0; margin-bottom: 1rem; }
.info-grid.one { grid-template-columns: 1fr; }
.deal-btns { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: .75rem; }
.contact-list li { padding: .45rem 0; border-bottom: 1px solid var(--line); position: relative; }
.contact-list li:last-child { border-bottom: 0; }
.contact-list .actions { position: absolute; right: 0; top: .35rem; }
.act-list li.act { display: grid; grid-template-columns: auto 1fr auto; gap: .5rem; align-items: start; padding: .5rem 0; border-bottom: 1px solid var(--line); }
.act-list li.act:last-child { border-bottom: 0; }
.act-list li.overdue b { color: #a3172f; }
.act-group h2 { font-size: 1rem; }
.note-form { display: flex; gap: .5rem; align-items: flex-end; }
.note-form textarea { flex: 1; }
.timeline { list-style: none; margin: 0; padding: 0; }
.timeline li { display: grid; grid-template-columns: 110px 1fr; gap: .75rem; padding: .45rem 0; border-bottom: 1px solid var(--line); font-size: .88rem; }
.timeline time { color: var(--muted); font-size: .78rem; }
.tl-k { display: inline-block; font-size: .7rem; text-transform: uppercase; letter-spacing: .03em; font-weight: 700; color: var(--muted); margin-right: .35rem; }
.tl-won { color: #1d6b40; } .tl-lost { color: #a3172f; } .tl-note { color: var(--ink); }
.cbar { display: inline-block; width: 100%; min-width: 120px; height: 8px; background: var(--bg); border-radius: 4px; overflow: hidden; vertical-align: middle; }
.cbar i { display: block; height: 100%; background: var(--ink-2); }
.ss-stages input { width: 100%; min-width: 60px; }
.ss-stages td.center { text-align: center; }
.wf-embed { white-space: pre-wrap; font-size: .78rem; }
.deal-neworg { border: 1px solid var(--line); border-radius: 10px; padding: .75rem; margin-top: .75rem; }
.deal-neworg legend { font-size: .85rem; font-weight: 600; padding: 0 .35rem; }
.lead-msg { max-width: 520px; white-space: pre-wrap; }
.org-crm { margin-top: 1rem; }
.rcv-photo-row { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: .5rem; }
.snap-btn { white-space: nowrap; }
@media (max-width: 900px) {
    .deal-grid { grid-template-columns: 1fr; }
    .pl-board { grid-auto-columns: 82%; scroll-snap-type: x mandatory; }
    .pl-col { scroll-snap-align: start; }
    .timeline li { grid-template-columns: 1fr; gap: .1rem; }
}

/* ===== v5.27: grafi na Pregledu ===== */
:root {
    --viz-1: #2a78d6;   /* kategorična 1 (modra) */
    --viz-2: #eb6834;   /* kategorična 2 (oranžna) – par preverjen za barvno slepoto */
    --viz-grid: #eef0f2;
    --viz-warn: #d03b3b;
    --u1: #cde2fb; --u2: #9ec5f4; --u3: #6da7ec; --u4: #3987e5; --u5: #256abf; --u6: #104281;
}
.viz-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; }
.viz-panel { margin: 0; min-width: 0; }
.viz-panel.viz-wide { grid-column: 1 / -1; }
.viz-svg { width: 100%; height: auto; display: block; }
.viz-gl { stroke: var(--viz-grid); stroke-width: 1; }
.viz-axis { stroke: #c9ccd1; stroke-width: 1; }
.viz-tick { font-size: 10.5px; fill: var(--muted); }
.viz-tick-cur { fill: var(--ink); font-weight: 700; }
.viz-hit { fill: transparent; cursor: default; }
.viz-hit:hover { fill: rgba(0,0,0,.035); }
.viz-s1 { fill: var(--viz-1); background: var(--viz-1); }
.viz-s2 { fill: var(--viz-2); background: var(--viz-2); }
.viz-legend { display: flex; flex-wrap: wrap; gap: .4rem 1rem; font-size: .78rem; color: var(--ink-2); margin: .1rem 0 .5rem; align-items: center; }
.viz-legend i { display: inline-block; width: 10px; height: 10px; border-radius: 2px; margin-right: .35rem; vertical-align: -1px; }
.viz-legend i.viz-mark-key { width: 2px; height: 12px; background: var(--ink); border-radius: 0; }
.viz-kpi { font-size: .85rem; color: var(--ink-2); }
.viz-warn { color: var(--viz-warn); font-weight: 600; }
.viz-tip { position: fixed; z-index: 1000; max-width: 280px; background: #fff; border: 1px solid var(--line); border-radius: 6px; box-shadow: 0 6px 18px rgba(0,0,0,.14);
    padding: .45rem .6rem; font-size: .8rem; line-height: 1.4; pointer-events: none; color: var(--ink); }
.viz-tip .sw { display: inline-block; width: 9px; height: 9px; border-radius: 2px; margin-right: .35rem; }
.viz-data { margin-top: .5rem; }
.viz-data summary { cursor: pointer; font-size: .8rem; color: var(--red); font-weight: 600; padding: .2rem 0; }
.viz-data table { font-size: .8rem; }
.viz-hbars { list-style: none; display: flex; flex-direction: column; gap: .45rem; }
.viz-hbars li { display: grid; grid-template-columns: minmax(0, 38%) minmax(0, 1fr) auto; gap: .6rem; align-items: center; font-size: .82rem; }
.viz-hl { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.viz-hl a { color: var(--ink); text-decoration: none; }
.viz-hl a:hover { color: var(--red); }
.viz-hb { position: relative; height: 14px; }
.viz-hbar { position: absolute; left: 0; top: 0; bottom: 0; border-radius: 0 4px 4px 0; max-width: 100%; }
.viz-mark { position: absolute; top: -3px; bottom: -3px; width: 2px; background: var(--ink); margin-left: -1px; }
.viz-hv { white-space: nowrap; color: var(--ink-2); font-variant-numeric: tabular-nums; }
/* zasedenost: tabela tednov in oseb, ena barva od svetle (malo) do temne (polno) */
.viz-heat { border-collapse: separate; border-spacing: 2px; width: 100%; font-size: .78rem; }
.viz-heat th { font-weight: 500; color: var(--muted); padding: .15rem .3rem; white-space: nowrap; text-align: center; }
.viz-heat thead th.cur { color: var(--ink); font-weight: 700; }
.viz-heat thead th.fc { font-style: italic; }
.viz-heat tbody th { text-align: left; color: var(--ink); font-weight: 600; padding-right: .6rem; }
.uc { height: 28px; min-width: 34px; text-align: center; border-radius: 3px; background: #f4f5f7; color: var(--ink); font-variant-numeric: tabular-nums; position: relative; }
i.uc { display: inline-block; height: 12px; min-width: 18px; width: 18px; }
.uc.u1 { background: var(--u1); } .uc.u2 { background: var(--u2); } .uc.u3 { background: var(--u3); }
.uc.u4 { background: var(--u4); color: #fff; } .uc.u5 { background: var(--u5); color: #fff; } .uc.u6 { background: var(--u6); color: #fff; }
.uc.fc { background-image: repeating-linear-gradient(45deg, rgba(255,255,255,.55) 0 3px, transparent 3px 7px); font-style: italic; }
.uc.cur { box-shadow: inset 0 0 0 2px var(--ink); }
.u-over { font-size: .62rem; margin-left: 1px; vertical-align: 1px; }
.viz-ramp-legend { gap: .3rem .5rem; }
.viz-ramp-legend i.uc { margin-right: 0; }
@media (max-width: 900px) { .viz-grid { grid-template-columns: 1fr; } .viz-hbars li { grid-template-columns: minmax(0, 1fr) auto; } .viz-hb { grid-column: 1 / -1; grid-row: 2; } }

/* ===== v5.27: popis zaloge po policah ===== */
.stk-bins { list-style: none; display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: .5rem; }
.stk-bin { display: flex; flex-direction: column; gap: .15rem; padding: .6rem .75rem; border: 1px solid var(--line); border-radius: var(--radius); text-decoration: none; color: var(--ink); background: #fff; }
.stk-bin:hover { border-color: var(--red); }
.stk-bin.done { background: #f1f8f2; border-color: #cfe6d3; }
.stk-bin-code { font-family: ui-monospace, Menlo, monospace; font-size: .8rem; color: var(--muted); }
.stk-bin-name { font-weight: 600; }
.stk-lines { list-style: none; }
.stk-line { display: flex; align-items: center; gap: .6rem; padding: .55rem 0; border-bottom: 1px solid var(--line); }
.stk-line:last-child { border-bottom: 0; }
.stk-line.zero .stk-line-main { text-decoration: line-through; color: var(--muted); }
.stk-line-main { flex: 1; min-width: 0; }
.stk-qty { display: flex; align-items: center; gap: .35rem; }
.stk-qty input { width: 6.5rem; text-align: right; font-size: 1.05rem; padding: .45rem .5rem; border: 1px solid var(--line); border-radius: 6px; }
.stk-qty span { color: var(--muted); font-size: .85rem; min-width: 2rem; }
.stk-add { margin-top: .8rem; position: relative; }
.stk-found { list-style: none; border: 1px solid var(--line); border-radius: 6px; margin-top: .3rem; max-height: 280px; overflow: auto; background: #fff; }
.stk-found li button { display: block; width: 100%; text-align: left; padding: .5rem .7rem; }
.stk-found li + li { border-top: 1px solid var(--line); }
.stk-actions { position: sticky; bottom: calc(env(safe-area-inset-bottom) + 64px); background: var(--bg); padding: .6rem 0; z-index: 3; }
@media (min-width: 769px) { .stk-actions { bottom: 0; } }

/* ===== v5.27: ponudbe v Prodaji ===== */
.q-list li { display: flex; justify-content: space-between; gap: .6rem; flex-wrap: wrap; align-items: baseline; }
.badge.q-st-draft { background: #eef0f2; color: var(--ink-2); }
.badge.q-st-sent { background: #e3eefb; color: #1c5cab; }
.badge.q-st-accepted { background: #e4f4e6; color: #1d6b2a; }
.badge.q-st-rejected { background: #fbeaed; color: var(--red-dark); }
.badge.q-st-superseded { background: #f4f5f7; color: var(--muted); }
.q-siblings { margin-bottom: .8rem; flex-wrap: wrap; }
.q-siblings a { text-decoration: none; }
.q-items input { width: 100%; padding: .35rem .4rem; border: 1px solid var(--line); border-radius: 5px; background: #fff; }
.q-items td.num input { text-align: right; min-width: 4.5rem; }
.q-items .q-desc { min-width: 220px; }
.q-items .q-desc .code { display: block; margin-top: .15rem; }
.q-items input.q-pct { min-width: 3.5rem; max-width: 4.5rem; }
.q-items input.q-unit { max-width: 4.5rem; }
.q-items .q-cost input { background: #fffbea; }
.q-amt { white-space: nowrap; font-variant-numeric: tabular-nums; font-weight: 600; }
.q-add { display: flex; flex-wrap: wrap; gap: .4rem 1rem; align-items: flex-end; }
.q-add .field { flex: 1 1 260px; margin: 0; }
.q-add .stk-found { flex-basis: 100%; }
.q-totals { display: flex; justify-content: space-between; align-items: flex-start; gap: 1rem; flex-wrap: wrap; margin-top: 1rem; border-top: 1px solid var(--line); padding-top: .8rem; }
.q-gdisc { max-width: 180px; }
.q-sum { min-width: 260px; }
.q-sum b { font-variant-numeric: tabular-nums; }
.q-internal { border-top: 1px dashed var(--line); padding-top: .3rem; }
.form-actions .spacer { flex: 1; }

/* ---------- v5.28.1 Know-how konzola ---------- */
.kh-frame { display: block; width: 100%; min-height: 480px; border: 1px solid var(--line); border-radius: var(--radius); background: #e9ecef; }
.kh-head { margin-bottom: .6rem; }
