/* ==========================================================================
   TašBet HelpDesk - zajednicki stil
   Boje su uzete iz pozadine (img/bg/background.png) i loga: teget + TašBet crvena.
   ========================================================================== */

/* Barlow - tekst */
@font-face { font-family: "Barlow"; font-style: normal; font-weight: 400; font-display: swap; src: url("/fonts/barlow-400-latin-ext.woff2") format("woff2"); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Barlow"; font-style: normal; font-weight: 400; font-display: swap; src: url("/fonts/barlow-400-latin.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Barlow"; font-style: normal; font-weight: 500; font-display: swap; src: url("/fonts/barlow-500-latin-ext.woff2") format("woff2"); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Barlow"; font-style: normal; font-weight: 500; font-display: swap; src: url("/fonts/barlow-500-latin.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Barlow"; font-style: normal; font-weight: 600; font-display: swap; src: url("/fonts/barlow-600-latin-ext.woff2") format("woff2"); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Barlow"; font-style: normal; font-weight: 600; font-display: swap; src: url("/fonts/barlow-600-latin.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }

/* Barlow Condensed - naslovi i brojke */
@font-face { font-family: "Barlow Condensed"; font-style: normal; font-weight: 600; font-display: swap; src: url("/fonts/barlow-condensed-600-latin-ext.woff2") format("woff2"); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Barlow Condensed"; font-style: normal; font-weight: 600; font-display: swap; src: url("/fonts/barlow-condensed-600-latin.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Barlow Condensed"; font-style: normal; font-weight: 700; font-display: swap; src: url("/fonts/barlow-condensed-700-latin-ext.woff2") format("woff2"); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Barlow Condensed"; font-style: normal; font-weight: 700; font-display: swap; src: url("/fonts/barlow-condensed-700-latin.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }

:root {
  color-scheme: dark;

  /* Brend - iz pozadine i loga */
  --navy-950: #000a1f;
  --navy-900: #00122f;
  --navy-800: #002050;
  --navy-600: #003070;
  --blue-500: #1f56b8;
  --blue-400: #3f74d6;
  --blue-300: #8fb4ec;
  --red-700: #a30d2b;
  --red-600: #ca1236;
  --red-500: #de2248;
  --red-300: #ff93a8;

  /* Tekst */
  --text: #edf2fb;
  --text-dim: #9eb0d0;
  --text-mute: #7489ae;

  /* Povrsine - poluprovidna teget preko pozadine (bez blur-a, da skrolovanje bude lako i na slabim uredjajima) */
  --surface: rgba(2, 26, 68, 0.8);
  --surface-hover: rgba(10, 44, 104, 0.86);
  --surface-solid: #041a42;
  --surface-raised: #082660;
  --field: rgba(0, 12, 36, 0.55);
  --line: rgba(143, 180, 236, 0.13);
  --line-strong: rgba(143, 180, 236, 0.25);

  /* Stari nazivi - koriste ih inline stilovi u stranama */
  --bg: var(--navy-900);
  --panel: var(--surface-solid);
  --panel-2: var(--surface-raised);
  --border: var(--line-strong);
  --accent: var(--blue-300);
  --accent-2: var(--blue-500);
  --brand-red: var(--red-600);
  --brand-red-2: var(--red-700);
  --danger: var(--red-600);
  --ok: #37c77f;
  --warn: #f0a92e;

  --radius-lg: 16px;
  --radius: 12px;
  --radius-sm: 8px;
  --shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05), 0 18px 40px -20px rgba(0, 4, 20, 0.8);
  --font-body: "Barlow", "Segoe UI", system-ui, -apple-system, sans-serif;
  --font-display: "Barlow Condensed", "Barlow", "Segoe UI", system-ui, sans-serif;
  --ease: cubic-bezier(0.2, 0.8, 0.2, 1);

  --z-sticky: 10;
  --z-menu: 20;
  --z-modal: 100;
  --z-toast: 1000;
}

/* Tonovi za statuse, role i stanja naloga (tekst uvek ide uz boju) */
.status-NOVO, .role-admin { --tone: #e0324f; --tone-text: #ff9db0; --tone-bg: rgba(224, 50, 79, 0.16); --tone-line: rgba(255, 147, 168, 0.3); }
.status-U_TOKU, .role-slot { --tone: #f0a92e; --tone-text: #f7c86a; --tone-bg: rgba(240, 169, 46, 0.14); --tone-line: rgba(247, 200, 106, 0.3); }
.status-RESENO, .role-management, .acc-active { --tone: #37c77f; --tone-text: #86e8b4; --tone-bg: rgba(55, 199, 127, 0.14); --tone-line: rgba(134, 232, 180, 0.28); }
.status-ODBIJENO, .acc-inactive { --tone: #8a9cc0; --tone-text: #bac7de; --tone-bg: rgba(138, 156, 192, 0.14); --tone-line: rgba(186, 199, 222, 0.26); }
.role-lokal { --tone: #3f74d6; --tone-text: #aac5f3; --tone-bg: rgba(63, 116, 214, 0.2); --tone-line: rgba(170, 197, 243, 0.3); }

/* ---------- Osnova ---------- */
*, *::before, *::after { box-sizing: border-box; }

html {
  background: var(--navy-950);
  -webkit-text-size-adjust: 100%;
  scrollbar-color: rgba(143, 180, 236, 0.28) transparent;
}

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.5;
  color: var(--text);
  -webkit-font-smoothing: antialiased;
}

/* Pozadina sa TašBet prugama; pseudo-element da ostane fiksna i na telefonu */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(900px 520px at 100% 0%, rgba(202, 18, 54, 0.16), transparent 65%),
    linear-gradient(180deg, rgba(0, 16, 44, 0.78) 0%, rgba(0, 12, 34, 0.9) 60%, rgba(0, 9, 28, 0.95) 100%),
    url("/img/bg/background.png") center / cover no-repeat;
  /* WebP je ~10x manji; browseri koji ne znaju image-set ostaju na PNG-u iznad */
  background:
    radial-gradient(900px 520px at 100% 0%, rgba(202, 18, 54, 0.16), transparent 65%),
    linear-gradient(180deg, rgba(0, 16, 44, 0.78) 0%, rgba(0, 12, 34, 0.9) 60%, rgba(0, 9, 28, 0.95) 100%),
    image-set(url("/img/bg/background.webp") type("image/webp"), url("/img/bg/background.png") type("image/png")) center / cover no-repeat;
}

body.auth::before {
  background:
    linear-gradient(180deg, rgba(0, 16, 44, 0.35) 0%, rgba(0, 10, 30, 0.7) 100%),
    url("/img/bg/background.png") center / cover no-repeat;
  background:
    linear-gradient(180deg, rgba(0, 16, 44, 0.35) 0%, rgba(0, 10, 30, 0.7) 100%),
    image-set(url("/img/bg/background.webp") type("image/webp"), url("/img/bg/background.png") type("image/png")) center / cover no-repeat;
}

::selection { background: rgba(202, 18, 54, 0.55); color: #fff; }

a { color: var(--blue-300); text-underline-offset: 3px; }
a:hover { color: #b8d0f5; }

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.1;
  letter-spacing: 0.005em;
  text-wrap: balance;
}
h1 { font-size: 36px; }
h2 { font-size: 28px; margin: 0 0 16px; }
h3 { font-size: 21px; margin: 0 0 14px; }
p { text-wrap: pretty; }

:focus-visible { outline: 2px solid var(--blue-300); outline-offset: 2px; }

.hidden { display: none !important; }

/* ---------- Dugmad ---------- */
button, .btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  cursor: pointer;
  border: 1px solid transparent;
  border-radius: 10px;
  padding: 11px 20px;
  font-family: inherit;
  font-size: 15.5px;
  font-weight: 600;
  line-height: 1.25;
  letter-spacing: 0.01em;
  color: #fff;
  text-decoration: none;
  background: linear-gradient(180deg, var(--red-500), var(--red-600));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.16), 0 10px 22px -12px rgba(202, 18, 54, 0.9);
  transition: background 0.2s, border-color 0.2s, box-shadow 0.2s, color 0.2s, transform 0.12s var(--ease);
}
button:hover, .btn:hover {
  color: #fff;
  background: linear-gradient(180deg, #ea3a5f, var(--red-500));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2), 0 12px 26px -10px rgba(222, 34, 72, 0.95);
}
button:active, .btn:active { transform: translateY(1px) scale(0.99); }
button:disabled, .btn:disabled { opacity: 0.5; cursor: not-allowed; box-shadow: none; transform: none; }

button.secondary, .btn.secondary {
  color: var(--text);
  background: rgba(0, 40, 100, 0.34);
  border-color: var(--line-strong);
  box-shadow: none;
}
button.secondary:hover, .btn.secondary:hover {
  background: rgba(31, 86, 184, 0.32);
  border-color: rgba(143, 180, 236, 0.45);
  box-shadow: none;
}

button.danger, .btn.danger {
  color: var(--red-300);
  background: transparent;
  border-color: rgba(255, 147, 168, 0.45);
  box-shadow: none;
}
button.danger:hover, .btn.danger:hover {
  color: #fff;
  background: var(--red-600);
  border-color: var(--red-600);
}

.btn-sm { padding: 8px 14px; font-size: 14.5px; border-radius: 9px; }
.btn-block { width: 100%; margin-top: 20px; }
.view-all { display: flex; width: 100%; margin-top: 18px; padding: 15px; font-size: 16px; }

.icon-btn, .user-menu-btn, .edit-lokal-btn {
  width: 38px;
  height: 38px;
  padding: 0;
  font-size: 17px;
  line-height: 1;
  border-radius: 10px;
}

/* ---------- Forme ---------- */
label {
  display: block;
  margin: 16px 0 7px;
  font-size: 14.5px;
  font-weight: 500;
  color: var(--text-dim);
}

input:not([type="checkbox"]):not([type="radio"]), select, textarea {
  width: 100%;
  padding: 12px 14px;
  font-family: inherit;
  font-size: 16px;
  color: var(--text);
  background: var(--field);
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
}
input:not([type="checkbox"]):not([type="radio"]):hover, select:hover, textarea:hover { border-color: rgba(143, 180, 236, 0.4); }
input:not([type="checkbox"]):not([type="radio"]):focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--blue-300);
  background: rgba(0, 20, 54, 0.72);
  box-shadow: 0 0 0 3px rgba(143, 180, 236, 0.18);
}
input::placeholder, textarea::placeholder { color: var(--text-mute); }
textarea { resize: vertical; line-height: 1.5; }

select {
  appearance: none;
  -webkit-appearance: none;
  padding-right: 40px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5l5 5 5-5' fill='none' stroke='%239eb0d0' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  cursor: pointer;
}
select option { background: var(--surface-solid); color: var(--text); }

input[type="file"] { padding: 9px; cursor: pointer; color: var(--text-dim); }
input[type="file"]::file-selector-button {
  margin-right: 12px;
  padding: 8px 14px;
  font-family: inherit;
  font-size: 14.5px;
  font-weight: 600;
  color: var(--text);
  background: rgba(31, 86, 184, 0.3);
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.2s;
}
input[type="file"]::file-selector-button:hover { background: rgba(31, 86, 184, 0.5); }

input[type="checkbox"], input[type="radio"] {
  width: 18px;
  height: 18px;
  margin: 0;
  accent-color: var(--red-600);
  cursor: pointer;
  flex-shrink: 0;
}

.error-msg {
  display: none;
  margin-top: 14px;
  padding: 11px 14px;
  font-size: 14.5px;
  color: #ffc4cf;
  background: rgba(202, 18, 54, 0.16);
  border: 1px solid rgba(255, 147, 168, 0.35);
  border-radius: 10px;
}
.error-msg.show { display: block; }

.form-row { margin-bottom: 4px; }

/* ---------- Prijava ---------- */
.center-screen {
  min-height: 100vh;
  min-height: 100dvh;
  display: grid;
  place-items: center;
  padding: 24px 16px;
}

.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 28px;
  box-shadow: var(--shadow);
}
.card > h2:first-child, .card > h3:first-child { margin-top: 0; }

.login-card {
  position: relative;
  overflow: hidden;
  width: 100%;
  max-width: 420px;
  padding: 46px 40px 40px;
  text-align: center;
  background: rgba(0, 22, 58, 0.72);
  border: 1px solid rgba(143, 180, 236, 0.18);
  border-radius: 22px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.07), 0 40px 80px -30px rgba(0, 4, 20, 0.95);
  -webkit-backdrop-filter: blur(18px) saturate(140%);
  backdrop-filter: blur(18px) saturate(140%);
  animation: rise-in 0.45s var(--ease);
}
/* plavo-crvena crta kao na logu */
.login-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(100deg, var(--blue-500) 0 58%, transparent 58% 59%, var(--red-600) 59% 100%);
}

.login-logo {
  display: block;
  height: 62px;
  width: auto;
  margin: 2px auto 22px;
  filter: drop-shadow(0 10px 24px rgba(0, 0, 0, 0.35));
}
.login-card h1 { margin: 0 0 6px; }
.login-card p.sub { margin: 0 0 24px; font-size: 16px; color: var(--text-dim); }
.login-card form { text-align: left; }

@keyframes rise-in {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ---------- Gornja traka ---------- */
.topbar {
  position: sticky;
  top: 0;
  z-index: var(--z-sticky);
  display: flex;
  align-items: center;
  gap: 28px;
  padding: 12px 32px;
  background: rgba(0, 18, 50, 0.8);
  border-bottom: 1px solid var(--line);
  -webkit-backdrop-filter: blur(16px) saturate(140%);
  backdrop-filter: blur(16px) saturate(140%);
}
.topbar::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  height: 3px;
  background: linear-gradient(100deg, var(--blue-500) 0 60%, transparent 60% 60.4%, var(--red-600) 60.4% 100%);
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
  padding: 4px 6px;
  margin: -4px -6px;
  color: var(--text);
  text-decoration: none;
  border-radius: 10px;
  transition: background 0.2s;
}
.brand:hover { color: var(--text); background: rgba(143, 180, 236, 0.08); }
.brand .logo { display: block; height: 34px; width: auto; }
.brand-name {
  padding-left: 12px;
  border-left: 1px solid var(--line-strong);
  font-family: var(--font-display);
  font-size: 23px;
  font-weight: 600;
  line-height: 1;
}
.brand-role {
  padding: 3px 8px;
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--red-300);
  background: rgba(202, 18, 54, 0.16);
  border: 1px solid rgba(255, 147, 168, 0.3);
  border-radius: 6px;
}

.nav { display: flex; align-items: center; gap: 4px; flex: 1; min-width: 0; }
.nav-link {
  padding: 8px 14px;
  font-size: 15px;
  font-weight: 500;
  color: var(--text-dim);
  text-decoration: none;
  white-space: nowrap;
  border-radius: 9px;
  transition: color 0.2s, background 0.2s;
}
.nav-link:hover { color: var(--text); background: rgba(143, 180, 236, 0.08); }
.nav-link[aria-current="page"] {
  color: #fff;
  background: rgba(202, 18, 54, 0.18);
  box-shadow: inset 0 -2px 0 var(--red-600);
}

.who { display: flex; align-items: center; gap: 12px; margin-left: auto; min-width: 0; }

.user-chip {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  padding: 4px 12px 4px 4px;
  background: rgba(143, 180, 236, 0.06);
  border: 1px solid var(--line);
  border-radius: 12px;
}
.user-chip #whoami, .user-chip .whoami {
  max-width: 220px;
  overflow: hidden;
  font-size: 15px;
  font-weight: 600;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 32px;
  height: 32px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: #fff;
  background: linear-gradient(135deg, var(--navy-600), var(--blue-500));
  border-radius: 9px;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.12);
}

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 15px;
  color: var(--text-dim);
  text-decoration: none;
}
.back-link:hover { color: var(--text); }

/* ---------- Raspored ---------- */
.container { max-width: 1280px; margin: 0 auto; padding: 32px 32px 56px; }

.toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 12px;
  margin-bottom: 20px;
}
.toolbar select, .toolbar input:not([type="checkbox"]) { width: auto; min-width: 150px; }
.toolbar input[type="search"], .toolbar #filterSearch { min-width: 240px; }
.toolbar.filters .page-title { flex-basis: 100%; margin-bottom: 4px; }
.back-link + .toolbar { margin-top: 14px; }

.page-title { flex: 1 1 auto; margin: 0; font-size: 30px; }
.page-title .badge { margin-left: 8px; vertical-align: middle; font-family: var(--font-body); }
.section-title { margin: 0 0 14px; font-size: 26px; }

.check, .inline-field {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  font-size: 14.5px;
  color: var(--text-dim);
}
.check { cursor: pointer; user-select: none; }
.inline-field input { width: auto; }

.grid-2 {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr);
  gap: 20px;
  align-items: start;
}
.grid-2 > * { min-width: 0; }
.back-link + .grid-2 { margin-top: 14px; }
.stack { display: grid; gap: 20px; align-content: start; }
.comment-form { margin-top: 16px; }
.resolved-toggle + textarea { margin-top: 10px; }
th[aria-label="Izbor"] { width: 1%; }

.notif-cta { width: 100%; margin-bottom: 20px; }

/* ---------- Tabele ---------- */
table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  font-variant-numeric: tabular-nums;
}

th, td {
  padding: 14px 18px;
  font-size: 15px;
  text-align: left;
  vertical-align: middle;
  border-bottom: 1px solid var(--line);
}
th {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.04em;
  white-space: nowrap;
  color: var(--text-mute);
  background: rgba(0, 12, 36, 0.4);
}
thead th:first-child { border-top-left-radius: var(--radius-lg); }
thead th:last-child { border-top-right-radius: var(--radius-lg); }
tbody tr:last-child td { border-bottom: 0; }
tbody tr:last-child td:first-child { border-bottom-left-radius: var(--radius-lg); }
tbody tr:last-child td:last-child { border-bottom-right-radius: var(--radius-lg); }

tr.clickable { cursor: pointer; }
tr.clickable td { transition: background 0.15s; }
tr.clickable:hover td { background: rgba(31, 86, 184, 0.16); }

.cell-id { color: var(--text-dim); font-weight: 500; }
.cell-actions { text-align: right; }
.empty-row { padding: 32px 18px; text-align: center; color: var(--text-dim); }

/* ---------- Oznake ---------- */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 3px 10px;
  font-size: 13.5px;
  font-weight: 600;
  line-height: 1.5;
  white-space: nowrap;
  color: var(--tone-text, var(--text-dim));
  background: var(--tone-bg, rgba(143, 180, 236, 0.1));
  border: 1px solid var(--tone-line, rgba(143, 180, 236, 0.22));
  border-radius: 7px;
}
.badge[class*="status-"]::before, .badge[class*="acc-"]::before {
  content: "";
  width: 7px;
  height: 7px;
  flex-shrink: 0;
  border-radius: 50%;
  background: var(--tone);
}
/* talas oko tacke za "Kvar" - samo transform i opacity, da ga iscrtava graficka a ne procesor */
.badge.status-NOVO, .lane.status-NOVO .lane-dot { position: relative; }
.badge.status-NOVO::after, .lane.status-NOVO .lane-dot::after {
  content: "";
  position: absolute;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--tone);
  animation: pulse-ring 2s var(--ease) infinite;
  pointer-events: none;
}
.badge.status-NOVO::after { top: 50%; left: 10px; margin-top: -3.5px; }
.lane.status-NOVO .lane-dot::after { inset: 0; width: auto; height: auto; }

@keyframes pulse-ring {
  from { transform: scale(1); opacity: 0.7; }
  to { transform: scale(2.8); opacity: 0; }
}

/* ---------- Statistika ---------- */
.stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
  margin-bottom: 32px;
}

.stat-tile {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  padding: 22px 24px 20px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  transition: transform 0.2s var(--ease), border-color 0.2s;
}
.stat-tile:hover { transform: translateY(-2px); border-color: var(--line-strong); }
/* dijagonalne pruge kao na pozadini, u boji stanja */
.stat-tile::before, .stat-tile::after {
  content: "";
  position: absolute;
  top: -20%;
  z-index: -1;
  height: 140%;
  background: var(--tone, var(--blue-500));
  transform: skewX(-28deg);
}
.stat-tile::after { right: 22px; width: 30px; opacity: 0.85; }
.stat-tile::before { right: 64px; width: 12px; opacity: 0.35; }
.stat-tile.tone-total { --tone: var(--blue-500); }
.stat-tile.tone-bad { --tone: #e0324f; }
.stat-tile.tone-warn { --tone: #f0a92e; }

.stat-tile .value {
  font-family: var(--font-display);
  font-size: 54px;
  font-weight: 700;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}
.stat-tile .label { margin-top: 8px; font-size: 15px; font-weight: 500; color: var(--text-dim); }

/* Raspodela po statusu - traka u boji statusa, staza je svetliji ton iste boje */
.breakdown-card { margin-bottom: 32px; }
.breakdown { display: grid; gap: 14px; }
.breakdown-row {
  display: grid;
  grid-template-columns: 120px minmax(0, 1fr) 84px;
  align-items: center;
  gap: 16px;
}
.breakdown-track { height: 10px; overflow: hidden; background: var(--tone-bg); border-radius: 5px; }
.breakdown-fill { height: 100%; background: var(--tone); border-radius: 0 4px 4px 0; }
.breakdown-count { text-align: right; font-size: 17px; font-weight: 600; font-variant-numeric: tabular-nums; }
.breakdown-share { margin-left: 8px; font-size: 13px; font-weight: 500; color: var(--text-mute); }

/* ---------- Admin kontrolna tabla ---------- */
.dash { display: grid; gap: 20px; }

.dash-hero {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: 24px 40px;
  padding: 28px 32px 30px;
  background: linear-gradient(115deg, rgba(0, 48, 118, 0.74), rgba(2, 24, 64, 0.72) 62%);
  border: 1px solid var(--line-strong);
  border-radius: 20px;
  box-shadow: var(--shadow);
}
/* pruge iz pozadine, izmedju broja i pokazatelja */
.dash-hero::before, .dash-hero::after {
  content: "";
  position: absolute;
  top: -30%;
  z-index: -1;
  height: 160%;
  transform: skewX(-28deg);
}
.dash-hero::before { right: 34%; width: 64px; background: var(--red-600); opacity: 0.5; }
.dash-hero::after { right: calc(34% + 92px); width: 22px; background: var(--blue-500); opacity: 0.55; }

.dash-greeting { margin: 0; font-size: 15px; color: var(--text-dim); }
.dash-greeting strong { color: var(--text); font-weight: 600; }
.dash-open {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 4px 14px;
  margin: 8px 0 18px;
  font-size: 30px;
}
.dash-open-count { font-size: 92px; font-weight: 700; line-height: 0.9; font-variant-numeric: tabular-nums; }

/* traka Kvar / U toku - segmenti u boji statusa sa razmakom od 2px */
.split-bar {
  display: flex;
  gap: 2px;
  max-width: 560px;
  height: 12px;
  overflow: hidden;
  background: rgba(143, 180, 236, 0.12);
  border-radius: 6px;
}
.split-bar .seg { min-width: 6px; background: var(--tone); }
.split-legend { display: flex; flex-wrap: wrap; gap: 8px 20px; margin-top: 12px; font-size: 14.5px; color: var(--text-dim); }
.legend-item { display: inline-flex; align-items: center; gap: 8px; }
.legend-dot { width: 9px; height: 9px; background: var(--tone); border-radius: 3px; }
.legend-item strong { color: var(--text); font-variant-numeric: tabular-nums; }
.dash-oldest { margin: 14px 0 0; font-size: 14.5px; color: var(--text-dim); }
.dash-oldest a { font-weight: 600; color: var(--text); text-decoration: none; }
.dash-oldest a:hover { text-decoration: underline; }

.dash-kpis { display: flex; gap: 12px; margin: 0; }
.kpi {
  min-width: 130px;
  padding: 14px 18px 16px;
  background: rgba(0, 12, 36, 0.5);
  border: 1px solid var(--line);
  border-radius: 12px;
}
.kpi dt { font-size: 13.5px; color: var(--text-dim); }
.kpi dd {
  margin: 6px 0 0;
  font-family: var(--font-display);
  font-size: 36px;
  font-weight: 700;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

.dash-grid { display: grid; grid-template-columns: minmax(0, 1.75fr) minmax(0, 1fr); gap: 20px; align-items: start; }
.dash-main, .dash-side { display: grid; gap: 20px; min-width: 0; }

.panel {
  padding: 22px 24px 24px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
}
.panel-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 12px; margin-bottom: 16px; }
.panel-head h2 { margin: 0; font-size: 24px; }
.panel-note { font-size: 13.5px; color: var(--text-mute); }
.panel-link { font-size: 14.5px; font-weight: 600; color: var(--blue-300); text-decoration: none; }
.panel-link:hover { color: #fff; }

/* tabla otvorenih kvarova */
.board { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.lane {
  min-height: 230px;
  padding: 12px;
  background: rgba(0, 12, 36, 0.36);
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: inset 0 3px 0 var(--tone);
}
.lane-head { display: flex; align-items: center; gap: 8px; padding: 4px 4px 12px; font-size: 15px; font-weight: 600; }
.lane-dot { width: 9px; height: 9px; background: var(--tone); border-radius: 50%; }
.lane-count {
  min-width: 28px;
  margin-left: auto;
  padding: 1px 8px;
  font-size: 13px;
  text-align: center;
  color: var(--tone-text);
  background: var(--tone-bg);
  border: 1px solid var(--tone-line);
  border-radius: 7px;
  font-variant-numeric: tabular-nums;
}
.lane-list { display: grid; gap: 8px; max-height: 452px; overflow-y: auto; }
.lane-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  color: var(--text);
  text-decoration: none;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 10px;
  transition: background 0.2s, border-color 0.2s, transform 0.2s var(--ease);
}
.lane-card:hover { color: var(--text); background: var(--surface-hover); border-color: var(--line-strong); transform: translateY(-1px); }
.lane-card .ticket-icon { width: 38px; height: 38px; font-size: 18px; border-radius: 10px; }
.lane-card-main { display: grid; flex: 1; min-width: 0; }
.lane-card-title { overflow: hidden; font-size: 15px; font-weight: 600; white-space: nowrap; text-overflow: ellipsis; }
.lane-card-sub { font-size: 13px; color: var(--text-dim); }
.lane-card-time { flex-shrink: 0; font-size: 12.5px; color: var(--text-mute); white-space: nowrap; font-variant-numeric: tabular-nums; }
.lane-card-time.is-stale { color: #f7c86a; font-weight: 600; }
.lane-empty { padding: 28px 10px; font-size: 14px; text-align: center; color: var(--text-mute); }

/* rang liste - jedna boja, jer se poredi kolicina */
.rank-list { display: grid; gap: 14px; margin: 0; padding: 0; list-style: none; }
.rank-row {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr) auto;
  grid-template-areas: "icon name value" ". track track";
  align-items: center;
  gap: 6px 10px;
}
.rank-icon, .rank-pos { grid-area: icon; }
.rank-icon { font-size: 17px; text-align: center; }
.rank-pos {
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  font-size: 12.5px;
  font-weight: 700;
  color: var(--text-dim);
  background: rgba(143, 180, 236, 0.1);
  border-radius: 7px;
}
.rank-row:first-child .rank-pos { color: #fff; background: var(--blue-500); }
.rank-name { grid-area: name; overflow: hidden; font-size: 15px; font-weight: 500; white-space: nowrap; text-overflow: ellipsis; }
.rank-value { grid-area: value; font-weight: 600; font-variant-numeric: tabular-nums; }
.rank-track { grid-area: track; height: 6px; overflow: hidden; background: rgba(63, 116, 214, 0.16); border-radius: 3px; }
.rank-fill { display: block; height: 100%; background: var(--blue-400); border-radius: 0 3px 3px 0; }

/* poslednje prijave */
.activity { display: grid; }
.activity-row {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto 92px;
  align-items: center;
  gap: 14px;
  padding: 10px 10px;
  color: var(--text);
  text-decoration: none;
  border-bottom: 1px solid var(--line);
  transition: background 0.15s;
}
.activity-row:last-child { border-bottom: 0; }
.activity-row:hover { color: var(--text); background: rgba(31, 86, 184, 0.16); border-radius: 10px; }
.activity-row .ticket-icon { width: 36px; height: 36px; font-size: 17px; border-radius: 10px; }
.activity-main { display: grid; min-width: 0; }
.activity-title { overflow: hidden; font-weight: 600; white-space: nowrap; text-overflow: ellipsis; }
.activity-sub { font-size: 13px; color: var(--text-dim); }
.activity-time { font-size: 13px; text-align: right; color: var(--text-mute); white-space: nowrap; font-variant-numeric: tabular-nums; }

/* ---------- Lista tiketa (admin pregled) ---------- */
.ticket-feed { display: flex; flex-direction: column; gap: 10px; }

.ticket-card {
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 14px 20px 14px 22px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  transition: transform 0.2s var(--ease), background 0.2s, border-color 0.2s;
}
.ticket-card::before {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  width: 4px;
  background: var(--tone, var(--line-strong));
}
.ticket-card.clickable { cursor: pointer; }
.ticket-card.clickable:hover { transform: translateY(-2px); background: var(--surface-hover); border-color: var(--line-strong); }
.ticket-card.clickable:active { transform: translateY(0) scale(0.995); }

.ticket-icon {
  display: grid;
  place-items: center;
  flex-shrink: 0;
  width: 46px;
  height: 46px;
  font-size: 22px;
  background: var(--cat-bg, rgba(143, 180, 236, 0.1));
  border: 1px solid var(--line);
  border-radius: 12px;
}
.cat-SLOT_APARAT { --cat-bg: rgba(240, 169, 46, 0.16); }
.cat-TV { --cat-bg: rgba(63, 116, 214, 0.24); }
.cat-INTERNET { --cat-bg: rgba(64, 196, 220, 0.16); }
.cat-RACUNAR { --cat-bg: rgba(55, 199, 127, 0.15); }
.cat-STAMPACI { --cat-bg: rgba(224, 50, 79, 0.18); }
.cat-OSTALO { --cat-bg: rgba(143, 180, 236, 0.1); }

.ticket-main { flex: 1; min-width: 0; }
.ticket-title {
  overflow: hidden;
  font-size: 16.5px;
  font-weight: 600;
  white-space: nowrap;
  text-overflow: ellipsis;
}
.ticket-id { margin-left: 8px; font-size: 14px; font-weight: 500; color: var(--text-mute); font-variant-numeric: tabular-nums; }
.ticket-sub { margin-top: 2px; font-size: 14px; color: var(--text-dim); }
.ticket-side { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; flex-shrink: 0; }
.ticket-time { font-size: 13px; color: var(--text-mute); white-space: nowrap; font-variant-numeric: tabular-nums; }

.empty-state {
  padding: 36px 24px;
  text-align: center;
  color: var(--text-dim);
  background: var(--surface);
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius-lg);
}

/* ---------- Detalji tiketa ---------- */
.ticket-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 12px; margin: 0 0 8px; }
.ticket-head .num { color: var(--text-mute); font-variant-numeric: tabular-nums; }
.ticket-meta { margin: 0 0 16px; font-size: 14.5px; color: var(--text-dim); }
.ticket-meta strong, .detail-row strong { color: var(--text); font-weight: 600; }
.detail-row { margin: 14px 0 0; font-size: 14.5px; color: var(--text-dim); }
.ticket-desc {
  max-width: 65ch;
  margin: 18px 0 0;
  font-size: 17px;
  line-height: 1.6;
  white-space: pre-wrap;
}
.muted-note { margin: 0; font-size: 14.5px; color: var(--text-dim); }

.attachment-list { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 18px; }
.attachment-list a {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 14px;
  font-size: 14.5px;
  color: var(--text);
  text-decoration: none;
  background: rgba(143, 180, 236, 0.06);
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  transition: background 0.2s, border-color 0.2s;
}
.attachment-list a::before { content: "📎"; }
.attachment-list a:hover { background: rgba(31, 86, 184, 0.2); border-color: var(--blue-300); }

/* Hronologija napomena i promena statusa */
.event { position: relative; padding: 0 0 18px 24px; font-size: 15px; }
.event::before {
  content: "";
  position: absolute;
  top: 7px;
  left: 3px;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--tone, var(--blue-300));
  box-shadow: 0 0 0 4px rgba(143, 180, 236, 0.1);
}
.event::after {
  content: "";
  position: absolute;
  top: 22px;
  bottom: 2px;
  left: 7px;
  width: 1px;
  background: var(--line-strong);
}
.event:last-child { padding-bottom: 4px; }
.event:last-child::after { display: none; }
.event .badge { margin: 0 2px; font-size: 12.5px; padding: 1px 8px; }
.event .badge.status-NOVO::after { left: 8px; }
.event-message { margin-top: 4px; }
.event .meta { margin-top: 4px; font-size: 13px; color: var(--text-mute); font-variant-numeric: tabular-nums; }

.resolved-toggle {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 16px;
  padding: 13px 14px;
  font-size: 16px;
  color: var(--text);
  background: rgba(55, 199, 127, 0.07);
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  cursor: pointer;
  user-select: none;
  transition: border-color 0.2s, background 0.2s;
}
.resolved-toggle:hover { border-color: rgba(134, 232, 180, 0.5); }
.resolved-toggle input[type="checkbox"] { width: 22px; height: 22px; accent-color: #37c77f; }
.card textarea + .error-msg, .card textarea ~ button { margin-top: 10px; }

/* ---------- Prilozi u formi za prijavu ---------- */
.attachment-picks { display: flex; flex-direction: column; gap: 6px; margin-top: 8px; }
.attachment-pick {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 7px 8px 7px 14px;
  font-size: 15px;
  background: rgba(143, 180, 236, 0.06);
  border: 1px solid var(--line-strong);
  border-radius: 10px;
}
.attachment-pick .size { font-size: 14px; color: var(--text-mute); }
.remove-attachment {
  padding: 3px 9px;
  font-size: 20px;
  line-height: 1;
  color: var(--text-dim);
  background: transparent;
  border: 0;
  border-radius: 7px;
  box-shadow: none;
}
.remove-attachment:hover { color: #fff; background: var(--red-600); box-shadow: none; }

/* ---------- Nalozi (admin) ---------- */
.user-cell { display: flex; align-items: center; gap: 12px; }
.user-cell .name { font-weight: 600; }
.user-cell .username { margin-top: 1px; font-size: 13px; color: var(--text-mute); }

.menu-wrap { position: relative; display: inline-block; }
.user-menu {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  z-index: var(--z-menu);
  min-width: 180px;
  padding: 6px;
  background: var(--surface-raised);
  border: 1px solid var(--line-strong);
  border-radius: 12px;
  box-shadow: 0 18px 40px -12px rgba(0, 4, 20, 0.85);
}
.user-menu button {
  display: block;
  width: 100%;
  padding: 10px 12px;
  font-size: 14.5px;
  font-weight: 500;
  text-align: left;
  color: var(--text);
  background: transparent;
  border: 0;
  border-radius: 8px;
  box-shadow: none;
}
.user-menu button:hover { background: rgba(143, 180, 236, 0.12); box-shadow: none; }
.user-menu button.danger-item { color: var(--red-300); }
.user-menu button.danger-item:hover { background: rgba(202, 18, 54, 0.22); }

/* ---------- AnyDesk (admin) ---------- */
.page-sub { margin: 6px 0 0; font-size: 14.5px; color: var(--text-dim); }
.desk-toolbar { align-items: flex-end; gap: 14px; margin-bottom: 22px; }
.desk-title { flex: 1 1 auto; }
.toolbar .desk-search { min-width: 300px; }

.segmented {
  display: inline-flex;
  gap: 2px;
  padding: 3px;
  background: var(--field);
  border: 1px solid var(--line-strong);
  border-radius: 11px;
}
.seg-btn {
  padding: 8px 14px;
  font-size: 14.5px;
  font-weight: 600;
  color: var(--text-dim);
  background: transparent;
  border: 0;
  border-radius: 8px;
  box-shadow: none;
}
.seg-btn:hover { color: var(--text); background: rgba(143, 180, 236, 0.1); box-shadow: none; }
.seg-btn.is-active, .seg-btn.is-active:hover {
  color: #fff;
  background: var(--blue-500);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.15);
}

.desk-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(310px, 1fr)); gap: 16px; }
.desk-grid > .empty-state { grid-column: 1 / -1; }

.desk-card {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 18px 18px 16px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  transition: border-color 0.2s;
}
.desk-card:hover { border-color: var(--line-strong); }
.desk-card-head { display: flex; align-items: center; gap: 12px; }
.desk-card-title {
  flex: 1;
  min-width: 0;
  margin: 0;
  overflow: hidden;
  font-family: var(--font-body);
  font-size: 16.5px;
  font-weight: 600;
  line-height: 1.3;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.desk-section { display: grid; gap: 6px; }
.desk-label { font-size: 12px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--text-mute); }
.desk-id {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 6px 6px 12px;
  background: rgba(0, 12, 36, 0.42);
  border: 1px solid var(--line);
  border-radius: 10px;
}
.desk-id-num {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  font-size: 18px;
  font-weight: 600;
  letter-spacing: 0.03em;
  white-space: nowrap;
  text-overflow: ellipsis;
  font-variant-numeric: tabular-nums;
}
.desk-action {
  flex-shrink: 0;
  padding: 6px 10px;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.3;
  color: var(--text);
  text-decoration: none;
  background: rgba(143, 180, 236, 0.1);
  border: 1px solid transparent;
  border-radius: 7px;
  box-shadow: none;
  transition: background 0.2s, color 0.2s;
}
.desk-action:hover { color: #fff; background: rgba(143, 180, 236, 0.2); box-shadow: none; }
.desk-action.is-done, .desk-action.is-done:hover { color: #86e8b4; background: rgba(55, 199, 127, 0.18); }
.desk-connect { background: var(--blue-500); }
.desk-connect:hover { background: var(--blue-400); }
.desk-missing {
  padding: 9px 12px;
  font-size: 14px;
  color: var(--text-mute);
  border: 1px dashed var(--line-strong);
  border-radius: 10px;
}

.entry-chip button {
  padding: 5px 8px;
  font-size: 13px;
  line-height: 1;
  color: var(--text-dim);
  background: transparent;
  border: 0;
  border-radius: 6px;
  box-shadow: none;
}
.entry-chip button:hover { color: var(--text); background: rgba(143, 180, 236, 0.14); box-shadow: none; }

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: var(--z-modal);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(0, 6, 20, 0.62);
  -webkit-backdrop-filter: blur(4px);
  backdrop-filter: blur(4px);
}
.modal-card {
  width: 100%;
  max-width: 480px;
  max-height: 85vh;
  overflow-y: auto;
  padding: 28px;
  background: linear-gradient(180deg, #07275f, #041c48);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-lg);
  box-shadow: 0 30px 80px -20px rgba(0, 4, 20, 0.9);
  animation: rise-in 0.22s var(--ease);
}
.modal-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 22px; }
.modal-header h3 { margin: 0; font-size: 24px; }
.modal-close, .toast-close {
  padding: 4px 10px;
  font-size: 26px;
  line-height: 1;
  color: var(--text-dim);
  background: transparent;
  border: 0;
  border-radius: 8px;
  box-shadow: none;
}
.modal-close:hover, .toast-close:hover { color: var(--text); background: rgba(143, 180, 236, 0.12); box-shadow: none; }
.modal-section { margin-bottom: 24px; }
.modal-section:last-child { margin-bottom: 0; }
.modal-section h4 {
  margin: 0 0 12px;
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-mute);
}
.entry-chip {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-bottom: 8px;
  padding: 6px 6px 6px 14px;
  background: rgba(143, 180, 236, 0.07);
  border: 1px solid var(--line-strong);
  border-radius: 10px;
}
.entry-chip span { flex: 1; font-size: 17px; letter-spacing: 0.02em; word-break: break-all; font-variant-numeric: tabular-nums; }
.entry-chip .remove-chip-btn:hover { color: #fff; background: var(--red-600); }
.modal-empty { margin-bottom: 10px; font-size: 14px; color: var(--text-mute); }
.modal-add-row { display: flex; gap: 8px; }
.modal-add-row input { flex: 1; }

/* ---------- Obavestenja o novim kvarovima (namerno velika) ---------- */
.toast-container {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: var(--z-toast);
  display: flex;
  flex-direction: column;
  gap: 20px;
  max-width: 800px;
}

.toast {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-width: 756px;
  min-height: 264px;
  padding: 28px 64px 28px 40px;
  background: linear-gradient(135deg, rgba(0, 44, 110, 0.97), rgba(0, 18, 50, 0.98));
  border: 2px solid var(--blue-400);
  border-radius: 20px;
  box-shadow: 0 30px 70px -20px rgba(0, 4, 20, 0.9);
  opacity: 0;
  transform: translateX(24px);
  transition: opacity 0.25s var(--ease), transform 0.25s var(--ease);
}
.toast.show { opacity: 1; transform: translateX(0); }

.toast.urgent { border-color: var(--red-500); animation: toast-glow 1s ease-in-out infinite; }
.toast.urgent::before {
  content: "";
  position: absolute;
  inset: -10px;
  z-index: -1;
  border-radius: 28px;
  background: radial-gradient(circle, rgba(222, 34, 72, 0.8), rgba(222, 34, 72, 0) 72%);
  filter: blur(10px);
  animation: toast-flame 1s ease-in-out infinite;
}

@keyframes toast-glow {
  0%, 100% { box-shadow: 0 0 12px 2px rgba(224, 50, 79, 0.45), 0 30px 70px -20px rgba(0, 4, 20, 0.9); }
  50% { box-shadow: 0 0 54px 18px rgba(224, 50, 79, 0.95), 0 30px 70px -20px rgba(0, 4, 20, 0.9); }
}
@keyframes toast-flame {
  0%, 100% { opacity: 0.25; }
  50% { opacity: 1; }
}

.toast-close { position: absolute; top: 12px; right: 12px; font-size: 30px; }
.toast-title { font-family: var(--font-display); font-size: 36px; font-weight: 700; line-height: 1.1; }
.toast-body { margin-top: 12px; font-size: 24px; color: var(--text-dim); }

/* ---------- Manji ekrani ---------- */
@media (max-width: 900px) {
  .toast-container { right: 10px; bottom: 10px; left: 10px; max-width: none; }
  .toast { min-width: 0; min-height: 200px; padding: 24px 56px 24px 28px; }
  .toast-title { font-size: 28px; }
  .toast-body { font-size: 19px; }

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

/* srednji ekrani (manji laptop, uvecanje, prozor koji nije preko celog ekrana):
   meni ide u drugi red da nikad ne zavrsi ispod imena naloga */
@media (max-width: 1180px) {
  .topbar { flex-wrap: wrap; row-gap: 4px; }
  .topbar:has(.nav) { padding-bottom: 6px; }
  .nav { order: 3; flex-basis: 100%; overflow-x: auto; scrollbar-width: none; }
  .nav::-webkit-scrollbar { display: none; }
}

@media (max-width: 1100px) {
  .dash-grid { grid-template-columns: minmax(0, 1fr); }
  .dash-side { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .dash-hero { grid-template-columns: minmax(0, 1fr); }
  .dash-hero::before { right: 6%; }
  .dash-hero::after { right: calc(6% + 92px); }
}

@media (max-width: 760px) {
  .topbar { flex-wrap: wrap; gap: 8px 10px; padding: 10px 16px; }
  .topbar:has(.nav) { padding-bottom: 0; }
  .brand { gap: 10px; }
  .brand .logo { height: 28px; }
  .brand-name { padding-left: 10px; font-size: 20px; }
  .brand-role { display: none; }
  .who { gap: 8px; }
  .user-chip { padding: 3px 10px 3px 3px; gap: 8px; }
  .user-chip #whoami, .user-chip .whoami { max-width: 30vw; font-size: 14px; }
  .avatar { width: 28px; height: 28px; font-size: 11.5px; border-radius: 8px; }

  .nav {
    order: 3;
    flex-basis: calc(100% + 32px);
    margin: 0 -16px;
    padding: 2px 12px 8px;
    overflow-x: auto;
    scrollbar-width: none;
  }
  .nav::-webkit-scrollbar { display: none; }
  .nav-link { padding: 8px 12px; font-size: 14.5px; }

  .container { padding: 18px 16px 40px; }
  .page-title { font-size: 26px; }
  .section-title { font-size: 23px; }
  .toolbar { gap: 8px; margin-bottom: 16px; }
  .toolbar select, .toolbar input:not([type="checkbox"]), .toolbar #filterSearch, .toolbar input[type="search"] { flex: 1 1 100%; width: 100%; min-width: 0; }
  .toolbar .inline-field { flex: 1 1 calc(50% - 4px); }
  .toolbar .inline-field input { flex: 1; min-width: 0; }
  .toolbar button { width: 100%; }
  .card { padding: 20px; }

  /* siroke tabele se skroluju; tekst sme da predje u novi red da uze tabele stanu */
  table { display: block; overflow-x: auto; -webkit-overflow-scrolling: touch; }
  th, td { padding: 11px 10px; font-size: 14px; }
  th:first-child, td:first-child { padding-left: 14px; }
  th:last-child, td:last-child { padding-right: 14px; }

  /* Nalozi: svaki red postaje kartica - ime gore, oznake ispod, meni desno */
  .users-table { overflow: visible; }
  .users-table thead { display: none; }
  .users-table tbody { display: block; }
  .users-table tr {
    display: grid;
    grid-template-columns: auto auto minmax(0, 1fr) auto;
    align-items: center;
    column-gap: 8px;
    padding: 12px 14px;
    border-bottom: 1px solid var(--line);
  }
  .users-table tr:last-child { border-bottom: 0; }
  .users-table td { padding: 0 !important; border: 0; }
  .users-table td:nth-child(1) { grid-column: 1 / 4; grid-row: 1; }
  .users-table td:nth-child(2) { grid-column: 1; grid-row: 2; margin: 8px 0 0 40px; }
  .users-table td:nth-child(3) { grid-column: 2; grid-row: 2; margin-top: 8px; }
  .users-table td:nth-child(4) { grid-column: 4; grid-row: 1 / 3; }
  .users-table .avatar { width: 32px; height: 32px; }

  .stat-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin-bottom: 22px; }
  .stat-tile { padding: 14px 14px 12px; }
  .stat-tile .value { font-size: 38px; }
  .stat-tile .label { font-size: 13px; }
  /* pruge samo u gornjem uglu da ne prelaze preko teksta */
  .stat-tile::before, .stat-tile::after { top: -12px; height: 52%; }
  .stat-tile::after { right: 8px; width: 14px; }
  .stat-tile::before { right: 28px; width: 6px; }

  .breakdown-row { grid-template-columns: 96px minmax(0, 1fr) 44px; gap: 10px; }

  .dash { gap: 16px; }
  .dash-hero { padding: 20px 18px 22px; border-radius: 18px; }
  .dash-hero::before { top: 20%; right: -10px; width: 34px; height: 26%; }
  .dash-hero::after { top: 20%; right: 44px; width: 12px; height: 26%; }
  .dash-greeting { font-size: 14px; }
  .dash-open { font-size: 22px; margin-bottom: 14px; }
  .dash-open-count { font-size: 68px; }
  .dash-kpis { gap: 8px; }
  .kpi { flex: 1; min-width: 0; padding: 10px 12px 12px; }
  .kpi dt { font-size: 12.5px; }
  .kpi dd { font-size: 28px; }
  .dash-side { grid-template-columns: minmax(0, 1fr); }
  .board { grid-template-columns: minmax(0, 1fr); }
  .lane { min-height: 0; }
  .panel { padding: 18px 14px 18px; }
  .panel-head h2 { font-size: 22px; }
  .activity-row { grid-template-columns: auto minmax(0, 1fr) auto; gap: 4px 12px; padding: 10px 6px; }
  .activity-row .ticket-icon, .activity-main { grid-row: 1 / 3; }
  .activity-row .badge { grid-column: 3; grid-row: 1; justify-self: end; }
  .activity-time { grid-column: 3; grid-row: 2; font-size: 12.5px; }

  .desk-toolbar { align-items: stretch; }
  .desk-toolbar .segmented { flex: 1 1 100%; }
  .seg-btn { flex: 1; }
  .desk-grid { grid-template-columns: minmax(0, 1fr); }
  .toolbar .desk-search { min-width: 0; }

  .ticket-card { gap: 12px; padding: 12px 14px 12px 18px; }
  .ticket-icon { width: 38px; height: 38px; font-size: 18px; border-radius: 10px; }
  .ticket-title { font-size: 15.5px; }
  .ticket-sub, .ticket-time { font-size: 12.5px; }

  .login-card { padding: 38px 22px 28px; border-radius: 18px; }
  .login-card h1 { font-size: 32px; }
  .login-logo { height: 52px; }
}

@media (max-width: 420px) {
  .brand-name { display: none; }
}

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