/* Design Tokens - ReLAX Platform Aesthetic */
:root {
  /* Brand Colors from Platform */
  --brand-pink: #F22A95;
  --brand-purple: #7421D6;
  --brand-gradient: linear-gradient(135deg, var(--brand-pink) 0%, var(--brand-purple) 100%);
  
  /* Layout Dimensions */
  --sidebar-width: 260px;
  --header-height: 70px;
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-pill: 100px;
  --content-max-width: 900px;

  /* Transitions */
  --transition-fast: 0.2s ease;
}

/* Light Mode */
[data-theme="light"] {
  --bg-base: #F8F9FA;
  --bg-sidebar: #FFFFFF;
  --bg-sidebar-hover: #F3F4F6;
  --bg-card: #FFFFFF;
  
  --text-primary: #1F2937;
  --text-secondary: #4B5563;
  --text-muted: #9CA3AF;
  
  --border-subtle: #E5E7EB;
  --border-strong: #D1D5DB;
  
  --icon-color: #6B7280;
  
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.05), 0 1px 2px rgba(0,0,0,0.03);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.03);
  
  /* Platform Active State */
  --sidebar-active-bg: rgba(242, 42, 149, 0.08);
  --sidebar-active-text: var(--brand-pink);
}

/* Dark Mode */
[data-theme="dark"] {
  --bg-base: #111827;
  --bg-sidebar: #1F2937;
  --bg-sidebar-hover: #374151;
  --bg-card: #1F2937;
  
  --text-primary: #F9FAFB;
  --text-secondary: #D1D5DB;
  --text-muted: #9CA3AF;
  
  --border-subtle: #374151;
  --border-strong: #4B5563;
  
  --icon-color: #9CA3AF;
  
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.3), 0 1px 2px rgba(0,0,0,0.2);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.3), 0 2px 4px -1px rgba(0, 0, 0, 0.2);
  
  --sidebar-active-bg: rgba(242, 42, 149, 0.15);
  --sidebar-active-text: var(--brand-pink);
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: var(--header-height);
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
  background-color: var(--bg-base);
  color: var(--text-primary);
  line-height: 1.6;
  overflow-x: hidden;
  transition: background-color var(--transition-fast), color var(--transition-fast);
}

/* Typography */
h1, h2, h3, h4 { font-weight: 700; line-height: 1.25; margin-bottom: 0.75rem; color: var(--text-primary); letter-spacing: -0.01em; }
h1 { font-size: 2.25rem; margin-bottom: 1rem; }
h2 { font-size: 1.5rem; margin-top: 3.5rem; margin-bottom: 1.5rem; padding-bottom: 0.5rem; border-bottom: 1px solid var(--border-subtle); }
h3 { font-size: 1.15rem; margin-top: 2rem; margin-bottom: 1rem; }
p { margin-bottom: 1rem; color: var(--text-secondary); font-size: 1rem; }

strong { font-weight: 600; color: inherit; }

/* SVG Icons Default Style */
svg {
  width: 1.25rem;
  height: 1.25rem;
  fill: none;
  stroke: var(--icon-color);
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: stroke var(--transition-fast);
}

/* Layout */
.app-container { display: flex; min-height: 100vh; }

/* Sidebar */
.sidebar {
  width: var(--sidebar-width);
  background: var(--bg-sidebar);
  border-right: 1px solid var(--border-subtle);
  position: fixed;
  height: 100vh;
  overflow-y: auto;
  z-index: 100;
  display: flex;
  flex-direction: column;
}

.sidebar-header {
  padding: 16px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  background: var(--bg-sidebar);
  z-index: 10;
}

/* Adjusted Logo Size based on platform screenshot */
.brand-logo-img {
  width: 130px;
  height: auto;
  object-fit: contain;
  display: block;
}

.theme-toggle {
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 6px;
  border-radius: var(--radius-sm);
  display: flex; align-items: center; justify-content: center;
  transition: background var(--transition-fast);
}
.theme-toggle:hover { background: var(--bg-sidebar-hover); }
.theme-toggle svg { stroke: var(--text-primary); }

.sidebar-nav { padding: 10px 0 24px 0; flex: 1; }
.nav-group { margin-bottom: 20px; }
.nav-group-title {
  padding: 0 24px;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--brand-pink);
  margin-bottom: 8px;
}

/* Nav Links reflecting platform style */
.nav-link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 24px;
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 500;
  transition: all var(--transition-fast);
  margin-right: 16px; /* Space for the pill shape */
  border-radius: 0 var(--radius-pill) var(--radius-pill) 0;
}

.nav-link svg {
  width: 1.1rem;
  height: 1.1rem;
  stroke: var(--icon-color);
}

.nav-link:hover { 
  background: var(--bg-sidebar-hover); 
  color: var(--text-primary); 
}
.nav-link:hover svg { stroke: var(--text-primary); }

.nav-link.active {
  color: var(--sidebar-active-text);
  background-color: var(--sidebar-active-bg);
}
.nav-link.active svg {
  stroke: var(--sidebar-active-text);
}

/* Main Content */
.main-content {
  flex: 1;
  margin-left: var(--sidebar-width);
  padding: 40px 60px 80px;
  max-width: calc(var(--content-max-width) + var(--sidebar-width));
  margin: 0 auto 0 var(--sidebar-width);
}

/* Cards */
.lax-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 32px;
  margin-bottom: 24px;
  box-shadow: var(--shadow-sm);
}

/* Feature Grid */
.feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 20px;
  margin-top: 20px;
  margin-bottom: 24px;
}

.feature-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 24px;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
}

.feature-icon {
  margin-bottom: 16px;
  display: flex;
  align-items: center;
}
.feature-icon svg { width: 1.5rem; height: 1.5rem; }

.feature-title { font-weight: 600; font-size: 1rem; margin-bottom: 6px; color: var(--text-primary); }
.feature-desc { font-size: 0.9rem; color: var(--text-secondary); line-height: 1.5; margin: 0; }

/* Alerts */
.alert {
  padding: 16px;
  border-radius: var(--radius-md);
  margin-bottom: 20px;
  display: flex;
  gap: 12px;
  align-items: flex-start;
  font-size: 0.95rem;
  background: var(--bg-base);
  border: 1px solid var(--border-subtle);
}

.alert-icon { display: flex; align-items: center; margin-top: 2px; }
.alert-icon svg { stroke: var(--brand-pink); width: 1.2rem; height: 1.2rem; }

/* Data Tables */
.data-table-wrapper {
  overflow-x: auto;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  margin-bottom: 24px;
  box-shadow: var(--shadow-sm);
  background: var(--bg-card);
}

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

.data-table th, .data-table td {
  padding: 14px 20px;
  text-align: left;
  border-bottom: 1px solid var(--border-subtle);
  font-size: 0.9rem;
}

.data-table th {
  background: var(--bg-base);
  font-weight: 600;
  color: var(--text-secondary);
}

.data-table tr:hover td { background: var(--bg-base); }
.data-table tr:last-child td { border-bottom: none; }

/* Status Pills */
.status-pill {
  display: inline-flex;
  padding: 4px 10px;
  border-radius: var(--radius-pill);
  font-size: 0.75rem;
  font-weight: 600;
  background: var(--bg-base);
  color: var(--text-primary);
  border: 1px solid var(--border-strong);
}

/* Lists */
.step-list {
  list-style: none;
  counter-reset: steps;
}

.step-item {
  position: relative;
  padding-left: 48px;
  margin-bottom: 24px;
}

.step-item::before {
  counter-increment: steps;
  content: counter(steps);
  position: absolute;
  left: 0;
  top: 0;
  width: 28px;
  height: 28px;
  background: var(--bg-base);
  color: var(--text-secondary);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.9rem;
  font-weight: 600;
  border: 1px solid var(--border-strong);
}

.step-title {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 4px;
  color: var(--text-primary);
}
.step-desc { font-size: 0.95rem; color: var(--text-secondary); }

/* Code blocks inline */
code {
  background: var(--bg-base);
  color: var(--brand-pink);
  padding: 2px 6px;
  border-radius: 4px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  font-size: 0.85em;
  border: 1px solid var(--border-subtle);
}

/* Mobile */
.mobile-header {
  display: none;
  position: fixed;
  top: 0; left: 0; right: 0;
  height: var(--header-height);
  background: var(--bg-sidebar);
  border-bottom: 1px solid var(--border-subtle);
  z-index: 90;
  align-items: center;
  justify-content: space-between;
  padding: 0 20px;
}

.menu-toggle {
  background: none; border: none; padding: 4px; cursor: pointer; display: flex; align-items: center;
}
.menu-toggle svg { stroke: var(--text-primary); }

@media (max-width: 900px) {
  .sidebar { transform: translateX(-100%); transition: transform var(--transition-fast); }
  .sidebar.open { transform: translateX(0); }
  .main-content { margin-left: 0; padding: 100px 24px 40px; max-width: 100%; }
  .mobile-header { display: flex; }
  h1 { font-size: 2rem; }
}

/* Scrollbar Styles */
::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}

::-webkit-scrollbar-track {
  background: var(--bg-sidebar-hover);
  border-radius: 8px;
}

::-webkit-scrollbar-thumb {
  background: var(--brand-pink);
  border-radius: 8px;
  border: 2px solid var(--bg-sidebar-hover);
}

::-webkit-scrollbar-thumb:hover {
  background: var(--brand-purple);
}
