/* Basic styles for JourneyBoard Clinical Portal */

/* CSS Custom Properties for Arix Health Color Scheme */
:root {
    /* Primary Teal Colors */
    --primary-color: #43a1a9;
    --primary-hover: #2d7a82;
    --primary-light: #e6f7f8;
    --primary-lighter: #f0f9fa;
    --primary-shadow: rgba(67, 161, 169, 0.1);
    
    /* Professional Complementary Colors */
    --secondary-blue: #4f8db8;
    --secondary-blue-light: #e8f4f8;
    --success-green: #059669;
    --success-green-light: #d1fae5;
    --warning-amber: #d97706;
    --warning-amber-light: #fef3c7;
    --info-slate: #64748b;
    --info-slate-light: #f1f5f9;
    
    /* Neutral Colors */
    --gray-50: #f9fafb;
    --gray-100: #f3f4f6;
    --gray-200: #e5e7eb;
    --gray-300: #d1d5db;
    --gray-400: #9ca3af;
    --gray-500: #6b7280;
    --gray-600: #4b5563;
    --gray-700: #374151;
    --gray-800: #1f2937;
    --gray-900: #111827;
}

/* Reset and base styles */
* {
    box-sizing: border-box;
}

body {
    margin: 0;
    padding: 0;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background-color: #f8fafc;
    color: #1f2937;
    line-height: 1.5;
}

/* Header styles */
header {
    background: white;
    border-bottom: 1px solid #e5e7eb;
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

header h1 {
    margin: 0;
    font-size: 1.5rem;
    color: #1f2937;
}

header div {
    display: flex;
    align-items: center;
    gap: 1rem;
}

header select {
    padding: 0.5rem;
    border: 1px solid #d1d5db;
    border-radius: 0.375rem;
    background: white;
}

/* Modern Navigation styles */
.navbar {
    background: #ffffff;
    border-bottom: 1px solid #e5e7eb;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 2rem;
    height: 64px;
}

.nav-brand {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.nav-logo {
    height: 32px;
    width: auto;
    object-fit: contain;
}

.nav-brand h1 {
    margin: 0;
    font-size: 1.5rem;
    font-weight: 700;
    color: #1f2937;
    background: linear-gradient(135deg, #43a1a9, #2d7a82);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    text-decoration: none;
    color: #6b7280;
    font-weight: 500;
    font-size: 0.875rem;
    border-radius: 0.5rem;
    transition: all 0.2s ease;
    position: relative;
}

.nav-link:hover {
    color: #43a1a9;
    background: #f0f9fa;
}

.nav-link.active {
    color: #43a1a9;
    background: #e6f7f8;
}

.nav-link.active::after {
    content: '';
    position: absolute;
    bottom: -16px;
    left: 50%;
    transform: translateX(-50%);
    width: 24px;
    height: 3px;
    background: #43a1a9;
    border-radius: 2px;
}

.nav-icon {
    font-size: 1rem;
    line-height: 1;
}

/* Mobile hamburger button */
.nav-toggle {
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    width: 40px;
    height: 40px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    z-index: 1001;
}

.hamburger-line {
    display: block;
    width: 20px;
    height: 2px;
    background: #374151;
    transition: all 0.3s ease;
    margin: 2px 0;
}

.nav-toggle.active .hamburger-line:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.nav-toggle.active .hamburger-line:nth-child(2) {
    opacity: 0;
}

.nav-toggle.active .hamburger-line:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -6px);
}

/* Mobile navigation menu */
.nav-mobile {
    display: none;
    position: fixed;
    top: 64px;
    left: 0;
    right: 0;
    background: #ffffff;
    border-bottom: 1px solid #e5e7eb;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    z-index: 999;
    transform: translateY(-100%);
    transition: transform 0.3s ease;
}

.nav-mobile.active {
    transform: translateY(0);
}

.nav-link-mobile {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem 2rem;
    text-decoration: none;
    color: #374151;
    font-weight: 500;
    border-bottom: 1px solid #f3f4f6;
    transition: all 0.2s ease;
}

.nav-link-mobile:hover {
    background: #f0f9fa;
    color: #43a1a9;
}

.nav-link-mobile.active {
    background: #e6f7f8;
    color: #43a1a9;
    border-left: 4px solid #43a1a9;
}

.nav-link-mobile:last-child {
    border-bottom: none;
}

/* Prevent body scroll when mobile nav is open */
body.nav-open {
    overflow: hidden;
}

/* Container */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
}

/* Button styles */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    border: none;
    border-radius: 0.375rem;
    font-weight: 500;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.2s;
    font-size: 0.875rem;
}

.btn-primary {
    background: #43a1a9;
    color: white;
}

.btn-primary:hover {
    background: #2d7a82;
}

.btn-secondary {
    background: #f3f4f6;
    color: #374151;
    border: 1px solid #d1d5db;
}

.btn-secondary:hover {
    background: #e5e7eb;
}

.btn-sm {
    padding: 0.25rem 0.5rem;
    font-size: 0.75rem;
}

/* Card styles */
.card {
    background: white;
    border-radius: 0.5rem;
    padding: 1.5rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    border: 1px solid #e5e7eb;
}

/* Table styles */
.table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    border-radius: 0.5rem;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.table th,
.table td {
    padding: 0.75rem;
    text-align: left;
    border-bottom: 1px solid #f3f4f6;
}

.table th {
    background: #f9fafb;
    font-weight: 600;
    color: #374151;
}

.table tr:hover {
    background: #f9fafb;
}

/* Form styles */
.form-field {
    margin-bottom: 1rem;
}

.form-field label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: #374151;
}

.form-field input,
.form-field select,
.form-field textarea {
    width: 100%;
    padding: 0.5rem;
    border: 1px solid #d1d5db;
    border-radius: 0.375rem;
    font-size: 0.875rem;
}

.form-field input:focus,
.form-field select:focus,
.form-field textarea:focus {
    outline: none;
    border-color: #43a1a9;
    box-shadow: 0 0 0 2px rgba(67, 161, 169, 0.1);
}

/* Utility classes */
.text-center {
    text-align: center;
}

.text-muted {
    color: #6b7280;
}

.hidden {
    display: none;
}

.loading {
    opacity: 0.6;
    pointer-events: none;
}

/* Responsive design */
@media (max-width: 1024px) {
    .nav-container {
        padding: 0 1.5rem;
    }
}

@media (max-width: 768px) {
    .container {
        padding: 1rem;
    }
    
    header {
        padding: 1rem;
        flex-direction: column;
        gap: 1rem;
    }
    
    /* Show mobile navigation elements */
    .nav-toggle {
        display: flex;
    }
    
    .nav-mobile {
        display: block;
    }
    
    /* Hide desktop navigation */
    .nav-links {
        display: none;
    }
    
    /* Adjust nav container padding for mobile */
    .nav-container {
        padding: 0 1rem;
    }
    
    /* Adjust brand size on mobile */
    .nav-brand h1 {
        font-size: 1.25rem;
    }
    
    .nav-logo {
        height: 28px;
    }
}

@media (max-width: 480px) {
    .nav-container {
        padding: 0 0.75rem;
        height: 56px;
    }
    
    .nav-brand h1 {
        font-size: 1.125rem;
    }
    
    .nav-logo {
        height: 24px;
    }
    
    .nav-mobile {
        top: 56px;
    }
    
    .nav-link-mobile {
        padding: 0.875rem 1rem;
        font-size: 0.875rem;
    }
}

/* Animation for loading states */
@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.spinner {
    width: 2rem;
    height: 2rem;
    border: 2px solid #f3f4f6;
    border-top: 2px solid #43a1a9;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

/* Error states */
.error {
    color: #dc2626;
    border-color: #dc2626 !important;
}

.success {
    color: #059669;
    border-color: #059669 !important;
}

/* Modal basic styles */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.modal-content {
    background: white;
    border-radius: 0.5rem;
    max-width: 500px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
}

/* Protocol customization container */
#protocol-customization-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1050; /* Higher than regular modals */
}

#protocol-customization-container .modal-content {
    max-width: 90%;
    width: 1200px;
    max-height: 95vh;
}

.modal-header {
    padding: 1.5rem;
    border-bottom: 1px solid #e5e7eb;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-body {
    padding: 1.5rem;
}

.modal-footer {
    padding: 1rem 1.5rem;
    border-top: 1px solid #e5e7eb;
    display: flex;
    gap: 0.5rem;
    justify-content: flex-end;
}

/* Tab styles */
.tab {
    padding: 0.75rem 1.5rem;
    border: none;
    background: none;
    cursor: pointer;
    border-bottom: 3px solid transparent;
    color: #6b7280;
    font-weight: 500;
    transition: all 0.2s;
}

.tab:hover {
    color: #374151;
    background: #f9fafb;
}

.tab.active {
    color: var(--primary-color);
    border-bottom-color: var(--primary-color);
}

.tab-content {
    display: none;
    padding: 1.5rem 0;
}

.tab-content.active {
    display: block;
}

/* Protocol Assignment Styles */

/* Assignment Form Container */
.protocol-assignment-form {
  max-width: 800px;
  margin: 0 auto;
}

/* Step Navigation */
.assignment-step {
  display: none;
  animation: fadeIn 0.3s ease-in-out;
}

.assignment-step.active {
  display: block;
}

.step-header {
  text-align: center;
  margin-bottom: 32px;
  padding-bottom: 16px;
  border-bottom: 2px solid #e5e7eb;
}

.step-header h3 {
  margin: 0 0 8px 0;
  color: #111827;
  font-size: 24px;
}

.step-description {
  color: #6b7280;
  margin: 0;
  font-size: 14px;
}

/* Patient Summary */
.patient-summary {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 20px;
  background: #f9fafb;
  border-radius: 12px;
  margin-bottom: 24px;
}

.patient-avatar .avatar-circle {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: var(--primary-color);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 24px;
  font-weight: 600;
}

.patient-details h4 {
  margin: 0 0 4px 0;
  color: #111827;
  font-size: 18px;
}

.patient-details p {
  margin: 0;
  color: #6b7280;
  font-size: 14px;
}

/* Condition Selection */
.condition-selection {
  margin-bottom: 32px;
}

.condition-selection h4 {
  margin: 0 0 8px 0;
  color: #111827;
  font-size: 16px;
}

.field-description {
  color: #6b7280;
  font-size: 14px;
  margin: 0 0 16px 0;
}

.conditions-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 12px;
  max-height: 300px;
  overflow-y: auto;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  padding: 16px;
}

.condition-option {
  padding: 12px;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  background: white;
  transition: all 0.2s;
}

.condition-option:hover {
  border-color: var(--primary-color);
  background: #f8faff;
}

.condition-label {
  display: block;
  cursor: pointer;
  margin: 0;
}

.condition-label input[type="checkbox"] {
  margin-right: 8px;
}

.condition-name {
  font-weight: 500;
  color: #111827;
  display: block;
  margin-bottom: 4px;
}

.condition-description {
  color: #6b7280;
  font-size: 12px;
  display: block;
}

/* Protocol Selection */
.protocol-filters {
  display: flex;
  gap: 16px;
  margin-bottom: 24px;
  padding: 16px;
  background: #f9fafb;
  border-radius: 8px;
}

.filter-group {
  flex: 1;
}

.filter-group label {
  display: block;
  margin-bottom: 4px;
  color: #374151;
  font-weight: 500;
  font-size: 14px;
}

.filter-group select,
.filter-group input {
  width: 100%;
  padding: 8px 12px;
  border: 1px solid #d1d5db;
  border-radius: 6px;
  font-size: 14px;
}

.protocols-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
  gap: 16px;
  max-height: 500px;
  overflow-y: auto;
}

.protocol-option {
  cursor: pointer;
  transition: all 0.2s;
}

.protocol-option:hover .protocol-card {
  border-color: var(--primary-color);
  box-shadow: 0 4px 12px rgba(59, 130, 246, 0.15);
}

.protocol-option.selected .protocol-card {
  border-color: var(--primary-color);
  background: #f8faff;
  box-shadow: 0 4px 12px rgba(59, 130, 246, 0.25);
}

.protocol-card {
  background: white;
  border: 2px solid #e5e7eb;
  border-radius: 12px;
  padding: 20px;
  transition: all 0.2s;
}

.protocol-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}

.protocol-header h4 {
  margin: 0;
  color: #111827;
  font-size: 18px;
}

.protocol-phases {
  background: #e5e7eb;
  color: #374151;
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 500;
}

.protocol-description {
  margin-bottom: 16px;
}

.protocol-description p {
  margin: 0;
  color: #6b7280;
  font-size: 14px;
  line-height: 1.5;
}

.protocol-indications {
  margin-bottom: 16px;
}

.protocol-indications strong {
  color: #374151;
  font-size: 14px;
}

.indications-list {
  margin-top: 8px;
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

.indication-tag {
  background: #dbeafe;
  color: #1e40af;
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 500;
}

.protocol-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 12px;
  border-top: 1px solid #e5e7eb;
}

.protocol-duration {
  color: #6b7280;
  font-size: 12px;
}

/* Customization Section */
.customization-options {
  margin-bottom: 24px;
}

.option-group {
  margin-bottom: 16px;
  padding: 16px;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
}

.option-group label {
  display: flex;
  align-items: center;
  cursor: pointer;
  margin: 0 0 8px 0;
  font-weight: 500;
  color: #111827;
}

.option-group input[type="radio"] {
  margin-right: 8px;
}

.option-description {
  color: #6b7280;
  font-size: 14px;
  margin: 0;
}

.protocol-preview {
  background: #f9fafb;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  padding: 20px;
  margin-bottom: 20px;
}

.protocol-preview-content h4 {
  margin: 0 0 8px 0;
  color: #111827;
}

.protocol-preview-content p {
  margin: 0 0 16px 0;
  color: #6b7280;
}

.phases-preview h5 {
  margin: 0 0 12px 0;
  color: #374151;
  font-size: 16px;
}

.phase-preview {
  background: white;
  border: 1px solid #e5e7eb;
  border-radius: 6px;
  padding: 12px;
  margin-bottom: 8px;
}

.phase-preview h6 {
  margin: 0 0 4px 0;
  color: #111827;
  font-size: 14px;
}

.phase-preview p {
  margin: 0 0 8px 0;
  color: #6b7280;
  font-size: 12px;
}

.exercises-count {
  color: #6b7280;
  font-size: 12px;
}

/* Customization Panel */
.customization-panel {
  background: #f9fafb;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  padding: 20px;
  margin-bottom: 20px;
}

.customization-header {
  margin-bottom: 20px;
  text-align: center;
}

.customization-header h4 {
  margin: 0 0 8px 0;
  color: #111827;
}

.customization-header p {
  margin: 0;
  color: #6b7280;
  font-size: 14px;
}

.phases-customization {
  margin-bottom: 20px;
}

.phase-customization {
  background: white;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  padding: 16px;
  margin-bottom: 16px;
}

.phase-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
  padding-bottom: 8px;
  border-bottom: 1px solid #e5e7eb;
}

.phase-header h5 {
  margin: 0;
  color: #111827;
  font-size: 16px;
}

.phase-actions {
  display: flex;
  gap: 8px;
}

.phase-exercises h6 {
  margin: 0 0 12px 0;
  color: #374151;
  font-size: 14px;
}

.exercises-list {
  margin-bottom: 12px;
}

.exercise-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 12px;
  background: #f9fafb;
  border: 1px solid #e5e7eb;
  border-radius: 6px;
  margin-bottom: 8px;
}

.exercise-info strong {
  color: #111827;
  display: block;
  margin-bottom: 4px;
}

.exercise-params {
  color: #6b7280;
  font-size: 12px;
}

.exercise-actions {
  display: flex;
  gap: 4px;
}

.customization-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

/* Assignment Form */
.assignment-form {
  background: #f9fafb;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  padding: 20px;
  margin-bottom: 24px;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 16px;
}

.form-group {
  margin-bottom: 16px;
}

.form-group label {
  display: block;
  margin-bottom: 4px;
  color: #374151;
  font-weight: 500;
  font-size: 14px;
}

.form-group input,
.form-group textarea,
.form-group select {
  width: 100%;
  padding: 8px 12px;
  border: 1px solid #d1d5db;
  border-radius: 6px;
  font-size: 14px;
  transition: border-color 0.2s;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.form-group textarea {
  resize: vertical;
  min-height: 60px;
}

/* Step Actions */
.step-actions {
  display: flex;
  justify-content: center;
  gap: 16px;
  margin-top: 32px;
  padding-top: 24px;
  border-top: 1px solid #e5e7eb;
}

/* Button Styles */
.btn {
  padding: 10px 20px;
  border: none;
  border-radius: 6px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  min-width: 120px;
  justify-content: center;
}

.btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.btn-primary {
  background: var(--primary-color);
  color: white;
}

.btn-primary:hover:not(:disabled) {
  background: var(--primary-hover);
}

.btn-secondary {
  background: #f3f4f6;
  color: #374151;
  border: 1px solid #d1d5db;
}

.btn-secondary:hover:not(:disabled) {
  background: #e5e7eb;
}

.btn-success {
  background: #10b981;
  color: white;
}

.btn-success:hover:not(:disabled) {
  background: #059669;
}

.btn-danger {
  background: #ef4444;
  color: white;
}

.btn-danger:hover:not(:disabled) {
  background: #dc2626;
}

.btn-sm {
  padding: 6px 12px;
  font-size: 12px;
  min-width: 80px;
}

/* Empty States */
.empty-state {
  text-align: center;
  padding: 40px 20px;
  color: #6b7280;
}

.empty-state h4 {
  margin: 0 0 8px 0;
  color: #374151;
}

.empty-state p {
  margin: 0 0 16px 0;
}

/* Utility Classes */
.text-muted {
  color: #6b7280;
}

/* Animations */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Responsive Design */
@media (max-width: 768px) {
  .protocol-assignment-form {
    max-width: 100%;
    padding: 0 16px;
  }
  
  .conditions-grid {
    grid-template-columns: 1fr;
  }
  
  .protocols-grid {
    grid-template-columns: 1fr;
  }
  
  .protocol-filters {
    flex-direction: column;
  }
  
  .form-row {
    grid-template-columns: 1fr;
  }
  
  .step-actions {
    flex-direction: column;
  }
  
  .btn {
    width: 100%;
  }
  
  .patient-summary {
    flex-direction: column;
    text-align: center;
  }
  
  .phase-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }
  
  .exercise-item {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }
}

.condition-card {
  background: white;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  margin-bottom: 16px;
  padding: 16px;
}

.condition-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}

.condition-stats {
  display: flex;
  gap: 16px;
  font-size: 14px;
  color: #6b7280;
}

.protocol-tag {
  background: #e0f2fe;
  color: #0369a1;
  padding: 4px 12px;
  border-radius: 16px;
  font-size: 12px;
  margin-right: 8px;
  cursor: pointer;
}

.text-muted {
  color: #9ca3af;
  font-style: italic;
}

.manage-protocols-btn {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  padding: 6px 12px;
  border-radius: 4px;
  font-size: 12px;
  cursor: pointer;
}

/* Activity Timeline Styles */
.activity-timeline {
  max-width: 800px;
}

.timeline-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 2rem;
  padding-bottom: 1rem;
  border-bottom: 2px solid #e5e7eb;
}

.timeline-header h3 {
  margin: 0;
  color: #1f2937;
  font-size: 1.5rem;
}

.timeline-stats {
  display: flex;
  gap: 2rem;
}

.timeline-stat {
  text-align: center;
}

.stat-number {
  display: block;
  font-size: 1.5rem;
  font-weight: 700;
  {{/* color: var(--primary-color); */}}
}

.stat-label {
  font-size: 0.875rem;
  {{/* color: #6b7280; */}}
}

.timeline-day {
  margin-bottom: 2rem;
  border-left: 3px solid #e5e7eb;
  padding-left: 1.5rem;
  position: relative;
}

.timeline-day::before {
  content: '';
  position: absolute;
  left: -6px;
  top: 0;
  width: 9px;
  height: 9px;
  background: var(--primary-color);
  border-radius: 50%;
}

.timeline-date h3 {
  margin: 0 0 0.25rem 0;
  color: #1f2937;
  font-size: 1.125rem;
}

.day-summary {
  color: #6b7280;
  font-size: 0.875rem;
  margin-bottom: 1rem;
}

.timeline-activities {
  margin-left: 1rem;
}

.timeline-activity {
  background: white;
  border-radius: 8px;
  border: 1px solid #e5e7eb;
  padding: 1rem;
  margin-bottom: 0.75rem;
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  transition: all 0.2s ease;
}

.timeline-activity:hover {
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
  border-color: #d1d5db;
}

.timeline-activity.completed {
  border-left: 4px solid #10b981;
}

.timeline-activity.skipped {
  border-left: 4px solid #f59e0b;
  background: #fffbeb;
}

.timeline-activity.pending {
  border-left: 4px solid #6b7280;
  background: #f9fafb;
}

.activity-time {
  font-size: 0.875rem;
  color: #6b7280;
  font-weight: 500;
  min-width: 60px;
}

.activity-icon {
  font-size: 1.25rem;
  line-height: 1;
}

.activity-details {
  flex: 1;
}

.activity-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.75rem;
}

.activity-title {
  margin: 0;
  color: #1f2937;
  font-size: 1rem;
  font-weight: 600;
}

.activity-duration {
  color: #6b7280;
  font-size: 0.875rem;
  background: #f3f4f6;
  padding: 2px 6px;
  border-radius: 4px;
}

.activity-stats {
  display: flex;
  gap: 1.5rem;
  flex-wrap: wrap;
  margin-bottom: 0.5rem;
}

.stat-item {
  display: flex;
  gap: 0.25rem;
  font-size: 0.875rem;
}

.stat-item .stat-label {
  {{/* color: #6b7280; */}}
}

.stat-item .stat-value {
  color: #1f2937;
  font-weight: 500;
}

.activity-notes {
  margin-top: 0.75rem;
  padding: 0.75rem;
  background: #f9fafb;
  border-radius: 6px;
  font-size: 0.875rem;
  color: #4b5563;
}

.activity-notes strong {
  color: #1f2937;
}

/* Patient Metrics Styles */
.patient-metrics-container {
  max-width: 1000px;
}

.metrics-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 2rem;
  padding-bottom: 1rem;
  border-bottom: 2px solid #e5e7eb;
}

.metrics-header h3 {
  margin: 0;
  color: #1f2937;
  font-size: 1.5rem;
}

.assignment-selector {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.assignment-selector label {
  font-weight: 500;
  color: #374151;
}

.assignment-selector select {
  padding: 0.5rem;
  border: 1px solid #d1d5db;
  border-radius: 0.375rem;
  background: white;
  font-size: 0.875rem;
  min-width: 200px;
}

.embedded-progress-charts {
  display: grid;
  gap: 2rem;
}

.chart-section {
  background: white;
  border-radius: 12px;
  border: 1px solid #e5e7eb;
  padding: 1.5rem;
  box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1);
}

.chart-section h4 {
  margin: 0 0 1rem 0;
  color: #1f2937;
  font-size: 1.125rem;
  font-weight: 600;
}

.chart-container canvas {
  max-width: 100%;
  height: auto;
}

.analytics-section {
  grid-column: 1 / -1;
}

.error-state {
  text-align: center;
  padding: 3rem;
  color: #6b7280;
}

.error-state .error-icon {
  font-size: 3rem;
  margin-bottom: 1rem;
}

.error-state h4 {
  color: #dc2626;
  margin-bottom: 0.5rem;
}

.activity-calendar-container {
  min-height: 200px;
}

/* ===== PATIENT PROFILE - PROGRESS OVERVIEW ENHANCEMENTS ===== */

/* Progress Overview Section */
.progress-overview {
  background: white;
  border-radius: 16px;
  padding: 2rem;
  margin-bottom: 1rem;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

/* Overview Selector (Protocol Tabs) */
.overview-selector {
  display: flex;
  gap: 1rem;
  margin-bottom: 1.5rem;
  padding: 0.25rem;
  background: #f3f4f6;
  border-radius: 8px;
  overflow-x: auto;
}

.overview-option {
  flex: 1;
  min-width: 150px;
  padding: 0.5rem;
  text-align: center;
  border-radius: 6px;
  background: transparent;
  border: none;
  cursor: pointer;
  font-size: 0.875rem;
  color: #6b7280;
  transition: all 0.2s;
  white-space: nowrap;
}

.overview-option:hover {
  color: #374151;
}

.overview-option.active {
  background: white;
  color: #1f2937;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

/* Progress Grid Layout */
.progress-grid {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 2rem;
  margin-bottom: 2rem;
}

.compliance-chart-container {
  background: #f9fafb;
  border-radius: 12px;
  padding: 1.5rem;
  min-height: 250px;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Metric Cards */
.metric-cards {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.metric-card {
  background: linear-gradient(135deg, var(--gray-50) 0%, var(--gray-100) 100%);
  border-radius: 12px;
  padding: 1.5rem;
  text-align: center;
  transition: all 0.3s ease;
  border: 1px solid var(--gray-200);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.metric-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.metric-card-value {
  font-size: 2rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  color: var(--gray-800);
}

.metric-card-label {
  font-size: 0.875rem;
  color: var(--gray-500);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-weight: 500;
}

/* Professional metric card variants */
.metric-card.primary {
  background: linear-gradient(135deg, var(--primary-lighter) 0%, var(--primary-light) 100%);
  border-color: var(--primary-color);
}

.metric-card.primary .metric-card-value {
  color: var(--primary-color);
}

.metric-card.success {
  background: linear-gradient(135deg, var(--success-green-light) 0%, #ecfdf5 100%);
  border-color: var(--success-green);
}

.metric-card.success .metric-card-value {
  color: var(--success-green);
}

.metric-card.info {
  background: linear-gradient(135deg, var(--secondary-blue-light) 0%, #f0f9ff 100%);
  border-color: var(--secondary-blue);
}

.metric-card.info .metric-card-value {
  color: var(--secondary-blue);
}

.metric-card.warning {
  background: linear-gradient(135deg, var(--warning-amber-light) 0%, #fffbeb 100%);
  border-color: var(--warning-amber);
}

.metric-card.warning .metric-card-value {
  color: var(--warning-amber);
}

/* Dashboard Stat Cards */
.stat-card {
    padding: 24px;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 15px rgba(0, 0, 0, 0.15);
}

.stat-card-primary {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-hover) 100%);
    color: white;
}

.stat-card-success {
    background: linear-gradient(135deg, var(--success-green) 0%, #047857 100%);
    color: white;
}

.stat-card-warning {
    background: linear-gradient(135deg, var(--warning-amber) 0%, #b45309 100%);
    color: white;
}

.stat-card-info {
    background: linear-gradient(135deg, var(--secondary-blue) 0%, #3e7bb6 100%);
    color: white;
}

/* Overview Insights */
.overview-insights {
  margin-top: 1.5rem;
}

.insight-card {
  background: linear-gradient(135deg, var(--primary-lighter) 0%, var(--primary-light) 100%);
  border-radius: 12px;
  padding: 1.5rem;
  border-left: 4px solid var(--primary-color);
  height: auto;
  min-height: 0;
  overflow: visible;
  display: block;
}

.insight-header {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.insight-icon {
  font-size: 1.25rem;
}

.insight-title {
  font-weight: 600;
  color: #1f2937;
}

.insight-content p {
  margin-bottom: 0.5rem;
  color: #374151;
  line-height: 1.5;
}

.insight-content p:last-child {
  margin-bottom: 0;
}

/* Enhanced Protocol Cards */
.protocol-card {
  background: white;
  border-radius: 12px;
  padding: 1.5rem;
  margin-bottom: 1rem;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  transition: all 0.3s ease;
  border: 2px solid transparent;
}

.protocol-card.primary {
  box-shadow: 0 4px 12px rgba(59, 130, 246, 0.15);
}

.protocol-card:hover {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
  transform: translateY(-2px);
}

.protocol-card.collapsed {
  padding: 1rem 1.5rem;
}

.protocol-card.collapsed .protocol-content,
.protocol-card.collapsed .protocol-actions {
  display: none;
}

.protocol-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 1rem;
  cursor: pointer;
}

.protocol-card.collapsed .protocol-header {
  margin-bottom: 0;
}

.protocol-info {
  flex: 1;
}

.protocol-title {
  font-size: 1.125rem;
  font-weight: 600;
  color: #1f2937;
  margin: 0 0 0.5rem 0;
}

.protocol-meta {
  display: flex;
  gap: 1.5rem;
  font-size: 0.875rem;
}

.protocol-meta-item {
  display: flex;
  align-items: center;
  gap: 0.375rem;
}

.protocol-meta-label {
  font-weight: 500;
  color: #6b7280;
  text-transform: uppercase;
  font-size: 0.75rem;
  letter-spacing: 0.05em;
}

.protocol-badges {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.primary-badge {
  background: var(--primary-color);
  color: white;
  padding: 0.125rem 0.5rem;
  border-radius: 10px;
  font-size: 0.625rem;
  font-weight: 600;
  text-transform: uppercase;
}

.protocol-status {
  padding: 0.25rem 0.75rem;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 500;
  text-transform: capitalize;
}

.status-active {
  background: #10b981;
  color: white;
}

.status-pending {
  background: #f59e0b;
  color: white;
}

.status-completed {
  background: #6b7280;
  color: white;
}

.collapse-indicator,
.toggle-icon {
  margin-left: 0.5rem;
  transition: transform 0.2s ease;
  user-select: none;
  font-size: 1rem;
  color: #6b7280;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border-radius: 4px;
  background: rgba(107, 114, 128, 0.1);
}

.toggle-icon:hover {
  background: rgba(107, 114, 128, 0.2);
  color: #374151;
}

.protocol-card.collapsed .collapse-indicator,
.protocol-card.collapsed .toggle-icon {
  transform: rotate(180deg);
}

.toggle-icon.expanded {
  transform: rotate(0deg);
}

/* Protocol Content */
.protocol-content {
  margin-bottom: 1rem;
}

.protocol-summary {
  display: flex;
  gap: 2rem;
}

/* Inactive Assignment View */
.inactive-assignment-view {
  padding: 1.5rem;
  background: #f9fafb;
  border-radius: 8px;
  border-left: 4px solid #6b7280;
}

.inactive-header {
  display: flex;
  justify-content: between;
  align-items: center;
  margin-bottom: 1rem;
}

.inactive-header h4 {
  margin: 0;
  color: #374151;
  font-size: 1.1rem;
}

.inactive-details p {
  margin: 0.5rem 0;
  color: #6b7280;
  line-height: 1.5;
}

.inactive-details strong {
  color: #374151;
}

.inactive-note {
  margin-top: 1rem;
  padding: 0.75rem;
  background: #fef3c7;
  border: 1px solid #f59e0b;
  border-radius: 6px;
  color: #92400e;
  font-style: italic;
}

.inactive-message {
  padding: 1rem;
  background: #f3f4f6;
  border-radius: 6px;
  text-align: center;
}

.inactive-message p {
  margin: 0;
  color: #6b7280;
  font-style: italic;
}
  margin-bottom: 1rem;
  padding: 0.75rem;
  background: #f8fafc;
  border-radius: 8px;
}

.summary-item {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.summary-label {
  color: #6b7280;
  font-size: 0.75rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.summary-value {
  color: #111827;
  font-weight: 600;
  font-size: 0.875rem;
}

.protocol-viewer-container {
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  min-height: 200px;
  overflow: hidden;
}

/* Protocol viewer integration */
.protocol-viewer-container .protocol-viewer {
  border: none;
  background: transparent;
}

.protocol-viewer-container .protocol-header {
  padding: 1rem;
  border-bottom: 1px solid #e5e7eb;
}

.protocol-viewer-container .protocol-stats {
  padding: 1rem;
  background: #f8fafc;
}

.protocol-viewer-container .protocol-phases {
  padding: 1rem;
}

.protocol-viewer-container .protocol-phase {
  margin-bottom: 1.5rem;
  border: 1px solid #e5e7eb;
  border-radius: 6px;
  overflow: hidden;
}

.protocol-viewer-container .phase-header {
  background: #f8fafc;
  padding: 0.75rem 1rem;
  border-bottom: 1px solid #e5e7eb;
}

.protocol-viewer-container .phase-exercises {
  padding: 1rem;
}

.protocol-viewer-container .protocol-exercise {
  padding: 0.75rem;
  margin-bottom: 0.5rem;
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 4px;
}

.protocol-viewer-container .protocol-exercise:last-child {
  margin-bottom: 0;
}

.protocol-viewer-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  color: #6b7280;
}

.loading-spinner {
  width: 24px;
  height: 24px;
  border: 2px solid #e5e7eb;
  border-top: 2px solid var(--primary-color);
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin-bottom: 0.5rem;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.protocol-viewer-error {
  padding: 2rem;
  text-align: center;
  color: #ef4444;
}

.error-details {
  color: #6b7280;
  font-size: 0.875rem;
  margin: 0.5rem 0;
}

.fallback-protocol-view {
  padding: 1.5rem;
}

.protocol-header-fallback h3 {
  margin: 0 0 0.5rem 0;
  color: #111827;
  font-size: 1.125rem;
}

.protocol-description {
  margin: 0 0 1rem 0;
  color: #6b7280;
  line-height: 1.5;
}

.protocol-goals {
  margin: 0 0 1rem 0;
  color: #374151;
  font-size: 0.875rem;
}

.protocol-stats-fallback {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(80px, 1fr));
  gap: 1rem;
  margin: 1rem 0;
  padding: 1rem;
  background: #f8fafc;
  border-radius: 8px;
}

.assignment-details {
  margin: 1rem 0;
  padding: 0.75rem;
  background: #f0f9ff;
  border-radius: 6px;
  border-left: 3px solid var(--primary-color);
}

.assignment-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.5rem;
}

.assignment-meta:last-child {
  margin-bottom: 0;
}

.assignment-label {
  color: #374151;
  font-weight: 500;
  font-size: 0.875rem;
}

.assignment-value {
  color: #111827;
  font-weight: 600;
  font-size: 0.875rem;
}

.exercise-customizations {
  margin-top: 0.5rem;
  padding: 0.25rem 0.5rem;
  background: #ecfdf5;
  border-radius: 4px;
  color: #065f46;
  font-size: 0.75rem;
  border-left: 2px solid #10b981;
}

.assignment-customizations-fallback {
  margin-top: 1.5rem;
  padding: 1rem;
  background: #fffbeb;
  border: 1px solid #fbbf24;
  border-radius: 8px;
}

.assignment-customizations-fallback h4 {
  margin: 0 0 0.75rem 0;
  color: #92400e;
  font-size: 1rem;
}

.customizations-details {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.customization-item {
  font-size: 0.875rem;
  color: #78350f;
}

.customization-item strong {
  color: #92400e;
}

.protocol-stats-fallback .stat-item {
  text-align: center;
}

.protocol-stats-fallback .stat-number {
  display: block;
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--primary-color);
  line-height: 1;
}

.protocol-stats-fallback .stat-label {
  display: block;
  font-size: 0.75rem;
  color: #6b7280;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-top: 0.25rem;
}

.protocol-phases-fallback {
  margin: 1.5rem 0;
}

.protocol-phase-fallback {
  margin-bottom: 2rem;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  overflow: hidden;
}

.phase-header-fallback {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem;
  background: #f8fafc;
  border-bottom: 1px solid #e5e7eb;
}

.phase-header-fallback h4 {
  margin: 0;
  color: #111827;
  font-size: 1rem;
}

.phase-duration {
  font-size: 0.875rem;
  background: #ffffff;
  padding: 0.25rem 0.5rem;
  border-radius: 4px;
  border: 1px solid #d1d5db;
}

.phase-goals-fallback {
  padding: 1rem;
  background: #fffbeb;
  border-bottom: 1px solid #e5e7eb;
  font-size: 0.875rem;
  color: #92400e;
}

.phase-goals-fallback strong {
  color: #78350f;
}

.phase-exercises-fallback {
  padding: 1rem;
}

.exercise-item-fallback {
  padding: 0.75rem;
  margin-bottom: 0.75rem;
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 6px;
}

.exercise-item-fallback:last-child {
  margin-bottom: 0;
}

.exercise-header-fallback {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 0.5rem;
}

.exercise-name {
  font-weight: 600;
  color: #111827;
  flex: 1;
}

.exercise-params {
  color: #6b7280;
  font-size: 0.875rem;
  margin-left: 1rem;
  white-space: nowrap;
}

.exercise-notes-fallback {
  color: #6b7280;
  font-style: italic;
  font-size: 0.875rem;
  line-height: 1.4;
}

.protocol-indications-fallback {
  margin-top: 1.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid #e5e7eb;
}

.protocol-indications-fallback h4 {
  margin: 0 0 0.75rem 0;
  color: #111827;
  font-size: 1rem;
}

.indications-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.indication-badge {
  display: inline-block;
  padding: 0.25rem 0.75rem;
  background: #dbeafe;
  color: #1e40af;
  border-radius: 12px;
  font-size: 0.75rem;
  font-weight: 500;
}

.no-exercises,
.no-phases {
  text-align: center;
  color: #6b7280;
  font-style: italic;
  padding: 2rem;
}

/* Responsive adjustments for fallback view */
@media (max-width: 768px) {
  .protocol-stats-fallback {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .exercise-header-fallback {
    flex-direction: column;
    align-items: flex-start;
  }
  
  .exercise-params {
    margin-left: 0;
    margin-top: 0.25rem;
  }
}

.protocol-details h4 {
  margin: 0 0 0.5rem 0;
  color: #111827;
}

.protocol-details p {
  margin: 0 0 1rem 0;
  color: #6b7280;
  line-height: 1.5;
}

.phases-overview {
  margin: 1rem 0;
}

.phases-overview h5 {
  margin: 0 0 0.75rem 0;
  color: #374151;
  font-size: 0.875rem;
  font-weight: 600;
}

.phase-summary {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.5rem;
  background: #f8fafc;
  border-radius: 6px;
  margin-bottom: 0.5rem;
  font-size: 0.875rem;
}

.phase-duration {
  font-size: 0.75rem;
}

.protocol-actions-embedded {
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid #e5e7eb;
}

/* Protocol Metrics - Legacy (kept for backward compatibility) */
.protocol-metrics {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 1.5rem;
  margin-bottom: 1rem;
}

.metric-summary {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.metric-item {
  display: flex;
  justify-content: space-between;
  font-size: 0.875rem;
  align-items: center;
}

.metric-label {
  color: #6b7280;
}

.metric-value {
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.mini-chart {
  background: #f9fafb;
  border-radius: 8px;
  padding: 0.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 80px;
}

.mini-chart canvas {
  max-width: 100%;
  height: auto !important;
}

/* Responsive Design */
@media (max-width: 768px) {
  .progress-grid {
    grid-template-columns: 1fr;
  }
  
  .protocol-summary {
    flex-direction: column;
    gap: 1rem;
  }
  
  .metric-cards {
    grid-template-columns: 1fr;
  }

  .overview-selector {
    flex-direction: column;
    gap: 0.5rem;
  }

  .overview-option {
    width: 100%;
    min-width: auto;
  }
}

/* ===== END PATIENT PROFILE ENHANCEMENTS ===== */

/* ===== ENHANCED PROTOCOL VIEWER STYLES ===== */

/* Enhanced Protocol Card Header Styles */
.protocol-card-header {
  min-height: 60px;
}

.protocol-card-header .protocol-meta {
  display: flex;
  gap: 20px;
  font-size: 14px;
  color: #6c757d;
}

.protocol-card-header .protocol-meta-item {
  display: flex;
  align-items: center;
  gap: 6px;
}

.protocol-card-header .protocol-meta-label {
  font-weight: 500;
}

/* Enhanced Protocol Viewer Styles */
.protocol-viewer.fallback-protocol-view {
  padding: 20px;
  background: white;
  border-radius: 6px;
}

.protocol-viewer .protocol-header {
  margin-bottom: 24px;
  padding-bottom: 16px;
  border-bottom: 2px solid #f1f3f4;
}

.protocol-viewer .protocol-title-section {
  margin-bottom: 12px;
}

.protocol-viewer .protocol-title {
  font-size: 24px;
  font-weight: 600;
  color: #1a73e8;
  margin: 0 0 8px 0;
}

.protocol-viewer .protocol-description {
  font-size: 16px;
  color: #5f6368;
  line-height: 1.5;
  margin: 0 0 12px 0;
}

.protocol-viewer .protocol-goals {
  font-size: 14px;
  color: #34a853;
  background: #e8f5e8;
  padding: 8px 12px;
  border-radius: 4px;
  margin-bottom: 12px;
}

.protocol-viewer .assignment-details {
  display: flex;
  gap: 24px;
  font-size: 14px;
}

.protocol-viewer .assignment-meta {
  display: flex;
  align-items: center;
  gap: 6px;
}

.protocol-viewer .assignment-label {
  font-weight: 500;
  color: #5f6368;
}

.protocol-viewer .assignment-value {
  color: #202124;
  font-weight: 400;
}

/* Enhanced Protocol Stats */
.protocol-viewer .protocol-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 24px;
  padding: 16px;
  background: #f8f9fa;
  border-radius: 8px;
}

.protocol-viewer .stat-card {
  text-align: center;
  padding: 12px 8px;
  background: white;
  border-radius: 6px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.protocol-viewer .stat-number {
  font-size: 24px;
  font-weight: 700;
  color: #1a73e8;
  display: block;
  margin-bottom: 4px;
}

.protocol-viewer .stat-label {
  font-size: 12px;
  font-weight: 500;
  color: #5f6368;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* Enhanced Protocol Phases */
.protocol-viewer .protocol-phases {
  margin-bottom: 24px;
}

.protocol-viewer .protocol-phase {
  background: #f8f9fa;
  border: 1px solid #e8eaed;
  border-radius: 8px;
  margin-bottom: 16px;
  overflow: hidden;
}

.protocol-viewer .phase-header {
  background: #1a73e8;
  color: white;
  padding: 12px 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.protocol-viewer .phase-title {
  font-size: 16px;
  font-weight: 600;
  margin: 0;
}

.protocol-viewer .phase-duration {
  font-size: 12px;
  background: rgba(255, 255, 255, 0.2);
  padding: 4px 8px;
  border-radius: 12px;
  font-weight: 500;
}

.protocol-viewer .phase-goals {
  padding: 12px 16px;
  background: #e8f5e8;
  color: #137333;
  font-size: 14px;
  border-bottom: 1px solid #e8eaed;
}

.protocol-viewer .phase-goals ul {
  margin: 4px 0 0 0;
  padding-left: 16px;
}

.protocol-viewer .phase-exercises {
  padding: 0;
}

/* Enhanced Exercise Styling */
.protocol-viewer .protocol-exercise {
  background: white;
  border-bottom: 1px solid #e8eaed;
  padding: 16px;
  transition: background-color 0.2s ease;
}

.protocol-viewer .protocol-exercise:hover {
  background: #f8f9fa;
}

.protocol-viewer .protocol-exercise:last-child {
  border-bottom: none;
}

.protocol-viewer .exercise-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 8px;
}

.protocol-viewer .exercise-title-section {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.protocol-viewer .exercise-name {
  font-weight: 600;
  color: #202124;
  font-size: 16px;
}

.protocol-viewer .exercise-category {
  font-size: 12px;
  color: #5f6368;
  background: #f1f3f4;
  padding: 2px 8px;
  border-radius: 12px;
  width: fit-content;
}

.protocol-viewer .exercise-params {
  font-size: 14px;
  color: #1a73e8;
  font-weight: 500;
  white-space: nowrap;
}

.protocol-viewer .exercise-description {
  color: #5f6368;
  font-size: 14px;
  line-height: 1.4;
  margin-bottom: 8px;
}

.protocol-viewer .exercise-key-cues {
  background: #e8f5e8;
  border: 1px solid #c3e6c3;
  padding: 8px 12px;
  border-radius: 4px;
  font-size: 14px;
  margin-bottom: 8px;
}

.protocol-viewer .exercise-key-cues ul {
  margin: 4px 0 0 0;
  padding-left: 16px;
}

.protocol-viewer .exercise-key-cues li {
  margin-bottom: 2px;
}

.protocol-viewer .exercise-customizations {
  font-size: 12px;
  color: #ea4335;
  font-style: italic;
  margin-top: 8px;
}

/* Protocol Indications */
.protocol-viewer .protocol-indications {
  margin-bottom: 20px;
}

.protocol-viewer .protocol-indications h4 {
  font-size: 16px;
  font-weight: 600;
  color: #202124;
  margin: 0 0 12px 0;
}

.protocol-viewer .indications-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.protocol-viewer .indication-badge {
  background: #e8f0fe;
  color: #1a73e8;
  padding: 4px 12px;
  border-radius: 16px;
  font-size: 12px;
  font-weight: 500;
}

/* Assignment Customizations */
.protocol-viewer .assignment-customizations {
  background: #fef7e0;
  border: 1px solid #f9c74f;
  border-radius: 6px;
  padding: 16px;
  margin-bottom: 16px;
}

.protocol-viewer .assignment-customizations h4 {
  font-size: 16px;
  font-weight: 600;
  color: #202124;
  margin: 0 0 12px 0;
}

.protocol-viewer .customizations-details {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.protocol-viewer .customization-item {
  font-size: 14px;
  color: #5f6368;
}

/* No Content States */
.protocol-viewer .no-phases,
.protocol-viewer .no-exercises {
  text-align: center;
  color: #9aa0a6;
  font-style: italic;
  padding: 24px;
  background: #f8f9fa;
  border-radius: 6px;
}

/* Responsive Design for Protocol Viewer */
@media (max-width: 768px) {
  .protocol-viewer .protocol-stats {
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
  }
  
  .protocol-viewer .exercise-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }
  
  .protocol-viewer .assignment-details {
    flex-direction: column;
    gap: 8px;
  }
  
  .protocol-viewer .phase-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }
}

/* ===== END ENHANCED PROTOCOL VIEWER STYLES ===== */

/* ===== PATIENT LIST ROW STYLES ===== */
/* Make patient rows clickable with hover effects */
.patient-row {
  cursor: pointer;
  transition: background-color 0.2s ease, box-shadow 0.2s ease;
}

.patient-row:hover {
  background-color: #f8fafc;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.patient-row:hover .patient-name {
  color: var(--primary-color);
}

/* Ensure action buttons don't trigger row click */
.patient-actions {
  pointer-events: auto;
}

.patient-actions .action-buttons {
  pointer-events: auto;
}

/* ===== END PATIENT LIST ROW STYLES ===== */
