/* Minimal functional styling for the shared business-wing app.js shell.
   Placeholder pending Astra's own design pass -- structural/usable, not polished. */
:root { --accent: #ffcead; --accent-dark: #27190f; --bg: #0c0e12; --surface: #14171c; --line: #262b33; --text: #eef1f4; --muted: #93999f; }
* { box-sizing: border-box; }
[hidden] { display: none !important; } /* app.js toggles [hidden] on elements (e.g. .auth-form label) whose own class sets display:flex, which otherwise wins over the UA default and leaves them visibly shown */
body { margin: 0; background: var(--bg); color: var(--text); font: 15px/1.6 -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; }
a { color: var(--accent); }
.eyebrow { text-transform: uppercase; letter-spacing: .08em; font-size: 11px; color: var(--muted); margin: 0 0 6px; }
.fine { font-size: 12px; color: var(--muted); }
.button { display: inline-block; border-radius: 8px; padding: 10px 18px; font-weight: 600; text-decoration: none; cursor: pointer; border: 1px solid var(--line); background: var(--surface); color: var(--text); font-size: 14px; }
.button.primary { background: var(--accent); color: var(--accent-dark); border-color: var(--accent); }
.button.secondary { background: transparent; }
.text-link, .quiet-link { background: none; border: 0; color: var(--accent); cursor: pointer; text-decoration: underline; font-size: 14px; }

.site-header { display: flex; align-items: center; justify-content: space-between; padding: 16px 24px; border-bottom: 1px solid var(--line); }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--text); font-weight: 700; }
.brand img { width: 32px; height: 32px; border-radius: 8px; }
.header-actions { display: flex; align-items: center; gap: 16px; }
.family summary { cursor: pointer; color: var(--muted); list-style: none; }
.family nav { display: flex; flex-direction: column; gap: 6px; margin-top: 8px; }

.discovery { max-width: 1000px; margin: 0 auto; padding: 40px 24px 80px; }
.hero { display: grid; grid-template-columns: 1.2fr 1fr; gap: 40px; align-items: center; }
.hero h1 { font-size: 40px; line-height: 1.15; margin: 0 0 16px; }
.hero h1 em { color: var(--accent); font-style: normal; }
.lead { color: var(--muted); font-size: 16px; }
.actions { display: flex; gap: 16px; align-items: center; margin: 20px 0 10px; }
.hero-object { position: relative; aspect-ratio: 1; border-radius: 24px; background: var(--surface); border: 1px solid var(--line); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; }
.object-number { font-size: 48px; font-weight: 800; color: var(--accent); }
.object-mongoose { width: 48px; height: 48px; }
.object-caption { color: var(--muted); font-size: 13px; }
.object-chip { display: none; }
.orbit-one, .orbit-two, .object-grid { display: none; }

.benefits { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; margin: 64px 0; }
.benefits article h2 { font-size: 18px; margin: 8px 0; }
.benefits article p { color: var(--muted); margin: 0; }

.journey ol { list-style: none; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.journey li h3 { margin: 0 0 6px; }
.journey li p { color: var(--muted); margin: 0; }

.closing { text-align: center; margin: 64px 0; }
.closing h2 { font-size: 28px; }
footer { display: flex; justify-content: space-between; color: var(--muted); font-size: 13px; padding-top: 24px; border-top: 1px solid var(--line); }

.auth-layout { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; max-width: 900px; margin: 40px auto; padding: 0 24px; align-items: center; }
.auth-story img { margin-top: 16px; }
.auth-form { display: flex; flex-direction: column; gap: 12px; background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 28px; }
.auth-form label { display: flex; flex-direction: column; gap: 6px; font-size: 13px; color: var(--muted); }
.auth-form input { background: var(--bg); border: 1px solid var(--line); border-radius: 8px; padding: 10px 12px; color: var(--text); font-size: 14px; }
.form-error { color: #f3b6a7; font-size: 13px; margin: 0; min-height: 1em; }
.form-error:empty { display: none; }

.service-state { max-width: 480px; margin: 80px auto; text-align: center; }

.workspace { display: grid; grid-template-columns: 240px 1fr; min-height: 100vh; }
.sidebar { border-right: 1px solid var(--line); padding: 20px 16px; display: flex; flex-direction: column; gap: 16px; }
.sidebar nav { display: flex; flex-direction: column; gap: 4px; }
.nav-item { text-align: left; background: none; border: 0; color: var(--muted); padding: 8px 10px; border-radius: 8px; cursor: pointer; font-size: 13px; }
.nav-item.active { background: var(--surface); color: var(--text); }
.sidebar-bottom { margin-top: auto; display: flex; flex-direction: column; gap: 8px; font-size: 13px; color: var(--muted); }

.workspace-main { padding: 24px 32px; overflow-y: auto; }
.workspace-top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; }
.workspace-heading { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 20px; }
.workspace-heading h1 { margin: 0 0 4px; }
.workspace-heading p { color: var(--muted); margin: 0; }

.summary-row { display: flex; gap: 16px; margin-bottom: 20px; }
.summary-row article { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 14px 18px; flex: 1; }
.summary-row span { display: block; font-size: 11px; color: var(--muted); text-transform: uppercase; }
.summary-row strong { font-size: 22px; }
.summary-row small { display: block; color: var(--muted); font-size: 11px; }

.list-toolbar { display: flex; gap: 10px; margin-bottom: 16px; }
.list-toolbar input, .list-toolbar select { background: var(--surface); border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px; color: var(--text); }
.list-toolbar input { flex: 1; }

.record-list { display: flex; flex-direction: column; gap: 8px; }
.record-card { display: flex; align-items: center; gap: 14px; background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 12px 16px; text-align: left; cursor: pointer; color: var(--text); width: 100%; }
.record-mark { width: 28px; height: 28px; border-radius: 6px; background: var(--accent); color: var(--accent-dark); display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 11px; flex-shrink: 0; }
.record-main { flex: 1; }
.record-title { display: block; font-weight: 600; margin-bottom: 4px; }
.record-details { display: flex; gap: 16px; flex-wrap: wrap; }
.record-details small { display: block; color: var(--muted); font-size: 10px; text-transform: uppercase; }
.stage { font-size: 11px; padding: 4px 10px; border-radius: 999px; background: var(--bg); border: 1px solid var(--line); color: var(--muted); }
.record-arrow { color: var(--muted); }

.empty-state { text-align: center; padding: 60px 20px; background: var(--surface); border: 1px dashed var(--line); border-radius: 12px; }
.empty-symbol { width: 40px; height: 40px; border-radius: 10px; background: var(--accent); color: var(--accent-dark); display: flex; align-items: center; justify-content: center; font-weight: 700; margin: 0 auto 12px; }
.loading { text-align: center; color: var(--muted); padding: 40px; }

.workspace-note { display: flex; gap: 12px; margin-top: 24px; padding: 16px; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; }
.note-marker { width: 24px; height: 24px; border-radius: 50%; background: var(--accent); color: var(--accent-dark); display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 12px; flex-shrink: 0; }
.workspace-note p { color: var(--muted); margin: 4px 0 0; font-size: 13px; }

.editor-dialog { border: 1px solid var(--line); border-radius: 16px; background: var(--bg); color: var(--text); padding: 0; width: min(560px, 92vw); max-height: 88vh; }
.editor-dialog::backdrop { background: #000a; }
.editor-heading { display: flex; justify-content: space-between; align-items: flex-start; padding: 20px 24px; border-bottom: 1px solid var(--line); }
.close-button { background: none; border: 0; color: var(--muted); font-size: 20px; cursor: pointer; }
.editor-fields { display: grid; gap: 14px; padding: 20px 24px; }
.editor-fields label { display: flex; flex-direction: column; gap: 6px; font-size: 13px; color: var(--muted); }
.editor-fields label.wide { grid-column: 1 / -1; }
.editor-fields input, .editor-fields select, .editor-fields textarea { background: var(--surface); border: 1px solid var(--line); border-radius: 8px; padding: 9px 10px; color: var(--text); font: inherit; }
.editor-actions { display: flex; justify-content: flex-end; gap: 10px; padding: 16px 24px; border-top: 1px solid var(--line); }
.stage-editor { display: flex; align-items: center; gap: 10px; padding: 0 24px 16px; }
.discard-confirm { padding: 12px 24px; background: #2a1a17; }
.discard-confirm[hidden] { display: none; }

.toast { position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%) translateY(20px); background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 10px 18px; opacity: 0; transition: opacity .2s, transform .2s; pointer-events: none; z-index: 999; }
.toast.shown { opacity: 1; transform: translateX(-50%) translateY(0); }

@media (max-width: 780px) {
  .hero, .auth-layout, .benefits, .journey ol { grid-template-columns: 1fr; }
  .workspace { grid-template-columns: 1fr; }
  .sidebar { flex-direction: row; overflow-x: auto; border-right: 0; border-bottom: 1px solid var(--line); }
  .sidebar nav { flex-direction: row; }
  .sidebar-bottom { display: none; }
}
