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

:root {
  --primary: #2563EB;
  --primary-hover: #1D4ED8;
  --primary-light: #EFF6FF;
  --secondary: #0EA5E9;
  --accent: #14B8A6;
  --accent-light: #F0FDFA;
  --background: #F8FAFC;
  --card-bg: #FFFFFF;
  --card-border: #E2E8F0;
  --text-main: #0F172A;
  --text-muted: #64748B;
  --text-light: #94A3B8;
  
  --success: #10B981;
  --success-hover: #059669;
  --success-light: #ECFDF5;
  --warning: #F59E0B;
  --warning-light: #FFFBEB;
  --warning-text: #78350F;
  --danger: #EF4444;
  --danger-light: #FEF2F2;

  --shadow-sm: 0 1px 3px rgba(15, 23, 42, 0.05), 0 1px 2px rgba(15, 23, 42, 0.02);
  --shadow-md: 0 4px 6px -1px rgba(15, 23, 42, 0.08), 0 2px 4px -2px rgba(15, 23, 42, 0.04);
  --shadow-lg: 0 10px 15px -3px rgba(15, 23, 42, 0.08), 0 4px 6px -4px rgba(15, 23, 42, 0.03);
  --shadow-xl: 0 20px 25px -5px rgba(15, 23, 42, 0.1), 0 8px 10px -6px rgba(15, 23, 42, 0.05);

  --font-display: 'Outfit', sans-serif;
  --font-sans: 'Inter', sans-serif;
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  
  --transition-fast: 0.15s ease;
  --transition-normal: 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Base Styles & Resets */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--font-sans);
  background-color: var(--background);
  color: var(--text-main);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
  line-height: 1.5;
  background-image: 
    radial-gradient(at 0% 0%, hsla(217, 91%, 60%, 0.03) 0, transparent 50%),
    radial-gradient(at 100% 0%, hsla(190, 90%, 50%, 0.04) 0, transparent 50%),
    radial-gradient(at 50% 100%, hsla(172, 80%, 45%, 0.02) 0, transparent 50%);
  background-attachment: fixed;
}

/* Container */
.container {
  width: 100%;
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 24px;
}

/* Header & Logo */
.app-header {
  border-bottom: 1px solid var(--card-border);
  background: rgba(255, 255, 255, 0.8);
  backdrop-filter: blur(12px);
  position: sticky;
  top: 0;
  z-index: 100;
  padding: 16px 0;
  transition: var(--transition-normal);
}

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

.logo-container {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
}

.logo-wrapper {
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition-normal);
}

.app-logo {
  height: 38px;
  width: auto;
  object-fit: contain;
  border-radius: var(--radius-sm);
}

.logo-container:hover .logo-wrapper {
  transform: rotate(-3deg) scale(1.03);
}

.logo-text {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 20px;
  color: var(--text-main);
  letter-spacing: -0.5px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.logo-badge {
  background: var(--primary-light);
  color: var(--primary);
  font-size: 11px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 20px;
  font-family: var(--font-sans);
  border: 1px solid rgba(37, 99, 235, 0.15);
}

.system-status {
  display: flex;
  align-items: center;
  gap: 16px;
}

.status-indicator {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-muted);
  background: #F1F5F9;
  padding: 6px 12px;
  border-radius: 20px;
  border: 1px solid var(--card-border);
}

.status-dot {
  width: 8px;
  height: 8px;
  background-color: var(--success);
  border-radius: 50%;
  box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.2);
  animation: pulse-dot 2s infinite;
}

/* Page Navigation / Layout Views */
.app-view {
  flex: 1;
  display: flex;
  flex-direction: column;
  padding: 40px 0;
  transition: opacity var(--transition-normal), transform var(--transition-normal);
  width: 100%;
}

.app-view.hidden {
  display: none !important;
  opacity: 0;
  transform: translateY(10px);
}

/* Home view layout logo splash */
.hero-logo-box {
  display: flex;
  justify-content: center;
  margin-bottom: 24px;
}

.hero-logo {
  height: 110px;
  width: auto;
  object-fit: contain;
  border-radius: var(--radius-md);
  filter: drop-shadow(0 10px 20px rgba(37, 99, 235, 0.15));
  animation: logo-float 4s ease-in-out infinite;
}

@keyframes logo-float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}

.welcome-hero {
  text-align: center;
  margin-bottom: 32px;
  max-width: 680px;
  margin-left: auto;
  margin-right: auto;
}

.welcome-hero h1 {
  font-family: var(--font-display);
  font-size: 38px;
  font-weight: 800;
  letter-spacing: -1px;
  margin-bottom: 12px;
  color: var(--text-main);
}

.welcome-hero h1 span {
  background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.welcome-hero p {
  color: var(--text-muted);
  font-size: 16px;
  line-height: 1.6;
}

.home-actions-container {
  display: flex;
  justify-content: center;
  margin-bottom: 48px;
}

/* Isolated Registration Form Container */
.registration-container-layout {
  display: flex;
  justify-content: center;
  width: 100%;
}

/* Registration Form Card */
.registration-card {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-lg);
  padding: 28px;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  width: 100%;
  max-width: 580px;
}

.registration-card h2 {
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 20px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--card-border);
  display: flex;
  align-items: center;
  gap: 10px;
}

.med-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.med-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  display: flex;
  align-items: center;
  gap: 4px;
}

.required-dot {
  color: var(--danger);
  font-weight: bold;
}

.med-input {
  font-family: var(--font-sans);
  font-size: 14px;
  color: var(--text-main);
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  border: 1.5px solid var(--card-border);
  background: var(--background);
  transition: all var(--transition-fast);
  outline: none;
}

.med-input:focus {
  border-color: var(--primary);
  background: white;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

textarea.med-input {
  resize: vertical;
  min-height: 80px;
}

/* Action Cards */
.action-card {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-lg);
  padding: 36px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  transition: all var(--transition-normal);
  cursor: pointer;
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  max-width: 440px;
  width: 100%;
}

.action-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: transparent;
  transition: var(--transition-normal);
}

.action-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border-color: rgba(37, 99, 235, 0.2);
}

.action-card.card-camera:hover::before {
  background: linear-gradient(90deg, var(--primary), var(--secondary));
}

.card-icon-wrapper {
  width: 72px;
  height: 72px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 24px;
  transition: var(--transition-normal);
}

.card-camera .card-icon-wrapper {
  background: var(--primary-light);
  color: var(--primary);
}

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

.action-card h3 {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 700;
  margin-bottom: 10px;
}

.action-card p {
  color: var(--text-muted);
  font-size: 14px;
  line-height: 1.6;
  margin-bottom: 24px;
}

.action-card-btn {
  font-weight: 600;
  font-size: 14px;
  padding: 10px 24px;
  border-radius: var(--radius-sm);
  transition: var(--transition-fast);
  border: 1px solid transparent;
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
}

.card-camera .action-card-btn {
  background: var(--primary-light);
  color: var(--primary);
}

.card-camera:hover .action-card-btn {
  background: var(--primary);
  color: white;
}

/* Capture Screen Viewport Diagnostics */
.capture-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  max-width: 900px;
  margin: 0 auto;
  width: 100%;
}

.viewport-card {
  background: #000;
  width: 100%;
  aspect-ratio: 4/3;
  max-height: 500px;
  border-radius: var(--radius-lg);
  overflow: hidden;
  position: relative;
  box-shadow: var(--shadow-lg);
  border: 4px solid var(--card-bg);
}

#camera-video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Viewfinder overlay grid & brackets */
.camera-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  pointer-events: none;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 24px;
}

.camera-brackets {
  position: absolute;
  top: 30px;
  left: 30px;
  right: 30px;
  bottom: 30px;
  border: 2px dashed rgba(255, 255, 255, 0.4);
  border-radius: var(--radius-md);
  transition: border var(--transition-normal);
}

.viewport-card:hover .camera-brackets {
  border-color: var(--secondary);
}

.camera-crosshair {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 24px;
  height: 24px;
}
.camera-crosshair::before, .camera-crosshair::after {
  content: '';
  position: absolute;
  background: rgba(255, 255, 255, 0.5);
}
.camera-crosshair::before {
  top: 11px;
  left: 0;
  width: 24px;
  height: 2px;
}
.camera-crosshair::after {
  top: 0;
  left: 11px;
  width: 2px;
  height: 24px;
}

/* Professional Diagnostic HUD Overlay */
.camera-diag-hud {
  position: absolute;
  bottom: 16px;
  left: 16px;
  right: 16px;
  display: flex;
  justify-content: space-between;
  background: rgba(15, 23, 42, 0.65);
  backdrop-filter: blur(4px);
  padding: 8px 16px;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.85);
  font-family: monospace;
  font-size: 11px;
  z-index: 6;
  pointer-events: none;
}

.hud-item {
  display: flex;
  gap: 6px;
}

.hud-label {
  color: var(--secondary);
  font-weight: bold;
}

/* Skeleton Loading & Camera permission box */
.camera-skeleton {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: #0F172A;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: white;
  gap: 16px;
  z-index: 5;
  padding: 24px;
}

.permission-guide-box {
  background: rgba(30, 41, 59, 0.95);
  border: 1.5px solid var(--danger);
  border-radius: var(--radius-lg);
  padding: 28px;
  max-width: 480px;
  text-align: center;
  color: white;
  box-shadow: var(--shadow-xl);
  display: flex;
  flex-direction: column;
  align-items: center;
}

.permission-guide-box h4 {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 700;
  color: var(--danger);
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.permission-guide-box p {
  font-size: 13px;
  color: var(--text-light);
  margin-bottom: 16px;
  line-height: 1.5;
}

.guide-steps {
  background: rgba(255, 255, 255, 0.05);
  border-radius: var(--radius-sm);
  padding: 16px;
  text-align: left;
  width: 100%;
}

.guide-steps h5 {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--secondary);
  margin-bottom: 8px;
}

.guide-steps ul {
  list-style-type: none;
  font-size: 11.5px;
  color: rgba(255, 255, 255, 0.85);
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.guide-steps li {
  position: relative;
  padding-left: 14px;
}

.guide-steps li::before {
  content: '•';
  position: absolute;
  left: 0;
  color: var(--secondary);
}

.hidden {
  display: none !important;
}

.spinner {
  width: 48px;
  height: 48px;
  border: 4px solid rgba(255, 255, 255, 0.15);
  border-left-color: var(--primary);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

/* Controls inside viewport */
.viewport-header {
  position: absolute;
  top: 16px;
  left: 16px;
  right: 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  z-index: 6;
}

.device-picker-wrapper {
  background: rgba(15, 23, 42, 0.75);
  backdrop-filter: blur(8px);
  padding: 6px 12px;
  border-radius: 20px;
  display: flex;
  align-items: center;
  gap: 8px;
  border: 1px solid rgba(255, 255, 255, 0.15);
}

.device-select {
  background: transparent;
  color: white;
  border: none;
  font-size: 13px;
  font-weight: 500;
  outline: none;
  cursor: pointer;
  padding-right: 8px;
}

.device-select option {
  background: #1E293B;
  color: white;
}

.camera-badge {
  background: var(--danger);
  color: white;
  font-size: 11px;
  font-weight: 700;
  padding: 4px 8px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.camera-badge.connected {
  background: var(--success);
}

.camera-badge-dot {
  width: 6px;
  height: 6px;
  background: white;
  border-radius: 50%;
  animation: pulse-dot 1s infinite alternate;
}

.camera-controls {
  margin-top: 24px;
  display: flex;
  align-items: center;
  gap: 20px;
}

.shutter-btn {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: white;
  border: 6px solid var(--primary-light);
  cursor: pointer;
  transition: var(--transition-normal);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-lg);
}

.shutter-btn:hover {
  transform: scale(1.05);
  border-color: var(--primary);
}

.shutter-btn:active {
  transform: scale(0.95);
}

.shutter-inner {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--primary);
  transition: var(--transition-fast);
}

.shutter-btn:hover .shutter-inner {
  background: var(--primary-hover);
}

.shutter-flash {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: white;
  opacity: 0;
  z-index: 10;
  pointer-events: none;
}

.shutter-flash.active {
  animation: flash-anim 0.3s ease-out;
}

/* Preview Screen Layout */
.preview-layout {
  display: grid;
  grid-template-columns: 3fr 2fr;
  gap: 32px;
  max-width: 1080px;
  margin: 0 auto;
  width: 100%;
}

@media (max-width: 768px) {
  .preview-layout {
    grid-template-columns: 1fr;
  }
}

.preview-viewport-card {
  background: #000;
  border-radius: var(--radius-lg);
  overflow: hidden;
  aspect-ratio: 4/3;
  box-shadow: var(--shadow-lg);
  border: 4px solid var(--card-bg);
  display: flex;
  align-items: center;
  justify-content: center;
}

#preview-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.preview-sidebar {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.preview-metadata-card {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-lg);
  padding: 24px;
  box-shadow: var(--shadow-sm);
}

.preview-metadata-card h3 {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 16px;
  border-bottom: 1px solid var(--card-border);
  padding-bottom: 12px;
}

.meta-field {
  margin-bottom: 14px;
}

.meta-field:last-child {
  margin-bottom: 0;
}

.meta-label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-muted);
  font-weight: 600;
  margin-bottom: 4px;
  display: block;
}

.meta-value {
  font-size: 13.5px;
  font-weight: 500;
  color: var(--text-main);
  background: var(--background);
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--card-border);
}

.btn-container-row {
  display: flex;
  gap: 16px;
}

.btn {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 14px 24px;
  font-size: 15px;
  font-weight: 600;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all var(--transition-normal);
  border: none;
}

.btn:disabled {
  background: #E2E8F0;
  color: var(--text-light);
  cursor: not-allowed;
  box-shadow: none !important;
  transform: none !important;
}

.btn-outline {
  background: transparent;
  border: 1.5px solid var(--card-border);
  color: var(--text-muted);
}

.btn-outline:not(:disabled):hover {
  background: #F1F5F9;
  color: var(--text-main);
  border-color: var(--text-light);
}

.btn-primary {
  background: var(--primary);
  color: white;
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.2);
}

.btn-primary:not(:disabled):hover {
  background: var(--primary-hover);
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(37, 99, 235, 0.3);
}

.btn-primary:active {
  transform: translateY(0);
}

/* Gemini Grad Buttons */
.btn-gemini-gradient {
  background: linear-gradient(135deg, #2563EB 0%, #7C3AED 50%, #0EA5E9 100%);
  color: white;
  box-shadow: 0 4px 14px rgba(124, 58, 237, 0.25);
}

.btn-gemini-gradient:not(:disabled):hover {
  background: linear-gradient(135deg, #1D4ED8 0%, #6D28D9 50%, #0284C7 100%);
  box-shadow: 0 6px 20px rgba(124, 58, 237, 0.35);
  transform: translateY(-1px);
}

.gemini-badge-decor {
  width: 64px;
  height: 64px;
  margin: 0 auto 16px;
  border-radius: 50%;
  background: var(--primary-light);
  display: flex;
  align-items: center;
  justify-content: center;
  animation: float-spark 3s ease-in-out infinite;
  box-shadow: var(--shadow-sm);
  border: 1px solid rgba(124, 58, 237, 0.1);
}

@keyframes float-spark {
  0%, 100% { transform: translateY(0) scale(1); }
  50% { transform: translateY(-6px) scale(1.05); }
}

.gemini-spark {
  width: 32px;
  height: 32px;
}

/* AI Assistant Page */
.assistant-layout {
  max-width: 900px;
  margin: 0 auto;
  width: 100%;
}

.assistant-card {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-xl);
  padding: 44px;
  box-shadow: var(--shadow-lg);
  margin-top: 16px;
  position: relative;
}

.assistant-title-group {
  margin-bottom: 28px;
  text-align: center;
}

.assistant-title-group h2 {
  font-family: var(--font-display);
  font-size: 32px;
  font-weight: 800;
  color: var(--text-main);
  margin-bottom: 8px;
  letter-spacing: -0.5px;
}

.assistant-title-group p {
  color: var(--text-muted);
  font-size: 15px;
  max-width: 580px;
  margin: 0 auto;
}

/* Stepper Workflow Timeline */
.workflow-timeline {
  display: flex;
  flex-direction: column;
  gap: 20px;
  margin-bottom: 36px;
  position: relative;
}

.workflow-timeline::before {
  content: '';
  position: absolute;
  left: 20px;
  top: 24px;
  bottom: 24px;
  width: 2px;
  background: var(--card-border);
  z-index: 1;
}

.timeline-step {
  display: flex;
  gap: 20px;
  position: relative;
  z-index: 2;
  transition: opacity var(--transition-normal);
}

.timeline-step.pending {
  opacity: 0.5;
}

.step-node {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: var(--background);
  border: 2px solid var(--card-border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 15px;
  color: var(--text-muted);
  flex-shrink: 0;
  transition: all var(--transition-normal);
}

.timeline-step.active .step-node {
  background: var(--primary-light);
  border-color: var(--primary);
  color: var(--primary);
  box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.15);
}

.timeline-step.completed .step-node {
  background: var(--success);
  border-color: var(--success);
  color: white;
}

.step-content {
  flex: 1;
  background: var(--background);
  padding: 20px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--card-border);
  transition: var(--transition-normal);
}

.timeline-step.active .step-content {
  background: white;
  border-color: rgba(37, 99, 235, 0.25);
  box-shadow: var(--shadow-md);
}

.step-title {
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 6px;
  color: var(--text-main);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.step-desc {
  font-size: 13.5px;
  color: var(--text-muted);
  line-height: 1.5;
  margin-bottom: 12px;
}

.step-actions {
  display: flex;
  gap: 12px;
}

/* Copy Prompt Button Details */
.btn-copy-prompt {
  background: var(--primary);
  color: white;
  font-size: 13.5px;
  font-weight: 600;
  padding: 10px 20px;
  border-radius: var(--radius-sm);
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: all var(--transition-normal);
  box-shadow: var(--shadow-sm);
}

.btn-copy-prompt:hover {
  background: var(--primary-hover);
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}

.btn-copy-prompt.copied {
  background: var(--success) !important;
  box-shadow: 0 4px 10px rgba(16, 185, 129, 0.2);
  animation: button-pop 0.3s ease;
}

/* Continue button */
.btn-continue-workflow {
  width: 100%;
  padding: 16px;
  background: var(--primary);
  color: white;
  border: none;
  border-radius: var(--radius-md);
  font-weight: 700;
  font-size: 16px;
  cursor: pointer;
  transition: all var(--transition-normal);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.15);
}

.btn-continue-workflow:disabled {
  background: #E2E8F0;
  color: var(--text-light);
  cursor: not-allowed;
  box-shadow: none;
  transform: none;
}

.btn-continue-workflow:not(:disabled):hover {
  background: var(--primary-hover);
  box-shadow: 0 6px 20px rgba(37, 99, 235, 0.25);
  transform: translateY(-1px);
}

.btn-continue-workflow:not(:disabled):active {
  transform: translateY(0);
}

/* Status section inside AI assistant card */
.status-section {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 24px;
  padding: 16px 24px;
  background: var(--background);
  border-radius: var(--radius-md);
  border: 1px solid var(--card-border);
  font-size: 13.5px;
}

.status-label-group {
  display: flex;
  align-items: center;
  gap: 10px;
}

.status-value-text {
  font-weight: 600;
  color: var(--text-main);
}

/* Specimen preview thumbnail inside step 1 */
.step-thumbnail-preview {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--background);
  padding: 8px 12px;
  border-radius: var(--radius-md);
  border: 1px solid var(--card-border);
  margin-top: 10px;
  max-width: fit-content;
}

.step-thumbnail-img {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-sm);
  object-fit: cover;
  background: #CBD5E1;
}

.step-thumbnail-meta {
  display: flex;
  flex-direction: column;
}

.step-thumbnail-name {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-main);
  max-width: 180px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.step-thumbnail-size {
  font-size: 11px;
  color: var(--text-muted);
}

/* MODAL OVERLAY GLASSMORPHISM DESIGN */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(15, 23, 42, 0.4);
  backdrop-filter: blur(12px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  opacity: 1;
  transition: opacity var(--transition-normal);
}

.modal-overlay.hidden {
  display: none !important;
  opacity: 0;
}

.modal-card {
  background: white;
  border: 1px solid var(--card-border);
  border-radius: var(--radius-lg);
  width: 100%;
  max-width: 480px;
  padding: 32px;
  box-shadow: var(--shadow-xl);
  animation: modal-pop 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  display: flex;
  flex-direction: column;
  gap: 20px;
}

@keyframes modal-pop {
  from { transform: scale(0.9) translateY(10px); opacity: 0; }
  to { transform: scale(1) translateY(0); opacity: 1; }
}

.modal-header {
  display: flex;
  align-items: center;
  gap: 16px;
}

.modal-icon {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-md);
  background: var(--primary-light);
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
}

.modal-header h3 {
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 700;
}

.modal-message {
  font-size: 14px;
  color: var(--text-muted);
  line-height: 1.5;
}

.suggested-file-box {
  margin-top: 4px;
  background: var(--background);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-sm);
  padding: 12px 16px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.file-box-label {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.file-box-value {
  font-family: monospace;
  font-size: 13px;
  font-weight: 700;
  color: var(--text-main);
}

.modal-preview-box {
  margin-top: 4px;
  border-radius: var(--radius-md);
  overflow: hidden;
  aspect-ratio: 4/3;
  max-height: 160px;
  border: 1px solid var(--card-border);
  background: #000;
  display: flex;
  align-items: center;
  justify-content: center;
}

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

.modal-footer {
  display: flex;
  gap: 16px;
  margin-top: 8px;
}

/* Footer Section */
.app-footer {
  border-top: 1px solid var(--card-border);
  background: rgba(255, 255, 255, 0.6);
  padding: 24px 0;
  margin-top: auto;
  font-size: 13px;
  color: var(--text-muted);
  text-align: center;
}

.footer-links {
  display: flex;
  justify-content: center;
  gap: 20px;
  margin-top: 8px;
}

.footer-link {
  color: var(--text-muted);
  text-decoration: none;
  transition: var(--transition-fast);
}

.footer-link:hover {
  color: var(--primary);
}

/* Utilities */
.text-center { text-align: center; }
.mt-4 { margin-top: 16px; }
.mb-4 { margin-bottom: 16px; }

/* Animations keyframes */
@keyframes spin {
  to { transform: rotate(360deg); }
}

@keyframes pulse-dot {
  0% { transform: scale(0.95); opacity: 0.5; }
  100% { transform: scale(1.15); opacity: 1; }
}

@keyframes flash-anim {
  0% { opacity: 0; }
  25% { opacity: 1; }
  100% { opacity: 0; }
}

@keyframes button-pop {
  0% { transform: scale(1); }
  50% { transform: scale(1.08); }
  100% { transform: scale(1); }
}

/* SVG icon wrappers */
.icon {
  width: 20px;
  height: 20px;
  display: inline-block;
  vertical-align: middle;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.icon-lg {
  width: 32px;
  height: 32px;
}

.icon-sm {
  width: 16px;
  height: 16px;
}
