/* PWI v585 Character Simulator - Professional Dark Metallic & Gold Theme */

:root {
  --bg-primary: #0a0d13;
  --bg-secondary: #121721;
  --bg-card: #18202e;
  --bg-input: #0e131c;
  --border-gold: #c5a059;
  --border-gold-dim: #5c4a28;
  --border-card: #222c3d;
  --text-main: #e2e8f0;
  --text-muted: #94a3b8;
  --text-gold: #e6ca65;
  --gold-glow: rgba(212, 175, 55, 0.25);
  --accent-green: #22c55e;
  --accent-red: #ef4444;
  --accent-blue: #38bdf8;
  --font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
}

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

body {
  background-color: var(--bg-primary);
  color: var(--text-main);
  font-family: var(--font-family);
  font-size: 13px;
  line-height: 1.4;
  overflow-x: hidden;
}

/* Header */
.app-header {
  background: linear-gradient(180deg, #161c28 0%, #0d121a 100%);
  border-bottom: 2px solid var(--border-gold-dim);
  padding: 10px 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand h1 {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text-gold);
  letter-spacing: 0.5px;
  text-shadow: 0 0 10px var(--gold-glow);
}

.brand .tag {
  background: #1e293b;
  color: var(--accent-blue);
  border: 1px solid #334155;
  font-size: 0.75rem;
  padding: 2px 8px;
  border-radius: 4px;
  font-weight: 600;
}

.header-actions {
  display: flex;
  gap: 10px;
}

/* Buttons */
.btn {
  background: var(--bg-card);
  color: var(--text-main);
  border: 1px solid var(--border-card);
  padding: 6px 14px;
  border-radius: 4px;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.btn:hover {
  background: #202b3d;
  border-color: var(--border-gold-dim);
  color: #fff;
}

.btn-gold {
  background: linear-gradient(180deg, #b8860b 0%, #8b6508 100%);
  border: 1px solid var(--border-gold);
  color: #fff;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.6);
}

.btn-gold:hover {
  background: linear-gradient(180deg, #d4af37 0%, #9e7810 100%);
  box-shadow: 0 0 8px var(--gold-glow);
}

.btn-danger {
  background: #451a1a;
  border-color: #7f1d1d;
  color: #fca5a5;
}

.btn-danger:hover {
  background: #5c2222;
  border-color: #991b1b;
}

/* Main Layout Grid */
.main-container {
  display: grid;
  grid-template-columns: 360px 1fr 340px;
  gap: 14px;
  padding: 14px 20px;
  height: calc(100vh - 60px);
  max-width: 1920px;
  margin: 0 auto;
}

/* Scrollable Panels */
.panel {
  background: var(--bg-secondary);
  border: 1px solid var(--border-card);
  border-radius: 6px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
}

.panel-header {
  background: #141b26;
  border-bottom: 1px solid var(--border-card);
  padding: 8px 14px;
  font-weight: 700;
  font-size: 0.85rem;
  color: var(--text-gold);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.panel-body {
  padding: 12px;
  overflow-y: auto;
  flex: 1;
}

/* Stats Comparison Table (Left Panel) */
.power-banner {
  background: linear-gradient(180deg, #1b2333 0%, #111722 100%);
  border: 1px solid var(--border-gold-dim);
  border-radius: 6px;
  padding: 10px;
  margin-bottom: 12px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  text-align: center;
}

.power-box .label {
  font-size: 0.7rem;
  color: var(--text-muted);
  text-transform: uppercase;
  margin-bottom: 2px;
}

.power-box .score {
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--text-gold);
  font-family: monospace;
}

.power-box .delta {
  font-size: 0.75rem;
  font-weight: 700;
  margin-top: 1px;
}

.stats-table-wrapper {
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: 4px;
  overflow: hidden;
}

.stats-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.78rem;
}

.stats-table th {
  background: #121721;
  color: var(--text-muted);
  padding: 6px 8px;
  text-align: left;
  font-weight: 600;
  border-bottom: 1px solid var(--border-card);
}

.stats-table td {
  padding: 4px 8px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

.stats-table tr:hover {
  background: rgba(255, 255, 255, 0.02);
}

.stats-table td.stat-name {
  color: #cbd5e1;
  font-weight: 500;
}

.stats-table td.val {
  font-family: monospace;
  font-size: 0.8rem;
  text-align: right;
  color: #e2e8f0;
}

.delta-pos {
  color: var(--accent-green);
  font-weight: 700;
}

.delta-neg {
  color: var(--accent-red);
  font-weight: 700;
}

.delta-zero {
  color: #64748b;
}

/* Equipment Grid (Center Panel) */
.equip-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  margin-bottom: 14px;
}

.equip-slot {
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: 6px;
  padding: 8px 10px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  transition: border-color 0.2s ease;
}

.equip-slot:hover {
  border-color: var(--border-gold-dim);
}

.equip-slot-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.slot-tag {
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--text-gold);
  text-transform: uppercase;
}

.refine-badge {
  background: #0284c7;
  color: #fff;
  font-size: 0.7rem;
  font-weight: 800;
  padding: 1px 6px;
  border-radius: 3px;
  font-family: monospace;
}

/* Icon Containers & Badges */
.equip-item-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.item-icon-box {
  width: 34px;
  height: 34px;
  min-width: 34px;
  border-radius: 4px;
  border: 1px solid var(--border-card);
  background: #0b0f17;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  box-shadow: inset 0 0 4px rgba(0,0,0,0.6);
}

.item-icon-box img {
  width: 32px;
  height: 32px;
  object-fit: contain;
  image-rendering: -webkit-optimize-contrast;
  image-rendering: crisp-edges;
}

.gem-icon-box {
  width: 20px;
  height: 20px;
  min-width: 20px;
  border-radius: 3px;
  border: 1px solid #1e293b;
  background: #090d14;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.gem-icon-box img {
  width: 18px;
  height: 18px;
  object-fit: contain;
}

/* Search inputs for dropdowns */
.equip-search-row {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-bottom: 2px;
}

.equip-search-input {
  flex: 1;
  background: #0d131d;
  border: 1px solid var(--border-card);
  border-radius: 4px;
  color: #f1f5f9;
  font-size: 0.7rem;
  padding: 3px 6px;
  transition: border-color 0.15s ease;
}

.equip-search-input:focus {
  outline: none;
  border-color: var(--border-gold);
  background: #141c2b;
}

.btn-clear-search {
  background: #1e293b;
  border: 1px solid var(--border-card);
  color: var(--text-muted);
  border-radius: 3px;
  padding: 2px 6px;
  font-size: 0.65rem;
  cursor: pointer;
  transition: all 0.15s ease;
}

.btn-clear-search:hover {
  background: #334155;
  color: #fff;
  border-color: var(--border-gold);
}

.gem-search-row {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-top: 4px;
}

.gem-search-input {
  flex: 1;
  background: #090d14;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 3px;
  color: #cbd5e1;
  font-size: 0.65rem;
  padding: 2px 5px;
}

.gem-search-input:focus {
  outline: none;
  border-color: var(--border-gold-dim);
}

.class-icon-badge {
  width: 28px;
  height: 28px;
  border-radius: 4px;
  border: 1px solid var(--border-gold-dim);
  background: #090d14;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  vertical-align: middle;
  overflow: hidden;
}

.class-icon-badge img {
  width: 26px;
  height: 26px;
  object-fit: contain;
}

.wa-card-box {
  display: flex;
  align-items: center;
  gap: 6px;
}

.rune-card-box {
  display: flex;
  align-items: center;
  gap: 6px;
}

.equip-select {
  width: 100%;
  background: var(--bg-input);
  color: #f1f5f9;
  border: 1px solid var(--border-card);
  padding: 4px 6px;
  border-radius: 4px;
  font-size: 0.78rem;
}

.equip-select:focus {
  border-color: var(--border-gold);
  outline: none;
}

.equip-controls {
  display: flex;
  gap: 6px;
  align-items: center;
}

.equip-controls label {
  font-size: 0.7rem;
  color: var(--text-muted);
}

.equip-controls input[type="range"] {
  flex: 1;
  accent-color: var(--border-gold);
}

.gem-selector-row {
  display: flex;
  gap: 4px;
  margin-top: 2px;
}

.gem-item-col {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.gem-select {
  width: 100%;
  background: var(--bg-input);
  color: var(--text-muted);
  border: 1px solid #1e293b;
  font-size: 0.7rem;
  padding: 2px 4px;
  border-radius: 3px;
}

/* Tabs System (Center Lower Panel) */
.tabs-header {
  display: flex;
  background: #111722;
  border-bottom: 1px solid var(--border-card);
  overflow-x: auto;
}

.tab-btn {
  background: none;
  border: none;
  color: var(--text-muted);
  padding: 8px 14px;
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  border-bottom: 2px solid transparent;
  white-space: nowrap;
}

.tab-btn.active {
  color: var(--text-gold);
  border-bottom-color: var(--border-gold);
  background: rgba(212, 175, 55, 0.05);
}

.tab-content {
  display: none;
  padding: 10px 0;
}

.tab-content.active {
  display: block;
}

/* Character Profile Form (Right Panel) */
.form-group {
  margin-bottom: 10px;
}

.form-group label {
  display: block;
  font-size: 0.75rem;
  color: var(--text-muted);
  font-weight: 600;
  margin-bottom: 4px;
}

.form-row {
  display: flex;
  gap: 8px;
}

.form-input {
  width: 100%;
  background: var(--bg-input);
  color: #fff;
  border: 1px solid var(--border-card);
  padding: 5px 8px;
  border-radius: 4px;
  font-size: 0.8rem;
}

.form-input:focus {
  border-color: var(--border-gold);
  outline: none;
}

.points-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
  margin-top: 6px;
}

.point-item {
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  padding: 6px 8px;
  border-radius: 4px;
}

.point-item .header {
  display: flex;
  justify-content: space-between;
  font-size: 0.72rem;
  color: var(--text-muted);
  margin-bottom: 4px;
}

.point-item input {
  width: 100%;
  background: var(--bg-input);
  border: 1px solid #1e293b;
  color: var(--text-gold);
  font-weight: 700;
  padding: 3px 6px;
  font-size: 0.85rem;
  text-align: right;
  font-family: monospace;
}

/* Modals & Popups */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.75);
  display: none;
  justify-content: center;
  align-items: center;
  z-index: 1000;
}

.modal-box {
  background: var(--bg-secondary);
  border: 1px solid var(--border-gold);
  border-radius: 8px;
  width: 500px;
  max-width: 90vw;
  padding: 18px;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.8);
}

.modal-title {
  color: var(--text-gold);
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 12px;
}

.modal-textarea {
  width: 100%;
  height: 200px;
  background: var(--bg-input);
  border: 1px solid var(--border-card);
  color: #fff;
  font-family: monospace;
  font-size: 0.75rem;
  padding: 8px;
  border-radius: 4px;
  resize: vertical;
}

.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 12px;
}

/* Class Selection Grid */
.class-buttons-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(46px, 1fr));
  gap: 4px;
  margin-bottom: 10px;
  background: var(--bg-input);
  padding: 6px;
  border-radius: 6px;
  border: 1px solid var(--border-card);
}

.class-btn {
  background: #151c27;
  border: 1px solid var(--border-card);
  border-radius: 4px;
  padding: 3px 2px;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  transition: all 0.15s ease;
  position: relative;
}

.class-btn:hover {
  border-color: var(--border-gold);
  background: #1c2636;
  transform: translateY(-1px);
}

.class-btn.active {
  border-color: var(--border-gold);
  box-shadow: 0 0 8px var(--gold-glow);
  background: linear-gradient(180deg, #2a374d 0%, #172131 100%);
}

.class-btn img {
  width: 28px;
  height: 28px;
  object-fit: contain;
  border-radius: 2px;
}

.class-btn .class-btn-name {
  font-size: 0.58rem;
  color: var(--text-muted);
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  width: 100%;
  margin-top: 2px;
}

.class-btn.active .class-btn-name {
  color: var(--text-gold);
  font-weight: 700;
}

/* Equip Quick Buttons */
.refine-btn-group {
  display: inline-flex;
  align-items: center;
  gap: 2px;
}

.btn-step {
  background: #1e293b;
  border: 1px solid var(--border-card);
  color: var(--text-gold);
  width: 19px;
  height: 19px;
  border-radius: 3px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.72rem;
  font-weight: 700;
  cursor: pointer;
  user-select: none;
}

.btn-step:hover {
  background: #334155;
  border-color: var(--border-gold);
}

.btn-clear-slot {
  background: rgba(239, 68, 68, 0.15);
  border: 1px solid rgba(239, 68, 68, 0.4);
  color: #f87171;
  width: 18px;
  height: 18px;
  border-radius: 3px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.7rem;
  cursor: pointer;
  margin-left: auto;
}

.btn-clear-slot:hover {
  background: rgba(239, 68, 68, 0.35);
  border-color: #ef4444;
}

.item-icon-box {
  cursor: pointer;
  transition: transform 0.1s ease;
}

.item-icon-box:hover {
  transform: scale(1.08);
  box-shadow: 0 0 6px var(--gold-glow);
}

/* Buscadores integrados en dropdowns */
.equip-search-row {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-bottom: 3px;
}

.equip-search-input {
  flex: 1;
  background: #090d16;
  border: 1px solid #1e293b;
  color: #f8fafc;
  font-size: 0.70rem;
  padding: 2px 6px;
  border-radius: 3px;
  outline: none;
  transition: border-color 0.15s ease;
}

.equip-search-input:focus {
  border-color: var(--border-gold);
  background: #0f172a;
}

.equip-search-input::placeholder {
  color: #64748b;
  font-size: 0.68rem;
}

.btn-clear-search {
  background: #1e293b;
  border: 1px solid #334155;
  color: #94a3b8;
  font-size: 0.65rem;
  width: 17px;
  height: 17px;
  border-radius: 3px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  padding: 0;
  line-height: 1;
}

.btn-clear-search:hover {
  background: #334155;
  color: #f1f5f9;
  border-color: var(--border-gold);
}

.gem-search-row {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-top: 4px;
  margin-bottom: 2px;
}

.gem-search-input {
  flex: 1;
  background: #090d16;
  border: 1px solid #1e293b;
  color: #cbd5e1;
  font-size: 0.68rem;
  padding: 2px 5px;
  border-radius: 3px;
  outline: none;
}

.gem-search-input:focus {
  border-color: var(--accent-blue);
  background: #0f172a;
}

.gem-search-input::placeholder {
  color: #475569;
  font-size: 0.65rem;
}

/* Skills (Módulo 7) & Buffs Styling */
.skill-card {
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: 6px;
  padding: 8px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  transition: all 0.2s ease;
  position: relative;
}

.skill-card.active {
  border-color: var(--border-gold);
  box-shadow: 0 0 8px rgba(197, 160, 89, 0.15);
}

.skill-card.inactive {
  opacity: 0.65;
  filter: grayscale(0.4);
}

.skill-header-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.skill-icon-container {
  width: 32px;
  height: 32px;
  min-width: 32px;
  border-radius: 4px;
  overflow: hidden;
  background: #000;
  border: 1px solid var(--border-gold-dim);
  display: flex;
  align-items: center;
  justify-content: center;
}

.skill-icon-container img {
  width: 32px;
  height: 32px;
  display: block;
}

.skill-meta {
  flex: 1;
  min-width: 0;
}

.skill-title {
  font-size: 0.76rem;
  font-weight: 700;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.skill-badge {
  display: inline-block;
  font-size: 0.65rem;
  padding: 1px 5px;
  border-radius: 3px;
  font-weight: 600;
}

.skill-badge-effect {
  background: rgba(56, 189, 248, 0.15);
  color: var(--accent-blue);
  border: 1px solid rgba(56, 189, 248, 0.3);
}

.skill-badge-weapon-ok {
  background: rgba(34, 197, 94, 0.15);
  color: var(--accent-green);
  border: 1px solid rgba(34, 197, 94, 0.3);
}

.skill-badge-weapon-warn {
  background: rgba(234, 179, 8, 0.15);
  color: #fbbf24;
  border: 1px solid rgba(234, 179, 8, 0.3);
}

.skill-controls-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  background: var(--bg-input);
  padding: 4px 6px;
  border-radius: 4px;
}

/* Custom Toggle Switch */
.toggle-switch {
  position: relative;
  display: inline-block;
  width: 36px;
  height: 18px;
}

.toggle-switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.toggle-slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: #334155;
  transition: .2s;
  border-radius: 18px;
}

.toggle-slider:before {
  position: absolute;
  content: "";
  height: 12px;
  width: 12px;
  left: 3px;
  bottom: 3px;
  background-color: white;
  transition: .2s;
  border-radius: 50%;
}

.toggle-switch input:checked + .toggle-slider {
  background-color: var(--accent-green);
}

.toggle-switch input:checked + .toggle-slider:before {
  transform: translateX(18px);
}

/* Level +/- step buttons */
.step-btn {
  background: #1e293b;
  border: 1px solid #334155;
  color: var(--text-main);
  width: 20px;
  height: 20px;
  border-radius: 3px;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  line-height: 1;
}

.step-btn:hover {
  background: #334155;
  border-color: var(--border-gold);
}

.step-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

/* Buffs & Implicit Stats Card */
.buff-summary-banner {
  background: linear-gradient(90deg, rgba(197, 160, 89, 0.15) 0%, rgba(30, 41, 59, 0.5) 100%);
  border: 1px solid var(--border-gold-dim);
  border-radius: 6px;
  padding: 8px 12px;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
}

.implicit-stats-card {
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-left: 3px solid var(--border-gold);
  border-radius: 6px;
  padding: 10px 14px;
  margin-bottom: 14px;
}

.buff-card {
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: 6px;
  padding: 8px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  transition: all 0.2s ease;
}

.buff-card.active {
  border-color: #38bdf8;
  box-shadow: 0 0 8px rgba(56, 189, 248, 0.2);
}

.buff-card.inactive {
  opacity: 0.7;
}

/* ==========================================================================
   INTEGRATED SEARCHABLE DROPDOWN COMPONENT (§34.215)
   Combobox reactivo con buscador integrado en la cabecera del panel flotante
   ========================================================================== */

.searchable-dropdown {
  position: relative;
  width: 100%;
}

.dropdown-trigger {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--bg-input);
  border: 1px solid var(--border-card);
  border-radius: 4px;
  padding: 3px 6px;
  cursor: pointer;
  color: #f1f5f9;
  min-height: 34px;
  text-align: left;
  transition: all 0.15s ease;
  user-select: none;
}

.dropdown-trigger:hover {
  background: #141c2b;
  border-color: var(--border-gold-dim);
}

.dropdown-trigger.active {
  border-color: var(--border-gold);
  background: #151e2e;
  box-shadow: 0 0 6px var(--gold-glow);
}

.dropdown-selected-content {
  display: flex;
  align-items: center;
  gap: 6px;
  overflow: hidden;
  white-space: nowrap;
  flex: 1;
  min-width: 0;
}

.dropdown-selected-icon-box {
  width: 26px;
  height: 26px;
  min-width: 26px;
  border-radius: 3px;
  background: #090d14;
  border: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.dropdown-selected-icon-box img {
  width: 24px;
  height: 24px;
  object-fit: contain;
  image-rendering: -webkit-optimize-contrast;
  image-rendering: crisp-edges;
}

.dropdown-selected-label {
  font-size: 0.75rem;
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: #fff;
  flex: 1;
}

.dropdown-arrow {
  font-size: 0.65rem;
  color: var(--text-gold);
  margin-left: 4px;
  transition: transform 0.15s ease;
}

.dropdown-trigger.active .dropdown-arrow {
  transform: rotate(180deg);
}

/* Floating Dropdown Menu Panel */
.dropdown-menu {
  position: absolute;
  top: calc(100% + 3px);
  left: 0;
  width: 100%;
  min-width: 260px;
  max-width: 380px;
  background: #0d131d;
  border: 1px solid var(--border-gold-dim);
  border-radius: 5px;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.85);
  z-index: 1050;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.dropdown-search-wrapper {
  padding: 6px 8px;
  background: #151e2d;
  border-bottom: 1px solid var(--border-card);
  display: flex;
  align-items: center;
  gap: 6px;
}

.dropdown-search-input {
  flex: 1;
  background: #090d14;
  border: 1px solid var(--border-card);
  border-radius: 4px;
  color: #f1f5f9;
  font-size: 0.72rem;
  padding: 4px 8px;
  outline: none;
  transition: border-color 0.15s ease;
}

.dropdown-search-input:focus {
  border-color: var(--border-gold);
  background: #0b0f17;
}

.btn-clear-dropdown-search {
  background: #1e293b;
  border: 1px solid var(--border-card);
  color: var(--text-muted);
  border-radius: 3px;
  cursor: pointer;
  font-size: 0.65rem;
  padding: 2px 5px;
}

.btn-clear-dropdown-search:hover {
  background: #334155;
  color: #fff;
  border-color: var(--border-gold);
}

.dropdown-options-list {
  max-height: 230px;
  overflow-y: auto;
  padding: 3px 0;
}

.dropdown-options-list::-webkit-scrollbar {
  width: 5px;
}

.dropdown-options-list::-webkit-scrollbar-thumb {
  background: #334155;
  border-radius: 3px;
}

.dropdown-options-list::-webkit-scrollbar-thumb:hover {
  background: var(--border-gold-dim);
}

.dropdown-option {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 5px 8px;
  cursor: pointer;
  border-bottom: 1px solid rgba(255, 255, 255, 0.02);
  transition: background 0.1s ease;
  user-select: none;
}

.dropdown-option:hover,
.dropdown-option.focused {
  background: #192333;
}

.dropdown-option.selected {
  background: rgba(197, 160, 89, 0.16);
  border-left: 3px solid var(--border-gold);
}

.dropdown-opt-icon-box {
  width: 24px;
  height: 24px;
  min-width: 24px;
  border-radius: 3px;
  background: #090d14;
  border: 1px solid rgba(255, 255, 255, 0.06);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.dropdown-opt-icon-box img {
  width: 22px;
  height: 22px;
  object-fit: contain;
}

.dropdown-opt-text-col {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.dropdown-opt-name {
  font-size: 0.73rem;
  font-weight: 600;
  color: #f1f5f9;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.dropdown-opt-sub {
  font-size: 0.64rem;
  color: var(--text-muted);
}

.dropdown-badge-rank {
  font-size: 0.65rem;
  font-weight: 800;
  padding: 1px 5px;
  border-radius: 3px;
  font-family: monospace;
}

.dropdown-badge-rank.rank-s {
  background: rgba(234, 179, 8, 0.2);
  color: #fde047;
  border: 1px solid #ca8a04;
}

.dropdown-badge-rank.rank-a {
  background: rgba(168, 85, 247, 0.2);
  color: #d8b4fe;
  border: 1px solid #9333ea;
}

.dropdown-badge-rank.rank-b {
  background: rgba(59, 130, 246, 0.2);
  color: #93c5fd;
  border: 1px solid #2563eb;
}

.dropdown-badge-rank.rank-c {
  background: rgba(100, 116, 139, 0.2);
  color: #cbd5e1;
  border: 1px solid #475569;
}

.dropdown-badge-level {
  font-size: 0.65rem;
  font-weight: 700;
  background: #1e293b;
  color: var(--accent-blue);
  border: 1px solid #334155;
  padding: 1px 4px;
  border-radius: 3px;
}

.dropdown-no-results {
  padding: 14px;
  text-align: center;
  color: var(--text-muted);
  font-size: 0.72rem;
  font-style: italic;
}

/* Compact variant (para gemas / slots reducidos) */
.searchable-dropdown.compact .dropdown-trigger {
  min-height: 24px;
  padding: 2px 4px;
  gap: 3px;
}

.searchable-dropdown.compact .dropdown-selected-icon-box {
  width: 18px;
  height: 18px;
  min-width: 18px;
}

.searchable-dropdown.compact .dropdown-selected-icon-box img {
  width: 16px;
  height: 16px;
}

.searchable-dropdown.compact .dropdown-selected-label {
  font-size: 0.68rem;
}

.searchable-dropdown.compact .dropdown-menu {
  min-width: 220px;
  width: 240px;
}

