/*
 * CPHS Advanced UI Framework
 * A comprehensive design system for health monitoring
 * Complete version with all styles included
 */

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

:root {
  /* Core Colors */
  --primary: #155CAA;
  --primary-hover: #114a88;
  --primary-light: #e3f0fb;
  --primary-dark: #0f3c6b;
  
  --secondary: #77D2F9;
  --secondary-hover: #56bde9;
  --secondary-light: #e9faff;
  --secondary-dark: #3ca9d1;
  
  --accent: #8b5cf6;
  --accent-hover: #7c3aed;
  --accent-light: #f3e8ff;
  
  --success: #10b981;
  --success-hover: #059669;
  --success-light: #ecfdf5;
  
  --warning: #f59e0b;
  --warning-hover: #d97706;
  --warning-light: #fffbeb;
  
  --danger: #ef4444;
  --danger-hover: #dc2626;
  --danger-light: #fef2f2;
  
  /* 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;
  
  /* Layout */
  --sidebar-width: 280px;
  --header-height: 64px;
  --container-width: 1280px;
  --radius-sm: 0.25rem;
  --radius: 0.5rem;
  --radius-md: 0.75rem;
  --radius-lg: 1rem;
  --radius-xl: 1.5rem;
  --radius-full: 9999px;
  
  /* Typography */
  --font-sans: 'Outfit', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-body: 'DM Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  
  /* Shadows */
  --shadow-xs: 0 1px 2px rgba(0, 0, 0, 0.05);
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.1), 0 1px 2px rgba(0, 0, 0, 0.06);
  --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  --shadow-md: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
  --shadow-lg: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
  --shadow-inner: inset 0 2px 4px 0 rgba(0, 0, 0, 0.06);
  
  /* Transitions */
  --transition-fast: 150ms cubic-bezier(0.16, 1, 0.3, 1);
  --transition-normal: 250ms cubic-bezier(0.16, 1, 0.3, 1);
  --transition-slow: 350ms cubic-bezier(0.16, 1, 0.3, 1);
  
  /* Z-indices */
  --z-dropdown: 1000;
  --z-sticky: 1020;
  --z-fixed: 1030;
  --z-modal-backdrop: 1040;
  --z-modal: 1050;
  --z-popover: 1060;
  --z-tooltip: 1070;
}

/*************************
 * Base Reset & Elements *
 *************************/
*, *::before, *::after {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  padding: 0;
  height: 100%;
}

body {
  font-family: var(--font-body);
  background-color: var(--gray-100);
  color: var(--gray-800);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
  min-height: 100vh;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-sans);
  font-weight: 600;
  line-height: 1.3;
  margin-top: 0;
  margin-bottom: 0.5em;
  color: var(--gray-900);
}

a {
  color: var(--primary);
  text-decoration: none;
  transition: color var(--transition-fast);
}

a:hover {
  color: var(--primary-hover);
}

p {
  margin-top: 0;
  margin-bottom: 1rem;
}

img {
  max-width: 100%;
  height: auto;
}

/***********************
 * Layout Components *
 ***********************/

/* Dashboard Layout */
.cphs-layout {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.cphs-main {
  display: flex;
  flex: 1;
}

.cphs-sidebar {
  width: var(--sidebar-width);
  background-color: white;
  border-right: 1px solid var(--gray-200);
  height: 100vh;
  position: fixed;
  top: 0;
  left: 0;
  z-index: var(--z-fixed);
  transition: transform var(--transition-normal);
  box-shadow: var(--shadow);
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
}

.cphs-content {
  flex: 1;
  margin-left: var(--sidebar-width);
  padding: 2rem;
  transition: margin var(--transition-normal);
}

.cphs-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--header-height);
  background-color: white;
  border-bottom: 1px solid var(--gray-200);
  padding: 0 2rem;
  position: sticky;
  top: 0;
  z-index: var(--z-sticky);
  box-shadow: var(--shadow-sm);
}

/* Sidebar Logo */
.cphs-logo {
  display: flex;
  align-items: center;
  padding: 1rem 0 2rem;
  margin-bottom: 1rem;
  border-bottom: 1px solid var(--gray-200);
}

.cphs-logo img {
  height: 32px;
  width: auto;
  margin-right: 0.75rem;
}

.cphs-logo-text {
  font-family: var(--font-sans);
  font-weight: 700;
  font-size: 1.25rem;
  color: var(--primary);
  letter-spacing: -0.025em;
}

.cphs-logo-text span {
  color: var(--gray-900);
}

/* Sidebar Navigation */
.cphs-nav {
  list-style: none;
  padding: 0;
  margin: 0;
}

.cphs-nav-item {
  margin-bottom: 0.5rem;
}

.cphs-nav-link {
  display: flex;
  align-items: center;
  padding: 0.875rem 1rem;
  color: var(--gray-700);
  border-radius: var(--radius);
  transition: all var(--transition-fast);
  font-weight: 500;
  position: relative;
}

.cphs-nav-link i {
  font-size: 1.25rem;
  margin-right: 1rem;
  width: 1.5rem;
  text-align: center;
  color: var(--gray-500);
  transition: color var(--transition-fast);
}

.cphs-nav-link.active {
  background-color: var(--primary-light);
  color: var(--primary);
}

.cphs-nav-link.active i {
  color: var(--primary);
}

.cphs-nav-link:hover:not(.active) {
  background-color: var(--gray-100);
  color: var(--gray-900);
}

.cphs-nav-divider {
  height: 1px;
  background-color: var(--gray-200);
  margin: 1.5rem 0;
}

.cphs-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.25em 0.65em;
  border-radius: var(--radius-full);
  font-size: 0.75rem;
  font-weight: 600;
  white-space: nowrap;
  transition: all var(--transition-fast);
}

.cphs-nav-link .cphs-badge {
  margin-left: auto;
}

.cphs-badge-primary {
  background-color: var(--primary-light);
  color: var(--primary);
}

.cphs-badge-success {
  background-color: var(--success-light);
  color: var(--success);
}

.cphs-badge-warning {
  background-color: var(--warning-light);
  color: var(--warning-hover);
}

.cphs-badge-danger {
  background-color: var(--danger-light);
  color: var(--danger);
}

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

.cphs-badge-secondary {
  background-color: var(--secondary-light);
  color: var(--secondary);
}

/* User Profile */
.cphs-user {
  margin-top: auto;
  padding: 1rem;
  border-top: 1px solid var(--gray-200);
  display: flex;
  align-items: center;
  margin-top: 2rem;
}

.cphs-user-avatar {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-full);
  background-color: var(--primary-light);
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  margin-right: 0.75rem;
}

.cphs-user-info {
  flex: 1;
  min-width: 0;
}

.cphs-user-name {
  font-weight: 600;
  color: var(--gray-900);
  margin: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.cphs-user-role {
  font-size: 0.813rem;
  color: var(--gray-500);
}

/* Page Container */
.cphs-container {
  max-width: var(--container-width);
  margin: 0 auto;
  padding: 0 1rem;
}

/* Page Header */
.cphs-page-header {
  margin-bottom: 2rem;
}

.cphs-page-title {
  font-size: 1.75rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
  color: var(--gray-900);
}

.cphs-page-subtitle {
  color: var(--gray-600);
  font-size: 1.1rem;
  font-weight: 400;
}

/***********************
 * Cards & Components *
 ***********************/

/* Card */
.cphs-card {
  background-color: white;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  overflow: hidden;
  transition: transform var(--transition-normal), box-shadow var(--transition-normal);
  margin-bottom: 1.5rem;
  border: 1px solid var(--gray-200);
}

.cphs-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
}

.cphs-card-header {
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid var(--gray-200);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.cphs-card-title {
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--gray-900);
  margin: 0;
  display: flex;
  align-items: center;
}

.cphs-card-title i {
  margin-right: 0.625rem;
  color: var(--primary);
  font-size: 1rem;
}

.cphs-card-body {
  padding: 1.5rem;
}

.cphs-card-footer {
  border-top: 1px solid var(--gray-200);
  padding: 1rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background-color: var(--gray-50);
}

/* Status Cards */
.cphs-stat-card {
  background: white;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  padding: 1.5rem;
  transition: all var(--transition-normal);
  position: relative;
  overflow: hidden;
  border-bottom: 3px solid transparent;
}

.cphs-stat-card-heart {
  border-color: var(--danger);
}

.cphs-stat-card-stress {
  border-color: var(--warning);
}

.cphs-stat-card-hrv {
  border-color: var(--success);
}

.cphs-stat-card-sleep {
  border-color: var(--secondary);
}

.cphs-stat-card:hover {
  transform: translateY(-3px) scale(1.01);
  box-shadow: var(--shadow-md);
}

.cphs-stat-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 1rem;
}

.cphs-stat-title {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--gray-600);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin: 0;
}

.cphs-stat-icon {
  width: 42px;
  height: 42px;
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
}

.cphs-stat-icon-heart {
  background-color: var(--danger-light);
  color: var(--danger);
}

.cphs-stat-icon-stress {
  background-color: var(--warning-light);
  color: var(--warning);
}

.cphs-stat-icon-hrv {
  background-color: var(--success-light);
  color: var(--success);
}

.cphs-stat-icon-sleep {
  background-color: var(--secondary-light);
  color: var(--secondary);
}

.cphs-stat-value {
  font-size: 2.5rem;
  font-weight: 700;
  line-height: 1;
  margin: 0.5rem 0 0;
  color: var(--gray-900);
}

.cphs-stat-info {
  display: flex;
  align-items: center;
  margin-top: 0.375rem;
  font-size: 0.875rem;
}

.cphs-stat-status {
  font-weight: 500;
  margin-right: 0.625rem;
}

.cphs-stat-status-normal {
  color: var(--success);
}

.cphs-stat-status-elevated {
  color: var(--warning);
}

.cphs-stat-status-high {
  color: var(--danger);
}

.cphs-stat-change {
  display: flex;
  align-items: center;
  color: var(--gray-600);
  font-size: 0.813rem;
}

.cphs-stat-change i {
  margin-right: 0.25rem;
}

.cphs-stat-change-up {
  color: var(--danger);
}

.cphs-stat-change-down {
  color: var(--success);
}

.cphs-stat-progress {
  margin-top: 1.25rem;
}

.cphs-progress {
  height: 6px;
  background-color: var(--gray-200);
  border-radius: var(--radius-full);
  overflow: hidden;
}

.cphs-progress-bar {
  height: 100%;
  border-radius: var(--radius-full);
  transition: width var(--transition-normal);
}

.cphs-progress-heart {
  background: linear-gradient(90deg, var(--danger-light), var(--danger));
}

.cphs-progress-stress {
  background: linear-gradient(90deg, var(--warning-light), var(--warning));
}

.cphs-progress-hrv {
  background: linear-gradient(90deg, var(--success-light), var(--success));
}

.cphs-progress-sleep {
  background: linear-gradient(90deg, var(--secondary-light), var(--secondary));
}

.cphs-progress-primary {
  background: linear-gradient(90deg, var(--primary-light), var(--primary));
}

/* Charts */
.cphs-chart-container {
  position: relative;
  background: white;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  padding: 1.5rem;
  margin-bottom: 1.5rem;
  border: 1px solid var(--gray-200);
}

.cphs-chart-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.25rem;
}

.cphs-chart-title {
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--gray-900);
  margin: 0;
}

.cphs-chart-controls {
  display: flex;
  align-items: center;
}

.cphs-chart-content {
  position: relative;
  height: 300px;
}

/* Time Range Selector */
.cphs-time-range {
  background-color: white;
  border-radius: var(--radius-full);
  display: inline-flex;
  padding: 0.25rem;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--gray-200);
}

.cphs-time-btn {
  border: none;
  background: transparent;
  padding: 0.375rem 1rem;
  border-radius: var(--radius-full);
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--gray-600);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.cphs-time-btn.active {
  background-color: var(--primary);
  color: white;
}

.cphs-time-btn:hover:not(.active) {
  background-color: var(--gray-100);
  color: var(--gray-900);
}

/* Buttons */
.cphs-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.5rem 1.25rem;
  border-radius: var(--radius);
  font-weight: 500;
  font-size: 0.938rem;
  border: none;
  cursor: pointer;
  transition: all var(--transition-fast);
  text-align: center;
  box-shadow: var(--shadow-xs);
}

.cphs-btn i {
  margin-right: 0.5rem;
}

.cphs-btn-primary {
  background-color: var(--primary);
  color: white;
}

.cphs-btn-primary:hover {
  background-color: var(--primary-hover);
  box-shadow: var(--shadow-sm);
}

.cphs-btn-secondary {
  background-color: var(--secondary);
  color: white;
}

.cphs-btn-secondary:hover {
  background-color: var(--secondary-hover);
  box-shadow: var(--shadow-sm);
}

.cphs-btn-outline {
  background-color: transparent;
  color: var(--primary);
  border: 1px solid var(--primary);
}

.cphs-btn-outline:hover {
  background-color: var(--primary-light);
}

.cphs-btn-ghost {
  background-color: transparent;
  color: var(--gray-700);
  box-shadow: none;
}

.cphs-btn-ghost:hover {
  background-color: var(--gray-100);
  color: var(--gray-900);
}

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

.cphs-btn-danger:hover {
  background-color: var(--danger-hover);
  box-shadow: var(--shadow-sm);
}

.cphs-btn-lg {
  padding: 0.75rem 1.5rem;
  font-size: 1rem;
}

.cphs-btn-sm {
  padding: 0.375rem 0.875rem;
  font-size: 0.813rem;
}

.cphs-btn-icon {
  width: 36px;
  height: 36px;
  padding: 0;
  border-radius: var(--radius-full);
}

.cphs-btn-icon i {
  margin: 0;
}

.cphs-btn-block {
  width: 100%;
}

/* Empty State */
.cphs-empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 3rem 1rem;
  text-align: center;
}

.cphs-empty-state h3 {
  margin-top: 1.5rem;
  margin-bottom: 0.5rem;
  color: var(--gray-800);
  font-weight: 600;
}

.cphs-empty-state p {
  color: var(--gray-600);
  max-width: 500px;
  margin-bottom: 1.5rem;
}

/* Interventions Panel */
.cphs-interventions {
  margin-top: 2rem;
}

.cphs-intervention-item {
  background-color: white;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  padding: 1.5rem;
  margin-bottom: 1rem;
  border-left: 4px solid var(--success);
  transition: transform var(--transition-fast);
}

.cphs-intervention-item:hover {
  transform: translateX(4px);
}

.cphs-intervention-new {
  border-left-color: var(--primary);
}

.cphs-intervention-automatic {
  border-left-color: var(--secondary);
}

.cphs-intervention-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 1rem;
}

.cphs-intervention-title {
  font-weight: 600;
  color: var(--gray-900);
  margin: 0;
  font-size: 1.125rem;
}

.cphs-intervention-meta {
  font-size: 0.875rem;
  color: var(--gray-500);
  display: flex;
  gap: 0.5rem;
  align-items: center;
}

.cphs-intervention-content {
  color: var(--gray-800);
  margin-bottom: 1.25rem;
}

.cphs-intervention-content p {
  margin-bottom: 0.75rem;
}

.cphs-intervention-content p:last-child {
  margin-bottom: 0;
}

.cphs-intervention-actions {
  display: flex;
  gap: 0.75rem;
}

/* Questionnaire Styles */
.cphs-question {
  background-color: white;
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  margin-bottom: 1.5rem;
  box-shadow: var(--shadow);
  border-left: 4px solid var(--primary);
}

.cphs-question-title {
  font-size: 1.125rem;
  font-weight: 600;
  margin-bottom: 1rem;
  color: var(--gray-900);
}

.cphs-likert {
  display: flex;
  justify-content: space-between;
  margin: 1.5rem 0;
  background-color: var(--gray-50);
  border-radius: var(--radius-lg);
  padding: 1rem;
}

.cphs-likert-option {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 20%;
}

.cphs-likert-radio {
  appearance: none;
  width: 20px;
  height: 20px;
  border: 2px solid var(--gray-300);
  border-radius: var(--radius-full);
  margin-bottom: 0.5rem;
  cursor: pointer;
  transition: all var(--transition-fast);
  position: relative;
}

.cphs-likert-radio:checked {
  border-color: var(--primary);
  background-color: var(--primary);
}

.cphs-likert-radio:checked::after {
  content: '';
  position: absolute;
  width: 8px;
  height: 8px;
  background-color: white;
  border-radius: var(--radius-full);
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}

.cphs-likert-radio:hover:not(:checked) {
  border-color: var(--primary-hover);
}

.cphs-likert-label {
  font-size: 0.813rem;
  text-align: center;
  color: var(--gray-700);
  font-weight: 500;
}

/* Chips/Tags */
.cphs-chip {
  display: inline-flex;
  align-items: center;
  padding: 0.375rem 0.75rem;
  border-radius: var(--radius-full);
  background-color: var(--gray-100);
  color: var(--gray-700);
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--transition-fast);
  border: 1px solid var(--gray-200);
}

.cphs-chip:hover {
  background-color: var(--gray-200);
  color: var(--gray-900);
}

.cphs-chip-active {
  background-color: var(--primary);
  color: white;
  border-color: var(--primary);
}

.cphs-chip-active:hover {
  background-color: var(--primary-hover);
  color: white;
}

/* Form Elements */
.cphs-form-group {
  margin-bottom: 1.5rem;
}

.cphs-label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 500;
  color: var(--gray-700);
}

.cphs-label-sm {
  font-size: 0.875rem;
}

.cphs-input-wrapper {
  position: relative;
}

.cphs-input-icon {
  position: absolute;
  left: 1rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--gray-500);
}

.cphs-input {
  width: 100%;
  padding: 0.75rem 1rem;
  border: 1px solid var(--gray-300);
  border-radius: var(--radius);
  font-size: 1rem;
  transition: all var(--transition-fast);
}

.cphs-input-icon-left {
  padding-left: 2.5rem;
}

.cphs-input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
}

.cphs-input::placeholder {
  color: var(--gray-400);
}

.cphs-textarea {
  min-height: 100px;
  resize: vertical;
}

.cphs-select {
  width: 100%;
  padding: 0.75rem 1rem;
  border: 1px solid var(--gray-300);
  border-radius: var(--radius);
  font-size: 1rem;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%236b7280' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
  background-position: right 1rem center;
  background-repeat: no-repeat;
  background-size: 1em;
  transition: all var(--transition-fast);
}

.cphs-select:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
}

.cphs-input-addon {
  display: flex;
  align-items: center;
}

.cphs-input-suffix {
  padding: 0.75rem 1rem;
  background-color: var(--gray-100);
  border: 1px solid var(--gray-300);
  border-left: none;
  border-top-right-radius: var(--radius);
  border-bottom-right-radius: var(--radius);
  color: var(--gray-600);
  font-size: 0.938rem;
}

.cphs-input-addon .cphs-input {
  border-top-right-radius: 0;
  border-bottom-right-radius: 0;
}

.cphs-hint {
  display: block;
  font-size: 0.813rem;
  color: var(--gray-500);
  margin-top: 0.375rem;
}

/* Checkbox & Radio */
.cphs-checkbox {
  display: flex;
  align-items: center;
}

.cphs-checkbox-input {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}

.cphs-checkbox-label {
  position: relative;
  padding-left: 2rem;
  cursor: pointer;
  font-size: 0.938rem;
  color: var(--gray-700);
}

.cphs-checkbox-label:before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.125rem;
  width: 1.25rem;
  height: 1.25rem;
  border: 1px solid var(--gray-300);
  border-radius: var(--radius-sm);
  transition: all var(--transition-fast);
}

.cphs-checkbox-input:checked + .cphs-checkbox-label:before {
  background-color: var(--primary);
  border-color: var(--primary);
}

.cphs-checkbox-input:checked + .cphs-checkbox-label:after {
  content: '';
  position: absolute;
  left: 0.438rem;
  top: 0.438rem;
  width: 0.375rem;
  height: 0.625rem;
  border: solid white;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

/* Switch Toggle */
.cphs-switch {
  position: relative;
  display: inline-block;
}

.cphs-switch-input {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}

.cphs-switch-label {
  display: block;
  overflow: hidden;
  cursor: pointer;
  height: 28px;
  padding: 0;
  line-height: 28px;
  border: 2px solid var(--gray-300);
  border-radius: var(--radius-full);
  background-color: var(--gray-200);
  transition: all var(--transition-fast);
  width: 56px;
}

.cphs-switch-label:before {
  content: '';
  display: block;
  width: 28px;
  height: 28px;
  margin: -2px;
  background: white;
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  border: 2px solid var(--gray-300);
  border-radius: var(--radius-full);
  transition: all var(--transition-fast);
  box-shadow: var(--shadow-sm);
}

.cphs-switch-input:checked + .cphs-switch-label {
  background-color: var(--primary);
  border-color: var(--primary);
}

.cphs-switch-input:checked + .cphs-switch-label:before {
  transform: translateX(28px);
  border-color: var(--primary);
}

/* Connected Devices */
.cphs-connected-devices {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.cphs-device {
  display: flex;
  align-items: center;
  background-color: var(--gray-50);
  border-radius: var(--radius-lg);
  padding: 1rem;
  transition: all var(--transition-fast);
}

.cphs-device:hover {
  background-color: var(--gray-100);
}

.cphs-device-icon {
  width: 48px;
  height: 48px;
  background-color: white;
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  color: var(--primary);
  margin-right: 1rem;
}

.cphs-device-info {
  flex: 1;
}

.cphs-device-name {
  font-weight: 600;
  font-size: 1rem;
  margin: 0 0 0.25rem 0;
  color: var(--gray-900);
}

.cphs-device-status {
  font-size: 0.875rem;
  color: var(--success);
  margin: 0;
}

.cphs-device-actions {
  display: flex;
  gap: 0.5rem;
}

/* Data Actions */
.cphs-data-action {
  display: flex;
  align-items: flex-start;
  background-color: var(--gray-50);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  transition: all var(--transition-fast);
}

.cphs-data-action:hover {
  background-color: var(--gray-100);
}

.cphs-data-action-icon {
  width: 48px;
  height: 48px;
  background-color: white;
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  color: var(--primary);
  margin-right: 1rem;
}

.cphs-data-action-content {
  flex: 1;
}

.cphs-data-action-content h4 {
  font-weight: 600;
  font-size: 1.063rem;
  margin: 0 0 0.5rem 0;
  color: var(--gray-900);
}

.cphs-data-action-content p {
  font-size: 0.938rem;
  color: var(--gray-600);
  margin: 0 0 1rem 0;
}

.cphs-data-action-danger .cphs-data-action-icon {
  color: var(--danger);
}

/* Rating Stars */
.cphs-rating {
  display: flex;
  align-items: center;
  color: var(--gray-600);
  font-size: 0.875rem;
}

.cphs-rating-text {
  margin-right: 0.5rem;
}

.cphs-rating i {
  color: var(--warning);
  margin-right: 0.125rem;
}

.cphs-rating-input {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.cphs-rating-stars {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 1.5rem;
  color: var(--warning);
  margin-bottom: 1rem;
}

.cphs-rating-stars i {
  cursor: pointer;
  transition: all var(--transition-fast);
}

.cphs-rating-stars i:hover {
  transform: scale(1.1);
}

.cphs-rating-labels {
  display: flex;
  width: 100%;
  justify-content: space-between;
  font-size: 0.813rem;
  color: var(--gray-600);
}

/* Breathing Exercise */
.cphs-breathing {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
  margin: 1.5rem 0;
}

.cphs-breathing-animation {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  background-color: var(--primary-light);
  border-radius: var(--radius-lg);
  position: relative;
  overflow: hidden;
}

.cphs-breathing-circle {
  width: 150px;
  height: 150px;
  border-radius: var(--radius-full);
  background: radial-gradient(circle, var(--primary) 0%, var(--primary-dark) 100%);
  transition: transform 4s cubic-bezier(0.34, 1.56, 0.64, 1);
  box-shadow: 0 0 50px rgba(79, 70, 229, 0.5);
  position: relative;
}

.cphs-breathing-text {
  margin-top: 2rem;
  font-family: var(--font-sans);
  font-weight: 600;
  font-size: 1.75rem;
  color: var(--primary-dark);
}

.cphs-breathing-info {
  background-color: white;
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  box-shadow: var(--shadow);
}

.cphs-breathing-title {
  font-weight: 600;
  font-size: 1.25rem;
  margin-bottom: 1rem;
  color: var(--gray-900);
}

.cphs-breathing-instructions {
  margin-bottom: 1.5rem;
}

.cphs-breathing-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  margin-top: 1.5rem;
  background-color: var(--gray-50);
  padding: 1rem;
  border-radius: var(--radius-lg);
}

.cphs-breathing-stat {
  text-align: center;
}

.cphs-breathing-stat-value {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--primary);
  line-height: 1;
  margin-bottom: 0.25rem;
}

.cphs-breathing-stat-label {
  font-size: 0.813rem;
  color: var(--gray-600);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* Modal */
.cphs-modal {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: var(--z-modal);
  display: none;
}

.cphs-modal.open .cphs-modal-overlay {
  opacity: 1;
}

.cphs-modal.open .cphs-modal-container {
  transform: translateY(0);
  opacity: 1;
}

.cphs-modal-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(0, 0, 0, 0.5);
  z-index: var(--z-modal-backdrop);
  opacity: 0;
  transition: opacity var(--transition-normal);
}

.cphs-modal-container {
  position: relative;
  z-index: var(--z-modal);
  width: 90%;
  max-width: 800px;
  margin: 2rem auto;
  background-color: white;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  transform: translateY(20px);
  opacity: 0;
  transition: transform var(--transition-normal), opacity var(--transition-normal);
  max-height: calc(100vh - 4rem);
  display: flex;
  flex-direction: column;
}

.cphs-modal-sm {
  max-width: 500px;
}

.cphs-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid var(--gray-200);
}

.cphs-modal-title {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--gray-900);
  margin: 0;
}

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

.cphs-modal-close:hover {
  background-color: var(--gray-100);
  color: var(--gray-900);
}

.cphs-modal-body {
  padding: 1.5rem;
  overflow-y: auto;
}

/* Toast Notifications */
.cphs-toast-container {
  position: fixed;
  bottom: 20px;
  right: 20px;
  z-index: var(--z-popover);
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-width: 350px;
}

.cphs-toast {
  background-color: white;
  border-radius: var(--radius);
  padding: 1rem 1.25rem;
  box-shadow: var(--shadow-md);
  display: flex;
  align-items: flex-start;
  border-left: 4px solid var(--primary);
  transform: translateX(120%);
  opacity: 0;
  transition: all var(--transition-normal);
  animation: toast-in var(--transition-normal) forwards;
}

@keyframes toast-in {
  from {
    transform: translateX(120%);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

.cphs-toast-success {
  border-left-color: var(--success);
}

.cphs-toast-warning {
  border-left-color: var(--warning);
}

.cphs-toast-error {
  border-left-color: var(--danger);
}

.cphs-toast-icon {
  margin-right: 0.75rem;
  font-size: 1.25rem;
  margin-top: 0.125rem;
}

.cphs-toast-success .cphs-toast-icon {
  color: var(--success);
}

.cphs-toast-warning .cphs-toast-icon {
  color: var(--warning);
}

.cphs-toast-error .cphs-toast-icon {
  color: var(--danger);
}

.cphs-toast-content {
  flex: 1;
}

.cphs-toast-title {
  font-weight: 600;
  margin-bottom: 0.25rem;
  color: var(--gray-900);
}

.cphs-toast-message {
  color: var(--gray-700);
  font-size: 0.938rem;
  margin: 0;
}

.cphs-toast-close {
  background: transparent;
  border: none;
  color: var(--gray-500);
  margin-left: 0.75rem;
  cursor: pointer;
  padding: 0.25rem;
  border-radius: var(--radius-sm);
  transition: all var(--transition-fast);
}

.cphs-toast-close:hover {
  background-color: var(--gray-100);
  color: var(--gray-700);
}

/* Theme Toggle */
.cphs-theme-toggle {
  position: fixed;
  bottom: 20px;
  right: 20px;
  z-index: var(--z-fixed);
}

/* Alert */
.cphs-alert {
  display: flex;
  padding: 1rem 1.25rem;
  border-radius: var(--radius-lg);
  margin-bottom: 1.5rem;
  box-shadow: var(--shadow);
}

.cphs-alert-success {
  background-color: var(--success-light);
  border-left: 4px solid var(--success);
}

.cphs-alert-warning {
  background-color: var(--warning-light);
  border-left: 4px solid var(--warning);
}

.cphs-alert-danger {
  background-color: var(--danger-light);
  border-left: 4px solid var(--danger);
}

.cphs-alert i {
  font-size: 1.25rem;
  margin-right: 0.75rem;
  color: var(--success);
}

.cphs-alert-warning i {
  color: var(--warning);
}

.cphs-alert-danger i {
  color: var(--danger);
}

.cphs-alert-content {
  flex: 1;
}

.cphs-alert-title {
  font-weight: 600;
  margin-bottom: 0.25rem;
  color: var(--gray-900);
}

.cphs-alert-message {
  color: var(--gray-700);
  font-size: 0.938rem;
  margin: 0;
}

/* Lists */
.cphs-list {
  padding-left: 1.5rem;
  margin-bottom: 1rem;
}

.cphs-list li {
  margin-bottom: 0.5rem;
  position: relative;
}

/* Dark Mode Styles */
.dark-mode {
  --primary: #6366f1;
  --primary-hover: #4f46e5;
  --primary-light: #1e1b4b;
  --primary-dark: #818cf8;
  
  --secondary: #0ea5e9;
  --secondary-hover: #0284c7;
  --secondary-light: #0c4a6e;
  --secondary-dark: #38bdf8;
  
  --accent: #a78bfa;
  --accent-hover: #8b5cf6;
  --accent-light: #2e1065;
  
  --success: #10b981;
  --success-hover: #059669;
  --success-light: #064e3b;
  
  --warning: #fbbf24;
  --warning-hover: #f59e0b;
  --warning-light: #78350f;
  
  --danger: #f87171;
  --danger-hover: #ef4444;
  --danger-light: #7f1d1d;
  
  --gray-50: #1a1a1a;
  --gray-100: #1e1e1e;
  --gray-200: #2a2a2a;
  --gray-300: #3a3a3a;
  --gray-400: #5a5a5a;
  --gray-500: #7a7a7a;
  --gray-600: #9a9a9a;
  --gray-700: #bbb;
  --gray-800: #ddd;
  --gray-900: #f5f5f5;
  
  color-scheme: dark;
}

.dark-mode body {
  background-color: var(--gray-50);
  color: var(--gray-700);
}

.dark-mode .cphs-sidebar,
.dark-mode .cphs-header,
.dark-mode .cphs-card,
.dark-mode .cphs-chart-container,
.dark-mode .cphs-stat-card,
.dark-mode .cphs-intervention-item,
.dark-mode .cphs-question,
.dark-mode .cphs-breathing-info,
.dark-mode .cphs-toast,
.dark-mode .cphs-modal-container,
.dark-mode .cphs-mobile-nav {
  background-color: var(--gray-100);
  border-color: var(--gray-200);
}

.dark-mode .cphs-nav-link:hover:not(.active) {
  background-color: var(--gray-200);
}

.dark-mode .cphs-card-footer {
  background-color: var(--gray-200);
}

.dark-mode .cphs-progress {
  background-color: var(--gray-300);
}

.dark-mode .cphs-toast {
  background-color: var(--gray-100);
}

.dark-mode .cphs-likert {
  background-color: var(--gray-200);
}

/* Animation Keyframes */
@keyframes pulse {
  0% {
    box-shadow: 0 0 0 0 rgba(79, 70, 229, 0.4);
  }
  70% {
    box-shadow: 0 0 0 15px rgba(79, 70, 229, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(79, 70, 229, 0);
  }
}

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

@keyframes breathe-in {
  from {
    transform: scale(1);
    box-shadow: 0 0 30px rgba(79, 70, 229, 0.5);
  }
  to {
    transform: scale(1.5);
    box-shadow: 0 0 50px rgba(79, 70, 229, 0.8);
  }
}

@keyframes breathe-out {
  from {
    transform: scale(1.5);
    box-shadow: 0 0 50px rgba(79, 70, 229, 0.8);
  }
  to {
    transform: scale(1);
    box-shadow: 0 0 30px rgba(79, 70, 229, 0.5);
  }
}

/* Utility Classes */
.cphs-flex {
  display: flex;
}

.cphs-flex-col {
  flex-direction: column;
}

.cphs-flex-1 {
  flex: 1;
}

.cphs-items-center {
  align-items: center;
}

.cphs-justify-between {
  justify-content: space-between;
}

.cphs-gap-2 {
  gap: 0.5rem;
}

.cphs-gap-4 {
  gap: 1rem;
}

.cphs-gap-6 {
  gap: 1.5rem;
}

.cphs-mt-2 {
  margin-top: 0.5rem;
}

.cphs-mt-4 {
  margin-top: 1rem;
}

.cphs-mt-6 {
  margin-top: 1.5rem;
}

.cphs-mb-0 {
  margin-bottom: 0;
}

.cphs-mb-2 {
  margin-bottom: 0.5rem;
}

.cphs-mb-4 {
  margin-bottom: 1rem;
}

.cphs-mb-6 {
  margin-bottom: 1.5rem;
}

.cphs-p-4 {
  padding: 1rem;
}

.cphs-p-6 {
  padding: 1.5rem;
}

.cphs-grid {
  display: grid;
}

.cphs-grid-cols-2 {
  grid-template-columns: repeat(2, 1fr);
}

.cphs-grid-cols-3 {
  grid-template-columns: repeat(3, 1fr);
}

.cphs-grid-cols-4 {
  grid-template-columns: repeat(4, 1fr);
}

.me-2 {
  margin-right: 0.5rem;
}

.me-3 {
  margin-right: 0.75rem;
}

/* Authentication Styles */
.cphs-auth-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: var(--gray-100);
  padding: 2rem 1rem;
}

.cphs-auth-container {
  display: flex;
  max-width: 1200px;
  width: 100%;
  height: 700px;
  max-height: 90vh;
  border-radius: var(--radius-xl);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
}

.cphs-auth-card {
  flex: 1;
  background-color: white;
  padding: 3rem;
  display: flex;
  flex-direction: column;
}

.cphs-auth-info {
  flex: 1;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: white;
  padding: 3rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
  position: relative;
  overflow: hidden;
}

.cphs-auth-info:before {
  content: '';
  position: absolute;
  top: -10%;
  right: -10%;
  width: 500px;
  height: 500px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  z-index: 0;
}

.cphs-auth-info:after {
  content: '';
  position: absolute;
  bottom: -15%;
  left: -15%;
  width: 400px;
  height: 400px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.05);
  z-index: 0;
}

.cphs-auth-info-content {
  position: relative;
  z-index: 1;
}

/* Auth Header */
.cphs-auth-header {
  text-align: center;
  margin-bottom: 2rem;
}

.cphs-auth-logo {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.5rem;
}

.cphs-auth-title {
  font-size: 1.75rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  color: var(--gray-900);
}

.cphs-auth-subtitle {
  color: var(--gray-600);
  font-size: 1rem;
}

/* Auth Form */
.cphs-auth-form {
  width: 100%;
  max-width: 400px;
  margin: 0 auto;
}

.cphs-auth-footer {
  margin-top: auto;
  text-align: center;
  padding-top: 2rem;
  color: var(--gray-600);
}

.cphs-link {
  color: var(--primary);
  text-decoration: none;
  font-weight: 500;
  transition: color var(--transition-fast);
}

.cphs-link:hover {
  color: var(--primary-hover);
  text-decoration: underline;
}

.cphs-link-sm {
  font-size: 0.813rem;
  color: var(--primary);
  text-decoration: none;
  transition: color var(--transition-fast);
}

.cphs-link-sm:hover {
  color: var(--primary-hover);
  text-decoration: underline;
}

/* Auth Info Content */
.cphs-auth-info h2 {
  font-size: 2rem;
  font-weight: 700;
  margin-bottom: 1rem;
  color: white;
}

.cphs-auth-info p {
  font-size: 1.1rem;
  margin-bottom: 2rem;
  opacity: 0.9;
}

.cphs-auth-features,
.cphs-auth-steps {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.cphs-auth-feature,
.cphs-auth-step {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
}

.cphs-auth-feature-icon,
.cphs-auth-step-number {
  width: 48px;
  height: 48px;
  background-color: rgba(255, 255, 255, 0.2);
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.cphs-auth-feature-icon i {
  font-size: 1.25rem;
}

.cphs-auth-step-number {
  font-size: 1.5rem;
  font-weight: 700;
}

.cphs-auth-feature-text h3,
.cphs-auth-step-text h3 {
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 0.25rem;
  color: white;
}

.cphs-auth-feature-text p,
.cphs-auth-step-text p {
  font-size: 0.938rem;
  margin-bottom: 0;
  opacity: 0.8;
}

/* Mobile Bottom Navigation */
.cphs-mobile-nav {
  display: none;
}

/* Responsive Design Adjustments */
@media (max-width: 992px) {
  .cphs-sidebar {
    transform: translateX(-100%);
    width: 250px;
  }
  
  .cphs-sidebar.open {
    transform: translateX(0);
  }
  
  .cphs-content {
    margin-left: 0;
    padding: 1.5rem;
  }
  
  .cphs-breathing {
    grid-template-columns: 1fr;
  }
  
  .cphs-mobile-nav {
    display: flex;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background-color: white;
    border-top: 1px solid var(--gray-200);
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.05);
    z-index: var(--z-fixed);
    padding: 0.5rem 0.25rem;
  }
  
  .cphs-mobile-nav-item {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 0.5rem;
    color: var(--gray-600);
    border-radius: var(--radius);
    transition: all var(--transition-fast);
    text-decoration: none;
    position: relative;
  }
  
  .cphs-mobile-nav-item.active {
    color: var(--primary);
    background-color: var(--primary-light);
  }
  
  .cphs-mobile-nav-item i {
    font-size: 1.25rem;
    margin-bottom: 0.25rem;
  }
  
  .cphs-mobile-nav-label {
    font-size: 0.75rem;
    font-weight: 500;
  }
  
  .cphs-mobile-nav-item .cphs-badge {
    position: absolute;
    top: 0;
    right: 0;
    transform: translate(30%, -30%);
    font-size: 0.625rem;
    padding: 0.125rem 0.375rem;
  }
  
  /* Add bottom padding to accommodate mobile nav */
  body {
    padding-bottom: 4rem;
  }
  
  .cphs-grid-cols-2,
  .cphs-grid-cols-3,
  .cphs-grid-cols-4 {
    grid-template-columns: 1fr;
    gap: 1rem;
  }
  
  .cphs-theme-toggle {
    bottom: 80px;
  }
  
  /* Auth Page Responsive */
  .cphs-auth-container {
    flex-direction: column;
    height: auto;
    max-height: none;
  }
  
  .cphs-auth-info {
    display: none; /* Hide the info panel on mobile */
  }
  
  .cphs-auth-card {
    padding: 2rem;
  }
}

@media (max-width: 768px) {
  .cphs-content {
    padding: 1rem;
  }
  
  .cphs-page-title {
    font-size: 1.5rem;
  }
  
  .cphs-page-subtitle {
    font-size: 1rem;
  }
  
  .cphs-card-header {
    padding: 1rem;
  }
  
  .cphs-card-body {
    padding: 1rem;
  }
  
  .cphs-stat-card {
    padding: 1rem;
  }
  
  .cphs-stat-value {
    font-size: 1.75rem;
  }
  
  .cphs-stat-icon {
    width: 36px;
    height: 36px;
    font-size: 1rem;
  }
  
  .cphs-chart-container {
    padding: 1rem;
  }
  
  .cphs-chart-content {
    height: 250px;
  }
  
  .cphs-intervention-item {
    padding: 1rem;
  }
  
  .cphs-intervention-meta {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.25rem;
  }
  
  .cphs-intervention-actions {
    flex-wrap: wrap;
  }
  
  .cphs-question {
    padding: 1rem;
  }
  
  .cphs-likert {
    padding: 0.5rem;
    margin: 1rem 0;
  }
  
  .cphs-likert-label {
    font-size: 0.75rem;
  }
  
  .cphs-breathing-circle {
    width: 100px;
    height: 100px;
  }
  
  .cphs-breathing-text {
    font-size: 1.5rem;
    margin-top: 1.5rem;
  }
  
  .cphs-modal-container {
    width: 95%;
    margin: 1rem auto;
  }
  
  .cphs-modal-header {
    padding: 1rem;
  }
  
  .cphs-modal-body {
    padding: 1rem;
  }
  
  .cphs-data-action {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }
  
  .cphs-data-action-icon {
    margin-right: 0;
    margin-bottom: 1rem;
  }
  
  .cphs-device {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }
  
  .cphs-device-icon {
    margin-right: 0;
    margin-bottom: 0.5rem;
  }
}

/* Add these to your advanced-ui.css file */

/* Environmental parameter card styles */
.cphs-stat-card-co2 {
  border-color: var(--secondary);
}

.cphs-stat-card-noise {
  border-color: var(--accent);
}

.cphs-stat-card-temperature {
  border-color: var(--warning);
}

.cphs-stat-card-light {
  border-color: var(--primary);
}

/* Environmental parameter icon styles */
.cphs-stat-icon-co2 {
  background-color: var(--secondary-light);
  color: var(--secondary);
}

.cphs-stat-icon-noise {
  background-color: var(--accent-light);
  color: var(--accent);
}

.cphs-stat-icon-temperature {
  background-color: var(--warning-light);
  color: var(--warning);
}

.cphs-stat-icon-light {
  background-color: var(--primary-light);
  color: var(--primary);
}

/* Progress bar styles for environmental parameters */
.cphs-progress-co2 {
  background: linear-gradient(90deg, var(--secondary-light), var(--secondary));
}

.cphs-progress-noise {
  background: linear-gradient(90deg, var(--accent-light), var(--accent));
}

.cphs-progress-temperature {
  background: linear-gradient(90deg, var(--warning-light), var(--warning));
}

.cphs-progress-light {
  background: linear-gradient(90deg, var(--primary-light), var(--primary));
}

/* Section title styles */
.cphs-section-title {
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: 1rem;
  color: var(--gray-800);
}

/* Optimal range display for stat cards */
.cphs-stat-range {
  font-size: 0.75rem;
  color: var(--gray-600);
  margin-top: 0.5rem;
  text-align: center;
}

/* Media queries for responsive environmental metrics */
@media (max-width: 992px) {
  .cphs-grid-cols-3 {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .cphs-stats-placeholder {
    display: none;
  }
}

@media (max-width: 768px) {
  .cphs-grid-cols-3,
  .cphs-grid-cols-2 {
    grid-template-columns: 1fr;
  }
}

/* Dark mode adjustments for environmental metrics */
.dark-mode .cphs-section-title {
  color: var(--gray-800);
}

.dark-mode .cphs-stat-range {
  color: var(--gray-500);
}



@media (max-width: 480px) {
  .cphs-stat-card {
    margin-bottom: 1rem;
  }
  
  .cphs-time-btn {
    padding: 0.25rem 0.75rem;
    font-size: 0.75rem;
  }
  
  .cphs-btn {
    padding: 0.375rem 1rem;
    font-size: 0.875rem;
  }
  
  .cphs-btn-lg {
    padding: 0.5rem 1.25rem;
    font-size: 0.938rem;
  }
  
  .cphs-btn-sm {
    padding: 0.25rem 0.75rem;
    font-size: 0.75rem;
  }
  
  .cphs-auth-card {
    padding: 1.5rem;
  }
  
  .cphs-auth-title {
    font-size: 1.5rem;
  }
  
  .cphs-likert {
    flex-direction: column;
    gap: 0.75rem;
  }
  
  .cphs-likert-option {
    width: 100%;
    flex-direction: row;
    align-items: center;
    justify-content: flex-start;
  }
  
  .cphs-likert-radio {
    margin-bottom: 0;
    margin-right: 0.5rem;
  }
  
  .cphs-likert-label {
    text-align: left;
  }
  
  .cphs-breathing-stats {
    grid-template-columns: 1fr;
    gap: 0.5rem;
  }
  
  .cphs-toast-container {
    max-width: 95%;
    left: 2.5%;
    right: 2.5%;
  }
}



/* Notification highlighting effects */
.highlight-section {
  animation: highlight-pulse 2s ease-in-out;
}

@keyframes highlight-pulse {
  0% { box-shadow: 0 0 0 0 rgba(79, 70, 229, 0.4); }
  70% { box-shadow: 0 0 0 15px rgba(79, 70, 229, 0); }
  100% { box-shadow: 0 0 0 0 rgba(79, 70, 229, 0); }
}

/* Notification test button */
.notification-test-toggle {
  position: fixed;
  bottom: 80px;
  right: 20px;
  z-index: 999;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-md);
}

/* Notification test panel */
#notification-test-panel {
  position: fixed;
  bottom: 140px;
  right: 20px;
  z-index: 1000;
  width: 300px;
  max-width: 90vw;
}

/* Custom notification modal */
#custom-notification-modal .cphs-modal-sm {
  max-width: 400px;
}