/* ==========================================================================
   COMPONENT STYLES - QUICK RABBIT DESIGN SYSTEM v4.2
   ========================================================================== */

/* Buttons */
.btn {
  padding: 8px 18px;
  border: 1px solid transparent;
  border-radius: var(--radius-pill);
  font-weight: 700;
  font-size: 0.82rem;
  letter-spacing: -0.01em;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: all 0.18s cubic-bezier(0.16, 1, 0.3, 1);
  text-decoration: none;
  line-height: 1.2;
  user-select: none;
  white-space: nowrap;
}

.btn:active {
  transform: scale(0.98);
}

.btn-primary-action {
  background: var(--primary);
  color: #FFFFFF;
  border: 1px solid var(--primary);
  box-shadow: 0 4px 14px var(--primary-glow);
}

.btn-primary-action:hover {
  background: var(--btn-dark-hover);
  border-color: var(--btn-dark-hover);
  transform: translateY(-1px);
}

.btn-secondary-action {
  background: var(--bg-surface);
  color: var(--text-primary);
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-subtle);
}

.btn-secondary-action:hover {
  background: var(--bg-surface-subtle);
  border-color: var(--border-strong);
  transform: translateY(-1px);
}

.btn-copy {
  background: var(--bg-surface);
  color: var(--text-secondary);
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-subtle);
}

.btn-copy:hover {
  background: var(--primary-light);
  color: var(--primary);
  border-color: var(--border-accent);
  transform: translateY(-1px);
}

.btn-quick-search {
  position: relative;
  background: #1E293B;
  color: #F8FAFC;
  border: 1px solid #334155;
  padding: 6px 13px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-size: 0.76rem;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 0.3s cubic-bezier(0.22, 1, 0.36, 1);
  flex-shrink: 0;
  overflow: hidden;
}

.btn-quick-search:hover {
  background: var(--primary);
  border-color: var(--primary);
  color: #FFFFFF;
  box-shadow: 0 4px 14px var(--primary-glow);
  transform: translateY(-2px);
}

/* Auto-paste TMS Hero Button Shimmer */
#btn-auto-paste-tms {
  box-shadow: 0 3px 10px rgba(5, 150, 105, 0.35);
  position: relative;
  overflow: hidden;
}

#btn-auto-paste-tms::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 55%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.5), transparent);
  animation: shimmerSweep 3.2s infinite ease-in-out;
}

#btn-auto-paste-tms:hover {
  transform: translateY(-2.5px);
  box-shadow: 0 8px 22px rgba(5, 150, 105, 0.5);
}

.btn-notification {
  position: relative;
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  color: var(--text-primary);
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  font-size: 0.78rem;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 0.3s cubic-bezier(0.22, 1, 0.36, 1);
  box-shadow: var(--shadow-subtle);
  user-select: none;
}

.btn-notification:hover {
  background: var(--primary-light);
  border-color: var(--border-accent);
  color: var(--primary-hover);
  transform: translateY(-2px);
  box-shadow: var(--shadow-sm);
}

.btn-notification.btn-nav-primary {
  background: var(--primary);
  color: #FFFFFF;
  border-color: var(--primary);
}

.btn-notification.btn-nav-primary:hover {
  background: var(--primary-hover);
  border-color: var(--primary-hover);
  color: #FFFFFF;
}

.notification-badge {
  background: #EF4444;
  color: #FFFFFF;
  font-size: 0.65rem;
  font-weight: 800;
  padding: 1px 6px;
  border-radius: var(--radius-full);
  min-width: 16px;
  text-align: center;
  transition: transform 0.3s cubic-bezier(0.22, 1, 0.36, 1);
}

.btn-notification:hover .notification-badge {
  transform: scale(1.15);
}

.btn-notification.btn-nav-primary .notification-badge {
  background: #FFFFFF;
  color: var(--primary);
}

.btn-profile-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  color: var(--text-primary);
  padding: 4px 10px 4px 4px;
  border-radius: var(--radius-full);
  font-size: 0.78rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.22, 1, 0.36, 1);
  user-select: none;
  box-shadow: var(--shadow-subtle);
}

.btn-profile-pill:hover {
  background: var(--primary-light);
  border-color: var(--border-accent);
  color: var(--primary-hover);
  transform: translateY(-2px);
}

.profile-avatar-mini {
  width: 22px;
  height: 22px;
  border-radius: var(--radius-full);
  background: linear-gradient(135deg, var(--primary), #EA580C);
  color: white;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  overflow: hidden;
  transition: transform 0.3s ease;
}

.btn-profile-pill:hover .profile-avatar-mini {
  transform: rotate(8deg) scale(1.12);
}

/* Header Tools Dropdown Menu */
.header-dropdown-menu {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  padding: 6px;
  min-width: 220px;
  z-index: 1000;
  display: flex;
  flex-direction: column;
  gap: 2px;
  animation: fadeIn 0.28s cubic-bezier(0.22, 1, 0.36, 1);
}

.hidden, .agent-switcher-menu.hidden, .header-dropdown-menu.hidden {
  display: none !important;
}

.dropdown-item {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  background: transparent;
  border: none;
  border-radius: var(--radius-xs);
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--text-primary);
  text-decoration: none;
  cursor: pointer;
  transition: all 0.22s ease;
  text-align: left;
}

.dropdown-item:hover {
  background: var(--primary-light);
  color: var(--primary-hover);
  transform: translateX(4px);
}

.dropdown-divider {
  height: 1px;
  background: var(--border-color);
  margin: 4px 6px;
}

/* Channel Navigation Tabs (Vercel Clean Segmented Control) */
.nav-tabs {
  display: flex;
  background: var(--bg-surface-subtle);
  padding: 4px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--border-color);
  gap: 4px;
}

.tab-btn {
  padding: 6px 16px;
  border: none;
  background: transparent;
  border-radius: var(--radius-pill);
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-muted);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 0.18s ease;
}

.tab-btn.active {
  background: #FFFFFF;
  color: var(--text-primary);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
  font-weight: 700;
}

.tab-btn:hover:not(.active) {
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.4);
}

/* Progress bar with liquid flowing gradient - Slower Flow */
#form-progress-bar {
  background: linear-gradient(90deg, #F97316, #FB923C, #F97316) !important;
  background-size: 200% 100% !important;
  animation: liquidProgress 4.5s infinite linear;
  box-shadow: 0 0 10px rgba(249, 115, 22, 0.45);
}

/* Form Fields & Controls */
.form-group {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-bottom: 8px;
  animation: expandSmooth 0.35s cubic-bezier(0.22, 1, 0.36, 1);
}

.form-label {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.35px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1px;
}

.form-label .subtext {
  text-transform: none;
  font-weight: 700;
  color: var(--primary);
  font-size: 0.7rem;
}

.form-input, .form-select, .form-textarea {
  width: 100%;
  padding: 7px 10px;
  border: 1.5px solid var(--border-color);
  border-radius: var(--radius-sm);
  font-size: 0.84rem;
  color: var(--text-primary);
  background: var(--bg-surface-inset);
  transition: all 0.15s ease;
  box-sizing: border-box;
}

.form-input:hover, .form-select:hover, .form-textarea:hover {
  background: var(--bg-surface-subtle);
  border-color: var(--border-strong);
}

.form-input::placeholder,
.form-textarea::placeholder {
  color: var(--text-light);
}

.form-input:focus, .form-select:focus, .form-textarea:focus {
  outline: none;
  background: var(--bg-surface-subtle);
  border-color: var(--primary);
  box-shadow: 0 0 0 1px var(--primary);
}

.form-textarea {
  resize: vertical;
  min-height: 56px;
  line-height: 1.4;
}

/* Form Segmentation & Modern Segment Cards */
.form-segment-card {
  background: var(--bg-surface-subtle);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 10px 12px;
  margin-bottom: 8px;
  box-shadow: var(--shadow-subtle);
  transition: all 0.35s cubic-bezier(0.22, 1, 0.36, 1);
  animation: expandSmooth 0.45s cubic-bezier(0.22, 1, 0.36, 1);
}

.form-segment-card:hover {
  border-color: var(--border-strong);
  box-shadow: var(--shadow-sm);
}

.form-segment-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
  padding-bottom: 6px;
  border-bottom: 1px dashed var(--border-color);
}

.form-segment-title {
  font-size: 0.72rem;
  font-weight: 800;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.form-sub-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 8px 10px;
  box-shadow: var(--shadow-subtle);
  animation: expandSmooth 0.4s cubic-bezier(0.22, 1, 0.36, 1);
}

.false-report-card {
  background: rgba(249, 115, 22, 0.12);
  border: 1.5px dashed var(--primary);
  border-radius: var(--radius-sm);
  padding: 8px 12px;
  transition: all 0.3s cubic-bezier(0.22, 1, 0.36, 1);
  animation: expandSmooth 0.4s cubic-bezier(0.22, 1, 0.36, 1);
}

.false-report-card:hover {
  background: var(--primary-light);
  transform: translateY(-1.5px);
}

/* Radio Tiles - Incident Selector */
.incident-selector {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
}

.radio-card {
  position: relative;
}

.radio-card input {
  position: absolute;
  opacity: 0;
  cursor: pointer;
}

.radio-label {
  display: flex;
  flex-direction: column;
  padding: 8px 12px;
  border: 1.5px solid var(--border-color);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.32s cubic-bezier(0.22, 1, 0.36, 1);
  background: var(--bg-surface);
  height: 100%;
  box-shadow: var(--shadow-subtle);
  user-select: none;
}

.radio-label:hover {
  background: var(--bg-surface-subtle);
  border-color: var(--border-strong);
  transform: translateY(-2px);
  box-shadow: var(--shadow-sm);
}

.radio-card input:checked + .radio-label {
  border-color: var(--primary);
  background: #FFF6F3;
  box-shadow: 0 0 0 1px var(--primary), var(--shadow-sm);
  transform: translateY(-1px);
}

.radio-label-title {
  font-weight: 800;
  font-size: 0.8rem;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 4px;
}

.radio-card input:checked + .radio-label .radio-label-title {
  color: var(--primary-hover);
}

.radio-label-desc {
  font-size: 0.68rem;
  color: var(--text-muted);
  margin-top: 1px;
  line-height: 1.2;
}

/* Alert Banners */
.alert-banner {
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  font-size: 0.76rem;
  line-height: 1.35;
  display: flex;
  align-items: flex-start;
  gap: 8px;
  font-weight: 600;
  border: 1px solid transparent;
  animation: expandSmooth 0.4s cubic-bezier(0.22, 1, 0.36, 1);
  flex-shrink: 0;
}

.alert-banner.info {
  background-color: var(--info-bg);
  color: var(--info-text);
  border-color: var(--info-border);
}

.alert-banner.danger {
  background-color: var(--danger-bg);
  color: var(--danger-text);
  border-color: var(--danger-border);
}

.alert-banner.warning {
  background-color: var(--warning-bg);
  color: var(--warning-text);
  border-color: var(--warning-border);
  animation: warningPulse 4s infinite ease-in-out;
}

/* Live Preview Box */
.preview-box {
  background: var(--bg-surface-subtle);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 10px 12px;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-height: 140px;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.preview-badge {
  font-size: 0.7rem;
  font-weight: 800;
  padding: 2px 8px;
  background: var(--primary-light);
  color: var(--primary-hover);
  border-radius: var(--radius-full);
  text-transform: uppercase;
}

.editable-template {
  outline: none;
  white-space: pre-wrap;
  font-size: 0.85rem;
  line-height: 1.5;
  color: var(--text-primary);
  background: var(--bg-surface);
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  border: 1.5px solid var(--border-color);
  flex: 1;
  min-height: 130px;
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.02);
  overflow-y: auto;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.editable-template:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3.5px var(--primary-glow-focus);
}

.editable-template.has-wildcard {
  border-color: var(--danger) !important;
  box-shadow: 0 0 0 3px var(--danger-bg) !important;
}

/* Action Group */
.action-group {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  flex-shrink: 0;
}

/* Rule Items in Footer */
.rule-item {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 8px 10px;
  font-size: 0.76rem;
  line-height: 1.35;
  display: flex;
  flex-direction: column;
  gap: 3px;
  transition: all 0.15s ease;
}

.rule-item:hover {
  border-color: var(--border-accent);
  box-shadow: var(--shadow-sm);
}

.rule-item-title {
  font-weight: 800;
  color: var(--primary-hover);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.rule-item-body {
  color: var(--text-muted);
}

.rule-pill {
  font-size: 0.65rem;
  background: var(--primary-light);
  color: var(--primary-hover);
  padding: 1px 6px;
  border-radius: var(--radius-xs);
  font-weight: 700;
}

/* Modals */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(15, 23, 42, 0.65);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.modal-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

.modal-container {
  background: var(--bg-surface);
  width: 100%;
  max-width: 780px;
  max-height: 85vh;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-lg);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  animation: fadeIn 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.modal-header {
  padding: 14px 20px;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: var(--sidebar-bg);
}

.modal-header h3 {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.02rem;
  color: var(--text-primary);
}

.modal-body {
  padding: 18px 20px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

/* History Cards */
.history-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  transition: all 0.15s ease;
  box-shadow: var(--shadow-subtle);
}

.history-card:hover {
  border-color: var(--border-strong);
  box-shadow: var(--shadow-sm);
}

.history-badge {
  font-size: 0.7rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: var(--radius-xs);
  text-transform: uppercase;
}

.btn-history-action {
  padding: 5px 10px;
  font-size: 0.75rem;
  font-weight: 700;
  border-radius: var(--radius-xs);
  border: 1px solid var(--border-color);
  background: var(--bg-surface-subtle);
  color: var(--text-primary);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  transition: all 0.12s ease;
}

.btn-history-action:hover {
  background: var(--primary-light);
  border-color: var(--primary);
  color: var(--primary-hover);
}

.btn-history-action.danger {
  border-color: var(--danger-border) !important;
  background: var(--danger-bg) !important;
  color: var(--danger-text) !important;
}

.btn-history-action.danger:hover {
  background: var(--danger-border) !important;
}

.history-date-header {
  background: var(--primary-light);
  color: var(--primary-hover);
  font-weight: 800;
  font-size: 0.82rem;
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  margin-top: 10px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-left: 4px solid var(--primary);
}

/* Toast Notifications */
.toast {
  position: fixed;
  bottom: 20px;
  right: 20px;
  background: #0F172A;
  color: #FFFFFF;
  padding: 10px 18px;
  border-radius: var(--radius-md);
  font-weight: 700;
  font-size: 0.84rem;
  display: flex;
  align-items: center;
  gap: 8px;
  box-shadow: var(--shadow-lg);
  transform: translateY(100px);
  opacity: 0;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  z-index: 2000;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.toast.show {
  transform: translateY(0);
  opacity: 1;
}

/* ==========================================================================
   AGENT QUICK SWITCHER (1-CLICK TAKEOVER) & VERCEL ACTION BUTTONS
   ========================================================================== */

.agent-switcher-wrap {
  position: relative;
  display: inline-block;
}

.agent-switcher-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  width: 290px;
  z-index: 1100;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  animation: fadeIn 0.18s cubic-bezier(0.16, 1, 0.3, 1);
}

.agent-switcher-header {
  padding: 10px 14px;
  background: var(--bg-surface-subtle);
  border-bottom: 1px solid var(--border-color);
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.agent-switcher-title {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: -0.02em;
}

.agent-switcher-subtitle {
  font-size: 0.68rem;
  color: var(--text-muted);
}

.agent-switcher-list {
  display: flex;
  flex-direction: column;
  padding: 6px;
  max-height: 280px;
  overflow-y: auto;
  gap: 4px;
}

.agent-switcher-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 10px;
  border-radius: var(--radius-xs);
  cursor: pointer;
  transition: all 0.15s ease;
  border: 1px solid transparent;
}

.agent-switcher-item:hover {
  background: var(--primary-light);
  border-color: var(--border-accent);
}

.agent-switcher-item.active-item {
  background: var(--primary-light);
  border-color: var(--border-accent);
  cursor: default;
}

.agent-switcher-item-left {
  display: flex;
  align-items: center;
  gap: 10px;
  overflow: hidden;
}

.agent-switcher-avatar-img {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  object-fit: cover;
  border: 1.5px solid var(--border-color);
}

.agent-switcher-avatar-initials {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--primary-light);
  color: var(--primary);
  font-weight: 700;
  font-size: 11px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border-accent);
}

.agent-switcher-item-info {
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.agent-switcher-item-name {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.agent-switcher-item-role {
  font-size: 0.67rem;
  color: var(--text-muted);
}

.agent-switcher-check {
  color: var(--primary);
  font-weight: 800;
  font-size: 0.85rem;
}

.btn-switch-oneclick {
  background: var(--btn-dark);
  color: #FFFFFF;
  border: none;
  font-size: 0.7rem;
  font-weight: 600;
  padding: 4px 8px;
  border-radius: var(--radius-xs);
  cursor: pointer;
  transition: all 0.15s ease;
}

.btn-switch-oneclick:hover {
  background: var(--btn-dark-hover);
}

.agent-switcher-footer {
  padding: 6px;
  background: var(--bg-surface-subtle);
  border-top: 1px solid var(--border-color);
  display: flex;
  gap: 6px;
}

.agent-switcher-footer-btn {
  flex: 1;
  padding: 6px 8px;
  font-size: 0.72rem;
  font-weight: 600;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-xs);
  background: var(--bg-surface);
  color: var(--text-secondary);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  transition: all 0.15s ease;
}

.agent-switcher-footer-btn:hover {
  background: var(--bg-surface-subtle);
  color: var(--text-primary);
}

.agent-switcher-footer-btn.danger {
  color: var(--danger-text);
  border-color: var(--danger-border);
}

.agent-switcher-footer-btn.danger:hover {
  background: var(--danger-bg);
}

/* Specific Vercel Clean Action Buttons */
.btn-send-review {
  background: var(--btn-dark) !important;
  color: #FFFFFF !important;
  border: 1px solid var(--btn-dark) !important;
  font-weight: 600 !important;
  font-size: 0.84rem !important;
  grid-column: 1 / -1;
  min-height: 40px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.06) !important;
}

.btn-send-review:hover {
  background: var(--btn-dark-hover) !important;
  border-color: var(--btn-dark-hover) !important;
  transform: translateY(-1px);
}

.btn-mark-done {
  background: var(--primary) !important;
  color: #FFFFFF !important;
  border: 1px solid var(--primary) !important;
  font-weight: 600 !important;
  font-size: 0.84rem !important;
  grid-column: 1 / -1;
  min-height: 40px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.06) !important;
}

.btn-mark-done:hover {
  background: var(--primary-hover) !important;
  border-color: var(--primary-hover) !important;
  transform: translateY(-1px);
}

.btn-tms-paste-highlight {
  background: var(--btn-dark) !important;
  border-color: #27272A !important;
  color: #FFFFFF !important;
  font-weight: 600;
}

.btn-tms-paste-highlight:hover {
  background: #27272A !important;
  border-color: #3F3F46 !important;
}

.btn-review-queue-pill {
  background: var(--primary-light) !important;
  color: var(--primary-text) !important;
  border: 1px solid var(--border-accent) !important;
  font-weight: 600 !important;
}

.btn-review-queue-pill:hover {
  background: #FED7AA !important;
  color: var(--primary-hover) !important;
}

/* ==========================================================================
   LOGIN WALL RECOGNIZED PROFILE SELECTOR
   ========================================================================== */

.wall-profile-cards-grid {
  display: flex;
  flex-direction: column;
  gap: 6px;
  max-height: 190px;
  overflow-y: auto;
  padding: 2px;
}

.wall-profile-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 12px;
  background: var(--bg-surface-subtle);
  border: 1.5px solid var(--border-color);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.15s ease;
  user-select: none;
}

.wall-profile-card:hover {
  background: var(--primary-light);
  border-color: var(--border-accent);
}

.wall-profile-card.selected {
  background: var(--primary-light);
  border-color: var(--primary);
  box-shadow: 0 0 0 2px var(--primary-glow);
}

.wall-profile-card-left {
  display: flex;
  align-items: center;
  gap: 10px;
  overflow: hidden;
}

.wall-profile-avatar-img {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  object-fit: cover;
  border: 1.5px solid var(--border-color);
}

.wall-profile-avatar-initials {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--primary);
  color: #FFFFFF;
  font-weight: 700;
  font-size: 13px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.wall-profile-card-info {
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.wall-profile-card-name {
  font-size: 0.84rem;
  font-weight: 600;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.wall-profile-card-role {
  font-size: 0.68rem;
  color: var(--text-muted);
}

.wall-profile-radio-dot {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  border: 1.5px solid var(--border-strong);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: all 0.15s ease;
}

.wall-profile-card.selected .wall-profile-radio-dot {
  border-color: var(--primary);
  background: var(--primary);
}

.wall-profile-card.selected .wall-profile-radio-dot::after {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #FFFFFF;
}





/* ==========================================================================
   MOBILE NAV DRAWER & BURGER MENU (COLAPSO RESPONSIVO SIN PERDER FUNCIONES)
   ========================================================================== */

/* En escritorios grandes, ocultar botón hamburguesa */
.btn-mobile-burger {
  display: none !important;
}

/* En tablets y móviles (o pantalla en horizontal reducida), mostrar hamburguesa y compactar header */
@media (max-width: 1024px), (max-height: 650px) {
  .btn-mobile-burger {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 32px !important;
    height: 32px !important;
    min-width: 32px !important;
    padding: 0 !important;
    border-radius: var(--radius-sm) !important;
    background: var(--bg-surface-subtle) !important;
    border: 1px solid var(--border-color) !important;
    color: var(--text-primary) !important;
    cursor: pointer !important;
  }

  .btn-mobile-burger:hover {
    background: var(--primary-light) !important;
    color: var(--primary) !important;
  }

  /* Ocultar botones secundarios sueltos del header que saturan la vista */
  #btn-open-portal-aliada,
  #btn-theme-toggle-header,
  .header-dropdown-wrap,
  .toolbar-divider {
    display: none !important;
  }
}

/* ESTRUCTURA DEL DRAWER OVERLAY */
.mobile-drawer-overlay {
  position: fixed;
  inset: 0;
  z-index: 9999999 !important;
  display: flex;
  justify-content: flex-end;
  visibility: visible;
  transition: visibility 0.25s ease;
}

.mobile-drawer-overlay.hidden {
  display: none !important;
  visibility: hidden;
}

.mobile-drawer-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(29, 28, 21, 0.45);
  backdrop-filter: blur(4px);
  animation: fadeIn 0.2s ease;
}

.mobile-drawer-panel {
  position: relative;
  width: 320px;
  max-width: 88vw;
  height: 100%;
  height: 100dvh;
  background: var(--bg-surface, #FFFFFF);
  box-shadow: -6px 0 30px rgba(0, 0, 0, 0.2);
  display: flex;
  flex-direction: column;
  z-index: 2;
  overflow: hidden;
  animation: slideInRight 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes slideInRight {
  from { transform: translateX(100%); }
  to { transform: translateX(0); }
}

.mobile-drawer-header {
  padding: 14px 16px 10px;
  background: var(--bg-surface-subtle, #F9F3E8);
  border-bottom: 1px solid var(--border-color, #EDE8DD);
  display: flex;
  flex-direction: column;
  gap: 10px;
  flex-shrink: 0;
}

.mobile-drawer-close-btn {
  background: transparent;
  border: none;
  font-size: 1.5rem;
  color: var(--text-muted);
  cursor: pointer;
  padding: 0 4px;
  line-height: 1;
}

/* TARJETA DEL ASESOR EN EL MENÚ MÓVIL */
.mobile-agent-card {
  background: var(--bg-surface);
  border: 1.5px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 8px 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  box-shadow: var(--shadow-sm);
}

.mobile-agent-list {
  max-height: 220px;
  overflow-y: auto;
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 6px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  box-shadow: inset 0 2px 6px rgba(0, 0, 0, 0.04);
}

.mobile-agent-list.hidden {
  display: none !important;
}

/* CUERPO Y ITEMS DEL MENÚ MÓVIL */
.mobile-drawer-body {
  flex: 1;
  overflow-y: auto;
  padding: 12px 14px 24px;
  display: flex;
  flex-direction: column;
  gap: 5px;
  -webkit-overflow-scrolling: touch;
}

.mobile-menu-section-title {
  font-size: 0.65rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  margin-bottom: 2px;
  padding: 0 4px;
}

.mobile-menu-item {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 9px 12px;
  border-radius: var(--radius-sm, 10px);
  background: var(--bg-surface-subtle, #F9F3E8);
  border: 1px solid var(--border-subtle, #F3EDE2);
  color: var(--text-primary);
  text-decoration: none;
  cursor: pointer;
  font-family: var(--font-sans);
  text-align: left;
  transition: all 0.15s ease;
  min-height: 46px; /* Altura ergonómica para dedos en móviles */
}

.mobile-menu-item:hover, .mobile-menu-item:active {
  background: #FFFFFF;
  border-color: var(--border-color);
  transform: translateX(3px);
}

.mobile-menu-item.highlight-lime {
  background: var(--accent-lime-bg, rgba(214, 237, 122, 0.28));
  border-color: var(--accent-lime);
  color: var(--accent-lime-text);
}

.mobile-menu-item.danger {
  color: #DC2626;
  background: rgba(239, 68, 68, 0.08);
  border-color: rgba(239, 68, 68, 0.2);
}

.mobile-menu-icon {
  font-size: 1.15rem;
  width: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.mobile-menu-text {
  display: flex;
  flex-direction: column;
  gap: 1px;
  min-width: 0;
  flex: 1;
}

.mobile-menu-name {
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: -0.01em;
}

.mobile-menu-desc {
  font-size: 0.65rem;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}


/* ==========================================================================
   MODAL TOOLBAR UNIFICATION (FASE 3 - normaliza verdes sueltos del historial)
   ========================================================================== */
.modal-toolbar-row {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
}

.modal-toolbar-row .form-select {
  width: auto;
  flex: 0 1 auto;
}

.modal-toolbar-row .form-input {
  width: auto;
  flex: 1 1 180px;
}

.modal-subtle-bar {
  margin-top: 8px;
  padding: 8px 12px;
  background: var(--bg-surface-subtle);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
}

.modal-success-bar {
  margin-top: 6px;
  padding: 8px 12px;
  background: var(--success-bg);
  border: 1px dashed var(--success);
  border-radius: var(--radius-sm);
}

.btn-modal-sm {
  padding: 6px 12px;
  font-size: 0.78rem;
}

.btn-export-action {
  background: var(--success-bg);
  color: var(--success-hover);
  border: 1px solid var(--success-border);
  font-weight: 700;
}

.btn-export-action:hover {
  background: var(--success);
  color: #FFFFFF;
  border-color: var(--success);
  transform: translateY(-1px);
}

.select-forensic {
  background: var(--bg-surface-inset);
  color: var(--success-hover);
  border-color: var(--success);
  font-weight: 700;
}


/* ==========================================================================
   CANAL ALTERNATIVO (nivel 3 de jerarquia de acciones) - discreto
   ========================================================================== */
.btn-channel-alt {
  background: transparent;
  color: var(--text-secondary);
  border: 1px solid var(--border-color);
  font-size: 0.72rem;
  font-weight: 600;
  padding: 6px 10px;
  min-height: 32px;
  box-shadow: none;
}

.btn-channel-alt:hover {
  background: var(--bg-surface-inset);
  color: var(--text-primary);
  border-color: var(--border-strong);
  transform: none;
}
