@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=DM+Serif+Display:ital@0;1&display=swap');

:root {
  /* Core palette — dark luxury */
  --bg:          #0B0C12;
  --bg2:         #10111A;
  --card:        #13141F;
  --card2:       #1A1B28;
  --border:      #1E2030;
  --border2:     #252639;

  /* Gold accent */
  --gold:        #C9A84C;
  --gold-light:  #E2C97E;
  --gold-dim:    rgba(201,168,76,0.12);
  --gold-glow:   0 0 20px rgba(201,168,76,0.15);

  /* Text */
  --text:        #F0F0F8;
  --text-2:      #9898B8;
  --text-3:      #5A5A78;

  /* Status */
  --success:     #34D399;
  --success-dim: rgba(52,211,153,0.1);
  --danger:      #F87171;
  --danger-dim:  rgba(248,113,113,0.1);
  --warning:     #FBBF24;
  --warning-dim: rgba(251,191,36,0.1);
  --info:        #60A5FA;
  --info-dim:    rgba(96,165,250,0.1);
  --purple:      #A78BFA;
  --purple-dim:  rgba(167,139,250,0.1);

  /* Sidebar */
  --sidebar-bg:  #07070F;
  --sidebar-w:   240px;

  /* Misc */
  --radius:      14px;
  --radius-sm:   9px;
  --topbar-h:    60px;
  --shadow:      0 1px 3px rgba(0,0,0,0.4), 0 1px 2px rgba(0,0,0,0.3);
  --shadow-md:   0 4px 20px rgba(0,0,0,0.5);
  --shadow-lg:   0 20px 60px rgba(0,0,0,0.6);
  --transition:  0.2s cubic-bezier(0.4,0,0.2,1);
}

/* ── RESET & BASE ──────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
body {
  font-family: 'Inter', system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
  font-size: 14px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--gold); text-decoration: none; }
a:hover { color: var(--gold-light); }

/* ── ANIMATIONS ─────────────────── */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(18px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes fadeIn {
  from { opacity: 0; } to { opacity: 1; }
}
@keyframes slideInRight {
  from { opacity: 0; transform: translateX(30px); }
  to   { opacity: 1; transform: translateX(0); }
}
@keyframes shimmer {
  0%   { background-position: -400px 0; }
  100% { background-position: 400px 0; }
}
@keyframes pulse-gold {
  0%, 100% { box-shadow: 0 0 0 0 rgba(201,168,76,0.3); }
  50%       { box-shadow: 0 0 0 6px rgba(201,168,76,0); }
}
@keyframes countUp {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}

.anim-up  { animation: fadeInUp 0.5s ease both; }
.anim-in  { animation: fadeIn 0.4s ease both; }
.anim-right { animation: slideInRight 0.4s ease both; }
.d1 { animation-delay: 0.05s; }
.d2 { animation-delay: 0.1s; }
.d3 { animation-delay: 0.15s; }
.d4 { animation-delay: 0.2s; }
.d5 { animation-delay: 0.25s; }
.d6 { animation-delay: 0.3s; }

/* ── SIDEBAR ─────────────────────── */
.sidebar {
  position: fixed;
  top: 0; left: 0; bottom: 0;
  width: var(--sidebar-w);
  background: var(--sidebar-bg);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  z-index: 200;
  transition: transform var(--transition);
}
.sidebar-brand {
  padding: 18px 16px 16px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
}
.brand-logo-link {
  display: block;
  background: #fff;
  border-radius: 8px;
  padding: 5px 10px;
  line-height: 0;
  transition: opacity var(--transition);
}
.brand-logo-link:hover { opacity: 0.88; }
.brand-logo-img {
  height: 46px;
  width: auto;
  max-width: 210px;
  object-fit: contain;
  display: block;
}
.sidebar-nav { flex: 1; padding: 14px 10px; overflow-y: auto; }
.sidebar-section-label {
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--text-3);
  padding: 14px 12px 6px;
}
.sidebar-link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 12px;
  border-radius: var(--radius-sm);
  color: var(--text-2);
  font-size: 13.5px;
  font-weight: 500;
  transition: all var(--transition);
  margin-bottom: 1px;
  position: relative;
}
.sidebar-link i { font-size: 15px; min-width: 18px; }
.sidebar-link:hover { background: rgba(255,255,255,0.04); color: var(--text); }
.sidebar-link.active {
  background: var(--gold-dim);
  color: var(--gold);
  border: 1px solid rgba(201,168,76,0.2);
}
.sidebar-link.active i { color: var(--gold); }

.sidebar-badge {
  margin-left: auto;
  background: var(--danger);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  min-width: 18px;
  height: 18px;
  border-radius: 9px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 5px;
  line-height: 1;
}

/* Notification bell in topbar */
.notif-bell {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: var(--card);
  border: 1px solid var(--border2);
  color: var(--text-2);
  font-size: 16px;
  transition: all var(--transition);
  flex-shrink: 0;
  margin-left: 6px;
}
.notif-bell:hover { color: var(--gold); border-color: var(--gold); background: var(--gold-dim); }
.notif-dot {
  position: absolute;
  top: -5px; right: -5px;
  background: var(--danger);
  color: #fff;
  font-size: 9px;
  font-weight: 800;
  min-width: 16px;
  height: 16px;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 4px;
  border: 2px solid var(--bg);
  line-height: 1;
}

.sidebar-footer {
  padding: 12px 10px;
  border-top: 1px solid var(--border);
}
.sidebar-user {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: background var(--transition);
}
.sidebar-user:hover { background: rgba(255,255,255,0.04); }
.user-avatar-sm {
  width: 32px; height: 32px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 12px; color: white;
  flex-shrink: 0;
  border: 1.5px solid var(--border2);
}
.sidebar-user-info .user-name { color: var(--text); font-size: 13px; font-weight: 600; }
.sidebar-user-info .user-role { color: var(--text-3); font-size: 10.5px; text-transform: capitalize; letter-spacing: 0.5px; }

/* ── MAIN LAYOUT ─────────────────── */
.main-wrapper {
  margin-left: var(--sidebar-w);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  min-width: 0;          /* allow shrinking so inner scrollers contain overflow */
  overflow-x: clip;      /* never let page scroll sideways (keeps topbar fixed) */
}
.topbar {
  height: var(--topbar-h);
  background: var(--card);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  padding: 0 28px;
  position: sticky;
  top: 0;
  z-index: 100;
  gap: 12px;
}
.topbar-title {
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
  flex: 1;
  letter-spacing: -0.2px;
}
.topbar-actions { display: flex; align-items: center; gap: 8px; }
.topbar-search {
  position: relative;
  display: flex;
  align-items: center;
}
.topbar-search i {
  position: absolute;
  left: 11px;
  font-size: 13px;
  color: var(--text-3);
  pointer-events: none;
}
.topbar-search input {
  background: var(--bg2);
  border: 1px solid var(--border2);
  border-radius: var(--radius-sm);
  color: var(--text);
  font-size: 13px;
  font-family: inherit;
  padding: 7px 12px 7px 32px;
  width: 210px;
  outline: none;
  transition: border-color var(--transition), width var(--transition);
}
.topbar-search input:focus { border-color: var(--gold); width: 250px; }
.topbar-search input::placeholder { color: var(--text-3); }
@media (max-width: 640px) {
  .topbar-search input { width: 130px; }
  .topbar-search input:focus { width: 150px; }
}
.hamburger {
  display: none;
  background: none;
  border: none;
  color: var(--text-2);
  font-size: 20px;
  cursor: pointer;
  padding: 4px;
  margin-right: 4px;
}
.page-content { padding: 28px; flex: 1; min-width: 0; }

/* ── GREETING HERO ───────────────── */
.greeting-hero {
  background: linear-gradient(135deg, #0D0E1C 0%, #141527 50%, #0D0E1C 100%);
  border: 1px solid var(--border2);
  border-radius: var(--radius);
  padding: 28px 32px;
  margin-bottom: 24px;
  position: relative;
  overflow: hidden;
}
.greeting-hero::before {
  content: '';
  position: absolute;
  top: 0; right: 0;
  width: 300px; height: 100%;
  background: radial-gradient(circle at top right, rgba(201,168,76,0.08) 0%, transparent 70%);
  pointer-events: none;
}
.greeting-time {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 6px;
}
.greeting-text {
  font-family: 'DM Serif Display', serif;
  font-size: 26px;
  color: var(--text);
  line-height: 1.2;
  margin-bottom: 6px;
}
.greeting-sub {
  font-size: 13px;
  color: var(--text-2);
}
.greeting-date {
  position: absolute;
  right: 32px;
  top: 50%;
  transform: translateY(-50%);
  text-align: right;
}
.greeting-date .date-day {
  font-family: 'DM Serif Display', serif;
  font-size: 42px;
  color: var(--text);
  line-height: 1;
}
.greeting-date .date-month {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--text-3);
  margin-top: 2px;
}

/* ── CARDS ───────────────────────── */
.rv-card {
  background: var(--card);
  border-radius: var(--radius);
  border: 1px solid var(--border);
}
.rv-card-header {
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.rv-card-header .card-title {
  font-size: 13.5px;
  font-weight: 600;
  color: var(--text);
  letter-spacing: -0.1px;
}
.rv-card-body { padding: 20px; }

/* ── STAT CARDS ──────────────────── */
.stat-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  transition: border-color var(--transition), box-shadow var(--transition);
  position: relative;
  overflow: hidden;
}
.stat-card::after {
  content: '';
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 2px;
  background: var(--accent-bar, transparent);
  border-radius: 0 0 var(--radius) var(--radius);
}
.stat-card:hover { border-color: var(--border2); box-shadow: var(--shadow-md); }
.stat-card .stat-icon {
  width: 38px; height: 38px;
  border-radius: 9px;
  display: flex; align-items: center; justify-content: center;
  font-size: 17px;
  margin-bottom: 14px;
}
.stat-card .stat-number {
  font-size: 30px;
  font-weight: 700;
  color: var(--text);
  line-height: 1;
  letter-spacing: -1px;
  animation: countUp 0.5s ease both;
}
.stat-card .stat-label {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-3);
  margin-top: 5px;
  text-transform: uppercase;
  letter-spacing: 0.8px;
}

/* ── BUTTONS ─────────────────────── */
.btn {
  font-family: 'Inter', sans-serif;
  font-weight: 500;
  border-radius: var(--radius-sm);
  transition: all var(--transition);
  font-size: 13.5px;
}
.btn:active { transform: scale(0.97); }
.btn-primary {
  background: var(--gold);
  border-color: var(--gold);
  color: #0B0C12;
  font-weight: 600;
}
.btn-primary:hover { background: var(--gold-light); border-color: var(--gold-light); color: #0B0C12; }
.btn-outline-primary { color: var(--gold); border-color: var(--gold); }
.btn-outline-primary:hover { background: var(--gold); color: #0B0C12; border-color: var(--gold); }
.btn-outline-secondary { color: var(--text-2); border-color: var(--border2); }
.btn-outline-secondary:hover { background: var(--card2); color: var(--text); border-color: var(--border2); }
.btn-success { background: var(--success); border-color: var(--success); color: #0B0C12; font-weight: 600; }
.btn-success:hover { filter: brightness(1.1); }

/* ── FORMS ───────────────────────── */
.form-control, .form-select {
  background: var(--bg2);
  border: 1px solid var(--border2);
  border-radius: var(--radius-sm);
  color: var(--text);
  font-size: 13.5px;
  transition: border-color var(--transition), box-shadow var(--transition);
}
.form-control:focus, .form-select:focus {
  background: var(--bg2);
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(201,168,76,0.15);
  color: var(--text);
}
.form-control::placeholder { color: var(--text-3); }
.form-label { font-size: 12px; font-weight: 600; color: var(--text-2); margin-bottom: 5px; letter-spacing: 0.2px; }
.input-group-text { background: var(--bg2); border-color: var(--border2); color: var(--text-3); }

/* ── TABLES ──────────────────────── */
.rv-table { border-collapse: separate; border-spacing: 0; width: 100%; }
.rv-table th {
  padding: 10px 14px;
  font-size: 10.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: var(--text-3);
  background: var(--bg2);
  border-bottom: 1px solid var(--border);
}
.rv-table td {
  padding: 13px 14px;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
  color: var(--text);
}
.rv-table tr:last-child td { border-bottom: none; }
.rv-table tbody tr { transition: background var(--transition); }
.rv-table tbody tr:hover { background: rgba(255,255,255,0.02); }

/* ── STATUS BADGES ───────────────── */
.status-badge {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 600;
  white-space: nowrap;
  letter-spacing: 0.2px;
}
.status-badge::before { content: ''; width: 5px; height: 5px; border-radius: 50%; }
.status-new           { background: var(--info-dim);    color: var(--info);    }
.status-new::before   { background: var(--info); }
.status-sample_sent   { background: var(--warning-dim); color: var(--warning); }
.status-sample_sent::before { background: var(--warning); }
.status-on_board      { background: var(--success-dim); color: var(--success); }
.status-on_board::before    { background: var(--success); }
.status-not_interested      { background: var(--danger-dim);  color: var(--danger); }
.status-not_interested::before { background: var(--danger); }
.status-follow_up_later     { background: var(--purple-dim); color: var(--purple); }
.status-follow_up_later::before { background: var(--purple); }
.status-unassigned          { background: rgba(255,255,255,0.05); color: var(--text-3); }
.status-unassigned::before  { background: var(--text-3); }

/* ── COMPANY AVATAR ──────────────── */
.company-avatar {
  width: 36px; height: 36px;
  border-radius: 9px;
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 14px; color: white;
  flex-shrink: 0;
}

/* ── KANBAN ──────────────────────── */
.kanban-board {
  display: flex;
  gap: 14px;
  overflow-x: auto;
  padding-bottom: 16px;
  align-items: flex-start;
}
.kanban-board::-webkit-scrollbar { height: 4px; }
.kanban-board::-webkit-scrollbar-track { background: var(--bg); }
.kanban-board::-webkit-scrollbar-thumb { background: var(--border2); border-radius: 2px; }

.kanban-col {
  min-width: 255px;
  max-width: 270px;
  flex-shrink: 0;
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  display: flex;
  flex-direction: column;
}
.kanban-col-header {
  padding: 12px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--border);
}
.kanban-col-title {
  font-size: 11.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.8px;
}
.kanban-col-count {
  background: var(--card);
  border: 1px solid var(--border2);
  color: var(--text-3);
  font-size: 11px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 10px;
}
.kanban-cards { padding: 10px; display: flex; flex-direction: column; gap: 8px; min-height: 60px; }
.kanban-card {
  background: var(--card);
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  border-top: 2px solid var(--col-accent, var(--border2));
  padding: 12px;
  cursor: pointer;
  transition: border-color var(--transition), box-shadow var(--transition), transform var(--transition);
  display: block;
  text-decoration: none;
  color: inherit;
}
.kanban-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
  border-color: var(--col-accent, var(--border2));
  color: inherit;
  text-decoration: none;
}
.kanban-card-name { font-size: 13px; font-weight: 600; color: var(--text); line-height: 1.3; margin-bottom: 6px; }
.kanban-card-meta { font-size: 11.5px; color: var(--text-2); display: flex; flex-direction: column; gap: 3px; }
.kanban-card-meta span { display: flex; align-items: center; gap: 5px; }
.kanban-card-comment {
  font-size: 11.5px; color: var(--text-3);
  margin-top: 7px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  max-width: 220px;
  font-style: italic;
}
.kanban-card-footer {
  margin-top: 8px; padding-top: 8px;
  border-top: 1px solid var(--border);
  display: flex; align-items: center; justify-content: space-between;
}
.kanban-empty {
  text-align: center; padding: 24px 10px;
  color: var(--text-3); font-size: 12px;
}
.kanban-empty i { font-size: 22px; display: block; margin-bottom: 6px; }

/* ── PIPELINE BARS ───────────────── */
.pipeline-bar { margin-bottom: 13px; }
.pipeline-bar-label { display: flex; justify-content: space-between; margin-bottom: 5px; }
.pipeline-bar-label span:first-child { font-size: 12.5px; font-weight: 500; color: var(--text); }
.pipeline-bar-label span:last-child { font-size: 12px; font-weight: 600; color: var(--text-2); }
.pipeline-track { height: 5px; background: var(--border2); border-radius: 3px; overflow: hidden; }
.pipeline-fill { height: 100%; border-radius: 3px; transition: width 0.8s cubic-bezier(0.4,0,0.2,1); }

/* ── ACTIVITY FEED ───────────────── */
.activity-feed { display: flex; flex-direction: column; }
.activity-item {
  display: flex; gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
}
.activity-item:last-child { border-bottom: none; }
.activity-dot {
  width: 30px; height: 30px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 13px;
  flex-shrink: 0;
}
.activity-text { font-size: 13px; color: var(--text); line-height: 1.4; }
.activity-time { font-size: 11px; color: var(--text-3); margin-top: 2px; }

/* ── QUICK ACTION CARDS ──────────── */
.quick-action-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px 16px;
  text-align: center;
  display: block;
  color: var(--text);
  transition: all var(--transition);
}
.quick-action-card:hover {
  border-color: var(--gold);
  box-shadow: 0 0 0 1px var(--gold-dim), var(--shadow-md);
  transform: translateY(-2px);
  color: var(--text);
}
.quick-action-card .qa-icon {
  width: 46px; height: 46px;
  border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  font-size: 20px;
  margin: 0 auto 10px;
}
.quick-action-card .qa-title { font-size: 13.5px; font-weight: 600; margin-bottom: 2px; }
.quick-action-card .qa-sub { font-size: 11.5px; color: var(--text-3); }

/* ── ADMIN QUICK ACTIONS ─────────── */
.adm-qa-list { display:flex; flex-direction:column; }
.adm-qa-item {
  display:flex; align-items:center; gap:13px;
  padding:12px 4px;
  border-bottom:1px solid var(--border);
  text-decoration:none; color:var(--text);
  transition:all var(--transition);
  border-radius:8px;
}
.adm-qa-item:hover {
  background:var(--card2);
  padding-left:10px; padding-right:6px;
  color:var(--text);
  border-bottom-color:var(--border);
}
.adm-qa-icon {
  width:38px; height:38px; border-radius:10px; flex-shrink:0;
  display:flex; align-items:center; justify-content:center; font-size:17px;
}
.adm-qa-body { flex:1; min-width:0; }
.adm-qa-title { font-size:13px; font-weight:600; color:var(--text); }
.adm-qa-sub   { font-size:11.5px; color:var(--text-3); margin-top:1px; }
.adm-qa-arr   { font-size:12px; color:var(--text-3); flex-shrink:0; transition:transform var(--transition); }
.adm-qa-item:hover .adm-qa-arr { transform:translateX(3px); color:var(--gold); }

/* ── PULL LEADS PAGE ─────────────── */
.pool-hero {
  background: linear-gradient(135deg, #0D0E1C, #151626);
  border: 1px solid var(--border2);
  border-radius: var(--radius);
  padding: 48px 32px;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.pool-hero::before {
  content: '';
  position: absolute; inset: 0;
  background: radial-gradient(circle at center, rgba(201,168,76,0.06) 0%, transparent 70%);
}
.pool-count {
  font-family: 'DM Serif Display', serif;
  font-size: 80px;
  color: var(--gold);
  line-height: 1;
  letter-spacing: -3px;
  animation: countUp 0.6s ease both;
}
.pool-label { font-size: 13px; font-weight: 500; color: var(--text-2); margin: 6px 0 32px; letter-spacing: 1px; text-transform: uppercase; }
.pull-input-wrap { max-width: 220px; margin: 0 auto 16px; }
.pull-input-wrap input {
  font-family: 'DM Serif Display', serif;
  font-size: 32px;
  text-align: center;
  height: 64px;
  letter-spacing: -1px;
  color: var(--text);
  background: var(--bg2);
  border: 1px solid var(--border2);
  border-radius: var(--radius-sm);
}
.pull-input-wrap input:focus { border-color: var(--gold); box-shadow: 0 0 0 3px var(--gold-dim); }

/* ── DROP ZONE ───────────────────── */
.drop-zone {
  border: 1.5px dashed var(--border2);
  border-radius: var(--radius);
  padding: 48px 24px;
  text-align: center;
  cursor: pointer;
  transition: all var(--transition);
  background: var(--bg2);
}
.drop-zone:hover, .drop-zone.drag-over {
  border-color: var(--gold);
  background: var(--gold-dim);
}
.drop-zone.file-selected {
  border-color: var(--success);
  background: var(--success-dim);
}
.drop-zone-icon { font-size: 2.5rem; color: var(--text-3); margin-bottom: 10px; }
.drop-zone p { color: var(--text-2); margin: 0; font-size: 13.5px; }
.drop-zone small { color: var(--text-3); }

/* ── TOASTS ──────────────────────── */
.rv-toast-wrap {
  position: fixed; top: 20px; right: 20px;
  z-index: 9999;
  display: flex; flex-direction: column; gap: 10px;
  pointer-events: none;
}
.rv-toast {
  background: var(--card2);
  border: 1px solid var(--border2);
  border-radius: var(--radius-sm);
  padding: 14px 16px;
  box-shadow: var(--shadow-lg);
  display: flex; align-items: center; gap: 12px;
  min-width: 300px; max-width: 380px;
  pointer-events: all;
  transform: translateX(130%);
  transition: transform 0.35s cubic-bezier(0.34,1.56,0.64,1);
}
.rv-toast.show { transform: translateX(0); }
.rv-toast.hide { transform: translateX(130%); transition: transform 0.25s ease-in; }
.rv-toast-icon { font-size: 18px; flex-shrink: 0; }
.rv-toast-msg { font-size: 13.5px; color: var(--text); flex: 1; }
.rv-toast-close { color: var(--text-3); font-size: 14px; cursor: pointer; border: none; background: none; padding: 0; }
.rv-toast-close:hover { color: var(--text); }
.rv-toast-bar { position: absolute; bottom: 0; left: 0; height: 2px; border-radius: 0 0 var(--radius-sm) var(--radius-sm); animation: toast-bar 4s linear forwards; }
@keyframes toast-bar { from { width: 100%; } to { width: 0%; } }
.rv-toast.success .rv-toast-icon { color: var(--success); }
.rv-toast.success .rv-toast-bar { background: var(--success); }
.rv-toast.success { border-left: 2px solid var(--success); }
.rv-toast.danger  .rv-toast-icon { color: var(--danger); }
.rv-toast.danger  .rv-toast-bar  { background: var(--danger); }
.rv-toast.danger  { border-left: 2px solid var(--danger); }
.rv-toast.warning .rv-toast-icon { color: var(--warning); }
.rv-toast.warning .rv-toast-bar  { background: var(--warning); }
.rv-toast.warning { border-left: 2px solid var(--warning); }
.rv-toast.info    .rv-toast-icon { color: var(--info); }
.rv-toast.info    .rv-toast-bar  { background: var(--info); }
.rv-toast.info    { border-left: 2px solid var(--info); }

/* ── MODAL ───────────────────────── */
.modal-content {
  background: var(--card2);
  border: 1px solid var(--border2);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
}
.modal-header { border-bottom: 1px solid var(--border); padding: 18px 22px; }
.modal-title { font-size: 15px; font-weight: 600; color: var(--text); }
.modal-body { padding: 20px 22px; }
.modal-footer { border-top: 1px solid var(--border); padding: 14px 22px; }
.btn-close { filter: invert(1) opacity(0.5); }
.btn-close:hover { filter: invert(1) opacity(0.9); }

/* ── DROPDOWNS ───────────────────── */
.dropdown-menu {
  background: var(--card2);
  border: 1px solid var(--border2);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-lg);
  padding: 6px;
}
.dropdown-item { color: var(--text-2); border-radius: 6px; font-size: 13.5px; padding: 8px 12px; }
.dropdown-item:hover { background: rgba(255,255,255,0.05); color: var(--text); }
.dropdown-item.text-danger { color: var(--danger) !important; }
.dropdown-item.text-danger:hover { background: var(--danger-dim); }
.dropdown-divider { border-color: var(--border); margin: 4px 0; }

/* ── TIMELINE ────────────────────── */
.timeline { position: relative; padding-left: 26px; }
.timeline::before { content: ''; position: absolute; left: 9px; top: 0; bottom: 0; width: 1px; background: var(--border); }
.timeline-item { position: relative; margin-bottom: 14px; }
.timeline-dot {
  position: absolute; left: -21px; top: 8px;
  width: 12px; height: 12px;
  border-radius: 50%;
  border: 2px solid var(--card);
}
.timeline-content {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 10px 14px;
}

/* ── LOGIN ───────────────────────── */
.login-page {
  min-height: 100vh;
  background: var(--bg);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}
.login-page::before {
  content: '';
  position: absolute;
  width: 600px; height: 600px;
  background: radial-gradient(circle, rgba(201,168,76,0.06) 0%, transparent 70%);
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  pointer-events: none;
}
.login-card {
  background: var(--card);
  border: 1px solid var(--border2);
  border-radius: 20px;
  padding: 44px 40px;
  width: 100%; max-width: 400px;
  box-shadow: var(--shadow-lg);
  animation: fadeInUp 0.5s ease both;
  position: relative;
  z-index: 1;
}

/* ── ALERTS ──────────────────────── */
.alert { border-radius: var(--radius-sm); border: none; font-size: 13.5px; }
.alert-success { background: var(--success-dim); color: var(--success); }
.alert-danger  { background: var(--danger-dim);  color: var(--danger); }
.alert-warning { background: var(--warning-dim); color: var(--warning); }
.alert-info    { background: var(--info-dim);    color: var(--info); }
.alert-dismissible .btn-close { filter: none; opacity: 0.6; }

/* ── MISC ────────────────────────── */
.view-toggle .btn { font-size: 12.5px; }
.search-bar { position: relative; }
.search-bar .bi-search { position: absolute; left: 11px; top: 50%; transform: translateY(-50%); color: var(--text-3); font-size: 13px; }
.search-bar input { padding-left: 32px; }
details summary { cursor: pointer; font-size: 12.5px; color: var(--text-2); }
details summary:hover { color: var(--gold); }

/* ── SCROLLBAR ───────────────────── */
::-webkit-scrollbar { width: 5px; height: 5px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--border2); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--text-3); }

/* ── THEME SWITCHER ──────────────── */
.theme-switcher {
  padding: 10px 10px 8px;
  border-top: 1px solid var(--border);
}
.theme-switcher-label {
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--text-3);
  padding: 0 4px;
  margin-bottom: 8px;
}
.theme-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 5px;
}
.tg-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  padding: 8px 4px 7px;
  border: 1px solid var(--border);
  background: transparent;
  border-radius: 8px;
  font-size: 9.5px;
  font-weight: 500;
  color: var(--text-3);
  cursor: pointer;
  transition: all var(--transition);
  line-height: 1;
}
.tg-btn.active {
  border-color: var(--gold);
  background: var(--gold-dim);
  color: var(--gold);
  font-weight: 700;
}
.tg-btn:hover:not(.active) {
  border-color: var(--border2);
  color: var(--text-2);
  background: rgba(255,255,255,0.03);
}
.tg-swatch {
  width: 26px; height: 14px;
  border-radius: 4px;
  border: 1.5px solid transparent;
  display: block;
}
/* Fixed preview colors — not CSS vars so they always show the right preview */
.tg-s-dark    { background: #0B0C12; border-color: #C9A84C; }
.tg-s-cream   { background: #F5F0E8; border-color: #B8922A; }
.tg-s-ocean   { background: #071525; border-color: #22D3EE; }
.tg-s-horizon { background: #09090F; border-color: #10B981; }

/* ══════════════════════════════════════════════════════
   THEME 1 VARIANT — CREAM LUXURY
   ══════════════════════════════════════════════════════ */
html.theme-cream {
  --bg:          #F5F0E8;
  --bg2:         #EDE8DF;
  --card:        #FFFFFF;
  --card2:       #FAF8F5;
  --border:      #DDD6CA;
  --border2:     #CBC3B4;
  --gold:        #B8922A;
  --gold-light:  #C9A84C;
  --gold-dim:    rgba(184,146,42,0.1);
  --gold-glow:   0 0 20px rgba(184,146,42,0.1);
  --text:        #1A1208;
  --text-2:      #6B5D4F;
  --text-3:      #A8977F;
  --sidebar-bg:  #FDFAF6;
  --success:     #16A34A;
  --success-dim: rgba(22,163,74,0.1);
  --danger:      #DC2626;
  --danger-dim:  rgba(220,38,38,0.1);
  --warning:     #D97706;
  --warning-dim: rgba(217,119,6,0.1);
  --info:        #2563EB;
  --info-dim:    rgba(37,99,235,0.1);
  --purple:      #7C3AED;
  --purple-dim:  rgba(124,58,237,0.1);
  --shadow:      0 1px 3px rgba(0,0,0,0.08), 0 1px 2px rgba(0,0,0,0.04);
  --shadow-md:   0 4px 20px rgba(0,0,0,0.1);
  --shadow-lg:   0 20px 60px rgba(0,0,0,0.15);
}
/* Hover states: flip from white-on-dark to black-on-light */
html.theme-cream .sidebar-link:hover      { background: rgba(0,0,0,0.05); }
html.theme-cream .sidebar-user:hover      { background: rgba(0,0,0,0.05); }
html.theme-cream .dropdown-item:hover     { background: rgba(0,0,0,0.05); color: var(--text); }
html.theme-cream .rv-table tbody tr:hover { background: rgba(0,0,0,0.025); }
html.theme-cream .status-unassigned       { background: rgba(0,0,0,0.05); }
/* Greeting hero — warm cream version */
html.theme-cream .greeting-hero {
  background: linear-gradient(135deg, #EDE5D3 0%, #F7F2E9 100%);
  border-color: #DDD1BC;
}
html.theme-cream .greeting-hero::before {
  background: radial-gradient(circle at top right, rgba(184,146,42,0.09) 0%, transparent 70%);
}
/* Pool hero — warm cream version */
html.theme-cream .pool-hero {
  background: linear-gradient(135deg, #EDE5D3 0%, #F7F2E9 100%);
  border-color: #DDD1BC;
}
html.theme-cream .pool-hero::before {
  background: radial-gradient(circle at center, rgba(184,146,42,0.08) 0%, transparent 70%);
}
/* Modal close btn: no invert needed on light bg */
html.theme-cream .btn-close { filter: none; opacity: 0.45; }
html.theme-cream .btn-close:hover { filter: none; opacity: 0.85; }
/* Primary button text stays dark */
html.theme-cream .btn-primary,
html.theme-cream .btn-primary:hover,
html.theme-cream .btn-outline-primary:hover { color: #1A1208; }
/* Scrollbar thumb on cream */
html.theme-cream ::-webkit-scrollbar-track { background: var(--bg); }
html.theme-cream ::-webkit-scrollbar-thumb { background: var(--border2); }

/* ══════════════════════════════════════════════════════
   THEME 2 — CELESTIAL OCEAN
   Deep sapphire blues · Cyan accent · Ultra-modern
   ══════════════════════════════════════════════════════ */
html.theme-2 {
  /* Deep ocean backgrounds */
  --bg:          #030C18;
  --bg2:         #071525;
  --card:        #0B1D35;
  --card2:       #102540;
  --border:      #162D4A;
  --border2:     #1F3D62;

  /* Cyan / electric blue accent */
  --gold:        #22D3EE;
  --gold-light:  #67E8F9;
  --gold-dim:    rgba(34,211,238,0.12);
  --gold-glow:   0 0 24px rgba(34,211,238,0.2);

  /* Text — cool arctic white */
  --text:        #E0F4FF;
  --text-2:      #6BA8C8;
  --text-3:      #2E5F7E;

  --sidebar-bg:  #020911;

  /* Status colours — adjusted for ocean palette */
  --success:     #34D399;
  --success-dim: rgba(52,211,153,0.1);
  --danger:      #F87171;
  --danger-dim:  rgba(248,113,113,0.1);
  --warning:     #FBBF24;
  --warning-dim: rgba(251,191,36,0.1);
  --info:        #818CF8;
  --info-dim:    rgba(129,140,248,0.1);
  --purple:      #E879F9;
  --purple-dim:  rgba(232,121,249,0.1);

  --shadow:      0 1px 3px rgba(0,0,0,0.6), 0 1px 2px rgba(0,0,0,0.5);
  --shadow-md:   0 4px 24px rgba(0,0,0,0.65);
  --shadow-lg:   0 20px 60px rgba(0,0,0,0.8);
}

/* Greeting hero — deep ocean version */
html.theme-2 .greeting-hero {
  background: linear-gradient(135deg, #051020 0%, #0D2040 50%, #051020 100%);
  border-color: var(--border2);
}
html.theme-2 .greeting-hero::before {
  background: radial-gradient(circle at top right, rgba(34,211,238,0.12) 0%, transparent 65%);
}
/* Pool hero */
html.theme-2 .pool-hero {
  background: linear-gradient(135deg, #051020, #0D2040);
  border-color: var(--border2);
}
html.theme-2 .pool-hero::before {
  background: radial-gradient(circle at center, rgba(34,211,238,0.08) 0%, transparent 65%);
}
/* Login page glow */
html.theme-2 .login-page::before {
  background: radial-gradient(circle, rgba(34,211,238,0.09) 0%, transparent 65%);
}
/* Sidebar active has a cyan glow */
html.theme-2 .sidebar-link.active {
  background: rgba(34,211,238,0.1);
  border-color: rgba(34,211,238,0.25);
  box-shadow: inset 2px 0 0 var(--gold);
}
html.theme-2 .sidebar-link:hover { background: rgba(34,211,238,0.05); }
html.theme-2 .sidebar-user:hover { background: rgba(34,211,238,0.05); }
/* Button text — cyan is light so dark text reads better */
html.theme-2 .btn-primary { color: #030C18; font-weight: 700; }
html.theme-2 .btn-primary:hover { color: #030C18; }
html.theme-2 .btn-outline-primary:hover { color: #030C18; }
/* Kanban card hover glow */
html.theme-2 .kanban-card:hover {
  box-shadow: 0 4px 24px rgba(34,211,238,0.12), var(--shadow-md);
}
/* Table row hover */
html.theme-2 .rv-table tbody tr:hover { background: rgba(34,211,238,0.03); }
/* Dropdown */
html.theme-2 .dropdown-item:hover { background: rgba(34,211,238,0.06); color: var(--text); }
/* Notif bell */
html.theme-2 .notif-bell:hover { background: rgba(34,211,238,0.1); border-color: var(--gold); }
/* Stat card hover glow */
html.theme-2 .stat-card:hover { box-shadow: 0 0 0 1px var(--border2), 0 4px 24px rgba(34,211,238,0.08); }
/* Scrollbar */
html.theme-2 ::-webkit-scrollbar-track { background: var(--bg); }
html.theme-2 ::-webkit-scrollbar-thumb { background: var(--border2); }
/* Status unassigned */
html.theme-2 .status-unassigned { background: rgba(255,255,255,0.04); }
/* Form focus glow */
html.theme-2 .form-control:focus,
html.theme-2 .form-select:focus {
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(34,211,238,0.15);
}
/* Leaderboard gold tones — keep using --gold so cyan accent flows through */
html.theme-2 .rank-1 .podium-base { background: linear-gradient(135deg, #0E7490 0%, var(--gold) 100%); }
html.theme-2 .rank-2 .podium-base { background: linear-gradient(135deg, #1E3A5E 0%, #2563EB 100%); }
html.theme-2 .rank-3 .podium-base { background: linear-gradient(135deg, #1E3A5E 0%, #3B82F6 100%); }
/* Pull input focus */
html.theme-2 .pull-input-wrap input:focus { border-color: var(--gold); box-shadow: 0 0 0 3px var(--gold-dim); }
/* Quick action hover */
html.theme-2 .quick-action-card:hover {
  border-color: var(--gold);
  box-shadow: 0 0 0 1px var(--gold-dim), 0 6px 24px rgba(34,211,238,0.1);
}
/* Modal close btn */
html.theme-2 .btn-close { filter: invert(1) opacity(0.5); }
html.theme-2 .btn-close:hover { filter: invert(1) opacity(0.9); }

/* ══════════════════════════════════════════════════════
   THEME 3 — HORIZON  (TOP-NAV LAYOUT)
   Emerald accent · Dark slate · Horizontal navigation
   ══════════════════════════════════════════════════════ */
html.theme-3 {
  --bg:          #09090F;
  --bg2:         #0E0F1A;
  --card:        #131420;
  --card2:       #191A2C;
  --border:      #1E2035;
  --border2:     #272A42;
  --gold:        #10B981;
  --gold-light:  #34D399;
  --gold-dim:    rgba(16,185,129,0.1);
  --gold-glow:   0 0 22px rgba(16,185,129,0.18);
  --text:        #EEF2F7;
  --text-2:      #8896B0;
  --text-3:      #48566A;
  --sidebar-bg:  #06070F;
  --success:     #34D399;
  --success-dim: rgba(52,211,153,0.1);
  --danger:      #F87171;
  --danger-dim:  rgba(248,113,113,0.1);
  --warning:     #FBBF24;
  --warning-dim: rgba(251,191,36,0.1);
  --info:        #60A5FA;
  --info-dim:    rgba(96,165,250,0.1);
  --purple:      #A78BFA;
  --purple-dim:  rgba(167,139,250,0.1);
  --topnav-h:    52px;
  --topbar-h:    56px;
  --shadow:      0 1px 3px rgba(0,0,0,0.55), 0 1px 2px rgba(0,0,0,0.45);
  --shadow-md:   0 4px 22px rgba(0,0,0,0.6);
  --shadow-lg:   0 20px 60px rgba(0,0,0,0.75);
}

/* ── LAYOUT: sidebar → horizontal top nav ── */
html.theme-3 .sidebar {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: auto;
  width: 100% !important;
  height: var(--topnav-h);
  flex-direction: row;
  align-items: center;
  overflow: visible;
  border-right: none;
  border-bottom: 1px solid var(--border);
  z-index: 300;
  transform: none !important;
  box-shadow: 0 1px 20px rgba(0,0,0,0.4);
}

html.theme-3 .sidebar-brand {
  padding: 0 14px 0 16px;
  border-bottom: none;
  border-right: 1px solid var(--border);
  height: 100%;
  display: flex;
  align-items: center;
  flex-shrink: 0;
}
html.theme-3 .brand-logo-img { height: 30px; }

html.theme-3 .sidebar-nav {
  flex-direction: row !important;
  display: flex !important;
  overflow-x: auto;
  overflow-y: visible;
  padding: 0 6px;
  flex: 1;
  align-items: center;
  height: 100%;
  scrollbar-width: none;
  gap: 2px;
}
html.theme-3 .sidebar-nav::-webkit-scrollbar { display: none; }

html.theme-3 .sidebar-section-label { display: none; }

html.theme-3 .sidebar-link {
  flex-direction: row;
  gap: 6px;
  padding: 5px 11px;
  border-radius: 7px;
  border-left: none;
  font-size: 12.5px;
  white-space: nowrap;
  height: auto;
  margin-bottom: 0;
  flex-shrink: 0;
}
html.theme-3 .sidebar-link i { font-size: 14px; min-width: auto; }
html.theme-3 .sidebar-link:hover { background: rgba(255,255,255,0.05); }
html.theme-3 .sidebar-link.active {
  background: var(--gold-dim);
  border: 1px solid rgba(16,185,129,0.22);
  color: var(--gold);
}
html.theme-3 .sidebar-link.active i { color: var(--gold); }
html.theme-3 .sidebar-badge {
  margin-left: 2px;
  font-size: 9px;
  min-width: 15px;
  height: 15px;
  border-radius: 7px;
  padding: 0 4px;
}

html.theme-3 .sidebar-footer {
  padding: 0 10px;
  border-top: none;
  border-left: 1px solid var(--border);
  display: flex;
  align-items: center;
  height: 100%;
  gap: 8px;
  flex-shrink: 0;
}

/* Theme switcher: inline icon-only swatches in the nav */
html.theme-3 .theme-switcher {
  padding: 0;
  border-top: none;
  border-left: 1px solid var(--border);
  padding-left: 10px;
  display: flex;
  align-items: center;
}
html.theme-3 .theme-switcher-label { display: none; }
html.theme-3 .theme-grid {
  display: flex;
  flex-direction: row;
  gap: 3px;
}
html.theme-3 .tg-btn {
  width: 24px;
  height: 22px;
  padding: 3px;
  font-size: 0;
  gap: 0;
  border-radius: 5px;
  justify-content: center;
}
html.theme-3 .tg-swatch {
  width: 15px;
  height: 9px;
  border-radius: 2px;
}

/* Hide user name text, show only avatar in topnav */
html.theme-3 .sidebar-user { padding: 4px 6px; }
html.theme-3 .sidebar-user-info { display: none; }

/* Main wrapper: full width, push down below topnav */
html.theme-3 .main-wrapper {
  margin-left: 0 !important;
  margin-top: var(--topnav-h);
}

/* Topbar becomes the page-title bar */
html.theme-3 .topbar {
  background: var(--bg2);
  border-bottom: 1px solid var(--border);
}
html.theme-3 .hamburger      { display: none !important; }
html.theme-3 .sidebar-overlay { display: none !important; }

/* Cards: slightly more elevated on slate */
html.theme-3 .rv-card { box-shadow: 0 1px 8px rgba(0,0,0,0.35); }
html.theme-3 .stat-card { box-shadow: 0 1px 8px rgba(0,0,0,0.3); }
html.theme-3 .stat-card:hover {
  box-shadow: 0 0 0 1px rgba(16,185,129,0.2), 0 4px 24px rgba(16,185,129,0.08);
}

/* Hero sections */
html.theme-3 .greeting-hero {
  background: linear-gradient(135deg, #0A1210 0%, #0F1E18 50%, #0A1210 100%);
  border-color: rgba(16,185,129,0.15);
}
html.theme-3 .greeting-hero::before {
  background: radial-gradient(circle at top right, rgba(16,185,129,0.12) 0%, transparent 65%);
}
html.theme-3 .pool-hero {
  background: linear-gradient(135deg, #0A1210, #0F1E18);
  border-color: rgba(16,185,129,0.15);
}
html.theme-3 .pool-hero::before {
  background: radial-gradient(circle at center, rgba(16,185,129,0.08) 0%, transparent 65%);
}
html.theme-3 .login-page::before {
  background: radial-gradient(circle, rgba(16,185,129,0.09) 0%, transparent 65%);
}

/* Buttons */
html.theme-3 .btn-primary { color: #050D08; font-weight: 700; }
html.theme-3 .btn-primary:hover { color: #050D08; }
html.theme-3 .btn-outline-primary:hover { color: #050D08; }

/* Hover / interaction states */
html.theme-3 .kanban-card:hover {
  box-shadow: 0 4px 24px rgba(16,185,129,0.12), var(--shadow-md);
}
html.theme-3 .rv-table tbody tr:hover { background: rgba(16,185,129,0.03); }
html.theme-3 .dropdown-item:hover     { background: rgba(16,185,129,0.07); color: var(--text); }
html.theme-3 .notif-bell:hover        { background: rgba(16,185,129,0.1); border-color: var(--gold); }
html.theme-3 .quick-action-card:hover {
  border-color: var(--gold);
  box-shadow: 0 0 0 1px var(--gold-dim), 0 6px 24px rgba(16,185,129,0.1);
}
html.theme-3 .form-control:focus,
html.theme-3 .form-select:focus {
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(16,185,129,0.15);
}
html.theme-3 .pull-input-wrap input:focus { border-color: var(--gold); box-shadow: 0 0 0 3px var(--gold-dim); }

/* Leaderboard podium with emerald tones */
html.theme-3 .rank-1 .podium-base { background: linear-gradient(135deg, #065F46 0%, var(--gold) 100%); }
html.theme-3 .rank-2 .podium-base { background: linear-gradient(135deg, #1E3A5E 0%, #64748B 100%); }
html.theme-3 .rank-3 .podium-base { background: linear-gradient(135deg, #7C2D12 0%, #B4713C 100%); }

/* Scrollbar */
html.theme-3 ::-webkit-scrollbar-track { background: var(--bg); }
html.theme-3 ::-webkit-scrollbar-thumb { background: var(--border2); }
html.theme-3 .btn-close { filter: invert(1) opacity(0.5); }
html.theme-3 .btn-close:hover { filter: invert(1) opacity(0.9); }

/* Mobile: compress the topnav */
@media (max-width: 900px) {
  html.theme-3 .sidebar { overflow-x: auto; }
  html.theme-3 .sidebar-footer { display: none; }
  html.theme-3 .main-wrapper { margin-top: var(--topnav-h); }
}

/* ── LEADERBOARD ─────────────────── */
@keyframes float {
  0%, 100% { transform: translateY(0px); }
  50%       { transform: translateY(-6px); }
}
.lb-header {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 28px;
  flex-wrap: wrap;
}
.lb-header-icon {
  width: 48px; height: 48px;
  background: var(--gold-dim);
  border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  font-size: 22px;
  color: var(--gold);
  flex-shrink: 0;
}
.lb-title { font-family: 'DM Serif Display', serif; font-size: 22px; color: var(--text); line-height: 1.2; }
.lb-subtitle { font-size: 13px; color: var(--text-3); margin-top: 3px; }
.lb-score-legend {
  display: flex; gap: 14px; flex-wrap: wrap;
  margin-left: auto;
  align-items: center;
}
.lb-leg-item { font-size: 11.5px; color: var(--text-3); display: flex; align-items: center; gap: 5px; }
.lb-leg-dot { width: 7px; height: 7px; border-radius: 50%; flex-shrink: 0; }
/* Podium */
.podium-wrap {
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: 10px;
  margin-bottom: 24px;
}
.podium-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  text-align: center;
  width: 195px;
  display: flex;
  flex-direction: column;
  align-items: center;
  overflow: hidden;
  transition: box-shadow var(--transition);
}
.podium-card:hover { box-shadow: var(--shadow-md); }
.podium-card-body { padding: 20px 16px 14px; width: 100%; }
.podium-card.rank-1 { border-color: rgba(201,168,76,0.45); box-shadow: 0 0 0 1px rgba(201,168,76,0.15), 0 6px 28px rgba(201,168,76,0.1); }
.podium-card.rank-2 { border-color: rgba(148,163,184,0.4); }
.podium-card.rank-3 { border-color: rgba(180,113,60,0.35); }
.podium-crown { font-size: 22px; color: var(--gold); animation: float 2.4s ease-in-out infinite; margin-bottom: 6px; }
.podium-avatar {
  width: 58px; height: 58px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 20px; color: #fff;
  margin: 0 auto 8px;
  border: 3px solid transparent;
}
.rank-1 .podium-avatar { border-color: var(--gold); }
.rank-2 .podium-avatar { border-color: #94A3B8; }
.rank-3 .podium-avatar { border-color: #B4713C; }
.podium-medal { font-size: 17px; margin-bottom: 6px; }
.podium-medal.gold   { color: var(--gold); }
.podium-medal.silver { color: #94A3B8; }
.podium-medal.bronze { color: #B4713C; }
.podium-name { font-size: 13.5px; font-weight: 700; color: var(--text); margin-bottom: 8px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 160px; }
.podium-score { font-family: 'DM Serif Display', serif; font-size: 40px; color: var(--text); line-height: 1; }
.podium-pts { font-size: 10.5px; color: var(--text-3); letter-spacing: 1.5px; text-transform: uppercase; margin: 2px 0 10px; }
.podium-stats { display: flex; justify-content: center; gap: 14px; font-size: 12px; color: var(--text-2); }
.podium-stats span { display: flex; align-items: center; gap: 4px; }
.podium-base {
  width: 100%;
  padding: 10px 0;
  font-family: 'DM Serif Display', serif;
  font-size: 22px;
  color: #fff;
  font-weight: 700;
  margin-top: 14px;
  display: flex; align-items: center; justify-content: center;
}
.rank-1 .podium-base { background: linear-gradient(135deg, #B8922A 0%, var(--gold-light) 100%); min-height: 76px; }
.rank-2 .podium-base { background: linear-gradient(135deg, #64748B 0%, #94A3B8 100%); min-height: 52px; }
.rank-3 .podium-base { background: linear-gradient(135deg, #92562A 0%, #B4713C 100%); min-height: 36px; }
/* Table */
.lb-rank { display: flex; align-items: center; justify-content: center; }
.lb-score-cell { display: flex; align-items: baseline; gap: 4px; }
.lb-score-num { font-family: 'DM Serif Display', serif; font-size: 20px; color: var(--text); }
.lb-row.lb-gold td:first-child { border-left: 2px solid var(--gold); }
.lb-row.lb-silver td:first-child { border-left: 2px solid #94A3B8; }
.lb-row.lb-bronze td:first-child { border-left: 2px solid #B4713C; }
.lb-row.lb-self { background: var(--gold-dim) !important; }
.lb-you-badge {
  display: inline-block;
  font-size: 9.5px; font-weight: 700;
  letter-spacing: 0.8px; text-transform: uppercase;
  background: var(--gold-dim);
  color: var(--gold);
  border: 1px solid rgba(201,168,76,0.3);
  border-radius: 4px;
  padding: 1px 5px;
  margin-left: 6px;
  vertical-align: middle;
}
.lb-winrate { display: flex; align-items: center; gap: 8px; font-size: 12.5px; color: var(--text-2); font-weight: 500; }
.lb-winrate-bar { width: 52px; height: 4px; background: var(--border2); border-radius: 2px; overflow: hidden; flex-shrink: 0; }
.lb-winrate-fill { height: 100%; background: var(--success); border-radius: 2px; }
/* My rank banner */
.lb-my-rank-banner {
  display: flex; align-items: center; gap: 14px;
  background: var(--gold-dim);
  border: 1px solid rgba(201,168,76,0.25);
  border-radius: var(--radius-sm);
  padding: 12px 18px;
  margin-bottom: 20px;
}
.lb-my-rank-num { font-family: 'DM Serif Display', serif; font-size: 32px; color: var(--gold); line-height: 1; }

/* ── OVERLAY ─────────────────────── */
.sidebar-overlay {
  display: none;
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.6);
  z-index: 150;
  backdrop-filter: blur(2px);
}
.sidebar-overlay.show { display: block; }

/* ── RESPONSIVE ──────────────────── */
@media (max-width: 900px) {
  .sidebar { transform: translateX(-100%); }
  .sidebar.open { transform: translateX(0); box-shadow: var(--shadow-lg); }
  .main-wrapper { margin-left: 0; }
  .hamburger { display: block; }
  .greeting-date { display: none; }
  .pool-count { font-size: 60px; }
  .page-content { padding: 16px; }
  .topbar { padding: 0 16px; }
}
