/* CycleForge Two — shared portal framework (all pages) */
:root {
  --bg: #0B0F14;
  --surface: #111722;
  --surface2: #0D131F;
  --border: #1F2A37;
  --text: #E5E7EB;
  --muted: #64748b;
  --muted2: #94a3b8;
  --accent: #34d399;
  --accent-blue: #2c8cff;
  --accent-blue-dim: rgba(44, 140, 255, 0.15);
  --accent-dim: rgba(52, 211, 153, 0.12);

  --sidebar-w: 220px;
  --page-header-h: 56px;
  --content-max-w: 1280px;
  --page-pad-x: 28px;
  --page-pad-y: 24px;

  --font-body: 14px;
  --font-sm: 12px;
  --font-xs: 11px;
  --font-title: 22px;
  --font-brand: 17px;
  --radius: 8px;
  --radius-lg: 12px;

  --topbar-h: 48px;
  --title-band-h: 52px;
  --desk-gap: 8px;
}

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

html { height: 100%; }

body.cf2-body {
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: var(--font-body);
  line-height: 1.5;
  background: var(--bg);
  color: var(--text);
  min-height: 100%;
  -webkit-font-smoothing: antialiased;
}

/* ── Layout ───────────────────────────────────────────── */
.cf2-layout {
  display: flex;
  min-height: 100vh;
}

/* ── Sidebar ─────────────────────────────────────────── */
.cf2-sidebar {
  width: var(--sidebar-w);
  flex-shrink: 0;
  background: var(--surface2);
  border-right: 1px solid var(--border);
  padding: 16px 10px;
  display: flex;
  flex-direction: column;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
}

.cf2-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 4px 8px 18px;
  margin-bottom: 12px;
  border-bottom: 1px solid var(--border);
}

.cf2-brand-icon {
  width: 36px;
  height: 36px;
  flex-shrink: 0;
  background: var(--accent-blue);
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  color: #fff;
}

.cf2-brand-title {
  font-weight: 700;
  font-size: var(--font-brand);
  letter-spacing: -0.02em;
  line-height: 1.2;
}

.cf2-brand-sub {
  font-size: var(--font-xs);
  color: var(--muted);
  margin-top: 2px;
}

.cf2-nav {
  list-style: none;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.cf2-nav a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 12px;
  border-radius: var(--radius);
  color: var(--muted2);
  text-decoration: none;
  font-size: 13px;
  font-weight: 500;
  border-left: 3px solid transparent;
  transition: background 0.12s ease, color 0.12s ease;
}

.cf2-nav a:hover {
  background: var(--surface);
  color: var(--text);
}

.cf2-nav a.active {
  background: var(--surface);
  color: var(--text);
  border-left-color: var(--accent);
  padding-left: 9px;
}

.cf2-nav-icon {
  width: 18px;
  flex-shrink: 0;
  text-align: center;
  font-size: 13px;
  opacity: 0.9;
}

.cf2-sidebar-foot {
  font-size: var(--font-xs);
  color: var(--muted);
  padding: 12px 8px 4px;
  border-top: 1px solid var(--border);
  margin-top: auto;
}

/* ── Main column ─────────────────────────────────────── */
.cf2-main {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
  background: var(--bg);
}

.cf2-page-header {
  flex-shrink: 0;
  height: var(--page-header-h);
  display: flex;
  align-items: center;
  padding: 0 var(--page-pad-x);
  border-bottom: 1px solid var(--border);
  background: var(--bg);
}

.cf2-page-title {
  font-size: var(--font-title);
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.2;
  color: var(--text);
}

/* Desk mode: asset report fills viewport beside sidebar */
.cf2-main--desk .cf2-page-header { display: none; }

.cf2-sidebar-foot .cf2-logout {
  margin-top: 10px;
  width: 100%;
  padding: 6px 8px;
  font-size: 11px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: transparent;
  color: var(--muted2);
  cursor: pointer;
}
.cf2-sidebar-foot .cf2-logout:hover {
  color: var(--text);
  border-color: #37526a;
}

html.cf2-auth-pending .cf2-main { opacity: 0.55; pointer-events: none; }
html.cf2-auth-pending .cf2-sidebar { opacity: 0.85; }

.cf2-page-body {
  flex: 1;
  padding: var(--page-pad-y) var(--page-pad-x);
  max-width: calc(var(--content-max-w) + var(--page-pad-x) * 2);
}

/* ── Future content hooks (Phase 1+) ─────────────────── */
.cf2-section {
  margin-bottom: 24px;
}

.cf2-section-label {
  font-size: var(--font-sm);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--muted);
  margin-bottom: 10px;
}

.cf2-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 16px 20px;
}

.cf2-grid {
  display: grid;
  gap: 16px;
}

.cf2-grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.cf2-grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }

@media (max-width: 900px) {
  .cf2-layout { flex-direction: column; }
  .cf2-sidebar {
    width: 100%;
    height: auto;
    position: relative;
  }
  .cf2-nav { flex-direction: row; flex-wrap: wrap; }
}
