@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800;900&family=Space+Grotesk:wght@400;500;600;700&display=swap');

:root {
  --bg-primary: #050810;
  --bg-secondary: #080d1a;
  --bg-card: rgba(255,255,255,0.04);
  --bg-card-hover: rgba(255,255,255,0.07);
  --border: rgba(255,255,255,0.08);
  --border-glow: rgba(139,92,246,0.4);
  --purple: #8b5cf6;
  --indigo: #6366f1;
  --blue: #3b82f6;
  --electric: #06b6d4;
  --pink: #ec4899;
  --green: #10b981;
  --amber: #f59e0b;
  --red: #ef4444;
  --text-primary: #f1f5f9;
  --text-secondary: #94a3b8;
  --text-muted: #475569;
  --gradient-1: linear-gradient(135deg, #8b5cf6 0%, #6366f1 50%, #3b82f6 100%);
  --gradient-2: linear-gradient(135deg, #06b6d4 0%, #8b5cf6 100%);
  --gradient-hero: radial-gradient(ellipse 80% 60% at 50% -20%, rgba(139,92,246,0.3) 0%, transparent 70%);
  --shadow-glow: 0 0 40px rgba(139,92,246,0.15);
  --shadow-card: 0 8px 32px rgba(0,0,0,0.4);
  --radius: 16px;
  --radius-sm: 10px;
  --radius-lg: 24px;
  --transition: all 0.3s cubic-bezier(0.4,0,0.2,1);
}

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

html { scroll-behavior: smooth; }

body {
  font-family: 'Inter', sans-serif;
  background: var(--bg-primary);
  color: var(--text-primary);
  min-height: 100vh;
  overflow-x: hidden;
  line-height: 1.6;
}

/* ── SCROLLBAR ── */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--bg-secondary); }
::-webkit-scrollbar-thumb { background: var(--purple); border-radius: 3px; }

/* ── NAV ── */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 1000;
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 40px; height: 64px;
  background: rgba(5,8,16,0.8);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
}
.nav-logo {
  display: flex; align-items: center; gap: 10px;
  font-family: 'Space Grotesk', sans-serif;
  font-size: 20px; font-weight: 700;
  background: var(--gradient-1); -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  text-decoration: none;
}
.nav-logo svg { flex-shrink: 0; }
.nav-links { display: flex; align-items: center; gap: 6px; }
.nav-link {
  padding: 7px 16px; border-radius: 8px;
  color: var(--text-secondary); font-size: 14px; font-weight: 500;
  text-decoration: none; transition: var(--transition); white-space: nowrap;
}
.nav-link:hover, .nav-link.active {
  color: var(--text-primary); background: var(--bg-card);
}
.nav-link.active { color: var(--purple); }
.nav-cta {
  padding: 8px 20px; border-radius: 8px;
  background: var(--gradient-1);
  color: #fff; font-size: 14px; font-weight: 600;
  text-decoration: none; transition: var(--transition);
  box-shadow: 0 0 20px rgba(139,92,246,0.3);
}
.nav-cta:hover { transform: translateY(-1px); box-shadow: 0 0 30px rgba(139,92,246,0.5); }

/* ── GLASS CARD ── */
.glass {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  backdrop-filter: blur(20px);
  transition: var(--transition);
}
.glass:hover { background: var(--bg-card-hover); border-color: var(--border-glow); box-shadow: var(--shadow-glow); }

/* ── BUTTONS ── */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 12px 24px; border-radius: 10px;
  font-size: 14px; font-weight: 600; cursor: pointer;
  border: none; text-decoration: none; transition: var(--transition);
}
.btn-primary {
  background: var(--gradient-1);
  color: #fff; box-shadow: 0 0 24px rgba(139,92,246,0.4);
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 0 40px rgba(139,92,246,0.6); }
.btn-secondary {
  background: var(--bg-card); border: 1px solid var(--border);
  color: var(--text-primary);
}
.btn-secondary:hover { border-color: var(--border-glow); background: var(--bg-card-hover); }
.btn-ghost { background: transparent; color: var(--text-secondary); }
.btn-ghost:hover { color: var(--text-primary); background: var(--bg-card); }
.btn-sm { padding: 7px 16px; font-size: 13px; }
.btn-lg { padding: 16px 36px; font-size: 16px; border-radius: 12px; }

/* ── BADGE ── */
.badge {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 4px 10px; border-radius: 99px;
  font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.05em;
}
.badge-purple { background: rgba(139,92,246,0.15); color: var(--purple); border: 1px solid rgba(139,92,246,0.3); }
.badge-blue { background: rgba(59,130,246,0.15); color: var(--blue); border: 1px solid rgba(59,130,246,0.3); }
.badge-green { background: rgba(16,185,129,0.15); color: var(--green); border: 1px solid rgba(16,185,129,0.3); }
.badge-amber { background: rgba(245,158,11,0.15); color: var(--amber); border: 1px solid rgba(245,158,11,0.3); }
.badge-red { background: rgba(239,68,68,0.15); color: var(--red); border: 1px solid rgba(239,68,68,0.3); }
.badge-electric { background: rgba(6,182,212,0.15); color: var(--electric); border: 1px solid rgba(6,182,212,0.3); }

/* ── SCORE RING ── */
.score-ring { position: relative; display: inline-flex; align-items: center; justify-content: center; }
.score-ring svg { transform: rotate(-90deg); }
.score-ring .ring-value {
  position: absolute; font-family: 'Space Grotesk', sans-serif;
  font-weight: 700; text-align: center; line-height: 1;
}

/* ── PROGRESS BAR ── */
.progress-bar {
  height: 6px; background: rgba(255,255,255,0.08); border-radius: 99px; overflow: hidden;
}
.progress-fill {
  height: 100%; border-radius: 99px;
  background: var(--gradient-1); transition: width 1s cubic-bezier(0.4,0,0.2,1);
}
.progress-fill.green { background: linear-gradient(90deg, #10b981, #059669); }
.progress-fill.blue { background: linear-gradient(90deg, #3b82f6, #6366f1); }
.progress-fill.amber { background: linear-gradient(90deg, #f59e0b, #d97706); }
.progress-fill.red { background: linear(90deg, #ef4444, #dc2626); }

/* ── SECTION HEADER ── */
.section-header { margin-bottom: 40px; }
.section-label {
  font-size: 12px; font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--purple); margin-bottom: 12px; display: flex; align-items: center; gap: 8px;
}
.section-label::before { content:''; width: 24px; height: 2px; background: var(--gradient-1); border-radius: 1px; }
.section-title {
  font-family: 'Space Grotesk', sans-serif;
  font-size: clamp(28px, 4vw, 42px); font-weight: 700;
  line-height: 1.15; color: var(--text-primary);
}
.section-title span { background: var(--gradient-1); -webkit-background-clip: text; -webkit-text-fill-color: transparent; }
.section-subtitle { margin-top: 14px; color: var(--text-secondary); font-size: 16px; max-width: 600px; }

/* ── PAGE LAYOUT ── */
.page-wrapper { padding-top: 64px; min-height: 100vh; }
.container { max-width: 1280px; margin: 0 auto; padding: 0 24px; }
.page-content { padding: 48px 0; }

/* ── GRID ── */
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 24px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
@media (max-width: 1024px) { .grid-4 { grid-template-columns: repeat(2,1fr); } .grid-3 { grid-template-columns: repeat(2,1fr); } }
@media (max-width: 640px) { .grid-2,.grid-3,.grid-4 { grid-template-columns: 1fr; } }

/* ── STAT CARD ── */
.stat-card { padding: 28px; }
.stat-card .stat-label { font-size: 12px; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.08em; margin-bottom: 12px; }
.stat-card .stat-value { font-family: 'Space Grotesk', sans-serif; font-size: 36px; font-weight: 700; }
.stat-card .stat-change { font-size: 13px; color: var(--text-secondary); margin-top: 6px; }
.stat-card .stat-icon {
  width: 44px; height: 44px; border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 16px; font-size: 20px;
}

/* ── TABLE ── */
.data-table { width: 100%; border-collapse: collapse; }
.data-table th {
  padding: 14px 16px; text-align: left; font-size: 11px;
  font-weight: 600; text-transform: uppercase; letter-spacing: 0.08em;
  color: var(--text-muted); border-bottom: 1px solid var(--border);
}
.data-table td {
  padding: 16px; font-size: 14px; border-bottom: 1px solid rgba(255,255,255,0.04);
  transition: var(--transition);
}
.data-table tr:hover td { background: var(--bg-card-hover); }
.data-table tr:last-child td { border-bottom: none; }

/* ── CHIP ── */
.chip {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 4px 10px; background: rgba(255,255,255,0.06);
  border: 1px solid var(--border); border-radius: 6px;
  font-size: 12px; color: var(--text-secondary); margin: 3px;
  transition: var(--transition);
}
.chip:hover { border-color: var(--purple); color: var(--purple); background: rgba(139,92,246,0.1); }

/* ── FILTER BAR ── */
.filter-bar {
  display: flex; align-items: flex-start; gap: 12px; flex-wrap: wrap;
  padding: 16px 20px; margin-bottom: 24px;
  position: relative; z-index: 50; overflow: visible;
}
.filter-select {
  background-color: #141824; border: 1px solid rgba(109,93,246,0.35); border-radius: 10px;
  color: #FFFFFF; font-size: 13px; padding: 8px 14px;
  cursor: pointer; outline: none; transition: var(--transition);
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='%23B8C0D4' viewBox='0 0 20 20'%3E%3Cpath d='M5 7l5 5 5-5'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 10px center; background-size: 16px;
  padding-right: 32px;
}
.filter-select:focus { border-color: #6D5DF6; box-shadow: 0 0 0 3px rgba(109,93,246,0.15); }
.filter-select option { background: #141824; color: #FFFFFF; }
.filter-select option:hover { background: #24293b; color: #FFFFFF; }
.filter-select option:checked { background: #6D5DF6; color: #FFFFFF; }
.filter-select.is-native-hidden {
  position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none;
  border: 0; margin: 0; padding: 0; clip: rect(0 0 0 0); clip-path: inset(50%);
}
.custom-filter-dropdown {
  position: relative; min-width: 162px; z-index: 60;
}
.custom-filter-dropdown.is-open { z-index: 1400; }
.custom-filter-button {
  width: 100%; min-height: 38px;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  background: #141824; border: 1px solid rgba(109,93,246,0.35); border-radius: 10px;
  color: #FFFFFF; font-size: 13px; font-weight: 500;
  padding: 8px 36px 8px 14px; cursor: pointer; outline: none;
  position: relative; white-space: nowrap;
  transition: background 150ms ease, border-color 150ms ease, box-shadow 150ms ease;
}
.custom-filter-button::after {
  content: ''; position: absolute; right: 13px; top: 50%;
  width: 8px; height: 8px; border-right: 2px solid #B8C0D4; border-bottom: 2px solid #B8C0D4;
  transform: translateY(-65%) rotate(45deg); transition: transform 150ms ease, border-color 150ms ease;
}
.custom-filter-dropdown.is-open .custom-filter-button,
.custom-filter-button:focus {
  background: #141824; border-color: #6D5DF6;
  box-shadow: 0 0 0 3px rgba(109,93,246,0.16);
}
.custom-filter-dropdown.is-open .custom-filter-button::after {
  border-color: #FFFFFF; transform: translateY(-35%) rotate(225deg);
}
.custom-filter-label {
  overflow: hidden; text-overflow: ellipsis; color: #FFFFFF;
}
.custom-filter-menu {
  position: absolute; top: calc(100% + 8px); left: 0;
  min-width: 100%; width: max-content; max-width: min(320px, calc(100vw - 48px));
  max-height: 260px; overflow: auto; padding: 6px;
  background: #141824; border: 1px solid rgba(109,93,246,0.35); border-radius: 12px;
  box-shadow: 0 18px 44px rgba(0,0,0,0.42), 0 0 28px rgba(109,93,246,0.16);
  opacity: 0; visibility: hidden; pointer-events: none;
  transform: translateY(-6px) scale(0.98);
  transform-origin: top left;
  transition: opacity 150ms ease, transform 150ms ease, visibility 150ms ease;
  z-index: 1400;
  scrollbar-color: #6D5DF6 #141824; scrollbar-width: thin;
}
.custom-filter-dropdown.is-open .custom-filter-menu {
  opacity: 1; visibility: visible; pointer-events: auto;
  transform: translateY(0) scale(1);
}
.custom-filter-option {
  width: 100%; display: flex; align-items: center; justify-content: flex-start;
  background: transparent; border: 0; border-radius: 10px;
  color: #B8C0D4; cursor: pointer; font-size: 13px; font-weight: 500;
  padding: 9px 11px; text-align: left; white-space: nowrap;
  transition: background 150ms ease, color 150ms ease, box-shadow 150ms ease;
}
.custom-filter-option:hover,
.custom-filter-option:focus {
  background: #24293b; color: #FFFFFF; outline: none;
}
.custom-filter-option.is-selected {
  background: #6D5DF6; color: #FFFFFF;
  box-shadow: inset 3px 0 0 rgba(255,255,255,0.45);
}
.custom-filter-option.is-selected:hover,
.custom-filter-option.is-selected:focus {
  background: #6D5DF6; color: #FFFFFF;
}
.custom-filter-menu::-webkit-scrollbar { width: 8px; }
.custom-filter-menu::-webkit-scrollbar-track { background: #141824; border-radius: 10px; }
.custom-filter-menu::-webkit-scrollbar-thumb { background: #6D5DF6; border-radius: 10px; border: 2px solid #141824; }
.custom-filter-menu::-webkit-scrollbar-thumb:hover { background: #8a7cff; }

.search-input {
  background: var(--bg-card); border: 1px solid var(--border); border-radius: 8px;
  color: var(--text-primary); font-size: 13px; padding: 8px 16px 8px 40px;
  outline: none; transition: var(--transition); flex: 1; min-width: 200px;
}
.search-input:focus { border-color: var(--purple); box-shadow: 0 0 0 3px rgba(139,92,246,0.15); }
.search-wrap { position: relative; }
.search-wrap .search-icon { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--text-muted); }

/* ── TOGGLE ── */
.toggle { display: flex; background: rgba(255,255,255,0.05); border-radius: 8px; padding: 3px; }
.toggle-btn {
  padding: 6px 14px; border-radius: 6px; border: none; background: transparent;
  color: var(--text-secondary); font-size: 13px; cursor: pointer; transition: var(--transition);
}
.toggle-btn.active { background: var(--purple); color: #fff; }

/* ── ANIMATIONS ── */
@keyframes float { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-12px); } }
@keyframes pulse-glow { 0%,100% { box-shadow: 0 0 20px rgba(139,92,246,0.3); } 50% { box-shadow: 0 0 50px rgba(139,92,246,0.6); } }
@keyframes slide-up { from { opacity:0; transform: translateY(30px); } to { opacity:1; transform: translateY(0); } }
@keyframes fade-in { from { opacity:0; } to { opacity:1; } }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes shimmer { 0% { background-position: -200% 0; } 100% { background-position: 200% 0; } }
@keyframes network-pulse { 0%,100% { opacity:0.3; } 50% { opacity:1; } }

.animate-float { animation: float 6s ease-in-out infinite; }
.animate-slide-up { animation: slide-up 0.6s ease both; }
.animate-fade-in { animation: fade-in 0.5s ease both; }
.animate-pulse-glow { animation: pulse-glow 3s ease-in-out infinite; }

/* stagger delays */
.delay-1 { animation-delay: 0.1s; }
.delay-2 { animation-delay: 0.2s; }
.delay-3 { animation-delay: 0.3s; }
.delay-4 { animation-delay: 0.4s; }
.delay-5 { animation-delay: 0.5s; }

/* ── CANVAS BG ── */
#bgCanvas { position: fixed; inset: 0; z-index: 0; pointer-events: none; opacity: 0.4; }
.page-overlay { position: relative; z-index: 1; }

/* ── MODAL / TOOLTIP ── */
.tooltip {
  position: absolute; background: rgba(15,20,40,0.95); border: 1px solid var(--border);
  border-radius: 8px; padding: 8px 12px; font-size: 12px; color: var(--text-secondary);
  white-space: nowrap; pointer-events: none; z-index: 100;
  backdrop-filter: blur(12px);
}

/* ── RADAR CHART WRAPPER ── */
.chart-wrapper { position: relative; width: 100%; }

/* ── HIDDEN GEM BADGE ── */
.gem-badge {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 5px 12px; border-radius: 99px;
  background: linear-gradient(135deg, rgba(245,158,11,0.2), rgba(251,191,36,0.1));
  border: 1px solid rgba(245,158,11,0.4);
  color: #fbbf24; font-size: 12px; font-weight: 600;
  text-transform: uppercase; letter-spacing: 0.06em;
  animation: pulse-glow 3s ease-in-out infinite;
}

/* ── SCORE LABEL ── */
.score-label { font-size: 11px; color: var(--text-muted); text-align: center; margin-top: 4px; }

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

/* ── LOADING SKELETON ── */
.skeleton {
  background: linear-gradient(90deg, rgba(255,255,255,0.04) 25%, rgba(255,255,255,0.08) 50%, rgba(255,255,255,0.04) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
  border-radius: 8px;
}

/* ── AVATAR ── */
.avatar {
  border-radius: 50%; overflow: hidden; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  font-family: 'Space Grotesk', sans-serif; font-weight: 700;
  background: var(--gradient-1); color: #fff;
}
.avatar-sm { width: 36px; height: 36px; font-size: 14px; }
.avatar-md { width: 48px; height: 48px; font-size: 18px; }
.avatar-lg { width: 72px; height: 72px; font-size: 26px; }
.avatar-xl { width: 96px; height: 96px; font-size: 34px; }

/* ── TAG ── */
.tag {
  display: inline-flex; align-items: center;
  padding: 3px 9px; border-radius: 6px;
  font-size: 11px; font-weight: 500; margin: 2px;
}
.tag-skill { background: rgba(99,102,241,0.15); color: #a5b4fc; border: 1px solid rgba(99,102,241,0.25); }
.tag-exp { background: rgba(6,182,212,0.12); color: #67e8f9; border: 1px solid rgba(6,182,212,0.25); }

/* ── GLOW LINE ── */
.glow-line {
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--purple), var(--indigo), transparent);
  margin: 0;
}

/* ── FOOTER ── */
.footer {
  border-top: 1px solid var(--border);
  padding: 32px 0; text-align: center;
  color: var(--text-muted); font-size: 13px;
}
.footer a { color: var(--purple); text-decoration: none; }

.ranking-export-actions {
  display: flex; justify-content: flex-end; align-items: center; gap: 12px;
  padding: 18px 20px 20px; border-top: 1px solid rgba(255,255,255,0.06);
}
.export-ranked-btn {
  position: relative; overflow: hidden; min-height: 42px;
  background: linear-gradient(#0b1020, #0b1020) padding-box, var(--gradient-1) border-box;
  border: 1px solid transparent; color: #FFFFFF;
  box-shadow: 0 14px 32px rgba(0,0,0,0.28), 0 0 26px rgba(109,93,246,0.18);
}
.export-ranked-btn::before {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(135deg, rgba(109,93,246,0.16), rgba(6,182,212,0.08));
  opacity: 0; transition: opacity 180ms ease;
}
.export-ranked-btn:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 16px 38px rgba(0,0,0,0.34), 0 0 34px rgba(109,93,246,0.3);
}
.export-ranked-btn:hover:not(:disabled)::before { opacity: 1; }
.export-ranked-btn:disabled { opacity: 0.72; cursor: wait; transform: none; }
.export-download-icon,
.export-button-label,
.export-spinner {
  position: relative; z-index: 1;
}
.export-download-icon {
  display: inline-flex; align-items: center; justify-content: center;
  color: #B8C0D4;
}
.export-spinner {
  display: none; width: 16px; height: 16px; border-radius: 50%;
  border: 2px solid rgba(255,255,255,0.24); border-top-color: #FFFFFF;
  animation: spin 0.8s linear infinite;
}
.export-ranked-btn.is-loading .export-download-icon { display: none; }
.export-ranked-btn.is-loading .export-spinner { display: inline-flex; }
.talent-toast-region {
  position: fixed; right: 24px; bottom: 24px; z-index: 2200;
  display: flex; flex-direction: column; gap: 10px; pointer-events: none;
}
.talent-toast {
  min-width: min(360px, calc(100vw - 48px));
  display: block; white-space: pre-line;
  padding: 13px 15px; border-radius: 12px;
  background: #141824; color: #FFFFFF;
  border: 1px solid rgba(109,93,246,0.35);
  box-shadow: 0 18px 44px rgba(0,0,0,0.44), 0 0 28px rgba(109,93,246,0.18);
  opacity: 0; transform: translateY(8px);
  transition: opacity 180ms ease, transform 180ms ease;
  font-size: 13px; font-weight: 600; line-height: 1.45;
}
.talent-toast.is-visible { opacity: 1; transform: translateY(0); }
.talent-toast-success { border-color: rgba(16,185,129,0.45); }
.talent-toast-warning { border-color: rgba(245,158,11,0.45); }
.talent-toast-error { border-color: rgba(239,68,68,0.45); }

/* ── SHARED TL CUSTOM DROPDOWN (tl-custom-dropdown) ────────────────────────
   Used on Analyze Role, Rankings, and any page that calls initCustomDropdowns().
   Identical visual spec to custom-filter-dropdown but self-contained.          */

.tl-custom-dropdown {
  position: relative;
  display: inline-block;
  z-index: 60;
}
.tl-custom-dropdown.is-open { z-index: 1400; }

.tl-dropdown-button {
  width: 100%;
  min-height: 42px;
  display: flex;
  align-items: center;
  gap: 10px;
  background: #141824;
  border: 1px solid #2E344A;
  border-radius: 10px;
  color: #FFFFFF;
  font-size: 14px;
  font-weight: 500;
  font-family: inherit;
  padding: 10px 38px 10px 14px;
  cursor: pointer;
  outline: none;
  position: relative;
  white-space: nowrap;
  text-align: left;
  transition: background 150ms ease, border-color 150ms ease, box-shadow 150ms ease;
}

/* caret arrow */
.tl-dropdown-button::after {
  content: '';
  position: absolute;
  right: 14px;
  top: 50%;
  width: 8px;
  height: 8px;
  border-right: 2px solid #A9B1C7;
  border-bottom: 2px solid #A9B1C7;
  transform: translateY(-65%) rotate(45deg);
  transition: transform 150ms ease, border-color 150ms ease;
  pointer-events: none;
}

.tl-custom-dropdown.is-open .tl-dropdown-button,
.tl-dropdown-button:focus {
  background: #141824;
  border-color: #6D5DF6;
  box-shadow: 0 0 0 3px rgba(109, 93, 246, 0.16);
}

.tl-custom-dropdown.is-open .tl-dropdown-button::after {
  border-color: #FFFFFF;
  transform: translateY(-35%) rotate(225deg);
}

.tl-dropdown-label {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: #FFFFFF;
  flex: 1;
}

/* menu panel */
.tl-dropdown-menu {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  min-width: 100%;
  width: max-content;
  max-width: min(340px, calc(100vw - 48px));
  max-height: 280px;
  overflow-y: auto;
  padding: 6px;
  background: #141824;
  border: 1px solid #2E344A;
  border-radius: 12px;
  box-shadow: 0 20px 48px rgba(0,0,0,0.5), 0 0 32px rgba(109,93,246,0.14);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateY(-6px) scale(0.98);
  transform-origin: top left;
  transition: opacity 150ms ease, transform 150ms ease, visibility 150ms ease;
  z-index: 1400;
  /* Firefox scrollbar */
  scrollbar-color: #6D5DF6 #141824;
  scrollbar-width: thin;
}

.tl-custom-dropdown.is-open .tl-dropdown-menu {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateY(0) scale(1);
}

/* Webkit scrollbar for Chrome / Edge / Safari */
.tl-dropdown-menu::-webkit-scrollbar { width: 6px; }
.tl-dropdown-menu::-webkit-scrollbar-track { background: #141824; border-radius: 10px; }
.tl-dropdown-menu::-webkit-scrollbar-thumb { background: #6D5DF6; border-radius: 10px; border: 1px solid #141824; }
.tl-dropdown-menu::-webkit-scrollbar-thumb:hover { background: #8a7cff; }

/* option buttons */
.tl-dropdown-option {
  width: 100%;
  display: flex;
  align-items: center;
  background: transparent;
  border: 0;
  border-radius: 8px;
  color: #A9B1C7;
  cursor: pointer;
  font-size: 14px;
  font-family: inherit;
  font-weight: 400;
  padding: 9px 12px;
  text-align: left;
  white-space: nowrap;
  transition: background 120ms ease, color 120ms ease;
}

.tl-dropdown-option:hover,
.tl-dropdown-option:focus {
  background: #24293B;
  color: #FFFFFF;
  outline: none;
}

.tl-dropdown-option.is-selected {
  background: #6D5DF6;
  color: #FFFFFF;
  font-weight: 500;
  box-shadow: inset 3px 0 0 rgba(255,255,255,0.4);
}

.tl-dropdown-option.is-selected:hover,
.tl-dropdown-option.is-selected:focus {
  background: #7c6ef5;
  color: #FFFFFF;
}
