/* Forge — Claude-style design system.
   Warm, editorial light theme by default; matching dark theme via [data-theme="dark"]
   or prefers-color-scheme when no explicit preference is stored. */

:root {
  --bg: #F5F3EC;
  --surface: #FFFFFF;
  --surface-2: #FAF8F2;
  --surface-sunken: #EEEBE1;
  --border: #E4E0D4;
  --border-strong: #D8D3C4;
  --text: #21201C;
  --text-muted: #7A776D;
  --text-faint: #A6A296;
  --accent: #D97757;
  --accent-hover: #C1613F;
  --accent-soft: #F3E1D3;
  --accent-soft-strong: #EACBB2;
  --on-accent: #FFFFFF;
  --success: #4F7A5B;
  --success-soft: #DEEAE0;
  --danger: #BF4A34;
  --danger-soft: #F5DCD4;
  --warn: #B8802F;
  --radius-lg: 16px;
  --radius: 10px;
  --radius-sm: 7px;
  --shadow-sm: 0 1px 2px rgba(40, 30, 20, 0.06);
  --shadow-md: 0 6px 20px rgba(40, 30, 20, 0.08), 0 1px 3px rgba(40, 30, 20, 0.05);
  --font-serif: Georgia, 'Iowan Old Style', 'Palatino Linotype', 'Times New Roman', serif;
  --font-sans: -apple-system, BlinkMacSystemFont, 'Segoe UI', Inter, system-ui, sans-serif;
  --font-mono: 'Cascadia Code', 'SFMono-Regular', Consolas, monospace;
}

:root[data-theme="dark"] {
  --bg: #232320;
  --surface: #2C2C29;
  --surface-2: #272725;
  --surface-sunken: #1C1C1A;
  --border: #3C3B36;
  --border-strong: #4A4944;
  --text: #ECE8DF;
  --text-muted: #A19D91;
  --text-faint: #726F65;
  --accent: #E08661;
  --accent-hover: #E89A7A;
  --accent-soft: #4A3527;
  --accent-soft-strong: #5C4230;
  --on-accent: #241A12;
  --success: #7FAE8C;
  --success-soft: #2C3A30;
  --danger: #E08770;
  --danger-soft: #402A24;
  --warn: #D9A44F;
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.25);
  --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.35), 0 1px 3px rgba(0, 0, 0, 0.3);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #232320; --surface: #2C2C29; --surface-2: #272725; --surface-sunken: #1C1C1A;
    --border: #3C3B36; --border-strong: #4A4944; --text: #ECE8DF; --text-muted: #A19D91;
    --text-faint: #726F65; --accent: #E08661; --accent-hover: #E89A7A; --accent-soft: #4A3527;
    --accent-soft-strong: #5C4230; --on-accent: #241A12; --success: #7FAE8C; --success-soft: #2C3A30;
    --danger: #E08770; --danger-soft: #402A24; --warn: #D9A44F;
    --shadow-sm: 0 1px 2px rgba(0,0,0,.25); --shadow-md: 0 8px 24px rgba(0,0,0,.35), 0 1px 3px rgba(0,0,0,.3);
  }
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font-family: var(--font-sans); font-size: 14px; -webkit-font-smoothing: antialiased;
}
button, input, textarea, select { font-family: inherit; }
h1, h2, h3, h4 { font-family: var(--font-serif); font-weight: 600; margin: 0 0 .5em; }
::-webkit-scrollbar { width: 9px; height: 9px; }
::-webkit-scrollbar-thumb { background: var(--border-strong); border-radius: 5px; }
::-webkit-scrollbar-track { background: transparent; }

.app { display: flex; flex-direction: column; height: 100vh; }

/* ---------- Header ---------- */
header.topbar {
  display: flex; align-items: center; gap: 8px; padding: 10px 20px;
  background: var(--surface); border-bottom: 1px solid var(--border); flex-shrink: 0;
}
.brand { display: flex; align-items: baseline; gap: 2px; margin-right: 22px; }
.brand .mark { font-family: var(--font-serif); font-weight: 700; font-size: 19px; color: var(--accent); }
.brand .rest { font-family: var(--font-serif); font-weight: 700; font-size: 19px; color: var(--text); }
nav.topnav { display: flex; gap: 2px; }
nav.topnav button {
  background: transparent; border: none; color: var(--text-muted); padding: 8px 15px;
  border-radius: var(--radius-sm); cursor: pointer; font-size: 13.5px; font-weight: 600;
  transition: background .15s, color .15s;
}
nav.topnav button:hover { color: var(--text); background: var(--surface-2); }
nav.topnav button.active { background: var(--accent-soft); color: var(--accent-hover); }
.nav-badge { display: inline-block; margin-left: 6px; background: var(--accent); color: var(--on-accent); font-size: 10px; font-weight: 700; padding: 1px 6px; border-radius: 10px; vertical-align: middle; }
.nav-badge:empty { display: none; }
.top-right { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.presence-badge {
  font-size: 11.5px; color: var(--text-muted); border: 1px solid var(--border); padding: 4px 10px;
  border-radius: 20px; display: flex; align-items: center; gap: 6px; background: var(--surface-2);
}
.presence-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--danger); flex-shrink: 0; }
.presence-dot.live { background: var(--success); }
.icon-btn {
  width: 32px; height: 32px; border-radius: 50%; border: 1px solid var(--border); background: var(--surface-2);
  color: var(--text-muted); cursor: pointer; display: flex; align-items: center; justify-content: center; font-size: 14px;
}
.icon-btn:hover { color: var(--text); border-color: var(--border-strong); }

main.main { flex: 1; overflow: hidden; position: relative; }
.view { display: none; height: 100%; }
.view.active { display: flex; }

/* ---------- Buttons ---------- */
.btn-primary, .btn-secondary, .btn-ghost, .btn-danger {
  border-radius: var(--radius-sm); cursor: pointer; font-weight: 600; font-size: 13px;
  padding: 8px 15px; border: 1px solid transparent; transition: all .15s;
}
.btn-primary { background: var(--accent); color: var(--on-accent); }
.btn-primary:hover { background: var(--accent-hover); }
.btn-secondary { background: var(--surface); color: var(--text); border-color: var(--border-strong); }
.btn-secondary:hover { border-color: var(--accent); color: var(--accent-hover); }
.btn-ghost { background: transparent; color: var(--text-muted); border-color: var(--border); }
.btn-ghost:hover { color: var(--text); background: var(--surface-2); }
.btn-danger { background: transparent; color: var(--danger); border-color: var(--danger-soft); }
.btn-danger:hover { background: var(--danger-soft); }
.btn-sm { padding: 5px 10px; font-size: 12px; }

/* ---------- Dev Lifecycle ---------- */
#devlc { flex-direction: column; }
.dlc-toolbar {
  display: flex; align-items: center; gap: 12px; padding: 12px 20px; border-bottom: 1px solid var(--border);
  background: var(--surface);
}
.dlc-toolbar strong { font-size: 13px; }
select.field {
  background: var(--surface-2); color: var(--text); border: 1px solid var(--border); border-radius: var(--radius-sm);
  padding: 7px 10px; font-size: 13px;
}
.release-bar { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.progress-track { width: 150px; height: 7px; background: var(--surface-sunken); border-radius: 4px; overflow: hidden; }
.progress-fill { height: 100%; background: var(--success); border-radius: 4px; transition: width .3s; }
.dlc-body { flex: 1; display: flex; overflow: hidden; }
.board { flex: 1; display: flex; gap: 14px; padding: 18px; overflow-x: auto; }
.column { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); min-width: 264px; width: 264px; display: flex; flex-direction: column; box-shadow: var(--shadow-sm); }
.column-head { margin: 0; padding: 13px 15px; font-size: 12px; text-transform: uppercase; letter-spacing: .6px; color: var(--text-muted); font-weight: 700; border-bottom: 1px solid var(--border); display: flex; justify-content: space-between; align-items: center; }
.count-pill { background: var(--surface-2); color: var(--text-muted); font-size: 11px; padding: 1px 7px; border-radius: 10px; font-weight: 700; }
.card-list { flex: 1; padding: 10px; overflow-y: auto; display: flex; flex-direction: column; gap: 9px; min-height: 60px; }
.card-list.over { background: var(--accent-soft); border-radius: var(--radius); }
.story-card { background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--radius); padding: 11px 12px; cursor: grab; transition: box-shadow .15s, border-color .15s; }
.story-card:hover { border-color: var(--border-strong); box-shadow: var(--shadow-sm); }
.story-card:active { cursor: grabbing; }
.story-id { color: var(--accent-hover); font-family: var(--font-mono); font-size: 11px; font-weight: 600; }
.story-title { margin: 5px 0 9px; font-size: 13.5px; line-height: 1.35; }
.story-meta { display: flex; justify-content: space-between; align-items: center; }
.chip { font-size: 10.5px; padding: 2px 7px; border-radius: 5px; border: 1px solid var(--border); color: var(--text-muted); font-weight: 600; }
.chip.bug { color: var(--danger); border-color: var(--danger-soft); background: var(--danger-soft); }
.chip.feat { color: var(--success); border-color: var(--success-soft); background: var(--success-soft); }
.avatar { width: 22px; height: 22px; border-radius: 50%; background: var(--accent); color: var(--on-accent); font-size: 10.5px; display: flex; align-items: center; justify-content: center; font-weight: 700; flex-shrink: 0; }
.add-ghost { border: 1.5px dashed var(--border-strong); border-radius: var(--radius); padding: 9px; text-align: center; color: var(--text-muted); cursor: pointer; font-size: 12.5px; font-weight: 600; margin: 0 10px 10px; }
.add-ghost:hover { border-color: var(--accent); color: var(--accent-hover); }
.sidebar-panel { width: 300px; border-left: 1px solid var(--border); background: var(--surface); padding: 16px; overflow-y: auto; flex-shrink: 0; }
.panel-title { margin-top: 0; font-size: 12px; color: var(--text-muted); text-transform: uppercase; letter-spacing: .6px; font-weight: 700; }
.checkpoint-row { display: flex; align-items: center; gap: 9px; padding: 9px 0; border-bottom: 1px solid var(--border); font-size: 13px; }
.checkpoint-row input { accent-color: var(--success); width: 15px; height: 15px; }
.checkpoint-row.done label { color: var(--text-faint); text-decoration: line-through; }

/* ---------- Messaging ---------- */
#chat { }
.channel-rail { width: 226px; background: var(--surface); border-right: 1px solid var(--border); padding: 14px 0; overflow-y: auto; flex-shrink: 0; display: flex; flex-direction: column; }
.rail-head { padding: 0 14px; display: flex; align-items: center; justify-content: space-between; margin: 0 0 8px; }
.rail-head h4 { color: var(--text-muted); font-size: 11px; text-transform: uppercase; letter-spacing: .6px; margin: 0; }
.channel-item { padding: 8px 14px; cursor: pointer; color: var(--text-muted); font-size: 13.5px; border-left: 2px solid transparent; }
.channel-item .cname { font-weight: 600; }
.channel-item .ctopic { font-size: 11px; color: var(--text-faint); margin-top: 1px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.channel-item.active { background: var(--accent-soft); color: var(--accent-hover); border-left-color: var(--accent); }
.channel-item.active .ctopic { color: var(--accent-hover); opacity: .75; }
.channel-item:hover:not(.active) { color: var(--text); background: var(--surface-2); }
.chat-panel { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.chat-topbar { padding: 13px 20px; border-bottom: 1px solid var(--border); background: var(--surface); }
.chat-topbar .cname { font-weight: 700; font-size: 14.5px; }
.chat-topbar .ctopic { font-size: 12px; color: var(--text-muted); margin-top: 1px; }
.message-list { flex: 1; overflow-y: auto; padding: 16px 20px; display: flex; flex-direction: column; gap: 14px; }
.message-row { display: flex; gap: 10px; }
.msg-bubble { background: var(--surface); border: 1px solid var(--border); padding: 9px 13px; border-radius: var(--radius); max-width: 70%; }
.msg-author { font-size: 12px; color: var(--accent-hover); font-weight: 700; margin-bottom: 2px; }
.msg-time { font-size: 10.5px; color: var(--text-faint); margin-left: 7px; font-weight: 400; }
.msg-text strong { font-weight: 700; }
.composer-bar { display: flex; gap: 8px; padding: 13px 20px; border-top: 1px solid var(--border); background: var(--surface); }
.composer-bar input { flex: 1; background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 10px 13px; color: var(--text); font-size: 13.5px; }
.composer-bar input:focus { outline: none; border-color: var(--accent); }

/* ---------- Documents hub ---------- */
#docs { flex-direction: column; }
.docs-typebar { display: flex; gap: 4px; padding: 12px 20px; border-bottom: 1px solid var(--border); background: var(--surface); }
.type-tab { display: flex; align-items: center; gap: 7px; background: transparent; border: 1px solid var(--border); color: var(--text-muted); padding: 7px 14px; border-radius: 20px; cursor: pointer; font-size: 12.5px; font-weight: 600; }
.type-tab.active { background: var(--accent-soft); color: var(--accent-hover); border-color: var(--accent-soft-strong); }
.type-tab:hover:not(.active) { border-color: var(--border-strong); color: var(--text); }
.docs-panel { flex: 1; display: none; overflow: hidden; flex-direction: column; }
.docs-panel.active { display: flex; }

.docs-list-view { flex: 1; overflow-y: auto; padding: 22px 26px; display: none; flex-direction: column; }
.docs-list-view.active { display: flex; }
.list-toolbar { display: flex; align-items: center; margin-bottom: 18px; gap: 10px; }
.list-toolbar h2 { font-size: 19px; }
.list-toolbar .hint { color: var(--text-muted); font-size: 12.5px; margin-left: 2px; }
.doc-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 14px; }
.doc-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 16px; cursor: pointer; box-shadow: var(--shadow-sm); position: relative; transition: box-shadow .15s, border-color .15s, transform .1s; }
.doc-card:hover { box-shadow: var(--shadow-md); border-color: var(--border-strong); transform: translateY(-1px); }
.doc-card .doc-icon { font-size: 22px; margin-bottom: 10px; display: inline-block; }
.doc-card .doc-title { font-weight: 700; font-size: 14px; margin-bottom: 6px; line-height: 1.3; padding-right: 20px; }
.doc-card .doc-meta { font-size: 11.5px; color: var(--text-faint); }
.doc-card .doc-del { position: absolute; top: 12px; right: 12px; width: 22px; height: 22px; border-radius: 50%; border: none; background: transparent; color: var(--text-faint); cursor: pointer; font-size: 13px; display: flex; align-items: center; justify-content: center; }
.doc-card .doc-del:hover { background: var(--danger-soft); color: var(--danger); }
.doc-empty { color: var(--text-muted); font-size: 13px; padding: 30px 0; text-align: center; }

.docs-editor-view { flex: 1; display: none; flex-direction: column; overflow: hidden; }
.docs-editor-view.active { display: flex; }
.editor-topbar { display: flex; align-items: center; gap: 10px; padding: 10px 16px; border-bottom: 1px solid var(--border); background: var(--surface); }
.editor-title-input { border: none; background: transparent; font-family: var(--font-serif); font-size: 16px; font-weight: 700; color: var(--text); padding: 4px 6px; border-radius: var(--radius-sm); min-width: 120px; flex: 1 1 auto; }
.editor-title-input:focus { outline: none; background: var(--surface-2); }
.save-state { font-size: 11px; color: var(--text-faint); margin-left: auto; margin-right: 6px; }

/* Word editor */
.wordeditor-toolbar { display: flex; gap: 6px; padding: 9px 16px; border-bottom: 1px solid var(--border); background: var(--surface); }
.wordeditor-toolbar button { background: var(--surface-2); border: 1px solid var(--border); color: var(--text); width: 30px; height: 30px; border-radius: var(--radius-sm); cursor: pointer; font-size: 13px; }
.wordeditor-toolbar button:hover { border-color: var(--accent); color: var(--accent-hover); }
#richtext-active, #wikiRichtext { flex: 1; padding: 30px 44px; outline: none; line-height: 1.7; font-size: 15px; overflow-y: auto; max-width: 780px; margin: 0 auto; width: 100%; }
#richtext-active h2, #wikiRichtext h2 { font-size: 22px; }

/* Sheet editor */
.sheet-toolbar { display: flex; gap: 6px; padding: 9px 16px; border-bottom: 1px solid var(--border); background: var(--surface); }
.sheet-scroll { flex: 1; overflow: auto; padding: 18px; }
table.sheet-grid { border-collapse: collapse; background: var(--surface); box-shadow: var(--shadow-sm); }
table.sheet-grid th { background: var(--surface-2); color: var(--text-muted); font-size: 11px; font-weight: 700; padding: 6px 4px; border: 1px solid var(--border); min-width: 110px; position: sticky; top: 0; }
table.sheet-grid th.rownum { min-width: 34px; position: sticky; left: 0; z-index: 2; }
table.sheet-grid td.rownum { background: var(--surface-2); color: var(--text-faint); text-align: center; font-size: 11px; border: 1px solid var(--border); position: sticky; left: 0; }
table.sheet-grid td { border: 1px solid var(--border); padding: 0; }
table.sheet-grid input { width: 100%; box-sizing: border-box; border: none; background: transparent; padding: 7px 8px; font-size: 12.5px; color: var(--text); }
table.sheet-grid input:focus { outline: 2px solid var(--accent); outline-offset: -2px; background: var(--surface); position: relative; z-index: 1; }

/* Slide editor */
.slide-layout { flex: 1; display: flex; overflow: hidden; }
.slide-thumbs { width: 180px; border-right: 1px solid var(--border); background: var(--surface); overflow-y: auto; padding: 12px; display: flex; flex-direction: column; gap: 10px; flex-shrink: 0; }
.slide-thumb { border: 1.5px solid var(--border); border-radius: var(--radius-sm); background: var(--surface-2); padding: 10px; cursor: pointer; font-size: 11px; color: var(--text-muted); }
.slide-thumb .stitle { color: var(--text); font-weight: 700; font-size: 12px; margin-bottom: 3px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.slide-thumb.active { border-color: var(--accent); background: var(--accent-soft); }
.slide-canvas-wrap { flex: 1; display: flex; flex-direction: column; overflow: hidden; }
.slide-canvas-toolbar { display: flex; gap: 8px; padding: 9px 16px; border-bottom: 1px solid var(--border); background: var(--surface); }
.slide-canvas { flex: 1; padding: 30px; overflow-y: auto; display: flex; justify-content: center; }
.slide-sheet { width: 100%; max-width: 640px; aspect-ratio: 16/10; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow-md); padding: 34px 40px; display: flex; flex-direction: column; height: fit-content; }
.slide-sheet input.stitle-input { border: none; background: transparent; font-family: var(--font-serif); font-size: 24px; font-weight: 700; margin-bottom: 14px; color: var(--text); }
.slide-sheet input.stitle-input:focus, .slide-sheet textarea:focus { outline: none; }
.slide-sheet textarea { flex: 1; border: none; background: transparent; resize: none; font-size: 14.5px; line-height: 1.7; color: var(--text); font-family: var(--font-sans); }
.present-overlay { position: fixed; inset: 0; background: var(--surface-sunken); z-index: 100; display: none; flex-direction: column; align-items: center; justify-content: center; padding: 40px; }
.present-overlay.active { display: flex; }
.present-slide { width: min(900px, 90vw); aspect-ratio: 16/10; background: var(--surface); border-radius: var(--radius-lg); box-shadow: var(--shadow-md); padding: 50px 60px; display: flex; flex-direction: column; }
.present-slide h2 { font-size: 32px; }
.present-slide .pbody { white-space: pre-wrap; font-size: 17px; line-height: 1.7; color: var(--text-muted); }
.present-controls { margin-top: 18px; display: flex; align-items: center; gap: 14px; color: var(--text-muted); font-size: 13px; }

/* Flow editor */
.flow-list-toolbar { }
.flow-wrap { flex: 1; position: relative; overflow: auto; background-image: radial-gradient(var(--border-strong) 1px, transparent 1px); background-size: 22px 22px; background-color: var(--surface-sunken); }
.flow-toolbar { position: sticky; top: 12px; left: 12px; display: inline-flex; gap: 6px; z-index: 5; margin: 12px; }
.flow-toolbar button { background: var(--surface); border: 1px solid var(--border); color: var(--text); padding: 7px 12px; border-radius: var(--radius-sm); cursor: pointer; font-size: 12px; font-weight: 600; box-shadow: var(--shadow-sm); }
.flow-toolbar .hint { color: var(--text-muted); font-size: 11px; align-self: center; font-weight: 400; }
svg.edges { position: absolute; top: 0; left: 0; width: 100%; height: 100%; pointer-events: none; }
.flow-node { position: absolute; min-width: 128px; padding: 11px 14px; background: var(--surface); border: 1.5px solid var(--accent); border-radius: var(--radius); cursor: move; user-select: none; font-size: 13px; font-weight: 600; box-shadow: var(--shadow-sm); }
.flow-node.linking { outline: 2px solid var(--success); outline-offset: 2px; }
.flow-node .del { position: absolute; top: -8px; right: -8px; background: var(--danger); color: #fff; border-radius: 50%; width: 17px; height: 17px; font-size: 10px; display: flex; align-items: center; justify-content: center; cursor: pointer; }

/* ---------- Summary ---------- */
#summary { flex-direction: column; }
.summary-wrap { flex: 1; overflow-y: auto; padding: 22px 26px; display: flex; flex-direction: column; }
.summary-tabs { display: flex; gap: 4px; margin-right: 10px; }
.summary-tab { background: transparent; border: 1px solid var(--border); color: var(--text-muted); padding: 6px 13px; border-radius: 20px; cursor: pointer; font-size: 12px; font-weight: 600; }
.summary-tab.active { background: var(--accent-soft); color: var(--accent-hover); border-color: var(--accent-soft-strong); }
.summary-tab:hover:not(.active) { border-color: var(--border-strong); color: var(--text); }
.activity-feed { display: flex; flex-direction: column; gap: 2px; }
.activity-row { display: flex; align-items: flex-start; gap: 12px; padding: 13px 14px; border-radius: var(--radius); cursor: pointer; border: 1px solid transparent; }
.activity-row:hover { background: var(--surface); border-color: var(--border); }
.activity-row .unread-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); margin-top: 6px; flex-shrink: 0; }
.activity-row.is-read .unread-dot { background: transparent; }
.activity-row .kind-icon { font-size: 16px; flex-shrink: 0; }
.activity-row .a-text { font-size: 13.5px; color: var(--text); line-height: 1.45; }
.activity-row.is-read .a-text { color: var(--text-muted); }
.activity-row .a-time { font-size: 11px; color: var(--text-faint); margin-top: 2px; }
.activity-row .a-main { flex: 1; min-width: 0; }
.activity-row .read-toggle { border: none; background: transparent; color: var(--text-faint); cursor: pointer; font-size: 11px; padding: 4px 8px; border-radius: var(--radius-sm); flex-shrink: 0; }
.activity-row .read-toggle:hover { background: var(--surface-2); color: var(--text); }

/* ---------- Meetings ---------- */
#meetings { flex-direction: column; }
.status-chip { font-size: 10.5px; padding: 3px 9px; border-radius: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .4px; background: var(--surface-2); color: var(--text-muted); border: 1px solid var(--border); }
.status-chip.scheduled { color: var(--accent-hover); background: var(--accent-soft); border-color: var(--accent-soft-strong); }
.status-chip.live { color: var(--success); background: var(--success-soft); border-color: var(--success); }
.status-chip.ended { color: var(--text-faint); }
.doc-card.meeting-card .doc-meta .status-chip { margin-right: 6px; }
.meeting-body { flex: 1; display: flex; gap: 26px; padding: 24px 28px; overflow-y: auto; }

/* ---------- Incident Management ---------- */
#incidents { flex-direction: column; }
.status-chip.open { color: var(--danger); background: var(--danger-soft); border-color: var(--danger); }
.status-chip.investigating { color: var(--warn); background: var(--accent-soft); border-color: var(--warn); }
.status-chip.resolved { color: var(--success); background: var(--success-soft); border-color: var(--success); }
.sev-chip { font-size: 10.5px; padding: 3px 9px; border-radius: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .4px; background: var(--surface-2); color: var(--text-muted); border: 1px solid var(--border); margin-right: 6px; }
.sev-chip.low { color: var(--text-muted); }
.sev-chip.medium { color: var(--accent-hover); background: var(--accent-soft); border-color: var(--accent-soft-strong); }
.sev-chip.high { color: var(--warn); background: var(--accent-soft); border-color: var(--warn); }
.sev-chip.critical { color: var(--danger); background: var(--danger-soft); border-color: var(--danger); }
.meeting-col { flex: 1; min-width: 260px; display: flex; flex-direction: column; }
.form-label { font-size: 11.5px; color: var(--text-muted); font-weight: 700; text-transform: uppercase; letter-spacing: .5px; margin: 14px 0 6px; }
.form-label:first-child { margin-top: 0; }
.form-input, .form-textarea { width: 100%; border: 1px solid var(--border); background: var(--surface); border-radius: var(--radius-sm); padding: 9px 11px; font-size: 13.5px; color: var(--text); }
.form-input:focus, .form-textarea:focus { outline: none; border-color: var(--accent); }
.form-textarea { resize: vertical; line-height: 1.55; font-family: var(--font-sans); flex: 1; }
.chip-row { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 8px; }
.attendee-chip { display: inline-flex; align-items: center; gap: 6px; background: var(--surface-2); border: 1px solid var(--border); border-radius: 20px; padding: 4px 6px 4px 11px; font-size: 12.5px; }
.attendee-chip button { border: none; background: transparent; color: var(--text-faint); cursor: pointer; width: 16px; height: 16px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 11px; }
.attendee-chip button:hover { background: var(--danger-soft); color: var(--danger); }

/* ---------- Modal ---------- */
.modal-backdrop { position: fixed; inset: 0; background: rgba(30, 26, 20, 0.42); display: flex; align-items: center; justify-content: center; z-index: 200; }
.modal-box { background: var(--surface); border-radius: var(--radius-lg); box-shadow: var(--shadow-md); width: 380px; max-width: 90vw; padding: 22px; }
.modal-box h3 { font-size: 16px; margin-bottom: 14px; }
.modal-field { margin-bottom: 12px; }
.modal-field label { display: block; font-size: 12px; color: var(--text-muted); font-weight: 600; margin-bottom: 5px; }
.modal-field input, .modal-field textarea { width: 100%; border: 1px solid var(--border); background: var(--surface-2); border-radius: var(--radius-sm); padding: 9px 11px; font-size: 13.5px; color: var(--text); }
.modal-field input:focus, .modal-field textarea:focus { outline: none; border-color: var(--accent); }
.modal-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 18px; }
.modal-msg { font-size: 13.5px; color: var(--text); line-height: 1.5; margin-bottom: 4px; }
