/* JobBoard — Trello-style UI */
* { box-sizing: border-box; margin: 0; }
:root {
  --bg: #f1f3f7; --panel: #ffffff; --ink: #1e2433; --muted: #6b7280;
  --line: #e3e7ee; --primary: #4f6df5; --primary-dark: #3d55c8;
  --danger: #e5484d; --ok: #22a06b; --warn: #d97706;
  --col-bg: #e9edf3; --shadow: 0 1px 3px rgba(20,30,60,.10), 0 8px 24px rgba(20,30,60,.06);
  --radius: 10px;
  font-size: 15px;
}
body { font-family: 'Segoe UI', system-ui, sans-serif; background: var(--bg); color: var(--ink); min-height: 100vh; }
.hidden { display: none !important; }
.muted { color: var(--muted); }
.small { font-size: .82rem; }
.error { color: var(--danger); font-size: .88rem; }
.spacer { flex: 1; }

/* ---------- login ---------- */
.login-wrap { min-height: 100vh; display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, #4f6df5 0%, #7b5cf0 100%); }
.login-card { background: var(--panel); padding: 2.2rem; border-radius: 14px; width: 340px;
  display: flex; flex-direction: column; gap: .9rem; box-shadow: var(--shadow); }
.logo-big { font-size: 1.7rem; font-weight: 800; }
.logo-big span, .logo span { color: var(--primary); }

/* ---------- topbar ---------- */
.topbar { display: flex; align-items: center; gap: 1.2rem; background: var(--panel);
  padding: .55rem 1.2rem; border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 50; }
.logo { font-weight: 800; font-size: 1.15rem; cursor: pointer; }
.topbar nav { display: flex; gap: .2rem; }
.topbar nav a { text-decoration: none; color: var(--ink); padding: .38rem .8rem; border-radius: 8px; font-weight: 600; font-size: .92rem; }
.topbar nav a:hover { background: var(--col-bg); }
.topbar nav a.active { background: var(--primary); color: #fff; }
/* Polje za pretragu gura ostatak desno i ima svoju sirinu. Bez toga globalno
   pravilo input { width: 100% } proguta traku i ime se prelomi u dva reda —
   sto se i desilo na teams.html, gde je polje #filter. */
#global-search, #filter { margin-left: auto; width: 230px; }
.topbar-right { display: flex; align-items: center; gap: .6rem; }
.user-chip { font-weight: 600; font-size: .9rem; background: var(--col-bg); padding: .3rem .7rem;
  border-radius: 99px; white-space: nowrap; }

/* ---------- inputs & buttons ---------- */
input, select, textarea { font: inherit; padding: .45rem .6rem; border: 1px solid var(--line);
  border-radius: 8px; background: #fff; color: var(--ink); width: 100%; }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--primary); outline-offset: -1px; }
label { display: flex; flex-direction: column; gap: .25rem; font-size: .85rem; font-weight: 600; color: #3a4356; }
label.inline { flex-direction: row; align-items: center; gap: .4rem; font-weight: 500; }
label.inline input { width: auto; }
.btn { font: inherit; font-weight: 600; padding: .48rem 1rem; border-radius: 8px; border: 1px solid var(--line);
  background: #fff; cursor: pointer; }
.btn:hover { background: var(--col-bg); }
.btn-primary { background: var(--primary); border-color: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-dark); }
.btn-danger { background: var(--danger); border-color: var(--danger); color: #fff; }
.btn-block { width: 100%; }
.icon-btn { font: inherit; background: none; border: none; cursor: pointer; font-size: 1.05rem;
  padding: .3rem .45rem; border-radius: 8px; position: relative; }
.icon-btn:hover { background: var(--col-bg); }
.link-btn { background: none; border: none; color: var(--primary); cursor: pointer; font-size: .82rem; }
.chip-btn { font: inherit; font-size: .8rem; font-weight: 600; padding: .15rem .55rem; border-radius: 99px;
  border: 1px solid var(--line); background: #fff; cursor: pointer; }
.chip-btn:hover { border-color: var(--primary); color: var(--primary); }

/* ---------- layout ---------- */
main { padding: 1.1rem 1.3rem; }
.view-head { display: flex; align-items: center; gap: .9rem; margin-bottom: 1rem; flex-wrap: wrap; position: relative; }
.view-head h2 { font-size: 1.25rem; }
.seg { display: inline-flex; background: var(--col-bg); border-radius: 8px; padding: 3px; }
.seg button { font: inherit; font-size: .85rem; font-weight: 600; border: none; background: none;
  padding: .3rem .8rem; border-radius: 6px; cursor: pointer; color: var(--muted); }
.seg button.active { background: #fff; color: var(--ink); box-shadow: 0 1px 2px rgba(0,0,0,.12); }

/* ---------- kanban ---------- */
.board { display: grid; grid-template-columns: repeat(4, 1fr); gap: .9rem; align-items: start; }
.col { background: var(--col-bg); border-radius: var(--radius); padding: .6rem; min-height: 220px; }
.col-head { display: flex; align-items: center; gap: .5rem; padding: .2rem .3rem .6rem; font-weight: 700; font-size: .88rem; }
.col-head .cnt { background: rgba(0,0,0,.08); border-radius: 99px; padding: 0 .5rem; font-size: .78rem; }
.col-head .dot { width: 9px; height: 9px; border-radius: 50%; }
.col.drag-over { outline: 2px dashed var(--primary); outline-offset: -3px; background: #dfe6f5; }
.col-body { display: flex; flex-direction: column; gap: .55rem; min-height: 40px; }

.card { background: var(--panel); border-radius: 8px; padding: .55rem .65rem .5rem;
  box-shadow: 0 1px 2px rgba(20,30,60,.14); cursor: grab; border-left: 4px solid var(--muted); position: relative; }
.card:hover { box-shadow: 0 2px 8px rgba(20,30,60,.22); }
.card.dragging { opacity: .45; transform: rotate(2deg); }
.card.blocked { background: repeating-linear-gradient(45deg, #fff, #fff 12px, #f6f7fa 12px, #f6f7fa 24px); }
.card .t-job { font-size: .72rem; color: var(--primary); font-weight: 700; text-transform: uppercase;
  letter-spacing: .02em; margin-bottom: .15rem; cursor: pointer; }
.card .t-title { font-weight: 600; font-size: .92rem; line-height: 1.25; }
.card .t-note { font-size: .8rem; color: var(--muted); margin-top: .15rem;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.card .t-meta { display: flex; align-items: center; gap: .45rem; margin-top: .45rem; flex-wrap: wrap; }
.due { font-size: .76rem; font-weight: 600; padding: .1rem .45rem; border-radius: 6px; background: var(--col-bg); }
.due.late { background: #fde8e8; color: var(--danger); }
.due.soon { background: #fdf1df; color: var(--warn); }
.lock { font-size: .78rem; color: var(--warn); font-weight: 600; }
.avatar { width: 24px; height: 24px; border-radius: 50%; color: #fff; font-size: .66rem; font-weight: 700;
  display: inline-flex; align-items: center; justify-content: center; margin-left: auto; flex: none; }
.deps-chip { font-size: .72rem; color: var(--muted); }

/* ---------- jobs grid ---------- */
.jobs-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: .9rem; }
.job-card { background: var(--panel); border-radius: var(--radius); padding: .9rem 1rem;
  box-shadow: var(--shadow); cursor: pointer; display: flex; flex-direction: column; gap: .45rem; }
.job-card:hover { transform: translateY(-2px); transition: transform .12s; }
.job-card h3 { font-size: 1rem; }
.job-card .client { font-size: .82rem; color: var(--muted); }
.progress { height: 7px; background: var(--col-bg); border-radius: 99px; overflow: hidden; }
.progress i { display: block; height: 100%; background: var(--ok); border-radius: 99px; }
.job-meta { display: flex; gap: .7rem; font-size: .78rem; color: var(--muted); flex-wrap: wrap; }
.job-meta .late { color: var(--danger); font-weight: 700; }
.pill { font-size: .74rem; font-weight: 600; padding: .1rem .5rem; border-radius: 99px; background: var(--col-bg); }

/* ---------- job detail ---------- */
.job-head { background: var(--panel); border-radius: var(--radius); box-shadow: var(--shadow);
  padding: 1rem 1.2rem; margin-bottom: 1rem; display: flex; gap: 1rem; align-items: flex-start; flex-wrap: wrap; }
.job-head h2 { font-size: 1.3rem; }
.job-head .actions { margin-left: auto; display: flex; gap: .5rem; flex-wrap: wrap; }
.job-layout { display: grid; grid-template-columns: 1fr 290px; gap: 1rem; align-items: start; }
@media (max-width: 1100px) { .job-layout { grid-template-columns: 1fr; } .board { grid-template-columns: repeat(2, 1fr); } }

.side-panel { background: var(--panel); border-radius: var(--radius); box-shadow: var(--shadow); padding: .9rem 1rem; }
.side-panel h3 { font-size: .95rem; margin-bottom: .6rem; display: flex; align-items: center; }
.file-row { display: flex; align-items: center; gap: .5rem; padding: .45rem 0; border-top: 1px solid var(--line); font-size: .86rem; }
.file-row a { color: var(--primary); text-decoration: none; word-break: break-all; }
.file-row .del { color: var(--danger); cursor: pointer; border: none; background: none; font-size: .85rem; }

/* ---------- workload / tim ---------- */
.wl-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(270px, 1fr)); gap: .8rem; }
.wl-card { background: var(--panel); border-radius: var(--radius); box-shadow: var(--shadow);
  padding: .75rem .9rem; cursor: pointer; display: flex; flex-direction: column; gap: .5rem; border: 2px solid transparent; }
.wl-card:hover { transform: translateY(-2px); transition: transform .12s; }
.wl-card.sel { border-color: var(--primary); }
.wl-card.drag-over { border-color: var(--ok); background: #ecfdf3; transform: scale(1.02); }
.wl-head { display: flex; align-items: center; gap: .5rem; }
.wl-head .avatar { margin-left: 0; }
.wl-bar { height: 6px; background: var(--col-bg); border-radius: 99px; overflow: hidden; }
.wl-bar i { display: block; height: 100%; background: var(--primary); border-radius: 99px; }
.wl-nums { display: flex; gap: .6rem; flex-wrap: wrap; font-size: .78rem; color: var(--muted); }
.wl-nums .late { color: var(--danger); font-weight: 700; }
.wl-nums .ok { color: var(--ok); }

/* ---------- quick assign ---------- */
.qa-btn { font: inherit; border: none; background: var(--col-bg); border-radius: 6px; cursor: pointer;
  font-size: .72rem; padding: .1rem .35rem; opacity: 0; transition: opacity .12s; }
.card:hover .qa-btn { opacity: 1; }
.qa-btn:hover { background: var(--primary); }
.assign-menu { position: absolute; z-index: 300; width: 250px; background: var(--panel); border-radius: 10px;
  box-shadow: var(--shadow); border: 1px solid var(--line); padding: .45rem; }
.assign-menu .am-search { margin-bottom: .35rem; }
.am-list { max-height: 260px; overflow: auto; }
.am-item { display: flex; align-items: center; gap: .5rem; padding: .35rem .45rem; border-radius: 8px;
  cursor: pointer; font-size: .86rem; }
.am-item:hover { background: var(--col-bg); }
.am-item.cur { background: #eef2ff; font-weight: 700; }
.am-item .avatar { margin-left: 0; width: 22px; height: 22px; }
.am-unassign { color: var(--danger); }

/* ---------- gantt ---------- */
.job-layout.gantt-mode { grid-template-columns: 1fr 290px; }
.gantt-wrap { background: var(--panel); border-radius: var(--radius); box-shadow: var(--shadow); padding: .6rem; min-width: 0; }
.gantt { display: flex; align-items: stretch; }
.g-left { flex: none; border-right: 1px solid var(--line); }
.g-corner { height: 46px; display: flex; align-items: flex-end; padding: 0 .5rem .4rem; font-weight: 700; font-size: .8rem; color: var(--muted); }
.g-labels { position: relative; }
.g-label { position: absolute; left: 0; right: 0; height: 38px; display: flex; align-items: center; gap: .45rem;
  padding: 0 .5rem; font-size: .84rem; cursor: pointer; border-top: 1px solid var(--line); }
.g-label:hover { background: var(--col-bg); }
.g-label .g-name { flex: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-weight: 600; }
.g-label .avatar { width: 21px; height: 21px; margin-left: 0; }
.g-dot { width: 8px; height: 8px; border-radius: 50%; flex: none; }
.g-right { overflow-x: auto; overflow-y: hidden; flex: 1; }   /* isti razlog kao .vg-scroll */
.g-scroll { position: relative; }
.g-head-months { position: relative; height: 20px; }
.g-month { position: absolute; font-size: .72rem; font-weight: 700; color: var(--muted); padding-left: 4px;
  border-left: 1px solid var(--line); white-space: nowrap; overflow: hidden; }
.g-head-days { position: relative; height: 26px; border-bottom: 1px solid var(--line); }
.g-day { position: absolute; text-align: center; font-size: .7rem; color: var(--muted); line-height: 26px; }
.g-day.wknd { color: #c2410c; opacity: .7; }
.g-body { position: relative; background:
  repeating-linear-gradient(to bottom, transparent 0, transparent 37px, var(--line) 37px, var(--line) 38px); }
.g-stripe { position: absolute; top: 0; bottom: 0; background: rgba(120,130,160,.08); }
.g-today { position: absolute; top: 0; bottom: 0; width: 2px; background: var(--danger); z-index: 3; }
.g-today span { position: absolute; top: -2px; left: 3px; font-size: .64rem; color: var(--danger); font-weight: 700; }
.g-deps { position: absolute; top: 0; left: 0; z-index: 1; pointer-events: none; }
.g-deps path { fill: none; stroke: #9aa4bd; stroke-width: 1.5; stroke-dasharray: 3 2; }
.g-deps circle { fill: #9aa4bd; }
.g-bar { position: absolute; height: 24px; border-radius: 6px; z-index: 2; cursor: grab; touch-action: none;
  display: flex; align-items: center; box-shadow: 0 1px 2px rgba(20,30,60,.25); user-select: none; }
.g-bar.moving { opacity: .75; cursor: grabbing; box-shadow: 0 4px 12px rgba(20,30,60,.35); z-index: 5; }
.g-bar.late { outline: 2px solid var(--danger); outline-offset: 1px; }
.g-bar.implicit { border-left: 3px dashed rgba(255,255,255,.8); }
.g-bar-txt { flex: 1; color: #fff; font-size: .72rem; font-weight: 600; white-space: nowrap; overflow: hidden;
  text-overflow: ellipsis; padding: 0 2px; pointer-events: none; }
.g-h { width: 8px; align-self: stretch; flex: none; cursor: ew-resize; border-radius: 6px; }
.g-h:hover { background: rgba(255,255,255,.35); }
.g-undated { margin-top: .6rem; display: flex; align-items: center; gap: .4rem; flex-wrap: wrap; }
.g-legend { margin-top: .5rem; display: flex; align-items: center; gap: .8rem; flex-wrap: wrap; }
.g-legend i { display: inline-block; width: 14px; height: 9px; border-radius: 3px; margin-right: 4px; }
.g-legend .late-i { background: #fff; outline: 2px solid var(--danger); width: 12px; height: 7px; }
@media (max-width: 1100px) { .job-layout.gantt-mode { grid-template-columns: 1fr; } }

/* ---------- notifications ---------- */
.bell-wrap { position: relative; }
.badge { position: absolute; top: -2px; right: -4px; background: var(--danger); color: #fff;
  font-size: .66rem; font-weight: 700; border-radius: 99px; padding: 1px 5px; }
.notif-panel { position: absolute; right: 0; top: 2.4rem; width: 360px; max-height: 460px; overflow: auto;
  background: var(--panel); border-radius: var(--radius); box-shadow: var(--shadow); border: 1px solid var(--line); z-index: 99; }
.notif-head { display: flex; justify-content: space-between; align-items: center; padding: .7rem .9rem; border-bottom: 1px solid var(--line); }
.notif-item { padding: .6rem .9rem; border-bottom: 1px solid var(--line); font-size: .86rem; cursor: pointer; }
.notif-item:hover { background: var(--col-bg); }
.notif-item.unread { background: #eef2ff; }
.notif-item .when { font-size: .74rem; color: var(--muted); margin-top: .15rem; }
.notif-empty { padding: 1.2rem; text-align: center; color: var(--muted); font-size: .88rem; }

/* ---------- modals ---------- */
.modal-back { position: fixed; inset: 0; background: rgba(15,20,40,.5); display: flex;
  align-items: flex-start; justify-content: center; padding: 5vh 1rem; z-index: 100; }
.modal { background: var(--panel); border-radius: 14px; width: 660px; max-width: 100%;
  max-height: 90vh; overflow: auto; box-shadow: var(--shadow); }
.modal-head { display: flex; justify-content: space-between; align-items: center; padding: .9rem 1.2rem .3rem; }
.modal-body { padding: .7rem 1.2rem 1.2rem; display: flex; flex-direction: column; gap: .75rem; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: .75rem; }
.modal-foot { display: flex; gap: .5rem; margin-top: .4rem; }
.deps-box { display: flex; flex-direction: column; gap: .3rem; max-height: 150px; overflow: auto;
  border: 1px solid var(--line); border-radius: 8px; padding: .5rem .6rem; }
.deps-box label { font-weight: 500; }
.deps-box .done-dep { color: var(--ok); }
.shift-row { display: flex; align-items: center; gap: .4rem; flex-wrap: wrap; }
.tabs { display: flex; gap: .3rem; }
.tab { font: inherit; font-weight: 600; font-size: .85rem; border: none; background: var(--col-bg);
  padding: .35rem .9rem; border-radius: 8px 8px 0 0; cursor: pointer; color: var(--muted); }
.tab.active { background: var(--primary); color: #fff; }
.tpl-row { display: flex; align-items: center; gap: .6rem; padding: .55rem .3rem; border-top: 1px solid var(--line); }
.tpl-row .types { font-size: .78rem; color: var(--muted); flex: 1; }

/* ---------- toast ---------- */
#toast-wrap { position: fixed; bottom: 1.2rem; right: 1.2rem; display: flex; flex-direction: column; gap: .5rem; z-index: 200; }
.toast { background: #262c3d; color: #fff; padding: .65rem 1rem; border-radius: 10px; font-size: .88rem;
  box-shadow: var(--shadow); animation: slide-in .18s ease-out; max-width: 380px; }
.toast.err { background: var(--danger); }
.toast.ok { background: var(--ok); }
@keyframes slide-in { from { transform: translateY(14px); opacity: 0; } to { transform: none; opacity: 1; } }

/* job modal — podaci koji dolaze iz Simphony-ja se prikazuju, ne menjaju */
.jf-ro { background:#f8fafc; border:1px solid #e3e8ee; border-radius:8px; padding:10px 12px; margin-bottom:4px; }
.jf-ro .jf-name { font-weight:600; margin-bottom:3px; }

/* otvaranje izvrsne jedinice iz modala taska */
.exec-new { margin-top: -4px; }
.exec-form { display:flex; gap:10px; align-items:flex-end; flex-wrap:wrap;
  background:#f8fafc; border:1px solid #e3e8ee; border-radius:8px; padding:10px 12px; margin-top:6px; }
.exec-form label { display:flex; flex-direction:column; gap:4px; font-size:.78rem; color:#64748b; }
.exec-form .hint { flex-basis:100%; margin:0; }
.btn-sm { padding:6px 12px; font-size:.85rem; }
.exec-pick { display:flex; gap:6px; align-items:center; }
.exec-pick select { flex:1; min-width:0; }

/* sortiranje liste jobova */
.sort-by { font-size: 12px; color: var(--muted); display: flex; align-items: center; gap: 6px; }
.sort-by select { font-size: 12px; padding: 3px 6px; }

/* talas: koji krug ponovljenog posla */
.wave-chip {
  background: #ede9fe; color: #5b21b6; border-radius: 10px;
  padding: 1px 7px; font-size: 11px; font-weight: 600;
}
.wave-row { display: flex; align-items: center; gap: 8px; margin-top: .4rem; }
.wave-row input { width: 150px; padding: 2px 6px; font-size: 12px; }

/* job na mojoj listi */
.star {
  background: none; border: 0; cursor: pointer; font-size: 16px;
  color: #d97706; line-height: 1; padding: 0 2px;
}
.job-card { position: relative; }
.job-card .star { position: absolute; top: 8px; right: 8px; }

/* biranje joba iz pretrage */
.pick-list { max-height: 320px; overflow-y: auto; margin-top: .5rem; }
.pick {
  display: flex; justify-content: space-between; gap: 10px; align-items: baseline;
  padding: 7px 9px; border-radius: 6px; cursor: pointer;
}
.pick:hover { background: var(--hover, #f1f5f9); }

/* dokumenti: filter i skracivanje predugackih naziva */
.file-filter { display: flex; gap: 6px; margin: .4rem 0 .6rem; }
.file-filter input { flex: 1; min-width: 0; padding: 3px 7px; font-size: 12px; }
.file-filter select { max-width: 45%; padding: 3px 4px; font-size: 12px; }
.file-main { flex: 1; min-width: 0; }
.file-main a {
  display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.file-main .small { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* task bez ikakvog opisa — "Other" i prazna napomena */
.bez-imena { font-style: italic; opacity: .65; }

/* upload: sopstveno dugme umesto onog koje pregledac ne da da se sredi */
.filepick { display: flex; align-items: center; gap: 10px; cursor: pointer; }
.filepick input[type=file] {
  position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none;
}
.filepick-btn {
  display: inline-block; padding: 6px 14px; border-radius: 6px;
  border: 1px solid var(--line, #d8dee9); background: var(--card, #fff);
  font-size: 13px; font-weight: 600; white-space: nowrap;
}
.filepick:hover .filepick-btn { border-color: var(--accent, #4f6df5); color: var(--accent, #4f6df5); }
.filepick input:focus-visible + .filepick-btn { outline: 2px solid var(--accent, #4f6df5); outline-offset: 2px; }
.filepick-name { font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* --- tekst taska: uputstvo se pise, ne kaci kao fajl --- */
.body-edit { font-family: ui-monospace, Consolas, monospace; font-size: 13px; line-height: 1.45; }
.body-view { margin: -4px 0 10px; padding: 8px 10px; border-left: 3px solid var(--line, #e2e8f0);
             background: var(--bg-soft, #f8fafc); border-radius: 0 6px 6px 0; font-size: 13px; }
.body-view.hidden { display: none; }
.body-view p  { margin: 0 0 6px; }
.body-view ul { margin: 0 0 6px; padding-left: 18px; }
.body-view code { background: rgba(0,0,0,.06); padding: 1px 4px; border-radius: 3px;
                  font-family: ui-monospace, Consolas, monospace; }

/* --- verzije dokumenta --- */
.ver-chip { border: 1px solid var(--line, #e2e8f0); background: #fff; border-radius: 10px;
            font-size: 11px; padding: 0 6px; margin-left: 6px; cursor: pointer; color: #475569; }
.ver-chip:hover { background: #f1f5f9; }
.file-row .newver { background: none; border: 0; cursor: pointer; color: #94a3b8; font-size: 15px; }
.file-row .newver:hover { color: #4f6df5; }
.ver-list { margin-top: 6px; border-left: 2px solid var(--line, #e2e8f0); padding-left: 8px; }
.ver-list.hidden { display: none; }
.ver-row { display: flex; gap: 6px; align-items: baseline; font-size: 12px; padding: 2px 0; }
.ver-row a { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* Uputstvo se prvo cita, pa tek onda menja */
.body-wrap { margin-bottom: 10px; }
.body-head { display: flex; align-items: baseline; gap: 8px; font-size: 12px;
             color: #64748b; margin-bottom: 4px; }
.body-head span { font-weight: 600; }
.body-view { min-height: 34px; max-height: 320px; overflow: auto; cursor: text; }
.body-view:hover { background: #f1f5f9; }
.body-edit { width: 100%; }

/* --- veliki ekran za uputstvo --- */
.modal-wide { width: min(1150px, 96vw); max-height: 92vh; display: flex; flex-direction: column; }
.modal-wide .modal-head { gap: .8rem; }
.modal-wide .modal-head h3 { white-space: nowrap; }
.body-split { flex: 1; min-height: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.body-split > * { min-height: 55vh; max-height: 72vh; overflow: auto; }
.body-split .body-edit { resize: none; border: 1px solid var(--line); border-radius: 8px; padding: .7rem .8rem; }
.body-split .body-view { border-left: 0; border: 1px solid var(--line); border-radius: 8px; cursor: default; }
.body-split .body-view:hover { background: var(--bg-soft, #f8fafc); }
.body-edit.drop-over { outline: 2px dashed #4f6df5; outline-offset: -3px; }

/* Slika u tekstu: nikad sira od kolone, i vidi se da je slika. */
.body-view img { max-width: 100%; height: auto; display: block; margin: 8px 0;
                 border: 1px solid var(--line); border-radius: 6px; }
.body-view h3, .body-view h4, .body-view h5, .body-view h6 { margin: 10px 0 4px; line-height: 1.3; }
.body-view h3 { font-size: 17px; } .body-view h4 { font-size: 15px; }
.body-view h5, .body-view h6 { font-size: 13px; color: #475569; }
.body-view blockquote { margin: 6px 0; padding-left: 10px; border-left: 3px solid #cbd5e1; color: #475569; }
.body-view hr { border: 0; border-top: 1px solid var(--line); margin: 10px 0; }
.body-view ol { margin: 0 0 6px; padding-left: 20px; }
.body-view pre { background: #0f172a; color: #e2e8f0; padding: 8px 10px; border-radius: 6px;
                 overflow-x: auto; margin: 6px 0; }
.body-view pre code { background: none; color: inherit; padding: 0; }

/* Tabela iz Worda: uze kolone od teksta oko nje, pa ne razvlaci ekran. */
.body-view .md-tab { border-collapse: collapse; margin: 8px 0; font-size: 13px; }
.body-view .md-tab th, .body-view .md-tab td { border: 1px solid var(--line); padding: 3px 7px;
                                               text-align: left; vertical-align: top; }
.body-view .md-tab th { background: var(--bg-soft, #f8fafc); }

/* Traka za formatiranje. Dugmad su tu za onoga ko pise iz glave; ko lepi iz
   Worda ne treba da je ni pogleda. */
.md-bar { display: flex; align-items: center; gap: 2px; margin: 0 0 6px;
          flex-wrap: wrap; }
.md-bar.hidden { display: none; }
.md-bar button { border: 1px solid transparent; background: none; border-radius: 6px;
                 padding: 2px 7px; font-size: 13px; line-height: 1.5; cursor: pointer;
                 color: #334155; min-width: 26px; }
.md-bar button:hover { background: #eef2ff; border-color: #c7d2fe; }
.md-bar button:active { background: #e0e7ff; }
.md-sep { width: 1px; align-self: stretch; background: var(--line); margin: 2px 5px; }
.modal-wide .md-bar { padding: 0 1.2rem; margin-bottom: .5rem; }

/* Veliki ekran se otvara kao procitano uputstvo preko cele sirine: u njega se
   ulazi da bi se procitalo, a mnogo redje da bi se pisalo. Markdown se
   dodaje kvacicom ili klikom na tekst. */
.body-split.samo-prikaz { grid-template-columns: 1fr; }
.body-split.samo-prikaz > .body-edit { display: none; }
.body-split.samo-prikaz > .body-view { cursor: text; }
#bm-md-lab { margin-left: auto; font-size: 12px; white-space: nowrap; }

/* --- gde su podaci --- */
.data-list { display: flex; flex-direction: column; gap: .4rem; margin-bottom: 1rem; }
.data-row { border: 1px solid var(--line); border-radius: 8px; padding: .4rem .6rem; }
.data-row a { font-weight: 600; }

/* ---------- Ipsos alati (gornja traka) ---------- */
.links-wrap { position: relative; }
.links-panel { position: absolute; right: 0; top: 2.4rem; width: 210px; padding: .35rem;
  background: var(--panel); border-radius: var(--radius); box-shadow: var(--shadow);
  border: 1px solid var(--line); z-index: 99; }
.links-panel a { display: flex; justify-content: space-between; align-items: baseline; gap: .5rem;
  padding: .45rem .6rem; border-radius: 8px; color: inherit; text-decoration: none; font-size: .88rem; }
.links-panel a:hover { background: var(--col-bg); }

/* ---------- internal ---------- */
.int-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: .8rem; margin-top: 1rem; }
.int-card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius);
  padding: .8rem .9rem; cursor: pointer; }
.int-card:hover { box-shadow: var(--shadow); }
.int-bu { font-size: .72rem; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); }
.int-name { font-weight: 600; margin: .2rem 0 .45rem; }
.int-meta { display: flex; gap: .6rem; font-size: .78rem; color: var(--muted); }
.int-meta .mine { color: var(--accent, #4f46e5); font-weight: 600; }

/* ---------- odobrenje / zakljucan dokument ---------- */
.check-row { margin: -.2rem 0 .2rem; }
.file-row.locked .file-main > span:first-child { color: var(--muted); }

/* ---------- sati ---------- */
.wk-nav { display: flex; align-items: center; gap: .4rem; font-size: .88rem; }

/* tabela sati — isti oblik kao iTime: red je job, kolone su dani */
.h-scroll { overflow-x: auto; margin-top: .8rem; }
.h-grid { border-collapse: collapse; width: 100%; font-size: .86rem; background: var(--panel); }
.h-grid th, .h-grid td { border: 1px solid var(--line); padding: .35rem .5rem; text-align: center; }
.h-grid thead th { background: var(--col-bg); font-weight: 600; white-space: nowrap; }
.h-grid tr.h-datumi th { font-weight: 500; color: var(--muted); font-size: .76rem; border-bottom: 0; }
.h-grid tr.h-imena th { border-top: 0; }
.h-grid th.vikend, .h-grid td.vikend { background: #f8fafc; }
.h-grid th.danas { color: #4f6df5; }
.h-what-col, .h-what { text-align: left !important; min-width: 260px; }
.h-code-col { min-width: 180px; }
.h-tot-col, .h-rtot, .h-wtot, .h-dtot { font-variant-numeric: tabular-nums; font-weight: 600; }
.h-grid tbody tr.admin .h-what { color: var(--muted); }
.h-cell { width: 54px; text-align: center; padding: .2rem; border: 1px solid transparent;
  background: transparent; font: inherit; border-radius: 4px; }
.h-cell:focus { border-color: #4f6df5; background: #fff; outline: none; }
.h-cell:disabled { color: var(--line); }
.h-grid tfoot td { background: var(--col-bg); }
.h-dtot.full { color: #166534; }
.h-dtot.over, .h-wtot.over { color: var(--danger); }
.h-dot { color: #b45309; }
.h-dot.off { color: #4f6df5; }
.h-empty { padding: 1rem; }
.h-add { display: flex; gap: .5rem; margin-top: .8rem; position: relative; }
#h-total.full { color: #166534; font-weight: 600; }
#h-total.over { color: var(--danger); font-weight: 600; }
.h-tag { font-size: .66rem; text-transform: uppercase; letter-spacing: .04em; color: var(--muted);
  border: 1px solid var(--line); border-radius: 99px; padding: 0 .4rem; }
.h-job { font-weight: 600; margin-right: .35rem; }

/* ---------- odmori ---------- */
.vac-mine b { font-size: 1.15rem; }
.vac-badge { display: inline-block; min-width: 20px; padding: 0 .3rem; margin-left: .35rem;
  border-radius: 99px; background: var(--col-bg); border: 1px solid var(--line);
  font-size: .7rem; font-variant-numeric: tabular-nums; color: var(--muted); }

/* traka odmora kroz vreme */
.vac-gantt { margin: .4rem 0 .6rem; }
/* overflow-y je izricito hidden: kad je jedna osa auto, druga po specifikaciji
   prestaje da bude visible i takodje postaje auto. Visina vodoravne klizne
   trake tada gurne sadrzaj preko ivice i pojavi se DRUGA uspravna traka, pored
   one od stranice. Traka odmora se i onako pomera samo levo-desno. */
.vg-scroll { display: flex; overflow-x: auto; overflow-y: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius); background: var(--panel); }
.vg-imena { flex: 0 0 auto; border-right: 1px solid var(--line); background: var(--panel);
  position: sticky; left: 0; z-index: 2; }
.vg-glava { height: 22px; position: relative; border-bottom: 1px solid var(--line); }
.vg-ime { height: 26px; line-height: 26px; padding: 0 .6rem; white-space: nowrap;
  font-size: .82rem; overflow: hidden; text-overflow: ellipsis; max-width: 260px; }
.vg-ime.tudji { color: var(--muted); }
.vg-platno { position: relative; flex: 0 0 auto; }
.vg-mesec { position: absolute; top: 3px; font-size: .7rem; color: var(--muted);
  padding-left: 3px; border-left: 1px solid var(--line); }
.vg-telo { position: relative; }
.vg-neradni { position: absolute; top: 0; bottom: 0; background: #f1f5f9; }
.vg-danas { position: absolute; top: 0; bottom: 0; width: 2px; background: #4f6df5; opacity: .6; }
.vg-traka { position: absolute; height: 18px; border-radius: 4px; cursor: default; }
.vg-traka.st1 { background: repeating-linear-gradient(45deg, #fcd34d, #fcd34d 4px, #fef3c7 4px, #fef3c7 8px); }
.vg-traka.st2 { background: #4ade80; }

.vac-balance { display: flex; gap: 1rem; align-items: baseline; background: var(--panel);
  border: 1px solid var(--line); border-radius: var(--radius); padding: .7rem .9rem; margin: .8rem 0; }
.vac-balance b { font-size: 1.4rem; }
h3.sec { margin: 1.2rem 0 .5rem; font-size: .9rem; text-transform: uppercase;
  letter-spacing: .04em; color: var(--muted); }
.vac-list { display: flex; flex-direction: column; gap: .35rem; }
.vac-row { display: flex; align-items: center; gap: .8rem; flex-wrap: wrap;
  background: var(--panel); border: 1px solid var(--line); border-left: 3px solid var(--line);
  border-radius: var(--radius); padding: .5rem .7rem; font-size: .88rem; }
.vac-row.pending, .vac-row.waiting { border-left-color: #f59e0b; }
.vac-row.st2 { border-left-color: #22c55e; }
.vac-row.st3 { border-left-color: var(--danger); }
.vac-row.st4 { opacity: .55; }
.vac-who { font-weight: 600; min-width: 180px; }
.vac-when { color: var(--muted); }
.vac-days { font-variant-numeric: tabular-nums; }
.vac-st { font-size: .74rem; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); }
.vac-act { margin-left: auto; display: flex; gap: .4rem; }

/* dvoslovna zemlja */
.cc { display: inline-block; font-size: .66rem; font-weight: 700; letter-spacing: .03em;
  background: var(--col-bg); color: var(--muted); border: 1px solid var(--line);
  border-radius: 4px; padding: 0 .25rem; margin-right: .35rem; vertical-align: middle; }

/* odsutan u spisku ljudi */
.am-item.off { opacity: .75; }
.off-chip { font-size: .7rem; color: #b45309; margin-left: .3rem; white-space: nowrap; }

/* ---------- ideja / talas ---------- */
.wave-filter { max-width: 220px; }
.idea-pick { position: absolute; z-index: 50; margin-top: .4rem; padding: .4rem;
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow); display: flex; flex-direction: column; gap: .15rem; min-width: 240px; }
.idea-head { font-size: .74rem; text-transform: uppercase; letter-spacing: .04em;
  color: var(--muted); padding: .3rem .5rem; }
.idea-opt { text-align: left; background: none; border: 0; cursor: pointer;
  padding: .45rem .5rem; border-radius: 8px; font: inherit; }
.idea-opt:hover { background: var(--col-bg); }

/* ---------- ideja / talas ---------- */
.wave-filter { max-width: 220px; }
.idea-pick { position: absolute; z-index: 50; top: 100%; left: 0; padding: .4rem;
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow); display: flex; flex-direction: column; gap: .15rem; min-width: 240px; }
.idea-head { font-size: .74rem; text-transform: uppercase; letter-spacing: .04em;
  color: var(--muted); padding: .3rem .5rem; }
.idea-opt { text-align: left; background: none; border: 0; cursor: pointer;
  padding: .45rem .5rem; border-radius: 8px; font: inherit; }
.idea-opt:hover { background: var(--col-bg); }
.itime-no { font-size: .7rem; font-variant-numeric: tabular-nums; color: var(--muted);
  background: var(--col-bg); border: 1px solid var(--line); border-radius: 4px; padding: 0 .3rem; }
.itime-no.warn { color: #b45309; border-color: #fed7aa; background: #fff7ed; }
.vg-zbir { position: relative; height: 26px; border-top: 1px solid var(--line); }
.vg-zbir-ime { border-top: 1px solid var(--line); color: var(--muted); font-size: .74rem; }
.vg-broj { position: absolute; top: 0; height: 26px; line-height: 26px; text-align: center;
  font-size: .68rem; font-variant-numeric: tabular-nums; color: #b45309; }
.vg-broj.neradni { background: #f1f5f9; }
.vg-broj.nula { color: var(--line); }

/* ---------- prag na terenu ---------- */
.dep-red { display: flex; align-items: center; gap: .4rem; }
.dep-pct { display: inline-flex; align-items: center; gap: .25rem; margin-left: auto; }
.dep-pct-in { width: 58px; text-align: center; padding: .1rem .2rem; }
.pct-chip { font-size: .7rem; font-variant-numeric: tabular-nums; padding: 0 .35rem;
  border-radius: 99px; background: #fff7ed; color: #b45309; border: 1px solid #fed7aa; }
.pct-chip.ok { background: #dcfce7; color: #166534; border-color: #bbf7d0; }

/* Teren stigao do praga i stoji dok provera ne prodje. Trazi da neko odmah
   nesto uradi, pa stoji iznad naslova kartice, a ne medju sitnim oznakama. */
.t-hold { font-size: .72rem; font-weight: 600; line-height: 1.3; margin: -.1rem 0 .3rem;
          padding: .2rem .4rem; border-radius: 4px; background: #fef3c7; color: #92400e;
          border: 1px solid #fde68a; }
.dep-pct .inline { margin-left: .4rem; }

/* Task koji drzi covek koga vise nema. Namerno TEKST, ne boja: onaj kome je
   ovo najpotrebnije moze biti daltonista, i crveno ime mu je isto sto i crno. */
.otisao { font-size: .68rem; font-weight: 600; padding: 0 .3rem; border-radius: 3px;
          background: #f1f5f9; color: #475569; border: 1px solid #cbd5e1; white-space: nowrap; }

/* ---------- tabela jobova sa svojstvima ---------- */
.tbl-wrap { overflow: auto; max-height: calc(100vh - 190px); border: 1px solid var(--line);
            border-radius: 10px; background: var(--panel); }
.tbl { border-collapse: separate; border-spacing: 0; width: 100%; font-size: .82rem; }
.tbl th { position: sticky; top: 0; z-index: 2; background: var(--panel); text-align: left;
          padding: .45rem .6rem; border-bottom: 1px solid var(--line); cursor: pointer;
          white-space: nowrap; font-weight: 600; }
.tbl td { padding: .35rem .6rem; border-bottom: 1px solid var(--line); }
.tbl th.num, .tbl td.num { text-align: right; font-variant-numeric: tabular-nums; }
/* Ime joba ostaje na ekranu dok se ide udesno: bez njega red ni o cemu ne govori. */
.tbl th.prva, .tbl td.prva { position: sticky; left: 0; background: var(--panel); z-index: 1;
                             border-right: 1px solid var(--line); }
.tbl th.prva { z-index: 3; }
.tbl tr:hover td { background: var(--hover, #f8fafc); }
.tbl td.celija { cursor: text; }
.tbl td.celija:empty::after { content: '·'; color: #cbd5e1; }
.tbl .inp-sm { padding: .15rem .3rem; width: 100%; box-sizing: border-box; }
/* Boja OJACAVA tekst, nikad ga ne zamenjuje: ko boju vidi, vidi je pre teksta;
   ko je ne vidi, i dalje procita sta pise. */
.otisao { background: #fff1f2; color: #9f1239; border-color: #fecdd3; }
.samo-moje { color: #94a3b8; }
.kol-lista { display: flex; flex-direction: column; gap: .3rem; margin: .4rem 0; }
.kol-red { display: flex; align-items: center; gap: .5rem; padding: .3rem .5rem;
           border: 1px solid var(--line); border-radius: 6px; }
.kol-moj, .kol-svi { font-size: .68rem; padding: 0 .3rem; border-radius: 3px;
                     border: 1px solid var(--line); color: #475569; background: #f1f5f9; }
.kol-nova { display: flex; gap: .4rem; align-items: center; flex-wrap: wrap; }
.kol-nova input:not([type=checkbox]) { flex: 1 1 auto; min-width: 8rem; }
.kol-nova #kol-key { flex: 0 0 7rem; min-width: 7rem; }
.tbl-filter { min-width: 15rem; }
.tbl-poruka { margin: .1rem 0 .4rem; min-height: 1rem; }
.hint-inline { font-size: .78rem; color: #92400e; background: #fef3c7;
               border: 1px solid #fde68a; border-radius: 4px; padding: .1rem .4rem; }
.bu-chip { font-size: .68rem; font-weight: 600; padding: 0 .3rem; border-radius: 3px;
           background: #eef2ff; color: #3730a3; border: 1px solid #c7d2fe; }
.uloga-neaktivna { text-decoration: line-through; opacity: .7; }

/* biranje osobe (owner/manager na jobu) */
.osoba { position: relative; }
.osoba-res { position: absolute; z-index: 20; left: 0; right: 0; top: 100%;
  background: var(--panel); border: 1px solid var(--line); border-radius: 8px;
  box-shadow: var(--shadow); max-height: 210px; overflow: auto; padding: .2rem; }
.osoba-res button { display: block; width: 100%; text-align: left; border: none;
  background: none; padding: .3rem .5rem; border-radius: 6px; cursor: pointer; font: inherit; }
.osoba-res button:hover { background: var(--col-bg); }

/* ---------- razgovor na tasku ---------- */
.razgovor { border-top: 1px solid var(--line); padding-top: .7rem; margin-top: .3rem; }
.kom-lista { display: flex; flex-direction: column; gap: .45rem; max-height: 260px;
  overflow: auto; margin: .4rem 0; }
.kom { border: 1px solid var(--line); border-radius: 8px; padding: .4rem .55rem; background: var(--panel); }
.kom.odgovor { margin-left: 1.6rem; }
.kom.licni { border-style: dashed; background: var(--col-bg); }
.kom-glava { display: flex; align-items: baseline; gap: .4rem; font-size: .78rem; }
.kom-glava b { font-size: .82rem; }
.kom-telo { font-size: .86rem; white-space: pre-wrap; word-break: break-word; margin-top: .15rem; }
.kom-telo .pomen { font-weight: 600; color: var(--primary); }
.kom-akt { display: flex; gap: .5rem; margin-top: .2rem; }
.kom-akt button { border: none; background: none; padding: 0; font: inherit; font-size: .74rem;
  color: var(--muted); cursor: pointer; text-decoration: underline; }
.kom-nov textarea { width: 100%; }
.kom-alat { display: flex; align-items: center; gap: .5rem; margin-top: .35rem; }
.kom-prazno { font-size: .82rem; color: var(--muted); }
.kom-znak { font-size: .68rem; padding: 0 .3rem; border-radius: 3px;
  border: 1px solid var(--line); color: var(--muted); }
.kom.ceka { border-left: 3px solid #f59e0b; }
.kom-ceka { font-size: .68rem; padding: 0 .3rem; border-radius: 3px;
  background: #fef3c7; color: #92400e; border: 1px solid #fde68a; }
.kom-gotovo { font-size: .68rem; padding: 0 .3rem; border-radius: 3px;
  background: #dcfce7; color: #166534; border: 1px solid #bbf7d0; }
.kom-akt button.jako { color: var(--primary); font-weight: 600; }
.pit-chip { font-size: .7rem; padding: 0 .35rem; border-radius: 4px;
  background: #fef3c7; color: #92400e; border: 1px solid #fde68a; }
.pit-chip.meni { background: #fee2e2; color: #991b1b; border-color: #fecaca; font-weight: 600; }
.osoba-res button.sel { background: var(--primary); color: #fff; }
.osoba-res button.sel .muted { color: #e0e7ff; }
textarea.licna { border-style: dashed; background: var(--col-bg); }
.note-chip { cursor: help; }
.note-chip.licna { filter: grayscale(.4); }
.kol-ugasive { display: flex; gap: .9rem; flex-wrap: wrap; margin: .3rem 0 .2rem; }
