/* 
   NOTION DESIGN SYSTEM (Zoir-TMA Variant)
   Philosophy: Warm minimalism, serif headings, soft surfaces, whisper borders.
*/

:root {
  /* 🎨 Color Palette (Premium Notion-Style) */
  --bg-color: #f3f2f1;           /* Neutral Light Gray */
  --text-primary: rgba(0,0,0,0.95); /* Notion Black */
  --text-secondary: #615d59;      /* Warm Gray 500 */
  --text-muted: #a39e98;         /* Warm Gray 300 */
  --card-bg: #ffffff;
  --primary: #0075de;            /* Notion Blue */
  --primary-rgb: 0, 117, 222;    /* Notion Blue (RGB for alpha use) */
  --primary-active: #005bab;     /* Darker Blue */
  
  /* Semantic Accents */
  --accent-teal: #2a9d99;
  --accent-green: #1aae39;
  --accent-orange: #dd5b00;
  --badge-blue-bg: #f2f9ff;
  --badge-blue-text: #097fe8;

  /* 📏 Whisper Borders & Structure */
  --whisper-border: 1px solid rgba(0,0,0,0.1);
  --md3-radius: 16px; 
  --subtle-radius: 4px; 
  
  /* ✨ Elevation (Notion Multi-layer) */
  --shadow-notion: rgba(0,0,0,0.04) 0px 4px 18px, 
                   rgba(0,0,0,0.027) 0px 2.025px 7.84688px, 
                   rgba(0,0,0,0.02) 0px 0.8px 2.925px, 
                   rgba(0,0,0,0.01) 0px 0.175px 1.04062px;
  
  /* 📐 Spacing (8px grid) */
  --spacing-xs: 4px;
  --spacing-sm: 8px;
  --spacing-md: 16px;
  --spacing-lg: 24px;
  --spacing-xl: 32px;
}

/* Base resets */
body {
  margin: 0;
  padding: 0;
  background-color: var(--bg-color);
  color: var(--text-primary);
  font-family: 'Inter', -apple-system, system-ui, sans-serif;
  letter-spacing: -0.01em;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  -webkit-user-select: none;
  user-select: none;
}

/* App Shell Layout */
#app-shell {
  display: flex;
  flex-direction: column;
  height: 100vh;
}


/* Module Container */
#module-container {
  flex: 1;
  padding: var(--spacing-md);
  overflow-y: auto;
  position: relative;
}

/* Cached module panes — instant show/hide */
.module-pane {
  animation: moduleIn 0.15s ease-out;
}

@keyframes moduleIn {
  from { opacity: 0.6; }
  to { opacity: 1; }
}

/* Navigation - Notion Style */
#bottom-nav {
  display: flex;
  justify-content: space-around;
  background-color: var(--card-bg);
  padding: 6px 0;
  border-top: var(--whisper-border);
  box-shadow: 0 -1px 4px rgba(0,0,0,0.02);
}

.nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  color: var(--text-primary);
  opacity: 0.6;
  cursor: pointer;
  padding: 8px 12px;
  border-radius: var(--subtle-radius);
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.nav-item.active {
  opacity: 1;
  color: var(--primary);
  background-color: var(--badge-blue-bg);
}

.nav-item span.icon {
  font-size: 24px;
  margin-bottom: 2px;
}

.nav-item span.label {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.01em;
}

/* Components & Utilities */

/* Notion Card */
.notion-card {
  background: var(--card-bg);
  border: var(--whisper-border);
  border-radius: var(--md3-radius);
  padding: var(--spacing-md);
  box-shadow: var(--shadow-notion);
  margin-bottom: var(--spacing-md);
}

/* Notion Buttons */
.btn-primary {
  background-color: var(--primary);
  color: #fff;
  border: none;
  padding: 10px 20px;
  border-radius: 8px;
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}
.btn-primary:active {
  transform: scale(0.97);
  background-color: var(--primary-active);
}

.btn-secondary {
  background-color: #fff;
  color: var(--text-primary);
  border: var(--whisper-border);
  padding: 10px 20px;
  border-radius: 8px;
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}
.btn-secondary:active {
  transform: scale(0.97);
  background-color: rgba(0,0,0,0.05);
  border: none;
  padding: 8px 16px;
  border-radius: var(--subtle-radius);
  font-weight: 500;
  font-size: 14px;
  cursor: pointer;
}

/* Pill Badges */
.pill-badge {
  display: inline-flex;
  padding: 2px 8px;
  border-radius: 9999px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.05em;
  background-color: var(--badge-blue-bg);
  color: var(--badge-blue-text);
}

/* Skeleton Loaders (Refined) */
.skeleton {
  background: linear-gradient(90deg, #f0f0f0 25%, #f7f7f7 50%, #f0f0f0 75%);
  background-size: 200% 100%;
  animation: loading 1.8s infinite ease-in-out;
  border-radius: var(--md3-radius);
}

@keyframes loading {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

.profile-badge {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background-color: var(--bg-color);
  border: var(--whisper-border);
}

.skeleton-wrapper {
  text-align: center;
  margin-top: 40px;
}

.skeleton-rect-large {
  height: 160px;
  width: 100%;
  margin-bottom: 24px;
}

.skeleton-rect-medium {
  height: 80px;
  width: 100%;
  border-radius: var(--md3-radius);
}
