/* ==========================================================================
   Exclusive – dizajn sistem
   Osnova: tamna šljivasto-crna, malinasti akcenat, zlatna samo za kredite.
   Tipografija: Fraunces (italik, imena i naslovi) + Manrope (interfejs).
   ========================================================================== */

:root {
  --bg: #0e0c12;
  --bg-2: #131018;
  --surface: #191622;
  --surface-2: #221d2e;
  --surface-3: #2b2539;
  --line: rgba(255, 255, 255, .07);
  --line-strong: rgba(255, 255, 255, .14);
  --text: #f5f0f6;
  --muted: #a79db3;
  --faint: #6f6680;
  --rose: #ff4d8d;
  --rose-2: #ff7a9e;
  --rose-dim: rgba(255, 77, 141, .14);
  --peach: #ffb08a;
  --gold: #f2c66d;
  --gold-dim: rgba(242, 198, 109, .14);
  --green: #3ddc97;
  --green-dim: rgba(61, 220, 151, .14);
  --red: #ff5c6c;
  --red-dim: rgba(255, 92, 108, .14);
  --blue: #6aa7ff;
  --r-sm: 10px;
  --r: 16px;
  --r-lg: 22px;
  --r-pill: 999px;
  --font-ui: 'Manrope', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --font-display: 'Fraunces', Georgia, 'Times New Roman', serif;
  --topbar-h: 60px;
  --bottomnav-h: 64px;
  --shadow-pop: 0 20px 50px -20px rgba(0, 0, 0, .7);
  --ease: cubic-bezier(.2, .7, .2, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-ui);
  font-size: 15px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  min-height: 100dvh;
  padding-bottom: calc(var(--bottomnav-h) + env(safe-area-inset-bottom));
}
@media (min-width: 900px) { body { font-size: 16px; padding-bottom: 0; } }
body.chat-mode { padding-bottom: 0; height: 100dvh; overflow: hidden; }
body.team-mode, body.admin-mode { padding-bottom: 0; }

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
h1, h2, h3, h4 { margin: 0; font-weight: 600; line-height: 1.15; }
p { margin: 0 0 1em; }
p:last-child { margin-bottom: 0; }
small { font-size: 13px; color: var(--muted); }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--rose); outline-offset: 2px; border-radius: 4px; }
::selection { background: var(--rose); color: #fff; }

.wrap { width: 100%; max-width: 1120px; margin: 0 auto; padding: 0 16px; }
@media (min-width: 900px) { .wrap { padding: 0 24px; } }
.narrow { max-width: 640px; }
.ico { width: 20px; height: 20px; flex: 0 0 auto; }
.ico-sm { width: 16px; height: 16px; }
.muted { color: var(--muted); }
.faint { color: var(--faint); }
.gold { color: var(--gold); }
.green { color: var(--green); }
.red { color: var(--red); }
.row { display: flex; align-items: center; gap: 10px; }
.row-between { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.stack { display: flex; flex-direction: column; gap: 12px; }
.mt { margin-top: 16px; } .mt-lg { margin-top: 28px; } .mb { margin-bottom: 16px; }
.center { text-align: center; }

/* ---------- Tipografija ---------- */
.display {
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 600;
  letter-spacing: -.015em;
  font-variation-settings: 'opsz' 96;
}
.h1 { font-size: 32px; line-height: 1.08; }
.h2 { font-size: 24px; }
.h3 { font-size: 18px; font-weight: 700; font-family: var(--font-ui); font-style: normal; }
@media (min-width: 900px) { .h1 { font-size: 44px; } .h2 { font-size: 30px; } }
.lead { font-size: 17px; color: var(--muted); max-width: 52ch; }
.brand {
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 600;
  font-size: 26px;
  letter-spacing: -.02em;
  color: var(--text);
  display: inline-flex;
  align-items: baseline;
  gap: 2px;
}
.brand::after { content: ''; width: 7px; height: 7px; border-radius: 50%; background: var(--rose); margin-left: 1px; transform: translateY(-2px); }

/* ---------- Topbar ---------- */
.topbar {
  position: sticky; top: 0; z-index: 40;
  background: rgba(14, 12, 18, .82);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}
.topbar-inner { height: var(--topbar-h); display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.nav-desktop { display: none; gap: 4px; }
.nav-desktop a { padding: 8px 12px; border-radius: var(--r-pill); color: var(--muted); font-weight: 600; font-size: 14px; display: inline-flex; align-items: center; gap: 6px; }
.nav-desktop a:hover { color: var(--text); background: var(--surface); }
.nav-desktop a.is-active { color: var(--text); background: var(--surface-2); }
.topbar-actions { display: flex; align-items: center; gap: 8px; }
.nav-toggle { display: inline-flex; }
@media (min-width: 900px) { .nav-desktop { display: flex; } .nav-toggle { display: none; } }
.pill { display: inline-flex; align-items: center; justify-content: center; min-width: 20px; height: 20px; padding: 0 6px; border-radius: var(--r-pill); background: var(--rose); color: #fff; font-size: 11px; font-weight: 800; }

.credits-chip {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 7px 12px 7px 10px; border-radius: var(--r-pill);
  background: var(--gold-dim); color: var(--gold); font-weight: 800; font-size: 14px;
  border: 1px solid rgba(242, 198, 109, .25);
}
.credits-chip .ico { width: 18px; height: 18px; }

.iconbtn {
  width: 40px; height: 40px; border-radius: 50%; border: 0; background: transparent;
  color: var(--muted); display: inline-flex; align-items: center; justify-content: center;
}
.iconbtn:hover { background: var(--surface); color: var(--text); }
.iconbtn.is-primary { background: var(--rose); color: #fff; }
.iconbtn.is-primary:hover { background: var(--rose-2); }
.iconbtn:disabled { opacity: .45; cursor: not-allowed; }

/* ---------- Drawer (mobilni meni) ---------- */
.drawer-backdrop { position: fixed; inset: 0; background: rgba(0, 0, 0, .55); z-index: 50; }
.drawer {
  position: fixed; top: 0; right: 0; bottom: 0; width: min(88vw, 340px); z-index: 51;
  background: var(--bg-2); border-left: 1px solid var(--line); padding: 16px;
  display: flex; flex-direction: column; gap: 16px; overflow-y: auto;
  box-shadow: var(--shadow-pop);
}
.drawer-head { display: flex; align-items: center; justify-content: space-between; }
.drawer-user { display: flex; align-items: center; gap: 12px; padding: 12px; background: var(--surface); border-radius: var(--r); }
.drawer-nav { display: flex; flex-direction: column; gap: 4px; }
.drawer-nav a { display: flex; align-items: center; gap: 12px; padding: 12px; border-radius: var(--r-sm); font-weight: 600; }
.drawer-nav a:hover { background: var(--surface); }
.drawer-nav a.is-accent { color: var(--rose); }
.drawer-nav a.is-muted { color: var(--muted); margin-top: auto; }

/* ---------- Dugmad ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 12px 20px; border-radius: var(--r-pill); border: 1px solid transparent;
  font-weight: 700; font-size: 15px; line-height: 1; white-space: nowrap;
  transition: transform .15s var(--ease), background .15s, border-color .15s, opacity .15s;
}
.btn:active { transform: scale(.98); }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn-primary { background: var(--rose); color: #fff; }
.btn-primary:hover { background: var(--rose-2); }
.btn-gold { background: var(--gold); color: #2a1f05; }
.btn-gold:hover { filter: brightness(1.06); }
.btn-ghost { background: transparent; border-color: var(--line-strong); color: var(--text); }
.btn-ghost:hover { background: var(--surface); }
.btn-soft { background: var(--surface-2); color: var(--text); }
.btn-soft:hover { background: var(--surface-3); }
.btn-danger { background: var(--red-dim); color: var(--red); border-color: rgba(255, 92, 108, .3); }
.btn-sm { padding: 8px 14px; font-size: 13px; }
.btn-lg { padding: 15px 24px; font-size: 16px; }
.btn-block { width: 100%; }
.btn .ico { width: 18px; height: 18px; }

/* ---------- Forme ---------- */
.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 16px; }
.field label { font-weight: 600; font-size: 14px; }
.field .hint { font-size: 13px; color: var(--muted); }
.input, textarea.input, select.input {
  width: 100%; padding: 13px 14px; border-radius: 12px;
  background: var(--surface); border: 1px solid var(--line-strong); color: var(--text);
  transition: border-color .15s, background .15s;
}
.input:focus { outline: none; border-color: var(--rose); background: var(--surface-2); }
.input::placeholder { color: var(--faint); }
select.input { appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%); background-position: calc(100% - 20px) 50%, calc(100% - 15px) 50%; background-size: 5px 5px; background-repeat: no-repeat; padding-right: 36px; }
textarea.input { min-height: 96px; resize: vertical; }
.check { display: flex; gap: 12px; align-items: flex-start; padding: 14px; border-radius: 12px; background: var(--surface); border: 1px solid var(--line-strong); cursor: pointer; font-size: 14px; line-height: 1.45; }
.check input { width: 18px; height: 18px; margin: 2px 0 0; accent-color: var(--rose); flex: 0 0 auto; }
.check:has(input:checked) { border-color: var(--rose); }
.form-grid { display: grid; gap: 0 16px; grid-template-columns: 1fr; }
@media (min-width: 640px) { .form-grid { grid-template-columns: 1fr 1fr; } .form-grid .span-2 { grid-column: span 2; } }

/* ---------- Kartice, poruke, bedževi ---------- */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 20px; }
.card-tight { padding: 14px 16px; }
.flashes { margin-top: 14px; display: flex; flex-direction: column; gap: 8px; }
.flash { padding: 12px 14px; border-radius: 12px; font-weight: 600; font-size: 14px; }
.flash-success { background: var(--green-dim); color: var(--green); }
.flash-error { background: var(--red-dim); color: var(--red); }
.flash-info { background: var(--surface-2); color: var(--text); }
.notice { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border-radius: 12px; background: var(--surface); border: 1px solid var(--line); color: var(--muted); font-size: 13px; line-height: 1.5; }
.notice .ico { color: var(--rose); margin-top: 1px; }
.tag { display: inline-flex; align-items: center; gap: 5px; padding: 4px 10px; border-radius: var(--r-pill); font-size: 12px; font-weight: 700; line-height: 1.2; }
.tag-free { background: var(--gold); color: #2a1f05; }
.tag-gold { background: var(--gold-dim); color: var(--gold); }
.tag-green { background: var(--green-dim); color: var(--green); }
.tag-rose { background: var(--rose-dim); color: var(--rose); }
.tag-soft { background: var(--surface-2); color: var(--muted); }
.tag-red { background: var(--red-dim); color: var(--red); }
.status { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 600; color: var(--muted); }
.status::before { content: ''; width: 8px; height: 8px; border-radius: 50%; background: var(--faint); }
.status.is-online { color: var(--green); }
.status.is-online::before { background: var(--green); box-shadow: 0 0 0 3px var(--green-dim); }
.verified { color: var(--blue); }
.avatar { width: 44px; height: 44px; border-radius: 50%; background: var(--surface-2); display: inline-flex; align-items: center; justify-content: center; font-weight: 800; color: var(--muted); overflow: hidden; flex: 0 0 auto; }
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.avatar-sm { width: 36px; height: 36px; font-size: 14px; }
.avatar-lg { width: 96px; height: 96px; font-size: 32px; }
.avatar-xl { width: 128px; height: 128px; }

/* ---------- Naslovna: mreža modela ---------- */
.home-head { padding: 22px 0 14px; display: flex; flex-direction: column; gap: 8px; }
@media (min-width: 900px) { .home-head { padding: 40px 0 22px; flex-direction: row; align-items: flex-end; justify-content: space-between; } }
.online-now { color: var(--muted); font-size: 14px; }
.online-now b { color: var(--green); font-weight: 700; }

.models { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
@media (min-width: 640px) { .models { grid-template-columns: repeat(3, 1fr); gap: 16px; } }
@media (min-width: 1000px) { .models { grid-template-columns: repeat(4, 1fr); gap: 20px; } }

.model-card {
  position: relative; display: block; aspect-ratio: 3 / 4; border-radius: var(--r-lg);
  overflow: hidden; background: var(--surface); isolation: isolate;
}
.model-card img { width: 100%; height: 100%; object-fit: cover; transition: transform .7s var(--ease); }
.model-card:hover img { transform: scale(1.04); }
.model-card::after {
  content: ''; position: absolute; inset: 0; z-index: 1;
  background: linear-gradient(to top, rgba(14, 12, 18, .92) 0%, rgba(14, 12, 18, .35) 45%, rgba(14, 12, 18, 0) 70%);
}
.mc-tags { position: absolute; top: 10px; left: 10px; right: 10px; z-index: 2; display: flex; justify-content: space-between; align-items: flex-start; gap: 6px; }
.mc-tags .tag { font-size: 11px; padding: 4px 8px; }
.mc-tags .status { font-size: 11px; padding: 4px 8px; border-radius: var(--r-pill); background: rgba(14, 12, 18, .62); color: var(--text); white-space: nowrap; }
.mc-tags .status.is-online { color: var(--green); }
@media (max-width: 639px) { .mc-tags .tag .ico { display: none; } }
.mc-body { position: absolute; left: 0; right: 0; bottom: 0; z-index: 2; padding: 12px 14px 14px; }
.mc-name { font-family: var(--font-display); font-style: italic; font-weight: 600; font-size: 24px; letter-spacing: -.02em; line-height: 1.05; display: flex; align-items: center; gap: 6px; }
.mc-name .verified .ico { width: 18px; height: 18px; }
.mc-handle { color: var(--muted); font-size: 13px; margin-top: 2px; }
.mc-foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 8px; font-size: 12px; }
.mc-price { color: var(--gold); font-weight: 700; white-space: nowrap; }
@media (max-width: 639px) { .mc-foot .muted { display: none; } .mc-name { font-size: 21px; } }
.model-placeholder { width: 100%; height: 100%; background: radial-gradient(120% 90% at 30% 20%, var(--surface-3), var(--surface)); display: flex; align-items: center; justify-content: center; }
.model-placeholder .display { font-size: 64px; color: var(--surface-3); }

/* ---------- Profil modela ---------- */
.profile-hero { position: relative; margin: 16px 0 0; border-radius: var(--r-lg); overflow: hidden; background: var(--surface); }
.profile-hero-img { aspect-ratio: 4 / 5; }
@media (min-width: 640px) { .profile-hero-img { aspect-ratio: 16 / 9; } }
.profile-hero-img img { width: 100%; height: 100%; object-fit: cover; object-position: center 20%; }
.profile-hero::after { content: ''; position: absolute; inset: 0; background: linear-gradient(to top, rgba(14, 12, 18, .96) 0%, rgba(14, 12, 18, .2) 50%, transparent 75%); }
.profile-hero-body { position: absolute; left: 0; right: 0; bottom: 0; padding: 18px; z-index: 1; }
@media (min-width: 640px) { .profile-hero-body { padding: 26px; display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; } }
.profile-name { font-size: 40px; display: flex; align-items: center; gap: 8px; }
@media (min-width: 640px) { .profile-name { font-size: 52px; } }
.profile-name .verified .ico { width: 26px; height: 26px; }
.profile-meta { display: flex; gap: 14px; align-items: center; color: var(--muted); font-size: 14px; margin-top: 4px; flex-wrap: wrap; }
.profile-bio { margin-top: 14px; color: var(--muted); max-width: 60ch; }
.profile-cta { display: flex; gap: 10px; margin-top: 16px; flex-wrap: wrap; }
@media (min-width: 640px) { .profile-cta { margin-top: 0; } }

.gallery-head { display: flex; align-items: baseline; justify-content: space-between; margin: 28px 0 12px; }
.gallery { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; }
@media (min-width: 640px) { .gallery { grid-template-columns: repeat(3, 1fr); gap: 12px; } }
@media (min-width: 1000px) { .gallery { grid-template-columns: repeat(4, 1fr); } }
.g-item { position: relative; aspect-ratio: 1; border-radius: var(--r); overflow: hidden; background: var(--surface); border: 0; padding: 0; text-align: left; width: 100%; }
.g-item img { width: 100%; height: 100%; object-fit: cover; }
.g-item.is-locked { background: radial-gradient(120% 80% at 30% 20%, var(--surface-3), var(--surface-2)); border: 1px solid var(--line-strong); }
.g-lock { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; color: var(--text); }
.g-lock .ico { width: 26px; height: 26px; color: var(--gold); }
.g-lock b { font-size: 13px; background: var(--gold-dim); padding: 4px 10px; border-radius: var(--r-pill); color: var(--gold); }
.g-lock small { font-size: 11px; color: var(--muted); }
.g-title { position: absolute; left: 0; right: 0; bottom: 0; padding: 8px 10px; font-size: 12px; font-weight: 600; background: linear-gradient(to top, rgba(14, 12, 18, .85), transparent); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.empty { padding: 36px 16px; text-align: center; color: var(--muted); border: 1px dashed var(--line-strong); border-radius: var(--r-lg); }

/* ---------- Auth ---------- */
.auth { min-height: calc(100dvh - var(--topbar-h)); display: flex; align-items: center; justify-content: center; padding: 24px 16px 40px; }
.auth-card { width: 100%; max-width: 420px; }
.auth-card .h2 { margin-bottom: 4px; }
.auth-card .lead { font-size: 15px; margin-bottom: 22px; }
.auth-foot { text-align: center; color: var(--muted); margin-top: 18px; font-size: 14px; }
.auth-foot a { color: var(--rose); font-weight: 700; }

/* ---------- Lista razgovora ---------- */
.conv-list { display: flex; flex-direction: column; gap: 6px; margin-top: 12px; }
.conv { display: flex; align-items: center; gap: 12px; padding: 12px; border-radius: var(--r); background: var(--surface); border: 1px solid transparent; }
.conv:hover { border-color: var(--line-strong); }
.conv.is-unread { border-color: rgba(255, 77, 141, .35); }
.conv-body { flex: 1; min-width: 0; }
.conv-top { display: flex; justify-content: space-between; gap: 8px; align-items: baseline; }
.conv-name { font-weight: 700; display: flex; align-items: center; gap: 6px; }
.conv-name .display { font-size: 18px; }
.conv-time { font-size: 12px; color: var(--faint); white-space: nowrap; }
.conv-preview { color: var(--muted); font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-top: 2px; }
.conv.is-unread .conv-preview { color: var(--text); font-weight: 600; }

/* ---------- Chat ---------- */
.chat { display: flex; flex-direction: column; height: 100dvh; max-width: 820px; margin: 0 auto; background: var(--bg); }
@media (min-width: 900px) { .chat { border-left: 1px solid var(--line); border-right: 1px solid var(--line); } }
.chat-head { height: var(--topbar-h); flex: 0 0 auto; display: flex; align-items: center; gap: 10px; padding: 0 10px 0 6px; border-bottom: 1px solid var(--line); background: var(--bg-2); }
.chat-head .avatar { width: 38px; height: 38px; }
.chat-head-body { flex: 1; min-width: 0; line-height: 1.2; }
.chat-head-name { font-weight: 800; display: flex; align-items: center; gap: 6px; }
.chat-head-name .display { font-size: 20px; }
.chat-head-name .verified .ico { width: 16px; height: 16px; }
.chat-notice { flex: 0 0 auto; font-size: 12px; color: var(--muted); padding: 7px 14px; text-align: center; background: var(--surface); border-bottom: 1px solid var(--line); display: flex; align-items: center; justify-content: center; gap: 6px; }
.chat-notice .ico { width: 14px; height: 14px; color: var(--faint); }
.chat-scroll { flex: 1 1 auto; overflow-y: auto; overscroll-behavior: contain; padding: 14px 12px 8px; -webkit-overflow-scrolling: touch; }
.chat-day { text-align: center; font-size: 12px; color: var(--faint); margin: 12px 0 8px; }
.msg { display: flex; flex-direction: column; margin-bottom: 6px; align-items: flex-start; animation: msg-in .25s var(--ease); }
.msg.me { align-items: flex-end; }
@keyframes msg-in { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .msg { animation: none; } .model-card img { transition: none; } }
.bubble { max-width: min(78%, 520px); padding: 10px 14px; border-radius: 20px; font-size: 15px; line-height: 1.45; word-wrap: break-word; overflow-wrap: anywhere; white-space: pre-wrap; }
.msg.them .bubble { background: var(--surface-2); border-bottom-left-radius: 6px; }
.msg.me .bubble { background: linear-gradient(135deg, var(--rose), #ff6f8f); color: #fff; border-bottom-right-radius: 6px; }
.bubble.has-media { padding: 4px; }
.bubble.has-media .bubble-text { padding: 8px 10px 6px; }
.media { position: relative; border-radius: 16px; overflow: hidden; background: var(--surface); }
.media img { width: 100%; max-height: 420px; object-fit: cover; }
.media.is-locked { width: min(72vw, 260px); aspect-ratio: 4 / 5; cursor: pointer; background: radial-gradient(120% 80% at 30% 20%, var(--surface-3), var(--surface-2)); border: 1px solid var(--line-strong); }
.media-lock { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; color: var(--text); }
.media-lock .ico { width: 30px; height: 30px; color: var(--gold); }
.media-lock-title { font-size: 13px; color: var(--muted); }
.media-lock .btn { background: var(--gold-dim); color: var(--gold); border: 1px solid rgba(242, 198, 109, .35); }
.msg-meta { font-size: 11px; color: var(--faint); margin: 3px 6px 0; display: flex; gap: 6px; }
.msg-meta .who { color: var(--muted); }
.composer { flex: 0 0 auto; display: flex; align-items: flex-end; gap: 6px; padding: 10px 10px calc(10px + env(safe-area-inset-bottom)); border-top: 1px solid var(--line); background: var(--bg-2); }
.composer textarea { flex: 1; min-height: 44px; max-height: 140px; padding: 11px 14px; border-radius: 22px; background: var(--surface); border: 1px solid var(--line-strong); resize: none; line-height: 1.4; }
.composer textarea:focus { outline: none; border-color: var(--rose); }
.composer-preview { display: flex; align-items: center; gap: 10px; padding: 8px 12px; border-top: 1px solid var(--line); background: var(--bg-2); font-size: 13px; color: var(--muted); }
.composer-preview img { width: 44px; height: 44px; object-fit: cover; border-radius: 8px; }
.composer-preview .lockopt { display: flex; align-items: center; gap: 8px; margin-left: auto; }
.composer-preview input[type=number] { width: 72px; padding: 6px 8px; border-radius: 8px; background: var(--surface); border: 1px solid var(--line-strong); }
.paywall { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 32px 20px; gap: 12px; }
.paywall .display { font-size: 30px; }
.load-more { display: block; margin: 0 auto 12px; }

/* ---------- Lightbox ---------- */
.lightbox { position: fixed; inset: 0; z-index: 90; background: rgba(6, 5, 9, .94); display: flex; align-items: center; justify-content: center; padding: 16px; }
.lightbox img { max-width: 100%; max-height: 92vh; border-radius: 12px; }
.lightbox .iconbtn { position: absolute; top: 12px; right: 12px; background: var(--surface); color: var(--text); }

/* ---------- Toast + modal ---------- */
.toasts { position: fixed; top: calc(var(--topbar-h) + 10px); left: 50%; transform: translateX(-50%); z-index: 100; display: flex; flex-direction: column; gap: 8px; width: min(92vw, 420px); pointer-events: none; }
.toast { padding: 12px 16px; border-radius: 12px; background: var(--surface-2); border: 1px solid var(--line-strong); box-shadow: var(--shadow-pop); font-weight: 600; font-size: 14px; pointer-events: auto; animation: msg-in .25s var(--ease); }
.toast-error { border-color: rgba(255, 92, 108, .4); color: var(--red); }
.toast-success { border-color: rgba(61, 220, 151, .4); color: var(--green); }
.modal { position: fixed; inset: 0; z-index: 95; background: rgba(6, 5, 9, .7); backdrop-filter: blur(6px); display: flex; align-items: flex-end; justify-content: center; padding: 12px; }
@media (min-width: 640px) { .modal { align-items: center; } }
.modal-card { width: 100%; max-width: 400px; background: var(--bg-2); border: 1px solid var(--line-strong); border-radius: var(--r-lg); padding: 22px; box-shadow: var(--shadow-pop); }
.modal-title { font-size: 20px; margin-bottom: 8px; }
.modal-body { color: var(--muted); font-size: 15px; }
.modal-body b { color: var(--gold); }
.modal-actions { display: flex; gap: 10px; justify-content: flex-end; margin-top: 20px; }

/* ---------- Donja navigacija (mobilni) ---------- */
.bottom-nav {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 40;
  height: calc(var(--bottomnav-h) + env(safe-area-inset-bottom));
  padding-bottom: env(safe-area-inset-bottom);
  background: rgba(14, 12, 18, .92); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border-top: 1px solid var(--line);
  display: grid; grid-template-columns: repeat(4, 1fr);
}
.bottom-nav a { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; color: var(--faint); font-size: 11px; font-weight: 700; }
.bottom-nav a.is-active { color: var(--rose); }
.bottom-nav .ico { width: 22px; height: 22px; }
.bottom-nav .dot { position: absolute; top: 10px; right: calc(50% - 16px); width: 8px; height: 8px; border-radius: 50%; background: var(--rose); }
@media (min-width: 900px) { .bottom-nav { display: none; } }

/* ---------- Footer ---------- */
.footer { margin-top: 48px; padding: 24px 0 32px; border-top: 1px solid var(--line); color: var(--faint); font-size: 13px; }
.footer-disclosure { display: flex; gap: 8px; align-items: flex-start; color: var(--muted); max-width: 70ch; margin-bottom: 14px; }
.footer-disclosure .ico { color: var(--faint); margin-top: 2px; }
.footer-links { display: flex; flex-wrap: wrap; gap: 8px 18px; }
.footer-links a:hover { color: var(--text); }

/* ---------- Krediti / profil ---------- */
.packages { display: grid; grid-template-columns: 1fr; gap: 10px; }
@media (min-width: 640px) { .packages { grid-template-columns: repeat(2, 1fr); } }
.package { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 18px; border-radius: var(--r); background: var(--surface); border: 1px solid var(--line-strong); cursor: pointer; }
.package:has(input:checked) { border-color: var(--gold); background: var(--gold-dim); }
.package input { position: absolute; opacity: 0; pointer-events: none; }
.package-credits { font-size: 22px; font-weight: 800; color: var(--gold); }
.package-price { font-weight: 700; }
.balance-card { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 20px; border-radius: var(--r-lg); background: linear-gradient(135deg, var(--surface-2), var(--surface)); border: 1px solid var(--line-strong); }
.balance-num { font-size: 36px; font-weight: 800; color: var(--gold); line-height: 1; }
.list { display: flex; flex-direction: column; }
.list-item { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line); font-size: 14px; }
.list-item:last-child { border-bottom: 0; }
.amount-plus { color: var(--green); font-weight: 700; }
.amount-minus { color: var(--muted); font-weight: 700; }

/* ---------- Pravni tekstovi ---------- */
.prose { max-width: 70ch; color: var(--muted); }
.prose h1 { color: var(--text); margin: 24px 0 12px; }
.prose h2 { color: var(--text); font-size: 20px; margin: 28px 0 10px; }
.prose p, .prose li { line-height: 1.65; }
.prose ul { padding-left: 20px; }
.prose strong { color: var(--text); }

/* ---------- Tim (inbox chattera) ---------- */
.team { display: grid; height: calc(100dvh - var(--topbar-h)); grid-template-columns: 1fr; background: var(--bg); }
@media (min-width: 900px) { .team { grid-template-columns: 240px 320px 1fr; } }
.pane { display: flex; flex-direction: column; min-height: 0; border-right: 1px solid var(--line); }
.pane:last-child { border-right: 0; }
.pane-head { flex: 0 0 auto; display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 12px 14px; border-bottom: 1px solid var(--line); font-weight: 800; font-size: 14px; min-height: 52px; }
.pane-body { flex: 1 1 auto; overflow-y: auto; min-height: 0; }
.pane-item { display: flex; align-items: center; gap: 10px; width: 100%; padding: 11px 14px; border: 0; background: transparent; text-align: left; border-bottom: 1px solid var(--line); }
.pane-item:hover { background: var(--surface); }
.pane-item.is-active { background: var(--surface-2); }
.pane-item .avatar { width: 36px; height: 36px; font-size: 14px; }
.pane-item-body { flex: 1; min-width: 0; }
.pane-item-title { font-weight: 700; font-size: 14px; display: flex; justify-content: space-between; gap: 8px; }
.pane-item-sub { font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pane-item .pill { flex: 0 0 auto; }
@media (max-width: 899px) {
  .team { grid-template-rows: 1fr; }
  .team .pane { display: none; }
  .team[data-view="models"] .pane-models,
  .team[data-view="convs"] .pane-convs,
  .team[data-view="chat"] .pane-chat { display: flex; }
}
.pane-chat .chat { height: 100%; width: 100%; max-width: none; margin: 0; border: 0; }
.pane-chat .chat-head { height: 52px; }
.chat-empty { flex: 1; display: flex; align-items: center; justify-content: center; color: var(--faint); text-align: center; padding: 24px; }
.internal-note { font-size: 12px; color: var(--faint); }

/* ---------- Admin ---------- */
.admin { display: grid; grid-template-columns: 1fr; min-height: calc(100dvh - var(--topbar-h)); }
@media (min-width: 900px) { .admin { grid-template-columns: 220px 1fr; } }
.admin-nav { border-bottom: 1px solid var(--line); padding: 10px; display: flex; gap: 4px; overflow-x: auto; }
@media (min-width: 900px) { .admin-nav { border-bottom: 0; border-right: 1px solid var(--line); flex-direction: column; padding: 16px 10px; } }
.admin-nav a { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: var(--r-sm); font-weight: 600; font-size: 14px; color: var(--muted); white-space: nowrap; }
.admin-nav a.is-active, .admin-nav a:hover { background: var(--surface); color: var(--text); }
.admin-main { padding: 20px 16px 40px; min-width: 0; }
@media (min-width: 900px) { .admin-main { padding: 28px; } }
.stats { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
@media (min-width: 900px) { .stats { grid-template-columns: repeat(4, 1fr); } }
.stat { padding: 16px; border-radius: var(--r); background: var(--surface); border: 1px solid var(--line); }
.stat b { display: block; font-size: 26px; font-weight: 800; }
.stat span { font-size: 13px; color: var(--muted); }
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--r); }
table.table { width: 100%; border-collapse: collapse; font-size: 14px; }
.table th, .table td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.table th { font-size: 12px; color: var(--muted); font-weight: 700; background: var(--bg-2); }
.table tr:last-child td { border-bottom: 0; }
.table td .btn { vertical-align: middle; }
.inline-form { display: inline; }
.thumb { width: 44px; height: 44px; object-fit: cover; border-radius: 8px; }
.toolbar { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 16px 0; }
.toolbar .input { max-width: 280px; }
.section-title { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin: 24px 0 12px; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }

/* ---------- Skeleton ---------- */
.skeleton { background: linear-gradient(90deg, var(--surface) 25%, var(--surface-2) 50%, var(--surface) 75%); background-size: 200% 100%; animation: shimmer 1.4s infinite; border-radius: var(--r); }
@keyframes shimmer { from { background-position: 200% 0; } to { background-position: -200% 0; } }
