/* XCORP Unified Virtual Assistants Management Portal Styles */
:root {
  --bg-main: #0b0f19;
  --bg-card: rgba(18, 24, 38, 0.75);
  --bg-card-hover: rgba(26, 35, 54, 0.85);
  --bg-glass: rgba(15, 23, 42, 0.65);
  --border-color: rgba(255, 255, 255, 0.08);
  --border-active: rgba(0, 188, 212, 0.4);
  --text-main: #f1f5f9;
  --text-muted: #94a3b8;
  --text-dim: #64748b;
  
  --accent-teal: #00bcd4;
  --accent-teal-glow: rgba(0, 188, 212, 0.25);
  --accent-emerald: #10b981;
  --accent-amber: #f59e0b;
  --accent-rose: #f43f5e;
  --accent-purple: #a855f7;
  --accent-blue: #3b82f6;

  --brand-xhost: #00bcd4;
  --brand-xpyme: #10b981;
  --brand-xcom: #f59e0b;
  --brand-xcoin: #a855f7;
  --brand-papelplus: #ec4899;

  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --radius-full: 9999px;
  --shadow-card: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
}

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

body {
  font-family: var(--font-sans);
  background: radial-gradient(circle at 15% 15%, #131d33 0%, #070a12 100%);
  color: var(--text-main);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
}

/* Header & Top Bar */
.top-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 2rem;
  background: var(--bg-glass);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border-color);
  position: sticky;
  top: 0;
  z-index: 100;
}

.brand-logo-area {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.logo-badge {
  background: linear-gradient(135deg, #00bcd4 0%, #0288d1 100%);
  color: #fff;
  font-weight: 800;
  font-size: 1.1rem;
  padding: 0.4rem 0.8rem;
  border-radius: var(--radius-md);
  letter-spacing: 1px;
  box-shadow: 0 0 15px var(--accent-teal-glow);
}

.portal-title h1 {
  font-size: 1.2rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: #fff;
}

.portal-title p {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.nav-controls {
  display: flex;
  align-items: center;
  gap: 1.2rem;
}

.collaborator-pill {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-color);
  padding: 0.4rem 0.8rem;
  border-radius: var(--radius-full);
}

.collaborator-pill label {
  font-size: 0.75rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.collaborator-pill select {
  background: transparent;
  border: none;
  color: #fff;
  font-weight: 600;
  font-size: 0.85rem;
  cursor: pointer;
  outline: none;
}

.collaborator-pill select option {
  background: #111827;
  color: #fff;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.55rem 1.1rem;
  font-size: 0.85rem;
  font-weight: 600;
  border-radius: var(--radius-md);
  border: none;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-primary {
  background: linear-gradient(135deg, #00bcd4 0%, #0097a7 100%);
  color: #fff;
  box-shadow: 0 4px 14px var(--accent-teal-glow);
}

.btn-primary:hover {
  filter: brightness(1.15);
  transform: translateY(-1px);
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-main);
  border: 1px solid var(--border-color);
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.12);
}

.btn-success {
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  color: #fff;
}

.btn-sm {
  padding: 0.35rem 0.7rem;
  font-size: 0.75rem;
}

/* Main Container */
.main-wrapper {
  max-width: 1400px;
  width: 100%;
  margin: 0 auto;
  padding: 1.5rem 2rem;
  flex: 1;
}

/* Brand Grid Selector */
.assistants-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.assistant-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 1.2rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
}

.assistant-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 4px;
  height: 100%;
  background: var(--card-brand-color, var(--accent-teal));
  opacity: 0.4;
  transition: opacity 0.2s ease;
}

.assistant-card:hover {
  background: var(--bg-card-hover);
  border-color: rgba(255, 255, 255, 0.15);
  transform: translateY(-2px);
}

.assistant-card.active {
  background: rgba(26, 35, 54, 0.95);
  border-color: var(--card-brand-color, var(--accent-teal));
  box-shadow: 0 0 20px rgba(0, 188, 212, 0.2);
}

.assistant-card.active::before {
  opacity: 1;
  width: 6px;
}

.assistant-avatar-wrap {
  width: 54px;
  height: 54px;
  border-radius: 50%;
  overflow: hidden;
  border: 2px solid var(--card-brand-color, var(--accent-teal));
  flex-shrink: 0;
  background: #000;
  display: flex;
  align-items: center;
  justify-content: center;
}

.assistant-avatar-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.assistant-info h3 {
  font-size: 1.05rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.assistant-info .brand-tag {
  font-size: 0.68rem;
  padding: 0.15rem 0.45rem;
  border-radius: var(--radius-full);
  background: rgba(255, 255, 255, 0.1);
  color: var(--text-muted);
}

.assistant-info p {
  font-size: 0.72rem;
  color: var(--text-muted);
  margin-top: 0.2rem;
}

.assistant-metrics {
  display: flex;
  gap: 0.8rem;
  margin-top: 0.4rem;
  font-size: 0.7rem;
  color: var(--text-dim);
}

.assistant-metrics span {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
}

/* Tabs Navigation */
.tabs-nav {
  display: flex;
  border-bottom: 1px solid var(--border-color);
  gap: 0.5rem;
  margin-bottom: 1.5rem;
  overflow-x: auto;
}

.tab-btn {
  background: transparent;
  border: none;
  padding: 0.8rem 1.2rem;
  color: var(--text-muted);
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  border-bottom: 2px solid transparent;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  white-space: nowrap;
}

.tab-btn:hover {
  color: var(--text-main);
}

.tab-btn.active {
  color: var(--accent-teal);
  border-bottom-color: var(--accent-teal);
}

.badge-counter {
  background: rgba(255, 255, 255, 0.1);
  font-size: 0.7rem;
  padding: 0.1rem 0.45rem;
  border-radius: var(--radius-full);
  color: var(--text-main);
}

.badge-counter.alert {
  background: var(--accent-rose);
  color: #fff;
}

/* Tab Panels */
.tab-content {
  display: none;
}

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

/* Search & Action Bar */
.action-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.2rem;
  flex-wrap: wrap;
}

.search-box {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  padding: 0.5rem 1rem;
  border-radius: var(--radius-md);
  flex: 1;
  max-width: 450px;
}

.search-box input {
  background: transparent;
  border: none;
  color: #fff;
  width: 100%;
  outline: none;
  font-size: 0.85rem;
}

.filter-group {
  display: flex;
  align-items: center;
  gap: 0.8rem;
}

.select-filter {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  color: var(--text-main);
  padding: 0.5rem 0.8rem;
  border-radius: var(--radius-md);
  font-size: 0.85rem;
  outline: none;
}

.select-filter option {
  background: #111827;
}

/* Knowledge Cards Grid */
.knowledge-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(420px, 1fr));
  gap: 1rem;
}

.kb-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 1.2rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: all 0.2s ease;
}

.kb-card:hover {
  background: var(--bg-card-hover);
  border-color: rgba(255, 255, 255, 0.12);
  transform: translateY(-2px);
}

.kb-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 0.5rem;
  margin-bottom: 0.6rem;
}

.kb-header h4 {
  font-size: 0.95rem;
  font-weight: 700;
  color: #fff;
  line-height: 1.35;
}

.kb-category {
  font-size: 0.68rem;
  font-weight: 600;
  padding: 0.2rem 0.5rem;
  border-radius: var(--radius-sm);
  background: rgba(0, 188, 212, 0.15);
  color: var(--accent-teal);
  white-space: nowrap;
}

.kb-body {
  font-size: 0.82rem;
  color: var(--text-muted);
  line-height: 1.5;
  margin-bottom: 1rem;
  white-space: pre-line;
  max-height: 120px;
  overflow-y: auto;
}

.kb-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 0.8rem;
  border-top: 1px solid var(--border-color);
  font-size: 0.72rem;
  color: var(--text-dim);
}

.kb-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem;
}

.tag-pill {
  background: rgba(255, 255, 255, 0.05);
  padding: 0.15rem 0.4rem;
  border-radius: var(--radius-sm);
  font-size: 0.68rem;
}

.kb-actions {
  display: flex;
  gap: 0.4rem;
}

/* Gaps Table / Cards */
.gaps-container, .audit-container {
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
}

.gap-item {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 1rem 1.2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
}

.gap-item:hover {
  background: var(--bg-card-hover);
}

.gap-details h4 {
  font-size: 0.95rem;
  color: #fff;
  margin-bottom: 0.3rem;
}

.gap-meta {
  font-size: 0.72rem;
  color: var(--text-dim);
  display: flex;
  gap: 1rem;
}

.gap-meta span {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
}

.gap-badge {
  background: rgba(245, 158, 11, 0.2);
  color: var(--accent-amber);
  padding: 0.15rem 0.5rem;
  border-radius: var(--radius-full);
  font-size: 0.7rem;
  font-weight: 700;
}

/* Chat Simulator Layout */
.simulator-layout {
  display: grid;
  grid-template-columns: 1fr 380px;
  gap: 1.5rem;
  height: 620px;
}

.chat-box {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  display: flex;
  flex-direction: column;
  height: 100%;
}

.chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 1.2rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.msg {
  display: flex;
  gap: 0.8rem;
  max-width: 85%;
}

.msg.user {
  align-self: flex-end;
  flex-direction: row-reverse;
}

.msg-avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  overflow: hidden;
  flex-shrink: 0;
  border: 1px solid var(--border-color);
}

.msg-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.msg-bubble {
  padding: 0.8rem 1rem;
  border-radius: var(--radius-md);
  font-size: 0.85rem;
  line-height: 1.45;
}

.msg.user .msg-bubble {
  background: linear-gradient(135deg, #0097a7 0%, #006064 100%);
  color: #fff;
}

.msg.bot .msg-bubble {
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid var(--border-color);
  color: var(--text-main);
}

.chat-input-area {
  padding: 0.8rem 1rem;
  border-top: 1px solid var(--border-color);
  display: flex;
  gap: 0.6rem;
  background: rgba(0, 0, 0, 0.2);
}

.chat-input-area input {
  flex: 1;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 0.6rem 1rem;
  color: #fff;
  font-size: 0.85rem;
  outline: none;
}

.simulator-side-panel {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 1rem;
  overflow-y: auto;
  font-size: 0.78rem;
}

.sim-metric-card {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 0.6rem 0.8rem;
  margin-bottom: 0.8rem;
}

.sim-metric-card h5 {
  color: var(--accent-teal);
  font-size: 0.75rem;
  margin-bottom: 0.3rem;
  text-transform: uppercase;
}

/* Modals */
.modal-backdrop {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(8px);
  z-index: 1000;
  align-items: center;
  justify-content: center;
}

.modal-backdrop.open,
.modal-backdrop.active {
  display: flex;
}

.modal-box,
.modal-card {
  background: #111827;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  width: 90%;
  max-width: 650px;
  max-height: 90vh;
  overflow-y: auto;
  padding: 1.8rem;
  box-shadow: var(--shadow-card);
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.2rem;
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 0.8rem;
}

.modal-header h3 {
  font-size: 1.15rem;
  color: #fff;
}

.close-btn,
.btn-close {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 1.3rem;
  cursor: pointer;
  line-height: 1;
  padding: 0.25rem;
  transition: color 0.2s;
}

.close-btn:hover,
.btn-close:hover {
  color: #fff;
}

.form-group {
  margin-bottom: 1rem;
}

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

.form-group input, .form-group textarea, .form-group select {
  width: 100%;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 0.6rem 0.8rem;
  color: #fff;
  font-size: 0.85rem;
  outline: none;
  font-family: inherit;
}

.form-group textarea {
  min-height: 120px;
  resize: vertical;
}

.modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 0.8rem;
  margin-top: 1.5rem;
  border-top: 1px solid var(--border-color);
  padding-top: 1rem;
}

/* Toast Notifications */
#toast-container {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  z-index: 2000;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.toast {
  background: #1e293b;
  color: #fff;
  border: 1px solid var(--border-color);
  padding: 0.8rem 1.2rem;
  border-radius: var(--radius-md);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5);
  font-size: 0.85rem;
  display: flex;
  align-items: center;
  gap: 0.6rem;
  animation: slideIn 0.3s ease;
}

.toast.success { border-left: 4px solid var(--accent-emerald); }
.toast.error { border-left: 4px solid var(--accent-rose); }
.toast.info { border-left: 4px solid var(--accent-teal); }

@keyframes slideIn {
  from { transform: translateX(100%); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}

/* Responsive */
@media (max-width: 900px) {
  .simulator-layout {
    grid-template-columns: 1fr;
    height: auto;
  }
  .top-nav {
    flex-direction: column;
    gap: 1rem;
    align-items: flex-start;
  }
  .knowledge-grid {
    grid-template-columns: 1fr;
  }
}

/* Editor Toolbar Enriquecido (SNC #8973) */
.editor-toolbar {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.35rem;
  background: rgba(15, 23, 42, 0.85);
  border: 1px solid var(--border-color);
  border-bottom: none;
  border-top-left-radius: var(--radius-sm);
  border-top-right-radius: var(--radius-sm);
  padding: 0.45rem 0.6rem;
  user-select: none;
}

.toolbar-group {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.toolbar-divider {
  width: 1px;
  height: 18px;
  background: var(--border-color);
  margin: 0 0.35rem;
}

.toolbar-btn {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: #94a3b8;
  border-radius: 4px;
  padding: 0.32rem 0.6rem;
  font-size: 0.78rem;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  line-height: 1;
}

.toolbar-btn:hover {
  background: rgba(255, 255, 255, 0.16);
  color: #fff;
  border-color: rgba(255, 255, 255, 0.25);
  transform: translateY(-1px);
}

.toolbar-btn:active {
  transform: translateY(0);
}

.toolbar-btn-toggle.active {
  background: rgba(0, 188, 212, 0.25);
  color: #00e5ff;
  border-color: rgba(0, 188, 212, 0.5);
  box-shadow: 0 0 10px rgba(0, 188, 212, 0.2);
}

.form-group .editor-toolbar + textarea {
  border-top-left-radius: 0 !important;
  border-top-right-radius: 0 !important;
  border-top: 1px solid rgba(255, 255, 255, 0.08) !important;
}

.answer-preview-box {
  min-height: 140px;
  max-height: 260px;
  overflow-y: auto;
  background: rgba(15, 23, 42, 0.65);
  border: 1px solid var(--border-color);
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  border-bottom-left-radius: var(--radius-sm);
  border-bottom-right-radius: var(--radius-sm);
  padding: 0.85rem 1rem;
  color: #e2e8f0;
  font-size: 0.88rem;
  line-height: 1.6;
}

.answer-preview-box p {
  margin-bottom: 0.6rem;
}

.answer-preview-box ul, .answer-preview-box ol {
  padding-left: 1.5rem;
  margin-bottom: 0.6rem;
}

.answer-preview-box li {
  margin-bottom: 0.25rem;
}

.answer-preview-box a {
  color: #38bdf8;
  text-decoration: underline;
  font-weight: 500;
}

.answer-preview-box strong {
  color: #fff;
  font-weight: 700;
}



/* ============================================================
   Auditoría de Conversaciones y Métricas (SNC #8900)
   ============================================================ */

.conversations-filter-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.8rem;
  margin-bottom: 1.2rem;
}

.filter-controls-group {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.6rem;
  flex: 1;
}

.filter-select {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 0.5rem 0.8rem;
  color: #fff;
  font-size: 0.82rem;
  outline: none;
  cursor: pointer;
  transition: all 0.2s ease;
}

.filter-select:hover {
  border-color: rgba(255, 255, 255, 0.25);
  background: rgba(255, 255, 255, 0.08);
}

.filter-select option {
  background: #0f172a;
  color: #fff;
}

.conversations-master-detail {
  display: grid;
  grid-template-columns: 380px 1fr;
  gap: 1.2rem;
  min-height: 650px;
  height: calc(100vh - 280px);
}

.convs-sidebar {
  background: rgba(15, 23, 42, 0.6);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.convs-sidebar-header {
  padding: 0.8rem 1rem;
  border-bottom: 1px solid var(--border-color);
  background: rgba(255, 255, 255, 0.02);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.convs-scroll-list {
  flex: 1;
  overflow-y: auto;
  padding: 0.6rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.conv-item-card {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 0.75rem 0.9rem;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.conv-item-card:hover {
  background: rgba(255, 255, 255, 0.07);
  border-color: rgba(255, 255, 255, 0.2);
  transform: translateX(2px);
}

.conv-item-card.active {
  background: rgba(0, 188, 212, 0.12);
  border-color: #00e5ff;
  box-shadow: 0 0 15px rgba(0, 229, 255, 0.15);
}

.conv-item-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.conv-badge-brand {
  font-size: 0.72rem;
  font-weight: 700;
  padding: 0.15rem 0.5rem;
  border-radius: 4px;
  text-transform: uppercase;
}

.brand-xhost-badge { background: rgba(0, 188, 212, 0.2); color: #00e5ff; border: 1px solid rgba(0, 188, 212, 0.4); }
.brand-xpyme-badge { background: rgba(59, 130, 246, 0.2); color: #60a5fa; border: 1px solid rgba(59, 130, 246, 0.4); }
.brand-xcom-badge { background: rgba(245, 158, 11, 0.2); color: #fbbf24; border: 1px solid rgba(245, 158, 11, 0.4); }
.brand-xcoin-badge { background: rgba(168, 85, 247, 0.2); color: #c084fc; border: 1px solid rgba(168, 85, 247, 0.4); }
.brand-papelplus-badge { background: rgba(236, 72, 153, 0.2); color: #f472b6; border: 1px solid rgba(236, 72, 153, 0.4); }

.conv-item-sender {
  font-size: 0.85rem;
  font-weight: 600;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.conv-item-preview {
  font-size: 0.78rem;
  color: var(--text-muted);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  line-height: 1.4;
}

.conv-item-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.72rem;
  color: var(--text-dim);
  padding-top: 0.3rem;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.convs-pagination {
  padding: 0.6rem 1rem;
  border-top: 1px solid var(--border-color);
  background: rgba(255, 255, 255, 0.02);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.conv-detail-container {
  background: rgba(15, 23, 42, 0.7);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  position: relative;
}

.conv-detail-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100%;
  padding: 2rem;
  text-align: center;
}

.conv-detail-content {
  display: flex;
  flex-direction: column;
  height: 100%;
}

.conv-detail-header {
  padding: 1rem 1.4rem;
  border-bottom: 1px solid var(--border-color);
  background: rgba(255, 255, 255, 0.03);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.8rem;
}

.conv-detail-title-group {
  display: flex;
  align-items: center;
  gap: 0.8rem;
}

.conv-detail-meta {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.conv-messages-timeline {
  flex: 1;
  overflow-y: auto;
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1.2rem;
}

.chat-turn {
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
}

.bubble-user {
  align-self: flex-end;
  max-width: 80%;
  background: #1e3a8a;
  border: 1px solid rgba(59, 130, 246, 0.4);
  border-radius: 12px 12px 2px 12px;
  padding: 0.8rem 1.1rem;
  color: #fff;
  font-size: 0.88rem;
  line-height: 1.5;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.bubble-assistant {
  align-self: flex-start;
  max-width: 85%;
  background: rgba(30, 41, 59, 0.85);
  border: 1px solid var(--border-color);
  border-left: 3px solid #00e5ff;
  border-radius: 12px 12px 12px 2px;
  padding: 1rem 1.2rem;
  color: #e2e8f0;
  font-size: 0.88rem;
  line-height: 1.6;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.bubble-assistant strong {
  color: #fff;
}

.bubble-assistant a {
  color: #38bdf8;
  text-decoration: underline;
}

.bubble-assistant p {
  margin-bottom: 0.5rem;
}

.bubble-meta {
  font-size: 0.72rem;
  color: var(--text-dim);
  margin-top: 0.4rem;
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.badge-tag {
  display: inline-block;
  font-size: 0.7rem;
  padding: 0.12rem 0.45rem;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-muted);
}

.badge-tag.channel-web { background: rgba(56, 189, 248, 0.15); color: #38bdf8; }
.badge-tag.channel-whatsapp { background: rgba(34, 197, 94, 0.15); color: #22c55e; }
.badge-tag.channel-email { background: rgba(168, 85, 247, 0.15); color: #c084fc; }

.badge-tag.triage-auto { background: rgba(34, 197, 94, 0.15); color: #22c55e; border: 1px solid rgba(34, 197, 94, 0.3); }
.badge-tag.triage-esc { background: rgba(249, 115, 22, 0.15); color: #f97316; border: 1px solid rgba(249, 115, 22, 0.3); }

/* Filtro Temporal de Métricas (SNC #7691) */
.metrics-action-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
  background: rgba(15, 23, 42, 0.45);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 0.85rem 1.25rem;
  margin-bottom: 1.5rem;
}

.metrics-filter-container {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.85rem;
}

.metrics-filter-label {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.metrics-select-wrapper {
  position: relative;
  display: inline-block;
}

.metrics-time-select {
  background: rgba(17, 24, 39, 0.85);
  border: 1px solid rgba(0, 229, 255, 0.35);
  color: #fff;
  padding: 0.5rem 1rem;
  border-radius: var(--radius-md);
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  min-width: 250px;
}

.metrics-time-select:hover,
.metrics-time-select:focus {
  border-color: #00e5ff;
  box-shadow: 0 0 12px rgba(0, 229, 255, 0.25);
}

.metrics-period-badge {
  background: rgba(0, 229, 255, 0.12);
  color: #00e5ff;
  border: 1px solid rgba(0, 229, 255, 0.3);
  padding: 0.35rem 0.75rem;
  border-radius: 9999px;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.metrics-period-badge::before {
  content: "";
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #00e5ff;
  box-shadow: 0 0 6px #00e5ff;
}

.metrics-actions-right {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

/* Métricas Dashboard (SNC #8900) */
.metrics-kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.kpi-card {
  background: rgba(15, 23, 42, 0.65);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 1.2rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  transition: all 0.2s ease;
}

.kpi-card:hover {
  transform: translateY(-2px);
  border-color: rgba(255, 255, 255, 0.2);
}

.kpi-icon {
  width: 48px;
  height: 48px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.08);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
}

.kpi-info {
  display: flex;
  flex-direction: column;
}

.kpi-label {
  font-size: 0.78rem;
  color: var(--text-muted);
  font-weight: 600;
}

.kpi-value {
  font-size: 1.5rem;
  font-weight: 700;
  color: #fff;
  margin: 0.1rem 0;
}

.kpi-subtext {
  font-size: 0.72rem;
  color: var(--text-dim);
}

.metrics-panels-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
}

@media (max-width: 1024px) {
  .conversations-master-detail {
    grid-template-columns: 1fr;
    height: auto;
  }
  .metrics-panels-grid {
    grid-template-columns: 1fr;
  }
}

.metric-panel {
  background: rgba(15, 23, 42, 0.65);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 1.2rem 1.4rem;
}

.metric-panel-title {
  color: #fff;
  font-size: 0.95rem;
  margin-bottom: 1.2rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.brand-metric-row {
  margin-bottom: 1rem;
}

.brand-metric-header {
  display: flex;
  justify-content: space-between;
  font-size: 0.82rem;
  color: #fff;
  margin-bottom: 0.35rem;
}

.metric-progress-track {
  height: 8px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 4px;
  overflow: hidden;
}

.metric-progress-fill {
  height: 100%;
  border-radius: 4px;
  transition: width 0.5s ease;
}

.channel-tag-group {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-bottom: 1.5rem;
}

.channel-metric-badge {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 0.6rem 1rem;
  display: flex;
  align-items: center;
  gap: 0.8rem;
  flex: 1;
}


/* ==========================================================================
   Matriz Humana / Escalamiento Interactivo (SNC #2272)
   ========================================================================== */
.escalation-brand-selector {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  align-items: center;
}

.brand-chip {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  color: var(--text-muted);
  padding: 0.5rem 1rem;
  border-radius: var(--radius-full);
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  transition: all 0.2s ease;
}

.brand-chip:hover {
  border-color: rgba(255, 255, 255, 0.2);
  color: var(--text-main);
  background: var(--bg-card-hover);
}

.brand-chip.active {
  color: #fff;
  border-color: var(--chip-color, var(--accent-teal));
  background: rgba(255, 255, 255, 0.08);
  box-shadow: 0 0 16px rgba(0, 188, 212, 0.15);
}

.chip-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  display: inline-block;
}

.escalation-layout {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.escalation-hero-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
  box-shadow: var(--shadow-card);
}

.escalation-assistant-info {
  display: flex;
  align-items: center;
  gap: 1.25rem;
}

.escalation-assistant-avatar {
  width: 58px;
  height: 58px;
  border-radius: var(--radius-md);
  object-fit: cover;
  border: 2px solid var(--border-color);
  background: rgba(0,0,0,0.3);
}

.escalation-assistant-text h3 {
  font-size: 1.2rem;
  margin-bottom: 0.25rem;
  color: var(--text-main);
}

.escalation-assistant-text p {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.contacts-table-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-card);
}

.contacts-table-header {
  padding: 1.1rem 1.5rem;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem;
  background: rgba(255, 255, 255, 0.02);
}

.contacts-table-header h4 {
  font-size: 0.95rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--text-main);
}

.contacts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 1.25rem;
  padding: 1.5rem;
}

.contact-card {
  background: rgba(15, 23, 42, 0.6);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: all 0.2s ease;
  backdrop-filter: blur(8px);
}

.contact-card:hover {
  border-color: rgba(255, 255, 255, 0.2);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.35);
}

.contact-card-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 0.85rem;
}

.contact-name {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-main);
}

.contact-role {
  font-size: 0.82rem;
  color: var(--text-muted);
  margin-top: 0.2rem;
  line-height: 1.35;
}

.contact-details {
  font-size: 0.85rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-bottom: 0.85rem;
}

.contact-detail-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--text-muted);
}

.contact-wa-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  background: rgba(16, 185, 129, 0.12);
  color: #10b981;
  padding: 0.25rem 0.65rem;
  border-radius: var(--radius-full);
  font-size: 0.8rem;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.2s;
  border: 1px solid rgba(16, 185, 129, 0.25);
}

.contact-wa-badge:hover {
  background: rgba(16, 185, 129, 0.25);
  color: #34d399;
  border-color: rgba(16, 185, 129, 0.5);
}

.contact-scope-box {
  background: rgba(0, 0, 0, 0.3);
  padding: 0.6rem 0.85rem;
  border-radius: var(--radius-sm);
  font-size: 0.8rem;
  color: var(--text-dim);
  line-height: 1.45;
  margin-bottom: 0.85rem;
  border-left: 2px solid rgba(255, 255, 255, 0.1);
}

.contact-actions,
.contact-card-actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.5rem;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  padding-top: 0.85rem;
}

.contact-field {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 0.45rem;
  flex-wrap: wrap;
}

.field-icon {
  font-size: 0.95rem;
}

.field-label {
  font-weight: 500;
  color: var(--text-dim);
}

.field-value {
  color: var(--text-main);
  font-weight: 500;
}

.contact-link {
  text-decoration: none;
  color: var(--accent-teal);
  font-weight: 600;
  transition: color 0.2s;
}

.contact-link:hover {
  color: #fff;
  text-decoration: underline;
}

.contact-link.whatsapp-link {
  color: #10b981;
}

.contact-link.whatsapp-link:hover {
  color: #34d399;
}

.contact-link.email-link {
  color: #60a5fa;
}

.contact-link.email-link:hover {
  color: #93c5fd;
}

.escalation-brand-banner {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
  box-shadow: var(--shadow-card);
  margin-bottom: 1.5rem;
}

.brand-banner-info {
  flex: 1;
  min-width: 260px;
}

.brand-banner-title {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin-bottom: 0.35rem;
}

.brand-banner-title h3 {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--text-main);
}

.brand-banner-desc {
  font-size: 0.85rem;
  color: var(--text-muted);
  line-height: 1.4;
}

.brand-banner-meta {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.meta-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-color);
  padding: 0.35rem 0.75rem;
  border-radius: var(--radius-full);
  font-size: 0.8rem;
  color: var(--text-muted);
}

.meta-pill strong {
  color: var(--text-main);
}

.escalation-section-header {
  margin-bottom: 1rem;
}

.escalation-section-header h4 {
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--text-main);
  margin-bottom: 0.2rem;
}

.section-hint {
  font-size: 0.82rem;
  color: var(--text-dim);
}

.escalation-note-panel {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  box-shadow: var(--shadow-card);
  margin-top: 1.5rem;
}

.panel-header h4 {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-main);
  margin-bottom: 0.25rem;
}

.panel-subtitle {
  font-size: 0.82rem;
  color: var(--text-muted);
  margin-bottom: 1rem;
  line-height: 1.4;
}

.form-textarea {
  width: 100%;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 0.85rem;
  color: #fff;
  font-family: inherit;
  font-size: 0.88rem;
  line-height: 1.5;
  resize: vertical;
  outline: none;
}

.form-textarea:focus {
  border-color: var(--accent-teal);
  box-shadow: 0 0 10px rgba(0, 188, 212, 0.2);
}

.escalation-note-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  box-shadow: var(--shadow-card);
}

.escalation-note-card h4 {
  font-size: 0.95rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--text-main);
}

.escalation-note-textarea {
  width: 100%;
  min-height: 110px;
  background: rgba(11, 15, 25, 0.8);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  color: var(--text-main);
  padding: 0.85rem;
  font-family: inherit;
  font-size: 0.85rem;
  line-height: 1.5;
  resize: vertical;
  margin: 0.85rem 0;
  transition: border-color 0.2s;
}

.escalation-note-textarea:focus {
  outline: none;
  border-color: var(--accent-teal);
  box-shadow: 0 0 0 2px var(--accent-teal-glow);
}

/* ==========================================================================
   Panel de Instrucciones de Ajuste & Feedback Continuo (SNC #7252)
   ========================================================================== */

.conv-feedback-panel {
  border-top: 1px solid var(--border-color);
  background: var(--bg-card);
  transition: all 0.3s ease;
  flex-shrink: 0;
}

.feedback-panel-header {
  padding: 0.75rem 1.4rem;
  background: rgba(255, 255, 255, 0.03);
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: pointer;
  user-select: none;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

.feedback-panel-header:hover {
  background: rgba(255, 255, 255, 0.05);
}

.feedback-panel-title {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.feedback-panel-title h4 {
  font-size: 0.88rem;
  color: #fff;
  margin: 0;
  font-weight: 600;
}

.panel-hint {
  font-size: 0.76rem;
  color: var(--text-muted);
}

.feedback-panel-body {
  padding: 1.2rem 1.4rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  max-height: 480px;
  overflow-y: auto;
  transition: max-height 0.3s ease, padding 0.3s ease;
}

.feedback-panel-body.collapsed {
  max-height: 0;
  padding-top: 0;
  padding-bottom: 0;
  overflow: hidden;
}

.feedback-form-row {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.flex-1 {
  flex: 1;
  min-width: 220px;
}

.rating-chips-group {
  display: flex;
  gap: 0.4rem;
  flex-wrap: wrap;
}

.rating-chip {
  padding: 0.35rem 0.75rem;
  border-radius: 20px;
  border: 1px solid var(--border-color);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-muted);
  cursor: pointer;
  font-size: 0.76rem;
  font-weight: 500;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.rating-chip:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
}

.rating-chip.active {
  border-color: var(--accent-teal);
  background: rgba(0, 188, 212, 0.15);
  color: var(--accent-teal);
  font-weight: 600;
}

.feedback-form-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
  margin-top: 0.4rem;
}

.conv-feedback-history-section {
  margin-top: 0.8rem;
  padding-top: 0.8rem;
  border-top: 1px dashed var(--border-color);
}

.history-title {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-bottom: 0.6rem;
  font-weight: 600;
}

.feedback-history-cards {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  max-height: 180px;
  overflow-y: auto;
}

.fb-history-item {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 0.65rem 0.9rem;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  transition: border-color 0.2s ease;
}

.fb-history-item:hover {
  border-color: rgba(255, 255, 255, 0.15);
}

.fb-history-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.75rem;
}

.fb-history-text {
  font-size: 0.82rem;
  color: #e2e8f0;
  line-height: 1.4;
}

.fb-history-ideal {
  font-size: 0.78rem;
  color: var(--accent-emerald);
  background: rgba(16, 185, 129, 0.06);
  padding: 0.4rem 0.6rem;
  border-radius: var(--radius-sm);
}

.fb-history-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.72rem;
  color: var(--text-dim);
  margin-top: 0.2rem;
}

/* Badges de Estado Feedback */
.badge-pending {
  background: rgba(245, 158, 11, 0.15) !important;
  color: #f59e0b !important;
  border: 1px solid rgba(245, 158, 11, 0.3) !important;
}

.badge-applied {
  background: rgba(34, 197, 94, 0.15) !important;
  color: #22c55e !important;
  border: 1px solid rgba(34, 197, 94, 0.3) !important;
}

.badge-dismissed {
  background: rgba(148, 163, 184, 0.15) !important;
  color: #94a3b8 !important;
  border: 1px solid rgba(148, 163, 184, 0.3) !important;
}

/* Tarjeta en Tab 4 Auditoría y Feedback */
.feedback-card-item {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 1.2rem;
  margin-bottom: 1rem;
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
}

.feedback-card-item:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.fb-card-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.6rem;
}

.fb-card-query-box {
  background: rgba(0, 0, 0, 0.2);
  border-left: 3px solid var(--accent-teal);
  padding: 0.6rem 0.8rem;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  font-size: 0.84rem;
}

.fb-card-instruction-box {
  background: rgba(245, 158, 11, 0.05);
  border-left: 3px solid #f59e0b;
  padding: 0.6rem 0.8rem;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  font-size: 0.84rem;
}

.fb-card-instruction-box.applied {
  background: rgba(34, 197, 94, 0.05);
  border-left-color: #22c55e;
}

.fb-card-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 0.4rem;
  padding-top: 0.6rem;
  border-top: 1px solid rgba(255, 255, 255, 0.04);
}
