/**
 * CRRT ENGINE - STAGE 2 WORKFLOW STYLES
 * Professional clinical UI
 */

/* Progress Indicator */
.progress-container {
  background: white;
  border-bottom: 2px solid #e0e0e0;
  padding: 20px 40px;
  margin-bottom: 0;
}

.progress-bar {
  display: flex;
  justify-content: space-between;
  max-width: 1000px;
  margin: 0 auto;
  align-items: center;
}

.progress-step {
  flex: 1;
  text-align: center;
  padding: 15px;
  position: relative;
}

.progress-step::after {
  content: '';
  position: absolute;
  top: 50%;
  right: -50%;
  width: 100%;
  height: 2px;
  background: #e0e0e0;
  z-index: -1;
}

.progress-step:last-child::after {
  display: none;
}

.progress-step.complete {
  color: #2e7d32;
}

.progress-step.complete::after {
  background: #2e7d32;
}

.progress-step.current {
  color: #00897b;
  font-weight: 600;
}

.step-icon {
  font-size: 32px;
  margin-bottom: 8px;
}

.step-label {
  font-size: 13px;
  font-weight: 500;
}

.step-indicator {
  color: #00897b;
  font-size: 11px;
  font-weight: 700;
  margin-top: 5px;
  text-transform: uppercase;
}

/* Workflow Step Container */
.workflow-step {
  max-width: 900px;
  margin: 40px auto;
  padding: 0 40px;
}

.step-title {
  font-size: 32px;
  font-weight: 600;
  color: #1a1a1a;
  margin-bottom: 10px;
}

.step-subtitle {
  font-size: 16px;
  color: #666;
  margin-bottom: 40px;
}

/* Form Sections */
.form-section {
  background: white;
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  padding: 30px;
  margin-bottom: 30px;
}

.form-section h3 {
  font-size: 20px;
  font-weight: 600;
  color: #00897b;
  margin-bottom: 20px;
  padding-bottom: 10px;
  border-bottom: 2px solid #e0f2f1;
}

.section-note {
  background: #f5f5f5;
  border-left: 3px solid #9e9e9e;
  padding: 12px 15px;
  margin-bottom: 20px;
  font-size: 14px;
  color: #555;
}

/* Field Groups */
.field-group {
  margin-bottom: 24px;
}

.field-group label {
  display: block;
  font-size: 14px;
  font-weight: 600;
  color: #333;
  margin-bottom: 8px;
}

.field-group label.required::after {
  content: " *";
  color: #d32f2f;
}

.field-group input,
.field-group select,
.field-group textarea {
  width: 100%;
  padding: 12px 16px;
  font-size: 15px;
  border: 2px solid #e0e0e0;
  border-radius: 6px;
  transition: border-color 0.2s;
  font-family: inherit;
}

.field-group input:focus,
.field-group select:focus,
.field-group textarea:focus {
  outline: none;
  border-color: #00897b;
  box-shadow: 0 0 0 3px rgba(25, 118, 210, 0.1);
}

.field-group textarea {
  resize: vertical;
  min-height: 80px;
}

.field-note {
  font-size: 13px;
  color: #666;
  margin-top: 6px;
  line-height: 1.4;
}

/* Field Guidance */
.field-guidance {
  background: #f0f9ff;
  border-left: 3px solid #00897b;
  padding: 12px 15px;
  margin-top: 10px;
  font-size: 13px;
  line-height: 1.6;
}

.field-guidance strong {
  color: #00796b;
}

/* Table-style field guidance for better alignment */
.field-guidance-table {
  display: table;
  width: 100%;
}

.field-guidance-row {
  display: table-row;
}

.field-guidance-label {
  display: table-cell;
  width: 150px;
  color: #00796b;
  font-weight: bold;
  padding: 2px 10px 2px 0;
  vertical-align: top;
}

.field-guidance-value {
  display: table-cell;
  padding: 2px 0;
}

/* Fields Row Layout */
.fields-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-bottom: 20px;
}

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

/* Dual Input (Hematocrit OR Hemoglobin) */
.dual-input {
  display: flex;
  align-items: center;
  gap: 20px;
}

.input-option {
  flex: 1;
}

.input-option label {
  font-size: 13px;
  font-weight: 600;
  color: #666;
  margin-bottom: 6px;
  display: block;
}

.input-separator {
  font-weight: 600;
  color: #999;
  padding: 0 10px;
}

/* Approximation Notice */
.approximation-notice {
  background: #fff3cd;
  border-left: 3px solid #ff9800;
  padding: 12px 15px;
  margin-top: 10px;
  font-size: 13px;
  line-height: 1.6;
}

/* Default Confirmation Groups */
.default-group {
  background: #fafafa;
  border: 2px solid #e0e0e0;
  border-radius: 8px;
  padding: 20px;
}

.default-options {
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.default-option {
  display: flex;
  align-items: center;
  padding: 15px;
  background: white;
  border: 2px solid #e0e0e0;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s;
}

.default-option:hover {
  border-color: #00897b;
  background: #f1f8f6;
}

.default-option input[type="radio"] {
  width: 20px;
  height: 20px;
  margin-right: 12px;
  cursor: pointer;
}

.default-option input[type="number"] {
  width: 100px;
  margin-left: 10px;
  margin-right: 5px;
}

/* Modality Guide */
.modality-guide {
  background: #f5f5f5;
  padding: 15px;
  border-radius: 6px;
  margin-top: 10px;
}

.modality-guide p {
  margin-bottom: 8px;
  font-size: 13px;
  line-height: 1.5;
}

.modality-guide p:last-child {
  margin-bottom: 0;
}

/* Form Actions */
.form-actions {
  margin-top: 40px;
  padding-top: 30px;
  border-top: 2px solid #e0e0e0;
  text-align: right;
}

.form-note {
  text-align: center;
  padding: 20px;
  background: #e0f2f1;
  border-radius: 6px;
  color: #00897b;
  font-weight: 500;
}

/* Buttons */
.btn-primary {
  background: linear-gradient(135deg, #00897b 0%, #00796b 100%);
  color: white;
  border: none;
  padding: 14px 32px;
  font-size: 16px;
  font-weight: 600;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s;
  box-shadow: 0 2px 8px rgba(25, 118, 210, 0.3);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(25, 118, 210, 0.4);
}

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

.btn-large {
  padding: 16px 40px;
  font-size: 17px;
}

/* Execution Sheet Display */
.execution-sheet-display {
  max-width: 900px;
  margin: 40px auto;
  padding: 0 40px;
}

.sheet-header {
  background: linear-gradient(135deg, #00897b 0%, #00796b 100%);
  color: white;
  padding: 30px;
  border-radius: 8px 8px 0 0;
  margin-bottom: 0;
}

.sheet-header h1 {
  font-size: 28px;
  margin-bottom: 15px;
}

.sheet-meta {
  display: flex;
  gap: 30px;
  font-size: 13px;
  opacity: 0.9;
}

.immutable-badge {
  background: #4caf50;
  padding: 4px 12px;
  border-radius: 12px;
  font-weight: 600;
  font-size: 11px;
  text-transform: uppercase;
}

.sheet-section {
  background: white;
  border: 1px solid #e0e0e0;
  border-top: none;
  padding: 30px;
}

.sheet-section:last-of-type {
  border-radius: 0 0 8px 8px;
}

.sheet-section h2 {
  font-size: 22px;
  color: #00897b;
  margin-bottom: 20px;
  padding-bottom: 10px;
  border-bottom: 2px solid #e0f2f1;
}

.sheet-section h3 {
  font-size: 16px;
  color: #666;
  margin: 20px 0 10px 0;
}

.section-content p {
  margin-bottom: 12px;
  line-height: 1.6;
}

.section-content strong {
  color: #333;
  font-weight: 600;
}

.labs-list {
  list-style: none;
  padding-left: 0;
}

.labs-list li {
  padding: 8px 0;
  border-bottom: 1px solid #f5f5f5;
}

.context-note {
  font-size: 13px;
  color: #666;
  font-style: italic;
  margin-top: 10px;
}

.calculation-results {
  background: #f1f8f6;
  padding: 20px;
  border-radius: 6px;
  margin-top: 15px;
}

.calculation-results p {
  font-size: 15px;
  margin-bottom: 10px;
}

.approximation-banner {
  background: #fff3cd;
  border: 2px solid #ffa726;
  border-radius: 8px;
  padding: 20px;
  margin: 20px 0;
}

.approximation-banner h4 {
  color: #e65100;
  margin-bottom: 15px;
  font-size: 16px;
}

.disclaimer-section {
  background: #f5f5f5;
}

.disclaimer-text {
  font-size: 13px;
  line-height: 1.7;
  color: #555;
}

.sheet-actions {
  text-align: center;
  padding: 30px;
  background: white;
  border: 1px solid #e0e0e0;
  border-top: none;
  border-radius: 0 0 8px 8px;
}

/* Error Display */
.error-banner {
  background: #ffebee;
  border-left: 4px solid #d32f2f;
  padding: 15px 20px;
  margin-bottom: 30px;
  border-radius: 4px;
  font-size: 14px;
  color: #c62828;
}

/* Responsive */
@media (max-width: 768px) {
  .workflow-step,
  .execution-sheet-display {
    padding: 0 20px;
  }

  .form-section {
    padding: 20px;
  }

  .step-title {
    font-size: 26px;
  }

  .progress-container {
    padding: 10px 15px;
  }

  .progress-bar {
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    gap: 0;
    justify-content: flex-start;
    padding-bottom: 5px;
  }

  .progress-step {
    flex: 0 0 auto;
    min-width: 80px;
    padding: 8px 5px;
    margin-bottom: 0;
  }
  
  .progress-step::after {
    display: none;
  }
  
  .step-icon {
    font-size: 24px !important;
    margin-bottom: 4px;
  }
  
  .step-label {
    font-size: 10px !important;
    line-height: 1.2;
  }
  
  .step-indicator {
    font-size: 9px !important;
    white-space: nowrap;
  }
}

/* Print Styles */
@media print {
  .nav-bar,
  .progress-container,
  .sheet-actions,
  .form-actions {
    display: none;
  }

  .sheet-section {
    break-inside: avoid;
  }
}

/* Draft Restored Notice */
.draft-restored-notice {
  background: #fff3cd;
  border: 2px solid #ffa726;
  padding: 15px 20px;
  border-radius: 6px;
  margin-bottom: 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  animation: slideDown 0.3s ease;
}

.draft-restored-notice button {
  background: transparent;
  border: none;
  font-size: 24px;
  cursor: pointer;
  color: #666;
  padding: 0 10px;
}

@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Full-page Registry Action Views */
.registry-action-view {
  max-width: 700px;
  margin: 60px auto;
  padding: 0 40px;
}

.action-header {
  text-align: center;
  margin-bottom: 40px;
}

.action-header h1 {
  font-size: 32px;
  font-weight: 600;
  color: #1a1a1a;
  margin-bottom: 10px;
}

.action-header .subtitle {
  font-size: 16px;
  color: #666;
}

.action-form {
  background: white;
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  padding: 40px;
}

.inline-errors {
  background: #ffebee;
  border-left: 4px solid #d32f2f;
  padding: 15px 20px;
  margin-bottom: 30px;
  border-radius: 4px;
  color: #c62828;
}

.btn-secondary {
  background: #f5f5f5;
  color: #333;
  border: 2px solid #e0e0e0;
  padding: 14px 32px;
  font-size: 16px;
  font-weight: 600;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s;
  margin-right: 15px;
}

.btn-secondary:hover {
  background: #e0e0e0;
}

/* Safety-Critical Net UF Section */
.safety-critical {
  border: 2px solid #ff9800;
  background: #fff8e1;
}

.safety-note {
  background: #ffe082;
  padding: 10px 15px;
  border-radius: 4px;
  font-weight: 600;
  margin-bottom: 15px;
  font-size: 13px;
}

.uf-verification-options {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 15px;
}

.verification-option {
  display: flex;
  align-items: flex-start;
  padding: 15px;
  background: white;
  border: 2px solid #e0e0e0;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s;
}

.verification-option:hover {
  border-color: #00897b;
  background: #f1f8f6;
}

.verification-option input[type="radio"] {
  margin-top: 3px;
  margin-right: 12px;
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}

.option-content {
  flex: 1;
}

.uf-input-group {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 10px;
}

.uf-input-group input {
  width: 120px;
  padding: 8px 12px;
  border: 2px solid #e0e0e0;
  border-radius: 4px;
}

.blocked-option {
  border-color: #d32f2f;
  background: #ffebee;
}

.blocked-option:hover {
  border-color: #c62828;
}

.safety-block {
  background: #ffebee;
  border: 3px solid #d32f2f;
  border-radius: 8px;
  padding: 20px;
  margin-top: 15px;
  display: flex;
  gap: 15px;
  animation: shake 0.5s ease;
}

.block-icon {
  font-size: 32px;
  flex-shrink: 0;
}

.block-content strong {
  color: #c62828;
  font-size: 16px;
  display: block;
  margin-bottom: 10px;
}

.block-content p {
  margin-bottom: 8px;
  line-height: 1.5;
}

@keyframes shake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-5px); }
  75% { transform: translateX(5px); }
}

/* Navbar Updates */
.nav-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.nav-left, .nav-right {
  display: flex;
  align-items: center;
  gap: 20px;
}

.nav-link {
  color: white;
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  padding: 8px 16px;
  border-radius: 4px;
  transition: background 0.2s;
}

.nav-link:hover {
  background: rgba(255,255,255,0.2);
}

/* About Page */
.about-container {
  max-width: 900px;
  margin: 40px auto;
  padding: 0 40px;
}

.about-header {
  text-align: center;
  margin-bottom: 50px;
  padding-bottom: 30px;
  border-bottom: 2px solid #e0e0e0;
}

.about-header h1 {
  font-size: 36px;
  color: #1a1a1a;
  margin-bottom: 10px;
}

.version-info {
  color: #666;
  font-size: 14px;
}

.about-section {
  background: white;
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  padding: 30px;
  margin-bottom: 30px;
}

.about-section h2 {
  font-size: 24px;
  color: #00897b;
  margin-bottom: 20px;
}

.about-section p {
  line-height: 1.7;
  margin-bottom: 15px;
  color: #333;
}

.disclaimer-section-about {
  border: 2px solid #ff9800;
  background: #fff8e1;
}

.disclaimer-box {
  background: white;
  border-left: 4px solid #ff9800;
  padding: 20px;
  border-radius: 4px;
}

.disclaimer-box p {
  margin-bottom: 12px;
}

.disclaimer-box p:last-child {
  margin-bottom: 0;
}

.instruction-list, .feature-list, .tech-list {
  padding-left: 25px;
}

.instruction-list li, .feature-list li, .tech-list li {
  margin-bottom: 12px;
  line-height: 1.6;
}

.contact-section {
  background: #e0f2f1;
  border-color: #00897b;
}

.contact-card {
  background: white;
  padding: 25px;
  border-radius: 6px;
  border-left: 4px solid #00897b;
}

.contact-card h3 {
  font-size: 20px;
  color: #00897b;
  margin-bottom: 8px;
}

/* Supervisor and Contributor Cards */
.supervisor-card,
.contributor-card {
  background: #f8f9fa;
  padding: 20px;
  border-radius: 8px;
  border-left: 4px solid #1565c0;
  margin: 15px 0;
}

.supervisor-card h3,
.contributor-card h3 {
  font-size: 18px;
  color: #1565c0;
  margin-bottom: 5px;
}

.supervisor-card .title,
.contributor-card .title {
  font-weight: 600;
  color: #333;
  margin-bottom: 3px;
}

.supervisor-card .institution,
.contributor-card .institution {
  color: #555;
  margin-bottom: 3px;
}

.supervisor-card .location,
.contributor-card .location {
  color: #777;
  font-size: 13px;
}

/* Governance List */
.governance-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.governance-list li {
  padding: 10px 0;
  border-bottom: 1px solid #e0e0e0;
  font-size: 14px;
  line-height: 1.6;
}

.governance-list li:last-child {
  border-bottom: none;
}

.credentials {
  color: #666;
  font-size: 14px;
  margin-bottom: 5px;
}

.title {
  font-weight: 600;
  margin-bottom: 5px;
}

.institution {
  color: #666;
  margin-bottom: 15px;
}

.email {
  margin-top: 15px;
  padding-top: 15px;
  border-top: 1px solid #e0e0e0;
}

.email a {
  color: #00897b;
  text-decoration: none;
  font-weight: 500;
}

.email a:hover {
  text-decoration: underline;
}

.about-actions {
  text-align: center;
  padding: 40px 0;
}

/* Registry Logo Section */
.registry-header-with-logo {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 30px;
  padding: 20px;
  background: white;
  border: 1px solid #e0e0e0;
  border-radius: 8px;
}

.logo-section {
  display: flex;
  align-items: center;
  gap: 20px;
}

.registry-logo {
  width: 60px;
  height: 60px;
  object-fit: contain;
}

/* Education module styling */
.education-module {
  max-width: 900px;
  margin: 0 auto;
  padding: 20px;
}

.education-header {
  display: flex;
  align-items: center;
  gap: 15px;
  margin-bottom: 20px;
}

.education-header img {
  width: 50px;
  height: 50px;
  border-radius: 8px;
  object-fit: contain;
}

.education-header h1 {
  margin: 0;
  font-size: 24px;
  color: #00897b;
}

.education-header p {
  margin: 5px 0 0 0;
  color: #666;
}

.logo-text h1 {
  font-size: 28px;
  color: #1a1a1a;
  margin: 0;
}

.tagline {
  font-size: 13px;
  color: #666;
  margin: 5px 0 0 0;
}

/* Updated Contact Section */
.contact-methods {
  margin: 20px 0;
}

.contact-item {
  padding: 12px 0;
  border-bottom: 1px solid #f0f0f0;
}

.contact-item:last-child {
  border-bottom: none;
}

.contact-item strong {
  display: inline-block;
  min-width: 120px;
  color: #333;
}

.contact-item a {
  color: #00897b;
  text-decoration: none;
  font-weight: 500;
}

.contact-item a:hover {
  text-decoration: underline;
}

.presentation-note {
  margin-top: 20px;
  padding-top: 20px;
  border-top: 2px solid #e0f2f1;
  font-size: 14px;
  color: #00796b;
}

/* Navigation Controls */
.btn-back {
  background: transparent;
  color: #666;
  border: 2px solid #e0e0e0;
  padding: 14px 24px;
  font-size: 16px;
  font-weight: 600;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s;
  margin-right: 15px;
}

.btn-back:hover {
  background: #f5f5f5;
  border-color: #00897b;
  color: #00897b;
}

.form-actions {
  display: flex;
  justify-content: flex-end;
  align-items: center;
}

/* About Panel Overlay */
.about-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0,0,0,0.7);
  z-index: 9999;
  justify-content: center;
  align-items: center;
  padding: 20px;
}

.about-panel {
  background: white;
  border-radius: 8px;
  max-width: 700px;
  max-height: 90vh;
  width: 100%;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.about-panel-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 30px;
  border-bottom: 2px solid #e0e0e0;
  background: #00897b;
  color: white;
}

.about-panel-header h2 {
  margin: 0;
  font-size: 24px;
}

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

.about-panel-content {
  padding: 30px;
  overflow-y: auto;
  flex: 1;
}

.about-panel-content section {
  margin-bottom: 30px;
}

.about-panel-content h3 {
  color: #00897b;
  margin-bottom: 15px;
  font-size: 18px;
}

.about-version {
  text-align: center;
  padding-bottom: 20px;
  border-bottom: 1px solid #e0e0e0;
}

.about-subtitle {
  color: #666;
  font-size: 14px;
  margin-top: 5px;
}

.about-intro {
  line-height: 1.7;
}

.about-intro p {
  margin-bottom: 12px;
}

/* Supervisor and Contributor Cards in About Panel */
.about-panel .supervisor-card,
.about-panel .contributor-card {
  background: #f0f7ff;
  border-left: 4px solid #1565c0;
  padding: 15px;
  margin: 15px 0;
  border-radius: 4px;
  line-height: 1.6;
}

.about-panel .supervisor-card strong,
.about-panel .contributor-card strong {
  color: #1565c0;
  font-size: 15px;
}

.about-panel .supervisor-card .location,
.about-panel .contributor-card .location {
  color: #666;
  font-size: 12px;
}

/* Governance List in About Panel */
.about-governance {
  background: #f5f5f5;
  border-left: 4px solid #00897b;
  padding: 20px;
  border-radius: 4px;
}

.about-panel .governance-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.about-panel .governance-list li {
  padding: 8px 0;
  border-bottom: 1px solid #e0e0e0;
  font-size: 13px;
  line-height: 1.6;
}

.about-panel .governance-list li:last-child {
  border-bottom: none;
}

.about-disclaimer {
  background: #fff8e1;
  border-left: 4px solid #ff9800;
  padding: 20px;
  border-radius: 4px;
}

.about-contact .contact-links {
  line-height: 2;
}

.about-contact a {
  color: #00897b;
  text-decoration: none;
}

.about-contact a:hover {
  text-decoration: underline;
}

.correspondence-note {
  margin-top: 15px;
  font-size: 12px;
  color: #666;
  font-style: italic;
}

.conference-note {
  margin-top: 15px;
  padding-top: 15px;
  border-top: 1px solid #e0e0e0;
  font-size: 13px;
  color: #00796b;
}

.about-how-to ol {
  padding-left: 25px;
}

.about-how-to li {
  margin-bottom: 10px;
  line-height: 1.5;
}

/* Status Stripe (bottom bar) - styles in index.html */

/* Prescription Summary (displayed in Machine Parameters view) */
.prescription-summary {
  background: #e0f2f1;
  border: 2px solid #00897b;
  border-radius: 8px;
  padding: 20px;
  margin-bottom: 30px;
}

.prescription-summary h3 {
  color: #00796b;
  margin: 0 0 15px 0;
  font-size: 16px;
}

.prescription-summary .summary-row {
  display: flex;
  gap: 30px;
  flex-wrap: wrap;
}

.prescription-summary .summary-row span {
  font-size: 14px;
}

.prescription-summary .summary-note {
  margin-top: 12px;
  font-size: 12px;
  color: #00796b;
  font-style: italic;
}

/* Calculation Trigger View */
.calculation-trigger-view {
  max-width: 700px;
  margin: 60px auto;
  text-align: center;
  padding: 40px;
  background: white;
  border: 1px solid #e0e0e0;
  border-radius: 8px;
}

.calculation-trigger-view h2 {
  color: #00897b;
  margin-bottom: 15px;
}

.calculation-trigger-view .completion-notice {
  color: #666;
  margin-bottom: 30px;
}

.calculation-trigger-view .trigger-actions {
  display: flex;
  justify-content: center;
  gap: 20px;
  flex-wrap: wrap;
}

/* TMP Documentation Note (GATE F) */
.tmp-documentation-note {
  background: #f5f5f5;
  border-left: 3px solid #9e9e9e;
  padding: 15px 20px;
  margin: 20px 0;
  font-size: 14px;
  color: #555;
}

.tmp-documentation-note p {
  margin: 0;
}

/* ===== SESSION ENTRY ACTIONS ===== */
.session-entry-actions {
  background: white;
  border: 1px solid #e0e0e0;
  border-radius: 12px;
  padding: 30px;
  margin: 20px 0;
  text-align: center;
}

.session-entry-actions .primary-action {
  margin-bottom: 20px;
}

.session-entry-actions .primary-action .btn-large {
  font-size: 18px;
  padding: 15px 40px;
}

.session-entry-actions .action-note {
  color: #666;
  font-size: 14px;
  margin-top: 8px;
}

.session-entry-actions .secondary-action {
  padding-top: 15px;
  border-top: 1px solid #e0e0e0;
}

/* Session List */
.session-list-title {
  font-size: 18px;
  color: #333;
  padding: 15px 0;
  border-bottom: 2px solid #00897b;
  margin-bottom: 15px;
}

.session-card.active-session {
  border-left: 4px solid #00897b;
}

.session-status {
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
}

.session-status.status-active {
  background: #e8f5e9;
  color: #2e7d32;
}

.session-status.status-completed {
  background: #e3f2fd;
  color: #1565c0;
}

.session-status.status-discontinued {
  background: #fce4ec;
  color: #c62828;
}

/* No Sessions Message */
.no-sessions-message {
  text-align: center;
  padding: 40px;
  background: #f9f9f9;
  border-radius: 8px;
  color: #666;
}

.no-sessions-message .hint {
  font-size: 14px;
  color: #999;
  margin-top: 10px;
}

/* ===== PATIENT BANNER ===== */
.patient-banner {
  display: flex;
  align-items: center;
  gap: 15px;
}

.patient-banner-logo {
  width: 60px;
  height: 60px;
  border-radius: 8px;
}

.patient-info h2 {
  margin: 0;
  font-size: 24px;
  color: #1a1a1a;
}

.patient-demographics {
  margin: 5px 0 0 0;
  font-size: 14px;
  color: #666;
}

.patient-demographics .sep {
  color: #ccc;
  margin: 0 8px;
}

/* ===== WORKFLOW STEP HEADER WITH LOGO ===== */
.workflow-step-header {
  display: flex;
  align-items: center;
  gap: 20px;
  margin-bottom: 30px;
}

.workflow-logo {
  width: 70px;
  height: 70px;
  border-radius: 10px;
}

.workflow-step-header .step-title {
  margin-bottom: 5px;
}

.workflow-step-header .step-subtitle {
  margin-bottom: 0;
}

/* ===== VITALS BLOCK ===== */
.bp-input {
  display: flex;
  align-items: center;
  gap: 5px;
}

.bp-input input {
  width: 70px;
}

.bp-input span {
  font-size: 18px;
  font-weight: bold;
  color: #666;
}

/* ===== ANTICOAGULATION SUBFIELDS ===== */
.anticoag-subfields {
  background: #f8f9fa;
  border: 1px solid #e0e0e0;
  border-radius: 6px;
  padding: 20px;
  margin-top: 15px;
}

.subfields-header {
  font-size: 14px;
  font-weight: 600;
  color: #333;
  margin-bottom: 15px;
  padding-bottom: 8px;
  border-bottom: 1px solid #ddd;
}

.anticoag-subfields .field-group {
  margin-bottom: 15px;
}

.anticoag-subfields .field-group:last-child {
  margin-bottom: 0;
}

/* ===== ACTION HEADER WITH LOGO ===== */
.action-header {
  display: flex;
  align-items: center;
  gap: 20px;
  margin-bottom: 30px;
}

.action-logo {
  width: 80px;
  height: 80px;
  border-radius: 12px;
}

/* ===== MODERN MODAL SYSTEM ===== */
.modal-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.6);
  z-index: 10000;
  justify-content: center;
  align-items: center;
  padding: 20px;
  animation: fadeIn 0.2s ease;
}

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

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

@keyframes slideIn {
  from { transform: translateY(-20px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

.modal-dialog {
  background: white;
  border-radius: 12px;
  max-width: 450px;
  width: 100%;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  animation: slideIn 0.3s ease;
  overflow: hidden;
}

.modal-header {
  padding: 20px 24px;
  border-bottom: 1px solid #e0e0e0;
  display: flex;
  align-items: center;
  gap: 12px;
}

.modal-header.modal-success {
  background: linear-gradient(135deg, #e8f5e9 0%, #c8e6c9 100%);
  border-bottom-color: #a5d6a7;
}

.modal-header.modal-error {
  background: linear-gradient(135deg, #ffebee 0%, #ffcdd2 100%);
  border-bottom-color: #ef9a9a;
}

.modal-header.modal-warning {
  background: linear-gradient(135deg, #fff8e1 0%, #ffecb3 100%);
  border-bottom-color: #ffe082;
}

.modal-header.modal-info {
  background: linear-gradient(135deg, #e3f2fd 0%, #bbdefb 100%);
  border-bottom-color: #90caf9;
}

.modal-icon {
  font-size: 28px;
  line-height: 1;
}

.modal-title {
  font-size: 18px;
  font-weight: 600;
  color: #1a1a1a;
  margin: 0;
}

.modal-body {
  padding: 24px;
  font-size: 15px;
  line-height: 1.6;
  color: #333;
}

.modal-body p {
  margin: 0 0 12px 0;
}

.modal-body p:last-child {
  margin-bottom: 0;
}

.modal-footer {
  padding: 16px 24px;
  background: #f9f9f9;
  border-top: 1px solid #e0e0e0;
  display: flex;
  justify-content: flex-end;
  gap: 12px;
}

.modal-btn {
  padding: 10px 24px;
  font-size: 14px;
  font-weight: 600;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s;
  border: none;
}

.modal-btn-primary {
  background: #00897b;
  color: white;
}

.modal-btn-primary:hover {
  background: #00796b;
}

.modal-btn-secondary {
  background: white;
  color: #666;
  border: 2px solid #e0e0e0;
}

.modal-btn-secondary:hover {
  border-color: #00897b;
  color: #00897b;
}

/* ===== FIELD RANGE HINTS ===== */
.field-range {
  display: block;
  font-size: 12px;
  color: #666;
  margin-bottom: 6px;
  font-weight: normal;
}

.field-range-inline {
  font-size: 11px;
  color: #888;
  font-weight: normal;
  margin-left: 8px;
}

/* ===== MODALITY BADGE ===== */
.modality-badge {
  position: fixed;
  top: 70px;
  right: 20px;
  background: #f5f5f5;
  border: 2px solid #bdbdbd;
  border-radius: 8px;
  padding: 8px 14px;
  display: flex;
  flex-direction: column;
  align-items: center;
  z-index: 100;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
  cursor: help;
}

.modality-badge-label {
  font-size: 16px;
  font-weight: 700;
  color: #333;
  letter-spacing: 0.5px;
}

.modality-badge-descriptor {
  font-size: 11px;
  color: #666;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* Modality badge on mobile - reposition to top-left, compact */
@media (max-width: 768px) {
  .modality-badge {
    position: fixed;
    top: 60px;
    left: 10px;
    right: auto;
    padding: 4px 10px;
    border-radius: 6px;
    flex-direction: row;
    gap: 6px;
    max-width: 140px;
  }
  
  .modality-badge-label {
    font-size: 13px;
  }
  
  .modality-badge-descriptor {
    font-size: 9px;
    display: none; /* Show only label on very small screens */
  }
}

/* Show descriptor on slightly larger mobile */
@media (min-width: 400px) and (max-width: 768px) {
  .modality-badge-descriptor {
    display: block;
  }
}

/* ===== ASSUMPTIONS PANEL ===== */
.assumptions-panel {
  background: #fafafa;
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  margin: 20px 0;
  overflow: hidden;
}

.assumptions-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  cursor: pointer;
  background: #f5f5f5;
  border-bottom: 1px solid #e0e0e0;
  transition: background 0.2s;
}

.assumptions-header:hover {
  background: #eeeeee;
}

.assumptions-icon {
  font-size: 16px;
}

.assumptions-title {
  flex: 1;
  font-weight: 600;
  font-size: 14px;
  color: #333;
}

.assumptions-toggle {
  font-size: 12px;
  color: #666;
  transition: transform 0.2s;
}

.assumptions-panel.expanded .assumptions-toggle {
  transform: rotate(180deg);
}

.assumptions-content {
  display: none;
  padding: 16px;
}

.assumptions-panel.expanded .assumptions-content {
  display: block;
}

.assumptions-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.assumptions-table tr {
  border-bottom: 1px solid #eee;
}

.assumptions-table tr:last-child {
  border-bottom: none;
}

.assumption-label {
  padding: 8px 0;
  color: #666;
  width: 45%;
}

.assumption-value {
  padding: 8px 0;
  color: #333;
  font-weight: 500;
}

.assumptions-disclaimer {
  margin: 12px 0 0 0;
  padding-top: 12px;
  border-top: 1px solid #e0e0e0;
  font-size: 11px;
  color: #999;
  font-style: italic;
}

/* ===== UNIT PILLS ===== */
.unit-pill {
  display: inline-block;
  background: #e8e8e8;
  color: #555;
  font-size: 11px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 10px;
  margin-left: 6px;
  vertical-align: middle;
  user-select: none;
}

/* ===== PARAMETER LOCK INDICATOR ===== */
.param-locked {
  position: relative;
}

.param-locked::after {
  content: '🔒';
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 14px;
  opacity: 0.6;
}

.lock-indicator {
  display: inline-block;
  margin-left: 8px;
  font-size: 12px;
  color: #888;
  vertical-align: middle;
}

/* ===== COLLAPSIBLE SECTIONS ===== */
.collapsible-section {
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  margin-bottom: 16px;
  overflow: hidden;
}

.collapsible-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 18px;
  background: #fafafa;
  cursor: pointer;
  border-bottom: 1px solid transparent;
  transition: all 0.2s;
}

.collapsible-header:hover {
  background: #f0f0f0;
}

.collapsible-section.expanded .collapsible-header {
  border-bottom-color: #e0e0e0;
}

.collapsible-title {
  font-weight: 600;
  font-size: 15px;
  color: #333;
}

.collapsible-toggle {
  font-size: 14px;
  color: #666;
  transition: transform 0.2s;
}

.collapsible-section.expanded .collapsible-toggle {
  transform: rotate(180deg);
}

.collapsible-content {
  display: none;
  padding: 18px;
}

.collapsible-section.expanded .collapsible-content {
  display: block;
}

/* ===== INLINE NOTES (NEUTRAL) ===== */
.inline-note {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 10px 14px;
  background: #f8f9fa;
  border-left: 3px solid #bdbdbd;
  border-radius: 0 4px 4px 0;
  margin: 10px 0;
  font-size: 13px;
  color: #555;
}

.inline-note-icon {
  flex-shrink: 0;
  font-size: 14px;
}

.inline-note-text {
  line-height: 1.4;
}

/* ===== SECTION DIVIDERS FOR EXECUTION SHEET ===== */
.sheet-section-header {
  background: #f5f5f5;
  padding: 8px 12px;
  font-weight: 600;
  font-size: 13px;
  color: #333;
  border-bottom: 2px solid #e0e0e0;
  margin-top: 16px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.sheet-section-header:first-child {
  margin-top: 0;
}

@media print {
  .modality-badge {
    display: none !important;
  }
  
  .assumptions-panel {
    break-inside: avoid;
  }
  
  .assumptions-panel.expanded .assumptions-content {
    display: block;
  }
}

/* ===== MOBILE RESPONSIVE ENHANCEMENTS ===== */
/* Target: ICU bedside tablets and phones */

@media (max-width: 768px) {
  /* Navigation */
  .nav-bar {
    padding: 12px 15px !important;
    flex-wrap: wrap;
  }
  
  .nav-title {
    font-size: 18px !important;
  }
  
  .nav-right {
    gap: 10px !important;
  }
  
  .nav-link {
    font-size: 13px !important;
    padding: 6px 10px !important;
  }
  
  /* Main content */
  #workflow-content {
    padding: 10px !important;
  }
  
  #app-content {
    padding: 10px !important;
  }
  
  /* Workflow headers */
  .workflow-step-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }
  
  .workflow-logo {
    width: 50px !important;
    height: 50px !important;
  }
  
  .step-title {
    font-size: 22px !important;
  }
  
  .step-subtitle {
    font-size: 13px !important;
  }
  
  /* Form sections */
  .form-section {
    padding: 15px !important;
    margin-bottom: 15px !important;
  }
  
  .form-section h3 {
    font-size: 16px !important;
  }
  
  /* Input fields - larger touch targets */
  input[type="text"],
  input[type="number"],
  input[type="email"],
  input[type="tel"],
  select,
  textarea {
    font-size: 16px !important; /* Prevents iOS zoom */
    padding: 12px !important;
    min-height: 44px; /* Apple touch target minimum */
  }
  
  /* Buttons - larger touch targets */
  button,
  .btn-primary,
  .btn-secondary,
  .btn-back {
    min-height: 44px !important;
    padding: 12px 20px !important;
    font-size: 15px !important;
  }
  
  .btn-large {
    width: 100%;
    margin-top: 10px;
  }
  
  /* Form actions stack on mobile */
  .form-actions {
    flex-direction: column !important;
    gap: 10px !important;
  }
  
  .form-actions button {
    width: 100% !important;
  }
  
  /* Dual input (Hct OR Hb) - stack on mobile */
  .dual-input {
    flex-direction: column !important;
    gap: 15px !important;
  }
  
  .input-separator {
    text-align: center;
    padding: 5px 0 !important;
  }
  
  /* Field labels */
  .field-label,
  label {
    font-size: 14px !important;
  }
  
  .field-range {
    font-size: 11px !important;
  }
  
  /* Prescription summary */
  .prescription-summary {
    padding: 12px !important;
  }
  
  .prescription-summary .summary-row {
    flex-direction: column !important;
    gap: 8px !important;
  }
  
  /* Default options (radio groups) */
  .default-options {
    gap: 10px !important;
  }
  
  .default-option {
    padding: 12px !important;
  }
  
  /* Verification options */
  .verification-option {
    padding: 12px !important;
  }
  
  .uf-input-group {
    flex-wrap: wrap;
    gap: 8px;
  }
  
  /* Anticoagulation worksheets */
  .anticoag-worksheet {
    padding: 12px !important;
  }
  
  /* Tables in execution sheet */
  .execution-sheet-container table {
    font-size: 11px !important;
  }
  
  .execution-sheet-container td {
    padding: 6px 4px !important;
  }
  
  /* Modality badge - repositon on mobile */
  .modality-badge {
    position: fixed !important;
    top: auto !important;
    bottom: 60px !important;
    right: 10px !important;
    padding: 6px 10px !important;
    font-size: 12px !important;
  }
  
  .modality-badge-label {
    font-size: 14px !important;
  }
  
  .modality-badge-descriptor {
    font-size: 10px !important;
  }
  
  /* Inline notes */
  .inline-note {
    padding: 8px 10px !important;
    font-size: 12px !important;
  }
  
  /* Progress indicator */
  .progress-container {
    padding: 10px 15px !important;
    overflow-x: auto;
  }
  
  .progress-step span {
    font-size: 11px !important;
  }
  
  /* Status stripe */
  .status-stripe {
    padding: 8px 15px !important;
    flex-wrap: wrap;
    gap: 8px;
  }
  
  /* About panel */
  .about-panel {
    width: 95% !important;
    max-height: 90vh !important;
    margin: 5vh auto !important;
  }
  
  .about-panel-content {
    padding: 15px !important;
  }
  
  /* Registry view */
  .patient-list {
    gap: 10px !important;
  }
  
  .patient-card {
    padding: 12px !important;
  }
  
  /* Session cards */
  .session-card {
    padding: 12px !important;
  }
  
  .session-actions {
    flex-direction: column !important;
    gap: 8px !important;
  }
  
  .session-actions button {
    width: 100% !important;
  }
  
  /* Modal adjustments */
  .modal-content {
    width: 95% !important;
    max-height: 90vh !important;
    margin: 5vh auto !important;
  }
}

/* Extra small devices (phones in portrait) */
@media (max-width: 480px) {
  .nav-bar {
    padding: 10px !important;
  }
  
  .nav-title {
    font-size: 16px !important;
  }
  
  .nav-right .nav-link {
    font-size: 12px !important;
    padding: 5px 8px !important;
  }
  
  .step-title {
    font-size: 20px !important;
  }
  
  .form-section h3 {
    font-size: 15px !important;
  }
  
  /* Hide some nav items on very small screens */
  .nav-right .nav-link:nth-child(2) {
    /* Education link - consider hiding */
  }
  
  /* Execution sheet - very compact */
  .execution-sheet-container {
    padding: 10px !important;
    font-size: 10px !important;
  }
  
  .execution-sheet-container h1 {
    font-size: 18px !important;
  }
}

/* Landscape tablets */
@media (min-width: 769px) and (max-width: 1024px) {
  #workflow-content {
    padding: 15px !important;
    max-width: 100% !important;
  }
  
  .form-section {
    padding: 20px !important;
  }
}

/* Touch-friendly hover states */
@media (hover: none) {
  button:hover,
  .btn-primary:hover,
  .btn-secondary:hover {
    /* Remove hover effects on touch devices */
    transform: none !important;
    box-shadow: none !important;
  }
  
  /* Add active state instead */
  button:active,
  .btn-primary:active,
  .btn-secondary:active {
    transform: scale(0.98) !important;
    opacity: 0.9;
  }
}

/* ===== EDUCATION MODULE MOBILE FIXES ===== */
@media (max-width: 768px) {
  /* Education content padding */
  #education-content {
    padding: 10px !important;
  }
  
  /* Make tables horizontally scrollable */
  .education-table-wrapper {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    margin: 0 -10px;
    padding: 0 10px;
  }
  
  /* Education modality table - keep readable */
  #education-content .modality-table {
    min-width: 400px;
    font-size: 12px !important;
  }
  
  #education-content .modality-table th,
  #education-content .modality-table td {
    padding: 8px 6px !important;
  }
  
  /* Grid layouts in education - stack on mobile */
  #education-content [style*="grid-template-columns: 1fr 1fr"] {
    display: block !important;
  }
  
  #education-content [style*="grid-template-columns: 1fr 1fr"] > div {
    margin-bottom: 15px;
  }
  
  /* Case cards */
  .case-card {
    padding: 15px !important;
  }
  
  /* Calculator section */
  .calculator-form input,
  .calculator-form select {
    font-size: 16px !important;
    padding: 12px !important;
  }
  
  /* Results cards - stack */
  .results-grid {
    display: flex !important;
    flex-direction: column !important;
    gap: 10px !important;
  }
  
  .result-card {
    padding: 15px !important;
  }
  
  /* Section navigation */
  .section-nav {
    flex-wrap: wrap;
    gap: 8px;
  }
  
  .section-nav button {
    flex: 1 1 45%;
    padding: 10px !important;
    font-size: 13px !important;
  }
  
  /* Quick reference items */
  .quick-ref-items {
    font-size: 14px;
  }
}

/* Extra small - education specific */
@media (max-width: 480px) {
  /* Pre/Post dilution grid - stack */
  #education-content [style*="grid-template-columns"] {
    display: flex !important;
    flex-direction: column !important;
    gap: 12px !important;
  }
  
  /* Code blocks */
  #education-content code {
    font-size: 12px !important;
    word-break: break-word;
  }
}
