/* src/styles/global.css */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --color-primary: #1c2b4a;
  --color-sidebar: #172238;
  --color-accent: #4a9eda;
  --color-accent-mid: #3a5fa8;
  --color-light-bg: #e8f0fb;
  --color-border: #c5d5ee;
  --color-sidebar-text: #8ab4d4;
  --color-body-bg: #f4f6fb;
  --color-card-bg: #ffffff;
  --color-text: #111111;
  --color-text-muted: #888888;
  --color-linked-milestone: #1c2b4a;

  --font-sans: system-ui, -apple-system, sans-serif;
  --sidebar-width: 210px;
  --header-padding: 0.9rem 1.5rem 0.75rem;
}

html, body {
  font-family: var(--font-sans);
  background: var(--color-body-bg);
  color: var(--color-text);
  line-height: 1.5;
}

a {
  color: inherit;
  text-decoration: none;
}

/* Site layout shell */
.site-header {
  background: var(--color-primary);
  padding: var(--header-padding);
}

.site-header__meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.35rem;
}

.site-header__cohort-id {
  color: rgba(255, 255, 255, 0.4);
  font-size: 0.62rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.site-header__uiuc {
  color: rgba(255, 255, 255, 0.3);
  font-size: 0.62rem;
}

.site-header__title {
  color: #fff;
  font-size: 1.35rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.2;
  margin-bottom: 0.25rem;
}

.site-header__instructor {
  color: var(--color-sidebar-text);
  font-size: 0.75rem;
}

.site-body {
  display: flex;
  min-height: calc(100vh - 100px);
}

/* Sidebar */
.sidebar {
  background: var(--color-sidebar);
  width: var(--sidebar-width);
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  padding: 0.5rem 0;
}

.sidebar__nav-item {
  color: var(--color-sidebar-text);
  font-size: 0.75rem;
  padding: 0.5rem 1rem;
  display: flex;
  align-items: center;
  gap: 0.4rem;
  cursor: pointer;
  text-decoration: none;
}

.sidebar__nav-item:hover {
  color: #fff;
}

.sidebar__nav-item.active {
  color: #fff;
  font-weight: 600;
  background: var(--color-primary);
  border-right: 2px solid var(--color-accent);
}

.sidebar__nav-item--locked {
  opacity: 0.6;
  cursor: default;
  pointer-events: none;
}

.sidebar__divider {
  border: none;
  border-top: 1px solid #2a3f5f;
  margin: 0.5rem 0.75rem;
}

/* Widget shared */
.sidebar__widget {
  padding: 0.75rem 1rem;
  flex: 1;
}

.widget-label {
  color: var(--color-accent);
  font-size: 0.58rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 0.4rem;
}

/* Phase widget */
.widget-phase__name {
  color: #fff;
  font-size: 0.8rem;
  font-weight: 700;
  margin-bottom: 0.1rem;
}

.widget-phase__sub {
  color: var(--color-sidebar-text);
  font-size: 0.62rem;
  margin-bottom: 0.6rem;
}

.widget-phase__milestones {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}

.widget-phase__milestone {
  display: flex;
  align-items: flex-start;
  gap: 0.4rem;
  font-size: 0.62rem;
  color: #fff;
  line-height: 1.35;
}

.widget-phase__milestone-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--color-accent);
  flex-shrink: 0;
  margin-top: 0.4rem;
}

/* Session widget */
.widget-session__week {
  color: #fff;
  font-size: 0.8rem;
  font-weight: 700;
  line-height: 1.3;
  margin-bottom: 0.1rem;
}

.widget-session__topic {
  color: var(--color-sidebar-text);
  font-size: 0.65rem;
  margin-bottom: 0.45rem;
  line-height: 1.4;
}

.widget-session__time {
  color: var(--color-sidebar-text);
  font-size: 0.62rem;
  margin-bottom: 0.5rem;
  line-height: 1.5;
}

.widget-session__zoom {
  display: inline-block;
  background: var(--color-primary);
  color: var(--color-accent);
  font-size: 0.6rem;
  padding: 0.28rem 0.65rem;
  border-radius: 4px;
  border: 1px solid #2e4a6e;
  text-decoration: none;
}

/* Main content area */
.main {
  flex: 1;
  padding: 1.5rem;
  min-width: 0;
}

/* Cards */
.card {
  background: var(--color-card-bg);
  border: 1px solid var(--color-border);
  border-radius: 8px;
  padding: 0.85rem 1rem;
  margin-bottom: 0.75rem;
}

/* Section label */
.section-label {
  color: var(--color-accent-mid);
  font-size: 0.58rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 0.5rem;
  margin-top: 1.25rem;
}

.section-label:first-child {
  margin-top: 0;
}

/* Badges */
.badge {
  display: inline-block;
  font-size: 0.48rem;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 10px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.badge--you-are-here {
  background: var(--color-accent);
  color: #fff;
}

.badge--up591 {
  background: var(--color-primary);
  color: #fff;
}

.badge--event {
  background: #e8f5ee;
  color: #1a5c3a;
}

.badge--action {
  background: #fff3e0;
  color: #b06000;
}

.badge--info {
  background: var(--color-light-bg);
  color: var(--color-accent-mid);
}

/* Mobile */
@media (max-width: 640px) {
  .site-body {
    flex-direction: column;
  }

  .sidebar {
    width: 100%;
    flex-direction: row;
    flex-wrap: wrap;
    padding: 0;
  }

  .sidebar__nav-item {
    padding: 0.6rem 0.85rem;
  }

  .sidebar__widget {
    display: none;
  }
}
