/**
 * Intel Hub Admin Styles
 * AI-powered extraction of jobs, events, and contacts
 * 
 * HOW TO ADJUST:
 * - Colors use CSS variables from admin-themes.css
 * - Spacing uses rem units (1rem = 16px typically)
 * - Drawer width: adjust .intel-drawer width property
 */

/* ============================================
   UPLOAD AREA
   ============================================ */

.intel-upload-area {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.upload-dropzone {
  border: 2px dashed var(--border-color, #3a4a5a);
  border-radius: 12px;
  padding: 3rem 2rem;
  text-align: center;
  cursor: pointer;
  transition: all 0.3s ease;
  background: var(--card-bg, rgba(30, 40, 50, 0.5));
}

.upload-dropzone:hover,
.upload-dropzone.dragover {
  border-color: var(--accent-color, #f59e0b);
  background: rgba(245, 158, 11, 0.1);
}

.dropzone-content i {
  font-size: 3rem;
  color: var(--text-muted, #8a9aaa);
  margin-bottom: 1rem;
  display: block;
}

.dropzone-content p {
  font-size: 1.1rem;
  color: var(--text-primary, #e0e0e0);
  margin: 0 0 0.5rem;
}

.dropzone-content span {
  font-size: 0.875rem;
  color: var(--text-muted, #8a9aaa);
}

/* Dropzone format badges */
.dropzone-formats {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  justify-content: center;
  margin-top: 1rem;
}

.format-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.25rem 0.6rem;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 4px;
  font-size: 0.7rem;
  color: var(--text-muted, #8a9aaa);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.format-badge i {
  font-size: 0.75rem;
  opacity: 0.8;
}

/* Upload Preview Grid */
.upload-preview {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 1rem;
}

.preview-item {
  position: relative;
  border-radius: 8px;
  overflow: hidden;
  aspect-ratio: 4/3;
  background: var(--card-bg, rgba(30, 40, 50, 0.5));
  border: 1px solid var(--border-color, #3a4a5a);
}

.preview-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.preview-item .remove-preview {
  position: absolute;
  top: 0.5rem;
  right: 0.5rem;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: rgba(239, 68, 68, 0.9);
  color: white;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  transition: transform 0.2s;
}

.preview-item .remove-preview:hover {
  transform: scale(1.1);
}

/* Document Preview Items */
.preview-item.preview-document {
  aspect-ratio: auto;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem;
  min-height: 80px;
}

.preview-document .document-icon {
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(59, 130, 246, 0.15);
  border-radius: 8px;
  flex-shrink: 0;
}

.preview-document .document-icon i {
  font-size: 1.5rem;
  color: #60a5fa;
}

/* Color variations for different file types */
.preview-document .document-icon i.fa-file-pdf {
  color: #ef4444;
}

.preview-document .document-icon i.fa-file-word {
  color: #3b82f6;
}

.preview-document .document-icon i.fa-file-alt {
  color: #8b5cf6;
}

.preview-document .document-info {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.preview-document .document-name {
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-primary, #e0e0e0);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.preview-document .document-size {
  font-size: 0.7rem;
  color: var(--text-muted, #8a9aaa);
}

.preview-document .document-status {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  font-size: 0.7rem;
  padding: 0.15rem 0.4rem;
  border-radius: 3px;
  width: fit-content;
}

.preview-document .document-status.ready {
  background: rgba(16, 185, 129, 0.15);
  color: #34d399;
}

.preview-document .document-status.pending {
  background: rgba(245, 158, 11, 0.15);
  color: #fbbf24;
}

.preview-document .document-status i {
  font-size: 0.6rem;
}

/* Upload Options */
.upload-options {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.upload-options .form-group {
  margin: 0;
}

/* Extract Type Checkboxes */
.extract-type-checkboxes {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.extract-type-checkbox {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.625rem 1rem;
  background: var(--card-bg, rgba(30, 40, 50, 0.5));
  border: 2px solid var(--border-color, #3a4a5a);
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
  user-select: none;
}

.extract-type-checkbox:hover {
  border-color: var(--text-muted, #8a9aaa);
}

.extract-type-checkbox input {
  display: none;
}

.extract-type-checkbox input:checked + .checkbox-icon {
  color: var(--accent-color, #f59e0b);
}

.extract-type-checkbox input:checked ~ .checkbox-label {
  color: var(--text-primary, #e0e0e0);
}

.extract-type-checkbox:has(input:checked) {
  border-color: var(--accent-color, #f59e0b);
  background: rgba(245, 158, 11, 0.1);
}

.checkbox-icon {
  font-size: 1rem;
  color: var(--text-muted, #8a9aaa);
  transition: color 0.2s;
}

.checkbox-label {
  font-size: 0.875rem;
  color: var(--text-muted, #8a9aaa);
  font-weight: 500;
  transition: color 0.2s;
}

.form-hint {
  display: block;
  font-size: 0.75rem;
  color: var(--text-muted, #8a9aaa);
  margin-top: 0.5rem;
}

.required {
  color: #ef4444;
}

@media (max-width: 768px) {
  .extract-type-checkboxes {
    flex-direction: column;
  }
  
  .extract-type-checkbox {
    justify-content: center;
  }
}

/* Upload Actions */
.upload-actions {
  display: flex;
  gap: 1rem;
  justify-content: center;
}

.btn-lg {
  padding: 0.875rem 2rem;
  font-size: 1rem;
}

/* ============================================
   EXTRACTION RESULTS
   ============================================ */

.extraction-results {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.extraction-item {
  background: var(--card-bg, rgba(30, 40, 50, 0.5));
  border: 1px solid var(--border-color, #3a4a5a);
  border-radius: 8px;
  padding: 1rem;
  display: flex;
  gap: 1rem;
  align-items: flex-start;
}

.extraction-item.type-job {
  border-left: 4px solid #3b82f6;
}

.extraction-item.type-event {
  border-left: 4px solid #8b5cf6;
}

.extraction-item.type-contact {
  border-left: 4px solid #10b981;
}

.extraction-checkbox {
  margin-top: 0.25rem;
}

.extraction-checkbox input[type="checkbox"] {
  width: 18px;
  height: 18px;
  cursor: pointer;
}

.extraction-content {
  flex: 1;
  min-width: 0;
}

.extraction-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.5rem;
}

.extraction-type {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  padding: 0.25rem 0.5rem;
  border-radius: 4px;
  background: var(--accent-color, #f59e0b);
  color: #000;
}

.extraction-type.type-job {
  background: #3b82f6;
  color: white;
}

.extraction-type.type-event {
  background: #8b5cf6;
  color: white;
}

.extraction-type.type-contact {
  background: #10b981;
  color: white;
}

.extraction-title {
  font-weight: 600;
  color: var(--text-primary, #e0e0e0);
  font-size: 1rem;
}

.extraction-confidence {
  font-size: 0.75rem;
  color: var(--text-muted, #8a9aaa);
  margin-left: auto;
}

.extraction-confidence.high {
  color: #10b981;
}

.extraction-confidence.medium {
  color: #f59e0b;
}

.extraction-confidence.low {
  color: #ef4444;
}

.extraction-details {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 0.5rem;
  font-size: 0.875rem;
  color: var(--text-secondary, #b0b0b0);
}

.extraction-detail {
  display: flex;
  gap: 0.5rem;
}

.extraction-detail-label {
  color: var(--text-muted, #8a9aaa);
  min-width: 80px;
}

.extraction-industries {
  display: flex;
  flex-wrap: wrap;
  gap: 0.375rem;
  margin-top: 0.5rem;
}

.industry-chip {
  font-size: 0.7rem;
  padding: 0.2rem 0.5rem;
  border-radius: 9999px;
  background: rgba(245, 158, 11, 0.2);
  color: var(--accent-color, #f59e0b);
  border: 1px solid rgba(245, 158, 11, 0.3);
}

.extraction-actions {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.extraction-actions .btn {
  padding: 0.375rem 0.75rem;
  font-size: 0.8rem;
}

/* ============================================
   FILTER TABS
   ============================================ */

.intel-tabs {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 1rem;
  flex-wrap: wrap;
}

.intel-tab {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.625rem 1rem;
  background: var(--card-bg, rgba(30, 40, 50, 0.5));
  border: 1px solid var(--border-color, #3a4a5a);
  border-radius: 8px;
  color: var(--text-secondary, #b0b0b0);
  cursor: pointer;
  transition: all 0.2s;
  font-size: 0.875rem;
}

.intel-tab:hover {
  background: rgba(245, 158, 11, 0.1);
  border-color: var(--accent-color, #f59e0b);
}

.intel-tab.active {
  background: var(--accent-color, #f59e0b);
  border-color: var(--accent-color, #f59e0b);
  color: #000;
}

.intel-tab.active .tab-count {
  background: rgba(0, 0, 0, 0.2);
  color: #000;
}

.tab-count {
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.125rem 0.5rem;
  border-radius: 9999px;
  background: var(--border-color, #3a4a5a);
  color: var(--text-muted, #8a9aaa);
}

/* Sent tab - distinct styling */
.intel-tab.sent-tab {
  border-color: rgba(34, 197, 94, 0.3);
}

.intel-tab.sent-tab:hover {
  background: rgba(34, 197, 94, 0.1);
  border-color: rgba(34, 197, 94, 0.5);
}

.intel-tab.sent-tab.active {
  background: #22c55e;
  border-color: #22c55e;
  color: #000;
}

.intel-tab.sent-tab .tab-count {
  background: rgba(34, 197, 94, 0.2);
  color: #22c55e;
}

.intel-tab.sent-tab.active .tab-count {
  background: rgba(0, 0, 0, 0.2);
  color: #000;
}

/* ============================================
   SEARCH AND FILTERS
   ============================================ */

/* ============================================
   INTEL TOOLBAR - Compact Filter/Sort Bar
   ============================================ */

.intel-toolbar {
  background: var(--card-bg, rgba(30, 40, 50, 0.5));
  border: 1px solid var(--border-color, #3a4a5a);
  border-radius: 10px;
  padding: 0.75rem;
  margin-bottom: 1rem;
}

.toolbar-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

/* Search Input */
.toolbar-search {
  position: relative;
  flex: 1;
  min-width: 150px;
  max-width: 220px;
}

.toolbar-search i {
  position: absolute;
  left: 0.75rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted, #8a9aaa);
  font-size: 0.8rem;
}

.toolbar-search input {
  width: 100%;
  padding: 0.5rem 0.75rem 0.5rem 2rem;
  background: var(--input-bg, rgba(20, 30, 40, 0.6));
  border: 1px solid var(--border-color, #3a4a5a);
  border-radius: 6px;
  color: var(--text-primary, #e0e0e0);
  font-size: 0.8rem;
}

.toolbar-search input:focus {
  outline: none;
  border-color: var(--accent-color, #f59e0b);
}

/* Filter Dropdowns */
.toolbar-filters {
  display: flex;
  gap: 0.375rem;
  flex-wrap: wrap;
}

.toolbar-filters select {
  padding: 0.5rem 1.5rem 0.5rem 0.625rem;
  background: var(--input-bg, rgba(20, 30, 40, 0.6));
  border: 1px solid var(--border-color, #3a4a5a);
  border-radius: 6px;
  color: var(--text-primary, #e0e0e0);
  font-size: 0.75rem;
  cursor: pointer;
  appearance: none;
  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='%238a9aaa' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.5rem center;
  min-width: 80px;
}

.toolbar-filters select:focus {
  outline: none;
  border-color: var(--accent-color, #f59e0b);
}

.toolbar-filters select:not(:has(option[value=""]:checked)) {
  border-color: var(--accent-color, #f59e0b);
  background-color: rgba(245, 158, 11, 0.1);
}

/* Sort Controls */
.toolbar-sort {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  margin-left: auto;
  padding-left: 0.5rem;
  border-left: 1px solid var(--border-color, #3a4a5a);
}

.toolbar-sort select {
  padding: 0.5rem 1.5rem 0.5rem 0.625rem;
  background: var(--input-bg, rgba(20, 30, 40, 0.6));
  border: 1px solid var(--border-color, #3a4a5a);
  border-radius: 6px;
  color: var(--text-primary, #e0e0e0);
  font-size: 0.75rem;
  cursor: pointer;
  appearance: none;
  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='%238a9aaa' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.5rem center;
}

.sort-direction-btn {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--input-bg, rgba(20, 30, 40, 0.6));
  border: 1px solid var(--border-color, #3a4a5a);
  border-radius: 6px;
  color: var(--text-muted, #8a9aaa);
  cursor: pointer;
  transition: all 0.2s ease;
}

.sort-direction-btn:hover {
  color: var(--accent-color, #f59e0b);
  border-color: var(--accent-color, #f59e0b);
}

.sort-direction-btn.asc i {
  transform: rotate(180deg);
}

/* Clear Filters Button */
.toolbar-clear {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: 1px solid transparent;
  border-radius: 6px;
  color: var(--text-muted, #8a9aaa);
  cursor: pointer;
  transition: all 0.2s ease;
  opacity: 0.5;
}

.toolbar-clear:hover {
  color: var(--error-color, #ef4444);
  border-color: var(--error-color, #ef4444);
  opacity: 1;
}

.toolbar-clear.has-filters {
  opacity: 1;
  color: var(--accent-color, #f59e0b);
}

/* Active Filters Display */
.toolbar-active-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.375rem;
  margin-top: 0.5rem;
  min-height: 0;
}

.toolbar-active-filters:empty {
  display: none;
}

.active-filter-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  padding: 0.25rem 0.5rem;
  background: rgba(245, 158, 11, 0.15);
  border: 1px solid rgba(245, 158, 11, 0.3);
  border-radius: 4px;
  font-size: 0.7rem;
  color: var(--accent-color, #f59e0b);
}

.active-filter-chip button {
  background: none;
  border: none;
  color: inherit;
  cursor: pointer;
  padding: 0;
  font-size: 0.65rem;
  opacity: 0.7;
}

.active-filter-chip button:hover {
  opacity: 1;
}

/* Responsive - Stack on smaller screens */
@media (max-width: 900px) {
  .toolbar-row {
    flex-wrap: wrap;
  }
  
  .toolbar-search {
    flex: 1 1 100%;
    max-width: none;
    margin-bottom: 0.5rem;
  }
  
  .toolbar-sort {
    margin-left: 0;
    padding-left: 0;
    border-left: none;
  }
}

/* ============================================
   INTEL LIST
   ============================================ */

.intel-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.intel-item {
  background: var(--card-bg, rgba(30, 40, 50, 0.5));
  border: 1px solid var(--border-color, #3a4a5a);
  border-radius: 8px;
  padding: 1rem;
  display: flex;
  gap: 1rem;
  align-items: flex-start;
  cursor: pointer;
  transition: all 0.2s;
}

.intel-item:hover {
  border-color: var(--accent-color, #f59e0b);
  background: rgba(245, 158, 11, 0.05);
}

.intel-item.selected {
  border-color: var(--accent-color, #f59e0b);
  background: rgba(245, 158, 11, 0.1);
}

.intel-item.type-job {
  border-left: 4px solid #3b82f6;
}

.intel-item.type-event {
  border-left: 4px solid #8b5cf6;
}

.intel-item.type-contact {
  border-left: 4px solid #10b981;
}

.intel-item-checkbox {
  margin-top: 0.25rem;
}

.intel-item-checkbox input[type="checkbox"] {
  width: 18px;
  height: 18px;
  cursor: pointer;
}

.intel-item-content {
  flex: 1;
  min-width: 0;
}

.intel-item-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.375rem;
}

.intel-item-type {
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  padding: 0.2rem 0.5rem;
  border-radius: 4px;
}

.intel-item-type.type-job {
  background: #3b82f6;
  color: white;
}

.intel-item-type.type-event {
  background: #8b5cf6;
  color: white;
}

.intel-item-type.type-contact {
  background: #10b981;
  color: white;
}

.intel-item-title {
  font-weight: 600;
  color: var(--text-primary, #e0e0e0);
  font-size: 0.95rem;
}

.intel-item-status {
  margin-left: auto;
  font-size: 0.7rem;
  padding: 0.2rem 0.5rem;
  border-radius: 4px;
  text-transform: uppercase;
}

.intel-item-status.pending {
  background: rgba(245, 158, 11, 0.2);
  color: #f59e0b;
}

.intel-item-status.approved {
  background: rgba(16, 185, 129, 0.2);
  color: #10b981;
}

.intel-item-status.exported {
  background: rgba(59, 130, 246, 0.2);
  color: #3b82f6;
}

.intel-item-status.archived {
  background: rgba(107, 114, 128, 0.2);
  color: #6b7280;
}

.intel-item-status.contacted {
  background: rgba(168, 85, 247, 0.2);
  color: #a855f7;
}

.intel-item-status.sent {
  background: rgba(6, 182, 212, 0.2);
  color: #06b6d4;
}

.intel-item-meta {
  display: flex;
  gap: 1rem;
  font-size: 0.8rem;
  color: var(--text-muted, #8a9aaa);
  flex-wrap: wrap;
}

.intel-item-meta span {
  display: flex;
  align-items: center;
  gap: 0.375rem;
}

.intel-item-industries {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem;
  margin-top: 0.5rem;
}

/* ============================================
   DETAIL DRAWER
   ============================================ */

.intel-drawer {
  position: fixed;
  top: 0;
  right: -500px;
  width: 500px;
  max-width: 100vw;
  height: 100vh;
  background: var(--bg-primary, #1a252f);
  border-left: 1px solid var(--border-color, #3a4a5a);
  z-index: 1000;
  display: flex;
  flex-direction: column;
  transition: right 0.3s ease;
}

.intel-drawer.open {
  right: 0;
}

.drawer-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  z-index: 999;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
}

.drawer-overlay.open {
  opacity: 1;
  visibility: visible;
}

.drawer-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.5rem;
  border-bottom: 1px solid var(--border-color, #3a4a5a);
  background: var(--card-bg, rgba(30, 40, 50, 0.5));
}

.drawer-title {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text-primary, #e0e0e0);
  margin: 0;
}

.drawer-close {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: transparent;
  border: 1px solid var(--border-color, #3a4a5a);
  color: var(--text-muted, #8a9aaa);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
}

.drawer-close:hover {
  background: rgba(239, 68, 68, 0.1);
  border-color: #ef4444;
  color: #ef4444;
}

.drawer-content {
  flex: 1;
  overflow-y: auto;
  padding: 1.5rem;
}

.drawer-section {
  margin-bottom: 1.5rem;
}

.drawer-section-title {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  color: var(--text-muted, #8a9aaa);
  margin-bottom: 0.75rem;
  letter-spacing: 0.5px;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.drawer-section-title i {
  font-size: 0.85rem;
}

.drawer-section-hint {
  font-size: 0.75rem;
  color: var(--text-muted, #8a9aaa);
  margin-bottom: 1rem;
  font-style: italic;
}

/* Platform Required Fields Section */
.drawer-section-platform {
  background: rgba(6, 182, 212, 0.05);
  border: 1px solid rgba(6, 182, 212, 0.2);
  border-radius: 8px;
  padding: 1rem;
  margin-bottom: 1rem;
}

.drawer-section-platform .drawer-section-title {
  color: #06b6d4;
}

/* Recommended Fields Section */
.drawer-section-recommended {
  background: rgba(245, 158, 11, 0.05);
  border: 1px solid rgba(245, 158, 11, 0.2);
  border-radius: 8px;
  padding: 1rem;
  margin-bottom: 1rem;
}

.drawer-section-recommended .drawer-section-title {
  color: #f59e0b;
}

/* ============================================
   DRAWER IMAGES GALLERY
   Shows images with upload/remove/set-primary
   ============================================ */

.drawer-images-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
  gap: 0.75rem;
  margin-top: 0.75rem;
}

.drawer-image {
  position: relative;
  aspect-ratio: 1;
  border-radius: 8px;
  overflow: hidden;
  border: 2px solid var(--border-color, #3a4a5a);
  background: var(--bg-secondary, #1a1a1a);
  cursor: pointer;
  transition: all 0.2s;
}

.drawer-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.drawer-image:hover {
  border-color: var(--accent-color, #f59e0b);
  transform: scale(1.02);
}

.drawer-image.primary {
  border-color: #f59e0b;
  box-shadow: 0 0 0 2px rgba(245, 158, 11, 0.3);
}

.drawer-image.original {
  opacity: 0.7;
}

.drawer-image.original:hover {
  opacity: 1;
}

.drawer-image.cropped {
  border-color: rgba(34, 197, 94, 0.5);
}

.drawer-image.cropped:hover {
  border-color: #22c55e;
}

.drawer-image-badge {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: rgba(0, 0, 0, 0.8);
  color: white;
  font-size: 0.65rem;
  text-transform: uppercase;
  padding: 3px 6px;
  text-align: center;
}

.drawer-image-primary-badge {
  position: absolute;
  top: 4px;
  right: 4px;
  width: 22px;
  height: 22px;
  background: #f59e0b;
  color: #000;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: bold;
}

.drawer-image-actions {
  position: absolute;
  top: 4px;
  left: 4px;
  display: flex;
  gap: 4px;
  opacity: 0;
  transition: opacity 0.2s;
}

.drawer-image:hover .drawer-image-actions {
  opacity: 1;
}

.drawer-image-action {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  border: none;
  background: rgba(0, 0, 0, 0.7);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  cursor: pointer;
  transition: all 0.2s;
}

.drawer-image-action:hover {
  background: rgba(0, 0, 0, 0.9);
  transform: scale(1.1);
}

.drawer-image-action.danger {
  background: rgba(239, 68, 68, 0.8);
}

.drawer-image-action.danger:hover {
  background: #ef4444;
}

/* Add Image Card */
.drawer-image.add-image {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  border-style: dashed;
  border-color: var(--border-color, #3a4a5a);
  background: transparent;
  color: var(--text-muted, #8a9aaa);
  transition: all 0.2s;
}

.drawer-image.add-image:hover {
  border-color: var(--accent-color, #f59e0b);
  color: var(--accent-color, #f59e0b);
  background: rgba(245, 158, 11, 0.05);
}

.drawer-image.add-image i {
  font-size: 1.5rem;
}

.drawer-image.add-image span {
  font-size: 0.7rem;
  font-weight: 500;
}

.drawer-images-hint {
  margin-top: 0.75rem;
  font-size: 0.7rem;
  color: var(--text-muted, #8a9aaa);
  text-align: center;
}

/* Image Preview Modal */
.image-preview-modal {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: none;
}

.image-preview-modal.open {
  display: block;
}

.image-preview-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.92);
  cursor: pointer;
}

.image-preview-content {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  max-width: 90vw;
  max-height: 90vh;
}

.image-preview-content img {
  max-width: 90vw;
  max-height: 85vh;
  object-fit: contain;
  border-radius: 8px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
}

.image-preview-close {
  position: absolute;
  top: -40px;
  right: 0;
  width: 36px;
  height: 36px;
  border: none;
  background: rgba(255, 255, 255, 0.15);
  color: #fff;
  border-radius: 50%;
  font-size: 18px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
}

.image-preview-close:hover {
  background: rgba(255, 255, 255, 0.25);
  transform: scale(1.1);
}

.drawer-field {
  margin-bottom: 1rem;
}

/* Field states for validation */
.drawer-field-missing {
  background: rgba(239, 68, 68, 0.1);
  border-left: 3px solid #ef4444;
  padding: 0.5rem 0.75rem;
  border-radius: 0 4px 4px 0;
  margin-left: -0.75rem;
}

.drawer-field-warning {
  background: rgba(245, 158, 11, 0.1);
  border-left: 3px solid #f59e0b;
  padding: 0.5rem 0.75rem;
  border-radius: 0 4px 4px 0;
  margin-left: -0.75rem;
}

.drawer-field-filled {
  border-left: 3px solid #22c55e;
  padding-left: 0.75rem;
  margin-left: -0.75rem;
}

.drawer-field-empty {
  color: #ef4444;
  font-style: italic;
  font-size: 0.85rem;
}

.drawer-field-warning .drawer-field-empty {
  color: #f59e0b;
}

.drawer-field-label {
  font-size: 0.8rem;
  color: var(--text-muted, #8a9aaa);
  margin-bottom: 0.25rem;
}

.drawer-field-value {
  color: var(--text-primary, #e0e0e0);
  font-size: 0.95rem;
}

.drawer-field-value a {
  color: var(--accent-color, #f59e0b);
  text-decoration: none;
}

.drawer-field-value a:hover {
  text-decoration: underline;
}

.drawer-industries {
  display: flex;
  flex-wrap: wrap;
  gap: 0.375rem;
}

/* Primary industry chip */
.industry-chip.primary {
  background: rgba(6, 182, 212, 0.2);
  color: #06b6d4;
  border: 1px solid rgba(6, 182, 212, 0.3);
}

.drawer-raw-text {
  background: rgba(0, 0, 0, 0.2);
  border-radius: 8px;
  padding: 1rem;
  font-size: 0.85rem;
  color: var(--text-secondary, #b0b0b0);
  white-space: pre-wrap;
  max-height: 200px;
  overflow-y: auto;
}

.drawer-actions {
  padding: 1rem 1.5rem;
  border-top: 1px solid var(--border-color, #3a4a5a);
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.drawer-actions .btn {
  flex: 1;
  min-width: 120px;
}

/* ============================================
   BUTTON VARIANTS
   ============================================ */

.btn-accent {
  background: linear-gradient(135deg, #a855f7, #7c3aed);
  color: white;
  border: none;
}

.btn-accent:hover {
  background: linear-gradient(135deg, #9333ea, #6d28d9);
  transform: translateY(-1px);
}

.btn-accent i {
  margin-right: 0.375rem;
}

/* Send to Platform button - cyan/teal theme */
.btn-platform {
  background: linear-gradient(135deg, #06b6d4, #0891b2);
  color: white;
  border: none;
}

.btn-platform:hover {
  background: linear-gradient(135deg, #0891b2, #0e7490);
  transform: translateY(-1px);
}

.btn-platform i {
  margin-right: 0.375rem;
}

/* ============================================
   LOADING STATES
   ============================================ */

.extracting-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.7);
  z-index: 2000;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1.5rem;
}

.extracting-spinner {
  width: 60px;
  height: 60px;
  border: 4px solid var(--border-color, #3a4a5a);
  border-top-color: var(--accent-color, #f59e0b);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.extracting-text {
  color: var(--text-primary, #e0e0e0);
  font-size: 1.1rem;
  text-align: center;
}

.extracting-subtext {
  color: var(--text-muted, #8a9aaa);
  font-size: 0.875rem;
}

/* ============================================
   RESPONSIVE
   ============================================ */

@media (max-width: 768px) {
  .intel-drawer {
    width: 100%;
    right: -100%;
  }
  
  .extraction-item {
    flex-direction: column;
  }
  
  .extraction-actions {
    flex-direction: row;
    width: 100%;
  }
  
  .extraction-actions .btn {
    flex: 1;
  }
  
  .intel-item {
    flex-direction: column;
  }
  
  .intel-item-header {
    flex-wrap: wrap;
  }
  
  .intel-item-status {
    margin-left: 0;
  }
}

/* ============================================
   EXTRACTED IMAGES
   ============================================ */

.extraction-images {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-right: 1rem;
  flex-shrink: 0;
}

.extraction-image {
  position: relative;
  width: 80px;
  height: 80px;
  border-radius: 8px;
  overflow: hidden;
  border: 2px solid var(--border-color, rgba(255, 255, 255, 0.1));
  background: var(--bg-secondary, #1a1a1a);
}

.extraction-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.extraction-image:hover {
  border-color: var(--accent-color, #f59e0b);
  transform: scale(1.05);
  cursor: pointer;
}

/* Cropped images have accent border */
.extraction-image.cropped {
  border-color: rgba(34, 197, 94, 0.5);
}

.extraction-image.cropped:hover {
  border-color: #22c55e;
}

/* Original screenshots are slightly muted */
.extraction-image.original {
  opacity: 0.7;
  width: 60px;
  height: 60px;
}

.extraction-image.original:hover {
  opacity: 1;
}

.image-type-badge {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: rgba(0, 0, 0, 0.8);
  color: white;
  font-size: 0.6rem;
  text-transform: uppercase;
  padding: 2px 4px;
  text-align: center;
}

/* Image count badge in header */
.extraction-image-count {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.125rem 0.5rem;
  background: rgba(59, 130, 246, 0.15);
  color: #3b82f6;
  border-radius: 4px;
  font-size: 0.7rem;
  font-weight: 600;
}

.extraction-image-count i {
  font-size: 0.65rem;
}

/* Intel item saved images */
.intel-item-images {
  display: flex;
  gap: 0.5rem;
  margin-top: 0.5rem;
}

.intel-item-image {
  width: 48px;
  height: 48px;
  border-radius: 6px;
  overflow: hidden;
  border: 1px solid var(--border-color, rgba(255, 255, 255, 0.1));
}

.intel-item-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Drawer image gallery */
.drawer-images {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.drawer-image {
  position: relative;
  width: 120px;
  height: 120px;
  border-radius: 8px;
  overflow: hidden;
  border: 2px solid var(--border-color, rgba(255, 255, 255, 0.1));
  cursor: pointer;
  transition: all 0.2s ease;
}

.drawer-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.drawer-image:hover {
  border-color: var(--accent-color, #f59e0b);
  transform: scale(1.02);
}

.drawer-image .image-label {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: linear-gradient(transparent, rgba(0, 0, 0, 0.9));
  color: white;
  font-size: 0.7rem;
  padding: 1rem 0.5rem 0.25rem;
  text-align: center;
}

/* Image lightbox */
.image-lightbox {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.95);
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
}

.image-lightbox img {
  max-width: 90%;
  max-height: 90%;
  object-fit: contain;
  border-radius: 8px;
}

.image-lightbox-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background: rgba(255, 255, 255, 0.1);
  border: none;
  color: white;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  font-size: 1.25rem;
  cursor: pointer;
}

.image-lightbox-close:hover {
  background: rgba(255, 255, 255, 0.2);
}

/* ============================================
   DRAWER IMAGES GALLERY
   ============================================ */

.drawer-images-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
  gap: 0.75rem;
  margin-top: 0.5rem;
}

.drawer-image {
  position: relative;
  aspect-ratio: 1;
  border-radius: 10px;
  overflow: hidden;
  cursor: pointer;
  border: 2px solid var(--border-color, rgba(255, 255, 255, 0.1));
  background: var(--bg-secondary, #1a1a1a);
  transition: all 0.2s ease;
}

.drawer-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.drawer-image:hover {
  border-color: var(--accent-color, #f59e0b);
  transform: scale(1.03);
}

.drawer-image.cropped {
  border-color: rgba(34, 197, 94, 0.4);
}

.drawer-image.cropped:hover {
  border-color: #22c55e;
}

.drawer-image.primary {
  border-color: var(--accent-color, #f59e0b);
}

.drawer-image.original {
  opacity: 0.7;
}

.drawer-image.original:hover {
  opacity: 1;
}

.drawer-image-badge {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 4px 6px;
  background: rgba(0, 0, 0, 0.8);
  color: #fff;
  font-size: 0.6rem;
  text-transform: uppercase;
  text-align: center;
  letter-spacing: 0.5px;
}

.drawer-image-primary-badge {
  position: absolute;
  top: 4px;
  right: 4px;
  width: 20px;
  height: 20px;
  background: var(--accent-color, #f59e0b);
  color: #000;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.7rem;
  font-weight: bold;
}

.drawer-images-hint {
  margin-top: 0.5rem;
  font-size: 0.7rem;
  color: var(--text-muted, #8a9aaa);
  text-align: center;
}

/* Add Image Card */
.drawer-image.add-image {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  border: 2px dashed var(--border-color, rgba(255, 255, 255, 0.2));
  background: transparent;
  cursor: pointer;
  transition: all 0.2s ease;
}

.drawer-image.add-image:hover {
  border-color: var(--accent-color, #f59e0b);
  background: rgba(245, 158, 11, 0.1);
}

.drawer-image.add-image i {
  font-size: 1.5rem;
  color: var(--text-muted, #8a9aaa);
}

.drawer-image.add-image span {
  font-size: 0.7rem;
  color: var(--text-muted, #8a9aaa);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.drawer-image.add-image:hover i,
.drawer-image.add-image:hover span {
  color: var(--accent-color, #f59e0b);
}

/* Image Action Buttons */
.drawer-image-actions {
  position: absolute;
  top: 4px;
  left: 4px;
  display: flex;
  gap: 4px;
  opacity: 0;
  transition: opacity 0.2s ease;
}

.drawer-image:hover .drawer-image-actions {
  opacity: 1;
}

.drawer-image-action {
  width: 24px;
  height: 24px;
  border: none;
  border-radius: 4px;
  background: rgba(0, 0, 0, 0.7);
  color: #fff;
  font-size: 0.65rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}

.drawer-image-action:hover {
  background: var(--accent-color, #f59e0b);
  color: #000;
}

.drawer-image-action.danger:hover {
  background: #ef4444;
  color: #fff;
}

/* Image Preview Modal */
.image-preview-modal {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: none;
  align-items: center;
  justify-content: center;
}

.image-preview-modal.open {
  display: flex;
}

.image-preview-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.95);
  cursor: pointer;
}

.image-preview-content {
  position: relative;
  max-width: 90vw;
  max-height: 90vh;
  z-index: 1;
}

.image-preview-content img {
  max-width: 90vw;
  max-height: 90vh;
  object-fit: contain;
  border-radius: 8px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

.image-preview-close {
  position: absolute;
  top: -40px;
  right: 0;
  width: 36px;
  height: 36px;
  background: rgba(255, 255, 255, 0.1);
  border: none;
  border-radius: 50%;
  color: #fff;
  font-size: 1rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s ease;
}

.image-preview-close:hover {
  background: rgba(255, 255, 255, 0.2);
}

/* ============================================
   EDIT FORM STYLES
   ============================================ */

.intel-edit-form {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.edit-field {
  margin-bottom: 1rem;
}

.edit-field-label {
  display: block;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-muted, #8a9aaa);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 0.375rem;
}

.edit-field-input {
  width: 100%;
  padding: 0.625rem 0.875rem;
  font-size: 0.9rem;
  color: var(--text-primary, #e0e0e0);
  background: var(--input-bg, rgba(20, 30, 40, 0.6));
  border: 1px solid var(--border-color, #3a4a5a);
  border-radius: 6px;
  transition: all 0.2s ease;
}

.edit-field-input:focus {
  outline: none;
  border-color: var(--accent-color, #f59e0b);
  box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.15);
}

.edit-field-input::placeholder {
  color: var(--text-muted, #6a7a8a);
}

textarea.edit-field-input {
  resize: vertical;
  min-height: 80px;
}

select.edit-field-input {
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%238a9aaa' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.75rem center;
  padding-right: 2.5rem;
}

/* Checkbox field */
.edit-field-checkbox {
  margin-bottom: 0.75rem;
}

.edit-checkbox-label {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  cursor: pointer;
  font-size: 0.9rem;
  color: var(--text-primary, #e0e0e0);
}

.edit-checkbox-label input[type="checkbox"] {
  width: 18px;
  height: 18px;
  accent-color: var(--accent-color, #f59e0b);
  cursor: pointer;
}

/* Drawer section title in edit mode */
.intel-edit-form .drawer-section {
  margin-bottom: 1.5rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--border-color, rgba(255, 255, 255, 0.1));
}

.intel-edit-form .drawer-section:last-child {
  border-bottom: none;
  margin-bottom: 0;
}

.intel-edit-form .drawer-section-title {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--accent-color, #f59e0b);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--border-color, rgba(255, 255, 255, 0.1));
}

/* Required field styling */
.edit-field-required .edit-field-label {
  color: #06b6d4;
}

.edit-field-required .edit-field-input {
  border-color: rgba(6, 182, 212, 0.5);
}

.edit-field-required .edit-field-input:focus {
  border-color: #06b6d4;
  box-shadow: 0 0 0 3px rgba(6, 182, 212, 0.15);
}

/* Industry checkbox grid */
.edit-field-industries {
  margin-bottom: 1.5rem;
}

.industry-checkbox-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 0.5rem;
}

.industry-checkbox {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 0.75rem;
  background: var(--input-bg, rgba(20, 30, 40, 0.6));
  border: 1px solid var(--border-color, #3a4a5a);
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.industry-checkbox:hover {
  border-color: var(--accent-color, #f59e0b);
}

.industry-checkbox input[type="checkbox"] {
  width: 16px;
  height: 16px;
  accent-color: var(--accent-color, #f59e0b);
}

.industry-checkbox input[type="checkbox"]:checked + .industry-chip-label {
  color: var(--accent-color, #f59e0b);
}

.industry-chip-label {
  font-size: 0.8rem;
  color: var(--text-primary, #e0e0e0);
}

/* ============================================
   MISSING FIELDS INDICATORS
   ============================================ */

/* Ready to send indicator (green checkmark) */
.intel-item-ready {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.125rem 0.5rem;
  background: rgba(34, 197, 94, 0.15);
  color: #22c55e;
  border-radius: 4px;
  font-size: 0.7rem;
  font-weight: 600;
}

/* Missing required fields indicator (red) */
.intel-item-incomplete {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.125rem 0.5rem;
  background: rgba(239, 68, 68, 0.15);
  color: #ef4444;
  border-radius: 4px;
  font-size: 0.7rem;
  font-weight: 600;
  animation: pulse-warning 2s infinite;
}

/* Missing recommended fields indicator (amber) */
.intel-item-warning {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.125rem 0.5rem;
  background: rgba(245, 158, 11, 0.15);
  color: #f59e0b;
  border-radius: 4px;
  font-size: 0.7rem;
  font-weight: 600;
}

@keyframes pulse-warning {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.6; }
}

/* ============================================
   MISSING FIELDS WARNING MODAL
   ============================================ */

.missing-fields-modal {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
}

.missing-fields-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(4px);
}

.missing-fields-content {
  position: relative;
  background: var(--bg-secondary, #1a2332);
  border: 1px solid var(--border-color, #3a4a5a);
  border-radius: 12px;
  width: 90%;
  max-width: 480px;
  max-height: 80vh;
  overflow: hidden;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
  animation: modalSlideIn 0.3s ease;
}

@keyframes modalSlideIn {
  from {
    opacity: 0;
    transform: translateY(-20px) scale(0.95);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.missing-fields-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--border-color, #3a4a5a);
  background: rgba(0, 0, 0, 0.2);
}

.missing-fields-header h3 {
  margin: 0;
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-primary, #e0e0e0);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.missing-fields-header h3 i {
  color: var(--accent-color, #f59e0b);
}

.missing-fields-close {
  background: none;
  border: none;
  color: var(--text-muted, #8a9aaa);
  cursor: pointer;
  padding: 0.5rem;
  border-radius: 6px;
  transition: all 0.2s ease;
}

.missing-fields-close:hover {
  background: rgba(255, 255, 255, 0.1);
  color: var(--text-primary, #e0e0e0);
}

.missing-fields-body {
  padding: 1.25rem;
  max-height: 50vh;
  overflow-y: auto;
}

.warning-section {
  margin-bottom: 1rem;
  padding: 1rem;
  border-radius: 8px;
}

.warning-section:last-child {
  margin-bottom: 0;
}

.warning-section-error {
  background: rgba(239, 68, 68, 0.1);
  border: 1px solid rgba(239, 68, 68, 0.3);
}

.warning-section-warn {
  background: rgba(245, 158, 11, 0.1);
  border: 1px solid rgba(245, 158, 11, 0.3);
}

.warning-section-title {
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.warning-section-error .warning-section-title {
  color: #ef4444;
}

.warning-section-warn .warning-section-title {
  color: #f59e0b;
}

.warning-section-text {
  font-size: 0.8rem;
  color: var(--text-muted, #8a9aaa);
  margin-bottom: 0.75rem;
}

.warning-list {
  margin: 0;
  padding-left: 1.25rem;
  font-size: 0.85rem;
  color: var(--text-primary, #e0e0e0);
}

.warning-list li {
  margin-bottom: 0.25rem;
}

.missing-fields-footer {
  display: flex;
  gap: 0.75rem;
  padding: 1rem 1.25rem;
  border-top: 1px solid var(--border-color, #3a4a5a);
  background: rgba(0, 0, 0, 0.2);
}

.missing-fields-footer .btn {
  flex: 1;
}

/* ============================================
   INTEL ITEM STATUS BADGES & BUTTONS
   ============================================ */

.intel-approved-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  background: rgba(16, 185, 129, 0.15);
  color: #10b981;
  border-radius: 6px;
  font-size: 0.875rem;
  font-weight: 600;
}

.intel-approved-badge i {
  font-size: 1rem;
}

/* Warning button for deny action */
.btn-warning {
  background: #f59e0b;
  color: white;
  border: none;
}

.btn-warning:hover {
  background: #d97706;
}

/* Platform button styling */
.btn-platform {
  background: linear-gradient(135deg, #6366f1, #8b5cf6);
  color: white;
  border: none;
}

.btn-platform:hover {
  background: linear-gradient(135deg, #4f46e5, #7c3aed);
}

/* ============================================
   CONDITIONAL FIELD VISIBILITY
   Fields that show/hide based on other selections
   ============================================ */

.conditional-field-group {
  transition: opacity 0.2s ease, max-height 0.3s ease;
  overflow: hidden;
}

.conditional-field-group.conditional-hidden {
  opacity: 0.4;
  pointer-events: none;
  max-height: 0;
  margin: 0;
  padding: 0;
  overflow: hidden;
}

/* Greyed out disabled inputs */
.conditional-field-group.conditional-hidden .edit-field-input {
  background: var(--bg-tertiary, #1a2530) !important;
  color: var(--text-muted, #6a7a8a) !important;
  cursor: not-allowed;
}

.conditional-field-group.conditional-hidden .edit-field-label {
  color: var(--text-muted, #6a7a8a);
}

/* Smooth transition for showing fields */
.conditional-field-group:not(.conditional-hidden) {
  max-height: 500px; /* Generous max for animation */
}

/* ============================================
   INTEL ITEM DATES & UPLOADER INFO
   Shows key dates and who uploaded on cards
   ============================================ */

.intel-item-dates {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.5rem;
}

.intel-item-uploader {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.35rem;
}

/* Date chips - show deadlines and event dates */
.date-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.25rem 0.6rem;
  background: rgba(59, 130, 246, 0.15);
  color: #60a5fa;
  border-radius: 4px;
  font-size: 0.75rem;
  font-weight: 500;
}

.date-chip i {
  font-size: 0.7rem;
}

/* Urgent dates (3 days or less) */
.date-chip.urgent {
  background: rgba(239, 68, 68, 0.2);
  color: #f87171;
  animation: pulse-urgent 2s infinite;
}

/* Soon dates (7 days or less) */
.date-chip.soon {
  background: rgba(245, 158, 11, 0.2);
  color: #fbbf24;
}

@keyframes pulse-urgent {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.7; }
}

/* Uploader chips - show who found/uploaded */
.uploader-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.2rem 0.5rem;
  background: rgba(139, 92, 246, 0.12);
  color: #a78bfa;
  border-radius: 4px;
  font-size: 0.7rem;
  font-weight: 500;
}

.uploader-chip i {
  font-size: 0.65rem;
}

/* ============================================
   DRAWER UPLOADER & TIMING SECTIONS
   Prominent sections at top of drawer preview
   ============================================ */

/* Uploader section in drawer */
.drawer-section-uploader {
  background: rgba(139, 92, 246, 0.08);
  border: 1px solid rgba(139, 92, 246, 0.25);
  border-radius: 8px;
  margin-bottom: 1rem;
}

.drawer-section-uploader .drawer-section-title {
  color: #a78bfa;
}

.drawer-uploader-info {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.uploader-detail {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.uploader-label {
  font-size: 0.8rem;
  color: var(--text-muted, #8a9aaa);
  font-weight: 500;
}

.uploader-value {
  font-size: 0.9rem;
  color: var(--text-primary, #e0e0e0);
  font-weight: 600;
}

.uploader-email {
  font-size: 0.75rem;
  color: var(--text-muted, #8a9aaa);
}

/* Timing guidance section in drawer */
.drawer-section-timing {
  border-radius: 8px;
  margin-bottom: 1rem;
  border: 1px solid var(--border-color, #3a4a5a);
}

.drawer-section-timing.normal {
  background: rgba(59, 130, 246, 0.08);
  border-color: rgba(59, 130, 246, 0.25);
}

.drawer-section-timing.soon {
  background: rgba(245, 158, 11, 0.1);
  border-color: rgba(245, 158, 11, 0.3);
}

.drawer-section-timing.urgent {
  background: rgba(239, 68, 68, 0.12);
  border-color: rgba(239, 68, 68, 0.35);
  animation: pulse-section 2s infinite;
}

.drawer-section-timing.expired {
  background: rgba(107, 114, 128, 0.1);
  border-color: rgba(107, 114, 128, 0.3);
}

@keyframes pulse-section {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.85; }
}

.drawer-section-timing .drawer-section-title {
  color: #60a5fa;
}

.drawer-section-timing.soon .drawer-section-title {
  color: #fbbf24;
}

.drawer-section-timing.urgent .drawer-section-title {
  color: #f87171;
}

.drawer-section-timing.expired .drawer-section-title {
  color: #9ca3af;
}

.timing-guidance-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.timing-item {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.5rem 0.75rem;
  border-radius: 6px;
  font-size: 0.85rem;
  font-weight: 500;
}

.timing-item i {
  font-size: 0.9rem;
  width: 1.25rem;
  text-align: center;
}

.timing-item.normal {
  background: rgba(59, 130, 246, 0.1);
  color: #60a5fa;
}

.timing-item.info {
  background: rgba(16, 185, 129, 0.1);
  color: #34d399;
}

.timing-item.soon {
  background: rgba(245, 158, 11, 0.15);
  color: #fbbf24;
}

.timing-item.urgent {
  background: rgba(239, 68, 68, 0.15);
  color: #f87171;
}

.timing-item.expired {
  background: rgba(107, 114, 128, 0.15);
  color: #9ca3af;
  text-decoration: line-through;
}

/* ============================================
   OUTREACH TEMPLATES MODAL
   ============================================ */

#outreach-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.8);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  padding: 1rem;
}

#outreach-modal-overlay.open {
  display: flex;
}

.outreach-modal {
  background: var(--bg-primary, #0f0f0f);
  border: 1px solid var(--border-color, #3a4a5a);
  border-radius: 12px;
  width: 100%;
  max-width: 700px;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

.outreach-modal .modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.5rem;
  border-bottom: 1px solid var(--border-color, #3a4a5a);
}

.outreach-modal .modal-header h3 {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text-primary, #fff);
  margin: 0;
}

.outreach-modal .modal-header h3 i {
  color: var(--accent-color, #f59e0b);
}

.outreach-modal .modal-close {
  width: 32px;
  height: 32px;
  border: none;
  background: rgba(255, 255, 255, 0.1);
  color: var(--text-muted, #8a9aaa);
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s;
}

.outreach-modal .modal-close:hover {
  background: rgba(255, 255, 255, 0.15);
  color: #fff;
}

.outreach-modal .modal-body {
  padding: 1.5rem;
  overflow-y: auto;
  flex: 1;
}

.outreach-modal .modal-hint {
  font-size: 0.85rem;
  color: var(--text-muted, #8a9aaa);
  margin-bottom: 1.25rem;
  line-height: 1.5;
}

.outreach-modal .modal-hint code {
  background: rgba(245, 158, 11, 0.15);
  color: #f59e0b;
  padding: 0.15rem 0.4rem;
  border-radius: 4px;
  font-size: 0.8rem;
}

.outreach-tabs {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 1.25rem;
}

.outreach-tab {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.75rem 1rem;
  border: 1px solid var(--border-color, #3a4a5a);
  background: transparent;
  color: var(--text-muted, #8a9aaa);
  border-radius: 8px;
  font-size: 0.85rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
}

.outreach-tab:hover {
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-primary, #fff);
}

.outreach-tab.active {
  background: var(--accent-color, #f59e0b);
  border-color: var(--accent-color, #f59e0b);
  color: #000;
}

.outreach-tab i {
  font-size: 0.9rem;
}

.outreach-template-form .form-group {
  margin-bottom: 1rem;
}

.outreach-template-form .form-label {
  display: block;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-muted, #8a9aaa);
  margin-bottom: 0.5rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.outreach-template-form .form-input,
.outreach-template-form .form-textarea {
  width: 100%;
  padding: 0.75rem 1rem;
  background: var(--bg-secondary, #1a1a1a);
  border: 1px solid var(--border-color, #3a4a5a);
  border-radius: 8px;
  color: var(--text-primary, #fff);
  font-size: 0.9rem;
  font-family: inherit;
  transition: all 0.2s;
}

.outreach-template-form .form-input:focus,
.outreach-template-form .form-textarea:focus {
  outline: none;
  border-color: var(--accent-color, #f59e0b);
  box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.15);
}

.outreach-template-form .form-textarea {
  resize: vertical;
  min-height: 200px;
  line-height: 1.6;
}

.template-variables {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  margin-top: 0.75rem;
}

.template-variables .variable-label {
  font-size: 0.75rem;
  color: var(--text-muted, #8a9aaa);
  font-weight: 500;
}

.variable-chip {
  padding: 0.35rem 0.6rem;
  background: rgba(59, 130, 246, 0.15);
  border: 1px solid rgba(59, 130, 246, 0.3);
  color: #60a5fa;
  border-radius: 4px;
  font-size: 0.75rem;
  font-family: monospace;
  cursor: pointer;
  transition: all 0.2s;
}

.variable-chip:hover {
  background: rgba(59, 130, 246, 0.25);
  border-color: #60a5fa;
}

.outreach-modal .modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 0.75rem;
  padding: 1rem 1.5rem;
  border-top: 1px solid var(--border-color, #3a4a5a);
}
