/* 
  PreOpCare Premium Styling Sheet
  Theme: Dark Clinical Dashboard with Glassmorphism and Neon Highlights
*/

@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700&display=swap');

:root {
  --bg-primary: #070b14;
  --bg-card: rgba(13, 20, 38, 0.6);
  --bg-card-hover: rgba(20, 30, 56, 0.75);
  --border-color: rgba(255, 255, 255, 0.08);
  --border-color-glow: rgba(0, 242, 254, 0.3);
  
  --text-primary: #f3f4f6;
  --text-secondary: #9ca3af;
  --text-muted: #6b7280;

  --color-cyan: #00f2fe;
  --color-blue: #4facfe;
  --color-purple: #a855f7;
  --color-green: #10b981;
  --color-yellow: #f59e0b;
  --color-red: #ef4444;

  --font-sans: 'Outfit', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --transition-fast: 0.2s ease;
  --transition-normal: 0.3s ease;
}

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

body {
  background-color: var(--bg-primary);
  background-image: 
    radial-gradient(at 10% 10%, rgba(79, 172, 254, 0.15) 0px, transparent 50%),
    radial-gradient(at 90% 90%, rgba(168, 85, 247, 0.12) 0px, transparent 50%),
    radial-gradient(at 50% 10%, rgba(0, 242, 254, 0.08) 0px, transparent 40%);
  background-attachment: fixed;
  color: var(--text-primary);
  font-family: var(--font-sans);
  min-height: 100vh;
  line-height: 1.5;
  overflow-x: hidden;
}

/* App Layout */
.app-container {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  padding: 1.5rem;
  max-width: 1600px;
  margin: 0 auto;
  gap: 1.5rem;
}

/* Header */
header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.25rem 2rem;
  background: var(--bg-card);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--border-color);
  border-radius: 16px;
  box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.3);
}

.logo-section h1 {
  font-size: 1.75rem;
  font-weight: 700;
  background: linear-gradient(135deg, var(--color-cyan) 0%, var(--color-blue) 50%, var(--color-purple) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.logo-section p {
  font-size: 0.85rem;
  color: var(--text-secondary);
  font-weight: 300;
  margin-top: 2px;
}

.patient-quick-summary {
  display: flex;
  gap: 1.5rem;
}

.summary-pill {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 0.5rem 1rem;
  font-size: 0.85rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.summary-pill span:first-child {
  color: var(--text-muted);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 2px;
}

.summary-pill span:last-child {
  font-weight: 500;
}

/* Main Dashboard Grid */
.dashboard-grid {
  display: grid;
  grid-template-columns: 380px 1fr 340px;
  gap: 1.5rem;
  align-items: start;
}

@media (max-width: 1200px) {
  .dashboard-grid {
    grid-template-columns: 1fr 1fr;
  }
  .dashboard-grid > :last-child {
    grid-column: span 2;
  }
}

@media (max-width: 768px) {
  .dashboard-grid {
    grid-template-columns: 1fr;
  }
  .dashboard-grid > :last-child {
    grid-column: span 1;
  }
}

/* Glassmorphism Cards */
.glass-panel {
  background: var(--bg-card);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--border-color);
  border-radius: 16px;
  padding: 1.5rem;
  box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.25);
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}

.glass-panel:hover {
  border-color: rgba(0, 242, 254, 0.15);
}

.panel-title {
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 0.5rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  padding-bottom: 0.75rem;
}

.panel-title span.badge {
  font-size: 0.75rem;
  font-weight: 500;
  padding: 2px 6px;
  border-radius: 4px;
  background: rgba(0, 242, 254, 0.1);
  color: var(--color-cyan);
  border: 1px solid rgba(0, 242, 254, 0.2);
}

/* Left Pane: Camera & Vitals */
.camera-viewport {
  position: relative;
  background: #000;
  border-radius: 12px;
  overflow: hidden;
  aspect-ratio: 4 / 3;
  border: 1px solid rgba(255, 255, 255, 0.05);
}

#cameraVideo {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scaleX(-1); /* mirror effect */
}

#canvasOverlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none; /* Let clicks pass to control overlay if needed */
}

.camera-controls {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.5rem;
}

.btn {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--text-primary);
  padding: 0.6rem 1.2rem;
  border-radius: 8px;
  cursor: pointer;
  font-family: var(--font-sans);
  font-weight: 500;
  font-size: 0.9rem;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  transition: all var(--transition-fast);
}

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

.btn-primary {
  background: linear-gradient(135deg, var(--color-cyan) 0%, var(--color-blue) 100%);
  border: none;
  color: #040814;
  font-weight: 600;
  box-shadow: 0 4px 14px rgba(0, 242, 254, 0.3);
}

.btn-primary:hover:not(:disabled) {
  background: linear-gradient(135deg, #00d7e2 0%, #3d92e5 100%);
  box-shadow: 0 6px 20px rgba(0, 242, 254, 0.4);
}

.btn-danger {
  background: rgba(239, 68, 68, 0.15);
  border: 1px solid rgba(239, 68, 68, 0.3);
  color: #f87171;
}

.btn-danger:hover:not(:disabled) {
  background: rgba(239, 68, 68, 0.25);
  border-color: rgba(239, 68, 68, 0.5);
}

.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* Camera Overlay Scan effect */
.scanning-beam {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 4px;
  background: linear-gradient(90deg, transparent, var(--color-cyan), transparent);
  box-shadow: 0 0 10px var(--color-cyan);
  animation: scan 3s linear infinite;
  display: none;
  pointer-events: none;
}

@keyframes scan {
  0% { top: 0%; }
  50% { top: 100%; }
  100% { top: 0%; }
}

/* Vitals Waveform widget */
.vitals-monitor {
  background: rgba(4, 7, 15, 0.8);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 12px;
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.vitals-header {
  display: flex;
  justify-content: space-between;
  font-size: 0.75rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.vitals-display {
  display: flex;
  align-items: baseline;
  gap: 0.25rem;
}

.vitals-value {
  font-size: 2.25rem;
  font-weight: 700;
  color: var(--color-green);
  line-height: 1;
}

.vitals-unit {
  font-size: 0.8rem;
  color: var(--text-secondary);
}

.vitals-waveform-canvas {
  width: 100%;
  height: 50px;
  background: #02050b;
  border-radius: 6px;
  border: 1px solid rgba(255, 255, 255, 0.02);
}

/* Landmark adjustment sliders */
.landmark-tweak-box {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.04);
  padding: 1rem;
  border-radius: 10px;
}

.slider-group {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.slider-label {
  display: flex;
  justify-content: space-between;
  font-size: 0.8rem;
  color: var(--text-secondary);
}

.slider-label span:last-child {
  color: var(--color-cyan);
  font-weight: 500;
}

.range-slider {
  -webkit-appearance: none;
  width: 100%;
  height: 4px;
  border-radius: 2px;
  background: rgba(255, 255, 255, 0.1);
  outline: none;
}

.range-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--color-cyan);
  cursor: pointer;
  box-shadow: 0 0 5px var(--color-cyan);
  transition: transform 0.1s;
}

.range-slider::-webkit-slider-thumb:hover {
  transform: scale(1.2);
}

/* Middle Pane: Clinical Forms & Questionnaires */
.tabs-container {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  height: 100%;
}

.tabs-header {
  display: flex;
  gap: 0.5rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  padding-bottom: 0.5rem;
  overflow-x: auto;
}

.tab-btn {
  background: transparent;
  border: none;
  color: var(--text-secondary);
  padding: 0.5rem 1rem;
  cursor: pointer;
  font-family: var(--font-sans);
  font-weight: 500;
  font-size: 0.9rem;
  border-radius: 6px;
  transition: all var(--transition-fast);
  white-space: nowrap;
}

.tab-btn:hover {
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.03);
}

.tab-btn.active {
  color: var(--color-cyan);
  background: rgba(0, 242, 254, 0.08);
}

.tab-content {
  display: none;
  flex-direction: column;
  gap: 1.25rem;
}

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

/* Form Styling */
.form-section-title {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--color-blue);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-top: 0.5rem;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

label {
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-secondary);
}

select, input[type="text"], input[type="number"] {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--text-primary);
  padding: 0.6rem 0.8rem;
  border-radius: 8px;
  font-family: var(--font-sans);
  outline: none;
  font-size: 0.9rem;
  transition: all var(--transition-fast);
}

select:focus, input:focus {
  border-color: var(--color-cyan);
  box-shadow: 0 0 8px rgba(0, 242, 254, 0.2);
  background: rgba(255, 255, 255, 0.08);
}

/* Option Grid buttons */
.options-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(80px, 1fr));
  gap: 0.5rem;
}

.option-btn {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: var(--text-secondary);
  padding: 0.5rem;
  border-radius: 8px;
  cursor: pointer;
  text-align: center;
  font-weight: 500;
  font-size: 0.85rem;
  transition: all var(--transition-fast);
}

.option-btn:hover {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-primary);
}

.option-btn.selected {
  background: rgba(0, 242, 254, 0.12);
  border-color: var(--color-cyan);
  color: var(--color-cyan);
}

/* Checkbox Switch list */
.switch-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.switch-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.04);
  padding: 0.75rem 1rem;
  border-radius: 8px;
}

.switch-label-desc {
  display: flex;
  flex-direction: column;
}

.switch-label-desc span:first-child {
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-primary);
}

.switch-label-desc span:last-child {
  font-size: 0.75rem;
  color: var(--text-muted);
}

/* IOS Toggle Switch style */
.switch {
  position: relative;
  display: inline-block;
  width: 44px;
  height: 24px;
}

.switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.slider {
  position: absolute;
  cursor: pointer;
  top: 0; left: 0; right: 0; bottom: 0;
  background-color: rgba(255, 255, 255, 0.15);
  transition: .3s;
  border-radius: 24px;
}

.slider:before {
  position: absolute;
  content: "";
  height: 18px;
  width: 18px;
  left: 3px;
  bottom: 3px;
  background-color: white;
  transition: .3s;
  border-radius: 50%;
}

input:checked + .slider {
  background-color: var(--color-cyan);
}

input:checked + .slider:before {
  transform: translateX(20px);
}

/* Right Pane: OCR and Labs */
.upload-zone {
  border: 2px dashed rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.01);
  border-radius: 12px;
  padding: 2rem 1.5rem;
  text-align: center;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
  transition: all var(--transition-fast);
}

.upload-zone:hover, .upload-zone.dragover {
  border-color: var(--color-cyan);
  background: rgba(0, 242, 254, 0.03);
}

.upload-icon {
  font-size: 2rem;
  color: var(--color-blue);
}

.upload-zone h4 {
  font-size: 0.9rem;
  font-weight: 600;
}

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

.ocr-result-log {
  background: rgba(4, 7, 15, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 10px;
  padding: 0.75rem;
  font-family: monospace;
  font-size: 0.75rem;
  color: var(--color-cyan);
  height: 120px;
  overflow-y: auto;
}

/* Alerts box */
.alerts-container {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.alert-pill {
  padding: 0.75rem 1rem;
  border-radius: 8px;
  font-size: 0.8rem;
  display: flex;
  gap: 0.5rem;
  align-items: flex-start;
}

.alert-pill.danger {
  background: rgba(239, 68, 68, 0.12);
  border: 1px solid rgba(239, 68, 68, 0.25);
  color: #fca5a5;
}

.alert-pill.warning {
  background: rgba(245, 158, 11, 0.12);
  border: 1px solid rgba(245, 158, 11, 0.25);
  color: #fde047;
}

.alert-pill.info {
  background: rgba(79, 172, 254, 0.12);
  border: 1px solid rgba(79, 172, 254, 0.25);
  color: #93c5fd;
}

/* Summary Scoring Cards */
.scores-summary-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(110px, 1fr));
  gap: 0.75rem;
}

.score-badge {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-color);
  padding: 0.75rem;
  border-radius: 10px;
  text-align: center;
}

.score-badge-label {
  font-size: 0.7rem;
  color: var(--text-muted);
  text-transform: uppercase;
  margin-bottom: 2px;
}

.score-badge-val {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--color-cyan);
}

.score-badge-desc {
  font-size: 0.65rem;
  color: var(--text-secondary);
}

/* Modal Advice Sheet */
.modal-overlay {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(3, 7, 18, 0.85);
  backdrop-filter: blur(10px);
  z-index: 1000;
  display: none;
  justify-content: center;
  align-items: center;
  padding: 1.5rem;
}

.advice-modal {
  background: #0f172a;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 20px;
  width: 100%;
  max-width: 900px;
  max-height: 90%;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: 0 20px 50px rgba(0,0,0,0.5);
  animation: modalScale 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes modalScale {
  from { transform: scale(0.95); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}

.modal-header {
  padding: 1.25rem 2rem;
  background: rgba(255, 255, 255, 0.02);
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.modal-header h2 {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--color-cyan);
}

.modal-body {
  padding: 2rem;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 2rem;
  background: #0f172a;
  color: #e2e8f0;
}

.modal-footer {
  padding: 1rem 2rem;
  background: rgba(255, 255, 255, 0.02);
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  display: flex;
  justify-content: flex-end;
  gap: 1rem;
}

/* Printable Report Format in Modal Body */
.printable-report {
  font-size: 0.9rem;
  line-height: 1.6;
  color: #cbd5e1;
}

.report-header-card {
  border-bottom: 2px solid var(--color-blue);
  padding-bottom: 1rem;
  margin-bottom: 1.5rem;
}

.report-title {
  text-align: center;
  font-size: 1.5rem;
  font-weight: 700;
  text-transform: uppercase;
  color: #fff;
  letter-spacing: 0.05em;
  margin-bottom: 0.5rem;
}

.report-meta-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  font-size: 0.85rem;
}

.report-meta-item strong {
  color: #fff;
}

.report-section {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-bottom: 1.5rem;
}

.report-section-header {
  font-size: 1rem;
  font-weight: 700;
  color: #fff;
  border-left: 4px solid var(--color-cyan);
  padding-left: 0.5rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.report-grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
}

.report-card-sub {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 8px;
  padding: 0.75rem 1rem;
}

.report-card-sub h5 {
  font-size: 0.8rem;
  color: var(--color-blue);
  text-transform: uppercase;
  margin-bottom: 4px;
}

.report-card-sub p {
  font-size: 0.85rem;
}

.npo-table, .advice-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 0.5rem;
  font-size: 0.85rem;
}

.npo-table th, .advice-table th {
  background: rgba(255, 255, 255, 0.03);
  text-align: left;
  padding: 0.5rem 0.75rem;
  font-weight: 600;
  color: #fff;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.npo-table td, .advice-table td {
  padding: 0.5rem 0.75rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.lit-citation-block {
  background: rgba(168, 85, 247, 0.05);
  border: 1px solid rgba(168, 85, 247, 0.15);
  border-radius: 8px;
  padding: 0.75rem 1rem;
  margin-bottom: 0.5rem;
  font-size: 0.8rem;
}

.lit-citation-title {
  font-weight: 600;
  color: #d8b4fe;
}

.lit-citation-source {
  color: var(--text-muted);
  font-style: italic;
  margin-bottom: 4px;
}

.lit-citation-desc {
  color: #cbd5e1;
}

.report-signature-block {
  display: flex;
  justify-content: space-between;
  margin-top: 3rem;
  border-top: 1px dashed rgba(255, 255, 255, 0.1);
  padding-top: 1.5rem;
  font-size: 0.85rem;
}

.sig-line {
  width: 200px;
  border-top: 1px solid rgba(255, 255, 255, 0.3);
  text-align: center;
  padding-top: 0.25rem;
  color: var(--text-secondary);
}

/* Pre-op Advice layout alerts */
.advice-bullet-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  padding-left: 1.25rem;
}

.advice-bullet-list li {
  font-size: 0.85rem;
}

.advice-bullet-list li strong {
  color: #fff;
}

/* PRINT MEDIA STYLING */
@media print {
  body {
    background: #fff !important;
    color: #000 !important;
    font-size: 11pt !important;
    font-family: "Times New Roman", Times, serif !important;
  }
  
  .app-container, header, .dashboard-grid, .modal-header, .modal-footer, .modal-overlay, .no-print {
    display: none !important; /* Hide interactive web application layout */
  }

  .modal-overlay {
    position: relative !important;
    display: block !important;
    background: transparent !important;
    backdrop-filter: none !important;
    z-index: auto !important;
    padding: 0 !important;
  }

  .advice-modal {
    background: #fff !important;
    border: none !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    width: 100% !important;
    max-width: 100% !important;
    max-height: 100% !important;
    overflow: visible !important;
    animation: none !important;
  }

  .modal-body {
    padding: 0 !important;
    background: #fff !important;
    color: #000 !important;
    overflow: visible !important;
  }

  .printable-report {
    color: #000 !important;
  }

  .report-header-card {
    border-bottom: 2px solid #000 !important;
  }

  .report-title {
    color: #000 !important;
  }

  .report-meta-grid {
    grid-template-columns: repeat(3, 1fr) !important;
  }

  .report-meta-item strong, .report-section-header, .report-card-sub h5 {
    color: #000 !important;
  }

  .report-section-header {
    border-left: 3px solid #000 !important;
  }

  .report-card-sub {
    background: #fff !important;
    border: 1px solid #ccc !important;
  }

  .npo-table th, .advice-table th {
    background: #f3f4f6 !important;
    color: #000 !important;
    border-bottom: 2px solid #000 !important;
  }

  .npo-table td, .advice-table td {
    border-bottom: 1px solid #ccc !important;
  }

  .lit-citation-block {
    background: #fff !important;
    border: 1px solid #ccc !important;
  }

  .lit-citation-title {
    color: #000 !important;
  }

  .lit-citation-source, .lit-citation-desc, .advice-bullet-list li, .advice-bullet-list li strong {
    color: #000 !important;
  }

  .report-signature-block {
    border-top: 1px dashed #000 !important;
    margin-top: 4rem !important;
  }

  .sig-line {
    border-top: 1px solid #000 !important;
    color: #000 !important;
  }
}

/* Camera Toggle Button styling */
#btnToggleCamera {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--color-cyan);
  padding: 0.6rem 0.8rem;
  border-radius: 8px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-weight: 500;
  transition: all var(--transition-fast);
}

#btnToggleCamera:hover {
  background: rgba(0, 242, 254, 0.08);
  border-color: var(--color-cyan);
}

#btnToggleCamera:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* Cloud submissions and research block styling */
.research-sharing-panel {
  background: rgba(255, 255, 255, 0.01);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 12px;
  padding: 1.25rem;
  margin-top: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.research-sharing-panel h4 {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--color-cyan);
  margin-bottom: 0.25rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.consent-checkbox-container {
  display: flex;
  gap: 0.75rem;
  align-items: flex-start;
  font-size: 0.8rem;
  color: var(--text-secondary);
  cursor: pointer;
}

.consent-checkbox-container input {
  margin-top: 0.2rem;
  accent-color: var(--color-cyan);
}

.sharing-actions-row {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
  align-items: center;
}

.btn-cloud-upload {
  background: linear-gradient(135deg, var(--color-blue), var(--color-cyan));
  color: #02050b !important;
  font-weight: 700;
  border: none;
  padding: 0.6rem 1.25rem;
  border-radius: 8px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  transition: opacity 0.2s ease;
}

.btn-cloud-upload:hover {
  opacity: 0.9;
}

.btn-twitter-share {
  background: #1d9bf0;
  color: #fff !important;
  font-weight: 700;
  border: none;
  padding: 0.6rem 1.25rem;
  border-radius: 8px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  transition: background-color 0.2s ease;
}

.btn-twitter-share:hover {
  background: #1a8cd8;
}

#cloudUploadStatus {
  font-size: 0.75rem;
  font-weight: 600;
  margin-left: 0.5rem;
}

/* Camera Liveness Banner Overlay */
.camera-liveness-banner {
  position: absolute;
  top: 10px;
  right: 10px;
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 0.65rem;
  font-family: monospace;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  z-index: 5;
  background: rgba(0, 0, 0, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: var(--text-muted);
  pointer-events: none;
  transition: all 0.3s ease;
}

.camera-liveness-banner.idle {
  border-color: rgba(255, 255, 255, 0.2);
  color: var(--text-muted);
  background: rgba(0, 0, 0, 0.6);
}

.camera-liveness-banner.verified {
  border-color: var(--color-green);
  color: var(--color-green);
  background: rgba(16, 185, 129, 0.2);
  box-shadow: 0 0 10px rgba(16, 185, 129, 0.3);
}

.camera-liveness-banner.failed {
  border-color: var(--color-red);
  color: #ef4444;
  background: rgba(239, 68, 68, 0.2);
  box-shadow: 0 0 10px rgba(239, 68, 68, 0.3);
}

/* Liveness photo preview indicator */
.photo-liveness-badge {
  display: inline-block;
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 0.65rem;
  font-weight: 700;
  margin-top: 4px;
}

.photo-liveness-badge.success {
  background: rgba(16, 185, 129, 0.15);
  color: var(--color-green);
  border: 1px solid rgba(16, 185, 129, 0.3);
}

.photo-liveness-badge.error {
  background: rgba(239, 68, 68, 0.15);
  color: #f87171;
  border: 1px solid rgba(239, 68, 68, 0.3);
}

/* GCS Disabled States */
.gcs-disabled {
  opacity: 0.4;
  pointer-events: none;
}

/* SaaS Enterprise Analytics styles */
.saas-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.75rem;
  margin-bottom: 1.25rem;
}

.saas-card {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 8px;
  padding: 0.75rem;
  text-align: center;
  transition: all 0.3s ease;
}

.saas-card:hover {
  background: rgba(255, 255, 255, 0.04);
  border-color: rgba(255, 255, 255, 0.1);
  transform: translateY(-2px);
}

.saas-kpi-title {
  font-size: 0.75rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.saas-kpi-val {
  font-size: 1.5rem;
  font-weight: 700;
  margin: 0.25rem 0;
}

.saas-kpi-sub {
  font-size: 0.65rem;
  color: var(--text-secondary);
}

.saas-chart-container {
  background: rgba(255, 255, 255, 0.01);
  border: 1px solid rgba(255, 255, 255, 0.04);
  border-radius: 10px;
  padding: 1rem;
  margin-bottom: 1.25rem;
}

.saas-chart-bars {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  height: 120px;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  margin-bottom: 0.5rem;
}

.saas-chart-bar-wrapper {
  display: flex;
  flex-direction: column;
  align-items: center;
  flex: 1;
  height: 100%;
}

.saas-chart-bar-val {
  font-size: 0.7rem;
  color: var(--text-secondary);
  margin-bottom: auto;
}

.saas-chart-bar {
  width: 60%;
  border-radius: 4px 4px 0 0;
  transition: height 0.5s ease;
}

.saas-chart-bar.green {
  background: linear-gradient(180deg, var(--color-green), rgba(16, 185, 129, 0.2));
}

.saas-chart-bar.cyan {
  background: linear-gradient(180deg, var(--color-cyan), rgba(0, 242, 254, 0.2));
}

.saas-chart-bar.orange {
  background: linear-gradient(180deg, #f59e0b, rgba(245, 158, 11, 0.2));
}

.saas-chart-bar.red {
  background: linear-gradient(180deg, #ef4444, rgba(239, 68, 68, 0.2));
}

.saas-chart-labels {
  display: flex;
  justify-content: space-between;
  font-size: 0.7rem;
  color: var(--text-muted);
  text-align: center;
}

.saas-chart-label {
  flex: 1;
}

.saas-ehr-card {
  background: rgba(0, 242, 254, 0.03);
  border: 1px solid rgba(0, 242, 254, 0.1);
  border-radius: 8px;
  padding: 0.8rem;
  font-size: 0.75rem;
  line-height: 1.4;
}

.saas-ehr-header {
  font-weight: 700;
  color: var(--color-cyan);
  margin-bottom: 0.3rem;
  display: flex;
  align-items: center;
  gap: 6px;
}

/* Custom PubMed link formatting */
a.pmid-link {
  color: var(--color-cyan);
  text-decoration: none;
  font-weight: 600;
  margin-left: 0.5rem;
  transition: color 0.2s;
}

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

/* Gemini Risk Assessment Dashboard styles */
.gemini-risk-dashboard {
  background: rgba(245, 158, 11, 0.02) !important;
  border: 1px solid rgba(245, 158, 11, 0.15) !important;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
  transition: all 0.3s ease;
}

.gemini-dashboard-title {
  font-size: 0.9rem;
  font-weight: 700;
  color: #f59e0b;
  margin-bottom: 0.5rem;
  display: flex;
  align-items: center;
  gap: 6px;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.gemini-warning-item {
  margin-bottom: 0.5rem;
  padding: 0.5rem;
  border-radius: 6px;
  font-size: 0.75rem;
  line-height: 1.4;
}

.gemini-warning-item.danger {
  background: rgba(239, 68, 68, 0.08);
  border: 1px solid rgba(239, 68, 68, 0.2);
  color: #f87171;
}

.gemini-warning-item.warning {
  background: rgba(245, 158, 11, 0.08);
  border: 1px solid rgba(245, 158, 11, 0.2);
  color: #fbbf24;
}

.gemini-warning-item.info {
  background: rgba(59, 130, 246, 0.08);
  border: 1px solid rgba(59, 130, 246, 0.2);
  color: #60a5fa;
}

.gemini-labs-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.5rem;
  margin-bottom: 0.75rem;
}

.gemini-lab-card {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 6px;
  padding: 0.5rem;
  font-size: 0.75rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.gemini-lab-card.abnormal {
  border-color: rgba(239, 68, 68, 0.25);
  background: rgba(239, 68, 68, 0.02);
}

.gemini-lab-name {
  color: var(--text-muted);
}

.gemini-lab-val {
  font-weight: 700;
  color: #fff;
}

.gemini-lab-val.high {
  color: #f87171;
}

.gemini-lab-val.low {
  color: #fbbf24;
}

/* PubMed Dynamic Citations in report */
.pubmed-citation-abstract {
  font-size: 0.78rem;
  background: rgba(0, 242, 254, 0.01);
  border-left: 2px solid var(--color-cyan);
  padding: 0.5rem 0.75rem;
  margin-top: 0.4rem;
  border-radius: 0 6px 6px 0;
  color: #cbd5e1;
  line-height: 1.45;
  font-family: inherit;
}

.pubmed-citation-meta {
  font-size: 0.7rem;
  color: var(--text-muted);
  margin-top: 4px;
}


