/* ===== CONVERSATION PANEL ===== */

:root {
  --conv-panel-w: 430px;
}

/* Vertical split tab group */
#conv-panel-tab {
  position: fixed;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  z-index: 999990;
  display: flex;
  flex-direction: column;
  overflow: visible;
  max-height: calc(100vh - 32px);
  transition: left 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

#conv-panel-tab.shifted {
  left: var(--conv-panel-w);
}

.conv-tab-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 24px;
  border: none;
  border-top: 1px solid rgba(255,255,255,0.12);
  background: rgba(139, 92, 246, 0.7);
  color: rgba(255,255,255,0.7);
  cursor: pointer;
  padding: 0;
  position: relative;
  transition: background 0.15s, width 0.15s, color 0.15s;
  backdrop-filter: blur(4px);
  overflow: visible;
}

.conv-tab-btn:first-child {
  border-top: none;
  border-radius: 0 8px 0 0;
}

.conv-tab-btn:last-child {
  border-radius: 0 0 8px 0;
}

/* Sidebar button tooltips (appear to the right) */
#conv-panel-tab .conv-tab-btn[data-tooltip]::after {
  content: attr(data-tooltip);
  position: absolute;
  left: calc(100% + 8px);
  top: 50%;
  transform: translateY(-50%);
  background: #0f0f1a;
  color: rgba(255,255,255,0.9);
  font-size: 11px;
  font-weight: 500;
  padding: 4px 10px;
  border-radius: 6px;
  white-space: nowrap;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.15s;
  z-index: 100000;
  box-shadow: 0 4px 12px rgba(0,0,0,0.4);
  border: 1px solid rgba(255,255,255,0.08);
}
#conv-panel-tab .conv-tab-btn[data-tooltip]:hover::after {
  opacity: 1;
  transition-delay: 0.5s;
}

.conv-tab-btn:hover {
  background: rgba(139, 92, 246, 0.95);
  color: #fff;
  width: 26px;
}

.conv-tab-btn.active {
  background: rgba(139, 92, 246, 1);
  color: #fff;
}

.conv-tab-btn svg {
  width: 11px;
  height: 11px;
  flex-shrink: 0;
}

/* Badge */
.conv-panel-badge {
  position: absolute;
  top: -6px;
  right: -8px;
  min-width: 20px;
  height: 18px;
  padding: 0 5px;
  border-radius: 9px;
  background: #ef4444;
  color: #fff;
  font-size: 9px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  white-space: nowrap;
  box-sizing: border-box;
}

/* Panel */
.conv-panel {
  position: fixed;
  left: calc(-1 * var(--conv-panel-w) - 10px);
  top: 0;
  width: var(--conv-panel-w);
  height: 100vh;
  background: #0d0e1f;
  border-right: 1px solid rgba(139, 92, 246, 0.15);
  z-index: 999989;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
  transition: left 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 4px 0 24px rgba(0,0,0,0.5);
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.conv-panel.open {
  left: 0;
}

/* Drag handle */
.conv-panel-drag {
  position: absolute;
  top: 0;
  right: -4px;
  width: 8px;
  height: 100%;
  cursor: col-resize;
  z-index: 15;
  transition: background 0.15s;
}

.conv-panel-drag:hover,
.conv-panel-drag.dragging {
  background: rgba(139, 92, 246, 0.35);
}

/* Header */
.conv-panel-header {
  padding: 12px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  flex-shrink: 0;
}

.conv-panel-title {
  font-size: 18px;
  font-weight: 700;
  color: #e2e8f0;
  letter-spacing: 0.02em;
}

.conv-panel-header-actions {
  display: flex;
  align-items: center;
  gap: 4px;
}

.conv-panel-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 3px;
  width: auto;
  min-width: 30px;
  height: 30px;
  padding: 0 7px;
  border: none;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.06);
  color: #94a3b8;
  cursor: pointer;
  transition: all 0.15s;
  font-size: 11px;
  font-weight: 600;
  position: relative;
}

.conv-panel-btn:hover {
  background: rgba(139, 92, 246, 0.2);
  color: #c4b5fd;
}

.conv-panel-btn[title]::after {
  content: attr(title);
  position: absolute;
  top: calc(100% + 6px);
  left: 50%;
  transform: translateX(-50%);
  background: #1e293b;
  color: #e2e8f0;
  font-size: 11px;
  font-weight: 400;
  white-space: nowrap;
  padding: 4px 8px;
  border-radius: 5px;
  border: 1px solid rgba(255,255,255,0.1);
  box-shadow: 0 4px 12px rgba(0,0,0,0.4);
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.15s;
  z-index: 9999999;
}
.conv-panel-btn[title]:hover::after {
  opacity: 1;
}

.conv-panel-btn svg {
  flex-shrink: 0;
}

.conv-panel-btn.loading svg {
  animation: conv-spin 0.8s linear infinite;
}

@keyframes conv-spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

/* Search bar */
.conv-panel-search,
.conv-fav-search {
  display: flex;
  align-items: center;
  padding: 8px 12px;
  gap: 8px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  flex-shrink: 0;
}

.conv-panel-search.hidden {
  display: none;
}

.conv-search-icon {
  flex-shrink: 0;
  color: #64748b;
}

.conv-search-input {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  color: #e2e8f0;
  font-size: 13.5px;
  font-family: inherit;
  padding: 4px 0;
}

.conv-search-input::placeholder {
  color: #475569;
}

.conv-search-clear {
  flex-shrink: 0;
  background: none;
  border: none;
  color: #64748b;
  font-size: 18px;
  cursor: pointer;
  padding: 0 2px;
  line-height: 1;
  transition: color 0.15s;
}

.conv-search-clear:hover {
  color: #e2e8f0;
}

.conv-search-clear.hidden {
  display: none;
}

/* Filters */
.conv-panel-filters {
  display: flex;
  padding: 8px 10px;
  gap: 4px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  flex-shrink: 0;
}

.conv-filter-btn {
  flex: 1;
  padding: 7px 8px;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 500;
  background: transparent;
  color: #64748b;
  border: 1px solid rgba(255, 255, 255, 0.06);
  cursor: pointer;
  transition: all 0.15s;
  text-align: center;
  white-space: nowrap;
}

.conv-filter-btn:hover {
  color: #94a3b8;
  border-color: rgba(255, 255, 255, 0.12);
}

.conv-filter-btn.active {
  background: rgba(139, 92, 246, 0.15);
  color: #a78bfa;
  border-color: rgba(139, 92, 246, 0.3);
}

.conv-filter-count {
  font-size: 11px;
  opacity: 0.7;
  margin-left: 2px;
}

/* List */
.conv-panel-list {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  scrollbar-width: thin;
  scrollbar-color: rgba(139,92,246,0.3) transparent;
}

.conv-panel-list::-webkit-scrollbar {
  width: 4px;
}

.conv-panel-list::-webkit-scrollbar-track {
  background: transparent;
}

.conv-panel-list::-webkit-scrollbar-thumb {
  background: rgba(139,92,246,0.3);
  border-radius: 2px;
}

/* Conversation item */
.conv-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 14px;
  cursor: pointer;
  transition: background 0.15s;
  border-left: 3px solid transparent;
  gap: 10px;
  position: relative;
}

.conv-item:hover {
  background: rgba(255, 255, 255, 0.04);
}

.conv-item--opened {
  border-left-color: #4ade80;
  background: rgba(74, 222, 128, 0.04);
}

.conv-item--opened:hover {
  background: rgba(74, 222, 128, 0.07);
}

/* Left section */
.conv-item-left {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1;
  min-width: 0;
}

.conv-item-avatar-wrap {
  position: relative;
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 2px solid transparent;
  box-sizing: content-box;
}

.conv-item-avatar-wrap.is-fav {
  border-color: #fbbf24;
}

.conv-item-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
  background: #1e293b;
}

.conv-item-avatar--initial {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  font-weight: 700;
  color: #fff;
  text-transform: uppercase;
}

.conv-item-online-dot {
  position: absolute;
  bottom: 0;
  right: 0;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #4ade80;
  border: 2px solid #0d0e1f;
}

.conv-item-info {
  flex: 1;
  min-width: 0;
}

.conv-item-name-row {
  display: flex;
  align-items: baseline;
  gap: 6px;
  min-width: 0;
}

.conv-item-pseudo {
  font-size: 12.5px;
  font-weight: 400;
  color: #94a3b8;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.4;
}

.conv-item-name {
  font-size: 15px;
  font-weight: 700;
  color: #f1f5f9;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.4;
}

.conv-item--unread .conv-item-name {
  font-weight: 700;
  color: #f1f5f9;
}

.conv-item-group-badges {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-wrap: wrap;
  margin-bottom: 4px;
  margin-top: 4px;
  margin-left: 2px;
}
.conv-item-group-badge {
  display: inline-block;
  padding: 2px 6px;
  border-radius: 4px;
  margin-right: 2px;
  font-size: 10px;
  font-weight: 600;
  color: white;
  white-space: nowrap;
  flex-shrink: 0;
  box-shadow: 0 1px 3px rgba(0,0,0,0.3);
  line-height: 1.2;
}

.conv-item-preview {
  font-size: 14.5px;
  color: #94a3b8;
  margin-top: 2px;
  position: relative;
  cursor: default;
}

.conv-item-preview-inner {
  display: block;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.conv-preview-tooltip {
  display: none;
  position: fixed;
  max-width: 320px;
  padding: 6px 10px;
  background: #1e293b;
  border: 1px solid rgba(139,92,246,0.25);
  border-radius: 6px;
  color: #e2e8f0;
  font-size: 13px;
  line-height: 1.4;
  white-space: normal;
  word-break: break-word;
  z-index: 999999;
  box-shadow: 0 4px 12px rgba(0,0,0,0.4);
  pointer-events: none;
}

.conv-preview-tooltip.visible {
  display: block;
}

/* Custom confirmation modal */
.conv-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.55);
  z-index: 9999999;
  display: flex;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(2px);
}

.conv-modal {
  background: #1e293b;
  border: 1px solid rgba(139,92,246,0.3);
  border-radius: 12px;
  padding: 24px 28px;
  max-width: 360px;
  width: 90%;
  box-shadow: 0 8px 32px rgba(0,0,0,0.5);
  text-align: center;
}

.conv-modal-text {
  color: #e2e8f0;
  font-size: 14px;
  line-height: 1.5;
  margin-bottom: 20px;
}

.conv-modal-actions {
  display: flex;
  gap: 10px;
  justify-content: center;
}

.conv-modal-btn {
  padding: 8px 22px;
  border-radius: 8px;
  border: none;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s;
}

.conv-modal-btn--cancel {
  background: rgba(255,255,255,0.08);
  color: #94a3b8;
}

.conv-modal-btn--cancel:hover {
  background: rgba(255,255,255,0.14);
  color: #e2e8f0;
}

.conv-modal-btn--confirm {
  background: rgba(139,92,246,0.8);
  color: #fff;
}

.conv-modal-btn--confirm:hover {
  background: rgba(139,92,246,1);
}

.conv-item-preview--me {
  color: #818cf8;
}

.conv-item-preview--fan {
  color: #f59e0b;
}

.conv-item-stats {
  font-size: 11px;
  font-weight: 600;
  margin-top: 3px;
  line-height: 1.3;
  color: #f59e0b;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.conv-item-meta {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 2px;
}

.conv-item-time {
  font-size: 13px;
  color: #94a3b8;
}

.conv-item-urgent {
  font-size: 11px;
  color: #ef4444;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 2px;
  white-space: nowrap;
  margin-left: auto;
}

/* Right actions */
.conv-item-actions {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  gap: 4px;
  opacity: 0;
  transition: opacity 0.15s;
}

.conv-item:hover .conv-item-actions {
  opacity: 1;
}

.conv-item-newtab,
.conv-item-fav {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border: none;
  border-radius: 5px;
  background: rgba(255, 255, 255, 0.06);
  color: #94a3b8;
  cursor: pointer;
  transition: all 0.15s;
}

.conv-item-newtab:hover,
.conv-item-fav:hover {
  background: rgba(139, 92, 246, 0.25);
  color: #c4b5fd;
}

/* Pin button — absolute bottom-right of card */
.conv-item-pin {
  position: absolute;
  bottom: 6px;
  right: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  border: none;
  border-radius: 0;
  background: none;
  color: #64748b;
  cursor: pointer;
  transition: all 0.15s;
  opacity: 0;
  z-index: 2;
  padding: 0;
}

.conv-item:hover .conv-item-pin {
  opacity: 1;
}

.conv-item-pin:hover {
  background: none;
  color: #c4b5fd;
}

.conv-item-fav.is-fav {
  color: #fbbf24;
  opacity: 1;
}

.conv-item-fav.is-fav:hover {
  color: #f59e0b;
  background: rgba(251, 191, 36, 0.15);
}

/* Pin button always visible when pinned */
.conv-item .conv-item-pin.is-pinned {
  opacity: 1;
  color: #818cf8;
}

.conv-item-pin.is-pinned:hover {
  color: #a78bfa;
  background: rgba(139, 92, 246, 0.2);
}

/* Pinned card visual indicator */
.conv-item--pinned {
  border-left: 3px solid #818cf8 !important;
}

/* Hidden filter button */
.conv-filter-hidden-btn {
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  gap: 3px;
  padding: 4px 6px !important;
  min-width: auto !important;
  border: none !important;
  background: none !important;
  opacity: 0.4;
  transition: opacity 0.15s;
}

.conv-filter-hidden-btn:hover,
.conv-filter-hidden-btn.active {
  opacity: 1;
  background: none !important;
  border: none !important;
}

.conv-filter-hidden-count {
  font-size: 10px;
  font-weight: 700;
  color: #ef4444;
}

.conv-item--hidden {
  opacity: 0.5;
}

/* Pin dropdown */
.conv-pin-dropdown {
  background: #1e293b;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  padding: 4px 0;
  min-width: 160px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
  font-family: inherit;
}

.conv-pin-option {
  padding: 8px 14px;
  font-size: 13px;
  color: #e2e8f0;
  cursor: pointer;
  transition: background 0.12s;
  white-space: nowrap;
}

.conv-pin-option:hover {
  background: rgba(139, 92, 246, 0.2);
}

/* Loading & empty */
.conv-panel-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 40px 20px;
  color: #94a3b8;
  font-size: 14px;
}

.conv-panel-spinner {
  width: 22px;
  height: 22px;
  border: 2px solid rgba(139,92,246,0.2);
  border-top-color: #a78bfa;
  border-radius: 50%;
  animation: conv-spin 0.7s linear infinite;
}

.conv-panel-empty {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 20px;
  color: #94a3b8;
  font-size: 14px;
}

.conv-panel-loadmore {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px 0;
}

/* Unread dot for items — positioned top-right of card */
.conv-item-unread-dot {
  position: absolute;
  top: 6px;
  right: 6px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #818cf8;
  pointer-events: none;
  z-index: 2;
}

/* Favorites toggle button active */
.conv-panel-btn.fav-active {
  background: rgba(251, 191, 36, 0.2);
  color: #fbbf24;
}

.conv-panel-btn.fav-active:hover {
  background: rgba(251, 191, 36, 0.3);
  color: #f59e0b;
}

/* Favorites sub-panel */
.conv-fav-panel {
  display: none;
  flex-direction: column;
  flex: 1;
  min-height: 0;
}

.conv-fav-panel.visible {
  display: flex;
}

.conv-fav-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 14px;
  border-bottom: 1px solid rgba(251, 191, 36, 0.12);
  flex-shrink: 0;
}

.conv-fav-title {
  font-size: 13px;
  font-weight: 600;
  color: #fbbf24;
  display: flex;
  align-items: center;
  gap: 5px;
}

.conv-fav-list {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  scrollbar-width: thin;
  scrollbar-color: rgba(251,191,36,0.3) transparent;
}

.conv-fav-list::-webkit-scrollbar {
  width: 4px;
}

.conv-fav-list::-webkit-scrollbar-thumb {
  background: rgba(251,191,36,0.3);
  border-radius: 2px;
}

/* Fav header actions */
.conv-fav-header-actions {
  display: flex;
  align-items: center;
  gap: 4px;
}

/* Fav title button (group switcher trigger) */
.conv-fav-title-btn {
  display: flex;
  align-items: center;
  gap: 5px;
  background: none;
  border: none;
  padding: 0;
  font-size: 13px;
  font-weight: 600;
  color: #fbbf24;
  cursor: pointer;
  font-family: inherit;
  transition: opacity 0.15s;
}
.conv-fav-title-btn:hover { opacity: 0.8; }

.conv-fav-chevron {
  opacity: 0.5;
  transition: transform 0.15s;
}

/* Group switcher dropdown */
.conv-fav-group-dropdown {
  position: absolute;
  top: 100%;
  left: 0;
  margin-top: 4px;
  min-width: 180px;
  background: #1e293b;
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 12px;
  box-shadow: 0 12px 32px rgba(0,0,0,0.5);
  z-index: 100;
  padding: 4px;
  animation: conv-fav-dd-in 0.12s ease-out;
}
@keyframes conv-fav-dd-in {
  from { opacity: 0; transform: translateY(-4px); }
  to { opacity: 1; transform: translateY(0); }
}

.conv-fav-group-option {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 8px 12px;
  border: none;
  border-radius: 8px;
  background: transparent;
  color: rgba(255,255,255,0.7);
  font-size: 12px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: all 0.1s;
  text-align: left;
}
.conv-fav-group-option:hover { background: rgba(255,255,255,0.08); color: #fff; }
.conv-fav-group-option.active { background: rgba(255,255,255,0.1); color: #fff; }

.conv-fav-group-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}

.conv-fav-group-edit {
  margin-left: auto;
  font-size: 13px;
  opacity: 0;
  color: rgba(255,255,255,0.4);
  transition: opacity 0.1s;
}
.conv-fav-group-option:hover .conv-fav-group-edit { opacity: 1; }
.conv-fav-group-edit:hover { color: #fff; }

/* ===== GROUP MODAL ===== */
.conv-group-modal {
  position: fixed;
  inset: 0;
  z-index: 999999;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0,0,0,0.6);
  backdrop-filter: blur(4px);
  animation: conv-modal-in 0.15s ease-out;
}
@keyframes conv-modal-in {
  from { opacity: 0; }
  to { opacity: 1; }
}

.conv-group-modal-content {
  width: 360px;
  max-height: 85vh;
  overflow-y: auto;
  background: #1e293b;
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 16px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.5);
  animation: conv-modal-content-in 0.2s ease-out;
}
.conv-group-modal-content.conv-group-modal-split {
  width: 720px;
  max-width: 95vw;
  height: 520px;
  max-height: 85vh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
@keyframes conv-modal-content-in {
  from { opacity: 0; transform: scale(0.95) translateY(10px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}

.conv-group-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 18px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
  font-size: 14px;
  font-weight: 700;
  color: #fff;
}

.conv-group-modal-close {
  background: rgba(255,255,255,0.08);
  border: none;
  color: rgba(255,255,255,0.6);
  width: 26px;
  height: 26px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 13px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s;
}
.conv-group-modal-close:hover { background: rgba(255,255,255,0.15); color: #fff; }

.conv-group-modal-body {
  padding: 14px 18px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

/* Two-panel layout */
.conv-group-modal-panels {
  display: flex;
  flex: 1;
  min-height: 0;
  overflow: hidden;
}

.conv-group-panel-left {
  flex: 1;
  padding: 14px 18px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 14px;
  border-right: 1px solid rgba(255,255,255,0.08);
}
.conv-group-field--rules {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 0;
}
.conv-group-field--rules .conv-group-rules {
  flex: 1;
  overflow-y: auto;
}

.conv-group-panel-right {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 0;
}

.conv-group-preview-header {
  padding: 10px 14px;
  border-bottom: 1px solid rgba(255,255,255,0.06);
  flex-shrink: 0;
}
.conv-group-preview-header label {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  font-weight: 700;
  color: rgba(255,255,255,0.5);
  text-transform: uppercase;
  letter-spacing: 0.3px;
  margin: 0;
}

.conv-group-preview-count {
  background: rgba(59,130,246,0.2);
  color: #60a5fa;
  font-size: 10px;
  font-weight: 700;
  padding: 1px 6px;
  border-radius: 8px;
  min-width: 16px;
  text-align: center;
}

.conv-group-preview-search {
  display: flex;
  align-items: center;
  padding: 8px 12px;
  gap: 8px;
  border-bottom: 1px solid rgba(255,255,255,0.06);
  flex-shrink: 0;
}

.conv-group-preview-list {
  flex: 1;
  overflow-y: auto;
  padding: 4px 0;
}

.conv-group-preview-empty {
  padding: 24px 14px;
  text-align: center;
  color: rgba(255,255,255,0.35);
  font-size: 12px;
}

/* Preview fan items */
.conv-gp-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 14px;
  cursor: pointer;
  transition: background 0.1s;
}
.conv-gp-item:hover { background: rgba(255,255,255,0.04); }
.conv-gp-item--excluded { opacity: 0.4; }
.conv-gp-item--manual .conv-gp-name::after {
  content: '✦';
  margin-left: 4px;
  font-size: 9px;
  color: #60a5fa;
}

.conv-gp-toggle { flex-shrink: 0; }

.conv-gp-check {
  -webkit-appearance: none;
  appearance: none;
  width: 18px;
  height: 18px;
  border: 2px solid rgba(255,255,255,0.25);
  border-radius: 4px;
  background: rgba(255,255,255,0.06);
  cursor: pointer;
  position: relative;
  transition: all 0.15s;
  flex-shrink: 0;
}
.conv-gp-check:checked {
  background: #3b82f6;
  border-color: #3b82f6;
}
.conv-gp-check:checked::after {
  content: '✓';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  line-height: 1;
}
.conv-gp-check:hover {
  border-color: rgba(255,255,255,0.5);
}

.conv-gp-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  overflow: hidden;
  flex-shrink: 0;
  background: rgba(255,255,255,0.08);
  display: flex;
  align-items: center;
  justify-content: center;
}
.conv-gp-avatar-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.conv-gp-avatar-letter {
  font-size: 13px;
  font-weight: 700;
  color: rgba(255,255,255,0.6);
}

.conv-gp-info {
  flex: 1;
  min-width: 0;
}
.conv-gp-name {
  font-size: 12px;
  font-weight: 600;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.conv-gp-stats {
  font-size: 10px;
  font-weight: 600;
  margin-top: 1px;
}

.conv-group-field label {
  display: block;
  font-size: 11px;
  font-weight: 700;
  color: rgba(255,255,255,0.5);
  text-transform: uppercase;
  letter-spacing: 0.3px;
  margin-bottom: 6px;
}
.conv-group-field label small {
  font-weight: 500;
  text-transform: none;
  letter-spacing: 0;
  color: rgba(255,255,255,0.35);
}

.conv-group-input {
  width: 100%;
  padding: 8px 12px;
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 10px;
  background: rgba(255,255,255,0.05);
  color: #fff;
  font-size: 13px;
  font-family: inherit;
  outline: none;
  transition: border-color 0.15s;
}
.conv-group-input:focus { border-color: rgba(59,130,246,0.5); }

.conv-group-colors {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.conv-group-color-btn {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  border: 2px solid transparent;
  cursor: pointer;
  transition: all 0.15s;
}
.conv-group-color-btn:hover { transform: scale(1.15); }
.conv-group-color-btn.active { border-color: #fff; box-shadow: 0 0 0 2px rgba(255,255,255,0.3); }

/* Rule builder */
.conv-group-rules {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.conv-group-rule-row {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 10px;
  border-radius: 10px;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.06);
  transition: border-color 0.15s;
}
.conv-group-rule-row:hover { border-color: rgba(255,255,255,0.12); }

.conv-grule-field {
  flex: 1;
  min-width: 0;
  padding: 5px 6px;
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 6px;
  background: rgba(255,255,255,0.06);
  color: #fff;
  font-size: 11px;
  font-family: inherit;
  outline: none;
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M0 0l5 6 5-6z' fill='%23888'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 6px center;
  padding-right: 18px;
}
.conv-grule-field:focus { border-color: rgba(59,130,246,0.5); }
.conv-grule-field option { background: #1e293b; color: #fff; }
.conv-grule-field optgroup { color: rgba(255,255,255,0.4); font-weight: 700; font-size: 10px; }

.conv-grule-op {
  width: auto;
  min-width: 44px;
  padding: 5px 6px;
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 6px;
  background: rgba(59,130,246,0.15);
  color: #93c5fd;
  font-size: 12px;
  font-weight: 700;
  font-family: inherit;
  outline: none;
  cursor: pointer;
  text-align: center;
  appearance: none;
  -webkit-appearance: none;
}
.conv-grule-op:focus { border-color: rgba(59,130,246,0.5); }
.conv-grule-op option { background: #1e293b; color: #fff; }

.conv-grule-val-wrap {
  display: flex;
  align-items: center;
  gap: 3px;
  flex-shrink: 0;
}

.conv-grule-value {
  width: 56px;
  padding: 5px 6px;
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 6px;
  background: rgba(255,255,255,0.06);
  color: #fff;
  font-size: 12px;
  font-family: inherit;
  outline: none;
  text-align: center;
}
.conv-grule-value:focus { border-color: rgba(59,130,246,0.5); }
.conv-grule-value[type="text"] { width: 72px; text-align: left; }

.conv-grule-unit {
  font-size: 10px;
  color: rgba(255,255,255,0.35);
  font-weight: 600;
  flex-shrink: 0;
}

.conv-grule-del {
  width: 22px;
  height: 22px;
  border: none;
  border-radius: 6px;
  background: rgba(239,68,68,0.1);
  color: rgba(239,68,68,0.6);
  font-size: 11px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: all 0.15s;
}
.conv-grule-del:hover { background: rgba(239,68,68,0.25); color: #ef4444; }

.conv-grule-add {
  display: block;
  width: 100%;
  padding: 8px;
  margin-top: 4px;
  border: 1px dashed rgba(59,130,246,0.3);
  border-radius: 10px;
  background: transparent;
  color: #60a5fa;
  font-size: 12px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: all 0.15s;
}
.conv-grule-add:hover { background: rgba(59,130,246,0.08); border-color: rgba(59,130,246,0.5); }

.conv-group-modal-footer {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  padding: 12px 18px;
  border-top: 1px solid rgba(255,255,255,0.08);
}

.conv-group-save-btn {
  padding: 8px 18px;
  border: none;
  border-radius: 10px;
  background: #3b82f6;
  color: #fff;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  transition: background 0.15s;
}
.conv-group-save-btn:hover { background: #2563eb; }

.conv-group-delete-btn {
  padding: 8px 14px;
  border: 1px solid rgba(239,68,68,0.3);
  border-radius: 10px;
  background: rgba(239,68,68,0.1);
  color: #ef4444;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  transition: all 0.15s;
  margin-right: auto;
}
.conv-group-delete-btn:hover { background: rgba(239,68,68,0.2); border-color: rgba(239,68,68,0.5); }

/* Fav button always visible for favorited items */
.conv-item .conv-item-fav.is-fav {
  opacity: 1;
}

/* Main list hidden when favorites/promo shown */
.conv-panel-list.hidden,
.conv-panel-filters.hidden {
  display: none;
}

/* Promo toggle button active */
.conv-panel-btn.promo-active {
  background: rgba(139, 92, 246, 0.25);
  color: #a78bfa;
}

.conv-panel-btn.promo-active:hover {
  background: rgba(139, 92, 246, 0.35);
  color: #c4b5fd;
}

/* Promo panel */
.conv-promo-panel {
  display: none;
  flex-direction: column;
  flex: 1;
  min-height: 0;
  overflow-x: hidden;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: rgba(139,92,246,0.3) transparent;
}

.conv-promo-panel.visible {
  display: flex;
}

.conv-promo-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  border-bottom: 1px solid rgba(139, 92, 246, 0.15);
  flex-shrink: 0;
}

.conv-promo-title {
  font-size: 13px;
  font-weight: 600;
  color: #a78bfa;
  display: flex;
  align-items: center;
  gap: 5px;
}

.conv-promo-form {
  padding: 10px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  overflow-x: hidden;
  flex-shrink: 0;
}

.conv-promo-form.hidden {
  display: none;
}

.conv-promo-grid {
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}

.conv-promo-field {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}

.conv-promo-field label {
  font-size: 12px;
  font-weight: 600;
  color: #94a3b8;
  letter-spacing: 0.02em;
}

.conv-promo-row {
  display: flex;
  gap: 6px;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}

.conv-promo-row .conv-promo-field {
  flex: 1;
  min-width: 0;
  max-width: calc(50% - 3px);
}

.conv-promo-field--half {
  flex: 1;
}

.conv-promo-input,
.conv-promo-select {
  width: 100%;
  max-width: 100%;
  padding: 8px 10px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 6px;
  font-size: 13px;
  font-family: inherit;
  background: rgba(255, 255, 255, 0.05);
  color: #e2e8f0;
  outline: none;
  transition: border-color 0.2s;
  box-sizing: border-box;
  overflow: hidden;
  text-overflow: ellipsis;
}

.conv-promo-select {
  width: auto;
  min-width: 120px;
  max-width: 100%;
}

.conv-promo-input::placeholder {
  color: #475569;
}

.conv-promo-input:focus,
.conv-promo-select:focus {
  border-color: rgba(139, 92, 246, 0.5);
}

.conv-promo-select option {
  background: #1a1a2e;
  color: #e2e8f0;
}

.conv-promo-submit {
  width: 100%;
  padding: 10px 16px;
  border: 1px solid rgba(139, 92, 246, 0.3);
  border-radius: 8px;
  background: rgba(139, 92, 246, 0.2);
  color: #a78bfa;
  font-size: 13px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: all 0.2s;
  margin-top: 4px;
}

.conv-promo-submit:hover {
  background: rgba(139, 92, 246, 0.3);
  border-color: rgba(139, 92, 246, 0.5);
}

.conv-promo-submit:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.conv-promo-msg {
  font-size: 12px;
  padding: 8px 10px;
  border-radius: 6px;
  text-align: center;
  min-height: 0;
}

.conv-promo-msg:empty {
  display: none;
}

.conv-promo-msg.success {
  background: rgba(72, 187, 120, 0.12);
  color: #68d391;
  border: 1px solid rgba(72, 187, 120, 0.2);
}

.conv-promo-msg.error {
  background: rgba(252, 129, 129, 0.12);
  color: #fc8181;
  border: 1px solid rgba(252, 129, 129, 0.2);
}

/* Promo vouchers list */
.conv-promo-divider {
  height: 1px;
  background: rgba(139, 92, 246, 0.15);
  margin: 14px 0;
}

.conv-promo-vouchers-section {
  padding: 0 14px 14px;
  flex-shrink: 0;
}

.conv-promo-vouchers-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 0;
  cursor: pointer;
  user-select: none;
}

.conv-promo-vouchers-header:hover .conv-promo-title {
  color: #c4b5fd;
}

.conv-promo-chevron {
  transition: transform 0.2s;
  opacity: 0.6;
  color: #a78bfa;
}

.conv-promo-chevron.expanded {
  transform: rotate(180deg);
}

.conv-promo-vouchers-content {
  display: none;
  padding-top: 8px;
}

.conv-promo-vouchers-content.visible {
  display: block;
}

.promo-vouchers-loading,
.promo-vouchers-empty {
  text-align: center;
  padding: 20px;
  color: rgba(255, 255, 255, 0.4);
  font-size: 12px;
}

.promo-vouchers-search {
  margin-bottom: 12px;
}

.promo-voucher-search-input {
  width: 100%;
  padding: 10px 14px;
  background: rgba(139, 92, 246, 0.1);
  border: 1px solid rgba(139, 92, 246, 0.3);
  border-radius: 8px;
  color: rgba(255, 255, 255, 0.9);
  font-size: 14px;
  font-family: inherit;
  outline: none;
  transition: all 0.2s;
}

.promo-voucher-search-input::placeholder {
  color: rgba(255, 255, 255, 0.4);
}

.promo-voucher-search-input:focus {
  background: rgba(139, 92, 246, 0.15);
  border-color: rgba(139, 92, 246, 0.5);
  box-shadow: 0 0 0 2px rgba(139, 92, 246, 0.1);
}

.promo-vouchers-filters {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 12px;
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.promo-vouchers-filter-group {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.promo-vouchers-filter-label {
  font-size: 11px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.5);
  margin-right: 4px;
}

.promo-voucher-filter-btn {
  padding: 4px 10px;
  border: 1px solid rgba(139, 92, 246, 0.25);
  border-radius: 5px;
  background: rgba(255, 255, 255, 0.03);
  color: rgba(255, 255, 255, 0.6);
  font-size: 11px;
  font-weight: 500;
  font-family: inherit;
  cursor: pointer;
  transition: all 0.2s;
}

.promo-voucher-filter-btn:hover {
  background: rgba(139, 92, 246, 0.15);
  border-color: rgba(139, 92, 246, 0.4);
  color: #a78bfa;
}

.promo-voucher-filter-btn.active {
  background: rgba(139, 92, 246, 0.25);
  border-color: rgba(139, 92, 246, 0.5);
  color: #a78bfa;
  font-weight: 600;
}

.promo-vouchers-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 0;
  margin-bottom: 10px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.promo-voucher-select-all {
  padding: 5px 12px;
  border: 1px solid rgba(139, 92, 246, 0.3);
  border-radius: 5px;
  background: rgba(139, 92, 246, 0.15);
  color: #a78bfa;
  font-size: 11px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: all 0.2s;
}

.promo-voucher-select-all:hover {
  background: rgba(139, 92, 246, 0.25);
  border-color: rgba(139, 92, 246, 0.5);
}

.promo-voucher-delete-selected {
  padding: 5px 12px;
  border: 1px solid rgba(239, 68, 68, 0.3);
  border-radius: 5px;
  background: rgba(239, 68, 68, 0.15);
  color: #f87171;
  font-size: 11px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  gap: 5px;
}

.promo-voucher-delete-selected:hover {
  background: rgba(239, 68, 68, 0.25);
  border-color: rgba(239, 68, 68, 0.5);
}

.promo-vouchers-grid {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.promo-voucher-card {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(139, 92, 246, 0.2);
  border-radius: 6px;
  padding: 10px;
  transition: all 0.2s;
}

.promo-voucher-card:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(139, 92, 246, 0.4);
}

.promo-voucher-card.selected {
  background: rgba(139, 92, 246, 0.15);
  border-color: rgba(139, 92, 246, 0.5);
}

.promo-voucher-card.maxed-out {
  opacity: 0.5;
  border-color: rgba(255, 255, 255, 0.1);
}

.promo-voucher-main {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 6px;
}

.promo-voucher-left {
  display: flex;
  align-items: center;
  gap: 10px;
}

.promo-voucher-checkbox-wrapper {
  display: flex;
  align-items: center;
  cursor: pointer;
  position: relative;
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}

.promo-voucher-checkbox {
  position: absolute;
  opacity: 0;
  width: 20px;
  height: 20px;
  cursor: pointer;
  margin: 0;
}

.checkbox-custom {
  display: block;
  width: 20px;
  height: 20px;
  border: 2px solid #8b5cf6;
  border-radius: 4px;
  background: rgba(139, 92, 246, 0.1);
  transition: all 0.2s;
  position: relative;
}

.promo-voucher-checkbox:checked + .checkbox-custom {
  background: #8b5cf6;
  border-color: #a78bfa;
}

.promo-voucher-checkbox:checked + .checkbox-custom::after {
  content: '';
  position: absolute;
  left: 6px;
  top: 2px;
  width: 5px;
  height: 10px;
  border: solid white;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

.promo-voucher-checkbox-wrapper:hover .checkbox-custom {
  border-color: #a78bfa;
  background: rgba(139, 92, 246, 0.2);
}

.promo-voucher-checkbox-placeholder {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}

.promo-voucher-code {
  font-size: 14px;
  font-weight: 700;
  color: #a78bfa;
  font-family: monospace;
  flex-shrink: 0;
}

.promo-voucher-content {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding-left: 30px;
}

.promo-voucher-discount {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.8);
  line-height: 1.3;
  word-wrap: break-word;
}

.promo-voucher-meta {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 10px;
  color: rgba(255, 255, 255, 0.4);
  flex-wrap: wrap;
}

.promo-voucher-usage {
  font-weight: 600;
  color: rgba(16, 185, 129, 0.8);
  white-space: nowrap;
}

.promo-voucher-usage.maxed {
  color: rgba(239, 68, 68, 0.8);
}

.promo-voucher-separator {
  color: rgba(255, 255, 255, 0.2);
}

.promo-voucher-date {
  color: rgba(255, 255, 255, 0.35);
  white-space: nowrap;
}

.promo-voucher-copy {
  background: rgba(139, 92, 246, 0.15);
  border: 1px solid rgba(139, 92, 246, 0.3);
  border-radius: 4px;
  padding: 5px 7px;
  cursor: pointer;
  color: #a78bfa;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
  flex-shrink: 0;
}

.promo-voucher-copy:hover {
  background: rgba(139, 92, 246, 0.25);
  border-color: rgba(139, 92, 246, 0.5);
}

/* ===== CONFIRMATION MODAL ===== */

.promo-confirm-modal {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.2s;
}

.promo-confirm-modal.show {
  opacity: 1;
}

.promo-confirm-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(4px);
}

.promo-confirm-dialog {
  position: relative;
  background: linear-gradient(135deg, #1e1b4b 0%, #312e81 100%);
  border: 1px solid rgba(139, 92, 246, 0.3);
  border-radius: 12px;
  padding: 24px;
  max-width: 400px;
  width: 90%;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
}

.promo-confirm-icon {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: rgba(239, 68, 68, 0.15);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #f87171;
}

.promo-confirm-message {
  font-size: 15px;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.9);
  text-align: center;
  line-height: 1.5;
}

.promo-confirm-buttons {
  display: flex;
  gap: 10px;
  width: 100%;
  margin-top: 8px;
}

.promo-confirm-btn {
  flex: 1;
  padding: 10px 20px;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: all 0.2s;
  border: none;
}

.promo-confirm-cancel {
  background: rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.8);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.promo-confirm-cancel:hover {
  background: rgba(255, 255, 255, 0.15);
  color: #fff;
}

.promo-confirm-ok {
  background: #ef4444;
  color: #fff;
  border: 1px solid #dc2626;
}

.promo-confirm-ok:hover {
  background: #dc2626;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(239, 68, 68, 0.4);
}

/* ===== MODE SWITCHER (Messagerie / Revenus) ===== */

.conv-panel-title-wrap {
  display: flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  position: relative;
  user-select: none;
  padding: 4px 8px 4px 8px;
  border-radius: 6px;
  transition: background 0.15s;
}

.conv-panel-title-wrap:hover {
  background: rgba(255, 255, 255, 0.06);
}

.conv-mode-chevron {
  opacity: 0.5;
  transition: transform 0.2s, opacity 0.15s;
  flex-shrink: 0;
}

.conv-panel-title-wrap:hover .conv-mode-chevron {
  opacity: 0.8;
}

.conv-mode-dropdown {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  min-width: 180px;
  background: #1e293b;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
  padding: 4px;
  display: none;
  flex-direction: column;
  gap: 2px;
  z-index: 999999;
}

.conv-mode-dropdown.open {
  display: flex;
}

.conv-mode-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 12px 9px 12px;
  border: none;
  border-radius: 8px;
  background: transparent;
  color: rgba(255, 255, 255, 0.75);
  font-size: 13px;
  font-weight: 500;
  font-family: inherit;
  cursor: pointer;
  transition: background 0.15s;
  white-space: nowrap;
  text-align: left;
}

.conv-mode-item:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
}

.conv-mode-item.active {
  background: rgba(139, 92, 246, 0.2);
  color: #c4b5fd;
  font-weight: 600;
}

.conv-mode-item svg {
  opacity: 0.7;
  flex-shrink: 0;
}

.conv-mode-item.active svg {
  opacity: 1;
  stroke: #c4b5fd;
}

/* ===== TRANSACTION PANEL ===== */

.conv-txn-panel {
  display: none;
  flex-direction: column;
  flex: 1;
  min-height: 0;
}

.conv-txn-panel.visible {
  display: flex;
}

/* ===== DAILY REVENUE SUMMARY (COMPACT) ===== */

.daily-revenue-summary {
  padding: 8px 12px;
  background: rgba(139, 92, 246, 0.08);
  border-bottom: 1px solid rgba(139, 92, 246, 0.15);
  flex-shrink: 0;
}

.daily-rev-loading {
  text-align: center;
  color: rgba(255, 255, 255, 0.5);
  font-size: 11px;
  padding: 4px;
}

.daily-rev-compact {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.daily-rev-total-inline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 6px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.daily-rev-label-nav {
  display: flex;
  align-items: center;
  gap: 4px;
}

.daily-rev-nav-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  background: none;
  border: none;
  padding: 2px;
  cursor: pointer;
  color: rgba(255, 255, 255, 0.45);
  border-radius: 4px;
  transition: color 0.15s, background 0.15s;
  line-height: 0;
}

.daily-rev-nav-btn:hover {
  color: rgba(255, 255, 255, 0.9);
  background: rgba(255, 255, 255, 0.08);
}

.daily-rev-label-inline {
  font-size: 11px;
  color: rgba(255, 255, 255, 0.6);
  font-weight: 500;
}

.daily-rev-total-right {
  display: flex;
  align-items: center;
  gap: 6px;
}

.daily-rev-value-inline {
  font-size: 15px;
  font-weight: 700;
  color: rgba(139, 92, 246, 1);
}

.daily-rev-breakdown {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 11px;
  color: rgba(255, 255, 255, 0.5);
}

.daily-rev-item-inline {
  display: inline-flex;
  align-items: center;
  gap: 3px;
}

.daily-rev-item-inline strong {
  color: rgba(255, 255, 255, 0.85);
  font-weight: 600;
}

.daily-rev-media-clickable {
  cursor: pointer;
  transition: color 0.15s;
}

.daily-rev-media-clickable:hover {
  color: rgba(139, 92, 246, 0.9);
}

.daily-rev-chevron {
  margin-left: 4px;
  transition: transform 0.2s;
  opacity: 0.6;
}

.daily-rev-chevron.expanded {
  transform: rotate(180deg);
}

.daily-rev-media-details {
  display: none;
  gap: 12px;
  font-size: 11px;
  color: rgba(255, 255, 255, 0.4);
  padding-top: 6px;
  margin-top: 6px;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.daily-rev-media-details.visible {
  display: flex;
}

.daily-rev-detail-item {
  display: inline-flex;
  align-items: center;
  gap: 3px;
}

.daily-rev-detail-item strong {
  color: rgba(255, 255, 255, 0.7);
  font-weight: 600;
}

.daily-rev-badge {
  font-size: 11px;
  color: rgba(34, 197, 94, 1);
  font-weight: 600;
  background: rgba(34, 197, 94, 0.15);
  padding: 1px 4px;
  border-radius: 3px;
  margin-left: 3px;
}

.conv-txn-list {
  flex: 1;
  overflow-y: auto;
  padding: 6px 12px 12px;
}

/* ===== TRANSACTION CARDS ===== */

.txn-card {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 10px;
  padding: 12px 14px;
  margin-bottom: 8px;
  transition: background 0.15s, border-color 0.15s;
}

.txn-card:hover {
  background: rgba(255, 255, 255, 0.07);
  border-color: rgba(255, 255, 255, 0.1);
}

/* Row 1: type + amount */
.txn-card-row1 {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 4px;
}

.txn-card-type {
  font-size: 12.5px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.9);
}

.txn-card-amount {
  font-size: 13px;
  font-weight: 700;
  border-radius: 6px;
  padding: 2px 7px;
  flex-shrink: 0;
}

.txn-card-amount.txn-badge--validated {
  color: #68d391;
  background: rgba(72, 187, 120, 0.12);
}

.txn-card-amount.txn-badge--pending {
  color: #f6ad55;
  background: rgba(246, 173, 85, 0.12);
}

.txn-card-amount.txn-badge--cancelled {
  color: #fc8181;
  background: rgba(252, 129, 129, 0.12);
}

/* Row 2: pseudo + note + nickname + status */
.txn-card-row2 {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 4px 6px;
  margin-bottom: 4px;
}

.txn-card-pseudo {
  font-size: 12px;
  color: #818cf8;
  font-weight: 500;
  text-decoration: none;
  cursor: pointer;
  white-space: nowrap;
}

.txn-card-pseudo:hover {
  color: #a5b4fc;
  text-decoration: underline;
}

.txn-card-note-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  border: none;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.06);
  color: rgba(255, 255, 255, 0.4);
  cursor: pointer;
  padding: 0;
  transition: background 0.15s, color 0.15s;
  flex-shrink: 0;
  position: relative;
  z-index: 1;
}

.txn-card-note-btn:hover {
  background: rgba(129, 140, 248, 0.2);
  color: #818cf8;
}

.txn-card-nickname {
  font-size: 10.5px;
  color: rgba(255, 255, 255, 0.35);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.txn-card-status {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  font-size: 10.5px;
  font-weight: 500;
  flex-shrink: 0;
  margin-left: auto;
}

.txn-status-icon {
  font-size: 10px;
  line-height: 1;
}

.txn-card-status.txn-badge--validated {
  color: #68d391;
}

.txn-card-status.txn-badge--pending {
  color: #f6ad55;
}

.txn-card-status.txn-badge--cancelled {
  color: #fc8181;
}

/* Row 3: date + order */
.txn-card-row3 {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 4px;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.txn-card-date {
  font-size: 10.5px;
  color: rgba(255, 255, 255, 0.35);
}

.txn-card-order {
  font-size: 10px;
  color: rgba(255, 255, 255, 0.3);
  font-family: monospace;
}

/* Details (condensed) */
.txn-card-details {
  margin-top: 4px;
  padding-top: 4px;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  display: flex;
  flex-wrap: wrap;
  gap: 2px 8px;
}

.txn-card-detail {
  font-size: 10.5px;
  color: rgba(255, 255, 255, 0.4);
  line-height: 1.4;
}

.txn-card-detail--pending {
  color: #f6ad55;
  font-weight: 500;
}

/* ===== TRANSACTION FILTERS ===== */

.txn-filters {
  display: flex;
  gap: 4px;
  padding: 8px 12px 4px;
  flex-wrap: wrap;
  flex-shrink: 0;
}

.txn-filter-btn {
  padding: 5px 10px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  background: transparent;
  color: rgba(255, 255, 255, 0.5);
  font-size: 11px;
  font-weight: 500;
  font-family: inherit;
  cursor: pointer;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
  white-space: nowrap;
}

.txn-filter-btn:hover {
  background: rgba(255, 255, 255, 0.06);
  color: rgba(255, 255, 255, 0.75);
  border-color: rgba(255, 255, 255, 0.12);
}

.txn-filter-btn.active {
  background: rgba(139, 92, 246, 0.2);
  color: #c4b5fd;
  border-color: rgba(139, 92, 246, 0.35);
  font-weight: 600;
}

.txn-filter-apply {
  margin-left: auto;
  padding: 5px 12px;
  border: 1px solid rgba(139, 92, 246, 0.4);
  border-radius: 8px;
  background: rgba(139, 92, 246, 0.15);
  color: #c4b5fd;
  font-size: 11px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
  white-space: nowrap;
}

.txn-filter-apply:hover {
  background: rgba(139, 92, 246, 0.3);
  border-color: rgba(139, 92, 246, 0.6);
}

/* ===== TRANSACTION SEARCH ===== */

.txn-search {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px 8px;
  position: relative;
  flex-shrink: 0;
}

.txn-search-icon {
  position: absolute;
  left: 22px;
  color: rgba(255, 255, 255, 0.3);
  pointer-events: none;
}

.txn-search-input {
  flex: 1;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  padding: 7px 30px 7px 32px;
  color: #e2e8f0;
  font-size: 12px;
  font-family: inherit;
  outline: none;
  transition: border-color 0.15s, background 0.15s;
}

.txn-search-input::placeholder {
  color: rgba(255, 255, 255, 0.3);
}

.txn-search-input:focus {
  border-color: rgba(139, 92, 246, 0.4);
  background: rgba(255, 255, 255, 0.07);
}

.txn-search-clear {
  position: absolute;
  right: 20px;
  background: none;
  border: none;
  color: rgba(255, 255, 255, 0.4);
  cursor: pointer;
  font-size: 16px;
  line-height: 1;
  padding: 2px 6px;
  border-radius: 4px;
  transition: color 0.15s;
}

.txn-search-clear:hover {
  color: rgba(255, 255, 255, 0.7);
}

.txn-search-clear.hidden {
  display: none;
}

/* ===== RESPONSIVE: COMPACT MODE (< 340px) ===== */

/* Header: smaller title, tighter padding */
.conv-panel--compact .conv-panel-header {
  padding: 10px 10px;
  gap: 6px;
}

.conv-panel--compact .conv-panel-title {
  font-size: 15px;
}

.conv-panel--compact .conv-mode-chevron {
  width: 10px;
  height: 10px;
}

/* Header buttons: smaller, tighter */
.conv-panel--compact .conv-panel-header-actions {
  gap: 2px;
}

.conv-panel--compact .conv-panel-btn {
  min-width: 26px;
  height: 26px;
  padding: 0 5px;
  border-radius: 5px;
}

.conv-panel--compact .conv-panel-btn span {
  display: none;
}

.conv-panel--compact .conv-panel-btn svg {
  width: 12px;
  height: 12px;
}

/* Search bar: tighter */
.conv-panel--compact .conv-panel-search {
  padding: 6px 8px;
}

.conv-panel--compact .conv-search-input {
  font-size: 12px;
}

/* Filters: smaller pills */
.conv-panel--compact .conv-panel-filters {
  padding: 6px 8px;
  gap: 3px;
}

.conv-panel--compact .conv-filter-btn {
  padding: 5px 6px;
  font-size: 11px;
}

.conv-panel--compact .conv-filter-count {
  display: none;
}

/* Conversation items: tighter, smaller fonts */
.conv-panel--compact .conv-item {
  padding: 10px 10px;
  gap: 8px;
}

.conv-panel--compact .conv-item-left {
  gap: 8px;
}

.conv-panel--compact .conv-item-avatar-wrap {
  width: 34px;
  height: 34px;
}

.conv-panel--compact .conv-item-avatar {
  width: 34px;
  height: 34px;
}

.conv-panel--compact .conv-item-avatar--initial {
  font-size: 13px;
}

.conv-panel--compact .conv-item-pseudo {
  font-size: 11px;
}

.conv-panel--compact .conv-item-name {
  font-size: 13px;
}

.conv-panel--compact .conv-item-preview {
  font-size: 12.5px;
}

.conv-panel--compact .conv-item-time {
  font-size: 11px;
}

.conv-panel--compact .conv-item-urgent {
  font-size: 10px;
}

/* Conversation action buttons: smaller */
.conv-panel--compact .conv-item-newtab,
.conv-panel--compact .conv-item-fav {
  width: 24px;
  height: 24px;
}

.conv-panel--compact .conv-item-pin {
  width: 20px;
  height: 20px;
}

/* Transaction filters: smaller */
.conv-panel--compact .txn-filters {
  padding: 6px 8px 3px;
  gap: 3px;
}

.conv-panel--compact .txn-filter-btn {
  padding: 4px 7px;
  font-size: 10px;
}

.conv-panel--compact .txn-filter-apply {
  padding: 4px 8px;
  font-size: 10px;
}

/* Transaction search: tighter */
.conv-panel--compact .txn-search {
  padding: 4px 8px 6px;
}

.conv-panel--compact .txn-search-input {
  font-size: 11px;
  padding: 6px 28px 6px 28px;
}

.conv-panel--compact .txn-search-icon {
  left: 18px;
  width: 12px;
  height: 12px;
}

/* Transaction cards: tighter */
.conv-panel--compact .txn-card {
  padding: 10px 10px;
  margin-bottom: 6px;
}

.conv-panel--compact .txn-card-type {
  font-size: 11.5px;
}

.conv-panel--compact .txn-card-amount {
  font-size: 12px;
  padding: 1px 6px;
}

.conv-panel--compact .txn-card-nickname {
  font-size: 10px;
}

.conv-panel--compact .txn-card-pseudo {
  font-size: 11px;
}

.conv-panel--compact .txn-card-date {
  font-size: 10px;
}

.conv-panel--compact .txn-card-order {
  font-size: 9px;
}

.conv-panel--compact .txn-card-detail {
  font-size: 10px;
}

/* Favorites/Promo: tighter padding */
.conv-panel--compact .conv-fav-header,
.conv-panel--compact .conv-promo-header {
  padding: 6px 10px;
}

.conv-panel--compact .conv-promo-form {
  padding: 10px;
  gap: 10px;
}

/* Mode dropdown: smaller */
.conv-panel--compact .conv-mode-dropdown {
  min-width: 150px;
}

.conv-panel--compact .conv-mode-item {
  padding: 7px 10px;
  font-size: 12px;
  gap: 8px;
}

/* ── Compact: Réglages tabs (scroll horizontally) ── */
.conv-panel--compact .conv-reglages-tabs {
  overflow-x: auto;
  overflow-y: hidden;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}
.conv-panel--compact .conv-reglages-tabs::-webkit-scrollbar { display: none; }
.conv-panel--compact .conv-reglages-tab {
  flex: 0 0 auto;
  padding: 8px 9px;
  font-size: 10.5px;
  white-space: nowrap;
}

/* ── Compact: Réglages scroll/section/form ── */
.conv-panel--compact .conv-rg-scroll {
  padding: 8px;
}
.conv-panel--compact .conv-rg-section {
  padding-bottom: 10px;
  margin-bottom: 10px;
  gap: 5px;
}
.conv-panel--compact .conv-rg-sh {
  font-size: 9.5px;
  margin-bottom: 3px;
}
.conv-panel--compact .conv-rg-label {
  font-size: 10.5px;
}
.conv-panel--compact .conv-rg-hint {
  font-size: 10.5px;
}
.conv-panel--compact .conv-rg-input,
.conv-panel--compact .conv-rg-select,
.conv-panel--compact .conv-rg-textarea {
  padding: 5px 8px;
  font-size: 11.5px;
}
.conv-panel--compact .conv-rg-btn-secondary {
  padding: 5px 10px;
  font-size: 11px;
}
.conv-panel--compact .conv-rg-example {
  padding: 3px 7px;
  font-size: 10.5px;
}

/* ── Compact: Réglages IA – slider label ── */
.conv-panel--compact .conv-rg-label[for],
.conv-panel--compact label.conv-rg-label {
  font-size: 10.5px;
}

/* ── Compact: Réglages Compte stats grid (2×2) ── */
.conv-panel--compact .conv-rg-stats {
  grid-template-columns: 1fr 1fr;
}
.conv-panel--compact .conv-rg-stat-val {
  font-size: 18px;
}
.conv-panel--compact .conv-rg-stat-lbl {
  font-size: 9px;
}

/* ── Compact: Réglages Compte licence card ── */
.conv-panel--compact .rg-compte-lic-row {
  padding: 7px 10px;
}
.conv-panel--compact .rg-compte-lic-label,
.conv-panel--compact .rg-compte-lic-val {
  font-size: 11px;
}
.conv-panel--compact .rg-compte-lic-status {
  font-size: 10px;
  padding: 2px 7px;
}

/* ── Compact: Réglages Scripts toolbar & buttons ── */
.conv-panel--compact .conv-rg-toolbar {
  padding: 6px 8px;
  gap: 4px;
}
.conv-panel--compact .conv-rg-btn-primary-sm,
.conv-panel--compact .conv-rg-btn-sm,
.conv-panel--compact .conv-rg-btn-danger-sm {
  padding: 4px 7px;
  font-size: 10.5px;
}
.conv-panel--compact .conv-rg-search-wrap {
  padding: 5px 8px;
}
.conv-panel--compact .conv-rg-search-input {
  font-size: 11px;
  padding: 5px 8px;
}
.conv-panel--compact .conv-rg-item {
  padding: 6px 10px;
}
.conv-panel--compact .conv-rg-item-name {
  font-size: 12px;
}
.conv-panel--compact .conv-rg-item-meta {
  font-size: 10px;
}
.conv-panel--compact .conv-rg-item-btn {
  padding: 2px 6px;
  font-size: 10.5px;
}

/* ── Compact: Réglages Scripts editor ── */
.conv-panel--compact .conv-rg-editor-header {
  padding: 6px 8px;
  gap: 5px;
}
.conv-panel--compact .conv-rg-back-btn {
  padding: 3px 6px;
  font-size: 12px;
}
.conv-panel--compact .conv-rg-editor-name {
  padding: 4px 6px;
  font-size: 11px;
}
.conv-panel--compact .rg-msg-item {
  margin-bottom: 6px;
}
.conv-panel--compact .rg-msg-header {
  padding: 6px 8px;
  gap: 5px;
}
.conv-panel--compact .rg-msg-num {
  width: 18px;
  height: 18px;
  font-size: 9.5px;
}
.conv-panel--compact .rg-msg-label {
  font-size: 11px;
}
.conv-panel--compact .rg-msg-name-input {
  font-size: 11px;
  padding: 3px 6px;
}
.conv-panel--compact .rg-add-var-btn {
  padding: 2px 6px;
  font-size: 10px;
}
.conv-panel--compact .rg-del-msg-btn {
  width: 22px;
  height: 22px;
}
.conv-panel--compact .rg-variant {
  padding: 5px 8px 4px 12px;
}
.conv-panel--compact .rg-variant-ta {
  min-height: 54px !important;
  height: 54px !important;
  font-size: 11.5px !important;
  padding: 5px 7px !important;
}
.conv-panel--compact .rg-char-counter {
  font-size: 9.5px;
}
.conv-panel--compact .rg-media-hdr {
  padding: 4px 8px;
}
.conv-panel--compact .rg-media-lbl {
  font-size: 10.5px;
}
.conv-panel--compact .rg-add-message-bar {
  padding: 6px 8px;
}

/* ── Compact: Réglages Upload zone ── */
.conv-panel--compact .rg-upload-zone {
  padding: 16px 10px;
  gap: 8px;
}
.conv-panel--compact .rg-upload-zone-txt {
  font-size: 11px;
}

/* ── Compact: Réglages Personnalisation icon rows ── */
.conv-panel--compact .rg-icon-row {
  padding: 6px 8px;
  gap: 6px;
}
.conv-panel--compact .rg-icon-lbl {
  font-size: 11px;
}

/* ── Compact: Réglages support cards ── */
.conv-panel--compact .conv-rg-support-card {
  padding: 8px 10px;
}

/* ── Compact: Home panel ── */
.conv-panel--compact .conv-home-inner {
  padding: 10px 8px 16px;
  gap: 10px;
}
.conv-panel--compact .conv-home-cards {
  grid-template-columns: 1fr;
}
.conv-panel--compact .conv-home-section-title {
  font-size: 10.5px;
}
.conv-panel--compact .conv-home-news-item {
  padding: 8px 10px;
  gap: 8px;
}
.conv-panel--compact .conv-home-news-title {
  font-size: 11px;
}
.conv-panel--compact .conv-home-news-text {
  font-size: 10.5px;
}
.conv-panel--compact .conv-home-info-toggle {
  padding: 9px 11px;
  font-size: 11px;
}
.conv-panel--compact .conv-home-sub-toggle {
  padding: 7px 9px;
  font-size: 11px;
}
.conv-panel--compact .conv-home-card {
  padding: 8px 9px;
}
.conv-panel--compact .conv-home-card strong,
.conv-panel--compact .conv-home-card p {
  font-size: 10.5px;
}

/* ── Compact: Nouveau panel ── */
.conv-panel--compact .conv-nouveau-header {
  padding: 8px 12px;
  font-size: 12px;
}
.conv-panel--compact .conv-nouveau-grid {
  padding: 12px 10px;
  gap: 8px;
}
.conv-panel--compact .conv-nouveau-card {
  padding: 12px 12px;
  gap: 10px;
}
.conv-panel--compact .conv-nouveau-card-icon {
  width: 36px;
  height: 36px;
  border-radius: 8px;
}
.conv-panel--compact .conv-nouveau-card-icon svg {
  width: 16px;
  height: 16px;
}
.conv-panel--compact .conv-nouveau-card-label {
  font-size: 13px;
}
.conv-panel--compact .conv-nouveau-card-desc {
  font-size: 10px;
}

/* ── Compact: Broadcast panel ── */
.conv-panel--compact .conv-bc-header {
  padding: 7px 10px;
  font-size: 12px;
}
.conv-panel--compact .conv-bc-title {
  font-size: 12px;
}
.conv-panel--compact .conv-bc-body {
  padding: 8px 10px;
  gap: 10px;
}
.conv-panel--compact .conv-bc-section {
  gap: 6px;
}
.conv-panel--compact .conv-bc-section-title {
  font-size: 10.5px;
}
.conv-panel--compact .conv-bc-textarea {
  font-size: 12px;
  min-height: 70px;
}
.conv-panel--compact .conv-bc-textarea-footer {
  gap: 4px;
}
.conv-panel--compact .conv-bc-pseudo-insert {
  font-size: 10.5px;
  padding: 3px 7px;
}
.conv-panel--compact .conv-bc-char-count {
  font-size: 10px;
}
.conv-panel--compact .conv-bc-media-actions {
  gap: 5px;
  flex-wrap: wrap;
}
.conv-panel--compact .conv-bc-media-btn {
  padding: 5px 9px;
  font-size: 11px;
}
.conv-panel--compact .conv-bc-send-btn {
  padding: 8px 12px;
  font-size: 12px;
}
.conv-panel--compact .conv-bc-status {
  font-size: 11px;
}

/* ── Compact: Push panel ── */
.conv-panel--compact .conv-push-header {
  padding: 7px 10px;
}
.conv-panel--compact .conv-push-body {
  padding: 8px 10px;
  gap: 10px;
}
.conv-panel--compact .conv-push-section-title {
  font-size: 10.5px;
}
.conv-panel--compact .conv-push-textarea {
  font-size: 12px;
  min-height: 70px;
}
.conv-panel--compact .conv-push-btn-primary,
.conv-panel--compact .conv-push-btn-secondary {
  padding: 7px 10px;
  font-size: 11.5px;
}
.conv-panel--compact .conv-push-send-btn {
  padding: 8px;
  font-size: 12px;
}
.conv-panel--compact .conv-push-status {
  font-size: 11px;
  padding: 6px 8px;
}

/* ── Compact: Post / Story panels ── */
.conv-panel--compact .conv-post-header,
.conv-panel--compact .conv-story-header {
  padding: 7px 10px;
}
.conv-panel--compact .conv-post-body,
.conv-panel--compact .conv-story-body {
  padding: 8px 10px;
  gap: 10px;
}

/* ── Compact: Promo / Vouchers ── */
.conv-panel--compact .conv-promo-vouchers-section {
  padding: 0 10px 12px;
}
.conv-panel--compact .promo-voucher-code {
  font-size: 12px;
}
.conv-panel--compact .promo-voucher-search-input {
  font-size: 12px;
  padding: 8px 10px;
}
.conv-panel--compact .promo-voucher-filter-btn {
  padding: 3px 7px;
  font-size: 10px;
}
.conv-panel--compact .promo-voucher-card {
  padding: 8px;
}
.conv-panel--compact .promo-voucher-discount {
  font-size: 11px;
}

/* ── Compact: Note cards in Réglages list ── */
.conv-panel--compact .conv-note-nick {
  font-size: 12px;
}
.conv-panel--compact .conv-note-pseudo {
  font-size: 10px;
}
.conv-panel--compact .conv-note-text {
  font-size: 11px;
}
.conv-panel--compact .conv-note-stat {
  font-size: 9px;
  padding: 1px 5px;
}
.conv-panel--compact .conv-note-chat-btn {
  width: 24px;
  height: 24px;
}

/* ── Compact: Favoris header & group menu ── */
.conv-panel--compact .conv-fav-title {
  font-size: 12px;
}
.conv-panel--compact .conv-fav-group-menu {
  font-size: 11px;
}

/* ===== NOTE MODAL ===== */

.conv-note-overlay {
  position: fixed;
  inset: 0;
  z-index: 9999999;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(2px);
}

.conv-note-box {
  background: #1e1e2e;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 14px;
  width: 620px;
  max-width: 94vw;
  display: flex;
  flex-direction: column;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.5);
  overflow: hidden;
}

.conv-note-box .mym-note-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  background: rgba(255, 255, 255, 0.08);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.conv-note-box .mym-note-panel-title {
  font-size: 12px;
  font-weight: 700;
  color: #fff;
}

.conv-note-box .mym-note-panel-close {
  background: rgba(255, 255, 255, 0.12);
  border: none;
  color: rgba(255, 255, 255, 0.7);
  width: 22px;
  height: 22px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s;
}

.conv-note-box .mym-note-panel-close:hover {
  background: rgba(255, 255, 255, 0.25);
  color: #fff;
}

.conv-note-box .mym-note-textarea {
  width: 100%;
  min-height: 180px;
  max-height: 320px;
  padding: 10px 14px;
  background: rgba(255, 255, 255, 0.04);
  border: none;
  color: #fff;
  font-size: 13px;
  font-family: inherit;
  line-height: 1.5;
  resize: vertical;
  outline: none;
}

.conv-note-box .mym-note-textarea::placeholder {
  color: rgba(255, 255, 255, 0.4);
}

.conv-note-box .mym-note-panel-footer {
  padding: 6px 14px;
  min-height: 26px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.conv-note-box .mym-note-status {
  font-size: 11px;
  color: #bbf7d0;
  font-weight: 500;
}

/* stats block from chat note panel */
.conv-note-box .mym-note-stats-zone {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  max-height: 360px;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: rgba(255,255,255,0.3) transparent;
}

.conv-note-box .mym-note-stats-zone::-webkit-scrollbar {
  width: 4px;
}

.conv-note-box .mym-note-stats-zone::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.3);
  border-radius: 2px;
}

.conv-note-box .mym-stats-loading,
.conv-note-box .mym-stats-empty {
  padding: 14px;
  color: rgba(255, 255, 255, 0.7);
  font-size: 12px;
}

.conv-note-box .mym-stats-loading {
  display: flex;
  align-items: center;
  gap: 8px;
}

.conv-note-box .mym-stats-spinner {
  width: 12px;
  height: 12px;
  border: 2px solid rgba(255, 255, 255, 0.25);
  border-top-color: #8b5cf6;
  border-radius: 50%;
  animation: conv-note-spin 1s linear infinite;
}

@keyframes conv-note-spin {
  to { transform: rotate(360deg); }
}

.conv-note-box .mym-stats-header {
  font-size: 11px;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.7);
  padding: 8px 14px 4px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  user-select: none;
}
.conv-note-box .mym-stats-header:hover { color: rgba(255, 255, 255, 0.9); }

.conv-note-box .mym-stats-chevron {
  transition: transform 0.25s ease;
  transform: rotate(-90deg);
  flex-shrink: 0;
}
.conv-note-box .mym-stats-chevron.open {
  transform: rotate(0deg);
}

.conv-note-box .mym-stats-refresh-spinner {
  width: 12px;
  height: 12px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-top-color: rgba(255, 255, 255, 0.8);
  border-radius: 50%;
  animation: conv-note-refresh-spin 0.8s linear infinite;
}

@keyframes conv-note-refresh-spin {
  to { transform: rotate(360deg); }
}

.conv-note-box .mym-stats-body {
  overflow: hidden;
  max-height: 600px;
  transition: max-height 0.3s ease, opacity 0.25s ease;
  opacity: 1;
}
.conv-note-box .mym-stats-body.collapsed {
  max-height: 0;
  opacity: 0;
}

.conv-note-box .mym-stats-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  padding: 6px 14px;
}

.conv-note-box .mym-stats-item {
  background: rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  padding: 8px 10px;
  text-align: center;
}

.conv-note-box .mym-stats-value {
  font-size: 14px;
  font-weight: 700;
  color: #fff;
  line-height: 1.2;
}

.conv-note-box .mym-stats-label {
  font-size: 9px;
  color: rgba(255, 255, 255, 0.55);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.3px;
  margin-top: 2px;
}

.conv-note-box .mym-stats-section {
  padding: 6px 14px;
}

.conv-note-box .mym-stats-section-title {
  font-size: 10px;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.55);
  text-transform: uppercase;
  letter-spacing: 0.3px;
  margin-bottom: 4px;
}

.conv-note-box .mym-stats-breakdown-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 3px 0;
  font-size: 11px;
}

.conv-note-box .mym-stats-breakdown-type {
  color: rgba(255, 255, 255, 0.8);
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 55%;
}

.conv-note-box .mym-stats-breakdown-val {
  color: rgba(255, 255, 255, 0.6);
  font-weight: 600;
  font-size: 10px;
  white-space: nowrap;
}

.conv-note-box .mym-stats-recent-row {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 3px 0;
  font-size: 11px;
}

.conv-note-box .mym-stats-recent-date {
  color: rgba(255, 255, 255, 0.5);
  font-size: 10px;
  min-width: 42px;
  flex-shrink: 0;
}

.conv-note-box .mym-stats-recent-type {
  color: rgba(255, 255, 255, 0.75);
  font-weight: 500;
  flex: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.conv-note-box .mym-stats-recent-amount {
  color: rgba(255, 255, 255, 0.6);
  font-weight: 600;
  font-size: 10px;
  white-space: nowrap;
  flex-shrink: 0;
}

.conv-note-box .mym-stats-footer {
  padding: 6px 14px 10px;
  font-size: 10px;
  color: rgba(255, 255, 255, 0.5);
  line-height: 1.4;
}

/* ===== CLOUD MODAL (broadcast panel, push panel, post panel, story panel) ===== */
#conv-bc-cloud-modal-overlay,
#conv-push-cloud-modal-overlay,
#conv-post-cloud-modal-overlay,
#conv-story-cloud-modal-overlay,
#conv-rg-cloud-modal-overlay,
#conv-sched-cloud-modal-overlay {
  position: fixed; inset: 0; z-index: 9999999;
  background: rgba(0,0,0,0.6);
  display: flex; align-items: center; justify-content: center;
}
.conv-bc-cloud-modal {
  width: 90vw; max-width: 480px; height: 85vh;
  background: #1e1e2e; border: 1px solid rgba(255,255,255,0.1);
  border-radius: 16px; overflow: hidden;
  display: flex; flex-direction: column;
  box-shadow: 0 20px 60px rgba(0,0,0,0.6);
}
.conv-bc-cloud-modal--fullscreen {
  width: 96vw; max-width: 96vw; height: 92vh;
}
.conv-bc-cloud-modal-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 10px 16px;
  background: rgba(255,255,255,0.04);
  border-bottom: 1px solid rgba(255,255,255,0.08);
  flex-shrink: 0;
}
.conv-bc-cloud-modal-title {
  display: flex; align-items: center; gap: 8px;
  font-size: 13px; font-weight: 600; color: rgba(255,255,255,0.85);
}
.conv-bc-cloud-modal-title svg { color: #818cf8; }
.conv-bc-cloud-modal-close {
  width: 28px; height: 28px; border: none; border-radius: 8px;
  background: rgba(255,255,255,0.06); color: rgba(255,255,255,0.6);
  font-size: 14px; cursor: pointer; display: flex;
  align-items: center; justify-content: center; transition: all 0.15s;
}
.conv-bc-cloud-modal-close:hover { background: rgba(255,100,100,0.2); color: #ff6b6b; }
#conv-bc-cloud-modal-iframe,
#conv-push-cloud-modal-iframe,
#conv-post-cloud-modal-iframe,
#conv-story-cloud-modal-iframe,
#conv-rg-cloud-modal-iframe,
#conv-sched-cloud-modal-iframe {
  flex: 1; width: 100%; border: none; background: #fff;
}
/* ===== STORY AUDIENCE TOGGLE BUTTONS ===== */
.conv-story-audience-list {
  display: flex;
  flex-direction: column;
  gap: 7px;
}
.conv-story-audience-btn {
  width: 100%;
  padding: 10px 14px;
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 8px;
  color: rgba(255,255,255,0.7);
  font-size: 13px;
  font-weight: 500;
  text-align: left;
  cursor: pointer;
  transition: all 0.15s;
  display: flex;
  align-items: center;
  gap: 10px;
  position: relative;
}
.conv-story-audience-btn::before {
  content: '';
  width: 16px;
  height: 16px;
  border-radius: 4px;
  border: 1.5px solid rgba(255,255,255,0.25);
  flex-shrink: 0;
  transition: all 0.15s;
  background: transparent;
}
.conv-story-audience-btn:hover {
  background: rgba(255,255,255,0.05);
  border-color: rgba(129,140,248,0.3);
  color: rgba(255,255,255,0.9);
}
.conv-story-audience-btn.active {
  background: rgba(129,140,248,0.12);
  border-color: rgba(129,140,248,0.5);
  color: #c4b5fd;
}
.conv-story-audience-btn.active::before {
  background: #818cf8;
  border-color: #818cf8;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='10' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3'%3E%3Cpolyline points='20 6 9 17 4 12'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: center;
  background-size: 10px;
}

.conv-bc-thumb-spinner {
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  background: rgba(0,0,0,0.45); border-radius: 8px;
}
.conv-bc-thumb-spinner::after {
  content: ''; width: 18px; height: 18px; border: 2px solid rgba(255,255,255,0.3);
  border-top-color: #fff; border-radius: 50%;
  animation: conv-bc-spin 0.7s linear infinite;
}
@keyframes conv-bc-spin { to { transform: rotate(360deg); } }

/* ===== HOME PANEL ===== */
.conv-home-panel {
  display: none;
  flex-direction: column;
  position: absolute; top: 48px; left: 0; right: 0; bottom: 0;
  overflow-y: auto;
  background: var(--conv-bg, #12121f);
  z-index: 10;
}
.conv-home-panel.visible { display: flex; }
.conv-home-inner {
  padding: 14px 12px 20px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

/* News section */
.conv-home-section-title {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 12px;
  font-weight: 700;
  color: rgba(255,255,255,0.7);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 10px;
}
.conv-home-section-title svg { color: #818cf8; flex-shrink: 0; }
.conv-home-news-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.conv-home-news-loading,
.conv-home-news-empty {
  font-size: 12px;
  color: rgba(255,255,255,0.4);
  padding: 8px 0;
  text-align: center;
}
.conv-home-news-item {
  display: flex;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid rgba(255,255,255,0.07);
  background: rgba(255,255,255,0.03);
}
.conv-home-news-item.type-warning { border-color: rgba(245,158,11,0.25); background: rgba(245,158,11,0.06); }
.conv-home-news-item.type-update  { border-color: rgba(129,140,248,0.25); background: rgba(129,140,248,0.06); }
.conv-home-news-item.type-feature { border-color: rgba(52,211,153,0.25);  background: rgba(52,211,153,0.06); }
.conv-home-news-item.type-info    { border-color: rgba(99,179,237,0.25);  background: rgba(99,179,237,0.06); }
.conv-home-news-icon { font-size: 16px; flex-shrink: 0; line-height: 1.4; }
.conv-home-news-body { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.conv-home-news-title { font-size: 12px; font-weight: 700; color: rgba(255,255,255,0.9); line-height: 1.3; }
.conv-home-news-text  { font-size: 11px; color: rgba(255,255,255,0.6); line-height: 1.4; }
.conv-home-news-date  { font-size: 10px; color: rgba(255,255,255,0.35); margin-top: 2px; }

/* Info section accordion */
.conv-home-info-section {
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 10px;
  overflow: hidden;
}
.conv-home-info-toggle {
  width: 100%; display: flex; align-items: center; justify-content: space-between;
  padding: 11px 13px;
  background: rgba(255,255,255,0.04);
  border: none; cursor: pointer;
  color: rgba(255,255,255,0.8);
  transition: background 0.15s;
}
.conv-home-info-toggle:hover { background: rgba(255,255,255,0.07); }
.conv-home-info-toggle-left { display: flex; align-items: center; gap: 8px; font-size: 12px; font-weight: 600; }
.conv-home-info-toggle-left svg { color: #818cf8; flex-shrink: 0; }
.conv-home-info-chevron { color: rgba(255,255,255,0.4); transition: transform 0.2s; flex-shrink: 0; }
.conv-home-info-section.open .conv-home-info-chevron { transform: rotate(180deg); }
.conv-home-info-body { display: none; padding: 8px; border-top: 1px solid rgba(255,255,255,0.06); }
.conv-home-info-section.open .conv-home-info-body { display: flex; flex-direction: column; gap: 6px; }

/* Sub-accordions */
.conv-home-sub-acc {
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 8px;
  overflow: hidden;
}
.conv-home-sub-toggle {
  width: 100%; display: flex; align-items: center; justify-content: space-between;
  padding: 9px 11px;
  background: rgba(255,255,255,0.02);
  border: none; cursor: pointer;
  color: rgba(255,255,255,0.7);
  font-size: 12px; font-weight: 600;
  transition: background 0.15s;
}
.conv-home-sub-toggle:hover { background: rgba(255,255,255,0.05); }
.conv-home-sub-toggle span { display: flex; align-items: center; gap: 6px; }
.conv-home-sub-chevron { color: rgba(255,255,255,0.35); transition: transform 0.2s; flex-shrink: 0; }
.conv-home-sub-body { display: none; padding: 10px 10px 12px; border-top: 1px solid rgba(255,255,255,0.05); }
.conv-home-sub-acc.open .conv-home-sub-chevron { transform: rotate(180deg); }
.conv-home-sub-acc.open .conv-home-sub-body { display: block; }

/* Cards grid */
.conv-home-cards {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 7px;
}
.conv-home-card {
  padding: 9px 10px;
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.07);
  border-radius: 8px;
}
.conv-home-card strong {
  display: block;
  font-size: 11px;
  font-weight: 700;
  color: rgba(255,255,255,0.85);
  margin-bottom: 4px;
}
.conv-home-card p {
  font-size: 11px;
  color: rgba(255,255,255,0.55);
  line-height: 1.45;
  margin: 0;
}

/* Lists */
.conv-home-ol, .conv-home-ul {
  padding-left: 18px;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 5px;
}
.conv-home-ol li, .conv-home-ul li {
  font-size: 11.5px;
  color: rgba(255,255,255,0.65);
  line-height: 1.45;
}
.conv-home-ol li strong, .conv-home-ul li strong { color: rgba(255,255,255,0.85); }
.conv-home-ol li a, .conv-home-ul li a { color: #818cf8; }

/* ===== BROADCAST CONFIRM MODAL ===== */
#conv-bc-confirm-overlay {
  position: fixed; inset: 0; z-index: 99999999;
  background: rgba(0,0,0,0.65);
  display: flex; align-items: center; justify-content: center;
}
.conv-bc-confirm-box {
  background: #13141f;
  border: 1px solid rgba(139,92,246,0.25);
  border-radius: 16px;
  padding: 28px 28px 22px;
  width: 340px; max-width: 90vw;
  box-shadow: 0 24px 60px rgba(0,0,0,0.7);
  display: flex; flex-direction: column; gap: 14px;
}
.conv-bc-confirm-header {
  display: flex; align-items: center; gap: 10px;
  font-size: 15px; font-weight: 700; color: #e2e8f0;
}
.conv-bc-confirm-header svg { flex-shrink: 0; color: #8b5cf6; }
.conv-bc-confirm-body {
  font-size: 13px; color: rgba(255,255,255,0.7);
  line-height: 1.6; display: flex; flex-direction: column; gap: 4px;
}
.conv-bc-confirm-body strong { color: #e2e8f0; }
.conv-bc-confirm-warning {
  display: flex; align-items: center; gap: 6px;
  font-size: 12px; color: #f59e0b;
  background: rgba(245,158,11,0.1);
  border-radius: 8px; padding: 8px 12px; margin-top: 4px;
}
.conv-bc-confirm-actions {
  display: flex; gap: 10px; justify-content: flex-end; margin-top: 4px;
}
.conv-bc-confirm-cancel {
  padding: 9px 18px; border-radius: 10px; border: 1px solid rgba(255,255,255,0.12);
  background: rgba(255,255,255,0.06); color: rgba(255,255,255,0.7);
  font-size: 13px; font-weight: 600; cursor: pointer; transition: all 0.15s;
}
.conv-bc-confirm-cancel:hover { background: rgba(255,255,255,0.1); color: #fff; }
.conv-bc-confirm-ok {
  padding: 9px 22px; border-radius: 10px; border: none;
  background: linear-gradient(135deg,#7c3aed,#8b5cf6);
  color: #fff; font-size: 13px; font-weight: 700; cursor: pointer;
  transition: all 0.15s; box-shadow: 0 4px 14px rgba(139,92,246,0.4);
}
.conv-bc-confirm-ok:hover { background: linear-gradient(135deg,#6d28d9,#7c3aed); transform: translateY(-1px); }

/* ===== BROADCAST PANEL ===== */
:root { --conv-bc-w: 400px; }

.conv-broadcast-panel {
  position: fixed;
  top: 0;
  left: var(--conv-panel-w);
  width: var(--conv-bc-w);
  height: 100vh;
  background: #0d0e1f;
  border-right: 1px solid rgba(139,92,246,0.15);
  display: flex;
  flex-direction: column;
  visibility: hidden;
  opacity: 0;
  transform: translateX(12px);
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease, visibility 0s linear 0.2s;
  z-index: 999990;
  overflow: hidden;
  box-shadow: 4px 0 24px rgba(0,0,0,0.5);
}
.conv-broadcast-panel.bc-open {
  visibility: visible;
  opacity: 1;
  transform: translateX(0);
  pointer-events: auto;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.conv-bc-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 10px 14px; border-bottom: 1px solid rgba(255,255,255,0.07);
  flex-shrink: 0; gap: 8px;
}
.conv-bc-title { font-size: 13px; font-weight: 600; color: #e2e8f0; }
.conv-bc-close-btn {
  background: none; border: none; color: #94a3b8; font-size: 18px;
  cursor: pointer; padding: 2px 6px; border-radius: 4px; line-height: 1; flex-shrink: 0;
}
.conv-bc-close-btn:hover { color: #fff; background: rgba(255,255,255,0.1); }

.conv-bc-body {
  flex: 1; overflow-y: auto; padding: 12px 14px;
  display: flex; flex-direction: column; gap: 14px;
}
.conv-bc-section { display: flex; flex-direction: column; gap: 7px; }
.conv-bc-section-title {
  font-size: 10px; font-weight: 700; color: #64748b;
  text-transform: uppercase; letter-spacing: 0.06em;
}
.conv-bc-textarea {
  width: 100%; min-height: 80px; max-height: 160px;
  background: rgba(255,255,255,0.05); border: 1px solid rgba(139,92,246,0.25);
  border-radius: 8px; color: #e2e8f0; font-size: 13px; padding: 10px;
  resize: vertical; font-family: inherit; box-sizing: border-box; outline: none;
}
.conv-bc-textarea:focus { border-color: rgba(139,92,246,0.55); }
.conv-bc-textarea-footer { display: flex; justify-content: space-between; align-items: center; margin-top: 4px; }
.conv-bc-char-count { font-size: 11px; color: #475569; }
.conv-bc-pseudo-insert {
  font-size: 11px; color: #8b5cf6; background: none; border: 1px solid rgba(139,92,246,0.35);
  border-radius: 4px; padding: 2px 7px; cursor: pointer; font-family: inherit;
  transition: background 0.15s, color 0.15s;
}
.conv-bc-pseudo-insert:hover { background: rgba(139,92,246,0.15); color: #a78bfa; }

.conv-bc-media-actions { display: flex; gap: 6px; }
.conv-bc-media-btn {
  flex: 1; padding: 7px 8px; font-size: 11px;
  border: 1px solid rgba(255,255,255,0.12); border-radius: 6px;
  background: rgba(255,255,255,0.05); color: #94a3b8; cursor: pointer;
  text-align: center; transition: all 0.15s;
}
.conv-bc-media-btn:hover { background: rgba(139,92,246,0.15); border-color: rgba(139,92,246,0.4); color: #a78bfa; }

.conv-bc-media-preview { display: flex; flex-wrap: wrap; gap: 6px; }
.conv-bc-media-thumb {
  position: relative; width: 60px; height: 60px; border-radius: 6px;
  overflow: hidden; background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.1);
  display: flex; align-items: center; justify-content: center; color: #64748b; font-size: 18px;
}
.conv-bc-media-thumb img { width: 100%; height: 100%; object-fit: cover; }
.conv-bc-media-thumb-remove {
  position: absolute; top: 2px; right: 2px; width: 16px; height: 16px;
  border-radius: 50%; background: rgba(0,0,0,0.75); border: none; color: #fff;
  font-size: 10px; cursor: pointer; display: flex; align-items: center; justify-content: center;
}
.conv-bc-price-row { display: flex; align-items: center; gap: 8px; }
.conv-bc-price-label { font-size: 12px; color: #94a3b8; flex-shrink: 0; }
.conv-bc-price-input {
  width: 70px; background: rgba(255,255,255,0.05); border: 1px solid rgba(255,255,255,0.12);
  border-radius: 6px; color: #e2e8f0; font-size: 13px; padding: 5px 8px; outline: none;
  -moz-appearance: textfield; appearance: textfield;
}
.conv-bc-price-input::-webkit-outer-spin-button,
.conv-bc-price-input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.conv-bc-price-hint { font-size: 10px; color: #475569; }

.conv-bc-select-all-row {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
}
.conv-bc-sel-btn {
  font-size: 11px; color: #8b5cf6; cursor: pointer; background: none; border: none; padding: 0;
}
.conv-bc-sel-btn:hover { text-decoration: underline; }

.conv-bc-audience-list {
  display: flex; flex-direction: column; gap: 2px;
  max-height: 220px; overflow-y: auto;
}
.conv-bc-member {
  display: flex; align-items: center; gap: 8px; padding: 5px 6px;
  border-radius: 6px; cursor: pointer; transition: background 0.1s;
  user-select: none; -webkit-user-select: none;
}
.conv-bc-member:hover { background: rgba(255,255,255,0.05); }
.conv-bc-member input[type="checkbox"] { flex-shrink: 0; accent-color: #8b5cf6; width: 13px; height: 13px; }
.conv-bc-member-avatar {
  width: 26px; height: 26px; border-radius: 50%; flex-shrink: 0;
  background: linear-gradient(135deg,#8b5cf6,#7c3aed);
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-size: 10px; font-weight: 700; overflow: hidden;
}
.conv-bc-member-avatar img { width: 100%; height: 100%; object-fit: cover; }
.conv-bc-member-name { font-size: 12px; color: #cbd5e1; flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.conv-bc-member.deselected .conv-bc-member-name { color: #475569; }

.conv-bc-footer { padding: 10px 14px; border-top: 1px solid rgba(255,255,255,0.07); flex-shrink: 0; }
.conv-bc-send-btn {
  width: 100%; padding: 10px; background: linear-gradient(135deg,#8b5cf6,#7c3aed);
  color: #fff; border: none; border-radius: 8px; font-size: 13px; font-weight: 600;
  cursor: pointer; transition: opacity 0.15s;
}
.conv-bc-send-btn:hover { opacity: 0.9; }
.conv-bc-send-btn:disabled { opacity: 0.4; cursor: not-allowed; }

.conv-bc-progress-overlay {
  position: absolute; inset: 0; background: #0d0e1f;
  display: flex; flex-direction: column; padding: 16px; gap: 10px; z-index: 10;
}
.conv-bc-progress-overlay.hidden { display: none; }
.conv-bc-progress-title { font-size: 13px; font-weight: 600; color: #e2e8f0; }
.conv-bc-progress-bar-wrap { height: 6px; background: rgba(255,255,255,0.08); border-radius: 3px; overflow: hidden; }
.conv-bc-progress-bar { height: 100%; background: linear-gradient(90deg,#8b5cf6,#a78bfa); border-radius: 3px; transition: width 0.3s; width: 0%; }
.conv-bc-progress-list { flex: 1; overflow-y: auto; display: flex; flex-direction: column; gap: 3px; }
.conv-bc-progress-item { display: flex; align-items: center; gap: 8px; font-size: 12px; color: #94a3b8; padding: 3px 0; }
.conv-bc-progress-item .bc-status { width: 16px; text-align: center; flex-shrink: 0; }
.conv-bc-progress-item.bc-done { color: #4ade80; }
.conv-bc-progress-item.bc-error { color: #f87171; }
.conv-bc-progress-item.bc-sending { color: #a78bfa; }
.conv-bc-progress-close {
  padding: 8px; background: rgba(255,255,255,0.07); border: 1px solid rgba(255,255,255,0.12);
  border-radius: 6px; color: #94a3b8; font-size: 13px; cursor: pointer; width: 100%; transition: all 0.15s;
}
.conv-bc-progress-close:hover { background: rgba(255,255,255,0.12); color: #fff; }

/* ===== PUSH PANEL ===== */
.conv-push-panel {
  display: none;
  flex-direction: column;
  flex: 1;
  min-height: 0;
  overflow-x: hidden;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: rgba(139,92,246,0.3) transparent;
}
.conv-push-panel.visible { display: flex; }

.conv-push-header {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  border-bottom: 1px solid rgba(139,92,246,0.15);
  flex-shrink: 0;
  color: #a78bfa;
}
.conv-push-title {
  font-size: 13px;
  font-weight: 600;
  color: #e2e8f0;
}

.conv-push-body {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 12px 14px;
}

.conv-push-row-2col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  width: 100%;
  box-sizing: border-box;
}

.conv-push-field {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}

.conv-push-label {
  font-size: 11px;
  font-weight: 600;
  color: #94a3b8;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}
.conv-push-label small { font-size: 10px; text-transform: none; color: #64748b; }

.conv-push-pills {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.conv-push-pill {
  display: block;
  width: 100%;
  padding: 5px 10px;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 6px;
  color: #94a3b8;
  font-size: 12px;
  font-weight: 500;
  text-align: left;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
  white-space: nowrap;
}
.conv-push-pill:hover {
  background: rgba(139,92,246,0.12);
  border-color: rgba(139,92,246,0.3);
  color: #e2e8f0;
}
.conv-push-pill.active {
  background: rgba(139,92,246,0.25);
  border-color: rgba(139,92,246,0.6);
  color: #e2e8f0;
  font-weight: 600;
}

.conv-push-input {
  width: 100%;
  box-sizing: border-box;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 6px;
  color: #e2e8f0;
  font-size: 12px;
  padding: 5px 8px;
  outline: none;
  transition: border-color 0.15s;
}
.conv-push-input:focus { border-color: rgba(139,92,246,0.5); }

.conv-push-select {
  width: 100%;
  box-sizing: border-box;
  background: #1a1b2e;
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 6px;
  color: #e2e8f0;
  font-size: 12px;
  padding: 5px 8px;
  outline: none;
  cursor: pointer;
}
.conv-push-select--compact {
  width: auto;
  min-width: 80px;
}

.conv-push-msg-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.conv-push-char-counter {
  font-size: 11px;
  color: #64748b;
}

.conv-push-textarea {
  width: 100%;
  box-sizing: border-box;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 6px;
  color: #e2e8f0;
  font-size: 12px;
  padding: 7px 9px;
  resize: vertical;
  outline: none;
  font-family: inherit;
  line-height: 1.5;
  transition: border-color 0.15s;
}
.conv-push-textarea:focus { border-color: rgba(139,92,246,0.5); }

.conv-push-hint {
  font-size: 10px;
  color: #64748b;
}

.conv-push-media-list {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  gap: 6px;
  min-height: 20px;
}
.conv-push-media-item {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.conv-push-media-thumb {
  width: 40px;
  height: 40px;
  object-fit: cover;
  border-radius: 4px;
  flex-shrink: 0;
  display: block;
}
.conv-push-media-thumb-placeholder {
  width: 40px;
  height: 40px;
  border-radius: 4px;
  flex-shrink: 0;
  background: rgba(255,255,255,0.06);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #64748b;
}
.conv-push-media-uuid {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: #94a3b8;
  font-family: monospace;
}
.conv-push-media-remove,
.conv-push-teaser-remove {
  position: absolute;
  top: -4px;
  right: -4px;
  width: 18px;
  height: 18px;
  background: rgba(248,113,113,0.95);
  border: 1px solid rgba(255,255,255,0.2);
  border-radius: 50%;
  color: white;
  cursor: pointer;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  opacity: 0.9;
  transition: opacity 0.15s, transform 0.15s;
}
.conv-push-media-remove:hover,
.conv-push-teaser-remove:hover {
  opacity: 1;
  transform: scale(1.1);
}

.conv-push-btn-secondary {
  margin-top: 3px;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 6px;
  color: #cbd5e1;
  font-size: 11px;
  padding: 5px 8px;
  cursor: pointer;
  transition: background 0.15s;
  text-align: left;
  width: fit-content;
}
.conv-push-btn-secondary:hover { background: rgba(255,255,255,0.1); }

.conv-push-status {
  padding: 7px 10px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 500;
}
.conv-push-status.info { background: rgba(59,130,246,0.15); color: #93c5fd; border: 1px solid rgba(59,130,246,0.2); }
.conv-push-status.success { background: rgba(16,185,129,0.15); color: #6ee7b7; border: 1px solid rgba(16,185,129,0.2); }
.conv-push-status.error { background: rgba(239,68,68,0.15); color: #fca5a5; border: 1px solid rgba(239,68,68,0.2); }

.conv-push-send-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  width: 100%;
  padding: 10px;
  background: linear-gradient(135deg, #8b5cf6, #7c3aed);
  color: #fff;
  border: none;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: opacity 0.15s;
  margin-top: 4px;
}
.conv-push-send-btn:hover { opacity: 0.9; }
.conv-push-send-btn:disabled { opacity: 0.4; cursor: not-allowed; }

.conv-panel-btn.push-active {
  background: rgba(59,130,246,0.2);
  color: #60a5fa;
}

/* ===== NOUVEAU PANEL ===== */
.conv-nouveau-panel {
  display: none;
  flex-direction: column;
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: rgba(139,92,246,0.3) transparent;
}
.conv-nouveau-panel.visible { display: flex; }

.conv-nouveau-header {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  border-bottom: 1px solid rgba(139,92,246,0.15);
  flex-shrink: 0;
  color: #a78bfa;
  font-size: 13px;
  font-weight: 600;
}
.conv-nouveau-header span {
  color: #e2e8f0;
}

.conv-nouveau-grid {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 16px 14px;
}

.conv-nouveau-card {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px 18px;
  background: rgba(139,92,246,0.07);
  border: 1px solid rgba(139,92,246,0.18);
  border-radius: 12px;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s, transform 0.1s;
  text-align: left;
  width: 100%;
}
.conv-nouveau-card:hover {
  background: rgba(139,92,246,0.15);
  border-color: rgba(139,92,246,0.4);
  transform: translateX(2px);
}
.conv-nouveau-card:active { transform: translateX(0); }

.conv-nouveau-card-icon {
  width: 46px;
  height: 46px;
  border-radius: 10px;
  background: rgba(139,92,246,0.18);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: #a78bfa;
}

.conv-nouveau-card-label {
  font-size: 14px;
  font-weight: 600;
  color: #e2e8f0;
  line-height: 1.2;
}

.conv-nouveau-card-desc {
  font-size: 11px;
  color: rgba(255,255,255,0.45);
  margin-top: 2px;
}

/* ===== RÉGLAGES PANEL ===== */
.conv-reglages-panel {
  display: none;
  flex-direction: column;
  position: absolute; top: 48px; left: 0; right: 0; bottom: 0;
  background: var(--conv-bg, #12121f);
  z-index: 10;
}
.conv-reglages-panel.visible { display: flex; }

.conv-reglages-tabs {
  display: flex;
  gap: 0;
  padding: 0;
  border-bottom: 1px solid rgba(139,92,246,0.15);
  flex-shrink: 0;
  background: rgba(0,0,0,0.15);
}
.conv-reglages-tab {
  flex: 1;
  padding: 9px 4px;
  border: none;
  border-bottom: 2px solid transparent;
  background: none;
  color: rgba(255,255,255,0.4);
  font-size: 11.5px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s;
  margin-bottom: -1px;
  letter-spacing: 0.01em;
}
.conv-reglages-tab:hover { color: #a78bfa; background: rgba(139,92,246,0.06); }
.conv-reglages-tab.active { color: #a78bfa; border-bottom-color: #7c3aed; }

/* Content area holds all tab panels */
.conv-rg-content {
  flex: 1;
  min-height: 0;
  position: relative;
}
.conv-rg-panel {
  display: none;
  flex-direction: column;
  position: absolute; inset: 0;
}
.conv-rg-panel.visible { display: flex; }

/* Scrollable wrapper for IA + Compte */
.conv-rg-scroll {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 0;
  scrollbar-width: thin;
  scrollbar-color: rgba(139,92,246,0.3) transparent;
}

/* Section blocks */
.conv-rg-section {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding-bottom: 14px;
  margin-bottom: 14px;
  border-bottom: 1px solid rgba(139,92,246,0.1);
}
.conv-rg-section:last-child { border-bottom: none; margin-bottom: 0; }
.conv-rg-sh {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #7c3aed;
  margin-bottom: 4px;
}

/* Form elements */
.conv-rg-label {
  font-size: 11.5px;
  color: rgba(255,255,255,0.55);
  margin-top: 4px;
}
.conv-rg-input, .conv-rg-select, .conv-rg-textarea {
  width: 100%;
  padding: 7px 10px;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(139,92,246,0.2);
  border-radius: 7px;
  color: #e2e8f0;
  font-size: 12.5px;
  font-family: inherit;
  box-sizing: border-box;
  outline: none;
  transition: border-color 0.15s;
}
.conv-rg-input:focus, .conv-rg-select:focus, .conv-rg-textarea:focus {
  border-color: rgba(139,92,246,0.5);
}
.conv-rg-input-sm { max-width: 90px; }
.conv-rg-input-secret { -webkit-text-security: disc; letter-spacing: 0.05em; }
.conv-rg-input-secret::placeholder { -webkit-text-security: none; letter-spacing: normal; }
.conv-rg-select { cursor: pointer; max-width: 100%; min-width: 0; }
.conv-rg-select option { background: #1e1b2e; }
.conv-rg-textarea { resize: vertical; min-height: 70px; line-height: 1.45; }
.conv-rg-slider {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 4px;
  background: rgba(255,255,255,0.1);
  border-radius: 2px;
  outline: none;
  margin: 8px 0;
  cursor: pointer;
}
.conv-rg-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #7c3aed;
  cursor: pointer;
  border: 2px solid rgba(255,255,255,0.2);
  box-shadow: 0 0 8px rgba(124,58,237,0.5);
  transition: transform 0.1s, box-shadow 0.1s;
}
.conv-rg-slider::-webkit-slider-thumb:hover { transform: scale(1.2); box-shadow: 0 0 14px rgba(124,58,237,0.75); }
.conv-rg-slider::-moz-range-thumb { width: 16px; height: 16px; border-radius: 50%; background: #7c3aed; cursor: pointer; border: 2px solid rgba(255,255,255,0.2); box-shadow: 0 0 8px rgba(124,58,237,0.5); }
.conv-rg-slider::-webkit-slider-runnable-track { height: 4px; background: rgba(255,255,255,0.08); border-radius: 2px; }
.conv-rg-slider::-moz-range-track { height: 4px; background: rgba(255,255,255,0.08); border-radius: 2px; }

/* Buttons */
.conv-rg-btn-secondary {
  padding: 7px 14px;
  background: rgba(139,92,246,0.15);
  border: 1px solid rgba(139,92,246,0.3);
  border-radius: 7px;
  color: #a78bfa;
  font-size: 12px;
  cursor: pointer;
  transition: all 0.15s;
  font-family: inherit;
  align-self: flex-start;
}
.conv-rg-btn-secondary:hover { background: rgba(139,92,246,0.25); }
.conv-rg-btn-secondary:disabled { opacity: 0.5; cursor: default; }

/* Test result */
.conv-rg-test-result {
  font-size: 12px;
  min-height: 16px;
  color: rgba(255,255,255,0.55);
}
.conv-rg-test-result.rg-ok { color: #4ade80; }
.conv-rg-test-result.rg-err { color: #f87171; }

/* Prompt examples */
.conv-rg-examples {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-top: 4px;
}
.conv-rg-example {
  padding: 4px 9px;
  background: rgba(139,92,246,0.1);
  border: 1px solid rgba(139,92,246,0.2);
  border-radius: 12px;
  color: #a78bfa;
  font-size: 11px;
  cursor: pointer;
  transition: all 0.15s;
  font-family: inherit;
}
.conv-rg-example:hover { background: rgba(139,92,246,0.22); }

/* ── Scripts ── */
.conv-rg-toolbar {
  display: flex;
  gap: 5px;
  padding: 8px 10px;
  border-bottom: 1px solid rgba(139,92,246,0.1);
  flex-shrink: 0;
  flex-wrap: wrap;
}
.conv-rg-btn-primary-sm {
  padding: 5px 10px;
  background: #7c3aed;
  border: none;
  border-radius: 6px;
  color: #fff;
  font-size: 11.5px;
  cursor: pointer;
  font-family: inherit;
  transition: background 0.15s;
}
.conv-rg-btn-primary-sm:hover { background: #6d28d9; }
.conv-rg-btn-sm {
  padding: 5px 10px;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 6px;
  color: rgba(255,255,255,0.6);
  font-size: 11.5px;
  cursor: pointer;
  font-family: inherit;
  transition: all 0.15s;
}
.conv-rg-btn-sm:hover { background: rgba(255,255,255,0.1); color: #e2e8f0; }
.conv-rg-btn-danger-sm {
  padding: 5px 10px;
  background: rgba(239,68,68,0.12);
  border: 1px solid rgba(239,68,68,0.3);
  border-radius: 6px;
  color: #f87171;
  font-size: 11.5px;
  cursor: pointer;
  font-family: inherit;
}
.conv-rg-search-wrap {
  padding: 7px 10px;
  border-bottom: 1px solid rgba(139,92,246,0.08);
  flex-shrink: 0;
}
.conv-rg-search-input {
  width: 100%;
  padding: 6px 10px;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(139,92,246,0.18);
  border-radius: 6px;
  color: #e2e8f0;
  font-size: 12px;
  font-family: inherit;
  outline: none;
  box-sizing: border-box;
}
.conv-rg-search-input:focus { border-color: rgba(139,92,246,0.4); }

.conv-rg-list {
  flex: 1;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: rgba(139,92,246,0.3) transparent;
}
.conv-rg-empty {
  padding: 24px 16px;
  text-align: center;
  color: rgba(255,255,255,0.3);
  font-size: 12px;
}
.conv-rg-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-bottom: 1px solid rgba(255,255,255,0.05);
  flex-wrap: wrap;
}
.conv-rg-item:hover { background: rgba(139,92,246,0.05); }
.conv-rg-item-name {
  flex: 1;
  font-size: 13px;
  color: #e2e8f0;
  font-weight: 500;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.conv-rg-item-meta {
  font-size: 11px;
  color: rgba(255,255,255,0.35);
}
.conv-rg-item-btn {
  padding: 3px 8px;
  background: rgba(139,92,246,0.12);
  border: 1px solid rgba(139,92,246,0.22);
  border-radius: 5px;
  color: #a78bfa;
  font-size: 11px;
  cursor: pointer;
  font-family: inherit;
  flex-shrink: 0;
}
.conv-rg-item-btn:hover { background: rgba(139,92,246,0.22); }

/* Script editor — header bar */
.conv-rg-editor-header {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 10px;
  border-bottom: 1px solid rgba(139,92,246,0.12);
  flex-shrink: 0;
  background: rgba(0,0,0,0.1);
}
.conv-rg-back-btn {
  padding: 4px 8px;
  background: none;
  border: 1px solid rgba(255,255,255,0.15);
  border-radius: 6px;
  color: rgba(255,255,255,0.5);
  font-size: 13px;
  cursor: pointer;
  flex-shrink: 0;
  font-family: inherit;
}
.conv-rg-back-btn:hover { color: #e2e8f0; }
.conv-rg-editor-name {
  flex: 1;
  padding: 5px 8px;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(139,92,246,0.2);
  border-radius: 6px;
  color: #e2e8f0;
  font-size: 12.5px;
  font-family: inherit;
  outline: none;
}

/* Script editor — message list container */
.conv-rg-messages-list {
  flex: 1;
  overflow-y: auto;
  padding: 8px 10px 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  scrollbar-width: thin;
  scrollbar-color: rgba(139,92,246,0.3) transparent;
}

/* ── Message item ── */
.rg-msg-item {
  flex-shrink: 0;
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(139,92,246,0.15);
  border-radius: 10px;
  overflow: hidden;
}
.rg-msg-launch {
  border-color: rgba(139,92,246,0.35);
  background: rgba(139,92,246,0.06);
}

.rg-msg-header {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 7px 10px;
  background: rgba(0,0,0,0.12);
  border-bottom: 1px solid rgba(139,92,246,0.1);
}
.rg-msg-num {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: rgba(139,92,246,0.25);
  color: #a78bfa;
  font-size: 10px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.rg-msg-launch .rg-msg-num { background: rgba(139,92,246,0.5); }
.rg-msg-label {
  flex: 1;
  font-size: 12px;
  font-weight: 600;
  color: #a78bfa;
}
.rg-launch-hint {
  font-size: 10px;
  font-weight: 400;
  opacity: 0.6;
  margin-left: 4px;
}
.rg-msg-name-input {
  flex: 1;
  padding: 4px 8px;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(139,92,246,0.18);
  border-radius: 5px;
  color: #e2e8f0;
  font-size: 12px;
  font-family: inherit;
  outline: none;
  min-width: 0;
}
.rg-msg-name-input:focus { border-color: rgba(139,92,246,0.45); }
.rg-msg-actions {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-shrink: 0;
}
.rg-add-var-btn {
  padding: 3px 8px;
  background: rgba(139,92,246,0.12);
  border: 1px solid rgba(139,92,246,0.25);
  border-radius: 5px;
  color: #a78bfa;
  font-size: 11px;
  cursor: pointer;
  font-family: inherit;
  white-space: nowrap;
}
.rg-add-var-btn:hover { background: rgba(139,92,246,0.22); }
.rg-del-msg-btn {
  width: 26px;
  height: 26px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(239,68,68,0.08);
  border: 1px solid rgba(239,68,68,0.2);
  border-radius: 5px;
  color: #f87171;
  cursor: pointer;
  flex-shrink: 0;
  font-family: inherit;
}
.rg-del-msg-btn:hover { background: rgba(239,68,68,0.18); }

/* ── Variant block ── */
.rg-variant {
  padding: 8px 10px 4px 16px;
  border-top: 1px solid rgba(139,92,246,0.07);
}
.rg-variant:first-of-type { border-top: none; }
.rg-variant-alt {
  background: rgba(139,92,246,0.04);
  border-top: 1px solid rgba(139,92,246,0.12) !important;
}

.rg-variant-header {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 5px;
}
.rg-variant-name-input {
  flex: 1;
  padding: 3px 7px;
  background: rgba(139,92,246,0.1);
  border: 1px solid rgba(139,92,246,0.25);
  border-radius: 4px;
  color: #a78bfa;
  font-size: 11px;
  font-weight: 600;
  font-family: inherit;
  outline: none;
  max-width: 100px;
}
.rg-del-var-btn {
  padding: 2px 6px;
  background: none;
  border: none;
  color: rgba(255,255,255,0.25);
  font-size: 11px;
  cursor: pointer;
  font-family: inherit;
}
.rg-del-var-btn:hover { color: #f87171; }

.rg-variant-ta {
  display: block !important;
  width: 100% !important;
  padding: 7px 9px !important;
  background: rgba(255,255,255,0.04) !important;
  border: 1px solid rgba(139,92,246,0.15) !important;
  border-radius: 6px !important;
  color: #e2e8f0 !important;
  font-size: 12.5px !important;
  font-family: inherit !important;
  resize: vertical !important;
  min-height: 70px !important;
  height: 70px !important;
  outline: none !important;
  box-sizing: border-box !important;
  line-height: 1.5 !important;
  overflow: auto !important;
  visibility: visible !important;
  opacity: 1 !important;
}
.rg-variant-ta:focus { border-color: rgba(139,92,246,0.4) !important; }

.rg-char-counter {
  font-size: 10px;
  color: rgba(255,255,255,0.3);
  text-align: right;
  margin-top: 2px;
  margin-bottom: 4px;
}
.rg-char-counter.rg-over { color: #f87171; }

/* ── Media section ── */
.rg-media-sec {
  background: rgba(0,0,0,0.12);
  border: 1px solid rgba(139,92,246,0.1);
  border-radius: 6px;
  padding: 6px 8px;
  margin-top: 4px;
  margin-bottom: 4px;
}
.rg-media-hdr {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 5px;
}
.rg-media-lbl {
  font-size: 10.5px;
  color: rgba(255,255,255,0.45);
  font-weight: 500;
}
.rg-media-hdr-acts {
  display: flex;
  gap: 4px;
}
.rg-media-btn {
  display: flex;
  align-items: center;
  gap: 3px;
  padding: 3px 7px;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 5px;
  color: rgba(255,255,255,0.55);
  font-size: 10.5px;
  cursor: pointer;
  font-family: inherit;
  white-space: nowrap;
}
.rg-media-btn:hover { background: rgba(139,92,246,0.12); color: #a78bfa; border-color: rgba(139,92,246,0.25); }

/* Media thumbnail grid */
.rg-media-thumb-grid {
  display: flex !important;
  flex-wrap: wrap !important;
  gap: 6px !important;
  margin: 4px 0 !important;
  min-height: 0;
}
.rg-media-thumb-card {
  position: relative !important;
  width: 64px !important;
  height: 64px !important;
  border-radius: 6px !important;
  overflow: hidden !important;
  background: rgba(255,255,255,0.06) !important;
  border: 1px solid rgba(139,92,246,0.2) !important;
  flex-shrink: 0 !important;
  display: block !important;
}
.rg-media-thumb-inner {
  width: 100% !important;
  height: 100% !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  position: relative !important;
}
.rg-media-thumb-loading {
  font-size: 18px;
  opacity: 0.5;
}
.rg-media-thumb-img {
  width: 100% !important;
  height: 100% !important;
  object-fit: cover !important;
  display: block !important;
}
.rg-media-thumb-id {
  font-size: 9px;
  color: rgba(255,255,255,0.5);
  text-align: center;
  padding: 4px 2px;
  word-break: break-all;
  line-height: 1.3;
}
.rg-media-thumb-badge {
  position: absolute;
  bottom: 3px;
  left: 3px;
  background: rgba(0,0,0,0.65);
  color: #fff;
  font-size: 8px;
  padding: 1px 4px;
  border-radius: 3px;
  pointer-events: none;
}
.rg-media-thumb-remove {
  position: absolute;
  top: 3px;
  right: 3px;
  width: 17px;
  height: 17px;
  background: rgba(0,0,0,0.7);
  border: none;
  border-radius: 50%;
  color: #fff;
  font-size: 9px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  font-family: inherit;
  z-index: 2;
  line-height: 1;
}
.rg-media-thumb-remove:hover { background: rgba(239,68,68,0.9); }
/* Input card (empty entry awaiting ID) */
.rg-media-thumb-input-card {
  width: auto !important;
  height: auto !important;
  min-height: 32px;
  display: flex !important;
  align-items: center;
  gap: 4px;
  padding: 4px 6px;
  overflow: visible;
}
.rg-media-thumb-input-card .rg-media-id-input {
  width: 90px;
  font-size: 11px;
  padding: 3px 6px;
}
.rg-media-thumb-cancel {
  position: static !important;
  width: 14px !important;
  height: 14px !important;
  background: none !important;
  border-radius: 3px !important;
  color: rgba(255,255,255,0.35) !important;
  font-size: 10px !important;
}
.rg-media-thumb-cancel:hover { color: #f87171 !important; background: none !important; }

/* Reused ID input (inside input card) */
.rg-media-id-input {
  flex: 1;
  padding: 4px 7px;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(139,92,246,0.15);
  border-radius: 5px;
  color: #e2e8f0;
  font-size: 11.5px;
  font-family: inherit;
  outline: none;
  min-width: 0;
}
.rg-media-id-input:focus { border-color: rgba(139,92,246,0.35); }

.rg-media-price-row {
  display: flex;
  align-items: center;
  gap: 5px;
  margin-top: 4px;
}
.rg-media-price-lbl {
  font-size: 10.5px;
  color: rgba(255,255,255,0.4);
  white-space: nowrap;
}
.rg-media-price-input {
  width: 65px;
  padding: 3px 7px;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(139,92,246,0.15);
  border-radius: 5px;
  color: #e2e8f0;
  font-size: 11.5px;
  font-family: inherit;
  outline: none;
}
.rg-media-price-input:focus { border-color: rgba(139,92,246,0.35); }

/* ── Compte stats ── */
.conv-rg-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-bottom: 8px;
}
.conv-rg-stat {
  background: rgba(139,92,246,0.08);
  border: 1px solid rgba(139,92,246,0.15);
  border-radius: 8px;
  padding: 10px 12px;
  text-align: center;
}
.conv-rg-stat--ok { border-color: rgba(74,222,128,0.2); background: rgba(74,222,128,0.06); }
.conv-rg-stat--err { border-color: rgba(248,113,113,0.2); background: rgba(248,113,113,0.06); }
.conv-rg-stat-val { font-size: 20px; font-weight: 700; color: #e2e8f0; }
.conv-rg-stat--ok .conv-rg-stat-val { color: #4ade80; }
.conv-rg-stat--err .conv-rg-stat-val { color: #f87171; }
.conv-rg-stat-lbl { font-size: 10px; color: rgba(255,255,255,0.4); margin-top: 2px; }

/* ── Support ── */
.conv-rg-support-card {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 10px 12px;
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(139,92,246,0.12);
  border-radius: 8px;
  text-decoration: none;
  transition: background 0.15s;
  margin-top: 6px;
}
.conv-rg-support-card:hover { background: rgba(139,92,246,0.08); }
.conv-rg-support-title { font-size: 12.5px; font-weight: 600; color: #e2e8f0; }
.conv-rg-support-email { font-size: 11px; color: #a78bfa; }

/* ===== TAB BAR HORIZONTAL SCROLL ===== */
.conv-reglages-tabs {
  overflow-x: auto !important;
  flex-wrap: nowrap !important;
  scrollbar-width: none;
  -ms-overflow-style: none;
}
.conv-reglages-tabs::-webkit-scrollbar { display: none; }
.conv-reglages-tab {
  flex: 0 0 auto !important;
  white-space: nowrap;
  padding: 9px 10px !important;
}

/* ===== TAB BUTTON CSS VARIABLES ===== */
.conv-tab-btn {
  background: var(--btn-bg, rgba(139,92,246,0.7)) !important;
}
.conv-tab-btn:hover {
  background: var(--btn-bg-hover, rgba(139,92,246,0.95)) !important;
}
.conv-tab-btn.active {
  background: var(--btn-bg-active, rgba(139,92,246,1)) !important;
}
.rg-icon-hidden { display: none !important; }
.rg-icon-enlarged { height: 48px !important; }
.rg-icon-first { border-radius: 0 8px 0 0 !important; border-top: none !important; }
.rg-icon-last  { border-radius: 0 0 8px 0 !important; }

/* ===== PERSONNALISATION TAB ===== */
.conv-rg-hint {
  font-size: 11.5px;
  color: rgba(255,255,255,0.45);
  line-height: 1.5;
  margin: 0 0 12px;
}
.rg-icon-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.rg-icon-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 10px;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.07);
  border-radius: 10px;
  transition: background 0.15s;
}
.rg-icon-row--hidden { opacity: 0.45; }
.rg-icon-preview-btn {
  width: 26px;
  height: 26px;
  border-radius: 7px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: #fff;
}
.rg-icon-lbl {
  flex: 1;
  font-size: 12px;
  font-weight: 500;
  color: rgba(255,255,255,0.85);
}
.rg-icon-ctrl {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-shrink: 0;
}
.rg-icon-color-wrap {
  position: relative;
  cursor: pointer;
  display: flex;
  align-items: center;
}
.rg-icon-color-swatch {
  display: block;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 2px solid rgba(255,255,255,0.2);
  cursor: pointer;
  transition: transform 0.15s;
}
.rg-icon-color-wrap:hover .rg-icon-color-swatch { transform: scale(1.15); }
.rg-icon-tog {
  width: 24px;
  height: 24px;
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 6px;
  background: rgba(255,255,255,0.05);
  color: rgba(255,255,255,0.5);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  transition: all 0.15s;
}
.rg-icon-tog:hover { background: rgba(139,92,246,0.2); color: #a78bfa; border-color: rgba(139,92,246,0.4); }
.rg-icon-tog.active { background: rgba(139,92,246,0.3); color: #c4b5fd; border-color: rgba(139,92,246,0.6); }
.rg-icon-order-btn {
  width: 22px;
  height: 22px;
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 5px;
  background: rgba(255,255,255,0.04);
  color: rgba(255,255,255,0.4);
  cursor: pointer;
  font-size: 11px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  transition: all 0.15s;
}
.rg-icon-order-btn:hover:not(:disabled) { background: rgba(139,92,246,0.2); color: #a78bfa; }
.rg-icon-order-btn:disabled { opacity: 0.25; cursor: default; }

/* ===== UPLOAD TAB ===== */
.rg-upload-zone {
  border: 2px dashed rgba(139,92,246,0.35);
  border-radius: 12px;
  padding: 24px 16px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  transition: all 0.2s;
  background: rgba(139,92,246,0.04);
  color: rgba(255,255,255,0.45);
  text-align: center;
}
.rg-upload-zone:hover, .rg-upload-zone.drag-over {
  border-color: rgba(139,92,246,0.7);
  background: rgba(139,92,246,0.1);
  color: rgba(255,255,255,0.75);
}
.rg-upload-zone svg { opacity: 0.6; }
.rg-upload-zone-txt { font-size: 12px; line-height: 1.5; }
.rg-upload-queue { margin-top: 10px; }

/* Thumbnail grid */
.rg-upload-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  padding: 2px 0;
}
.rg-upload-card {
  position: relative;
  border-radius: 10px;
  overflow: hidden;
  background: rgba(255,255,255,0.06);
  aspect-ratio: 1 / 1;
  border: 1px solid rgba(255,255,255,0.08);
  transition: border-color 0.15s;
}
.rg-upload-card--uploading { border-color: rgba(124,58,237,0.5); }
.rg-upload-card--done      { border-color: rgba(34,197,94,0.4); }
.rg-upload-card--error     { border-color: rgba(239,68,68,0.4); }

/* Thumbnail area */
.rg-upload-thumb {
  width: 100%; height: 100%;
  display: flex; align-items: center; justify-content: center;
  background: rgba(255,255,255,0.04);
}
.rg-upload-thumb-img {
  width: 100%; height: 100%;
  object-fit: cover;
  display: block;
}
.rg-upload-type-icon { opacity: 0.4; color: #fff; }

/* Delete button */
.rg-upload-del-btn {
  position: absolute;
  top: 4px; right: 4px;
  width: 18px; height: 18px;
  border-radius: 50%;
  background: rgba(0,0,0,0.65);
  color: #fff;
  border: none;
  cursor: pointer;
  font-size: 9px;
  display: flex; align-items: center; justify-content: center;
  z-index: 10;
  line-height: 1;
  padding: 0;
  transition: background 0.15s;
}
.rg-upload-del-btn:hover { background: #ef4444; }

/* Progress bar at bottom of card */
.rg-upload-card-bar {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 4px;
  background: rgba(255,255,255,0.1);
}
.rg-upload-card-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, #7c3aed, #a78bfa);
  transition: width 0.3s;
}

/* Done / Error badge */
.rg-upload-badge {
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  width: 26px; height: 26px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 13px; font-weight: 700;
  color: #fff;
}
.rg-upload-badge--done  { background: rgba(34,197,94,0.88); }
.rg-upload-badge--error { background: rgba(239,68,68,0.88); }

/* Size label */
.rg-upload-card-size {
  position: absolute;
  bottom: 5px; left: 5px;
  font-size: 9px;
  background: rgba(0,0,0,0.55);
  color: rgba(255,255,255,0.85);
  padding: 1px 5px;
  border-radius: 4px;
  pointer-events: none;
}
/* Color swatch + palette popup */
.rg-icon-color-wrap { position: relative; display: flex; align-items: center; }
.rg-icon-color-swatch {
  width: 20px; height: 20px;
  border-radius: 50%;
  border: 2px solid rgba(255,255,255,0.25);
  cursor: pointer;
  flex-shrink: 0;
  transition: transform 0.15s, border-color 0.15s;
  padding: 0;
}
.rg-icon-color-swatch:hover { transform: scale(1.2); border-color: rgba(255,255,255,0.6); }
/* Group picker flyout */
.rg-group-picker {
  position: fixed;
  z-index: 99999;
  background: #1a1727;
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 12px;
  padding: 6px;
  min-width: 180px;
  box-shadow: 0 8px 28px rgba(0,0,0,0.6);
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.rg-group-picker-opt {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border-radius: 8px;
  background: none;
  border: none;
  color: rgba(255,255,255,0.85);
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  text-align: left;
  transition: background 0.12s;
}
.rg-group-picker-opt:hover { background: rgba(255,255,255,0.08); }
.rg-group-picker-opt.active { background: rgba(124,58,237,0.25); color: #c4b5fd; }
.rg-group-picker-dot {
  width: 10px; height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
}

.rg-color-palette {
  position: absolute;
  top: 26px; left: 50%;
  transform: translateX(-50%);
  z-index: 9999;
  background: #1e1b2e;
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 10px;
  padding: 8px;
  display: flex; flex-wrap: wrap; gap: 5px;
  width: 148px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.5);
}
.rg-palette-btn {
  width: 22px; height: 22px;
  border-radius: 50%;
  border: 2px solid transparent;
  cursor: pointer;
  transition: transform 0.12s;
  flex-shrink: 0;
  padding: 0;
}
.rg-palette-btn:hover { transform: scale(1.2); }
.rg-palette-btn.active { border-color: #fff; box-shadow: 0 0 0 2px rgba(255,255,255,0.3); }

.rg-upload-dest-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  margin: 10px 0 6px;
  padding: 8px 10px;
  border-radius: 8px;
  background: rgba(139,92,246,0.06);
  border: 1px solid rgba(139,92,246,0.18);
}
.rg-upload-dest-label {
  font-size: 11px;
  font-weight: 600;
  color: rgba(255,255,255,0.5);
  flex-shrink: 0;
}
.rg-upload-dest-btn {
  padding: 3px 10px;
  font-size: 11px;
  border-radius: 6px;
  border: 1px solid rgba(255,255,255,0.15);
  background: rgba(255,255,255,0.05);
  color: rgba(255,255,255,0.55);
  cursor: pointer;
  transition: all 0.15s;
}
.rg-upload-dest-btn:hover { background: rgba(139,92,246,0.18); color: #c4b5fd; border-color: rgba(139,92,246,0.4); }
.rg-upload-dest-btn.active { background: rgba(139,92,246,0.25); color: #a78bfa; border-color: rgba(139,92,246,0.5); font-weight: 600; }
.rg-upload-coll-name {
  font-size: 11px;
  color: #a78bfa;
  flex: 1;
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.rg-upload-choose-coll {
  padding: 3px 9px;
  font-size: 11px;
  border-radius: 6px;
  border: 1px solid rgba(139,92,246,0.4);
  background: rgba(139,92,246,0.15);
  color: #c4b5fd;
  cursor: pointer;
  transition: all 0.15s;
  flex-shrink: 0;
}
.rg-upload-choose-coll:hover { background: rgba(139,92,246,0.3); }
.rg-upload-choose-coll:disabled { opacity: 0.5; cursor: wait; }

.rg-upload-actions { display: flex; gap: 6px; margin-bottom: 8px; flex-wrap: wrap; }
.rg-upload-action-btn {
  padding: 5px 12px;
  font-size: 11px;
  border-radius: 6px;
  border: 1px solid rgba(255,255,255,0.15);
  background: rgba(255,255,255,0.06);
  color: rgba(255,255,255,0.7);
  cursor: pointer;
  transition: all 0.15s;
}
.rg-upload-action-btn:hover { background: rgba(139,92,246,0.2); color: #a78bfa; border-color: rgba(139,92,246,0.4); }
.rg-upload-start-btn {
  background: rgba(139,92,246,0.75) !important;
  color: #fff !important;
  border-color: rgba(139,92,246,0.9) !important;
  font-weight: 600;
}
.rg-upload-start-btn:hover { background: rgba(139,92,246,1) !important; }
.rg-upload-size { font-size: 10px; color: rgba(255,255,255,0.3); flex-shrink: 0; margin-left: 2px; }
.rg-upload-mediaid { font-size: 10px; color: #86efac; background: rgba(34,197,94,0.12); padding: 1px 5px; border-radius: 4px; flex-shrink: 0; }
.rg-upload-error { font-size: 10px; color: #fca5a5; flex-shrink: 0; max-width: 100px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rg-upload-status { font-size: 11.5px; margin-top: 8px; min-height: 16px; }

/* ── Note cards ── */
.conv-note-card { cursor: pointer; }
.conv-note-card:hover { background: rgba(255,255,255,0.07); }
.conv-note-line1 { display: flex; align-items: baseline; gap: 6px; flex-wrap: wrap; }
.conv-note-nick { font-size: 13px; font-weight: 600; color: #e2e8f0; }
.conv-note-pseudo { font-size: 11px; color: #8b5cf6; }
.conv-note-text {
  font-size: 12px; color: rgba(255,255,255,0.5); margin-top: 3px; line-height: 1.4;
  display: -webkit-box; -webkit-line-clamp: 2; line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.conv-note-stats { display: flex; gap: 5px; margin-top: 5px; flex-wrap: wrap; }
.conv-note-stat { font-size: 10px; font-weight: 600; padding: 2px 7px; border-radius: 10px; }
.conv-note-stat-money { background: rgba(16,185,129,0.12); color: #34d399; border: 1px solid rgba(16,185,129,0.2); }
.conv-note-stat-media { background: rgba(99,102,241,0.12); color: #818cf8; border: 1px solid rgba(99,102,241,0.2); }
.conv-note-chat-btn {
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0; align-self: center;
  width: 28px; height: 28px; border-radius: 7px;
  border: 1px solid rgba(255,255,255,0.1); background: rgba(255,255,255,0.04);
  color: rgba(255,255,255,0.45); cursor: pointer; transition: background 0.15s, color 0.15s;
}
.conv-note-chat-btn:hover { background: rgba(139,92,246,0.25); color: #fff; border-color: rgba(139,92,246,0.4); }

/* ── Note list V1 (settings tab + panel) ── */
.note-item {
  display: flex; align-items: flex-start; gap: 10px;
  padding: 10px 12px; border-radius: 10px;
  border: 1px solid rgba(255,255,255,0.06);
  background: rgba(255,255,255,0.02);
  margin-bottom: 6px; cursor: default;
}
.note-item-info { flex: 1; min-width: 0; cursor: pointer; }
.note-item-header-row { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; margin-bottom: 3px; }
.note-item-chatid { font-size: 13px; font-weight: 600; color: #e2e8f0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.note-item-date { font-size: 10px; color: #475569; white-space: nowrap; flex-shrink: 0; }
.note-item-preview { font-size: 12px; color: #64748b; line-height: 1.4; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; line-clamp: 2; -webkit-box-orient: vertical; }
.note-item-stats { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 5px; }
.note-stat-badge { font-size: 10px; font-weight: 600; padding: 2px 7px; border-radius: 10px; }
.note-stat-money { background: rgba(16,185,129,0.12); color: #34d399; border: 1px solid rgba(16,185,129,0.2); }
.note-stat-media { background: rgba(99,102,241,0.12); color: #818cf8; border: 1px solid rgba(99,102,241,0.2); }
.note-item-actions { display: flex; flex-direction: column; gap: 4px; flex-shrink: 0; }
.conv-note-del-btn {
  display: flex; align-items: center; justify-content: center;
  width: 28px; height: 28px; border-radius: 7px;
  border: 1px solid rgba(255,255,255,0.1); background: rgba(255,255,255,0.04);
  color: rgba(239,68,68,0.6); cursor: pointer; transition: background 0.15s, color 0.15s;
}
.conv-note-del-btn:hover { background: rgba(239,68,68,0.15); color: #ef4444; border-color: rgba(239,68,68,0.3); }

/* ── Note editable textarea (V3 transaction modal) ── */
.note-detail-textarea {
  width: 100%; min-height: 100px; resize: vertical;
  background: rgba(255,255,255,0.03); border: 1px solid rgba(255,255,255,0.1);
  border-radius: 8px; padding: 12px; color: #cbd5e1; font-size: 13px;
  line-height: 1.6; font-family: inherit; box-sizing: border-box;
  outline: none; transition: border-color 0.15s;
}
.note-detail-textarea:focus { border-color: rgba(139,92,246,0.4); }

/* ── Note Detail Modal ── */
.note-detail-overlay {
  position: fixed; inset: 0; z-index: 10000010;
  display: flex; align-items: center; justify-content: center;
  background: rgba(0,0,0,0.7); backdrop-filter: blur(4px);
}
.note-detail-box {
  background: #131525; border: 1px solid rgba(139,92,246,0.2); border-radius: 16px;
  padding: 24px; width: 90%; max-width: 560px; max-height: 80vh; overflow-y: auto;
  box-shadow: 0 20px 60px rgba(0,0,0,0.5);
}
.note-detail-header { display: flex; align-items: flex-start; justify-content: space-between; margin-bottom: 16px; }
.note-detail-name { font-size: 18px; font-weight: 700; color: #e2e8f0; }
.note-detail-subname { font-size: 13px; color: #8b5cf6; margin-top: 2px; }
.note-detail-close { background: none; border: none; color: #64748b; font-size: 22px; cursor: pointer; padding: 0 4px; line-height: 1; }
.note-detail-close:hover { color: #e2e8f0; }
.note-detail-meta { display: flex; flex-wrap: wrap; gap: 12px; font-size: 12px; color: #64748b; margin-bottom: 12px; padding-bottom: 12px; border-bottom: 1px solid rgba(255,255,255,0.06); }
.note-detail-meta strong { color: #94a3b8; }
.note-detail-section-title { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; color: #475569; margin: 16px 0 8px; }
.note-detail-text { font-size: 13px; color: #cbd5e1; line-height: 1.6; background: rgba(255,255,255,0.03); border: 1px solid rgba(255,255,255,0.06); border-radius: 8px; padding: 12px; white-space: pre-wrap; }
.note-detail-stats-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 8px; }
.note-detail-stat-card { background: rgba(255,255,255,0.03); border: 1px solid rgba(255,255,255,0.06); border-radius: 10px; padding: 12px 8px; text-align: center; }
.note-detail-stat-num { font-size: 18px; font-weight: 700; color: #e2e8f0; }
.note-detail-stat-card .note-detail-stat-label { font-size: 10px; color: #64748b; margin-top: 2px; }
.note-detail-dates { margin-top: 12px; }
.note-detail-stat-row { display: flex; justify-content: space-between; padding: 6px 0; font-size: 12px; border-bottom: 1px solid rgba(255,255,255,0.04); }
.note-detail-stat-row .note-detail-stat-label { color: #64748b; }
.note-detail-stat-row .note-detail-stat-value { color: #cbd5e1; font-weight: 600; }
.note-detail-by-type { background: rgba(255,255,255,0.02); border-radius: 8px; padding: 4px 12px; }
.note-detail-empty { font-size: 13px; color: #475569; text-align: center; padding: 20px; }
.note-detail-footer { margin-top: 20px; display: flex; justify-content: flex-end; }

/* ── Compte – subscription section ── */
.rg-compte-lic {
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(139,92,246,0.15);
  border-radius: 10px;
  overflow: hidden;
}
.rg-compte-lic-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 9px 12px;
  border-bottom: 1px solid rgba(255,255,255,0.05);
}
.rg-compte-lic-row:last-child { border-bottom: none; }
.rg-compte-lic-label { font-size: 12px; color: rgba(255,255,255,0.45); }
.rg-compte-lic-val { font-size: 12px; color: #cbd5e1; font-family: monospace; letter-spacing: 0.03em; }
.rg-compte-lic-status { font-size: 11px; font-weight: 600; padding: 2px 10px; border-radius: 20px; }
.rg-compte-lic-active { background: rgba(16,185,129,0.15); color: #34d399; border: 1px solid rgba(16,185,129,0.25); }
.rg-compte-lic-inactive { background: rgba(239,68,68,0.12); color: #f87171; border: 1px solid rgba(239,68,68,0.2); }
.rg-compte-lic-pastdue { background: rgba(245,158,11,0.12); color: #fbbf24; border: 1px solid rgba(245,158,11,0.25); }
.rg-compte-lic-email { font-size: 11.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 60%; }
.rg-admin-badge { display: inline-flex; align-items: center; gap: 4px; font-size: 11px; font-weight: 700; padding: 2px 10px; border-radius: 20px; background: rgba(139,92,246,0.18); color: #a78bfa; border: 1px solid rgba(139,92,246,0.35); letter-spacing: 0.03em; }

/* ── Compte – portal button ── */
.rg-compte-portal-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  padding: 9px 14px;
  margin-top: 8px;
  background: rgba(124,58,237,0.15);
  border: 1px solid rgba(139,92,246,0.4);
  border-radius: 8px;
  color: #a78bfa;
  font-size: 12px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: all 0.15s;
  text-align: center;
  box-sizing: border-box;
}
.rg-compte-portal-btn:hover {
  background: rgba(124,58,237,0.3);
  border-color: rgba(139,92,246,0.65);
  color: #c4b5fd;
}
.rg-compte-portal-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* ===== PROGRAMMATION (ADMIN) ===== */
.sched-list-header, .sched-form-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}
.sched-item {
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.07);
  border-radius: 8px;
  padding: 10px 12px;
  margin-bottom: 8px;
}
.sched-item-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 6px;
}
.sched-item-name {
  font-size: 13px;
  font-weight: 600;
  color: #e2e8f0;
}
.sched-item-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 5px;
}
.sched-badge-time, .sched-badge-media {
  font-size: 11px;
  background: rgba(139,92,246,0.15);
  color: #a78bfa;
  border-radius: 4px;
  padding: 2px 7px;
}
.sched-badge-rec {
  font-size: 11px;
  background: rgba(34,197,94,0.12);
  color: #86efac;
  border-radius: 4px;
  padding: 2px 7px;
}
.sched-badge-pub {
  font-size: 11px;
  background: rgba(56,189,248,0.12);
  color: #7dd3fc;
  border-radius: 4px;
  padding: 2px 7px;
}
.sched-badge-del {
  font-size: 11px;
  background: rgba(239,68,68,0.12);
  color: #fca5a5;
  border-radius: 4px;
  padding: 2px 7px;
}
.sched-item-foot {
  font-size: 11px;
  color: #64748b;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.sched-foot-status { font-size: 11px; }
.sched-hist-toggle {
  display: inline-flex; align-items: center; gap: 4px;
  font-size: 11px; cursor: pointer; margin-top: 6px;
  background: rgba(255,255,255,0.04); border: 1px solid rgba(255,255,255,0.08);
  border-radius: 5px; padding: 3px 9px; color: #94a3b8;
  font-family: inherit; transition: background 0.15s;
}
.sched-hist-toggle:hover, .sched-hist-toggle--open { background: rgba(139,92,246,0.15); color: #c4b5fd; border-color: rgba(139,92,246,0.3); }
.sched-hist-panel {
  margin-top: 6px; border-radius: 6px;
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.06);
  padding: 6px 8px;
  max-height: 180px; overflow-y: auto;
}
.sched-hist-row {
  display: flex; align-items: baseline; gap: 6px;
  font-size: 11px; padding: 3px 0;
  border-bottom: 1px solid rgba(255,255,255,0.04);
}
.sched-hist-row:last-child { border-bottom: none; }
.sched-hist-date { color: #64748b; white-space: nowrap; }
.sched-hist-label { color: #94a3b8; word-break: break-word; }
.sched-item-actions {
  display: flex;
  gap: 6px;
  margin-top: 8px;
}
.sched-edit-btn, .sched-del-btn {
  font-size: 11px;
  padding: 3px 10px;
  border-radius: 5px;
  border: 1px solid rgba(255,255,255,0.12);
  cursor: pointer;
  background: rgba(255,255,255,0.06);
  color: #94a3b8;
  font-family: inherit;
  transition: background 0.15s;
}
.sched-edit-btn:hover { background: rgba(139,92,246,0.25); color: #c4b5fd; border-color: rgba(139,92,246,0.4); }
.sched-del-btn:hover { background: rgba(239,68,68,0.2); color: #fca5a5; border-color: rgba(239,68,68,0.35); }
.sched-status-ok { color: #4ade80; font-weight: 600; }
.sched-status-err { color: #f87171; font-weight: 600; }
.sched-item-err {
  font-size: 11px;
  color: #f87171;
  margin-top: 4px;
  word-break: break-word;
}

/* Toggle switch */
.sched-toggle { position: relative; display: inline-flex; cursor: pointer; }
.sched-toggle input[type=checkbox] { opacity: 0; width: 0; height: 0; position: absolute; }
.sched-tslider {
  width: 36px; height: 20px;
  background: rgba(255,255,255,0.12);
  border-radius: 10px;
  transition: background 0.2s;
  position: relative;
  flex-shrink: 0;
}
.sched-tslider::after {
  content: '';
  position: absolute;
  top: 3px; left: 3px;
  width: 14px; height: 14px;
  border-radius: 50%;
  background: #64748b;
  transition: transform 0.2s, background 0.2s;
}
.sched-toggle input:checked + .sched-tslider { background: rgba(139,92,246,0.5); }
.sched-toggle input:checked + .sched-tslider::after { transform: translateX(16px); background: #a78bfa; }

.sched-time-row {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 5px;
}

/* Media preview thumbnails */
.sched-media-preview {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  min-height: 20px;
  margin-bottom: 4px;
}
.sched-thumb-wrap {
  position: relative;
  display: inline-block;
}
.sched-thumb {
  width: 52px;
  height: 52px;
  object-fit: cover;
  border-radius: 6px;
  display: block;
  border: 1px solid rgba(255,255,255,0.1);
}
.sched-thumb-ph {
  width: 52px;
  height: 52px;
  background: #1a1b2e;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(255,255,255,0.1);
  color: #64748b;
}
.sched-thumb-rm {
  position: absolute;
  top: -4px; right: -4px;
  width: 16px; height: 16px;
  border-radius: 50%;
  background: rgba(0,0,0,0.75);
  color: #fff;
  border: none;
  font-size: 9px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  padding: 0;
}
