* { margin: 0; padding: 0; box-sizing: border-box; }

/* ============ THEME VARIABLES (identical to generator) ============ */
:root, [data-theme="light"] {
  --bg-page: #f5f7fa;
  --bg-surface: #fff;
  --bg-surface-hover: #f8fafc;
  --bg-input: #fff;
  --bg-elevated: #f8fafc;
  --border: #e2e8f0;
  --border-input: #cbd5e1;
  --border-subtle: #f1f5f9;
  --text-heading: #0f172a;
  --text-primary: #1e293b;
  --text-secondary: #475569;
  --text-muted: #94a3b8;
  --text-body: #334155;
  --accent: #2563eb;
  --accent-hover: #1d4ed8;
  --accent-bg: #eff6ff;
  --accent-border: #bfdbfe;
  --accent-text: #1e40af;
  --danger: #dc2626;
  --danger-bg: #fef2f2;
  --danger-border: #fecaca;
  --success-bg: #dcfce7;
  --success-text: #16a34a;
  --warning-bg: #fef9c3;
  --warning-text: #ca8a04;
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.04);
  --shadow-lg: 0 20px 60px rgba(0,0,0,0.15);
  --overlay: rgba(15,23,42,0.4);
}
[data-theme="dark"] {
  --bg-page: #0b1120;
  --bg-surface: #131c31;
  --bg-surface-hover: #1a2744;
  --bg-input: #1a2744;
  --bg-elevated: #1a2744;
  --border: #1e3a5f;
  --border-input: #2d4a6f;
  --border-subtle: #1a2744;
  --text-heading: #f1f5f9;
  --text-primary: #e2e8f0;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;
  --text-body: #cbd5e1;
  --accent: #3b82f6;
  --accent-hover: #2563eb;
  --accent-bg: rgba(59,130,246,0.12);
  --accent-border: rgba(59,130,246,0.3);
  --accent-text: #93bbfc;
  --danger: #ef4444;
  --danger-bg: rgba(239,68,68,0.12);
  --danger-border: rgba(239,68,68,0.25);
  --success-bg: rgba(34,197,94,0.12);
  --success-text: #4ade80;
  --warning-bg: rgba(234,179,8,0.12);
  --warning-text: #facc15;
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.2);
  --shadow-lg: 0 20px 60px rgba(0,0,0,0.5);
  --overlay: rgba(0,0,0,0.6);
}

body {
  font-family: 'Inter', sans-serif;
  background: var(--bg-page);
  color: var(--text-primary);
  min-height: 100vh;
  transition: background 0.25s, color 0.25s;
}

/* ============ LOGIN ============ */
#login-view {
  display: flex; align-items: center; justify-content: center;
  min-height: 100vh; background: var(--bg-page);
}
.login-card {
  background: var(--bg-surface); padding: 36px; border-radius: 10px; width: 340px;
  text-align: center; box-shadow: var(--shadow-lg); border: 1px solid var(--border);
}
.login-logo { width: 48px; height: 48px; border-radius: 10px; margin-bottom: 12px; }
.login-card h2 { margin-bottom: 20px; color: var(--text-heading); font-size: 18px; font-weight: 700; }
.login-card .form-group { margin-bottom: 10px; }
.login-card input {
  width: 100%; padding: 10px 14px; background: var(--bg-input);
  border: 1.5px solid var(--border-input); border-radius: 8px;
  color: var(--text-primary); font-size: 13px; font-family: 'Inter', sans-serif; outline: none;
  transition: border-color 0.2s;
}
.login-card input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(37,99,235,0.12); }
.login-card input::placeholder { color: var(--text-muted); }
.btn-login { width: 100%; padding: 10px; margin-top: 6px; }
.error-msg { color: var(--danger); font-size: 12px; margin-top: 10px; }

/* ============ TOP NAV ============ */
.topnav {
  display: flex; justify-content: space-between; align-items: center;
  padding: 0 22px; height: 44px; background: var(--bg-surface);
  border-bottom: 1px solid var(--border); position: sticky; top: 0; z-index: 100;
  transition: background 0.25s, border-color 0.25s;
}
.topnav-left { display: flex; align-items: center; gap: 10px; }
.logo-img { width: 22px; height: 22px; border-radius: 6px; object-fit: contain; }
.topnav .logo { font-size: 14px; font-weight: 700; color: var(--text-heading); letter-spacing: -0.3px; }
.topnav-right { display: flex; align-items: center; gap: 10px; }
.user-greeting { display: flex; align-items: center; gap: 6px; font-size: 11px; color: var(--text-secondary); font-weight: 500; }
.user-greeting .user-icon {
  width: 24px; height: 24px; border-radius: 50%; background: var(--accent-bg);
  border: 1px solid var(--accent-border); display: flex; align-items: center;
  justify-content: center; font-size: 14px; color: var(--accent); flex-shrink: 0;
}
.user-greeting .user-name { color: var(--accent); font-weight: 600; }
.btn-logout {
  padding: 4px 10px; background: transparent; border: 1px solid var(--border-input);
  color: var(--text-muted); border-radius: 5px; cursor: pointer; font-size: 11px;
  font-weight: 500; font-family: 'Inter', sans-serif; transition: all 0.2s;
}
.btn-logout:hover { border-color: var(--text-secondary); color: var(--text-secondary); background: var(--bg-surface-hover); }

/* ============ THEME TOGGLE ============ */
.theme-toggle {
  display: flex; align-items: center; gap: 4px; padding: 4px 10px;
  background: var(--bg-elevated); border: 1px solid var(--border); border-radius: 5px;
  cursor: pointer; font-size: 11px; font-weight: 500; color: var(--text-secondary);
  font-family: 'Inter', sans-serif; transition: all 0.2s; user-select: none;
}
.theme-toggle:hover { border-color: var(--accent); color: var(--accent); }
.theme-toggle .theme-icon { font-size: 14px; }

/* ============ TAB BAR ============ */
.tab-bar {
  display: flex; gap: 0; background: var(--bg-surface); border-bottom: 1px solid var(--border);
  padding: 0 22px; overflow-x: auto; transition: background 0.25s, border-color 0.25s;
  justify-content: center;
}
.tab-btn {
  padding: 12px 20px; border: none; background: transparent; display: inline-flex;
  align-items: center; gap: 8px; color: var(--text-muted); font-size: 13px; font-weight: 600;
  cursor: pointer; border-bottom: 2px solid transparent; margin-bottom: -1px;
  font-family: 'Inter', sans-serif; white-space: nowrap; transition: all 0.2s;
}
.tab-btn:hover { color: var(--text-secondary); }
.tab-btn.active { color: var(--accent); border-bottom-color: var(--accent); }

/* ============ LAYOUT ============ */
.main-wrapper { display: flex; gap: 16px; padding: 20px 22px; max-width: 1400px; margin: 0 auto; }
.main-content { flex: 1; min-width: 0; }
.tab-panel { display: none; }
.tab-panel.active { display: block; }

/* ============ STATS GRID ============ */
.stats-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-bottom: 18px; }
.stat-card {
  background: var(--bg-surface); border-radius: 8px; padding: 18px; text-align: center;
  border: 1px solid var(--border); box-shadow: var(--shadow-sm);
  transition: background 0.25s, border-color 0.25s;
}
.stat-card .stat-value { font-size: 26px; font-weight: 700; color: var(--accent); }
.stat-card .stat-label { font-size: 13px; color: var(--text-muted); margin-top: 4px; font-weight: 500; }

/* ============ CARD ============ */
.card {
  background: var(--bg-surface); border-radius: 10px; padding: 22px;
  border: 1px solid var(--border); box-shadow: var(--shadow-sm);
  transition: background 0.25s, border-color 0.25s;
}

/* ============ TOOLBAR ============ */
.toolbar { display: flex; justify-content: space-between; align-items: center; margin-bottom: 16px; flex-wrap: wrap; gap: 10px; }
.toolbar-left { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }

/* ============ FORMS ============ */
.form-group { margin-bottom: 16px; }
.form-group input {
  width: 100%; padding: 10px 14px; background: var(--bg-input);
  border: 1.5px solid var(--border-input); border-radius: 8px;
  color: var(--text-primary); font-size: 13px; font-family: 'Inter', sans-serif;
  outline: none; transition: border-color 0.2s, box-shadow 0.2s;
}
.form-group input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(37,99,235,0.12); }
.form-group input::placeholder { color: var(--text-muted); font-size: 12px; }

/* ============ BUTTONS ============ */
.btn {
  padding: 6px 12px; border: none; border-radius: 5px; font-size: 11px; font-weight: 500;
  cursor: pointer; font-family: 'Inter', sans-serif; transition: all 0.15s;
  display: inline-flex; align-items: center; gap: 6px;
}
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-hover); }

/* ============ TABLES ============ */
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 11px; }
th {
  text-align: left; padding: 8px 10px; background: var(--bg-elevated);
  color: var(--text-muted); font-weight: 600; font-size: 10px;
  text-transform: uppercase; letter-spacing: 0.5px;
  border-bottom: 1px solid var(--border); white-space: nowrap;
}
td {
  padding: 8px 10px; border-bottom: 1px solid var(--border-subtle);
  vertical-align: middle; color: var(--text-body);
}
tr:hover td { background: var(--bg-surface-hover); }
tr.is-lead td { background: var(--accent-bg); }
tr.is-lead td { color: var(--accent-text); font-weight: 600; }

/* ============ BADGES ============ */
.badge { display: inline-block; padding: 3px 10px; border-radius: 12px; font-size: 11px; font-weight: 600; }
.badge-click { background: var(--bg-elevated); color: var(--text-muted); border: 1px solid var(--border); }
.badge-lead { background: var(--success-bg); color: var(--success-text); }
.badge-payout, tr.is-lead td.badge-payout { color: var(--success-text); font-weight: 700; }
.country-flag { font-size: 15px; margin-right: 3px; }

/* ============ SIDEBAR ============ */
.sidebar {
  width: 220px; flex-shrink: 0; max-height: calc(100vh - 120px); overflow-y: auto;
  position: sticky; top: 64px;
}
.sidebar:not(.sidebar-left) {
  background: var(--bg-surface); border: 1px solid var(--border);
  border-radius: 10px; padding: 16px;
  box-shadow: var(--shadow-sm); transition: background 0.25s, border-color 0.25s;
}
.sidebar-left {
  display: flex; flex-direction: column; gap: 12px;
}
.sidebar-title {
  font-size: 10px; font-weight: 600; color: var(--text-muted); text-transform: uppercase;
  letter-spacing: 0.5px; margin-bottom: 12px;
}
.race-item {
  display: flex; align-items: center; gap: 8px; padding: 6px 0;
  border-bottom: 1px solid var(--border-subtle); font-size: 11px;
}
.race-item .race-user { font-weight: 600; color: var(--text-heading); white-space: nowrap; }
.race-item .race-flag { font-size: 15px; }

/* ============ EMPTY STATE ============ */
.empty-state { text-align: center; padding: 36px 16px; color: var(--text-muted); }
.empty-state p { font-size: 12px; margin-top: 6px; }

/* ============ ANNOUNCEMENT ============ */
.announcement-bar {
  background: var(--accent-bg); border: none;
  margin: 0; padding: 10px 22px; font-size: 13px; color: var(--accent-text); font-weight: 600;
  display: flex; align-items: center; gap: 10px; overflow: hidden;
}
.announcement-marquee {
  flex: 1; overflow: hidden; white-space: nowrap;
}
.announcement-marquee span {
  display: inline-block; padding-left: 100%;
  animation: marquee 15s linear infinite;
}
.announcement-marquee span a {
  color: var(--accent); text-decoration: underline; font-weight: 700;
}
.announcement-marquee span a:hover { opacity: 0.8; }
@keyframes marquee {
  0%   { transform: translateX(0); }
  100% { transform: translateX(-100%); }
}
.announcement-bar.announcement-empty { opacity: 0.4; }
.announcement-bar.announcement-empty .announcement-marquee span { animation: none; padding-left: 0; }
.announcement-edit {
  padding: 3px 12px; background: var(--bg-surface); border: 1px solid var(--accent-border);
  border-radius: 4px; font-size: 10px; color: var(--accent); cursor: pointer;
  font-family: 'Inter', sans-serif; font-weight: 600; flex-shrink: 0;
}
.announcement-edit:hover { background: var(--accent-bg); }

/* ============ MODAL ============ */
.modal-overlay {
  position: fixed; top: 0; left: 0; right: 0; bottom: 0;
  background: var(--overlay); backdrop-filter: blur(4px);
  display: flex; justify-content: center; align-items: center; z-index: 200;
}
.modal-box {
  background: var(--bg-surface); border-radius: 10px; padding: 22px;
  width: 100%; max-width: 480px; box-shadow: var(--shadow-lg); border: 1px solid var(--border);
}
.modal-box h2 { font-size: 15px; font-weight: 700; color: var(--text-heading); margin-bottom: 14px; }
.modal-actions { display: flex; gap: 8px; justify-content: flex-end; margin-top: 14px; }
.form-group textarea {
  width: 100%; padding: 10px 14px; background: var(--bg-input);
  border: 1.5px solid var(--border-input); border-radius: 8px;
  color: var(--text-primary); font-size: 13px; font-family: 'Inter', sans-serif;
  outline: none; resize: vertical; transition: border-color 0.2s;
}
.form-group textarea:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(37,99,235,0.12); }
.btn-secondary { background: var(--bg-surface); color: var(--text-secondary); border: 1px solid var(--border-input); }
.btn-secondary:hover { background: var(--bg-surface-hover); }

/* ============ BROWSER LABEL ============ */
.browser-badge {
  display: inline-block; padding: 1px 6px; border-radius: 4px; font-size: 9px;
  font-weight: 600; text-transform: uppercase; letter-spacing: 0.3px;
  background: var(--bg-elevated); color: var(--text-muted); border: 1px solid var(--border);
}
.device-icon { display: inline-flex; align-items: center; color: var(--text-secondary); }

/* ============ TOAST ============ */
.toast-container { position: fixed; top: 20px; right: 20px; z-index: 300; display: flex; flex-direction: column; gap: 8px; }

/* ============ CONNECTION INDICATOR ============ */
.conn-dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: #ef4444; display: inline-block; margin-left: 6px;
  transition: background 0.3s;
}
.conn-dot.connected {
  background: #22c55e;
  animation: pulse-dot 2s ease-in-out infinite;
}
@keyframes pulse-dot {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}

/* ============ SOUND TOGGLE ============ */
.sound-toggle {
  display: flex; align-items: center; justify-content: center; width: 30px; height: 30px;
  background: var(--bg-elevated); border: 1px solid var(--border); border-radius: 5px;
  cursor: pointer; font-size: 16px; color: var(--text-secondary);
  font-family: 'Inter', sans-serif; transition: all 0.2s; user-select: none; padding: 0;
}
.sound-toggle:hover { border-color: var(--accent); color: var(--accent); }
.sound-toggle.sound-on { background: var(--accent-bg); border-color: var(--accent-border); color: var(--accent); }

/* ============ SORTABLE COLUMNS ============ */
th.sortable { cursor: pointer; user-select: none; position: relative; padding-right: 18px; }
th.sortable:hover { color: var(--accent); }
th.sortable .sort-arrow { position: absolute; right: 4px; top: 50%; transform: translateY(-50%); font-size: 8px; opacity: 0.3; }
th.sortable .sort-arrow::after { content: '▼'; }
th.sortable.asc .sort-arrow { opacity: 1; color: var(--accent); }
th.sortable.asc .sort-arrow::after { content: '▲'; }
th.sortable.desc .sort-arrow { opacity: 1; color: var(--accent); }
th.sortable.desc .sort-arrow::after { content: '▼'; }

/* ============ GOAL TRACKER ============ */
.goal-tracker {
  background: var(--bg-surface); border: 1px solid var(--border); border-radius: 8px;
  padding: 12px 16px; margin-bottom: 16px; box-shadow: var(--shadow-sm);
  transition: background 0.25s, border-color 0.25s;
}
.goal-header { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.goal-label { font-size: 10px; font-weight: 600; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.5px; }
.goal-text { font-size: 13px; font-weight: 700; color: var(--accent); flex: 1; text-align: right; }
.goal-edit-btn {
  background: none; border: 1px solid var(--border); border-radius: 4px; padding: 3px 6px;
  cursor: pointer; color: var(--text-muted); display: flex; align-items: center;
  transition: all 0.2s;
}
.goal-edit-btn:hover { border-color: var(--accent); color: var(--accent); }
.goal-bar-bg {
  width: 100%; height: 8px; background: var(--bg-elevated); border-radius: 4px;
  overflow: hidden; border: 1px solid var(--border);
}
.goal-bar-fill {
  height: 100%; border-radius: 4px; background: linear-gradient(90deg, var(--accent), #22c55e);
  transition: width 0.6s ease; width: 0%;
}
.goal-bar-fill.goal-reached { background: linear-gradient(90deg, #22c55e, #16a34a); }

/* ============ TOP COUNTRIES ============ */
.top-countries {
  background: var(--bg-surface); border: 1px solid var(--border); border-radius: 8px;
  padding: 14px 16px; box-shadow: var(--shadow-sm);
  transition: background 0.25s, border-color 0.25s;
}
.top-countries-title {
  font-size: 10px; font-weight: 600; color: var(--text-muted); text-transform: uppercase;
  letter-spacing: 0.5px; margin-bottom: 10px;
}
.tc-row { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; font-size: 11px; }
.tc-row:last-child { margin-bottom: 0; }
.tc-flag { font-size: 15px; width: 22px; text-align: center; }
.tc-country { width: 28px; font-weight: 600; color: var(--text-heading); }
.tc-bar-bg { flex: 1; height: 6px; background: var(--bg-elevated); border-radius: 3px; overflow: hidden; }
.tc-bar-fill { height: 100%; background: var(--accent); border-radius: 3px; transition: width 0.4s ease; }
.tc-count { font-weight: 600; color: var(--text-secondary); min-width: 30px; text-align: right; }

/* ============ COUNTRY TOTAL ROW ============ */
.country-total-tr td {
  background: var(--accent-bg); border-top: 2px solid var(--accent-border);
  font-size: 12px; font-weight: 700; color: var(--accent-text);
}

/* ============ SLIDE-IN ANIMATION ============ */
@keyframes slideIn {
  from { opacity: 0; transform: translateY(-30px); }
  to { opacity: 1; transform: translateY(0); }
}
tr.slide-in { animation: slideIn 0.4s ease-out; }
.race-item.slide-in { animation: slideIn 0.35s ease-out; }

/* ============ FIXED DESKTOP LAYOUT (no responsive shrink) ============ */
#app-view { min-width: 1100px; }
html { overflow-x: auto; }

/* ============ USER AVATAR ============ */
.user-avatar-sm {
  width: 20px; height: 20px; border-radius: 50%; object-fit: cover;
  vertical-align: middle; margin-right: 5px; flex-shrink: 0;
  border: 1.5px solid var(--border);
}
.user-avatar-nav {
  width: 24px; height: 24px; border-radius: 50%; object-fit: cover;
  border: 1.5px solid var(--accent-border);
}
span.user-avatar-sm.avatar-initial {
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--accent-bg); color: var(--accent); font-size: 9px; font-weight: 700;
  width: 20px; height: 20px; border-radius: 50%;
  border: 1.5px solid var(--accent-border); vertical-align: middle; margin-right: 5px;
}
.avatar-initial-lg {
  width: 68px; height: 68px; border-radius: 50%; display: flex;
  align-items: center; justify-content: center; background: var(--accent-bg);
  color: var(--accent); font-size: 24px; font-weight: 700;
  border: 3px solid var(--accent-border); margin: 0 auto;
}

/* ============ RANK NUMBER BADGES (clickers sidebar) ============ */
.rank-num {
  display: inline-flex; align-items: center; justify-content: center;
  width: 18px; height: 18px; border-radius: 50%; font-size: 10px; font-weight: 800;
  vertical-align: middle; margin-right: 4px; flex-shrink: 0; line-height: 1;
}
.rank-num-1 { background: linear-gradient(135deg, #fbbf24, #f59e0b); color: #78350f; box-shadow: 0 1px 4px rgba(245,158,11,0.5); }
.rank-num-2 { background: linear-gradient(135deg, #e2e8f0, #94a3b8); color: #1e293b; box-shadow: 0 1px 4px rgba(148,163,184,0.5); }
.rank-num-3 { background: linear-gradient(135deg, #d97706, #92400e); color: #fef3c7; box-shadow: 0 1px 4px rgba(146,64,14,0.5); }

/* ============ RANK RINGS (necklace around avatar) ============ */
.avatar-ring-1 { border: 2.5px solid #f59e0b !important; box-shadow: 0 0 8px rgba(245,158,11,0.5); }
.avatar-ring-2 { border: 2.5px solid #94a3b8 !important; box-shadow: 0 0 8px rgba(148,163,184,0.5); }
.avatar-ring-3 { border: 2.5px solid #d97706 !important; box-shadow: 0 0 8px rgba(217,119,6,0.5); }
.avatar-ring-lg-1 { border: 4px solid #f59e0b !important; box-shadow: 0 0 14px rgba(245,158,11,0.5); }
.avatar-ring-lg-2 { border: 4px solid #94a3b8 !important; box-shadow: 0 0 14px rgba(148,163,184,0.5); }
.avatar-ring-lg-3 { border: 4px solid #d97706 !important; box-shadow: 0 0 14px rgba(217,119,6,0.5); }

/* ============ LEADERBOARD BAR ============ */
.leaderboard-bar {
  background: var(--bg-surface); border: 1px solid var(--border); border-radius: 8px;
  padding: 14px 16px; box-shadow: var(--shadow-sm);
  transition: background 0.25s, border-color 0.25s;
}
.leaderboard-title {
  font-size: 10px; font-weight: 600; color: var(--text-muted); text-transform: uppercase;
  letter-spacing: 0.5px; margin-bottom: 10px;
}
.lb-podium {
  display: flex; flex-direction: column; gap: 8px;
}
.lb-item {
  display: flex; align-items: center; gap: 8px; padding: 8px 14px;
  background: var(--bg-elevated); border: 1px solid var(--border);
  border-radius: 8px; min-width: 100px; transition: all 0.2s;
}
.lb-item:hover { border-color: var(--accent-border); }
.lb-item-1 { border-color: #f59e0b; background: rgba(245,158,11,0.08); }
.lb-item-2 { border-color: #94a3b8; background: rgba(148,163,184,0.08); }
.lb-item-3 { border-color: #d97706; background: rgba(217,119,6,0.08); }
.lb-avatar {
  width: 32px; height: 32px; border-radius: 50%; object-fit: cover;
  border: 2.5px solid var(--border); flex-shrink: 0;
}
.lb-avatar.avatar-initial {
  display: flex; align-items: center; justify-content: center;
  background: var(--accent-bg); color: var(--accent); font-size: 13px; font-weight: 700;
  border: 2.5px solid var(--accent-border);
}
.lb-info { display: flex; flex-direction: column; min-width: 0; }
.lb-name { font-size: 11px; font-weight: 700; color: var(--text-heading); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lb-leads { font-size: 10px; color: var(--success-text); font-weight: 600; }

/* ============ CLICKABLE USERNAME ============ */
.username-clickable { cursor: pointer; transition: color 0.15s; }
.username-clickable:hover { color: var(--accent); text-decoration: underline; }

/* ============ PROFILE OVERLAY & CARD ============ */
.profile-overlay {
  position: fixed; top: 0; left: 0; right: 0; bottom: 0;
  background: var(--overlay); backdrop-filter: blur(4px);
  display: flex; justify-content: center; align-items: center; z-index: 250;
}
.profile-card {
  background: var(--bg-surface); border-radius: 14px; padding: 30px 28px;
  width: 320px; text-align: center; box-shadow: var(--shadow-lg);
  border: 1px solid var(--border); animation: slideIn 0.25s ease-out;
}
.profile-card-avatar { margin-bottom: 14px; }
.profile-card-avatar img {
  width: 72px; height: 72px; border-radius: 50%; object-fit: cover;
  border: 3px solid var(--accent-border);
}
.profile-card-name {
  font-size: 16px; font-weight: 700; color: var(--text-heading); margin-bottom: 4px;
  display: flex; align-items: center; justify-content: center; gap: 6px;
}
.profile-card-bio {
  font-size: 12px; color: var(--text-secondary); margin-bottom: 16px;
  line-height: 1.5; word-break: break-word;
}
.profile-card-stats {
  font-size: 11px; color: var(--text-muted); margin-bottom: 14px; font-weight: 500;
}
.profile-card .btn { width: 100%; justify-content: center; margin-top: 6px; }

/* ============ PROFILE EDIT MODAL ============ */
.profile-avatar-preview {
  width: 80px; height: 80px; border-radius: 50%; margin: 0 auto 12px;
  overflow: hidden; border: 3px solid var(--accent-border);
  display: flex; align-items: center; justify-content: center;
  background: var(--bg-elevated);
}
.profile-avatar-preview img { width: 100%; height: 100%; object-fit: cover; }
.form-group label.form-label {
  font-size: 11px; font-weight: 600; color: var(--text-secondary);
  margin-bottom: 4px; display: block;
}

/* ============ TOAST ============ */
.toast-item {
  padding: 10px 18px; border-radius: 6px; font-size: 12px; font-weight: 600;
  color: #fff; box-shadow: 0 4px 12px rgba(0,0,0,0.15);
  animation: slideIn 0.3s ease-out;
}
.toast-success { background: #22c55e; }
.toast-error { background: #ef4444; }
