/* ---------- Read-only banner (shared data) ---------- */
.ro-banner { display: flex; align-items: center; gap: 14px; padding: 8px 24px; background: #fdf1d8; color: #6b4a06; border-bottom: 1px solid #f1d9a4; font-size: 13px; }
.ro-banner span { flex: 1; }
:root[data-theme="dark"] .ro-banner { background: #3d3115; color: #f1c46c; border-color: #5a4720; }

/* ---------- Project header: actions on the name row, tabs get the full width ---------- */
.topbar { position: relative; }
.top-actions { position: absolute; top: 14px; right: 24px; padding-bottom: 0; }
.top-actions .search { width: 190px; }
.top-actions .btn-primary, .top-actions .chip { white-space: nowrap; }
.pt-row h1 { max-width: min(420px, calc(100vw - 1060px)); min-width: 120px; }
.tabs { flex-wrap: nowrap; overflow-x: auto; }

/* ---------- Sidebar badge: white with black BB ---------- */
.brand .logo { background: #ffffff; color: #111111; }

/* ---------- Module checklist ---------- */
details.mods { margin-top: 14px; border: 1px solid var(--border); border-radius: 8px; padding: 8px 12px; }
details.mods summary { cursor: pointer; font-weight: 600; font-size: 14px; }
details.mods summary small { font-weight: 400; color: var(--muted); }
.mod-list { display: grid; grid-template-columns: 1fr 1fr; gap: 6px 14px; margin-top: 8px; }
.modal label.mod { display: flex; gap: 8px; align-items: flex-start; margin: 0; color: var(--text); cursor: pointer; padding: 6px; border-radius: 6px; }
.modal label.mod:hover { background: var(--hover); }
.mod input { margin-top: 3px; }
.mod span { display: flex; flex-direction: column; }
.mod b { font-weight: 600; font-size: 13px; }
.mod small { color: var(--muted); font-size: 11.5px; line-height: 1.35; }

/* ---------- Contractors ---------- */
.ctr-list { display: flex; flex-direction: column; gap: 6px; max-height: 50vh; overflow-y: auto; margin-top: 8px; }
.ctr-row { display: grid; grid-template-columns: 34px 1fr 1.3fr 54px 28px; gap: 6px; align-items: center; }
.ctr-row input[type=text] { height: 32px; border: 1px solid var(--border-strong); border-radius: 6px; padding: 0 8px; outline: 0; background: var(--surface); }
.ctr-row input[type=color] { width: 32px; height: 32px; border: 0; padding: 0; background: none; cursor: pointer; }
.ctr-n { color: var(--muted); font-size: 12px; text-align: right; }
.ctr-filter { height: 32px; width: auto; max-width: 180px; }
.ctr-dot { width: 9px; height: 9px; border-radius: 3px; display: inline-block; margin-right: 6px; flex-shrink: 0; }
.g-c.ctr { display: flex; align-items: center; }

/* ---------- Timeline additions ---------- */
.g-status { position: absolute; top: 0; bottom: 0; width: 0; border-left: 2px dashed var(--blue); opacity: .8; }
.status-date { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: var(--muted); }
.status-date input { height: 30px; border: 1px solid var(--border-strong); border-radius: 6px; padding: 0 6px; background: var(--surface); color: var(--text); }
.seg.sm button { height: 28px; font-size: 13px; padding: 0 10px; }
.behind { color: #e8833a; font-size: 11px; margin-left: -2px; }
.att-n { font-size: 11px; color: var(--muted); }
.g-colbtn { width: 22px; height: 22px; margin-left: auto; font-size: 14px; font-weight: 700; }
.g-corner .g-c.name { display: flex; align-items: center; }

/* ---------- Attachments in detail ---------- */
.atts { display: flex; flex-direction: column; gap: 4px; }
.att { display: flex; align-items: center; gap: 8px; padding: 3px 4px 3px 8px; border: 1px solid var(--border); border-radius: 6px; }
.att-name { flex: 1; text-align: left; color: var(--blue); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: 13px; }
.att-name:hover { text-decoration: underline; }
.att .icon-btn { width: 24px; height: 24px; }
.att-hint { color: var(--faint); font-size: 11.5px; }

/* ---------- Two-pane views (diary, meetings) ---------- */
.two-pane { display: flex; height: 100%; min-height: 0; }
.tp-list { width: 300px; flex-shrink: 0; border-right: 1px solid var(--border); overflow-y: auto; padding: 0 12px 12px; display: flex; flex-direction: column; gap: 6px; }
.tp-head { display: flex; gap: 6px; position: sticky; top: 0; background: var(--bg); padding: 12px 0 6px; z-index: 1; }
.btn-primary.sm { height: 28px; font-size: 13px; padding: 0 10px; }
.tp-item { text-align: left; padding: 9px 11px; border-radius: 8px; border: 1px solid var(--border); display: flex; flex-direction: column; gap: 2px; position: relative; flex-shrink: 0; }
.tp-item:hover { background: var(--hover); }
.tp-item.sel { border-color: var(--blue); background: var(--sel); }
.tp-item b { font-weight: 600; font-size: 13.5px; }
.tp-item small { color: var(--muted); font-size: 12px; }
.tp-item span { color: var(--muted); font-size: 12.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tp-item .open-n { color: var(--red); font-style: normal; font-weight: 600; }
.tp-badge { position: absolute; right: 10px; top: 9px; font-style: normal; font-size: 11px; color: var(--muted); }
.tp-empty { color: var(--muted); font-size: 13px; padding: 10px 4px; }
.tp-edit { flex: 1; overflow-y: auto; min-width: 0; }
.tp-placeholder { height: 100%; display: grid; place-content: center; text-align: center; color: var(--muted); font-size: 16px; line-height: 1.6; }
.tp-form { max-width: 880px; padding: 18px 28px 60px; }
.tp-form-head { display: flex; align-items: center; justify-content: space-between; }
.tp-form-head h2 { margin: 0 0 10px; font-size: 18px; font-weight: 600; }
.form-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.form-grid.g3 { grid-template-columns: 2fr 1fr 1.4fr; }
.form-grid label, label.fl { display: flex; flex-direction: column; gap: 4px; font-size: 12.5px; color: var(--muted); }
label.fl { margin-top: 10px; }
.form-grid .mfield, label.fl .mfield { color: var(--text); background: var(--surface); }
.mfield.ta { height: auto; padding: 8px 10px; resize: vertical; line-height: 1.45; }
.mfield.sm { height: 30px; width: auto; padding: 0 6px; color: var(--text); background: var(--surface); }
.dia-tasks { display: flex; flex-direction: column; gap: 4px; }
.dia-task { display: flex; align-items: center; gap: 8px; padding: 3px 4px 3px 10px; border: 1px solid var(--border); border-radius: 6px; }
.dia-task .t-title { flex: 1; font-size: 13px; }
.dia-tasks > select { color: var(--muted); background: var(--surface); }
.photos { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 10px; }
.photos figure { margin: 0; position: relative; border: 1px solid var(--border); border-radius: 8px; overflow: hidden; background: var(--surface); }
.photos img { width: 100%; height: 130px; object-fit: cover; display: block; cursor: zoom-in; }
.photos .ph-cap { width: 100%; border: 0; border-top: 1px solid var(--border); padding: 6px 8px; font-size: 12px; outline: 0; background: transparent; color: var(--text); }
.photos figure .icon-btn { position: absolute; top: 4px; right: 4px; background: rgba(0, 0, 0, .55); color: #fff; width: 24px; height: 24px; }
.photo-add { min-height: 160px; border: 1.5px dashed var(--border-strong); border-radius: 8px; color: var(--muted); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; }
.photo-add:hover { border-color: var(--blue); color: var(--blue); }
.mt-items { display: flex; flex-direction: column; gap: 4px; margin-bottom: 8px; }
.mt-item { display: grid; grid-template-columns: 22px 1fr 170px 130px auto 28px; gap: 6px; align-items: center; }
.mt-items.prev .mt-item { grid-template-columns: 22px 1fr 170px 130px auto; }
.mt-item input { height: 32px; border: 1px solid var(--border); border-radius: 6px; padding: 0 8px; outline: 0; background: var(--surface); color: var(--text); min-width: 0; }
.mt-item input:focus { border-color: var(--blue); }
.mt-item input[readonly] { background: transparent; border-color: transparent; }
.mt-item.done .mi-text { text-decoration: line-through; color: var(--muted); }
.mt-src small { color: var(--faint); font-size: 11px; margin-left: 30px; }
.btn.linked { color: var(--green); border-color: var(--green); }

.btn, .btn-primary { white-space: nowrap; }

/* ---------- Completed work: always visible, neutral grey ---------- */
:root { --done-bar: #d3d3d6; --done-text: #5b5c60; }
:root[data-theme="dark"] { --done-bar: #4a4b50; --done-text: #c9c9cc; }
.g-bar.is-done { --c: var(--done-bar) !important; opacity: 1; }
.g-bar.is-done::before { background: transparent; }
.g-bar.is-done .g-text { color: var(--done-text); }
.g-ms.is-done { opacity: 1; }
.g-ms.is-done::before { background: var(--done-bar) !important; }
.g-row.task.is-done .t-title { text-decoration: none; color: var(--muted); }

/* ---------- Pregled biroja ---------- */
.ov-icon { background: #111; color: #fff; font-size: 15px; letter-spacing: -.5px; }
:root[data-theme="dark"] .ov-icon { background: #fff; color: #111; }
.ov-pbar { position: absolute; height: 22px; border-radius: 5px; background: var(--c); pointer-events: auto; cursor: pointer; display: flex; align-items: center; overflow: hidden; }
.ov-pbar span { padding: 0 9px; font-size: 12px; font-weight: 700; color: #1e1f21; white-space: nowrap; }
.ov-pbar.done { --c: var(--done-bar) !important; }
.ov-bar { position: absolute; height: 22px; border-radius: 6px; background: var(--c); pointer-events: auto; cursor: grab; display: flex; align-items: center; box-shadow: 0 1px 2px rgba(0, 0, 0, .12); color: #1e1f21; }
.ov-bar::before { content: ''; position: absolute; inset: 0; border-radius: 6px; background: var(--bar-veil); }
.ov-bar.unassigned { background-image: repeating-linear-gradient(135deg, transparent 0 6px, rgba(255, 255, 255, .35) 6px 12px); }
.ov-bar.done { --c: var(--done-bar) !important; }
.ov-bar.done .g-text { color: var(--done-text); }
.overview .g-c.wbs { padding: 0 2px; }
.ov-bar.done::before { background: transparent; }
.ov-bar .g-prog { position: absolute; left: 0; top: 0; bottom: 0; border-radius: 6px; background: var(--c); }
.ov-load { position: absolute; height: 18px; pointer-events: auto; display: grid; place-items: center; font-size: 11px; font-weight: 700; color: #1e1f21; border-right: 1px solid var(--surface); }
.ov-owner { width: 100%; height: 28px; border: 1px solid transparent; border-radius: 6px; background: transparent; color: var(--text); padding: 0 4px; cursor: pointer; font-size: 13px; }
.ov-owner:hover, .ov-owner:focus { border-color: var(--border-strong); outline: 0; }
.g-row.ov-phase .g-c.name { padding-left: 14px; }
.g-row.ov-phase .g-left { cursor: default; }
.muted-c { color: var(--muted) !important; font-size: 12px; font-weight: 400; }
.role { color: var(--muted); font-weight: 400; font-size: 12px; margin-left: 6px; }
.ov-done { color: var(--green); font-weight: 700; margin-left: 4px; }
.ov-hint { margin: 10px 24px 0; padding: 10px 14px; border-radius: 8px; background: var(--sel); color: var(--text); font-size: 13px; }
.ov-legend { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; color: var(--muted); }
.ov-legend i { width: 14px; height: 10px; border-radius: 2px; display: inline-block; margin-left: 6px; }
.avatar.none { background: var(--faint); }
.sec-owner { margin-left: 6px; }
.overview .g-row.sec .g-left { cursor: default; }

/* ---------- Native dropdown lists readable in both themes ---------- */
select option, select optgroup { background-color: var(--surface); color: var(--text); }
select option:disabled { color: var(--faint); }

/* ---------- Row drag (move task up/down) ---------- */
.g-grip { display: inline-block; width: 12px; margin-left: -12px; margin-right: 2px; color: var(--faint); cursor: grab; opacity: 0; font-size: 12px; user-select: none; }
.g-row.task:hover .g-grip { opacity: 1; }
.g-grip:active { cursor: grabbing; }
.g-drop { position: absolute; left: 0; right: 0; height: 3px; background: var(--blue); z-index: 6; display: none; pointer-events: none; box-shadow: 0 0 0 1px rgba(69, 115, 210, .25); }
.g-row.row-dragging { opacity: .45; }

/* ---------- Clickable dependency arrows ---------- */
.g-arrows .dep-hit { fill: none; stroke: transparent; stroke-width: 10; pointer-events: stroke; cursor: pointer; }
.g-arrows .dep-hit:hover + path, .g-arrows path.sel { stroke: var(--blue); stroke-width: 2.4; }

/* ---------- Week numbers in the timeline header ---------- */
.g-u.mid { justify-content: center; padding: 0 2px; border-top: 1px solid var(--border); font-size: 11.5px; color: var(--text); font-weight: 600; }
.g-u.mid.cur { color: #3d9a6d; background: rgba(93, 162, 131, .14); }
.g-u.bot { font-size: 11px; }
.g-u.bot.today { color: #fff; background: var(--accent); font-weight: 700; }
.g-col.wk { border-left-color: var(--border-strong); }

/* ---------- Sidebar: undo/redo, delete project, signed-in user ---------- */
.brand .spacer { flex: 1; }
.brand .hist { color: var(--side-muted); font-size: 17px; width: 26px; height: 26px; }
.brand .hist:hover:not(:disabled) { background: var(--side-hover); color: var(--side-text); }
.brand .hist:disabled { opacity: .3; cursor: default; }
.nav .p-del { display: none; color: var(--side-muted); padding: 2px; border-radius: 4px; line-height: 0; }
.nav:hover .p-del { display: inline-block; }
.nav:hover .count { display: none; }
.nav .p-del:hover { color: #ff8a8a; background: rgba(255, 255, 255, .08); }
.whoami { display: flex; align-items: center; gap: 8px; padding: 8px 10px 2px; color: var(--side-muted); font-size: 12px; }

/* ---------- Team dialog ---------- */
.modal.xwide { width: 1080px; }
.pp-head, .pp-row { display: grid; grid-template-columns: 34px 1.2fr 1.1fr 1.1fr 100px 120px 140px 34px 28px; gap: 6px; align-items: center; }
.pp-head { font-size: 11.5px; color: var(--muted); padding: 0 0 2px; }
.pp-row input[type=text], .pp-row select { height: 32px; border: 1px solid var(--border-strong); border-radius: 6px; padding: 0 8px; outline: 0; background: var(--surface); color: var(--text); min-width: 0; }
.pp-row input[type=color] { width: 32px; height: 32px; border: 0; padding: 0; background: none; cursor: pointer; }
.pp-row.self input[data-pf=name] { border-color: var(--blue); }
.pp-list.locked { opacity: .75; }

/* ---------- Overview additions ---------- */
.g-row.ov-group .g-left { background: var(--board); font-size: 11.5px; font-weight: 700; letter-spacing: .5px; text-transform: uppercase; color: var(--muted); }
.g-row.ov-group { background: var(--board); }
.g-row.ov-phase.sub .g-c.name { padding-left: 30px; }
.ov-tk { color: var(--faint); margin-right: -2px; }
.ov-bar.task { height: 18px; margin-top: 2px; }
.avatar.ext { border: 2px dashed rgba(255, 255, 255, .85); }
.inherited { color: var(--muted); font-style: italic; }
select.ov-owner:disabled { cursor: default; opacity: .8; }
.g-u.bot { font-size: 10.5px; }

/* ---------- Collapsible sidebar ---------- */
#side-toggle { position: fixed; left: 236px; top: 50%; transform: translateY(-50%); z-index: 30; width: 22px; height: 48px; border-radius: 0 8px 8px 0; background: var(--side-active); color: var(--side-text); font-size: 16px; display: grid; place-items: center; box-shadow: var(--shadow); }
#side-toggle:hover { background: var(--blue); color: #fff; }
body.side-collapsed { grid-template-columns: 0 1fr; }
body.side-collapsed #sidebar { padding: 0; overflow: hidden; }
body.side-collapsed #side-toggle { left: 0; }

/* ---------- Zaklepanje projektov ---------- */
.p-lock { font-size: 11px; margin-left: 2px; opacity: .85; }
.p-lock.mine { color: var(--accent, #2f6fdb); font-weight: 700; }
.lock-chip { display: inline-flex; align-items: center; gap: 4px; padding: 4px 10px; border-radius: 999px; font-size: 12px; white-space: nowrap; border: 1px solid var(--line, #ddd); }
.lock-chip.other { background: #fff4e5; border-color: #f0c27a; color: #7a4a00; }
.lock-chip.mine { background: #eaf2ff; border-color: #b9d0f5; color: #1d4f9c; }
.lock-chip.view { color: var(--muted, #777); }
[data-theme="dark"] .lock-chip.other { background: #3a2a10; border-color: #7a5a20; color: #f3cf8f; }
[data-theme="dark"] .lock-chip.mine { background: #16263f; border-color: #2c4b7a; color: #a9c6f5; }

/* ---------- 1.8: posodobitve, dostop, zgodovina, kopije ---------- */
.side-foot .nav.upd { color: #fff; background: #2f6fdb; border-radius: 8px; margin-bottom: 4px; }
.side-foot .nav.upd:hover { background: #2559b5; }
.ro-banner.info { background: #eaf2ff; color: #1d4f9c; border-color: #c5d8f6; }
:root[data-theme="dark"] .ro-banner.info { background: #16263f; color: #a9c6f5; border-color: #2c4b7a; }
.badge.ext { background: #efe7fb; color: #5b2f99; }
:root[data-theme="dark"] .badge.ext { background: #35274d; color: #d4bdf5; }
.acc-btn.lim { border-color: #c9b3ec; }
.acc-list { max-height: 260px; overflow: auto; border: 1px solid var(--border, #ddd); border-radius: 8px; padding: 6px 10px; margin: 6px 0 10px; }
.acc-list .chk { display: flex; align-items: center; gap: 8px; margin: 4px 0; }
.acc-list .pdot { width: 9px; height: 9px; border-radius: 50%; display: inline-block; }
#ac-box.off { opacity: .45; }
.hs-list { max-height: 60vh; overflow: auto; }
.hs-day { font-weight: 600; font-size: 12px; text-transform: capitalize; color: var(--muted, #777); margin: 14px 0 4px; }
.hs-row { display: flex; align-items: flex-start; gap: 10px; padding: 5px 0; border-bottom: 1px solid var(--border, #eee); font-size: 13px; }
.hs-time { width: 44px; flex: none; color: var(--muted, #777); font-variant-numeric: tabular-nums; padding-top: 2px; }
.hs-text { flex: 1; line-height: 1.45; }
.hs-text s { color: var(--muted, #888); }
.bk-list { max-height: 46vh; overflow: auto; }
.ml-out { margin-top: 8px; min-height: 18px; }
.modal label.search { display: flex; width: 100%; max-width: 460px; }
.modal label.search input { flex: 1; }
