/* ── rStack Shell Layout ── */

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

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  min-height: 100vh;
}

/* ── Header bar ── */

.rstack-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 16px;
  z-index: 9999;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.rstack-header[data-theme="light"] {
  background: rgba(255, 255, 255, 0.9);
  border-bottom: 1px solid rgba(0, 0, 0, 0.08);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
  color: #0f172a;
}

.rstack-header[data-theme="dark"] {
  background: rgba(15, 23, 42, 0.85);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  color: #e2e8f0;
}

.rstack-header__left {
  display: flex;
  align-items: center;
  gap: 4px;
}

.rstack-header__right {
  display: flex;
  align-items: center;
  gap: 12px;
}

.rstack-header__brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  font-size: 1.25rem;
  font-weight: 700;
  color: inherit;
}

.rstack-header__brand-gradient {
  background: linear-gradient(135deg, #14b8a6, #22d3ee);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* ── Main content area ── */

#app {
  padding-top: 56px; /* Below fixed header */
  min-height: 100vh;
}

/* When canvas module is active, make it fill the viewport */
#app.canvas-layout {
  padding-top: 56px;
  height: 100vh;
  overflow: hidden;
}

/* ── Standalone mode (no app/space switcher) ── */

.rstack-header--standalone .rstack-header__left {
  gap: 0;
}

/* ── Mobile adjustments ── */

@media (max-width: 640px) {
  .rstack-header {
    padding: 0 12px;
  }
}
