/* ============================================================
   L2JPremium Forum — Design System (Inspirado no Discourse)
   Dark Gaming Theme | Inter Font
   ============================================================ */

/* ---------- CSS Variables ---------- */
:root {
  /* Colors */
  --primary:        #6C63FF;
  --primary-dark:   #5A52E0;
  --primary-light:  #8B85FF;
  --accent:         #FF6B35;
  --accent2:        #FFA502;
  --success:        #2ED573;
  --danger:         #FF4757;
  --warning:        #FFA502;
  --info:           #74B9FF;

  /* Backgrounds */
  --bg-body:        #0D0D1A;
  --bg-surface:     #13132A;
  --bg-card:        #1A1A35;
  --bg-card-hover:  #20203F;
  --bg-input:       #0F0F20;
  --bg-code:        #0A0A15;

  /* Borders */
  --border:         rgba(108, 99, 255, 0.15);
  --border-hover:   rgba(108, 99, 255, 0.4);

  /* Text */
  --text-primary:   #F0F0FF;
  --text-secondary: #9090B0;
  --text-muted:     #5A5A7A;
  --text-link:      #8B85FF;

  /* Navbar */
  --navbar-h:       64px;

  /* Shadows */
  --shadow-sm:      0 2px 8px rgba(0,0,0,0.4);
  --shadow-md:      0 4px 20px rgba(0,0,0,0.6);
  --shadow-lg:      0 8px 40px rgba(0,0,0,0.8);
  --glow:           0 0 20px rgba(108,99,255,0.3);
  --glow-accent:    0 0 20px rgba(255,107,53,0.3);

  /* Radius */
  --r-sm:  6px;
  --r-md:  10px;
  --r-lg:  16px;
  --r-xl:  24px;
  --r-full: 9999px;

  /* Transitions */
  --t-fast:   0.15s ease;
  --t-normal: 0.25s ease;
  --t-slow:   0.4s ease;
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background-color: var(--bg-body);
  color: var(--text-primary);
  font-size: 15px;
  line-height: 1.6;
  min-height: 100vh;
  padding-top: var(--navbar-h);
  -webkit-font-smoothing: antialiased;
}

a { color: var(--text-link); text-decoration: none; transition: color var(--t-fast); }
a:hover { color: var(--primary-light); }
img { max-width: 100%; height: auto; }
ul, ol { list-style: none; }

/* ---------- Scrollbar ---------- */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: var(--bg-body); }
::-webkit-scrollbar-thumb { background: var(--primary); border-radius: var(--r-full); }

/* ---------- Container ---------- */
.container {
  max-width: 1140px;
  margin: 0 auto;
  padding: 0 20px;
}
.container-sm { max-width: 760px; margin: 0 auto; padding: 0 20px; }

/* ============================================================
   NAVBAR
   ============================================================ */
.navbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: var(--navbar-h);
  background: rgba(13,13,26,0.92);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
  z-index: 1000;
  transition: box-shadow var(--t-normal);
}
.navbar.scrolled { box-shadow: var(--shadow-md); }

.navbar-inner {
  display: flex;
  align-items: center;
  gap: 16px;
  height: 100%;
}

.navbar-brand { text-decoration: none; flex-shrink: 0; }
.navbar-logo { display: flex; align-items: center; gap: 8px; }
.logo-icon { font-size: 24px; }
.logo-text { font-size: 18px; font-weight: 800; color: var(--text-primary); letter-spacing: -0.5px; }
.logo-accent { color: var(--primary); }

/* Search */
.navbar-search {
  flex: 1;
  display: flex;
  align-items: center;
  max-width: 400px;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--r-full);
  overflow: hidden;
  transition: border-color var(--t-normal), box-shadow var(--t-normal);
}
.navbar-search:focus-within {
  border-color: var(--primary);
  box-shadow: var(--glow);
}
.search-input {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  padding: 8px 16px;
  color: var(--text-primary);
  font-size: 14px;
  font-family: inherit;
}
.search-input::placeholder { color: var(--text-muted); }
.search-btn {
  background: transparent;
  border: none;
  padding: 8px 14px;
  cursor: pointer;
  font-size: 16px;
  color: var(--text-secondary);
  transition: color var(--t-fast);
}
.search-btn:hover { color: var(--primary); }

/* Actions */
.navbar-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}

.nav-icon-btn {
  position: relative;
  background: transparent;
  border: none;
  font-size: 18px;
  cursor: pointer;
  color: var(--text-secondary);
  text-decoration: none;
  padding: 6px;
  border-radius: var(--r-sm);
  transition: color var(--t-fast), background var(--t-fast);
}
.nav-icon-btn:hover { color: var(--primary); background: rgba(108,99,255,0.1); }

.notif-badge {
  position: absolute;
  top: 0; right: 0;
  background: var(--danger);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  min-width: 16px;
  height: 16px;
  border-radius: var(--r-full);
  display: flex; align-items: center; justify-content: center;
  padding: 0 3px;
  line-height: 1;
  transform: translate(4px, -4px);
}

/* Avatar menu */
.avatar-menu { position: relative; }
.avatar-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: var(--r-full);
  padding: 4px 12px 4px 4px;
  cursor: pointer;
  transition: border-color var(--t-fast), background var(--t-fast);
}
.avatar-btn:hover { border-color: var(--primary); background: rgba(108,99,255,0.1); }
.avatar-sm { width: 32px; height: 32px; border-radius: 50%; object-fit: cover; }
.username-label { font-size: 14px; font-weight: 500; color: var(--text-primary); }

.dropdown-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  min-width: 200px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-8px);
  transition: opacity var(--t-normal), transform var(--t-normal), visibility var(--t-normal);
  z-index: 100;
}
.dropdown-menu.open {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}
.dropdown-item {
  display: block;
  padding: 10px 16px;
  color: var(--text-primary);
  font-size: 14px;
  transition: background var(--t-fast);
  text-decoration: none;
}
.dropdown-item:hover { background: rgba(108,99,255,0.15); color: var(--text-primary); }
.dropdown-divider { height: 1px; background: var(--border); margin: 4px 0; }
.text-danger { color: var(--danger) !important; }

.mobile-menu-btn {
  display: none;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  padding: 6px 10px;
  font-size: 18px;
  cursor: pointer;
  color: var(--text-primary);
}
.mobile-search-bar { display: none; }

/* ============================================================
   BUTTONS
   ============================================================ */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 20px;
  border-radius: var(--r-full);
  font-size: 14px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  border: none;
  text-decoration: none;
  transition: all var(--t-normal);
  white-space: nowrap;
  user-select: none;
}
.btn:disabled { opacity: 0.5; cursor: not-allowed; }
.btn-sm  { padding: 6px 14px; font-size: 13px; }
.btn-lg  { padding: 14px 28px; font-size: 16px; }
.btn-block { width: 100%; justify-content: center; }

.btn-primary {
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: #fff;
  box-shadow: 0 4px 15px rgba(108,99,255,0.4);
}
.btn-primary:hover {
  background: linear-gradient(135deg, var(--primary-light), var(--primary));
  box-shadow: 0 4px 25px rgba(108,99,255,0.6);
  transform: translateY(-1px);
  color: #fff;
}

.btn-accent {
  background: linear-gradient(135deg, var(--accent), #E05520);
  color: #fff;
  box-shadow: 0 4px 15px rgba(255,107,53,0.4);
}
.btn-accent:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 25px rgba(255,107,53,0.6);
  color: #fff;
}

.btn-ghost {
  background: transparent;
  color: var(--text-secondary);
  border: 1px solid var(--border);
}
.btn-ghost:hover { border-color: var(--primary); color: var(--primary); background: rgba(108,99,255,0.1); }

.btn-danger {
  background: linear-gradient(135deg, var(--danger), #CC0011);
  color: #fff;
}
.btn-danger:hover { transform: translateY(-1px); color: #fff; }

.btn-success {
  background: linear-gradient(135deg, var(--success), #1AAF50);
  color: #fff;
}
.btn-success:hover { transform: translateY(-1px); color: #fff; }

/* ============================================================
   CARDS
   ============================================================ */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  overflow: hidden;
  transition: border-color var(--t-normal), box-shadow var(--t-normal), transform var(--t-normal);
}
.card:hover { border-color: var(--border-hover); box-shadow: var(--shadow-md); }
.card-body { padding: 20px; }
.card-header {
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.card-title { font-size: 16px; font-weight: 700; color: var(--text-primary); }

/* ============================================================
   MAIN CONTENT
   ============================================================ */
.main-content {
  min-height: calc(100vh - var(--navbar-h));
  padding: 32px 0 60px;
}

/* ============================================================
   HOME — Categorias
   ============================================================ */
.hero-banner {
  position: relative;
  background: linear-gradient(135deg, var(--bg-surface) 0%, #1A0A35 50%, var(--bg-surface) 100%);
  border-bottom: 1px solid var(--border);
  padding: 48px 0 40px;
  margin-bottom: 40px;
  overflow: hidden;
}
.hero-banner::before {
  content: '';
  position: absolute;
  top: -50%; left: -20%;
  width: 60%; height: 200%;
  background: radial-gradient(ellipse, rgba(108,99,255,0.15) 0%, transparent 70%);
  pointer-events: none;
}
.hero-banner::after {
  content: '';
  position: absolute;
  top: -30%; right: -10%;
  width: 50%; height: 160%;
  background: radial-gradient(ellipse, rgba(255,107,53,0.08) 0%, transparent 70%);
  pointer-events: none;
}
.hero-content { position: relative; z-index: 1; }
.hero-title {
  font-size: 36px;
  font-weight: 800;
  letter-spacing: -1px;
  background: linear-gradient(135deg, #fff 30%, var(--primary-light));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 12px;
}
.hero-subtitle { font-size: 16px; color: var(--text-secondary); margin-bottom: 24px; }
.hero-stats {
  display: flex;
  gap: 32px;
  flex-wrap: wrap;
}
.hero-stat { text-align: center; }
.hero-stat-num {
  font-size: 28px;
  font-weight: 800;
  color: var(--primary-light);
  display: block;
}
.hero-stat-label { font-size: 12px; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.5px; }

/* Categories Grid */
.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
}
.section-title { font-size: 20px; font-weight: 700; color: var(--text-primary); }

.categories-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 16px;
  margin-bottom: 40px;
}

.category-card {
  display: block;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 20px;
  text-decoration: none;
  transition: all var(--t-normal);
  position: relative;
  overflow: hidden;
}
.category-card::before {
  content: '';
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 4px;
  background: var(--cat-color, var(--primary));
  border-radius: var(--r-sm) 0 0 var(--r-sm);
  transition: width var(--t-normal);
}
.category-card:hover {
  border-color: var(--border-hover);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}
.category-card:hover::before { width: 6px; }

.cat-top { display: flex; align-items: flex-start; gap: 14px; }
.cat-icon {
  width: 48px; height: 48px;
  background: rgba(108,99,255,0.1);
  border-radius: var(--r-md);
  display: flex; align-items: center; justify-content: center;
  font-size: 24px;
  flex-shrink: 0;
  transition: background var(--t-normal);
}
.category-card:hover .cat-icon { background: rgba(108,99,255,0.2); }
.cat-name { font-size: 16px; font-weight: 700; color: var(--text-primary); margin-bottom: 4px; }
.cat-desc { font-size: 13px; color: var(--text-secondary); line-height: 1.5; }
.cat-stats {
  display: flex;
  gap: 16px;
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid var(--border);
}
.cat-stat { font-size: 12px; color: var(--text-muted); }
.cat-stat strong { color: var(--text-secondary); font-weight: 600; }

/* Recent Topics */
.topic-list { display: flex; flex-direction: column; gap: 0; }
.topic-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 0;
  border-bottom: 1px solid var(--border);
  transition: background var(--t-fast);
}
.topic-item:last-child { border-bottom: none; }
.topic-item:hover { background: rgba(108,99,255,0.04); border-radius: var(--r-sm); margin: 0 -8px; padding: 14px 8px; }

.topic-avatar img { width: 40px; height: 40px; border-radius: 50%; object-fit: cover; border: 2px solid var(--border); }
.topic-main { flex: 1; min-width: 0; }
.topic-title-link {
  font-size: 15px;
  font-weight: 600;
  color: var(--text-primary);
  text-decoration: none;
  display: block;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  transition: color var(--t-fast);
}
.topic-title-link:hover { color: var(--primary-light); }
.topic-meta { font-size: 12px; color: var(--text-muted); margin-top: 3px; }
.topic-meta a { color: var(--text-muted); }
.topic-meta a:hover { color: var(--text-secondary); }

.topic-stats {
  display: flex;
  gap: 16px;
  flex-shrink: 0;
  text-align: center;
}
.topic-stat { font-size: 13px; color: var(--text-secondary); }
.topic-stat .num { font-weight: 700; display: block; font-size: 15px; }

.pin-icon { color: var(--accent2); font-size: 14px; }
.lock-icon { color: var(--text-muted); font-size: 14px; }

/* ============================================================
   TOPIC PAGE
   ============================================================ */
.topic-header {
  background: var(--bg-surface);
  border-bottom: 1px solid var(--border);
  padding: 28px 0;
  margin-bottom: 32px;
}
.topic-header-inner {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
}
.topic-page-title {
  font-size: 26px;
  font-weight: 800;
  letter-spacing: -0.5px;
  color: var(--text-primary);
  margin-bottom: 10px;
  line-height: 1.3;
}
.breadcrumb { display: flex; align-items: center; gap: 6px; font-size: 13px; color: var(--text-muted); }
.breadcrumb a { color: var(--text-muted); }
.breadcrumb a:hover { color: var(--primary-light); }
.breadcrumb span { color: var(--text-muted); }

/* Posts */
.posts-container { display: flex; flex-direction: column; gap: 8px; margin-bottom: 32px; }

.post-item {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  overflow: hidden;
  transition: border-color var(--t-normal);
  animation: fadeInUp 0.3s ease both;
}
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: translateY(0); }
}
.post-item:hover { border-color: var(--border-hover); }
.post-item.first-post { border-color: rgba(108,99,255,0.3); }

.post-inner { display: flex; gap: 0; }

.post-aside {
  width: 80px;
  flex-shrink: 0;
  background: rgba(0,0,0,0.2);
  padding: 20px 12px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  border-right: 1px solid var(--border);
}
.post-aside img {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--border);
  transition: border-color var(--t-fast);
}
.post-aside img:hover { border-color: var(--primary); }
.post-user-name { font-size: 11px; font-weight: 700; color: var(--text-primary); text-align: center; word-break: break-word; }
.post-trust-badge {
  font-size: 10px;
  padding: 2px 6px;
  border-radius: var(--r-full);
  font-weight: 600;
  white-space: nowrap;
}

.post-body {
  flex: 1;
  padding: 20px;
  min-width: 0;
}
.post-meta { font-size: 12px; color: var(--text-muted); margin-bottom: 14px; display: flex; align-items: center; gap: 8px; }
.post-num { background: rgba(108,99,255,0.15); color: var(--primary-light); padding: 2px 8px; border-radius: var(--r-full); font-weight: 600; font-size: 11px; }

/* Post Content (Rich Text) */
.post-content { color: var(--text-primary); line-height: 1.75; }
.post-content h2, .post-content h3, .post-content h4 { margin: 20px 0 10px; font-weight: 700; }
.post-content p  { margin-bottom: 12px; }
.post-content ul, .post-content ol { margin: 12px 0 12px 20px; list-style: revert; }
.post-content li { margin-bottom: 4px; }
.post-content blockquote {
  border-left: 4px solid var(--primary);
  background: rgba(108,99,255,0.08);
  padding: 12px 16px;
  margin: 16px 0;
  border-radius: 0 var(--r-sm) var(--r-sm) 0;
  color: var(--text-secondary);
}
.post-content pre {
  background: var(--bg-code);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  padding: 16px;
  overflow-x: auto;
  margin: 16px 0;
}
.post-content code {
  font-family: 'Fira Code', 'Courier New', monospace;
  font-size: 13px;
  color: var(--primary-light);
}
.post-content a { color: var(--text-link); text-decoration: underline; }
.post-content img { border-radius: var(--r-md); max-width: 100%; margin: 8px 0; }

.post-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid var(--border);
}

.like-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: var(--r-full);
  padding: 5px 12px;
  font-size: 13px;
  cursor: pointer;
  color: var(--text-secondary);
  font-family: inherit;
  transition: all var(--t-fast);
}
.like-btn:hover, .like-btn.liked {
  border-color: var(--danger);
  color: var(--danger);
  background: rgba(255,71,87,0.1);
}
.like-btn.liked { background: rgba(255,71,87,0.15); }
.like-btn .like-count { font-weight: 700; }

.reply-btn {
  background: transparent;
  border: 1px solid var(--border);
  border-radius: var(--r-full);
  padding: 5px 12px;
  font-size: 13px;
  cursor: pointer;
  color: var(--text-secondary);
  font-family: inherit;
  transition: all var(--t-fast);
}
.reply-btn:hover { border-color: var(--primary); color: var(--primary); background: rgba(108,99,255,0.1); }

/* Reply Box */
.reply-box {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 24px;
  margin-bottom: 16px;
}
.reply-box h3 { font-size: 16px; font-weight: 700; margin-bottom: 16px; }

/* ============================================================
   EDITOR
   ============================================================ */
.editor-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  padding: 10px;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-bottom: none;
  border-radius: var(--r-md) var(--r-md) 0 0;
}
.editor-btn {
  background: transparent;
  border: 1px solid transparent;
  border-radius: var(--r-sm);
  padding: 4px 8px;
  cursor: pointer;
  font-size: 14px;
  color: var(--text-secondary);
  font-family: inherit;
  font-weight: 600;
  transition: all var(--t-fast);
}
.editor-btn:hover { background: rgba(108,99,255,0.15); border-color: var(--border); color: var(--text-primary); }
.editor-sep { width: 1px; background: var(--border); margin: 4px 2px; }

.editor-area {
  width: 100%;
  min-height: 180px;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: 0 0 var(--r-md) var(--r-md);
  padding: 14px;
  color: var(--text-primary);
  font-size: 14px;
  font-family: inherit;
  line-height: 1.7;
  resize: vertical;
  outline: none;
  transition: border-color var(--t-normal);
}
.editor-area:focus { border-color: var(--primary); }

/* contenteditable editor */
.rich-editor {
  width: 100%;
  min-height: 180px;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: 0 0 var(--r-md) var(--r-md);
  padding: 14px;
  color: var(--text-primary);
  font-size: 14px;
  font-family: inherit;
  line-height: 1.7;
  outline: none;
  transition: border-color var(--t-normal);
}
.rich-editor:focus { border-color: var(--primary); }
.rich-editor:empty::before { content: attr(data-placeholder); color: var(--text-muted); pointer-events: none; }

/* ============================================================
   FORMS
   ============================================================ */
.form-group { margin-bottom: 20px; }
.form-label { display: block; font-size: 14px; font-weight: 600; color: var(--text-secondary); margin-bottom: 8px; }
.form-control {
  width: 100%;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  padding: 12px 14px;
  color: var(--text-primary);
  font-size: 15px;
  font-family: inherit;
  outline: none;
  transition: border-color var(--t-normal), box-shadow var(--t-normal);
}
.form-control:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(108,99,255,0.15); }
.form-control::placeholder { color: var(--text-muted); }
select.form-control { cursor: pointer; }
.form-hint { font-size: 12px; color: var(--text-muted); margin-top: 5px; }
.form-error { font-size: 12px; color: var(--danger); margin-top: 5px; display: flex; align-items: center; gap: 4px; }

.alert {
  padding: 14px 18px;
  border-radius: var(--r-md);
  font-size: 14px;
  font-weight: 500;
  margin-bottom: 20px;
  border: 1px solid transparent;
}
.alert-danger  { background: rgba(255,71,87,0.12);  border-color: rgba(255,71,87,0.3);  color: #ff7885; }
.alert-success { background: rgba(46,213,115,0.12); border-color: rgba(46,213,115,0.3); color: #4dff9b; }
.alert-info    { background: rgba(116,185,255,0.12);border-color: rgba(116,185,255,0.3);color: #90caff; }
.alert-warning { background: rgba(255,165,2,0.12);  border-color: rgba(255,165,2,0.3);  color: #ffb833; }

/* ============================================================
   BADGES
   ============================================================ */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 10px;
  border-radius: var(--r-full);
  font-size: 12px;
  font-weight: 700;
  background: rgba(108,99,255,0.2);
  color: var(--primary-light);
}
.badge-admin   { background: rgba(255,71,87,0.2);  color: #ff7885; }
.badge-lider   { background: rgba(255,165,2,0.2);  color: #ffb833; }
.badge-regular { background: rgba(46,213,115,0.2); color: #4dff9b; }
.badge-membro  { background: rgba(116,185,255,0.2);color: #90caff; }

/* Achievement badges */
.achievement-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  padding: 10px 14px;
  font-size: 13px;
  font-weight: 600;
  transition: all var(--t-normal);
}
.achievement-badge:hover { border-color: var(--border-hover); transform: translateY(-1px); }
.achievement-badge .badge-icon { font-size: 20px; }

/* ============================================================
   PROFILE PAGE
   ============================================================ */
.profile-hero {
  background: linear-gradient(135deg, var(--bg-surface), #1A0A35);
  border-bottom: 1px solid var(--border);
  padding: 40px 0 32px;
  margin-bottom: 32px;
  position: relative;
  overflow: hidden;
}
.profile-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at 30% 50%, rgba(108,99,255,0.12) 0%, transparent 70%);
}
.profile-hero-inner { position: relative; z-index: 1; display: flex; align-items: flex-start; gap: 24px; }
.profile-avatar-wrap { position: relative; }
.profile-avatar {
  width: 96px;
  height: 96px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid var(--primary);
  box-shadow: var(--glow);
}
.profile-info h1 { font-size: 28px; font-weight: 800; letter-spacing: -0.5px; margin-bottom: 6px; }
.profile-bio { color: var(--text-secondary); font-size: 14px; margin-bottom: 12px; max-width: 500px; }
.profile-meta { display: flex; gap: 20px; flex-wrap: wrap; }
.profile-meta-item { font-size: 13px; color: var(--text-muted); }
.profile-meta-item strong { color: var(--text-primary); font-weight: 700; }

.profile-stats-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-bottom: 24px;
}
.profile-stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 20px;
  text-align: center;
}
.profile-stat-num { font-size: 32px; font-weight: 800; color: var(--primary-light); display: block; }
.profile-stat-label { font-size: 13px; color: var(--text-muted); margin-top: 4px; }

.badges-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

/* ============================================================
   ADMIN PANEL
   ============================================================ */
.admin-layout { display: grid; grid-template-columns: 240px 1fr; gap: 24px; }
.admin-sidebar {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 16px;
  height: fit-content;
  position: sticky;
  top: calc(var(--navbar-h) + 24px);
}
.admin-sidebar h3 { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 1px; color: var(--text-muted); padding: 8px 10px 4px; }
.admin-nav-link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px;
  border-radius: var(--r-sm);
  font-size: 14px;
  font-weight: 500;
  color: var(--text-secondary);
  text-decoration: none;
  transition: all var(--t-fast);
}
.admin-nav-link:hover, .admin-nav-link.active {
  background: rgba(108,99,255,0.15);
  color: var(--primary-light);
}

.stats-cards {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 32px;
}
.stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 20px;
  position: relative;
  overflow: hidden;
}
.stat-card::before {
  content: '';
  position: absolute;
  top: -30px; right: -30px;
  width: 80px; height: 80px;
  background: radial-gradient(circle, var(--stat-color, var(--primary)), transparent);
  opacity: 0.15;
  border-radius: 50%;
}
.stat-card-icon { font-size: 28px; margin-bottom: 10px; display: block; }
.stat-card-num  { font-size: 36px; font-weight: 800; color: var(--text-primary); line-height: 1; }
.stat-card-label{ font-size: 13px; color: var(--text-muted); margin-top: 6px; }

/* Admin Tables */
.admin-table-wrap { overflow-x: auto; }
.admin-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}
.admin-table th {
  text-align: left;
  padding: 12px 14px;
  background: var(--bg-input);
  color: var(--text-muted);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  border-bottom: 1px solid var(--border);
}
.admin-table td {
  padding: 12px 14px;
  border-bottom: 1px solid var(--border);
  color: var(--text-primary);
  vertical-align: middle;
}
.admin-table tr:hover td { background: rgba(108,99,255,0.04); }
.admin-table tr:last-child td { border-bottom: none; }

/* ============================================================
   NOTIFICATIONS
   ============================================================ */
.notif-list { display: flex; flex-direction: column; gap: 4px; }
.notif-item {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 14px 16px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  transition: all var(--t-fast);
  text-decoration: none;
  color: var(--text-primary);
}
.notif-item:hover { border-color: var(--border-hover); background: var(--bg-card-hover); }
.notif-item.unread { border-color: rgba(108,99,255,0.3); background: rgba(108,99,255,0.06); }
.notif-icon { font-size: 24px; flex-shrink: 0; }
.notif-content { flex: 1; }
.notif-text { font-size: 14px; font-weight: 500; }
.notif-time { font-size: 12px; color: var(--text-muted); margin-top: 3px; }
.unread-dot { width: 8px; height: 8px; background: var(--primary); border-radius: 50%; flex-shrink: 0; margin-top: 5px; }

/* ============================================================
   SEARCH
   ============================================================ */
.search-hero { padding: 40px 0; text-align: center; }
.search-hero-title { font-size: 32px; font-weight: 800; margin-bottom: 20px; }
.search-bar-lg {
  display: flex;
  max-width: 600px;
  margin: 0 auto;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--r-full);
  overflow: hidden;
  box-shadow: var(--shadow-md);
  transition: border-color var(--t-normal), box-shadow var(--t-normal);
}
.search-bar-lg:focus-within { border-color: var(--primary); box-shadow: var(--glow); }
.search-bar-lg input {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  padding: 14px 20px;
  font-size: 16px;
  color: var(--text-primary);
  font-family: inherit;
}
.search-bar-lg button { background: var(--primary); border: none; padding: 14px 24px; cursor: pointer; font-size: 16px; color: #fff; border-radius: var(--r-full); margin: 4px; transition: background var(--t-fast); }
.search-bar-lg button:hover { background: var(--primary-dark); }

.search-result-item {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 18px;
  margin-bottom: 12px;
  transition: all var(--t-normal);
}
.search-result-item:hover { border-color: var(--border-hover); transform: translateY(-1px); box-shadow: var(--shadow-sm); }
.search-result-title { font-size: 16px; font-weight: 700; color: var(--text-primary); margin-bottom: 6px; }
.search-result-title a { color: var(--text-primary); }
.search-result-title a:hover { color: var(--primary-light); }
.search-result-excerpt { font-size: 13px; color: var(--text-secondary); line-height: 1.6; }
.search-result-meta { font-size: 12px; color: var(--text-muted); margin-top: 8px; }
em.highlight { background: rgba(108,99,255,0.3); color: var(--primary-light); border-radius: 2px; padding: 0 2px; font-style: normal; }

/* ============================================================
   LOGIN / REGISTER
   ============================================================ */
.auth-page {
  min-height: calc(100vh - var(--navbar-h));
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 20px;
  position: relative;
}
.auth-page::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse at 20% 30%, rgba(108,99,255,0.12) 0%, transparent 60%),
    radial-gradient(ellipse at 80% 70%, rgba(255,107,53,0.08) 0%, transparent 60%);
  pointer-events: none;
}

.auth-card {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 440px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--r-xl);
  padding: 40px;
  box-shadow: var(--shadow-lg);
}
.auth-logo { text-align: center; margin-bottom: 32px; }
.auth-logo .logo-icon { font-size: 40px; display: block; margin-bottom: 8px; }
.auth-logo h1 { font-size: 24px; font-weight: 800; }
.auth-title { font-size: 22px; font-weight: 800; margin-bottom: 8px; text-align: center; }
.auth-subtitle { font-size: 14px; color: var(--text-secondary); text-align: center; margin-bottom: 28px; }
.auth-footer { text-align: center; margin-top: 20px; font-size: 14px; color: var(--text-muted); }
.auth-footer a { color: var(--primary-light); font-weight: 600; }

/* ============================================================
   PAGINATION
   ============================================================ */
.pagination { display: flex; align-items: center; justify-content: center; gap: 6px; margin-top: 24px; }
.page-btn {
  width: 36px; height: 36px;
  display: flex; align-items: center; justify-content: center;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  font-size: 14px;
  font-weight: 600;
  color: var(--text-secondary);
  text-decoration: none;
  transition: all var(--t-fast);
}
.page-btn:hover, .page-btn.active {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
}
.page-btn.disabled { opacity: 0.4; pointer-events: none; }

/* ============================================================
   FOOTER
   ============================================================ */
.site-footer {
  background: var(--bg-surface);
  border-top: 1px solid var(--border);
  padding: 40px 0 0;
  margin-top: auto;
}
.footer-inner {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 40px;
  flex-wrap: wrap;
  padding-bottom: 40px;
}
.footer-brand .logo-text { font-size: 20px; font-weight: 800; }
.footer-brand p { font-size: 13px; color: var(--text-muted); margin-top: 8px; max-width: 200px; }
.footer-links { display: flex; gap: 48px; flex-wrap: wrap; }
.footer-col { display: flex; flex-direction: column; gap: 10px; }
.footer-col h4 { font-size: 13px; font-weight: 700; color: var(--text-primary); text-transform: uppercase; letter-spacing: 0.5px; }
.footer-col a { font-size: 13px; color: var(--text-muted); transition: color var(--t-fast); }
.footer-col a:hover { color: var(--primary-light); }
.footer-bottom {
  border-top: 1px solid var(--border);
  padding: 16px 0;
  font-size: 13px;
  color: var(--text-muted);
  text-align: center;
}
.footer-bottom a { color: var(--text-muted); }
.footer-bottom a:hover { color: var(--primary-light); }

/* ============================================================
   UTILITIES
   ============================================================ */
.flex  { display: flex; }
.items-center { align-items: center; }
.gap-2 { gap: 8px; }
.gap-3 { gap: 12px; }
.gap-4 { gap: 16px; }
.mt-1 { margin-top: 4px; }
.mt-2 { margin-top: 8px; }
.mt-3 { margin-top: 12px; }
.mt-4 { margin-top: 16px; }
.mt-6 { margin-top: 24px; }
.mb-4 { margin-bottom: 16px; }
.mb-6 { margin-bottom: 24px; }
.text-center { text-align: center; }
.text-right  { text-align: right; }
.text-sm    { font-size: 13px; }
.text-muted { color: var(--text-muted); }
.text-secondary { color: var(--text-secondary); }
.font-bold { font-weight: 700; }
.w-full { width: 100%; }
.hidden { display: none !important; }

/* Divider */
.divider { height: 1px; background: var(--border); margin: 24px 0; }

/* Tag */
.tag {
  display: inline-block;
  padding: 3px 10px;
  background: rgba(108,99,255,0.12);
  border: 1px solid rgba(108,99,255,0.2);
  border-radius: var(--r-full);
  font-size: 12px;
  font-weight: 600;
  color: var(--primary-light);
}

/* Empty state */
.empty-state {
  text-align: center;
  padding: 60px 20px;
  color: var(--text-muted);
}
.empty-state-icon { font-size: 48px; margin-bottom: 16px; }
.empty-state h3 { font-size: 18px; font-weight: 700; color: var(--text-secondary); margin-bottom: 8px; }
.empty-state p { font-size: 14px; }

/* Toast */
.toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.toast {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  padding: 14px 20px;
  font-size: 14px;
  font-weight: 500;
  box-shadow: var(--shadow-lg);
  display: flex;
  align-items: center;
  gap: 10px;
  animation: slideInRight 0.3s ease;
  min-width: 260px;
  max-width: 360px;
}
.toast.success { border-color: var(--success); color: var(--success); }
.toast.error   { border-color: var(--danger);  color: var(--danger);  }
.toast.info    { border-color: var(--primary); color: var(--primary-light); }

@keyframes slideInRight {
  from { opacity: 0; transform: translateX(100%); }
  to   { opacity: 1; transform: translateX(0); }
}
@keyframes slideOutRight {
  from { opacity: 1; transform: translateX(0); }
  to   { opacity: 0; transform: translateX(100%); }
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 768px) {
  .navbar-search { display: none; }
  .mobile-menu-btn { display: flex; }
  .username-label { display: none; }
  .mobile-search-bar {
    display: flex;
    padding: 10px 16px;
    background: var(--bg-surface);
    border-bottom: 1px solid var(--border);
  }
  .mobile-search-bar form { display: flex; width: 100%; background: var(--bg-input); border: 1px solid var(--border); border-radius: var(--r-full); overflow: hidden; }

  .hero-title { font-size: 26px; }
  .categories-grid { grid-template-columns: 1fr; }
  .stats-cards { grid-template-columns: repeat(2, 1fr); }
  .admin-layout { grid-template-columns: 1fr; }
  .admin-sidebar { position: static; }
  .profile-stats-grid { grid-template-columns: repeat(2, 1fr); }
  .post-aside { width: 60px; }
  .post-aside .post-trust-badge { display: none; }
  .auth-card { padding: 28px 20px; }
  .hero-stats { gap: 20px; }
  .footer-inner { flex-direction: column; gap: 24px; }
}

@media (max-width: 480px) {
  .stats-cards { grid-template-columns: 1fr; }
  .profile-stats-grid { grid-template-columns: 1fr; }
  .profile-hero-inner { flex-direction: column; }
  .topic-stats { display: none; }
}

/* ============================================================
   Forum Refresh
   ============================================================ */
body {
  background:
    radial-gradient(circle at 10% 0%, rgba(108, 99, 255, 0.16), transparent 34rem),
    radial-gradient(circle at 90% 12%, rgba(255, 107, 53, 0.10), transparent 32rem),
    linear-gradient(180deg, #090914 0%, #0d0d1a 42%, #090914 100%);
}

.navbar {
  background: rgba(9, 9, 20, 0.88);
}

.main-content {
  padding-top: 24px;
}

.section-header {
  align-items: flex-end;
  gap: 18px;
  padding: 28px;
  background: linear-gradient(135deg, rgba(26,26,53,0.92), rgba(19,19,42,0.78));
  border: 1px solid var(--border);
  border-radius: 18px;
  box-shadow: var(--shadow-md);
}

.section-header h1 {
  letter-spacing: -0.03em;
}

.category-card {
  min-height: 172px;
  display: flex;
  gap: 16px;
  border-radius: 14px;
  background:
    linear-gradient(135deg, rgba(26,26,53,0.98), rgba(15,15,32,0.92));
}

.category-icon,
.cat-icon {
  width: 52px;
  height: 52px;
  flex: 0 0 52px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  background: rgba(108,99,255,0.14);
  font-size: 24px;
  font-weight: 800;
}

.category-content,
.cat-top > div {
  min-width: 0;
}

.category-content h3,
.cat-name {
  font-size: 17px;
  margin-bottom: 6px;
}

.category-content p,
.cat-desc {
  color: var(--text-secondary);
  font-size: 13px;
}

.category-stats,
.cat-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: auto;
  padding-top: 14px;
}

.category-stats span,
.cat-stat {
  padding: 4px 10px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: rgba(255,255,255,0.03);
}

.topic-item {
  align-items: flex-start;
  padding: 18px 0;
}

.topic-title-link {
  white-space: normal;
  line-height: 1.35;
}

.topic-hero {
  margin-top: -24px;
  margin-bottom: 28px;
  padding: 30px 0;
  background: linear-gradient(135deg, rgba(19,19,42,0.96), rgba(26,10,53,0.55));
  border-bottom: 1px solid var(--border);
}

.topic-hero-inner {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 22px;
}

.topic-hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 16px;
}

.topic-actions,
.inline-form,
.composer-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.inline-form {
  margin: 0;
}

.topic-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 24px;
  align-items: start;
}

.topic-side {
  position: sticky;
  top: calc(var(--navbar-h) + 22px);
}

.topic-author {
  display: flex;
  align-items: center;
  gap: 10px;
}

.topic-author img {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  object-fit: cover;
}

.post-item {
  border-radius: 14px;
  background: linear-gradient(180deg, rgba(26,26,53,0.96), rgba(18,18,36,0.96));
}

.post-aside {
  width: 118px;
}

.post-aside img {
  width: 52px;
  height: 52px;
}

.post-user-name {
  color: var(--text-primary);
}

.post-actions {
  gap: 8px;
}

.post-edit-link {
  margin-left: auto;
}

.reply-box,
.composer-card {
  background: linear-gradient(180deg, rgba(26,26,53,0.98), rgba(17,17,35,0.98));
  border: 1px solid var(--border);
  border-radius: 16px;
  box-shadow: var(--shadow-md);
}

.composer-shell {
  max-width: 980px;
  margin: 0 auto;
  padding: 0 20px;
}

.composer-head {
  margin-bottom: 18px;
  padding: 26px;
  border: 1px solid var(--border);
  border-radius: 18px;
  background: linear-gradient(135deg, rgba(26,26,53,0.94), rgba(19,19,42,0.75));
}

.composer-head h1 {
  font-size: 28px;
  line-height: 1.15;
  margin-bottom: 8px;
}

.composer-head p {
  color: var(--text-secondary);
}

.composer-card {
  padding: 24px;
}

.form-grid.two {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(240px, 0.8fr);
  gap: 16px;
}

.rich-editor {
  min-height: 260px;
  background: rgba(8,8,18,0.72);
}

.editor-toolbar {
  background: rgba(8,8,18,0.78);
}

.video-embed {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  margin: 16px 0;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: #05050b;
}

.video-embed iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

@media (max-width: 900px) {
  .topic-hero-inner,
  .section-header {
    align-items: stretch;
    flex-direction: column;
  }

  .topic-layout {
    grid-template-columns: 1fr;
  }

  .topic-side {
    position: static;
  }

  .post-aside {
    width: 86px;
  }

  .form-grid.two {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 620px) {
  .category-card {
    min-height: 0;
  }

  .post-item {
    overflow: visible;
  }

  .post-inner {
    display: block;
  }

  .post-aside {
    width: auto;
    flex-direction: row;
    justify-content: flex-start;
    border-right: 0;
    border-bottom: 1px solid var(--border);
  }

  .post-edit-link {
    margin-left: 0;
  }

  .composer-card {
    padding: 18px;
  }
}

.nav-mini {
  color: var(--text-secondary);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 7px 10px;
  border: 1px solid transparent;
  border-radius: 8px;
}
.nav-mini:hover {
  border-color: rgba(201,162,39,0.28);
  color: #f0d060;
  background: rgba(201,162,39,0.08);
}

.member-shell {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 20px;
  gap: 24px;
}
.member-sidebar {
  position: sticky;
  top: calc(var(--navbar-h) + 20px);
  height: fit-content;
  padding: 16px;
  border: 1px solid rgba(201,162,39,0.18);
  border-radius: 14px;
  background: rgba(8,8,14,0.72);
}
.member-brand {
  color: #f0d060;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 16px;
}
.member-link {
  display: block;
  padding: 11px 12px;
  margin-bottom: 6px;
  border-radius: 8px;
  color: var(--text-secondary);
  border: 1px solid transparent;
}
.member-link:hover,
.member-link.active {
  color: #f0d060;
  background: rgba(201,162,39,0.08);
  border-color: rgba(201,162,39,0.18);
}
.member-link.danger { color: #ff6b5d; }
.member-main { min-width: 0; }
.member-hero,
.pwa-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 24px;
  border-radius: 16px;
  border: 1px solid rgba(201,162,39,0.24);
  background: linear-gradient(135deg, rgba(26,20,12,0.86), rgba(14,14,24,0.92));
  margin-bottom: 18px;
}
.eyebrow,
.section-title-line {
  display: block;
  color: #f0d060;
  font-weight: 900;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}
.member-hero h1 {
  color: #ffd84a;
  font-size: 28px;
  margin: 4px 0 8px;
}
.member-hero p,
.pwa-banner p {
  color: var(--text-secondary);
}
.license-card {
  min-width: 240px;
  padding: 18px;
  border-radius: 12px;
  border: 1px solid rgba(201,162,39,0.35);
  background: rgba(201,162,39,0.08);
}
.license-card span,
.license-card small {
  display: block;
  color: var(--text-muted);
}
.license-card strong {
  display: block;
  color: #ffd84a;
  font-size: 20px;
  margin: 4px 0;
}
.member-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-bottom: 18px;
}
.license-bind {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  margin-bottom: 18px;
  padding: 14px;
  border: 1px solid rgba(201,162,39,0.18);
  border-radius: 12px;
  background: rgba(8,8,14,0.62);
}
.member-stats div,
.member-tile,
.feed-row {
  border: 1px solid var(--border);
  border-radius: 12px;
  background: rgba(18,18,30,0.86);
}
.member-stats div {
  padding: 18px;
}
.member-stats span {
  display: block;
  color: #ffd84a;
  font-size: 28px;
  font-weight: 900;
}
.member-stats small { color: var(--text-muted); }
.section-title-line {
  margin: 28px 0 12px;
  padding-left: 10px;
  border-left: 3px solid #ff4738;
}
.member-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}
.member-tile {
  display: grid;
  grid-template-columns: 42px 1fr;
  gap: 10px;
  align-items: center;
  padding: 16px;
}
.member-tile span {
  grid-row: span 2;
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  color: var(--tile-color);
  background: color-mix(in srgb, var(--tile-color) 18%, transparent);
}
.member-tile strong { color: var(--text-primary); }
.member-tile small { color: var(--text-muted); }
.member-feed {
  display: grid;
  gap: 10px;
}
.feed-row {
  display: grid;
  grid-template-columns: 40px 1fr auto;
  align-items: center;
  gap: 12px;
  padding: 14px;
}
.feed-row strong { color: var(--text-primary); }
.feed-row small { display: block; color: var(--text-muted); }
.feed-row em {
  color: #ff4738;
  font-style: normal;
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}

.plans-hero {
  margin-top: -24px;
  padding: 58px 0;
  text-align: center;
  border-bottom: 1px solid rgba(201,162,39,0.22);
  background:
    linear-gradient(135deg, rgba(10,10,18,0.9), rgba(43,18,12,0.6)),
    repeating-linear-gradient(45deg, transparent, transparent 28px, rgba(201,162,39,0.04) 29px, rgba(201,162,39,0.04) 30px);
}
.plans-hero h1 {
  color: #ffd84a;
  font-size: 34px;
  text-transform: uppercase;
  letter-spacing: -0.02em;
}
.plans-hero p {
  max-width: 620px;
  margin: 12px auto 0;
  color: var(--text-secondary);
}
.plans-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
  margin: 34px 0;
}
.plan-card {
  position: relative;
  padding: 24px;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: rgba(18,18,25,0.92);
}
.plan-card.featured {
  border-color: #C9A227;
  box-shadow: 0 0 0 1px rgba(201,162,39,0.35), 0 20px 60px rgba(0,0,0,0.28);
}
.plan-ribbon {
  position: absolute;
  top: 14px;
  right: 14px;
  padding: 4px 8px;
  background: #C9A227;
  color: #080808;
  font-size: 10px;
  font-weight: 900;
  text-transform: uppercase;
}
.plan-icon {
  color: var(--plan-color);
  font-size: 32px;
  font-weight: 900;
}
.plan-card h2 {
  color: var(--plan-color);
  margin: 12px 0 4px;
}
.plan-card p { color: var(--text-muted); min-height: 48px; }
.plan-price {
  color: #ffd84a;
  font-size: 34px;
  font-weight: 900;
  margin: 18px 0;
}
.plan-price small {
  color: var(--text-muted);
  font-size: 13px;
  font-weight: 500;
}
.plan-card li {
  padding: 8px 0;
  color: var(--text-secondary);
  border-top: 1px solid rgba(255,255,255,0.05);
}
.plan-card li::before {
  content: "✓";
  color: #2ed573;
  margin-right: 8px;
}
.comparison-card,
.faq-list {
  margin: 28px 0;
  padding: 24px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: rgba(12,12,20,0.86);
}
.comparison-card h2,
.faq-list h2 {
  color: #ffd84a;
  margin-bottom: 18px;
}
.compare-table {
  display: grid;
  grid-template-columns: 1.4fr repeat(4, 1fr);
  gap: 1px;
  overflow-x: auto;
}
.compare-table div {
  min-width: 110px;
  padding: 11px;
  background: rgba(255,255,255,0.03);
  color: var(--text-secondary);
}
.compare-table div:nth-child(-n+5) {
  color: #ffd84a;
  font-weight: 800;
}
.faq-list details {
  border: 1px solid rgba(201,162,39,0.18);
  border-radius: 10px;
  padding: 14px 16px;
  margin-bottom: 10px;
}
.faq-list summary {
  cursor: pointer;
  color: var(--text-primary);
  font-weight: 800;
}
.faq-list p {
  color: var(--text-secondary);
  margin-top: 10px;
}

@media (max-width: 980px) {
  .member-shell { grid-template-columns: 1fr; }
  .member-sidebar { position: static; display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; }
  .member-brand { grid-column: 1 / -1; }
  .plans-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 680px) {
  .nav-mini { display: none; }
  .member-hero, .pwa-banner { flex-direction: column; align-items: stretch; }
  .member-stats, .member-grid, .plans-grid { grid-template-columns: 1fr; }
  .license-card { min-width: 0; }
}
