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

:root {
  --primary: #2d5f8d;
  --secondary: #8b4789;
  --accent: #d68b3d;
  --success: #4a7c59;
  --bg-main: #f5f3ed;
  --bg-card: #fff;
  --bg-sidebar: #e8e5dc;
  --border: #c5c1b3;
  --text-primary: #2c2c2c;
  --text-secondary: #5a5a5a;
  --text-muted: #8a8a8a;
}

body {
  font-family: "Courier New", monospace;
  background: var(--bg-main);
  color: var(--text-primary);
  line-height: 1.6;
}

.site-container {
  display: flex;
  min-height: 100vh;
}

.sidebar {
  width: 240px;
  background: var(--bg-sidebar);
  border-right: 3px solid var(--border);
  padding: 1.5rem 0;
  position: fixed;
  height: 100vh;
  overflow: hidden;
}

.sidebar.collapsed {
  width: 70px;
}

.sidebar-header {
  padding: 0 1.5rem;
  margin-bottom: 2rem;
  display: flex;
  align-items: center;
  gap: 1rem;
}

.mascot-icon {
  width: 40px;
  height: 40px;
  background: var(--primary);
  border: 2px solid var(--text-primary);
  border-radius: 50%;
}

.nav-item {
  position: relative;
}

.nav-link {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.875rem 1.5rem;
  color: var(--text-primary);
  text-decoration: none;
  border-left: 3px solid transparent;
}

.nav-link:hover {
  background: rgba(45, 95, 141, 0.1);
  border-left-color: var(--primary);
}

.nav-link.active {
  font-weight: 700;
  border-left-color: var(--primary);
  background: rgba(45, 95, 141, 0.15);
}


.nav-icon {
  width: 24px;
  min-width: 24px;
  text-align: center;
  font-weight: 700;
  color: var(--primary);
}

.tooltip {
  position: absolute;
  left: 70px;
  top: 50%;
  transform: translateY(-50%);
  background: var(--text-primary);
  color: var(--bg-main);
  padding: 0.35rem 0.6rem;
  border-radius: 4px;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.15s ease;
  z-index: 1000;
}

.sidebar:not(.collapsed) .tooltip {
  display: none;
}

.sidebar.collapsed .nav-item:hover .tooltip {
  opacity: 1;
}

.sidebar.collapsed .site-title,
.sidebar.collapsed .nav-label {
  display: none;
}

.main-content {
  margin-left: 240px;
  flex: 1;
  padding: 2rem;
}

.sidebar.collapsed ~ .main-content {
  margin-left: 70px;
}

.page-header {
  margin-bottom: 2rem;
  padding-bottom: 1rem;
  border-bottom: 3px solid var(--border);
}

.page-title {
  font-size: 2.5rem;
}

.dashboard-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1.5rem;
  margin-bottom: 2rem;
}

.dashboard-card,
.recent-posts {
  background: var(--bg-card);
  border: 3px solid var(--border);
  padding: 1.5rem;
  text-decoration: none;
  color: inherit;
}

.card-icon {
  width: 48px;
  height: 48px;
  background: var(--primary);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1rem;
}

.post-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.post-item {
  padding: 1rem;
  border-left: 3px solid var(--border);
  text-decoration: none;
  color: inherit;
}

.post-meta {
  display: flex;
  gap: 0.5rem;
  color: var(--text-muted);
  font-size: 0.85rem;
}

.post-category {
  color: var(--secondary);
  font-weight: 700;
  text-transform: uppercase;
}


.toggle-btn {
  position: absolute;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  background: var(--primary);
  color: #fff;
  border: 2px solid var(--text-primary);
  width: 36px;
  height: 36px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  box-shadow: 2px 2px 0 rgba(0, 0, 0, 0.2);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.toggle-btn:hover {
  transform: translateX(-50%) scale(1.08);
  box-shadow: 4px 4px 0 rgba(0, 0, 0, 0.2);
}

.mobile-menu-btn {
  position: fixed;
  top: 1rem;
  left: 1rem;
  z-index: 200;
  background: var(--primary);
  color: #fff;
  border: 2px solid var(--text-primary);
  width: 56px;
  height: 56px;
  border-radius: 12px;
  cursor: pointer;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  font-weight: 700;
  box-shadow: 4px 4px 0 rgba(0, 0, 0, 0.25);
  transition: opacity 0.3s ease, transform 0.2s ease;
}

.mobile-menu-btn:active {
  transform: scale(0.95);
}

.mobile-menu-btn.hidden {
  opacity: 0;
  pointer-events: none;
}

.theme-toggle {
  position: fixed;
  right: 2rem;
  bottom: 2rem;
}

.mobile-menu-btn,
.sidebar-overlay {
  display: none;
}

@media (max-width: 768px) {
  .mobile-menu-btn {
    display: flex;
    position: fixed;
    top: 1rem;
    left: 1rem;
    z-index: 200;
  }

  .sidebar {
    transform: translateX(-100%);
  }

  .sidebar.mobile-open {
    transform: translateX(0);
  }

  .sidebar-overlay.active {
    display: block;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
  }

  .main-content,
  .sidebar.collapsed ~ .main-content {
    margin-left: 0;
    padding: 4rem 1rem 2rem;
  }

  .dashboard-grid {
    grid-template-columns: 1fr;
  }

  .toggle-btn {
    display: none;
  }
}
