/**
 * CONSTELLATION ONE - SHARED DASHBOARD STYLES
 * 
 * Design Philosophy:
 * - Layout/Structure: 12-column grid system (from admin/sales)
 * - Appearance/Styling: Customer glassmorphism aesthetic
 * - Consistency: All dashboards use the same visual language
 * 
 * Updated: December 28, 2025
 */

/* ============================================================================
   GLOBAL RESET & BASE
   ============================================================================ */

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
  background: linear-gradient(135deg, #0f172a 0%, #1e293b 50%, #0f172a 100%);
  background-attachment: fixed;
  background-size: 100% 200vh;
  padding-bottom: 40px;
  color: #e2e8f0;
  overflow-y: auto;
  height: auto;
  line-height: 1.6;
  position: relative;
}

body::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: 
    radial-gradient(circle at 20% 50%, rgba(80, 140, 255, 0.1) 0%, transparent 50%),
    radial-gradient(circle at 80% 80%, rgba(102, 126, 234, 0.1) 0%, transparent 50%);
  pointer-events: none;
  z-index: 0;
}

.dashboard-container,
.top-nav {
  position: relative;
  z-index: 1;
}

/* ============================================================================
   TOP NAVIGATION BAR (Consistent across all dashboards)
   ============================================================================ */

.top-nav {
  background: rgba(14, 18, 28, 0.75);
  backdrop-filter: blur(25px) saturate(180%);
  -webkit-backdrop-filter: blur(25px) saturate(180%);
  border-bottom: 1px solid rgba(80, 140, 255, 0.4);
  padding: 15px 30px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: 
    0 4px 30px rgba(80, 140, 255, 0.2),
    inset 0 -1px 0 rgba(80, 140, 255, 0.1);
}

.nav-brand {
  display: flex;
  align-items: flex-start;
  gap: 15px;
}


.nav-title {
  display: flex;
  align-items: center;
  gap: 15px;
}

.nav-brand h1 {
  font-family: 'Space', 'Futurism', 'Orbitron', sans-serif;
  font-size: 24px;
  font-weight: 700;
  color: #e6ebff;
  letter-spacing: 1px;
  text-shadow: 0 0 20px rgba(80, 140, 255, 0.5);
}

.nav-links {
  display: flex;
  gap: 20px;
  align-items: center;
}

.nav-link {
  color: #94a3b8;
  text-decoration: none;
  padding: 8px 16px;
  border-radius: 6px;
  transition: all 0.3s ease;
  font-size: 14px;
  font-weight: 500;
}

.nav-link:hover {
  background: rgba(80, 140, 255, 0.15);
  color: #e6ebff;
}

.nav-link.active {
  background: rgba(80, 140, 255, 0.25);
  color: #e6ebff;
  border: 1px solid rgba(80, 140, 255, 0.4);
}

.logout-btn, .btn-logout {
  padding: 8px 20px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  border: none;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 
    0 4px 15px rgba(102, 126, 234, 0.4),
    inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.logout-btn:hover, .btn-logout:hover {
  transform: translateY(-2px);
  box-shadow: 
    0 6px 20px rgba(102, 126, 234, 0.6),
    inset 0 1px 0 rgba(255, 255, 255, 0.3);
}

/* ============================================================================
   DASHBOARD GRID SYSTEM (12-column from admin/sales)
   ============================================================================ */

.dashboard-container {
  width: 100%;
  max-width: 1800px;
  margin: 20px auto;
  padding: 0 20px 20px 20px;
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 20px;
}

@media (max-width: 1400px) {
  .dashboard-container {
    grid-template-columns: repeat(6, 1fr);
  }
}

@media (max-width: 768px) {
  .dashboard-container {
    grid-template-columns: 1fr;
    padding: 0 10px 10px 10px;
    gap: 15px;
  }
}

/* Grid Span Classes */
.full-width { grid-column: span 12; }
.half-width { grid-column: span 6; }
.third-width { grid-column: span 4; }
.two-thirds { grid-column: span 8; }
.quarter-width { grid-column: span 3; }
.three-quarters { grid-column: span 9; }

@media (max-width: 1400px) {
  .full-width, .two-thirds, .three-quarters { grid-column: span 6; }
  .half-width, .third-width, .quarter-width { grid-column: span 6; }
}

@media (max-width: 768px) {
  .full-width, .half-width, .third-width, .two-thirds, 
  .quarter-width, .three-quarters { 
    grid-column: span 1; 
  }
}

/* ============================================================================
   DASHBOARD PANEL (Customer glassmorphism aesthetic)
   ============================================================================ */

.dashboard-panel {
  background: linear-gradient(135deg, rgba(20, 25, 45, 0.75) 0%, rgba(30, 35, 60, 0.85) 100%);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border: 1px solid rgba(80, 140, 255, 0.4);
  border-radius: 20px;
  padding: 30px;
  box-shadow: 
    0 8px 32px rgba(0, 0, 0, 0.4),
    inset 0 1px 0 rgba(255, 255, 255, 0.1),
    0 0 40px rgba(80, 140, 255, 0.15);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  color: #e6ebff;
  position: relative;
  overflow: hidden;
}

.dashboard-panel::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, 
    transparent, 
    rgba(80, 140, 255, 0.5) 50%, 
    transparent);
}

.dashboard-panel:hover {
  transform: translateY(-4px);
  box-shadow: 
    0 16px 48px rgba(0, 0, 0, 0.5),
    inset 0 1px 0 rgba(255, 255, 255, 0.15),
    0 0 60px rgba(80, 140, 255, 0.3);
  border-color: rgba(80, 140, 255, 0.6);
}

/* Scrollbar Styling */
.dashboard-panel::-webkit-scrollbar {
  width: 6px;
}

.dashboard-panel::-webkit-scrollbar-track {
  background: rgba(80, 140, 255, 0.1);
  border-radius: 3px;
}

.dashboard-panel::-webkit-scrollbar-thumb {
  background: rgba(80, 140, 255, 0.3);
  border-radius: 3px;
}

.dashboard-panel::-webkit-scrollbar-thumb:hover {
  background: rgba(80, 140, 255, 0.5);
}

/* ============================================================================
   PANEL HEADERS & TITLES
   ============================================================================ */

.panel-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  padding-bottom: 15px;
  border-bottom: 2px solid rgba(80, 140, 255, 0.2);
}

.panel-title {
  font-size: 1.4em;
  font-weight: 600;
  color: #e6ebff;
  display: flex;
  align-items: center;
  gap: 10px;
}

.panel-icon {
  font-size: 1.8em;
}

/* ============================================================================
   BUTTONS (Customer style)
   ============================================================================ */

.btn {
  display: inline-block;
  padding: 12px 24px;
  border-radius: 8px;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.2s;
  border: none;
  cursor: pointer;
  font-size: 1em;
}

.btn-primary {
  background: linear-gradient(135deg, #508cff 0%, #667eea 100%);
  color: white;
  box-shadow: 
    0 4px 15px rgba(80, 140, 255, 0.4),
    inset 0 1px 0 rgba(255, 255, 255, 0.2);
  position: relative;
  overflow: hidden;
}

.btn-primary::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, 
    transparent, 
    rgba(255, 255, 255, 0.3), 
    transparent);
  transition: left 0.5s;
}

.btn-primary:hover::before {
  left: 100%;
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 
    0 8px 25px rgba(80, 140, 255, 0.6),
    inset 0 1px 0 rgba(255, 255, 255, 0.3);
}

.btn-secondary {
  background: rgba(80, 140, 255, 0.15);
  backdrop-filter: blur(10px);
  color: #508cff;
  border: 2px solid rgba(80, 140, 255, 0.5);
  box-shadow: 
    0 4px 15px rgba(80, 140, 255, 0.2),
    inset 0 1px 0 rgba(80, 140, 255, 0.1);
}

.btn-secondary:hover {
  background: rgba(80, 140, 255, 0.25);
  border-color: rgba(80, 140, 255, 0.7);
  box-shadow: 
    0 6px 20px rgba(80, 140, 255, 0.35),
    inset 0 1px 0 rgba(80, 140, 255, 0.2);
}

.btn-danger {
  background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
  color: white;
  box-shadow: 
    0 4px 15px rgba(239, 68, 68, 0.4),
    inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.btn-danger:hover {
  transform: translateY(-2px);
  box-shadow: 
    0 8px 25px rgba(239, 68, 68, 0.6),
    inset 0 1px 0 rgba(255, 255, 255, 0.3);
}

.btn-success {
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  color: white;
  box-shadow: 
    0 4px 15px rgba(16, 185, 129, 0.4),
    inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.btn-success:hover {
  transform: translateY(-2px);
  box-shadow: 
    0 8px 25px rgba(16, 185, 129, 0.6),
    inset 0 1px 0 rgba(255, 255, 255, 0.3);
}

/* ============================================================================
   INFO ROWS & DATA DISPLAY
   ============================================================================ */

.info-row {
  display: flex;
  justify-content: space-between;
  padding: 10px 0;
  border-bottom: 1px solid rgba(80, 140, 255, 0.1);
}

.info-label {
  color: rgba(230, 235, 255, 0.6);
  font-size: 0.95em;
}

.info-value {
  color: #e6ebff;
  font-weight: 500;
}

/* ============================================================================
   STATUS BADGES
   ============================================================================ */

.status-badge,
.project-status {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 12px;
  font-size: 0.85em;
  font-weight: 600;
  margin-top: 8px;
}

.status-pending { 
  background: rgba(255, 193, 7, 0.2); 
  color: #ffc107; 
}

.status-scheduled, .status-confirmed { 
  background: rgba(33, 150, 243, 0.2); 
  color: #2196f3; 
}

.status-in-progress { 
  background: rgba(156, 39, 176, 0.2); 
  color: #9c27b0; 
}

.status-completed { 
  background: rgba(76, 175, 80, 0.2); 
  color: #4caf50; 
}

.status-cancelled, .status-declined { 
  background: rgba(239, 68, 68, 0.2); 
  color: #ef4444; 
}

/* ============================================================================
   MEMBERSHIP BADGES (Customer tier system)
   ============================================================================ */

.membership-badge {
  display: inline-block;
  padding: 8px 16px;
  border-radius: 20px;
  font-size: 0.9em;
  font-weight: 600;
  margin-top: 10px;
}

.membership-free {
  background: rgba(80, 140, 255, 0.2);
  border: 2px solid rgba(80, 140, 255, 0.5);
  color: #508cff;
}

.membership-homecare {
  background: linear-gradient(135deg, rgba(240, 147, 251, 0.2), rgba(245, 87, 108, 0.2));
  border: 2px solid #f093fb;
  color: #f093fb;
}

/* ============================================================================
   CARDS (Projects, Events, etc.)
   ============================================================================ */

.card, .project-card, .event-card {
  background: rgba(30, 35, 60, 0.6);
  backdrop-filter: blur(15px);
  border: 1px solid rgba(80, 140, 255, 0.3);
  border-radius: 16px;
  padding: 20px;
  margin-bottom: 15px;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 
    0 4px 20px rgba(0, 0, 0, 0.3),
    inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.card:hover, .project-card:hover, .event-card:hover {
  border-color: rgba(80, 140, 255, 0.6);
  background: rgba(30, 35, 60, 0.8);
  transform: translateX(4px);
  box-shadow: 
    0 8px 30px rgba(80, 140, 255, 0.2),
    inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.card-header, .project-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}

/* ============================================================================
   EMPTY STATES
   ============================================================================ */

.empty-state {
  text-align: center;
  padding: 40px 20px;
  color: rgba(230, 235, 255, 0.6);
}

.empty-state-icon {
  font-size: 3em;
  margin-bottom: 15px;
  opacity: 0.5;
}

/* ============================================================================
   LOADING STATES
   ============================================================================ */

.loading {
  text-align: center;
  padding: 20px;
  color: rgba(230, 235, 255, 0.7);
  font-style: italic;
}

.loading::after {
  content: '...';
  animation: loading 1.5s infinite;
}

@keyframes loading {
  0%, 100% { opacity: 0; }
  50% { opacity: 1; }
}

/* ============================================================================
   UTILITY CLASSES
   ============================================================================ */

.text-center { text-align: center; }
.text-right { text-align: right; }
.text-left { text-align: left; }

.mt-0 { margin-top: 0; }
.mt-10 { margin-top: 10px; }
.mt-20 { margin-top: 20px; }
.mb-0 { margin-bottom: 0; }
.mb-10 { margin-bottom: 10px; }
.mb-20 { margin-bottom: 20px; }

.hidden { display: none; }
.visible { display: block; }
