/* --- Sidebar --------------------------------------------------------- */
.sidebar {
  width: 204px; background: var(--sidebar);
  border-right: 1px solid var(--border);
  display: flex; flex-direction: column; flex-shrink: 0;
  transition: transform .22s ease, margin .22s ease;
}
.sidebar .logo {
  padding: 0.85rem 1rem;
  display: flex; align-items: center; justify-content: flex-end;
  min-height: 52px;
  border-bottom: 1px solid var(--border);
}
.sidebar .nav-links {
  list-style: none; padding: 0.75rem 0.65rem; flex: 1;
}
.sidebar .nav-links li { margin-bottom: 3px; }
.sidebar .nav-links a {
  display: block; padding: 0.6rem 0.9rem;
  border-radius: var(--radius-sm);
  color: var(--text-secondary); font-size: 0.92rem; font-weight: 500;
  transition: background .12s, color .12s;
  position: relative;
}
.sidebar .nav-links a:hover {
  background: rgba(255, 255, 255, 0.04);
  color: var(--text); text-decoration: none;
}
.sidebar .nav-links a.active {
  background: var(--primary-dim); color: var(--primary);
}
.sidebar .nav-links a.active::before {
  content: ''; position: absolute; left: 0; top: 20%; bottom: 20%;
  width: 2px; border-radius: 2px; background: var(--primary);
}
.sidebar-footer {
  padding: 0.85rem 1rem; border-top: 1px solid var(--border);
  display: flex; align-items: center; justify-content: space-between;
  gap: 0.5rem;
}
.sidebar-footer a {
  color: var(--text-secondary); font-size: 0.85rem;
  padding: 0.4rem 0.6rem; border-radius: 6px;
  transition: background .12s, color .12s;
}
.sidebar-footer a:hover {
  color: var(--text); text-decoration: none;
  background: rgba(255, 255, 255, 0.04);
}
.sidebar-toggle-btn {
  background: none; border: none; color: var(--text-secondary);
  cursor: pointer; font-size: 1.15rem; padding: 6px 10px;
  border-radius: 6px; transition: background .12s, color .12s;
}
.sidebar-toggle-btn:hover { color: var(--text); background: rgba(255, 255, 255, 0.05); }
.sidebar-reopen {
  display: none; position: fixed; top: 50%; left: 0; z-index: 100;
  transform: translateY(-50%);
  background: var(--sidebar); border: 1px solid var(--border);
  border-left: none;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  padding: 12px 6px; color: var(--text-secondary); cursor: pointer;
  font-size: 0.85rem; box-shadow: var(--shadow-sm);
  transition: color .12s, background .12s, padding .12s;
  writing-mode: vertical-lr; letter-spacing: 0.05em;
}
.sidebar-reopen:hover { color: var(--text); background: var(--surface); padding-right: 10px; }

body.sidebar-collapsed .sidebar { transform: translateX(-100%); margin-left: -204px; }
body.sidebar-collapsed .sidebar-reopen { display: block; }
/* When the sidebar is collapsed the fixed reopen (▶) button sits in the
   top-left corner. Give the view enough headroom on the left so the h1
   and header actions don't run underneath it. */
body.sidebar-collapsed .view { padding-left: 4rem; }

.content {
  flex: 1; display: flex; flex-direction: column;
  overflow: hidden; min-width: 0;
}

/* --- Views ----------------------------------------------------------- */
.view {
  display: none; flex-direction: column; flex: 1;
  overflow-y: auto; padding: 1.75rem 2rem 2rem;
  min-height: 0;
  animation: fadeIn .18s ease-out;
}
.view.active { display: flex; }

/* The Google tab is a full-bleed iframe embed of the /google-cc sidecar --
   remove padding so the sidecar chrome takes the full viewport, and
   suppress the vertical scroll on this outer container (the iframe manages
   its own scroll). */
.view.view-google-iframe {
  padding: 0; overflow: hidden;
}
.view-header {
  display: flex; align-items: center; gap: 1rem;
  margin-bottom: 1.6rem; flex-wrap: wrap;
}
.view-header h1 {
  font-size: 1.6rem; font-weight: 600;
  letter-spacing: -0.02em; color: var(--text);
}
.header-actions {
  display: flex; gap: 0.45rem; margin-left: auto; flex-wrap: wrap;
}
