/* ===== NEWSTART HEALTH JOURNEY VISUALIZER ===== */
/* ===== ENHANCED THEME VARIABLES ===== */
:root {
  --primary: #10b981;
  --primary-light: #34d399;
  --primary-dark: #059669;
  --secondary: #3b82f6;
  --accent: #f59e0b;
  --success: #10b981;
  --warning: #f59e0b;
  --error: #ef4444;
  --bg: #f8fafc;
  --card: #ffffff;
  --text: #0f172a;
  --muted: #64748b;
  --border: #e2e8f0;
}

.dark {
  --primary: #34d399;
  --primary-light: #10b981;
  --primary-dark: #059669;
  --secondary: #60a5fa;
  --accent: #fbbf24;
  --success: #34d399;
  --warning: #fbbf24;
  --error: #f87171;
  --bg: #0f172a;
  --card: #1e293b;
  --text: #f1f5f9;
  --muted: #94a3b8;
  --border: #334155;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: system-ui, -apple-system, sans-serif;
  min-height: 100vh;
}

/* ===== DASHBOARD LAYOUT ===== */
.dashboard-container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 20px;
  background: var(--bg);
  min-height: 100vh;
  width: 100%;
}

/* Tablet */
@media (max-width: 1024px) {
  .dashboard-container {
    max-width: 95%;
    padding: 20px;
  }
}

/* Mobile */
@media (max-width: 768px) {
  .dashboard-container {
    max-width: 100%;
    padding: 15px;
  }
}

/* ===== DRAWER STYLES ===== */
.drawer-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.5);
  z-index: 9998;
  display: none;
}

.drawer {
  position: fixed;
  background: var(--card);
  top: 0;
  left: -300px;
  width: 280px;
  height: 100%;
  border-right: 1px solid var(--border);
  z-index: 9999;
  transition: left 0.3s ease;
  padding: 20px;
  overflow-y: auto;
}

.drawer.open {
  left: 0;
}

.drawer-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 30px;
  padding-bottom: 15px;
  border-bottom: 1px solid var(--border);
}

.drawer-header h3 {
  margin: 0;
}

.drawer-nav {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.drawer-nav a {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 15px;
  border-radius: 8px;
  text-decoration: none;
  color: var(--text);
  transition: all 0.3s ease;
}

.drawer-nav a:hover,
.drawer-nav a.active {
  background: var(--accent);
  color: white;
}

/* ===== MODAL STYLES ===== */
.modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.5);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 10000;
  padding: 20px;
}

.modal.show {
  display: flex;
}

.modal .panel {
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 25px;
  width: min(400px, 95vw);
  max-height: 90vh;
  overflow: auto;
  background: var(--card);
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  padding-bottom: 15px;
  border-bottom: 1px solid var(--border);
}

.modal-header h3 {
  margin: 0;
}

/* ===== DASHBOARD COMPONENTS ===== */
.dashboard-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  padding-bottom: 15px;
  border-bottom: 1px solid var(--border);
}

.header-left {
  display: flex;
  align-items: center;
  gap: 15px;
}

.header-actions {
  display: flex;
  gap: 10px;
  align-items: center;
}

.menu-btn {
  background: none;
  border: none;
  font-size: 20px;
  cursor: pointer;
  padding: 8px;
  border-radius: 6px;
  transition: background 0.3s ease;
  color: var(--text);
}

.menu-btn:hover {
  background: var(--border);
}

.user-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--accent);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  cursor: pointer;
}



.card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 10px;
    margin: 0 auto;
    margin-bottom: 10px;
 
}




.dashboard-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 20px;
  margin-bottom: 20px;
}

.dashboard-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 15px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border);
}

.dashboard-card-title {
  font-size: 18px;
  font-weight: 600;
  color: var(--text);
  margin: 0;
}

/* ===== BADGE STYLES ===== */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 16px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--card);
  color: var(--text);
  font-weight: 500;
  text-decoration: none;
  font-size: 14px;
}

.badge.primary {
  background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
  border-color: transparent;
  color: white;
}

.super-admin-badge {
  background: var(--error) !important;
  color: white !important;
}

/* ===== GRID LAYOUTS ===== */
.dashboard-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 20px;
  margin: 20px 0;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 10px;
  margin: 15px 0;
}

.stat-item {
  text-align: center;
  padding: 15px 10px;
  background: var(--bg);
  border-radius: 8px;
  border: 1px solid var(--border);
}

.stat-value {
  font-size: 20px;
  font-weight: bold;
  color: var(--accent);
  margin-bottom: 5px;
}

.stat-label {
  font-size: 11px;
  color: var(--muted);
  font-weight: 500;
}

.quick-actions {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 10px;
  margin: 15px 0;
}

.action-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 15px 10px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.3s ease;
  text-align: center;
  text-decoration: none;
  color: var(--text);
}

.action-btn:hover {
  border-color: var(--accent);
  transform: translateY(-2px);
}

.action-icon {
  font-size: 20px;
  margin-bottom: 8px;
}

.action-label {
  font-size: 11px;
  font-weight: 500;
}

/* ===== PROGRAM CARD STYLES ===== */
.program-card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 15px;
  margin-bottom: 10px;
}

.program-header {
  display: flex;
  justify-content: space-between;
  align-items: start;
  margin-bottom: 10px;
}

.program-name {
  font-weight: 600;
  color: var(--text);
  margin: 0;
}

.program-user-info {
  font-size: 11px;
  color: var(--muted);
  margin-top: 4px;
}

.program-type {
  padding: 4px 8px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 600;
  background: var(--accent);
  color: white;
}

.program-description {
  margin: 0 0 10px 0;
  font-size: 12px;
  color: var(--muted);
}

.challenge-info {
  font-size: 11px;
  color: var(--muted);
}

.program-actions {
  margin-top: 12px;
  display: flex;
  gap: 8px;
}

/* ===== PROGRESS BAR ===== */
.progress-bar {
  height: 6px;
  background: var(--border);
  border-radius: 3px;
  overflow: hidden;
  margin: 8px 0;
}

.progress-fill {
  height: 100%;
  background: var(--accent);
  border-radius: 3px;
}

.program-stats {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  color: var(--muted);
}

/* ===== FORM STYLES ===== */
.form-group {
  margin-bottom: 20px;
}

.form-group label {
  display: block;
  margin-bottom: 8px;
  font-weight: 500;
  color: var(--text);
  font-size: 14px;
}

.form-actions {
  display: flex;
  gap: 10px;
  align-items: center;
}

input[type="text"],
input[type="email"],
input[type="password"] {
  width: 100%;
  padding: 12px 16px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--card);
  color: var(--text);
  font-size: 14px;
  transition: border-color 0.3s ease;
}

input[type="text"]:focus,
input[type="email"]:focus,
input[type="password"]:focus {
  outline: none;
  border-color: var(--primary);
}

input[readonly] {
  background: var(--border);
  cursor: not-allowed;
}

/* ===== UTILITY CLASSES ===== */
.small {
  font-size: 12px;
  color: var(--muted);
}

.empty-state {
  text-align: center;
  padding: 40px 20px;
  color: var(--muted);
}

.empty-state-icon {
  font-size: 48px;
  margin-bottom: 16px;
}

.empty-state h3 {
  margin: 0 0 8px 0;
}

.empty-state p {
  margin: 0;
}

/* ===== SIDEBAR STYLES (Keep for other pages) ===== */
.sidebar {
  position: fixed;
  top: 0;
  left: 0;
  width: 280px;
  height: 100vh;
  background: var(--card);
  border-right: 1px solid var(--border);
  z-index: 1000;
  transition: all 0.3s ease;
  padding: 24px 0;
  overflow-y: auto;
}

.sidebar.squeeze {
  width: 80px;
}

.sidebar-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 32px;
  padding: 0 24px 16px 24px;
  border-bottom: 1px solid var(--border);
}

.sidebar.squeeze .sidebar-header {
  justify-content: center;
  padding: 0 16px 16px 16px;
}

.sidebar-header h3 {
  margin: 0;
  background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  font-weight: 700;
  font-size: 1.5rem;
}

.sidebar.squeeze .sidebar-header h3 {
  display: none;
}

.sidebar-nav {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 0 16px;
}

.sidebar-nav a {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px 20px;
  border-radius: 12px;
  text-decoration: none;
  color: var(--text);
  transition: all 0.3s ease;
  white-space: nowrap;
  font-weight: 500;
}

.sidebar.squeeze .sidebar-nav a {
  padding: 16px;
  justify-content: center;
}

.sidebar.squeeze .sidebar-nav span:last-child {
  display: none;
}

.sidebar-nav a:hover,
.sidebar-nav a.active {
  background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
  color: white;
}

.toggle-btn {
  background: none;
  border: none;
  font-size: 18px;
  cursor: pointer;
  padding: 10px;
  border-radius: 10px;
  transition: all 0.3s ease;
  color: var(--muted);
  width: 40px;
  height: 40px;
}

.toggle-btn:hover {
  background: var(--border);
  color: var(--text);
}

/* Main Content for other pages */


.container {
  margin: 0 auto;
  transition: margin-left 0.3s ease;
  padding: 20px;
  background: var(--bg);
  min-height: 100vh;
  max-width: 100%;
}

.container.squeeze {
  margin-left: 80px;
}

/* Mobile Overlay */
.sidebar-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.5);
  z-index: 999;
  display: none;
}

.sidebar-overlay.mobile-open {
  display: block;
}

/* Mobile menu button */
.mobile-menu-btn {
  display: none;
  background: none;
  border: none;
  font-size: 20px;
  cursor: pointer;
  padding: 10px;
  border-radius: 8px;
  color: var(--text);
  margin-right: 10px;
}

/* Mobile Responsive */
@media (max-width: 768px) {
  .container {
    margin-left: 0 !important;
    padding: 16px;
  }
  
  .sidebar {
    width: 280px;
    transform: translateX(-100%);
  }
  
  .sidebar.mobile-open {
    transform: translateX(0);
  }
  
  .mobile-menu-btn {
    display: block;
  }
  
  .dashboard-header {
    flex-direction: column;
    gap: 15px;
    align-items: flex-start;
  }
  
  .header-actions {
    width: 100%;
    justify-content: space-between;
  }
  
  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .quick-actions {
    grid-template-columns: repeat(2, 1fr);
  }
}




.dashboard-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px;
    background: var(--bg);
    min-height: 100vh;
    width: 100%;
}

/* Tablet */
@media (max-width: 1024px) {
    .dashboard-container {
        max-width: 95%;
        padding: 20px;
    }
}

/* Mobile */
@media (max-width: 768px) {
    .dashboard-container {
        max-width: 100%;
        padding: 15px;
    }
}





    /* ✅ [CODE-012] UPGRADE OVERLAY STYLES */
    .upgrade-overlay {
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: rgb(85 172 150 / 17%);
     
        display: flex;
        align-items: center;
        justify-content: center;
        border-radius: 12px;
        z-index: 10;
    }

    .upgrade-content {
        background: white;
        padding: 25px;
        border-radius: 12px;
        text-align: center;
        max-width: 300px;
        box-shadow: 0 10px 30px rgba(0,0,0,0.3);
    }

    .dark .upgrade-content {
        background: var(--card);
        border: 1px solid var(--border);
    }

    .upgrade-icon {
        font-size: 48px;
        margin-bottom: 15px;
    }

    .upgrade-content h4 {
        margin: 0 0 10px 0;
        color: var(--text);
    }

    .upgrade-content p {
        margin: 0 0 20px 0;
        color: var(--muted);
        line-height: 1.5;
        font-size: 14px;
    }
