/* =========================================================
   PETTICORA — Canonical Planning Tool Sidebar  v2
   Single source of truth for all planning tool pages.
   ========================================================= */

:root { --sidebar-w: 240px; }

.sidebar {
  width: var(--sidebar-w) !important;
  flex-shrink: 0;
  background: #0f0d0a !important;
  border-right: 1px solid rgba(201,169,110,.12) !important;
  display: flex !important;
  flex-direction: column !important;
  height: 100vh;
  position: fixed !important;
  top: 0; left: 0;
  z-index: 50;
  overflow-y: auto;
  transform: none !important;
}

.sidebar-logo {
  padding: 26px 24px 18px !important;
  border-bottom: 1px solid rgba(201,169,110,.1);
  display: block !important;
}
.sidebar-logo a {
  font-family: "Cormorant Garamond", Georgia, serif !important;
  font-size: 22px !important;
  font-weight: 300 !important;
  color: #F5EDD8 !important;
  text-decoration: none !important;
  letter-spacing: .02em;
  display: block;
}
.sidebar-logo em { color: #C9A96E !important; font-style: normal !important; }
.sidebar-logo p {
  font-size: 10px !important;
  letter-spacing: .15em;
  text-transform: uppercase;
  color: rgba(245,237,216,.38) !important;
  margin-top: 4px;
}

.sidebar-nav { padding: 10px 0; flex: 1; }

.nav-group-label {
  padding: 14px 24px 5px !important;
  font-size: 9px !important;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: rgba(201,169,110,.38) !important;
  font-family: "Inter", sans-serif !important;
  font-weight: 400 !important;
}

.nav-item {
  display: flex !important;
  align-items: center;
  padding: 10px 24px !important;
  font-size: 13px !important;
  font-family: "Inter", sans-serif !important;
  font-weight: 400 !important;
  color: rgba(245,237,216,.52) !important;
  text-decoration: none !important;
  transition: color .15s, background .15s;
  border-left: 2px solid transparent !important;
  border-radius: 0 !important;
  white-space: nowrap;
  background: transparent !important;
  line-height: 1.4;
}
.nav-item:hover {
  color: #F5EDD8 !important;
  background: rgba(201,169,110,.06) !important;
}
.nav-item.active {
  color: #C9A96E !important;
  background: rgba(201,169,110,.08) !important;
  border-left-color: #C9A96E !important;
  font-weight: 500 !important;
}

/* De-emphasised tools (e.g. experimental AI chat) — still reachable, not primary IA */
.nav-group-label.nav-group-muted {
  padding-top: 18px !important;
  color: rgba(201,169,110,.22) !important;
}
.nav-item.nav-deemphasized {
  opacity: 0.42 !important;
  font-size: 12px !important;
  padding: 8px 24px !important;
  color: rgba(245,237,216,.38) !important;
}
.nav-item.nav-deemphasized:hover {
  opacity: 0.75 !important;
  color: rgba(245,237,216,.65) !important;
}
.nav-item.nav-deemphasized.active {
  opacity: 0.9 !important;
  font-weight: 500 !important;
}

.sidebar-footer {
  padding: 16px 24px !important;
  border-top: 1px solid rgba(201,169,110,.1);
  margin-top: auto;
}
.sidebar-user {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
}
.user-avatar {
  width: 30px; height: 30px;
  border-radius: 50% !important;
  background: rgba(201,169,110,.1) !important;
  border: 1px solid rgba(201,169,110,.2);
  display: flex; align-items: center; justify-content: center;
  font-family: "Cormorant Garamond", serif;
  font-size: 14px; color: #C9A96E;
  flex-shrink: 0;
}
.user-name {
  font-size: 12px !important;
  color: rgba(245,237,216,.8) !important;
  font-weight: 500;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.user-plan { font-size: 10px !important; color: rgba(245,237,216,.35) !important; }

.signout-btn {
  width: 100%;
  background: transparent !important;
  border: 1px solid rgba(201,169,110,.18) !important;
  color: rgba(245,237,216,.45) !important;
  font-family: "Inter", sans-serif;
  font-size: 11px; letter-spacing: .1em; text-transform: uppercase;
  padding: 8px; cursor: pointer;
  transition: all .2s; border-radius: 2px !important;
}
.signout-btn:hover {
  border-color: rgba(201,169,110,.5) !important;
  color: #F5EDD8 !important;
}

/* Optional logo image + wordmark (planner pages) */
.sidebar-logo-mark {
  display: flex;
  align-items: center;
  gap: 10px;
}
.sidebar-logo-img {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  object-fit: cover;
  flex-shrink: 0;
}

/* Dashboard legacy class — same look as .user-avatar */
.sidebar-avatar {
  width: 30px;
  height: 30px;
  border-radius: 50% !important;
  background: rgba(201,169,110,.1) !important;
  border: 1px solid rgba(201,169,110,.2);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: "Cormorant Garamond", serif;
  font-size: 14px;
  color: #C9A96E;
  flex-shrink: 0;
}

/* Main content area */
.main { margin-left: var(--sidebar-w) !important; flex: 1; min-height: 100vh; }

.planner-shell {
  display: flex;
  min-height: 100vh;
}

/* Mobile menu (all planner pages using .sidebar) */
.mob-toggle {
  display: none;
  position: fixed;
  top: 1rem;
  left: 1rem;
  z-index: 200;
  background: #1A140E;
  border: 1px solid rgba(201,169,110,.12);
  color: #F5EDD8;
  padding: 0.5rem 0.7rem;
  cursor: pointer;
  border-radius: 2px;
  align-items: center;
  justify-content: center;
}

@media (max-width: 860px) {
  .mob-toggle { display: flex; }
  .sidebar { display: none !important; }
  .sidebar.open {
    display: flex !important;
    z-index: 150;
    box-shadow: 4px 0 24px rgba(0, 0, 0, 0.45);
  }
  .main { margin-left: 0 !important; }
}
