/* shell.css — THEON admin app frame. Tokens only (AESTHETIC §8 #8). */
.app { display: grid; grid-template-rows: 48px 1fr; height: 100vh; width: 100vw; overflow: hidden; }

.topbar {
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 var(--sp-4); border-bottom: 1px solid var(--rule); background: var(--bg-deep);
}
.brand { font-family: var(--display); font-size: 18px; letter-spacing: 0.18em; text-transform: uppercase; color: var(--ink); }
.brand .dot { color: var(--accent); }
.topbar-right { display: flex; align-items: center; gap: var(--sp-3); }

/* Slice 8 (d): undo/redo glyph buttons — discoverable mirror of ⌘Z / ⌘⇧Z.
   Charter §4.1: warm-black surface, chartreuse on hover, 1px radius, glyph-only. */
.history-controls { display: flex; align-items: center; gap: 4px; }
.chrome-btn {
  display: inline-flex; align-items: center; justify-content: center;
  width: 26px; height: 26px; padding: 0;
  background: var(--surface); border: 1px solid var(--rule); border-radius: 1px;
  color: var(--ink-dim); cursor: pointer;
  transition: border-color 120ms cubic-bezier(.2,.7,.2,1), color 120ms cubic-bezier(.2,.7,.2,1);
}
.chrome-btn svg { width: 14px; height: 14px; display: block; }
.chrome-btn:hover { border-color: var(--accent); color: var(--accent); }
.chrome-btn:active { color: var(--accent); border-color: var(--accent); }
.chrome-btn:focus-visible { outline: none; border-color: var(--accent); color: var(--accent); }

.ws-status {
  font-family: var(--mono); font-size: 8px; letter-spacing: 0.18em; text-transform: uppercase;
  padding: 3px 8px; border: 1px solid currentColor; border-radius: 1px; color: var(--ink-dim);
}
.ws-status[data-state="live"]         { color: var(--accent); }
.ws-status[data-state="connected"]    { color: var(--info); }
.ws-status[data-state="disconnected"] { color: var(--warn); }

.save-indicator {
  font-family: var(--mono); font-size: 8px; letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--ink-faint); min-width: 56px; text-align: right;
}
.save-indicator[data-state="saving"] { color: var(--note); }
.save-indicator[data-state="saved"]  { color: var(--ink-dim); }

.workspace { display: grid; grid-template-columns: 240px 1fr; min-height: 0; }
.sidebar-mount { border-right: 1px solid var(--rule); background: var(--bg); overflow-y: auto; padding: var(--sp-4) var(--sp-3); }
.canvas-mount {
  position: relative; overflow: auto; background-color: var(--bg-deep);
  background-image: radial-gradient(circle at 1px 1px, var(--rule) 1px, transparent 0);
  background-size: 24px 24px;
}

.canvas-empty { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: var(--sp-2); text-align: center; pointer-events: none; }
.canvas-empty .mark { font-family: var(--display); font-size: 13px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--ink-dim); }
.canvas-empty .line { font-family: var(--serif); font-style: italic; font-size: 15px; color: var(--ink-faint); max-width: 360px; line-height: 1.5; }

.toast-stack { position: fixed; bottom: var(--sp-5); right: var(--sp-5); display: flex; flex-direction: column; gap: var(--sp-2); z-index: 200; }
.toast {
  background: var(--surface); border: 1px solid var(--rule); border-left: 2px solid var(--accent);
  padding: var(--sp-3) var(--sp-4); min-width: 220px; max-width: 360px; border-radius: 1px;
  font-family: var(--serif); font-style: italic; font-size: 13px; color: var(--ink-mid);
  animation: hlDockIn 240ms cubic-bezier(.2,.7,.2,1);
}
.toast.warn { border-left-color: var(--warn); }
.toast.info { border-left-color: var(--info); }

/* Action toast (e.g. "Cell deleted · Undo") — message keeps the serif-italic
   voice; the action is a THEON mono micro-button (§2.1 / §4.1). */
.toast.toast-action { display: flex; align-items: center; gap: var(--sp-3); }
.toast .toast-msg { flex: 1 1 auto; }
.toast .toast-act {
  flex: 0 0 auto;
  font-family: var(--mono); font-size: 9px; letter-spacing: 0.18em; text-transform: uppercase;
  padding: 5px 10px; background: transparent; color: var(--accent);
  border: 1px solid var(--accent); border-radius: 1px; cursor: pointer;
  transition: background 120ms cubic-bezier(.2,.7,.2,1), color 120ms cubic-bezier(.2,.7,.2,1);
}
.toast .toast-act:hover { background: var(--accent); color: var(--bg-deep); }
.toast .toast-act:focus-visible { outline: none; box-shadow: 0 0 0 2px var(--accent-glow); }

.overlay-scrim { position: fixed; inset: 0; background: rgba(8,6,5,0.6); backdrop-filter: blur(2px); display: none; align-items: flex-start; justify-content: center; z-index: 300; }
.overlay-scrim.open { display: flex; }
.palette { margin-top: 12vh; width: 520px; max-width: 92vw; background: var(--bg-deep); border: 1px solid var(--accent); box-shadow: 0 12px 32px rgba(0,0,0,0.5), 0 0 18px var(--accent-soft); border-radius: 1px; overflow: hidden; animation: highlightIn 160ms cubic-bezier(.2,.7,.2,1); }
.palette input { width: 100%; border: none; border-bottom: 1px solid var(--rule); background: transparent; padding: var(--sp-4); font-family: var(--mono); font-size: 13px; color: var(--ink); }
.palette input:focus { outline: none; }
.palette .hint { padding: var(--sp-3) var(--sp-4); font-family: var(--serif); font-style: italic; color: var(--ink-faint); font-size: 12px; }

.help { margin-top: 12vh; width: 420px; max-width: 92vw; background: var(--surface); border: 1px solid var(--rule); border-radius: 1px; padding: var(--sp-5); animation: highlightIn 160ms cubic-bezier(.2,.7,.2,1); }
.help h2 { font-family: var(--display); font-size: 13px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--ink); margin-bottom: var(--sp-4); }
.help .row { display: flex; justify-content: space-between; align-items: center; padding: var(--sp-2) 0; border-top: 1px solid var(--rule); }
.help .row:first-of-type { border-top: none; }
.help kbd { font-family: var(--mono); font-size: 10px; color: var(--accent); border: 1px solid var(--rule); padding: 1px 6px; border-radius: 1px; }
.help .label { font-family: var(--serif); font-style: italic; color: var(--ink-mid); font-size: 13px; }
