:root {
  --bg: #f1f4f8;
  --surface: #ffffff;
  --surface-2: #f4f6fa;
  --surface-3: #e9eef5;
  --border: #dfe5ee;
  --border-strong: #c5cfdc;
  --text: #16243a;
  --text-2: #4a5a72;
  --muted: #74839a;
  --primary: #2a64ad;
  --primary-600: #20518f;
  --primary-50: #e8f0fa;
  --primary-100: #d3e2f5;
  --accent: #3ba3c9;
  --green: #1f9d6b;
  --green-bg: #dcf5ea;
  --red: #d64545;
  --red-bg: #fde6e6;
  --amber: #e3a008;
  --sidebar: #1a2740;
  --sidebar-2: #23344f;
  --sidebar-text: #b9c6da;
  /* Kategorije: Š = škola, F = fakultet, O = ostali */
  --cat-S: #e6a817; --cat-S-bg: #fdf3d6; --cat-S-text: #8a5d00;
  --cat-F: #2f9e74; --cat-F-bg: #daf3e8; --cat-F-text: #17654a;
  --cat-O: #7a68d6; --cat-O-bg: #ebe7fb; --cat-O-text: #4b3aa6;
  --radius: 12px;
  --shadow: 0 1px 2px rgba(22, 36, 58, .05), 0 2px 6px rgba(22, 36, 58, .05);
  --shadow-lg: 0 24px 48px -16px rgba(22, 36, 58, .35);
  --sans: Inter, "Segoe UI", system-ui, -apple-system, sans-serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body { font-family: var(--sans); font-size: 14px; color: var(--text); background: var(--bg); -webkit-font-smoothing: antialiased; }
a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }
button { font: inherit; }
[hidden] { display: none !important; }
svg.lucide { width: 16px; height: 16px; stroke-width: 2; flex-shrink: 0; }
::selection { background: var(--primary-100); }

/* ---------- Layout ---------- */
.app { display: flex; min-height: 100vh; }
.sidebar {
  width: 248px; flex-shrink: 0; color: var(--sidebar-text);
  background: linear-gradient(180deg, #1a2740 0%, #1d2f4c 60%, #213a5c 100%);
  display: flex; flex-direction: column; position: sticky; top: 0; height: 100vh;
}
.brand { display: flex; gap: 12px; align-items: center; padding: 20px 18px; border-bottom: 1px solid rgba(255,255,255,.07); }
.brand-logo { width: 44px; height: 44px; display: block; flex-shrink: 0; border-radius: 10px; background: #fff; padding: 4px; object-fit: contain; }
.brand-name { color: #fff; font-weight: 700; font-size: 15px; line-height: 1.2; }
.brand-sub { font-size: 12px; color: #8fa3c0; margin-top: 2px; }
.nav { padding: 14px 10px; display: flex; flex-direction: column; gap: 2px; flex: 1; overflow-y: auto; }
.nav-label { font-size: 10.5px; text-transform: uppercase; letter-spacing: .08em; color: #6f84a3; padding: 14px 12px 6px; font-weight: 600; }
.nav a, .nav-bottom a, .nav-bottom button {
  display: flex; align-items: center; gap: 11px; padding: 9px 12px; border-radius: 9px; color: var(--sidebar-text);
  font-weight: 500; text-decoration: none; background: none; border: 0; cursor: pointer; width: 100%; text-align: left;
  transition: background .15s, color .15s;
}
.nav a:hover, .nav-bottom a:hover, .nav-bottom button:hover { background: rgba(255,255,255,.07); color: #fff; }
.nav a.active { background: linear-gradient(90deg, var(--primary), #3576c4); color: #fff; box-shadow: 0 6px 16px -8px rgba(42,100,173,.9); }
.nav-bottom { padding: 10px; border-top: 1px solid rgba(255,255,255,.07); }
.user-chip { display: flex; align-items: center; gap: 10px; padding: 8px 12px 10px; }
.avatar { width: 32px; height: 32px; border-radius: 50%; background: linear-gradient(135deg, #3ba3c9, #2a64ad); color: #fff; display: grid; place-items: center; font-weight: 600; font-size: 12.5px; flex-shrink: 0; }
.user-name { color: #fff; font-weight: 500; font-size: 13px; }
.user-role { font-size: 11.5px; color: #8fa3c0; }
.main { flex: 1; min-width: 0; }
.page { max-width: 1240px; margin: 0 auto; padding: 28px 32px 48px; }
.page.wide { max-width: none; }
.mobile-bar { display: none; }

.page-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; margin-bottom: 22px; flex-wrap: wrap; }
.page-title { font-size: 26px; font-weight: 700; margin: 0; letter-spacing: -.015em; }
.page-sub { color: var(--text-2); margin-top: 4px; font-size: 14.5px; }
.head-actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.crumb { font-size: 13px; color: var(--muted); margin-bottom: 6px; display: flex; align-items: center; gap: 6px; }

/* ---------- Gumbi i polja ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 36px; padding: 0 14px;
  border-radius: 9px; border: 1px solid var(--border); background: var(--surface); color: var(--text);
  font-weight: 500; cursor: pointer; white-space: nowrap; text-decoration: none; transition: background .15s, border-color .15s, box-shadow .15s;
}
.btn:hover { background: var(--surface-2); border-color: var(--border-strong); text-decoration: none; }
.btn:disabled { opacity: .55; cursor: default; }
.btn-primary { background: var(--primary); border-color: var(--primary); color: #fff; font-weight: 600; box-shadow: 0 4px 12px -6px rgba(42,100,173,.8); }
.btn-primary:hover { background: var(--primary-600); border-color: var(--primary-600); }
.btn-danger { background: var(--red); border-color: var(--red); color: #fff; font-weight: 600; }
.btn-danger:hover { background: #b93636; }
.btn-ghost { border-color: transparent; background: transparent; }
.btn-sm { height: 30px; padding: 0 10px; font-size: 13px; }
.icon-btn {
  display: inline-grid; place-items: center; width: 34px; height: 34px; border-radius: 9px; border: 1px solid var(--border);
  background: var(--surface); color: var(--text-2); cursor: pointer; flex-shrink: 0;
}
.icon-btn:hover { background: var(--surface-2); color: var(--text); }
.icon-btn.plain { border-color: transparent; background: transparent; }
.icon-btn.sm { width: 28px; height: 28px; border-radius: 7px; }
.icon-btn.danger { color: var(--red); }

.input, .select, textarea.input {
  width: 100%; height: 38px; padding: 0 12px; border: 1px solid var(--border); border-radius: 9px; background: var(--surface);
  color: var(--text); font: inherit; outline: none; transition: border-color .15s, box-shadow .15s;
}
textarea.input { height: auto; min-height: 72px; padding: 10px 12px; resize: vertical; line-height: 1.45; }
.input:focus, .select:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(42, 100, 173, .15); }
.input[readonly] { background: var(--surface-2); color: var(--muted); }
.input.ok { border-color: var(--green); }
.input.bad { border-color: var(--red); }
.select { appearance: none; padding-right: 32px; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='none' stroke='%2374839a' stroke-width='2' viewBox='0 0 24 24'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 10px center; }
.search { position: relative; }
.search > svg.lucide { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--muted); }
.search .input { padding-left: 36px; }
.search:has(.search-clear) .input { padding-right: 34px; }
.search-clear { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); width: 24px; height: 24px; display: grid; place-items: center; border: 0; border-radius: 6px; background: transparent; color: var(--muted); cursor: pointer; padding: 0; }
.search-clear:hover { background: var(--border); color: var(--text); }
.search:has(.input:placeholder-shown) .search-clear { display: none; }
label.lbl, .lbl { display: block; font-weight: 500; margin-bottom: 6px; font-size: 13px; color: var(--text-2); }
.lbl .opt { color: var(--muted); font-weight: 400; }
.hint { font-size: 12px; color: var(--muted); margin-top: 5px; }
.field { margin-bottom: 14px; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 16px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0 16px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0 16px; }
.span-2 { grid-column: span 2; }
.date-field { display: flex; gap: 6px; position: relative; }
.dp { position: fixed; z-index: 300; background: var(--surface); border: 1px solid var(--border); border-radius: 12px; box-shadow: var(--shadow-lg); padding: 10px; width: 276px; }
.dp-head { display: flex; align-items: center; gap: 4px; margin-bottom: 8px; }
.dp-head select { flex: 1; min-width: 0; height: 30px; border: 1px solid var(--border); border-radius: 7px; background: var(--surface); color: var(--text); font: inherit; font-size: 13px; font-weight: 600; padding: 0 4px; cursor: pointer; }
.dp-head select[data-year] { flex: 0 0 72px; }
.dp-nav { width: 30px; height: 30px; flex-shrink: 0; display: grid; place-items: center; border: 0; border-radius: 7px; background: none; color: var(--text-2); cursor: pointer; }
.dp-nav:hover { background: var(--surface-2); color: var(--text); }
.dp-nav svg { width: 16px; height: 16px; }
.dp-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 2px; }
.dp-dow { text-align: center; font-size: 11px; font-weight: 600; color: var(--muted); padding: 4px 0; }
.dp-dow.we { color: #b0bccb; }
.dp-day { height: 32px; border: 0; border-radius: 7px; background: none; font: inherit; font-size: 13px; color: var(--text); cursor: pointer; }
.dp-day:hover { background: var(--primary-50); }
.dp-day.we { color: var(--muted); }
.dp-day.hol { color: var(--red); }
.dp-day.out { opacity: .35; }
.dp-day.today { box-shadow: inset 0 0 0 1.5px var(--primary); font-weight: 600; }
.dp-day.sel, .dp-day.sel:hover { background: var(--primary); color: #fff; font-weight: 600; }
.dp-foot { display: flex; justify-content: space-between; margin-top: 8px; padding-top: 8px; border-top: 1px solid var(--border); }
.check { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; user-select: none; }
.check input { width: 16px; height: 16px; accent-color: var(--primary); }
.form-section { font-size: 12px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); font-weight: 600; margin: 8px 0 12px; display: flex; align-items: center; gap: 10px; }
.form-section::after { content: ""; flex: 1; height: 1px; background: var(--border); }

/* ---------- Kartice ---------- */
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); }
.card-pad { padding: 20px; }
.card-title { font-size: 16px; font-weight: 600; margin: 0; display: flex; align-items: center; gap: 8px; }
.card-title svg.lucide { color: var(--primary); }
.card-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 14px; gap: 10px; flex-wrap: wrap; }

.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-bottom: 22px; }
.stat { padding: 18px; display: flex; justify-content: space-between; align-items: flex-start; position: relative; overflow: hidden; }
.stat-link { color: inherit; text-decoration: none; transition: box-shadow .18s, transform .18s, border-color .18s; }
.stat-link:hover { text-decoration: none; transform: translateY(-2px); border-color: var(--border-strong); box-shadow: 0 12px 26px -10px rgba(22, 36, 58, .28); }
.stat-link:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }
.stat-label { color: var(--text-2); font-size: 13px; }
.stat-value { font-size: 28px; font-weight: 700; margin-top: 6px; letter-spacing: -.02em; }
.stat-foot { font-size: 12px; color: var(--muted); margin-top: 6px; display: flex; gap: 8px; flex-wrap: wrap; }
.stat-icon { width: 42px; height: 42px; border-radius: 11px; display: grid; place-items: center; color: #fff; }
.stat-icon svg.lucide { width: 20px; height: 20px; }

.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-bottom: 20px; }
.list-item { display: flex; justify-content: space-between; align-items: center; gap: 12px; background: var(--surface-2); border-radius: 9px; padding: 10px 12px; margin-bottom: 8px; cursor: pointer; border: 1px solid transparent; }
.list-item:hover { background: var(--primary-50); border-color: var(--primary-100); }
.li-title { font-weight: 500; display: flex; align-items: center; gap: 8px; }
.li-sub { font-size: 12px; color: var(--muted); margin-top: 2px; }
.empty { color: var(--muted); text-align: center; padding: 28px 0; }

/* ---------- Oznake ---------- */
.badge { display: inline-flex; align-items: center; gap: 4px; padding: 2px 9px; border-radius: 999px; font-size: 12px; font-weight: 500; white-space: nowrap; background: var(--surface-3); color: var(--text-2); }
.badge.blue { background: var(--primary-50); color: var(--primary); }
.badge.green { background: var(--green-bg); color: #17654a; }
.badge.red { background: var(--red-bg); color: #a12f2f; }
.cat { display: inline-grid; place-items: center; min-width: 22px; height: 22px; padding: 0 5px; border-radius: 6px; font-size: 11.5px; font-weight: 700; flex-shrink: 0; }
.cat-S { background: var(--cat-S-bg); color: var(--cat-S-text); }
.cat-F { background: var(--cat-F-bg); color: var(--cat-F-text); }
.cat-O { background: var(--cat-O-bg); color: var(--cat-O-text); }
.lvl { font-size: 11.5px; font-weight: 600; padding: 2px 8px; border-radius: 6px; white-space: nowrap; }
.lvl-Promatrao { background: #eef1f6; color: #55657d; }
.lvl-Asistirao { background: #e3effc; color: #2a64ad; }
.lvl-Samostalno { background: var(--green-bg); color: #17654a; }

/* ---------- Tablice ---------- */
.table-wrap { overflow-x: auto; }
table.tbl { width: 100%; border-collapse: collapse; }
.tbl th { text-align: left; font-weight: 600; color: var(--muted); font-size: 11.5px; text-transform: uppercase; letter-spacing: .04em; padding: 10px 10px; border-bottom: 1px solid var(--border); white-space: nowrap; background: var(--surface-2); }
.tbl td { padding: 10px; border-bottom: 1px solid var(--border); vertical-align: middle; }
.tbl tbody tr:hover { background: #f7f9fc; }
.tbl tr.clickable { cursor: pointer; }
.tbl .r { text-align: right; }
.tbl .c { text-align: center; }
.tbl tr:last-child td { border-bottom: 0; }
.sub { font-size: 12px; color: var(--muted); }
.name-cell { display: flex; align-items: center; gap: 10px; }
.name-cell .avatar { width: 34px; height: 34px; }
.progress { width: 90px; height: 6px; border-radius: 999px; background: var(--surface-3); overflow: hidden; display: inline-block; vertical-align: middle; }
.progress > span { display: block; height: 100%; background: linear-gradient(90deg, var(--accent), var(--primary)); border-radius: 999px; }

/* ---------- Alatna traka ---------- */
.toolbar { display: flex; gap: 10px; align-items: center; margin-bottom: 16px; flex-wrap: wrap; }
.toolbar .search { flex: 1; min-width: 220px; }
.toolbar .select { width: auto; min-width: 150px; }
.seg { display: inline-flex; border: 1px solid var(--border); border-radius: 9px; overflow: hidden; background: var(--surface); }
.seg button { border: 0; background: transparent; padding: 0 13px; height: 34px; cursor: pointer; display: inline-flex; align-items: center; gap: 6px; color: var(--text-2); font-weight: 500; }
.seg button + button { border-left: 1px solid var(--border); }
.seg button.on { background: var(--primary); color: #fff; }
.seg button:not(.on):hover { background: var(--surface-2); }
.menu { position: absolute; z-index: 160; background: var(--surface); border: 1px solid var(--border); border-radius: 10px; box-shadow: var(--shadow-lg); padding: 4px; min-width: 180px; }
.menu button { display: flex; width: 100%; gap: 8px; align-items: center; border: 0; background: none; padding: 8px 10px; border-radius: 7px; cursor: pointer; text-align: left; color: var(--text); }
.menu button:hover { background: var(--surface-2); }
.menu button.danger { color: var(--red); }

/* ---------- Tabovi ---------- */
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--border); margin-bottom: 18px; overflow-x: auto; overflow-y: hidden; scrollbar-width: thin; }
.tabs button { border: 0; background: none; padding: 10px 14px; cursor: pointer; color: var(--text-2); font-weight: 500; border-bottom: 2px solid transparent; margin-bottom: -1px; display: inline-flex; gap: 7px; align-items: center; white-space: nowrap; }
.tabs button:hover { color: var(--text); }
.tabs button.on { color: var(--primary); border-bottom-color: var(--primary); }
.tabs .count { background: var(--surface-3); color: var(--text-2); border-radius: 999px; font-size: 11px; padding: 1px 7px; }
.tabs button.on .count { background: var(--primary-50); color: var(--primary); }

/* ---------- Karton praktikanta ---------- */
.profile { display: grid; grid-template-columns: 320px 1fr; gap: 20px; align-items: start; }
.profile-card { padding: 22px; }
.profile-top { display: flex; gap: 14px; align-items: center; margin-bottom: 16px; }
.profile-top .avatar { width: 56px; height: 56px; font-size: 19px; }
.profile-name { font-size: 19px; font-weight: 700; }
.kv { display: grid; grid-template-columns: 120px 1fr; gap: 8px 12px; font-size: 13.5px; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; font-weight: 500; word-break: break-word; }
.module { border: 1px solid var(--border); border-radius: 11px; margin-bottom: 10px; overflow: hidden; background: var(--surface); }
.module-head { display: flex; align-items: center; gap: 12px; padding: 12px 14px; cursor: pointer; background: var(--surface-2); user-select: none; }
.module-head:hover { background: var(--surface-3); }
.module-code { width: 30px; height: 30px; border-radius: 8px; background: var(--primary); color: #fff; font-weight: 700; display: grid; place-items: center; flex-shrink: 0; font-size: 13px; }
.module-name { font-weight: 600; flex: 1; }
.module-body { padding: 4px 0; }
.module.closed .module-body { display: none; }
.module .chev { transition: transform .15s; color: var(--muted); }
.module.closed .chev { transform: rotate(-90deg); }
.act-row { display: grid; grid-template-columns: 24px 1fr auto; gap: 10px; align-items: center; padding: 8px 14px; border-top: 1px solid #eef2f7; }
.act-row:first-child { border-top: 0; }
.act-row:hover { background: #f9fbfd; }
.act-name { line-height: 1.4; }
.act-meta { font-size: 12px; color: var(--muted); margin-top: 2px; }
.act-state { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; justify-content: flex-end; }
.act-done { color: var(--green); }
.act-todo { color: #c3ccd9; }
.timeline { position: relative; padding-left: 22px; }
.timeline::before { content: ""; position: absolute; left: 7px; top: 6px; bottom: 6px; width: 2px; background: var(--border); }
.tl-item { position: relative; padding: 0 0 16px; }
.tl-item::before { content: ""; position: absolute; left: -20px; top: 5px; width: 10px; height: 10px; border-radius: 50%; background: var(--primary); box-shadow: 0 0 0 3px var(--primary-50); }
.tl-item.now::before { background: var(--green); box-shadow: 0 0 0 3px var(--green-bg); }
.tl-item.future::before { background: var(--border-strong); box-shadow: 0 0 0 3px var(--surface-2); }
.tl-title { font-weight: 600; }
.tl-sub { font-size: 12.5px; color: var(--muted); margin-top: 2px; }

.doc-pill { display: flex; align-items: center; justify-content: space-between; gap: 8px; background: var(--surface-2); border: 1px solid var(--border); border-radius: 9px; padding: 9px 12px; margin-bottom: 6px; }
.doc-pill a { display: inline-flex; gap: 8px; align-items: center; font-weight: 500; }
.doc-pill .sub { margin-left: 4px; }
.drop-zone { border: 1.5px dashed var(--border-strong); border-radius: 11px; padding: 18px; text-align: center; color: var(--muted); cursor: pointer; display: flex; align-items: center; justify-content: center; gap: 8px; transition: all .15s; }
.drop-zone:hover, .drop-zone.over { border-color: var(--primary); color: var(--primary); background: var(--primary-50); }

/* ---------- Skeniranje osobne ---------- */
.scan-box { border: 1px solid var(--primary-100); background: linear-gradient(135deg, #f3f8fe, #eaf2fb); border-radius: 12px; padding: 14px 16px; margin-bottom: 16px; }
.scan-head { display: flex; gap: 12px; align-items: center; justify-content: space-between; flex-wrap: wrap; }
.scan-title { font-weight: 600; display: flex; gap: 8px; align-items: center; color: var(--primary-600); }
.scan-actions { display: flex; gap: 6px; flex-wrap: wrap; }
.scan-status { font-size: 12.5px; color: var(--primary); display: flex; align-items: center; gap: 8px; margin-top: 10px; }
.scan-preview { display: flex; gap: 10px; margin-top: 10px; flex-wrap: wrap; }
.scan-preview img { height: 90px; border-radius: 8px; border: 1px solid var(--border); }
.spinner { width: 14px; height: 14px; border: 2px solid var(--primary-100); border-top-color: var(--primary); border-radius: 50%; animation: spin .8s linear infinite; display: inline-block; }
@keyframes spin { to { transform: rotate(360deg); } }
.camera { position: relative; background: #000; border-radius: 12px; overflow: hidden; }
.camera video { width: 100%; display: block; }
.camera .frame { position: absolute; inset: 12% 8%; border: 2px dashed rgba(255,255,255,.8); border-radius: 12px; pointer-events: none; }

/* ---------- Modal ---------- */
.modal-backdrop { position: fixed; inset: 0; background: rgba(16, 27, 46, .55); backdrop-filter: blur(2px); display: flex; align-items: flex-start; justify-content: center; z-index: 100; padding: 40px 16px; overflow-y: auto; }
.modal { background: #fbfcfe; border-radius: 16px; box-shadow: var(--shadow-lg); width: 100%; max-width: 520px; padding: 22px 24px; position: relative; animation: pop .14s ease-out; }
.modal.lg { max-width: 760px; }
.modal.xl { max-width: 980px; }
@keyframes pop { from { transform: translateY(8px) scale(.98); opacity: 0; } }
.modal-title { font-size: 19px; font-weight: 700; margin: 0 0 18px; padding-right: 30px; display: flex; align-items: center; gap: 10px; }
.modal-close { position: absolute; top: 14px; right: 14px; }
.modal-foot { display: flex; justify-content: flex-end; gap: 8px; margin-top: 18px; flex-wrap: wrap; }
.modal-foot .left { margin-right: auto; display: flex; gap: 8px; flex-wrap: wrap; }
.form-error { color: #a12f2f; background: var(--red-bg); border-radius: 9px; padding: 9px 12px; margin-top: 12px; font-size: 13px; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip-x { display: inline-flex; align-items: center; gap: 6px; background: var(--primary-50); color: var(--primary-600); border-radius: 999px; padding: 4px 6px 4px 11px; font-size: 12.5px; font-weight: 500; }
.chip-x button { border: 0; background: rgba(42,100,173,.12); color: inherit; width: 18px; height: 18px; border-radius: 50%; display: grid; place-items: center; cursor: pointer; padding: 0; }
.chip-x button svg.lucide { width: 12px; height: 12px; }
.ac { position: relative; }
.ac-list { position: absolute; left: 0; right: 0; top: 100%; margin-top: 4px; background: var(--surface); border: 1px solid var(--border); border-radius: 9px; box-shadow: var(--shadow-lg); z-index: 20; max-height: 260px; overflow-y: auto; }
.ac-item { padding: 8px 12px; cursor: pointer; display: flex; justify-content: space-between; gap: 10px; }
.ac-item:hover, .ac-item.hl { background: var(--primary-50); }
.pick-list { max-height: 420px; overflow-y: auto; border: 1px solid var(--border); border-radius: 11px; background: var(--surface); }
.pick-list .module-head { position: sticky; top: 0; z-index: 1; padding: 9px 12px; }
.pick-row { display: flex; gap: 10px; padding: 7px 12px; border-top: 1px solid #eef2f7; align-items: flex-start; cursor: pointer; }
.pick-row:hover { background: #f7f9fc; }
.pick-row input { margin-top: 2px; }
.pick-row .done { margin-left: auto; }

/* ---------- Toast ---------- */
.toasts { position: fixed; right: 20px; bottom: 20px; z-index: 200; display: flex; flex-direction: column; gap: 8px; }
.toast { background: #16243a; color: #fff; padding: 11px 16px; border-radius: 10px; box-shadow: var(--shadow-lg); max-width: 400px; animation: pop .15s; }
.toast.error { background: var(--red); }
.toast.success { background: #17654a; }

/* ---------- Kalendar rasporeda ---------- */
.cal-toolbar { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-bottom: 12px; }
.cal-title { font-size: 16px; font-weight: 700; min-width: 190px; text-align: center; text-transform: capitalize; }
.legend { display: flex; gap: 14px; font-size: 12.5px; color: var(--text-2); flex-wrap: wrap; align-items: center; }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.legend i { width: 12px; height: 12px; border-radius: 3px; display: inline-block; }
.planner { overflow: auto; height: calc(100vh - 210px); min-height: 420px; position: relative; border-radius: var(--radius); }
.pl-grid { display: grid; position: relative; width: max-content; min-width: 100%; }
.pl-corner, .pl-mhead, .pl-dhead { position: sticky; background: var(--surface); z-index: 6; }
.pl-corner { left: 0; top: 0; z-index: 9; border-right: 1px solid var(--border); border-bottom: 1px solid var(--border); padding: 10px 12px; display: flex; align-items: flex-end; font-size: 11px; color: var(--muted); font-weight: 600; text-transform: uppercase; letter-spacing: .05em; gap: 8px; }
.pl-mhead { top: 0; height: 28px; border-bottom: 1px solid var(--border); border-left: 1px solid var(--border-strong); font-weight: 700; font-size: 12px; color: var(--primary-600); padding: 6px 10px; text-transform: uppercase; letter-spacing: .04em; white-space: nowrap; overflow: hidden; background: #f6f9fd; }
.pl-mhead span { position: sticky; left: 270px; }
.pl-dhead { top: 28px; height: 36px; border-bottom: 1px solid var(--border); border-left: 1px solid #edf1f6; text-align: center; font-size: 10.5px; line-height: 1.3; color: var(--muted); padding-top: 3px; }
.pl-dhead b { display: block; font-size: 12px; color: var(--text); font-weight: 600; }
.pl-grid[data-mode=year] .pl-dhead { padding-top: 10px; }
.pl-grid[data-mode=year] .pl-dhead b { font-size: 9px; letter-spacing: -.4px; font-weight: 500; }
.pl-grid[data-mode=year] .pl-bar { font-size: 10px; padding: 0 3px; }
.pl-dhead.we, .pl-cell.we { background: #f3f5f9; }
.pl-dhead.hol, .pl-cell.hol { background: #fbeeee; }
.pl-dhead.today { background: var(--primary); }
.pl-dhead.today, .pl-dhead.today b { color: #fff; }
.pl-dhead.m1 { border-left-color: var(--border-strong); }
.pl-group { position: sticky; left: 0; z-index: 5; grid-column: 1; background: #e9eff7; border-bottom: 1px solid var(--border); border-right: 1px solid var(--border); padding: 6px 12px; font-weight: 700; font-size: 12px; line-height: 1.3; color: var(--primary-600); text-transform: uppercase; letter-spacing: .03em; cursor: pointer; display: flex; align-items: center; gap: 6px; min-width: 0; overflow: hidden; }
.pl-group .badge { flex-shrink: 0; }
.pl-group-fill { background: #e9eff7; border-bottom: 1px solid var(--border); }
.pl-group svg.lucide { width: 14px; height: 14px; transition: transform .15s; }
.pl-group.closed svg.lucide { transform: rotate(-90deg); }
.pl-dept { position: sticky; left: 0; z-index: 4; grid-column: 1; background: var(--surface); border-right: 1px solid var(--border); border-bottom: 1px solid var(--border-strong); display: grid; grid-template-columns: 1fr 30px; }
.pl-dept-name { padding: 3px 10px; font-size: 12.5px; font-weight: 500; line-height: 1.3; display: flex; align-items: center; border-right: 1px solid #edf1f6; }
.pl-dept-name small { color: var(--muted); margin-right: 5px; font-weight: 600; }
.pl-sub { display: grid; place-items: center; border-bottom: 1px solid #edf1f6; font-weight: 700; font-size: 11px; }
.pl-sub:last-child { border-bottom: 0; }
.pl-sub.S { color: var(--cat-S-text); background: var(--cat-S-bg); }
.pl-sub.F { color: var(--cat-F-text); background: var(--cat-F-bg); }
.pl-sub.O { color: var(--cat-O-text); background: var(--cat-O-bg); }
/* Stupci za vikend/praznik/danas leže ispod redova; redovi su prozirni i crtaju samo linije dana. */
.pl-cell { pointer-events: none; z-index: 0; }
.pl-cell.m1 { box-shadow: inset 1px 0 0 var(--border-strong); }
.pl-cell.today { background: rgba(42,100,173,.09); }
.pl-lane { z-index: 1; cursor: cell; border-bottom: 1px solid #edf1f6; touch-action: none;
  background-image: repeating-linear-gradient(90deg, #edf1f6 0 1px, transparent 1px var(--dw)); }
.pl-lane.last { border-bottom-color: var(--border-strong); }
.pl-lane:hover { background-color: rgba(42,100,173,.04); }
.pl-bar .rz { position: absolute; right: 0; top: 0; bottom: 0; width: 7px; cursor: ew-resize; }
.pl-bar .rz:hover { background: rgba(0,0,0,.08); }
.pl-bar { touch-action: none; user-select: none; }
.pl-bar.dim { opacity: .3; }
.pl-bar.hit { box-shadow: 0 0 0 2px var(--primary), 0 2px 6px rgba(22,36,58,.25); z-index: 3; }
.pl-bar {
  margin: 3px 1px; border-radius: 6px; font-size: 11px; font-weight: 600; display: flex; align-items: center; gap: 4px;
  padding: 0 6px; white-space: nowrap; overflow: hidden; cursor: grab; position: relative; z-index: 2; border: 1px solid; min-width: 0;
  box-shadow: 0 1px 2px rgba(22,36,58,.08); transition: box-shadow .12s, transform .12s;
}
.pl-bar:hover { box-shadow: 0 4px 12px -4px rgba(22,36,58,.35); transform: translateY(-1px); z-index: 3; }
.pl-bar span { overflow: hidden; text-overflow: ellipsis; }
.pl-bar .cnt { background: rgba(255,255,255,.65); border-radius: 4px; padding: 0 4px; font-size: 10.5px; flex-shrink: 0; }
.pl-bar.S { background: #fde9a8; border-color: #efc24c; color: #6c4800; }
.pl-bar.F { background: #b9ebd5; border-color: #63c39b; color: #0f5038; }
.pl-bar.O { background: #d9d2fa; border-color: #a597ec; color: #3b2c8f; }
.pl-bar.dragging { opacity: .35; }
.pl-bar.readonly { cursor: pointer; }
.pl-tip { position: fixed; z-index: 150; background: #16243a; color: #fff; padding: 10px 12px; border-radius: 10px; font-size: 12.5px; line-height: 1.5; max-width: 320px; pointer-events: none; box-shadow: var(--shadow-lg); }
.pl-tip b { font-size: 13px; }
.pl-tip .muted { color: #9fb0c8; }

/* ---------- Potvrde ---------- */
.cert-item { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border: 1px solid var(--border); border-radius: 11px; margin-bottom: 8px; background: var(--surface); }
.cert-ico { width: 38px; height: 38px; border-radius: 10px; background: linear-gradient(135deg, #f7d774, #e6a817); color: #fff; display: grid; place-items: center; flex-shrink: 0; }

/* ---------- Odjeli: dodjela aktivnosti ---------- */
.split { display: grid; grid-template-columns: 340px 1fr; gap: 20px; align-items: start; }
.dept-list { max-height: calc(100vh - 220px); overflow-y: auto; }
.dept-item { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 8px 12px; border-radius: 9px; cursor: pointer; }
.dept-item:hover { background: var(--surface-2); }
.dept-item.on { background: var(--primary-50); color: var(--primary-600); font-weight: 600; }
.dept-item.parent { font-weight: 700; font-size: 12px; text-transform: uppercase; color: var(--muted); letter-spacing: .03em; cursor: default; padding-top: 14px; }
.dept-item.parent:hover { background: none; }
.dept-item.child { padding-left: 22px; }
.dept-item.inactive { opacity: .5; }

/* ---------- Prijava ---------- */
.login-wrap { min-height: 100vh; display: grid; grid-template-columns: 1.1fr 1fr; background: var(--bg); }
.login-art { background: radial-gradient(circle at 20% 20%, rgba(59,163,201,.35), transparent 45%), radial-gradient(circle at 80% 80%, rgba(42,100,173,.5), transparent 50%), linear-gradient(160deg, #18253d, #1f3a60 55%, #2a64ad); color: #fff; padding: 48px; display: flex; flex-direction: column; justify-content: space-between; position: relative; overflow: hidden; }
.login-art::after { content: ""; position: absolute; right: -120px; bottom: -120px; width: 420px; height: 420px; border-radius: 50%; border: 60px solid rgba(255,255,255,.05); }
.login-art h2 { font-size: 34px; line-height: 1.2; margin: 0 0 14px; font-weight: 700; letter-spacing: -.02em; max-width: 460px; }
.login-art p { color: #c4d3e8; max-width: 440px; line-height: 1.6; margin: 0; }
.login-feats { display: grid; gap: 12px; margin-top: 30px; max-width: 420px; }
.login-feats div { display: flex; gap: 12px; align-items: center; color: #dbe6f5; }
.login-feats svg.lucide { width: 18px; height: 18px; color: #7cc7e3; }
.login-side { display: grid; place-items: center; padding: 24px; }
.login-card { width: 100%; max-width: 400px; padding: 34px; }
.login-logo { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 10px; margin-bottom: 26px; }
.login-logo img { width: 96px; height: 96px; object-fit: contain; }
.login-logo .t1 { font-size: 18px; font-weight: 700; }
.login-logo .t2 { font-size: 13px; color: var(--muted); }
.pw-wrap { position: relative; }
.pw-wrap .input { padding-right: 40px; }
.pw-wrap button { position: absolute; right: 4px; top: 4px; }

/* ---------- Responsive ---------- */
@media (max-width: 1100px) {
  .stats { grid-template-columns: repeat(2, 1fr); }
  .profile, .split { grid-template-columns: 1fr; }
}
@media (max-width: 860px) {
  .app { display: block; }
  .sidebar { position: fixed; left: 0; top: 0; z-index: 90; transform: translateX(-100%); transition: transform .2s; }
  .sidebar.open { transform: none; box-shadow: var(--shadow-lg); }
  .mobile-bar { display: flex; align-items: center; gap: 10px; padding: 10px 16px; background: var(--sidebar); color: #fff; position: sticky; top: 0; z-index: 50; }
  .mobile-bar .icon-btn { background: transparent; border-color: rgba(255,255,255,.2); color: #fff; }
  .page { padding: 20px 16px 40px; }
  .two-col, .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .span-2 { grid-column: auto; }
  .login-wrap { grid-template-columns: 1fr; }
  .login-art { display: none; }
  .planner { height: calc(100vh - 250px); }
}
@media (max-width: 520px) { .stats { grid-template-columns: 1fr; } }

/* ---------- Kartice koje korisnik slaže (nadzorna ploča, statistika) ---------- */
.dash-grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 18px; }
.dash-block { min-width: 0; position: relative; display: flex; flex-direction: column; }
.dash-block.w-quarter { grid-column: span 3; }
.dash-block.w-third { grid-column: span 4; }
.dash-block.w-half { grid-column: span 6; }
.dash-block.w-full { grid-column: 1 / -1; }
.dash-body { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.dash-body > .card { flex: 1; }
.dash-edit .dash-block { outline: 2px dashed var(--border-strong); outline-offset: 5px; border-radius: 12px; cursor: grab; }
.dash-edit .dash-block.is-hidden .dash-body { opacity: .35; }
.dash-edit .dash-body a, .dash-edit .dash-body button, .dash-edit .dash-body select { pointer-events: none; }
.dash-tools { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-bottom: 8px; flex-wrap: wrap; }
.dash-grip { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; font-size: 13px; color: var(--text-2); min-width: 0; }
.dash-grip > span:first-of-type { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dash-grip svg { width: 16px; height: 16px; flex-shrink: 0; color: var(--muted); }
.dash-btns { display: inline-flex; gap: 6px; align-items: center; }
.seg-sm button { height: 28px; padding: 0 9px; font-size: 13px; font-weight: 600; }
.dash-btns .icon-btn { width: 30px; height: 30px; }
.dash-hint { margin-right: 4px; }
.dash-block.dragging { opacity: .4; }
.dash-block.drop-before { box-shadow: -4px 0 0 var(--primary); border-radius: 12px; }
.dash-block.drop-after { box-shadow: 4px 0 0 var(--primary); border-radius: 12px; }
.dash-block.w-full.drop-before { box-shadow: 0 -4px 0 var(--primary); }
.dash-block.w-full.drop-after { box-shadow: 0 4px 0 var(--primary); }
@media (max-width: 1100px) { .dash-block.w-quarter, .dash-block.w-third { grid-column: span 6; } }
@media (max-width: 720px) { .dash-block.w-quarter, .dash-block.w-third, .dash-block.w-half { grid-column: 1 / -1; } }

/* ---------- Uvoz praktikanata ---------- */
.import-drop { border: 2px dashed var(--border-strong); border-radius: 14px; padding: 34px 20px; text-align: center; display: flex; flex-direction: column; align-items: center; gap: 10px; background: var(--surface-2); transition: border-color .15s, background .15s; }
.import-drop > svg { width: 36px; height: 36px; color: var(--primary); }
.import-drop.over { border-color: var(--primary); background: var(--primary-50); }
.import-status { margin-top: 12px; text-align: center; }
.import-file { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; }
.import-file svg { color: var(--green, #2f9e74); }
.import-wrap { max-height: 52vh; overflow: auto; border: 1px solid var(--border); border-radius: 10px; }
.import-tbl { margin: 0; font-size: 13px; }
.import-tbl th { position: sticky; top: 0; z-index: 2; text-transform: none; letter-spacing: 0; vertical-align: top; padding: 8px; }
.import-tbl td { padding: 6px 8px; white-space: nowrap; }
.import-tbl td[contenteditable] { outline: none; min-width: 60px; }
.import-tbl td[contenteditable]:focus { box-shadow: inset 0 0 0 2px var(--primary); background: #fff; }
.import-tbl td.unmapped { color: var(--muted); }
.import-tbl tr.off td:not(:first-child) { opacity: .4; }
.import-tbl tr.bad { background: #fff7f7; }
.import-tbl [data-st] { min-width: 140px; white-space: normal; }
.import-orig { font-size: 11px; color: var(--muted); font-weight: 400; margin-top: 4px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 170px; }
.select-sm { height: 30px; font-size: 12.5px; padding: 0 26px 0 8px; min-width: 120px; }

/* ---------- Aktivni filtri (raspored) ---------- */
.filter-btn { position: relative; color: var(--muted); }
.filter-btn.active { color: #fff; background: #e08a1e; border-color: #e08a1e; }
.filter-btn.active:hover { background: #c97810; }
.fbadge { position: absolute; top: -6px; right: -6px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 999px; background: var(--red); color: #fff; font-size: 11px; font-weight: 700; line-height: 18px; text-align: center; box-shadow: 0 0 0 2px var(--surface); }
.filter-chips { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin: -4px 0 12px; padding: 8px 10px; border-radius: 10px; background: #fff6e8; border: 1px solid #f3d9ad; }
.filter-chips > .sub { display: inline-flex; align-items: center; gap: 5px; color: #9a5d00; font-weight: 600; margin-right: 2px; }
.filter-chips > .sub svg { width: 14px; height: 14px; }
.fchip { display: inline-flex; align-items: center; gap: 2px; padding: 2px 4px 2px 10px; border-radius: 999px; background: #fff; border: 1px solid #f0c98a; font-size: 12.5px; color: #6b4300; font-weight: 500; }
.fchip button { width: 20px; height: 20px; display: grid; place-items: center; border: 0; border-radius: 50%; background: none; color: #9a5d00; cursor: pointer; padding: 0; }
.fchip button:hover { background: #fde3b8; }
.fchip button svg { width: 13px; height: 13px; }
.link-btn { border: 0; background: none; color: var(--primary); font: inherit; font-size: 12.5px; font-weight: 600; cursor: pointer; padding: 2px 6px; margin-left: 4px; }
.link-btn:hover { text-decoration: underline; }
.pl-grid > .empty { position: relative; z-index: 6; background: var(--surface); padding: 36px 16px; line-height: 1.6; }
.pl-grid > .empty > * { position: sticky; left: 16px; }

/* ---------- Tko je unio / izmijenio · koš za smeće ---------- */
.audit { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; color: var(--muted); }
.audit svg { width: 13px; height: 13px; flex-shrink: 0; }
.modal-foot .left { display: flex; align-items: center; gap: 10px; margin-right: auto; min-width: 0; }
.btn-danger-ghost { color: var(--red); }
.btn-danger-ghost:hover { background: var(--red-bg); border-color: #f2b8b8; }
.badge svg { width: 13px; height: 13px; }

/* =====================================================================
   HR Manager – dodaci
   ===================================================================== */
.badge.amber { background: #fff3d6; color: #8a5d00; }
.avatar { overflow: hidden; position: relative; }
.avatar img { width: 100%; height: 100%; object-fit: cover; display: block; }
.avatar.lg { width: 96px; height: 96px; font-size: 30px; border-radius: 22px; }
.avatar.sm { width: 26px; height: 26px; font-size: 10.5px; }

/* Odabir tvrtke u izborniku */
.company-switch { display: block; margin: 12px 12px 0; position: relative; }
.company-switch select { display: block; }
.company-switch select { width: 100%; height: 40px; border-radius: 10px; border: 1px solid rgba(255,255,255,.12); background: rgba(255,255,255,.06); color: #fff;
  font: inherit; font-weight: 600; padding: 0 30px 0 34px; appearance: none; cursor: pointer; }
.company-switch select option { color: var(--text); }
.company-switch .dot { position: absolute; left: 13px; top: 50%; width: 10px; height: 10px; border-radius: 50%; transform: translateY(-50%); box-shadow: 0 0 0 3px rgba(255,255,255,.12); }
.company-switch svg.lucide { position: absolute; right: 10px; top: 50%; transform: translateY(-50%); color: #8fa3c0; pointer-events: none; }
.company-name { margin: 12px 12px 0; padding: 9px 12px; border-radius: 10px; background: rgba(255,255,255,.06); color: #fff; font-weight: 600; font-size: 13px; display: flex; gap: 8px; align-items: center; }
.nav .count { margin-left: auto; background: #e08a1e; color: #fff; border-radius: 999px; font-size: 11px; font-weight: 700; padding: 1px 7px; }

/* Vrste odsustva */
.lv { display: inline-flex; align-items: center; padding: 2px 8px; border-radius: 6px; font-size: 12px; font-weight: 600; white-space: nowrap; }
.lv-go { background: #e3effc; color: #20518f; }
.lv-sick { background: #fde6e6; color: #a12f2f; }
.lv-paid { background: #daf3e8; color: #17654a; }
.lv-unpaid { background: #eef1f6; color: #55657d; }
.lv-home { background: #ebe7fb; color: #4b3aa6; }
.lv-trip { background: #fdf3d6; color: #8a5d00; }
.lv-other { background: #eef1f6; color: #55657d; }

/* Karton zaposlenika */
.emp-hero { display: flex; gap: 22px; align-items: center; padding: 22px; margin-bottom: 18px; background: linear-gradient(135deg, #ffffff 0%, #f3f7fd 100%); }
.emp-hero .photo { position: relative; flex-shrink: 0; }
.emp-hero .photo .icon-btn { position: absolute; right: -6px; bottom: -6px; width: 30px; height: 30px; border-radius: 50%; box-shadow: var(--shadow); }
.emp-hero h1 { font-size: 24px; margin: 0; letter-spacing: -.015em; }
.emp-hero .meta { display: flex; flex-wrap: wrap; gap: 6px 16px; color: var(--text-2); margin-top: 8px; font-size: 13.5px; }
.emp-hero .meta span { display: inline-flex; align-items: center; gap: 6px; }
.emp-hero .meta svg { color: var(--muted); }
.emp-hero .actions { margin-left: auto; display: flex; gap: 8px; flex-wrap: wrap; align-self: flex-start; }
.kv-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; align-items: start; }
.kv-grid > .kv-wide { grid-column: 1 / -1; }
@media (max-width: 900px) { .kv-grid { grid-template-columns: 1fr; } }
.kv-card h3 { font-size: 13px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); margin: 0 0 12px; display: flex; gap: 8px; align-items: center; }
.kv-card h3 svg { color: var(--primary); }
.kv { grid-template-columns: 140px 1fr; }
.kv dd.empty { color: var(--muted); font-weight: 400; text-align: left; padding: 0; }
.seniority { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin-bottom: 18px; }
.sen-box { padding: 16px 18px; }
.sen-box .lbl { margin: 0; }
.sen-box .val { font-size: 22px; font-weight: 700; margin-top: 6px; letter-spacing: -.01em; }
.sen-box.total { background: linear-gradient(135deg, var(--primary), #3576c4); color: #fff; border-color: transparent; }
.sen-box.total .lbl, .sen-box.total .sub { color: #d3e2f5; }
.job-item { display: grid; grid-template-columns: 1fr auto; gap: 8px 16px; padding: 14px 16px; border: 1px solid var(--border); border-radius: 11px; margin-bottom: 10px; background: var(--surface); }
.job-item.current { border-color: var(--primary-100); background: linear-gradient(135deg, #fff, #f3f8fe); box-shadow: inset 3px 0 0 var(--primary); }
.job-title { font-weight: 600; font-size: 15px; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.job-meta { display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: 12.5px; color: var(--text-2); margin-top: 4px; }

/* Godišnji odmor – stanje */
.balance { display: grid; grid-template-columns: 1.3fr repeat(3, 1fr); gap: 14px; margin-bottom: 18px; }
.bal-main { padding: 20px; display: flex; gap: 18px; align-items: center; }
.ring { --p: 0; width: 96px; height: 96px; border-radius: 50%; flex-shrink: 0; display: grid; place-items: center;
  background: conic-gradient(var(--primary) calc(var(--p) * 1%), var(--surface-3) 0); }
.ring > div { width: 74px; height: 74px; border-radius: 50%; background: var(--surface); display: grid; place-items: center; text-align: center; line-height: 1.1; }
.ring b { font-size: 24px; letter-spacing: -.02em; }
.ring small { font-size: 10.5px; color: var(--muted); }
.bal-box { padding: 16px 18px; }
.bal-box .v { font-size: 24px; font-weight: 700; margin-top: 4px; }
.req-row { display: flex; gap: 12px; align-items: center; padding: 12px 14px; border: 1px solid var(--border); border-radius: 11px; margin-bottom: 8px; background: var(--surface); }
.req-row .when { min-width: 0; flex: 1; }
.req-row .when b { font-weight: 600; }
.req-days { min-width: 54px; text-align: center; background: var(--surface-2); border-radius: 9px; padding: 6px 4px; line-height: 1.1; }
.req-days b { font-size: 18px; display: block; }
.req-days small { font-size: 10.5px; color: var(--muted); }

/* Kalendar odsutnosti (mjesec) */
.mcal { overflow-x: auto; }
.mcal table { border-collapse: separate; border-spacing: 0; width: 100%; font-size: 12px; }
.mcal th, .mcal td { border-bottom: 1px solid var(--border); border-left: 1px solid #edf1f6; padding: 0; height: 30px; text-align: center; min-width: 26px; }
.mcal th { background: var(--surface-2); color: var(--muted); font-weight: 600; font-size: 11px; position: sticky; top: 0; }
.mcal th.name, .mcal td.name { text-align: left; padding: 0 10px; min-width: 190px; position: sticky; left: 0; background: var(--surface); z-index: 1; border-left: 0; white-space: nowrap; }
.mcal th.name { background: var(--surface-2); z-index: 2; }
.mcal .we { background: #f3f5f9; }
.mcal .hol { background: #fbeeee; }
.mcal .today { box-shadow: inset 0 0 0 2px var(--primary); }
.mcal td.on { position: relative; }
.mcal td.on::after { content: ""; position: absolute; inset: 5px 0; border-radius: 0; }
.mcal td.on.first::after { left: 3px; border-top-left-radius: 6px; border-bottom-left-radius: 6px; }
.mcal td.on.last::after { right: 3px; border-top-right-radius: 6px; border-bottom-right-radius: 6px; }
.mcal td.lv-go::after { background: #9cc3ef; } .mcal td.lv-sick::after { background: #f1a3a3; } .mcal td.lv-paid::after { background: #8fdcb9; }
.mcal td.lv-unpaid::after { background: #c5cfdc; } .mcal td.lv-home::after { background: #bfb3f4; } .mcal td.lv-trip::after { background: #f3d283; } .mcal td.lv-other::after { background: #c5cfdc; }
.mcal td.pending::after { opacity: .45; background-image: repeating-linear-gradient(45deg, transparent 0 4px, rgba(255,255,255,.7) 4px 8px); }

/* Organizacijska struktura */
.org-tree { padding: 6px; }
.org-node { border-left: 2px solid var(--border); margin-left: 14px; padding-left: 14px; }
.org-node.root { border-left: 0; margin-left: 0; padding-left: 0; }
.org-row { display: flex; align-items: center; gap: 10px; padding: 9px 12px; border-radius: 10px; cursor: pointer; border: 1px solid transparent; margin: 3px 0; }
.org-row:hover { background: var(--surface-2); }
.org-row.on { background: var(--primary-50); border-color: var(--primary-100); }
.org-row .code { font-size: 11.5px; font-weight: 700; color: var(--primary-600); background: var(--primary-50); border-radius: 6px; padding: 1px 6px; }
.org-row .nm { font-weight: 600; flex: 1; min-width: 0; }
.org-row .kind { font-size: 11.5px; color: var(--muted); }
.org-row.inactive { opacity: .5; }
.org-row .tg { width: 18px; color: var(--muted); display: grid; place-items: center; }
.org-row .tg svg { transition: transform .15s; }
.org-node.closed > .org-kids { display: none; }
.org-node.closed > .org-row .tg svg { transform: rotate(-90deg); }
.people { display: flex; flex-wrap: wrap; gap: 8px; }
.person { display: flex; align-items: center; gap: 8px; padding: 6px 10px 6px 6px; border: 1px solid var(--border); border-radius: 999px; background: var(--surface); font-size: 13px; cursor: pointer; }
.person:hover { border-color: var(--primary-100); background: var(--primary-50); }
.person .avatar { width: 28px; height: 28px; font-size: 11px; }
.fill-bar { width: 70px; height: 6px; border-radius: 999px; background: var(--surface-3); overflow: hidden; display: inline-block; vertical-align: middle; margin-right: 6px; }
.fill-bar > span { display: block; height: 100%; background: var(--green); }
.fill-bar.over > span { background: var(--red); }

.photo-drop { display: flex; gap: 16px; align-items: center; }
.alert-row { display: flex; gap: 10px; align-items: center; padding: 9px 12px; border-radius: 9px; background: var(--surface-2); margin-bottom: 6px; cursor: pointer; }
.alert-row:hover { background: var(--primary-50); }
.alert-row .ic { width: 30px; height: 30px; border-radius: 8px; display: grid; place-items: center; flex-shrink: 0; }
.alert-row .when { margin-left: auto; font-size: 12px; color: var(--muted); white-space: nowrap; }
.bar-list .bl { display: grid; grid-template-columns: 1fr 140px 30px; gap: 10px; align-items: center; padding: 6px 0; font-size: 13px; }
.bar-list .bl > div:nth-child(2) { height: 8px; background: var(--surface-3); border-radius: 999px; overflow: hidden; }
.bar-list .bl > div:nth-child(2) span { display: block; height: 100%; background: linear-gradient(90deg, var(--accent), var(--primary)); border-radius: 999px; }
.color-dot { width: 12px; height: 12px; border-radius: 50%; display: inline-block; flex-shrink: 0; }
.company-card { padding: 20px; display: flex; flex-direction: column; gap: 10px; border-top: 4px solid var(--c, var(--primary)); }

@media (max-width: 1100px) { .balance { grid-template-columns: 1fr 1fr; } }
@media (max-width: 860px) { .seniority, .balance { grid-template-columns: 1fr; } .emp-hero { flex-direction: column; align-items: flex-start; } .emp-hero .actions { margin-left: 0; } }
.req-row { flex-wrap: wrap; }
.req-row .when { min-width: 200px; }
.req-row .head-actions { margin-left: auto; }

/* ---------- Povijest izmjena ---------- */
.hist-row { display: flex; gap: 12px; align-items: flex-start; padding: 12px 4px; border-bottom: 1px solid var(--border); }
.hist-row:last-child { border-bottom: 0; }
.hist-ic { width: 32px; height: 32px; border-radius: 9px; display: grid; place-items: center; flex-shrink: 0; background: var(--surface-3); color: var(--text-2); }
.hist-ic.green { background: var(--green-bg); color: #17654a; }
.hist-ic.blue { background: var(--primary-50); color: var(--primary); }
.hist-ic.red { background: var(--red-bg); color: #a12f2f; }
.hist-ic.amber { background: #fff3d6; color: #8a5d00; }
.hist-head { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.hist-chg { border-collapse: collapse; margin-top: 8px; font-size: 13px; }
.hist-chg td { padding: 3px 10px 3px 0; vertical-align: top; }
.hist-chg td:first-child { color: var(--muted); white-space: nowrap; }
.hist-chg td.old { color: #a12f2f; text-decoration: line-through; text-decoration-color: rgba(161,47,47,.4); }
.hist-chg td.new { color: #17654a; font-weight: 500; }
.hist-chg svg.lucide { width: 13px; height: 13px; color: var(--muted); }
.hist-vals { display: flex; flex-wrap: wrap; gap: 4px 14px; margin-top: 6px; font-size: 12.5px; color: var(--text-2); }
.hist-vals b { font-weight: 500; color: var(--muted); }

/* ---------- Logotip tvrtke ---------- */
.co-logo { width: 46px; height: 46px; border-radius: 11px; background: #fff; border: 1px solid var(--border); display: grid; place-items: center; overflow: hidden; flex-shrink: 0; }
.co-logo img { width: 100%; height: 100%; object-fit: contain; padding: 4px; }
.co-logo.empty { color: #fff; font-weight: 700; font-size: 20px; border: 0; }
.co-logo.lg { width: 84px; height: 84px; border-radius: 16px; font-size: 32px; }
.logo-edit { display: flex; gap: 16px; align-items: center; padding: 14px; margin-bottom: 16px; border: 1px solid var(--border); border-radius: 12px; background: var(--surface-2); }

/* ---------- Evidencija rada ---------- */
.att-wrap { overflow: auto; max-height: calc(100vh - 250px); }
table.att { border-collapse: separate; border-spacing: 0; font-size: 12px; user-select: none; }
.att th, .att td { border-bottom: 1px solid var(--border); border-left: 1px solid #edf1f6; height: 38px; padding: 0; text-align: center; min-width: 34px; }
.att thead th { position: sticky; top: 0; z-index: 3; background: var(--surface-2); color: var(--muted); font-weight: 600; font-size: 10.5px; line-height: 1.2; }
.att thead th b { font-size: 12px; color: var(--text); }
.att .nm { position: sticky; left: 0; z-index: 2; background: var(--surface); text-align: left; padding: 0 10px; min-width: 230px; max-width: 260px; border-left: 0; border-right: 1px solid var(--border); }
.att thead .nm { z-index: 4; background: var(--surface-2); }
.att .nm .check { gap: 8px; width: 100%; }
.att .nm span { line-height: 1.25; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.att th.we, .att td.we { background: #f3f5f9; }
.att th.hol, .att td.hol { background: #fbeeee; }
.att th.today { background: var(--primary); color: #fff; }
.att th.today b { color: #fff; }
.att td[data-d] { cursor: cell; position: relative; }
.att tr.ro td[data-d] { cursor: pointer; }
.att td.off { background: repeating-linear-gradient(135deg, #f7f8fa 0 4px, #eef1f5 4px 8px); cursor: default; }
.att td.on, .att td.abs, .att td.auto { background: color-mix(in srgb, var(--c) 38%, white); }
.att td.abs { background: color-mix(in srgb, var(--c) 55%, white); box-shadow: inset 0 -3px 0 var(--c); }
.att td.auto { background: color-mix(in srgb, var(--c) 30%, white); color: var(--muted); }
.att td.miss { background: #fff4e3; box-shadow: inset 0 0 0 1px #f6dcb0; }
.att td.today { box-shadow: inset 0 0 0 2px var(--primary); }
.att td.sel { box-shadow: inset 0 0 0 2px #e08a1e !important; background-color: #fde7c4 !important; }
.att .cc { display: block; font-weight: 700; font-size: 10px; letter-spacing: .02em; line-height: 1.1; }
.att .ch { display: block; font-size: 12px; font-weight: 600; line-height: 1.1; }
.att td.abs .cc, .att td.auto .cc { font-size: 11px; }
.att .sum { min-width: 50px; padding: 0 6px; font-variant-numeric: tabular-nums; background: #fafbfd; }
.att .sum.first { border-left: 2px solid var(--border-strong); }
.att .sum.neg { color: var(--red); font-weight: 600; }
.att .sum.pos { color: var(--green); font-weight: 600; }
.att tbody tr:hover td.nm { background: var(--primary-50); }
.tdot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 4px; vertical-align: middle; }
.att-legend { display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: 12px; color: var(--text-2); margin: -4px 0 12px; }
.att-legend span { display: inline-flex; align-items: center; gap: 5px; }
.att-legend i { width: 12px; height: 12px; border-radius: 3px; display: inline-block; }
.att-legend i.miss { background: #fff4e3; box-shadow: inset 0 0 0 1px #f6dcb0; }
.att-bar { position: fixed; left: 50%; transform: translateX(-50%); bottom: 18px; z-index: 80; background: #16243a; color: #fff; border-radius: 14px; padding: 10px 14px;
  display: flex; gap: 10px; align-items: center; flex-wrap: wrap; box-shadow: var(--shadow-lg); max-width: calc(100vw - 32px); }
.att-bar .sub { color: #b9c6da; }
.att-bar .select, .att-bar .input { background: #fff; color: var(--text); }
.att-bar .check { color: #dbe6f5; font-size: 12.5px; }
.att-bar .btn:not(.btn-primary) { background: rgba(255,255,255,.1); border-color: rgba(255,255,255,.2); color: #fff; }
.att-bar .icon-btn { color: #fff; }
.att-line { display: grid; grid-template-columns: 1.6fr 80px 105px 105px 1.4fr 30px; gap: 6px; align-items: center; margin-bottom: 6px; }
.att-line.head { font-size: 12px; color: var(--muted); font-weight: 600; margin-bottom: 4px; }
.att-cal { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; }
.att-cal .dh { font-size: 11px; color: var(--muted); font-weight: 600; text-align: center; }
.att-cal .dc { border: 1px solid var(--border); border-radius: 9px; min-height: 64px; padding: 5px 7px; font-size: 12px; background: var(--surface); }
.att-cal .dc.we { background: #f6f8fb; }
.att-cal .dc.hol { background: #fdf3f3; }
.att-cal .dc.off { visibility: hidden; }
.att-cal .dc .dn { font-weight: 700; font-size: 12px; color: var(--muted); }
.att-cal .dc .it { display: block; margin-top: 3px; padding: 1px 5px; border-radius: 5px; background: color-mix(in srgb, var(--c) 40%, white); font-weight: 600; font-size: 11px; }
@media print { .sidebar, .mobile-bar, .att-bar, .toolbar, .head-actions { display: none !important; } .att-wrap { max-height: none; overflow: visible; } }
.att-bar .select { width: auto; max-width: 240px; }
.att-line .t24 { text-align: center; font-variant-numeric: tabular-nums; letter-spacing: .02em; }

/* ---------- Obračun plaće ---------- */
.tbl.pay td, .tbl.pay th { font-variant-numeric: tabular-nums; white-space: nowrap; }
.tbl.pay tfoot td { border-top: 2px solid var(--border-strong); background: var(--surface-2); }
.pay-grid { display: grid; grid-template-columns: 1.1fr 1fr; gap: 24px; }
.award-warn { color: #c0392b; }
.award-warn svg { width: 15px; height: 15px; vertical-align: -3px; }
.pay-item { display: grid; grid-template-columns: 190px 1fr 110px 30px; gap: 6px; margin-bottom: 6px; align-items: center; }
.pay-calc { width: 100%; border-collapse: collapse; font-size: 13px; }
.pay-calc td { padding: 5px 8px; border-bottom: 1px solid #edf1f6; }
.pay-calc .r { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.pay-calc tr.tot td { background: var(--surface-2); border-top: 1px solid var(--border-strong); }
.pay-calc tr.muted td { color: var(--muted); font-size: 12.5px; }
.pay-calc tr.pay td { background: var(--green-bg); color: #17654a; font-size: 15px; border-top: 2px solid var(--green); }
@media (max-width: 900px) { .pay-grid { grid-template-columns: 1fr; } .pay-item { grid-template-columns: 1fr 1fr; } }

/* Statistika: dva tortna grafikona – jedan pored drugog samo kad ima mjesta */
.stat-pies { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 0 16px; }
.stat-pies > div { min-width: 0; }
