/* ============================================================
   Midnight Amethyst — UniFlow Shared Design Tokens & Styles
   All screens link here. Page-specific styles stay in <style> tags.
   ============================================================ */

:root {
  --color-background: #12111a;
  --color-surface: #1a1825;
  --color-on-surface: #f1eff5;
  --color-on-surface-variant: #d0cbe1;
  --color-primary: #d6c4ff;
  --color-secondary: #a3daff;
  --radius-md: 1rem;
  --radius-lg: 1.5rem;
  --font-family: "Plus Jakarta Sans", system-ui, sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font-family);
  background: var(--color-background);
  color: var(--color-on-surface);
  overflow-x: hidden;
}

/* Material Symbols default config */
.material-symbols-outlined {
  font-variation-settings: 'FILL' 0, 'wght' 400, 'GRAD' 0, 'opsz' 24;
}

/* Glass card effect */
.glass-card {
  background: rgba(26, 24, 37, 0.6);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(85, 79, 104, 0.2);
}

/* Atmospheric background glow */
.bg-glow {
  position: fixed;
  width: 600px;
  height: 600px;
  border-radius: 50%;
  filter: blur(120px);
  z-index: -1;
  opacity: 0.15;
}

/* Custom scrollbar */
.custom-scrollbar::-webkit-scrollbar {
  width: 4px;
}
.custom-scrollbar::-webkit-scrollbar-track {
  background: transparent;
}
.custom-scrollbar::-webkit-scrollbar-thumb {
  background: #35343e;
  border-radius: 10px;
}

/* Sidebar active state */
.sidebar-active {
  background: rgba(255, 255, 255, 0.05);
}

/* ============================================================
   Loading Spinner — shared across all pages
   ============================================================ */
@keyframes spin {
  to { transform: rotate(360deg); }
}

.loading-spinner {
  width: 48px;
  height: 48px;
  border: 3px solid rgba(207, 189, 248, 0.2);
  border-top-color: #cfbdf8;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

#loading-overlay {
  transition: opacity 0.3s ease;
}
#loading-overlay.fade-out {
  opacity: 0;
}

#page-content {
  opacity: 0;
  transition: opacity 0.4s ease;
}
#page-content.visible {
  opacity: 1;
}

/* Also support #dashboard-content (01.html) */
#dashboard-content {
  opacity: 0;
  transition: opacity 0.4s ease;
}
#dashboard-content.visible {
  opacity: 1;
}

/* ============================================================
   Gallery Hub (index.html) — kept for reference
   ============================================================ */
.gallery {
  max-width: 40rem;
  margin: 0 auto;
  padding: 2rem 1.5rem;
}

.gallery__lead {
  color: var(--color-on-surface-variant);
}

.gallery__nav {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-top: 1.5rem;
}

.gallery__nav a {
  padding: 1rem 1.25rem;
  background: var(--color-surface);
  border-radius: var(--radius-lg);
  color: var(--color-primary);
  text-decoration: none;
  font-weight: 600;
}

.gallery__nav a:hover {
  background: #272437;
}

code {
  font-size: 0.9em;
  color: var(--color-secondary);
}