/* Sapplify HQ — Orbit aesthetic. Mirrors brand/company/brand-brief.md tokens. */

:root {
  /* Orbit palette */
  --bg:        #1a1613;
  --bg-elev:  #221c18;
  --fg:        #f5f1ea;
  --fg-muted: #b8aea0;
  --accent:    #d96846;
  --accent-soft: #e6e7a8;
  --border:    #3a302a;
  --error:     #ff8a80;

  /* Type */
  --font-display: 'Instrument Serif', Georgia, serif;
  --font-body:    -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-mono:    ui-monospace, 'SF Mono', Menlo, monospace;
}

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

html, body { height: 100%; }

body {
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font-body);
  font-size: 14px;
  line-height: 1.5;
}

button, input { font: inherit; color: inherit; }

[hidden] { display: none !important; }

#root, #shell-view, #shell-mount { height: 100%; }

/* ── Login + not-authorized views ──────────────────────────────────────── */

#login-view, #not-authorized-view, #loading-view {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 2rem;
}

#login-view h1, #not-authorized-view h1 {
  font-family: var(--font-display);
  font-style: italic;
  font-size: 3rem;
  color: var(--fg);
  margin-bottom: 2rem;
}

#login-form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  width: 100%;
  max-width: 320px;
}

#login-form label {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  font-size: 12px;
  color: var(--fg-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

#login-form input {
  padding: 0.75rem;
  border: 1px solid var(--border);
  background: var(--bg-elev);
  border-radius: 6px;
  font-size: 14px;
}

#login-form input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 2px rgba(217, 104, 70, 0.35);
}

#login-form button {
  padding: 0.75rem;
  background: var(--accent);
  border: none;
  border-radius: 6px;
  color: var(--bg);
  font-weight: 600;
  cursor: pointer;
}

#login-form button:hover { filter: brightness(1.08); }

#login-error {
  color: var(--error);
  font-size: 13px;
}

#not-authorized-view button {
  margin-top: 1rem;
  padding: 0.5rem 1rem;
  background: transparent;
  color: var(--accent);
  border: 1px solid var(--accent);
  border-radius: 6px;
  cursor: pointer;
}

/* ── Shell ──────────────────────────────────────────────────────────────── */

#shell-mount {
  display: grid;
  grid-template-columns: 240px 1fr;
}

.sidebar {
  background: var(--bg-elev);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
}

.sidebar-brand {
  padding: 1.5rem 1.25rem;
  font-family: var(--font-display);
  font-style: italic;
  font-size: 1.5rem;
  border-bottom: 1px solid var(--border);
}

.sidebar-nav {
  flex: 1;
  list-style: none;
  padding: 0.5rem 0;
  overflow-y: auto;
}

.sidebar-nav a {
  display: block;
  padding: 0.6rem 1.25rem;
  color: var(--fg-muted);
  text-decoration: none;
  font-size: 13px;
  border-left: 2px solid transparent;
}

.sidebar-nav a:hover { color: var(--fg); }

.sidebar-nav a.is-active {
  color: var(--accent);
  border-left-color: var(--accent);
  background: rgba(217, 104, 70, 0.06);
}

.sidebar-footer {
  padding: 1rem 1.25rem;
  border-top: 1px solid var(--border);
}

.sidebar-footer button {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--fg-muted);
  padding: 0.4rem 0.75rem;
  border-radius: 4px;
  cursor: pointer;
  font-size: 12px;
}

.sidebar-footer button:hover { color: var(--fg); border-color: var(--fg-muted); }

.content {
  padding: 2rem 2.5rem;
  overflow-y: auto;
}

.surface-stub h2 {
  font-family: var(--font-display);
  font-style: italic;
  font-size: 2rem;
  margin-bottom: 0.5rem;
}

.surface-stub p {
  color: var(--fg-muted);
}
