/* ============================================================
   BBS v2 — Flarum Default Theme
   ============================================================ */

:root {
  --primary: #4d698e;
  --primary-light: #6b8ab5;
  --primary-dark: #3a4f6b;
  --bg: #f6f7f9;
  --card-bg: #ffffff;
  --text: #333333;
  --text-secondary: #667c99;
  --text-muted: #8b959e;
  --border: #e8ecf0;
  --border-light: #f2f4f6;
  --danger: #d13e3e;
  --success: #3c9d4e;
  --warning: #c4840d;
  --radius: 8px;
  --shadow: 0 1px 3px rgba(0,0,0,0.06);
  --shadow-lg: 0 4px 12px rgba(0,0,0,0.1);
  --font: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
  --max-width: 1100px;

  --header-bg: #4d698e;
  --header-color: rgba(255,255,255,0.9);
  --header-hover: rgba(255,255,255,0.12);

  --hero-bg: #4d698e;
  --hero-text: #ffffff;

  --badge-sticky-bg: #e8f0fe;
  --badge-locked-bg: #fef3c7;
  --badge-admin-bg: #fde8e8;
  --badge-mod-bg: #e0f2e9;
  --alert-err-bg: #fef2f2;
  --alert-err-border: #fecaca;
  --alert-ok-bg: #f0fdf4;
  --alert-ok-border: #bbf7d0;
  --notice-bg: #fefce8;
  --notice-border: #fef08a;
  --input-bg: #f6f7f9;
}

html.dark {
  --primary: #6b8ab5;
  --primary-light: #5070a0;
  --primary-dark: #90aed4;
  --bg: #0d1117;
  --card-bg: #161b22;
  --text: #c9d1d9;
  --text-secondary: #8b949e;
  --text-muted: #6e7681;
  --border: #30363d;
  --border-light: #21262d;
  --shadow: 0 1px 3px rgba(0,0,0,0.4);
  --shadow-lg: 0 4px 12px rgba(0,0,0,0.5);
  --header-bg: #161b22;
  --header-color: #c9d1d9;
  --header-hover: rgba(255,255,255,0.06);
  --hero-bg: #161b22;
  --badge-sticky-bg: #1a2a3a;
  --badge-locked-bg: #2a2500;
  --badge-admin-bg: #2a1515;
  --badge-mod-bg: #0d1a12;
  --alert-err-bg: #2d1515;
  --alert-err-border: #4a2020;
  --alert-ok-bg: #0d1a12;
  --alert-ok-border: #1a3a24;
  --notice-bg: #1a1a0a;
  --notice-border: #3a3500;
  --input-bg: #0d1117;
  color-scheme: dark;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
body {
  font-family: var(--font); background: var(--bg); color: var(--text);
  line-height: 1.6; font-size: 14px; min-height: 100vh;
}
a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ── Theme toggle ── */
.theme-toggle {
  background: none; border: 1px solid var(--header-color); color: var(--header-color);
  width: 32px; height: 32px; border-radius: 50%; cursor: pointer;
  font-size: 14px; display: flex; align-items: center; justify-content: center;
  transition: background 0.15s; opacity: 0.7;
}
.theme-toggle:hover { background: var(--header-hover); opacity: 1; }

/* ============================================================
   HEADER — exact Flarum style
   ============================================================ */
.header {
  background: var(--header-bg); padding: 0 20px;
  position: sticky; top: 0; z-index: 100;
}
.header-inner {
  max-width: var(--max-width); margin: 0 auto;
  display: flex; align-items: center; height: 52px; gap: 0;
}
.brand {
  color: #fff; font-size: 18px; font-weight: 700;
  margin-right: 24px; letter-spacing: 0.5px;
}
.brand:hover { text-decoration: none; opacity: 0.85; }
.header-nav {
  display: flex; gap: 0; flex: 1; align-items: center; height: 100%;
}
.header-nav a {
  color: var(--header-color); padding: 0 14px; height: 100%; display: flex;
  align-items: center; font-size: 14px; transition: background 0.15s;
  border-radius: 0;
}
.header-nav a:hover { background: var(--header-hover); text-decoration: none; color: #fff; }
.header-nav a.active {
  background: rgba(0,0,0,0.1); color: #fff; font-weight: 600;
}
.header-actions {
  margin-left: auto; display: flex; align-items: center; gap: 8px;
}

/* Search in header */
.header-search {
  position: relative; margin-right: 8px;
}
.header-search input {
  background: rgba(0,0,0,0.15); border: 1px solid transparent; color: #fff;
  padding: 6px 12px 6px 32px; border-radius: 16px; font-size: 13px;
  width: 180px; outline: none; transition: all 0.2s;
}
.header-search input::placeholder { color: rgba(255,255,255,0.5); }
.header-search input:focus { background: rgba(0,0,0,0.25); border-color: rgba(255,255,255,0.2); width: 220px; }
.header-search-icon {
  position: absolute; left: 10px; top: 50%; transform: translateY(-50%);
  color: rgba(255,255,255,0.5); font-size: 14px; pointer-events: none;
}

/* User area */
.header-user { display: flex; align-items: center; gap: 8px; }
.user-trigger {
  display: flex; align-items: center; gap: 8px; color: var(--header-color);
  padding: 4px 10px; border-radius: 6px; cursor: pointer; font-size: 14px;
}
.user-trigger:hover { background: var(--header-hover); text-decoration: none; }

.user-dropdown { position: relative; }
.dropdown-menu {
  display: none; position: absolute; right: 0; top: 100%; margin-top: 4px;
  background: var(--card-bg); border: 1px solid var(--border); border-radius: 8px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.15); min-width: 200px; z-index: 200; padding: 6px;
}
.user-dropdown:hover .dropdown-menu { display: block; }
.dropdown-menu a {
  display: block; padding: 8px 16px; color: var(--text); border-radius: 5px;
  font-size: 13px; transition: background 0.1s;
}
.dropdown-menu a:hover { background: var(--border-light); text-decoration: none; }
.dropdown-divider { border-top: 1px solid var(--border); margin: 4px 0; }

.header-btn {
  color: var(--header-color); padding: 6px 14px; border-radius: 6px;
  font-size: 13px; transition: background 0.15s; border: 1px solid rgba(255,255,255,0.2);
}
.header-btn:hover { background: var(--header-hover); text-decoration: none; color: #fff; }
.header-btn-primary {
  background: rgba(255,255,255,0.15); border-color: rgba(255,255,255,0.3);
  color: #fff; font-weight: 600;
}
.header-btn-primary:hover { background: rgba(255,255,255,0.25); }

/* ============================================================
   HERO — Flarum WelcomeHero
   ============================================================ */
.hero {
  background: var(--hero-bg); padding: 32px 0; text-align: center;
  color: var(--hero-text, #fff);
}
.hero-inner { max-width: 600px; margin: 0 auto; padding: 0 16px; }
.hero h2 { font-size: 22px; font-weight: 700; margin-bottom: 8px; }
.hero p { font-size: 14px; opacity: 0.85; line-height: 1.6; }
.hero-links {
  display: flex; justify-content: center; gap: 8px; margin-top: 16px;
  flex-wrap: wrap;
}
.hero-links .hero-btn {
  background: rgba(255,255,255,0.15); color: #fff; border: 1px solid rgba(255,255,255,0.25);
  padding: 8px 20px; border-radius: 20px; font-size: 13px; font-weight: 600;
  transition: background 0.15s; cursor: pointer;
}
.hero-links .hero-btn:hover { background: rgba(255,255,255,0.25); text-decoration: none; }

/* ============================================================
   LAYOUT
   ============================================================ */
.container { max-width: var(--max-width); margin: 0 auto; padding: 24px 16px; }
.layout { display: flex; gap: 30px; align-items: flex-start; }
.sidebar { width: 210px; flex-shrink: 0; }
.main-content { flex: 1; min-width: 0; }

@media (max-width: 768px) {
  .layout { flex-direction: column; }
  .sidebar { width: 100%; }
  .header-nav { display: none; }
}

/* ============================================================
   SIDEBAR
   ============================================================ */
.sidebar .btn-new-discussion {
  display: block; width: 100%; padding: 10px 16px; background: var(--primary);
  color: #fff; border: none; border-radius: 22px; font-size: 14px; font-weight: 600;
  text-align: center; cursor: pointer; transition: background 0.15s; margin-bottom: 20px;
}
.sidebar .btn-new-discussion:hover { background: var(--primary-dark); text-decoration: none; }

.side-nav { display: flex; flex-direction: column; gap: 1px; margin-bottom: 20px; }
.side-nav .side-item {
  display: flex; align-items: center; gap: 10px; padding: 8px 12px;
  border-radius: 6px; color: var(--text); font-size: 14px; transition: background 0.1s;
  font-weight: 400;
}
.side-nav .side-item:hover { background: var(--border-light); text-decoration: none; }
.side-nav .side-item.active { background: var(--primary); color: #fff; font-weight: 600; }
.side-nav .side-item .side-icon { font-size: 15px; width: 18px; text-align: center; opacity: 0.6; }
.side-nav .side-item.active .side-icon { opacity: 1; }

.side-section { margin-bottom: 20px; }
.side-title {
  font-size: 11px; text-transform: uppercase; color: var(--text-muted);
  font-weight: 700; letter-spacing: 0.8px; margin-bottom: 8px; padding: 0 8px;
}
.side-section .side-item {
  display: flex; align-items: center; gap: 8px; padding: 6px 12px;
  border-radius: 5px; color: var(--text); font-size: 13px; transition: background 0.1s;
}
.side-section .side-item:hover { background: var(--border-light); text-decoration: none; }
.side-section .side-item .tag-dot {
  display: inline-block; width: 9px; height: 9px; border-radius: 50%; flex-shrink: 0;
}
.side-section .side-item .side-count {
  margin-left: auto; font-size: 11px; color: var(--text-muted);
  background: var(--border-light); padding: 1px 6px; border-radius: 10px; min-width: 20px; text-align: center;
}

/* ============================================================
   DISCUSSION LIST — Flarum card style
   ============================================================ */
.discussion-list { background: var(--card-bg); border-radius: var(--radius); overflow: hidden; border: 1px solid var(--border); }

.discussion-item {
  display: flex; align-items: center; gap: 14px; padding: 14px 18px;
  border-bottom: 1px solid var(--border-light); transition: background 0.1s;
  cursor: pointer;
}
.discussion-item:last-child { border-bottom: none; }
.discussion-item:hover { background: var(--border-light); text-decoration: none; }
.discussion-item.sticky { background: #fafbff; }

.discussion-item .disc-avatar { flex-shrink: 0; }
.discussion-item .disc-avatar img,
.discussion-item .disc-avatar .avatar-placeholder {
  width: 42px; height: 42px; border-radius: 50%; object-fit: cover;
}
.discussion-item .disc-avatar .avatar-placeholder {
  display: inline-flex; align-items: center; justify-content: center;
  background: #d0d7e2; color: #667c99; font-weight: 700; font-size: 17px;
}

.discussion-item .disc-main { flex: 1; min-width: 0; }
.discussion-item .disc-title {
  font-size: 15px; font-weight: 600; color: var(--text); line-height: 1.4;
  display: block; margin-bottom: 4px;
}
.discussion-item:hover .disc-title { color: var(--primary); }
.discussion-item .disc-title.is-read { font-weight: 400; color: var(--text-secondary); }

.discussion-item .disc-meta {
  display: flex; flex-wrap: wrap; gap: 10px; font-size: 12px; color: var(--text-muted); align-items: center;
}
.discussion-item .disc-meta .meta-sep { color: var(--border); }

.discussion-item .disc-tags {
  display: flex; gap: 4px; flex-wrap: wrap; margin-top: 3px;
}
.disc-tag {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 2px 8px; background: var(--border-light); border-radius: 10px;
  font-size: 11px; color: var(--text-secondary); white-space: nowrap;
}
.disc-tag .tag-dot { width: 7px; height: 7px; border-radius: 50%; flex-shrink: 0; }

/* Right side: reply count + last reply */
.discussion-item .disc-right {
  display: flex; align-items: center; gap: 18px; flex-shrink: 0; margin-left: auto;
}
.discussion-item .disc-count {
  background: var(--primary); color: #fff; padding: 2px 9px; border-radius: 10px;
  font-size: 12px; font-weight: 700; min-width: 24px; text-align: center;
  transition: background 0.15s;
}
.discussion-item .disc-count.no-replies { background: var(--border); color: var(--text-muted); }

.discussion-item .disc-last-user {
  display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--text-muted);
}
.discussion-item .disc-last-user img,
.discussion-item .disc-last-user .avatar-placeholder {
  width: 28px; height: 28px; border-radius: 50%; object-fit: cover;
}
.discussion-item .disc-last-user .avatar-placeholder {
  display: inline-flex; align-items: center; justify-content: center;
  background: #d0d7e2; color: #667c99; font-weight: 700; font-size: 11px;
}

/* ============================================================
   PAGE TOOLS
   ============================================================ */
.page-tools {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 16px;
}
.sort-tabs { display: flex; gap: 0; }
.sort-tabs a {
  padding: 7px 14px; font-size: 13px; color: var(--text-secondary);
  border-radius: 0; transition: all 0.1s; border-bottom: 2px solid transparent;
  font-weight: 500;
}
.sort-tabs a:hover { text-decoration: none; color: var(--text); background: var(--border-light); }
.sort-tabs a.active {
  color: var(--primary); border-bottom-color: var(--primary); font-weight: 700; background: none;
}

/* ============================================================
   PAGINATION
   ============================================================ */
.pagination { display: flex; gap: 6px; margin-top: 24px; justify-content: center; }
.page-btn {
  padding: 7px 14px; border: 1px solid var(--border); border-radius: 6px;
  background: var(--card-bg); color: var(--text); font-size: 13px; transition: all 0.1s;
}
.page-btn:hover { text-decoration: none; background: var(--border-light); }
.page-btn.active { background: var(--primary); color: #fff; border-color: var(--primary); font-weight: 700; }
.page-btn.active:hover { background: var(--primary-dark); }

/* ============================================================
   POST VIEW
   ============================================================ */
.post-detail {
  background: var(--card-bg); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 28px; margin-bottom: 16px;
}
.post-detail .post-header { margin-bottom: 20px; }
.post-detail .post-avatar {
  float: left; margin-right: 16px;
}
.post-detail .post-avatar img,
.post-detail .post-avatar .avatar-placeholder {
  width: 56px; height: 56px; border-radius: 50%; object-fit: cover;
}
.post-detail .post-avatar .avatar-placeholder {
  display: inline-flex; align-items: center; justify-content: center;
  background: #d0d7e2; color: #667c99; font-weight: 700; font-size: 22px;
}
.post-detail .post-title {
  font-size: 24px; font-weight: 700; color: var(--text); line-height: 1.3; margin-bottom: 6px;
}
.post-detail .post-meta {
  font-size: 13px; color: var(--text-muted); display: flex; flex-wrap: wrap; gap: 8px; align-items: center;
}
.post-detail .post-meta .author { font-weight: 600; color: var(--text); }
.post-detail .post-date { font-size: 12px; color: var(--text-muted); }

.post-detail .post-body {
  clear: both; font-size: 15px; line-height: 1.8; color: var(--text);
  word-wrap: break-word; margin-top: 16px; padding-top: 16px; border-top: 1px solid var(--border-light);
}
.post-detail .post-body p { margin: 0.6em 0; }

.post-detail .post-footer {
  display: flex; gap: 8px; margin-top: 20px; padding-top: 14px;
  border-top: 1px solid var(--border-light); flex-wrap: wrap; align-items: center;
}

/* ============================================================
   REPLIES
   ============================================================ */
.replies-section { margin-top: 24px; }
.replies-section .section-title {
  font-size: 16px; font-weight: 700; color: var(--text); margin-bottom: 12px;
}

.reply-item {
  display: flex; gap: 12px; padding: 16px 20px;
  background: var(--card-bg); border: 1px solid var(--border);
  border-radius: var(--radius); margin-bottom: 8px; transition: box-shadow 0.15s;
}
.reply-item:hover { box-shadow: var(--shadow); }
.reply-item.reply-nested {
  margin-left: 52px; border-left: 2px solid var(--primary-light);
}

.reply-item .reply-avatar { flex-shrink: 0; }
.reply-item .reply-avatar img,
.reply-item .reply-avatar .avatar-placeholder {
  width: 38px; height: 38px; border-radius: 50%; object-fit: cover;
}
.reply-item .reply-avatar .avatar-placeholder {
  display: inline-flex; align-items: center; justify-content: center;
  background: #d0d7e2; color: #667c99; font-weight: 700; font-size: 15px;
}

.reply-item .reply-body { flex: 1; min-width: 0; }
.reply-item .reply-header {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 6px;
}
.reply-item .reply-author { font-weight: 700; color: var(--text); font-size: 14px; }
.reply-item .reply-time { font-size: 12px; color: var(--text-muted); }
.reply-item .reply-permalink { font-size: 12px; color: var(--text-muted); opacity: 0; transition: opacity 0.1s; }
.reply-item:hover .reply-permalink { opacity: 1; }

.reply-item .reply-content { font-size: 14px; line-height: 1.7; word-wrap: break-word; }
.reply-item .reply-content p { margin: 0.3em 0; }

.reply-item .reply-actions {
  display: flex; gap: 4px; margin-top: 8px; opacity: 0; transition: opacity 0.1s;
}
.reply-item:hover .reply-actions { opacity: 1; }

/* ============================================================
   BUTTONS
   ============================================================ */
.btn, button {
  display: inline-flex; align-items: center; justify-content: center; gap: 4px;
  padding: 8px 16px; border: 1px solid var(--border);
  background: var(--card-bg); color: var(--text); border-radius: 6px;
  font-size: 13px; cursor: pointer; transition: all 0.15s; font-family: inherit;
  text-decoration: none;
}
.btn:hover { background: var(--border-light); text-decoration: none; }
.btn-primary { background: var(--primary); color: #fff; border-color: var(--primary); }
.btn-primary:hover { background: var(--primary-dark); border-color: var(--primary-dark); }
.btn-danger { color: var(--danger); border-color: var(--danger); }
.btn-danger:hover { background: var(--danger); color: #fff; }
.btn-sm { padding: 4px 10px; font-size: 12px; border-radius: 4px; }
.btn-xs { padding: 2px 7px; font-size: 11px; border-radius: 3px; }
.btn-block { display: flex; width: 100%; }
.btn-link { background: none; border: none; color: var(--primary); padding: 4px 6px; font-size: 12px; }
.btn-link:hover { text-decoration: underline; background: none; }

/* ============================================================
   LIKE BUTTON
   ============================================================ */
.like-btn { border: none; background: none; padding: 4px 6px; cursor: pointer; font-size: 13px; color: var(--text-muted); transition: color 0.12s; }
.like-btn:hover { color: var(--primary); }
.like-btn.liked { color: var(--danger); }

/* ============================================================
   REPLY FORM
   ============================================================ */
.reply-form {
  background: var(--card-bg); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 20px; margin-top: 24px;
}
.reply-form h3 { font-size: 15px; font-weight: 700; margin-bottom: 12px; color: var(--text); }
.reply-form textarea {
  width: 100%; padding: 12px; border: 2px solid var(--border);
  border-radius: var(--radius); font-family: inherit; font-size: 14px;
  resize: vertical; background: var(--input-bg); color: var(--text); min-height: 100px;
}
.reply-form textarea:focus { border-color: var(--primary); outline: none; }

/* ============================================================
   FORMS
   ============================================================ */
.form-card {
  background: var(--card-bg); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 28px;
}
.form-card h2 { font-size: 20px; font-weight: 700; margin-bottom: 20px; color: var(--text); }
.form-group { margin-bottom: 18px; }
.form-group label { display: block; margin-bottom: 6px; font-weight: 700; font-size: 13px; color: var(--text-secondary); }
.form-group input[type="text"],
.form-group input[type="email"],
.form-group input[type="password"],
.form-group select,
.form-group textarea {
  width: 100%; padding: 10px 14px; border: 2px solid var(--border);
  border-radius: 6px; font-family: inherit; font-size: 14px;
  background: var(--input-bg); color: var(--text);
}
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus { border-color: var(--primary); outline: none; }
.form-actions { display: flex; gap: 8px; margin-top: 20px; }

/* ============================================================
   AUTH
   ============================================================ */
.auth-page { display: flex; justify-content: center; align-items: center; min-height: 80vh; }
.auth-card {
  background: var(--card-bg); border: 1px solid var(--border);
  border-radius: 12px; padding: 36px; width: 100%; max-width: 400px;
  box-shadow: var(--shadow-lg);
}
.auth-card h1 { text-align: center; margin-bottom: 24px; font-size: 20px; font-weight: 700; color: var(--text); }
.auth-switch { text-align: center; margin-top: 18px; font-size: 13px; color: var(--text-muted); }

/* ============================================================
   BADGES & TAGS
   ============================================================ */
.badge {
  display: inline-block; padding: 1px 8px; border-radius: 10px;
  font-size: 11px; font-weight: 700; letter-spacing: 0.2px;
}
.badge-sticky { background: var(--badge-sticky-bg); color: var(--primary); }
.badge-locked { background: var(--badge-locked-bg); color: var(--warning); }
.badge-admin { background: var(--badge-admin-bg); color: var(--danger); }
.badge-mod { background: var(--badge-mod-bg); color: var(--success); }
.badge-best { background: var(--badge-mod-bg); color: var(--success); }

.tag {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 2px 8px; background: var(--border-light); border-radius: 10px;
  font-size: 11px; color: var(--text-secondary);
}
.tag-dot { display: inline-block; width: 7px; height: 7px; border-radius: 50%; flex-shrink: 0; }

/* ============================================================
   UTILITY
   ============================================================ */
.alert { padding: 10px 14px; border-radius: 6px; font-size: 13px; margin-bottom: 12px; }
.alert-error { background: var(--alert-err-bg); color: var(--danger); border: 1px solid var(--alert-err-border); }
.alert-success { background: var(--alert-ok-bg); color: var(--success); border: 1px solid var(--alert-ok-border); }
.empty-state { text-align: center; padding: 48px 20px; color: var(--text-muted); font-size: 15px; }
.error-page { text-align: center; padding: 80px 20px; }
.error-page h1 { font-size: 56px; color: var(--text-muted); margin-bottom: 8px; font-weight: 200; }
.error-page p { font-size: 16px; color: var(--text-secondary); margin-bottom: 24px; }
.notice {
  background: var(--notice-bg); border: 1px solid var(--notice-border); border-radius: var(--radius);
  padding: 14px 18px; text-align: center; font-size: 14px; color: var(--warning);
}
.notice a { color: var(--primary); font-weight: 600; }
.search-info { font-size: 13px; color: var(--text-muted); margin-bottom: 16px; }
.category-header { margin-bottom: 20px; }
.category-header h1 { font-size: 22px; font-weight: 700; color: var(--text); }
.category-desc { color: var(--text-muted); font-size: 13px; margin-top: 2px; }

/* Stats grid (admin) */
.stats-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
.stat-card {
  background: var(--card-bg); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 22px; text-align: center;
}
.stat-card strong { display: block; font-size: 30px; margin-bottom: 4px; font-weight: 200; }

/* Flag cards */
.flag-card {
  background: var(--card-bg); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 16px; margin-bottom: 10px;
}
.flag-header { display: flex; gap: 12px; align-items: center; margin-bottom: 8px; font-size: 13px; }
.flag-time { margin-left: auto; font-size: 12px; color: var(--text-muted); }
.flag-content { background: var(--bg); padding: 12px; border-radius: 5px; font-size: 13px; margin-bottom: 8px; border-left: 3px solid var(--border); }
.flag-meta { font-size: 12px; color: var(--text-muted); }

/* Profile */
.profile-header {
  display: flex; gap: 24px; padding: 28px; background: var(--card-bg);
  border: 1px solid var(--border); border-radius: var(--radius); margin-bottom: 24px;
  align-items: flex-start;
}
.profile-avatar-lg { width: 88px; height: 88px; border-radius: 50%; overflow: hidden; flex-shrink: 0; }
.profile-avatar-lg img { width: 100%; height: 100%; object-fit: cover; }
.profile-avatar-lg .avatar-placeholder {
  display: flex; align-items: center; justify-content: center;
  width: 100%; height: 100%; background: #d0d7e2; color: #667c99;
  font-size: 36px; font-weight: 700;
}
.profile-info h1 { font-size: 22px; font-weight: 700; margin-bottom: 2px; }
.profile-username { color: var(--text-muted); font-size: 14px; margin-bottom: 8px; }
.profile-bio { font-size: 14px; color: var(--text-secondary); margin-bottom: 14px; line-height: 1.6; }
.profile-stats { display: flex; gap: 24px; font-size: 13px; color: var(--text-muted); margin-bottom: 14px; }
.profile-stats strong { color: var(--text); font-size: 15px; }
.profile-content section { margin-bottom: 32px; }
.profile-content h2 { font-size: 18px; font-weight: 700; margin-bottom: 14px; }

/* Poll */
.poll-box {
  background: var(--card-bg); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 20px; margin-bottom: 16px;
}
.poll-box h3 { font-weight: 700; margin-bottom: 14px; color: var(--text); }
.poll-option {
  position: relative; padding: 10px 14px; margin-bottom: 6px;
  background: var(--border-light); border-radius: 6px; cursor: pointer;
  overflow: hidden; display: flex; justify-content: space-between; align-items: center;
}
.poll-option:hover { background: var(--border); }
.poll-bar {
  position: absolute; left: 0; top: 0; bottom: 0;
  background: var(--primary-light); opacity: 0.2; border-radius: 6px; transition: width 0.3s;
}
.poll-text { position: relative; z-index: 1; font-size: 13px; }
.poll-votes { position: relative; z-index: 1; font-size: 12px; color: var(--text-muted); }

/* Search */
.search-form { display: flex; gap: 8px; margin-bottom: 20px; }
.search-input-lg {
  flex: 1; padding: 12px 16px; border: 2px solid var(--border);
  border-radius: 8px; font-size: 15px; background: var(--card-bg); color: var(--text);
}
.search-input-lg:focus { border-color: var(--primary); outline: none; }

/* Misc */
.form-inline { display: flex; gap: 8px; align-items: center; }
.form-inline input { padding: 7px 10px; border: 1px solid var(--border); border-radius: 5px; font-size: 13px; background: var(--input-bg); color: var(--text); }
.card-actions { flex-shrink: 0; }

select { padding: 10px 14px; border: 2px solid var(--border); border-radius: 6px; background: var(--input-bg); color: var(--text); font-size: 14px; font-family: inherit; }
