/* CATDAMS Combined Dashboard Styles */

:root {
  --primary-color: #0077b6;
  --secondary-color: #6c757d;
  --success-color: #28a745;
  --danger-color: #dc3545;
  --warning-color: #ffc107;
  --info-color: #17a2b8;
  --light-color: #f8f9fa;
  --dark-color: #343a40;
  --border-radius: 8px;
  --box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  --transition: all 0.3s ease;
}

/* Dark Theme Variables */
[data-theme="dark"] {
  --bg-primary: #1a1a1a;
  --bg-secondary: #2d2d2d;
  --text-primary: #ffffff;
  --text-secondary: #b0b0b0;
  --border-color: #404040;
  --card-bg: #2d2d2d;
}

/* Light Theme Variables */
[data-theme="light"] {
  --bg-primary: #ffffff;
  --bg-secondary: #f8f9fa;
  --text-primary: #212529;
  --text-secondary: #6c757d;
  --border-color: #dee2e6;
  --card-bg: #ffffff;
}

/* ✅ LOADING INDICATOR STYLES */
#loadingIndicator {
    display: none !important;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 9999;
    justify-content: center;
    align-items: center;
}

#loadingIndicator.show {
    display: flex !important;
}

#loadingIndicator .spinner-border {
    width: 3rem;
    height: 3rem;
}

#loadingIndicator .progress {
    height: 4px;
    background-color: rgba(255, 255, 255, 0.2);
}

#loadingIndicator .progress-bar {
    background-color: var(--primary-color);
    transition: width 0.3s ease;
}

/* Global Styles */
body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  background-color: var(--bg-secondary);
  color: var(--text-primary);
  transition: var(--transition);
}

/* Header Styles */
header {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%) !important;
  color: white !important;
  box-shadow: var(--box-shadow);
}

.session-info {
  background: rgba(255, 255, 255, 0.1);
  padding: 8px 16px;
  border-radius: var(--border-radius);
  backdrop-filter: blur(10px);
}

.status-indicator {
  background: rgba(255, 255, 255, 0.1);
  padding: 6px 12px;
  border-radius: var(--border-radius);
  font-size: 0.9rem;
  backdrop-filter: blur(10px);
}

.theme-toggle {
  background: rgba(255, 255, 255, 0.1);
  border: none;
  color: white;
  padding: 8px;
  border-radius: var(--border-radius);
  backdrop-filter: blur(10px);
  transition: var(--transition);
}

.theme-toggle:hover {
  background: rgba(255, 255, 255, 0.2);
  transform: scale(1.05);
}

/* Navigation Styles */
.breadcrumb {
  background: transparent;
  padding: 0;
}

.breadcrumb-item a {
  color: var(--primary-color);
  text-decoration: none;
  transition: var(--transition);
}

.breadcrumb-item a:hover {
  color: var(--info-color);
  text-decoration: underline;
}

/* Search and Filter Styles */
.input-group {
  box-shadow: var(--box-shadow);
  border-radius: var(--border-radius);
  overflow: hidden;
}

.input-group-text {
  border: none;
  background: var(--light-color);
}

.form-control {
  border: none;
  box-shadow: none;
  transition: var(--transition);
}

.form-control:focus {
  box-shadow: 0 0 0 0.2rem rgba(0, 119, 182, 0.25);
}

.btn-group .btn {
  border-radius: var(--border-radius);
  transition: var(--transition);
}

.btn-group .btn:hover {
  transform: translateY(-1px);
  box-shadow: var(--box-shadow);
}

/* Filter Controls */
.form-label {
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 4px;
}

.form-select {
  border-radius: var(--border-radius);
  border: 1px solid var(--border-color);
  transition: var(--transition);
}

.form-select:focus {
  border-color: var(--primary-color);
  box-shadow: 0 0 0 0.2rem rgba(0, 119, 182, 0.25);
}

/* Alert Banner */
.alert {
  border-radius: var(--border-radius);
  border: none;
  box-shadow: var(--box-shadow);
  animation: slideInDown 0.5s ease-out;
}

@keyframes slideInDown {
  from {
    transform: translateY(-100%);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

/* Summary Cards */
.summary-card {
  border-radius: var(--border-radius);
  box-shadow: var(--box-shadow);
  transition: var(--transition);
  border: none;
  background: var(--card-bg);
}

.summary-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.card-value {
  color: var(--primary-color);
  font-weight: 700;
}

/* Alert Panels */
.card.border-danger {
  border-left: 4px solid var(--danger-color) !important;
}

.card.border-warning {
  border-left: 4px solid var(--warning-color) !important;
}

.card.border-info {
  border-left: 4px solid var(--info-color) !important;
}

.card-header {
  border-bottom: 1px solid var(--border-color);
  font-weight: 600;
}

/* Threat Map */
#threatMap {
  background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
  border: 2px dashed var(--border-color);
  transition: var(--transition);
}

#threatMap:hover {
  border-color: var(--primary-color);
  transform: scale(1.02);
}

/* TDC Modules */
.tdc-module {
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius);
  padding: 12px;
  margin-bottom: 8px;
  transition: var(--transition);
  cursor: pointer;
  user-select: none;
}

.tdc-module:hover {
  border-color: var(--primary-color);
  box-shadow: var(--box-shadow);
  transform: translateX(4px);
  background: rgba(0, 119, 182, 0.02);
}

.tdc-module.active {
  border-color: var(--primary-color);
  background: rgba(0, 119, 182, 0.05);
  box-shadow: 0 4px 8px rgba(0, 119, 182, 0.1);
}

.tdc-module:active {
  transform: translateX(2px) scale(0.98);
}

.tdc-module-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}

.tdc-module-title {
  font-weight: 600;
  color: var(--text-primary);
  margin: 0;
  font-size: 0.9rem;
}

.tdc-module-status {
  padding: 2px 8px;
  border-radius: 12px;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: capitalize;
}

.tdc-module-status.online {
  background: rgba(40, 167, 69, 0.1);
  color: var(--success-color);
}

.tdc-module-status.offline {
  background: rgba(220, 53, 69, 0.1);
  color: var(--danger-color);
}

.tdc-module-status.processing {
  background: rgba(255, 193, 7, 0.1);
  color: var(--warning-color);
}

/* Live Conversation */
#liveConversation {
  font-family: 'Courier New', monospace;
  font-size: 0.9rem;
}

.message {
  margin-bottom: 8px;
  padding: 8px 12px;
  border-radius: var(--border-radius);
  border-left: 3px solid transparent;
}

.message.user {
  background: rgba(23, 162, 184, 0.1);
  border-left-color: var(--info-color);
}

.message.ai {
  background: rgba(255, 193, 7, 0.1);
  border-left-color: var(--warning-color);
}

.message.threat {
  background: rgba(220, 53, 69, 0.1);
  border-left-color: var(--danger-color);
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0% { opacity: 1; }
  50% { opacity: 0.7; }
  100% { opacity: 1; }
}

.message-timestamp {
  font-size: 0.75rem;
  color: var(--text-secondary);
  margin-bottom: 4px;
}

.message-content {
  margin: 0;
  word-wrap: break-word;
}

/* Analytics */
#analyticsChart {
  max-height: 300px;
}

/* Event Timeline */
.timeline-event {
  padding: 8px 12px;
  margin-bottom: 8px;
  border-radius: var(--border-radius);
  border-left: 3px solid var(--border-color);
  background: var(--card-bg);
  transition: var(--transition);
}

.timeline-event:hover {
  border-left-color: var(--primary-color);
  transform: translateX(4px);
}

.timeline-event.critical {
  border-left-color: var(--danger-color);
  background: rgba(220, 53, 69, 0.05);
}

.timeline-event.high {
  border-left-color: var(--warning-color);
  background: rgba(255, 193, 7, 0.05);
}

.timeline-event.medium {
  border-left-color: var(--info-color);
  background: rgba(23, 162, 184, 0.05);
}

.timeline-time {
  font-size: 0.75rem;
  color: var(--text-secondary);
  font-weight: 600;
}

.timeline-title {
  font-weight: 600;
  margin: 4px 0;
}

.timeline-description {
  font-size: 0.85rem;
  color: var(--text-secondary);
  margin: 0;
}

/* Evidence Details */
.evidence-item {
  padding: 12px;
  margin-bottom: 12px;
  border-radius: var(--border-radius);
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  transition: var(--transition);
}

.evidence-item:hover {
  border-color: var(--primary-color);
  box-shadow: var(--box-shadow);
}

.evidence-header {
  display: flex;
  justify-content: between;
  align-items: center;
  margin-bottom: 8px;
}

.evidence-title {
  font-weight: 600;
  margin: 0;
}

.evidence-confidence {
  padding: 2px 8px;
  border-radius: 12px;
  font-size: 0.75rem;
  font-weight: 600;
}

.evidence-confidence.high {
  background: rgba(220, 53, 69, 0.1);
  color: var(--danger-color);
}

.evidence-confidence.medium {
  background: rgba(255, 193, 7, 0.1);
  color: var(--warning-color);
}

.evidence-confidence.low {
  background: rgba(40, 167, 69, 0.1);
  color: var(--success-color);
}

.evidence-content {
  font-size: 0.9rem;
  line-height: 1.5;
  margin: 0;
}

/* Charts */
.chart-container {
  position: relative;
  height: 300px;
}

/* Threat Events Table */
.table {
  margin-bottom: 0;
}

.table th {
  background: var(--dark-color);
  color: white;
  border: none;
  font-weight: 600;
  font-size: 0.9rem;
}

.table td {
  vertical-align: middle;
  border-color: var(--border-color);
}

.table-hover tbody tr:hover {
  background-color: rgba(0, 119, 182, 0.05);
}

.severity-badge {
  padding: 4px 8px;
  border-radius: 12px;
  font-size: 0.75rem;
  font-weight: 600;
}

.severity-badge.critical {
  background: rgba(220, 53, 69, 0.1);
  color: var(--danger-color);
}

.severity-badge.high {
  background: rgba(255, 193, 7, 0.1);
  color: var(--warning-color);
}

.severity-badge.medium {
  background: rgba(23, 162, 184, 0.1);
  color: var(--info-color);
}

.severity-badge.low {
  background: rgba(40, 167, 69, 0.1);
  color: var(--success-color);
}

/* Chat Transcript */
#userTranscript, #aiTranscript {
  font-family: 'Courier New', monospace;
  font-size: 0.85rem;
  line-height: 1.4;
}

.transcript-entry {
  padding: 8px;
  margin-bottom: 8px;
  border-radius: var(--border-radius);
  border-left: 3px solid transparent;
}

.transcript-entry.user {
  background: rgba(23, 162, 184, 0.1);
  border-left-color: var(--info-color);
}

.transcript-entry.ai {
  background: rgba(255, 193, 7, 0.1);
  border-left-color: var(--warning-color);
}

.transcript-timestamp {
  font-size: 0.75rem;
  color: var(--text-secondary);
  margin-bottom: 4px;
}

.transcript-message {
  margin: 0;
  word-wrap: break-word;
}

/* TDC Modules Grid */
.tdc-module-card {
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius);
  padding: 16px;
  transition: var(--transition);
  cursor: pointer;
  height: 100%;
  user-select: none;
}

.tdc-module-card:hover {
  border-color: var(--primary-color);
  box-shadow: var(--box-shadow);
  transform: translateY(-2px);
  background: rgba(0, 119, 182, 0.02);
}

.tdc-module-card.expanded {
  border-color: var(--primary-color);
  background: rgba(0, 119, 182, 0.05);
  box-shadow: 0 4px 8px rgba(0, 119, 182, 0.1);
}

.tdc-module-card:active {
  transform: translateY(-1px) scale(0.98);
}

.tdc-module-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}

.tdc-module-icon {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  margin-right: 12px;
  transition: var(--transition);
}

.tdc-module-icon.online {
  background: rgba(40, 167, 69, 0.1);
  color: var(--success-color);
}

.tdc-module-icon.offline {
  background: rgba(220, 53, 69, 0.1);
  color: var(--danger-color);
}

.tdc-module-icon.processing {
  background: rgba(255, 193, 7, 0.1);
  color: var(--warning-color);
}

.tdc-module-info {
  flex: 1;
}

.tdc-module-name {
  font-weight: 600;
  margin: 0;
  color: var(--text-primary);
  font-size: 0.9rem;
}

.tdc-module-description {
  font-size: 0.85rem;
  color: var(--text-secondary);
  margin: 4px 0 0 0;
  line-height: 1.3;
}

.tdc-module-status {
  padding: 4px 8px;
  border-radius: 12px;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: capitalize;
}

.tdc-module-content {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--border-color);
  animation: fadeIn 0.3s ease-in;
}

.tdc-module-content.d-none {
  display: none !important;
}

.tdc-module-metrics {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
  margin-bottom: 12px;
}

.metric-item {
  text-align: center;
  padding: 8px;
  background: var(--bg-secondary);
  border-radius: var(--border-radius);
}

.metric-value {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--primary-color);
}

.metric-label {
  font-size: 0.75rem;
  color: var(--text-secondary);
  margin-top: 4px;
}

/* Tooltips */
.tooltip {
  font-size: 0.85rem;
}

.tooltip-inner {
  background: var(--dark-color);
  color: white;
  border-radius: var(--border-radius);
  padding: 8px 12px;
  max-width: 300px;
}

/* Responsive Design */
@media (max-width: 768px) {
  .container-fluid {
    padding: 8px;
  }
  
  .summary-card {
    margin-bottom: 12px;
  }
  
  .btn-group {
    flex-wrap: wrap;
  }
  
  .btn-group .btn {
    margin-bottom: 4px;
  }
  
  .tdc-module-metrics {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 576px) {
  .card-header {
    flex-direction: column;
    align-items: flex-start;
  }
  
  .card-header .btn-group {
    margin-top: 8px;
  }
  
  .status-indicator {
    font-size: 0.8rem;
    padding: 4px 8px;
  }
}

/* Animation Classes */
.fade-in {
  animation: fadeIn 0.5s ease-in;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.slide-in-right {
  animation: slideInRight 0.5s ease-out;
}

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

.bounce-in {
  animation: bounceIn 0.6s ease-out;
}

@keyframes bounceIn {
  0% {
    transform: scale(0.3);
    opacity: 0;
  }
  50% {
    transform: scale(1.05);
  }
  70% {
    transform: scale(0.9);
  }
  100% {
    transform: scale(1);
    opacity: 1;
  }
}

/* Loading States */
.loading {
  position: relative;
  overflow: hidden;
}

.loading::after {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
  animation: loading 1.5s infinite;
}

@keyframes loading {
  0% { left: -100%; }
  100% { left: 100%; }
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-track {
  background: var(--bg-secondary);
}

::-webkit-scrollbar-thumb {
  background: var(--border-color);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--text-secondary);
}

/* Print Styles */
@media print {
  .btn, .btn-group, .theme-toggle {
    display: none !important;
  }
  
  .card {
    border: 1px solid #000 !important;
    box-shadow: none !important;
  }
  
  .table th {
    background: #f0f0f0 !important;
    color: #000 !important;
  }
} 

/* Enhanced Table Styles */
.timestamp-cell {
    display: flex;
    flex-direction: column;
}

.timestamp-main {
    font-weight: 500;
    font-size: 0.9rem;
}

.timestamp-sub {
    font-size: 0.75rem;
    opacity: 0.7;
}

.source-cell {
    display: flex;
    flex-direction: column;
}

.source-main {
    font-weight: 500;
    font-size: 0.9rem;
}

.source-sub {
    font-size: 0.75rem;
    opacity: 0.7;
}

.threat-type-cell {
    display: flex;
    flex-direction: column;
    max-width: 200px;
}

.threat-type-main {
    font-weight: 500;
    font-size: 0.9rem;
}

.threat-type-sub {
    font-size: 0.75rem;
    opacity: 0.7;
    word-wrap: break-word;
}

.score-cell {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.score-main {
    font-weight: 600;
    font-size: 0.9rem;
    margin-bottom: 2px;
}

.score-bar {
    width: 100%;
    max-width: 60px;
}

.tdc-modules-cell {
    display: flex;
    flex-wrap: wrap;
    gap: 2px;
}

.tdc-modules-cell .badge {
    font-size: 0.7rem;
    padding: 2px 6px;
}

/* Confidence Cell Styling */
.confidence-cell {
    padding: 8px;
    border-radius: 6px;
    transition: all 0.2s ease;
    cursor: pointer;
}

.confidence-cell:hover {
    background-color: rgba(0, 123, 255, 0.1);
    transform: translateY(-1px);
}

.confidence-main {
    font-weight: 600;
    font-size: 0.9rem;
    margin-bottom: 4px;
}

.confidence-sub {
    font-size: 0.75rem;
    opacity: 0.7;
}

.confidence-bar {
    margin-top: 6px;
}

.confidence-bar .progress {
    border-radius: 10px;
    background-color: rgba(0, 0, 0, 0.1);
}

.confidence-bar .progress-bar {
    border-radius: 10px;
    transition: width 0.3s ease;
}

/* Enhanced Module Analysis Styles */
.module-analysis {
    padding: 12px;
    border-radius: 8px;
    background: linear-gradient(135deg, rgba(0,123,255,0.05) 0%, rgba(0,123,255,0.02) 100%);
    border-left: 4px solid #007bff;
    margin-bottom: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    transition: all 0.3s ease;
}

.module-analysis:hover {
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
    transform: translateY(-1px);
}

.analysis-header {
    display: flex;
    gap: 6px;
    margin-bottom: 8px;
    flex-wrap: wrap;
    align-items: center;
}

.analysis-header .badge {
    font-size: 0.75rem;
    padding: 4px 8px;
    border-radius: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.analysis-details {
    font-size: 0.85rem;
    line-height: 1.4;
    color: #495057;
}

.analysis-details strong {
    color: #212529;
    font-weight: 600;
}

.analysis-details ul {
    margin: 6px 0;
    padding-left: 18px;
    list-style-type: disc;
}

.analysis-details li {
    margin-bottom: 3px;
    line-height: 1.3;
}

/* Enhanced Severity Badges */
.severity-badge {
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}



/* Table Responsive Improvements */
.table-responsive {
    border-radius: 8px;
    overflow: hidden;
}

#threatEventsTable {
    margin-bottom: 0;
}

#threatEventsTable thead th {
    background-color: #343a40;
    color: white;
    border: none;
    padding: 12px 8px;
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

#threatEventsTable tbody td {
    padding: 12px 8px;
    vertical-align: middle;
    border-bottom: 1px solid #dee2e6;
}

#threatEventsTable tbody tr:hover {
    background-color: rgba(0,123,255,0.05);
    transition: background-color 0.2s ease;
}

/* Button Group Improvements */
.btn-group-sm .btn {
    padding: 4px 8px;
    font-size: 0.75rem;
}

.btn-group-sm .btn i {
    font-size: 0.8rem;
} 

/* TDC Module Card Enhancements */
.tdc-module-card {
    transition: all 0.3s ease;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    overflow: hidden;
}

.tdc-module-card:hover {
    border-color: #007bff;
    box-shadow: 0 4px 12px rgba(0,123,255,0.15);
}

.tdc-module-card .card-header {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-bottom: 1px solid #dee2e6;
    padding: 12px 16px;
}

.tdc-module-card .card-body {
    padding: 16px;
    background: #ffffff;
}

/* Module Status Indicators */
.tdc-module-status {
    font-size: 0.8rem;
    font-weight: 600;
    padding: 4px 8px;
    border-radius: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.tdc-module-status.online {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.tdc-module-status.offline {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.tdc-module-status.analyzing {
    background-color: #fff3cd;
    color: #856404;
    border: 1px solid #ffeaa7;
}

/* Module Icons */
.tdc-module-icon {
    font-size: 1.5rem;
    margin-right: 8px;
    transition: all 0.3s ease;
}

.tdc-module-icon.online {
    color: #28a745;
    animation: pulse 2s infinite;
}

.tdc-module-icon.offline {
    color: #dc3545;
}

.tdc-module-icon.analyzing {
    color: #ffc107;
    animation: spin 2s linear infinite;
}

@keyframes pulse {
    0% { opacity: 1; }
    50% { opacity: 0.7; }
    100% { opacity: 1; }
}

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

/* Score Display Enhancements */
.module-score {
    font-size: 1.2rem;
    font-weight: 700;
    color: #007bff;
    text-align: center;
    margin: 8px 0;
}

.module-score.high {
    color: #dc3545;
}

.module-score.medium {
    color: #fd7e14;
}

.module-score.low {
    color: #28a745;
}

/* Evidence Source Indicators */
.evidence-indicator {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: #28a745;
    margin-right: 6px;
    animation: blink 2s infinite;
}

@keyframes blink {
    0%, 50% { opacity: 1; }
    51%, 100% { opacity: 0.3; }
} 

/* TDC Notification Styles */
.tdc-notification {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 9999;
    background: linear-gradient(135deg, #007bff 0%, #0056b3 100%);
    color: white;
    padding: 12px 16px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,123,255,0.3);
    animation: slideInRight 0.3s ease-out;
    max-width: 400px;
}

.notification-content {
    display: flex;
    align-items: center;
    gap: 8px;
}

.notification-content i {
    font-size: 1.2rem;
}

.notification-content span {
    flex: 1;
    font-weight: 500;
}

.notification-content .btn-close {
    background: none;
    border: none;
    color: white;
    font-size: 1.2rem;
    cursor: pointer;
    padding: 0;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.notification-content .btn-close:hover {
    opacity: 0.8;
}

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

/* Module Analysis Styles */
.module-analysis {
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius);
  padding: 1rem;
  margin-bottom: 1rem;
  box-shadow: var(--box-shadow);
  transition: var(--transition);
}

.module-analysis:hover {
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
  transform: translateY(-1px);
}

.analysis-header {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--border-color);
}

.analysis-header .badge {
  font-size: 0.75rem;
  padding: 0.375rem 0.75rem;
  border-radius: 1rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.analysis-details {
  font-size: 0.9rem;
  line-height: 1.5;
  color: var(--text-secondary);
}

.analysis-details strong {
  color: var(--text-primary);
  font-weight: 600;
  display: inline-block;
  margin-bottom: 0.25rem;
}

.analysis-details ul {
  margin: 0.5rem 0;
  padding-left: 1.25rem;
  list-style-type: none;
}

.analysis-details ul li {
  position: relative;
  padding: 0.25rem 0;
  font-size: 0.85rem;
  color: var(--text-secondary);
}

.analysis-details ul li:before {
  content: "•";
  color: var(--primary-color);
  font-weight: bold;
  position: absolute;
  left: -1rem;
}

.analysis-details ul li em {
  color: var(--secondary-color);
  font-style: italic;
}

/* Badge Styles for Module Analysis */
.badge.bg-outline-primary {
  background-color: transparent !important;
  color: var(--primary-color) !important;
  border: 1px solid var(--primary-color);
}

.badge.bg-outline-danger {
  background-color: transparent !important;
  color: var(--danger-color) !important;
  border: 1px solid var(--danger-color);
}

.badge.bg-outline-warning {
  background-color: transparent !important;
  color: var(--warning-color) !important;
  border: 1px solid var(--warning-color);
}

.badge.bg-outline-info {
  background-color: transparent !important;
  color: var(--info-color) !important;
  border: 1px solid var(--info-color);
}

.badge.bg-outline-success {
  background-color: transparent !important;
  color: var(--success-color) !important;
  border: 1px solid var(--success-color);
}

.badge.bg-outline-secondary {
  background-color: transparent !important;
  color: var(--secondary-color) !important;
  border: 1px solid var(--secondary-color);
}

.badge.bg-outline-dark {
  background-color: transparent !important;
  color: var(--dark-color) !important;
  border: 1px solid var(--dark-color);
}

/* Module-specific color themes */
.module-analysis.tdc-ai1 {
  border-left: 4px solid var(--primary-color);
}

.module-analysis.tdc-ai2 {
  border-left: 4px solid var(--danger-color);
}

.module-analysis.tdc-ai3 {
  border-left: 4px solid var(--info-color);
}

.module-analysis.tdc-ai4 {
  border-left: 4px solid var(--warning-color);
}

.module-analysis.tdc-ai5 {
  border-left: 4px solid var(--secondary-color);
}

.module-analysis.tdc-ai6 {
  border-left: 4px solid var(--dark-color);
}

.module-analysis.tdc-ai7 {
  border-left: 4px solid var(--success-color);
}

.module-analysis.tdc-ai8 {
  border-left: 4px solid var(--primary-color);
}

.module-analysis.tdc-ai9 {
  border-left: 4px solid var(--info-color);
}

.module-analysis.tdc-ai10 {
  border-left: 4px solid var(--warning-color);
}

.module-analysis.tdc-ai11 {
  border-left: 4px solid var(--success-color);
}

/* Responsive adjustments for module analysis */
@media (max-width: 768px) {
  .analysis-header {
    flex-direction: column;
    gap: 0.25rem;
  }
  
  .analysis-header .badge {
    align-self: flex-start;
  }
  
  .analysis-details {
    font-size: 0.85rem;
  }
  
  .analysis-details ul li {
    font-size: 0.8rem;
  }
}

@media (max-width: 576px) {
  .module-analysis {
    padding: 0.75rem;
  }
  
  .analysis-header .badge {
    font-size: 0.7rem;
    padding: 0.25rem 0.5rem;
  }
  
  .analysis-details {
    font-size: 0.8rem;
  }
} 

/* TDC Module Cards - Enhanced Styling */
.tdc-module-card {
    background: var(--card-bg);
    border: 2px solid var(--border-color);
    border-radius: var(--border-radius);
    padding: 1rem;
    margin-bottom: 1rem;
    transition: var(--transition);
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.tdc-module-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-color), var(--info-color));
    opacity: 0;
    transition: var(--transition);
}

.tdc-module-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.15);
    border-color: var(--primary-color);
}

.tdc-module-card:hover::before {
    opacity: 1;
}

.tdc-module-card.expanded {
    border-color: var(--primary-color);
    box-shadow: 0 4px 12px rgba(0, 119, 182, 0.2);
}

.tdc-module-card.expanded::before {
    opacity: 1;
}

.tdc-module-card:active {
    transform: translateY(0);
}

.tdc-module-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
}

.tdc-module-icon {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: white;
    background: var(--secondary-color);
    transition: var(--transition);
}

.tdc-module-icon.online {
    background: var(--success-color);
    animation: pulse 2s infinite;
}

.tdc-module-icon.offline {
    background: var(--secondary-color);
}

.tdc-module-icon.processing {
    background: var(--warning-color);
    animation: spin 1s linear infinite;
}

.tdc-module-info {
    flex: 1;
}

.tdc-module-name {
    font-weight: 600;
    margin: 0;
    color: var(--text-primary);
    font-size: 1.1rem;
}

.tdc-module-description {
    margin: 0;
    color: var(--text-secondary);
    font-size: 0.9rem;
    line-height: 1.4;
}

.tdc-module-content {
    border-top: 1px solid var(--border-color);
    padding-top: 1rem;
    transition: var(--transition);
}

.tdc-module-content.d-none {
    display: none !important;
}

.tdc-module-metrics {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
    gap: 1rem;
    margin-bottom: 1rem;
}

.metric-item {
    text-align: center;
    padding: 0.5rem;
    background: var(--bg-secondary);
    border-radius: var(--border-radius);
    border: 1px solid var(--border-color);
}

.metric-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 0.25rem;
}

.metric-label {
    font-size: 0.8rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Module Analysis Display */
.module-analysis {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    padding: 1rem;
    margin-top: 1rem;
}

.module-analysis:hover {
    border-color: var(--primary-color);
    box-shadow: 0 2px 8px rgba(0, 119, 182, 0.1);
}

.analysis-header {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1rem;
    align-items: center;
}

.analysis-header .badge {
    font-size: 0.8rem;
    padding: 0.4rem 0.6rem;
    border-radius: 12px;
}

.analysis-details {
    font-size: 0.9rem;
    line-height: 1.5;
    color: var(--text-primary);
}

.analysis-details strong {
    color: var(--primary-color);
    font-weight: 600;
}

.analysis-details ul {
    margin: 0.5rem 0;
    padding-left: 1.5rem;
}

.analysis-details ul li {
    margin-bottom: 0.25rem;
    color: var(--text-secondary);
}

.analysis-details ul li:before {
    content: '•';
    color: var(--primary-color);
    font-weight: bold;
    display: inline-block;
    width: 1em;
    margin-left: -1em;
}

.analysis-details ul li em {
    color: var(--text-secondary);
    font-style: italic;
}

/* Module-specific styling */
.tdc-module-card[data-module-id="TDC-AI1"] .tdc-module-icon { background: var(--primary-color); }
.tdc-module-card[data-module-id="TDC-AI2"] .tdc-module-icon { background: var(--danger-color); }
.tdc-module-card[data-module-id="TDC-AI3"] .tdc-module-icon { background: var(--info-color); }
.tdc-module-card[data-module-id="TDC-AI4"] .tdc-module-icon { background: var(--warning-color); }
.tdc-module-card[data-module-id="TDC-AI5"] .tdc-module-icon { background: var(--secondary-color); }
.tdc-module-card[data-module-id="TDC-AI6"] .tdc-module-icon { background: var(--dark-color); }
.tdc-module-card[data-module-id="TDC-AI7"] .tdc-module-icon { background: var(--success-color); }
.tdc-module-card[data-module-id="TDC-AI8"] .tdc-module-icon { background: var(--primary-color); }
.tdc-module-card[data-module-id="TDC-AI9"] .tdc-module-icon { background: var(--info-color); }
.tdc-module-card[data-module-id="TDC-AI10"] .tdc-module-icon { background: var(--warning-color); }
.tdc-module-card[data-module-id="TDC-AI11"] .tdc-module-icon { background: var(--success-color); }
.tdc-module-card[data-module-id="TDC-AI12"] .tdc-module-icon { background: var(--dark-color); }

/* ✅ ENHANCED NARRATIVE DISPLAY STYLES */
.enhanced-narrative-display {
    background: var(--card-bg);
    border-radius: var(--border-radius);
    padding: 1rem;
    margin-top: 0.5rem;
    box-shadow: var(--box-shadow);
    border: 1px solid var(--border-color);
}

.narrative-section {
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border-color);
}

.narrative-section:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}

.section-title {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
    font-weight: 600;
    color: var(--text-primary);
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.section-title i {
    font-size: 0.8rem;
}

/* Summary Bullets */
.summary-bullets {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.summary-bullet {
    padding: 0.5rem;
    background: rgba(var(--primary-color-rgb, 0, 119, 182), 0.1);
    border-left: 3px solid var(--primary-color);
    border-radius: 0 4px 4px 0;
    font-size: 0.85rem;
    line-height: 1.4;
    color: var(--text-primary);
}

/* Detailed Narrative */
.detailed-narrative {
    background: rgba(var(--info-color-rgb, 23, 162, 184), 0.05);
    padding: 1rem;
    border-radius: var(--border-radius);
    border: 1px solid rgba(var(--info-color-rgb, 23, 162, 184), 0.2);
    font-size: 0.9rem;
    line-height: 1.6;
    color: var(--text-primary);
    white-space: pre-line;
}



/* Detailed Narrative Text (for TDC-AI1 and other modules) */
.detailed-narrative-text {
    background: rgba(var(--info-color-rgb, 23, 162, 184), 0.05);
    padding: 1rem;
    border-radius: var(--border-radius);
    border: 1px solid rgba(var(--info-color-rgb, 23, 162, 184), 0.2);
    font-size: 0.9rem;
    line-height: 1.6;
    color: var(--text-primary);
    white-space: pre-line;
}

/* AI Enhancement Section */
.ai-enhancement-section {
    margin-top: 1rem;
    padding: 1rem;
    background: rgba(var(--primary-color-rgb, 0, 119, 182), 0.05);
    border-radius: var(--border-radius);
    border: 1px solid rgba(var(--primary-color-rgb, 0, 119, 182), 0.2);
}

.ai-enhancement-content {
    font-size: 0.9rem;
    line-height: 1.6;
    color: var(--text-primary);
    white-space: pre-line;
}

.ai-enhancement-content h4 {
    color: var(--primary-color);
    margin-bottom: 0.75rem;
    font-size: 1rem;
}

.ai-enhancement-content h5 {
    color: var(--text-primary);
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
}

.ai-enhancement-content ul {
    margin-bottom: 1rem;
    padding-left: 1.5rem;
}

.ai-enhancement-content li {
    margin-bottom: 0.25rem;
}

/* Technical Details */
.technical-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 0.75rem;
}

.tech-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem;
    background: rgba(var(--secondary-color-rgb, 108, 117, 125), 0.1);
    border-radius: var(--border-radius);
    border: 1px solid rgba(var(--secondary-color-rgb, 108, 117, 125), 0.2);
}

.tech-item .label {
    font-weight: 500;
    color: var(--text-secondary);
    font-size: 0.8rem;
}

.tech-item .value {
    font-weight: 600;
    font-size: 0.85rem;
}

/* Key Insights */
.insights-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.insight-item {
    padding: 0.5rem;
    background: rgba(var(--warning-color-rgb, 255, 193, 7), 0.1);
    border-left: 3px solid var(--warning-color);
    border-radius: 0 4px 4px 0;
    font-size: 0.85rem;
    line-height: 1.4;
    color: var(--text-primary);
}

/* Recommendations */
.recommendations-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.recommendation-item {
    padding: 0.5rem;
    background: rgba(var(--success-color-rgb, 40, 167, 69), 0.1);
    border-left: 3px solid var(--success-color);
    border-radius: 0 4px 4px 0;
    font-size: 0.85rem;
    line-height: 1.4;
    color: var(--text-primary);
}

/* Dark Theme Adjustments */
[data-theme="dark"] .enhanced-narrative-display {
    background: var(--bg-secondary);
    border-color: var(--border-color);
}

[data-theme="dark"] .summary-bullet {
    background: rgba(255, 255, 255, 0.05);
    border-left-color: var(--primary-color);
}

[data-theme="dark"] .detailed-narrative {
    background: rgba(255, 255, 255, 0.03);
    border-color: rgba(255, 255, 255, 0.1);
}

[data-theme="dark"] .tech-item {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.1);
}

[data-theme="dark"] .insight-item {
    background: rgba(255, 255, 255, 0.05);
    border-left-color: var(--warning-color);
}

[data-theme="dark"] .recommendation-item {
    background: rgba(255, 255, 255, 0.05);
    border-left-color: var(--success-color);
}

/* Responsive Design */
@media (max-width: 768px) {
    .enhanced-narrative-display {
        padding: 0.75rem;
    }
    
    .technical-grid {
        grid-template-columns: 1fr;
    }
    
    .section-title {
        font-size: 0.8rem;
    }
    
    .summary-bullet,
    .insight-item,
    .recommendation-item {
        font-size: 0.8rem;
        padding: 0.4rem;
    }
    
    .detailed-narrative {
        font-size: 0.85rem;
        padding: 0.75rem;
    }
}

@media (max-width: 576px) {
    .enhanced-narrative-display {
        padding: 0.5rem;
    }
    
    .narrative-section {
        margin-bottom: 1rem;
        padding-bottom: 0.75rem;
    }
    
    .section-title {
        font-size: 0.75rem;
        gap: 0.25rem;
    }
    
    .section-title i {
        font-size: 0.7rem;
    }
} 

/* Alert Panel Styling for Better Content Layout */
.alert-panel .card-body {
    padding: 1rem;
    transition: max-height 0.3s ease;
}

.alert-panel .card-body.expanded {
    max-height: 400px !important;
    overflow-y: auto;
}

/* Threat Alert Items */
.alert-sm {
    padding: 0.75rem;
    margin-bottom: 0.75rem;
    border-radius: 0.5rem;
    border-left: 4px solid;
    transition: all 0.2s ease;
}

.alert-sm:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.alert-sm.alert-danger {
    border-left-color: #dc3545;
    background-color: rgba(220, 53, 69, 0.1);
}

.alert-sm.alert-warning {
    border-left-color: #ffc107;
    background-color: rgba(255, 193, 7, 0.1);
}

.alert-sm.alert-info {
    border-left-color: #17a2b8;
    background-color: rgba(23, 162, 184, 0.1);
}

/* Threat Information Layout */
.threat-info {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.threat-info strong {
    color: #212529;
    font-size: 0.9rem;
}

.threat-info small {
    color: #6c757d;
    line-height: 1.3;
}

.threat-info .session-id {
    font-family: monospace;
    background-color: rgba(0,0,0,0.05);
    padding: 0.1rem 0.3rem;
    border-radius: 0.25rem;
    font-size: 0.75rem;
}

.threat-info .score-display {
    font-weight: 500;
    color: #495057;
}

.threat-info .modules-display {
    font-size: 0.75rem;
    color: #6c757d;
    font-style: italic;
}

/* Timestamp Styling */
.threat-timestamp {
    font-size: 0.75rem;
    color: #6c757d;
    white-space: nowrap;
    margin-left: auto;
}

/* Expandable Panel Headers */
.expandable-header {
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.expandable-header:hover {
    background-color: rgba(0,0,0,0.05);
}

.expandable-header i {
    transition: transform 0.2s ease;
}

.expandable-header.expanded i {
    transform: rotate(90deg);
}

/* Panel Content Animation */
.panel-content {
    transition: all 0.3s ease;
    opacity: 0;
    transform: translateY(-10px);
}

.panel-content.expanded {
    opacity: 1;
    transform: translateY(0);
} 

/* ✅ ENHANCED CHAT SUMMARY STYLES */
.chat-summary-enhanced {
    padding: 0;
}

.chat-summary-enhanced .session-overview,
.chat-summary-enhanced .tdc-findings {
    background: #f8f9fa;
    border-left: 4px solid;
    padding: 15px;
    border-radius: 6px;
    margin-bottom: 15px;
}

.chat-summary-enhanced .session-overview {
    border-left-color: var(--primary-color);
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
}

.chat-summary-enhanced .tdc-findings {
    border-left-color: var(--warning-color);
    background: linear-gradient(135deg, #fff3cd 0%, #ffeaa7 100%);
}

.chat-summary-enhanced h6 {
    font-weight: 600;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.chat-summary-enhanced h6 i {
    font-size: 1.1em;
}

.chat-summary-enhanced p {
    line-height: 1.5;
    margin-bottom: 0;
    color: var(--text-primary);
}

.chat-summary-enhanced .session-meta {
    background: #e9ecef;
    padding: 10px 15px;
    border-radius: 6px;
    border-top: 1px solid #dee2e6;
    margin-top: 15px;
}

.chat-summary-enhanced .session-meta i {
    margin-right: 5px;
}

/* Dark theme support for enhanced chat summary */
[data-theme="dark"] .chat-summary-enhanced .session-overview {
    background: linear-gradient(135deg, #2d2d2d 0%, #404040 100%);
    border-left-color: var(--primary-color);
}

[data-theme="dark"] .chat-summary-enhanced .tdc-findings {
    background: linear-gradient(135deg, #3d2c02 0%, #4a3a0a 100%);
    border-left-color: var(--warning-color);
}

[data-theme="dark"] .chat-summary-enhanced .session-meta {
    background: #404040;
    border-top-color: #505050;
}

/* Responsive design for enhanced chat summary */
@media (max-width: 768px) {
    .chat-summary-enhanced .session-overview,
    .chat-summary-enhanced .tdc-findings {
        padding: 12px;
        margin-bottom: 12px;
    }
    
    .chat-summary-enhanced h6 {
        font-size: 0.95rem;
    }
    
    .chat-summary-enhanced p {
        font-size: 0.9rem;
    }
    
    .chat-summary-enhanced .session-meta {
        padding: 8px 12px;
        font-size: 0.85rem;
    }
} 