/* Component Styles */

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: var(--spacing-2) var(--spacing-4);
  font-size: var(--font-size-sm);
  font-weight: var(--font-weight-medium);
  border-radius: var(--radius-lg);
  border: 1px solid transparent;
  cursor: pointer;
  transition: all var(--transition-fast);
  text-decoration: none;
  line-height: 1.5;
  gap: var(--spacing-2);
}

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

.btn-primary {
  background: #0796F0;
  color: white;
  border-color: #0796F0;
}

.btn-primary:hover:not(:disabled) {
  background: #0678c2;
  border-color: #0678c2;
  transform: translateY(-1px);
  box-shadow: var(--shadow-sm);
}

.btn-secondary {
  background: var(--color-background);
  color: var(--color-text-primary);
  border-color: var(--color-border);
}

.btn-secondary:hover:not(:disabled) {
  background: var(--color-surface);
  border-color: var(--color-primary-500);
  color: var(--color-primary-600);
}

.btn-success {
  background: var(--color-success-500);
  color: white;
  border-color: var(--color-success-500);
}

.btn-danger {
  background: var(--color-danger-500);
  color: white;
  border-color: var(--color-danger-500);
}

.btn-journal {
  background: linear-gradient(135deg, #8b5cf6 0%, #7c3aed 100%);
  color: white;
  border: none;
}

.btn-journal:hover {
  background: linear-gradient(135deg, #7c3aed 0%, #6d28d9 100%);
  color: white;
}

/* Section action buttons - SINGLE SOURCE OF TRUTH for all header action buttons */
/* Apply this class to ALL buttons in card headers and accordion headers */
.section-action {
  padding: 0.5rem 0.875rem !important;
  font-size: 0.8125rem !important;
  font-weight: 500 !important;
  line-height: 1.2 !important;
  display: inline-flex !important;
  align-items: center !important;
  gap: 0.375rem !important;
  height: auto !important;
  min-height: unset !important;
  border-radius: 6px !important;
}

.section-action i {
  font-size: 0.75rem !important;
}

.btn-sm {
  padding: 0.5rem 0.875rem;
  font-size: 0.8125rem;
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
}

.btn-sm i {
  font-size: 0.75rem;
}

/* Section header buttons - consistent styling for all card header action buttons */
.card-header .btn-sm,
.card-header .btn-sm.btn-primary,
.card-header .btn-sm.btn-danger,
.card-header a.btn-sm,
.card-header button.btn-sm {
  padding: 0.5rem 0.875rem !important;
  font-size: 0.8125rem !important;
  font-weight: 500 !important;
  line-height: 1.2 !important;
  display: inline-flex !important;
  align-items: center !important;
  gap: 0.375rem !important;
  height: auto !important;
  min-height: unset !important;
}

.card-header .btn-sm i {
  font-size: 0.75rem !important;
}

/* Accordion header buttons - same styling */
.accordion-header .btn-sm,
.accordion-header a.btn-sm,
.accordion-header button.btn-sm {
  padding: 0.5rem 0.875rem !important;
  font-size: 0.8125rem !important;
  font-weight: 500 !important;
  line-height: 1.2 !important;
  display: inline-flex !important;
  align-items: center !important;
  gap: 0.375rem !important;
  height: auto !important;
  min-height: unset !important;
}

.accordion-header .btn-sm i {
  font-size: 0.75rem !important;
}

/* Table action buttons - compact icon-only buttons */
table .btn-sm {
  width: 32px;
  height: 32px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

table .btn-sm i {
  margin: 0;
}

.btn-lg {
  padding: var(--spacing-3) var(--spacing-6);
  font-size: var(--font-size-base);
}

.btn-icon {
  width: 40px;
  height: 40px;
  padding: 0;
}

/* Forms */
.form-group {
  margin-bottom: var(--spacing-4);
}

.form-label {
  display: block;
  font-size: var(--font-size-sm);
  font-weight: var(--font-weight-medium);
  color: var(--color-text-primary);
  margin-bottom: var(--spacing-2);
}

.form-control {
  width: 100%;
  padding: var(--spacing-2) var(--spacing-3);
  font-size: var(--font-size-sm);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  background: var(--color-background);
  color: var(--color-text-primary);
  transition: all var(--transition-fast);
}

.form-control:focus {
  outline: none;
  border-color: var(--color-primary-500);
  box-shadow: 0 0 0 3px rgba(7, 150, 240, 0.1);
}

.form-control::placeholder {
  color: var(--color-text-tertiary);
}

.form-select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M6 8l4 4 4-4'/%3e%3c/svg%3e");
  background-position: right var(--spacing-3) center;
  background-repeat: no-repeat;
  background-size: 16px;
  padding-right: var(--spacing-10);
}

.form-checkbox {
  width: 20px;
  height: 20px;
  border: 2px solid var(--color-border);
  border-radius: var(--radius-md);
  cursor: pointer;
}

.form-checkbox:checked {
  background: var(--color-primary-600);
  border-color: var(--color-primary-600);
}

/* Tables */
.table-container {
  overflow-x: auto;
  border-radius: var(--radius-lg);
  border: 1px solid var(--color-border);
}

.table-container--flush {
  border: none;
  border-radius: 0;
}

.table {
  width: 100%;
  border-collapse: collapse;
}

.table th {
  background: var(--color-surface);
  padding: var(--spacing-3) var(--spacing-4);
  font-size: var(--font-size-xs);
  font-weight: var(--font-weight-semibold);
  color: var(--color-text-secondary);
  text-align: left;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  border-bottom: 1px solid var(--color-border);
}

.table td {
  padding: var(--spacing-3) var(--spacing-4);
  font-size: var(--font-size-sm);
  color: var(--color-text-primary);
  border-bottom: 1px solid var(--color-border-light);
}

.table tbody tr:hover {
  background: var(--color-surface);
}

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

/* Badges */
.badge {
  display: inline-flex;
  align-items: center;
  padding: var(--spacing-1) var(--spacing-2);
  font-size: var(--font-size-xs);
  font-weight: var(--font-weight-medium);
  border-radius: var(--radius-full);
  line-height: 1;
}

.badge-primary {
  background: var(--color-primary-100);
  color: var(--color-primary-700);
}

.badge-success {
  background: var(--color-success-50);
  color: var(--color-success-600);
}

.badge-warning {
  background: var(--color-warning-50);
  color: var(--color-warning-600);
}

.badge-danger {
  background: var(--color-danger-50);
  color: var(--color-danger-600);
}

.badge-info {
  background: var(--color-info-50);
  color: var(--color-info-600);
}

.badge-gray {
  background: var(--color-gray-100);
  color: var(--color-gray-700);
}

.badge-secondary {
  background: var(--color-gray-100);
  color: var(--color-gray-700);
}

/* Status Badges */
.status-badge {
  display: inline-flex;
  align-items: center;
  gap: var(--spacing-1);
  padding: var(--spacing-1) var(--spacing-3);
  font-size: var(--font-size-xs);
  font-weight: var(--font-weight-medium);
  border-radius: var(--radius-full);
  text-transform: capitalize;
}

.status-badge::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: var(--radius-full);
  background: currentColor;
}

/* 8-Phase Status Colors */
.status-new {
  background: #f3e8ff;
  color: #8b5cf6;
}

.status-client_confirmed {
  background: #cffafe;
  color: #06b6d4;
}

.status-delivery {
  background: #eff6ff;
  color: #0796F0;
}

.status-recording {
  background: #fef3c7;
  color: #f59e0b;
}

.status-return {
  background: #dbeafe;
  color: #0678c2;
}

.status-analysis {
  background: #ccfbf1;
  color: #14b8a6;
}

.status-ready {
  background: var(--color-success-50);
  color: var(--color-success-600);
}

.status-closed {
  background: #f3f4f6;
  color: #6b7280;
}

.status-complete {
  background: var(--color-success-50);
  color: var(--color-success-600);
}

.status-completed {
  background: #eef2ff;
  color: #6366f1;
}

/* Metadata Chips */
.metadata-chip {
  display: inline-flex;
  align-items: center;
  gap: var(--spacing-2);
  padding: var(--spacing-1) var(--spacing-3);
  background: var(--color-gray-50);
  border: 1px solid var(--color-gray-200);
  border-radius: var(--radius-full);
  font-size: var(--font-size-xs);
  color: var(--color-text-secondary);
  transition: all var(--transition-fast);
}

.metadata-chip i {
  color: var(--color-gray-400);
  font-size: 0.75rem;
}

.metadata-chip .metadata-label {
  color: var(--color-text-tertiary);
  font-weight: var(--font-weight-normal);
}

.metadata-chip .metadata-value {
  color: var(--color-text-primary);
  font-weight: var(--font-weight-medium);
}

/* Alerts */
.alert {
  padding: var(--spacing-4);
  border-radius: var(--radius-lg);
  margin-bottom: var(--spacing-4);
  display: flex;
  align-items: flex-start;
  gap: var(--spacing-3);
  font-size: var(--font-size-sm);
  animation: slideIn var(--transition-base);
  transition: opacity var(--transition-base), transform var(--transition-base);
}

.alert-icon {
  flex-shrink: 0;
  width: 20px;
  height: 20px;
}

.alert-content {
  flex: 1;
}

.alert-close {
  flex-shrink: 0;
  background: none;
  border: none;
  color: inherit;
  opacity: 0.6;
  cursor: pointer;
  padding: 0;
  width: 20px;
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity var(--transition-fast);
  font-size: 1rem;
}

.alert-close:hover {
  opacity: 1;
}

.alert-success {
  background: var(--color-success-50);
  color: var(--color-success-600);
  border: 1px solid var(--color-success-500);
  border-left-width: 4px;
}

.alert-warning {
  background: var(--color-warning-50);
  color: var(--color-warning-600);
  border: 1px solid var(--color-warning-500);
  border-left-width: 4px;
}

.alert-danger {
  background: var(--color-danger-50);
  color: var(--color-danger-600);
  border: 1px solid var(--color-danger-500);
  border-left-width: 4px;
}

.alert-info {
  background: var(--color-info-50);
  color: var(--color-info-600);
  border: 1px solid var(--color-info-500);
  border-left-width: 4px;
}

/* Modal */
.modal-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: var(--z-modal-backdrop);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--spacing-4);
}

.modal {
  background: var(--color-background);
  border-radius: var(--radius-xl);
  max-width: 500px;
  width: 100%;
  max-height: 90vh;
  overflow: auto;
  box-shadow: var(--shadow-xl);
  animation: slideIn var(--transition-base);
}

.modal-header {
  padding: var(--spacing-6);
  border-bottom: 1px solid var(--color-border);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.modal-title {
  font-size: var(--font-size-xl);
  font-weight: var(--font-weight-semibold);
  color: var(--color-text-primary);
}

.modal-close {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-md);
  background: none;
  border: none;
  color: var(--color-text-secondary);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition-fast);
}

.modal-close:hover {
  background: var(--color-surface);
  color: var(--color-text-primary);
}

.modal-body {
  padding: var(--spacing-6);
}

.modal-footer {
  padding: var(--spacing-6);
  border-top: 1px solid var(--color-border);
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: var(--spacing-3);
}

/* Loading Spinner */
.spinner {
  width: 40px;
  height: 40px;
  border: 4px solid var(--color-gray-200);
  border-top-color: var(--color-primary-600);
  border-radius: var(--radius-full);
  animation: spin 1s linear infinite;
}

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

/* Progress Bar */
.progress {
  height: 8px;
  background: var(--color-gray-200);
  border-radius: var(--radius-full);
  overflow: hidden;
}

.progress-bar {
  height: 100%;
  background: var(--color-primary-600);
  transition: width var(--transition-base);
}

/* Tooltip */
.tooltip {
  position: relative;
}

.tooltip-content {
  position: absolute;
  bottom: calc(100% + var(--spacing-2));
  left: 50%;
  transform: translateX(-50%);
  background: var(--color-gray-900);
  color: white;
  padding: var(--spacing-2) var(--spacing-3);
  border-radius: var(--radius-md);
  font-size: var(--font-size-xs);
  white-space: nowrap;
  z-index: var(--z-tooltip);
  opacity: 0;
  visibility: hidden;
  transition: all var(--transition-fast);
}

.tooltip:hover .tooltip-content {
  opacity: 1;
  visibility: visible;
}

/* Dropdown */
.dropdown {
  position: relative;
  display: inline-block;
}

.dropdown-menu {
  position: absolute;
  top: calc(100% + var(--spacing-2));
  right: 0;
  background: var(--color-background);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  min-width: 200px;
  z-index: var(--z-dropdown);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-10px);
  transition: all var(--transition-fast);
}

.dropdown.active .dropdown-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.dropdown-item {
  display: block;
  padding: var(--spacing-2) var(--spacing-4);
  color: var(--color-text-primary);
  text-decoration: none;
  font-size: var(--font-size-sm);
  transition: all var(--transition-fast);
}

.dropdown-item:hover {
  background: var(--color-surface);
  color: var(--color-primary-600);
}

.dropdown-divider {
  height: 1px;
  background: var(--color-border);
  margin: var(--spacing-2) 0;
}

/* Timeline */
.timeline {
  position: relative;
  padding: var(--spacing-2) 0;
}

.timeline-item {
  position: relative;
  display: flex;
  gap: var(--spacing-4);
  padding-bottom: var(--spacing-6);
}

.timeline-item:last-child {
  padding-bottom: 0;
}

.timeline-item:last-child .timeline-line {
  display: none;
}

.timeline-marker {
  position: relative;
  flex-shrink: 0;
  width: 40px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.timeline-dot {
  width: 16px;
  height: 16px;
  border-radius: var(--radius-full);
  background: white;
  border: 3px solid var(--color-gray-300);
  flex-shrink: 0;
  z-index: 1;
  transition: all var(--transition-fast);
}

.timeline-item.timeline-current .timeline-dot {
  width: 20px;
  height: 20px;
  border-color: var(--color-success-500);
  background: var(--color-success-500);
  box-shadow: 0 0 0 4px rgba(34, 197, 94, 0.2);
}

.timeline-item.timeline-historical .timeline-dot {
  border-color: var(--color-gray-400);
  background: white;
}

.timeline-line {
  position: absolute;
  top: 20px;
  left: 50%;
  transform: translateX(-50%);
  width: 2px;
  height: calc(100% + var(--spacing-6));
  background: var(--color-gray-200);
}

.timeline-item.timeline-current .timeline-line {
  background: linear-gradient(to bottom, var(--color-success-300) 0%, var(--color-gray-200) 100%);
}

.timeline-content {
  flex: 1;
  min-width: 0;
}

.timeline-card {
  background: var(--color-background);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: var(--spacing-4);
  transition: all var(--transition-fast);
}

.timeline-card:hover {
  box-shadow: var(--shadow-md);
  border-color: var(--color-primary-300);
}

.timeline-item.timeline-current .timeline-card {
  background: linear-gradient(135deg, #f0fdf4 0%, #ffffff 100%);
  border-color: var(--color-success-300);
  box-shadow: 0 1px 3px rgba(34, 197, 94, 0.1);
}

.timeline-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--spacing-3);
  flex-wrap: wrap;
  gap: var(--spacing-2);
}

.timeline-title {
  display: flex;
  align-items: center;
  gap: var(--spacing-2);
  flex: 1;
}

.timeline-title h4 {
  margin: 0;
  font-size: var(--font-size-base);
  font-weight: var(--font-weight-semibold);
  color: var(--color-text-primary);
}

.timeline-subtitle {
  font-size: var(--font-size-sm);
  color: var(--color-text-tertiary);
  margin: var(--spacing-1) 0 0 0;
}

.timeline-badge {
  display: inline-flex;
  align-items: center;
  gap: var(--spacing-1);
  padding: var(--spacing-1) var(--spacing-2);
  border-radius: var(--radius-md);
  font-size: var(--font-size-xs);
  font-weight: var(--font-weight-medium);
  white-space: nowrap;
}

.timeline-badge.badge-current {
  background: var(--color-success-100);
  color: var(--color-success-700);
}

.timeline-badge.badge-historical {
  background: var(--color-gray-100);
  color: var(--color-gray-600);
}

.timeline-details {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: var(--spacing-3);
  margin-top: var(--spacing-3);
}

.timeline-detail-item {
  display: flex;
  flex-direction: column;
  gap: var(--spacing-1);
}

.timeline-detail-label {
  font-size: var(--font-size-xs);
  color: var(--color-text-tertiary);
  font-weight: var(--font-weight-medium);
  display: flex;
  align-items: center;
  gap: var(--spacing-1);
}

.timeline-detail-value {
  font-size: var(--font-size-sm);
  color: var(--color-text-primary);
  font-weight: var(--font-weight-medium);
  display: flex;
  align-items: center;
  gap: var(--spacing-2);
}

.timeline-section {
  margin-top: var(--spacing-3);
  padding-top: var(--spacing-3);
  border-top: 1px solid var(--color-border-light);
}

.timeline-section:first-child {
  margin-top: 0;
  padding-top: 0;
  border-top: none;
}

/* 5-Phase Progress Bar */
.phase-progress-container {
  margin-bottom: var(--spacing-6);
  padding: var(--spacing-4) var(--spacing-2);
}

.phase-progress-track {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  position: relative;
  padding: var(--spacing-2) 0;
}

.phase-step {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
  min-width: 80px;
}

/* Connecting line between phases */
.phase-connector {
  position: absolute;
  top: 16px;
  right: calc(50% + 16px);
  width: calc(100% - 32px);
  height: 3px;
  background: #e5e7eb;
  z-index: 0;
}

.phase-connector.completed {
  background: linear-gradient(90deg, var(--phase-color, #10b981), var(--phase-color, #10b981));
}

.phase-connector.current {
  background: linear-gradient(90deg, var(--phase-color, #10b981), #e5e7eb);
}

/* Phase circle with icon */
.phase-circle {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  z-index: 1;
  background: #f3f4f6;
  border: 2px solid #e5e7eb;
  color: #9ca3af;
  font-size: 12px;
  transition: all 0.3s ease;
  flex-shrink: 0;
}

.phase-circle i.fas,
.phase-circle i.fa,
.phase-circle i {
  display: block !important;
  line-height: inherit !important;
  height: auto !important;
  width: auto !important;
  margin: 0 !important;
  padding: 0 !important;
  vertical-align: baseline !important;
}

.phase-circle i.fas::before,
.phase-circle i.fa::before,
.phase-circle i::before {
  display: block !important;
  line-height: 1 !important;
}

.phase-step.completed .phase-circle {
  background: var(--phase-color, #10b981);
  border-color: var(--phase-color, #10b981);
  color: white;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.phase-step.current .phase-circle {
  background: white;
  border: 3px solid var(--phase-color, #0796F0);
  color: var(--phase-color, #0796F0);
  box-shadow: 0 0 0 4px rgba(7, 150, 240, 0.15);
  animation: pulse-phase 2s ease-in-out infinite;
}

@keyframes pulse-phase {
  0%, 100% {
    box-shadow: 0 0 0 4px rgba(7, 150, 240, 0.15);
  }
  50% {
    box-shadow: 0 0 0 8px rgba(7, 150, 240, 0.08);
  }
}

.phase-step.pending .phase-circle {
  background: #f9fafb;
  border-color: #d1d5db;
  color: #d1d5db;
}

/* Phase info (label, timestamp, sub-status) */
.phase-info {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-top: var(--spacing-2);
  text-align: center;
  gap: 2px;
}

.phase-label {
  font-size: 13px;
  font-weight: 600;
  color: #374151;
  line-height: 1.2;
}

.phase-step.current .phase-label {
  color: var(--phase-color, #0796F0);
}

.phase-step.pending .phase-label {
  color: #9ca3af;
}

.phase-timestamp {
  font-size: 11px;
  color: #6b7280;
  font-weight: 500;
}

.phase-sub-status {
  font-size: 10px;
  color: #0796F0;
  background: #eff6ff;
  padding: 2px 6px;
  border-radius: 4px;
  font-weight: 500;
  margin-top: 2px;
}

/* Complete Case Button - distinct button style */
.complete-case-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  border: none;
  border-radius: 20px;
  color: white;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 2px 8px rgba(16, 185, 129, 0.35);
  position: relative;
  z-index: 1;
}

.complete-case-btn i {
  font-size: 11px;
}

.complete-case-btn .complete-btn-text {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.complete-case-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(16, 185, 129, 0.45);
  background: linear-gradient(135deg, #059669 0%, #047857 100%);
}

.complete-case-btn:active {
  transform: translateY(0);
  box-shadow: 0 2px 8px rgba(16, 185, 129, 0.35);
}

/* Complete Case Placeholder (disabled state) */
.complete-case-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: #f3f4f6;
  border: 2px dashed #d1d5db;
  color: #9ca3af;
  font-size: 12px;
  position: relative;
  z-index: 1;
}

.complete-case-placeholder.locked {
  opacity: 0.6;
}

.complete-case-placeholder i.fas,
.complete-case-placeholder i.fa,
.complete-case-placeholder i {
  display: block !important;
  line-height: 1 !important;
  height: auto !important;
  width: auto !important;
  margin: 0 !important;
  padding: 0 !important;
  vertical-align: baseline !important;
}

.complete-case-placeholder i.fas::before,
.complete-case-placeholder i.fa::before,
.complete-case-placeholder i::before {
  display: block !important;
  line-height: 1 !important;
}

/* Complete Case Done (completed state) */
.complete-case-done {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: #6366f1 !important;
  border: 2px solid #6366f1 !important;
  color: #fff !important;
  font-size: 14px;
  line-height: 1;
  position: relative;
  z-index: 1;
  box-shadow: 0 2px 8px rgba(99, 102, 241, 0.3);
  flex-shrink: 0;
}

.complete-case-done i.fas,
.complete-case-done i.fa,
.complete-case-done i {
  display: block !important;
  line-height: 1 !important;
  height: auto !important;
  width: auto !important;
  margin: 0 !important;
  padding: 0 !important;
  vertical-align: baseline !important;
  color: #fff !important;
}

.complete-case-done i.fas::before,
.complete-case-done i.fa::before,
.complete-case-done i::before {
  display: block !important;
  line-height: 1 !important;
}

/* Locked phase circle */
.phase-circle.locked {
  opacity: 0.5;
}

/* Action tip for Complete button */
.phase-action-tip {
  font-size: 10px;
  color: #059669;
  background: #ecfdf5;
  padding: 2px 8px;
  border-radius: 10px;
  font-weight: 500;
  margin-top: 4px;
  border: 1px solid #a7f3d0;
}

/* Locked tip for Complete button */
.phase-locked-tip {
  font-size: 10px;
  color: #6b7280;
  background: #f3f4f6;
  padding: 2px 8px;
  border-radius: 10px;
  font-weight: 500;
  margin-top: 4px;
  border: 1px solid #e5e7eb;
}

/* Complete tip for finished cases */
.phase-complete-tip {
  font-size: 10px;
  color: #6366f1;
  background: #eef2ff;
  padding: 2px 8px;
  border-radius: 10px;
  font-weight: 500;
  margin-top: 4px;
  border: 1px solid #c7d2fe;
}

/* Responsive Design */
@media (max-width: 768px) {
  .phase-progress-container {
    padding: var(--spacing-3) var(--spacing-1);
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  
  .phase-progress-track {
    min-width: 400px;
    padding: var(--spacing-1) var(--spacing-2);
  }
  
  .phase-step {
    min-width: 70px;
  }
  
  .phase-circle {
    width: 28px;
    height: 28px;
    font-size: 11px;
  }
  
  .phase-connector {
    top: 14px;
    right: calc(50% + 14px);
    width: calc(100% - 28px);
    height: 2px;
  }
  
  .phase-label {
    font-size: 11px;
  }
  
  .phase-timestamp {
    font-size: 10px;
  }
  
  .phase-sub-status {
    font-size: 9px;
    padding: 1px 4px;
  }
}