/* layout.css — app frame, sidebar, content shell, welcome screen */

/* ---- Welcome ---- */
.welcome {
  position: fixed;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 24px;
  background:
    radial-gradient(80% 60% at 50% 0%, var(--bg-raised), transparent),
    var(--bg);
}
.welcome[hidden] { display: none; }
.welcome-card {
  width: min(440px, 100%);
  text-align: center;
  background: var(--bg-raised);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: 40px 32px;
  box-shadow: var(--shadow);
}
.welcome-card h1 {
  margin: 0 0 6px;
  font-size: 30px;
  letter-spacing: -.02em;
}
.welcome-card p { margin: 6px 0; }
.welcome-card .btn { margin-top: 18px; }
.welcome-status { min-height: 1.2em; font-size: 13px; }
.welcome-hint { margin-top: 22px; font-size: 12.5px; line-height: 1.5; }

/* ---- App frame ---- */
.app {
  display: grid;
  grid-template-columns: var(--sidebar-w) 1fr;
  height: 100vh;
  width: 100vw;
}
.app[hidden] { display: none; }

/* ---- Sidebar ---- */
.sidebar {
  display: flex;
  flex-direction: column;
  min-height: 0;
  background: var(--bg-sunken);
  border-right: 1px solid var(--line);
}
.sidebar-head {
  padding: 14px 14px 8px;
  border-bottom: 1px solid var(--line-soft);
}
.brand {
  font-weight: 700;
  font-size: 13px;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: var(--ink-faint);
  margin-bottom: 10px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.sidebar-body {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding: 8px 6px 24px;
}
.sidebar-foot {
  padding: 8px 14px;
  border-top: 1px solid var(--line-soft);
  font-size: 12px;
  color: var(--ink-faint);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ---- Content ---- */
.content {
  min-width: 0;
  min-height: 0;
  overflow-y: auto;
  position: relative;
}
.content-inner {
  max-width: 820px;
  margin: 0 auto;
  padding: 40px 48px 120px;
}
.content.graph-mode .content-inner {
  max-width: none;
  padding: 0;
  height: 100%;
}
.empty-state {
  display: grid;
  place-items: center;
  min-height: 60vh;
  text-align: center;
}

@media (max-width: 720px) {
  .app { grid-template-columns: 1fr; }
  .sidebar { display: none; }
  .content-inner { padding: 24px 18px 100px; }
}
