/* ==========================================================================
   Image Forensics Studio — Modern Cyber-Forensic Design System
   ========================================================================== */

:root {
  --bg-darkest: #06090f;
  --bg-primary: #0a0f1d;
  --bg-surface: #10172a;
  --bg-card: rgba(16, 24, 43, 0.75);
  --bg-card-hover: rgba(22, 34, 60, 0.9);
  --bg-input: #080d19;

  --border-subtle: rgba(56, 189, 248, 0.12);
  --border-active: rgba(56, 189, 248, 0.4);
  --border-focus: #38bdf8;

  --accent-cyan: #38bdf8;
  --accent-cyan-dim: rgba(56, 189, 248, 0.15);
  --accent-emerald: #10b981;
  --accent-emerald-dim: rgba(16, 185, 129, 0.15);
  --accent-amber: #f59e0b;
  --accent-amber-dim: rgba(245, 158, 11, 0.15);
  --accent-rose: #f43f5e;
  --accent-rose-dim: rgba(244, 63, 94, 0.15);
  --accent-indigo: #818cf8;

  --text-main: #f1f5f9;
  --text-muted: #94a3b8;
  --text-dim: #64748b;

  --shadow-glow: 0 0 25px rgba(56, 189, 248, 0.18);
  --shadow-card: 0 10px 30px -5px rgba(0, 0, 0, 0.5);
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --radius-full: 9999px;

  --transition-fast: 0.15s ease;
  --transition-normal: 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-mono: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, Courier, monospace;
}

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

html, body {
  width: 100%;
  height: 100%;
  background-color: var(--bg-darkest);
  color: var(--text-main);
  font-family: var(--font-sans);
  font-size: 14px;
  line-height: 1.5;
  overflow: hidden;
}

/* Scrollbars */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.2);
}
::-webkit-scrollbar-thumb {
  background: rgba(56, 189, 248, 0.25);
  border-radius: var(--radius-full);
}
::-webkit-scrollbar-thumb:hover {
  background: var(--accent-cyan);
}

/* App Container */
.app-container {
  display: flex;
  width: 100vw;
  height: 100vh;
  overflow: hidden;
}

/* ==========================================================================
   Navigation Sidebar
   ========================================================================== */

.sidebar {
  width: 250px;
  min-width: 250px;
  height: 100%;
  background-color: var(--bg-primary);
  border-right: 1px solid var(--border-subtle);
  display: flex;
  flex-direction: column;
  z-index: 20;
}

.sidebar-header {
  padding: 20px 18px;
  display: flex;
  align-items: center;
  gap: 12px;
  border-bottom: 1px solid var(--border-subtle);
}

.brand-icon {
  width: 38px;
  height: 38px;
  border-radius: var(--radius-md);
  background: linear-gradient(135deg, #0284c7, #38bdf8);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  box-shadow: 0 0 16px rgba(56, 189, 248, 0.35);
}

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

.brand-title {
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.5px;
  color: #ffffff;
}

.brand-subtitle {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  color: var(--accent-cyan);
  letter-spacing: 1px;
}

.brand-author {
  font-size: 10.5px;
  font-weight: 500;
  color: var(--text-dim);
  letter-spacing: 0.3px;
  margin-top: 2px;
  line-height: 1.2;
}

.sidebar-nav {
  flex: 1;
  padding: 18px 12px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  overflow-y: auto;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  border-radius: var(--radius-md);
  color: var(--text-muted);
  text-decoration: none;
  font-weight: 500;
  font-size: 13.5px;
  transition: all var(--transition-fast);
  cursor: pointer;
  border: 1px solid transparent;
}

.nav-item:hover {
  color: #ffffff;
  background-color: rgba(255, 255, 255, 0.04);
  border-color: rgba(255, 255, 255, 0.08);
}

.nav-item.active {
  color: #ffffff;
  background: linear-gradient(90deg, rgba(56, 189, 248, 0.16), rgba(56, 189, 248, 0.04));
  border-color: var(--border-active);
  box-shadow: inset 3px 0 0 var(--accent-cyan);
}

.nav-icon {
  font-size: 16px;
  width: 20px;
  text-align: center;
}

.sidebar-footer {
  padding: 16px 18px;
  border-top: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 12px;
  color: var(--text-dim);
}

.status-badge {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--accent-emerald);
  font-weight: 600;
}

.status-indicator {
  width: 8px;
  height: 8px;
  border-radius: var(--radius-full);
  background-color: var(--accent-emerald);
  box-shadow: 0 0 8px var(--accent-emerald);
  animation: pulse-green 2s infinite;
}

@keyframes pulse-green {
  0% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.4; transform: scale(0.85); }
  100% { opacity: 1; transform: scale(1); }
}

/* ==========================================================================
   Main Content Area
   ========================================================================== */

.main-content {
  flex: 1;
  height: 100%;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background-color: var(--bg-darkest);
  position: relative;
}

.top-bar {
  height: 60px;
  min-height: 60px;
  padding: 0 28px;
  background-color: var(--bg-primary);
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: space-between;
  z-index: 10;
}

.view-title-container {
  display: flex;
  align-items: baseline;
  gap: 12px;
}

.view-title {
  font-size: 18px;
  font-weight: 700;
  color: #ffffff;
}

.view-breadcrumb {
  font-size: 12px;
  color: var(--text-dim);
}

.top-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.view-viewport {
  flex: 1;
  overflow-y: auto;
  padding: 24px 28px;
  position: relative;
}

.view-pane {
  display: none;
  width: 100%;
  max-width: 1400px;
  margin: 0 auto;
}

.view-pane.active {
  display: block;
}

/* ==========================================================================
   Buttons & Controls
   ========================================================================== */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 8px 16px;
  border-radius: var(--radius-md);
  font-size: 13.5px;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  border: 1px solid transparent;
  transition: all var(--transition-fast);
}

.btn-primary {
  background: linear-gradient(135deg, #0284c7, #0ea5e9);
  color: #ffffff;
  box-shadow: 0 4px 14px rgba(14, 165, 233, 0.35);
}

.btn-primary:hover:not(:disabled) {
  background: linear-gradient(135deg, #0369a1, #0284c7);
  box-shadow: 0 6px 20px rgba(14, 165, 233, 0.5);
  transform: translateY(-1px);
}

.btn-analyze {
  background: linear-gradient(135deg, #059669, #10b981);
  color: #ffffff;
  padding: 12px 28px;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.5px;
  box-shadow: 0 0 20px rgba(16, 185, 129, 0.4);
}

.btn-analyze:hover:not(:disabled) {
  background: linear-gradient(135deg, #047857, #059669);
  box-shadow: 0 0 30px rgba(16, 185, 129, 0.6);
  transform: translateY(-2px);
}

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

.btn-secondary:hover:not(:disabled) {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.2);
}

.btn-outline-cyan {
  background: transparent;
  color: var(--accent-cyan);
  border-color: var(--border-active);
}

.btn-outline-cyan:hover:not(:disabled) {
  background: var(--accent-cyan-dim);
  border-color: var(--accent-cyan);
}

.btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  transform: none !important;
  box-shadow: none !important;
}

/* ==========================================================================
   Upload & Workspace Flow
   ========================================================================== */

.upload-card {
  background: var(--bg-card);
  backdrop-filter: blur(12px);
  border: 2px dashed var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 40px 24px;
  text-align: center;
  cursor: pointer;
  transition: all var(--transition-normal);
  margin-bottom: 24px;
}

.upload-card:hover, .upload-card.drag-over {
  border-color: var(--accent-cyan);
  background: rgba(56, 189, 248, 0.05);
  box-shadow: var(--shadow-glow);
}

.upload-icon-wrapper {
  width: 64px;
  height: 64px;
  border-radius: var(--radius-full);
  background: var(--accent-cyan-dim);
  color: var(--accent-cyan);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  margin: 0 auto 16px;
  transition: transform var(--transition-fast);
}

.upload-card:hover .upload-icon-wrapper {
  transform: scale(1.1);
}

.upload-heading {
  font-size: 17px;
  font-weight: 700;
  color: #ffffff;
  margin-bottom: 6px;
}

.upload-subtext {
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 12px;
}

.format-tags {
  display: flex;
  gap: 8px;
  justify-content: center;
  flex-wrap: wrap;
}

.format-tag {
  padding: 3px 8px;
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
  font-size: 11px;
  color: var(--text-dim);
  font-family: var(--font-mono);
}

/* ==========================================================================
   Image Preview & Pre-Analysis Box
   ========================================================================== */

.preview-container {
  display: none;
  background: var(--bg-card);
  backdrop-filter: blur(12px);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 24px;
  margin-bottom: 24px;
  animation: fadeIn 0.3s ease;
}

.preview-grid {
  display: grid;
  grid-template-columns: 340px 1fr;
  gap: 24px;
  align-items: center;
}

.preview-image-box {
  width: 100%;
  height: 240px;
  border-radius: var(--radius-md);
  background: #000000;
  border: 1px solid var(--border-subtle);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.preview-image-box img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

.preview-details {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.preview-header-line {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.preview-filename {
  font-size: 18px;
  font-weight: 700;
  color: #ffffff;
  word-break: break-all;
}

.badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  border-radius: var(--radius-full);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.badge-cyan { background: var(--accent-cyan-dim); color: var(--accent-cyan); border: 1px solid rgba(56, 189, 248, 0.3); }
.badge-emerald { background: var(--accent-emerald-dim); color: var(--accent-emerald); border: 1px solid rgba(16, 185, 129, 0.3); }
.badge-amber { background: var(--accent-amber-dim); color: var(--accent-amber); border: 1px solid rgba(245, 158, 11, 0.3); }
.badge-rose { background: var(--accent-rose-dim); color: var(--accent-rose); border: 1px solid rgba(244, 63, 94, 0.3); }

.info-chips {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 10px;
}

.info-chip {
  background: rgba(0, 0, 0, 0.3);
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-subtle);
}

.info-chip-label {
  font-size: 11px;
  color: var(--text-dim);
  text-transform: uppercase;
  font-weight: 600;
}

.info-chip-value {
  font-size: 13.5px;
  font-weight: 600;
  color: #ffffff;
  margin-top: 2px;
}

.action-bar {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-top: 8px;
}

/* ==========================================================================
   Live Progress Section
   ========================================================================== */

.progress-section {
  display: none;
  background: var(--bg-card);
  border: 1px solid var(--border-active);
  border-radius: var(--radius-lg);
  padding: 24px;
  margin-bottom: 24px;
  box-shadow: var(--shadow-glow);
  animation: fadeIn 0.3s ease;
}

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

.progress-stage {
  font-size: 15px;
  font-weight: 700;
  color: var(--accent-cyan);
}

.progress-percent {
  font-size: 16px;
  font-weight: 700;
  font-family: var(--font-mono);
  color: #ffffff;
}

.progress-bar-track {
  width: 100%;
  height: 8px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-full);
  overflow: hidden;
  margin-bottom: 12px;
}

.progress-bar-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, #0284c7, #38bdf8, #10b981);
  border-radius: var(--radius-full);
  transition: width 0.3s ease;
  box-shadow: 0 0 10px rgba(56, 189, 248, 0.5);
}

.progress-message {
  font-size: 13px;
  color: var(--text-muted);
}

/* ==========================================================================
   Executive Verdict & Metrics Panel
   ========================================================================== */

.verdict-banner {
  display: none;
  background: linear-gradient(135deg, rgba(16, 24, 43, 0.95), rgba(10, 15, 29, 0.95));
  border: 1px solid var(--border-active);
  border-radius: var(--radius-lg);
  padding: 28px;
  margin-bottom: 24px;
  box-shadow: var(--shadow-card);
  animation: fadeIn 0.4s ease;
}

.verdict-grid {
  display: grid;
  grid-template-columns: 1fr 180px 180px 180px;
  gap: 20px;
  align-items: center;
}

.verdict-main-info {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.verdict-title-tag {
  font-size: 11.5px;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--accent-cyan);
  letter-spacing: 1px;
}

.verdict-heading {
  font-size: 26px;
  font-weight: 800;
  letter-spacing: -0.5px;
}

.verdict-heading.real { color: var(--accent-emerald); }
.verdict-heading.suspicious { color: var(--accent-amber); }
.verdict-heading.tampered { color: var(--accent-rose); }

.verdict-desc {
  font-size: 13px;
  color: var(--text-muted);
  max-width: 500px;
}

.metric-circle-card {
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 16px 12px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}

.metric-circle-value {
  font-size: 26px;
  font-weight: 800;
  font-family: var(--font-mono);
}

.metric-circle-label {
  font-size: 11px;
  text-transform: uppercase;
  color: var(--text-dim);
  font-weight: 600;
}

/* ==========================================================================
   Modular Analysis Results Grid
   ========================================================================== */

.results-section {
  display: none;
  animation: fadeIn 0.4s ease;
}

.section-title-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

.section-title {
  font-size: 17px;
  font-weight: 700;
  color: #ffffff;
  display: flex;
  align-items: center;
  gap: 8px;
}

.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(380px, 1fr));
  gap: 18px;
  margin-bottom: 30px;
}

.module-card {
  background: var(--bg-card);
  backdrop-filter: blur(12px);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  overflow: hidden;
  transition: all var(--transition-fast);
}

.module-card:hover {
  border-color: rgba(56, 189, 248, 0.3);
  background: var(--bg-card-hover);
  transform: translateY(-2px);
  box-shadow: var(--shadow-card);
}

.module-card-header {
  padding: 12px 16px;
  background: rgba(0, 0, 0, 0.2);
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.module-title {
  font-size: 13.5px;
  font-weight: 700;
  color: #ffffff;
  display: flex;
  align-items: center;
  gap: 8px;
}

.module-time {
  font-size: 11px;
  color: var(--text-dim);
  font-family: var(--font-mono);
}

.module-card-body {
  padding: 14px 16px;
  font-size: 13px;
  max-height: 240px;
  overflow-y: auto;
}

.module-data-row {
  display: flex;
  justify-content: space-between;
  padding: 6px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

.module-data-row:last-child {
  border-bottom: none;
}

.module-key {
  color: var(--text-muted);
  font-weight: 500;
}

.module-val {
  color: #ffffff;
  font-weight: 600;
  text-align: right;
  word-break: break-all;
  max-width: 60%;
}

.module-error-msg {
  color: var(--accent-rose);
  background: var(--accent-rose-dim);
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  font-size: 12.5px;
  border: 1px solid rgba(244, 63, 94, 0.25);
}

/* ==========================================================================
   Forensic Graphs Panel
   ========================================================================== */

.graphs-section {
  display: none;
  margin-bottom: 30px;
  animation: fadeIn 0.4s ease;
}

.graphs-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(380px, 1fr));
  gap: 18px;
}

.graph-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  overflow: hidden;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.graph-card:hover {
  border-color: var(--accent-cyan);
  box-shadow: var(--shadow-glow);
  transform: translateY(-3px);
}

.graph-card-preview {
  width: 100%;
  height: 200px;
  background: #000000;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.graph-card-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--transition-normal);
}

.graph-card:hover .graph-card-preview img {
  transform: scale(1.03);
}

.graph-card-info {
  padding: 12px 16px;
}

.graph-card-title {
  font-size: 14px;
  font-weight: 700;
  color: #ffffff;
  margin-bottom: 4px;
}

.graph-card-desc {
  font-size: 12px;
  color: var(--text-muted);
  line-height: 1.4;
}

/* ==========================================================================
   Modal Graph Viewer & Zoom
   ========================================================================== */

.modal-backdrop {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(4, 7, 13, 0.85);
  backdrop-filter: blur(8px);
  z-index: 100;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

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

.modal-dialog {
  background: var(--bg-surface);
  border: 1px solid var(--border-active);
  border-radius: var(--radius-lg);
  width: 90vw;
  max-width: 1100px;
  height: 85vh;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-card);
  overflow: hidden;
  animation: zoomIn 0.2s ease;
}

.modal-header {
  padding: 16px 20px;
  background: rgba(0, 0, 0, 0.25);
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.modal-title {
  font-size: 16px;
  font-weight: 700;
  color: #ffffff;
}

.modal-controls {
  display: flex;
  align-items: center;
  gap: 8px;
}

.modal-viewport {
  flex: 1;
  overflow: hidden;
  position: relative;
  background: #000000;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: grab;
}

.modal-viewport:active {
  cursor: grabbing;
}

.modal-viewport img {
  max-width: 95%;
  max-height: 95%;
  transition: transform 0.15s ease;
}

.modal-footer {
  padding: 12px 20px;
  background: rgba(0, 0, 0, 0.25);
  border-top: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 12px;
  color: var(--text-muted);
}

/* ==========================================================================
   Cases & Reports Views
   ========================================================================== */

.cases-table-container {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  overflow: hidden;
}

.cases-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
}

.cases-table th {
  background: rgba(0, 0, 0, 0.3);
  padding: 12px 16px;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--text-dim);
  border-bottom: 1px solid var(--border-subtle);
}

.cases-table td {
  padding: 12px 16px;
  font-size: 13px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  color: var(--text-main);
}

.cases-table tr:hover td {
  background: rgba(255, 255, 255, 0.02);
}

/* ==========================================================================
   Animations
   ========================================================================== */

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes zoomIn {
  from { opacity: 0; transform: scale(0.96); }
  to { opacity: 1; transform: scale(1); }
}

/* ==========================================================================
   Responsive Breakpoints & Media Queries
   ========================================================================== */

@media (max-width: 1024px) {
  .sidebar {
    width: 200px;
    min-width: 200px;
  }
  .cards-grid {
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  }
  .graphs-grid {
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  }
}

@media (max-width: 768px) {
  html, body {
    overflow-y: auto;
    height: auto;
    min-height: 100%;
  }
  .app-container {
    flex-direction: column;
    height: auto;
    min-height: 100vh;
    overflow-y: auto;
  }
  .sidebar {
    width: 100%;
    min-width: 100%;
    height: auto;
    border-right: none;
    border-bottom: 1px solid var(--border-subtle);
  }
  .sidebar-nav {
    display: flex;
    flex-wrap: wrap;
    padding: 8px;
    gap: 4px;
  }
  .sidebar-nav .nav-item {
    flex: 1 1 auto;
    min-width: 90px;
    padding: 8px 10px;
    font-size: 12px;
  }
  .main-content {
    width: 100%;
    height: auto;
    overflow-y: visible;
  }
  .top-bar {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
    padding: 12px 16px;
  }
  .top-actions {
    width: 100%;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 8px;
  }
  .view-viewport {
    padding: 16px;
  }
  .cards-grid, .graphs-grid {
    grid-template-columns: 1fr;
  }
  .cases-table-container {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  .modal-dialog {
    width: 95vw !important;
    max-width: 95vw !important;
    margin: 10px !important;
  }
}

@media (max-width: 480px) {
  .top-actions {
    flex-direction: column;
    align-items: stretch;
  }
  .user-session-widget {
    flex-wrap: wrap;
    justify-content: flex-start;
  }
  .upload-card {
    padding: 24px 12px;
  }
}

/* ==========================================================================
   Developer & Business Development Contact Section
   ========================================================================== */

.dev-contact-card {
  border-color: rgba(56, 189, 248, 0.25);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.25);
  transition: all var(--transition-normal);
}

.dev-contact-card:hover {
  border-color: rgba(56, 189, 248, 0.45);
  box-shadow: 0 8px 30px rgba(56, 189, 248, 0.12), var(--shadow-card);
}

.dev-contact-body {
  padding: 20px !important;
}

.dev-header {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 12px;
}

.dev-avatar-container {
  flex-shrink: 0;
}

.dev-avatar-icon {
  width: 46px;
  height: 46px;
  border-radius: var(--radius-md);
  background: linear-gradient(135deg, rgba(56, 189, 248, 0.15), rgba(16, 185, 129, 0.15));
  border: 1px solid rgba(56, 189, 248, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  box-shadow: 0 0 14px rgba(56, 189, 248, 0.2);
}

.dev-title-block {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.dev-role-label {
  font-size: 11px;
  font-weight: 700;
  color: var(--accent-cyan);
  letter-spacing: 1px;
  text-transform: uppercase;
  font-family: var(--font-mono);
}

.dev-name {
  font-family: 'Kalam', 'Caveat', 'Segoe Script', 'Brush Script MT', cursive, sans-serif;
  font-size: 22px;
  font-weight: 700;
  color: #ffffff;
  letter-spacing: 0.5px;
  line-height: 1.2;
  text-shadow: 0 0 16px rgba(56, 189, 248, 0.25);
}

.dev-pitch-message {
  font-size: 13.5px;
  font-style: italic;
  color: #e2e8f0;
  margin: 14px 0 16px 0;
  padding: 10px 14px;
  background: rgba(56, 189, 248, 0.05);
  border-left: 3px solid var(--accent-cyan);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}

.dev-skills-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 20px;
}

.dev-pill {
  font-size: 11.5px;
  padding: 4px 10px;
  border-radius: var(--radius-full);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-subtle);
  color: var(--text-muted);
  font-weight: 500;
  transition: all var(--transition-fast);
}

.dev-pill:hover {
  border-color: rgba(56, 189, 248, 0.3);
  color: var(--text-main);
  background: rgba(56, 189, 248, 0.08);
}

.dev-contact-channels {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 12px;
  margin-bottom: 18px;
}

.dev-contact-btn {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-subtle);
  text-decoration: none;
  color: inherit;
  transition: all var(--transition-fast);
  outline: none;
}

.dev-contact-btn:hover {
  background: rgba(56, 189, 248, 0.08);
  border-color: var(--accent-cyan);
  transform: translateY(-2px);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.35);
}

.dev-contact-btn:focus-visible {
  outline: 2px solid var(--border-focus);
  outline-offset: 2px;
  border-color: var(--accent-cyan);
}

.dev-btn-icon {
  font-size: 20px;
  flex-shrink: 0;
}

.dev-btn-text {
  display: flex;
  flex-direction: column;
  gap: 1px;
  min-width: 0;
}

.dev-btn-label {
  font-size: 10px;
  text-transform: uppercase;
  color: var(--text-dim);
  font-weight: 700;
  letter-spacing: 0.5px;
}

.dev-btn-value {
  font-size: 13px;
  font-weight: 600;
  color: #ffffff;
  font-family: var(--font-mono);
  word-break: break-all;
  transition: color var(--transition-fast);
}

.dev-contact-btn:hover .dev-btn-value {
  color: var(--accent-cyan);
}

.dev-cta-footer {
  padding-top: 14px;
  border-top: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  font-size: 12.5px;
  color: var(--text-muted);
}

.dev-cta-text strong {
  color: var(--text-main);
}

@media (max-width: 640px) {
  .dev-name {
    font-size: 19px;
  }
  .dev-contact-channels {
    grid-template-columns: 1fr;
  }
}

/* ==========================================================================
   Dashboard View & Biometric HUD Backdrop
   ========================================================================== */

#view-dashboard {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  padding: 8px 4px;
}

#view-dashboard::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: 
    linear-gradient(135deg, rgba(10, 14, 23, 0.88) 0%, rgba(13, 20, 36, 0.82) 40%, rgba(10, 14, 23, 0.94) 100%),
    radial-gradient(circle at 82% 22%, rgba(0, 212, 255, 0.16), transparent 55%),
    url('../images/dashboard_bg.jpg');
  background-size: cover;
  background-position: center top;
  background-repeat: no-repeat;
  filter: saturate(1.25) contrast(1.1);
  border-radius: var(--radius-lg);
  z-index: 0;
  pointer-events: none;
}

#view-dashboard > * {
  position: relative;
  z-index: 1;
}

#view-dashboard .module-card,
#view-dashboard .cases-table-container {
  background: rgba(13, 20, 36, 0.82) !important;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid rgba(0, 212, 255, 0.18) !important;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.45);
}

/* ==========================================================================
   Recent Case Study Spotlight (Last 5 Minutes)
   ========================================================================== */

.spotlight-case-study {
  background: linear-gradient(135deg, rgba(0, 212, 255, 0.08) 0%, rgba(16, 185, 129, 0.06) 50%, rgba(13, 20, 36, 0.88) 100%);
  border: 1px solid rgba(0, 212, 255, 0.35);
  border-radius: var(--radius-lg);
  padding: 20px;
  position: relative;
  box-shadow: 0 0 25px rgba(0, 212, 255, 0.12), 0 8px 30px rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  overflow: hidden;
}

.spotlight-case-study::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--accent-cyan), var(--accent-emerald), transparent);
}

.spotlight-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.spotlight-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 12px;
  border-radius: var(--radius-full);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  background: rgba(16, 185, 129, 0.15);
  border: 1px solid rgba(16, 185, 129, 0.4);
  color: var(--accent-emerald);
}

.spotlight-pulse {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent-emerald);
  box-shadow: 0 0 10px var(--accent-emerald);
  animation: pulseGreen 1.6s infinite;
}

@keyframes pulseGreen {
  0% { transform: scale(0.95); opacity: 0.8; }
  50% { transform: scale(1.3); opacity: 1; }
  100% { transform: scale(0.95); opacity: 0.8; }
}

.spotlight-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr auto;
  gap: 16px;
  align-items: center;
}

@media (max-width: 900px) {
  .spotlight-grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }
}

.spotlight-title {
  font-size: 18px;
  font-weight: 700;
  color: #ffffff;
  margin-bottom: 4px;
}

.spotlight-meta {
  font-size: 12px;
  color: var(--text-muted);
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
}

/* ==========================================================================
   Verdict Banner Action Card: View PDF Report
   ========================================================================== */

.metric-action-card {
  transition: all var(--transition-normal);
  border: 1px solid rgba(0, 212, 255, 0.3) !important;
  background: rgba(0, 212, 255, 0.05) !important;
  position: relative;
  cursor: pointer;
}

.metric-action-card:hover {
  transform: translateY(-2px);
  border-color: var(--accent-cyan) !important;
  background: rgba(0, 212, 255, 0.12) !important;
  box-shadow: 0 0 20px rgba(0, 212, 255, 0.3);
}

.metric-action-card:active {
  transform: translateY(0);
}

/* ==========================================================================
   Printable / Fancy PDF Report Styles
   ========================================================================== */

.forensic-report-container {
  max-width: 960px;
  margin: 0 auto;
  padding: 40px 48px;
  background: #0d1424;
  color: #e2e8f0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  line-height: 1.5;
  border-radius: 8px;
  box-shadow: 0 10px 40px rgba(0,0,0,0.6);
}

.report-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 2px solid #00d4ff;
  padding-bottom: 20px;
  margin-bottom: 28px;
}

.report-title-section h2 {
  color: #00d4ff;
  font-size: 22px;
  letter-spacing: 1px;
  margin: 0 0 6px 0;
  font-weight: 800;
}

.report-subtitle {
  font-size: 11px;
  color: #94a3b8;
  letter-spacing: 1.5px;
  margin: 0;
  font-weight: 600;
}

.report-meta-badge {
  flex-shrink: 0;
}

.report-badge {
  display: inline-block;
  padding: 8px 18px;
  border-radius: 4px;
  font-weight: 800;
  font-size: 13px;
  letter-spacing: 0.5px;
}

.report-badge.badge-low {
  background: rgba(16, 185, 129, 0.2);
  color: #10b981;
  border: 1px solid #10b981;
}

.report-badge.badge-medium {
  background: rgba(245, 158, 11, 0.2);
  color: #f59e0b;
  border: 1px solid #f59e0b;
}

.report-badge.badge-high {
  background: rgba(244, 63, 94, 0.2);
  color: #f43f5e;
  border: 1px solid #f43f5e;
}

.report-section {
  margin-bottom: 28px;
}

.report-section h3 {
  color: #38bdf8;
  font-size: 13px;
  letter-spacing: 1px;
  text-transform: uppercase;
  border-bottom: 1px solid rgba(255,255,255,0.1);
  padding-bottom: 6px;
  margin-bottom: 14px;
  font-weight: 700;
}

.report-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12.5px;
  margin-bottom: 10px;
}

.report-table th, .report-table td {
  padding: 8px 12px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  text-align: left;
}

.report-table th {
  background: rgba(255, 255, 255, 0.04);
  color: #94a3b8;
  font-weight: 600;
  width: 25%;
}

.report-table td {
  color: #f1f5f9;
}

.verdict-box {
  display: flex;
  gap: 20px;
  padding: 16px 20px;
  border-radius: 6px;
  margin-bottom: 14px;
}

.verdict-box.badge-low {
  background: rgba(16, 185, 129, 0.08);
  border-left: 4px solid #10b981;
}

.verdict-box.badge-medium {
  background: rgba(245, 158, 11, 0.08);
  border-left: 4px solid #f59e0b;
}

.verdict-box.badge-high {
  background: rgba(244, 63, 94, 0.08);
  border-left: 4px solid #f43f5e;
}

.verdict-score-display {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-width: 90px;
  padding-right: 16px;
  border-right: 1px solid rgba(255,255,255,0.1);
}

.verdict-score {
  font-size: 36px;
  font-weight: 800;
  color: #fff;
  line-height: 1;
}

.verdict-denom {
  font-size: 11px;
  color: #94a3b8;
  font-weight: 600;
}

.verdict-details h4 {
  margin: 0 0 4px 0;
  color: #fff;
  font-size: 15px;
}

.verdict-sub {
  margin: 0 0 8px 0;
  font-size: 12px;
  color: #94a3b8;
}

.verdict-factors {
  margin: 6px 0 0 0;
  padding-left: 18px;
  font-size: 12px;
  color: #cbd5e1;
}

.report-graphs-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
  margin-top: 14px;
}

.report-graph-card {
  background: rgba(0, 0, 0, 0.25);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 6px;
  padding: 10px;
  text-align: center;
}

.report-graph-card img {
  max-width: 100%;
  height: 160px;
  object-fit: contain;
  border-radius: 4px;
  background: #000;
}

.report-graph-title {
  font-size: 11px;
  font-weight: 700;
  color: #38bdf8;
  margin-top: 6px;
  text-transform: uppercase;
}

.status-badge {
  padding: 2px 8px;
  border-radius: 3px;
  font-size: 10px;
  font-weight: 700;
}

.status-badge.ok {
  background: rgba(16, 185, 129, 0.15);
  color: #10b981;
}

.class-badge {
  padding: 2px 6px;
  border-radius: 3px;
  font-size: 10px;
  font-weight: 600;
}

.class-badge.supported {
  background: rgba(56, 189, 248, 0.15);
  color: #38bdf8;
}

.class-badge.approx {
  background: rgba(245, 158, 11, 0.15);
  color: #f59e0b;
}

.unsupported-callout {
  background: rgba(255, 255, 255, 0.02);
  border: 1px dashed rgba(255, 255, 255, 0.15);
  border-radius: 6px;
  padding: 14px 18px;
  font-size: 12px;
}

.unsupported-list {
  margin: 8px 0 0 0;
  padding-left: 18px;
}

.unsupported-item {
  margin-bottom: 4px;
}

.unsupported-name {
  font-weight: 700;
  color: #f43f5e;
}

.unsupported-reason {
  color: #94a3b8;
}

.report-footer {
  margin-top: 36px;
  padding-top: 18px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  font-size: 11.5px;
  color: #64748b;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.footer-credit p, .footer-disclaimer p {
  margin: 0;
}

.footer-credit strong {
  color: #94a3b8;
}

/* Print Toolbar */
.report-print-toolbar {
  position: sticky;
  top: 10px;
  z-index: 100;
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-bottom: 20px;
}

.report-toolbar-btn {
  padding: 10px 18px;
  border-radius: 6px;
  font-weight: 700;
  font-size: 13px;
  cursor: pointer;
  border: none;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  box-shadow: 0 4px 14px rgba(0,0,0,0.5);
  transition: all 0.2s ease;
}

.btn-print-primary {
  background: #00d4ff;
  color: #030712;
}

.btn-print-primary:hover {
  background: #38bdf8;
  transform: translateY(-1px);
}

.btn-print-secondary {
  background: #1e293b;
  color: #f1f5f9;
  border: 1px solid rgba(255,255,255,0.15);
}

.btn-print-secondary:hover {
  background: #334155;
}

@media print {
  body {
    background: #ffffff !important;
    color: #000000 !important;
  }
  .report-print-toolbar {
    display: none !important;
  }
  .forensic-report-container {
    box-shadow: none !important;
    background: #ffffff !important;
    color: #000000 !important;
    padding: 0 !important;
    max-width: 100% !important;
  }
  .report-header {
    border-bottom: 2px solid #000 !important;
  }
  .report-title-section h2 {
    color: #000000 !important;
  }
  .report-section h3 {
    color: #000000 !important;
    border-bottom: 1px solid #ccc !important;
  }
  .report-table th {
    background: #f1f5f9 !important;
    color: #000 !important;
    border: 1px solid #ccc !important;
  }
  .report-table td {
    color: #000 !important;
    border: 1px solid #ccc !important;
  }
  .verdict-box {
    border-left: 4px solid #000 !important;
    background: #f8fafc !important;
  }
  .verdict-score {
    color: #000 !important;
  }
  .verdict-details h4 {
    color: #000 !important;
  }
  .report-graph-card {
    border: 1px solid #ccc !important;
    background: #f8fafc !important;
  }
}

