/* =====================================================================
   NVDMAX.org — dark theme, oguser-inspired.
   Single dark palette (light mode removed). Purple accent.
   ===================================================================== */

:root {
  --bg: #0c0c0f;
  --bg-elev: #141419;
  --bg-elev-2: #1a1a21;
  --bg-elev-3: #202029;
  --bg-input: #17171d;
  --border: #24242e;
  --border-soft: #1e1e26;
  --text: #e4e5ea;
  --text-dim: #9a9ba7;
  --text-faint: #62636f;
  --accent: #7c5cff;
  --accent-hover: #9179ff;
  --accent-soft: rgba(124, 92, 255, 0.14);
  --accent-2: #3b82f6;
  --link: #c9c6f5;
  --link-hover: #ffffff;
  --success: #34c759;
  --warn: #e0a422;
  --owner: #f5c518;
  --danger: #ef4444;
  --radius: 10px;
  --radius-sm: 6px;
  --maxw: 1240px;
  --shadow: 0 6px 24px rgba(0, 0, 0, 0.45);
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.3);
  --font: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --mono: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 14.5px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--link); text-decoration: none; transition: color 0.12s; }
a:hover { color: var(--link-hover); text-decoration: none; }

.container { max-width: var(--maxw); margin: 0 auto; padding: 0 20px; }

/* ---------- Top navbar (centered logo like oguser) ---------- */
.navbar {
  background: rgba(12, 12, 15, 0.85);
  backdrop-filter: saturate(140%) blur(10px);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 50;
}
.navbar-inner {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  height: 62px;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 20px;
  gap: 16px;
}
.nav-left { display: flex; align-items: center; gap: 4px; }
.nav-center { display: flex; justify-content: center; }
.nav-right { display: flex; align-items: center; gap: 6px; justify-content: flex-end; }

.logo { display: inline-flex; align-items: center; }
.logo img { height: 30px; width: auto; display: block; }
.logo .logo-fallback {
  font-weight: 800; font-size: 20px; letter-spacing: 0.5px; color: #fff;
}

.nav-item {
  display: inline-flex; align-items: center; gap: 7px;
  height: 38px; padding: 0 13px;
  border-radius: 9px;
  color: var(--text-dim);
  font-size: 14px; font-weight: 500;
  background: transparent; border: none; cursor: pointer;
  transition: background 0.12s, color 0.12s;
}
.nav-item:hover { background: var(--bg-elev-2); color: var(--text); }
.nav-item.active { color: var(--text); }
.nav-item svg { width: 18px; height: 18px; flex-shrink: 0; }

.icon-btn {
  display: inline-flex; align-items: center; justify-content: center;
  position: relative;
  width: 38px; height: 38px; border-radius: 9px;
  color: var(--text-dim); background: transparent; border: none; cursor: pointer;
  transition: background 0.12s, color 0.12s;
}
.icon-btn:hover { background: var(--bg-elev-2); color: var(--text); }
.icon-btn svg { width: 19px; height: 19px; }

.nav-badge {
  position: absolute; top: 3px; right: 3px;
  min-width: 16px; height: 16px; padding: 0 4px;
  border-radius: 8px; background: var(--accent); color: #fff;
  font-size: 10px; font-weight: 700;
  display: inline-flex; align-items: center; justify-content: center;
  border: 2px solid var(--bg);
}
.nav-badge.inline { position: static; border: none; }

.avatar {
  width: 30px; height: 30px; border-radius: 50%;
  background: var(--bg-elev-3) center/cover no-repeat;
  border: 1px solid var(--border); display: inline-block;
  vertical-align: middle; flex-shrink: 0;
}
.avatar.lg { width: 74px; height: 74px; }
.avatar.xl { width: 96px; height: 96px; }
.avatar.sm { width: 24px; height: 24px; }

.user-chip {
  display: inline-flex; align-items: center; gap: 9px;
  height: 42px; padding: 0 12px 0 6px;
  border-radius: 24px; border: 1px solid var(--border);
  background: var(--bg-elev); color: var(--text);
  cursor: pointer; font-weight: 600; font-size: 14px;
  transition: border-color 0.12s, background 0.12s;
}
.user-chip:hover { background: var(--bg-elev-2); border-color: var(--border); }

/* dropdown user menu */
.menu-wrap { position: relative; }
.menu {
  position: absolute; right: 0; top: calc(100% + 10px);
  min-width: 200px; background: var(--bg-elev);
  border: 1px solid var(--border); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 7px; display: none;
}
.menu.open { display: block; animation: pop 0.12s ease; }
@keyframes pop { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: none; } }
.menu a, .menu button {
  display: flex; align-items: center; gap: 9px; width: 100%; text-align: left;
  padding: 9px 11px; border-radius: var(--radius-sm);
  color: var(--text); font-size: 14px; background: none; border: none; cursor: pointer;
}
.menu a:hover, .menu button:hover { background: var(--bg-elev-2); }
.menu svg { width: 16px; height: 16px; color: var(--text-dim); }
.menu hr { border: none; border-top: 1px solid var(--border); margin: 7px 4px; }

/* ---------- Page layout ---------- */
.page { padding: 24px 0 70px; }
.layout { display: grid; grid-template-columns: 1fr 320px; gap: 22px; align-items: start; }
@media (max-width: 940px) {
  .layout { grid-template-columns: 1fr; }
  .sidebar { order: 2; }
}

/* segmented tabs (General / Marketplace) */
.segment {
  display: grid; grid-auto-flow: column; grid-auto-columns: 1fr;
  gap: 6px; background: var(--bg-elev); border: 1px solid var(--border);
  padding: 6px; border-radius: 14px; margin-bottom: 22px;
}
.segment button {
  height: 42px; border: none; border-radius: 9px;
  background: transparent; color: var(--text-dim);
  font-size: 14.5px; font-weight: 600; cursor: pointer;
  transition: background 0.14s, color 0.14s;
}
.segment button.active { background: var(--accent); color: #fff; }

/* breadcrumbs */
.breadcrumb {
  display: flex; flex-wrap: wrap; gap: 7px; align-items: center;
  color: var(--text-faint); font-size: 13px; margin-bottom: 18px;
}
.breadcrumb a { color: var(--text-dim); }
.breadcrumb a:hover { color: var(--text); }

/* ---------- Cards ---------- */
.card {
  background: var(--bg-elev); border: 1px solid var(--border);
  border-radius: 14px; overflow: hidden; margin-bottom: 18px;
}
.card-head {
  padding: 13px 18px; background: var(--bg-elev-2);
  border-bottom: 1px solid var(--border);
  font-weight: 700; font-size: 13px; letter-spacing: 0.4px;
  text-transform: uppercase; color: var(--text-dim);
  display: flex; align-items: center; justify-content: space-between;
}

/* ---------- Home: category sections (oguser style) ---------- */
.cat-section {
  display: grid; grid-template-columns: 1fr 1fr; gap: 20px;
  padding: 22px 24px; border-bottom: 1px solid var(--border-soft);
}
.cat-section:last-child { border-bottom: none; }
.cat-head { display: flex; gap: 13px; align-items: flex-start; }
.cat-icon {
  width: 40px; height: 40px; border-radius: 11px; flex-shrink: 0;
  background: var(--accent-soft); color: var(--accent);
  display: flex; align-items: center; justify-content: center;
}
.cat-icon svg { width: 21px; height: 21px; }
.cat-title { font-size: 17px; font-weight: 700; }
.cat-title a { color: var(--text); }
.cat-title a:hover { color: var(--accent); }
.cat-lastpost { color: var(--text-faint); font-size: 12.5px; margin-top: 3px; display: flex; gap: 6px; align-items: center; }
.cat-lastpost a { color: var(--text-dim); }
.sub-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 6px 20px;
  align-self: center;
}
.sub-link { display: flex; align-items: center; gap: 8px; font-size: 13.5px; color: var(--text-dim); padding: 3px 0; }
.sub-link:hover { color: var(--text); }
.sub-link .dot { width: 7px; height: 7px; border-radius: 2px; background: var(--accent); flex-shrink: 0; }
@media (max-width: 720px) {
  .cat-section { grid-template-columns: 1fr; gap: 14px; }
  .sub-grid { grid-template-columns: 1fr; }
}

/* stats bar */
.stats-bar {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px;
  margin-top: 4px;
}
.stat-tile {
  display: flex; align-items: center; gap: 13px;
  background: var(--bg-elev); border: 1px solid var(--border);
  border-radius: 14px; padding: 16px 18px;
}
.stat-tile .ico {
  width: 38px; height: 38px; border-radius: 10px; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  background: var(--bg-elev-2); color: var(--accent);
}
.stat-tile .ico svg { width: 19px; height: 19px; }
.stat-tile .n { font-size: 20px; font-weight: 800; line-height: 1.1; }
.stat-tile .l { font-size: 12px; color: var(--text-faint); }
.stat-tile .ico.online { color: var(--success); }
@media (max-width: 720px) { .stats-bar { grid-template-columns: 1fr 1fr; } }

/* ---------- Sidebar: profile card + activity ---------- */
.side-profile { padding: 22px 18px; text-align: center; }
.side-profile .uname { font-size: 17px; font-weight: 700; margin-top: 10px; }
.side-profile .handle { color: var(--text-faint); font-size: 12.5px; }
.side-profile .mini-stats {
  display: grid; grid-template-columns: repeat(3, 1fr);
  margin: 16px 0 6px; gap: 6px;
}
.side-profile .mini-stats .s b { display: block; font-size: 17px; }
.side-profile .mini-stats .s span { font-size: 11px; color: var(--text-faint); }
.credits-pill {
  display: inline-flex; align-items: center; gap: 6px;
  margin-top: 6px; padding: 6px 14px; border-radius: 20px;
  background: var(--bg-elev-2); border: 1px solid var(--border);
  color: var(--warn); font-weight: 700; font-size: 13px;
}

.activity-item {
  display: flex; gap: 11px; align-items: center;
  padding: 10px 16px; border-bottom: 1px solid var(--border-soft);
}
.activity-item:last-child { border-bottom: none; }
.activity-item .body { min-width: 0; font-size: 13px; line-height: 1.4; }
.activity-item .title { color: var(--text); font-weight: 500; overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.activity-item .sub { color: var(--text-faint); font-size: 11.5px; margin-top: 2px; }
.activity-item .cat-tag { color: var(--accent); font-weight: 700; text-transform: uppercase; font-size: 11px; letter-spacing: 0.3px; }

/* ---------- Thread list ---------- */
.toolbar { display: flex; align-items: center; gap: 10px; margin-bottom: 16px; flex-wrap: wrap; }
.toolbar .spacer { flex: 1; }
.sort-tabs { display: flex; gap: 4px; }
.sort-tabs button {
  padding: 7px 13px; font-size: 13px; border-radius: 8px;
  background: var(--bg-elev); border: 1px solid var(--border);
  color: var(--text-dim); cursor: pointer;
}
.sort-tabs button.active { background: var(--accent-soft); color: var(--accent); border-color: var(--accent); }

.thread-row {
  display: grid; grid-template-columns: auto 1fr 120px 190px; gap: 12px;
  align-items: center; padding: 13px 18px; border-bottom: 1px solid var(--border-soft);
}
.thread-row:last-child { border-bottom: none; }
.thread-row .tico { color: var(--text-faint); width: 22px; display: flex; justify-content: center; }
.thread-row .tico svg { width: 18px; height: 18px; }
.thread-row.pinned { background: rgba(224, 164, 34, 0.05); }
.thread-title a { color: var(--text); font-weight: 600; }
.thread-title a:hover { color: var(--accent); }
.thread-meta { color: var(--text-faint); font-size: 12.5px; margin-top: 3px; }
.thread-meta a { color: var(--text-dim); }
.badge {
  display: inline-block; font-size: 10px; font-weight: 700;
  padding: 2px 7px; border-radius: 4px; text-transform: uppercase;
  letter-spacing: 0.4px; vertical-align: middle;
}
.badge.pin { background: rgba(224,164,34,0.15); color: var(--warn); }
.badge.lock { background: rgba(154,155,167,0.15); color: var(--text-dim); }
.tstat { text-align: center; font-size: 13px; color: var(--text-dim); }
.tstat b { color: var(--text); display: block; }
@media (max-width: 720px) {
  .thread-row { grid-template-columns: auto 1fr; }
  .tstat, .thread-lastcol { display: none; }
}

/* ---------- Role tags ---------- */
.urole {
  display: inline-block; font-size: 10.5px; padding: 2px 8px;
  border-radius: 5px; text-transform: uppercase; font-weight: 800; letter-spacing: 0.4px;
  vertical-align: middle;
}
.urole.owner { background: rgba(245,197,24,0.16); color: var(--owner); }
.urole.admin { background: var(--accent-soft); color: var(--accent); }
.urole.mod { background: rgba(52,199,89,0.15); color: var(--success); }
.urole.member { background: var(--bg-elev-2); color: var(--text-faint); }

/* ---------- Thread view / posts ---------- */
.thread-header { margin-bottom: 18px; }
.thread-header h1 { font-size: 23px; margin: 4px 0 8px; }

.post {
  display: grid; grid-template-columns: 180px 1fr;
  border: 1px solid var(--border); border-radius: 14px;
  background: var(--bg-elev); margin-bottom: 14px; overflow: hidden;
}
.post-side { background: var(--bg-elev-2); border-right: 1px solid var(--border); padding: 18px 14px; text-align: center; }
.post-side .uname { font-weight: 700; margin-top: 9px; }
.post-side .uname a { color: var(--text); }
.post-side .urole { margin-top: 6px; }
.post-side .ustat { font-size: 12px; color: var(--text-dim); margin-top: 12px; line-height: 1.7; }
.post-side .ustat b { color: var(--text); }
.post-main { padding: 15px 20px; display: flex; flex-direction: column; }
.post-topbar {
  display: flex; justify-content: space-between; align-items: center;
  font-size: 12px; color: var(--text-faint);
  border-bottom: 1px solid var(--border-soft); padding-bottom: 9px; margin-bottom: 12px;
}
.post-body { flex: 1; word-wrap: break-word; overflow-wrap: anywhere; }
.post-body p { margin: 0 0 10px; }
.post-body img { max-width: 100%; border-radius: 8px; margin: 6px 0; }
.post-body a { color: var(--accent); }
.post-body blockquote {
  border-left: 3px solid var(--accent); background: var(--bg-elev-2);
  padding: 9px 13px; margin: 9px 0; border-radius: 0 8px 8px 0; color: var(--text-dim);
}
.post-body blockquote cite {
  display: block; font-style: normal; font-weight: 700;
  color: var(--text); font-size: 12.5px; margin-bottom: 4px;
}
.post-sig {
  margin-top: 15px; padding-top: 9px; border-top: 1px solid var(--border-soft);
  color: var(--text-faint); font-size: 12.5px; font-style: italic;
}
.post-actions { display: flex; gap: 7px; align-items: center; margin-top: 14px; flex-wrap: wrap; }
.post-actions .spacer { flex: 1; }
@media (max-width: 640px) {
  .post { grid-template-columns: 1fr; }
  .post-side {
    display: flex; align-items: center; gap: 12px; text-align: left;
    border-right: none; border-bottom: 1px solid var(--border); padding: 11px 15px;
  }
  .post-side .avatar.lg { width: 42px; height: 42px; }
  .post-side .ustat { display: none; }
}

/* ---------- Reactions + emoji picker ---------- */
.reactions { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.react-chip {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 3px 10px; font-size: 13.5px; border-radius: 16px;
  border: 1px solid var(--border); background: var(--bg-elev-2);
  color: var(--text-dim); cursor: pointer; transition: border-color 0.12s, background 0.12s;
}
.react-chip:hover { border-color: var(--accent); }
.react-chip.active { background: var(--accent-soft); border-color: var(--accent); color: var(--text); }
.react-chip .cnt { font-size: 12px; font-weight: 600; }
.react-add {
  display: inline-flex; align-items: center; justify-content: center;
  width: 30px; height: 26px; border-radius: 16px;
  border: 1px solid var(--border); background: var(--bg-elev-2);
  color: var(--text-dim); cursor: pointer;
}
.react-add:hover { border-color: var(--accent); color: var(--accent); }
.react-add svg { width: 15px; height: 15px; }

.emoji-pop {
  position: absolute; z-index: 120; width: 300px;
  background: var(--bg-elev); border: 1px solid var(--border);
  border-radius: 12px; box-shadow: var(--shadow); padding: 10px;
}
.emoji-pop input {
  width: 100%; height: 34px; padding: 0 10px; margin-bottom: 8px;
  background: var(--bg-input); border: 1px solid var(--border);
  border-radius: 8px; color: var(--text); font-size: 13px;
}
.emoji-pop input:focus { outline: none; border-color: var(--accent); }
.emoji-grid { display: grid; grid-template-columns: repeat(8, 1fr); gap: 2px; max-height: 200px; overflow-y: auto; }
.emoji-grid button {
  height: 32px; font-size: 19px; border: none; background: none;
  border-radius: 7px; cursor: pointer; line-height: 1;
}
.emoji-grid button:hover { background: var(--bg-elev-2); }
.emoji-sec { grid-column: 1 / -1; font-size: 10.5px; color: var(--text-faint); text-transform: uppercase; letter-spacing: 0.4px; padding: 6px 4px 2px; }

/* ---------- Rich composer ---------- */
.composer { border: 1px solid var(--border); border-radius: 12px; overflow: hidden; background: var(--bg-input); }
.rt-toolbar {
  display: flex; gap: 2px; padding: 7px; background: var(--bg-elev-2);
  border-bottom: 1px solid var(--border); flex-wrap: wrap;
}
.rt-toolbar button {
  width: 32px; height: 32px; display: inline-flex; align-items: center; justify-content: center;
  background: transparent; border: none; border-radius: 7px;
  color: var(--text-dim); cursor: pointer; font-size: 15px;
}
.rt-toolbar button:hover { background: var(--bg-elev-3); color: var(--text); }
.rt-toolbar button.on { background: var(--accent-soft); color: var(--accent); }
.rt-toolbar button svg { width: 17px; height: 17px; }
.rt-toolbar .div { width: 1px; background: var(--border); margin: 4px 4px; }
.rt-editor {
  min-height: 150px; max-height: 460px; overflow-y: auto;
  padding: 13px 15px; color: var(--text); font-size: 14.5px; line-height: 1.6; outline: none;
}
.rt-editor:empty::before { content: ""; }
.rt-editor blockquote {
  border-left: 3px solid var(--accent); background: var(--bg-elev-2);
  padding: 6px 12px; margin: 6px 0; border-radius: 0 8px 8px 0; color: var(--text-dim);
}
.rt-editor img { max-width: 100%; border-radius: 8px; }

/* quote chip above composer */
.quote-chip {
  display: flex; align-items: flex-start; gap: 10px;
  background: var(--bg-elev-2); border: 1px solid var(--border);
  border-left: 3px solid var(--accent); border-radius: 8px;
  padding: 10px 12px; margin-bottom: 10px; font-size: 13px;
}
.quote-chip .qc-body { flex: 1; min-width: 0; }
.quote-chip .qc-who { font-weight: 700; color: var(--text); margin-bottom: 2px; }
.quote-chip .qc-text { color: var(--text-dim); overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.quote-chip .qc-x {
  flex-shrink: 0; width: 24px; height: 24px; border-radius: 6px;
  display: flex; align-items: center; justify-content: center;
  background: transparent; border: none; color: var(--text-faint); cursor: pointer;
}
.quote-chip .qc-x:hover { background: var(--bg-elev-3); color: var(--text); }
.quote-chip .qc-x svg { width: 14px; height: 14px; }

/* ---------- Forms / buttons ---------- */
.field { margin-bottom: 15px; }
.field label { display: block; font-size: 13px; color: var(--text-dim); margin-bottom: 6px; font-weight: 600; }
.input, textarea.input, select.input {
  width: 100%; padding: 11px 13px; background: var(--bg-input);
  border: 1px solid var(--border); border-radius: 10px; color: var(--text);
  font-size: 14px; font-family: var(--font);
}
.input:focus { outline: none; border-color: var(--accent); }
textarea.input { min-height: 120px; resize: vertical; line-height: 1.6; }

.btn {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 10px 20px; border-radius: 10px;
  border: 1px solid var(--accent); background: var(--accent);
  color: #fff; font-size: 14px; font-weight: 600; cursor: pointer;
  transition: background 0.12s, border-color 0.12s;
}
.btn:hover { background: var(--accent-hover); border-color: var(--accent-hover); color: #fff; }
.btn.ghost { background: transparent; color: var(--text); border-color: var(--border); }
.btn.ghost:hover { background: var(--bg-elev-2); border-color: var(--border); }
.btn.danger { background: transparent; color: var(--danger); border-color: rgba(239,68,68,0.4); }
.btn.danger:hover { background: rgba(239,68,68,0.1); border-color: var(--danger); }
.btn.sm { padding: 7px 13px; font-size: 13px; }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }

.act-btn {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 5px 11px; font-size: 12.5px; border-radius: 16px;
  border: 1px solid var(--border); background: var(--bg-elev-2);
  color: var(--text-dim); cursor: pointer;
}
.act-btn:hover { border-color: var(--accent); color: var(--text); }
.act-btn.danger:hover { border-color: var(--danger); color: var(--danger); }

.hint { font-size: 12.5px; color: var(--text-faint); margin-top: 6px; }
.hint.ok { color: var(--success); }
.hint.err { color: var(--danger); }

/* ---------- Auth ---------- */
.auth-wrap { max-width: 420px; margin: 70px auto; text-align: center; }
.auth-card {
  background: var(--bg-elev); border: 1px solid var(--border);
  border-radius: 16px; padding: 36px 30px; box-shadow: var(--shadow);
}
.auth-card h1 { font-size: 23px; margin: 0 0 6px; }
.auth-card p.sub { color: var(--text-dim); margin: 0 0 24px; font-size: 14px; }

/* ---------- Profile ---------- */
.profile-head { display: flex; gap: 20px; align-items: center; padding: 24px; }
.profile-head .meta h1 { margin: 0 0 4px; font-size: 23px; display: flex; align-items: center; gap: 10px; }
.profile-stats { display: flex; gap: 30px; padding: 0 24px 20px; }
.profile-stats .s b { display: block; font-size: 21px; }
.profile-stats .s span { color: var(--text-dim); font-size: 12.5px; }

/* avatar upload / cropper modal */
.modal-backdrop {
  position: fixed; inset: 0; background: rgba(0,0,0,0.66);
  display: flex; align-items: center; justify-content: center; z-index: 300; padding: 20px;
}
.modal {
  background: var(--bg-elev); border: 1px solid var(--border);
  border-radius: 16px; width: 380px; max-width: 100%; box-shadow: var(--shadow); overflow: hidden;
}
.modal-head { padding: 15px 18px; border-bottom: 1px solid var(--border); font-weight: 700; }
.modal-body { padding: 18px; }
.cropper {
  position: relative; width: 300px; height: 300px; margin: 0 auto;
  border-radius: 50%; overflow: hidden; background: #000;
  cursor: grab; touch-action: none; border: 2px solid var(--border);
}
.cropper.drag { cursor: grabbing; }
.cropper canvas { position: absolute; top: 0; left: 0; }
.crop-controls { display: flex; align-items: center; gap: 10px; margin: 16px 0 4px; }
.crop-controls input[type=range] { flex: 1; accent-color: var(--accent); }
.modal-foot { padding: 14px 18px; border-top: 1px solid var(--border); display: flex; gap: 10px; justify-content: flex-end; }

/* ---------- Pagination ---------- */
.pagination { display: flex; gap: 6px; justify-content: center; margin: 22px 0; flex-wrap: wrap; }
.pagination a, .pagination span {
  padding: 7px 13px; border-radius: 8px; border: 1px solid var(--border);
  background: var(--bg-elev); color: var(--text-dim); font-size: 13px;
}
.pagination a.active { background: var(--accent); color: #fff; border-color: var(--accent); }
.pagination a:hover { border-color: var(--accent); }

/* ---------- Misc ---------- */
.empty { text-align: center; color: var(--text-faint); padding: 44px 20px; }
.toast {
  position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%);
  background: var(--bg-elev); border: 1px solid var(--border);
  border-left: 3px solid var(--accent); padding: 13px 19px;
  border-radius: 10px; box-shadow: var(--shadow); font-size: 14px;
  z-index: 400; opacity: 0; transition: opacity 0.2s, transform 0.2s; pointer-events: none;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(-4px); }
.hidden { display: none !important; }
.section-title { font-size: 19px; font-weight: 700; margin: 4px 0 16px; }
.tag {
  display: inline-block; font-size: 11px; padding: 2px 9px; border-radius: 20px;
  background: var(--bg-elev-2); border: 1px solid var(--border); color: var(--text-dim); margin-right: 4px;
}
mark { background: var(--warn); color: #000; border-radius: 2px; padding: 0 2px; }
