/* Cohors · glavni stil */
:root {
  --accent: #0473FB;
  --mint: #00E8A2;
  --text: #ECEDEF;
  --muted: #A4A7AF;
  --dim: #737680;
  --bg1: #16171A;
  --modal-bg: #1C1D21;
  --chip-bg: rgba(255,255,255,0.06);
  --bg2: #0E0F11;
  --glass: rgba(255, 255, 255, 0.035);
  --glass-strong: #1E1F23;
  --line: rgba(255, 255, 255, 0.06);
  --line2: rgba(255, 255, 255, 0.10);
  --field: rgba(0, 0, 0, 0.30);
  --danger: #E5484D;
  --radius: 12px;
  --head: 'Chakra Petch', sans-serif;
  --body: 'IBM Plex Sans', sans-serif;
}

* { box-sizing: border-box; }
html { scrollbar-color: rgba(255,255,255,0.14) var(--bg2); scrollbar-width: thin; }
body {
  margin: 0; min-height: 100vh; color: var(--text); font: 16px/1.55 var(--body);
  background-color: var(--bg2);
  background-image: linear-gradient(180deg, var(--bg1) 0%, var(--bg2) 100%);
  background-repeat: no-repeat;
}
::selection { background: rgba(4,115,251,0.55); color: #fff; }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: var(--bg2); }
::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.10); border-radius: 5px; border: 2px solid var(--bg2); }
::-webkit-scrollbar-thumb:hover { background: rgba(255,255,255,0.18); }
a { color: #4DA3FF; text-decoration: none; }
a:hover { color: #8CC4FF; }
img { max-width: 100%; }
h1, h2, h3 { font-family: var(--head); margin: 0; }
:focus-visible { outline: 2px solid var(--mint); outline-offset: 2px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.wrap { max-width: 1360px; margin: 0 auto; padding: 0 24px; }
.section { padding-top: 72px; }
.section:last-of-type { padding-bottom: 80px; }
.sec-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 12px; flex-wrap: wrap; margin-bottom: 20px; }
.kicker { font-size: 12px; font-weight: 600; letter-spacing: 1.5px; text-transform: uppercase; color: var(--mint); margin-bottom: 6px; }
.sec-title { font-size: 28px; font-weight: 600; }
.page-title { font-size: 38px; font-weight: 700; margin-bottom: 8px; }
.lead { color: var(--muted); font-size: 17px; margin: 0; }
.muted { color: var(--muted); }
.dim { color: var(--dim); }

/* ---------- Zaglavlje ---------- */
.site-head { border-bottom: 1px solid var(--line); position: relative; z-index: 40; }
.site-head .wrap { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; padding-top: 14px; padding-bottom: 14px; }
.logo { display: flex; align-items: center; gap: 10px; color: var(--text); font: 700 24px var(--head); }
.logo:hover { color: #fff; }
.logo-mark { width: 36px; height: 36px; border-radius: 10px; background: var(--accent); color: #fff; display: flex; align-items: center; justify-content: center; }
.nav-pill { display: flex; flex-wrap: wrap; gap: 2px; padding: 4px; background: var(--glass); border: 1px solid var(--line); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); border-radius: 999px; font-size: 15px; }
.nav-pill a { color: var(--muted); padding: 9px 18px; border-radius: 999px; transition: background .15s, color .15s; }
.nav-pill a:hover { color: var(--text); background: rgba(255,255,255,0.04); }
.nav-pill a.on { color: #fff; background: color-mix(in srgb, var(--accent) 30%, transparent); }
.head-actions { display: flex; gap: 10px; align-items: center; }
.bell { position: relative; width: 44px; height: 44px; border-radius: 50%; display: flex; align-items: center; justify-content: center; color: var(--muted); border: 1px solid var(--line2); }
.bell:hover { color: #fff; border-color: var(--accent); }
.bell b { position: absolute; top: -3px; right: -3px; min-width: 20px; height: 20px; padding: 0 5px; border-radius: 10px; background: var(--mint); color: #062A1F; font-size: 11px; display: flex; align-items: center; justify-content: center; }
.me { display: flex; align-items: center; gap: 10px; color: var(--text); padding: 4px 12px 4px 4px; border-radius: 999px; border: 1px solid var(--line2); }
.me:hover { border-color: var(--accent); color: #fff; }
.me .av { width: 34px; height: 34px; font-size: 12px; }

/* ---------- Gumbi ---------- */
.btn { min-height: 44px; display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 0 18px; border-radius: 8px; border: 1px solid transparent; font: 600 14px var(--body); cursor: pointer; transition: filter .15s, border-color .15s, color .15s, background .15s; white-space: nowrap; text-align: center; }
.btn-p { background: var(--accent); color: #fff; }
.btn-p:hover { filter: brightness(1.12); color: #fff; }
.btn-g { background: transparent; border-color: var(--line2); color: var(--text); font-weight: 500; }
.btn-g:hover { border-color: var(--accent); color: #fff; }
.btn-d { background: transparent; border-color: rgba(229,72,77,0.35); color: #FF9A9D; font-weight: 500; }
.btn-d:hover { background: rgba(229,72,77,0.12); color: #fff; }
.btn-m { background: rgba(0,232,162,0.12); color: var(--mint); }
.btn-m:hover { background: rgba(0,232,162,0.2); color: var(--mint); }
.btn-lg { min-height: 50px; padding: 0 24px; font-size: 16px; border-radius: 10px; }
.btn-sm { min-height: 36px; padding: 0 12px; font-size: 13px; }
.btn[disabled], .btn.is-disabled { opacity: .45; pointer-events: none; }
.btn-row { display: flex; gap: 8px; margin-top: auto; }
.btn-row > .btn, .btn-row > form { flex: 1; }
.btn-row > form .btn { width: 100%; }
.link-btn { background: none; border: 0; padding: 0; color: #4DA3FF; font: inherit; cursor: pointer; }
.link-btn:hover { color: #8CC4FF; }

/* ---------- Kartice ---------- */
.glass { background: var(--glass); border: 1px solid var(--line); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); border-radius: var(--radius); }
.card { background: var(--glass); border: 1px solid var(--line); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); border-radius: var(--radius); padding: 20px; display: flex; flex-direction: column; gap: 18px; position: relative; min-width: 0; }
a.card, .card.hov { transition: transform .18s, border-color .18s; }
.card.hov:hover { transform: translateY(-3px); border-color: color-mix(in srgb, var(--accent) 40%, transparent); }
.card-head { display: flex; align-items: center; gap: 12px; }
.card-head .meta { flex: 1; min-width: 0; }
.card-title { font: 600 16px var(--body); margin: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: var(--text); }
a .card-title, .card-title a { color: var(--text); }
.card-title a:hover { color: #fff; }
.card-sub { font-size: 13px; color: var(--muted); margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.card-text { margin: 0; font-size: 14px; line-height: 1.55; color: var(--muted); }
.grid4 { display: grid; grid-template-columns: repeat(auto-fill, minmax(max(260px, calc((100% - 48px) / 4)), 1fr)); gap: 16px; }
.grid3 { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 16px; }
.grid2 { display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 16px; }

/* ---------- Pill oznake ---------- */
.pill { flex: none; display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 600; padding: 4px 10px; border-radius: 999px; background: rgba(0,232,162,0.12); color: var(--mint); white-space: nowrap; }
.pill-g { background: rgba(255,255,255,0.06); color: #C9CFDB; font-weight: 500; }
.pill-b { background: color-mix(in srgb, var(--accent) 20%, transparent); color: #9CC6FF; }
.pill-r { background: rgba(229,72,77,0.14); color: #FF9A9D; }
.pill .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--mint); }
.pill.off { color: var(--muted); } .pill.off .dot { background: var(--dim); }
.tags { display: flex; flex-wrap: wrap; gap: 6px; }

/* ---------- Avatari ---------- */
.av { flex: none; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; font-family: var(--head); font-weight: 700; letter-spacing: .3px; overflow: hidden; }
.av-44 { width: 44px; height: 44px; font-size: 16px; }
.av-44.av-mid { font-size: 14px; } .av-44.av-long { font-size: 12px; }
.av-34 { width: 34px; height: 34px; font-size: 12px; }
.av-34.av-long { font-size: 10px; }
.av-30 { width: 30px; height: 30px; font-size: 11px; }
.av-64 { width: 64px; height: 64px; font-size: 22px; }
.av-64.av-long { font-size: 17px; }
.av-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.tone-blue { background: color-mix(in srgb, var(--accent) 20%, transparent); color: #9CC6FF; }
.tone-mint { background: rgba(0,232,162,0.12); color: #5FF0C4; }
.tone-grey { background: rgba(255,255,255,0.07); color: #D5DAE5; }
.av-wrap { position: relative; display: inline-flex; flex: none; }
.online-dot { position: absolute; right: -1px; bottom: -1px; width: 13px; height: 13px; border-radius: 50%; background: var(--mint); border: 2px solid var(--bg1); }

/* ---------- Polja ---------- */
.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 16px; min-width: 0; }
.field > label, .lbl { font-size: 14px; color: var(--muted); }
.input, textarea.input { width: 100%; height: 46px; padding: 0 14px; background: var(--field); border: 1px solid var(--line2); border-radius: 8px; color: var(--text); font: inherit; font-size: 15px; outline: none; transition: border-color .15s; }
textarea.input { height: auto; min-height: 110px; padding: 12px 14px; resize: vertical; line-height: 1.5; }
.input:focus { border-color: var(--accent); }
.input::placeholder { color: var(--dim); }
.input-ic { position: relative; }
.input-ic .ic { position: absolute; left: 14px; top: 14px; color: var(--dim); pointer-events: none; }
.input-ic .input { padding-left: 42px; }
.hint { font-size: 13px; color: var(--dim); }
.form-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 0 16px; }
input:-webkit-autofill { -webkit-text-fill-color: var(--text); -webkit-box-shadow: 0 0 0 40px var(--bg1) inset; caret-color: var(--text); }

/* Prekidač (checkbox kao toggle) */
.switch { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 44px; cursor: pointer; font-size: 15px; color: var(--text); }
.switch input { appearance: none; -webkit-appearance: none; flex: none; margin: 0; width: 44px; height: 24px; border-radius: 12px; background: var(--field); border: 1px solid rgba(255,255,255,0.10); position: relative; cursor: pointer; transition: background .15s, border-color .15s; }
.switch input::after { content: ""; position: absolute; top: 2px; left: 2px; width: 18px; height: 18px; border-radius: 50%; background: var(--muted); transition: left .15s, background .15s; }
.switch input:checked { background: var(--accent); border-color: var(--accent); }
.switch input:checked::after { left: 22px; background: #fff; }
.switch input:focus-visible { outline: 2px solid var(--mint); outline-offset: 2px; }

/* Segmentirani izbor (radio kao gumbi) */
.seg { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.seg label { position: relative; }
.seg input { position: absolute; opacity: 0; pointer-events: none; }
.seg span { min-height: 40px; display: flex; align-items: center; justify-content: center; padding: 0 12px; border-radius: 8px; font-size: 14px; cursor: pointer; background: var(--field); color: #C9CFDB; border: 1px solid var(--line2); transition: border-color .15s, background .15s; }
.seg span:hover { border-color: color-mix(in srgb, var(--accent) 50%, transparent); }
.seg input:checked + span { background: var(--accent); border-color: var(--accent); color: #fff; }
.seg input:focus-visible + span { outline: 2px solid var(--mint); outline-offset: 2px; }

/* Custom padajući izbornik (gradi ga app.js iz <select class="js-select">) */
.js-select { position: absolute; opacity: 0; pointer-events: none; width: 1px; height: 1px; }
.dd { position: relative; }
.dd-btn { width: 100%; height: 46px; display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 0 14px; background: var(--field); border: 1px solid var(--line2); border-radius: 8px; color: var(--text); font: inherit; font-size: 15px; cursor: pointer; text-align: left; }
.dd-btn span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dd-btn .ic { flex: none; color: var(--muted); transition: transform .15s; }
.dd.open .dd-btn { border-color: var(--accent); }
.dd.open .dd-btn .ic { transform: rotate(180deg); }
.dd-sm .dd-btn { height: 40px; }
.dd-list, .ac-list { position: absolute; top: calc(100% + 6px); left: 0; right: 0; z-index: 50; background: var(--glass-strong); border: 1px solid var(--line2); backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px); border-radius: 10px; padding: 6px; display: none; flex-direction: column; gap: 2px; box-shadow: 0 18px 40px rgba(0,0,0,0.45); max-height: 320px; overflow-y: auto; scrollbar-width: thin; scrollbar-color: rgba(255,255,255,0.18) transparent; }
.dd-list::-webkit-scrollbar, .ac-list::-webkit-scrollbar { width: 6px; }
.dd-list::-webkit-scrollbar-track, .ac-list::-webkit-scrollbar-track { background: transparent; }
.dd-list::-webkit-scrollbar-thumb, .ac-list::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.18); border-radius: 3px; border: 0; }
.dd.open .dd-list, .ac.open .ac-list { display: flex; }
.dd-opt, .ac-opt { flex: none; min-height: 40px; display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 0 12px; border: 0; border-radius: 6px; background: transparent; color: #C9CFDB; font: inherit; font-size: 15px; cursor: pointer; text-align: left; width: 100%; }
.dd-opt:hover, .dd-opt.hl, .ac-opt:hover, .ac-opt.hl { background: color-mix(in srgb, var(--accent) 18%, transparent); color: #fff; }
.dd-opt.sel { background: color-mix(in srgb, var(--accent) 24%, transparent); color: #fff; }
.dd-opt .ic { color: var(--mint); }
.ac { position: relative; }
.ac-opt { min-height: 48px; justify-content: flex-start; padding: 0 10px; color: var(--text); }
.ac-opt .nm { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ac-opt .gn { font-size: 12px; color: var(--mint); white-space: nowrap; }
.ac-hint { padding: 6px 10px 4px; font-size: 12px; color: var(--dim); }
.ac-empty { padding: 12px 10px; font-size: 14px; color: var(--muted); }

/* ---------- Poruke ---------- */
.flash-wrap { position: fixed; top: 16px; left: 50%; transform: translateX(-50%); z-index: 200; display: flex; flex-direction: column; gap: 8px; width: min(560px, calc(100% - 32px)); }
.flash { padding: 12px 16px; border-radius: 10px; font-size: 15px; backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); box-shadow: 0 12px 32px rgba(0,0,0,0.4); display: flex; justify-content: space-between; gap: 12px; align-items: center; transition: opacity .3s, transform .3s; }
.flash button { background: none; border: 0; color: inherit; cursor: pointer; padding: 4px; display: flex; }
.flash-ok { background: rgba(0,60,45,0.92); border: 1px solid rgba(0,232,162,0.35); color: #B6FBE4; }
.flash-err { background: rgba(70,14,18,0.94); border: 1px solid rgba(229,72,77,0.45); color: #FFC2C4; }
.flash-info { background: rgba(8,30,62,0.94); border: 1px solid color-mix(in srgb, var(--accent) 45%, transparent); color: #CFE2FF; }
.note { padding: 12px 14px; border-radius: 8px; font-size: 14px; background: rgba(255,255,255,0.04); border: 1px solid var(--line2); color: var(--muted); }
.note-err { background: rgba(229,72,77,0.10); border-color: rgba(229,72,77,0.35); color: #FFB4B6; }

/* ---------- Dijalog (zamjena za confirm) ---------- */
.modal-bg { position: fixed; inset: 0; z-index: 300; background: rgba(4,6,10,0.72); backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px); display: none; align-items: center; justify-content: center; padding: 20px; }
.modal-bg.open { display: flex; }
.modal { width: min(460px, 100%); background: var(--modal-bg); border: 1px solid var(--line2); border-radius: 14px; padding: 24px; box-shadow: 0 30px 60px rgba(0,0,0,0.5); }
.modal h3 { font-size: 20px; margin-bottom: 8px; }
.modal p { margin: 0 0 20px; color: var(--muted); }
.modal .btns { display: flex; justify-content: flex-end; gap: 10px; flex-wrap: wrap; }

/* ---------- Slider ---------- */
.slider { position: relative; }
.slider-view { overflow: hidden; border-radius: var(--radius); }
.slider-track { display: flex; gap: 16px; transition: transform .45s ease; }
.slider-track > .card { flex: 0 0 calc((100% - 48px) / 4); min-height: 224px; overflow: hidden; gap: 14px; }
.rank-num { position: absolute; right: 18px; bottom: 74px; font: 700 88px/1 var(--head); color: rgba(255,255,255,0.05); pointer-events: none; }
.arrow { position: absolute; top: 50%; margin-top: -32px; width: 64px; height: 64px; border-radius: 50%; display: flex; align-items: center; justify-content: center; background: rgba(10,13,20,0.80); border: 1px solid rgba(255,255,255,0.10); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); color: var(--text); cursor: pointer; padding: 0; z-index: 2; transition: border-color .15s, background .15s; }
.arrow:hover { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 18%, rgba(10,13,20,0.8)); }
.arrow-l { left: -32px; } .arrow-r { right: -32px; }
.dots { display: flex; justify-content: center; gap: 4px; margin-top: 14px; }
.dots button { width: 24px; height: 24px; padding: 0; border: 0; background: transparent; cursor: pointer; display: flex; align-items: center; justify-content: center; }
.dots button span { display: block; height: 8px; width: 8px; border-radius: 4px; background: rgba(255,255,255,0.14); transition: width .2s, background .2s; }
.dots button.on span { width: 24px; background: var(--accent); }
@media (max-width: 1430px) { .arrow-l { left: -10px; } .arrow-r { right: -10px; } }
@media (max-width: 1000px) { .slider-track > .card { flex-basis: calc((100% - 16px) / 2); } }
@media (max-width: 640px) { .slider-track > .card { flex-basis: 100%; } .arrow { display: none; } }

/* ---------- Hero ---------- */
.hero { display: flex; flex-wrap: wrap; gap: 40px; align-items: center; }
.hero-l { flex: 1 1 460px; min-width: 0; }
.hero h1 { font-size: clamp(38px, 5vw, 64px); line-height: 1.04; font-weight: 700; margin: 0 0 18px; }
.hero p { margin: 0 0 30px; font-size: 18px; line-height: 1.6; color: var(--muted); max-width: 520px; }
.online-badge { display: inline-flex; align-items: center; gap: 8px; padding: 6px 12px; border: 1px solid rgba(0,232,162,0.22); background: rgba(0,232,162,0.08); border-radius: 999px; font-size: 13px; font-weight: 600; color: var(--mint); margin-bottom: 22px; }
.online-badge i { width: 8px; height: 8px; border-radius: 50%; background: var(--mint); }
.hero-tiles { flex: 1 1 400px; min-width: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.tile { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; padding: 20px; min-height: 136px; border-radius: var(--radius); font: inherit; text-align: left; cursor: pointer; background: var(--glass); border: 1px solid var(--line); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); color: var(--text); transition: border-color .18s, background .18s; }
.tile:hover { border-color: color-mix(in srgb, var(--accent) 45%, transparent); }
.tile.on { background: color-mix(in srgb, var(--accent) 16%, transparent); border-color: var(--accent); }
.tile .ppl { display: flex; gap: 5px; margin-bottom: 10px; }
.tile .ppl i { width: 10px; height: 10px; border-radius: 50%; background: rgba(127,180,255,0.55); }
.tile.on .ppl i { background: var(--mint); }
.tile b { font: 700 22px var(--head); }
.tile small { font-size: 14px; color: var(--muted); }

/* ---------- Tražilica ---------- */
.search-bar { padding: 20px; display: flex; flex-wrap: wrap; gap: 12px; align-items: flex-end; }
.search-bar .field { margin: 0; }
.search-bar .f-game { flex: 2 1 320px; }
.search-bar .f-dd { flex: 1 1 190px; }
.search-bar .btn { height: 46px; padding: 0 28px; font-size: 16px; }

/* ---------- Stranica s filterima ---------- */
.layout-side { display: flex; flex-wrap: wrap; gap: 28px; align-items: flex-start; }
.side { flex: 1 1 280px; max-width: 320px; padding: 20px; display: flex; flex-direction: column; gap: 20px; }
.side .field { margin: 0; }
.side-head { display: flex; justify-content: space-between; align-items: center; }
.side-head b { font: 600 18px var(--head); }
.main-col { flex: 999 1 560px; min-width: 0; display: flex; flex-direction: column; gap: 16px; }
.list-bar { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; font-size: 14px; color: var(--muted); }
.list-bar .dd { width: 230px; }
@media (max-width: 700px) { .side { max-width: none; } }

/* Popunjenost ekipe */
.slots { display: flex; flex-direction: column; gap: 10px; }
.slots-row { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.slot-avs { display: flex; flex-wrap: wrap; gap: 6px; }
.slot-free { width: 30px; height: 30px; border-radius: 50%; border: 1px dashed rgba(0,232,162,0.45); background: rgba(0,232,162,0.05); flex: none; }
.slots-lbl { flex: none; font-size: 13px; font-weight: 600; }
.bar { height: 4px; border-radius: 2px; background: rgba(255,255,255,0.06); overflow: hidden; }
.bar i { display: block; height: 100%; background: var(--mint); border-radius: 2px; }

.empty { padding: 40px 20px; display: flex; flex-direction: column; align-items: center; gap: 12px; text-align: center; }
.empty b { font: 600 20px var(--head); }
.empty p { margin: 0; color: var(--muted); max-width: 440px; }

.pager { display: flex; gap: 6px; flex-wrap: wrap; justify-content: center; margin-top: 8px; }
.pager a, .pager span { min-width: 40px; height: 40px; padding: 0 10px; border-radius: 8px; display: inline-flex; align-items: center; justify-content: center; font-size: 14px; border: 1px solid var(--line2); color: var(--text); }
.pager a:hover { border-color: var(--accent); }
.pager .pager-on { background: var(--accent); border-color: var(--accent); color: #fff; }
.pager .pager-gap { border: 0; color: var(--dim); }

/* ---------- Profil / detalji ---------- */
.profile-head { display: flex; flex-wrap: wrap; gap: 20px; align-items: center; padding: 24px; }
.profile-head .info { flex: 1 1 300px; min-width: 0; }
.profile-head h1 { font-size: 30px; }
.kv { display: grid; grid-template-columns: auto 1fr; gap: 8px 18px; font-size: 15px; margin: 0; }
.kv dt { color: var(--muted); } .kv dd { margin: 0; }
.list { display: flex; flex-direction: column; }
.list-item { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.list-item:last-child { border-bottom: 0; }
.list-item .meta { flex: 1; min-width: 0; }
.list-item form { margin: 0; }
.two-col { display: grid; grid-template-columns: minmax(0, 2fr) minmax(280px, 1fr); gap: 20px; align-items: start; }
@media (max-width: 900px) { .two-col { grid-template-columns: 1fr; } }
.panel { padding: 20px; }
.panel h2 { font-size: 20px; font-weight: 600; margin-bottom: 14px; }
.tabs { display: flex; gap: 4px; flex-wrap: wrap; margin-bottom: 20px; }
.tabs a { padding: 9px 16px; border-radius: 999px; color: var(--muted); border: 1px solid var(--line2); font-size: 14px; }
.tabs a.on { background: var(--accent); border-color: var(--accent); color: #fff; }
.tabs a:hover:not(.on) { color: var(--text); border-color: var(--accent); }
.tabs a b { font-weight: 600; margin-left: 4px; color: var(--mint); }
.tabs a.on b { color: #fff; }

/* ---------- Autorizacija ---------- */
.auth { max-width: 460px; margin: 56px auto 80px; padding: 28px; }
.auth h1 { font-size: 30px; margin-bottom: 6px; }
.auth .lead { margin-bottom: 22px; font-size: 15px; }
.auth .btn { width: 100%; }
.auth-foot { margin-top: 18px; font-size: 14px; color: var(--muted); text-align: center; }

/* ---------- Traka i podnožje ---------- */
.cta { padding: 36px 40px; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 24px; }
.cta h2 { font-size: clamp(26px, 3vw, 34px); font-weight: 700; margin-bottom: 8px; }
.cta p { margin: 0; font-size: 17px; color: var(--muted); }
.site-foot { border-top: 1px solid var(--line); margin-top: 0; }
.foot-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 32px; padding-top: 48px; padding-bottom: 32px; }
.foot-grid .brand-col { grid-column: span 2; }
.foot-grid h4 { font: 600 15px var(--head); margin: 0 0 12px; color: var(--text); }
.foot-grid a { display: block; color: var(--muted); font-size: 14px; margin-bottom: 10px; }
.foot-grid a:hover { color: var(--text); }
.foot-bottom { border-top: 1px solid rgba(255,255,255,0.04); padding-top: 18px; padding-bottom: 28px; font-size: 13px; color: var(--dim); }
@media (max-width: 560px) { .foot-grid .brand-col { grid-column: auto; } }

/* Mobilna navigacija */
.menu-btn { display: none; width: 44px; height: 44px; border-radius: 10px; border: 1px solid var(--line2); background: transparent; color: var(--text); cursor: pointer; align-items: center; justify-content: center; }
@media (max-width: 900px) {
  .menu-btn { display: inline-flex; }
  .site-head .nav-pill, .site-head .head-actions { display: none; width: 100%; }
  .site-head.open .nav-pill { display: flex; border-radius: 14px; flex-direction: column; }
  .site-head.open .nav-pill a { border-radius: 10px; }
  .site-head.open .head-actions { display: flex; flex-wrap: wrap; }
  .page-title { font-size: 30px; }
  .cta { padding: 28px 24px; }
}

/* ---------- Administracija ---------- */
.adm { display: flex; min-height: 100vh; }
.adm-side { width: 256px; flex: none; border-right: 1px solid var(--line); padding: 18px 14px 16px; display: flex; flex-direction: column; gap: 6px; position: sticky; top: 0; height: 100vh; overflow-y: auto; background: color-mix(in srgb, var(--bg1) 70%, transparent); }
.adm-brand { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin: 0 6px 14px; }
.adm-brand .logo { font-size: 19px; gap: 10px; }
.adm-brand .logo .logo-mark { width: 34px; height: 34px; }
.adm-brand .logo small { display: block; font: 600 10px var(--body); letter-spacing: 1.6px; text-transform: uppercase; color: var(--mint); margin-top: -2px; }
.adm-quick { display: none; gap: 6px; }
.icon-btn { width: 38px; height: 38px; flex: none; border-radius: 10px; display: inline-flex; align-items: center; justify-content: center; color: var(--muted); border: 1px solid var(--line2); background: transparent; }
.icon-btn:hover { color: #fff; border-color: var(--accent); }
.adm-nav { display: flex; flex-direction: column; gap: 18px; }
.adm-nav .grp { display: flex; flex-direction: column; gap: 2px; }
.adm-nav .grp-l { font-size: 11px; font-weight: 600; letter-spacing: 1.4px; text-transform: uppercase; color: var(--dim); padding: 0 12px 6px; }
.adm-nav a.nav { display: flex; align-items: center; gap: 11px; padding: 10px 12px; border-radius: 9px; color: var(--muted); font-size: 15px; position: relative; transition: background .15s, color .15s; }
.adm-nav a.nav:hover { color: var(--text); background: rgba(255,255,255,0.04); }
.adm-nav a.nav.on { color: #fff; background: color-mix(in srgb, var(--accent) 22%, transparent); }
.adm-nav a.nav.on::before { content: ""; position: absolute; left: -14px; top: 9px; bottom: 9px; width: 3px; border-radius: 0 3px 3px 0; background: var(--accent); }
.adm-user { margin-top: auto; display: flex; align-items: center; gap: 10px; padding: 12px; border-radius: 12px; border: 1px solid var(--line); background: var(--glass); }
.adm-user .meta { flex: 1; min-width: 0; }
.adm-user b { display: block; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.adm-user span { font-size: 12px; color: var(--dim); }
.adm-user .icon-btn { width: 32px; height: 32px; border-radius: 8px; }
.adm-side .ver { padding: 8px 12px 0; font-size: 12px; color: var(--dim); }
.adm-main { flex: 1; min-width: 0; padding: 28px 32px 60px; }
.adm-main .wrap-a { max-width: 1240px; }
.adm-top { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; flex-wrap: wrap; margin-bottom: 24px; }
.adm-top h1 { font-size: 30px; }
.stats { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 14px; margin-bottom: 24px; }
.stat { padding: 18px 20px; }
.stat b { display: block; font: 700 30px var(--head); }
.stat span { font-size: 14px; color: var(--muted); }
.tbl-wrap { overflow-x: auto; }
.tbl { width: 100%; border-collapse: collapse; font-size: 14px; }
.tbl th { text-align: left; font-weight: 600; color: var(--muted); font-size: 12px; text-transform: uppercase; letter-spacing: 1px; padding: 12px 14px; border-bottom: 1px solid var(--line2); white-space: nowrap; }
.tbl td { padding: 10px 14px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.tbl tr:last-child td { border-bottom: 0; }
.tbl tr:hover td { background: rgba(255,255,255,0.02); }
.tbl .acts { display: flex; gap: 6px; justify-content: flex-end; flex-wrap: wrap; }
.tbl .acts form { margin: 0; }
.cell-u { display: flex; align-items: center; gap: 10px; min-width: 0; }
.chk-grid { display: flex; flex-wrap: wrap; gap: 4px 24px; }
.chk-grid .switch { min-width: 170px; }
.igdb-res { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 12px; }
.igdb-res button { background: var(--field); border: 1px solid var(--line2); border-radius: 10px; padding: 10px; color: var(--text); font: inherit; font-size: 13px; cursor: pointer; text-align: left; display: flex; flex-direction: column; gap: 8px; }
.igdb-res button:hover { border-color: var(--accent); }
.igdb-res img { width: 100%; aspect-ratio: 3/4; object-fit: cover; border-radius: 6px; background: rgba(255,255,255,0.04); }

/* Admin na mobitelu: gornja traka + vodoravna traka s grupiranim stavkama */
@media (max-width: 900px) {
  .adm { flex-direction: column; }
  .adm-side { width: 100%; height: auto; position: sticky; top: 0; z-index: 60; padding: 10px 0 0; gap: 8px; border-right: 0; border-bottom: 1px solid var(--line); background: color-mix(in srgb, var(--bg1) 88%, transparent); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); overflow: visible; }
  .adm-brand { margin: 0 16px; }
  .adm-quick { display: flex; }
  .adm-user, .adm-side .ver { display: none; }
  .adm-nav { flex-direction: row; gap: 0; overflow-x: auto; scrollbar-width: none; padding: 0 16px 10px; scroll-padding: 0 16px; -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 16px, #000 calc(100% - 24px), transparent 100%); mask-image: linear-gradient(90deg, transparent 0, #000 16px, #000 calc(100% - 24px), transparent 100%); }
  .adm-nav::-webkit-scrollbar { display: none; }
  .adm-nav .grp { flex-direction: row; flex: none; align-items: center; gap: 4px; }
  .adm-nav .grp + .grp { margin-left: 10px; padding-left: 10px; border-left: 1px solid var(--line2); }
  .adm-nav .grp-l { display: none; }
  .adm-nav a.nav { flex: none; white-space: nowrap; padding: 8px 13px; font-size: 14px; border-radius: 999px; border: 1px solid var(--line2); gap: 7px; }
  .adm-nav a.nav .ic { width: 15px; height: 15px; }
  .adm-nav a.nav.on { border-color: var(--accent); background: var(--accent); }
  .adm-nav a.nav.on::before { display: none; }
  .adm-main { padding: 20px 16px 48px; }
  .adm-top h1 { font-size: 26px; }
  /* podtabovi u jednom redu, klizanje vodoravno */
  .tabs { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; margin-left: -16px; margin-right: -16px; padding: 0 16px 2px; }
  .tabs::-webkit-scrollbar { display: none; }
  .tabs a { flex: none; white-space: nowrap; }
  .status-big { padding: 16px; }
  .status-big > div:last-child { width: 100%; }
  .status-big > div:last-child > * { flex: 1; }
  .status-big > div:last-child .btn, .status-big > div:last-child form .btn { width: 100%; }
}
input[type=number] { -moz-appearance: textfield; appearance: textfield; }
input[type=number]::-webkit-inner-spin-button, input[type=number]::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }
input[type=search]::-webkit-search-cancel-button { -webkit-appearance: none; }
.act-col { display: flex; flex-direction: column; gap: 10px; }
.act-col > form, .act-col > form > .btn, .act-col > .btn { width: 100%; }

/* ---------- Održavanje ---------- */
.maint-bar { display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 6px 8px; padding: 9px 16px; font-size: 14px; text-align: center; background: rgba(245,177,76,0.12); border-bottom: 1px solid rgba(245,177,76,0.3); color: #FBD08F; }
.maint-bar a { color: #FFE2B3; text-decoration: underline; }
.maint-bar-info { background: color-mix(in srgb, var(--accent) 14%, transparent); border-bottom-color: color-mix(in srgb, var(--accent) 35%, transparent); color: #CFE2FF; }
.maint-bar-info a { color: #fff; }
.note-warn { background: rgba(245,177,76,0.10); border-color: rgba(245,177,76,0.35); color: #FBD08F; }
.note-warn a { color: #FFE2B3; }
.maint { min-height: 100vh; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 18px; padding: 40px 16px; }
.maint-card { width: min(600px, 100%); padding: 40px 32px; text-align: center; display: flex; flex-direction: column; align-items: center; }
.maint-card h1 { font-size: clamp(28px, 5vw, 40px); line-height: 1.1; margin-bottom: 14px; }
.maint-ic { width: 64px; height: 64px; border-radius: 50%; background: color-mix(in srgb, var(--accent) 18%, transparent); color: #9CC6FF; display: flex; align-items: center; justify-content: center; margin-bottom: 18px; }
.maint-ic .ic { animation: maint-spin 6s linear infinite; }
@keyframes maint-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .maint-ic .ic { animation: none; } }
.maint-msg { margin: 0 0 24px; color: var(--muted); font-size: 17px; line-height: 1.6; white-space: pre-line; max-width: 480px; }
.maint-cd { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; width: 100%; max-width: 420px; margin-bottom: 14px; }
.maint-cd div { background: var(--field); border: 1px solid var(--line2); border-radius: 10px; padding: 12px 6px; }
.maint-cd b { display: block; font: 700 30px/1.1 var(--head); color: var(--text); }
.maint-cd span { font-size: 12px; color: var(--dim); text-transform: uppercase; letter-spacing: 1px; }
.maint-admin { font-size: 13px; color: var(--dim); }
.maint-admin:hover { color: var(--muted); }
.quick { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.copy-row { display: flex; gap: 8px; }
.copy-row .input { flex: 1; min-width: 0; font-family: ui-monospace, monospace; font-size: 13px; }
.status-big { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; padding: 20px 24px; margin-bottom: 20px; }
.status-big .dot-big { width: 14px; height: 14px; border-radius: 50%; background: var(--dim); flex: none; }
.status-big.on .dot-big { background: #F5B14C; box-shadow: 0 0 0 6px rgba(245,177,76,0.15); }
.status-big.sched .dot-big { background: var(--accent); }
.status-big .meta { flex: 1; min-width: 220px; }
.status-big b { font: 600 18px var(--head); display: block; }
.clamp2 { display: -webkit-box; -webkit-line-clamp: 2; line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.game-desc { margin: 8px 0 6px; color: var(--muted); font-size: 15px; line-height: 1.6; max-width: 720px; }
/* Otvoreni padajući izbornik uvijek iznad susjednih kartica (staklene kartice stvaraju vlastiti sloj) */
.search-bar, .side, .panel { position: relative; }
.search-bar { z-index: 5; }
:is(.glass, .card, .panel, .search-bar, .side):has(.dd.open, .ac.open) { z-index: 60; }
