/* Devmajstori Forum – stilovi. Boje se mijenjaju u :root varijablama. */
:root {
  --bg: #f5f6f8;
  --surface: #ffffff;
  --surface-2: #f8fafc;
  --text: #0f172a;
  --text-2: #334155;
  --muted: #64748b;
  --border: #e2e8f0;
  --border-strong: #cbd5e1;
  --primary: #ea580c;
  --primary-hover: #c2410c;
  --primary-soft: #fff1e8;
  --primary-ink: #ffffff;
  --accent: #0f766e;
  --accent-soft: #e6f4f2;
  --danger: #dc2626;
  --danger-soft: #fef2f2;
  --warn: #b45309;
  --warn-soft: #fffbeb;
  --ok: #15803d;
  --like: #e11d48;
  --highlight: #fff7d6;
  --bar: #0f172a;
  --bar-text: #cbd5e1;
  --shadow: 0 1px 2px rgba(15, 23, 42, .06), 0 4px 16px rgba(15, 23, 42, .06);
  --shadow-lg: 0 12px 40px rgba(15, 23, 42, .18);
  --radius: 10px;
  --radius-sm: 6px;
  --font: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
  --wrap: 1180px;
  color-scheme: light;
}
[data-theme="dark"] {
  --bg: #0b1120;
  --surface: #111827;
  --surface-2: #0f172a;
  --text: #e5e7eb;
  --text-2: #cbd5e1;
  --muted: #94a3b8;
  --border: #1f2937;
  --border-strong: #334155;
  --primary: #f97316;
  --primary-hover: #fb923c;
  --primary-soft: #2a1709;
  --accent: #2dd4bf;
  --accent-soft: #0b2a27;
  --danger: #f87171;
  --danger-soft: #2a1212;
  --warn: #fbbf24;
  --warn-soft: #2a210a;
  --ok: #4ade80;
  --like: #fb7185;
  --highlight: #2a2410;
  --bar: #020617;
  --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 4px 16px rgba(0, 0, 0, .25);
  --shadow-lg: 0 12px 40px rgba(0, 0, 0, .5);
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--text); font: 15px/1.55 var(--font); min-height: 100vh; display: flex; flex-direction: column; }
#app { flex: 1; display: flex; flex-direction: column; }
a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }
button { font: inherit; color: inherit; }
img { max-width: 100%; }
code, pre, kbd { font-family: var(--mono); }
.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 20px; }
.hidden { display: none !important; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.block { display: block; }
.nowrap { white-space: nowrap; }
.ic { flex-shrink: 0; vertical-align: -0.2em; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }

/* ---------- traka glavne stranice ---------- */
.mainsite-bar { background: var(--bar); color: var(--bar-text); font-size: 13.5px; }
.mainsite-bar .wrap { display: flex; align-items: center; justify-content: space-between; height: 36px; gap: 16px; }
.mainsite-brand { color: #fff; font-weight: 600; display: inline-flex; gap: 6px; align-items: center; }
.mainsite-nav { display: flex; gap: 2px; overflow-x: auto; scrollbar-width: none; }
.mainsite-nav a { color: var(--bar-text); padding: 6px 10px; border-radius: 6px; white-space: nowrap; }
.mainsite-nav a:hover { color: #fff; background: rgba(255, 255, 255, .08); text-decoration: none; }
.mainsite-nav a.active { color: #fff; box-shadow: inset 0 -2px 0 var(--primary); border-radius: 0; }

/* ---------- zaglavlje ---------- */
.site-header { background: var(--surface); border-bottom: 1px solid var(--border); position: sticky; top: 0; z-index: 50; }
.header-inner { display: flex; align-items: center; gap: 18px; height: 62px; }
.logo { display: flex; align-items: center; gap: 10px; color: var(--text); font-size: 20px; letter-spacing: -.02em; }
.logo:hover { text-decoration: none; }
.logo img { max-height: 40px; }
.logo-mark { width: 34px; height: 34px; border-radius: 9px; background: var(--text); color: var(--primary); display: grid; place-items: center; }
[data-theme="dark"] .logo-mark { background: var(--primary); color: #0b1120; }
.logo-text { font-weight: 700; }
.logo-text b { color: var(--primary); font-weight: 700; margin-left: 4px; }
.header-search { flex: 1; min-width: 0; max-width: 460px; position: relative; margin-left: auto; }
.header-search form { display: flex; align-items: center; gap: 8px; background: var(--surface-2); border: 1px solid var(--border); border-radius: 999px; padding: 0 14px; color: var(--muted); transition: border-color .15s, box-shadow .15s; }
.header-search form:focus-within { border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-soft); }
.header-search input { border: 0; background: transparent; outline: 0; height: 38px; flex: 1; color: var(--text); font: inherit; min-width: 0; }
.search-pop { position: absolute; top: calc(100% + 6px); left: 0; right: 0; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow-lg); overflow: hidden; z-index: 60; }
.sp-item { display: block; padding: 10px 14px; color: var(--text); border-bottom: 1px solid var(--border); }
.sp-item:hover { background: var(--surface-2); text-decoration: none; }
.sp-title { font-weight: 600; display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.sp-blurb { font-size: 13px; color: var(--muted); margin-top: 2px; display: flex; gap: 6px; align-items: flex-start; }
.sp-blurb mark, .sr-blurb mark { background: var(--highlight); color: inherit; padding: 0 2px; border-radius: 3px; font-weight: 600; }
.sp-more, .sp-empty { display: block; padding: 10px 14px; font-size: 13px; }
.header-actions { display: flex; gap: 6px; align-items: center; }

/* ---------- gumbi ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; border: 1px solid var(--border-strong); background: var(--surface); color: var(--text); padding: 0 14px; height: 36px; border-radius: var(--radius-sm); cursor: pointer; font-weight: 500; white-space: nowrap; transition: background .12s, border-color .12s, color .12s; text-decoration: none !important; }
.btn:hover { background: var(--surface-2); border-color: var(--muted); }
.btn:disabled { opacity: .55; cursor: not-allowed; }
.btn.primary { background: var(--primary); border-color: var(--primary); color: var(--primary-ink); }
.btn.primary:hover { background: var(--primary-hover); border-color: var(--primary-hover); }
.btn.danger { color: var(--danger); border-color: color-mix(in srgb, var(--danger) 45%, transparent); }
.btn.danger:hover { background: var(--danger-soft); }
.btn.link { border-color: transparent; background: transparent; color: var(--primary); padding: 0 6px; }
.btn.link:hover { text-decoration: underline !important; background: transparent; }
.btn.flat { border-color: transparent; background: transparent; color: var(--muted); }
.btn.flat:hover { background: var(--surface-2); color: var(--text); }
.btn.sm { height: 30px; padding: 0 10px; font-size: 13.5px; }
.btn.block { display: flex; width: 100%; margin: 10px 0; }
.icon-btn { position: relative; display: inline-grid; place-items: center; width: 36px; height: 36px; border-radius: var(--radius-sm); border: 0; background: transparent; color: var(--muted); cursor: pointer; transition: background .12s, color .12s; }
.icon-btn:hover:not(:disabled) { background: var(--surface-2); color: var(--text); }
.icon-btn:disabled { opacity: .35; cursor: default; }
.icon-btn.sm { width: 30px; height: 30px; }
.icon-btn.on { color: var(--primary); }
.icon-btn.like.on { color: var(--like); }
.icon-btn.like:hover:not(:disabled) { color: var(--like); }
.icon-btn.accept.on { color: var(--ok); }
.icon-btn.accept:hover { color: var(--ok); }
.icon-btn.danger-h:hover { color: var(--danger); }
.icon-btn.pop svg { animation: pop .35s ease; }
@keyframes pop { 50% { transform: scale(1.35); } }
.icon-btn.ring svg { animation: ring .9s ease; }
@keyframes ring { 10%, 30%, 50% { transform: rotate(14deg); } 20%, 40% { transform: rotate(-14deg); } 60% { transform: none; } }
.badge { position: absolute; top: -3px; right: -6px; min-width: 18px; height: 18px; border-radius: 9px; padding: 0 5px; background: var(--primary); color: #fff; font-size: 11px; font-weight: 700; line-height: 18px; text-align: center; border: 2px solid var(--surface); box-sizing: content-box; }
.badge.warn { background: var(--danger); }
.dot-on { position: absolute; top: 7px; right: 7px; width: 8px; height: 8px; border-radius: 50%; background: var(--primary); }
.avatar-btn { border: 0; background: transparent; padding: 2px; cursor: pointer; border-radius: 50%; }
.avatar-btn:hover { box-shadow: 0 0 0 3px var(--primary-soft); }

/* ---------- avatari i značke ---------- */
.avatar { display: inline-grid; place-items: center; border-radius: 50%; color: #fff; font-weight: 600; flex-shrink: 0; user-select: none; line-height: 1; text-transform: uppercase; }
.av-xs { width: 20px; height: 20px; font-size: 11px; }
.av-sm { width: 28px; height: 28px; font-size: 13px; }
.av-md { width: 36px; height: 36px; font-size: 16px; }
.av-lg { width: 46px; height: 46px; font-size: 20px; }
.av-xl { width: 110px; height: 110px; font-size: 46px; }
.cat-badge { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: var(--text-2); font-weight: 500; white-space: nowrap; }
.cat-badge:hover { color: var(--text); }
.cat-dot { width: 10px; height: 10px; border-radius: 3px; display: inline-block; flex-shrink: 0; }
.cat-dot.lg { width: 16px; height: 16px; border-radius: 4px; }
.tags { display: inline-flex; gap: 8px; flex-wrap: wrap; }
.tag { font-size: 12.5px; color: var(--muted); }
.tag::before { content: "#"; opacity: .6; }
.tag:hover { color: var(--text); }
.tag.big { display: inline-flex; gap: 6px; align-items: center; padding: 6px 12px; background: var(--surface); border: 1px solid var(--border); border-radius: 999px; font-size: 14px; color: var(--text-2); }
.tag-cloud { display: flex; flex-wrap: wrap; gap: 10px; }
.role-badge { display: inline-flex; align-items: center; gap: 3px; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .03em; padding: 1px 7px; border-radius: 999px; background: var(--accent-soft); color: var(--accent); vertical-align: middle; }
.role-badge.admin { background: var(--primary-soft); color: var(--primary); }
.new-user { font-size: 11px; color: var(--muted); border: 1px dashed var(--border-strong); padding: 0 6px; border-radius: 999px; }
.pill { display: inline-block; font-size: 12px; padding: 1px 8px; border-radius: 999px; background: var(--surface-2); border: 1px solid var(--border); color: var(--muted); }
.pill.warn { background: var(--warn-soft); color: var(--warn); border-color: transparent; }
.solved-ic { color: var(--ok); display: inline-flex; }

/* ---------- glavni sadržaj ---------- */
#main { padding-top: 22px; padding-bottom: 60px; flex: 1; }
body.composer-open #main { padding-bottom: 46vh; }
.boot, .loading-block { display: grid; place-items: center; min-height: 200px; }
.spinner { width: 32px; height: 32px; border-radius: 50%; border: 3px solid var(--border); border-top-color: var(--primary); animation: spin .8s linear infinite; }
.spinner.sm { width: 20px; height: 20px; border-width: 2px; }
@keyframes spin { to { transform: rotate(360deg); } }
.empty-state { text-align: center; padding: 60px 20px; color: var(--muted); }
.empty-state h2 { color: var(--text); margin: 0 0 8px; }
.empty-state.small { padding: 36px 20px; background: var(--surface); border: 1px dashed var(--border-strong); border-radius: var(--radius); }
.page-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 16px; }
.page-head h1 { margin: 0; font-size: 26px; display: flex; align-items: center; gap: 10px; letter-spacing: -.02em; }
.page-actions { display: flex; gap: 8px; margin-bottom: 14px; }
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 18px 20px; margin-bottom: 16px; }
.card h3 { margin: 0 0 12px; font-size: 16px; display: flex; align-items: center; gap: 8px; }
.alert { padding: 10px 14px; border-radius: var(--radius-sm); background: var(--primary-soft); color: var(--text); margin: 10px 0; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.alert.warn { background: var(--warn-soft); color: var(--warn); }
.welcome-banner { display: flex; gap: 12px; align-items: flex-start; justify-content: space-between; background: linear-gradient(120deg, var(--primary-soft), var(--accent-soft)); border: 1px solid var(--border); border-radius: var(--radius); padding: 14px 18px; margin-bottom: 18px; font-weight: 500; }

/* ---------- kontrole popisa ---------- */
.list-controls { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; }
.list-controls-left, .list-controls-right { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.dropbtn { display: inline-flex; align-items: center; gap: 7px; height: 36px; padding: 0 12px; border: 1px solid var(--border-strong); border-radius: var(--radius-sm); background: var(--surface); cursor: pointer; font-weight: 500; max-width: 220px; }
.dropbtn:hover { border-color: var(--muted); }
.pills { display: flex; gap: 2px; flex-wrap: wrap; }
.pills a { padding: 7px 12px; border-radius: var(--radius-sm); color: var(--text-2); font-weight: 500; }
.pills a:hover { background: var(--surface); text-decoration: none; }
.pills a.active { background: var(--primary); color: var(--primary-ink); }
.period-pick { display: flex; gap: 4px; align-items: center; margin: -4px 0 12px; font-size: 14px; color: var(--muted); flex-wrap: wrap; }
.period-pick a { padding: 3px 10px; border-radius: 999px; color: var(--text-2); }
.period-pick a.active { background: var(--surface); border: 1px solid var(--border-strong); }
.cat-header { border-left: 5px solid var(--cat, var(--primary)); padding: 6px 0 6px 16px; margin-bottom: 18px; }
.cat-header h1 { margin: 0; display: flex; align-items: center; gap: 10px; font-size: 26px; letter-spacing: -.02em; }
.cat-header p { margin: 4px 0 0; color: var(--muted); }
.incoming { text-align: center; background: var(--primary-soft); border-radius: var(--radius-sm); margin-bottom: 10px; padding: 4px; }

/* ---------- popis tema ---------- */
.topic-list { width: 100%; border-collapse: collapse; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
.topic-list th { text-align: left; font-size: 13px; font-weight: 600; color: var(--muted); padding: 10px 14px; border-bottom: 2px solid var(--border); background: var(--surface); }
.topic-list td { padding: 13px 14px; border-bottom: 1px solid var(--border); vertical-align: middle; }
.topic-list tr:last-child td { border-bottom: 0; }
.topic-row:hover td { background: var(--surface-2); }
.topic-row.pinned td { background: color-mix(in srgb, var(--primary-soft) 45%, var(--surface)); }
.col-main { width: 100%; }
.col-num { text-align: center !important; white-space: nowrap; color: var(--muted); font-size: 14px; min-width: 76px; }
.col-num.hot { color: var(--primary); font-weight: 600; }
.col-posters { white-space: nowrap; }
.col-posters a { margin-right: -6px; display: inline-block; }
.col-posters .avatar { border: 2px solid var(--surface); }
.tr-title { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.tl-link { color: var(--text); font-size: 16.5px; font-weight: 500; line-height: 1.35; }
.topic-row.has-unread .tl-link { font-weight: 650; }
.topic-row:not(.has-unread) .tl-link:visited { color: var(--text-2); }
.st-ic { color: var(--muted); display: inline-flex; }
.unread-badge { background: var(--primary); color: #fff !important; border-radius: 999px; font-size: 12px; font-weight: 700; padding: 0 8px; line-height: 20px; text-decoration: none !important; }
.new-badge { background: var(--accent-soft); color: var(--accent); border-radius: 999px; font-size: 11.5px; font-weight: 700; padding: 0 8px; line-height: 20px; text-transform: uppercase; }
.tr-meta { display: flex; gap: 12px; align-items: center; margin-top: 4px; flex-wrap: wrap; }
.tr-excerpt { margin: 6px 0 0; color: var(--text-2); font-size: 14px; }
.tr-mobile { display: none; font-size: 13px; color: var(--muted); margin-top: 6px; align-items: center; gap: 6px; }
.load-more { display: grid; place-items: center; padding: 20px; }
.list-end { text-align: center; color: var(--muted); padding: 24px; font-size: 14px; }

/* ---------- kategorije ---------- */
.cat-layout { display: grid; grid-template-columns: 1.4fr 1fr; gap: 24px; align-items: start; }
.cat-list { width: 100%; border-collapse: collapse; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
.cat-list th { text-align: left; font-size: 13px; color: var(--muted); padding: 10px 16px; border-bottom: 2px solid var(--border); }
.cat-list td { padding: 14px 16px; border-bottom: 1px solid var(--border); }
.cat-cell { border-left: 5px solid var(--cat); }
.cat-name { color: var(--text); font-size: 17px; font-weight: 650; }
.cat-cell p { margin: 3px 0 0; color: var(--muted); font-size: 14px; }
.cat-list .col-num b { display: block; color: var(--text); font-size: 17px; }
.cat-list .col-num small { font-size: 12px; }
.side-title { font-size: 14px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin: 4px 0 10px; }
.mini-list { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); }
.mini-topic { display: grid; grid-template-columns: auto 1fr auto; gap: 10px; padding: 11px 14px; border-bottom: 1px solid var(--border); align-items: center; }
.mini-topic:last-child { border-bottom: 0; }
.mini-topic > div > a { color: var(--text); font-weight: 500; }
.mini-stats { text-align: right; font-size: 12px; color: var(--muted); display: flex; flex-direction: column; }
.mini-stats b { color: var(--text-2); font-size: 14px; }

/* ---------- tema ---------- */
.topic-layout { display: grid; grid-template-columns: minmax(0, 1fr) 150px; min-width: 0; gap: 32px; }
.topic-title-box { margin-bottom: 18px; }
.topic-title { font-size: 27px; line-height: 1.25; margin: 0 0 6px; letter-spacing: -.02em; display: flex; align-items: flex-start; gap: 8px; flex-wrap: wrap; }
.topic-title .st-ic { margin-top: 5px; }
.topic-title .icon-btn { margin-top: 1px; }
#posts { display: flex; flex-direction: column; gap: 14px; }
.post { display: grid; grid-template-columns: 48px minmax(0, 1fr); gap: 4px 14px; padding: 18px 20px 10px; background: var(--surface); border: 1px solid var(--border); border-radius: 14px; box-shadow: 0 1px 2px rgba(15, 23, 42, .04); scroll-margin-top: 80px; transition: background .6s, border-color .2s, box-shadow .2s; }
.post:hover { border-color: var(--border-strong); box-shadow: var(--shadow); }
.post.first { border-top: 3px solid var(--primary); padding-top: 20px; }
.post.first .cooked { font-size: 16.5px; }
.post-avatar .avatar.av-lg { width: 48px; height: 48px; }
.post.highlight { animation: hl 2.2s ease; }
@keyframes hl { 0%, 40% { background: var(--highlight); } 100% { background: var(--surface); } }
.post.deleted { opacity: .6; background: repeating-linear-gradient(-45deg, transparent 0 12px, var(--danger-soft) 12px 24px); }
.post.accepted { border-color: color-mix(in srgb, var(--ok) 45%, var(--border)); box-shadow: 0 0 0 3px color-mix(in srgb, var(--ok) 12%, transparent); }
.post-avatar { padding-top: 2px; }
.post-avatar a:hover { text-decoration: none; }
.post-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; min-height: 26px; margin-bottom: 4px; }
.names { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.names b { color: var(--text); }
.full-name { color: var(--muted); font-size: 14px; }
.post-info { display: flex; gap: 10px; align-items: center; color: var(--muted); font-size: 13.5px; }
.post-info a { color: var(--muted); }
.reply-to { display: inline-flex; align-items: center; gap: 4px; }
.edits { border: 0; background: transparent; color: var(--muted); cursor: pointer; display: inline-flex; gap: 2px; align-items: center; font-size: 13px; padding: 2px 4px; border-radius: 4px; }
.edits:hover { background: var(--surface-2); color: var(--text); }
.post-actions { display: flex; justify-content: space-between; align-items: center; margin-top: 10px; padding-top: 6px; gap: 8px; flex-wrap: wrap; border-top: 1px dashed var(--border); }
.post-actions .icon-btn:not(.on):not(.like) { opacity: .55; transition: opacity .15s; }
.post:hover .post-actions .icon-btn, .post-actions .icon-btn:focus-visible { opacity: 1; }
.pa-left, .pa-right { display: flex; align-items: center; gap: 2px; }
.like-count { border: 0; background: transparent; color: var(--muted); cursor: pointer; font-weight: 600; padding: 0 2px 0 6px; }
.like-count:hover { color: var(--like); }
.reply-btn { margin-left: 4px; }
.hidden-post { background: var(--surface-2); border: 1px dashed var(--border-strong); padding: 12px 14px; border-radius: var(--radius-sm); color: var(--muted); display: flex; gap: 6px; align-items: center; flex-wrap: wrap; margin-top: 6px; }
.accepted-note { color: var(--ok); font-weight: 600; font-size: 14px; display: flex; gap: 6px; align-items: center; margin-top: 8px; }
.deleted-note { color: var(--danger); font-size: 13px; display: flex; gap: 6px; align-items: center; margin-top: 6px; }
.replies-box:empty { display: none; }
.embedded-replies { border-left: 3px solid var(--border-strong); margin: 8px 0 8px 4px; padding-left: 14px; }
.emb-post { display: grid; grid-template-columns: 28px 1fr; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--border); }
.emb-post:last-child { border-bottom: 0; }
.emb-head { font-size: 13px; color: var(--muted); }
.topic-map { display: flex; flex-wrap: wrap; gap: 10px 18px; align-items: center; justify-content: space-between; background: var(--surface-2); border: 1px solid var(--border); border-radius: 12px; padding: 10px 16px; }
.tm-stats { display: flex; flex-wrap: wrap; gap: 6px 18px; align-items: center; }
.tm-stat { display: inline-flex; align-items: center; gap: 6px; font-size: 14px; color: var(--text-2); }
.tm-stat b { color: var(--text); }
.tm-stat svg { color: var(--muted); }
.tm-stat.like svg { color: var(--like); }
.tm-stat.muted { color: var(--muted); font-size: 13px; }
.no-replies { display: flex; align-items: center; gap: 10px; justify-content: center; color: var(--muted); border: 2px dashed var(--border); border-radius: 14px; padding: 18px; font-size: 15px; }
.op-chip { font-size: 11.5px; font-weight: 600; color: var(--primary); background: var(--primary-soft); border-radius: 999px; padding: 1px 8px; }
.tm-item { display: flex; flex-direction: column; align-items: center; font-size: 13px; color: var(--muted); }
.tm-item > small { font-size: 11.5px; text-transform: lowercase; }
.tm-item b { font-size: 16px; color: var(--text); }
.tm-avatars { display: flex; flex-wrap: wrap; padding-left: 6px; }
.tm-av { margin-left: -6px; border-radius: 50%; box-shadow: 0 0 0 2px var(--surface-2); }
.tm-av { position: relative; display: inline-flex; }
.tm-av span { position: absolute; right: -4px; bottom: -4px; background: var(--surface); border: 1px solid var(--border); border-radius: 999px; font-size: 10px; padding: 0 4px; color: var(--text-2); }
.solution-box { display: flex; gap: 12px; background: color-mix(in srgb, var(--ok) 10%, var(--surface)); border: 1px solid color-mix(in srgb, var(--ok) 30%, transparent); border-radius: var(--radius); padding: 12px 16px; margin: 0; color: var(--ok); }
.solution-box div { color: var(--text); }
.solution-box p { margin: 4px 0 0; color: var(--text-2); font-size: 14px; }
.topic-footer { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; padding: 22px 0; }
.tf-buttons { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.tf-notif { display: flex; align-items: center; gap: 10px; }
.tf-notif small { color: var(--muted); max-width: 260px; font-size: 12.5px; }
.closed-note { color: var(--muted); display: flex; gap: 6px; align-items: center; }
#suggested { margin-top: 20px; }
.topic-timeline { position: relative; }
.tl-inner { position: sticky; top: 92px; display: flex; flex-direction: column; gap: 8px; font-size: 13px; }
.tl-inner a { color: var(--muted); }
.tl-track { position: relative; height: 180px; border-left: 3px solid var(--border); margin-left: 4px; }
.tl-handle { position: absolute; left: -3px; transform: translateY(-50%); border-left: 3px solid var(--primary); padding: 6px 0 6px 10px; white-space: nowrap; color: var(--muted); transition: top .2s; }
.tl-handle b { color: var(--text); }
.quote-btn { position: absolute; z-index: 40; box-shadow: var(--shadow-lg); }

/* ---------- sadržaj objava ---------- */
.cooked { overflow-wrap: anywhere; font-size: 15.5px; line-height: 1.65; color: var(--text); }
.cooked > :first-child { margin-top: 6px; }
.cooked > :last-child { margin-bottom: 4px; }
.cooked p { margin: 0 0 12px; }
.cooked h2, .cooked h3, .cooked h4, .cooked h5, .cooked h6 { margin: 20px 0 8px; line-height: 1.3; }
.cooked h2 { font-size: 21px; } .cooked h3 { font-size: 18px; } .cooked h4 { font-size: 16px; }
.cooked code { background: var(--surface-2); border: 1px solid var(--border); padding: 1px 5px; border-radius: 4px; font-size: .88em; }
.cooked pre { background: var(--code-bg); color: var(--code-fg); border: 1px solid var(--code-border); padding: 14px 16px; border-radius: var(--radius-sm); overflow-x: auto; font-size: 13.5px; line-height: 1.6; margin: 0 0 14px; tab-size: 4; }
.cooked pre code { background: none; border: 0; padding: 0; color: inherit; font-size: inherit; }
.cooked blockquote { margin: 0 0 12px; padding: 8px 14px; border-left: 4px solid var(--border-strong); background: var(--surface-2); color: var(--text-2); border-radius: 0 var(--radius-sm) var(--radius-sm) 0; }
.cooked blockquote p:last-child { margin-bottom: 0; }
.cooked aside.quote { margin: 0 0 14px; border-left: 4px solid var(--primary); background: var(--surface-2); border-radius: 0 var(--radius-sm) var(--radius-sm) 0; }
.cooked aside.quote .quote-title { padding: 8px 14px 0; font-size: 13.5px; color: var(--muted); }
.cooked aside.quote blockquote { border: 0; background: none; margin: 0; }
.cooked ul, .cooked ol { padding-left: 24px; margin: 0 0 12px; }
.cooked li { margin: 3px 0; }
.cooked img { max-width: 100%; height: auto; border-radius: var(--radius-sm); }
.cooked a.mention { background: var(--surface-2); border: 1px solid var(--border); padding: 0 5px; border-radius: 4px; color: var(--text-2); font-weight: 600; font-size: .94em; }
.cooked hr { border: 0; border-top: 1px solid var(--border); margin: 18px 0; }
.cooked mark { background: var(--highlight); color: inherit; }
.cooked .table-wrap { overflow-x: auto; margin: 0 0 14px; }
.cooked table { border-collapse: collapse; font-size: 14px; }
.cooked th, .cooked td { border: 1px solid var(--border); padding: 6px 10px; }
.cooked th { background: var(--surface-2); }

/* ---------- urednik (composer) ---------- */
.composer { position: fixed; left: 50%; transform: translateX(-50%); bottom: 0; width: min(1180px, 100%); height: 44vh; min-height: 330px; background: var(--surface); border: 1px solid var(--border-strong); border-bottom: 0; border-radius: 12px 12px 0 0; box-shadow: var(--shadow-lg); z-index: 70; display: flex; flex-direction: column; padding: 0 16px 12px; border-top: 4px solid var(--primary); }
.composer.minimized { height: auto; min-height: 0; }
.composer.minimized > :not(.c-head):not(.c-grip) { display: none; }
.c-grip { height: 10px; cursor: pointer; margin: 0 -16px; }
.c-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding-bottom: 6px; }
.c-replying { display: flex; align-items: center; gap: 6px; font-size: 14px; color: var(--text-2); min-width: 0; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.c-head-btns { display: flex; gap: 2px; }
.c-fields { display: grid; grid-template-columns: 1fr 200px 220px; gap: 8px; margin-bottom: 8px; }
.c-fields input, .c-fields select { height: 38px; border: 1px solid var(--border-strong); border-radius: var(--radius-sm); padding: 0 10px; background: var(--surface); color: var(--text); font: inherit; }
.c-title { font-size: 16px !important; font-weight: 500; }
.c-toolbar { display: flex; align-items: center; gap: 2px; border: 1px solid var(--border-strong); border-bottom: 0; border-radius: var(--radius-sm) var(--radius-sm) 0 0; padding: 3px 6px; background: var(--surface-2); }
.c-toolbar button { border: 0; background: transparent; width: 32px; height: 30px; border-radius: 5px; cursor: pointer; color: var(--text-2); display: grid; place-items: center; }
.c-toolbar button:hover { background: var(--surface); color: var(--text); }
.c-help { margin-left: auto; font-size: 12px; color: var(--muted); }
kbd { border: 1px solid var(--border-strong); border-bottom-width: 2px; border-radius: 4px; padding: 0 4px; font-size: 11px; background: var(--surface); }
.c-body { flex: 1; display: grid; grid-template-columns: 1fr 1fr; gap: 12px; min-height: 0; }
.composer.no-preview .c-body { grid-template-columns: 1fr; }
.composer.no-preview .c-preview { display: none; }
.c-editor { position: relative; min-height: 0; }
.c-editor textarea { width: 100%; height: 100%; resize: none; border: 1px solid var(--border-strong); border-radius: 0 0 var(--radius-sm) var(--radius-sm); padding: 12px; font: 14.5px/1.55 var(--mono); background: var(--surface); color: var(--text); outline: 0; }
.c-editor textarea:focus { border-color: var(--primary); }
.c-preview { overflow-y: auto; border: 1px dashed var(--border); border-radius: var(--radius-sm); padding: 10px 14px; background: var(--surface-2); }
.c-foot { display: flex; align-items: center; gap: 8px; padding-top: 10px; }
.c-status { color: var(--muted); font-size: 13px; margin-left: auto; }
.ac-pop { position: absolute; left: 10px; top: 10px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-sm); box-shadow: var(--shadow-lg); z-index: 5; min-width: 240px; overflow: hidden; }
.ac-item { display: flex; align-items: center; gap: 8px; padding: 7px 12px; cursor: pointer; font-size: 14px; }
.ac-item small { color: var(--muted); }
.ac-item.sel, .ac-item:hover { background: var(--primary-soft); }

/* ---------- dropdown ---------- */
.dropdown { position: absolute; z-index: 80; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow-lg); min-width: 220px; max-width: 380px; max-height: 70vh; overflow-y: auto; padding: 6px; animation: ddin .12s ease; }
@keyframes ddin { from { opacity: 0; transform: translateY(-4px); } }
.dd-item { display: flex; align-items: center; gap: 10px; width: 100%; text-align: left; padding: 8px 10px; border: 0; background: transparent; border-radius: var(--radius-sm); color: var(--text); cursor: pointer; font-size: 14.5px; }
.dd-item:hover { background: var(--surface-2); text-decoration: none; }
.dd-item.danger { color: var(--danger); }
.dd-item.two { align-items: flex-start; }
.dd-item.two span, .dd-item.two { flex-direction: row; }
.dd-item.two small { display: block; color: var(--muted); font-size: 12.5px; }
.dd-item.two b { display: block; font-weight: 600; }
button.dd-item.two:not(:has(svg)) { flex-direction: column; gap: 0; }
.dd-count { margin-left: auto; color: var(--muted); }
.dd-sep { height: 1px; background: var(--border); margin: 6px 0; }
.dd-head { display: flex; justify-content: space-between; align-items: center; font-weight: 600; padding: 6px 10px 8px; font-size: 14px; }
.dd-foot { display: block; text-align: center; padding: 8px; font-size: 14px; border-top: 1px solid var(--border); margin-top: 4px; }
.dd-empty, .dd-loading { padding: 20px; text-align: center; color: var(--muted); display: grid; place-items: center; }
.dd-user { display: flex; gap: 10px; align-items: center; padding: 8px 10px 10px; border-bottom: 1px solid var(--border); margin-bottom: 6px; }
.dd-user small { display: block; color: var(--muted); }
.notif-menu { width: 380px; }
.notif { display: flex; gap: 10px; padding: 9px 10px; border-radius: var(--radius-sm); color: var(--text); font-size: 14px; line-height: 1.4; }
.notif:hover { background: var(--surface-2); text-decoration: none; }
.notif.unread { background: var(--primary-soft); }
.notif-text small { display: block; color: var(--muted); margin-top: 2px; font-size: 12px; }
.notif-text i { font-style: normal; color: var(--text-2); }
.notif-ic { color: var(--muted); padding-top: 1px; }
.notif-ic.t-liked { color: var(--like); }
.notif-ic.t-solution, .notif-ic.t-trust_level { color: var(--ok); }
.notif-ic.t-mentioned, .notif-ic.t-replied { color: var(--primary); }
.notif-page { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 6px; }
.likers { display: flex; flex-wrap: wrap; gap: 6px; padding: 4px 8px 8px; }
.likers a { display: flex; flex-direction: column; align-items: center; color: var(--muted); font-size: 12px; }

/* ---------- modali i obrasci ---------- */
body.has-modal { overflow: hidden; }
.modal-backdrop { position: fixed; inset: 0; background: rgba(15, 23, 42, .5); z-index: 100; display: grid; place-items: start center; padding: 8vh 16px 16px; overflow-y: auto; animation: fade .15s; }
@keyframes fade { from { opacity: 0; } }
.modal { background: var(--surface); border-radius: 14px; width: 100%; max-width: 480px; box-shadow: var(--shadow-lg); animation: rise .18s ease; }
.modal.wide { max-width: 760px; }
@keyframes rise { from { transform: translateY(12px); opacity: 0; } }
.modal-head { display: flex; justify-content: space-between; align-items: center; padding: 16px 20px 0; }
.modal-head h3 { margin: 0; font-size: 19px; }
.modal-body { padding: 14px 20px 20px; }
.form { display: flex; flex-direction: column; gap: 14px; }
.form label { display: flex; flex-direction: column; gap: 5px; font-weight: 500; font-size: 14px; }
.form label small { font-weight: 400; color: var(--muted); font-size: 12.5px; }
.form input:not([type=checkbox]):not([type=radio]):not([type=color]), .form textarea, .form select, .inline-search input, .cat-pref select {
  border: 1px solid var(--border-strong); border-radius: var(--radius-sm); padding: 9px 11px; font: inherit; font-weight: 400; background: var(--surface); color: var(--text); outline: 0; width: 100%; }
.form input:focus, .form textarea:focus, .form select:focus, .inline-search input:focus { border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-soft); }
.form input[type=color] { height: 40px; width: 70px; padding: 2px; border: 1px solid var(--border-strong); border-radius: var(--radius-sm); background: var(--surface); }
.form label.check { flex-direction: row; align-items: center; gap: 8px; font-weight: 400; }
.form .row { display: flex; gap: 12px; flex-wrap: wrap; }
.form .row label { flex: 1; min-width: 120px; }
.form-actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.form-error { color: var(--danger); font-size: 14px; min-height: 0; }
.form-error:empty { display: none; }
.hint { font-size: 13px; color: var(--muted); margin: 0; }
.radio-card { flex-direction: row !important; align-items: flex-start; gap: 10px !important; border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 10px 12px; cursor: pointer; }
.radio-card:has(input:checked) { border-color: var(--primary); background: var(--primary-soft); }
.radio-card input { margin-top: 4px; }
.radio-card small { display: block; }
.form.inline { flex-direction: row; align-items: flex-end; flex-wrap: wrap; gap: 10px; padding: 12px 0; border-bottom: 1px solid var(--border); }
.form.inline label { flex: 0 1 auto; }
.form.inline label.grow { flex: 1; min-width: 200px; }
.form.inline > span { align-self: center; color: var(--muted); }
.danger-zone { border-bottom: 0 !important; }
.au-summary { display: flex; gap: 12px; align-items: center; padding-bottom: 8px; }
.au-summary small { display: block; color: var(--muted); }
.au-summary .av-xl { width: 88px; height: 88px; flex-shrink: 0; }
.au-avatar-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 8px; }
.au-avatar-actions label.btn { cursor: pointer; }
.inline-search { display: flex; gap: 6px; }
.inline-search input { width: 260px; }

.sso-btn { height: 42px; background: var(--bar); color: #fff; border-color: var(--bar); margin: 4px 0 0; }
.sso-btn:hover { background: #1e293b; color: #fff; }
.or-sep { display: flex; align-items: center; gap: 10px; color: var(--muted); font-size: 13px; margin: 14px 0 10px; }
.or-sep::before, .or-sep::after { content: ""; flex: 1; height: 1px; background: var(--border); }

/* ---------- toast ---------- */
#toasts { position: fixed; top: 110px; right: 20px; z-index: 200; display: flex; flex-direction: column; gap: 8px; }
.toast { background: var(--text); color: var(--bg); padding: 10px 16px; border-radius: var(--radius-sm); box-shadow: var(--shadow-lg); font-size: 14px; max-width: 360px; animation: rise .2s; transition: opacity .4s, transform .4s; }
.toast.ok { background: var(--ok); color: #fff; }
.toast.error { background: var(--danger); color: #fff; }
.toast.out { opacity: 0; transform: translateX(20px); }

/* ---------- profil ---------- */
.profile-card { display: flex; gap: 24px; align-items: flex-start; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 24px; }
.pc-info { flex: 1; min-width: 0; }
.pc-info h1 { margin: 0; font-size: 28px; display: flex; gap: 10px; align-items: center; flex-wrap: wrap; letter-spacing: -.02em; }
.pc-name { color: var(--text-2); font-size: 17px; }
.pc-meta { display: flex; gap: 16px; flex-wrap: wrap; margin: 8px 0; color: var(--muted); font-size: 14px; align-items: center; }
.trust { display: inline-flex; align-items: center; gap: 5px; padding: 2px 10px; border-radius: 999px; background: var(--surface-2); border: 1px solid var(--border); color: var(--text-2); font-weight: 500; }
.trust.t3, .trust.t4 { background: var(--accent-soft); color: var(--accent); border-color: transparent; }
.pc-bio { margin-top: 10px; }
.pc-actions { display: flex; flex-direction: column; gap: 8px; }
.pc-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(110px, 1fr)); gap: 1px; background: var(--border); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; margin: 16px 0; }
.pc-stats > div { background: var(--surface); padding: 12px; text-align: center; }
.pc-stats b { display: block; font-size: 18px; }
.pc-stats small { color: var(--muted); font-size: 12.5px; display: inline-flex; gap: 3px; align-items: center; }
.tabs { display: flex; gap: 2px; border-bottom: 2px solid var(--border); margin-bottom: 18px; overflow-x: auto; }
.tabs a { padding: 10px 14px; color: var(--text-2); font-weight: 500; border-bottom: 2px solid transparent; margin-bottom: -2px; white-space: nowrap; display: inline-flex; gap: 6px; align-items: center; }
.tabs a:hover { color: var(--text); text-decoration: none; }
.tabs a.active { color: var(--primary); border-bottom-color: var(--primary); }
.summary-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.sum-box { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px 18px; }
.sum-box.wide { grid-column: 1 / -1; }
.sum-box h3 { margin: 0 0 10px; font-size: 15px; display: flex; gap: 8px; align-items: center; }
.sum-line { display: flex; justify-content: space-between; gap: 10px; padding: 6px 0; border-bottom: 1px solid var(--border); align-items: center; }
.sum-line:last-child { border-bottom: 0; }
.sum-line a { color: var(--text); }
.sum-line small { color: var(--muted); white-space: nowrap; display: inline-flex; gap: 3px; align-items: center; }
.progress-list { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 10px 24px; }
.prog { display: grid; grid-template-columns: 1fr 90px 60px; gap: 10px; align-items: center; font-size: 14px; }
.prog small { color: var(--muted); text-align: right; }
.bar { height: 8px; background: var(--surface-2); border-radius: 999px; overflow: hidden; border: 1px solid var(--border); }
.bar i { display: block; height: 100%; background: var(--primary); }
.activity-item { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 12px 16px; margin-bottom: 10px; }
.activity-item p { margin: 6px 0 0; color: var(--text-2); font-size: 14px; }
.ai-head { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.ai-head a { color: var(--text); }
.prefs { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; align-items: start; }
.prefs .card { margin: 0; }
.prefs .card h3 { margin-bottom: 0; }
.cat-pref { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 6px 0; border-bottom: 1px solid var(--border); }
.cat-pref select { width: 150px; padding: 5px 8px; }

/* ---------- pretraga ---------- */
.search-page { max-width: 860px; }
.search-big { display: flex; align-items: center; gap: 10px; background: var(--surface); border: 1px solid var(--border-strong); border-radius: var(--radius); padding: 6px 6px 6px 16px; color: var(--muted); }
.search-big input { flex: 1; border: 0; outline: 0; font: inherit; font-size: 17px; background: transparent; color: var(--text); height: 40px; }
.search-help { margin: 10px 0 18px; font-size: 14px; color: var(--muted); }
.search-help summary { cursor: pointer; }
.search-help code { background: var(--surface); border: 1px solid var(--border); padding: 0 5px; border-radius: 4px; }
.search-result { display: grid; grid-template-columns: 36px 1fr; gap: 12px; padding: 14px 0; border-bottom: 1px solid var(--border); }
.sr-title { font-size: 17px; font-weight: 600; color: var(--text); }
.sr-blurb { margin: 6px 0 0; color: var(--text-2); font-size: 14px; }

/* ---------- tablice i admin ---------- */
.table-scroll { overflow-x: auto; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); }
.data-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.data-table th { text-align: left; padding: 10px 12px; border-bottom: 2px solid var(--border); color: var(--muted); font-weight: 600; white-space: nowrap; }
.data-table th a { color: var(--muted); }
.data-table th a.active { color: var(--primary); }
.data-table td { padding: 10px 12px; border-bottom: 1px solid var(--border); vertical-align: middle; }
.data-table tr:last-child td { border-bottom: 0; }
.row-warn td { background: var(--warn-soft); }
.user-cell { display: flex; gap: 10px; align-items: center; }
.user-cell small { display: block; color: var(--muted); }
.admin-toolbar { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; align-items: center; }
.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; margin-bottom: 16px; }
.stat { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 14px 16px; }
.stat b { display: block; font-size: 26px; letter-spacing: -.02em; }
.stat small { color: var(--muted); }
.bars { display: flex; align-items: flex-end; gap: 4px; height: 160px; padding-top: 10px; }
.bar-col { flex: 1; height: 100%; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; position: relative; }
.bar-col i { display: block; width: 100%; background: var(--accent); border-radius: 3px 3px 0 0; min-height: 2px; }
.bar-col em { position: absolute; top: -2px; width: 6px; height: 6px; border-radius: 50%; background: var(--primary); }
.bar-col span { font-size: 10px; color: var(--muted); margin-top: 4px; }
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.settings-form { max-width: 720px; }
.review-item .ri-head { display: flex; gap: 8px; align-items: center; margin-bottom: 10px; flex-wrap: wrap; }
.ri-post { display: grid; grid-template-columns: 28px 1fr; gap: 10px; background: var(--surface-2); border-radius: var(--radius-sm); padding: 12px; margin-bottom: 10px; max-height: 300px; overflow-y: auto; }
.ri-flags { margin-bottom: 12px; }
.ri-flag { padding: 4px 0; font-size: 14px; }
.ri-msg { color: var(--text-2); margin: 2px 0 0 20px; font-style: italic; }
.revision { border-bottom: 1px solid var(--border); padding: 10px 0; }
.rev-head { font-size: 14px; color: var(--muted); margin-bottom: 8px; }
.diff { font: 13px/1.5 var(--mono); border: 1px solid var(--border); border-radius: var(--radius-sm); overflow-x: auto; }
.diff > div { padding: 1px 10px; white-space: pre-wrap; }
.diff .del { background: var(--danger-soft); color: var(--danger); }
.diff .del::before { content: "− "; }
.diff .ins { background: color-mix(in srgb, var(--ok) 12%, var(--surface)); color: var(--ok); }
.diff .ins::before { content: "+ "; }
.diff .same { color: var(--muted); }
.diff .same::before { content: "  "; }
.prose { max-width: 760px; font-size: 16px; padding: 28px 34px; }
.prose h1 { margin-top: 0; letter-spacing: -.02em; }
.prose h2 { font-size: 19px; margin: 22px 0 6px; }

/* ---------- podnožje ---------- */
.site-footer { border-top: 1px solid var(--border); background: var(--surface); color: var(--muted); font-size: 14px; }
.footer-inner { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; padding: 22px 20px; }
.site-footer nav { display: flex; gap: 18px; flex-wrap: wrap; }
.site-footer a { color: var(--text-2); }
body.composer-open .site-footer { display: none; }
noscript .wrap { padding: 20px; }

/* ---------- responzivno ---------- */
@media (max-width: 960px) {
  .topic-layout { grid-template-columns: minmax(0, 1fr); }
  .topic-timeline { display: none; }
  .cat-layout { grid-template-columns: 1fr; }
  .c-fields { grid-template-columns: 1fr 1fr; }
  .c-fields .c-title { grid-column: 1 / -1; }
}
@media (max-width: 720px) {
  .wrap { padding: 0 12px; }
  .mainsite-brand { display: none; }
  .header-inner { gap: 10px; height: 56px; }
  .logo-text { display: none; }
  .header-search input::placeholder { color: transparent; }
  .header-actions .btn { padding: 0 10px; }
  .topic-list thead, .col-posters, .topic-list .col-num { display: none; }
  .tr-mobile { display: flex; }
  .topic-list td { padding: 12px; }
  .post { grid-template-columns: minmax(0, 1fr); }
  .header-search { min-width: 0; }
  .header-actions .btn.primary[data-action=signup] { display: none; }
  .header-actions { flex-shrink: 0; }
  .topic-map { gap: 6px 14px; }
  .tm-avatars { margin-left: 0; }
  .post-avatar { display: none; }
  .topic-map, .solution-box, .topic-footer { margin-left: 0; }
  .topic-title { font-size: 22px; }
  .composer { height: 70vh; border-radius: 0; }
  .c-body { grid-template-columns: 1fr; }
  .c-preview { display: none; }
  .composer.no-preview .c-preview { display: block; }
  .composer.no-preview .c-editor { display: none; }
  .c-help { display: none; }
  .c-fields { grid-template-columns: 1fr; }
  .profile-card { flex-direction: column; align-items: center; text-align: center; }
  .pc-info h1, .pc-meta { justify-content: center; }
  .summary-grid, .prefs, .two-col { grid-template-columns: 1fr; }
  .notif-menu { width: calc(100vw - 16px); }
  .inline-search input { width: 100%; }
  .pa-right .icon-btn { width: 32px; }
  .reply-btn { padding: 0 8px; }
  .tf-notif small { display: none; }
}
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } }

/* ---------- tko je online / članovi ---------- */
.online-box { margin-top: 24px; padding: 18px 20px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); }
.online-box:empty { display: none; }
.online-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 6px; }
.online-head h3 { margin: 0; font-size: 16px; display: flex; align-items: center; gap: 8px; }
.online-head a { font-size: 13px; font-weight: 600; }
.online-sum { margin: 0 0 12px; color: var(--text-2); }
.online-users { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; }
.online-user { display: inline-flex; align-items: center; gap: 7px; padding: 4px 10px 4px 4px; border: 1px solid var(--border); border-radius: 999px; background: var(--surface-2); color: var(--text); font-size: 13px; font-weight: 500; }
.online-user:hover { border-color: var(--primary); text-decoration: none; }
.online-user .role-badge { font-size: 10px; }
.online-stats { display: flex; flex-wrap: wrap; gap: 6px 22px; padding-top: 12px; border-top: 1px solid var(--border); font-size: 13px; color: var(--muted); }
.online-stats b { color: var(--text); }
.online-stats span { display: inline-flex; align-items: center; gap: 6px; }
.live-dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; background: #22c55e; box-shadow: 0 0 0 0 rgba(34, 197, 94, .55); animation: live-pulse 2s infinite; flex: none; }
.live-dot.sm { width: 7px; height: 7px; }
@keyframes live-pulse { 70% { box-shadow: 0 0 0 7px rgba(34, 197, 94, 0); } 100% { box-shadow: 0 0 0 0 rgba(34, 197, 94, 0); } }
.av-wrap { position: relative; display: inline-flex; }
.online-dot { position: absolute; right: -1px; bottom: -1px; width: 10px; height: 10px; border-radius: 50%; background: #22c55e; border: 2px solid var(--surface); }
.online-label { color: #16a34a; font-weight: 600; font-size: 13px; }
[data-theme="dark"] .online-label { color: #4ade80; }
.head-count { font-size: 16px; font-weight: 500; }
.members-tabs { margin: 0 0 14px; display: flex; flex-wrap: wrap; gap: 4px; }
.members-tabs a { display: inline-flex; align-items: center; gap: 7px; }
@media (prefers-reduced-motion: reduce) { .live-dot { animation: none; } }

/* ---------- gumb "Na vrh" ---------- */
.to-top {
  position: fixed; right: 22px; bottom: 22px; z-index: 60;
  display: inline-flex; align-items: center; gap: 6px;
  height: 44px; padding: 0 16px 0 13px; border-radius: 999px;
  border: 1px solid var(--border-strong); background: var(--surface); color: var(--text);
  font: inherit; font-size: 14px; font-weight: 600; cursor: pointer;
  box-shadow: var(--shadow-lg);
  opacity: 0; visibility: hidden; transform: translateY(12px);
  transition: opacity .2s, transform .2s, visibility .2s, background .15s, color .15s, border-color .15s;
}
.to-top.show { opacity: 1; visibility: visible; transform: none; }
.to-top:hover { background: var(--primary); border-color: var(--primary); color: var(--primary-ink); }
.to-top:focus-visible { outline: 2px solid var(--primary); outline-offset: 3px; }
body.composer-open .to-top { display: none; }
@media (max-width: 640px) {
  .to-top { right: 14px; bottom: 14px; width: 46px; height: 46px; padding: 0; justify-content: center; }
  .to-top span { display: none; }
}
@media (prefers-reduced-motion: reduce) { .to-top { transition: none; } }

/* ---------- privatne poruke ---------- */
.pm-list { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); }
.pm-item { display: grid; grid-template-columns: auto 1fr auto; gap: 14px; align-items: center; padding: 14px 18px; border-top: 1px solid var(--border); color: var(--text); }
.pm-item:first-child { border-top: 0; }
.pm-item:hover { background: var(--surface-2); text-decoration: none; }
.pm-item.unread { background: color-mix(in srgb, var(--primary) 7%, var(--surface)); }
.pm-item.unread .pm-subject { font-weight: 700; }
.pm-avatars { display: flex; }
.pm-avatars > * + * { margin-left: -8px; box-shadow: 0 0 0 2px var(--surface); border-radius: 50%; }
.pm-main { display: grid; gap: 2px; min-width: 0; }
.pm-subject { font-weight: 600; display: flex; align-items: center; gap: 8px; }
.pm-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--primary); flex: none; }
.pm-meta { font-size: 13px; color: var(--muted); }
.pm-last { font-size: 13px; color: var(--text-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pm-time { font-size: 13px; color: var(--muted); white-space: nowrap; }
.pm-note { margin-top: 12px; display: flex; align-items: center; gap: 6px; }
.card-box { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 18px; box-shadow: var(--shadow); }
.pm-form { display: grid; gap: 14px; max-width: 760px; }
.pm-form label { display: grid; gap: 6px; font-weight: 600; font-size: 14px; }
.pm-form input, .pm-form textarea, .pm-reply textarea { width: 100%; font: inherit; padding: 10px 12px; border: 1px solid var(--border-strong); border-radius: var(--radius-sm); background: var(--bg); color: var(--text); }
.pm-form input:focus, .pm-form textarea:focus, .pm-reply textarea:focus { outline: 2px solid var(--primary); outline-offset: -1px; }
.pm-actions { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.pm-head { margin-bottom: 18px; display: grid; gap: 4px; justify-items: start; }
.pm-head h1 { margin: 6px 0 0; font-size: 24px; letter-spacing: -.02em; }
.pm-head p { margin: 0 0 6px; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.pm-thread { display: grid; gap: 14px; margin-bottom: 18px; }
.pm-msg { display: flex; gap: 10px; align-items: flex-start; max-width: 82%; }
.pm-msg.mine { margin-left: auto; flex-direction: row-reverse; }
.pm-bubble { background: var(--surface); border: 1px solid var(--border); border-radius: 14px 14px 14px 4px; padding: 10px 14px; min-width: 0; box-shadow: var(--shadow); }
.pm-msg.mine .pm-bubble { background: color-mix(in srgb, var(--primary) 10%, var(--surface)); border-color: color-mix(in srgb, var(--primary) 35%, var(--border)); border-radius: 14px 14px 4px 14px; }
.pm-msg-head { display: flex; align-items: center; gap: 8px; font-size: 13px; margin-bottom: 4px; }
.pm-bubble .cooked > :first-child { margin-top: 0; }
.pm-bubble .cooked > :last-child { margin-bottom: 0; }
.pm-reply { display: grid; gap: 10px; position: sticky; bottom: 12px; }
@media (max-width: 640px) {
  .pm-item { grid-template-columns: auto 1fr; padding: 12px 14px; }
  .pm-time { grid-column: 2; }
  .pm-msg { max-width: 100%; }
}

/* ---------- mobilna donja traka, online stranica, kompaktni chat ---------- */
.m-only { display: none !important; }
.m-tabbar { display: none; }
.online-sum.big { font-size: 16px; margin: 0 0 16px; }
.online-list { display: grid; gap: 0; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); margin-bottom: 16px; overflow: hidden; }
.online-row { display: grid; grid-template-columns: auto 1fr auto; gap: 12px; align-items: center; padding: 12px 16px; border-top: 1px solid var(--border); }
.online-row:first-child { border-top: 0; }
.online-row-main { display: flex; align-items: center; flex-wrap: wrap; gap: 4px 8px; min-width: 0; }
.online-row-main small { width: 100%; }
.online-stats.card-box { margin-bottom: 14px; }
.pm-reply { display: grid; grid-template-columns: auto 1fr auto; gap: 10px; align-items: end; position: sticky; bottom: 12px; z-index: 5;
  background: var(--surface); border: 1px solid var(--border); border-radius: 14px; padding: 10px; box-shadow: var(--shadow-lg); }
.pm-reply textarea { resize: none; min-height: 42px; max-height: 40vh; line-height: 1.45; border-radius: 10px; }
.pm-send { height: 42px; }

@media (max-width: 720px) {
  .m-only { display: inline-flex !important; }
  .d-only { display: none !important; }
  .header-search { display: none; }
  .header-actions { margin-left: auto; gap: 2px; }
  .header-actions .icon-btn { width: 38px; height: 38px; }

  .m-tabbar {
    display: grid; grid-template-columns: repeat(5, 1fr);
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 65;
    padding: 6px 4px calc(6px + env(safe-area-inset-bottom));
    background: color-mix(in srgb, var(--surface) 92%, transparent);
    backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
    border-top: 1px solid var(--border);
  }
  .m-tabbar a { position: relative; display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 4px 0; color: var(--muted); font-size: 11px; font-weight: 600; border-radius: 10px; }
  .m-tabbar a:hover { text-decoration: none; }
  .m-tabbar a.active { color: var(--primary); }
  .m-tabbar a.active svg { transform: translateY(-1px); }
  .tb-badge { position: absolute; top: 0; left: calc(50% + 6px); min-width: 17px; height: 17px; padding: 0 4px; border-radius: 9px; background: var(--primary); color: var(--primary-ink); font-size: 10px; font-weight: 700; display: grid; place-items: center; box-shadow: 0 0 0 2px var(--surface); }
  .tb-badge.online { background: #22c55e; color: #fff; }
  body { padding-bottom: calc(64px + env(safe-area-inset-bottom)); }
  body.composer-open .m-tabbar { display: none; }
  .to-top { bottom: calc(76px + env(safe-area-inset-bottom)); }

  .pm-reply { bottom: calc(70px + env(safe-area-inset-bottom)); border-radius: 12px; padding: 8px; }
  .pm-send { width: 42px; padding: 0; justify-content: center; }
  .pm-send span { display: none; }
  .pm-head h1 { font-size: 21px; }
  .online-row { padding: 12px; }
}

/* ---------- profilne slike ---------- */
img.avatar { object-fit: cover; background: var(--surface-2); display: inline-block; max-width: none; flex-shrink: 0; aspect-ratio: 1; }
.av-xs { width: 20px; height: 20px; } .av-sm { width: 28px; height: 28px; } .av-md { width: 36px; height: 36px; }
.av-lg { width: 46px; height: 46px; } .av-xl { width: 110px; height: 110px; }
.avatar-pref .ap-row { display: flex; align-items: center; gap: 20px; flex-wrap: wrap; }
.ap-actions { display: grid; gap: 8px; justify-items: start; }
.ap-actions label.btn { cursor: pointer; }
.ap-preview img, .ap-preview .avatar { box-shadow: 0 0 0 4px var(--surface), 0 0 0 6px var(--border); }
.cropper { display: grid; gap: 14px; justify-items: center; }
#crop-canvas { border-radius: 12px; background: repeating-conic-gradient(var(--surface-2) 0 25%, var(--surface) 0 50%) 0 0 / 20px 20px; cursor: grab; touch-action: none; max-width: 100%; height: auto !important; aspect-ratio: 1; }
#crop-canvas:active { cursor: grabbing; }
.crop-zoom { display: flex; align-items: center; gap: 10px; width: 280px; max-width: 100%; color: var(--muted); }
.crop-zoom input { flex: 1; accent-color: var(--primary); }
.cropper .form-actions { width: 100%; justify-content: center; }

/* ---------- značke ---------- */
.badge-chip { --bc: #b45309; display: inline-flex; align-items: center; gap: 4px; padding: 2px 8px; border-radius: 999px; font-size: 12px; font-weight: 600; line-height: 1.5;
  color: var(--bc); background: color-mix(in srgb, var(--bc) 13%, transparent); border: 1px solid color-mix(in srgb, var(--bc) 35%, transparent); white-space: nowrap; }
.badge-chip.sm { font-size: 11px; padding: 0 7px; }
.badge-chip:hover { text-decoration: none; background: color-mix(in srgb, var(--bc) 22%, transparent); }
.tier-gold { --bc: #ca8a04; } .tier-silver { --bc: #64748b; } .tier-bronze { --bc: #b45309; }
[data-theme="dark"] .tier-gold { --bc: #facc15; } [data-theme="dark"] .tier-silver { --bc: #cbd5e1; } [data-theme="dark"] .tier-bronze { --bc: #fb923c; }
.pc-badges { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 6px 0 4px; }
.badge-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 12px; margin-bottom: 22px; }
.badge-card { --bc: #b45309; display: flex; gap: 12px; align-items: flex-start; padding: 14px 16px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); }
.badge-card.earned { border-color: color-mix(in srgb, var(--bc) 45%, var(--border)); }
.badge-card.locked { opacity: .55; filter: grayscale(1); }
.badge-card.flash { outline: 2px solid var(--bc); outline-offset: 2px; }
.bc-icon { flex: none; width: 42px; height: 42px; border-radius: 50%; display: grid; place-items: center; color: var(--bc); background: color-mix(in srgb, var(--bc) 15%, transparent); border: 2px solid color-mix(in srgb, var(--bc) 45%, transparent); }
.badge-card b { display: block; }
.badge-card small { display: block; color: var(--text-2); font-size: 13px; line-height: 1.4; }
.badge-card small.bc-date { color: var(--muted); font-size: 12px; margin-top: 4px; }
.badge-tier-title { display: flex; align-items: center; gap: 8px; margin: 18px 0 10px; font-size: 16px; }
.badge-tier-title::before { content: ""; width: 12px; height: 12px; border-radius: 50%; background: var(--bc); }
@media (max-width: 720px) { .post-head .badge-chip span { display: none; } .post-head .badge-chip { padding: 2px 5px; } }

.ap-actions label.btn { display: inline-flex; align-items: center; gap: 6px; }
.col-posters { min-width: 96px; }

/* ---- emoji, slike u objavama, učitavanje ---- */
.cooked .emoji { font-size: 1.25em; line-height: 1; vertical-align: -0.12em; font-family: "Apple Color Emoji", "Segoe UI Emoji", "Noto Color Emoji", sans-serif; }
.cooked img:not(.avatar) { max-height: 640px; object-fit: contain; display: inline-block; margin: 4px 0; border: 1px solid var(--border); background: var(--surface-2); }
.cooked p > img:only-child { display: block; }
.drop-hover { outline: 2px dashed var(--primary) !important; outline-offset: -4px; }
.emoji-pop { position: fixed; z-index: 1000; max-height: 320px; overflow-y: auto; background: var(--surface); border: 1px solid var(--border); border-radius: 12px; box-shadow: var(--shadow-lg); padding: 8px; }
.emoji-title { font-size: 12px; color: var(--muted); font-weight: 600; margin: 6px 4px 4px; }
.emoji-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(36px, 1fr)); }
.emoji-grid button { border: 0; background: transparent; font-size: 22px; height: 36px; border-radius: 8px; cursor: pointer; font-family: "Apple Color Emoji", "Segoe UI Emoji", "Noto Color Emoji", sans-serif; }
.emoji-grid button:hover { background: var(--primary-soft); }
.mini-tools { display: flex; gap: 2px; align-self: end; }
.mini-tools .btn { width: 36px; height: 42px; padding: 0; justify-content: center; border: 0; background: transparent; color: var(--text-2); }
.mini-tools .btn:hover { background: var(--surface-2); color: var(--primary); }
.pm-actions .mini-tools .btn { height: 36px; }
@media (max-width: 720px) { .mini-tools .btn { width: 32px; } .emoji-grid button { font-size: 24px; height: 40px; } }

/* mobitel: kartice objava */
@media (max-width: 720px) {
  #posts { gap: 10px; }
  .post { grid-template-columns: 36px minmax(0, 1fr); gap: 2px 10px; padding: 14px 14px 6px; border-radius: 12px; }
  .post-avatar .avatar.av-lg { width: 36px; height: 36px; }
  .post-avatar { display: block; }
  .post.first .cooked { font-size: 16px; }
  .post-actions .icon-btn { opacity: 1 !important; }
  .topic-map { padding: 10px 12px; }
  .tm-stat.muted { display: none; }
  .post-actions { gap: 4px; }
  .pa-right { gap: 0; flex-wrap: nowrap; margin-left: auto; }
  .post-actions .icon-btn { width: 32px; height: 32px; }
  .reply-btn { padding: 0 8px; margin-left: 2px; }
  .post-actions .rb-label { display: none; }
}

/* online avatari u zaglavlju popisa tema */
.th-main { display: flex; align-items: center; gap: 16px; }
.th-online { display: inline-flex; align-items: center; margin-left: auto; text-transform: none; letter-spacing: 0; font-weight: 500; }
.th-online:empty { display: none; }
.tho-label { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--muted); margin-right: 10px; }
.tho-av { position: relative; display: inline-flex; margin-left: 6px; border-radius: 50%; box-shadow: 0 0 0 2px var(--surface); transition: transform .15s; }
.tho-av:first-of-type { margin-left: 0; }
.tho-av:hover { transform: translateY(-2px); z-index: 1; text-decoration: none; }
.tho-av::after { content: ''; position: absolute; right: -1px; bottom: -1px; width: 8px; height: 8px; border-radius: 50%; background: #22c55e; box-shadow: 0 0 0 2px var(--surface); }
.tho-more { margin-left: 6px; font-size: 12.5px; font-weight: 600; color: var(--muted); background: var(--surface-2); border: 1px solid var(--border); border-radius: 999px; padding: 1px 8px; }
.tho-more:hover { color: var(--primary); text-decoration: none; }

/* ---- isticanje koda (highlight.js) — svijetla tema ---- */
:root {
  --code-bg: #f6f8fa; --code-fg: #1f2328; --code-border: #d8dee4; --code-bar: #eef1f4; --code-muted: #8c959f;
  --hl-kw: #cf222e; --hl-str: #0a3069; --hl-com: #6e7781; --hl-num: #0550ae; --hl-fn: #8250df; --hl-type: #953800; --hl-prop: #0550ae;
  --hl-var: #953800; --hl-tag: #116329; --hl-attr: #0550ae; --hl-lit: #0550ae; --hl-re: #116329; --hl-op: #cf222e; --hl-sel: #6639ba; --hl-punc: #57606a; --hl-deco: #8250df;
}
/* tamna tema — boje kao VS Code (Dark+) */
[data-theme="dark"] {
  --code-bg: #1e1e1e; --code-fg: #d4d4d4; --code-border: #2d2d2d; --code-bar: #252526; --code-muted: #858585;
  --hl-kw: #569cd6; --hl-str: #ce9178; --hl-com: #6a9955; --hl-num: #b5cea8; --hl-fn: #dcdcaa; --hl-type: #4ec9b0; --hl-prop: #9cdcfe;
  --hl-var: #9cdcfe; --hl-tag: #569cd6; --hl-attr: #9cdcfe; --hl-lit: #569cd6; --hl-re: #d16969; --hl-op: #d4d4d4; --hl-sel: #d7ba7d; --hl-punc: #a9a9a9; --hl-deco: #dcdcaa;
}
.hl-kw { color: var(--hl-kw); } .hl-str { color: var(--hl-str); } .hl-com { color: var(--hl-com); font-style: italic; }
.hl-num { color: var(--hl-num); } .hl-fn { color: var(--hl-fn); } .hl-type { color: var(--hl-type); } .hl-prop { color: var(--hl-prop); }
.hl-var { color: var(--hl-var); } .hl-tag { color: var(--hl-tag); } .hl-attr { color: var(--hl-attr); } .hl-lit { color: var(--hl-lit); }
.hl-re { color: var(--hl-re); } .hl-op { color: var(--hl-op); } .hl-sel { color: var(--hl-sel); } .hl-punc { color: var(--hl-punc); } .hl-deco { color: var(--hl-deco); }
[data-theme="dark"] .hl-kw { color: #c586c0; } [data-theme="dark"] .hl-lit, [data-theme="dark"] .hl-tag { color: #569cd6; }

.code-block { position: relative; margin: 0 0 14px; border: 1px solid var(--code-border); border-radius: var(--radius-sm); overflow: hidden; background: var(--code-bg); }
.code-block pre { margin: 0 !important; border: 0 !important; border-radius: 0 !important; }
.code-bar { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 4px 6px 4px 14px; background: var(--code-bar); border-bottom: 1px solid var(--code-border); font-size: 12px; }
.code-lang { font-family: var(--font-mono, ui-monospace, SFMono-Regular, Menlo, Consolas, monospace); font-weight: 600; letter-spacing: .02em; color: var(--code-muted); text-transform: none; }
.code-copy { display: inline-flex; align-items: center; gap: 6px; border: 0; background: transparent; color: var(--code-muted); font: inherit; font-weight: 600; padding: 5px 9px; border-radius: 6px; cursor: pointer; }
.code-copy:hover { background: color-mix(in srgb, var(--code-fg) 10%, transparent); color: var(--code-fg); }
.code-copy.ok { color: #16a34a; }
[data-theme="dark"] .code-copy.ok { color: #4ade80; }
.code-block.with-lines pre { display: flex; padding-left: 0; }
.code-block.with-lines pre code { flex: 1; padding-left: 14px; }
.code-lines { flex: none; text-align: right; padding: 0 12px 0 14px; color: var(--code-muted); opacity: .7; border-right: 1px solid var(--code-border); user-select: none; -webkit-user-select: none; white-space: pre; }
@media (max-width: 720px) {
  .code-copy span { display: none; }
  .code-copy { padding: 7px 10px; }
  .code-lines { padding: 0 8px 0 10px; }
}

/* ---- zaboravljena lozinka, e-mail postavke ---- */
.auth-page { max-width: 460px; margin: 40px auto; padding: 28px; }
.auth-page h1 { display: flex; align-items: center; gap: 10px; font-size: 1.5rem; margin: 0 0 10px; }
.pill.ok { background: color-mix(in srgb, var(--ok) 14%, transparent); color: var(--ok); border-color: transparent; }
.danger-text { color: var(--danger); }
.env-list { background: var(--surface-2); border: 1px solid var(--border); border-radius: 8px; padding: 10px 14px; font-size: 13px; overflow-x: auto; }
#pref-mail h3 { display: flex; align-items: center; gap: 8px; scroll-margin-top: 90px; }
#pref-mail .check { margin: 4px 0; }

/* ---- ankete ---- */
.poll-wrap { margin: 14px 0 4px; }
.poll { border: 1px solid var(--border); border-radius: 12px; background: var(--surface-2); padding: 16px 18px; }
.poll.closed { opacity: .92; }
.poll-head { display: flex; gap: 12px; align-items: flex-start; margin-bottom: 14px; }
.poll-ic { flex: none; display: grid; place-items: center; width: 36px; height: 36px; border-radius: 10px; background: var(--primary-soft); color: var(--primary); }
.poll-q { font-weight: 700; font-size: 16.5px; line-height: 1.35; }
.poll-meta { font-size: 13px; color: var(--muted); margin-top: 2px; }
.poll-form { display: grid; gap: 8px; }
.poll-opt { position: relative; overflow: hidden; display: flex; align-items: center; gap: 10px; padding: 10px 12px; border: 1px solid var(--border); border-radius: 10px; background: var(--surface); cursor: pointer; transition: border-color .15s, background .15s; }
.poll-opt:hover { border-color: var(--primary); }
.poll-opt:has(input:checked) { border-color: var(--primary); background: var(--primary-soft); }
.poll-opt > * { position: relative; }
.poll-opt > .pr-fill { position: absolute; }
.poll-opt input { accent-color: var(--primary); width: 17px; height: 17px; margin: 0; flex: none; }
.poll-opt span { flex: 1; }
.poll-actions { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-top: 4px; }
.poll-results { display: grid; gap: 8px; }
.poll-res { position: relative; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 12px; border-radius: 10px; background: var(--surface); border: 1px solid var(--border); overflow: hidden; min-height: 42px; }
.pr-fill { position: absolute; inset: 0 auto 0 0; background: color-mix(in srgb, var(--primary) 14%, transparent); border-right: 2px solid color-mix(in srgb, var(--primary) 40%, transparent); transition: width .6s cubic-bezier(.2, .8, .2, 1); }
.poll-res.top .pr-fill { background: color-mix(in srgb, var(--primary) 24%, transparent); }
.poll-res.mine { border-color: var(--primary); }
.poll-res.mine .pr-text { font-weight: 600; }
.poll-res.mine .pr-text svg { color: var(--primary); vertical-align: -2px; }
.pr-text, .pr-num { position: relative; }
.pr-num { white-space: nowrap; font-size: 14px; }
.pr-num small { color: var(--muted); margin-left: 4px; }
.pr-voters { display: flex; flex-wrap: wrap; gap: 3px; margin: -2px 0 2px 10px; }
.poll-foot { display: flex; align-items: center; gap: 4px 12px; flex-wrap: wrap; margin-top: 10px; }
.poll-foot:empty { display: none; }
.st-ic.poll-ic { width: auto; height: auto; background: none; border-radius: 0; font-size: 14px; margin-right: 3px; vertical-align: -1px; }
/* uređivač ankete */
.c-poll-btn { display: inline-flex !important; align-items: center; gap: 5px; width: auto !important; padding: 0 9px !important; font-weight: 600; color: var(--primary) !important; }
.c-poll-chip { display: inline-flex; align-items: center; gap: 6px; font-size: 13.5px; background: var(--primary-soft); border-radius: 999px; padding: 3px 4px 3px 12px; max-width: 100%; }
.c-poll-chip b { max-width: 260px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.poll-builder .pb-opt { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.poll-builder .pb-opt input { flex: 1; }
.pb-num { width: 22px; text-align: right; color: var(--muted); font-size: 13px; }
.pb-opts-label { font-weight: 600; font-size: 14px; margin: 6px 0 8px; }
.pb-settings { display: grid; gap: 8px; margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--border); }
.pb-date { max-width: 260px; margin-left: 26px; }
.pb-date:disabled { opacity: .5; }
/* bodovi reputacije uz ime */
.rep-chip { display: inline-flex; align-items: center; gap: 3px; font-size: 11.5px; font-weight: 700; color: #b45309; background: #fef3c7; border-radius: 999px; padding: 1px 7px; }
.rep-chip:hover { text-decoration: none; filter: brightness(.97); }
.rep-chip svg { fill: currentColor; }
[data-theme="dark"] .rep-chip { color: #fbbf24; background: rgba(251, 191, 36, .14); }
@media (max-width: 720px) { .c-poll-btn span { display: none; } .poll { padding: 14px; } }

/* ---- Top majstori ---- */
.leaderboard { max-width: 980px; margin: 0 auto; }
.lb-hero { display: flex; gap: 20px; align-items: flex-start; justify-content: space-between; flex-wrap: wrap; margin-bottom: 16px; }
.lb-hero h1 { margin: 0 0 6px; }
.lb-hero p { max-width: 640px; margin: 0; line-height: 1.6; }
.lb-me { display: grid; gap: 2px; text-align: right; background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 10px 16px; min-width: 170px; }
.lb-me b { font-size: 1.5rem; color: #b45309; display: inline-flex; align-items: center; gap: 6px; justify-content: flex-end; }
.lb-me b svg { fill: currentColor; }
[data-theme="dark"] .lb-me b { color: #fbbf24; }
.lb-me small, .lb-me span { color: var(--muted); font-size: 13px; }
.lb-filters { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 18px; }
.lb-cat { max-width: 240px; }
.lb-podium { display: grid; grid-template-columns: 1fr 1.15fr 1fr; gap: 14px; align-items: end; margin-bottom: 18px; }
.lb-place { display: flex; flex-direction: column; align-items: center; gap: 6px; text-align: center; background: var(--surface); border: 1px solid var(--border); border-radius: 16px; padding: 22px 14px 18px; color: inherit; position: relative; transition: transform .15s, box-shadow .15s; }
.lb-place:hover { transform: translateY(-3px); box-shadow: var(--shadow); text-decoration: none; }
.lb-place.p1 { order: 2; padding-top: 30px; border-color: #f59e0b; box-shadow: 0 0 0 3px rgba(245, 158, 11, .15); background: linear-gradient(180deg, rgba(245, 158, 11, .10), var(--surface) 60%); }
.lb-place.p2 { order: 1; border-color: #94a3b8; }
.lb-place.p3 { order: 3; border-color: #d97706; }
.lb-place .avatar.av-xl { width: 76px; height: 76px; }
.lb-place.p1 .avatar.av-xl { width: 92px; height: 92px; }
.lb-medal { font-size: 30px; line-height: 1; position: absolute; top: -16px; }
.lb-name { font-size: 1.05rem; }
.lb-points { display: inline-flex; align-items: center; gap: 5px; font-weight: 800; font-size: 1.25rem; color: #b45309; }
.lb-points svg { fill: currentColor; }
.lb-points small { font-weight: 500; font-size: 12px; color: var(--muted); }
[data-theme="dark"] .lb-points { color: #fbbf24; }
.lb-bd { display: inline-flex; align-items: center; gap: 4px; font-size: 12.5px; color: var(--muted); }
.lb-bd .sep { opacity: .5; }
.lb-table .user-cell { display: flex; align-items: center; gap: 8px; }
.lb-mine td { background: var(--primary-soft); }
.lb-hall { margin-top: 18px; }
.lb-hall h3 { display: flex; align-items: center; gap: 8px; }
.lb-hall-row { display: flex; align-items: center; gap: 8px; padding: 6px 0; }
.pc-rep { display: grid; text-align: center; background: #fef3c7; border-radius: 10px; color: #92400e !important; }
.pc-rep b { display: inline-flex; align-items: center; justify-content: center; gap: 4px; color: #b45309; }
.pc-rep b svg { fill: currentColor; }
.pc-rep:hover { text-decoration: none; filter: brightness(.97); }
[data-theme="dark"] .pc-rep { background: rgba(251, 191, 36, .12); color: #fcd34d !important; }
[data-theme="dark"] .pc-rep b { color: #fbbf24; }
@media (max-width: 720px) {
  .lb-podium { grid-template-columns: 1fr; gap: 22px; }
  .lb-place.p1, .lb-place.p2, .lb-place.p3 { order: 0; }
  .lb-me { text-align: left; width: 100%; }
  .lb-me b { justify-content: flex-start; }
  .lb-cat { max-width: none; width: 100%; }
}
.pc-stats > .pc-rep { padding: 12px; border-radius: 0; }
.poll-opt .pr-num { flex: none; margin-left: auto; }
.lb-cat { appearance: none; -webkit-appearance: none; font: inherit; font-size: 14px; color: var(--text); background: var(--surface) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%2364748b' stroke-width='2.5'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") no-repeat right 12px center; border: 1px solid var(--border); border-radius: 10px; padding: 8px 34px 8px 12px; min-width: 200px; cursor: pointer; }
.lb-cat:focus { outline: 2px solid var(--primary); outline-offset: 1px; }

/* ---- aplikacija (PWA) ---- */
.app-banner { position: fixed; left: 50%; transform: translateX(-50%); bottom: 18px; z-index: 900; display: flex; align-items: center; gap: 10px; width: min(560px, calc(100% - 24px));
  background: var(--surface); border: 1px solid var(--border); border-left: 4px solid var(--primary); border-radius: 12px; box-shadow: var(--shadow-lg); padding: 10px 10px 10px 14px; animation: ab-in .35s ease-out; }
@keyframes ab-in { from { opacity: 0; transform: translate(-50%, 14px); } }
.ab-ic { color: var(--primary); display: grid; place-items: center; flex: none; }
.ab-text { flex: 1; font-size: 14px; line-height: 1.4; }
@media (max-width: 720px) { .app-banner { bottom: calc(70px + env(safe-area-inset-bottom)); } }
.install-help ol { padding-left: 20px; line-height: 1.7; }
.ios-share { display: inline-grid; place-items: center; width: 22px; height: 22px; border: 1.5px solid currentColor; border-radius: 5px; font-size: 12px; }
#pref-push h3 { display: flex; align-items: center; gap: 8px; scroll-margin-top: 90px; }
.pref-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin: 4px 0 8px; }
.dev-chip { display: inline-block; background: var(--surface-2); border: 1px solid var(--border); border-radius: 999px; padding: 1px 9px; margin: 3px 4px 0 0; }
/* aplikacija otvorena s početnog zaslona: prostor za izrez/statusnu traku */
@media (display-mode: standalone) { body { padding-top: env(safe-area-inset-top); } }

/* ---- prijava preko GitHuba / Googlea ---- */
.oauth-btns { display: grid; gap: 8px; margin: 4px 0 2px; }
.oauth-btn { display: flex !important; align-items: center; justify-content: center; gap: 10px; width: 100%; padding: 11px 14px; font-weight: 600; border-radius: 10px; text-decoration: none !important; }
.oauth-btn.github { background: #1f2328; color: #fff; border: 1px solid #1f2328; }
.oauth-btn.github:hover { background: #32383f; }
[data-theme="dark"] .oauth-btn.github { background: #f0f3f6; color: #1f2328; border-color: #f0f3f6; }
.oauth-btn.google { background: #fff; color: #1f1f1f; border: 1px solid #dadce0; }
.oauth-btn.google:hover { background: #f8f9fa; }
.oauth-complete .oc-head { display: flex; align-items: center; gap: 14px; margin-bottom: 8px; }
.oc-avatar { width: 64px; height: 64px; border-radius: 50%; object-fit: cover; flex: none; }
.oc-prov { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: var(--muted); }
.oauth-complete h1 { margin: 2px 0 0; }
.oauth-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 10px 0; border-top: 1px solid var(--border); }
.oauth-row .oauth-name { display: inline-flex; align-items: center; gap: 8px; min-width: 110px; }
.oauth-row .btn { margin-left: auto; }
#pref-oauth h3 { display: flex; align-items: center; gap: 8px; scroll-margin-top: 90px; }
.gh-link { display: inline-flex; align-items: center; gap: 5px; }
.gh-link svg { width: 14px; height: 14px; }

/* ---- slične teme ---- */
.c-similar { margin: 0 14px 8px; border: 1px solid color-mix(in srgb, var(--primary) 35%, var(--border)); background: color-mix(in srgb, var(--primary) 5%, var(--surface)); border-radius: 10px; padding: 8px 10px; max-height: 150px; overflow-y: auto; }
.sim-head { display: flex; align-items: center; gap: 6px; font-size: 13.5px; margin-bottom: 4px; flex-wrap: wrap; }
.sim-head svg { color: var(--primary); }
.sim-head .muted { font-size: 12.5px; }
.sim-x { margin-left: auto; }
.sim-list { display: grid; }
.sim-item { display: grid; gap: 2px; padding: 7px 8px; border-radius: 8px; color: var(--text); }
.sim-item:hover { background: var(--surface-2); text-decoration: none; }
.sim-title { font-weight: 600; font-size: 14px; line-height: 1.35; }
.sim-solved { display: inline-flex; align-items: center; gap: 3px; font-size: 11.5px; font-weight: 700; color: var(--ok); background: color-mix(in srgb, var(--ok) 12%, transparent); border-radius: 999px; padding: 1px 7px; margin-right: 6px; vertical-align: 1px; }
.sim-meta { display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--muted); flex-wrap: wrap; }
.search-empty { text-align: left; }
.search-empty > p:first-child { font-weight: 600; }
.sim-box { border: 1px solid var(--border); border-radius: 12px; padding: 10px 12px; margin: 10px 0 16px; background: var(--surface); text-align: left; }
@media (max-width: 720px) { .c-similar { margin: 0 10px 6px; max-height: 150px; } .sim-head .muted { display: none; } }
.sim-stat-grid { margin: 8px 0; } .stat.good b { color: var(--ok); }

/* ---- praćenje ---- */
.tag-header { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.tag-header #tag-follow { display: inline-flex; align-items: center; gap: 10px; margin-left: auto; }
.foryou-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 10px 14px; margin-bottom: 12px; font-size: 14px; }
.foryou-head b { display: inline-flex; align-items: center; gap: 5px; color: var(--primary); }
.foryou-head b svg { fill: currentColor; }
.follow-counts { background: none; border: 0; padding: 0; font: inherit; color: var(--text-2); cursor: pointer; }
.follow-counts:hover { color: var(--primary); }
.interests h4 { margin: 14px 0 8px; font-size: 14px; }
.int-chips { display: flex; flex-wrap: wrap; gap: 7px; }
.int-chip { display: inline-flex; align-items: center; gap: 5px; border: 1px solid var(--border); background: var(--surface); color: var(--text); border-radius: 999px; padding: 6px 12px; font: inherit; font-size: 13.5px; cursor: pointer; transition: all .15s; }
.int-chip small { color: var(--muted); font-size: 11px; }
.int-chip:hover { border-color: var(--primary); text-decoration: none; }
.int-chip.on { background: var(--primary); border-color: var(--primary); color: #fff; }
.int-chip.on small { color: rgba(255, 255, 255, .8); }
.interests .form-actions { margin-top: 18px; }
.follow-list .fl-row { display: flex; align-items: center; gap: 10px; padding: 8px 4px; border-bottom: 1px solid var(--border); color: var(--text); }
.follow-list .fl-row:hover { background: var(--surface-2); text-decoration: none; }
#pref-follow h3 { display: flex; align-items: center; gap: 8px; }

/* ---- IT poslovi ---- */
.jobs { max-width: 1000px; margin: 0 auto; }
.jobs-hero { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin: 6px 0 14px; }
.jobs-hero h1 { margin: 0 0 4px; }
.jobs-filters { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 10px; }
.jobs-filters select { font: inherit; font-size: 14px; padding: 7px 10px; border: 1px solid var(--border); border-radius: 10px; background: var(--surface); color: var(--text); }
.jobs-techs { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 14px; }
.job-tech { display: inline-flex; align-items: center; gap: 4px; font-size: 12.5px; font-weight: 600; font-family: var(--font-mono, ui-monospace, Menlo, monospace); color: #1d4ed8; background: #dbeafe; border-radius: 6px; padding: 2px 8px; }
.job-tech small { opacity: .7; font-weight: 500; }
.job-tech:hover { text-decoration: none; filter: brightness(.96); }
.job-tech.on { background: #1d4ed8; color: #fff; }
[data-theme="dark"] .job-tech { color: #93c5fd; background: rgba(59, 130, 246, .16); }
[data-theme="dark"] .job-tech.on { background: #3b82f6; color: #fff; }
.jobs-list { display: grid; gap: 10px; }
.job-item { display: flex; gap: 14px; justify-content: space-between; background: var(--surface); border: 1px solid var(--border); border-left: 4px solid #2563eb; border-radius: 12px; padding: 14px 16px; color: var(--text); transition: box-shadow .15s, transform .15s; }
.job-item:hover { text-decoration: none; box-shadow: var(--shadow); transform: translateY(-1px); }
.ji-title { font-size: 1.08rem; font-weight: 700; }
.ji-company { color: var(--text-2); font-weight: 600; margin: 1px 0 6px; }
.ji-side { display: grid; gap: 4px; align-content: start; text-align: right; color: var(--muted); white-space: nowrap; }
.job-meta { display: flex; flex-wrap: wrap; gap: 4px 16px; font-size: 13.5px; color: var(--text-2); margin-bottom: 6px; }
.job-meta span { display: inline-flex; align-items: center; gap: 5px; }
.job-meta svg { color: var(--muted); }
.job-meta .salary { color: #15803d; font-weight: 700; }
[data-theme="dark"] .job-meta .salary { color: #4ade80; }
.job-meta .remote { color: #7c3aed; }
.job-techs { display: flex; flex-wrap: wrap; gap: 5px; }
.jobs-rules { margin-top: 18px; }
.job-card { border: 1px solid color-mix(in srgb, #2563eb 35%, var(--border)); background: color-mix(in srgb, #2563eb 4%, var(--surface)); border-radius: 12px; padding: 14px 16px; margin: 0 0 14px; }
.job-card.inactive { opacity: .85; }
.job-company { display: flex; align-items: center; gap: 8px; font-size: 1.05rem; margin-bottom: 6px; }
.job-company svg { color: #2563eb; }
.job-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: 12px; }
.job-banner { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 13.5px; font-weight: 600; border-radius: 8px; padding: 8px 10px; margin-bottom: 10px; }
.job-banner.pending { background: var(--warn-soft); color: var(--warn); }
.job-banner.rejected { background: color-mix(in srgb, var(--danger) 12%, transparent); color: var(--danger); }
.job-banner.expired { background: var(--surface-2); color: var(--muted); }
.st-ic.job-ic { width: auto; height: auto; background: none; font-size: 14px; margin-right: 3px; }
.st-ic.job-ic:not(.active) { filter: grayscale(1); opacity: .6; }
.job-form-wrap { max-width: 820px; margin: 0 auto; }
.job-form-wrap h1 { margin: 8px 0 4px; }
#job-form .row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
#job-form .row3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 12px; }
.aj-item { margin-bottom: 10px; }
.aj-head { margin-bottom: 6px; }
@media (max-width: 720px) { #job-form .row2, #job-form .row3 { grid-template-columns: 1fr; } .job-item { flex-direction: column; } .ji-side { text-align: left; display: flex; gap: 10px; } }
.interests #int-tags { max-height: 230px; overflow-y: auto; padding: 2px; }
.interests #int-cats { max-height: 170px; overflow-y: auto; padding: 2px; }
.interests .form-actions { position: sticky; bottom: -1px; background: var(--surface); padding-top: 10px; }
