/* ===== CSS Variables ===== */
:root {
  --primary:        #4f46e5;
  --primary-dark:   #3730a3;
  --secondary:      #6b7280;
  --accent:         #10b981;
  --bg:             #f3f4f6;
  --bg-card:        #ffffff;
  --bg-header:      #1e1b4b;
  --text:           #1f2937;
  --text-muted:     #6b7280;
  --text-header:    #ffffff;
  --border:         #e5e7eb;
  --radius:         8px;
  --font-body:      &#039;Inter&#039;, sans-serif;
  --font-heading:   &#039;Inter&#039;, sans-serif;
  --font-size:      15px;
  --shadow:         0 1px 3px rgba(0,0,0,.1), 0 1px 2px rgba(0,0,0,.06);
  --shadow-md:      0 4px 6px rgba(0,0,0,.07), 0 2px 4px rgba(0,0,0,.06);
}

/* ===== Reset & Base ===== */
*,*::before,*::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font-body);
  font-size: var(--font-size);
  color: var(--text);
  background: var(--bg);
  line-height: 1.6;
  min-height: 100vh;
}
a { color: var(--primary); text-decoration: none; transition: color .2s; }
a:hover { color: var(--primary-dark); }
img { max-width: 100%; height: auto; }
h1,h2,h3,h4,h5,h6 { font-family: var(--font-heading); font-weight: 700; line-height: 1.3; }
ul { list-style: none; }

/* ===== Layout ===== */
.container { max-width: 1200px; margin: 0 auto; padding: 0 16px; }
.page-wrap { display: flex; gap: 24px; padding: 24px 0; }
.main-content { flex: 1; min-width: 0; }
.sidebar { width: 280px; flex-shrink: 0; }
@media(max-width:900px) { .page-wrap { flex-direction: column; } .sidebar { width: 100%; } }

/* ===== Header ===== */
.site-header {
  background: var(--bg-header);
  color: var(--text-header);
  box-shadow: 0 2px 8px rgba(0,0,0,.2);
  position: sticky; top: 0; z-index: 100;
}
.header-inner {
  display: flex; align-items: center; justify-content: space-between;
  height: 62px;
}
.site-logo { display: flex; align-items: center; gap: 10px; }
.site-logo img { height: 38px; width: auto; }
.site-logo .logo-text { font-size: 1.4rem; font-weight: 800; color: var(--text-header); letter-spacing: -.5px; }
.site-nav { display: flex; align-items: center; gap: 6px; }
.site-nav a {
  color: rgba(255,255,255,.82);
  padding: 6px 12px; border-radius: var(--radius);
  font-size: .9rem; font-weight: 500;
  transition: background .2s, color .2s;
}
.site-nav a:hover, .site-nav a.active { background: rgba(255,255,255,.15); color: #fff; }
.nav-user { display: flex; align-items: center; gap: 8px; }
.nav-avatar { width: 32px; height: 32px; border-radius: 50%; object-fit: cover; border: 2px solid rgba(255,255,255,.3); }
.nav-badge {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 18px; height: 18px; padding: 0 4px;
  background: #ef4444; color: #fff; font-size: .7rem; font-weight: 700;
  border-radius: 9px; margin-left: -8px; margin-top: -14px; vertical-align: top;
}
.hamburger { display: none; background: none; border: none; cursor: pointer; color: #fff; font-size: 1.5rem; padding: 6px; }
@media(max-width:768px) {
  .hamburger { display: block; }
  .site-nav { display: none; position: absolute; top: 62px; left: 0; right: 0; background: var(--bg-header); flex-direction: column; padding: 12px; gap: 4px; }
  .site-nav.open { display: flex; }
  .nav-user { flex-wrap: wrap; }
}

/* ===== Breadcrumb ===== */
.breadcrumb { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; font-size: .85rem; color: var(--text-muted); margin-bottom: 16px; }
.breadcrumb a { color: var(--primary); }
.breadcrumb-sep { color: var(--border); }

/* ===== Cards ===== */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
  margin-bottom: 16px;
}
.card-header {
  background: var(--primary);
  color: #fff;
  padding: 12px 18px;
  display: flex; align-items: center; justify-content: space-between;
  font-weight: 600;
}
.card-header a { color: rgba(255,255,255,.85); font-size: .85rem; }
.card-header a:hover { color: #fff; }
.card-body { padding: 18px; }

/* ===== Category List ===== */
.category-group { margin-bottom: 24px; }
.category-group-title {
  font-size: 1.1rem; font-weight: 700; color: var(--text);
  border-bottom: 2px solid var(--primary);
  padding-bottom: 8px; margin-bottom: 12px;
}
.category-item {
  display: flex; align-items: center; gap: 14px;
  padding: 14px 18px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: 8px;
  transition: box-shadow .2s, border-color .2s;
}
.category-item:hover { box-shadow: var(--shadow-md); border-color: var(--primary); }
.category-icon {
  width: 46px; height: 46px; border-radius: var(--radius);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.3rem; flex-shrink: 0;
}
.category-info { flex: 1; min-width: 0; }
.category-name { font-weight: 700; font-size: 1rem; color: var(--text); }
.category-desc { font-size: .85rem; color: var(--text-muted); margin-top: 2px; }
.category-stats { text-align: right; font-size: .82rem; color: var(--text-muted); white-space: nowrap; }
.category-stats strong { color: var(--text); display: block; }
.sub-categories { padding-left: 24px; margin-top: 6px; }
.sub-cat-item {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 12px;
  border-left: 2px solid var(--border);
  margin-bottom: 4px; color: var(--text-muted); font-size: .9rem;
}
.sub-cat-item a { color: var(--text); font-weight: 500; }
.sub-cat-item a:hover { color: var(--primary); }

/* ===== Topic List ===== */
.topic-list-header {
  display: grid; grid-template-columns: 1fr 80px 80px 200px;
  padding: 8px 18px; font-size: .8rem; font-weight: 600;
  color: var(--text-muted); text-transform: uppercase; letter-spacing: .5px;
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius) var(--radius) 0 0;
  border-bottom: none;
}
.topic-item {
  display: grid; grid-template-columns: 1fr 80px 80px 200px;
  align-items: center; gap: 12px;
  padding: 12px 18px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-top: none;
  transition: background .15s;
}
.topic-item:last-child { border-radius: 0 0 var(--radius) var(--radius); }
.topic-item:hover { background: #f9fafb; }
.topic-item.pinned { background: #fefce8; }
.topic-item.announcement { background: #eff6ff; }
.topic-title { display: flex; flex-direction: column; gap: 3px; }
.topic-title a { font-weight: 600; color: var(--text); font-size: .95rem; }
.topic-title a:hover { color: var(--primary); }
.topic-meta { font-size: .8rem; color: var(--text-muted); }
.topic-meta a { color: var(--text-muted); }
.topic-meta a:hover { color: var(--primary); }
.topic-badges { display: flex; gap: 4px; flex-wrap: wrap; margin-top: 3px; }
.badge {
  display: inline-flex; align-items: center; gap: 3px;
  padding: 2px 7px; border-radius: 4px; font-size: .72rem; font-weight: 600; text-transform: uppercase;
}
.badge-pinned { background: #fef3c7; color: #92400e; }
.badge-locked { background: #fee2e2; color: #991b1b; }
.badge-announcement { background: #dbeafe; color: #1e40af; }
.badge-new { background: #dcfce7; color: #166534; }
.topic-stat { text-align: center; font-size: .9rem; color: var(--text-muted); }
.topic-stat strong { color: var(--text); display: block; font-size: 1rem; }
.topic-last-post { font-size: .8rem; color: var(--text-muted); }
.topic-last-post a { color: var(--text); font-weight: 500; }
@media(max-width:700px) {
  .topic-list-header { display: none; }
  .topic-item { grid-template-columns: 1fr; gap: 6px; }
  .topic-stat, .topic-last-post { display: none; }
}

/* ===== Post ===== */
.post-item {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: 16px;
  display: flex;
}
.post-author {
  width: 160px; flex-shrink: 0;
  padding: 20px 14px;
  border-right: 1px solid var(--border);
  text-align: center;
  background: #fafafa;
}
.post-author-avatar { width: 70px; height: 70px; border-radius: 50%; object-fit: cover; margin-bottom: 8px; }
.post-author-name { font-weight: 700; color: var(--text); font-size: .95rem; }
.post-author-role { font-size: .75rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: .5px; }
.post-author-rank { font-size: .78rem; color: var(--primary); margin-top: 4px; }
.post-author-count { font-size: .78rem; color: var(--text-muted); }
.post-body { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.post-header {
  display: flex; justify-content: space-between; align-items: center;
  padding: 10px 16px; border-bottom: 1px solid var(--border);
  background: #fafafa; font-size: .82rem; color: var(--text-muted);
}
.post-content { padding: 16px; line-height: 1.7; word-break: break-word; flex: 1; }
.post-content blockquote.bbcode-quote {
  border-left: 3px solid var(--primary); padding: 10px 14px;
  background: var(--bg); margin: 12px 0; border-radius: 0 var(--radius) var(--radius) 0;
}
.post-content blockquote.bbcode-quote cite { display: block; font-weight: 600; margin-bottom: 6px; font-size: .85rem; color: var(--text-muted); font-style: normal; }
.post-content pre.bbcode-code { background: #1e1b4b; color: #e2e8f0; padding: 14px; border-radius: var(--radius); overflow-x: auto; font-size: .88rem; }
.post-content img.bbcode-img { max-width: 100%; border-radius: var(--radius); margin: 8px 0; }
.post-footer {
  display: flex; justify-content: space-between; align-items: center;
  padding: 8px 16px; border-top: 1px solid var(--border);
  background: #fafafa; font-size: .82rem;
}
.post-actions { display: flex; gap: 8px; }
.post-signature { padding: 10px 16px; border-top: 1px dashed var(--border); font-size: .82rem; color: var(--text-muted); font-style: italic; }
@media(max-width:600px) { .post-item { flex-direction: column; } .post-author { width: 100%; border-right: none; border-bottom: 1px solid var(--border); display: flex; gap: 12px; align-items: center; } .post-author-avatar { width: 48px; height: 48px; margin: 0; } }

/* ===== Forms ===== */
.form-group { margin-bottom: 18px; }
.form-label { display: block; margin-bottom: 6px; font-weight: 600; font-size: .9rem; color: var(--text); }
.form-control {
  width: 100%; padding: 9px 13px;
  border: 1px solid var(--border); border-radius: var(--radius);
  font-size: .95rem; font-family: var(--font-body);
  color: var(--text); background: var(--bg-card);
  transition: border-color .2s, box-shadow .2s;
}
.form-control:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px rgba(79,70,229,.15); }
textarea.form-control { resize: vertical; min-height: 140px; }
.form-hint { font-size: .8rem; color: var(--text-muted); margin-top: 4px; }
.form-error { font-size: .82rem; color: #ef4444; margin-top: 4px; }

/* ===== Buttons ===== */
.btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 8px 18px; border-radius: var(--radius);
  font-size: .9rem; font-weight: 600; font-family: var(--font-body);
  border: 2px solid transparent; cursor: pointer;
  transition: all .2s; text-decoration: none; line-height: 1;
}
.btn:disabled { opacity: .55; cursor: not-allowed; }
.btn-primary { background: var(--primary); color: #fff; border-color: var(--primary); }
.btn-primary:hover { background: var(--primary-dark); border-color: var(--primary-dark); color: #fff; }
.btn-secondary { background: var(--bg-card); color: var(--text); border-color: var(--border); }
.btn-secondary:hover { background: var(--bg); border-color: var(--secondary); }
.btn-danger { background: #ef4444; color: #fff; border-color: #ef4444; }
.btn-danger:hover { background: #dc2626; border-color: #dc2626; color: #fff; }
.btn-success { background: var(--accent); color: #fff; border-color: var(--accent); }
.btn-sm { padding: 5px 12px; font-size: .82rem; }
.btn-xs { padding: 3px 8px; font-size: .76rem; border-radius: 4px; }
.btn-ghost { background: transparent; color: var(--primary); border-color: transparent; }
.btn-ghost:hover { background: rgba(79,70,229,.08); color: var(--primary-dark); }
.btn-icon { padding: 7px; }

/* ===== Alerts ===== */
.alert {
  padding: 12px 16px; border-radius: var(--radius); margin-bottom: 16px;
  border: 1px solid transparent; font-size: .92rem; position: relative;
}
.alert-close { position: absolute; right: 12px; top: 10px; background: none; border: none; font-size: 1.1rem; cursor: pointer; opacity: .6; }
.alert-close:hover { opacity: 1; }
.alert-success { background: #dcfce7; border-color: #86efac; color: #166534; }
.alert-danger  { background: #fee2e2; border-color: #fca5a5; color: #991b1b; }
.alert-warning { background: #fef3c7; border-color: #fde68a; color: #92400e; }
.alert-info    { background: #dbeafe; border-color: #93c5fd; color: #1e40af; }

/* ===== Tables ===== */
.table { width: 100%; border-collapse: collapse; font-size: .92rem; }
.table th { background: var(--bg); color: var(--text); font-weight: 600; padding: 10px 14px; text-align: left; border-bottom: 2px solid var(--border); }
.table td { padding: 10px 14px; border-bottom: 1px solid var(--border); vertical-align: middle; }
.table tr:last-child td { border-bottom: none; }
.table tr:hover td { background: #f9fafb; }

/* ===== Sidebar Widgets ===== */
.widget { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius); margin-bottom: 16px; overflow: hidden; }
.widget-title { background: var(--primary); color: #fff; padding: 10px 14px; font-weight: 700; font-size: .9rem; text-transform: uppercase; letter-spacing: .5px; }
.widget-body { padding: 14px; }
.widget-list li { padding: 6px 0; border-bottom: 1px solid var(--border); font-size: .88rem; }
.widget-list li:last-child { border-bottom: none; }
.widget-stat { display: flex; justify-content: space-between; align-items: center; padding: 6px 0; font-size: .88rem; border-bottom: 1px solid var(--border); }
.widget-stat:last-child { border-bottom: none; }

/* ===== BBCode Toolbar ===== */
.bbcode-toolbar { display: flex; flex-wrap: wrap; gap: 4px; padding: 8px; background: var(--bg); border: 1px solid var(--border); border-bottom: none; border-radius: var(--radius) var(--radius) 0 0; }
.bbcode-toolbar .bbcode-btn {
  padding: 4px 10px; background: var(--bg-card); border: 1px solid var(--border);
  border-radius: 4px; cursor: pointer; font-size: .82rem; font-weight: 600;
  color: var(--text); transition: background .15s;
}
.bbcode-toolbar .bbcode-btn:hover { background: var(--primary); color: #fff; border-color: var(--primary); }
.bbcode-toolbar textarea { border-radius: 0 0 var(--radius) var(--radius) !important; }

/* ===== Pagination ===== */
.pagination-nav { margin: 20px 0; }
.pagination { display: flex; flex-wrap: wrap; gap: 4px; }
.page-item .page-link {
  display: flex; align-items: center; justify-content: center;
  min-width: 36px; height: 36px; padding: 0 10px;
  border: 1px solid var(--border); border-radius: var(--radius);
  color: var(--text); font-size: .9rem; transition: all .15s;
}
.page-item.active .page-link { background: var(--primary); border-color: var(--primary); color: #fff; font-weight: 700; }
.page-item:not(.active):not(.disabled) .page-link:hover { background: var(--bg); border-color: var(--primary); color: var(--primary); }
.page-item.disabled .page-link { opacity: .4; pointer-events: none; }

/* ===== Topic title ===== */
.topic-view-title { font-size: 1.4rem; font-weight: 800; color: var(--text); margin-bottom: 8px; }

/* ===== Reply box ===== */
.reply-box { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius); padding: 20px; margin-top: 24px; }
.reply-box h3 { margin-bottom: 14px; font-size: 1rem; color: var(--text); }

/* ===== Profile ===== */
.profile-header { display: flex; gap: 20px; align-items: flex-start; flex-wrap: wrap; }
.profile-avatar-wrap { position: relative; }
.profile-avatar { width: 100px; height: 100px; border-radius: 50%; object-fit: cover; border: 3px solid var(--primary); }
.profile-info h2 { font-size: 1.5rem; }
.profile-meta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 8px; font-size: .88rem; color: var(--text-muted); }
.profile-meta span { display: flex; align-items: center; gap: 4px; }

/* ===== Search ===== */
.search-form { display: flex; gap: 8px; margin-bottom: 20px; }
.search-form .form-control { flex: 1; }
.search-result { padding: 14px 0; border-bottom: 1px solid var(--border); }
.search-result:last-child { border-bottom: none; }
.search-result h4 a { font-size: 1rem; }
.search-result p { font-size: .87rem; color: var(--text-muted); margin-top: 4px; }

/* ===== Messages ===== */
.message-item { display: flex; gap: 12px; padding: 12px; border-bottom: 1px solid var(--border); transition: background .15s; }
.message-item:hover { background: var(--bg); }
.message-item.unread { background: #eff6ff; }
.message-item:last-child { border-bottom: none; }

/* ===== Admin ===== */
.admin-wrap { display: flex; min-height: 100vh; }
.admin-sidebar {
  width: 240px; flex-shrink: 0;
  background: #1e1b4b; color: #c7d2fe;
  display: flex; flex-direction: column;
}
.admin-sidebar-logo { padding: 20px 16px; font-size: 1.1rem; font-weight: 800; color: #fff; border-bottom: 1px solid rgba(255,255,255,.1); }
.admin-nav { padding: 12px 0; flex: 1; }
.admin-nav a {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 20px; color: #a5b4fc;
  font-size: .9rem; font-weight: 500;
  transition: background .15s, color .15s;
}
.admin-nav a:hover, .admin-nav a.active { background: rgba(255,255,255,.1); color: #fff; }
.admin-nav .nav-section { padding: 14px 20px 4px; font-size: .72rem; font-weight: 700; text-transform: uppercase; letter-spacing: 1px; color: #6366f1; }
.admin-content { flex: 1; padding: 28px; background: #f3f4f6; }
.admin-top-bar { display: flex; justify-content: space-between; align-items: center; margin-bottom: 24px; }
.admin-top-bar h1 { font-size: 1.5rem; color: #1e1b4b; }
.stat-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 16px; margin-bottom: 24px; }
.stat-card { background: #fff; border-radius: var(--radius); padding: 20px; box-shadow: var(--shadow); display: flex; flex-direction: column; gap: 6px; }
.stat-card .stat-label { font-size: .82rem; color: var(--text-muted); font-weight: 600; text-transform: uppercase; letter-spacing: .5px; }
.stat-card .stat-value { font-size: 2rem; font-weight: 800; color: var(--primary); }
.stat-card .stat-icon { font-size: 1.8rem; }

/* ===== Footer ===== */
.site-footer {
  background: var(--bg-header); color: rgba(255,255,255,.65);
  padding: 32px 0 20px; margin-top: auto;
}
.footer-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px,1fr)); gap: 24px; margin-bottom: 24px; }
.footer-col h4 { color: #fff; font-size: .95rem; margin-bottom: 12px; }
.footer-col ul li { margin-bottom: 6px; }
.footer-col ul li a { color: rgba(255,255,255,.6); font-size: .88rem; }
.footer-col ul li a:hover { color: #fff; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.1); padding-top: 16px; text-align: center; font-size: .82rem; }
.online-bar { background: rgba(255,255,255,.06); padding: 6px 0; text-align: center; font-size: .82rem; margin-bottom: 20px; }

/* ===== Misc ===== */
.text-center { text-align: center; }
.text-muted { color: var(--text-muted); }
.d-flex { display: flex; }
.align-center { align-items: center; }
.justify-between { justify-content: space-between; }
.gap-8 { gap: 8px; }
.mt-1 { margin-top: 8px; } .mt-2 { margin-top: 16px; } .mt-3 { margin-top: 24px; }
.mb-1 { margin-bottom: 8px; } .mb-2 { margin-bottom: 16px; } .mb-3 { margin-bottom: 24px; }
.w-100 { width: 100%; }
.divider { border: none; border-top: 1px solid var(--border); margin: 16px 0; }
.loading { opacity: .5; pointer-events: none; }
.like-btn { background: none; border: 1px solid var(--border); border-radius: var(--radius); padding: 4px 10px; cursor: pointer; font-size: .82rem; color: var(--text-muted); transition: all .2s; display: inline-flex; align-items: center; gap: 4px; }
.like-btn:hover, .like-btn.liked { border-color: var(--primary); color: var(--primary); background: rgba(79,70,229,.07); }
.quote-btn { background: none; border: none; cursor: pointer; color: var(--text-muted); font-size: .82rem; padding: 4px 8px; border-radius: 4px; transition: color .2s; }
.quote-btn:hover { color: var(--primary); }
.ad-block { margin: 16px 0; text-align: center; }

/* ═══════════════════════════════════════════
   KARANLK TEMA — Forum Custom CSS
   ═══════════════════════════════════════════ */

:root {
  --primary:         #818cf8;
  --primary-dark:    #6366f1;
  --secondary:       #94a3b8;
  --accent:          #34d399;
  --bg:              #0f0f13;
  --bg-card:         #18181f;
  --bg-header:       #0d0d12;
  --text:            #e2e8f0;
  --text-muted:      #64748b;
  --text-header:     #f1f5f9;
  --border:          #27272f;
  --shadow:          0 1px 4px rgba(0,0,0,.5);
  --shadow-md:       0 4px 16px rgba(0,0,0,.6);
}

/* ── Base ── */
body {
  background: #0f0f13;
  color: #e2e8f0;
}

/* ── Header ── */
.site-header {
  background: #0d0d12;
  border-bottom: 1px solid #1e1e28;
  box-shadow: 0 2px 12px rgba(0,0,0,.6);
}
.site-nav a { color: rgba(255,255,255,.65); }
.site-nav a:hover,
.site-nav a.active {
  background: rgba(129,140,248,.15);
  color: #818cf8;
}

/* ── Cards ── */
.card {
  background: #18181f;
  border-color: #27272f;
  box-shadow: 0 2px 8px rgba(0,0,0,.4);
}
.card-header {
  background: linear-gradient(135deg, #312e81, #1e1b4b);
  border-bottom: 1px solid #27272f;
}

/* ── Category items ── */
.category-item {
  background: #18181f;
  border-color: #27272f;
}
.category-item:hover {
  background: #1e1e2a;
  border-color: #818cf8;
  box-shadow: 0 0 0 1px #818cf844;
}
.category-name a { color: #e2e8f0; }
.category-name a:hover { color: #818cf8; }

.sub-cat-item {
  border-left-color: #27272f;
}
.sub-cat-item a { color: #cbd5e1; }
.sub-cat-item a:hover { color: #818cf8; }

/* ── Topic list ── */
.topic-list-header {
  background: #13131a;
  border-color: #27272f;
  color: #475569;
}
.topic-item {
  background: #18181f;
  border-color: #27272f;
}
.topic-item:hover { background: #1c1c26; }
.topic-item.pinned { background: #1a1a10; }
.topic-item.announcement { background: #111a28; }
.topic-title a { color: #cbd5e1; }
.topic-title a:hover { color: #818cf8; }

/* ── Post ── */
.post-item {
  background: #18181f;
  border-color: #27272f;
}
.post-author {
  background: #13131a;
  border-right-color: #27272f;
}
.post-author-name a { color: #e2e8f0; }
.post-header,
.post-footer {
  background: #13131a;
  border-color: #27272f;
  color: #475569;
}
.post-signature { border-top-color: #27272f; }
.post-content blockquote.bbcode-quote {
  background: #13131a;
  border-left-color: #818cf8;
}
.post-content pre.bbcode-code {
  background: #0d0d12;
  border: 1px solid #27272f;
}

/* ── Reply box ── */
.reply-box {
  background: #18181f;
  border-color: #27272f;
}

/* ── Forms ── */
.form-control {
  background: #13131a;
  border-color: #27272f;
  color: #e2e8f0;
}
.form-control:focus {
  border-color: #818cf8;
  box-shadow: 0 0 0 3px rgba(129,140,248,.2);
  background: #16161e;
}
.form-control::placeholder { color: #334155; }

/* ── BBCode toolbar ── */
.bbcode-toolbar {
  background: #13131a;
  border-color: #27272f;
}
.bbcode-btn {
  background: #1e1e2a;
  border-color: #27272f;
  color: #94a3b8;
}
.bbcode-btn:hover {
  background: #818cf8;
  color: #fff;
  border-color: #818cf8;
}

/* ── Buttons ── */
.btn-primary {
  background: #4f46e5;
  border-color: #4f46e5;
}
.btn-primary:hover {
  background: #6366f1;
  border-color: #6366f1;
}
.btn-secondary {
  background: #1e1e2a;
  border-color: #27272f;
  color: #cbd5e1;
}
.btn-secondary:hover {
  background: #27272f;
  border-color: #374151;
}
.btn-ghost { color: #818cf8; }
.btn-ghost:hover { background: rgba(129,140,248,.12); }

/* ── Pagination ── */
.page-item .page-link {
  background: #18181f;
  border-color: #27272f;
  color: #94a3b8;
}
.page-item.active .page-link {
  background: #4f46e5;
  border-color: #4f46e5;
  color: #fff;
}
.page-item:not(.active):not(.disabled) .page-link:hover {
  background: #1e1e2a;
  border-color: #818cf8;
  color: #818cf8;
}

/* ── Sidebar widgets ── */
.widget {
  background: #18181f;
  border-color: #27272f;
}
.widget-title {
  background: linear-gradient(135deg, #312e81, #1e1b4b);
}
.widget-list li,
.widget-stat {
  border-bottom-color: #27272f;
  color: #94a3b8;
}

/* ── Alerts ── */
.alert-success { background: #052e16; border-color: #166534; color: #4ade80; }
.alert-danger  { background: #1c0a0a; border-color: #991b1b; color: #f87171; }
.alert-warning { background: #1c1500; border-color: #92400e; color: #fbbf24; }
.alert-info    { background: #0c1a2e; border-color: #1e40af; color: #60a5fa; }

/* ── Table ── */
.table th { background: #13131a; color: #64748b; border-bottom-color: #27272f; }
.table td { border-bottom-color: #27272f; }
.table tr:hover td { background: #1c1c26; }

/* ── Badges ── */
.badge-pinned      { background: #2d2506; color: #fbbf24; }
.badge-locked      { background: #1c0a0a; color: #f87171; }
.badge-announcement{ background: #0c1a2e; color: #60a5fa; }
.badge-new         { background: #052e16; color: #4ade80; }

/* ── Breadcrumb ── */
.breadcrumb { color: #475569; }
.breadcrumb a { color: #818cf8; }
.breadcrumb-sep { color: #27272f; }

/* ── Profile ── */
.profile-avatar { border-color: #4f46e5; }

/* ── Search ── */
.search-result { border-bottom-color: #27272f; }

/* ── Messages ── */
.message-item:hover { background: #1c1c26; }
.message-item.unread { background: #0c1a2e; }

/* ── Like / Quote buttons ── */
.like-btn {
  border-color: #27272f;
  color: #475569;
  background: transparent;
}
.like-btn:hover,
.like-btn.liked {
  border-color: #818cf8;
  color: #818cf8;
  background: rgba(129,140,248,.1);
}
.quote-btn { color: #475569; }
.quote-btn:hover { color: #818cf8; }

/* ── Footer ── */
.site-footer {
  background: #0d0d12;
  border-top: 1px solid #1e1e28;
}
.online-bar { background: rgba(255,255,255,.03); }
.footer-col h4 { color: #e2e8f0; }
.footer-col ul li a { color: rgba(255,255,255,.4); }
.footer-col ul li a:hover { color: #818cf8; }
.footer-bottom { border-top-color: #1e1e28; color: rgba(255,255,255,.3); }

/* ── Scrollbar ── */
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: #0f0f13; }
::-webkit-scrollbar-thumb { background: #27272f; border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: #374151; }

/* ── Selection highlight ── */
::selection { background: #4f46e5; color: #fff; }
