/* NPC Manager - Styles */

/* ============================================
   TABS BAR
   ============================================ */
.npc-tabs-bar {
  display: flex;
  gap: 0;
  border-bottom: 2px solid var(--border-color);
  padding: 0 16px;
  background: rgba(20, 12, 7, 0.5);
}

.npc-tab {
  padding: 10px 20px;
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  position: relative;
  transition: color 0.2s;
  display: flex;
  align-items: center;
  gap: 6px;
}

.npc-tab:hover {
  color: var(--text-main);
}

.npc-tab.active {
  color: var(--primary);
}

.npc-tab.active::after {
  content: "";
  position: absolute;
  bottom: -2px;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--primary);
  border-radius: 2px 2px 0 0;
}

/* ============================================
   TAB PANES
   ============================================ */
.npc-tab-pane {
  min-height: 200px;
}

/* ============================================
   DIALOGUE PANEL
   ============================================ */
.npc-dlg-panel {
  background: rgba(38, 26, 18, 0.5);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 16px;
}

/* ============================================
   RESPONSE CARDS (accordéon)
   ============================================ */
.npc-response-card {
  border: 1px solid var(--border-color);
  border-radius: 8px;
  margin-bottom: 10px;
  overflow: hidden;
  background: var(--bg-card, #241710);
}

.npc-response-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 14px;
  cursor: pointer;
  background: rgba(38, 26, 18, 0.8);
  transition: background 0.15s;
}

.npc-response-header:hover {
  background: rgba(200, 119, 67, 0.1);
}

.npc-response-chevron {
  color: var(--text-muted);
  font-size: 0.85rem;
  transition: transform 0.2s;
}

.npc-response-id {
  color: #e0a851;
  font-weight: 700;
  font-size: 0.95rem;
}

.npc-response-body {
  border-top: 1px solid var(--border-color);
  padding: 12px;
  background: rgba(20, 12, 7, 0.3);
}

/* ============================================
   ACTION ROWS (dans les response cards)
   ============================================ */
.npc-action-row {
  background: var(--bg-input);
  border: 1px solid var(--border-color);
  border-radius: 6px;
  padding: 12px;
  margin-bottom: 10px;
}

.npc-action-row:last-child {
  margin-bottom: 0;
}

.npc-action-row .form-label {
  color: var(--text-muted);
  font-size: 0.78rem;
  margin-bottom: 2px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

.npc-action-row .form-control,
.npc-action-row .form-select {
  font-size: 0.85rem;
}

.npc-action-row .action-type-select {
  font-size: 0.82rem;
}

/* ============================================
   SIDEBAR - PANNEAU UNIFIÉ DROIT
   ============================================ */
.npc-sidebar-card {
  border-radius: 10px;
  overflow: hidden;
  position: sticky;
  top: 16px;
}

/* Header NPC */
.npc-sidebar-header {
  padding: 16px;
  background: linear-gradient(135deg, rgba(200, 119, 67, 0.15), rgba(184, 70, 92, 0.1));
  border-bottom: 1px solid var(--border-color);
  min-height: 60px;
  display: flex;
  align-items: center;
}

.npc-sidebar-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 100%;
  gap: 6px;
  color: var(--text-muted);
  font-size: 0.9rem;
}

.npc-sidebar-npc-name {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text-main);
  margin: 0;
}

.npc-sidebar-npc-id {
  font-size: 0.85rem;
  color: #d98b53;
  font-weight: 600;
}

.npc-sidebar-npc-gfx {
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* Sections */
.npc-sidebar-section {
  padding: 12px 16px;
  border-bottom: 1px solid rgba(58, 42, 30, 0.3);
}

.npc-sidebar-section:last-child {
  border-bottom: none;
}

.npc-sidebar-section-title {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-muted);
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 5px;
}

.npc-sidebar-section-title i {
  font-size: 0.8rem;
}

/* Maps section - plus grande */
.npc-sidebar-maps .npc-map-badge {
  font-size: 0.95rem;
  padding: 6px 14px;
  font-weight: 600;
}

.npc-sidebar-maps .npc-map-badge .map-id {
  font-size: 1rem;
  font-weight: 800;
  color: #d98b53;
}

/* Info grid */
.npc-info-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
}

.npc-info-grid .info-cell {
  padding: 5px 0;
  border-bottom: 1px solid rgba(58, 42, 30, 0.25);
  display: flex;
  justify-content: space-between;
  font-size: 0.85rem;
}

.npc-info-grid .info-cell:nth-child(odd) {
  padding-right: 10px;
  border-right: 1px solid rgba(58, 42, 30, 0.25);
}

.npc-info-grid .info-cell:nth-child(even) {
  padding-left: 10px;
}

.npc-info-grid .info-cell .lbl {
  color: var(--text-muted);
  font-weight: 500;
}

.npc-info-grid .info-cell .val {
  color: var(--text-main);
  font-weight: 700;
}

/* Search section */
.npc-sidebar-search .input-group-text {
  font-size: 0.8rem;
}

.npc-sidebar-search .form-control {
  font-size: 0.82rem;
}

.npc-sidebar-search .btn {
  font-size: 0.78rem;
}

/* ============================================
   PREVIEW LANG
   ============================================ */
.npc-lang-preview {
  background-color: #150c06;
  color: #7ee787;
  font-family: 'Consolas', 'Monaco', monospace;
  font-size: 0.85rem;
  white-space: pre-wrap;
  word-break: break-all;
  max-height: 200px;
  overflow-y: auto;
  border-radius: 6px;
}

/* Viewer SWF étendu */
.npc-swf-viewer {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.npc-swf-section-label {
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: #9a8370;
  margin-bottom: 2px;
  font-weight: 600;
}

.npc-swf-section[data-swf-type="npc"] .npc-swf-section-label { color: #d98b53; }
.npc-swf-section[data-swf-type="quests"] .npc-swf-section-label { color: #d2a8ff; }

/* Entrées manquantes dans le viewer SWF */
.npc-swf-missing {
  color: #f0883e;
  font-style: italic;
}

/* ============================================
   LISTE DES ITEMS EN VENTE
   ============================================ */
.npc-sales-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-height: 36px;
}

.npc-sale-item {
  background: var(--bg-input);
  border: 1px solid var(--border-color);
  border-radius: 6px;
  padding: 8px 12px;
}

.npc-sale-item .sale-id {
  color: var(--warning);
  font-weight: 700;
  font-size: 0.9rem;
  margin-right: 6px;
}

.npc-sale-item strong {
  color: var(--text-main);
  font-size: 0.9rem;
}

.npc-sale-item .btn-remove-sale {
  cursor: pointer;
  color: var(--danger);
  font-size: 1.1rem;
  opacity: 0.8;
  transition: opacity 0.15s;
  background: none;
  border: none;
  padding: 0 2px;
  line-height: 1;
}

.npc-sale-item .btn-remove-sale:hover {
  opacity: 1;
}

.npc-sale-item .sale-prices {
  display: flex;
  gap: 16px;
  margin-top: 4px;
  font-size: 0.85rem;
  font-weight: 500;
}

.npc-sale-item .sale-price-sell {
  color: #6bb383;
}

.npc-sale-item .sale-price-buy {
  color: #e0a851;
}

/* ============================================
   EMPLACEMENTS / MAP INFO
   ============================================ */
.npc-map-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(200, 119, 67, 0.15);
  border: 1px solid rgba(200, 119, 67, 0.35);
  border-radius: 6px;
  padding: 5px 12px;
  font-size: 0.9rem;
  color: #e6c0a0;
  font-weight: 500;
  margin: 3px;
}

.npc-map-badge i {
  color: var(--primary);
}

.npc-map-badge .map-id {
  color: #d98b53;
  font-weight: 700;
}

.npc-map-badge .map-cell {
  color: var(--text-muted);
  font-size: 0.82rem;
}

#npcMapsPanel .npc-maps-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

/* ============================================
   BOUSSOLE ISOMÉTRIQUE (orientation NPC)
   ============================================ */
.npc-compass {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  user-select: none;
}

.npc-compass-mid {
  display: flex;
  align-items: center;
  gap: 2px;
}

.npc-compass-dot {
  width: 8px;
  height: 8px;
  background: var(--text-muted);
  border-radius: 50%;
  opacity: 0.4;
}

.npc-compass-btn {
  width: 36px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.65rem;
  font-weight: 800;
  letter-spacing: 0.5px;
  color: var(--text-muted);
  background: var(--bg-input);
  border: 1px solid var(--border-color);
  cursor: pointer;
  transition: all 0.15s;
  /* Forme losange */
  clip-path: polygon(50% 0%, 100% 50%, 50% 100%, 0% 50%);
}

.npc-compass-btn:hover {
  color: var(--text-main);
  background: rgba(200, 119, 67, 0.2);
  border-color: var(--primary);
}

.npc-compass-btn.active {
  color: #fff;
  background: var(--primary);
  border-color: var(--primary);
  box-shadow: 0 0 8px rgba(200, 119, 67, 0.5);
}

/* Ajout placement */
.npc-add-placement {
  margin-top: 10px;
  padding: 10px;
  background: rgba(20, 12, 7, 0.4);
  border: 1px solid var(--border-color);
  border-radius: 6px;
}

.npc-add-placement .form-label {
  font-size: 0.72rem;
  color: var(--text-muted);
  text-transform: uppercase;
  font-weight: 600;
}

/* Orientation badge dans les map badges */
.npc-map-badge .map-orient {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  font-size: 0.65rem;
  font-weight: 800;
  background: rgba(200, 119, 67, 0.25);
  border-radius: 3px;
  color: #e6c0a0;
  transform: rotate(45deg);
}

.npc-map-badge .map-orient span {
  transform: rotate(-45deg);
}

.npc-map-badge .btn-remove-placement {
  background: none;
  border: none;
  color: var(--danger, #c0455a);
  font-size: 1rem;
  cursor: pointer;
  opacity: 0;
  transition: opacity 0.15s;
  padding: 0 2px;
  line-height: 1;
  margin-left: 2px;
}

.npc-map-badge:hover .btn-remove-placement {
  opacity: 0.8;
}

.npc-map-badge .btn-remove-placement:hover {
  opacity: 1;
}

/* ============================================
   RESULTATS RECHERCHE AVANCEE
   ============================================ */
#npcAdvancedResults .npc-adv-result {
  background: var(--bg-input);
  border: 1px solid var(--border-color);
  border-radius: 6px;
  padding: 8px 12px;
  margin-bottom: 6px;
  cursor: pointer;
  font-size: 0.85rem;
  color: var(--text-main);
  transition: border-color 0.15s;
}

#npcAdvancedResults .npc-adv-result:hover {
  border-color: var(--primary);
}

#npcAdvancedResults .npc-adv-result strong {
  color: #d98b53;
}

/* ============================================
   PREVIEW ACTIONS NPC
   ============================================ */
#npcActionsPreview .action-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 600;
  margin: 2px;
}

#npcActionsPreview .action-badge.buy-sell {
  background: rgba(91, 155, 112, 0.2);
  color: #a3d4b5;
  border: 1px solid rgba(91, 155, 112, 0.4);
}

#npcActionsPreview .action-badge.exchange {
  background: rgba(154, 138, 78, 0.2);
  color: #ecc276;
  border: 1px solid rgba(154, 138, 78, 0.4);
}

#npcActionsPreview .action-badge.talk {
  background: rgba(224, 151, 95, 0.2);
  color: #7dd3fc;
  border: 1px solid rgba(224, 151, 95, 0.4);
}

/* ============================================
   CHECKBOXES ACTIONS NPC
   ============================================ */
.npc-actions-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  margin-top: 6px;
}

.npc-action-check {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 5px 10px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  cursor: pointer;
  transition: all 0.15s ease;
  font-size: 0.85rem;
}

.npc-action-check:hover {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.15);
}

.npc-action-check input[type="checkbox"] {
  accent-color: #a94c60;
  width: 16px;
  height: 16px;
  cursor: pointer;
}

.npc-action-check input[type="checkbox"]:checked + .action-badge {
  opacity: 1;
}

.npc-action-check .action-badge {
  opacity: 0.5;
  transition: opacity 0.15s ease;
  pointer-events: none;
}

.npc-action-check .action-badge.buy-sell {
  background: rgba(91, 155, 112, 0.2);
  color: #a3d4b5;
  border: 1px solid rgba(91, 155, 112, 0.4);
}

.npc-action-check .action-badge.exchange {
  background: rgba(154, 138, 78, 0.2);
  color: #ecc276;
  border: 1px solid rgba(154, 138, 78, 0.4);
}

.npc-action-check .action-badge.talk {
  background: rgba(224, 151, 95, 0.2);
  color: #7dd3fc;
  border: 1px solid rgba(224, 151, 95, 0.4);
}

/* ============================================
   RECHERCHE - RESULTATS DROPDOWN
   ============================================ */
#npcSearchResults .list-group-item,
#npcItemSearchResults .list-group-item {
  font-size: 0.9rem;
  padding: 8px 12px;
}

#npcSearchResults .list-group-item strong,
#npcItemSearchResults .list-group-item strong {
  color: var(--text-main);
}

#npcSearchResults .badge {
  font-size: 0.78rem;
}

/* ============================================
   BADGES DB / LANG SEUL (résultats recherche)
   ============================================ */
.npc-badge-db {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 700;
  padding: 1px 6px;
  border-radius: 3px;
  background: rgba(91, 155, 112, 0.2);
  color: #a3d4b5;
  border: 1px solid rgba(91, 155, 112, 0.4);
}

.npc-badge-lang {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 700;
  padding: 1px 6px;
  border-radius: 3px;
  background: rgba(154, 138, 78, 0.2);
  color: #ecc276;
  border: 1px solid rgba(154, 138, 78, 0.4);
}

/* ============================================
   SECTION QUÊTES (sidebar)
   ============================================ */
.npc-quest-item {
  background: var(--bg-input);
  border: 1px solid var(--border-color);
  border-radius: 6px;
  padding: 8px 12px;
  margin-bottom: 6px;
  cursor: pointer;
  transition: border-color 0.15s;
}

.npc-quest-item:hover {
  border-color: var(--primary);
}

.npc-quest-item .quest-name {
  font-weight: 700;
  color: var(--text-main);
  font-size: 0.88rem;
}

.npc-quest-item .quest-id {
  color: #d16e81;
  font-weight: 700;
  font-size: 0.82rem;
  margin-right: 6px;
}

.npc-quest-item .quest-meta {
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-top: 2px;
}

.npc-quest-steps {
  margin-top: 6px;
  padding-left: 10px;
  border-left: 2px solid rgba(212, 120, 138, 0.3);
}

.npc-quest-step {
  font-size: 0.8rem;
  padding: 3px 0;
  color: var(--text-muted);
}

.npc-quest-step .step-name {
  color: var(--text-main);
  font-weight: 600;
}

.npc-quest-step .step-obj-count {
  color: #d98b53;
  font-size: 0.75rem;
}

/* Section impliqué dans */
.npc-involved-item {
  background: var(--bg-input);
  border: 1px solid var(--border-color);
  border-radius: 6px;
  padding: 6px 10px;
  margin-bottom: 4px;
  font-size: 0.82rem;
  color: var(--text-muted);
}

.npc-involved-item .involved-quest {
  color: #d16e81;
  font-weight: 600;
}

.npc-involved-item .involved-type {
  color: #e0a851;
  font-weight: 600;
}

/* ============================================
   QUEST EDITOR - Accordéon 3 niveaux
   ============================================ */

/* Niveau 1 : Quête (violet) */
.npc-quest-editor-card {
  border: 1px solid rgba(212, 120, 138, 0.4);
  border-radius: 8px;
  margin-bottom: 12px;
  overflow: hidden;
  background: var(--bg-card, #241710);
}

.npc-quest-editor-card > .npc-quest-editor-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 14px;
  cursor: pointer;
  background: rgba(212, 120, 138, 0.1);
  transition: background 0.15s;
}

.npc-quest-editor-card > .npc-quest-editor-header:hover {
  background: rgba(212, 120, 138, 0.2);
}

.npc-quest-editor-header .quest-editor-id {
  color: #d16e81;
  font-weight: 700;
  font-size: 0.95rem;
}

.npc-quest-editor-header .quest-editor-name {
  color: var(--text-main);
  font-weight: 600;
  font-size: 0.9rem;
  margin-left: 8px;
}

.npc-quest-editor-body {
  border-top: 1px solid rgba(212, 120, 138, 0.3);
  padding: 14px;
  background: rgba(20, 12, 7, 0.3);
}

.npc-quest-editor-body .form-label {
  color: var(--text-muted);
  font-size: 0.78rem;
  margin-bottom: 2px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

.npc-quest-editor-body .form-control,
.npc-quest-editor-body .form-select {
  font-size: 0.85rem;
}

/* Niveau 2 : Step (bleu) */
.npc-step-editor-card {
  border: 1px solid rgba(200, 119, 67, 0.4);
  border-radius: 8px;
  margin-bottom: 10px;
  margin-left: 16px;
  overflow: hidden;
  background: rgba(38, 26, 18, 0.6);
}

.npc-step-editor-card > .npc-step-editor-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 12px;
  cursor: pointer;
  background: rgba(200, 119, 67, 0.1);
  transition: background 0.15s;
}

.npc-step-editor-card > .npc-step-editor-header:hover {
  background: rgba(200, 119, 67, 0.2);
}

.npc-step-editor-header .step-editor-id {
  color: #d98b53;
  font-weight: 700;
  font-size: 0.9rem;
}

.npc-step-editor-header .step-editor-name {
  color: var(--text-main);
  font-weight: 600;
  font-size: 0.85rem;
  margin-left: 8px;
}

.npc-step-editor-body {
  border-top: 1px solid rgba(200, 119, 67, 0.3);
  padding: 12px;
  background: rgba(20, 12, 7, 0.2);
}

.npc-step-editor-body .form-label {
  color: var(--text-muted);
  font-size: 0.76rem;
  margin-bottom: 2px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

.npc-step-editor-body .form-control,
.npc-step-editor-body .form-select {
  font-size: 0.83rem;
}

/* Niveau 3 : Objectif (jaune/ambre) */
.npc-objective-editor-card {
  border: 1px solid rgba(154, 138, 78, 0.4);
  border-radius: 6px;
  margin-bottom: 8px;
  margin-left: 16px;
  overflow: hidden;
  background: rgba(38, 26, 18, 0.5);
}

.npc-objective-editor-card > .npc-objective-editor-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 6px 10px;
  cursor: pointer;
  background: rgba(154, 138, 78, 0.08);
  transition: background 0.15s;
}

.npc-objective-editor-card > .npc-objective-editor-header:hover {
  background: rgba(154, 138, 78, 0.15);
}

.npc-objective-editor-header .obj-editor-id {
  color: #e0a851;
  font-weight: 700;
  font-size: 0.85rem;
}

.npc-objective-editor-header .obj-editor-type {
  color: var(--text-muted);
  font-size: 0.8rem;
  margin-left: 8px;
}

.npc-objective-editor-body {
  border-top: 1px solid rgba(154, 138, 78, 0.3);
  padding: 10px;
  background: rgba(20, 12, 7, 0.15);
}

.npc-objective-editor-body .form-label {
  color: var(--text-muted);
  font-size: 0.74rem;
  margin-bottom: 2px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

.npc-objective-editor-body .form-control,
.npc-objective-editor-body .form-select {
  font-size: 0.82rem;
}

/* Chevrons communs pour l'accordéon quêtes */
.quest-editor-chevron {
  color: var(--text-muted);
  font-size: 0.8rem;
  transition: transform 0.2s;
}

/* Séparateur steps/objectives */
.quest-editor-separator {
  border-top: 1px dashed rgba(58, 42, 30, 0.5);
  margin: 12px 0;
}

/* Boutons d'action dans les headers */
.quest-editor-header-actions {
  display: flex;
  gap: 4px;
  align-items: center;
}

/* ============================================
   EXCHANGES BUILDER
   ============================================ */
.npc-exchanges-builder {
  background: rgba(20, 12, 7, 0.3);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 12px;
}

.npc-exchange-card {
  border: 1px solid rgba(154, 138, 78, 0.3);
  border-radius: 8px;
  margin-bottom: 10px;
  overflow: hidden;
  background: var(--bg-card, #241710);
}

.npc-exchange-card:last-child {
  margin-bottom: 0;
}

.npc-exchange-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 12px;
  background: rgba(154, 138, 78, 0.08);
  border-bottom: 1px solid rgba(154, 138, 78, 0.2);
}

.npc-exchange-num {
  color: #e0a851;
  font-weight: 700;
  font-size: 0.85rem;
}

.npc-exchange-remove-btn {
  background: none;
  border: none;
  color: var(--danger, #c0455a);
  font-size: 0.85rem;
  cursor: pointer;
  opacity: 0.6;
  transition: opacity 0.15s;
  padding: 2px 6px;
}

.npc-exchange-remove-btn:hover {
  opacity: 1;
}

.npc-exchange-body {
  display: flex;
  align-items: stretch;
  padding: 10px;
  gap: 8px;
}

.npc-exchange-side {
  flex: 1;
  min-width: 0;
  position: relative;
}

.npc-exchange-side-header {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.3px;
  margin-bottom: 6px;
  padding-bottom: 4px;
  border-bottom: 1px solid rgba(58, 42, 30, 0.2);
}

.npc-exchange-side-header .btn {
  margin-left: auto;
  padding: 1px 6px;
  font-size: 0.72rem;
}

.npc-exchange-give .npc-exchange-side-header {
  color: #e3a8b1;
}

.npc-exchange-receive .npc-exchange-side-header {
  color: #86efac;
}

.npc-exchange-arrow {
  display: flex;
  align-items: center;
  justify-content: center;
  color: #e0a851;
  font-size: 1.3rem;
  padding: 0 4px;
  flex-shrink: 0;
  align-self: center;
}

.npc-exchange-items {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.npc-exchange-item-row {
  background: rgba(20, 12, 7, 0.5);
  border: 1px solid rgba(58, 42, 30, 0.25);
  border-radius: 6px;
  padding: 6px 8px;
}

.npc-exchange-item-info {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 3px;
}

.npc-exchange-item-id {
  color: #d98b53;
  font-weight: 700;
  font-size: 0.78rem;
  flex-shrink: 0;
}

.npc-exchange-item-name {
  color: var(--text-main, #e9ecef);
  font-weight: 600;
  font-size: 0.82rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.npc-exchange-item-details {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.75rem;
}

.npc-exchange-item-qty-label,
.npc-exchange-item-usemax-label {
  color: var(--text-muted);
  font-weight: 600;
  font-size: 0.72rem;
  white-space: nowrap;
}

.npc-exchange-item-usemax-label {
  display: flex;
  align-items: center;
  gap: 3px;
  cursor: pointer;
}

.npc-exchange-item-qty {
  width: 55px;
  padding: 2px 5px;
  font-size: 0.78rem;
  background: #1a0f07;
  border: 1px solid rgba(58, 42, 30, 0.3);
  color: var(--text-main, #e9ecef);
  border-radius: 4px;
  text-align: center;
}

.npc-exchange-item-remove {
  background: none;
  border: none;
  color: var(--danger, #c0455a);
  font-size: 0.78rem;
  cursor: pointer;
  opacity: 0.5;
  transition: opacity 0.15s;
  padding: 0 3px;
  margin-left: auto;
  line-height: 1;
}

.npc-exchange-item-remove:hover {
  opacity: 1;
}

/* Dropdown recherche item echange */
.npc-exchange-search-dropdown {
  position: absolute;
  z-index: 200;
  background: #1a0f07;
  border: 1px solid rgba(224, 151, 95, 0.4);
  border-radius: 8px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.6);
  width: 100%;
  min-width: 280px;
  margin-top: 4px;
  overflow: hidden;
}

.npc-exchange-search-input {
  width: 100%;
  padding: 8px 12px;
  background: rgba(20, 12, 7, 0.8);
  border: none;
  border-bottom: 1px solid rgba(224, 151, 95, 0.2);
  color: var(--text-main, #e9ecef);
  font-size: 0.82rem;
  outline: none;
}

.npc-exchange-search-input::placeholder {
  color: #8b7461;
}

.npc-exchange-search-results {
  max-height: 200px;
  overflow-y: auto;
}

.npc-exchange-search-item {
  padding: 7px 12px;
  font-size: 0.82rem;
  color: var(--text-main, #e9ecef);
  cursor: pointer;
  border-bottom: 1px solid rgba(58, 42, 30, 0.1);
  transition: background 0.1s;
}

.npc-exchange-search-item:hover {
  background: rgba(224, 151, 95, 0.1);
}

.npc-exchange-search-item:last-child {
  border-bottom: none;
}

/* Position relative pour les conteneurs de boutons ajouter item */
.npc-exchange-side-header {
  position: relative;
}

/* ============================================
   CHRONOLOGIE NPC (sidebar)
   ============================================ */
.npc-chrono-container {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.npc-chrono-block {
  background: rgba(20, 12, 7, 0.5);
  border: 1px solid rgba(58, 42, 30, 0.3);
  border-radius: 6px;
  overflow: hidden;
}

.chrono-block-title {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  color: var(--text-muted);
  padding: 6px 10px;
  border-bottom: 1px solid rgba(58, 42, 30, 0.25);
  background: rgba(38, 26, 18, 0.4);
  display: flex;
  align-items: center;
  gap: 5px;
}

.chrono-block-title i {
  font-size: 0.78rem;
}

.chrono-block-body {
  padding: 8px 10px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.chrono-line {
  font-size: 0.8rem;
  color: var(--text-main);
  padding: 3px 0 3px 8px;
  border-left: 2px solid rgba(200, 119, 67, 0.5);
}

.chrono-line .text-muted {
  font-size: 0.75rem;
}

.chrono-response {
  padding: 4px 0 4px 10px;
  border-left: 2px solid rgba(154, 138, 78, 0.4);
  margin-top: 2px;
}

.chrono-response-label {
  font-weight: 700;
  color: #bfa15c;
  font-size: 0.78rem;
}

.chrono-action {
  padding-left: 12px;
  font-size: 0.78rem;
  color: #d6c3ae;
}

.chrono-step {
  padding-left: 16px;
  font-size: 0.78rem;
  color: #e6c0a0;
  border-left: 2px solid rgba(200, 119, 67, 0.3);
  margin: 2px 0 2px 8px;
  padding-top: 2px;
  padding-bottom: 2px;
}

.chrono-objective {
  padding-left: 28px;
  font-size: 0.76rem;
  color: #e0a851;
}

.chrono-clickable {
  cursor: pointer;
  transition: background 0.15s;
  border-radius: 3px;
  padding-right: 4px;
}

.chrono-clickable:hover {
  background: rgba(200, 119, 67, 0.12);
}
