/* Evidencija rada – dodaci na zajednički app.css (preuzet iz HR Managera). */
.muted { color: var(--muted); }
.small { font-size: 12px; }
.nowrap { white-space: nowrap; }
.modal.md { max-width: 640px; }
.page-wide { max-width: 1400px; }
.ro-banner { display: flex; align-items: center; gap: 8px; background: #fff6dd; color: #8a5d00; border-bottom: 1px solid #f1dfa8; padding: 8px 32px; font-size: 13px; }

/* Oznake tipova */
.tag { display: inline-flex; align-items: center; padding: 2px 9px; border-radius: 999px; font-size: 12px; font-weight: 500; white-space: nowrap; }
.t-blue { background: var(--primary-50); color: var(--primary); }
.t-green { background: var(--green-bg); color: #17654a; }
.t-teal { background: #dcf3f6; color: #116b78; }
.t-amber { background: #fdf3d6; color: #8a5d00; }
.t-violet { background: #ebe7fb; color: #4b3aa6; }
.t-red { background: var(--red-bg); color: #a12f2f; }
.t-rose { background: #fde7ef; color: #a3305b; }
.t-gray { background: var(--surface-3); color: var(--text-2); }

/* Mjesečna navigacija */
.month-nav { display: flex; align-items: center; gap: 6px; }
.month-label { min-width: 150px; text-align: center; font-weight: 600; font-size: 15px; }
.range { display: flex; align-items: center; gap: 6px; }
.range .date-field { width: 150px; }

/* Statistika */
.p-mix .mix { display: flex; flex-wrap: wrap; gap: 8px 14px; margin-top: 10px; }
.p-mix .mix > span { display: inline-flex; align-items: center; gap: 6px; }

/* Tablica prisutnosti */
.p-tbl td { padding: 7px 10px; }
.p-tbl .p-date { white-space: nowrap; vertical-align: top; background: #fff; }
.p-tbl .dow, .s-tbl .dow { color: var(--muted); font-size: 12px; margin-left: 2px; }
.p-tbl .hol-name { font-size: 11px; color: #a12f2f; white-space: normal; max-width: 120px; line-height: 1.25; margin-top: 2px; }
.p-tbl tr.we td, .p-tbl tr.we .p-date { background: #f6f7fa; }
.p-tbl tr.hol td, .p-tbl tr.hol .p-date { background: #fdf1f1; }
.p-tbl tr.today .p-date { box-shadow: inset 3px 0 0 var(--primary); }
.p-tbl tr.empty-day td { color: var(--muted); }
.p-tbl .muted-cell { color: var(--text-2); font-size: 13px; }
.p-tbl .note-cell { color: var(--text-2); font-size: 13px; max-width: 360px; }
.quick { display: inline-flex; gap: 6px; flex-wrap: wrap; }
.chip-btn { border: 1px dashed currentColor; border-radius: 999px; padding: 2px 10px 2px 6px; font-size: 12px; cursor: pointer; display: inline-flex; align-items: center; gap: 3px; opacity: .55; transition: opacity .15s; }
.chip-btn svg.lucide { width: 13px; height: 13px; }
tr:hover .chip-btn { opacity: .85; }
.chip-btn:hover { opacity: 1 !important; border-style: solid; }

/* Obrazac */
.tip-pick { display: flex; flex-wrap: wrap; gap: 6px; }
.tip-pick .tp input { position: absolute; opacity: 0; pointer-events: none; }
.tip-pick .tp span { display: inline-block; padding: 6px 12px; border-radius: 999px; cursor: pointer; border: 1.5px solid transparent; font-weight: 500; font-size: 13px; opacity: .7; }
.tip-pick .tp { background: none !important; }
.tip-pick .tp.t-blue span { background: var(--primary-50); }
.tip-pick .tp.t-green span { background: var(--green-bg); }
.tip-pick .tp.t-teal span { background: #dcf3f6; }
.tip-pick .tp.t-amber span { background: #fdf3d6; }
.tip-pick .tp.t-violet span { background: #ebe7fb; }
.tip-pick .tp.t-red span { background: var(--red-bg); }
.tip-pick .tp.t-gray span { background: var(--surface-3); }
.tip-pick .tp input:checked + span { border-color: currentColor; opacity: 1; box-shadow: 0 1px 4px rgba(22, 36, 58, .15); }
.tip-pick .tp input:focus-visible + span { outline: 2px solid var(--primary); outline-offset: 2px; }
.time-row { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 0 16px; }
.s-times { grid-template-columns: 1.4fr 1.4fr 1fr; }
.time-in { font-variant-numeric: tabular-nums; }
.with-btn { display: flex; gap: 6px; }
.with-btn .input { width: 90px; flex: none; }
.with-btn .btn { white-space: nowrap; }
.calc { height: 38px; display: flex; align-items: center; padding: 0 12px; background: var(--surface-2); border: 1px solid var(--border); border-radius: 9px; font-weight: 600; font-variant-numeric: tabular-nums; }
.calc.big { font-size: 16px; color: var(--primary); }
.s-form textarea[name=opisPosla] { min-height: 170px; resize: vertical; font-family: inherit; line-height: 1.45; }

/* Odabir komitenta */
.kom-ac { position: relative; }
.kom-ac .input { padding-right: 120px; }
.kom-ac .ac-oib { position: absolute; right: 12px; top: 50%; transform: translateY(-50%); color: var(--muted); font-size: 12px; pointer-events: none; font-variant-numeric: tabular-nums; }
.kom-ac .ac-x { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); border: 0; background: var(--surface-2); border-radius: 6px; width: 24px; height: 24px; display: grid; place-items: center; cursor: pointer; color: var(--muted); z-index: 1; }
.kom-ac:has(.ac-x:not([hidden])) .ac-oib { right: 38px; }
.kom-ac .ac-item small { color: var(--muted); white-space: nowrap; }
.kom-ac .ac-item.on { background: var(--primary-50); }
.kom-ac .ac-item.muted { cursor: default; }

/* Popis sati */
.s-tbl tr.day-head td { background: var(--surface-2); padding: 7px 10px; font-size: 13px; border-top: 1px solid var(--border); }
.s-tbl .day-sum { float: right; font-weight: 600; color: var(--primary); }
.s-tbl td { vertical-align: top; }
.s-tbl .opis { white-space: pre-wrap; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; font-size: 13px; line-height: 1.4; }
.s-tbl .napomena { margin-top: 4px; font-size: 12px; color: var(--muted); display: flex; gap: 5px; align-items: flex-start; }
.s-tbl .napomena svg.lucide { width: 13px; height: 13px; margin-top: 2px; }
.doc-count { display: inline-flex; align-items: center; gap: 2px; color: var(--primary); font-size: 12px; font-weight: 600; }
.doc-count svg.lucide { width: 14px; height: 14px; }

/* Dokumenti */
.s-drop { margin-bottom: 12px; }
.doc-row { display: flex; align-items: center; gap: 10px; padding: 9px 4px; border-bottom: 1px solid var(--border); }
.doc-row:last-child { border-bottom: 0; }
.doc-row .doc-ico { width: 34px; height: 34px; border-radius: 9px; background: var(--primary-50); color: var(--primary); display: grid; place-items: center; flex: none; }
.doc-row.queued .doc-ico { background: var(--surface-3); color: var(--muted); }
.doc-row .doc-main { flex: 1; min-width: 0; }
.doc-row .doc-main a { font-weight: 500; }

/* Izvještaj */
.r-filters { margin-bottom: 16px; }
.r-preview { background: #d9dee6; border-radius: var(--radius); overflow: hidden; border: 1px solid var(--border); }
.r-preview iframe { width: 100%; height: calc(100vh - 290px); min-height: 560px; border: 0; display: block; }

body.readonly [data-new], body.readonly [data-fill] { display: none; }

@media (max-width: 860px) {
  .time-row, .s-times { grid-template-columns: 1fr 1fr; }
  .range .date-field { width: 130px; }
  .ro-banner { padding: 8px 16px; }
}

/* Komitenti */
.k-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0 14px; }
.k-grid .span-2 { grid-column: span 2; }
.k-grid .span-3 { grid-column: span 3; }
.k-info { display: flex; gap: 8px; align-items: center; background: var(--surface-2); border: 1px solid var(--border); border-radius: 9px; padding: 8px 12px; margin-bottom: 14px; font-size: 13px; color: var(--text-2); }
.k-tbl td { vertical-align: top; }
.kom-ac .ac-new { color: var(--primary); font-weight: 500; justify-content: flex-start; gap: 6px; border-top: 1px solid var(--border); position: sticky; bottom: 0; background: var(--surface); }
.kom-ac .ac-new:hover { background: var(--primary-50); }
@media (max-width: 860px) { .k-grid { grid-template-columns: 1fr 1fr; } .k-grid .span-3 { grid-column: span 2; } }
