/* ===== Tenero HR · stilovi ===== */
:root {
  color-scheme: light;
  --bg: #F5F5F7;
  --side: #FBFBFD;
  --card: #FFFFFF;
  --text: #1D1D1F;
  --text-2: #3A3A3C;
  --muted: #6E6E73;
  --line: #E5E5EA;
  --line-soft: #F0F0F2;
  --fill: #F5F5F7;
  --accent: #0071E3;
  --accent-ink: #0062C4;
  --accent-soft: rgba(0, 113, 227, 0.08);
  --green-bg: #E9F5EC; --green: #0D5C27;
  --amber-bg: #FDF3E7; --amber: #8A4A0B;
  --red-bg: #FDECEA;   --red: #A31A16;
  --blue-bg: #EEF3FD;  --blue: #1250A8;
  --danger: #D70015;
  --radius: 18px;
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Inter", "Segoe UI", Roboto, sans-serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--text); font-family: var(--font); -webkit-font-smoothing: antialiased; }
body { font-size: 15px; line-height: 1.4; }
a { color: var(--accent-ink); text-decoration: none; }
a:hover { color: #004A94; }
button, input, select, textarea { font: inherit; color: inherit; }
h1, h2, h3 { margin: 0; letter-spacing: -0.01em; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.boot { min-height: 100vh; display: flex; align-items: center; justify-content: center; font-weight: 700; letter-spacing: 0.14em; font-size: 22px; }
.boot span { color: var(--muted); font-size: 14px; margin-left: 6px; letter-spacing: 0; }

/* ----- layout ----- */
.shell { min-height: 100vh; display: flex; }
.side { width: 248px; flex: none; background: var(--side); border-right: 1px solid var(--line); padding: 28px 16px; display: flex; flex-direction: column; gap: 28px; position: sticky; top: 0; height: 100vh; overflow-y: auto; }
.brand { display: flex; align-items: baseline; gap: 8px; padding: 0 12px; font-weight: 700; font-size: 22px; letter-spacing: 0.14em; }
.brand small { font-size: 13px; color: var(--muted); letter-spacing: 0; font-weight: 600; }
.nav { display: flex; flex-direction: column; gap: 2px; }
.nav a { display: flex; align-items: center; gap: 12px; min-height: 40px; padding: 0 12px; border-radius: 10px; font-size: 14px; font-weight: 500; color: var(--text-2); }
.nav a:hover { background: var(--line-soft); color: var(--text); }
.nav a.on { color: var(--accent); background: var(--accent-soft); font-weight: 600; }
.nav a.later { color: var(--muted); }
.nav a.later.on { color: var(--accent); }
.nav a .badge { margin-left: auto; }
.nav svg { flex: none; }
.me { margin-top: auto; display: flex; align-items: center; gap: 12px; padding: 12px; border-radius: 14px; background: var(--card); border: 1px solid var(--line); }
.me .who { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.me .who b { font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.me .who span { font-size: 12px; color: var(--muted); }

.main { flex: 1; min-width: 0; padding: 32px clamp(16px, 3vw, 40px) 64px; display: flex; flex-direction: column; gap: 24px; max-width: 1280px; }
.topbar { display: none; }

.page-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 16px; }
.page-head .t { display: flex; flex-direction: column; gap: 4px; }
.page-head .eyebrow { font-size: 14px; color: var(--muted); font-weight: 500; }
.page-head h1 { font-size: 34px; font-weight: 700; letter-spacing: -0.02em; }
.actions { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }

/* ----- cards ----- */
.card { background: var(--card); border-radius: var(--radius); padding: 22px; box-shadow: var(--shadow); display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.card-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 12px; }
.card-head h2 { font-size: 19px; font-weight: 600; }
.card-head .sub { font-size: 13px; color: var(--muted); }
.row { display: flex; flex-wrap: wrap; gap: 16px; align-items: stretch; }
.row > * { flex: 1 1 320px; }
.row > .wide { flex: 2 1 520px; }

.tiles { display: flex; flex-wrap: wrap; gap: 16px; }
.tile { flex: 1 1 200px; background: var(--card); border-radius: var(--radius); padding: 20px 22px; box-shadow: var(--shadow); display: flex; flex-direction: column; gap: 6px; }
.tile .k { font-size: 13px; font-weight: 500; color: var(--muted); }
.tile .v { font-size: 34px; font-weight: 700; letter-spacing: -0.02em; line-height: 1.1; }
.tile .s { font-size: 13px; color: var(--muted); }
.tile .v.warn { color: #B45309; }
.tile .v.acc { color: var(--accent); }

/* ----- buttons ----- */
.btn { height: 40px; padding: 0 16px; border-radius: 12px; border: 1px solid var(--line); background: var(--card); font-size: 14px; font-weight: 500; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; gap: 6px; white-space: nowrap; }
.btn:hover { background: var(--fill); }
.btn.primary { background: var(--accent); border-color: var(--accent); color: #fff; font-weight: 600; }
.btn.primary:hover { background: #0068D1; }
.btn.danger { color: var(--danger); }
.btn.ghost { border-color: transparent; background: var(--fill); }
.btn:disabled { opacity: 0.5; cursor: default; }
.btn.lg { height: 50px; border-radius: 14px; font-size: 16px; }
.link-btn { border: 0; background: none; padding: 0; color: var(--accent-ink); font-size: 14px; font-weight: 500; cursor: pointer; }
.icon-btn { width: 40px; height: 40px; border-radius: 12px; border: 0; background: var(--fill); display: inline-flex; align-items: center; justify-content: center; cursor: pointer; }

.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { min-height: 36px; padding: 0 12px; border-radius: 18px; border: 1px solid var(--line); background: var(--card); color: var(--text-2); font-size: 14px; font-weight: 500; cursor: pointer; display: inline-flex; align-items: center; gap: 8px; }
.chip .n { font-size: 12px; font-weight: 600; color: var(--muted); }
.chip.on { background: var(--text); border-color: var(--text); color: #fff; }
.chip.on .n { color: #fff; }

.pill { display: inline-block; padding: 4px 10px; border-radius: 999px; font-size: 12px; font-weight: 600; white-space: nowrap; background: var(--line-soft); color: var(--text-2); }
.pill.green { background: var(--green-bg); color: var(--green); }
.pill.amber { background: var(--amber-bg); color: var(--amber); }
.pill.red { background: var(--red-bg); color: var(--red); }
.pill.blue { background: var(--blue-bg); color: var(--blue); }
.badge { min-width: 20px; height: 20px; padding: 0 6px; border-radius: 10px; background: #FF3B30; color: #fff; font-size: 12px; font-weight: 600; display: inline-flex; align-items: center; justify-content: center; }

.avatar { width: 36px; height: 36px; flex: none; border-radius: 50%; background: var(--line-soft); display: inline-flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 600; color: var(--text); }
.avatar.dark { background: var(--text); color: #fff; }
.avatar.xl { width: 76px; height: 76px; font-size: 26px; }

/* ----- inputs ----- */
.field { display: flex; flex-direction: column; gap: 6px; font-size: 13px; font-weight: 500; color: var(--muted); min-width: 0; }
.field input, .field select, .field textarea { height: 44px; padding: 0 12px; border: 1px solid var(--line); border-radius: 12px; background: var(--card); font-size: 15px; color: var(--text); outline: none; width: 100%; }
.field textarea { height: auto; padding: 10px 12px; resize: vertical; min-height: 80px; }
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.field .hint { font-weight: 400; font-size: 12px; }
.field .err { color: var(--danger); font-weight: 500; font-size: 12px; }
.check { display: flex; align-items: center; gap: 10px; font-size: 15px; color: var(--text); min-height: 44px; cursor: pointer; }
.check input { width: 20px; height: 20px; accent-color: var(--accent); }
.search { display: flex; align-items: center; gap: 8px; height: 40px; padding: 0 12px; background: var(--fill); border-radius: 12px; color: var(--muted); }
.search input { border: 0; outline: none; background: transparent; font-size: 14px; width: 170px; color: var(--text); }
.select-inline { display: flex; align-items: center; gap: 6px; height: 40px; padding: 0 4px 0 12px; background: var(--fill); border-radius: 12px; font-size: 14px; color: var(--muted); }
.select-inline select { border: 0; background: transparent; font-weight: 600; height: 36px; padding: 0 6px; outline: none; color: var(--text); }
.grid-form { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.grid-form .full { grid-column: 1 / -1; }
.form-section { font-size: 13px; font-weight: 600; color: var(--text); text-transform: uppercase; letter-spacing: 0.05em; padding-top: 6px; grid-column: 1 / -1; }

/* ----- tables ----- */
.table-wrap { overflow-x: auto; }
.table { min-width: 720px; display: flex; flex-direction: column; }
.tr { display: grid; gap: 12px; align-items: center; padding: 10px 0; border-top: 1px solid var(--line-soft); font-size: 14px; color: var(--text); }
.tr.th { border-top: 0; padding: 8px 0; font-size: 12px; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: 0.04em; }
a.tr:hover { background: linear-gradient(90deg, transparent, var(--fill) 2%, var(--fill) 98%, transparent); color: var(--text); }
.person { display: flex; align-items: center; gap: 12px; min-width: 0; }
.person .nm { display: flex; flex-direction: column; min-width: 0; }
.person .nm b { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.person .nm span { font-size: 12px; color: var(--muted); }
.muted { color: var(--muted); }
.dim { color: var(--text-2); }
.warn-t { color: var(--amber); font-weight: 600; }
.red-t { color: var(--red); font-weight: 600; }

.list-row { display: flex; flex-wrap: wrap; align-items: center; gap: 14px; padding: 12px 0; border-top: 1px solid var(--line-soft); }
.list-row:first-child { border-top: 0; }
.list-row .grow { flex: 1 1 220px; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.list-row .grow b { font-size: 15px; font-weight: 600; }
.list-row .grow span { font-size: 13px; color: var(--muted); }
button.list-row { width: 100%; border: 0; background: none; text-align: left; cursor: pointer; border-top: 1px solid var(--line-soft); }
button.list-row:first-child { border-top: 0; }
button.list-row:hover { background: var(--fill); }

.kv { display: flex; justify-content: space-between; gap: 16px; padding: 9px 0; border-top: 1px solid var(--line-soft); font-size: 14px; }
.kv > span:first-child { color: var(--muted); }
.kv > span:last-child { font-weight: 500; text-align: right; overflow-wrap: anywhere; }
.kv .empty, .kv > span.empty { color: #AEAEB2; font-weight: 400; }

.bar { height: 8px; border-radius: 4px; background: var(--line-soft); overflow: hidden; display: block; }
.bar > span { display: block; height: 8px; border-radius: 4px; background: var(--accent); }

.empty-state { padding: 36px 16px; display: flex; flex-direction: column; align-items: center; gap: 8px; text-align: center; color: var(--muted); font-size: 14px; }
.empty-state b { color: var(--text); font-size: 16px; }

.tabs { display: flex; gap: 4px; overflow-x: auto; border-bottom: 1px solid var(--line); }
.tabs button { flex: none; min-height: 44px; padding: 0 14px; border: 0; background: transparent; font-size: 15px; font-weight: 500; color: var(--muted); cursor: pointer; border-bottom: 2px solid transparent; margin-bottom: -1px; }
.tabs button.on { color: var(--text); font-weight: 600; border-bottom-color: var(--accent); }

.profile-head { background: var(--card); border-radius: 22px; padding: 24px; display: flex; flex-wrap: wrap; align-items: center; gap: 20px; box-shadow: var(--shadow); }
.profile-head .info { flex: 1 1 260px; min-width: 0; display: flex; flex-direction: column; gap: 8px; }
.profile-head h1 { font-size: 28px; font-weight: 700; letter-spacing: -0.02em; }
.profile-head .pills { display: flex; flex-wrap: wrap; gap: 6px; }
.cards-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 16px; align-items: start; }

/* ----- modal ----- */
.overlay { position: fixed; inset: 0; background: rgba(0, 0, 0, 0.32); display: flex; align-items: flex-start; justify-content: center; padding: 6vh 16px; overflow-y: auto; z-index: 50; animation: fade 0.15s ease-out; }
.modal { background: var(--card); border-radius: 22px; width: 100%; max-width: 640px; box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2); display: flex; flex-direction: column; animation: rise 0.18s ease-out; }
.modal-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 20px 22px 12px; }
.modal-head h2 { font-size: 20px; font-weight: 700; }
.modal-body { padding: 8px 22px 16px; display: flex; flex-direction: column; gap: 14px; }
.modal-foot { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 10px; padding: 14px 22px 20px; border-top: 1px solid var(--line-soft); }
.modal-foot .right { display: flex; gap: 10px; margin-left: auto; }
@keyframes fade { from { opacity: 0; } }
@keyframes rise { from { transform: translateY(12px); opacity: 0; } }

.toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); background: var(--text); color: #fff; padding: 12px 18px; border-radius: 14px; font-size: 14px; font-weight: 500; z-index: 60; box-shadow: 0 8px 30px rgba(0,0,0,0.2); animation: rise 0.18s ease-out; max-width: calc(100vw - 32px); }
.toast.err { background: var(--danger); }
.alert { padding: 12px 14px; border-radius: 12px; background: var(--red-bg); color: var(--red); font-size: 14px; }
.note { padding: 12px 14px; border-radius: 12px; background: var(--fill); color: var(--text-2); font-size: 14px; }

/* ----- login ----- */
.auth { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 24px 16px; }
.auth-card { width: 100%; max-width: 400px; background: var(--card); border-radius: 26px; padding: 36px 28px 28px; box-shadow: 0 8px 40px rgba(0,0,0,0.06); display: flex; flex-direction: column; gap: 16px; }
.auth-card .brand { justify-content: center; padding: 0; font-size: 26px; }
.auth-card h1 { font-size: 22px; text-align: center; font-weight: 600; }
.auth-card p { margin: 0; text-align: center; color: var(--muted); font-size: 14px; }

/* ----- employee (mobile-first) ----- */
.emp { max-width: 520px; margin: 0 auto; padding: 28px 16px 48px; display: flex; flex-direction: column; gap: 16px; }
.emp-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.emp-head h1 { font-size: 30px; font-weight: 700; letter-spacing: -0.02em; }

/* ----- fajlovi ----- */
.row-main { flex: 1 1 300px; min-width: 0; display: flex; flex-wrap: wrap; align-items: center; gap: 14px; border: 0; background: none; padding: 0; text-align: left; cursor: pointer; font: inherit; color: inherit; border-radius: 10px; }
.row-main:hover .grow b { color: var(--accent-ink); }
.file-slot { width: 104px; flex: none; justify-content: center; text-align: center; }
.file-box { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; padding: 12px; border: 1px dashed var(--line); border-radius: 12px; background: var(--fill); color: var(--text); font-size: 14px; font-weight: 400; }
.file-name { display: inline-flex; align-items: center; gap: 6px; flex: 1 1 200px; min-width: 0; overflow-wrap: anywhere; font-weight: 500; }
.file-box label.btn { cursor: pointer; }
.file-box input[type=file]:focus-visible + * , .file-box label.btn:focus-within { box-shadow: 0 0 0 3px var(--accent-soft); }

code, .tag-code { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 13px; background: var(--fill); padding: 1px 6px; border-radius: 6px; }
.tag-code { cursor: pointer; white-space: nowrap; }
.tag-code:hover { background: var(--accent-soft); color: var(--accent-ink); }

/* ----- izvještaji ----- */
.hbar { flex: 1; height: 10px; border-radius: 0 4px 4px 0; background: var(--line-soft); overflow: hidden; display: block; min-width: 60px; }
.hbar > span { display: block; height: 10px; border-radius: 0 4px 4px 0; background: var(--accent); }
.month-bars { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 6px; align-items: end; height: 170px; padding: 4px 0 0; }
.mb { height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; gap: 4px; min-width: 0; }
.mb-bar { width: 70%; max-width: 36px; background: var(--accent); border-radius: 4px 4px 0 0; display: block; }
.mb-v { font-size: 12px; font-weight: 600; color: var(--text-2); }
.mb-l { font-size: 11px; color: var(--muted); }

/* ----- kalendar ----- */
.cal { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px; }
.cal-dow { font-size: 12px; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: 0.04em; text-align: center; padding: 4px 0; }
.cal-day { min-height: 112px; border: 1px solid var(--line-soft); background: var(--card); border-radius: 12px; padding: 6px; display: flex; flex-direction: column; gap: 4px; text-align: left; cursor: pointer; font: inherit; color: var(--text); min-width: 0; }
.cal-day:hover { border-color: var(--line); background: var(--fill); }
.cal-day.out { opacity: 0.45; }
.cal-day.off .cal-num { color: var(--red); }
.cal-day.sel { border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent-soft); }
.cal-num { font-size: 13px; font-weight: 600; width: 26px; height: 26px; border-radius: 13px; display: inline-flex; align-items: center; justify-content: center; }
.cal-num.today { background: var(--accent); color: #fff !important; }
.cal-items { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.cal-item { font-size: 11px; font-weight: 600; padding: 2px 6px; border-radius: 6px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cal-more { font-size: 11px; color: var(--muted); padding-left: 4px; }
.cal-dots { display: none; gap: 3px; }
.cal-dots i { width: 6px; height: 6px; border-radius: 3px; display: block; }

/* ----- responsive ----- */
.m-only { display: none; }
@media (max-width: 700px) {
  .cal { gap: 3px; }
  .cal-day { min-height: 54px; padding: 4px; align-items: center; }
  .cal-items { display: none; }
  .cal-dots { display: flex; }
  .table.resp { min-width: 0; }
  .table.resp .tr { grid-template-columns: minmax(0, 1fr) auto !important; }
  .table.resp .m-hide { display: none; }
  .table.resp .m-only { display: block; font-size: 12px; color: var(--muted); }
}
@media (max-width: 900px) {
  .shell { flex-direction: column; }
  .side { display: none; }
  .side.open { display: flex; position: fixed; inset: 0; width: auto; height: auto; z-index: 40; border-right: 0; }
  .topbar { display: flex; align-items: center; justify-content: space-between; padding: 12px 16px; background: var(--side); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 30; }
  .main { padding: 20px 16px 48px; }
  .page-head h1 { font-size: 28px; }
  .grid-form { grid-template-columns: minmax(0, 1fr); }
  .search input { width: 120px; }
}

/* ---------- plan rada ---------- */
.roster { display: flex; flex-direction: column; }
.rr { display: grid; grid-template-columns: minmax(150px, 1.4fr) repeat(7, minmax(84px, 1fr)) 56px; gap: 4px; align-items: stretch; padding: 3px 0; }
.rr.rh { font-size: 13px; color: var(--muted); font-weight: 500; padding-bottom: 6px; border-bottom: 1px solid var(--line-soft); }
.rr.rh > span { display: flex; flex-direction: column; align-items: center; justify-content: flex-end; gap: 1px; padding: 4px 0; border-radius: 8px; }
.rr.rh > span:first-child { align-items: flex-start; }
.rr.rh b { color: var(--text); font-size: 15px; }
.rr.rh small { font-size: 10px; color: var(--danger); text-align: center; line-height: 1.1; }
.rr.rh .today { background: var(--accent-soft); color: var(--accent); }
.rr.rh .today b { color: var(--accent); }
.rr.rh .hol b { color: var(--danger); }
.rr .nm { display: flex; flex-direction: column; justify-content: center; min-width: 0; font-size: 14px; }
.rr .nm b { font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rr .nm small { color: var(--muted); font-size: 12px; }
.rc { min-height: 48px; border-radius: 10px; border: 1px dashed var(--line); background: transparent; cursor: pointer; display: flex; flex-direction: column; gap: 3px; align-items: stretch; justify-content: center; padding: 4px; font: inherit; color: inherit; }
.rc:hover { border-color: var(--accent); }
.rc .plus { color: var(--line); font-size: 18px; text-align: center; }
.rc:hover .plus { color: var(--accent); }
.rc.on { border: 0; background: var(--accent-soft); color: var(--accent); }
.rc.other { background: var(--fill); color: var(--muted); }
.rc.clash { box-shadow: inset 0 0 0 2px var(--danger); }
.rc.past { opacity: .55; }
.rc .sh { display: flex; flex-direction: column; align-items: center; font-size: 12px; font-variant-numeric: tabular-nums; line-height: 1.25; }
.rc .sh b { font-size: 13px; }
.rc .lv { font-size: 11px; font-weight: 600; border-radius: 6px; padding: 2px 4px; text-align: center; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rr .hrs { display: flex; align-items: center; justify-content: flex-end; font-weight: 600; font-variant-numeric: tabular-nums; }
.rr.rf { border-top: 1px solid var(--line-soft); padding-top: 8px; font-size: 13px; color: var(--muted); }
.rr.rf > span { text-align: center; }
.rr.rf > span:first-child { text-align: left; }
.tcell { border: 0; background: transparent; cursor: pointer; display: flex; align-items: center; justify-content: center; min-height: 36px; border-radius: 8px; font: inherit; }
.tcell:hover { background: var(--fill); }

/* ---------- zarade ---------- */
.steps { display: flex; gap: 6px; flex-wrap: wrap; }
.step { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: var(--muted); padding: 5px 10px 5px 6px; border-radius: 999px; background: var(--fill); }
.step b { width: 20px; height: 20px; border-radius: 10px; background: var(--line); color: #fff; font-size: 12px; display: inline-flex; align-items: center; justify-content: center; }
.step.done { color: #1E7D3A; } .step.done b { background: #34C759; }
.step.cur { color: var(--accent); background: var(--accent-soft); font-weight: 600; } .step.cur b { background: var(--accent); }
.table.pay .tr { align-items: center; }
.table.pay .person { position: relative; }
.table.pay .rm { position: absolute; right: 4px; top: 50%; transform: translateY(-50%); font-size: 18px; color: var(--muted); opacity: 0; }
.table.pay .tr:hover .rm { opacity: 1; }
.tr.leaver { background: #FDECEA; }
input.cell { width: 100%; min-width: 0; height: 34px; padding: 0 8px; border: 1px solid transparent; border-radius: 8px; background: var(--fill); font: inherit; font-size: 14px; font-variant-numeric: tabular-nums; }
input.cell:hover { border-color: var(--line); }
input.cell:focus { outline: none; border-color: var(--accent); background: #fff; }
input.cell.warn { border-color: #E8A33D; background: var(--amber-bg); }
.spin-sm { width: 16px; height: 16px; border: 2px solid var(--line); border-top-color: var(--accent); border-radius: 50%; animation: spin .8s linear infinite; flex: none; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- dolazak/odlazak u aplikaciji ---------- */
.ci-card { gap: 14px; }
.ci-status { display: flex; align-items: center; gap: 12px; }
.ci-status .dot { width: 12px; height: 12px; border-radius: 50%; background: #AEAEB2; flex: none; }
.ci-status.in .dot { background: #34C759; box-shadow: 0 0 0 4px rgba(52,199,89,.18); }
.ci-status b { display: block; font-size: 17px; }
.ci-status span { color: var(--muted); font-size: 14px; }
.ci-btns { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.ci-btn { min-height: 64px; border-radius: 16px; border: 0; font: inherit; font-size: 17px; font-weight: 700; color: #fff; display: flex; align-items: center; justify-content: center; gap: 8px; cursor: pointer; }
.ci-btn.in { background: #1E7D3A; } .ci-btn.out { background: #C4251C; }
.ci-btn.soft { background: var(--card, #fff); color: var(--text); border: 1.5px solid var(--line); }
.ci-res { border-radius: 14px; padding: 14px 16px; display: flex; flex-direction: column; gap: 6px; font-size: 15px; line-height: 1.4; }
.ci-res.ok { background: #E9F5EC; color: #0D5C27; } .ci-res.err { background: #FDECEA; color: #A31A16; } .ci-res.busy { background: var(--accent-soft); color: var(--accent); }
.ci-scan { position: fixed; inset: 0; z-index: 60; background: #000; color: #fff; display: flex; flex-direction: column; }
.ci-scan-top { display: flex; align-items: center; justify-content: space-between; padding: max(14px, env(safe-area-inset-top)) 16px 12px; font-size: 17px; }
.ci-video { position: relative; flex: 1; overflow: hidden; }
.ci-video video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.ci-frame { position: absolute; left: 50%; top: 50%; width: min(70vw, 300px); aspect-ratio: 1; transform: translate(-50%, -50%); border: 3px solid rgba(255,255,255,.9); border-radius: 22px; box-shadow: 0 0 0 9999px rgba(0,0,0,.35); }
.ci-hint { text-align: center; color: #d1d1d6; font-size: 15px; padding: 14px 20px; margin: 0; }
.install-card { gap: 12px; border: 1.5px solid var(--accent-soft); }
.install-steps { margin: 0; padding-left: 20px; display: flex; flex-direction: column; gap: 10px; font-size: 15px; line-height: 1.45; }
.share-ico { display: inline-flex; vertical-align: middle; color: var(--accent); }
.me { gap: 8px; } .me .icon-btn { width: 34px; height: 34px; flex: none; }

/* =====================================================================
   TEMA „Tenero" (2026) – boje: krem #FAF9ED · indigo #111E99 · crvena #D12C4D · zelena #298A16
   Mijenja samo izgled; sve iznad ostaje kao osnova.
   ===================================================================== */
:root {
  --bg: #FAF9ED;
  --card: #FFFFFF;
  --text: #15173A;
  --text-2: #3B3E5C;
  --muted: #7B7D93;
  --line: #E7E5D6;
  --line-soft: #F0EEE2;
  --fill: #F4F3E7;
  --input: #F5F4EA;
  --accent: #111E99;
  --accent-ink: #111E99;
  --accent-bright: #2733C8;
  --accent-soft: rgba(17, 30, 153, 0.08);
  --side: #0B1260;
  --side-text: rgba(255, 255, 255, 0.74);
  --green-bg: #EAF4E6; --green: #1F6B10; --green-solid: #298A16;
  --amber-bg: #FCF0DC; --amber: #8A5A0B;
  --red-bg: #FBEAEE;   --red: #B0213F; --red-solid: #D12C4D;
  --blue-bg: #ECEEFB;  --blue: #111E99;
  --danger: #D12C4D;
  --radius: 20px;
  --shadow: 0 1px 2px rgba(21, 23, 58, 0.04), 0 6px 24px rgba(21, 23, 58, 0.04);
  --shadow-hi: 0 2px 6px rgba(21, 23, 58, 0.06), 0 14px 34px rgba(21, 23, 58, 0.08);
  --ease: cubic-bezier(.2, .7, .2, 1);
}
a { color: var(--accent); }
a:hover { color: var(--accent-bright); }
::selection { background: rgba(17, 30, 153, 0.16); }

/* ----- bočni meni ----- */
.side { background: var(--side); border-right: 0; color: #fff; padding: 26px 16px 18px; }
.side .brand { color: #fff; }
.side .brand small { color: rgba(255, 255, 255, 0.55); }
.side .icon-btn { background: rgba(255, 255, 255, 0.1); color: #fff; }
.nav { gap: 4px; }
.nav a { color: var(--side-text); min-height: 44px; border-radius: 12px; transition: background .2s var(--ease), color .2s var(--ease), transform .2s var(--ease); }
.nav a:hover { background: rgba(255, 255, 255, 0.08); color: #fff; }
.nav a.on { background: var(--accent-bright); color: #fff; font-weight: 600; box-shadow: 0 6px 18px rgba(39, 51, 200, 0.45); }
.nav a .badge { background: var(--red-solid); box-shadow: 0 0 0 2px var(--side); }
.nav a.on .badge { box-shadow: 0 0 0 2px var(--accent-bright); }
.me { background: rgba(255, 255, 255, 0.06); border: 1px solid rgba(255, 255, 255, 0.1); color: #fff; }
.me .who span { color: rgba(255, 255, 255, 0.55); }
.me .icon-btn { background: rgba(255, 255, 255, 0.1); color: #fff; }
.me .icon-btn:hover { background: rgba(255, 255, 255, 0.18); }
.me .avatar.dark { background: #fff; color: var(--side); }
@media (max-width: 900px) {
  .topbar { background: var(--side); border-bottom: 0; color: #fff; }
  .topbar .brand small { color: rgba(255, 255, 255, 0.55); }
  .topbar .icon-btn { background: rgba(255, 255, 255, 0.12); color: #fff; }
}

/* ----- zaglavlje stranice: naslov pa podnaslov ----- */
.page-head { align-items: center; }
.page-head .t { flex-direction: column-reverse; gap: 2px; }
.page-head h1 { font-size: 30px; }
.page-head .eyebrow { font-size: 14px; font-weight: 400; }

/* ----- kartice ----- */
.card, .tile, .profile-head { border: 1px solid var(--line-soft); box-shadow: var(--shadow); }
.card { border-radius: var(--radius); padding: 24px; }
.card-head h2 { font-size: 20px; font-weight: 600; letter-spacing: -0.015em; }
.profile-head { border-radius: 24px; }

/* ----- pločice sa brojevima (obojene, kao u dizajnu) ----- */
.tile { position: relative; display: grid; grid-template-columns: auto minmax(0, 1fr); grid-template-areas: "i k" "v v" "s s"; align-items: center; column-gap: 12px; row-gap: 18px; padding: 18px 18px 16px; border-radius: var(--radius); transition: transform .25s var(--ease), box-shadow .25s var(--ease); }
.tile .ti { grid-area: i; width: 40px; height: 40px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; color: #fff; background: var(--accent); }
.tile .k { grid-area: k; font-size: 15px; font-weight: 600; color: var(--text); }
.tile .v { grid-area: v; font-size: 34px; line-height: 1; }
.tile .s { grid-area: s; justify-self: start; font-size: 12px; font-weight: 500; color: var(--text-2); background: rgba(255, 255, 255, 0.85); border-radius: 999px; padding: 4px 10px; max-width: 100%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-top: -10px; }
.tile .s:empty { display: none; }
.tiles > .tile:nth-child(4n+1) { background: #EEF0FC; } .tiles > .tile:nth-child(4n+1) .ti { background: var(--accent-bright); }
.tiles > .tile:nth-child(4n+2) { background: #FCEDF0; } .tiles > .tile:nth-child(4n+2) .ti { background: var(--red-solid); }
.tiles > .tile:nth-child(4n+3) { background: #ECF6E8; } .tiles > .tile:nth-child(4n+3) .ti { background: var(--green-solid); }
.tiles > .tile:nth-child(4n+4) { background: #FDF3E2; } .tiles > .tile:nth-child(4n+4) .ti { background: #D98A1C; }
a.tile:hover { transform: translateY(-3px); box-shadow: var(--shadow-hi); color: inherit; }
.tile .v.warn { color: var(--red-solid); }
.tile .v.acc { color: var(--accent); }

/* ----- dugmad ----- */
.btn { height: 40px; border-radius: 999px; padding: 0 18px; border-color: var(--line); transition: background .15s var(--ease), border-color .15s var(--ease), transform .1s var(--ease), box-shadow .15s var(--ease); }
.btn:hover { background: #FBFAF3; border-color: #D9D6C3; }
.btn:active:not(:disabled) { transform: scale(.97); }
.btn.primary { background: var(--accent); border-color: var(--accent); box-shadow: 0 4px 14px rgba(17, 30, 153, 0.22); }
.btn.primary:hover { background: var(--accent-bright); border-color: var(--accent-bright); }
.btn.ghost { background: var(--fill); border-color: transparent; }
.btn.ghost:hover { background: #ECEADB; }
.btn.danger { color: var(--red-solid); }
.btn.danger:hover { background: var(--red-bg); border-color: #F2C6D0; }
.btn.lg { height: 52px; border-radius: 999px; }
.icon-btn { border-radius: 50%; background: var(--fill); transition: background .15s var(--ease), transform .1s var(--ease); }
.icon-btn:hover { background: #ECEADB; }
.icon-btn:active { transform: scale(.94); }
.link-btn { color: var(--accent); }
.link-btn:hover { color: var(--accent-bright); }

/* ----- filteri (kao „All / Pending / Completed") ----- */
.chip { min-height: 34px; border-radius: 10px; padding: 0 12px; font-size: 13px; transition: all .15s var(--ease); }
.chip:hover { border-color: #CFCCB8; }
.chip.on { background: var(--blue-bg); border-color: rgba(17, 30, 153, 0.45); color: var(--accent); }
.chip.on .n { color: var(--accent); }

/* ----- statusi ----- */
.pill { padding: 5px 12px; font-size: 12px; font-weight: 600; }
.pill.green { color: var(--green-solid); }
.pill.red { color: var(--red-solid); }
.badge { background: var(--red-solid); }

/* ----- avatari ----- */
.avatar { background: var(--blue-bg); color: var(--accent); font-weight: 700; }
.avatar.xl { background: linear-gradient(135deg, #2733C8, #111E99); color: #fff; box-shadow: 0 8px 22px rgba(17, 30, 153, 0.25); }

/* ----- polja ----- */
.field input, .field select, .field textarea { background: var(--input); border-color: transparent; border-radius: 12px; transition: border-color .15s, box-shadow .15s, background .15s; }
.field input:hover, .field select:hover, .field textarea:hover { border-color: var(--line); }
.field input:focus, .field select:focus, .field textarea:focus { background: #fff; border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }
.search, .select-inline { background: var(--input); }
.check input, input[type=checkbox], input[type=radio] { accent-color: var(--accent); }
input.cell { background: var(--input); }

/* ----- tabele i liste ----- */
.tr { padding: 13px 0; border-top-color: var(--line-soft); }
.tr.th { text-transform: none; letter-spacing: 0; font-size: 13px; font-weight: 500; color: var(--muted); padding: 10px 0; border-bottom: 1px solid var(--line); }
.tr.th + .tr { border-top: 0; }
a.tr, button.list-row, .list-row { transition: background .15s var(--ease); }
a.tr:hover { background: linear-gradient(90deg, transparent, #F7F6EC 1.5%, #F7F6EC 98.5%, transparent); }
button.list-row:hover { background: #F8F7EE; }
.list-row { border-top-color: var(--line-soft); }
.kv { border-top-color: var(--line-soft); }

/* ----- kartice (tabs) ----- */
.tabs { border-bottom-color: var(--line); gap: 2px; }
.tabs button { transition: color .15s; }
.tabs button:hover { color: var(--text); }
.tabs button.on { color: var(--accent); border-bottom-width: 3px; }

/* ----- trake / grafikoni ----- */
.bar, .hbar { background: var(--line-soft); }
.bar > span, .hbar > span { background: var(--accent-bright); }
.mb-bar { background: linear-gradient(180deg, #2733C8, #111E99); border-radius: 8px 8px 3px 3px; }
.bar { height: 10px; border-radius: 6px; } .bar > span { height: 10px; border-radius: 6px; }

/* ----- obavještenja, upozorenja ----- */
.note { background: #F3F2E6; color: var(--text-2); border-radius: 14px; }
.alert { background: var(--red-bg); color: var(--red); border-radius: 14px; }
.toast { background: var(--side); border-radius: 999px; padding: 12px 20px; }
.toast.err { background: var(--red-solid); }

/* ----- modal ----- */
.overlay { background: rgba(11, 18, 96, 0.32); backdrop-filter: blur(3px); -webkit-backdrop-filter: blur(3px); }
.modal { border-radius: 26px; box-shadow: 0 30px 80px rgba(11, 18, 96, 0.28); animation: pop .22s var(--ease); }
.modal-foot { border-top-color: var(--line-soft); }

/* ----- kalendar i raspored ----- */
.cal-day { border-color: var(--line-soft); border-radius: 14px; transition: border-color .15s, background .15s; }
.cal-day:hover { background: #FBFAF2; }
.cal-num.today { background: var(--accent-bright); }
.rc { border-radius: 12px; transition: border-color .15s, background .15s, transform .1s; }
.rc.on { background: var(--blue-bg); color: var(--accent); }
.rc:active { transform: scale(.97); }
.rc.clash { box-shadow: inset 0 0 0 2px var(--red-solid); }
.step.done { color: var(--green-solid); } .step.done b { background: var(--green-solid); }
.step.cur b { background: var(--accent); }

/* ----- zaposleni (telefon) ----- */
.emp-head h1 { font-size: 30px; }
.ci-status.in .dot { background: var(--green-solid); box-shadow: 0 0 0 4px rgba(41, 138, 22, 0.18); animation: pulse 2.4s ease-in-out infinite; }
.ci-btn { border-radius: 18px; transition: transform .1s var(--ease), box-shadow .2s var(--ease); }
.ci-btn.in { background: var(--green-solid); box-shadow: 0 8px 20px rgba(41, 138, 22, 0.25); }
.ci-btn.out { background: var(--red-solid); box-shadow: 0 8px 20px rgba(209, 44, 77, 0.25); }
.ci-btn.soft { background: #fff; color: var(--text); border: 1.5px solid var(--line); box-shadow: none; }
.ci-btn:active { transform: scale(.97); }
.ci-res.ok { background: var(--green-bg); color: var(--green); }
.ci-res.err { background: var(--red-bg); color: var(--red); }
.install-card { border: 1.5px solid rgba(17, 30, 153, 0.18); background: linear-gradient(180deg, #F3F4FD, #fff); }

/* ----- prijava: podijeljen ekran (samo ekran za prijavu) ----- */
.auth { background: var(--bg); }
.auth-card { border: 1px solid var(--line-soft); box-shadow: var(--shadow-hi); }
.auth.split { padding: 0; align-items: stretch; }
.auth-art { flex: 1 1 52%; position: relative; overflow: hidden; display: flex; flex-direction: column; justify-content: flex-end; padding: 56px; color: #fff;
  background: radial-gradient(120% 90% at 30% 35%, #2B3BDF 0%, #1626B0 32%, #0B1260 72%, #070B3E 100%); }
.auth-art::after { content: ""; position: absolute; inset: 0; background: radial-gradient(60% 50% at 75% 20%, rgba(255,255,255,0.12), transparent 70%); pointer-events: none; }
.auth-art .brand { color: #fff; position: absolute; top: 44px; left: 56px; padding: 0; }
.auth-art .brand small { color: rgba(255,255,255,.6); }
.auth-art h2 { font-size: clamp(26px, 3vw, 38px); line-height: 1.15; font-weight: 700; letter-spacing: -0.02em; max-width: 460px; position: relative; z-index: 1; }
.auth-art p { color: rgba(255,255,255,.72); font-size: 16px; margin: 12px 0 0; max-width: 420px; position: relative; z-index: 1; }
.art-cards { position: absolute; left: 50%; top: 40%; transform: translate(-50%, -50%); width: min(420px, 80%); z-index: 1; }
.art-card { background: #fff; color: var(--text); border-radius: 22px; padding: 18px 20px; box-shadow: 0 24px 60px rgba(4, 8, 50, .45); display: flex; flex-direction: column; gap: 10px; }
.art-card.a { width: 78%; animation: float 7s ease-in-out infinite; }
.art-card.b { width: 74%; margin: 18px 0 0 auto; position: relative; animation: float 7s ease-in-out -3.5s infinite; }
.art-card .lbl { font-size: 13px; color: var(--muted); }
.art-card .big { font-size: 30px; font-weight: 700; letter-spacing: -0.02em; }
.art-card .row2 { display: flex; align-items: center; gap: 10px; font-size: 14px; }
.art-card .dot { width: 10px; height: 10px; border-radius: 50%; background: var(--green-solid); box-shadow: 0 0 0 4px rgba(41,138,22,.15); }
.auth-side { flex: 1 1 48%; display: flex; align-items: center; justify-content: center; padding: 32px 20px; background: #fff; }
.auth.split .auth-card { box-shadow: none; border: 0; padding: 0; max-width: 380px; background: transparent; }
.auth.split .auth-card .brand { display: none; }
.auth.split .auth-card h1 { font-size: 30px; font-weight: 700; letter-spacing: -0.02em; }
@media (max-width: 900px) {
  .auth-art { display: none; }
  .auth-side { background: var(--bg); padding: 24px 16px; }
  .auth.split .auth-card { background: #fff; padding: 32px 24px 24px; border-radius: 26px; box-shadow: var(--shadow-hi); border: 1px solid var(--line-soft); }
  .auth.split .auth-card .brand { display: flex; }
}

/* ----- pokreti ----- */
@keyframes pop { from { transform: translateY(10px) scale(.97); opacity: 0; } }
@keyframes enter { from { transform: translateY(10px); opacity: 0; } }
@keyframes grow-x { from { transform: scaleX(0); } }
@keyframes grow-y { from { transform: scaleY(0); } }
@keyframes float { 50% { transform: translateY(-8px); } }
@keyframes pulse { 50% { box-shadow: 0 0 0 7px rgba(41, 138, 22, 0.08); } }
.main > *, .emp > * { animation: enter .42s var(--ease) backwards; }
.main > *:nth-child(2), .emp > *:nth-child(2) { animation-delay: .04s; }
.main > *:nth-child(3), .emp > *:nth-child(3) { animation-delay: .08s; }
.main > *:nth-child(4), .emp > *:nth-child(4) { animation-delay: .12s; }
.main > *:nth-child(5), .emp > *:nth-child(5) { animation-delay: .16s; }
.main > *:nth-child(n+6), .emp > *:nth-child(n+6) { animation-delay: .2s; }
.tiles > .tile { animation: enter .45s var(--ease) backwards; }
.tiles > .tile:nth-child(2) { animation-delay: .05s; } .tiles > .tile:nth-child(3) { animation-delay: .1s; }
.tiles > .tile:nth-child(4) { animation-delay: .15s; } .tiles > .tile:nth-child(5) { animation-delay: .2s; }
.bar > span, .hbar > span { transform-origin: left; animation: grow-x .7s var(--ease) backwards .15s; }
.mb-bar { transform-origin: bottom; animation: grow-y .7s var(--ease) backwards .15s; }
.toast { animation: pop .25s var(--ease); }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* =====================================================================
   IKONE: duotone sa prelivom (Solar Bold Duotone) + animirane ikone na kontrolnoj tabli
   ===================================================================== */
.ico { display: inline-block; flex: none; vertical-align: middle;
  background: currentColor;
  background: var(--ig, linear-gradient(150deg, color-mix(in srgb, currentColor 58%, #ffffff) 0%, currentColor 72%));
  -webkit-mask: var(--i) center / contain no-repeat; mask: var(--i) center / contain no-repeat;
  transition: transform .25s var(--ease); }
.ico-line { flex: none; }
/* boje prema mjestu */
.side .ico { --ig: linear-gradient(150deg, #FFFFFF 0%, #A9B5FF 100%); }
.nav a.on .ico { --ig: linear-gradient(150deg, #FFFFFF 0%, #D6DCFF 100%); }
.btn.primary .ico, .ci-btn .ico { --ig: linear-gradient(150deg, #FFFFFF 0%, rgba(255,255,255,.75) 100%); }
.btn:not(.primary):not(.danger) .ico, .icon-btn .ico, .link-btn .ico, .list-row .ico { --ig: linear-gradient(150deg, #5966F0 0%, #111E99 75%); }
.btn.danger .ico { --ig: linear-gradient(150deg, #F07A90 0%, #D12C4D 75%); }
.me .icon-btn .ico, .topbar .ico { --ig: linear-gradient(150deg, #FFFFFF 0%, #A9B5FF 100%); }
/* mali pokreti ikona */
.nav a:hover .ico { transform: translateX(2px) rotate(-6deg); }
.nav a.on .ico { animation: ico-pop .45s var(--ease); }
.btn:hover .ico, .icon-btn:hover .ico { transform: scale(1.12); }
.btn:hover .ico-plus { transform: rotate(90deg) scale(1.08); }
@keyframes ico-pop { 40% { transform: scale(1.25) rotate(-8deg); } }

/* pločice: krug sa prelivom i bijela animirana ikona */
.tile .ti { background: linear-gradient(145deg, #4C5AF0, #111E99); box-shadow: 0 6px 14px rgba(17, 30, 153, .25); color: #fff; }
.tiles > .tile:nth-child(4n+1) .ti { background: linear-gradient(145deg, #5966F0, #111E99); box-shadow: 0 6px 14px rgba(17, 30, 153, .28); }
.tiles > .tile:nth-child(4n+2) .ti { background: linear-gradient(145deg, #EE6F88, #D12C4D); box-shadow: 0 6px 14px rgba(209, 44, 77, .28); }
.tiles > .tile:nth-child(4n+3) .ti { background: linear-gradient(145deg, #5FB64A, #298A16); box-shadow: 0 6px 14px rgba(41, 138, 22, .28); }
.tiles > .tile:nth-child(4n+4) .ti { background: linear-gradient(145deg, #F2B04F, #D98A1C); box-shadow: 0 6px 14px rgba(217, 138, 28, .28); }
.tile .ti { width: 44px; height: 44px; }

/* animirane ikone: svaki dio ima svoj pokret; jednom pri prikazu, stalno dok je miš iznad */
.anim { fill: currentColor; overflow: visible; }
.anim * { transform-box: view-box; }
.anim .a-back  { transform-origin: 15px 12px; animation: a-bob 1.1s var(--ease) .5s 1 both; }
.anim .a-front { transform-origin: 9px 12px;  animation: a-bob 1.1s var(--ease) .65s 1 both; }
.anim .a-line  { transform-origin: 7.5px 12px; animation: a-write .6s var(--ease) both; }
.anim .a-l3 { animation-delay: .45s; } .anim .a-l2 { animation-delay: .6s; } .anim .a-l1 { animation-delay: .75s; }
.anim .a-hand  { transform-origin: 12px 12px; animation: a-tick 1.4s cubic-bezier(.5,0,.2,1) .5s 1 both; }
.anim .a-canopy { transform-origin: 12px 13px; animation: a-sway 1.6s ease-in-out .5s 1 both; }
.anim .a-mark  { transform-origin: 12px 12px; animation: a-alert 1.2s var(--ease) .5s 1 both; }
.anim .a-ring  { transform-origin: 12px 12px; animation: a-ring 1.6s var(--ease) .2s 1 both; }
.anim .a-tick  { transform-origin: 11px 12px; animation: a-tickpop .6s var(--ease) .55s 1 both; }
a.tile:hover .a-back, .tile:hover .a-back { animation: a-bob 1.1s var(--ease) infinite; }
a.tile:hover .a-front, .tile:hover .a-front { animation: a-bob 1.1s var(--ease) .15s infinite; }
.tile:hover .a-line { animation: a-write 1.6s var(--ease) infinite; }
.tile:hover .a-l2 { animation-delay: .15s; } .tile:hover .a-l1 { animation-delay: .3s; }
.tile:hover .a-hand { animation: a-spin 1.8s linear infinite; }
.tile:hover .a-canopy { animation: a-sway 1.6s ease-in-out infinite; }
.tile:hover .a-mark { animation: a-alert 1.2s var(--ease) infinite; }
.ok-anim { display: flex; justify-content: center; padding-top: 18px; color: var(--green-solid); }
.ok-anim + .empty-state { padding-top: 10px; }
.ok-anim .anim { filter: drop-shadow(0 8px 16px rgba(41, 138, 22, .22)); }
@keyframes a-bob { 0%, 100% { transform: translateY(0); } 35% { transform: translateY(-2.2px); } 60% { transform: translateY(.6px); } }
@keyframes a-write { 0% { transform: scaleX(0); opacity: 0; } 15% { opacity: 1; } 60%, 100% { transform: scaleX(1); } }
@keyframes a-tick { 0% { transform: rotate(-120deg); } 100% { transform: rotate(0deg); } }
@keyframes a-spin { to { transform: rotate(360deg); } }
@keyframes a-sway { 0%, 100% { transform: rotate(0); } 25% { transform: rotate(-9deg); } 60% { transform: rotate(6deg); } 85% { transform: rotate(-2deg); } }
@keyframes a-alert { 0%, 100% { transform: scale(1); } 20% { transform: scale(1.35) translateY(-1px); } 40% { transform: scale(.92); } 60% { transform: scale(1.08); } }
@keyframes a-ring { 0% { transform: scale(.4); opacity: 0; } 60% { transform: scale(1.08); opacity: .5; } 100% { transform: scale(1); opacity: .5; } }
@keyframes a-tickpop { 0% { transform: scale(0) rotate(-25deg); opacity: 0; } 70% { transform: scale(1.18) rotate(4deg); opacity: 1; } 100% { transform: scale(1) rotate(0); opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .anim * { animation: none !important; } }

/* bočni meni: preliv od dubokog ka svjetlijem plavom */
.side { background: linear-gradient(180deg, #0B1260 0%, #111E99 58%, #2A38C4 100%); }
.side::before { content: ""; position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(120% 45% at 0% 0%, rgba(255, 255, 255, 0.07), transparent 60%),
              radial-gradient(90% 35% at 100% 100%, rgba(140, 160, 255, 0.22), transparent 70%); }
.side > * { position: relative; z-index: 1; }
.nav a.on { background: linear-gradient(135deg, #3B49E0 0%, #2733C8 100%); box-shadow: 0 6px 18px rgba(10, 16, 80, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.18); }
.nav a .badge { box-shadow: none; }
.me { background: rgba(255, 255, 255, 0.1); border-color: rgba(255, 255, 255, 0.16); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
@media (max-width: 900px) {
  .topbar { background: linear-gradient(90deg, #0B1260 0%, #111E99 70%, #2733C8 100%); }
  .side.open { background: linear-gradient(180deg, #0B1260 0%, #111E99 58%, #2A38C4 100%); }
}

/* Dolazak / odlazak: istaknuto samo dugme koje je sljedeće */
.ci-btns[class*="next-"] { grid-template-columns: 1fr; }
.ci-btns.next-out .ci-btn.out { order: -1; }
.ci-btn:not(.soft) { min-height: 72px; font-size: 19px; animation: ci-glow 2.4s ease-in-out infinite; }
.ci-btn.in:not(.soft) { --glow: rgba(41, 138, 22, 0.32); }
.ci-btn.out:not(.soft) { --glow: rgba(209, 44, 77, 0.32); }
.ci-btn.soft { min-height: 48px; font-size: 15px; font-weight: 600; color: #8A8FA3; background: transparent; border: 1.5px solid rgba(17, 30, 153, 0.12); }
.ci-btn.soft svg { width: 18px; height: 18px; }
@keyframes ci-glow { 0%, 100% { box-shadow: 0 8px 20px var(--glow), 0 0 0 0 var(--glow); } 50% { box-shadow: 0 8px 20px var(--glow), 0 0 0 7px transparent; } }
@media (prefers-reduced-motion: reduce) { .ci-btn:not(.soft) { animation: none; } }

/* Logo (crni PNG; na tamnoj pozadini se boji u bijelo) */
.logo { display: block; height: 26px; width: auto; flex: none; }
.brand { align-items: center; letter-spacing: 0; }
.brand small { align-self: flex-end; margin-bottom: 1px; }
.boot { display: grid; grid-auto-flow: column; place-content: center; align-items: end; gap: 10px; min-height: 100vh; min-height: 100dvh; padding: 0; }
.boot .logo, .boot span { margin-left: 0; }
.boot .logo { height: 42px; }
.boot span { margin-bottom: 3px; }
.auth-card .brand .logo { height: 36px; }
.auth-art .brand .logo { height: 30px; }
.side .logo, .topbar .logo, .auth-art .logo { filter: brightness(0) invert(1); }
.topbar .logo { height: 22px; }
.side .logo { height: 30px; }

/* Lozinka: prikaži / sakrij */
.pw-wrap { position: relative; display: block; width: 100%; }
.field .pw-wrap input { padding-right: 48px; }
.pw-eye { position: absolute; top: 50%; right: 4px; transform: translateY(-50%); width: 40px; height: 36px; border: 0; border-radius: 10px;
  background: transparent; color: var(--muted); display: inline-flex; align-items: center; justify-content: center; cursor: pointer; }
.pw-eye:hover { color: var(--accent); background: var(--accent-soft); }
.pw-eye[aria-pressed="true"] { color: var(--accent); }

/* Ključ u sidebaru je link */
a.icon-btn { text-decoration: none; }
.me .icon-btn.on { background: rgba(255, 255, 255, 0.24); }

/* Moj nalog */
.account-grid { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); gap: 20px; align-items: start; max-width: 980px; }
.account-grid .card { gap: 12px; }
.account-grid h2 { font-size: 18px; margin: 0; }
.ok-note { background: var(--green-bg); color: var(--green); border-radius: 12px; padding: 10px 14px; font-size: 14px; font-weight: 600; }
@media (max-width: 900px) { .account-grid { grid-template-columns: 1fr; } }

/* Profilne fotografije */
.avatar.has-photo { padding: 0; overflow: hidden; background: var(--line-soft); }
.avatar img { width: 100%; height: 100%; object-fit: cover; display: block; border-radius: 50%; }
.avatar.xl.has-photo { background: #fff; }
.me .avatar.dark.has-photo { box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.6); }
.photo-edit { position: relative; display: inline-flex; flex: none; }
.photo-btn { position: relative; padding: 0; border: 0; background: none; border-radius: 50%; cursor: pointer; display: inline-flex; }
.photo-btn:focus-visible { outline: 3px solid var(--accent-soft); outline-offset: 3px; }
.photo-badge { position: absolute; right: -2px; bottom: -2px; width: 28px; height: 28px; border-radius: 50%; background: var(--accent); color: #fff;
  display: flex; align-items: center; justify-content: center; border: 2.5px solid #fff; box-shadow: 0 3px 8px rgba(17, 30, 153, 0.25); transition: transform .15s var(--ease); }
.photo-btn:hover .photo-badge { transform: scale(1.08); }
.photo-edit.busy .avatar { opacity: .5; }
.photo-edit.busy .photo-badge { animation: a-spin 1s linear infinite; }
.photo-menu { position: absolute; top: calc(100% + 8px); left: 0; z-index: 30; min-width: 210px; background: #fff; border-radius: 14px;
  box-shadow: 0 12px 32px rgba(10, 16, 80, 0.18), 0 0 0 1px var(--line); padding: 6px; display: flex; flex-direction: column; }
.photo-menu button { border: 0; background: none; text-align: left; padding: 10px 12px; border-radius: 10px; font: inherit; font-size: 15px; color: var(--text); cursor: pointer; }
.photo-menu button:hover { background: var(--fill); }
.photo-menu button.danger { color: var(--red-solid); }
.photo-hint { font-size: 13px; color: var(--accent); margin-top: 3px; }

/* Podešavanje fotografije */
.crop-wrap { display: flex; flex-direction: column; align-items: center; gap: 16px; }
.crop-stage { position: relative; overflow: hidden; border-radius: 20px; background: #0B1260; touch-action: none; cursor: grab; user-select: none; -webkit-user-select: none; }
.crop-stage:active { cursor: grabbing; }
.crop-stage img { position: absolute; left: 50%; top: 50%; max-width: none; pointer-events: none; user-select: none; -webkit-user-drag: none; }
.crop-ring { position: absolute; inset: 0; border-radius: 50%; box-shadow: 0 0 0 999px rgba(11, 18, 96, 0.55); outline: 2px solid rgba(255, 255, 255, 0.9); outline-offset: -2px; pointer-events: none; }
.crop-zoom { display: flex; align-items: center; gap: 10px; width: 100%; max-width: 320px; }
.crop-zoom input[type=range] { flex: 1; accent-color: var(--accent); height: 28px; }
.crop-zoom .icon-btn { width: 36px; height: 36px; font-size: 20px; font-weight: 600; color: var(--accent); flex: none; }
