:root {
  --sos-blue: #00abec;
  --sos-blue-dark: #1c325d;
  --sos-blue-soft: #e4f3fb;
  --sos-blue-line: #cde8f8;
  --sos-red: #de5a6c;
  --sos-red-soft: #f9e5e4;
  --bg: #f4f8fc;
  --surface: #ffffff;
  --surface-2: #f8fbfe;
  --text: #1c325d;
  --muted: #6b7890;
  --border: #d9e5ef;
  --shadow: 0 14px 34px rgba(28, 50, 93, .09);
  --shadow-soft: 0 6px 18px rgba(28, 50, 93, .06);
  --radius: 18px;
  --radius-sm: 12px;
  --sidebar: 270px;
  --topbar: 72px;
  --font: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
}

[data-theme="dark"] {
  --bg: #0f172a;
  --surface: #121d33;
  --surface-2: #17243e;
  --text: #eef7ff;
  --muted: #afbfd2;
  --border: #2a3b57;
  --shadow: 0 18px 44px rgba(0, 0, 0, .28);
  --shadow-soft: 0 8px 20px rgba(0, 0, 0, .18);
}

* { box-sizing: border-box; }
html { min-height: 100%; overflow-x: hidden; }
body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
a { color: #087aa4; text-decoration: none; }
a:hover { text-decoration: underline; }
button, input, select, textarea { font: inherit; }
body.scroll-blokiran { overflow: hidden; }

/* Login */
.auth-view {
  background:
    radial-gradient(circle at top left, rgba(0, 171, 236, .18), transparent 36rem),
    linear-gradient(135deg, #edf8fd, #ffffff 58%, #f9e5e4);
}
.login-shell {
  min-height: 100vh;
  min-height: 100dvh;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(380px, 520px);
}
.login-hero {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 32px;
  min-height: 100%;
  padding: clamp(30px, 5vw, 58px);
  color: #fff;
  background: linear-gradient(145deg, var(--sos-blue-dark), #254575 72%, #16305c);
  overflow: hidden;
}
.login-hero::before {
  content: "";
  position: absolute;
  width: 520px;
  height: 520px;
  right: -190px;
  top: -190px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(0, 171, 236, .28), transparent 67%);
  pointer-events: none;
}
.login-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image: linear-gradient(116deg, transparent 0 52%, rgba(255,255,255,.045) 52% 53%, transparent 53% 100%);
  pointer-events: none;
}
.hero-linije, .hero-cestice, .sidebar-linije, .sidebar-cestice { display: none; }
.hero-brend, .hero-sadrzaj, .hero-podnozje { position: relative; z-index: 1; }
.hero-brend, .sidebar-brend { display: flex; align-items: center; gap: 14px; }
.brand-mark {
  display: inline-grid;
  place-items: center;
  width: 46px;
  height: 46px;
  min-width: 46px;
  border-radius: 14px;
  background: #fff;
  color: var(--sos-blue-dark);
  font-weight: 900;
  letter-spacing: -.04em;
  box-shadow: 0 10px 26px rgba(0,0,0,.22), inset 0 0 0 1px rgba(0,171,236,.25);
}
.brand-mark-large { width: 70px; height: 70px; min-width: 70px; border-radius: 22px; font-size: 22px; }
.hero-naziv, .sidebar-brend-tekst { display: grid; gap: 2px; min-width: 0; }
.hero-naziv strong, .sidebar-brend-tekst strong { color: #fff; font-weight: 850; line-height: 1.2; }
.hero-naziv span, .sidebar-brend-tekst span { color: #84ccf1; font-size: 11px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; }
.hero-sadrzaj { max-width: 640px; }
.hero-sadrzaj h1 { margin: 0 0 18px; font-size: clamp(34px, 5vw, 58px); line-height: 1.04; letter-spacing: -.05em; }
.hero-sadrzaj p { margin: 0; max-width: 560px; color: rgba(255,255,255,.78); font-size: 18px; }
.hero-tagovi { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 26px; }
.hero-tagovi span { padding: 8px 12px; border: 1px solid rgba(132,204,241,.34); border-radius: 999px; background: rgba(255,255,255,.07); color: #fff; font-size: 13px; font-weight: 800; }
.hero-podnozje { margin: 0; color: rgba(255,255,255,.56); font-size: 12px; }
.login-panel { display: grid; align-items: center; padding: clamp(22px, 5vw, 54px); }
.login-card-wrap { width: 100%; max-width: 430px; margin: 0 auto; }
.login-card h2 { margin: 8px 0; font-size: 30px; letter-spacing: -.04em; }
.login-card p { margin-top: 0; }

/* App layout */
.app-shell { display: flex; min-height: 100vh; min-height: 100dvh; }
.sidebar {
  position: fixed;
  left: 0;
  top: 0;
  bottom: 0;
  z-index: 90;
  width: var(--sidebar);
  display: flex;
  flex-direction: column;
  background: linear-gradient(180deg, var(--sos-blue-dark), #152b51);
  color: #fff;
  box-shadow: 10px 0 24px rgba(28, 50, 93, .10);
}
.sidebar::before {
  content: "";
  position: absolute;
  width: 330px;
  height: 330px;
  right: -165px;
  top: -120px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(0,171,236,.22), transparent 70%);
  pointer-events: none;
}
.sidebar-brend {
  position: relative;
  z-index: 1;
  min-height: var(--topbar);
  padding: 18px 20px;
  border-bottom: 1px solid rgba(255,255,255,.10);
  text-decoration: none;
}
.sidebar-brend:hover { text-decoration: none; }
.sidebar-brend-tekst strong { display: block; max-width: 170px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13px; }
.sidebar-nav {
  position: relative;
  z-index: 1;
  flex: 1;
  padding: 16px 12px;
  overflow-y: auto;
}
.nav-sekcija-naslov {
  margin: 14px 10px 6px;
  color: rgba(132,204,241,.70);
  font-size: 10px;
  font-weight: 900;
  letter-spacing: .12em;
  text-transform: uppercase;
}
.nav-link {
  display: flex;
  align-items: center;
  gap: 11px;
  min-height: 42px;
  padding: 10px 12px;
  margin-bottom: 4px;
  border-radius: 12px;
  color: rgba(255,255,255,.76);
  font-size: 14px;
  font-weight: 780;
  text-decoration: none;
}
.nav-link:hover, .nav-link.aktivan {
  background: rgba(0,171,236,.16);
  color: #fff;
  text-decoration: none;
}
.nav-link.aktivan { box-shadow: inset 3px 0 0 var(--sos-blue); }
.nav-icon { display: inline-grid; place-items: center; width: 22px; color: #84ccf1; font-weight: 900; }
.sidebar-podnozje {
  position: relative;
  z-index: 1;
  padding: 16px 20px;
  border-top: 1px solid rgba(255,255,255,.10);
  color: rgba(255,255,255,.52);
  font-size: 11px;
}
.sidebar-overlay { display: none; }
.sadrzaj {
  flex: 1;
  min-width: 0;
  margin-left: var(--sidebar);
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}
.topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  min-height: var(--topbar);
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 28px;
  background: rgba(255,255,255,.94);
  border-bottom: 1px solid var(--border);
  box-shadow: var(--shadow-soft);
  backdrop-filter: blur(10px);
}
[data-theme="dark"] .topbar { background: rgba(18,29,51,.94); }
.topbar::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--sos-blue), #84ccf1, var(--sos-red));
}
.mob-toggle { display: none; }
.topbar-naslov {
  flex: 1;
  min-width: 0;
  font-size: 22px;
  line-height: 1.15;
  font-weight: 850;
  letter-spacing: -.03em;
  color: var(--text);
}
.topbar-naslov small {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 650;
  letter-spacing: 0;
}
.topbar-akcije { display: flex; align-items: center; gap: 10px; }
.korisnik-chip {
  display: flex;
  align-items: center;
  gap: 9px;
  min-width: 0;
  padding: 5px 12px 5px 5px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface);
}
.avatar { display: inline-grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: var(--sos-blue-dark); color: #fff; font-size: 12px; font-weight: 900; }
.korisnik-ime { display: grid; color: var(--text); font-size: 13px; font-weight: 850; line-height: 1.15; }
.korisnik-ime small { color: var(--muted); font-size: 11px; font-weight: 700; }
.stranica { flex: 1; width: 100%; max-width: 1280px; margin: 0 auto; padding: 28px; }
.footer { width: 100%; max-width: 1280px; margin: 0 auto; padding: 0 28px 28px; color: var(--muted); font-size: 12px; }

/* Components */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.card-pad, .ticket-main, .side-stack > .card, .user-layout > .card, .login-card { padding: 22px; }
.badge {
  display: inline-flex;
  width: fit-content;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  border-radius: 999px;
  background: var(--sos-blue-soft);
  color: #087aa4;
  font-size: 12px;
  font-weight: 900;
}
.muted { color: var(--muted); }
.small { font-size: 13px; }
.empty-state { margin: 0; padding: 18px; border: 1px dashed var(--border); border-radius: var(--radius-sm); background: var(--surface-2); color: var(--muted); }
.alert { margin-bottom: 16px; padding: 13px 14px; border-radius: var(--radius-sm); border: 1px solid var(--border); font-weight: 780; }
.alert-success { background: rgba(21,128,61,.10); color: #15803d; border-color: rgba(21,128,61,.22); }
.alert-danger { background: rgba(222,90,108,.13); color: #b42335; border-color: rgba(222,90,108,.28); }
.alert-warning { background: rgba(180,83,9,.12); color: #b45309; border-color: rgba(180,83,9,.24); }
.noscript-box { margin: 12px; padding: 12px; border-radius: 12px; background: #fff8e7; color: #8a5200; }

form { margin: 0; }
.stacked-form, .form-card, .comment-form, .compact-form { display: grid; gap: 15px; }
label { display: grid; gap: 7px; color: var(--text); font-size: 13px; font-weight: 850; }
input, select, textarea {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 12px 13px;
  background: var(--surface);
  color: var(--text);
  outline: none;
}
textarea { min-height: 120px; line-height: 1.6; resize: vertical; }
input:focus, select:focus, textarea:focus { border-color: var(--sos-blue); box-shadow: 0 0 0 4px rgba(0,171,236,.14); }
.polje-lozinka { display: flex; gap: 8px; }
.polje-lozinka input { flex: 1; }
.inline-check { display: inline-flex; align-items: center; gap: 8px; }
.inline-check input { width: auto; }
.button, button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 42px;
  border-radius: 12px;
  border: 1px solid transparent;
  padding: 10px 15px;
  font-weight: 900;
  line-height: 1;
  cursor: pointer;
  text-decoration: none;
  transition: transform .15s ease, box-shadow .15s ease, background .15s ease, border-color .15s ease;
}
.button:hover, button:hover { transform: translateY(-1px); text-decoration: none; }
.button-primary { background: var(--sos-red); color: #fff; box-shadow: 0 8px 20px rgba(222,90,108,.24); }
.button-primary:hover { background: #cf475b; color: #fff; }
.button-blue { background: var(--sos-blue); color: #fff; box-shadow: 0 8px 20px rgba(0,171,236,.22); }
.button-blue:hover { background: #079bd4; color: #fff; }
.button-light, .icon-button, .mob-toggle { background: var(--surface); color: var(--text); border-color: var(--border); }
.button-danger { background: var(--sos-red-soft); color: #b42335; border-color: rgba(222,90,108,.24); }
.icon-button, .mob-toggle { width: 42px; min-width: 42px; height: 42px; padding: 0; }
.inline-actions, .filter-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }

.dashboard-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; margin-bottom: 18px; }
.metric { position: relative; min-height: 126px; padding: 22px; }
.metric span { display: block; color: var(--muted); font-size: 13px; font-weight: 850; }
.metric strong { display: block; margin-top: 12px; font-size: 40px; line-height: 1; letter-spacing: -.04em; }
.metric small { display: block; margin-top: 8px; color: var(--muted); }
.metric-icon { position: absolute; top: 18px; right: 18px; display: grid; place-items: center; width: 38px; height: 38px; border-radius: 12px; background: var(--sos-blue-soft); color: var(--sos-blue-dark); font-weight: 900; }
.quick-card { margin-bottom: 18px; padding: 24px; color: #fff; background: linear-gradient(135deg, var(--sos-blue-dark), #294d80); overflow: hidden; }
.quick-card h2 { margin: 0 0 8px; font-size: 26px; letter-spacing: -.03em; }
.quick-card p { margin: 0; max-width: 760px; color: rgba(255,255,255,.78); }
.quick-card .inline-actions { margin-top: 18px; }
.section-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 16px; }
.section-heading h2, .section-heading h3 { margin: 8px 0 0; line-height: 1.15; letter-spacing: -.03em; }
.section-heading p { margin: 7px 0 0; color: var(--muted); }

.filters { display: grid; grid-template-columns: minmax(240px, 2fr) minmax(150px, 1fr) minmax(150px, 1fr) auto; gap: 14px; align-items: end; margin-bottom: 18px; padding: 18px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow-soft); }
.table-wrap { width: 100%; overflow-x: auto; border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--surface); }
table { width: 100%; min-width: 760px; border-collapse: collapse; }
th, td { padding: 13px 12px; border-bottom: 1px solid var(--border); text-align: left; vertical-align: middle; }
th { background: var(--surface-2); color: var(--muted); font-size: 11px; font-weight: 900; letter-spacing: .08em; text-transform: uppercase; }
tr:last-child td { border-bottom: 0; }
tr:hover td { background: rgba(0,171,236,.04); }
.ticket-title { display: grid; gap: 4px; min-width: 220px; }
.ticket-title strong { color: var(--text); }
.ticket-title small { color: var(--muted); line-height: 1.35; }
.table-control { min-width: 120px; padding: 9px 10px; }
.pill { display: inline-flex; align-items: center; justify-content: center; white-space: nowrap; border-radius: 999px; padding: 6px 10px; font-size: 12px; font-weight: 900; }
.status-open { background: rgba(0,171,236,.14); color: #087aa4; }
.status-in_progress { background: rgba(28,50,93,.10); color: var(--text); }
.status-waiting { background: rgba(180,83,9,.13); color: #b45309; }
.status-resolved { background: rgba(21,128,61,.12); color: #15803d; }
.status-closed { background: rgba(120,132,158,.16); color: var(--muted); }
.priority-low { background: rgba(120,132,158,.15); color: var(--muted); }
.priority-normal { background: rgba(0,171,236,.14); color: #087aa4; }
.priority-high { background: rgba(180,83,9,.13); color: #b45309; }
.priority-urgent { background: rgba(222,90,108,.15); color: #b42335; }

.ticket-layout, .user-layout { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 18px; align-items: start; }
.narrow-card { max-width: 880px; margin: 0 auto; }
.ticket-title-row { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 18px; }
.ticket-title-row h2 { margin: 10px 0 0; font-size: 28px; line-height: 1.2; letter-spacing: -.03em; }
.ticket-badges { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; }
.meta-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin: 18px 0; }
.meta-grid div { padding: 13px; border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--surface-2); }
dt { color: var(--muted); font-size: 11px; font-weight: 900; letter-spacing: .08em; text-transform: uppercase; }
dd { margin: 5px 0 0; font-weight: 760; overflow-wrap: anywhere; }
.description-box { padding: 16px; border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--surface-2); line-height: 1.65; overflow-wrap: anywhere; }
hr { border: 0; border-top: 1px solid var(--border); margin: 24px 0; }
.comments, .side-stack { display: grid; gap: 14px; }
.comment { padding: 14px; border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--surface); }
.comment-internal { border-color: rgba(180,83,9,.30); background: rgba(180,83,9,.07); }
.comment-header { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 8px; color: var(--muted); font-size: 13px; }
.comment-header strong { color: var(--text); }
.comment-header em { color: #b45309; font-style: normal; font-weight: 900; }
.comment p { margin: 0; line-height: 1.6; overflow-wrap: anywhere; }
.timeline { margin: 14px 0 0; padding: 0; list-style: none; display: grid; gap: 10px; }
.timeline li { padding: 11px 12px; border: 1px solid var(--border); border-radius: 12px; background: var(--surface-2); color: var(--muted); font-size: 13px; line-height: 1.45; }
.timeline strong { display: block; color: var(--text); }

@media (max-width: 1160px) {
  .dashboard-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ticket-layout, .user-layout { grid-template-columns: 1fr; }
}
@media (max-width: 900px) {
  .login-shell { grid-template-columns: 1fr; }
  .login-hero { min-height: auto; }
  .hero-sadrzaj { padding: 22px 0; }
  .sidebar { transform: translateX(-105%); transition: transform .18s ease; }
  .sidebar.otvoren { transform: translateX(0); }
  .sidebar-overlay { display: block; position: fixed; inset: 0; z-index: 80; background: rgba(10,22,42,.48); opacity: 0; pointer-events: none; transition: opacity .18s ease; }
  .sidebar-overlay.aktivan { opacity: 1; pointer-events: auto; }
  .sadrzaj { margin-left: 0; }
  .mob-toggle { display: inline-flex; }
  .topbar { padding: 10px 16px; }
  .korisnik-ime { display: none; }
  .stranica { padding: 20px 16px; }
  .footer { padding: 0 16px 22px; }
  .filters { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .topbar-naslov { font-size: 18px; }
  .topbar-naslov small { display: none; }
  .topbar-akcije .button-light { display: none; }
  .dashboard-grid { grid-template-columns: 1fr; }
  .metric strong { font-size: 34px; }
  .section-heading, .ticket-title-row { flex-direction: column; align-items: stretch; }
  .ticket-badges { justify-content: flex-start; }
  .meta-grid { grid-template-columns: 1fr; }
  .inline-actions, .filter-actions { align-items: stretch; flex-direction: column; }
  .button, button { width: 100%; }
  .icon-button, .mob-toggle { width: 42px; }
  .polje-lozinka { flex-direction: column; }
  table { min-width: 700px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}

/* v3.8.0 — proširena forma za novi zahtev */
.ticket-create-card {
  width: 100%;
  max-width: 1440px;
  margin: 0 auto;
}
.ticket-create-card .section-heading { margin-bottom: 22px; }
.ticket-create-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 18px 20px;
}
.ticket-form-group {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 8px;
  position: relative;
  color: var(--sos-blue-dark);
  font-size: 14px;
  font-weight: 780;
}
.ticket-form-full { grid-column: 1 / -1; }
.ticket-form-label { color: var(--sos-blue-dark); font-weight: 780; }
.ticket-create-form input,
.ticket-create-form select,
.ticket-create-form textarea { width: 100%; }
.ticket-description-field textarea { min-height: 170px; padding-bottom: 34px; }
.description-counter {
  position: absolute;
  right: 14px;
  bottom: 11px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
  pointer-events: none;
}
.ticket-file-dropzone {
  display: block;
  padding: 24px 18px;
  border: 1.5px dashed color-mix(in srgb, var(--sos-blue) 42%, var(--border));
  border-radius: 16px;
  background: var(--surface-2);
  color: var(--text);
  text-align: center;
  cursor: pointer;
  transition: border-color .2s ease, background .2s ease, box-shadow .2s ease, transform .2s ease;
}
.ticket-file-dropzone:hover,
.ticket-file-dropzone:focus-visible,
.ticket-file-dropzone.is-dragover {
  border-color: var(--sos-blue);
  background: color-mix(in srgb, var(--sos-blue) 7%, var(--surface));
  box-shadow: 0 0 0 4px rgba(0, 171, 236, .10);
  outline: none;
}
.ticket-file-dropzone.is-dragover { transform: translateY(-2px); }
.ticket-file-dropzone strong { color: var(--sos-blue-dark); }
.ticket-file-dropzone small {
  display: block;
  margin-top: 7px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
}
.ticket-file-list { display: grid; gap: 9px; margin-top: 2px; }
.ticket-file-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 11px 13px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface);
}
.ticket-file-item > div { display: grid; min-width: 0; gap: 3px; }
.ticket-file-item strong { overflow: hidden; color: var(--text); font-size: 13px; text-overflow: ellipsis; white-space: nowrap; }
.ticket-file-item span { color: var(--muted); font-size: 12px; font-weight: 600; }
.ticket-file-remove {
  width: auto;
  min-width: auto;
  padding: 7px 11px;
  border: 1px solid rgba(220, 38, 38, .18);
  border-radius: 9px;
  background: rgba(220, 38, 38, .09);
  color: #b91c1c;
  font-size: 12px;
  font-weight: 800;
}
.ticket-form-actions { justify-content: flex-end; margin-top: 2px; }
.ticket-form-actions .button { min-width: 140px; }
[data-theme="dark"] .ticket-form-group,
[data-theme="dark"] .ticket-form-label,
[data-theme="dark"] .ticket-file-dropzone strong { color: #8fd8f6; }
[data-theme="dark"] .ticket-file-remove { color: #fca5a5; }
@media (max-width: 860px) {
  .ticket-create-form { grid-template-columns: 1fr; }
  .ticket-form-full { grid-column: auto; }
}
@media (max-width: 560px) {
  .ticket-create-card { padding: 20px 16px; }
  .ticket-file-dropzone { padding: 20px 14px; }
  .ticket-file-item { align-items: flex-start; }
  .ticket-form-actions { flex-direction: column-reverse; }
  .ticket-form-actions .button { width: 100%; }
}

.attachment-selection { display: block; margin-top: 8px; color: var(--muted); font-size: 13px; }
.ticket-attachments { margin-top: 22px; }
.ticket-attachments h3 { display: flex; align-items: center; gap: 10px; }
.attachment-list { display: grid; gap: 10px; padding: 0; margin: 12px 0 0; list-style: none; }
.attachment-list li { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 12px 14px; border: 1px solid var(--border); border-radius: 14px; background: var(--surface-2); }
.attachment-list a { overflow-wrap: anywhere; font-weight: 700; }
.attachment-list span { flex: 0 0 auto; color: var(--muted); font-size: 12px; }
@media (max-width: 640px) {
  .attachment-list li { align-items: flex-start; flex-direction: column; gap: 5px; }
}

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   v3.1 vizuelno zatezanje, animacije i personalizovani meni
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */
:root {
  --font: "Inter", "Segoe UI Variable", "Segoe UI", Roboto, Arial, sans-serif;
  --bg: #eef8fd;
  --surface: rgba(255,255,255,.96);
  --surface-2: #f7fbfe;
  --border: rgba(205,232,248,.95);
  --shadow: 0 18px 48px rgba(28, 50, 93, .10), 0 2px 8px rgba(28, 50, 93, .04);
  --shadow-soft: 0 8px 22px rgba(28, 50, 93, .07);
  --shadow-hover: 0 26px 68px rgba(28, 50, 93, .14), 0 6px 18px rgba(28, 50, 93, .07);
}

body {
  background:
    radial-gradient(circle at 16% 0%, rgba(0,171,236,.13), transparent 28rem),
    radial-gradient(circle at 96% 16%, rgba(222,90,108,.08), transparent 26rem),
    linear-gradient(180deg, #f8fdff 0%, var(--bg) 42%, #f6fbff 100%);
  letter-spacing: -.008em;
}

.app-view .sadrzaj {
  background: linear-gradient(180deg, rgba(228,243,251,.62), rgba(248,253,255,.8));
}

.stranica,
.footer {
  max-width: 1480px;
}

.topbar {
  border-bottom-color: rgba(205,232,248,.82);
  box-shadow: 0 10px 28px rgba(28,50,93,.06);
}

.topbar-naslov {
  font-weight: 820;
}

.card,
.table-wrap,
.filters,
.login-card {
  backdrop-filter: saturate(1.18) blur(8px);
}

.card {
  transition: transform .22s cubic-bezier(.2,.8,.2,1), box-shadow .22s cubic-bezier(.2,.8,.2,1), border-color .22s ease;
}

.card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-hover);
  border-color: rgba(132,204,241,.82);
}

.metric {
  overflow: hidden;
  isolation: isolate;
}

.metric::after {
  content: "";
  position: absolute;
  right: -36px;
  bottom: -46px;
  width: 128px;
  height: 128px;
  border-radius: 50%;
  background: rgba(0,171,236,.08);
  z-index: -1;
  transition: transform .22s ease, background .22s ease;
}

.metric:hover::after {
  transform: scale(1.08);
  background: rgba(0,171,236,.12);
}

.metric:nth-child(1) strong { color: var(--sos-red); }
.metric:nth-child(2) strong { color: var(--sos-blue); }
.metric:nth-child(3) strong { color: #b45309; }
.metric:nth-child(4) strong { color: #15803d; }

.metric-icon {
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.68), 0 8px 16px rgba(28,50,93,.08);
  transition: transform .22s ease;
}

.metric:hover .metric-icon {
  transform: rotate(-4deg) scale(1.04);
}

.quick-card {
  position: relative;
  isolation: isolate;
  background:
    radial-gradient(circle at 92% 12%, rgba(0,171,236,.22), transparent 15rem),
    linear-gradient(135deg, #1c325d 0%, #22477c 62%, #1a3d70 100%);
  box-shadow: 0 20px 54px rgba(28,50,93,.18);
}

.quick-card::after {
  content: "";
  position: absolute;
  right: -70px;
  top: -110px;
  width: 240px;
  height: 240px;
  border-radius: 50%;
  background: rgba(0,171,236,.12);
  z-index: -1;
  animation: sosFloat 8s ease-in-out infinite;
}

.button,
button,
.nav-link,
.korisnik-chip,
.icon-button,
input,
select,
textarea {
  transition: transform .18s cubic-bezier(.2,.8,.2,1), box-shadow .18s ease, background .18s ease, border-color .18s ease, color .18s ease;
}

.button:active,
button:active,
.nav-link:active,
.korisnik-chip:active,
.icon-button:active {
  transform: translateY(0) scale(.985);
}

.nav-link {
  position: relative;
  overflow: hidden;
}

.nav-link::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(255,255,255,.11), transparent 48%);
  transform: translateX(-110%);
  transition: transform .34s ease;
}

.nav-link:hover::after,
.nav-link.aktivan::after {
  transform: translateX(0);
}

.sidebar-user-card {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 12px;
  padding: 12px;
  border: 1px solid rgba(255,255,255,.10);
  border-radius: 16px;
  background: rgba(255,255,255,.06);
  color: #fff;
  position: relative;
  z-index: 1;
  min-width: 0;
}

.sidebar-user-card strong,
.sidebar-user-card small {
  display: block;
  max-width: 172px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sidebar-user-card strong {
  font-size: 13px;
  font-weight: 820;
}

.sidebar-user-card small {
  margin-top: 2px;
  color: rgba(132,204,241,.86);
  font-size: 11px;
  font-weight: 700;
}

.notif-button {
  position: relative;
  text-decoration: none;
}

.notif-bedz {
  position: absolute;
  top: -6px;
  right: -6px;
  min-width: 19px;
  height: 19px;
  padding: 0 5px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--sos-red);
  color: #fff;
  border: 2px solid var(--surface);
  font-size: 10px;
  font-weight: 900;
  line-height: 1;
  box-shadow: 0 6px 12px rgba(222,90,108,.25);
}

.topbar-user-menu {
  position: relative;
}

.korisnik-chip {
  min-height: 44px;
  border-color: rgba(132,204,241,.9);
  background: linear-gradient(180deg, rgba(228,243,251,.95), rgba(205,232,248,.72));
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.62);
}

.korisnik-chip:hover,
.korisnik-chip[aria-expanded="true"] {
  background: #fff;
  border-color: var(--sos-blue);
  box-shadow: 0 12px 28px rgba(0,171,236,.12);
}

.avatar {
  background: linear-gradient(145deg, #1c325d, #234b81);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.18), 0 8px 18px rgba(28,50,93,.16);
}

.avatar-lg {
  width: 48px;
  height: 48px;
  font-size: 14px;
  border-radius: 16px;
}

.user-menu-chevron {
  color: var(--muted);
  font-weight: 900;
  transform-origin: center;
  transition: transform .18s ease;
}

.korisnik-chip[aria-expanded="true"] .user-menu-chevron {
  transform: rotate(180deg);
}

.user-dropdown {
  position: absolute;
  right: 0;
  top: calc(100% + 12px);
  width: min(330px, calc(100vw - 24px));
  padding: 12px;
  border: 1px solid rgba(205,232,248,.96);
  border-radius: 20px;
  background: var(--surface);
  box-shadow: 0 28px 80px rgba(28,50,93,.20), 0 8px 22px rgba(28,50,93,.08);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-8px) scale(.98);
  transform-origin: top right;
  transition: opacity .18s ease, transform .18s ease, visibility .18s ease;
  z-index: 120;
}

.user-dropdown.otvoren {
  opacity: 1;
  visibility: visible;
  transform: translateY(0) scale(1);
}

.user-dropdown-header {
  display: flex;
  gap: 12px;
  align-items: center;
  padding: 10px;
  border-radius: 16px;
  background: linear-gradient(135deg, var(--sos-blue-soft), rgba(249,229,228,.72));
}

.user-dropdown-header strong,
.user-dropdown-header span,
.user-dropdown-header small {
  display: block;
}

.user-dropdown-header strong {
  color: var(--text);
  font-size: 15px;
  font-weight: 880;
  line-height: 1.2;
}

.user-dropdown-header span {
  margin-top: 2px;
  color: #087aa4;
  font-size: 12px;
  font-weight: 850;
}

.user-dropdown-header small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
  overflow-wrap: anywhere;
}

.user-menu-stat {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 12px 0;
  padding: 11px 12px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--surface-2);
}

.user-menu-stat span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
  text-transform: uppercase;
  letter-spacing: .06em;
}

.user-menu-stat strong {
  display: inline-grid;
  place-items: center;
  min-width: 34px;
  height: 30px;
  border-radius: 999px;
  background: var(--sos-blue-dark);
  color: #fff;
  font-size: 14px;
}

.user-menu-links {
  display: grid;
  gap: 4px;
}

.user-menu-links a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 11px;
  border-radius: 13px;
  color: var(--text);
  font-weight: 820;
  text-decoration: none;
}

.user-menu-links a:hover {
  background: var(--sos-blue-soft);
  color: #087aa4;
}

.user-menu-links a span {
  width: 22px;
  color: var(--sos-blue);
  text-align: center;
}

.user-dropdown-footer {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--border);
}

.user-dropdown-footer .button {
  width: 100%;
}

.table-wrap {
  box-shadow: var(--shadow-soft);
}

tr {
  transition: background .16s ease;
}

/* Ulazna animacija je namerno blaga da ne opterećuje cPanel/shared hosting. */
@keyframes sosFadeUp {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes sosFloat {
  0%, 100% { transform: translate3d(0,0,0); }
  50% { transform: translate3d(-10px, 8px, 0); }
}

.app-view .stranica > * {
  animation: sosFadeUp .34s cubic-bezier(.2,.8,.2,1) both;
}

.app-view .stranica > *:nth-child(2) { animation-delay: .04s; }
.app-view .stranica > *:nth-child(3) { animation-delay: .08s; }
.app-view .stranica > *:nth-child(4) { animation-delay: .12s; }

[data-theme="dark"] {
  --bg: #0b1426;
  --surface: rgba(18,29,51,.97);
  --surface-2: #17243e;
  --border: rgba(58,79,113,.86);
}

[data-theme="dark"] body {
  background:
    radial-gradient(circle at 16% 0%, rgba(0,171,236,.12), transparent 28rem),
    radial-gradient(circle at 96% 16%, rgba(222,90,108,.08), transparent 26rem),
    linear-gradient(180deg, #0c1628 0%, #0b1426 100%);
}

[data-theme="dark"] .app-view .sadrzaj {
  background: linear-gradient(180deg, rgba(15,23,42,.82), rgba(11,20,38,.96));
}

[data-theme="dark"] .korisnik-chip {
  background: rgba(23,36,62,.96);
  border-color: rgba(58,79,113,.9);
}

[data-theme="dark"] .user-dropdown-header {
  background: linear-gradient(135deg, rgba(0,171,236,.14), rgba(222,90,108,.10));
}

@media (max-width: 900px) {
  .user-dropdown {
    right: -8px;
  }
  .sidebar-user-card {
    margin-bottom: 8px;
  }
}

@media (max-width: 640px) {
  .notif-button {
    display: none;
  }
  .korisnik-chip {
    padding-right: 7px;
  }
  .user-menu-chevron {
    display: none;
  }
  .user-dropdown {
    right: -6px;
    width: min(318px, calc(100vw - 16px));
  }
}

.icon-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

@media (max-width: 640px) {
  .topbar-akcije button,
  .topbar-akcije .korisnik-chip,
  .topbar-akcije .icon-button {
    width: auto;
  }
  .topbar-akcije .icon-button {
    width: 42px;
  }
}

/* v3.2 — personalizovani panel, obaveštenja i oprema */
.alert {
  transition: opacity .28s ease, transform .28s ease, margin .28s ease, padding .28s ease;
}
.alert-hide {
  opacity: 0;
  transform: translateY(-6px);
}

.notif-menu {
  position: relative;
}

.notif-dropdown {
  position: absolute;
  right: 0;
  top: calc(100% + 12px);
  width: min(360px, calc(100vw - 24px));
  border: 1px solid rgba(205,232,248,.96);
  border-radius: 20px;
  background: var(--surface);
  box-shadow: 0 28px 80px rgba(28,50,93,.20), 0 8px 22px rgba(28,50,93,.08);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-8px) scale(.98);
  transform-origin: top right;
  transition: opacity .18s ease, transform .18s ease, visibility .18s ease;
  z-index: 130;
  overflow: hidden;
}

.notif-dropdown.otvoren {
  opacity: 1;
  visibility: visible;
  transform: translateY(0) scale(1);
}

.notif-dropdown-head,
.notif-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 13px 14px;
  background: var(--surface-2);
  border-bottom: 1px solid var(--border);
}

.notif-dropdown-head strong {
  color: var(--text);
  font-size: 14px;
  font-weight: 900;
}

.notif-dropdown-head span,
.notif-empty {
  color: var(--muted);
  font-size: 12px;
  font-weight: 760;
}

.notif-empty {
  margin: 0;
  padding: 16px;
}

.notif-list {
  display: grid;
  max-height: 360px;
  overflow-y: auto;
}

.notif-item {
  display: grid;
  gap: 3px;
  padding: 13px 14px 13px 18px;
  border-bottom: 1px solid var(--border);
  color: var(--text);
  text-decoration: none;
  position: relative;
}

.notif-item::before {
  content: "";
  position: absolute;
  left: 7px;
  top: 18px;
  width: 6px;
  height: 6px;
  border-radius: 999px;
  background: transparent;
}

.notif-item.neprocitano::before {
  background: var(--sos-red);
  box-shadow: 0 0 0 4px rgba(222,90,108,.12);
}

.notif-item:hover {
  background: var(--sos-blue-soft);
  text-decoration: none;
}

.notif-item strong {
  font-size: 13px;
  font-weight: 900;
}

.notif-item span,
.notif-item small {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

.notif-footer {
  border-top: 1px solid var(--border);
  border-bottom: 0;
}

.notif-footer a,
.notif-footer button {
  min-height: auto;
  padding: 0;
  border: 0;
  background: transparent;
  color: #087aa4;
  font-size: 12px;
  font-weight: 900;
  box-shadow: none;
}

.notification-page-list {
  display: grid;
  gap: 10px;
}

.notification-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: var(--surface);
  color: var(--text);
  text-decoration: none;
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}

.notification-card:hover {
  transform: translateY(-1px);
  border-color: var(--sos-blue);
  box-shadow: var(--shadow-soft);
  text-decoration: none;
}

.notification-card.neprocitano {
  background: linear-gradient(90deg, rgba(0,171,236,.10), var(--surface));
  border-color: rgba(0,171,236,.35);
}

.notification-card strong {
  display: block;
  font-weight: 900;
}

.notification-card p {
  margin: 4px 0;
  color: var(--muted);
}

.notification-card small {
  color: var(--muted);
}

.employee-card {
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  overflow: hidden;
  margin-bottom: 18px;
}

.employee-identity {
  display: grid;
  place-items: center;
  align-content: center;
  gap: 10px;
  min-height: 210px;
  padding: 26px 18px;
  color: #fff;
  background:
    radial-gradient(circle at 20% 10%, rgba(0,171,236,.34), transparent 11rem),
    linear-gradient(145deg, #1c325d, #173463 72%, #12284d);
  text-align: center;
}

.employee-avatar {
  display: inline-grid;
  place-items: center;
  width: 86px;
  height: 86px;
  border-radius: 999px;
  background: linear-gradient(145deg, #00abec, #087bb0);
  color: #fff;
  border: 4px solid rgba(255,255,255,.18);
  box-shadow: 0 0 0 4px rgba(0,171,236,.16), 0 16px 28px rgba(0,0,0,.22);
  font-size: 25px;
  font-weight: 950;
  letter-spacing: -.04em;
}

.employee-identity h2 {
  margin: 2px 0 0;
  font-size: 18px;
  line-height: 1.2;
  letter-spacing: -.02em;
}

.employee-identity p {
  margin: 0;
  color: rgba(255,255,255,.76);
  font-size: 13px;
  font-weight: 760;
}

.employee-role {
  display: inline-flex;
  padding: 5px 11px;
  border: 1px solid rgba(132,204,241,.38);
  border-radius: 999px;
  color: #84ccf1;
  font-size: 12px;
  font-weight: 850;
}

.employee-info {
  padding: 28px 32px;
  align-self: center;
}

.employee-section-label {
  display: block;
  margin-bottom: 18px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 950;
  text-transform: uppercase;
  letter-spacing: .11em;
}

.employee-info-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px 28px;
}

.employee-info-item {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.employee-info-item small,
.employee-info-item strong {
  display: block;
}

.employee-info-item small {
  color: #a4b4c8;
  font-size: 11px;
  font-weight: 950;
  text-transform: uppercase;
  letter-spacing: .04em;
}

.employee-info-item strong {
  color: var(--text);
  font-size: 14px;
  font-weight: 900;
  overflow-wrap: anywhere;
}

.info-icon {
  display: inline-grid;
  place-items: center;
  width: 36px;
  height: 36px;
  min-width: 36px;
  border-radius: 11px;
  background: rgba(0,171,236,.13);
  color: #087aa4;
}

.info-red { background: rgba(222,90,108,.14); color: #b42335; }
.info-navy { background: rgba(28,50,93,.10); color: var(--sos-blue-dark); }
.info-green { background: rgba(21,128,61,.11); color: #15803d; }
.info-purple { background: rgba(99,102,241,.12); color: #4f46e5; }
.info-orange { background: rgba(180,83,9,.11); color: #b45309; }

.copy-item {
  position: relative;
  padding-right: 76px;
}

.copy-button {
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  min-height: 30px;
  padding: 6px 9px;
  border-radius: 999px;
  background: var(--sos-blue-soft);
  color: #087aa4;
  border-color: var(--sos-blue-line);
  font-size: 11px;
  font-weight: 900;
}

.copy-button.kopirano {
  background: rgba(21,128,61,.12);
  color: #15803d;
  border-color: rgba(21,128,61,.22);
}

.dashboard-two-col {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 18px;
  margin-top: 18px;
}

.equipment-list,
.equipment-admin-list {
  display: grid;
  gap: 12px;
}

.equipment-item {
  display: grid;
  grid-template-columns: 46px minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: var(--surface);
}

.equipment-icon {
  display: inline-grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: linear-gradient(145deg, #1c325d, #244d84);
  color: #84ccf1;
  box-shadow: 0 10px 20px rgba(28,50,93,.16);
  font-weight: 900;
}

.equipment-item strong,
.equipment-item small {
  display: block;
}

.equipment-item strong {
  font-weight: 900;
}

.equipment-item small {
  color: var(--muted);
  line-height: 1.45;
}

.equipment-assigned { background: rgba(21,128,61,.12); color: #15803d; }
.equipment-returned { background: rgba(120,132,158,.16); color: var(--muted); }
.equipment-repair { background: rgba(180,83,9,.13); color: #b45309; }
.equipment-retired { background: rgba(222,90,108,.15); color: #b42335; }

.equipment-admin-card {
  display: grid;
  grid-template-columns: repeat(2, minmax(160px, 1fr));
  gap: 12px;
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: var(--surface-2);
}

.equipment-admin-actions {
  grid-column: 1 / -1;
}

.profile-details {
  margin-top: 6px;
}

.profile-details summary {
  cursor: pointer;
  color: #087aa4;
  font-size: 12px;
  font-weight: 900;
}

.profile-details-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(150px, 1fr));
  gap: 8px;
  min-width: 420px;
  margin-top: 8px;
}

.profile-details-grid input {
  padding: 8px 9px;
  font-size: 12px;
}

@media (max-width: 980px) {
  .employee-card {
    grid-template-columns: 1fr;
  }
  .employee-info-grid {
    grid-template-columns: 1fr;
  }
  .equipment-admin-card {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .notif-button {
    display: inline-flex;
  }
  .notif-dropdown {
    right: -52px;
    width: min(340px, calc(100vw - 16px));
  }
  .employee-info {
    padding: 22px 18px;
  }
  .copy-item {
    padding-right: 0;
    align-items: flex-start;
  }
  .copy-button {
    position: static;
    transform: none;
    margin-left: auto;
  }
  .equipment-item {
    grid-template-columns: 44px minmax(0, 1fr);
  }
  .equipment-item .pill {
    grid-column: 2;
    width: fit-content;
  }
}
.copy-button:hover {
  transform: translateY(-50%);
}
@media (max-width: 640px) {
  .copy-button:hover {
    transform: none;
  }
}

/* v3.3.0 - profilna fotografija i stabilniji raspored korisničkog panela */
.avatar.has-photo,
.employee-avatar.has-photo {
  overflow: hidden;
  padding: 0;
  background: var(--surface);
  color: transparent;
}

.avatar img,
.employee-avatar img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: inherit;
}

.employee-photo-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 32px;
  padding: 7px 12px;
  border: 1px solid rgba(132,204,241,.42);
  border-radius: 999px;
  color: #cde8f8;
  background: rgba(255,255,255,.08);
  font-size: 12px;
  font-weight: 850;
  text-decoration: none;
  transition: transform .16s ease, background .16s ease, border-color .16s ease;
}

.employee-photo-link:hover {
  color: #fff;
  background: rgba(0,171,236,.18);
  border-color: rgba(132,204,241,.7);
  transform: translateY(-1px);
}

.profile-photo-card {
  display: grid;
  gap: 18px;
}

.profile-photo-preview {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: linear-gradient(180deg, rgba(228,243,251,.78), rgba(255,255,255,.92));
}

[data-theme="dark"] .profile-photo-preview {
  background: rgba(255,255,255,.04);
}

.profile-photo-preview > div {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.profile-photo-preview strong {
  color: var(--text);
  font-size: 16px;
  font-weight: 900;
}

.profile-photo-preview span,
.profile-photo-preview small {
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.profile-photo-delete {
  padding-top: 12px;
  border-top: 1px solid var(--border);
}

.password-toggle {
  width: 46px;
  min-width: 46px;
  padding: 0;
  border-color: var(--border);
  background: var(--surface);
  color: var(--text);
  font-size: 18px;
  box-shadow: none;
}

.password-toggle:hover {
  border-color: var(--sos-blue);
  background: var(--sos-blue-soft);
  color: #087aa4;
}

.password-toggle.is-visible {
  border-color: rgba(0,171,236,.5);
  background: rgba(0,171,236,.14);
}

@media (max-width: 720px) {
  .profile-photo-preview {
    align-items: flex-start;
  }

  .password-toggle {
    width: 100%;
  }
}

/* v3.4.0 - stabilniji upload profilne fotografije, JPG/PNG i izbor kadra */
.profile-photo-form input[type="file"] {
  cursor: pointer;
}

.photo-cropper {
  border: 1px solid var(--border);
  border-radius: 18px;
  background: linear-gradient(180deg, rgba(228,243,251,.72), rgba(255,255,255,.92));
  padding: 18px;
  box-shadow: 0 14px 34px rgba(28,50,93,.08);
}

.photo-cropper-grid {
  display: grid;
  grid-template-columns: minmax(240px, 340px) 170px;
  gap: 22px;
  align-items: start;
}

.cropper-stage {
  position: relative;
  width: min(340px, 100%);
  aspect-ratio: 1 / 1;
  overflow: hidden;
  border-radius: 24px;
  background: #0f2446;
  border: 3px solid rgba(0,171,236,.28);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.10), 0 18px 45px rgba(28,50,93,.16);
  cursor: grab;
  touch-action: none;
  user-select: none;
}

.cropper-stage.dragging {
  cursor: grabbing;
}

.cropper-stage img {
  position: absolute;
  left: 0;
  top: 0;
  max-width: none;
  width: auto;
  height: auto;
  transform-origin: 0 0;
  user-select: none;
  pointer-events: none;
  will-change: transform, width, height;
}

.cropper-frame {
  position: absolute;
  inset: 0;
  border-radius: 21px;
  box-shadow:
    inset 0 0 0 2px rgba(255,255,255,.78),
    inset 0 0 0 999px rgba(12,32,68,.04);
  pointer-events: none;
}

.cropper-frame::before,
.cropper-frame::after {
  content: '';
  position: absolute;
  inset: 33.33% 0 auto 0;
  border-top: 1px solid rgba(255,255,255,.42);
}

.cropper-frame::after {
  inset: 0 auto 0 33.33%;
  border-top: 0;
  border-left: 1px solid rgba(255,255,255,.42);
  box-shadow: calc(100% + 1px) 0 0 rgba(255,255,255,.42);
}

.cropper-help {
  margin-top: 10px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
  font-weight: 700;
}

.range-label {
  display: grid;
  gap: 8px;
  margin-top: 14px;
  color: var(--text);
  font-size: 13px;
  font-weight: 900;
}

.range-label input[type="range"] {
  width: 100%;
  accent-color: var(--sos-blue);
}

.cropper-result {
  display: grid;
  justify-items: center;
  gap: 12px;
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: 18px;
  background: rgba(255,255,255,.78);
}

.cropper-result span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: .08em;
}

.cropper-result img {
  width: 128px;
  height: 128px;
  border-radius: 999px;
  object-fit: cover;
  border: 4px solid #fff;
  box-shadow: 0 14px 30px rgba(28,50,93,.18);
  background: var(--sos-blue-soft);
}

.password-toggle span {
  display: inline-grid;
  place-items: center;
  width: 100%;
  line-height: 1;
}

.password-toggle.is-visible span {
  transform: scale(1.02);
}

@media (max-width: 720px) {
  .photo-cropper-grid {
    grid-template-columns: 1fr;
  }

  .cropper-stage {
    width: 100%;
  }

  .cropper-result {
    justify-items: start;
  }

  .cropper-result img {
    width: 104px;
    height: 104px;
  }
}

@media (max-width: 720px) {
  .password-form .polje-lozinka {
    flex-direction: row;
  }

  .password-form .password-toggle {
    width: 46px;
    min-width: 46px;
  }
}

.eye-icon svg { display: block; }

/* v3.5.0 - objedinjeni podaci o nalogu i admin pregled profila zaposlenog */
.account-layout {
  display: grid;
  gap: 18px;
}

.account-summary {
  display: grid;
  gap: 18px;
}

.account-preview {
  margin-top: -2px;
}

.account-info-grid {
  padding-top: 4px;
}

.admin-profile-card {
  margin-bottom: 18px;
  display: grid;
  gap: 18px;
}

.admin-profile-grid {
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  gap: 22px;
  align-items: start;
}

.admin-profile-main {
  display: grid;
  justify-items: center;
  gap: 10px;
  min-height: 220px;
  padding: 22px 18px;
  border-radius: 22px;
  text-align: center;
  color: #fff;
  background:
    radial-gradient(circle at 25% 0%, rgba(0,171,236,.38), transparent 12rem),
    linear-gradient(145deg, #1c325d, #173463 72%, #12284d);
}

.admin-profile-main > div {
  display: grid;
  gap: 4px;
}

.admin-profile-main strong {
  font-size: 18px;
  font-weight: 950;
  line-height: 1.2;
}

.admin-profile-main span,
.admin-profile-main small {
  color: rgba(255,255,255,.78);
  font-size: 13px;
  font-weight: 750;
}

.admin-profile-info {
  align-self: center;
}

.admin-profile-sections {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 18px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
}

.admin-profile-sections h3 {
  margin: 0 0 12px;
  color: var(--text);
  font-size: 16px;
}

.compact-equipment-list .equipment-item {
  padding: 12px;
  grid-template-columns: 42px minmax(0, 1fr) auto;
}

.mini-ticket-list {
  display: grid;
  gap: 10px;
}

.mini-ticket-list a {
  display: grid;
  gap: 4px;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--surface);
  color: var(--text);
  text-decoration: none;
  transition: transform .16s ease, border-color .16s ease, box-shadow .16s ease;
}

.mini-ticket-list a:hover {
  transform: translateY(-1px);
  border-color: var(--sos-blue-line);
  box-shadow: 0 12px 28px rgba(28,50,93,.08);
}

.mini-ticket-list strong {
  font-size: 13px;
  font-weight: 900;
}

.mini-ticket-list span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.user-name-cell {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 220px;
}

.user-name-cell > div {
  display: grid;
  gap: 2px;
}

.profile-open-link {
  color: #087aa4;
  font-size: 12px;
  font-weight: 900;
  text-decoration: none;
}

.profile-open-link:hover {
  text-decoration: underline;
}

@media (max-width: 980px) {
  .admin-profile-grid,
  .admin-profile-sections {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 720px) {
  .account-layout .narrow-card {
    max-width: none;
  }

  .admin-profile-main {
    min-height: auto;
  }

  .compact-equipment-list .equipment-item {
    grid-template-columns: 42px minmax(0, 1fr);
  }

  .compact-equipment-list .equipment-item .pill {
    grid-column: 2;
    width: fit-content;
  }
}

/* v3.5.1 - Podaci o nalogu: profilna fotografija i promena lozinke jedna pored druge */
.account-action-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(360px, .92fr);
  gap: 18px;
  align-items: start;
}

.account-option-card {
  height: 100%;
  min-width: 0;
  position: relative;
  overflow: hidden;
}

.account-option-card::before {
  content: '';
  position: absolute;
  inset: 0 0 auto 0;
  height: 3px;
  background: linear-gradient(90deg, var(--sos-blue), rgba(132,204,241,.72), rgba(222,90,108,.55));
  opacity: .85;
  pointer-events: none;
}

.account-option-card .section-heading {
  align-items: flex-start;
}

.account-option-card .section-heading h2 {
  margin-top: 4px;
}

.account-option-card .stacked-form {
  margin-top: 2px;
}

.account-action-grid .photo-cropper {
  padding: 16px;
}

.account-action-grid .photo-cropper-grid {
  grid-template-columns: minmax(220px, 1fr) 132px;
  gap: 16px;
}

.account-action-grid .cropper-result img {
  width: 112px;
  height: 112px;
}

.account-action-grid .cropper-help {
  font-size: 12.5px;
}

.account-action-grid .inline-actions {
  margin-top: 2px;
}

#password .password-form {
  gap: 14px;
}

#password .inline-actions {
  padding-top: 4px;
}

#password .button-primary {
  width: 100%;
  justify-content: center;
}

@media (max-width: 1180px) {
  .account-action-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 720px) {
  .account-action-grid {
    gap: 14px;
  }

  .account-action-grid .photo-cropper-grid {
    grid-template-columns: 1fr;
  }

  #password .button-primary {
    width: auto;
  }
}

/* v3.5.2 - finije kartice naloga, drag/drop upload i tematske ikonice */
.account-action-grid {
  grid-template-columns: minmax(0, .96fr) minmax(440px, 1.04fr);
  gap: 22px;
}

#password.account-option-card {
  min-height: 470px;
}

#password .section-heading p {
  max-width: 560px;
}

#password .password-form {
  gap: 16px;
}

#password .polje-lozinka input {
  min-height: 48px;
}

#password .password-toggle {
  width: 50px;
  min-width: 50px;
  height: 48px;
}

.profile-upload-field {
  display: grid;
  gap: 8px;
}

.form-label {
  color: var(--text);
  font-size: 13px;
  font-weight: 900;
}

.file-dropzone {
  position: relative;
  display: grid;
  grid-template-columns: 54px minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  min-height: 96px;
  padding: 18px;
  border: 1.5px dashed rgba(0,171,236,.38);
  border-radius: 18px;
  background:
    radial-gradient(circle at 8% 0%, rgba(0,171,236,.10), transparent 12rem),
    linear-gradient(180deg, rgba(248,253,255,.96), rgba(228,243,251,.58));
  cursor: pointer;
  overflow: hidden;
  transition: transform .18s ease, border-color .18s ease, background .18s ease, box-shadow .18s ease;
}

.file-dropzone:hover,
.file-dropzone.is-dragover {
  transform: translateY(-1px);
  border-color: var(--sos-blue);
  background:
    radial-gradient(circle at 8% 0%, rgba(0,171,236,.18), transparent 12rem),
    linear-gradient(180deg, #ffffff, rgba(228,243,251,.82));
  box-shadow: 0 18px 38px rgba(28,50,93,.10);
}

.file-dropzone.has-file {
  border-style: solid;
  border-color: rgba(21,128,61,.34);
  background: linear-gradient(180deg, rgba(236,253,245,.78), rgba(255,255,255,.96));
}

.file-drop-input {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: pointer;
}

.file-drop-icon {
  display: inline-grid;
  place-items: center;
  width: 54px;
  height: 54px;
  border-radius: 16px;
  background: linear-gradient(145deg, var(--sos-blue), #087bb0);
  color: #fff;
  box-shadow: 0 14px 30px rgba(0,171,236,.22);
}

.file-drop-copy {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.file-drop-copy strong {
  color: var(--text);
  font-size: 15px;
  font-weight: 950;
}

.file-drop-copy small {
  color: var(--muted);
  line-height: 1.35;
  font-weight: 720;
}

.file-drop-name {
  position: relative;
  z-index: 1;
  max-width: 190px;
  padding: 8px 10px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface);
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.metric-icon {
  color: #087aa4;
}

.metric-icon svg,
.equipment-icon svg {
  display: block;
}

.metric-open {
  background: rgba(222,90,108,.14);
  color: #c33349;
}

.metric-progress {
  background: rgba(0,171,236,.15);
  color: #087aa4;
}

.metric-waiting {
  background: rgba(245,158,11,.15);
  color: #b45309;
}

.metric-resolved {
  background: rgba(21,128,61,.14);
  color: #15803d;
}

.equipment-icon {
  color: #cde8f8;
}

@media (max-width: 1240px) {
  .account-action-grid {
    grid-template-columns: 1fr;
  }

  #password.account-option-card {
    min-height: auto;
  }
}

@media (max-width: 760px) {
  .file-dropzone {
    grid-template-columns: 46px minmax(0, 1fr);
  }

  .file-drop-icon {
    width: 46px;
    height: 46px;
    border-radius: 14px;
  }

  .file-drop-name {
    grid-column: 1 / -1;
    max-width: none;
    width: fit-content;
  }
}

/* v3.5.3 - Podaci o nalogu: šira i pravilno razvučena kartica za promenu lozinke */
.account-action-grid {
  width: 100%;
  grid-template-columns: minmax(500px, .95fr) minmax(560px, 1.05fr);
  gap: 22px;
  align-items: stretch;
}

.account-action-grid > .account-option-card {
  width: 100%;
  max-width: none;
  margin: 0;
  justify-self: stretch;
}

#password.account-option-card {
  width: 100%;
  max-width: none;
  margin: 0;
  min-height: 470px;
}

#password .password-form {
  width: 100%;
  max-width: none;
}

#password .polje-lozinka {
  width: 100%;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 50px;
  gap: 8px;
}

#password .polje-lozinka input {
  width: 100%;
  min-width: 0;
}

#password .inline-actions,
#password .button-primary {
  width: 100%;
}

@media (max-width: 1180px) {
  .account-action-grid {
    grid-template-columns: 1fr;
  }

  #password.account-option-card {
    min-height: auto;
  }
}


/* v3.5.4 - Admin upravljanje profilnom fotografijom i brisanje korisnika */
.admin-profile-management-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(300px, .65fr);
  gap: 18px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
}

.admin-profile-tool-card {
  display: grid;
  gap: 14px;
  padding: 18px;
  border: 1px solid var(--border);
  border-radius: 22px;
  background: linear-gradient(180deg, rgba(255,255,255,.98), rgba(248,253,255,.92));
  box-shadow: 0 14px 34px rgba(28,50,93,.06);
}

.tool-card-heading {
  display: grid;
  gap: 6px;
}

.tool-card-heading h3 {
  margin: 0;
  color: var(--text);
  font-size: 18px;
  font-weight: 950;
}

.tool-card-heading p {
  margin: 0;
  color: var(--muted);
  line-height: 1.45;
  font-weight: 650;
}

.badge-danger {
  background: rgba(222,90,108,.13);
  color: #b42335;
}

.danger-zone-card {
  border-color: rgba(222,90,108,.24);
  background:
    radial-gradient(circle at 100% 0%, rgba(222,90,108,.09), transparent 12rem),
    linear-gradient(180deg, rgba(255,255,255,.98), rgba(255,247,247,.88));
}

.danger-zone-card .button-danger {
  justify-self: start;
}

.file-dropzone-compact {
  min-height: 88px;
}

.admin-photo-form .photo-cropper-grid {
  grid-template-columns: minmax(220px, 1fr) 150px;
}

.admin-photo-form .cropper-result img {
  width: 136px;
  height: 136px;
}

.table-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.table-actions form {
  margin: 0;
}

.button-small {
  min-height: 36px;
  padding: 8px 12px;
  font-size: 12px;
}

@media (max-width: 1180px) {
  .admin-profile-management-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 760px) {
  .admin-photo-form .photo-cropper-grid {
    grid-template-columns: 1fr;
  }

  .danger-zone-card .button-danger {
    width: 100%;
  }

  .table-actions {
    align-items: stretch;
  }

  .table-actions .button,
  .table-actions form {
    width: 100%;
  }
}

/* v3.5.5 - unapređena administracija korisnika i preglednije kartice naloga */
.user-admin-layout {
    grid-template-columns: minmax(0, 1fr) 360px;
    align-items: start;
}

.user-admin-panel {
    overflow: hidden;
}

.admin-users-heading {
    margin-bottom: 14px;
}

.admin-user-stats {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
    margin: 0 0 18px;
}

.admin-user-stats > div {
    border: 1px solid var(--border);
    border-radius: 18px;
    padding: 14px 16px;
    background: linear-gradient(180deg, rgba(228, 243, 251, 0.72), rgba(255, 255, 255, 0.92));
    box-shadow: 0 8px 24px rgba(28, 50, 93, 0.06);
}

.admin-user-stats span {
    display: block;
    color: var(--muted);
    font-size: 11px;
    font-weight: 800;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.admin-user-stats strong {
    display: block;
    margin-top: 6px;
    color: var(--ink);
    font-size: 28px;
    line-height: 1;
}

.admin-users-toolbar {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 16px;
    margin: 0 0 16px;
    padding: 14px;
    border: 1px solid var(--border);
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.68);
}

.admin-user-search {
    flex: 1;
    min-width: 260px;
    color: var(--muted);
    font-size: 12px;
    font-weight: 800;
    letter-spacing: .04em;
    text-transform: uppercase;
}

.admin-user-search input {
    margin-top: 7px;
    width: 100%;
    text-transform: none;
    letter-spacing: normal;
    font-weight: 600;
}

.admin-user-list {
    display: grid;
    gap: 14px;
}

.admin-user-card {
    position: relative;
    border: 1px solid var(--border);
    border-radius: 22px;
    padding: 16px;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(248, 253, 255, 0.92));
    box-shadow: 0 14px 36px rgba(28, 50, 93, 0.08);
    transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}

.admin-user-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 18px;
    right: 18px;
    height: 3px;
    border-radius: 0 0 10px 10px;
    background: linear-gradient(90deg, var(--accent), rgba(132, 204, 241, .85), var(--danger));
    opacity: .86;
}

.admin-user-card:hover {
    transform: translateY(-2px);
    border-color: rgba(0, 171, 236, 0.36);
    box-shadow: 0 18px 44px rgba(28, 50, 93, 0.12);
}

.admin-user-card-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.admin-user-identity {
    display: flex;
    align-items: center;
    gap: 13px;
    min-width: 0;
}

.admin-user-identity > div {
    min-width: 0;
    display: grid;
    gap: 3px;
}

.admin-user-identity strong {
    color: var(--ink);
    font-size: 16px;
    line-height: 1.15;
}

.admin-user-identity span,
.admin-user-identity small {
    display: block;
    color: var(--muted);
    font-size: 12.5px;
    font-weight: 700;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.admin-user-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.admin-user-edit {
    margin-top: 14px;
    border-top: 1px solid var(--border);
    padding-top: 12px;
}

.admin-user-edit summary {
    cursor: pointer;
    width: fit-content;
    border-radius: 999px;
    padding: 8px 13px;
    background: var(--accent-soft);
    color: var(--accent-strong);
    font-weight: 900;
    font-size: 12px;
    transition: background .18s ease, transform .18s ease;
}

.admin-user-edit summary:hover {
    background: #d8f2fd;
    transform: translateY(-1px);
}

.admin-user-edit-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
    margin-top: 14px;
}

.admin-role-fieldset {
    min-width: 0;
    margin: 0;
    padding: 12px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
}

.admin-role-fieldset legend {
    padding: 0 6px;
    font-weight: 700;
}

.admin-role-fieldset .inline-check {
    margin-top: 8px;
    overflow-wrap: anywhere;
}

.admin-user-edit-grid label {
    color: var(--ink);
    font-size: 12px;
    font-weight: 800;
}

.admin-user-edit-grid input,
.admin-user-edit-grid select {
    margin-top: 6px;
}

.admin-check-label {
    display: flex;
    flex-direction: column;
    justify-content: end;
}

.admin-user-edit-actions {
    margin-top: 14px;
}

.admin-user-delete-form {
    display: flex;
    justify-content: flex-end;
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px dashed var(--border);
}

.admin-create-user-card {
    position: sticky;
    top: calc(var(--topbar-height, 64px) + 16px);
}

.admin-user-no-results {
    margin-top: 14px;
}

.form-help {
    display: block;
    margin-top: 6px;
    color: var(--muted);
    font-size: 12px;
    font-weight: 600;
    line-height: 1.35;
}

@media (max-width: 1180px) {
    .user-admin-layout {
        grid-template-columns: 1fr;
    }

    .admin-create-user-card {
        position: static;
    }
}

@media (max-width: 900px) {
    .admin-user-stats {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .admin-users-toolbar,
    .admin-user-card-top {
        align-items: stretch;
        flex-direction: column;
    }

    .admin-user-actions {
        justify-content: flex-start;
    }

    .admin-user-edit-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 560px) {
    .admin-user-stats {
        grid-template-columns: 1fr;
    }

    .admin-user-search {
        min-width: 0;
    }
}

/* v3.5.6 — Oprema i brisanje tiketa */
.equipment-admin-page {
  display: grid;
  gap: 18px;
}

.equipment-hero .section-heading,
.equipment-table-card .section-heading {
  align-items: flex-start;
}

.equipment-hero-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

.equipment-metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin-top: 18px;
}

.metric-card {
  position: relative;
  overflow: hidden;
  padding: 18px;
  border: 1px solid var(--border);
  border-radius: 18px;
  background: linear-gradient(180deg, rgba(255,255,255,.96), rgba(248,253,255,.9));
  box-shadow: var(--shadow-soft);
}

.metric-card::after {
  content: '';
  position: absolute;
  right: -34px;
  bottom: -44px;
  width: 118px;
  height: 118px;
  border-radius: 50%;
  background: rgba(0,171,236,.10);
}

.metric-card span,
.metric-card small {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.metric-card span {
  text-transform: uppercase;
  letter-spacing: .06em;
}

.metric-card strong {
  display: block;
  margin: 8px 0 3px;
  color: var(--sos-blue-dark);
  font-size: 34px;
  line-height: 1;
  letter-spacing: -.05em;
}

.equipment-control-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(360px, .65fr);
  gap: 18px;
  align-items: start;
}

.equipment-filter-form {
  display: grid;
  grid-template-columns: 1.4fr 1.1fr 1fr 1fr 1fr minmax(100px, .7fr);
  gap: 12px;
  margin-top: 14px;
}

.equipment-filter-form .inline-actions {
  grid-column: 1 / -1;
}

.two-col-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.equipment-create-card {
  position: sticky;
  top: calc(var(--topbar, 72px) + 16px);
}

.equipment-user-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.equipment-user-card {
  border: 1px solid var(--border);
  border-radius: 18px;
  background: var(--surface-2);
  overflow: hidden;
}

.equipment-user-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
  background: linear-gradient(90deg, rgba(228,243,251,.9), rgba(255,255,255,.62));
  border-bottom: 1px solid var(--border);
}

.equipment-user-head strong,
.equipment-user-head span {
  display: block;
}

.equipment-user-head strong {
  color: var(--text);
  font-weight: 900;
}

.equipment-user-head span,
.equipment-user-head em {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  font-style: normal;
}

.equipment-user-items {
  display: grid;
  gap: 10px;
  padding: 12px;
}

.equipment-user-item,
.equipment-table-asset {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.equipment-user-item {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) auto;
  padding: 10px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--surface);
}

.equipment-item-badges,
.equipment-status-stack {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
}

.equipment-status-stack {
  align-items: flex-start;
  flex-direction: column;
}

.equipment-warehouse {
  background: var(--sos-blue-soft);
  color: #087aa4;
}

.equipment-warehouse-check {
  justify-self: start;
  margin: 2px 0 4px;
  color: var(--text);
  font-weight: 850;
}

.equipment-user-item strong,
.equipment-user-item small,
.equipment-table-asset strong,
.equipment-table-asset small,
.equipment-table td strong,
.equipment-table td small {
  display: block;
}

.equipment-user-item small,
.equipment-table-asset small,
.equipment-table td small {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

.equipment-table th,
.equipment-table td {
  vertical-align: top;
}

.equipment-row-editor {
  position: relative;
}

.equipment-row-editor summary {
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 76px;
  padding: 8px 12px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--sos-blue-soft);
  color: #087aa4;
  font-size: 12px;
  font-weight: 900;
  list-style: none;
}

.equipment-row-editor summary::-webkit-details-marker {
  display: none;
}

.equipment-row-form {
  position: absolute;
  right: 0;
  z-index: 20;
  width: min(560px, calc(100vw - 40px));
  display: grid;
  gap: 12px;
  margin-top: 10px;
  padding: 16px;
  border: 1px solid rgba(0,171,236,.28);
  border-radius: 18px;
  background: var(--surface);
  box-shadow: 0 22px 60px rgba(28,50,93,.18);
}

.ticket-danger-card p {
  margin-top: 6px;
  color: var(--muted);
  font-size: 13px;
}

@media (max-width: 1180px) {
  .equipment-control-grid,
  .equipment-user-grid {
    grid-template-columns: 1fr;
  }

  .equipment-create-card {
    position: static;
  }

  .equipment-filter-form {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 760px) {
  .equipment-metrics,
  .equipment-filter-form,
  .two-col-form {
    grid-template-columns: 1fr;
  }

  .equipment-user-item {
    grid-template-columns: 42px minmax(0, 1fr);
  }

  .equipment-user-item .pill {
    grid-column: 2;
    justify-self: start;
  }

  .equipment-row-form {
    position: static;
    width: 100%;
  }
}

/* =========================================================
   v3.6.0 — Senior UI redesign
   Cilj: čistiji, fluidniji i user-friendly interfejs bez novih zavisnosti.
   Napomena: koristi se sistemski font radi brzine i cPanel kompatibilnosti.
   ========================================================= */
:root {
  --sos-blue: #00aeea;
  --sos-blue-2: #36c3f1;
  --sos-blue-3: #dff5fc;
  --sos-blue-dark: #162f5c;
  --sos-navy: #13264b;
  --sos-red: #e4546a;
  --sos-red-2: #ff7a8b;
  --bg: #eef8fc;
  --bg-rgb: 238, 248, 252;
  --surface: #ffffff;
  --surface-2: #f7fbff;
  --surface-3: #eef7fd;
  --text: #182d55;
  --heading: #12274d;
  --muted: #65738e;
  --muted-2: #8ea0b7;
  --border: #cfe6f5;
  --border-strong: #b9def2;
  --success: #0d9668;
  --success-soft: #def8ed;
  --warning: #b66a0c;
  --warning-soft: #fff1dc;
  --danger: #c9364e;
  --danger-soft: #ffedf0;
  --shadow-xs: 0 1px 2px rgba(18, 39, 77, .06);
  --shadow-soft: 0 10px 28px rgba(18, 39, 77, .08);
  --shadow: 0 22px 55px rgba(18, 39, 77, .12);
  --shadow-strong: 0 28px 80px rgba(18, 39, 77, .18);
  --radius: 24px;
  --radius-lg: 30px;
  --radius-md: 18px;
  --radius-sm: 12px;
  --focus: 0 0 0 4px rgba(0, 174, 234, .18);
  --font: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
  --sidebar: 286px;
  --topbar: 76px;
}

[data-theme="dark"] {
  --bg: #0b1425;
  --bg-rgb: 11, 20, 37;
  --surface: #111d34;
  --surface-2: #15233d;
  --surface-3: #1a2d4e;
  --text: #edf7ff;
  --heading: #ffffff;
  --muted: #b5c6da;
  --muted-2: #8ba0b8;
  --border: #28425f;
  --border-strong: #355a80;
  --shadow-xs: 0 1px 2px rgba(0, 0, 0, .25);
  --shadow-soft: 0 14px 35px rgba(0, 0, 0, .30);
  --shadow: 0 24px 68px rgba(0, 0, 0, .38);
  --shadow-strong: 0 32px 90px rgba(0, 0, 0, .50);
}

html { scroll-behavior: smooth; }
body {
  background:
    radial-gradient(circle at 8% 0%, rgba(0,174,234,.18), transparent 34rem),
    radial-gradient(circle at 92% 12%, rgba(228,84,106,.13), transparent 30rem),
    linear-gradient(180deg, #eef8fc 0%, #f7fbff 42%, #eef8fc 100%);
  color: var(--text);
  font-family: var(--font);
  font-size: 15px;
  letter-spacing: -.01em;
}
[data-theme="dark"] body,
body:has(.app-shell)[data-theme="dark"] {
  background:
    radial-gradient(circle at 8% 0%, rgba(0,174,234,.18), transparent 34rem),
    radial-gradient(circle at 92% 10%, rgba(228,84,106,.11), transparent 30rem),
    linear-gradient(180deg, #0b1425, #0e172b 56%, #0b1425);
}

a { color: #008fc5; transition: color .18s ease, background .18s ease, border-color .18s ease, box-shadow .18s ease, transform .18s ease; }
a:hover { color: #006f9b; text-decoration: none; }
button, input, select, textarea { font-family: inherit; }
button { transition: transform .18s ease, box-shadow .18s ease, background .18s ease, border-color .18s ease, color .18s ease; }
button:active, .button:active { transform: translateY(1px) scale(.99); }
:focus-visible { outline: none; box-shadow: var(--focus); }

/* Login — uredniji hero i pristupna kartica */
.auth-view {
  background:
    radial-gradient(circle at 10% 8%, rgba(0,174,234,.18), transparent 34rem),
    linear-gradient(135deg, #edf9fd, #ffffff 52%, #fff1f3);
}
.login-shell { grid-template-columns: minmax(0, 1.05fr) minmax(420px, 560px); }
.login-hero {
  background:
    radial-gradient(circle at 78% 16%, rgba(0,174,234,.24), transparent 22rem),
    linear-gradient(150deg, #10264c 0%, #183a70 58%, #10264c 100%);
}
.login-hero::after {
  background:
    linear-gradient(116deg, transparent 0 48%, rgba(255,255,255,.055) 48% 49%, transparent 49% 100%),
    linear-gradient(55deg, transparent 0 60%, rgba(0,174,234,.10) 60% 100%);
}
.hero-sadrzaj h1 { letter-spacing: -.065em; }
.login-card-wrap .card,
.login-card {
  border-radius: 30px;
  box-shadow: var(--shadow-strong);
}

/* Glavni layout */
.sidebar {
  width: var(--sidebar);
  background:
    radial-gradient(circle at 78% -8%, rgba(0,174,234,.28), transparent 18rem),
    linear-gradient(180deg, #163563 0%, #132b52 54%, #0f2344 100%);
  border-right: 1px solid rgba(255,255,255,.10);
  box-shadow: 18px 0 50px rgba(18,39,77,.16);
}
.sidebar::before {
  background: radial-gradient(circle, rgba(0,174,234,.26), transparent 68%);
}
.sidebar-brend {
  min-height: var(--topbar);
  padding: 19px 22px;
}
.brand-mark {
  border-radius: 16px;
  background: linear-gradient(135deg, #ffffff, #dff5fc);
  color: var(--sos-blue-dark);
  box-shadow: 0 16px 34px rgba(0,0,0,.18), inset 0 0 0 1px rgba(0,174,234,.28);
}
.sidebar-brend-tekst strong { max-width: 190px; font-size: 13.5px; letter-spacing: -.02em; }
.sidebar-nav { padding: 18px 14px; }
.nav-sekcija-naslov {
  margin: 18px 12px 8px;
  color: rgba(132,204,241,.74);
  font-size: 10px;
}
.nav-link {
  min-height: 46px;
  padding: 11px 13px;
  border: 1px solid transparent;
  border-radius: 16px;
  color: rgba(255,255,255,.76);
  font-weight: 780;
}
.nav-link:hover {
  background: rgba(255,255,255,.085);
  border-color: rgba(255,255,255,.10);
  transform: translateX(2px);
}
.nav-link.aktivan {
  background: linear-gradient(90deg, rgba(0,174,234,.24), rgba(255,255,255,.075));
  border-color: rgba(132,204,241,.18);
  box-shadow: inset 3px 0 0 var(--sos-blue), 0 10px 26px rgba(0,0,0,.12);
}
.nav-icon {
  width: 28px;
  height: 28px;
  border-radius: 10px;
  background: rgba(255,255,255,.08);
  color: #9ce1f7;
}
.nav-link.aktivan .nav-icon { background: rgba(0,174,234,.22); color: #ffffff; }
.sidebar-user-card {
  margin: 0 14px 14px;
  padding: 12px;
  border: 1px solid rgba(255,255,255,.11);
  border-radius: 20px;
  background: rgba(255,255,255,.07);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.08);
}
.sidebar-user-card strong { letter-spacing: -.02em; }
.sidebar-podnozje { padding: 15px 22px; }

.sadrzaj { margin-left: var(--sidebar); }
.topbar {
  min-height: var(--topbar);
  padding: 0 clamp(18px, 2.4vw, 34px);
  background: rgba(255,255,255,.78);
  border-bottom: 1px solid rgba(185,222,242,.80);
  backdrop-filter: blur(20px) saturate(150%);
  -webkit-backdrop-filter: blur(20px) saturate(150%);
  box-shadow: 0 6px 24px rgba(18,39,77,.055);
}
[data-theme="dark"] .topbar { background: rgba(17,29,52,.78); border-color: rgba(53,90,128,.76); }
.topbar::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--sos-blue), var(--sos-blue-2), var(--sos-red));
}
.topbar-naslov { color: var(--heading); font-weight: 900; letter-spacing: -.045em; }
.topbar-naslov small { margin-top: 3px; color: var(--muted); font-size: 12px; letter-spacing: -.005em; }
.topbar-akcije { gap: 12px; }
.icon-button,
.korisnik-chip {
  border: 1px solid var(--border);
  background: rgba(255,255,255,.72);
  box-shadow: var(--shadow-xs);
}
[data-theme="dark"] .icon-button,
[data-theme="dark"] .korisnik-chip { background: rgba(21,35,61,.82); }
.icon-button:hover,
.korisnik-chip:hover {
  border-color: var(--border-strong);
  box-shadow: 0 12px 28px rgba(18,39,77,.10);
  transform: translateY(-1px);
}
.korisnik-chip {
  padding: 6px 10px 6px 6px;
  border-radius: 999px;
}
.korisnik-ime { font-weight: 850; }
.korisnik-ime small { color: var(--muted); }
.notif-bedz {
  min-width: 19px;
  height: 19px;
  border: 2px solid var(--surface);
  background: var(--sos-red);
  box-shadow: 0 8px 18px rgba(228,84,106,.32);
}
.notif-dropdown,
.user-dropdown {
  border: 1px solid var(--border);
  border-radius: 22px;
  box-shadow: var(--shadow-strong);
  overflow: hidden;
  background: var(--surface);
}
.user-dropdown-header,
.notif-dropdown-head {
  background: linear-gradient(135deg, var(--surface-2), var(--surface));
}
.stranica {
  width: min(100%, 1540px);
  margin: 0 auto;
  padding: clamp(20px, 2.4vw, 34px);
}
.footer { color: var(--muted-2); }

/* Kartice i komponente */
.card,
.login-card {
  border: 1px solid rgba(185,222,242,.92);
  border-radius: var(--radius);
  background: rgba(255,255,255,.88);
  box-shadow: var(--shadow-soft);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}
[data-theme="dark"] .card,
[data-theme="dark"] .login-card { background: rgba(17,29,52,.88); border-color: var(--border); }
.card {
  position: relative;
  transition: transform .22s ease, box-shadow .22s ease, border-color .22s ease, background .22s ease;
}
.card:hover {
  border-color: var(--border-strong);
  box-shadow: var(--shadow);
}
.card-pad { padding: clamp(20px, 2.2vw, 28px); }
.section-heading { gap: 18px; align-items: flex-start; }
.section-heading h2,
.login-card h2,
.employee-card h2 {
  color: var(--heading);
  letter-spacing: -.055em;
  font-weight: 920;
}
.section-heading p { color: var(--muted); }
.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 0;
  background: linear-gradient(135deg, rgba(0,174,234,.14), rgba(0,174,234,.07));
  color: #007fac;
  box-shadow: inset 0 0 0 1px rgba(0,174,234,.06);
}
.badge::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 999px;
  background: currentColor;
  opacity: .75;
}

/* Dugmad */
.button,
button.button,
a.button,
.copy-button {
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border-radius: 14px;
  font-weight: 880;
  letter-spacing: -.015em;
  text-decoration: none;
}
.button-primary,
.button-blue {
  border: 0;
  background: linear-gradient(135deg, var(--sos-blue), #008fd0);
  color: #fff;
  box-shadow: 0 14px 28px rgba(0,174,234,.26);
}
.button-primary:hover,
.button-blue:hover {
  color: #fff;
  box-shadow: 0 18px 34px rgba(0,174,234,.34);
  transform: translateY(-1px);
}
.button-danger {
  border: 0;
  background: linear-gradient(135deg, var(--sos-red), #d93d56);
  color: #fff;
  box-shadow: 0 14px 28px rgba(228,84,106,.26);
}
.button-danger:hover { color: #fff; box-shadow: 0 18px 34px rgba(228,84,106,.34); transform: translateY(-1px); }
.button-light,
.copy-button {
  border: 1px solid var(--border);
  background: linear-gradient(180deg, var(--surface), var(--surface-2));
  color: var(--sos-blue-dark);
  box-shadow: var(--shadow-xs);
}
.button-light:hover,
.copy-button:hover {
  border-color: var(--border-strong);
  color: var(--sos-blue-dark);
  box-shadow: 0 10px 22px rgba(18,39,77,.08);
  transform: translateY(-1px);
}

/* Forme */
input[type="text"], input[type="email"], input[type="password"], input[type="tel"], input[type="number"], input[type="search"], select, textarea {
  min-height: 46px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: rgba(255,255,255,.86);
  color: var(--text);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.50);
  transition: border-color .18s ease, box-shadow .18s ease, background .18s ease;
}
[data-theme="dark"] input[type="text"], [data-theme="dark"] input[type="email"], [data-theme="dark"] input[type="password"], [data-theme="dark"] input[type="tel"], [data-theme="dark"] input[type="number"], [data-theme="dark"] input[type="search"], [data-theme="dark"] select, [data-theme="dark"] textarea {
  background: rgba(21,35,61,.92);
}
input:focus, select:focus, textarea:focus {
  border-color: rgba(0,174,234,.68);
  box-shadow: var(--focus);
}
.form-label, label { color: var(--heading); font-weight: 850; }
.form-help, .muted { color: var(--muted); }
.polje-lozinka { grid-template-columns: minmax(0, 1fr) 54px; gap: 10px; }
.password-toggle {
  border-radius: 14px;
  border: 1px solid var(--border);
  background: linear-gradient(180deg, var(--surface), var(--surface-2));
  color: var(--sos-blue-dark);
}
.password-toggle:hover { border-color: var(--border-strong); transform: translateY(-1px); }

/* Dashboard */
.employee-card {
  display: grid;
  grid-template-columns: minmax(260px, 320px) minmax(0, 1fr);
  padding: 0;
  overflow: hidden;
  border-radius: var(--radius-lg);
}
.employee-identity {
  position: relative;
  min-height: 230px;
  padding: 30px 24px;
  display: grid;
  align-content: center;
  justify-items: center;
  text-align: center;
  color: #fff;
  background:
    radial-gradient(circle at 74% 20%, rgba(0,174,234,.30), transparent 14rem),
    linear-gradient(150deg, #173865, #10264c);
}
.employee-identity::after {
  content: "";
  position: absolute;
  inset: auto -32px -70px auto;
  width: 180px;
  height: 180px;
  border-radius: 999px;
  background: rgba(0,174,234,.14);
}
.employee-identity h2 { margin: 12px 0 3px; color: #fff; font-size: 22px; }
.employee-identity p { margin: 0; color: rgba(255,255,255,.76); font-weight: 800; }
.employee-role { margin-top: 10px; background: rgba(0,174,234,.18); border-color: rgba(132,204,241,.32); color: #dff5fc; }
.employee-photo-link { position: relative; z-index: 1; margin-top: 12px; color: #dff5fc; font-weight: 850; }
.employee-info { padding: clamp(22px, 2.2vw, 32px); align-self: center; }
.employee-section-label { color: var(--muted-2); font-size: 11px; font-weight: 920; letter-spacing: .12em; }
.employee-info-grid,
.account-info-grid,
.admin-profile-info {
  gap: 14px 18px;
}
.employee-info-item {
  min-height: 66px;
  padding: 12px 14px;
  border: 1px solid transparent;
  border-radius: 18px;
  transition: background .18s ease, border-color .18s ease, transform .18s ease;
}
.employee-info-item:hover {
  background: var(--surface-2);
  border-color: var(--border);
  transform: translateY(-1px);
}
.employee-info-item small { color: var(--muted-2); font-size: 11px; letter-spacing: .05em; }
.employee-info-item strong { color: var(--heading); font-size: 14px; }
.info-icon {
  width: 42px;
  height: 42px;
  min-width: 42px;
  border-radius: 14px;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.42);
}
.dashboard-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
}
.metric {
  min-height: 148px;
  padding: 24px;
  overflow: hidden;
  border-radius: 26px;
}
.metric::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(255,255,255,.14), transparent 58%);
  pointer-events: none;
}
.metric:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.metric span { color: var(--muted); font-size: 12px; letter-spacing: .08em; text-transform: uppercase; }
.metric strong { font-size: 48px; letter-spacing: -.075em; }
.metric small { color: var(--muted); max-width: 210px; }
.metric-icon {
  top: 22px;
  right: 22px;
  width: 46px;
  height: 46px;
  border-radius: 16px;
  box-shadow: 0 10px 24px rgba(18,39,77,.10);
}
.metric:hover .metric-icon { transform: rotate(-4deg) scale(1.06); }
.quick-card {
  min-height: 126px;
  padding: 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  color: #fff;
  background:
    radial-gradient(circle at 88% 0%, rgba(0,174,234,.30), transparent 16rem),
    linear-gradient(135deg, #173865, #10264c);
  border-color: rgba(255,255,255,.12);
}
.quick-card h2 { margin: 0 0 4px; color: #fff; }
.quick-card p { margin: 0; color: rgba(255,255,255,.72); }
.quick-card .button-light { background: rgba(255,255,255,.10); border-color: rgba(255,255,255,.24); color: #fff; }
.quick-card .button-light:hover { background: rgba(255,255,255,.16); color: #fff; }
.dashboard-two-col { grid-template-columns: minmax(0, 1fr); margin-bottom: 18px; }
.equipment-list { gap: 12px; }
.equipment-item {
  border-radius: 18px;
  border: 1px solid var(--border);
  background: linear-gradient(180deg, var(--surface), var(--surface-2));
  transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease;
}
.equipment-item:hover { transform: translateY(-2px); border-color: var(--border-strong); box-shadow: var(--shadow-soft); }
.equipment-icon {
  width: 48px;
  height: 48px;
  border-radius: 16px;
  background: linear-gradient(135deg, #19396b, #10264c);
  box-shadow: 0 12px 24px rgba(18,39,77,.18);
}

/* Tabele */
.table-wrap {
  border: 1px solid var(--border);
  border-radius: 20px;
  overflow: hidden;
  background: var(--surface);
}
table { border-collapse: separate; border-spacing: 0; }
thead th {
  height: 46px;
  background: linear-gradient(180deg, var(--surface-2), var(--surface-3));
  color: var(--muted);
  font-size: 11px;
  font-weight: 920;
  letter-spacing: .10em;
  text-transform: uppercase;
}
tbody td { border-top: 1px solid var(--border); }
tbody tr { transition: background .16s ease, transform .16s ease; }
tbody tr:hover { background: rgba(0,174,234,.045); }
.ticket-title strong { color: var(--heading); font-weight: 900; }
.ticket-title small { color: var(--muted); }
.pill {
  min-height: 28px;
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: -.01em;
}
.status-open { background: #e7f6ff; color: #0079aa; }
.status-in-progress { background: #e9edff; color: #334cc7; }
.status-waiting { background: #fff2dc; color: #a55c05; }
.status-resolved, .status-closed, .badge-success { background: var(--success-soft); color: var(--success); }
.priority-high, .priority-urgent, .badge-danger { background: var(--danger-soft); color: var(--danger); }
.priority-normal { background: #edf7ff; color: #087aa4; }
.priority-low { background: #eefaf3; color: #087a54; }

/* Podaci o nalogu */
.account-layout { gap: 22px; }
.account-summary { border-radius: var(--radius-lg); }
.account-preview {
  border: 1px solid var(--border);
  border-radius: 22px;
  background: linear-gradient(135deg, var(--surface-2), var(--surface));
}
.account-action-grid {
  grid-template-columns: minmax(520px, 1.02fr) minmax(520px, .98fr);
  gap: clamp(22px, 3vw, 34px);
  align-items: stretch;
}
.account-action-grid > .account-option-card {
  min-width: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  border-top: 4px solid transparent;
  border-image: linear-gradient(90deg, var(--sos-blue), var(--sos-red)) 1;
}
.account-action-grid .profile-photo-form,
.account-action-grid .password-form {
  flex: 1;
  display: flex;
  flex-direction: column;
}
.account-action-grid .password-form .inline-actions,
.account-action-grid .profile-photo-form .inline-actions { margin-top: auto; }
.account-action-grid .narrow-card { max-width: none; }
.file-dropzone {
  min-height: 104px;
  border: 1.5px dashed #8bd8f3;
  border-radius: 20px;
  background:
    linear-gradient(135deg, rgba(0,174,234,.08), rgba(255,255,255,.58));
  transition: border-color .18s ease, background .18s ease, box-shadow .18s ease, transform .18s ease;
}
.file-dropzone:hover,
.file-dropzone.dragover {
  border-color: var(--sos-blue);
  background: linear-gradient(135deg, rgba(0,174,234,.13), rgba(255,255,255,.78));
  box-shadow: var(--focus);
  transform: translateY(-1px);
}
.file-drop-icon {
  width: 56px;
  height: 56px;
  border-radius: 18px;
  background: linear-gradient(135deg, var(--sos-blue), #008fd0);
  color: #fff;
  box-shadow: 0 16px 30px rgba(0,174,234,.24);
}
.file-drop-name {
  background: var(--surface);
  border-color: var(--border);
}
.photo-cropper {
  border: 1px solid var(--border);
  border-radius: 22px;
  background: var(--surface-2);
}
.cropper-stage { border-radius: 20px; background: #0f172a; }
.cropper-frame { border: 2px solid rgba(255,255,255,.94); box-shadow: 0 0 0 999px rgba(0,0,0,.34); }
.cropper-result img { border-radius: 999px; box-shadow: 0 14px 32px rgba(18,39,77,.14); }

/* Administracija korisnika i opreme */
.admin-users-heading,
.equipment-hero {
  border-radius: var(--radius-lg);
  background:
    radial-gradient(circle at 92% 10%, rgba(0,174,234,.12), transparent 18rem),
    linear-gradient(135deg, var(--surface), var(--surface-2));
}
.admin-user-card,
.equipment-user-card,
.equipment-table-card,
.equipment-filter-card,
.equipment-create-card,
.notification-card,
.comment,
.tool-card-heading,
.danger-zone-card,
.ticket-danger-card {
  border-radius: 22px;
  border-color: var(--border);
  box-shadow: var(--shadow-xs);
}
.admin-user-card:hover,
.equipment-user-card:hover,
.notification-card:hover {
  border-color: var(--border-strong);
  box-shadow: var(--shadow-soft);
  transform: translateY(-2px);
}
.admin-user-edit-grid,
.equipment-filter-form,
.equipment-row-form,
.two-col-form { gap: 14px; }
.equipment-user-head {
  background: linear-gradient(135deg, var(--surface-2), var(--surface));
}
.equipment-row-editor summary { border-radius: 999px; background: var(--surface-3); color: #007fac; }
.equipment-row-form { box-shadow: var(--shadow-strong); }

/* Detalj tiketa i timeline */
.ticket-layout { gap: 22px; }
.description-box {
  border-radius: 20px;
  border: 1px solid var(--border);
  background: var(--surface-2);
}
.comment-header strong { color: var(--heading); }
.comment-internal { background: rgba(255,241,220,.58); }
.timeline::before { background: var(--border); }
.ticket-events-timeline {
  /* ~6 standard timeline entries: 6 × ~78px cards + 5 × 10px existing grid gap. */
  max-height: 518px;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding-right: 4px;
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
}

/* Alerti */
.alert {
  border-radius: 18px;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-xs);
}
.alert-success { background: var(--success-soft); border-color: rgba(13,150,104,.22); color: var(--success); }
.alert-danger { background: var(--danger-soft); border-color: rgba(201,54,78,.22); color: var(--danger); }
.alert-warning { background: var(--warning-soft); border-color: rgba(182,106,12,.22); color: var(--warning); }

/* Suptilne animacije */
@keyframes sosFadeUp {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes sosSoftPulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(0,174,234,.22); }
  50% { box-shadow: 0 0 0 8px rgba(0,174,234,0); }
}
.stranica > .card,
.stranica > section,
.account-action-grid > .card,
.dashboard-grid > .card {
  animation: sosFadeUp .34s ease both;
}
.dashboard-grid > .card:nth-child(2) { animation-delay: .04s; }
.dashboard-grid > .card:nth-child(3) { animation-delay: .08s; }
.dashboard-grid > .card:nth-child(4) { animation-delay: .12s; }
.notif-bedz { animation: sosSoftPulse 2.4s ease-in-out infinite; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: .01ms !important;
  }
}

@media (max-width: 1320px) {
  .dashboard-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .account-action-grid { grid-template-columns: 1fr; }
}
@media (max-width: 980px) {
  :root { --sidebar: 286px; }
  .sidebar { transform: translateX(-104%); }
  body.sidebar-otvoren .sidebar { transform: translateX(0); }
  .sidebar-overlay { display: block; }
  body.sidebar-otvoren .sidebar-overlay { opacity: 1; pointer-events: all; }
  .sadrzaj { margin-left: 0; }
  .mob-toggle { display: inline-grid; }
  .topbar { min-height: 68px; }
  .stranica { padding: 18px; }
  .employee-card { grid-template-columns: 1fr; }
  .employee-identity { min-height: 190px; }
  .quick-card { display: grid; }
}
@media (max-width: 760px) {
  body { font-size: 14px; }
  .ticket-events-timeline {
    max-height: min(518px, 60vh);
    max-height: min(518px, 60dvh);
  }
  .topbar-naslov small { display: none; }
  .korisnik-ime { display: none; }
  .dashboard-grid { grid-template-columns: 1fr; }
  .metric { min-height: 132px; }
  .metric strong { font-size: 40px; }
  .employee-info-grid,
  .account-info-grid,
  .admin-profile-info { grid-template-columns: 1fr; }
  .section-heading { display: grid; }
  .inline-actions { flex-wrap: wrap; }
  .inline-actions .button, .inline-actions button { flex: 1 1 180px; }
  .table-wrap { overflow-x: auto; }
  table { min-width: 720px; }
  .account-action-grid { gap: 18px; }
  .file-dropzone { grid-template-columns: 56px minmax(0, 1fr); }
  .file-drop-name { grid-column: 1 / -1; justify-self: start; }
}
@media (max-width: 640px) {
  .stranica { padding: 14px; }
  .card-pad { padding: 18px; }
  .employee-identity { padding: 24px 18px; }
  .topbar { padding: 0 12px; }
  .topbar-akcije { gap: 8px; }
  .icon-button { width: 40px; height: 40px; }
  .user-dropdown, .notif-dropdown { width: min(340px, calc(100vw - 20px)); right: -6px; }
}


/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   v3.6.1 — fluidnije animacije i premium login
   Održavanje: menjati samo u ovoj sekciji za mikro-animacije i login dizajn.
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */
:root {
  --ease-fluid: cubic-bezier(.2, .8, .2, 1);
  --ease-spring: cubic-bezier(.16, 1, .3, 1);
  --motion-fast: 160ms;
  --motion-base: 240ms;
  --motion-slow: 520ms;
  --login-card-shadow: 0 28px 90px rgba(28, 50, 93, .18), 0 10px 30px rgba(28, 50, 93, .10);
}

body { letter-spacing: -.006em; }

button, .button, .nav-link, .card, .metric, .quick-card, .admin-user-card,
.equipment-user-card, .equipment-table-card, .notification-card, .korisnik-chip,
.icon-button, .notif-item, .user-menu-links a, input, select, textarea, .file-dropzone {
  transition-property: transform, opacity, box-shadow, background-color, border-color, color, filter;
  transition-duration: var(--motion-base);
  transition-timing-function: var(--ease-fluid);
}

.button, .icon-button, .korisnik-chip, .nav-link { will-change: transform; }
.button:hover, .icon-button:hover, .korisnik-chip:hover { transform: translateY(-2px); }
.button:active, .icon-button:active, .korisnik-chip:active { transform: translateY(0) scale(.985); }
.nav-link:hover { transform: translateX(3px); }
.nav-link.aktivan { transform: translateX(0); }
.card:hover, .metric:hover, .quick-card:hover, .admin-user-card:hover,
.equipment-user-card:hover, .notification-card:hover {
  transform: translateY(-3px);
}
input:focus, select:focus, textarea:focus {
  transform: translateY(-1px);
  box-shadow: 0 0 0 4px rgba(0, 171, 236, .13), 0 8px 22px rgba(28, 50, 93, .08);
}
.alert-hide { opacity: 0; transform: translateY(-8px) scale(.985); }

.user-dropdown, .notif-dropdown {
  transform: translateY(12px) scale(.96);
  opacity: 0;
  transition: opacity var(--motion-base) var(--ease-spring), transform var(--motion-base) var(--ease-spring), visibility var(--motion-base) var(--ease-spring);
}
.user-dropdown.otvoren, .notif-dropdown.otvoren {
  transform: translateY(0) scale(1);
  opacity: 1;
}

@keyframes uiFadeRiseFluid {
  0% { opacity: 0; transform: translate3d(0, 18px, 0) scale(.985); filter: blur(3px); }
  100% { opacity: 1; transform: translate3d(0, 0, 0) scale(1); filter: blur(0); }
}
@keyframes uiSoftFloat {
  0%, 100% { transform: translate3d(0, 0, 0); }
  50% { transform: translate3d(0, -10px, 0); }
}
@keyframes uiSlowSpin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}
@keyframes uiBorderGlow {
  0%, 100% { opacity: .55; transform: scale(1); }
  50% { opacity: .95; transform: scale(1.025); }
}
@keyframes loginPanelEnter {
  0% { opacity: 0; transform: translate3d(24px, 18px, 0) scale(.985); filter: blur(6px); }
  100% { opacity: 1; transform: translate3d(0, 0, 0) scale(1); filter: blur(0); }
}
@keyframes loginHeroEnter {
  0% { opacity: 0; transform: translate3d(-18px, 0, 0); filter: blur(5px); }
  100% { opacity: 1; transform: translate3d(0, 0, 0); filter: blur(0); }
}
@keyframes loginSheen {
  0% { transform: translateX(-130%) rotate(12deg); opacity: 0; }
  18% { opacity: .62; }
  42% { opacity: .18; }
  100% { transform: translateX(130%) rotate(12deg); opacity: 0; }
}

.stranica > .card,
.stranica > section,
.dashboard-grid > .card,
.account-action-grid > .card,
.ticket-layout > *,
.admin-user-card,
.equipment-user-card,
.notification-card {
  animation: uiFadeRiseFluid .52s var(--ease-spring) both;
}
.dashboard-grid > .card:nth-child(2), .admin-user-card:nth-child(2), .equipment-user-card:nth-child(2) { animation-delay: .035s; }
.dashboard-grid > .card:nth-child(3), .admin-user-card:nth-child(3), .equipment-user-card:nth-child(3) { animation-delay: .07s; }
.dashboard-grid > .card:nth-child(4), .admin-user-card:nth-child(4), .equipment-user-card:nth-child(4) { animation-delay: .105s; }
.dashboard-grid > .card:nth-child(5), .admin-user-card:nth-child(5), .equipment-user-card:nth-child(5) { animation-delay: .14s; }

/* Login premium layout */
.auth-view {
  min-height: 100dvh;
  background:
    radial-gradient(circle at 12% 8%, rgba(0, 171, 236, .20), transparent 30rem),
    radial-gradient(circle at 88% 92%, rgba(222, 90, 108, .18), transparent 28rem),
    linear-gradient(135deg, #eef8fe 0%, #ffffff 45%, #f9eef0 100%);
}
.login-shell {
  position: relative;
  isolation: isolate;
  grid-template-columns: minmax(0, 1.15fr) minmax(420px, .85fr);
}
.login-shell::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -2;
  background-image:
    linear-gradient(rgba(28, 50, 93, .045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(28, 50, 93, .045) 1px, transparent 1px);
  background-size: 44px 44px;
  mask-image: radial-gradient(circle at 70% 45%, rgba(0,0,0,.82), transparent 70%);
  pointer-events: none;
}
.login-hero {
  background:
    radial-gradient(circle at 82% 15%, rgba(0, 171, 236, .34), transparent 22rem),
    radial-gradient(circle at 8% 78%, rgba(132, 204, 241, .14), transparent 24rem),
    linear-gradient(145deg, #13274c 0%, #1c325d 48%, #0e274f 100%);
  padding: clamp(34px, 5.2vw, 72px);
  overflow: hidden;
  animation: loginHeroEnter .7s var(--ease-spring) both;
}
.login-hero::before {
  width: 620px;
  height: 620px;
  right: -230px;
  top: -230px;
  background: radial-gradient(circle, rgba(0, 171, 236, .30), rgba(132, 204, 241, .10) 42%, transparent 68%);
  animation: uiSoftFloat 9s var(--ease-fluid) infinite;
}
.login-hero::after {
  background:
    linear-gradient(116deg, transparent 0 49%, rgba(255,255,255,.05) 49% 50%, transparent 50% 100%),
    radial-gradient(circle at 52% 45%, rgba(255,255,255,.06), transparent 28rem);
}
.login-hero .brand-mark-large {
  width: 76px;
  height: 76px;
  min-width: 76px;
  border-radius: 24px;
  box-shadow: 0 18px 42px rgba(0,0,0,.28), inset 0 0 0 1px rgba(0,171,236,.28);
  animation: uiSoftFloat 5.6s var(--ease-fluid) infinite;
}
.hero-brend, .hero-sadrzaj, .hero-podnozje { animation: uiFadeRiseFluid .62s var(--ease-spring) both; }
.hero-sadrzaj { animation-delay: .08s; }
.hero-podnozje { animation-delay: .16s; }
.login-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 16px;
  padding: 8px 12px;
  border: 1px solid rgba(132, 204, 241, .30);
  border-radius: 999px;
  background: rgba(255,255,255,.08);
  color: #bceaff;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: .10em;
  text-transform: uppercase;
}
.login-eyebrow::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: #00abec;
  box-shadow: 0 0 0 6px rgba(0,171,236,.16);
}
.hero-sadrzaj h1 {
  max-width: 780px;
  font-size: clamp(38px, 5.9vw, 72px);
  line-height: .98;
  letter-spacing: -.065em;
}
.hero-sadrzaj p {
  max-width: 620px;
  color: rgba(255,255,255,.80);
  font-size: clamp(16px, 1.45vw, 20px);
}
.hero-tagovi span {
  border-color: rgba(132,204,241,.28);
  background: rgba(255,255,255,.075);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.10);
  transition: transform var(--motion-base) var(--ease-fluid), background var(--motion-base) var(--ease-fluid), border-color var(--motion-base) var(--ease-fluid);
}
.hero-tagovi span:hover {
  transform: translateY(-2px);
  background: rgba(255,255,255,.12);
  border-color: rgba(132,204,241,.52);
}
.login-benefit-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-top: clamp(28px, 4vw, 46px);
  max-width: 760px;
}
.login-benefit-card {
  position: relative;
  overflow: hidden;
  min-height: 112px;
  padding: 18px;
  border: 1px solid rgba(132,204,241,.20);
  border-radius: 24px;
  background: rgba(255,255,255,.075);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.10), 0 20px 50px rgba(0,0,0,.10);
  backdrop-filter: blur(12px);
  animation: uiFadeRiseFluid .58s var(--ease-spring) both;
}
.login-benefit-card:nth-child(2) { animation-delay: .08s; }
.login-benefit-card:nth-child(3) { animation-delay: .14s; }
.login-benefit-card::after {
  content: "";
  position: absolute;
  inset: -30% auto -30% -70%;
  width: 70%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,.18), transparent);
  transform: rotate(12deg);
  animation: loginSheen 7s var(--ease-fluid) infinite;
}
.login-benefit-card strong {
  display: block;
  margin-bottom: 12px;
  color: #84ccf1;
  font-size: 13px;
  font-weight: 950;
  letter-spacing: .12em;
}
.login-benefit-card span {
  display: block;
  color: #fff;
  font-size: 15px;
  font-weight: 850;
  line-height: 1.25;
}
.login-panel {
  position: relative;
  padding: clamp(24px, 5vw, 70px);
}
.login-panel::before, .login-panel::after {
  content: "";
  position: absolute;
  border-radius: 999px;
  pointer-events: none;
  filter: blur(.2px);
}
.login-panel::before {
  width: 170px;
  height: 170px;
  right: 12%;
  top: 9%;
  background: radial-gradient(circle, rgba(0,171,236,.20), transparent 70%);
  animation: uiSoftFloat 8.5s var(--ease-fluid) infinite;
}
.login-panel::after {
  width: 110px;
  height: 110px;
  left: 11%;
  bottom: 11%;
  background: radial-gradient(circle, rgba(222,90,108,.18), transparent 70%);
  animation: uiSoftFloat 10s var(--ease-fluid) infinite reverse;
}
.login-card-wrap { position: relative; z-index: 1; max-width: 468px; }
.login-card {
  position: relative;
  overflow: hidden;
  padding: clamp(28px, 4vw, 42px);
  border: 1px solid rgba(205, 232, 248, .86);
  border-radius: 34px;
  background: rgba(255, 255, 255, .86);
  box-shadow: var(--login-card-shadow);
  backdrop-filter: blur(18px);
  animation: loginPanelEnter .72s .08s var(--ease-spring) both;
}
.login-card::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 1px;
  background: linear-gradient(135deg, rgba(0,171,236,.42), rgba(255,255,255,0) 42%, rgba(222,90,108,.32));
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
  animation: uiBorderGlow 4.2s var(--ease-fluid) infinite;
}
.login-card h2 {
  margin-top: 12px;
  margin-bottom: 10px;
  font-size: clamp(28px, 4vw, 38px);
  line-height: 1.05;
  letter-spacing: -.055em;
}
.login-badge {
  width: fit-content;
  background: linear-gradient(135deg, rgba(0,171,236,.12), rgba(0,171,236,.04));
  border: 1px solid rgba(0,171,236,.22);
  color: #007fac;
}
.login-card label {
  display: grid;
  gap: 8px;
  margin-top: 18px;
  color: var(--heading, var(--text));
  font-size: 13px;
  font-weight: 900;
}
.login-card input {
  min-height: 52px;
  border-radius: 16px;
  background: rgba(248,251,254,.88);
}
.login-card input:hover { border-color: rgba(0,171,236,.35); }
.login-card .polje-lozinka {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 52px;
  gap: 8px;
  align-items: center;
}
.login-card .polje-lozinka input { width: 100%; }
.password-eye {
  min-width: 52px;
  width: 52px;
  height: 52px;
  padding: 0;
  border-radius: 16px;
  font-size: 18px;
  line-height: 1;
}
.password-eye.is-visible { background: rgba(0,171,236,.12); border-color: rgba(0,171,236,.30); color: #007fac; }
.login-submit {
  width: 100%;
  min-height: 54px;
  margin-top: 22px;
  justify-content: center;
  gap: 10px;
  border-radius: 18px;
  font-size: 15px;
  box-shadow: 0 18px 34px rgba(0, 171, 236, .28);
}
.login-submit span:last-child {
  transition: transform var(--motion-base) var(--ease-fluid);
}
.login-submit:hover span:last-child { transform: translateX(4px); }
.login-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 20px 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
  text-transform: uppercase;
  letter-spacing: .08em;
}
.login-divider::before,
.login-divider::after { content: ""; flex: 1; height: 1px; background: var(--border); }
.login-microsoft {
  width: 100%;
  min-height: 54px;
  justify-content: center;
  gap: 12px;
  border-radius: 18px;
  text-align: center;
}
.microsoft-mark {
  display: grid;
  grid-template-columns: repeat(2, 8px);
  grid-template-rows: repeat(2, 8px);
  gap: 2px;
  flex: 0 0 auto;
}
.microsoft-mark i:nth-child(1) { background: #f25022; }
.microsoft-mark i:nth-child(2) { background: #7fba00; }
.microsoft-mark i:nth-child(3) { background: #00a4ef; }
.microsoft-mark i:nth-child(4) { background: #ffb900; }
.login-card code {
  border-radius: 8px;
  background: rgba(28,50,93,.06);
  padding: 2px 5px;
}
[data-theme="dark"] .login-card {
  background: rgba(18, 29, 51, .82);
  border-color: rgba(42, 59, 87, .90);
}
[data-theme="dark"] .login-card input {
  background: rgba(23,36,62,.94);
}
[data-theme="dark"] .login-badge { color: #84ccf1; background: rgba(0,171,236,.12); }
[data-theme="dark"] .login-card code { background: rgba(255,255,255,.08); }

@media (max-width: 1080px) {
  .login-shell { grid-template-columns: 1fr; }
  .login-hero { min-height: auto; padding-bottom: 44px; }
  .login-panel { padding-top: 34px; }
  .login-card-wrap { max-width: 560px; }
}
@media (max-width: 760px) {
  .login-hero { padding: 28px 20px 34px; }
  .hero-brend { gap: 12px; }
  .login-hero .brand-mark-large { width: 58px; height: 58px; min-width: 58px; border-radius: 18px; font-size: 18px; }
  .hero-sadrzaj h1 { font-size: clamp(34px, 12vw, 48px); }
  .login-benefit-grid { grid-template-columns: 1fr; }
  .login-benefit-card { min-height: 86px; }
  .login-panel { padding: 18px; }
  .login-card { border-radius: 26px; padding: 24px; }
  .login-card .polje-lozinka { grid-template-columns: minmax(0, 1fr) 48px; }
  .password-eye { width: 48px; min-width: 48px; height: 48px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .login-hero::before, .login-panel::before, .login-panel::after,
  .login-hero .brand-mark-large, .login-benefit-card::after {
    animation: none !important;
  }
}

/* v3.9.0 — administratorsko podešavanje zahteva */
.settings-intro { margin-bottom: 18px; }
.settings-intro h2 { margin: 10px 0 7px; }
.settings-intro p { margin: 0; color: var(--muted); }
.ticket-settings-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
}
.settings-panel-wide { grid-column: 1 / -1; }
.settings-create-form,
.settings-item-form {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(120px, .8fr) minmax(95px, .55fr) auto;
  gap: 10px;
  align-items: end;
}
.settings-priority-form { grid-template-columns: minmax(150px, 1fr) minmax(220px, 1.8fr) minmax(95px, .55fr) auto; }
.settings-location-form { grid-template-columns: minmax(0, 3fr) minmax(95px, .6fr) auto auto; }
.settings-create-form {
  margin-bottom: 18px;
  padding: 15px;
  border: 1px dashed var(--border);
  border-radius: 15px;
  background: var(--surface-2);
}
.settings-create-form label,
.settings-item-form label { display: grid; min-width: 0; gap: 6px; color: var(--muted); font-size: 12px; font-weight: 750; }
.settings-items { display: grid; gap: 10px; }
.settings-item-form {
  padding: 13px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--surface);
}
.settings-active {
  display: flex !important;
  align-items: center;
  align-self: center;
  gap: 7px !important;
  color: var(--text) !important;
  white-space: nowrap;
}
.settings-active input { width: auto; margin: 0; }
.ticket-file-dropzone-compact { padding: 18px 14px; }
@media (max-width: 1760px) {
  .ticket-settings-grid { grid-template-columns: 1fr; }
  .settings-panel-wide { grid-column: auto; }
}
@media (max-width: 760px) {
  .settings-create-form,
  .settings-item-form,
  .settings-priority-form,
  .settings-location-form { grid-template-columns: 1fr; align-items: stretch; }
  .settings-active { align-self: start; }
  .settings-create-form .button,
  .settings-item-form .button { width: 100%; }
}

/* v3.10.0 — oprema i prijava problema */
.equipment-create-card {
  position: relative;
  top: auto;
  z-index: 2;
  align-self: start;
  overflow: visible;
}
.equipment-control-grid { align-items: start; }
.equipment-by-user-card { position: relative; z-index: 1; }
.equipment-create-card .button[type="submit"] {
  position: relative;
  z-index: 3;
  width: 100%;
}
.equipment-item-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: row;
  gap: 8px;
}
.equipment-report-button {
  min-width: 118px;
  padding: 8px 11px;
  font-size: 12px;
  white-space: nowrap;
}
@media (max-width: 760px) {
  .equipment-item { grid-template-columns: 42px minmax(0, 1fr); }
  .equipment-item-actions {
    grid-column: 2;
    align-items: flex-start;
    flex-direction: row;
    flex-wrap: wrap;
  }
}

/* v3.11.0 — vidljiv editor i naglašena prijava problema */
.equipment-report-button,
.equipment-report-button:hover,
.equipment-report-button:focus-visible {
  border-color: #c81e32;
  background: linear-gradient(135deg, #e43d54, #b91c32);
  color: #fff;
  box-shadow: 0 9px 20px rgba(185, 28, 50, .24);
}
.equipment-report-button:hover { transform: translateY(-1px); }
.equipment-table-card {
  position: relative;
  overflow: visible !important;
}
.equipment-table-wrap {
  position: relative;
  overflow: auto;
  overscroll-behavior-inline: contain;
}
.equipment-table tbody tr:has(.equipment-row-editor[open]) {
  position: relative;
  z-index: 50;
}
.equipment-row-editor[open] { z-index: 100; }
.equipment-row-editor[open] .equipment-row-form {
  top: 100%;
  z-index: 200;
  max-height: min(72vh, 720px);
  overflow-y: auto;
}
@media (max-width: 760px) {
  .equipment-table-wrap { overflow-x: auto !important; overflow-y: visible !important; }
  .equipment-row-editor[open] .equipment-row-form { max-height: none; overflow: visible; }
}

/* v3.12.0 — stabilne copy akcije i inicijali avatara */
.employee-info-item.copy-item {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) 74px;
  align-items: center;
  gap: 12px;
  padding-right: 14px;
}
.employee-info-item.copy-item .copy-button {
  position: static;
  right: auto;
  top: auto;
  width: 74px;
  min-width: 74px;
  min-height: 32px;
  padding: 6px 9px;
  align-self: center;
  justify-self: end;
  transform: none !important;
}
.employee-info-item.copy-item .copy-button:hover,
.employee-info-item.copy-item .copy-button:active { transform: none !important; }
.user-dropdown-header > .avatar,
.korisnik-chip > .avatar {
  display: inline-grid;
  place-items: center;
  flex: 0 0 auto;
  margin: 0;
  padding: 0;
  overflow: hidden;
  color: #fff;
  line-height: 1;
  text-align: center;
}
.user-dropdown-header > .avatar.avatar-lg {
  width: 48px;
  min-width: 48px;
  height: 48px;
  font-size: 14px;
  border-radius: 16px;
}
.user-dropdown-header > div { min-width: 0; }
.forced-password-card { max-width: 520px; }
@media (max-width: 560px) {
  .employee-info-item.copy-item {
    grid-template-columns: 42px minmax(0, 1fr) 68px;
    gap: 10px;
  }
  .employee-info-item.copy-item .copy-button { width: 68px; min-width: 68px; }
}

/* v3.13.0 — brisanje podešavanja zahteva */
.settings-item-form {
  grid-template-columns: minmax(150px, 2fr) minmax(110px, .8fr) minmax(82px, .5fr) auto minmax(82px, auto);
}
.settings-item-form.settings-priority-form {
  grid-template-columns: minmax(125px, 1fr) minmax(170px, 1.6fr) minmax(82px, .5fr) auto minmax(82px, auto);
}
.settings-item-form.settings-location-form {
  grid-template-columns: minmax(200px, 3fr) minmax(82px, .55fr) auto minmax(82px, auto);
}
.settings-row-actions {
  display: grid;
  grid-template-columns: 1fr;
  gap: 7px;
  align-self: end;
}
.settings-row-actions .button {
  width: 100%;
  min-width: 82px;
  min-height: 36px;
  padding: 7px 10px;
  font-size: 12px;
}
@media (max-width: 760px) {
  .settings-item-form,
  .settings-item-form.settings-priority-form,
  .settings-item-form.settings-location-form { grid-template-columns: 1fr; }
  .settings-row-actions { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* v3.13.1 — korekcija kontrasta postojećeg admin interfejsa u dark modu */
[data-theme="dark"] .admin-user-stats > div {
  border-color: var(--border);
  background: linear-gradient(180deg, rgba(26, 45, 78, .96), rgba(17, 29, 52, .96));
  box-shadow: var(--shadow-xs);
}
[data-theme="dark"] .admin-user-stats span,
[data-theme="dark"] .admin-users-toolbar,
[data-theme="dark"] .admin-user-search,
[data-theme="dark"] .admin-user-identity span,
[data-theme="dark"] .admin-user-identity small { color: var(--muted); }
[data-theme="dark"] .admin-user-stats strong,
[data-theme="dark"] .admin-user-identity strong,
[data-theme="dark"] .admin-user-edit-grid label,
[data-theme="dark"] .admin-check-label,
[data-theme="dark"] .admin-check-label .inline-check { color: var(--heading); }
[data-theme="dark"] .admin-users-toolbar {
  border-color: var(--border);
  background: rgba(21, 35, 61, .88);
}
[data-theme="dark"] .admin-user-card {
  border-color: var(--border);
  background: linear-gradient(180deg, rgba(21, 35, 61, .98), rgba(17, 29, 52, .98));
  box-shadow: var(--shadow-soft);
}
[data-theme="dark"] .admin-user-card:hover { border-color: var(--border-strong); }
[data-theme="dark"] .admin-user-edit { border-top-color: var(--border); }
[data-theme="dark"] .admin-user-edit summary {
  background: rgba(0, 174, 234, .14);
  color: #8fdcf7;
}
[data-theme="dark"] .admin-user-edit summary:hover {
  background: rgba(0, 174, 234, .22);
  color: #fff;
}
[data-theme="dark"] .admin-user-edit-grid input,
[data-theme="dark"] .admin-user-edit-grid select,
[data-theme="dark"] .admin-create-user-card input,
[data-theme="dark"] .admin-create-user-card select {
  border-color: var(--border);
  background: rgba(21, 35, 61, .96);
  color: var(--text);
  box-shadow: none;
}
[data-theme="dark"] .admin-user-edit-grid input::placeholder,
[data-theme="dark"] .admin-create-user-card input::placeholder { color: var(--muted-2); }
[data-theme="dark"] .admin-user-edit-grid option,
[data-theme="dark"] .admin-create-user-card option {
  background: #15233d;
  color: #edf7ff;
}
[data-theme="dark"] .admin-user-delete-form { border-top-color: var(--border); }
[data-theme="dark"] .admin-profile-tool-card {
  border-color: var(--border);
  background: linear-gradient(180deg, rgba(21, 35, 61, .98), rgba(17, 29, 52, .98));
  box-shadow: var(--shadow-soft);
}
[data-theme="dark"] .danger-zone-card {
  border-color: rgba(228, 84, 106, .34);
  background:
    radial-gradient(circle at 100% 0%, rgba(228, 84, 106, .12), transparent 12rem),
    linear-gradient(180deg, rgba(38, 29, 49, .96), rgba(22, 29, 50, .96));
}
[data-theme="dark"] .user-admin-layout .button-light,
[data-theme="dark"] .admin-profile-card .button-light {
  border-color: var(--border-strong);
  background: var(--surface-3);
  color: #edf7ff;
}
[data-theme="dark"] .user-admin-layout .button-light:hover,
[data-theme="dark"] .admin-profile-card .button-light:hover {
  border-color: #4f759d;
  background: #203a5f;
  color: #fff;
}
[data-theme="dark"] .user-dropdown-footer .button,
[data-theme="dark"] .user-dropdown-footer .button:hover,
[data-theme="dark"] .user-dropdown-footer .button:focus-visible {
  border-color: var(--border-strong);
  background: rgba(21, 35, 61, .96);
  color: #fff;
}

/* v3.13.2 — kontrast copy dugmeta u dark modu */
[data-theme="dark"] .employee-info-item.copy-item .copy-button,
[data-theme="dark"] .employee-info-item.copy-item .copy-button:hover,
[data-theme="dark"] .employee-info-item.copy-item .copy-button:focus-visible {
  border-color: var(--border-strong);
  background: var(--surface-3);
  color: #edf7ff;
  box-shadow: var(--shadow-xs);
}
[data-theme="dark"] .employee-info-item.copy-item .copy-button:hover,
[data-theme="dark"] .employee-info-item.copy-item .copy-button:focus-visible {
  border-color: #4f759d;
  background: #203a5f;
  color: #fff;
}
[data-theme="dark"] .employee-info-item.copy-item .copy-button.kopirano {
  border-color: rgba(74, 222, 128, .38);
  background: rgba(21, 128, 61, .22);
  color: #a7f3d0;
}

/* v3.15.0 — učesnici tiketa, u okviru postojećeg sistema formi i kartica */
.participant-picker { min-width: 0; }
.participant-search-wrap { position: relative; }
.participant-results {
  position: absolute;
  z-index: 45;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  max-height: 260px;
  overflow-y: auto;
  padding: 6px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--surface);
  box-shadow: var(--shadow-soft);
}
.participant-results[hidden] { display: none; }
.participant-results button {
  display: flex;
  width: 100%;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
  padding: 10px 12px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: var(--text);
  text-align: left;
  cursor: pointer;
}
.participant-results button:hover,
.participant-results button.is-active,
.participant-results button:focus-visible {
  background: var(--surface-2);
  outline: none;
}
.participant-results button strong { color: var(--heading); }
.participant-results button span,
.participant-result-empty { color: var(--muted); font-size: .84rem; }
.participant-result-empty { padding: 10px 12px; }
.participant-selected {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 8px;
}
.participant-selected:empty { display: none; }
.participant-chip {
  display: inline-flex;
  max-width: 100%;
  align-items: center;
  gap: 7px;
  padding: 6px 7px 6px 10px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface-2);
  color: var(--text);
  font-size: .82rem;
}
.participant-chip > span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.participant-chip button {
  display: inline-grid;
  width: 24px;
  height: 24px;
  flex: 0 0 24px;
  place-items: center;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font: inherit;
  font-size: 1.15rem;
}
.participant-chip button:hover,
.participant-chip button:focus-visible { background: var(--surface-3); color: var(--heading); }
.participant-list {
  display: grid;
  gap: 8px;
  margin: 12px 0 16px;
  padding: 0;
  list-style: none;
}
.participant-list li {
  display: grid;
  gap: 2px;
  padding: 9px 11px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface-2);
}
.participant-list strong { color: var(--heading); font-size: .9rem; }
.participant-list span { overflow-wrap: anywhere; color: var(--muted); font-size: .8rem; }
.participant-add-form { margin-top: 12px; }
.participant-add-form .participant-picker > label { margin-bottom: 7px; }

/* v3.21.2 — razmak između odvojenih akcija obrade tiketa bez promene izgleda dugmadi */
.ticket-processing-forms {
  display: grid;
  gap: 15px;
}

[data-theme="dark"] .participant-results {
  border-color: var(--border-strong);
  background: var(--surface);
}
[data-theme="dark"] .participant-results button:hover,
[data-theme="dark"] .participant-results button.is-active,
[data-theme="dark"] .participant-results button:focus-visible,
[data-theme="dark"] .participant-chip,
[data-theme="dark"] .participant-list li { background: var(--surface-3); }

/* v3.15.1 — tehničke zaštite od preklapanja i izlaska sadržaja iz postojećeg layout-a */
.card,
.section-heading > *,
.ticket-title-row > *,
.notification-card > div,
.employee-info-item > div,
.equipment-user-head > div,
.equipment-user-item > div,
.equipment-table-asset > div,
.admin-profile-main > div,
.sidebar-user-card > div,
.user-dropdown-header > div { min-width: 0; }

.topbar-naslov,
.korisnik-ime {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.korisnik-ime { max-width: 170px; }

.section-heading h2,
.section-heading h3,
.section-heading p,
.ticket-title-row h2,
.notification-card strong,
.notification-card p,
.notif-item strong,
.notif-item span,
.timeline li,
.equipment-user-head strong,
.equipment-user-head span,
.equipment-user-item strong,
.equipment-user-item small,
.equipment-table-asset strong,
.equipment-table-asset small,
.admin-profile-main strong,
.admin-profile-main span,
.admin-profile-main small,
.user-dropdown-header strong,
.user-dropdown-header span,
.participant-list strong,
.participant-list span {
  overflow-wrap: anywhere;
  word-break: break-word;
}

.button,
button {
  max-width: 100%;
  white-space: normal;
  overflow-wrap: anywhere;
  text-align: center;
}

@media (max-width: 760px) {
  .admin-user-card-top,
  .equipment-user-head,
  .notification-card {
    flex-wrap: wrap;
    align-items: flex-start;
  }
  .admin-user-actions,
  .settings-row-actions { width: 100%; }
  .notification-card .pill { flex: 0 0 auto; }
}

/* v3.17.1 — originalni logo organizacije i automatsko osvežavanje asseta */
.brand-mark {
  overflow: hidden;
  padding: 0;
  background: #00a7ef;
}
.brand-mark-large { padding: 0; }
.brand-logo {
  display: block;
  width: 100%;
  height: 100%;
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  object-position: center;
  pointer-events: none;
}
.ticket-view-switch {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin: 0 0 18px;
}
.ticket-view-switch .button { min-height: 42px; }

@media (max-width: 640px) {
  .ticket-view-switch {
    align-items: stretch;
    flex-direction: column;
  }
  .ticket-view-switch .button { width: 100%; }
}


/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   v3.18.0 — mobilna odjava, 404 prikaz i validacija forme
   Održavanje: mobilni meni zadržava postojeći desktop izgled; skroluju se samo linkovi.
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */
@media (max-width: 900px) {
  .topbar { overflow: visible; }
  .user-dropdown {
    display: flex;
    flex-direction: column;
    width: min(360px, calc(100vw - 20px));
    max-height: calc(100vh - var(--topbar) - 18px);
    max-height: calc(100dvh - var(--topbar) - 18px);
    overflow: hidden;
    z-index: 400;
  }
  .user-dropdown-header,
  .user-menu-stat,
  .user-dropdown-footer { flex: 0 0 auto; }
  .user-menu-links {
    min-height: 0;
    overflow-x: hidden;
    overflow-y: auto;
    overscroll-behavior: contain;
    scrollbar-gutter: stable;
    padding-right: 2px;
  }
  .user-dropdown-footer {
    margin-top: 8px;
    background: var(--surface);
  }
  .topbar-akcije .user-dropdown-footer .button-light {
    display: inline-flex;
    width: 100%;
  }
}

@media (max-width: 420px) {
  .user-dropdown {
    right: -4px;
    width: calc(100vw - 16px);
    border-radius: 18px;
  }
  .user-dropdown-header { padding: 9px; }
  .user-menu-stat { margin: 9px 0; }
  .user-menu-links a { padding: 9px 10px; }
  .user-dropdown-footer { padding-top: 10px; }
}

.error-page-card {
  width: min(100%, 760px);
  margin: clamp(18px, 4vw, 48px) auto;
  padding: clamp(26px, 5vw, 54px);
  text-align: center;
  overflow: hidden;
  isolation: isolate;
}
.auth-view .error-page-card {
  width: min(100%, 468px);
  margin: 0;
}
.error-view .login-panel {
  min-height: 100vh;
  min-height: 100dvh;
}
.error-page-code {
  margin: 6px 0 0;
  color: var(--sos-blue-dark);
  font-size: clamp(76px, 18vw, 150px);
  font-weight: 950;
  line-height: .9;
  letter-spacing: -.08em;
}
[data-theme="dark"] .error-page-code { color: #eaf7ff; }
.error-page-card h1 {
  margin: 22px 0 8px;
  color: var(--heading, var(--text));
  font-size: clamp(24px, 4vw, 38px);
  line-height: 1.15;
}
.error-page-card p {
  max-width: 620px;
  margin: 0 auto;
  color: var(--muted);
  line-height: 1.7;
}
.error-page-actions {
  display: flex;
  justify-content: center;
  margin-top: 28px;
}
.error-page-actions .button { min-width: min(100%, 260px); }
.error-illustration {
  position: relative;
  width: 132px;
  height: 92px;
  margin: 0 auto 8px;
  color: var(--sos-blue);
}
.error-document {
  position: absolute;
  left: 22px;
  top: 4px;
  width: 66px;
  height: 80px;
  border: 4px solid currentColor;
  border-radius: 12px;
  background: var(--surface-2);
  box-shadow: var(--shadow-soft);
}
.error-document::before,
.error-document::after {
  content: "";
  position: absolute;
  left: 14px;
  right: 14px;
  height: 4px;
  border-radius: 999px;
  background: currentColor;
  opacity: .52;
}
.error-document::before { top: 24px; }
.error-document::after { top: 40px; }
.error-magnifier {
  position: absolute;
  right: 12px;
  bottom: 11px;
  width: 42px;
  height: 42px;
  border: 5px solid var(--sos-red);
  border-radius: 50%;
  background: color-mix(in srgb, var(--surface) 88%, transparent);
  box-shadow: 0 10px 24px rgba(28, 50, 93, .14);
}
.error-magnifier::after {
  content: "";
  position: absolute;
  right: -19px;
  bottom: -12px;
  width: 27px;
  height: 6px;
  border-radius: 999px;
  background: var(--sos-red);
  transform: rotate(45deg);
  transform-origin: left center;
}
@supports not (background: color-mix(in srgb, white 50%, transparent)) {
  .error-magnifier { background: var(--surface); }
}
@media (max-width: 900px) {
  .error-view .login-hero { display: none; }
  .error-view .login-shell { grid-template-columns: minmax(0, 1fr); }
  .error-view .login-panel { padding: 18px; }
}
@media (max-width: 640px) {
  .error-page-card { margin: 12px auto; padding: 26px 18px; }
  .error-page-actions { align-items: stretch; }
  .error-page-actions .button { width: 100%; }
}

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   v3.21.0 — kontrolisani istek korisničke sesije
   Održavanje: vrednosti trajanja dolaze iz config.php; CSS menja samo prikaz upozorenja.
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */
.session-timeout-backdrop[hidden] { display: none !important; }
.session-timeout-backdrop {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(8, 18, 35, .62);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}
.session-timeout-dialog {
  width: min(100%, 520px);
  margin: 0;
  padding: clamp(22px, 4vw, 32px);
  text-align: center;
  box-shadow: 0 28px 80px rgba(4, 12, 26, .34);
}
.session-timeout-dialog h2 {
  margin: 16px 0 8px;
  color: var(--heading, var(--text));
  font-size: clamp(24px, 4vw, 32px);
  line-height: 1.2;
  overflow-wrap: anywhere;
}
.session-timeout-dialog > p { line-height: 1.6; }
.session-timeout-countdown {
  display: grid;
  grid-template-columns: 1fr auto auto;
  align-items: baseline;
  gap: 8px;
  margin: 24px 0;
  padding: 16px 18px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface-2);
  text-align: left;
}
.session-timeout-countdown span { color: var(--muted); font-weight: 800; }
.session-timeout-countdown strong {
  min-width: 2ch;
  color: var(--sos-red);
  font-size: clamp(32px, 8vw, 48px);
  font-variant-numeric: tabular-nums;
  line-height: 1;
  text-align: right;
}
.session-timeout-countdown small { color: var(--muted); font-weight: 800; }
.session-timeout-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.session-timeout-actions .button { width: 100%; min-height: 46px; }
.session-timeout-status {
  min-height: 1.5em;
  margin: 14px 0 0;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}
body.session-warning-open { overflow: hidden; }
body.session-warning-open > *:not(.session-timeout-backdrop) { pointer-events: none; }
body.session-warning-open .session-timeout-backdrop { pointer-events: auto; }
@media (max-width: 640px) {
  .session-timeout-backdrop { padding: 12px; }
  .session-timeout-dialog { padding: 22px 16px; border-radius: 18px; }
  .session-timeout-countdown {
    grid-template-columns: 1fr auto;
    padding: 14px;
  }
  .session-timeout-countdown small { grid-column: 2; text-align: right; }
  .session-timeout-actions { grid-template-columns: 1fr; }
}

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   v3.21.3 — lokalno poliranje dashboard-a i evidencije
   Održavanje: pravila su namerno lokalna da ne menjaju zajedničke card/table komponente.
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */
.recent-tickets-card:hover {
  transform: translateY(-1px);
  border-color: var(--border-strong);
  box-shadow: var(--shadow-soft);
}
.recent-tickets-card .table-wrap {
  overflow-x: auto;
}

/* v3.24.6 — stabilan desktop layout Evidencije
   Učesnici/Obrada zadržavaju prirodnu visinu, dok Evidencija koristi sav preostali
   prostor do dna glavne tiket kartice. Višak događaja skroluje unutar timeline-a. */
@media (min-width: 1161px) {
  .ticket-layout {
    align-items: stretch;
  }

  .ticket-layout > .side-stack {
    display: flex;
    flex-direction: column;
    min-height: 0;
  }

  .ticket-layout > .side-stack > .ticket-evidence-card {
    display: flex;
    flex: 1 1 auto;
    flex-direction: column;
    min-height: 0;
    overflow: hidden;
  }

  .ticket-evidence-card .ticket-events-timeline {
    flex: 1 1 0;
    min-height: 0;
    max-height: none;
    overflow-y: auto;
    align-content: start;
  }
}

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   v3.22.1 — kompaktna mobilna action dugmad
   Održavanje: lokalni override uklanja 180px flex-basis samo na ciljanim mobile akcijama.
   Desktop/tablet dimenzije i zajednički .button stil ostaju nepromenjeni.
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */
@media (max-width: 640px) {
  .quick-card .inline-actions .button,
  .ticket-form-actions .button {
    flex: 0 0 auto;
    min-height: 48px;
    padding-block: 12px;
  }
}

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   v3.22.2 — kompaktna mobile dugmad na Podaci o nalogu
   Održavanje: lokalno poništava inherited 180px flex-basis samo za primarne
   CTA akcije čuvanja fotografije i lozinke. Desktop/tablet ostaju nepromenjeni.
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */
@media (max-width: 640px) {
  .account-action-grid .profile-photo-form .inline-actions > .button-primary,
  .account-action-grid .password-form .inline-actions > .button-primary {
    flex: 0 0 auto;
    min-height: 48px;
    padding-block: 12px;
  }
}


/* v3.23.0 — skalabilna administracija korisnika/opreme i server-side paginacija */
.admin-user-search-form {
  flex: 1 1 560px;
  min-width: 0;
  display: flex;
  align-items: flex-end;
  gap: 10px;
}
.admin-user-search-form .admin-user-search { flex: 1 1 auto; min-width: 220px; }
.admin-user-search-actions { display: flex; align-items: center; gap: 8px; flex: 0 0 auto; }

/* Desna kartica počinje u istoj grid liniji kao administraciona kartica; nema sticky offset-a. */
.user-admin-layout > .admin-create-user-card {
  position: relative;
  top: auto;
  align-self: start;
}

.pagination-summary {
  margin-top: 16px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}
.pagination {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--border);
}
.pagination-pages {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  flex-wrap: wrap;
}
.pagination-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 36px;
  min-height: 36px;
  padding: 7px 11px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface);
  color: var(--text);
  font-size: 12px;
  font-weight: 850;
  text-decoration: none;
}
a.pagination-link:hover {
  border-color: var(--border-strong);
  background: var(--surface-3);
  text-decoration: none;
  transform: translateY(-1px);
}
.pagination-link.is-current {
  border-color: rgba(0,171,236,.45);
  background: var(--accent-soft);
  color: var(--accent-strong);
}
.pagination-link.is-disabled {
  opacity: .48;
  cursor: default;
}
.pagination-ellipsis {
  display: inline-grid;
  place-items: center;
  min-width: 26px;
  color: var(--muted);
  font-weight: 900;
}

.equipment-filter-form {
  grid-template-columns: minmax(180px, 1.4fr) minmax(170px, 1.15fr) repeat(3, minmax(120px, .85fr)) minmax(105px, .6fr);
}
.equipment-notes-cell {
  max-width: 260px;
  white-space: normal;
  overflow-wrap: anywhere;
  line-height: 1.4;
}

/* Desktop/laptop: sadržajne kolone ostaju čitljive, a višak širine skroluje
   isključivo unutar tabele. Akcije ostaju dostupne na desnoj ivici. */
@media (min-width: 761px) {
  .equipment-table {
    min-width: 1070px;
    table-layout: fixed;
  }

  .equipment-table th:nth-child(1) { width: 145px; }
  .equipment-table th:nth-child(2) { width: 95px; }
  .equipment-table th:nth-child(3) { width: 165px; }
  .equipment-table th:nth-child(4) { width: 120px; }
  .equipment-table th:nth-child(5) { width: 105px; }
  .equipment-table th:nth-child(6) { width: 100px; }
  .equipment-table th:nth-child(7) { width: 115px; }
  .equipment-table th:nth-child(8) { width: 110px; }
  .equipment-table th:nth-child(9) { width: 115px; }

  .equipment-table th,
  .equipment-table td {
    padding: 14px 10px;
    vertical-align: top;
    overflow-wrap: anywhere;
  }

  .equipment-table td > strong,
  .equipment-table-asset strong {
    color: var(--text);
    font-size: 14px;
    font-weight: 850;
    line-height: 1.45;
  }

  .equipment-table td small,
  .equipment-table-asset small {
    color: var(--muted);
    font-size: 12px;
    font-weight: 650;
    line-height: 1.4;
  }

  .equipment-table-asset {
    align-items: flex-start;
    gap: 10px;
  }

  .equipment-table .equipment-icon {
    flex: 0 0 48px;
    width: 48px;
    min-width: 48px;
    height: 48px;
  }

  .equipment-table .equipment-notes-cell { min-width: 0; }

  .equipment-table th:last-child,
  .equipment-table td:last-child {
    padding-right: 12px;
    padding-left: 10px;
    text-align: center;
  }

  .equipment-table .equipment-row-editor summary {
    display: flex;
    width: 76px;
    min-width: 76px;
    min-height: 38px;
    margin: 0 auto;
    padding: 8px 10px;
  }
}

@media (min-width: 761px) and (max-width: 1535px) {
  .equipment-table th:last-child,
  .equipment-table td:last-child {
    position: sticky;
    right: 0;
    z-index: 4;
    background: var(--surface);
    box-shadow: -10px 0 16px -16px rgba(18, 39, 77, .6);
  }

  .equipment-table th:last-child {
    z-index: 6;
    background: var(--surface-2);
  }

  .equipment-table tr:hover td:last-child {
    background: var(--surface-2);
  }
}

@media (max-width: 1180px) {
  .equipment-filter-form {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 760px) {
  .admin-user-search-form,
  .pagination {
    align-items: stretch;
    flex-direction: column;
  }
  .admin-user-search-actions,
  .pagination-pages {
    width: 100%;
  }
  .admin-user-search-actions .button {
    flex: 1 1 auto;
  }
  .pagination-pages {
    justify-content: flex-start;
  }
  .pagination > .pagination-link {
    width: 100%;
  }
  .equipment-filter-form {
    grid-template-columns: 1fr;
  }
}

/* v3.23.0 — lokalne responsive korekcije za nove admin/filter kontrole */
@media (max-width: 900px) {
  /* Toolbar od 900px naniže već prelazi u kolonu; 560px flex-basis ne sme postati visina search forme. */
  .admin-users-toolbar .admin-user-search-form {
    flex: 0 0 auto;
    width: 100%;
  }
}

@media (max-width: 760px) {
  /* Namenska grupa ne nasleđuje globalni .inline-actions flex-basis od 180px. */
  .equipment-hero-actions {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    width: 100%;
    gap: 10px;
  }

  .equipment-hero-actions .button {
    width: 100%;
    height: auto;
    min-height: 48px;
    padding-block: 12px;
  }
}

@media (max-width: 640px) {
  /* Ista korekcija za CTA dugmad forme filtera na užim telefonima. */
  .equipment-filter-form .inline-actions .button {
    flex: 0 0 auto;
    min-height: 48px;
    padding-block: 12px;
  }
}

/* Administracija korisnika — kompaktan pregled i forma koja se otvara po potrebi. */
.user-admin-layout {
  grid-template-columns: minmax(0, 1fr);
}

.admin-create-user-card {
  position: static;
  top: auto;
  margin: 0 0 18px;
  border: 1px solid var(--border);
  border-radius: 18px;
  background: var(--surface);
}

.admin-create-user-card > summary {
  margin: 14px;
  list-style: none;
  cursor: pointer;
  width: fit-content;
}

.admin-create-user-card > summary::-webkit-details-marker { display: none; }
.admin-create-user-card > summary::before { content: '+ '; font-weight: 900; }
.admin-create-user-card[open] > summary::before { content: '− '; }

.admin-create-user-body {
  padding: 4px 18px 18px;
  border-top: 1px solid var(--border);
}

.admin-create-user-body > div:first-child { margin: 16px 0; }
.admin-create-user-body h3 { margin: 8px 0 4px; }

.admin-create-user-form {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  align-items: start;
}

.admin-create-user-form > label {
  min-width: 0;
  color: var(--ink);
  font-size: 12px;
  font-weight: 800;
}

.admin-create-user-form input { margin-top: 6px; }
.admin-create-role-fieldset { grid-row: span 3; }
.admin-create-user-actions { grid-column: 1 / -1; margin-top: 2px; }
.admin-users-table-wrap { overflow-x: auto; }

.admin-users-table {
  min-width: 980px;
  table-layout: fixed;
}

.admin-users-table th:nth-child(1) { width: 24%; }
.admin-users-table th:nth-child(2) { width: 25%; }
.admin-users-table th:nth-child(3) { width: 11%; }
.admin-users-table th:nth-child(4) { width: 10%; }
.admin-users-table th:nth-child(5) { width: 16%; }
.admin-users-table th:nth-child(6) { width: 14%; }

.admin-users-table th,
.admin-users-table td { vertical-align: middle; }
.admin-user-row td { border-bottom: 0; }

.admin-user-role-summary {
  display: -webkit-box;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  color: var(--text);
  font-size: 12px;
  font-weight: 700;
  line-height: 1.4;
}

.admin-user-edit-row > td {
  padding-top: 0;
  background: var(--surface);
}

.admin-user-edit-row .admin-user-edit {
  margin-top: 0;
  padding: 8px 0 10px;
  border-top: 1px dashed var(--border);
}

.admin-user-edit-row .admin-user-edit[open] { padding-bottom: 16px; }
.admin-user-edit-row .admin-user-delete-form { margin-top: 14px; }

@media (max-width: 900px) {
  .admin-create-user-form { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .admin-create-role-fieldset { grid-row: auto; grid-column: 1 / -1; }
}

@media (max-width: 560px) {
  .admin-create-user-form { grid-template-columns: 1fr; }
  .admin-create-role-fieldset,
  .admin-create-user-actions { grid-column: auto; }
  .admin-create-user-actions .button { width: 100%; }
}

/* v3.24.2 — ciljane korekcije rasporeda administratorskih formi. */
.admin-user-edit-grid > .admin-user-edit-primary-field {
  width: 100%;
  max-width: 360px;
  gap: 4px;
}

.admin-user-edit-grid > .admin-user-edit-primary-field input {
  height: 40px;
  min-height: 40px;
  margin-top: 3px;
  padding: 7px 10px;
}

.admin-request-categories .settings-items {
  gap: 9px;
}

.admin-request-categories .settings-item-form {
  grid-template-columns: minmax(140px, 1.5fr) minmax(80px, .6fr) minmax(130px, 1.1fr) minmax(72px, .45fr) auto minmax(82px, auto);
  gap: 12px;
  align-items: center;
  padding: 12px 14px;
}

.admin-request-categories .settings-item-form > label {
  align-self: stretch;
  justify-content: start;
}

.admin-request-categories .settings-row-actions {
  align-self: center;
}

.admin-request-priorities .settings-items {
  gap: 7px;
}

.admin-request-priorities .settings-item-form {
  gap: 8px;
  padding: 9px 11px;
}

.admin-request-priorities .settings-item-form label {
  gap: 4px;
}

.admin-request-priorities .settings-item-form input,
.admin-request-priorities .settings-item-form select {
  padding: 9px 11px;
}

.admin-request-priorities .settings-row-actions {
  gap: 5px;
}

.admin-request-priorities .settings-row-actions .button {
  min-height: 34px;
  padding: 6px 9px;
}

.equipment-control-grid {
  grid-template-columns: minmax(0, 1fr);
}

.admin-equipment-toolbar {
  align-items: center;
  margin-bottom: 0;
}

.admin-equipment-toolbar h3 {
  margin-top: 8px;
}

.equipment-create-disclosure {
  position: static;
  top: auto;
  padding: 0;
}

.equipment-create-disclosure:not([open]) {
  display: none;
}

.equipment-create-disclosure > summary {
  width: fit-content;
  margin: 14px;
  list-style: none;
  cursor: pointer;
}

.equipment-create-disclosure > summary::-webkit-details-marker { display: none; }
.equipment-create-disclosure > summary::before { content: '+ '; font-weight: 900; }
.equipment-create-disclosure[open] > summary::before { content: '− '; }

.equipment-create-body {
  border-top: 1px solid var(--border);
}

.equipment-create-body > h3 {
  margin: 8px 0 16px;
}

.equipment-create-form {
  max-width: 760px;
}

@media (max-width: 760px) {
  .admin-user-edit-grid > .admin-user-edit-primary-field {
    max-width: min(100%, 360px);
  }

  .admin-equipment-toolbar {
    align-items: stretch;
  }

  .admin-equipment-toolbar .button {
    width: 100%;
  }

  .admin-request-categories .settings-item-form {
    grid-template-columns: 1fr;
  }
}
