/* === Phase 27 D-04 — semantic brand-aware aliases (cream/orange/black) =====
   Token naming discipline: NEW code MUST use these semantic names.
   Existing names (--bg, --surface, --accent, --text, --text2) remain valid
   below; both sets resolve to the same hex values for zero-churn migration.
   ============================================================================ */
:root, [data-theme="dark"] {
  --black-deep:  #1C1C1C;   /* primary background      — same as --bg */
  --black-soft:  #2A2A2A;   /* elevated surface         — same as --surface2 */
  --orange-warm: #E66B30;   /* accent                   — same as --accent */
  --cream-base:  #F3F5EC;   /* dark-mode text / light-mode bg — same as --text */
  --cream-warm:  #c8c6b8;   /* muted                    — same as --text2 */
}
[data-theme="light"] {
  --black-deep:  #1C1C1C;
  --black-soft:  #3a3a3a;
  --cream-base:  #F3F5EC;
  --cream-warm:  #EAE8DC;
}

/* === DARK THEME (default) === */
:root, [data-theme="dark"] {
  --bg: #1C1C1C;
  --surface: #1C1C1C;
  --surface2: #2A2A2A;
  --border: #3a3a3a;
  --text: #F3F5EC;
  --text2: #c8c6b8;
  --text3: #8c8a7e;
  --accent: #E66B30;
  --accent-hover: #cf5b25;
  --accent-dim: rgba(230,107,48,0.15);
  --green: #B8E338;
  --green-dim: rgba(184,227,56,0.13);
  --yellow: #fbbf24;
  --yellow-dim: rgba(251,191,36,0.12);
  --red: #f87171;
  --red-dim: rgba(248,113,113,0.12);
  --purple: #bc8cff;
  --purple-dim: rgba(188,140,255,0.12);
  --shadow: 0 1px 3px rgba(0,0,0,0.3);
  --shadow-lg: 0 8px 24px rgba(0,0,0,0.4);
  --radius: 10px;
  --radius-lg: 14px;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --gradient-ai: linear-gradient(135deg, #58a6ff 0%, #bc8cff 100%);
}

/* === LIGHT THEME === */
[data-theme="light"] {
  --bg: #F3F5EC;
  --surface: #ffffff;
  --surface2: #EAE8DC;
  --border: #d8d6c8;
  --text: #1C1C1C;
  --text2: #3a3a3a;
  --text3: #6a6a6a;
  --accent: #E66B30;
  --accent-hover: #cf5b25;
  --accent-dim: rgba(230,107,48,0.08);
  --green: #047857;
  --green-dim: rgba(4,120,87,0.08);
  --yellow: #b45309;
  --yellow-dim: rgba(180,83,9,0.08);
  --red: #c81e1e;
  --red-dim: rgba(220,38,38,0.06);
  --shadow: 0 1px 3px rgba(0,0,0,0.06), 0 1px 2px rgba(0,0,0,0.04);
  --shadow-lg: 0 4px 12px rgba(0,0,0,0.08), 0 2px 4px rgba(0,0,0,0.04);
}
/* Sidebar */
[data-theme="light"] .sidebar { background: #ffffff; border-right: 1px solid #d8d6c8; }
[data-theme="light"] .logo-mark { box-shadow: 0 2px 8px rgba(230,107,48,0.25); }
[data-theme="light"] .nav-btn { color: #3a3a3a; }
[data-theme="light"] .nav-btn:hover { background: #EAE8DC; color: var(--text); }
[data-theme="light"] .nav-btn.active { background: rgba(230,107,48,0.09); color: var(--accent); border-left-color: var(--accent); font-weight: 600; }
/* Cards — subtle elevation with warm shadows */
[data-theme="light"] .opp-card { background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,0.04), 0 1px 2px rgba(0,0,0,0.02); border: 1px solid #d8d6c8; }
[data-theme="light"] .opp-card:hover { box-shadow: 0 4px 12px rgba(230,107,48,0.09), 0 2px 4px rgba(0,0,0,0.04); border-color: #cfc9b6; }
[data-theme="light"] .stat-card { background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,0.04); border: 1px solid #d8d6c8; }
[data-theme="light"] .stat-card:hover { box-shadow: 0 4px 12px rgba(230,107,48,0.09); border-color: #cfc9b6; }
[data-theme="light"] .section-card { background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,0.04); border: 1px solid #d8d6c8; }
[data-theme="light"] .ws-card { background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,0.04); border: 1px solid #d8d6c8; }
[data-theme="light"] .profile-section { background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,0.04); border: 1px solid #d8d6c8; }
/* Inputs — clean white with subtle border */
[data-theme="light"] .search-input { background: #fff; border-color: #d8d6c8; color: var(--text); }
[data-theme="light"] .filter-select { background: #fff; border-color: #d8d6c8; color: var(--text); }
[data-theme="light"] .field-input, [data-theme="light"] .field-textarea { background: #fff; border-color: #d8d6c8; color: var(--text); }
[data-theme="light"] .chat-input { background: #fff; border-color: #d8d6c8; }
[data-theme="light"] .search-input:focus, [data-theme="light"] .field-input:focus, [data-theme="light"] .field-textarea:focus, [data-theme="light"] .chat-input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(230,107,48,0.11); }
/* Tabs */
[data-theme="light"] .ws-tab { color: #6a6a6a; }
[data-theme="light"] .ws-tab:hover { background: #EAE8DC; color: var(--text); }
[data-theme="light"] .ws-tab.active { background: rgba(230,107,48,0.09); color: var(--accent); font-weight: 600; }
[data-theme="light"] .ws-tabs { background: #fff; border-bottom: 1px solid #d8d6c8; }
[data-theme="light"] .ws-panel.active { background: #fff; }
/* Pipeline tabs */
[data-theme="light"] .pipeline-tab { background: #fff; border-color: #d8d6c8; color: #6a6a6a; }
[data-theme="light"] .pipeline-tab:hover { border-color: var(--accent); color: var(--accent); }
[data-theme="light"] .pipeline-tab.active { background: var(--accent); border-color: var(--accent); color: #fff; }
/* Tags */
[data-theme="light"] .tag { background: #EAE8DC; color: #1C1C1C; border-color: #d8d6c8; }
/* Opp-card 260428-mp4 light-theme mirrors */
[data-theme="light"] .opp-notice-type { color: #6a6a6a; }
[data-theme="light"] .opp-deadline { color: var(--accent); }
[data-theme="light"] .opp-deadline--urgent,
[data-theme="light"] .opp-deadline--closed { color: #dc2626; }
[data-theme="light"] .opp-deadline--muted { color: #6a6a6a; }
[data-theme="light"] .opp-rec-pill--go {
  background: rgba(184,227,56,0.14);
  color: #4d6b0a;
  border-color: rgba(184,227,56,0.40);
}
[data-theme="light"] .opp-rec-pill--pass {
  background: rgba(220,38,38,0.07);
  color: #b91c1c;
  border-color: rgba(220,38,38,0.30);
}
[data-theme="light"] .opp-rec-pill--review {
  background: #EAE8DC;
  color: var(--text);
  border-color: #d8d6c8;
}
[data-theme="light"] .opp-status-pill--open {
  background: rgba(4,120,87,0.10);
  color: var(--green);
  border-color: rgba(4,120,87,0.30);
}
[data-theme="light"] .opp-status-pill--closed {
  background: rgba(200,30,30,0.08);
  color: var(--red);
  border-color: rgba(200,30,30,0.30);
}
[data-theme="light"] .opp-status-pill--awarded {
  background: var(--surface2);
  color: var(--text3);
  border-color: var(--border);
}
[data-theme="light"] .opp-why-link { color: #6a6a6a; }
[data-theme="light"] .opp-why-link:hover { color: var(--accent); }
[data-theme="light"] .opp-set-aside { color: #6a6a6a; }
[data-theme="light"] .opp-set-aside--restricted { color: #b91c1c; }
[data-theme="light"] .opp-meta-dot { color: #a89e84; }
/* Chat */
[data-theme="light"] .chat-bubble.user { background: var(--accent); color: #fff; }
[data-theme="light"] .chat-bubble.ai { background: #F3F5EC; border: 1px solid #d8d6c8; color: var(--text); }
[data-theme="light"] .chat-suggestion { background: #fff; border-color: #d8d6c8; }
[data-theme="light"] .chat-suggestion:hover { background: rgba(230,107,48,0.05); border-color: var(--accent); }
/* Toast */
[data-theme="light"] .toast { background: #fff; border: 1px solid #d8d6c8; box-shadow: 0 4px 16px rgba(0,0,0,0.1); color: var(--text); }
/* Badges — slightly richer colors */
[data-theme="light"] .badge-green { background: rgba(5,150,105,0.08); color: #059669; }
[data-theme="light"] .badge-yellow { background: rgba(217,119,6,0.08); color: #b45309; }
[data-theme="light"] .badge-red { background: rgba(220,38,38,0.06); color: #dc2626; }
[data-theme="light"] .badge-blue { background: rgba(230,107,48,0.07); color: var(--accent); }
/* Scrollbar */
[data-theme="light"] ::-webkit-scrollbar-thumb { background: #cfc9b6; }
[data-theme="light"] ::-webkit-scrollbar-thumb:hover { background: #a89e84; }
/* Theme toggle */
[data-theme="light"] .theme-toggle { color: #6a6a6a; }
[data-theme="light"] .theme-toggle:hover { background: #EAE8DC; color: var(--text); }
/* Buttons in light mode */
[data-theme="light"] .btn-primary { box-shadow: 0 1px 3px rgba(230,107,48,0.30); }
[data-theme="light"] .btn-primary:hover { box-shadow: 0 4px 12px rgba(230,107,48,0.25); }
[data-theme="light"] .btn-secondary { background: #F3F5EC; border-color: #d8d6c8; color: var(--text); }
[data-theme="light"] .btn-secondary:hover { background: #EAE8DC; border-color: var(--accent); color: var(--accent); }

/* === RESET === */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
body {
  font-family: "DM Sans", sans-serif;
  background: var(--bg);
  color: var(--text);
  display: flex;
  height: 100vh;
  overflow: hidden;
  font-size: 15px;
  line-height: 1.5;
  transition: background 0.25s, color 0.25s;
}

/* === SIDEBAR === */
.sidebar {
  width: 230px;
  min-width: 230px;
  background: var(--surface);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  padding: 20px 14px;
  gap: 8px;
  overflow-y: auto;
  transition: background 0.25s, border-color 0.25s;
}
.logo {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 8px 8px 18px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 8px;
}
.logo-mark {
  width: 38px;
  height: 38px;
  background: var(--accent);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 14px;
  color: white;
  flex-shrink: 0;
}
.logo-name { font-weight: 700; font-size: 16px; letter-spacing: -0.3px; }
.logo-sub { font-size: 11px; color: var(--text3); margin-top: 1px; letter-spacing: 0.2px; }
.logo-img { display: none; height: 32px; width: auto; flex-shrink: 0; }
.logo-img--for-dark { display: block; }
[data-theme="light"] .logo-img--for-dark { display: none; }
[data-theme="light"] .logo-img--for-light { display: block; }
.logo--wordmark { flex-direction: column; align-items: flex-start; gap: 6px; }
.logo--wordmark .logo-sub { margin-top: 0; }
.logo--wordmark .logo-mark { display: none; }
.nav { display: flex; flex-direction: column; gap: 3px; flex: 1; }
.nav-btn {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 8px;
  border: none;
  background: none;
  color: var(--text2);
  font-family: inherit;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  text-align: left;
  transition: all 0.15s;
  width: 100%;
}
.nav-btn { opacity: 0.85; }
.nav-btn:hover { background: var(--surface2); color: var(--text); opacity: 1; }
.nav-btn.active { background: var(--accent-dim); color: var(--accent); font-weight: 600; opacity: 1; border-left: 3px solid #E39821; padding-left: 9px; }
.nav-icon { font-size: 16px; width: 22px; text-align: center; }
.sidebar-footer {
  margin-top: auto;
  padding-top: 12px;
  border-top: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.api-status { display: flex; align-items: center; gap: 8px; padding: 6px 12px; font-size: 13px; color: var(--text3); }
.status-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--text3); flex-shrink: 0; transition: all 0.3s; }
.status-dot.online { background: var(--green); box-shadow: 0 0 8px var(--green); }
.status-dot.offline { background: var(--red); }

/* Theme toggle */
.theme-toggle {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  font-size: 13px;
  color: var(--text2);
  cursor: pointer;
  border: none;
  background: none;
  font-family: inherit;
  width: 100%;
  text-align: left;
  border-radius: 6px;
  transition: all 0.15s;
}
.theme-toggle:hover { background: var(--surface2); color: var(--text); }

/* === MAIN CONTENT === */
.main {
  flex: 1;
  overflow: hidden;
  padding: 0;
  transition: background 0.25s;
  display: flex;
  flex-direction: column;
  min-width: 0;
}
/* Trial banner in sidebar */
#trialBanner { flex-shrink: 0; }
.page { display: none; animation: fadeIn 0.2s ease; padding: 28px 32px; flex: 1; overflow-y: auto; }
.page.active { display: flex; flex-direction: column; }
/* Proposals editor: zero padding, fill all available space */
#page-proposals.editor-active { padding: 0 !important; overflow: hidden !important; height: 100% !important; width: 100% !important; }
#page-proposals #proposals-editor-wrap { flex: 1; display: flex; flex-direction: row; overflow: hidden; width: 100%; height: 100%; }
.proposal-editor-layout { display: flex !important; width: 100% !important; height: 100% !important; flex: 1 !important; overflow: hidden !important; }
.ped-sidebar { width: 220px !important; min-width: 220px !important; max-width: 220px !important; flex-shrink: 0 !important; height: 100% !important; overflow-y: auto !important; }
/* Editor right area — fills remaining space */
.proposal-editor-layout > :nth-child(2) { flex: 1 1 0% !important; min-width: 0 !important; display: flex !important; flex-direction: column !important; height: 100% !important; overflow: hidden !important; }
/* Editor area scrollable content */
#emb-ped-editor-area { flex: 1; display: flex; flex-direction: column; overflow-y: auto; min-height: 0; }
/* Spreadsheet + Quill fill remaining space */
#emb-ped-spreadsheet-grid { flex: 1; min-height: 300px; overflow: auto; }
#emb-pedQuillEditor { flex: 1; display: flex; flex-direction: column; min-height: 200px; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: translateY(0); } }

/* === PAGE HEADER === */
.page-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 24px;
  gap: 16px;
}
.page-title { font-size: 24px; font-weight: 700; letter-spacing: -0.4px; }
.page-sub { font-size: 14px; color: var(--text2); margin-top: 3px; }

/* === BUTTONS === */
.btn-primary {
  background: var(--accent);
  color: white;
  border: none;
  border-radius: 8px;
  padding: 8px 16px;
  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s;
  white-space: nowrap;
  box-shadow: 0 1px 2px rgba(114,110,240,0.2);
}
.btn-primary:hover { background: var(--accent-hover); transform: translateY(-1px); box-shadow: 0 3px 8px rgba(114,110,240,0.25); }
.btn-primary:active { transform: translateY(0); }
.btn-primary.full-width { width: 100%; padding: 13px; font-size: 15px; }
.btn-primary:disabled { opacity: 0.5; cursor: default; transform: none; box-shadow: none; }
.btn-secondary {
  background: var(--surface2);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 8px 16px;
  font-family: inherit;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s;
}
.btn-secondary:hover { border-color: var(--accent); color: var(--accent); }
.btn-link { background: none; border: none; color: var(--accent); font-family: inherit; font-size: 14px; cursor: pointer; padding: 0; font-weight: 500; }
.btn-link:hover { text-decoration: underline; }
.btn-back { background: none; border: none; color: var(--text2); font-family: inherit; font-size: 14px; cursor: pointer; padding: 0; }
.btn-back:hover { color: var(--text); }
.btn-sm { font-size: 11px; padding: 4px 10px; border-radius: 6px; }

/* === STATS CARDS === */
.stats-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-bottom: 24px; }
.stat-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px;
  transition: all 0.2s;
  box-shadow: var(--shadow);
}
.stat-card:hover { border-color: var(--accent); transform: translateY(-1px); }
.stat-label { font-size: 12px; color: var(--text2); text-transform: uppercase; letter-spacing: 0.6px; margin-bottom: 8px; font-weight: 600; }
.stat-value { font-size: 30px; font-weight: 700; font-family: var(--mono); letter-spacing: -0.5px; }
.stat-hint { font-size: 13px; color: var(--text3); margin-top: 4px; }

/* === SECTIONS === */
.section-row { display: grid; grid-template-columns: 1fr 340px; gap: 14px; }
.section-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px;
  box-shadow: var(--shadow);
}
.section-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 14px; }
.section-head h2 { font-size: 16px; font-weight: 600; }

/* === SPA INLINE-STYLE SWEEP (260511-ewf) — onboarding, dashboard, sidebar ===
   Per audit 260511-post-m2-regrade §3.5. Extracted from dashboard/index.html
   lines 148-547. All classes use existing semantic palette tokens —
   zero recoloring, zero visual delta from the inline-style baseline.
   `display:none;` retained inline on JS-toggled elements (runtime visibility). */

/* Shared field-label modifier (14× pattern: 12px/600/text2 + mb5 block) */
.field-label-sm { font-size: 12px; font-weight: 600; color: var(--text2); margin-bottom: 5px; display: block; }
/* Shared muted-link pattern (8× — footer-style anchors) */
.muted-link { color: var(--text3); text-decoration: none; border-bottom: 1px solid transparent; }
/* NOTE: .u-w-fill NOT needed — .field-input/.field-textarea already set width:100%; inline width:100% on those is redundant and removes cleanly. */

/* --- Onboarding overlay modal (#onboardingOverlay, lines 208-326) --- */
.ob-overlay {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: rgba(0,0,0,0.85);
  backdrop-filter: blur(8px);
  align-items: center;
  justify-content: center;
}
.ob-modal-wrap { width: 100%; max-width: 520px; padding: 24px; }
.ob-progress-row { margin-bottom: 20px; }
.ob-progress-row-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
.ob-step-label { font-size: 13px; font-weight: 600; color: var(--yellow); }
.ob-skip-btn { background: none; border: none; color: var(--text3); font-size: 13px; cursor: pointer; font-family: inherit; }
.ob-progress-track { height: 4px; background: var(--surface2); border-radius: 2px; }
.ob-progress-bar { height: 4px; background: var(--yellow); border-radius: 2px; width: 33%; transition: width 0.3s; }
.ob-modal-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 32px;
  box-shadow: 0 16px 48px rgba(0,0,0,0.4);
}
.ob-step-title { font-size: 22px; font-weight: 800; color: var(--text); margin-bottom: 4px; }
.ob-step-sub { font-size: 14px; color: var(--text3); margin-bottom: 20px; }
.ob-step-sub--lg { font-size: 14px; color: var(--text3); margin-bottom: 24px; }
.ob-sam-block {
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 16px;
  margin-bottom: 20px;
}
.ob-sam-title { font-size: 14px; font-weight: 700; color: var(--text); margin-bottom: 4px; }
.ob-sam-hint { font-size: 12px; color: var(--text3); margin-bottom: 10px; }
.ob-sam-row { display: flex; gap: 8px; }
.ob-sam-input { flex: 1; text-transform: uppercase; }
.ob-sam-import-btn {
  background: var(--yellow);
  color: #000;
  border: none;
  border-radius: 8px;
  padding: 10px 16px;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  font-family: inherit;
  white-space: nowrap;
}
.ob-sam-result { margin-top: 8px; }
.ob-sam-foot { font-size: 12px; color: var(--text3); margin-top: 8px; }
.ob-sam-foot-link { color: var(--accent); cursor: pointer; text-decoration: underline; }
.ob-manual-divider {
  font-size: 12px;
  font-weight: 600;
  color: var(--text3);
  text-transform: uppercase;
  letter-spacing: .5px;
  margin-bottom: 12px;
}
.ob-field-group { margin-bottom: 12px; }
.ob-field-block { margin-bottom: 16px; }
.ob-field-block--lg { margin-bottom: 24px; }
.ob-country-select { width: 100%; font-size: 14px; padding: 10px; }
.ob-textarea-grow { min-height: 70px; }
.ob-cta-primary {
  width: 100%;
  background: var(--yellow);
  color: #000;
  border: none;
  border-radius: 8px;
  padding: 12px;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  font-family: inherit;
}
.ob-button-row { display: flex; gap: 10px; }
.ob-button-back {
  flex: 1;
  background: var(--surface2);
  border: 1px solid var(--border);
  color: var(--text2);
  border-radius: 8px;
  padding: 12px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
}
.ob-button-next {
  flex: 2;
  background: var(--yellow);
  color: #000;
  border: none;
  border-radius: 8px;
  padding: 12px;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  font-family: inherit;
}
.ob-skip-row { text-align: center; margin-top: 12px; }
.ob-skip-link {
  background: none;
  border: none;
  color: var(--text3);
  font-size: 13px;
  cursor: pointer;
  font-family: inherit;
  text-decoration: underline;
}
.ob-callout-body { font-size: 13px; color: var(--text2); line-height: 1.6; }
.ob-howto-list { font-size: 13px; color: var(--text2); margin: 0; padding-left: 18px; line-height: 1.8; }
.ob-howto-title { font-size: 14px; font-weight: 700; color: var(--text); margin-bottom: 8px; }
.ob-success { text-align: center; padding: 20px 0; }
.ob-success-check { font-size: 48px; margin-bottom: 12px; }
.ob-success-title { font-size: 22px; font-weight: 800; color: var(--text); margin-bottom: 8px; }
.ob-success-sub { font-size: 15px; color: var(--text2); }

/* --- Sidebar (lines 327-388) --- */
.sidebar-profile-progress { padding: 4px 12px 8px; }
.sidebar-profile-progress-track {
  height: 3px;
  background: var(--surface2);
  border-radius: 2px;
  overflow: hidden;
}
.sidebar-profile-progress-bar { height: 3px; border-radius: 2px; transition: width 0.3s; }
.sidebar-notif-wrap { position: relative; padding: 0 12px 8px; }
.sidebar-notif-actions { display: flex; gap: 12px; align-items: center; }
.sidebar-theme-btn {
  background: transparent;
  border: 1px solid var(--border, #2a2d37);
  color: var(--text-muted, #a0a4b0);
  width: 32px;
  height: 32px;
  border-radius: 6px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  line-height: 1;
  padding: 0;
}
/* Nav-badge shared shape — used by #navAmendBadge (yellow) + #navNewTodayBadge (green) + #profileCompleteBadge */
.sidebar-nav-badge {
  font-size: 10px;
  font-weight: 700;
  padding: 1px 6px;
  border-radius: 4px;
  margin-left: auto;
  color: #000;
}
.sidebar-nav-badge--yellow { background: var(--yellow); color: #000; }
.sidebar-nav-badge--green { background: var(--green); color: #fff; }

/* --- Dashboard page (#page-dashboard, lines 389-547) --- */
/* Stat-value color override variants (single-property pills on .stat-value) */
.stat-value--muted { color: var(--text3); }
.stat-value--accent { color: var(--accent); }

.dash-top-matches { margin: 0 0 16px; }
.dash-section-head--split { display: flex; justify-content: space-between; align-items: center; }
.dash-section-link { font-size: 12px; color: var(--accent); cursor: pointer; text-decoration: none; }
.dash-top-matches-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 10px;
}
.dash-smart-actions { margin-bottom: 12px; }
.dash-proposals-wrap { margin-bottom: 16px; }
.dash-section-card-flush { margin: 0; }
.dash-proposals-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 12px;
  padding: 4px 0;
}
.dash-loading-text {
  color: var(--text3);
  font-size: 13px;
  padding: 16px 0;
  text-align: center;
}
.dash-insights-toggle-row { margin: 4px 0 16px; }
.dash-insights-toggle-btn { padding: 8px 14px; font-size: 12px; }
.dash-section-collapsed { margin-bottom: 16px; }
.dash-readiness-badge {
  font-size: 11px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 6px;
}
.dash-readiness-list { display: grid; gap: 12px; padding: 4px 0; }
.dash-analytics-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}
.dash-analytics-col { display: flex; flex-direction: column; gap: 14px; }
.dash-section-card-grow { margin: 0; flex: 1; }
.dash-section-card--top { margin-top: 14px; }
.dash-section-card--top-zerob { margin-top: 14px; margin-bottom: 0; }
.dash-analytics-filter-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  margin-bottom: 4px;
}
.dash-analytics-filter-group { display: flex; align-items: center; gap: 6px; }
.dash-analytics-filter-label { font-size: 12px; color: var(--text3); white-space: nowrap; }
/* Tightly-scoped date/select control used inside #analyticsFiltersRow only */
.dash-analytics-input {
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 4px 8px;
  font-size: 12px;
  color: var(--text);
  font-family: inherit;
}
.dash-analytics-reset {
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 4px 10px;
  font-size: 12px;
  color: var(--text2);
  cursor: pointer;
  font-family: inherit;
}
.dash-heatmap-scroll { overflow-x: auto; }
.dash-pipeline-actions { display: flex; gap: 6px; align-items: center; }
.dash-btn-mini { font-size: 11px; padding: 4px 10px; }
.dash-pipeline-tabs-rel { position: relative; }
.dash-pipeline-hint-icon { position: absolute; right: 0; top: 50%; transform: translateY(-50%); }
.dash-pipeline-view-toggle {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
}
.dash-kanban-toggle-btn {
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 5px 12px;
  font-size: 12px;
  font-weight: 600;
  color: var(--text2);
  cursor: pointer;
  font-family: inherit;
}
.dash-empty-link { color: var(--accent); cursor: pointer; font-weight: 600; }
.dash-kanban-scroll { overflow-x: auto; }
.dash-recently-viewed-wrap { margin-bottom: 16px; }
.dash-partners-wrap { margin-top: 16px; }

/* Sidebar logo + logo-mark span colors (static brand glyphs) */
.sidebar-logo-clickable { cursor: pointer; }
.sidebar-logo-mark-fg { color: #fff; }
.sidebar-logo-mark-bg { color: #E39821; }
/* Notif "Clear all" red variant — display:none retained inline (JS-toggled) */
.sidebar-notif-clear { color: var(--red, #f87171); }
/* End SPA INLINE-STYLE SWEEP (260511-ewf) — Chunk A */

/* === OPPORTUNITY CARDS === */
.opp-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 18px 20px;
  margin-bottom: 14px;
  cursor: pointer;
  transition: all 0.15s;
  box-shadow: var(--shadow);
}
.opp-card:hover { border-color: var(--accent); border-left: 3px solid var(--accent); transform: translateY(-1px); box-shadow: 0 4px 16px rgba(0,0,0,0.12); }
.opp-card-header { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 8px; gap: 12px; }
.opp-title { font-size: 18px; font-weight: 600; line-height: 1.4; overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.opp-meta { display: flex; gap: 8px; font-size: 12px; color: var(--text3); flex-wrap: wrap; align-items: center; }
.opp-meta span { display: flex; align-items: center; gap: 4px; }
.opp-tags { display: flex; gap: 6px; margin-top: 10px; flex-wrap: wrap; }
.tag {
  font-size: 12px;
  padding: 3px 10px;
  border-radius: 5px;
  background: var(--surface2);
  color: var(--text2);
  border: 1px solid var(--border);
  font-weight: 500;
}

/* === OPP CARD — 260428-mp4 type scale + 2+1 palette === */
.opp-notice-type {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text3);
  margin-bottom: 6px;
  line-height: 1.2;
}
.opp-deadline {
  font-size: 14px;
  font-weight: 700;
  color: var(--accent);
  margin: 4px 0 8px;
  line-height: 1.3;
}
.opp-deadline--urgent { color: var(--red); }
.opp-deadline--muted  { color: var(--text3); font-weight: 600; }
.opp-deadline--closed { color: var(--red); }

.opp-meta-dot {
  color: var(--text3);
  margin: 0 2px;
  font-weight: 400;
  user-select: none;
}

.opp-rec-pill {
  display: inline-block;
  font-size: 12px;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 5px;
  white-space: nowrap;
  border: 1px solid transparent;
  line-height: 1.4;
}
.opp-rec-pill--go {
  background: rgba(184,227,56,0.12);
  color: var(--green);
  border-color: rgba(184,227,56,0.30);
}
.opp-rec-pill--pass {
  background: rgba(239,68,68,0.10);
  color: var(--red);
  border-color: rgba(239,68,68,0.30);
}
.opp-rec-pill--review {
  background: var(--surface2);
  color: var(--text2);
  border-color: var(--border);
}

/* === 260504-p3n: status pill (Open/Closed/Awarded) === */
.opp-status-pill {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 5px;
  white-space: nowrap;
  border: 1px solid transparent;
  line-height: 1.4;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.opp-status-pill--open {
  background: var(--green-dim);
  color: var(--green);
  border-color: rgba(184,227,56,0.30);
}
.opp-status-pill--closed {
  background: var(--red-dim);
  color: var(--red);
  border-color: rgba(248,113,113,0.30);
}
.opp-status-pill--awarded {
  background: var(--surface2);
  color: var(--text3);
  border-color: var(--border);
}

/* === 260504-v8b: opp-card B3 — bilateral deadline + data strip === */
.opp-deadline-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 4px 12px;
  flex-wrap: wrap;
}
.opp-data-strip {
  display: flex;
  align-items: baseline;
  gap: 6px;
  font-size: 12px;
  color: var(--text3);
  line-height: 1.3;
  flex-shrink: 0;
}
.opp-data-strip__sep {
  color: var(--text3);
  opacity: 0.5;
  user-select: none;
}
.opp-data-strip__value {
  color: var(--green);
  font-weight: 700;
}
.opp-data-strip__naics {
  font-family: var(--mono);
}

.opp-why-link {
  font-size: 11px;
  color: var(--text3);
  text-decoration: none;
  cursor: pointer;
  background: transparent;
  border: 0;
  padding: 0;
  font-family: inherit;
}
.opp-why-link:hover { text-decoration: underline; color: var(--text2); }

.opp-set-aside {
  font-size: 12px;
  color: var(--text3);
  margin-top: 6px;
  line-height: 1.4;
}
.opp-set-aside--restricted { color: var(--red); font-weight: 600; }

.opp-compare-demoted {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 10px;
  color: var(--text3);
  cursor: pointer;
  white-space: nowrap;
  margin-top: 4px;
}
.opp-compare-demoted input { accent-color: var(--accent); cursor: pointer; }

/* === OPP TABLE (W1T5 — quick-260509-w3t) ===
   Dense, sortable 8-col list view of opportunities. Default on desktop;
   forced cards on <768px viewports per locked decision C-3. Tabular numerals
   on Closing/NAICS columns make deadlines/codes scan vertically (rubric B2).
*/
.tabular { font-variant-numeric: tabular-nums; }
.opp-table {
  width: 100%;
  border-collapse: collapse;
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
  font-size: 13px;
}
.opp-table thead { background: var(--surface2); }
.opp-table th {
  padding: 10px 12px;
  text-align: left;
  font-size: 11px;
  font-weight: 700;
  color: var(--text3);
  text-transform: uppercase;
  letter-spacing: .5px;
  user-select: none;
  border-bottom: 1px solid var(--border);
}
.opp-table th[data-sort-col] { cursor: pointer; }
.opp-table th[data-sort-col]:hover { background: var(--surface); color: var(--text2); }
.opp-table th[aria-sort="ascending"]::after  { content: " ↑"; color: var(--accent); }
.opp-table th[aria-sort="descending"]::after { content: " ↓"; color: var(--accent); }
.opp-table th[aria-sort="none"]::after        { content: ""; }
.opp-table tbody tr.opp-table-row {
  border-bottom: 1px solid var(--border);
  cursor: pointer;
}
.opp-table tbody tr.opp-table-row:hover { background: var(--surface2); }
.opp-table tbody tr.opp-table-row[tabindex="0"] {
  outline: 2px solid var(--accent);
  outline-offset: -2px;
}
.opp-table td {
  padding: 10px 12px;
  color: var(--text);
  vertical-align: top;
}
.opp-table td.tabular { font-variant-numeric: tabular-nums; }
.opp-table__title { color: var(--accent); font-weight: 600; text-decoration: none; }
.opp-table__title:hover { text-decoration: underline; }
.opp-table__naics { color: var(--text2); }
.opp-table__urgent { color: var(--red); font-weight: 600; }
.opp-table-expand-zone { display: none; }
.opp-table-expand-zone.open { display: table-row; }
.opp-table-expand-zone > td {
  background: var(--surface2);
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
}
@media (max-width: 767px) {
  /* quick-260511-oe9 Wave 3: removed forced flags on .opp-table + #oppViewToggleWrap.
     L841 .opp-table has no display rule; UA <table> default display:table is beaten
     by author rule (0,1,0) without forced flag. #oppViewToggleWrap has no competing
     rule, JS does not set inline display. */
  .opp-table { display: none; }
  #oppViewToggleWrap { display: none; }
  /* A2 M2 (260510-60d): top-matches lane single-column on mobile.
     Forced flag needed because default grid is set via inline style on the
     element, which beats class-selector specificity. */
  #dashboardTopMatchesList { grid-template-columns: 1fr !important; }
}

/* === FILTERS === */
.filter-bar { display: flex; gap: 8px; margin-bottom: 16px; flex-wrap: wrap; }
.search-input {
  flex: 1;
  min-width: 200px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 10px 14px;
  color: var(--text);
  font-family: inherit;
  font-size: 14px;
  transition: border-color 0.15s;
}
.search-input:focus, .field-input:focus, .field-textarea:focus, .chat-input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-dim); }
.search-input::placeholder, .field-input::placeholder, .field-textarea::placeholder, .chat-input::placeholder { color: var(--text3); }
.filter-select {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 9px 12px;
  color: var(--text);
  font-family: inherit;
  font-size: 13px;
  cursor: pointer;
  transition: border-color 0.15s;
  max-width: 180px;
}
.filter-select:focus { border-color: var(--accent); }

/* === SPA INLINE-STYLE SWEEP (260511-ewf) — opportunities, workspace, market intel, profile, calendar ===
   Continued from chunk A. Extracted from dashboard/index.html lines 548-1248.
   .opp-* prefix already heavily used by existing opp-card styles — extend, don't fork.
   .field-input already sets width:100%; inline `width:100%` on those is redundant.
   `display:none;` retained inline on JS-toggled containers (runtime visibility). */

/* --- Opportunities page (#page-opportunities, lines 548-702) --- */
.opp-page-sub-meta { color: var(--text3); }
.opp-sync-freshness { font-size: 11px; color: var(--text3); }
.opp-page-sub-link {
  color: var(--accent);
  text-decoration: none;
  font-weight: 600;
}
.opp-status-tabs { display: flex; gap: 6px; margin-bottom: 12px; flex-wrap: wrap; }
.opp-search-row {
  display: flex;
  gap: 8px;
  align-items: center;
  margin-bottom: 10px;
}
.opp-search-input { flex: 1; }
.opp-search-btn { padding: 10px 16px; white-space: nowrap; }
.opp-saved-wrap { position: relative; display: inline-block; }
.opp-saved-btn { padding: 10px 14px; white-space: nowrap; font-size: 13px; }
.opp-saved-count {
  margin-left: 4px;
  padding: 1px 6px;
  border-radius: 10px;
  background: var(--accent-dim);
  color: var(--accent);
  font-size: 11px;
  font-weight: 700;
}
.opp-saved-popover {
  position: absolute;
  right: 0;
  top: calc(100% + 6px);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  min-width: 280px;
  max-width: 360px;
  max-height: 360px;
  overflow-y: auto;
  z-index: 200;
  box-shadow: var(--shadow-lg, 0 8px 24px rgba(0,0,0,0.18));
  padding: 8px;
}
.opp-smart-match-btn { white-space: nowrap; padding: 10px 16px; }
.opp-filter-toggle-btn {
  white-space: nowrap;
  padding: 10px 16px;
  position: relative;
}
.opp-filter-badge {
  position: absolute;
  top: -6px;
  right: -6px;
  background: var(--accent);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  align-items: center;
  justify-content: center;
}
.opp-sort-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--text2);
  white-space: nowrap;
}
.opp-sort-select { max-width: 190px; }
.opp-view-toggle-wrap {
  display: flex;
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
}
.opp-view-toggle-btn {
  padding: 8px 12px;
  font-size: 12px;
  border: none;
  border-radius: 0;
  cursor: pointer;
  font-family: inherit;
  font-weight: 600;
}
.opp-view-toggle-btn--active {
  background: var(--surface2);
  color: var(--text);
  border-right: 1px solid var(--border);
}
.opp-view-toggle-btn--inactive {
  background: transparent;
  color: var(--text2);
}
.opp-naics-quick-chip { margin-bottom: 8px; }
.opp-ai-search-info {
  font-size: 12px;
  color: var(--accent);
  padding: 2px 0 6px;
}
.opp-ai-expanded-pills { margin-top: 6px; margin-bottom: 4px; }
.opp-active-filter-pills {
  margin-bottom: 10px;
  gap: 6px;
  flex-wrap: wrap;
  align-items: center;
}
.opp-filter-panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 18px 20px;
  margin-bottom: 14px;
}
.opp-filter-group { margin-bottom: 16px; }
.opp-filter-group-title {
  font-size: 11px;
  font-weight: 700;
  color: var(--text3);
  text-transform: uppercase;
  letter-spacing: .5px;
  padding-bottom: 6px;
  margin-bottom: 10px;
  border-bottom: 1px solid var(--border);
}
.opp-filter-two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px 20px;
}
.opp-filter-two-col--gap-top { margin-top: 12px; }
/* Shared select width override — overrides .filter-select max-width:180px when used inside a full-width grid cell. Used in opportunities filter panel + profile intl fields. */
.opp-filter-select-full, .select-full { width: 100%; max-width: 100%; }
.opp-filter-actions { display: flex; gap: 8px; align-items: center; }
.opp-filter-action-btn { padding: 8px 16px; font-size: 12px; }
.opp-filter-action-btn--sm { padding: 8px 14px; font-size: 12px; }
.opp-result-count {
  font-size: 13px;
  color: var(--text2);
  padding: 4px 0 10px;
}
.opp-pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 4px;
  padding: 16px 0;
}

/* Static initial-hidden utility — for elements that start hidden and are
   later revealed via `element.style.display = '<value>'` (inline style wins
   over class on show, so no JS migration needed). DO NOT use on elements
   whose visibility is class-toggled (none of these are). */
.u-display-none { display: none; }

/* === WORKSPACE === */
.workspace-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 20px; }
.workspace-actions { display: flex; gap: 8px; }
.tender-hero {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px 28px;
  margin-bottom: 20px;
  box-shadow: var(--shadow);
}
.hero-badge { display: inline-block; font-size: 12px; padding: 4px 12px; border-radius: 5px; background: var(--accent-dim); color: var(--accent); margin-bottom: 12px; text-transform: uppercase; letter-spacing: 0.6px; font-weight: 700; }
.hero-title { font-size: 22px; font-weight: 700; line-height: 1.3; margin-bottom: 10px; letter-spacing: -0.3px; }
.hero-meta { font-size: 14px; color: var(--text2); display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.meta-sep { color: var(--text3); }
.ws-grid { display: grid; grid-template-columns: 1fr 260px; gap: 16px; }
.ws-tabs {
  display: flex;
  gap: 0;
  background: var(--surface);
  border: 1px solid var(--border);
  border-bottom: none;
  border-radius: 10px 10px 0 0;
  padding: 0;
  margin-bottom: 0;
}
.ws-tab {
  flex: 1;
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  padding: 10px 10px;
  font-family: inherit;
  font-size: 13px;
  font-weight: 500;
  color: var(--text3);
  cursor: pointer;
  transition: all 0.15s;
}
.ws-tab:hover { color: var(--text2); background: var(--surface2); }
.ws-tab.active { color: var(--accent); font-weight: 600; border-bottom-color: var(--accent); background: var(--surface2); }
.ws-panel.active { border: 1px solid var(--border); border-top: none; border-radius: 0 0 10px 10px; padding: 16px; }
.ws-panel { display: none; }
.ws-panel.active { display: block; }
.ws-sidebar { display: flex; flex-direction: column; gap: 10px; }
.ws-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 16px;
  box-shadow: var(--shadow);
}
.ws-card-title { font-size: 12px; text-transform: uppercase; letter-spacing: 0.6px; color: var(--text2); margin-bottom: 8px; font-weight: 700; }
.score-display { font-size: 38px; font-weight: 700; font-family: var(--mono); color: var(--accent); }
.score-label { font-size: 13px; color: var(--text2); margin-top: 2px; }

/* --- Workspace page (#page-workspace, lines 704-841) --- SPA INLINE-STYLE SWEEP (260511-ewf) */
.wks-pipeline-action-wrap { position: relative; display: inline-block; }
.wks-pipeline-btn { padding: 8px 16px; font-size: 13px; }
.wks-pipeline-dropdown {
  position: absolute;
  right: 0;
  top: 100%;
  margin-top: 4px;
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 6px;
  min-width: 200px;
  z-index: 100;
  box-shadow: var(--shadow-lg);
}
.wks-research-sub-tabs { display: flex; gap: 8px; margin-bottom: 14px; }
.wks-research-sub-tab {
  flex: 1;
  padding: 8px;
  font-size: 13px;
  font-weight: 600;
}
.wks-research-sub-tab--lite { font-weight: normal; }
.wks-loading-muted {
  color: var(--text3);
  font-size: 13px;
  padding: 20px;
}
.wks-loading-muted--block { padding: 20px 0; }
.wks-partner-filters {
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 12px;
  margin-bottom: 12px;
}
.wks-partner-filters-title {
  font-size: 11px;
  font-weight: 700;
  color: var(--text3);
  text-transform: uppercase;
  letter-spacing: .5px;
  margin-bottom: 8px;
}
.wks-partner-filters-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.wks-partner-capability-select { width: 170px; }
.wks-partner-role-select { width: 150px; }
.wks-partner-size-select { width: 150px; }
.wks-partner-loading {
  padding: 20px;
  text-align: center;
}
.wks-capability-cta { margin-top: 8px; }
.wks-analysis-action-row {
  display: flex;
  gap: 8px;
  margin-bottom: 4px;
  flex-wrap: wrap;
}
.wks-analysis-action-primary { flex: 1; }
.wks-analysis-action-secondary {
  flex-shrink: 0;
  padding: 10px 16px;
}
.wks-analysis-action--ptw { color: var(--green); border-color: var(--green); }
.wks-analysis-result { margin-top: 16px; }
.wks-chat-section {
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
}
.wks-chat-section-title {
  font-size: 13px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 10px;
}
.wks-chat-messages-clamped { max-height: 300px; }
.wks-bw-emoji {
  font-size: 36px;
  margin-bottom: 12px;
}
.wks-bw-title {
  margin: 0 0 8px;
  font-size: 18px;
  color: var(--text);
}
.wks-bw-blurb {
  color: var(--text3);
  font-size: 14px;
  margin: 0 0 20px;
  max-width: 400px;
  margin-left: auto;
  margin-right: auto;
}
.wks-bw-proposal-link {
  padding: 40px 20px;
  text-align: center;
}
.wks-bw-proposal-actions {
  display: flex;
  gap: 10px;
  justify-content: center;
  flex-wrap: wrap;
}
.wks-bw-open-btn { padding: 10px 24px; font-size: 14px; }
.wks-bw-existing { margin-top: 20px; }
.wks-compliance-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}
.wks-compliance-head-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--text2);
}
.wks-compliance-head-link {
  font-size: 12px;
  color: var(--text3);
}
.wks-compliance-loading {
  padding: 40px 20px;
  text-align: center;
  color: var(--text3);
}
.wks-card-score-loading {
  font-size: 28px;
  color: var(--text3);
}
.wks-card-score-breakdown { margin-top: 6px; }
.wks-card-meta-loading {
  color: var(--text3);
  font-size: 13px;
}

/* === MARKET INTEL (260511-ewf) — #page-marketintel (lines 843-962) === */
.mi-tabs-wrap { margin-bottom: 14px; }
.mi-search-row {
  display: flex;
  gap: 8px;
  align-items: center;
  margin-bottom: 12px;
}
.mi-search-row--wrap {
  flex-wrap: wrap;
}
.mi-search-input-flex { flex: 1; }
.mi-search-naics { width: 100px; }
.mi-search-date-range { width: 130px; }
.mi-search-btn { padding: 10px 18px; }
.mi-agency-select { width: 180px; }
.mi-setaside-select { width: 160px; }
.mi-size-select { width: 160px; }
.mi-compare-btn {
  white-space: nowrap;
  margin-left: auto;
}
.mi-comp-market-share { margin-bottom: 14px; }
.mi-stats-bar {
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 14px 20px;
  margin-bottom: 12px;
}
.mi-db-search-row {
  display: flex;
  gap: 8px;
  align-items: center;
  margin-bottom: 8px;
  flex-wrap: wrap;
}
.mi-db-search-input {
  flex: 1;
  min-width: 200px;
}
.mi-db-export-btn { padding: 10px 14px; font-size: 13px; }
.mi-db-ai-info {
  font-size: 12px;
  color: var(--accent);
  padding: 2px 0 6px;
}
.mi-db-filter-row {
  display: flex;
  gap: 8px;
  margin-bottom: 12px;
  flex-wrap: wrap;
  align-items: center;
}
.mi-db-type { max-width: 180px; }
.mi-db-naics { width: 120px; }
.mi-db-agency { width: 180px; }
.mi-db-setaside { max-width: 180px; }
.mi-db-year { width: 90px; }
.mi-db-clear-btn {
  background: none;
  border: none;
  color: var(--text3);
  font-size: 12px;
  cursor: pointer;
  font-family: inherit;
  padding: 6px;
}
.mi-db-result-info {
  font-size: 13px;
  color: var(--text2);
  padding: 4px 0 10px;
}
.mi-db-pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 4px;
  padding: 16px 0;
}
.mi-forecast-row {
  display: flex;
  gap: 12px;
  margin-bottom: 16px;
  flex-wrap: wrap;
  align-items: center;
}
.mi-forecast-naics { width: 180px; }
.mi-forecast-agency {
  flex: 1;
  min-width: 180px;
}
.mi-forecast-btn { padding: 8px 16px; }
.mi-forecast-empty {
  color: var(--text3);
  font-style: italic;
}

/* === CHAT === */
.chat-container { display: flex; flex-direction: column; gap: 12px; height: 500px; }
.chat-messages { flex: 1; overflow-y: auto; display: flex; flex-direction: column; gap: 8px; padding: 4px 0; }
.chat-bubble { max-width: 80%; padding: 12px 16px; border-radius: 14px; font-size: 14px; line-height: 1.6; }
.chat-bubble.user { align-self: flex-end; background: var(--accent); color: white; border-bottom-right-radius: 4px; }
.chat-bubble.ai { align-self: flex-start; background: var(--surface2); color: var(--text); border: 1px solid var(--border); border-bottom-left-radius: 4px; }
.chat-suggestions { display: flex; flex-wrap: wrap; gap: 6px; }
.chat-suggestion {
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 6px 14px;
  font-size: 13px;
  color: var(--text2);
  cursor: pointer;
  font-family: inherit;
  transition: all 0.15s;
}
.chat-suggestion:hover { border-color: var(--accent); color: var(--accent); }
.chat-input-row { display: flex; gap: 8px; }
.chat-input {
  flex: 1;
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 11px 14px;
  color: var(--text);
  font-family: inherit;
  font-size: 14px;
}

/* === PIPELINE === */
.pipeline-tabs { display: flex; gap: 4px; margin-bottom: 18px; flex-wrap: wrap; }
.pipeline-tab {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 7px 18px;
  font-family: inherit;
  font-size: 14px;
  font-weight: 500;
  color: var(--text2);
  cursor: pointer;
  transition: all 0.15s;
}
.pipeline-tab:hover { border-color: var(--accent); color: var(--accent); }
.pipeline-tab.active { background: var(--accent); border-color: var(--accent); color: white; }

/* === PROFILE === */
.profile-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.profile-section {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 22px 24px;
  box-shadow: var(--shadow);
}
.profile-section-title { font-size: 15px; font-weight: 700; margin-bottom: 16px; padding-bottom: 10px; border-bottom: 1px solid var(--border); }
.field-group { margin-bottom: 16px; }
.field-label { display: block; font-size: 13px; color: var(--text2); margin-bottom: 6px; font-weight: 600; }
.field-label--bold { font-weight: 700; }
.field-input, .field-textarea {
  width: 100%;
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 10px 14px;
  color: var(--text);
  font-family: inherit;
  font-size: 14px;
  transition: border-color 0.15s;
}
.field-textarea { resize: vertical; min-height: 80px; }
.field-hint { font-size: 12px; color: var(--text3); margin-top: 5px; line-height: 1.5; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.cert-checkboxes { display: flex; flex-direction: column; gap: 12px; }
.cert-check { display: flex; align-items: center; gap: 10px; font-size: 14px; color: var(--text); cursor: pointer; }
.cert-check input { width: 18px; height: 18px; cursor: pointer; accent-color: var(--accent); }

/* --- Profile page (#page-profile, lines 983-1224) --- SPA INLINE-STYLE SWEEP (260511-ewf) */
/* Section heading + two-col grid resolved once (each used 3+ times) */
.prof-section-heading {
  font-size: 11px;
  font-weight: 700;
  color: var(--text3);
  text-transform: uppercase;
  letter-spacing: .5px;
  padding-bottom: 6px;
  margin-bottom: 10px;
  border-bottom: 1px solid var(--border);
}
.prof-two-col-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px 20px;
}
.prof-two-col-grid--tight { gap: 10px 20px; }
.prof-header-actions {
  display: flex;
  gap: 8px;
  align-items: center;
}
.prof-restart-onboarding-btn {
  background: var(--surface2);
  border: 1px solid var(--border);
  color: var(--text2);
  padding: 8px 14px;
  border-radius: 8px;
  font-size: 13px;
  cursor: pointer;
  font-family: inherit;
}
.prof-section--country {
  grid-column: 1 / -1;
  background: var(--accent-dim);
  border: 1px solid rgba(114, 110, 240, 0.15);
}
.prof-country-row {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}
.prof-country-copy {
  flex: 1;
  min-width: 200px;
}
.prof-country-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 4px;
}
.prof-country-sub {
  font-size: 12px;
  color: var(--text3);
}
.prof-country-select {
  min-width: 220px;
  max-width: 300px;
  font-size: 14px;
  padding: 10px 12px;
}
.prof-sam-block {
  background: var(--accent-dim);
  border: 1px solid rgba(114, 110, 240, 0.2);
  border-radius: 10px;
  padding: 14px;
  margin-bottom: 14px;
}
.prof-sam-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 6px;
}
.prof-sam-desc {
  font-size: 13px;
  color: var(--text2);
  margin-bottom: 10px;
}
.prof-sam-row { display: flex; gap: 8px; }
.prof-sam-input-flex { flex: 1; }
.prof-sam-import-btn {
  padding: 8px 16px;
  font-size: 13px;
  white-space: nowrap;
}
.prof-sam-result { margin-top: 8px; }
.prof-sam-divider {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid rgba(114, 110, 240, 0.15);
}
.prof-sam-cta {
  display: flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
  padding: 10px 14px;
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 8px;
  transition: background .15s;
}
.prof-sam-cta-icon {
  font-size: 24px;
  flex-shrink: 0;
}
.prof-sam-cta-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
}
.prof-sam-cta-arrow {
  font-size: 18px;
  color: var(--accent);
  flex-shrink: 0;
  margin-left: auto;
}
.prof-cage-input { max-width: 200px; }
.prof-intl-section {
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid var(--border);
}
.prof-intl-section-title {
  font-size: 12px;
  font-weight: 700;
  color: var(--text3);
  text-transform: uppercase;
  letter-spacing: .5px;
  margin-bottom: 10px;
}
.prof-cert-row-mt8 { margin-top: 8px; }
.prof-field-row-mt10 { margin-top: 10px; }
.prof-naics-suggest-row { margin-top: 10px; }
.prof-naics-suggest-btn {
  font-size: 12px;
  padding: 6px 14px;
}
.prof-naics-suggestions { margin-top: 10px; }
.prof-cert-intl-note {
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 8px 12px;
  margin-bottom: 8px;
  font-size: 12px;
  color: var(--text2);
}
.prof-notif-hint {
  font-size: 11px;
  color: var(--text3);
  margin-top: 4px;
  margin-left: 24px;
}
.prof-cert-check--mt8 { margin-top: 8px; }
.prof-past-perf-block {
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 14px;
}
.prof-past-perf-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
}
.prof-past-perf-head-title {
  font-size: 12px;
  font-weight: 700;
  color: var(--text3);
  text-transform: uppercase;
  letter-spacing: .5px;
}
.prof-past-perf-add-btn {
  font-size: 12px;
  padding: 4px 12px;
}
.prof-past-perf-hint {
  font-size: 12px;
  color: var(--text3);
  margin-top: 6px;
}
.prof-section--full {
  grid-column: 1 / -1;
}
.prof-section-title--bare {
  border: none;
  padding: 0;
  margin-bottom: 0;
}
.prof-docs-desc {
  font-size: 13px;
  color: var(--text2);
  margin: 8px 0 14px;
}
.prof-doc-dropzone {
  border: 2px dashed var(--border);
  border-radius: 10px;
  padding: 24px 16px;
  text-align: center;
  color: var(--text3);
  margin-bottom: 14px;
  cursor: pointer;
  transition: border-color .2s, background .2s;
}
.prof-doc-dropzone-icon { font-size: 22px; }
.prof-doc-dropzone-label { font-size: 13px; }
.prof-doc-dropzone-meta {
  font-size: 11px;
  color: var(--text3);
}

/* === EMPTY STATES === */
.empty-state { display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 48px 24px; text-align: center; gap: 10px; }
.empty-state.small { padding: 24px; }
.empty-icon { font-size: 36px; color: var(--text3); margin-bottom: 4px; }
.empty-title { font-size: 17px; font-weight: 600; color: var(--text); }
.empty-sub { font-size: 14px; color: var(--text2); max-width: 380px; line-height: 1.5; }
.empty-state .btn-primary { margin-top: 12px; }

/* Stage 1 Item 1.3 — branched fetch-error states (429 / 5xx / offline / generic).
   Replaces the misleading "0 of 0 opportunities" rocket-emoji false-success card. */
.error-state {
  max-width: 480px;
  margin: 64px auto;
  padding: 32px;
  border-radius: 12px;
  text-align: center;
}
.error-state--error   { background: #fef2f2; border: 1px solid #fecaca; }
.error-state--warning { background: #fffbeb; border: 1px solid #fde68a; }
.error-state--info    { background: #eff6ff; border: 1px solid #bfdbfe; }
.error-state__title   { font-size: 18px; font-weight: 600; color: var(--text); margin: 0 0 8px; }
.error-state__body    { font-size: 14px; color: var(--text2); margin: 0 0 16px; line-height: 1.5; }
.error-state__action  { display: inline-block; }

/* === UTILITIES === */
.loading-pulse { color: var(--text2); font-size: 14px; padding: 20px 0; animation: pulse 1.5s infinite; }
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.4; } }
@keyframes spin { to { transform: rotate(360deg); } }
.loading-spinner {
  display: inline-block;
  width: 20px;
  height: 20px;
  border: 2px solid var(--border);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
  vertical-align: middle;
}
.loading-spinner.lg { width: 32px; height: 32px; border-width: 3px; }
@keyframes tcPulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.45; } }
.result-count { font-size: 13px; color: var(--text2); margin-bottom: 12px; }
.badge { display: inline-block; font-size: 12px; padding: 3px 10px; border-radius: 5px; font-weight: 600; }
.badge-green { background: var(--green-dim); color: var(--green); }
.badge-yellow { background: var(--yellow-dim); color: var(--yellow); }
.badge-red { background: var(--red-dim); color: var(--red); }
.badge-blue { background: var(--accent-dim); color: var(--accent); }
/* Phase 19: Owner role badge — reuses existing --purple/--purple-dim tokens */
.badge-purple { background: var(--purple-dim); color: var(--purple); }

/* Phase 19: Workspace switcher */
.ws-switcher-wrap { position: relative; margin: 12px 16px 8px; }
.ws-switcher-btn {
  display: flex; align-items: center; gap: 8px; width: 100%;
  padding: 8px 12px; background: var(--surface); border: 1px solid var(--border);
  border-radius: 8px; color: var(--text); font-size: 14px; font-weight: 600;
  cursor: pointer; text-align: left; font-family: inherit;
}
.ws-switcher-btn:hover { background: var(--surface2); }
.ws-switcher-btn:focus-visible { outline: none; box-shadow: 0 0 0 3px var(--accent-dim); }
.ws-switcher-icon { font-size: 14px; color: var(--text2); }
.ws-switcher-label { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ws-switcher-caret { font-size: 12px; color: var(--text3); }
.ws-switcher-panel {
  position: absolute; top: calc(100% + 4px); left: 0; right: 0;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 8px; padding: 4px; z-index: 50;
  box-shadow: 0 8px 24px rgba(0,0,0,0.4);
}
.ws-switcher-item {
  display: flex; align-items: center; gap: 8px;
  padding: 8px 12px; border-radius: 6px; cursor: pointer; color: var(--text); font-size: 14px;
}
.ws-switcher-item:hover { background: var(--surface2); }
.ws-switcher-item.active { background: var(--accent-dim); color: var(--accent); font-weight: 600; }
.ws-switcher-item:focus-visible { outline: none; box-shadow: 0 0 0 3px var(--accent-dim); }
.ws-switcher-item-name { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ws-switcher-item-meta { font-size: 12px; color: var(--text3); }
.ws-switcher-footer { border-top: 1px solid var(--border); margin-top: 4px; padding-top: 4px; }
.ws-switcher-footer a {
  display: block; padding: 8px 12px; color: var(--accent);
  font-size: 14px; font-weight: 600; text-decoration: none;
}
.ws-switcher-footer a:hover { background: var(--surface2); }

/* Phase 19: Workspace Settings page */
.ws-settings-tabs { display: flex; gap: 4px; margin-bottom: 16px; border-bottom: 1px solid var(--border); }
.ws-settings-tab {
  padding: 8px 16px; background: none; border: none; color: var(--text2);
  font-size: 14px; font-weight: 600; cursor: pointer;
  border-bottom: 2px solid transparent; font-family: inherit;
}
.ws-settings-tab.active { color: var(--text); border-bottom-color: var(--accent); }
.ws-settings-tab:focus-visible { outline: none; box-shadow: 0 0 0 3px var(--accent-dim); }
.ws-settings-panel .section-heading {
  font-size: 16px; font-weight: 600; margin: 16px 0 8px; color: var(--text);
}
.member-row, .invite-row {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 0; border-bottom: 1px solid var(--border);
}
.avatar-initials {
  width: 32px; height: 32px; border-radius: 50%;
  background: var(--surface2); color: var(--text);
  display: flex; align-items: center; justify-content: center;
  font-weight: 600; font-size: 12px;
}
.member-meta { flex: 1; min-width: 0; }
.member-name { font-size: 14px; font-weight: 600; color: var(--text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.member-email { font-size: 14px; color: var(--text2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.member-joined { font-size: 12px; color: var(--text3); }
.member-joined.expired { color: var(--red); }
.invite-form { display: flex; gap: 8px; margin-bottom: 16px; flex-wrap: wrap; align-items: center; }
.invite-form input[type=email] { flex: 1; min-width: 220px; }
.invite-form select { width: 180px; }

/* Phase 19: Soft-lock banner (proposal section collaboration indicator) */
.section-lock-banner {
  display: flex; align-items: center; gap: 8px;
  padding: 8px 16px; margin-bottom: 12px;
  background: var(--yellow-dim); border-left: 4px solid var(--yellow);
  border-radius: 4px; font-size: 14px; color: var(--yellow);
  animation: slideUp 0.25s ease;
}
.section-lock-banner .avatar-initials { width: 20px; height: 20px; font-size: 12px; }
.section-lock-banner-text { flex: 1; }
.section-lock-banner-name { font-weight: 600; }
.section-lock-banner-time { color: var(--text3); font-weight: 400; }
.section-lock-banner-dismiss {
  background: none; border: none; color: var(--yellow);
  cursor: pointer; font-size: 16px; line-height: 1;
  padding: 4px 8px; border-radius: 4px; font-family: inherit;
}
.section-lock-banner-dismiss:hover { background: rgba(251,191,36,0.2); }

/* Phase 1 loud-failure: persistent billing banner for AI credit / billing errors.
   Does NOT auto-dismiss — user must click the × button. */
.ped-billing-banner {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 10px 14px;
  margin: 8px 0 12px 0;
  background: var(--red-dim);
  border: 1px solid var(--red);
  border-left: 3px solid var(--red);
  border-radius: 6px;
  color: var(--red);
  font-size: 13px;
  line-height: 1.4;
}
.ped-billing-banner-icon {
  font-weight: 700;
  flex: 0 0 auto;
  margin-top: 1px;
}
.ped-billing-banner-text {
  flex: 1 1 auto;
  color: var(--text1, inherit);
}
.ped-billing-banner-text strong {
  color: var(--red);
  margin-right: 4px;
}
.ped-billing-banner-close {
  flex: 0 0 auto;
  background: none;
  border: none;
  color: var(--red);
  cursor: pointer;
  font-size: 18px;
  line-height: 1;
  padding: 0 4px;
  opacity: 0.75;
}
.ped-billing-banner-close:hover,
.ped-billing-banner-close:focus-visible {
  opacity: 1;
  outline: 2px solid var(--red);
  outline-offset: 2px;
}
.toast {
  position: fixed;
  bottom: 24px;
  right: 24px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 14px 20px;
  font-size: 14px;
  font-weight: 500;
  z-index: 10001;
  box-shadow: var(--shadow-lg);
  animation: slideUp 0.25s ease;
}
@keyframes slideUp { from { transform: translateY(10px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }

/* === SCROLLBAR === */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--text3); }

/* === RESPONSIVE === */
@media (max-width: 1100px) {
  .stats-row { grid-template-columns: repeat(2, 1fr); }
  .section-row, .profile-grid, .ws-grid { grid-template-columns: 1fr; }
  .main { padding: 20px; }
}
@media (max-width: 768px) {
  .sidebar {
    position: fixed;
    left: -260px;
    width: 240px;
    min-width: 240px;
    z-index: 100;
    transition: left 0.3s;
    height: 100vh;
    padding: 10px;
  }
  .sidebar.open { left: 0; }
  .sidebar.open ~ .main::before {
    content: '';
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.5);
    z-index: 99;
  }
  .main { margin-left: 0 !important; padding: 14px 12px; padding-top: 50px; }
  #mobileMenuBtn { display: block !important; }
  .page-header { flex-direction: column; gap: 10px; }
  .page-title { font-size: 20px; }
  .stats-row { grid-template-columns: 1fr 1fr; gap: 8px; }
  .stat-card { padding: 14px; }
  .stat-value { font-size: 24px; }
  .filter-bar { flex-direction: column; }
  .filter-select { max-width: 100%; }
  .ws-tabs { overflow-x: auto; flex-wrap: nowrap; white-space: nowrap; -webkit-overflow-scrolling: touch; scrollbar-width: none; }
  .ws-tabs::-webkit-scrollbar { display: none; }
  .ws-tab { flex: none; white-space: nowrap; padding: 8px 12px; font-size: 12px; }
  .ws-grid { grid-template-columns: 1fr; }
  .tender-hero { padding: 16px; }
  .hero-title { font-size: 17px; }
  .hero-meta { font-size: 12px; }
  .workspace-header { flex-direction: column; gap: 8px; align-items: flex-start; }
  .pipeline-tabs { flex-wrap: nowrap; overflow-x: auto; }
  .pipeline-tab { flex: none; }
  .opp-card { padding: 14px; }
  .opp-title { font-size: 17px; }
  .section-row { gap: 10px; }
  .proposal-editor-layout { flex-direction: column !important; height: auto !important; }
  .ped-sidebar { width: 100% !important; min-width: 100% !important; max-width: 100% !important; height: auto !important; max-height: 200px; border-right: none !important; border-bottom: 1px solid var(--border); }
  #proposals-grid { grid-template-columns: 1fr !important; }
  .sidebar.nav-rail-mode { display: none; }
}

/* Analytics grid responsive */
@media (max-width: 1100px) {
  #dashboardAnalytics > div:first-child { grid-template-columns: 1fr !important; }
}

/* Keyboard navigation & focus visible */
.opp-card.kb-focus { outline: 2px solid var(--accent); outline-offset: -2px; }
.btn-primary:focus-visible, .btn-secondary:focus-visible, .nav-btn:focus-visible, .ws-tab:focus-visible, .pipeline-tab:focus-visible {
  outline: 2px solid var(--accent); outline-offset: 2px;
}
.filter-select:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
a:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 4px; }
/* A11y: focus ring for remaining custom controls (260421-isc audit) */
.theme-toggle:focus-visible,
.btn-link:focus-visible,
.btn-back:focus-visible,
.research-sub-tab:focus-visible,
.ped-header-btn:focus-visible,
.ai-toolbar-btn:focus-visible,
.notif-bell-btn:focus-visible,
.notif-mark-all:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

/* Skip link */
.skip-link {
  position: absolute;
  top: -40px;
  left: 6px;
  background: var(--accent);
  color: #fff;
  padding: 8px 16px;
  border-radius: 0 0 8px 8px;
  font-weight: 600;
  font-size: 14px;
  z-index: 10001;
  transition: top 0.15s;
  text-decoration: none;
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}
.skip-link:focus { top: 0; }

/* Screen-reader-only utility */
.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
  border: 0;
}

/* Programmatic focus target (h1 on page switch) — suppress visible ring */
[tabindex="-1"]:focus { outline: none; }

/* Filter tooltip icons */
.hint-icon {
  display: inline-block;
  width: 15px; height: 15px; line-height: 15px;
  text-align: center; font-size: 10px; font-style: normal;
  color: var(--text3); background: var(--surface2);
  border-radius: 50%; cursor: pointer;
  position: relative; margin-left: 4px; vertical-align: middle;
}
.hint-icon:hover { color: var(--accent); background: var(--accent-dim); }
.hint-icon .hint-text {
  display: none; position: absolute;
  left: 50%; transform: translateX(-50%); bottom: 22px;
  background: #1e293b; color: #e2e8f0;
  font-size: 12px; font-weight: 400;
  padding: 8px 12px; border-radius: 6px;
  white-space: normal; width: 220px;
  z-index: 1000; line-height: 1.4;
  box-shadow: 0 4px 12px rgba(0,0,0,0.3);
}
.hint-icon .hint-text::after {
  content: ''; position: absolute; top: 100%;
  left: 50%; transform: translateX(-50%);
  border: 6px solid transparent; border-top-color: #1e293b;
}
.hint-icon.active .hint-text { display: block; }

/* === PROPOSALS === */
.proposal-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 18px;
  cursor: pointer;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.proposal-card:hover {
  border-color: var(--accent);
  box-shadow: 0 2px 12px rgba(0,0,0,0.25);
}
.proposal-type-badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 600;
  background: var(--bg2);
  color: var(--text2);
  margin-bottom: 8px;
}
.proposal-progress-bar {
  height: 4px;
  border-radius: 2px;
  background: var(--border);
  margin: 10px 0 6px;
  overflow: hidden;
}
.proposal-progress-fill {
  height: 100%;
  border-radius: 2px;
  background: var(--accent);
  transition: width 0.3s;
}

/* === SPA INLINE-STYLE SWEEP (260511-ewf) — proposals + proposal editor + landing ===
   Final chunk. Extracted from dashboard/index.html lines 1249-1442 + dashboard/landing.html.
   .prop-* prefix scopes to proposals page + proposal-editor surfaces.
   Mind: .proposal-editor-layout !important chain at lines 292-297 + 1032-1034 is UNTOUCHED —
   the chunk-C extractions only target child-element inline-styles, never the layout container. */

/* --- Proposals page header (#proposals-header, line 1249) --- */
.prop-page-header { display: flex; align-items: center; justify-content: space-between; padding: 20px 24px 12px; }
.prop-page-title { margin: 0; font-size: 20px; font-weight: 600; }
.prop-page-sub { margin: 4px 0 0; color: var(--text3); font-size: 13px; }
.prop-header-actions { display: flex; gap: 8px; align-items: center; }
.prop-btn-sm { font-size: 13px; }

/* --- Proposals grid (#proposals-grid, line 1259) --- */
.prop-grid { padding: 0 24px 24px; display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 16px; }
.prop-grid-empty { color: var(--text3); font-size: 14px; grid-column: 1 / -1; padding: 40px 0; text-align: center; }

/* --- Logged-in footer (role=contentinfo, line 1267) ---
   .muted-link is reused from chunk A — but the footer anchors had inline onmouseover/onmouseout
   handlers that set color + border-bottom on hover. Migrated to CSS :hover for clean relocation. */
.prop-footer {
  border-top: 1px solid var(--border);
  padding: 16px 24px;
  background: var(--surface);
  font-family: var(--mono);
  font-size: 12px;
  color: var(--text3);
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  align-items: center;
  justify-content: space-between;
  flex-shrink: 0;
}
.prop-footer-nav { display: flex; flex-wrap: wrap; gap: 16px; }
.muted-link:hover { color: var(--accent); border-bottom-color: var(--accent); }

/* --- Teaming + Compare modal shells (lines 1281-1317) --- */
.prop-modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 9998;
  background: rgba(0,0,0,0.8);
  backdrop-filter: blur(6px);
  align-items: center;
  justify-content: center;
}
.prop-modal-overlay--top {
  z-index: 9999;
  background: rgba(0,0,0,0.85);
  align-items: flex-start;
  overflow-y: auto;
}
.prop-modal-card {
  width: 100%;
  max-width: 700px;
  max-height: 85vh;
  overflow-y: auto;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 28px;
  margin: 20px;
  box-shadow: 0 16px 48px rgba(0,0,0,0.4);
}
.prop-modal-card--wide {
  max-width: 1100px;
  max-height: none;
  overflow-y: visible;
  margin: 40px 20px;
  box-shadow: 0 16px 48px rgba(0,0,0,0.5);
}
.prop-modal-header { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 20px; }
.prop-modal-header--center { align-items: center; }
.prop-modal-title { font-size: 20px; font-weight: 800; color: var(--text); }
.prop-modal-subtitle { font-size: 14px; color: var(--text3); margin-top: 4px; }
.prop-modal-close { background: none; border: none; color: var(--text3); font-size: 24px; cursor: pointer; line-height: 1; }

/* --- Compare bar (#compareBar, line 1295) --- */
.prop-compare-bar {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 9990;
  background: var(--surface);
  border-top: 2px solid var(--accent);
  padding: 12px 24px;
  box-shadow: 0 -4px 24px rgba(0,0,0,0.3);
  backdrop-filter: blur(8px);
}
.prop-compare-inner { max-width: 1100px; margin: 0 auto; display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.prop-compare-left { display: flex; align-items: center; gap: 8px; flex: 1; min-width: 0; }
.prop-compare-label { font-size: 13px; font-weight: 700; color: var(--accent); white-space: nowrap; }
.prop-compare-chips { display: flex; gap: 6px; flex: 1; overflow-x: auto; }
.prop-compare-actions { display: flex; gap: 8px; flex-shrink: 0; }
.prop-compare-go {
  padding: 8px 20px;
  border-radius: 8px;
  border: none;
  background: var(--accent);
  color: #fff;
  font-weight: 700;
  font-size: 13px;
  cursor: pointer;
}
.prop-compare-clear {
  padding: 8px 14px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text3);
  font-size: 13px;
  cursor: pointer;
}

/* --- Proposal editor sidebar inner blocks (lines 1328-1413) --- */
.prop-editor-divider-v { width: 1px; height: 20px; background: var(--border); }
.prop-editor-progress { display: flex; align-items: center; gap: 6px; }
.prop-sidebar-section-label { font-size: 11px; font-weight: 600; color: var(--text3); text-transform: uppercase; letter-spacing: 0.5px; margin-bottom: 8px; }
.prop-sidebar-add-section { margin-top: 8px; width: 100%; padding: 6px; border-radius: 5px; border: 1px dashed var(--border); background: none; color: var(--text3); font-size: 12px; cursor: pointer; }
.prop-rfp-parse-results { margin-top: 10px; font-size: 12px; color: var(--text2); }
.prop-comp-score-row { display: flex; align-items: baseline; gap: 8px; margin-bottom: 8px; }
.prop-comp-pct { font-size: 12px; color: var(--text3); }
.prop-comp-issues { font-size: 12px; color: var(--text3); }
.prop-comp-refresh { margin-top: 8px; width: 100%; padding: 5px; border-radius: 5px; border: 1px solid var(--border); background: none; color: var(--text3); font-size: 11px; cursor: pointer; }

/* --- Proposal editor main area (#ped-main, lines 1383-1413) --- */
.prop-editor-placeholder { color: var(--text3); font-size: 14px; text-align: center; padding: 60px 0; }
.prop-editor-section-title { font-size: 16px; font-weight: 600; margin-bottom: 12px; }
.prop-ai-toolbar-group { display: inline-flex; align-items: center; }
.prop-custom-prompt-row { display: none; margin-bottom: 8px; gap: 6px; }
.prop-custom-prompt-row.is-active { display: flex; }
.prop-custom-prompt-input { flex: 1; padding: 6px 10px; border-radius: 6px; border: 1px solid var(--border); background: var(--bg2); color: var(--text1); font-size: 13px; }
.prop-custom-prompt-send { font-size: 12px; padding: 6px 12px; }
.prop-custom-prompt-cancel { font-size: 12px; padding: 6px 10px; background: none; border: 1px solid var(--border); border-radius: 6px; color: var(--text2); cursor: pointer; }
.prop-stream-actions { display: none; margin-bottom: 8px; }
.prop-stream-actions.is-active { display: block; }
.prop-stream-insert { font-size: 12px; padding: 5px 12px; }
.prop-stream-discard { font-size: 12px; padding: 5px 12px; background: none; border: 1px solid var(--border); border-radius: 5px; color: var(--text2); cursor: pointer; margin-left: 6px; }
.prop-section-content-textarea {
  width: 100%;
  box-sizing: border-box;
  min-height: 340px;
  padding: 12px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--bg2);
  color: var(--text1);
  font-size: 14px;
  line-height: 1.6;
  resize: vertical;
}
.prop-section-foot { display: flex; justify-content: space-between; align-items: center; margin-top: 6px; font-size: 12px; color: var(--text3); }

/* --- New Proposal modal (#newProposalModal, lines 1420-1431) --- */
.prop-fixed-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.7);
  z-index: 10000;
  align-items: center;
  justify-content: center;
}
.prop-fixed-overlay--low { z-index: 1000; }
.prop-new-card {
  background: var(--card);
  border-radius: 12px;
  padding: 28px;
  width: 440px;
  max-width: 90vw;
}
.prop-new-title { margin: 0 0 20px; font-size: 16px; font-weight: 600; }
.prop-new-label { display: block; font-size: 13px; color: var(--text2); margin-bottom: 6px; }
.prop-new-input {
  width: 100%;
  box-sizing: border-box;
  padding: 8px 12px;
  border-radius: 6px;
  border: 1px solid var(--border);
  background: var(--bg2);
  color: var(--text1);
  font-size: 14px;
  margin-bottom: 14px;
}
.prop-new-input--last { margin-bottom: 20px; }
.prop-new-actions { display: flex; gap: 10px; justify-content: flex-end; }
.prop-new-cancel {
  padding: 8px 18px;
  border-radius: 6px;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text2);
  cursor: pointer;
}

/* --- Add Section modal (#addSectionModal, lines 1435-1444) --- */
.prop-add-card { background: var(--card); border-radius: 12px; padding: 24px; width: 360px; }
.prop-add-title { margin: 0 0 16px; font-size: 15px; font-weight: 600; }
.prop-add-actions { display: flex; gap: 8px; justify-content: flex-end; }
.prop-add-cancel {
  padding: 7px 16px;
  border-radius: 6px;
  border: 1px solid var(--border);
  background: none;
  color: var(--text2);
  cursor: pointer;
}

/* ===================================================================
   PROPOSAL EDITOR — CSS extracted verbatim from canonical mockup v2
   =================================================================== */

/* Editor layout */
.proposal-editor-layout {
  display: flex;
  width: 100%;
  height: calc(100vh - 60px);
  overflow: hidden;
}
.proposal-editor-header {
  grid-column: 1 / -1;
  padding: 14px 20px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 12px;
}
/* Header Bar (mockup: .header-bar) */
.proposal-editor-header.ped-header-bar,
.header-bar {
  height: 52px;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  padding: 0 20px;
  gap: 12px;
  flex-shrink: 0;
}
.header-back {
  color: var(--text2);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
}
.header-title {
  font-size: 14px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 400px;
}
.header-tag {
  font-size: 11px;
  padding: 2px 8px;
  border-radius: 4px;
  background: var(--surface3);
  color: var(--text2);
}
/* Phase 30 T-30.2 (PE30-03) — save chip ambient state in header */
.pe-save-chip { transition: color 0.2s ease; }
.pe-save-chip--saved { color: var(--green); }
.pe-save-chip--saving { color: var(--text3); }
.pe-save-chip--error { color: var(--red); cursor: pointer; }
.pe-save-chip--error:hover { text-decoration: underline; }
.header-spacer { flex: 1; }
.header-btn {
  padding: 6px 14px;
  border-radius: 6px;
  font-size: 13px;
  cursor: pointer;
  border: 1px solid var(--border);
  background: var(--surface2);
  color: var(--text);
  transition: all 0.2s;
}
.header-btn:hover { background: var(--surface3); }
.header-btn.primary {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}
.header-btn.primary:disabled { opacity: 0.5; cursor: not-allowed; }
.content-body { flex: 1; display: flex; overflow: hidden; position: relative; }
.main-content { flex: 1; display: flex; flex-direction: column; min-width: 0; }

/* Section Nav (mockup: .section-nav) */
.section-nav { width: 260px; background: var(--surface); border-right: 1px solid var(--border); display: flex; flex-direction: column; flex-shrink: 0; }
.section-nav-header { padding: 14px 16px 10px; display: flex; align-items: center; justify-content: space-between; }
.section-nav-title { font-size: 11px; text-transform: uppercase; letter-spacing: 0.5px; color: var(--text3); font-weight: 600; }
.section-nav-add { width: 24px; height: 24px; border-radius: 4px; background: transparent; border: 1px dashed var(--border); color: var(--text3); cursor: pointer; display: flex; align-items: center; justify-content: center; font-size: 14px; }
.section-tabs { display: flex; padding: 0 12px 8px; gap: 2px; }
.section-tab { padding: 5px 10px; font-size: 12px; color: var(--text2); cursor: pointer; border-radius: 4px; }
.section-tab.active { background: var(--surface3); color: var(--text); }
.section-list { flex: 1; overflow-y: auto; padding: 0 8px; }

/* Section Items (mockup: .section-item) */
.section-item { display: flex; align-items: center; padding: 10px 12px; border-radius: 8px; cursor: pointer; gap: 10px; margin-bottom: 2px; transition: all 0.15s; }
.section-item:hover { background: var(--surface2); }
.section-item.active { background: var(--accent-dim); }
.section-status { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; }
.section-status.empty { background: var(--red); }
.section-status.partial { background: var(--yellow); }
.section-status.complete { background: var(--green); }
.section-info { flex: 1; min-width: 0; }
.section-name {
  font-size: 13px;
  line-height: 1.25;
  word-break: break-word;
  overflow-wrap: anywhere;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.section-meta { font-size: 11px; color: var(--text3); margin-top: 2px; }
.section-badge { font-size: 10px; padding: 1px 6px; border-radius: 3px; flex-shrink: 0; white-space: nowrap; }
.section-badge.required { background: var(--red-dim); color: var(--red); }
.section-badge.ai-ready { background: rgba(188,140,255,0.15); color: #bc8cff; }
.section-badge.optional-badge { background: var(--surface3); color: var(--text3); }
.section-badge.done { background: var(--green-dim); color: var(--green); }

/* Section item AI writing state */
.section-item.ai-writing { background: var(--purple-dim) !important; border: 1px solid var(--purple); border-radius: 8px; }
.section-item.ai-writing .section-status { background: var(--purple); animation: pulse 1.5s infinite; }
.section-item.ai-writing .section-name { color: var(--purple); }
.section-item.ai-writing .section-meta { color: var(--purple); }
.section-item.ped-section-writing {
  border-left: 3px solid var(--accent);
  background: rgba(99, 102, 241, 0.08);
}
.section-item.ped-section-writing .section-status {
  background: var(--accent) !important;
  animation: pulse 1.5s ease-in-out infinite;
}

/* Editor Area (mockup: .editor-area) */
.editor-area { flex: 1; display: flex; flex-direction: column; min-width: 0; }

.proposal-editor-sidebar {
  border-right: 1px solid var(--border);
  overflow-y: auto;
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.proposal-editor-main {
  overflow-y: auto;
  padding: 20px 24px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.ai-toolbar {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-bottom: 8px;
}
.ai-toolbar-btn {
  padding: 4px 10px;
  border-radius: 5px;
  border: 1px solid var(--border);
  background: var(--bg2);
  color: var(--text2);
  font-size: 12px;
  cursor: pointer;
  transition: border-color 0.1s, color 0.1s;
}
.ai-toolbar-btn:hover {
  border-color: var(--accent);
  color: var(--accent);
}
/* AI Command Bar (mockup) */
.ai-command-bar {
  margin: 16px 24px 0;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
}
.ai-bar-main {
  display: flex;
  align-items: center;
  padding: 10px 16px;
  gap: 10px;
}
.ai-icon {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: var(--gradient-ai);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.ai-icon svg { width: 18px; height: 18px; fill: white; }
.ai-input {
  flex: 1;
  background: none;
  border: none;
  color: var(--text);
  font-size: 14px;
  outline: none;
}
.ai-input::placeholder { color: var(--text3); }
.ai-quick-actions { display: flex; gap: 6px; flex-shrink: 0; }
.ai-quick-btn {
  padding: 5px 12px;
  border-radius: 6px;
  font-size: 12px;
  background: var(--surface2);
  border: 1px solid var(--border);
  color: var(--text2);
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.15s;
}
.ai-quick-btn:hover { background: var(--surface3); color: var(--text); }
.ai-quick-btn.active { background: var(--accent-dim); color: var(--accent); }
.ai-quick-btn.generate {
  background: var(--accent-dim);
  border-color: var(--accent);
  color: var(--accent);
}
.ai-quick-btn.generate:hover { background: var(--accent); color: #fff; }
.ai-quick-btn.more-menu {
  position: relative;
}

/* Context Chips (mockup: .section-context-bar, .context-chip) */
.section-context-bar {
  display: flex;
  align-items: center;
  padding: 8px 24px;
  gap: 8px;
  background: var(--surface);
  margin: 0 24px;
  border-left: 1px solid var(--border);
  border-right: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  border-radius: 0 0 12px 12px;
  flex-wrap: wrap;
}
.context-chip {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 11px;
  background: var(--surface2);
  color: var(--text2);
  border: 1px solid var(--border);
}
.context-chip.warning { background: var(--yellow-dim); color: var(--yellow); border-color: transparent; }
.context-chip.info { background: var(--accent-dim); color: var(--accent); border-color: transparent; }
.context-chip.required { background: var(--red-dim); color: var(--red); border-color: transparent; }
.context-chip.clickable { cursor: pointer; }
.context-chip.clickable:hover { filter: brightness(1.2); }

/* === Chip group dividers (proposal editor AI bar) === */
.section-context-bar { gap: 12px; }
.chip-group {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}
.chip-group + .chip-group {
  padding-left: 12px;
  border-left: 1px solid var(--border, #30363d);
}
.chip-group-label {
  font-size: 10px;
  color: var(--text3, #8b949e);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  white-space: nowrap;
  font-weight: 600;
}
.chip-group-chips {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

/* More dropdown for Shorten/Expand/Custom */
.ai-more-dropdown {
  position: absolute;
  top: calc(100% + 4px);
  right: 0;
  background: var(--surface, #161b22);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 4px;
  z-index: 50;
  min-width: 120px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.3);
  display: none;
}
.ai-more-dropdown.open { display: block; }
.ai-more-item {
  display: block;
  width: 100%;
  padding: 6px 12px;
  font-size: 12px;
  color: var(--text2);
  background: none;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  text-align: left;
}
.ai-more-item:hover { background: var(--surface2); color: var(--text); }

/* Phase 30 T-30.3 (PE30-04) — AI command bar More menu (UI-SPEC §AI command bar).
   Single-column overflow dropdown for Improve / Rewrite / Custom prompt.
   No new --tokens: reuses --surface2, --border, --text2, --text, --accent-dim, --accent. */
.pe-ai-more-trigger { /* visual base inherited from .ai-quick-btn */ }
.pe-ai-more-menu {
  position: absolute;
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 4px;
  min-width: 160px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
  z-index: 50;
  display: flex;
  flex-direction: column;
}
.pe-ai-more-menu[hidden] { display: none; }
.pe-ai-more-menu__item {
  background: transparent;
  border: none;
  color: var(--text2);
  font-size: 13px;
  text-align: left;
  padding: 8px 12px;
  border-radius: 4px;
  cursor: pointer;
  font-family: inherit;
}
.pe-ai-more-menu__item:hover {
  background: var(--accent-dim);
  color: var(--text);
}
.pe-ai-more-menu__item:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: -2px;
}

/* Phase 30 T-30.3 IC-4 — section-badge.ai-ready single-click affordance.
   Only applies when role="button" is set (Phase 30 wired badge) so the
   passive label-only render in the standalone editor is unaffected. */
.section-badge.ai-ready[role="button"]:hover {
  outline: 2px solid var(--accent);
  outline-offset: 1px;
}
.section-badge.ai-ready[role="button"]:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 1px;
}

/* Editor (mockup: .editor-wrapper, .editor-toolbar, .editor-body, .editor-footer) */
.editor-wrapper { flex: 1; margin: 16px 24px; display: flex; flex-direction: column; overflow: hidden; }
.editor-toolbar { display: flex; align-items: center; padding: 6px 12px; background: var(--surface); border: 1px solid var(--border); border-radius: 8px 8px 0 0; gap: 2px; }
.toolbar-btn { width: 32px; height: 28px; border: none; background: none; color: var(--text2); cursor: pointer; border-radius: 4px; display: flex; align-items: center; justify-content: center; font-size: 14px; }
.toolbar-btn:hover { background: var(--surface2); color: var(--text); }
.toolbar-sep { width: 1px; height: 20px; background: var(--border); margin: 0 4px; }
.editor-body { flex: 1; background: var(--surface); border: 1px solid var(--border); border-top: none; border-radius: 0 0 8px 8px; padding: 24px; overflow-y: auto; font-size: 14px; line-height: 1.7; color: var(--text2); }
.editor-footer { display: flex; align-items: center; justify-content: space-between; padding: 8px 0; }
.editor-stats { font-size: 11px; color: var(--text3); }
.editor-save { padding: 5px 16px; background: var(--green); color: #fff; border: none; border-radius: 6px; font-size: 12px; cursor: pointer; }

/* Right Panel (mockup: .right-panel) */
.right-panel { width: 340px; background: var(--surface); border-left: 1px solid var(--border); display: flex; flex-direction: column; flex-shrink: 0; }
.right-panel.collapsed { width: 0; min-width: 0; max-width: 0; opacity: 0; overflow: hidden; border-left: none; }
/* T-30.1 — Coach sticky aside: always visible above the 2-tab strip in the right rail.
   No new --tokens: uses existing --surface, --border, --text2. */
.ped-coach-aside {
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  background: var(--surface);
  max-height: 35%;
  overflow-y: auto;
  flex-shrink: 0;
}
.ped-coach-aside:empty { display: none; }

/* quick-260423-gy5 — fit all 6 tabs on 340px panel without scroll: tighten padding/gap + 11px font.
   T-30.1: now only 2 tabs (solicitation | review); comment updated but padding/gap preserved. */
.right-panel-tabs {
  display: flex;
  border-bottom: 1px solid var(--border);
  padding: 0 2px;
}
.rp-tab { padding: 10px 7px; font-size: 11px; color: var(--text2); cursor: pointer; border-bottom: 2px solid transparent; transition: all 0.15s; display: flex; align-items: center; gap: 4px; white-space: nowrap; border: none; background: transparent; flex: 0 0 auto; }

/* Proposal editor fullscreen — hide main sidebar on desktop only.
   On mobile (≤768px), keep the off-canvas drawer pattern accessible
   via hamburger so users can navigate away from the editor.
   quick-260503-vfg — was display:none !important on all widths,
   blocking .sidebar.open drawer on mobile. */
@media (min-width: 769px) {
  body.ped-fullscreen .sidebar { display: none !important; }
}
.rp-tab:hover { color: var(--text); }
.rp-tab.active { color: var(--accent); border-bottom-color: var(--accent); }
.right-panel-content { flex: 1; overflow-y: auto; padding: 16px; }
.right-panel-content.active { display: block; }

.ai-stream-preview {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 12px;
  font-size: 13px;
  color: var(--text1);
  min-height: 60px;
  white-space: pre-wrap;
  margin-bottom: 8px;
  display: none;
}
/* Quill editor — page-like appearance */
.ql-container.ql-snow {
  border: none !important;
  font-family: 'DM Sans', Georgia, serif;
  font-size: 14px;
  line-height: 1.7;
  color: #222;
}
.ql-toolbar.ql-snow {
  border: none !important;
  border-bottom: 1px solid var(--border) !important;
  background: var(--surface);
  border-radius: 8px 8px 0 0;
  padding: 6px 8px !important;
}
.ql-container.ql-snow { flex: 1; display: flex; flex-direction: column; }
.ql-editor {
  flex: 1;
  min-height: 200px;
  padding: 20px 28px !important;
  background: white;
  border-radius: 0 0 8px 8px;
  overflow-y: auto;
}
/* Quill flex layout (redundant rules consolidated above) */
.ql-editor p { margin-bottom: 10px; }
.ql-editor h1 { font-size: 20px; font-weight: 700; margin: 16px 0 8px; }
.ql-editor h2 { font-size: 17px; font-weight: 600; margin: 14px 0 6px; }
.ql-editor h3 { font-size: 15px; font-weight: 600; margin: 12px 0 4px; }
.ql-editor ul, .ql-editor ol { padding-left: 24px; margin-bottom: 10px; }
.ql-editor blockquote { border-left: 3px solid var(--accent); padding-left: 12px; color: #555; margin: 10px 0; }
/* Dark mode overrides for Quill */
[data-theme="dark"] .ql-editor { background: #2A2A2A; color: #F3F5EC; }
[data-theme="dark"] .ql-toolbar.ql-snow { background: #1C1C1C; }
[data-theme="dark"] .ql-snow .ql-stroke { stroke: #c8c6b8 !important; }
[data-theme="dark"] .ql-snow .ql-fill { fill: #c8c6b8 !important; }
[data-theme="dark"] .ql-snow .ql-picker-label { color: #c8c6b8 !important; }
[data-theme="dark"] #emb-pedQuillEditor { border-color: #3a3a3a; }
.compliance-score {
  font-size: 28px;
  font-weight: 700;
  color: var(--accent);
  line-height: 1;
}
.rfp-upload-zone {
  border: 2px dashed var(--border);
  border-radius: 8px;
  padding: 16px;
  text-align: center;
  font-size: 13px;
  color: var(--text3);
  cursor: pointer;
  transition: border-color 0.15s;
}
.rfp-upload-zone:hover, .rfp-upload-zone.drag-over {
  border-color: var(--accent);
  color: var(--text2);
}

/* CLIN Pricing Tab */
.ped-tab-row { display:flex; border-bottom:1px solid var(--border); }
.ped-tab { flex:1; padding:8px 0; font-size:11px; font-weight:600; background:none; border:none; border-bottom:2px solid transparent; color:var(--text3); cursor:pointer; transition:color .15s,border-color .15s; }
.ped-tab:hover { color:var(--text); }
.ped-tab.active { color:var(--accent); border-bottom-color:var(--accent); }
.ped-collapse-header { display:flex; align-items:center; justify-content:space-between; padding:8px 14px; cursor:pointer; user-select:none; font-size:11px; font-weight:600; color:var(--text3); border-top:1px solid var(--border); }
.ped-collapse-header:hover { background:var(--surface2); }
.ped-collapse-header .ped-collapse-arrow { transition:transform .2s ease; font-size:10px; }
.ped-collapse-header.collapsed .ped-collapse-arrow { transform:rotate(-90deg); }
.ped-collapse-body { max-height:500px; opacity:1; overflow:hidden; transition:max-height .25s ease, opacity .2s ease, padding .2s ease; }
.ped-collapse-body.collapsed { max-height:0; opacity:0; padding-top:0 !important; padding-bottom:0 !important; }
/* Legacy guidance panel class aliases (JS still uses ped-guidance-panel in some places) */
.ped-guidance-panel { width:340px; min-width:340px; max-width:340px; flex-shrink:0; border-left:1px solid var(--border); background:var(--surface); overflow-y:auto; transition:width .2s ease, min-width .2s ease, max-width .2s ease, opacity .2s ease; display:flex; flex-direction:column; }
.ped-guidance-panel.collapsed { width:0; min-width:0; max-width:0; opacity:0; overflow:hidden; border-left:none; }
.ped-guidance-header { display:flex; justify-content:space-between; align-items:center; padding:10px 12px; border-bottom:1px solid var(--border); }

/* ========== Proposal Editor Mockup Overrides ========== */
/* Command bar: top radius only (chips are inside as second child) */
.ai-command-bar {
  /* quick-260511-oe9 Wave 3: removed forced flags. This rule has equal
     specificity (0,1,0) to L2448 .ai-command-bar but wins by source order. */
  border-radius: 12px 12px 0 0;
  height: auto;
  overflow: visible;
}
/* Context chips inside command bar: bottom radius only, no top border */
.ai-command-bar .section-context-bar {
  /* quick-260511-oe9 Wave 3: removed forced flags. Specificity (0,2,0) beats
     base .section-context-bar rules at L2506 + L2537 (0,1,0) naturally. */
  margin: 0;
  border-left: none;
  border-right: none;
  border-top: none;
  border-bottom: none;
  border-radius: 0 0 12px 12px;
  background: var(--surface, #161b22);
}
.ai-icon { color: white !important; font-size: 16px !important; }
/* Score meter — duplicate forced-cascade block deleted by quick-260511-oe9 Wave 1.
   .score-meter / .score-circle / .score-circle.low/med/high winning rules:
     - Later forced Batch 2 at L2830-2834 (same hardcoded colors)
     - Final clean palette-token def at L2946-2950 (theme-aware)
   .score-label + .score-sublabel were already non-forced (retained). */
.score-label { font-size:12px; color:var(--text2); }
.score-sublabel { font-size:11px; color:var(--text3); margin-top:2px; }
/* Checklist — .checklist-item / .checklist-check deleted (winning clean def at
   L2955-2956, identical property values). .checklist-check.done RETAINED here
   because its winning clean def at L2957 uses var(--green) which resolves to
   a different RGB than hardcoded #3fb950 (palette correction needs founder
   approval — see SUMMARY for ped-empty-manual + section-status retention). */
.checklist-check.done { background:#3fb950 !important; border-color:#3fb950 !important; color:#fff !important; }
/* Coach cards — .coach-card / .coach-card.tip/.warning/.error deleted.
   Winning rules: later compound forced rule at L2863-2866 (same hardcoded colors)
   then clean palette-token def at L2940-2943 (theme-aware, different RGB —
   currently still overridden by L2863-2866). */
/* Right panel tab accent — .rp-tab.active deleted (winning clean def at L2681,
   identical var(--accent) value). */
/* Section status dot colors — .section-status.empty/.partial/.complete deleted.
   Winning rule: later forced rule at L2854-2856 (same hardcoded colors).
   .section-status.empty palette-token def at L2370-2372 cannot win yet — would
   require deleting L2854-2856 too AND resolving --red/--yellow/--green RGB
   mismatch (palette correction; founder approval needed).
   .section-badge.required RETAINED — winning clean def at L2386 uses
   var(--red-dim)/var(--red) which differs from hardcoded #f85149. */
.section-badge.required { background:rgba(248,81,73,0.15) !important; color:#f85149 !important; }
/* .section-badge.ai-ready deleted — winning clean def at L2387 has identical
   hardcoded rgba(188,140,255,0.15)/#bc8cff values. */
/* Active section — .section-item.active RETAINED because winning clean def at
   L2368 uses var(--accent-dim) (different RGB than hardcoded rgba(230,107,48,0.15)). */
.section-item.active, .ped-section-item.active { background:rgba(230,107,48,0.15) !important; }
/* Complete section green tint — RETAINED, no clean def exists. */
.section-item.complete { background:rgba(63,185,80,0.1) !important; }
/* Empty state hero — duplicate block deleted.
   .ai-empty-state .ai-empty-icon (multi-selector) winning clean def at L3455
   uses var(--gradient-ai) which IS the same linear-gradient — identical RGB.
   .ai-empty-title / .ai-empty-desc / .ai-empty-btn winning clean defs at
   L3457-3459 have identical property values (L3459 is additive: includes
   extra display/align-items/gap props that don't regress the deleted rule). */
/* === Score Meter (Batch 2) === */
.score-meter, .section-score { display:flex !important; align-items:center !important; gap:10px !important; padding:12px !important; background:var(--surface2) !important; border-radius:8px !important; margin-bottom:12px !important; }
.score-circle, .section-score .score-value { width:48px !important; height:48px !important; min-width:48px !important; border-radius:50% !important; display:flex !important; align-items:center !important; justify-content:center !important; font-weight:700 !important; font-size:16px !important; flex-shrink:0 !important; }
.score-circle.low, .section-score[data-score-level="low"] .score-value { background:rgba(248,81,73,0.15) !important; color:#f85149 !important; }
.score-circle.med, .section-score[data-score-level="med"] .score-value { background:rgba(210,153,34,0.15) !important; color:#d29922 !important; }
.score-circle.high, .section-score[data-score-level="high"] .score-value { background:rgba(63,185,80,0.15) !important; color:#3fb950 !important; }
/* quick-260511-oe9 Wave 3: removed forced flags on .score-circle.empty (higher
   specificity than .score-circle base) and .score-sublabel (identical to clean
   def at L2961 which would win on source order). .score-label kept forced
   because clean def at L2960 has different values (12px/text2 vs 13px/text). */
.score-circle.empty { background: var(--surface2); color: var(--text3); }
.score-label { font-size:13px !important; font-weight:600 !important; color:var(--text) !important; }
.score-sublabel { font-size:11px; color:var(--text3); margin-top:2px; }

/* === Section name — wrap to 2 lines instead of ellipsis truncation === */
.section-name {
  font-size: 13px;
  line-height: 1.25;
  word-break: break-word;
  overflow-wrap: anywhere;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.section-info { flex:1; min-width:0; }

/* === Section Status Dots (Batch 2) ===
   .section-status base props deleted from this rule by quick-260511-oe9 Wave 2 —
   already covered by clean def at L2369 (identical width/height/border-radius/
   flex-shrink). Retained `.ped-section-item .status-dot` half but removed the
   forced-cascade flag — no competing rule exists (defensive grep verified). */
.ped-section-item .status-dot { width:8px; height:8px; border-radius:50%; flex-shrink:0; }
.section-status.empty, .status-dot.empty, .status-dot[data-status="empty"] { background:#f85149 !important; }
.section-status.partial, .status-dot.partial, .status-dot[data-status="partial"] { background:#d29922 !important; }
.section-status.complete, .status-dot.complete, .status-dot[data-status="complete"] { background:#3fb950 !important; }

/* === Checklist native checkbox override (Batch 2) === */
.checklist-item input[type="checkbox"] { appearance:none !important; -webkit-appearance:none !important; width:16px !important; height:16px !important; min-width:16px !important; border-radius:4px !important; border:1px solid var(--border) !important; background:transparent !important; cursor:pointer !important; margin:0 !important; flex-shrink:0 !important; }
.checklist-item input[type="checkbox"]:checked { background:#3fb950 !important; border-color:#3fb950 !important; background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='white'%3E%3Cpath d='M13.78 4.22a.75.75 0 010 1.06l-7.25 7.25a.75.75 0 01-1.06 0L2.22 9.28a.75.75 0 011.06-1.06L6 10.94l6.72-6.72a.75.75 0 011.06 0z'/%3E%3C/svg%3E") !important; background-size:12px !important; background-repeat:no-repeat !important; background-position:center !important; }

/* === Coach Cards (Batch 2) === */
.coach-card, .ai-coach-card, .guidance-card, .avoid-card { background:var(--surface2) !important; border:1px solid var(--border) !important; border-radius:8px !important; padding:10px 12px !important; margin-bottom:6px !important; font-size:12px !important; line-height:1.5 !important; color:var(--text2) !important; }
.coach-card.tip, .ai-coach-card.tip, .guidance-card.tip { border-left:3px solid #3fb950 !important; }
.coach-card.warning, .ai-coach-card.warning, .guidance-card.warning, .avoid-card { border-left:3px solid #d29922 !important; }
.coach-card.error, .ai-coach-card.error, .guidance-card.error { border-left:3px solid #f85149 !important; }

/* === Empty State Hero (Batch 2) === */
.ped-empty-hero .ai-empty-icon, .ped-empty-icon, .empty-state-icon { width:64px !important; height:64px !important; border-radius:16px !important; background:linear-gradient(135deg, #58a6ff 0%, #bc8cff 100%) !important; display:flex !important; align-items:center !important; justify-content:center !important; margin-bottom:20px !important; font-size:28px !important; color:white !important; }
.ped-empty-title, .empty-state-title { font-size:18px !important; font-weight:600 !important; margin-bottom:8px !important; color:var(--text) !important; }
.ped-empty-desc, .empty-state-desc { font-size:13px !important; color:var(--text2) !important; max-width:400px !important; line-height:1.6 !important; margin-bottom:24px !important; }
.ped-empty-btn, .empty-state-btn { padding:10px 24px !important; background:linear-gradient(135deg, #58a6ff 0%, #bc8cff 100%) !important; color:#fff !important; border:none !important; border-radius:8px !important; font-size:14px !important; font-weight:500 !important; cursor:pointer !important; }
.ped-empty-btn:hover, .empty-state-btn:hover { opacity:0.9 !important; }

/* ========== End Mockup Overrides ========== */
.ped-guidance-content { padding:8px 12px; }
.ped-guidance-content details { margin-bottom:8px; }
.ped-guidance-content summary { font-size:11px; font-weight:600; color:var(--text2); cursor:pointer; padding:4px 0; border-bottom:1px solid var(--border); user-select:none; }
.ped-guidance-content ul, .ped-guidance-content ol { margin:6px 0 4px 16px; padding:0; }
.ped-guidance-content li { font-size:11px; color:var(--text3); line-height:1.5; margin-bottom:3px; }
.ped-guidance-content .gd-warn { color:var(--danger, #e74c3c); }
@media (max-width:768px) {
  .ped-guidance-panel { width:0; min-width:0; max-width:0; opacity:0; overflow:hidden; border-left:none; position:absolute; }
  .ped-guidance-panel.collapsed { display:none; }
  .right-panel { width:0; min-width:0; max-width:0; opacity:0; overflow:hidden; position:absolute; right:0; top:0; bottom:0; z-index:10; background:var(--surface); border-left:1px solid var(--border); transition:width .2s,min-width .2s,max-width .2s,opacity .2s; }
  .right-panel.mobile-open { width:300px; min-width:300px; max-width:300px; opacity:1; overflow-y:auto; }
  .ped-sidebar { width:180px !important; min-width:180px !important; max-width:180px !important; }
}
/* quick-260503-ex7 W3 T3 — pricing tab inside the 220px .ped-sidebar must
   scroll horizontally rather than squish 8 columns into ~24px each. Container
   scopes the scroll so the sections/compliance tabs are unaffected. */
#emb-ped-pricing-tab { overflow-x: auto; }
/* Pricing Table (mockup: .pricing-table, .pricing-total) */
.pricing-table { width: 100%; min-width: 580px; border-collapse: collapse; }
.pricing-table th { font-size: 10px; color: var(--text3); text-align: left; padding: 4px 6px; border-bottom: 1px solid var(--border); text-transform: uppercase; letter-spacing: 0.5px; }
.pricing-table td { padding: 4px 6px; }
.pricing-table input { width: 100%; padding: 5px 8px; background: var(--surface2); border: 1px solid var(--border); border-radius: 4px; color: var(--text); font-size: 12px; outline: none; }
.pricing-table input:focus { border-color: var(--accent); }
.pricing-table select { width:100%; box-sizing:border-box; padding:5px 8px; font-size:12px; border:1px solid var(--border); border-radius:4px; background:var(--surface2); color:var(--text); }
.pricing-table input[type="number"] { width:70px; }
.pricing-total { font-size: 13px; font-weight: 600; text-align: right; padding: 10px 0; border-top: 1px solid var(--border); margin-top: 8px; }
/* Legacy clin-table aliases for backward compat */
.clin-table { width:100%; border-collapse:collapse; font-size:11px; }
.clin-table th { text-align:left; padding:4px 6px; font-weight:600; color:var(--text3); border-bottom:1px solid var(--border); font-size:10px; text-transform:uppercase; }
.clin-table td { padding:3px 4px; border-bottom:1px solid var(--border-light, var(--border)); }
.clin-table input, .clin-table select { width:100%; box-sizing:border-box; padding:3px 5px; font-size:11px; border:1px solid var(--border); border-radius:3px; background:var(--bg2); color:var(--text); }
.clin-table input[type="number"] { width:70px; }
.clin-grand-total { font-size:13px; font-weight:700; padding:8px 6px; text-align:right; border-top:2px solid var(--border); }
.clin-period-btn { padding:4px 10px; font-size:10px; border:1px solid var(--border); border-radius:4px; background:var(--surface); color:var(--text3); cursor:pointer; }
.clin-period-btn.active { background:var(--accent); color:#fff; border-color:var(--accent); }

/* Spreadsheet Mode Toggle */
.ped-mode-toggle { display:inline-flex; border:1px solid var(--border); border-radius:6px; overflow:hidden; }
.ped-mode-btn { padding:3px 12px; font-size:11px; border:none; background:var(--surface2); color:var(--text3); cursor:pointer; transition:background 0.15s, color 0.15s; }
.ped-mode-btn.active { background:var(--accent, #726EF0); color:#fff; }
.ped-mode-btn:hover:not(.active) { background:var(--border); }

/* Spreadsheet Grid */
.ss-grid { width:100%; border-collapse:collapse; font-size:12px; border:1px solid var(--border); border-radius:6px; overflow:hidden; }
.ss-grid th, .ss-grid td { border:1px solid var(--border); padding:0; }
.ss-header-cell { background:var(--surface2); font-weight:600; color:var(--text2); padding:4px 8px; font-size:11px; min-width:80px; outline:none; display:inline-block; }
.ss-cell { padding:4px 8px; min-width:80px; outline:none; background:var(--bg); color:var(--text); font-size:12px; cursor:text; }
.ss-cell:focus { background:var(--surface); box-shadow:inset 0 0 0 2px var(--accent, #726EF0); }
.ss-cell-total { padding:4px 8px; text-align:right; font-weight:600; background:var(--surface2); color:var(--text); font-size:12px; }
.ss-cell-number { text-align:right; }
.ss-footer td { background:var(--surface2); font-weight:600; padding:4px 8px; font-size:11px; color:var(--text2); text-align:right; }
.ss-footer td:first-child { text-align:left; }
.ss-col-actions { width:24px; text-align:center; padding:2px; }
.ss-del-btn { background:none; border:none; color:var(--red, #e74c3c); cursor:pointer; font-size:13px; padding:2px 4px; opacity:0.5; }
.ss-del-btn:hover { opacity:1; }
.ss-add-col-btn { background:none; border:none; color:var(--accent, #726EF0); cursor:pointer; font-size:14px; font-weight:700; padding:2px 6px; }

/* rp-tab-content (retained for JS panel switching) */
.rp-tab-content { display:none; flex:1; overflow-y:auto; padding:12px; }
.rp-tab-content.active { display:block; }

/* AI Coach Cards (mockup: .ai-coach-section, .ai-coach-title, .coach-card) */
.ai-coach-section { margin-bottom: 20px; }
.ai-coach-title { font-size: 12px; font-weight: 600; color: var(--text); margin-bottom: 8px; display: flex; align-items: center; gap: 6px; }
.coach-card { background: var(--surface2); border: 1px solid var(--border); border-radius: 8px; padding: 10px 12px; margin-bottom: 6px; font-size: 12px; line-height: 1.5; color: var(--text2); }
.coach-card.tip { border-left: 3px solid var(--green); }
.coach-card.warning { border-left: 3px solid var(--yellow); }
.coach-card.error { border-left: 3px solid var(--red); }

/* Score Meter (mockup: .score-meter, .score-circle) */
.score-meter { display: flex; align-items: center; gap: 10px; padding: 12px; background: var(--surface2); border-radius: 8px; margin-bottom: 12px; }
.score-circle { width: 48px; height: 48px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 16px; flex-shrink: 0; }
.score-circle.low { background: rgba(248,81,73,0.15); color: var(--red); }
.score-circle.med { background: rgba(210,153,34,0.15); color: var(--yellow); }
.score-circle.high { background: rgba(63,185,80,0.15); color: var(--green); }
.score-label { font-size: 12px; color: var(--text2); }
.score-sublabel { font-size: 11px; color: var(--text3); margin-top: 2px; }

/* Checklist (mockup: .checklist-item, .checklist-check) */
.checklist-item { display: flex; align-items: flex-start; gap: 8px; padding: 6px 0; font-size: 12px; color: var(--text2); }
.checklist-check { width: 16px; height: 16px; border-radius: 4px; border: 1px solid var(--border); flex-shrink: 0; margin-top: 1px; display: flex; align-items: center; justify-content: center; font-size: 10px; }
.checklist-check.done { background: var(--green); border-color: var(--green); color: #fff; }

/* Score breakdown bar (retained functional) */
.coach-score-bar { display:flex; height:4px; border-radius:2px; overflow:hidden; margin:-4px 12px 12px; gap:1px; }
.coach-score-bar > div { height:100%; }
.coach-score-bar .sb-words { background:#58a6ff; }
.coach-score-bar .sb-structure { background:#bc8cff; }
.coach-score-bar .sb-specificity { background:#f59e0b; }
.coach-score-bar .sb-checklist { background:#10b981; }
.coach-score-bar .sb-eval { background:#e879f9; }

/* Evaluator checklist (retained functional) */
.coach-eval-item { display:flex; align-items:flex-start; gap:8px; padding:5px 0; font-size:12px; }
.coach-eval-item.covered { color:var(--text3); }
.coach-eval-item.covered span { text-decoration:line-through; }
.coach-eval-dot { width:8px; height:8px; border-radius:50%; flex-shrink:0; margin-top:4px; }
.coach-eval-dot.done { background:#10b981; }
.coach-eval-dot.pending { background:#f59e0b; }

/* AI Knowledge Used panel (retained functional) */
.coach-knowledge-panel { padding:12px; background:var(--purple-dim, rgba(188,140,255,0.08)); border-radius:8px; margin-bottom:12px; border:1px solid rgba(188,140,255,0.2); }
.coach-knowledge-title { font-size:12px; font-weight:600; color:var(--purple, #bc8cff); margin-bottom:8px; }
.coach-knowledge-item { font-size:11px; color:var(--text2); line-height:1.8; }

/* Details Tab (mockup: .details-section, .details-field, .details-input, .details-card) */
.details-section { margin-bottom: 20px; }
.details-section-title { font-size: 12px; font-weight: 600; color: var(--text); margin-bottom: 10px; display: flex; align-items: center; justify-content: space-between; }
.details-field { margin-bottom: 10px; }
.details-label { font-size: 11px; color: var(--text3); margin-bottom: 3px; }
.details-input { width: 100%; padding: 7px 10px; background: var(--surface2); border: 1px solid var(--border); border-radius: 6px; color: var(--text); font-size: 12px; outline: none; font-family: inherit; }
.details-input:focus { border-color: var(--accent); }
.details-input::placeholder { color: var(--text3); }
textarea.details-input { min-height: 56px; resize: vertical; }
.details-add-btn { font-size: 11px; color: var(--accent); cursor: pointer; display: flex; align-items: center; gap: 4px; padding: 4px 0; }
.details-card { background: var(--surface2); border: 1px solid var(--border); border-radius: 6px; padding: 8px 10px; margin-bottom: 6px; }
.details-card-title { font-size: 12px; font-weight: 500; margin-bottom: 2px; }
.details-card-meta { font-size: 10px; color: var(--text3); }
/* Legacy details-tab-form kept for backward compat */
.details-tab-form { display:flex; flex-direction:column; gap:12px; }
.details-field label { display:block; font-size:11px; font-weight:600; color:var(--text2); margin-bottom:4px; }
.details-field input, .details-field textarea { width:100%; padding:6px 8px; font-size:12px; border:1px solid var(--border); border-radius:6px; background:var(--surface2); color:var(--text); box-sizing:border-box; font-family:inherit; }
.details-field textarea { resize:vertical; }
.details-info-hint { font-size:11px; color:var(--accent); background:var(--accent-dim, rgba(59,130,246,0.08)); border-radius:6px; padding:8px 10px; margin-top:8px; line-height:1.5; }

/* Review Workflow */
.rv-stage-bar { display:flex; gap:2px; margin-bottom:12px; }
.rv-stage { flex:1; text-align:center; padding:6px 2px; font-size:9px; font-weight:600; border-radius:4px; cursor:pointer; border:1px solid var(--border); background:var(--surface); color:var(--text3); }
.rv-stage.active { background:var(--accent); color:white; border-color:var(--accent); }
.rv-stage.completed { background:#D1FAE5; color:#065F46; border-color:#6EE7B7; }
.rv-comment { padding:8px; margin-bottom:6px; border:1px solid var(--border); border-radius:6px; background:var(--bg); }
.rv-comment.resolved { opacity:0.5; border-style:dashed; }

/* Phase 27 Wave 3 — review scoped classes (replaces 10 inline style= attrs that
   used to live in proposal-editor.js _initReviewPanel + _renderReviewComments +
   _runReviewTeam HTML builders). All rules use semantic D-04 tokens (--cream-warm,
   --orange-warm, --black-soft) where natural and existing tokens (--text, --text3,
   --accent, --green, --border, --surface2) elsewhere — zero !important. */
.pe-review__compose      { margin-bottom:10px; }
.pe-review__input        { width:100%; height:48px; padding:6px 8px; font-size:11px;
                           border:1px solid var(--border); border-radius:6px;
                           background:var(--black-soft); color:var(--text);
                           resize:vertical; box-sizing:border-box; }
.pe-review__submit-btn   { font-size:10px; padding:3px 10px; margin-top:4px;
                           background:var(--orange-warm); color:var(--cream-base); }
.pe-review__empty        { font-size:11px; color:var(--text3); font-style:italic; }
.pe-review__meta         { display:flex; justify-content:space-between;
                           align-items:center; margin-bottom:4px; }
.pe-review__stage        { font-size:10px; font-weight:600; color:var(--accent); }
.pe-review__date         { font-size:9px; color:var(--cream-warm); }
.pe-review__body         { font-size:11px; color:var(--text); margin-bottom:4px; }
.pe-review__resolve-btn  { font-size:9px; background:none; border:none; cursor:pointer;
                           color:var(--text3); padding:0; }
.pe-review__resolve-btn--resolved { color:var(--green); }
.pe-review__running      { color:var(--text3); padding:12px 0; text-align:center; }

/* Export Modal */
.exp-modal-overlay { position:fixed;top:0;left:0;right:0;bottom:0;background:rgba(0,0,0,0.4);z-index:10000;display:flex;align-items:center;justify-content:center; }
.exp-modal { background:var(--bg);border-radius:12px;padding:24px;max-width:420px;width:90%;box-shadow:0 20px 60px rgba(0,0,0,0.2); }
.exp-modal h3 { margin:0 0 16px 0; font-size:16px; color:var(--text); }
.exp-modal label { display:block; font-size:11px; font-weight:600; color:var(--text2); margin-bottom:4px; margin-top:12px; }
.exp-modal select, .exp-modal .exp-checkbox-row { font-size:12px; padding:6px 8px; border:1px solid var(--border); border-radius:6px; background:var(--surface); color:var(--text); width:100%; }
.exp-checkbox-row { display:flex; flex-wrap:wrap; gap:8px; padding:6px 0; border:none; }
.exp-checkbox-row label { display:flex; align-items:center; gap:4px; font-weight:400; margin:0; cursor:pointer; }
.exp-modal-actions { display:flex; gap:8px; margin-top:20px; justify-content:flex-end; }
.exp-modal-actions button { padding:8px 16px; border-radius:6px; font-size:12px; font-weight:600; cursor:pointer; border:none; }
.exp-modal-actions .exp-cancel { background:var(--surface2); color:var(--text2); }
.exp-modal-actions .exp-go { background:var(--accent); color:white; }

/* Phase 27 Wave 1 — export-modal scoped classes (replaces 8 inline style= attrs) */
/* Uses D-04 semantic tokens where natural; old var(--text2) etc. also still work */
.pe-export-modal__hint       { font-size:12px; color:var(--cream-warm); margin:10px 0 0; }
.pe-export-modal__gate-backdrop { position:fixed; inset:0; background:rgba(0,0,0,0.7); z-index:10000; display:flex; align-items:center; justify-content:center; padding:20px; }
.pe-export-modal__gate-inner { background:var(--cream-base); max-width:600px; width:100%; max-height:80vh; overflow-y:auto; border-radius:8px; padding:24px; box-shadow:0 10px 40px rgba(0,0,0,0.3); }
[data-theme="dark"] .pe-export-modal__gate-inner { background:var(--black-soft); }
.pe-export-modal__gate-title { margin:0 0 16px 0; color:var(--red); }
.pe-export-modal__gate-lead  { margin:0 0 12px 0; color:var(--text2); }
.pe-export-modal__gap-list   { margin:0 0 20px 0; padding-left:20px; }
.pe-export-modal__gap-item   { margin-bottom:12px; }
.pe-export-modal__gap-text   { color:var(--text3); font-size:13px; margin-top:4px; }
.pe-export-modal__gate-actions { display:flex; gap:12px; justify-content:flex-end; }

/* Phase 27 Wave 4 — compliance-matrix scoped classes (replaces 27 inline style=
   attrs that used to live in proposal-editor.js compliance block: _loadComplianceTab,
   _renderComplianceTab, _shredRfp, _toggleAmendmentsAck, _cycleReqStatus). Status
   modifier classes follow the actual 3-status taxonomy in this monofile
   (addressed/partial/unaddressed), NOT the 4-class taxonomy that lives in the
   separate dashboard/js/opportunities/compliance.js module from quick-260501-ojm.
   Uses D-04 semantic tokens (--cream-warm, --orange-warm, --black-soft) where
   natural; existing tokens (--text, --text3, --accent, --green, --red, --border,
   --surface, --surface2) elsewhere — zero !important. Type and priority pill
   modifiers cover the documented enum values; unknown values fall through to base
   pill style (mid-gray). */
.pe-compliance__loading      { color:var(--text3); font-size:11px; text-align:center; padding:20px; }
.pe-compliance__empty-state  { text-align:center; padding:20px; }
.pe-compliance__empty-msg    { font-size:11px; color:var(--cream-warm); margin-bottom:10px; }
.pe-compliance__shred-btn    { font-size:11px; padding:6px 14px; }
.pe-compliance__empty-hint   { font-size:10px; color:var(--text3); margin-top:6px; }
.pe-compliance__summary      { font-size:11px; color:var(--cream-warm); margin-bottom:8px; font-weight:600; }
.pe-compliance__count        { font-weight:600; }
.pe-compliance__count--addressed   { color:var(--green); }
.pe-compliance__count--partial     { color:var(--orange-warm); }
.pe-compliance__count--unaddressed { color:var(--red); }
.pe-compliance__actions      { display:flex; gap:4px; margin-bottom:8px; }
.pe-compliance__reshred-btn  { font-size:10px; padding:3px 8px; }
.pe-compliance__req          { padding:6px 0; border-bottom:1px solid var(--border); font-size:11px; }
.pe-compliance__req-tags     { display:flex; gap:4px; align-items:center; margin-bottom:3px; }
.pe-compliance__req-text     { color:var(--text); margin-bottom:3px; }
.pe-compliance__req-footer   { display:flex; gap:4px; align-items:center; }
.pe-compliance__section-ref  { font-size:9px; color:var(--text3); }
.pe-compliance__mapped-section { font-size:9px; color:var(--text3); }
/* Pill base — type/priority/status share padding+radius+font; modifiers add color */
.pe-compliance__type-pill,
.pe-compliance__priority-pill { padding:1px 5px; border-radius:3px; font-size:9px;
                                font-weight:600; background:rgba(107,114,128,0.13);
                                color:#6b7280; }
.pe-compliance__status-pill   { padding:2px 6px; border-radius:3px; font-size:9px;
                                font-weight:600; background:rgba(239,68,68,0.13);
                                color:var(--red); border:none; cursor:pointer; }
/* Type modifiers — enum values from prompt (technical/management/past_performance/
   pricing/compliance/administrative/staffing/quality/security) */
.pe-compliance__type-pill--technical        { background:rgba(59,130,246,0.13); color:#3b82f6; }
.pe-compliance__type-pill--management       { background:rgba(139,92,246,0.13); color:#8b5cf6; }
.pe-compliance__type-pill--past_performance { background:rgba(6,182,212,0.13);  color:#06b6d4; }
.pe-compliance__type-pill--pricing          { background:rgba(245,158,11,0.13); color:var(--orange-warm); }
.pe-compliance__type-pill--compliance       { background:rgba(239,68,68,0.13);  color:var(--red); }
.pe-compliance__type-pill--administrative   { background:rgba(107,114,128,0.13);color:#6b7280; }
.pe-compliance__type-pill--staffing         { background:rgba(236,72,153,0.13); color:#ec4899; }
.pe-compliance__type-pill--quality          { background:rgba(16,185,129,0.13); color:var(--green); }
.pe-compliance__type-pill--security         { background:rgba(249,115,22,0.13); color:#f97316; }
/* Priority modifiers — must/should/may */
.pe-compliance__priority-pill--must   { background:rgba(239,68,68,0.13); color:var(--red); }
.pe-compliance__priority-pill--should { background:rgba(245,158,11,0.13); color:var(--orange-warm); }
.pe-compliance__priority-pill--may    { background:rgba(107,114,128,0.13); color:#6b7280; }
/* Status modifiers — actual 3-status taxonomy in monofile (addressed/partial/unaddressed) */
.pe-compliance__status-pill--addressed   { background:rgba(34,197,94,0.13);  color:var(--green); }
.pe-compliance__status-pill--partial     { background:rgba(245,158,11,0.13); color:var(--orange-warm); }
.pe-compliance__status-pill--unaddressed { background:rgba(239,68,68,0.13);  color:var(--red); }
/* Error frame for tab load failures */
.pe-compliance__error-frame  { padding:16px; text-align:center; }
.pe-compliance__error-msg    { color:var(--red); font-size:13px; margin-bottom:10px; }
.pe-compliance__retry-btn    { font-size:11px; padding:5px 12px; }

/* Phase 27 Wave 5 — spreadsheet scoped classes (replaces inline style= attrs
   in dashboard/js/proposal-editor/spreadsheet.js — header min-width override
   for first/last column + the "+ Add Row" button block below the grid). The
   bulk of spreadsheet visual styling already lives in the .ss-* class family
   (existing styles.css L1588-1607). These .pe-spreadsheet__* classes are
   ADDITIVE — they cover the inline-style edge cases the extraction migrated.
   Uses D-04 semantic tokens (--cream-warm, --orange-warm, --black-soft) where
   natural; existing tokens (--text3, --border, --surface2) elsewhere. Zero
   forced-priority overrides used (no prior selectors required removal). */
.pe-spreadsheet__header-cell--wide { min-width: 100px; }
.pe-spreadsheet__add-row-wrap     { margin-top: 6px; }
.pe-spreadsheet__add-row-btn      {
  font-size: 11px;
  padding: 3px 10px;
  border: 1px solid var(--border);
  border-radius: 4px;
  background: var(--surface2);
  color: var(--text3);
  cursor: pointer;
}
.pe-spreadsheet__add-row-btn:hover { background: var(--cream-warm); color: var(--text); }
/* Future-proof scoped surface — additional modifier classes for grid roles
   the wave migration did not need today, but a follow-up CSS-hygiene pass
   could fold the existing .ss-* family into. Kept inert (no rules) until
   needed so Wave 5 ships only what it migrated. */
.pe-spreadsheet__grid {}
.pe-spreadsheet__row {}
.pe-spreadsheet__cell {}
.pe-spreadsheet__cell--header {}
.pe-spreadsheet__cell--total {}
.pe-spreadsheet__cell--editing {}
.pe-spreadsheet__toolbar {}
.pe-spreadsheet__add-btn {}
.pe-spreadsheet__delete-btn {}
.pe-spreadsheet__save-btn {}
.pe-spreadsheet__close-btn {}
.pe-spreadsheet__footer {}
.pe-spreadsheet__modal {}

/* Phase 27 Wave 6 — ai-write scoped classes (replaces 24 inline style= attrs
   migrated out of dashboard/js/proposal-editor/ai-write.js extraction). Block
   covers: trigger lock state, write-all confirm modal, AI form modal
   (overlay/header/body/footer/inputs/buttons), source badges, and the loading
   placeholder text. Uses D-04 semantic tokens (--surface, --surface2, --text,
   --text2, --text3, --border, --accent, --red) end-to-end. Zero forced-priority
   overrides. Aligned with Wave 5 spreadsheet block convention above. */

/* Trigger lock — replaces inline btn.style.opacity='0.5'+pointerEvents='none'
   set by _lockAiTriggers (was L2493/2497 of monofile pre-extraction). */
.pe-ai-write__trigger--locked { opacity: 0.5; pointer-events: none; }

/* Write-all confirm modal */
.pe-ai-write__overlay {
  position: fixed; inset: 0; z-index: 10000;
  display: flex; align-items: center; justify-content: center;
  background: rgba(0,0,0,0.5);
}
.pe-ai-write__modal {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 24px;
  max-width: 440px;
  width: 90%;
  box-shadow: 0 8px 32px rgba(0,0,0,0.4);
}
.pe-ai-write__modal-title {
  font-size: 16px; font-weight: 600; color: var(--text);
  margin-bottom: 4px;
}
.pe-ai-write__modal-desc {
  font-size: 13px; color: var(--text3); margin-bottom: 16px;
}
/* Phase 30 T-30.2 (PE30-02) — cost-preview row inside _aiWriteAllWithConfirm modal */
.pe-cost-preview {
  padding: 12px 16px;
  border-radius: 6px;
  margin-bottom: 16px;
  display: flex; flex-direction: column; gap: 4px;
}
.pe-cost-preview--ok {
  background: var(--yellow-dim);
  color: var(--yellow);
}
.pe-cost-preview--high {
  background: var(--red-dim);
  color: var(--red);
}
.pe-cost-preview__badge {
  font-size: 13px; font-weight: 600;
}
.pe-cost-preview__hint {
  font-size: 11px; color: var(--text3);
}
.pe-ai-write__section-list {
  max-height: 240px; overflow-y: auto; margin-bottom: 16px;
}
.pe-ai-write__section-row {
  display: flex; align-items: center; gap: 8px;
  padding: 6px 0; border-bottom: 1px solid var(--border);
}
.pe-ai-write__section-dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--red); flex-shrink: 0;
}
.pe-ai-write__section-name { font-size: 13px; color: var(--text); }
.pe-ai-write__section-required {
  font-size: 10px; color: var(--red); margin-left: auto;
}
.pe-ai-write__modal-actions {
  display: flex; gap: 8px; justify-content: flex-end;
}

/* Buttons (shared by confirm modal + AI form footer) */
.pe-ai-write__btn {
  padding: 8px 16px; border-radius: 6px; font-size: 13px;
  cursor: pointer; font-weight: 600;
}
.pe-ai-write__btn--cancel {
  border: 1px solid var(--border);
  background: var(--surface2);
  color: var(--text);
}
.pe-ai-write__btn--primary {
  border: none; background: var(--accent); color: #fff;
}
.pe-ai-write__btn--ghost {
  background: var(--surface2);
  color: var(--text2);
  border: 1px solid var(--border);
  border-radius: 8px;
}
.pe-ai-write__btn--icon {
  padding: 8px 20px; border-radius: 8px;
  display: flex; align-items: center; gap: 6px;
  font-weight: 700;
}
.pe-ai-write__btn-icon { font-size: 15px; }

/* AI form modal (per-section AI generation form) */
.pe-ai-write__form-overlay {
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.6);
  z-index: 10000;
  display: flex; align-items: center; justify-content: center;
  padding: 20px;
}
.pe-ai-write__form-modal {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  width: 100%; max-width: 640px;
  max-height: 85vh;
  overflow-y: auto;
  padding: 0;
  box-shadow: 0 20px 60px rgba(0,0,0,0.4);
}
.pe-ai-write__form-header {
  padding: 20px 24px 16px;
  border-bottom: 1px solid var(--border);
  position: sticky; top: 0;
  background: var(--surface);
  z-index: 1;
  border-radius: 16px 16px 0 0;
}
.pe-ai-write__form-header-row {
  display: flex; justify-content: space-between; align-items: center;
}
.pe-ai-write__form-title { font-size: 16px; font-weight: 700; color: var(--text); }
.pe-ai-write__form-desc { font-size: 12px; color: var(--text3); margin-top: 4px; }
.pe-ai-write__form-close {
  background: none; border: none; color: var(--text3);
  font-size: 22px; cursor: pointer;
  padding: 0 4px; line-height: 1;
}
.pe-ai-write__form-body { padding: 16px 24px 20px; }
.pe-ai-write__form-group { margin-bottom: 14px; }
.pe-ai-write__form-label {
  display: block; font-size: 12px; font-weight: 600;
  color: var(--text2); margin-bottom: 5px;
  text-transform: uppercase; letter-spacing: 0.3px;
}
.pe-ai-write__form-input {
  width: 100%; padding: 9px 12px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text);
  font-size: 13px;
  outline: none;
}
.pe-ai-write__form-input--textarea {
  resize: vertical;
  font-family: inherit;
  line-height: 1.5;
}
.pe-ai-write__form-footer {
  padding: 16px 24px 20px;
  border-top: 1px solid var(--border);
  display: flex; gap: 10px; justify-content: flex-end;
  position: sticky; bottom: 0;
  background: var(--surface);
  border-radius: 0 0 16px 16px;
}

/* Source badges (post-stream "AI Sources: X, Y · Missing: Z") */
.pe-ai-write__source-badges {
  margin-top: 6px;
  padding: 6px 10px;
  background: var(--surface2);
  border-radius: 6px;
  font-size: 11px;
  border: 1px solid var(--border);
  transition: opacity 0.5s ease;
}
.pe-ai-write__source-badges--faded { opacity: 0.5; }
.pe-ai-write__source-badges-row {
  display: flex; align-items: center; gap: 4px; flex-wrap: wrap;
}
.pe-ai-write__source-badges-label { color: var(--text3); font-weight: 600; }
.pe-ai-write__source-badges-missing-label { color: var(--text3); margin-left: 4px; }
.pe-ai-write__source-badge {
  padding: 1px 6px;
  border-radius: 3px;
  font-size: 10px;
}
.pe-ai-write__source-badge--used    { background: #D1FAE5; color: #065F46; }
.pe-ai-write__source-badge--missing { background: #FEF3C7; color: #92400E; }

/* Phase 30 T-30.5 (PE30-05) — Inline citation caption under AI-generated paragraph.
   Muted grey, transparent (no card background); zero new tokens — uses --text3 only.
   UI-SPEC §Color L99-100 explicitly excludes --accent. Light theme passes by
   inheritance from Phase 27 W-04 verified token contrast. */
.pe-cite-caption {
  margin-top: 4px;
  padding: 0;
  background: transparent;
  color: var(--text3);
  font-size: 11px;
  font-weight: 600;
  line-height: 1.3;
}
.pe-cite-caption__label {
  color: var(--text3);
  font-weight: 600;
  margin-right: 4px;
}
.pe-cite-caption__sep {
  color: var(--text3);
  margin: 0 2px;
  opacity: 0.6;
}

/* Loading placeholder shown while AI prefetches sources before stream starts */
.pe-ai-write__loading {
  color: var(--text3); font-size: 12px; padding: 8px;
}

/* Modifier left as a structural marker (no extra rules needed beyond
   .pe-ai-write__modal — present so future variants can branch off if needed). */
.pe-ai-write__modal--writeall {}

/* Readiness Health Widget */
.rh-item { background:var(--surface); border:1px solid var(--border); border-radius:10px; padding:14px 16px; cursor:pointer; transition:border-color 0.15s; }
.rh-item:hover { border-color:var(--accent); }
.rh-header { display:flex; align-items:center; justify-content:space-between; margin-bottom:10px; }
.rh-title { font-size:13px; font-weight:600; color:var(--text); overflow:hidden; text-overflow:ellipsis; white-space:nowrap; max-width:55%; }
.rh-score-ring { width:44px; height:44px; border-radius:50%; display:flex; align-items:center; justify-content:center; font-size:15px; font-weight:700; font-family:var(--mono); flex-shrink:0; }
.rh-bars { display:grid; grid-template-columns:repeat(3, 1fr); gap:6px; margin-bottom:8px; }
.rh-bar-label { font-size:10px; color:var(--text3); margin-bottom:2px; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.rh-bar-track { height:6px; background:var(--surface2); border-radius:3px; overflow:hidden; }
.rh-bar-fill { height:100%; border-radius:3px; transition:width 0.3s; }
.rh-blockers { font-size:11px; color:var(--text2); }
.rh-blocker-item { display:flex; align-items:baseline; gap:4px; padding:1px 0; }
.rh-action { color:var(--accent); cursor:pointer; font-size:11px; font-weight:600; }

/* === NAV RAIL MODE (proposal editor active) === */
.sidebar.nav-rail-mode {
  width: 56px;
  min-width: 56px;
  padding: 12px 0;
  align-items: center;
  transition: width 0.2s ease, min-width 0.2s ease, padding 0.2s ease;
}
.sidebar.nav-rail-mode .logo { padding: 4px 0 12px; border-bottom: none; margin-bottom: 0; justify-content: center; }
.sidebar.nav-rail-mode .logo-name,
.sidebar.nav-rail-mode .logo-sub { display: none; }
.sidebar.nav-rail-mode .logo-mark { width: 32px; height: 32px; font-size: 12px; border-radius: 8px; }
.sidebar.nav-rail-mode .logo--wordmark { flex-direction: row; gap: 0; align-items: center; }
.sidebar.nav-rail-mode .logo-img { display: none !important; }
.sidebar.nav-rail-mode .logo--wordmark .logo-mark { display: flex; }
.sidebar.nav-rail-mode .nav { align-items: center; }
.sidebar.nav-rail-mode .nav-btn {
  /* quick-260511-oe9 Wave 3: removed forced flags on border-left + padding-left.
     Higher specificity (0,2,0 vs L243 .nav-btn at 0,1,0) wins naturally. */
  width: 40px;
  height: 40px;
  border-radius: 8px;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0;
  border-left: none;
  padding-left: 0;
  position: relative;
}
.sidebar.nav-rail-mode .nav-btn .nav-icon { font-size: 18px; width: auto; margin: 0; }
.sidebar.nav-rail-mode .nav-btn .badge-count { display: none; }
.sidebar.nav-rail-mode .nav-btn.active {
  /* quick-260511-oe9 Wave 3: removed forced flag on border-left.
     Specificity (0,3,0) vs L243 .nav-btn.active (0,2,0) wins naturally. */
  background: var(--accent-dim);
  border-radius: 8px;
  border-left: none;
}
.sidebar.nav-rail-mode .sidebar-footer { display: none; }
.sidebar.nav-rail-mode #profileCompleteBar { display: none !important; }
/* Tooltips for nav rail icons */
.sidebar.nav-rail-mode .nav-btn::after {
  content: attr(data-tooltip);
  position: absolute;
  left: calc(100% + 8px);
  top: 50%;
  transform: translateY(-50%);
  background: var(--surface3, #21262d);
  color: var(--text);
  font-size: 12px;
  padding: 4px 8px;
  border-radius: 4px;
  white-space: nowrap;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.15s;
  z-index: 100;
}
.sidebar.nav-rail-mode .nav-btn:hover::after { opacity: 1; }

/* === EMPTY SECTION STATE (mockup: .ai-empty-state) === */
.ai-empty-state { display: flex; flex-direction: column; align-items: center; justify-content: center; flex: 1; text-align: center; padding: 40px; }
.ai-empty-icon { width: 64px; height: 64px; border-radius: 16px; background: var(--gradient-ai); display: flex; align-items: center; justify-content: center; margin-bottom: 20px; font-size: 28px; color: white; }
.ai-empty-icon svg { width: 32px; height: 32px; fill: white; }
.ai-empty-title { font-size: 18px; font-weight: 600; margin-bottom: 8px; }
.ai-empty-desc { font-size: 13px; color: var(--text2); max-width: 400px; line-height: 1.6; margin-bottom: 24px; }
.ai-empty-btn { padding: 10px 24px; background: var(--gradient-ai); color: #fff; border: none; border-radius: 8px; font-size: 14px; font-weight: 500; cursor: pointer; display: flex; align-items: center; gap: 8px; }
.ai-empty-manual { font-size:12px; color:var(--text3); margin-top:12px; cursor:pointer; }
.ai-empty-manual:hover { color:var(--accent); text-decoration:underline; }

/* === W2.4 empty-hero secondary control (quick-260503-dcy) === */
/* Promoted from <div> to <button> for keyboard a11y; needs button reset + visible
   affordance. !important mirrors the parallel .ai-empty-btn rule at L1479. */
.ped-empty-manual {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  margin-top: 12px !important;
  padding: 8px 16px !important;
  min-height: 32px !important;
  font-size: 12px !important;
  font-weight: 500 !important;
  color: var(--text3) !important;
  background: transparent !important;
  border: 1px solid transparent !important;
  border-radius: 6px !important;
  cursor: pointer !important;
  text-decoration: none !important;
  transition: color .15s, background-color .15s, border-color .15s !important;
}
.ped-empty-manual:hover {
  color: var(--accent) !important;
  background: rgba(88, 166, 255, 0.08) !important;
  border-color: rgba(88, 166, 255, 0.25) !important;
  text-decoration: underline !important;
}
.ped-empty-manual:focus-visible {
  outline: 2px solid var(--accent) !important;
  outline-offset: 2px !important;
}
/* Dark-mode parity — hover background uses hard-coded blue rgba; soften on
   near-black surface so it doesn't look like a button glow. */
[data-theme="dark"] .ped-empty-manual:hover {
  background: rgba(88, 166, 255, 0.14) !important;
}

/* === MODE BANNER (mockup: .mode-banner, .mode-dot) === */
.mode-banner { display: none; align-items: center; gap: 8px; padding: 8px 24px; background: linear-gradient(90deg, var(--purple-dim) 0%, var(--accent-dim) 100%); font-size: 12px; color: var(--purple); border-bottom: 1px solid var(--border); }
.mode-banner.active { display: flex; }
.mode-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--green); animation: pulse 2s infinite; }
.ped-stop-btn { padding:3px 10px; border-radius:4px; background:var(--red-dim); border:1px solid var(--red); color:var(--red); font-size:11px; cursor:pointer; }
.ped-stop-btn:hover { background:var(--red); color:#fff; }
.ped-generating .ql-container { border-color:var(--purple) !important; }
.ped-generating .ql-editor { background:linear-gradient(180deg, var(--purple-dim) 0%, transparent 15%); }
@keyframes pedBlink { 0%,100% { opacity:1; } 50% { opacity:0; } }
.ped-ai-cursor { display:inline-block; width:2px; height:14px; background:var(--purple); animation:pedBlink 0.8s infinite; vertical-align:text-bottom; margin-left:1px; }
.ped-gen-actions { display:none; align-items:center; gap:8px; padding:8px 0; margin-top:4px; }
.ped-gen-actions.active { display:flex; }
.ped-gen-status { font-size:12px; color:var(--text3); }
.ped-gen-btn-discard { padding:6px 16px; border-radius:6px; font-size:12px; background:var(--surface2); border:1px solid var(--border); color:var(--text2); cursor:pointer; }
.ped-gen-btn-accept { padding:6px 16px; border-radius:6px; font-size:12px; background:var(--green); border:1px solid var(--green); color:#fff; cursor:pointer; }
.ped-gen-btn-accept:hover { opacity:0.9; }

/* === AI INPUT FORM (mockup: .ai-form-container, .form-*) === */
.ai-form-container { flex: 1; overflow-y: auto; padding: 20px 24px; }
.ai-form-header { display: flex; align-items: center; gap: 12px; margin-bottom: 20px; }
.ai-form-header-icon { width: 40px; height: 40px; border-radius: 10px; background: var(--gradient-ai); display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.ai-form-header-icon svg { width: 22px; height: 22px; fill: white; }
.ai-form-title { font-size: 16px; font-weight: 600; }
.ai-form-subtitle { font-size: 12px; color: var(--text2); margin-top: 2px; }

.form-section { margin-bottom: 24px; }
.form-section-title { font-size: 13px; font-weight: 600; margin-bottom: 4px; color: var(--text); display: flex; align-items: center; gap: 6px; }
.form-section-desc { font-size: 11px; color: var(--text3); margin-bottom: 10px; }
.form-badge { font-size: 9px; padding: 1px 6px; border-radius: 3px; font-weight: 400; }
.form-badge.required { background: var(--red-dim); color: var(--red); }
.form-badge.optional { background: var(--surface3); color: var(--text3); }
.form-badge.ai-knows { background: var(--green-dim); color: var(--green); }

.form-field { margin-bottom: 12px; }
.form-label { font-size: 12px; color: var(--text2); margin-bottom: 4px; display: flex; align-items: center; gap: 6px; }
.form-input { width: 100%; padding: 8px 12px; background: var(--surface2); border: 1px solid var(--border); border-radius: 6px; color: var(--text); font-size: 13px; outline: none; font-family: inherit; }
.form-input:focus { border-color: var(--accent); }
.form-input::placeholder { color: var(--text3); }
textarea.form-input { min-height: 70px; resize: vertical; line-height: 1.5; }
.form-hint { font-size: 10px; color: var(--text3); margin-top: 3px; }

.form-row { display: flex; gap: 12px; }
.form-row .form-field { flex: 1; }

.form-divider { height: 1px; background: var(--border); margin: 20px 0; }

/* AI prefilled indicator */
.ai-prefilled { position: relative; }
.ai-prefilled .form-input { border-color: var(--purple); background: linear-gradient(135deg, var(--purple-dim) 0%, var(--surface2) 100%); }
.ai-prefill-badge { position: absolute; top: -8px; right: 8px; font-size: 9px; padding: 1px 6px; border-radius: 3px; background: var(--purple-dim); color: var(--purple); border: 1px solid var(--purple); }

/* Generate button at bottom of form */
.form-generate-bar { padding: 16px 24px; background: var(--surface); border-top: 1px solid var(--border); display: flex; align-items: center; gap: 12px; }
.form-generate-btn { padding: 10px 28px; background: var(--gradient-ai); color: #fff; border: none; border-radius: 8px; font-size: 14px; font-weight: 500; cursor: pointer; display: flex; align-items: center; gap: 8px; }
.form-generate-btn:hover { opacity: 0.9; }
.form-skip-btn { padding: 10px 20px; background: var(--surface2); color: var(--text2); border: 1px solid var(--border); border-radius: 8px; font-size: 13px; cursor: pointer; }
.form-progress { font-size: 11px; color: var(--text3); margin-left: auto; }

/* RFP PDF Viewer */
#emb-rfp-viewer-toolbar {
  display: flex; align-items: center; gap: 6px; padding: 4px 0; margin-bottom: 6px;
  border-bottom: 1px solid var(--border); flex-wrap: wrap;
}
#emb-rfp-viewer-toolbar button { font-size: 11px; padding: 3px 8px; border: 1px solid var(--border); border-radius: 4px; background: var(--surface2); color: var(--text2); cursor: pointer; }
#emb-rfp-viewer-toolbar button:hover { background: var(--surface3); }
#emb-rfp-page-info { font-size: 11px; color: var(--text2); min-width: 50px; text-align: center; }
#emb-rfp-pdf-container { position: relative; background: var(--surface1); border-radius: 6px; overflow: auto; max-height: calc(100vh - 200px); }
#emb-rfp-pdf-canvas { display: block; margin: 0 auto; }
#emb-rfp-text-layer { position: absolute; top: 0; left: 0; right: 0; bottom: 0; overflow: hidden; opacity: 0.3; line-height: 1.0; pointer-events: auto; }
#emb-rfp-text-layer span { position: absolute; white-space: pre; color: transparent; cursor: pointer; }
#emb-rfp-text-layer span:hover { background: rgba(99,102,241,0.15); border-radius: 2px; }
/* Phase 27 W2 — !important removed; specificity bumped via #emb-rfp-text-layer span chain
   so cascade still wins against #emb-rfp-text-layer span (id+tag) base rule. */
#emb-rfp-text-layer span.rfp-search-hit { background: var(--yellow); color: var(--text); opacity: 1; }
/* Phase 27 W2 — transient cite highlight. Replaces inline style.background = 'rgba(99,102,241,0.3)'
   in _citeRfpText; toggled via class add/remove with setTimeout(800ms). */
#emb-rfp-text-layer span.rfp-text-span--cited { background: rgba(99,102,241,0.3); }

/* Side-by-Side Mode */
/* Phase 27 W2 — !important removed; .ped-sbs-mode is added to a wrapper that already
   inherits display:flex from .proposal-editor-layout > :nth-child(2). Standalone fallback
   below ensures the rule still applies even outside that ancestor chain. */
.ped-sbs-mode { display: flex; }
.ped-sbs-mode #emb-rfp-sbs-pane {
  width: 45%; min-width: 300px; max-width: 50%; border-right: 2px solid var(--border);
  display: flex; flex-direction: column; overflow: hidden;
}
.ped-sbs-mode #emb-ped-editor-area { flex: 1; min-width: 0; }
.ped-sbs-mode .right-panel { display: none; }

/* === Phase 27 W2 — pe-rfp-viewer__* scoped classes ===
   Replaces 17 inline style= attrs migrated from rfp-viewer.js during extraction.
   Uses D-04 semantic tokens (--cream-warm, --black-soft, --orange-warm) where natural,
   falling back to existing tokens (--text2, --text3, --border, --red, --yellow) elsewhere. */
.pe-rfp-viewer__empty-italic   { color: var(--text3); font-style: italic; }
.pe-rfp-viewer__empty-frame    { padding: 16px; text-align: center; color: var(--cream-warm); }
.pe-rfp-viewer__empty-msg      { font-size: 13px; margin-bottom: 10px; }
.pe-rfp-viewer__error-frame    { padding: 16px; text-align: center; }
.pe-rfp-viewer__error-msg      { color: var(--red); font-size: 13px; margin-bottom: 10px; }
.pe-rfp-viewer__retry-btn      { font-size: 11px; padding: 5px 12px; }
.pe-rfp-viewer__loading        { padding: 16px; text-align: center; }
.pe-rfp-viewer__pdf-loading    { padding: 20px; text-align: center; color: var(--text3); }
.pe-rfp-viewer__pdf-error      { padding: 20px; text-align: center; color: var(--red); }
.pe-rfp-viewer__part           { margin-bottom: 12px; }
.pe-rfp-viewer__part-title     {
  font-size: 11px; font-weight: 700; color: var(--text2);
  margin-bottom: 4px; border-bottom: 1px solid var(--border); padding-bottom: 3px;
}
.pe-rfp-viewer__section-header { font-weight: 600; color: var(--text2); margin-top: 6px; }
.pe-rfp-viewer__line           { margin-bottom: 2px; }
.pe-rfp-viewer__search-mark    {
  background: var(--yellow); color: var(--text);
  padding: 0 1px; border-radius: 2px;
}

/* ===== NOTIFICATION CENTER (Phase 13) ===== */

/* Bell button */
.notif-bell-btn {
  width: 100%;
  min-height: 44px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: var(--radius);
  background: transparent;
  border: none;
  color: var(--text);
  cursor: pointer;
  font-size: 14px;
  font-family: inherit;
  position: relative;
  transition: background 0.15s;
}
.notif-bell-btn:hover { background: var(--surface2); }

/* Unread count badge */
.notif-badge {
  position: absolute;
  top: 4px;
  right: 12px;
  min-width: 18px;
  height: 18px;
  border-radius: 9px;
  background: var(--accent);
  color: white;
  font-size: 11px;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 5px;
  box-sizing: border-box;
}

/* Badge pulse animation — triggers only when count increases */
@keyframes notif-pulse {
  0% { box-shadow: 0 0 0 0 rgba(114,110,240,0.6); }
  60% { box-shadow: 0 0 0 6px rgba(114,110,240,0); }
  100% { box-shadow: 0 0 0 0 rgba(114,110,240,0); }
}
.notif-badge-pulse { animation: notif-pulse 600ms ease-out 1; }

/* Dropdown panel */
@keyframes notif-fadein {
  from { opacity: 0; transform: translateY(4px); }
  to { opacity: 1; transform: translateY(0); }
}
.notif-dropdown {
  /* B-01: position:fixed (not absolute) so the 320px dropdown escapes the
     .sidebar's overflow-y:auto clipping box. JS sets `left` and `bottom`
     from getBoundingClientRect() on the bell button each time it opens. */
  position: fixed;
  width: 320px;
  max-height: 400px;
  overflow-y: auto;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: 0 8px 24px rgba(0,0,0,0.4);
  z-index: 1500;
  animation: notif-fadein 150ms ease-out;
}

/* Dropdown header */
.notif-header {
  padding: 16px 16px 8px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid var(--border);
}
.notif-header-title {
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
}
.notif-mark-all {
  background: none;
  border: none;
  color: var(--accent);
  font-size: 13px;
  cursor: pointer;
  padding: 0;
  font-family: inherit;
}
.notif-mark-all:hover { text-decoration: underline; }

/* Notification list container */
.notif-list { /* inherits overflow from parent */ }

/* Individual notification item */
.notif-item {
  display: flex;
  gap: 8px;
  padding: 8px 16px;
  border-bottom: 1px solid var(--border);
  cursor: pointer;
  align-items: flex-start;
  transition: background 0.1s;
}
.notif-item:last-child { border-bottom: none; }
.notif-item:hover { background: var(--surface2); }
.notif-item.unread { border-left: 4px solid var(--accent); padding-left: 12px; }
.notif-item.read { opacity: 0.75; border-left: none; padding-left: 16px; }

/* Type icon */
.notif-type-icon {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  flex-shrink: 0;
}
.notif-type-icon.amendment { background: var(--yellow-dim, rgba(251,191,36,0.15)); color: var(--yellow); }
.notif-type-icon.deadline { background: var(--red-dim, rgba(248,113,113,0.15)); color: var(--red); }
.notif-type-icon.match { background: var(--green-dim, rgba(52,211,115,0.15)); color: var(--green); }

/* Notification content */
.notif-content {
  display: flex;
  flex-direction: column;
  gap: 4px;
  flex: 1;
  min-width: 0;
}
.notif-title {
  font-size: 14px;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.notif-time {
  font-size: 13px;
  color: var(--text3);
}

/* Unread indicator dot */
.notif-unread-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
  flex-shrink: 0;
  align-self: center;
}

/* Empty state */
.notif-empty {
  padding: 32px 16px;
  text-align: center;
  color: var(--text3);
}

/* Skeleton shimmer loading state */
@keyframes notif-shimmer {
  from { background-position: -320px 0; }
  to { background-position: 320px 0; }
}
.notif-skeleton {
  height: 52px;
  background: linear-gradient(90deg, var(--surface) 25%, var(--surface2) 50%, var(--surface) 75%);
  background-size: 640px 100%;
  animation: notif-shimmer 1.2s infinite linear;
  border-bottom: 1px solid var(--border);
}
#emb-rfp-sbs-toggle.active { background: var(--accent); color: white; border-color: var(--accent); }

/* Compliance requirement rows */
.compliance-req {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 8px 12px;
  border-bottom: 1px solid var(--border);
  font-size: 13px;
  color: var(--text2);
  line-height: 1.4;
}
.compliance-req:last-child {
  border-bottom: none;
}
.compliance-req-text {
  flex: 1;
  min-width: 0;
  word-break: break-word;
}

/* Compliance status badges */
.compliance-status {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.3px;
  text-transform: uppercase;
  white-space: nowrap;
  flex-shrink: 0;
}
.compliance-status.met {
  background: rgba(52, 211, 115, 0.15);
  color: var(--green);
}
.compliance-status.partial {
  background: rgba(251, 191, 36, 0.15);
  color: var(--yellow);
}
.compliance-status.unmet {
  background: rgba(248, 113, 113, 0.15);
  color: var(--red);
}

/* Proposal type badge */
.proposal-type-badge.contract {
  background: var(--accent-dim);
  color: var(--accent);
}

/* =========================================================================
   Utility classes extracted from dashboard/js/opportunities.js — P2 #16
   Each class replaces a static inline style string that occurred 3+ times.
   Naming: .opp-u-* ("opp" matches existing convention, "u" = utility extract).
   Do NOT compose these; each rule is a self-contained drop-in replacement
   for one specific inline style string. If a style needs to differ from the
   replaced pattern, keep it inline instead of creating a new class.
   ========================================================================= */

.opp-u-muted { color: var(--text3); }
.opp-u-muted-xs { font-size: 11px; color: var(--text3); }
.opp-u-muted-sm { font-size: 12px; color: var(--text3); }
.opp-u-muted-body { font-size: 13px; color: var(--text2); }
.opp-u-muted-sm-nudge { font-size: 12px; color: var(--text3); margin-top: 1px; }
.opp-u-muted-label { font-size: 11px; color: var(--text3); font-weight: 600; text-transform: uppercase; margin-bottom: 4px; }

.opp-u-body-sm { font-size: 12px; color: var(--text); padding: 2px 0; }
.opp-u-body-strong { font-size: 13px; font-weight: 700; color: var(--text); }
.opp-u-heading-mono { font-size: 15px; font-weight: 700; font-family: var(--mono); color: var(--text); }
.opp-u-heading-lg { font-size: 18px; font-weight: 800; color: var(--text); }

.opp-u-label-strong { font-weight: 600; color: var(--text2); }
.opp-u-accent-link { color: var(--accent); cursor: pointer; }
.opp-u-win { color: var(--green); font-weight: 700; }
.opp-u-win-soft { color: var(--green); font-weight: 600; }

.opp-u-flex-grow { flex: 1; min-width: 0; }
.opp-u-center { text-align: center; }
.opp-u-empty-state { text-align: center; padding: 20px; font-size: 13px; color: var(--text3); }
.opp-u-btn-sm { padding: 8px 16px; font-size: 13px; }
.opp-u-mb6 { margin-bottom: 6px; }

.opp-modal {
  max-width: 900px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 24px;
  margin: 20px;
}
.opp-modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}
.opp-modal-close {
  background: none;
  border: none;
  color: var(--text3);
  font-size: 24px;
  cursor: pointer;
  line-height: 1;
}

/* Phase 20 AI-01 — pWin band chip tooltip (UI-SPEC §AI-01).
   Zero new color tokens: reuses existing --green/--yellow/--red via
   .badge-green/.badge-yellow/.badge-red applied to .pwin-chip. */
.pwin-chip {
  position: relative;
  cursor: help;
}
.pwin-tooltip {
  position: absolute;
  bottom: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 8px 12px;
  box-shadow: var(--shadow-lg);
  font-size: 13px;
  color: var(--text2);
  line-height: 1.5;
  max-width: 280px;
  white-space: normal;
  z-index: 100;
  pointer-events: none;
  text-align: left;
}

/* AI-02: Quality score bars (Phase 20 Plan 04 — UI-SPEC verbatim) */
.quality-panel { padding: 16px; }
.quality-score-display { font-size: 28px; font-weight: 600; font-family: var(--mono); color: var(--accent); }
.quality-sub-bar-row { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.quality-sub-bar-label { font-size: 13px; font-weight: 600; color: var(--text2); width: 100px; flex-shrink: 0; }
.quality-sub-bar-track { flex: 1; height: 8px; background: var(--surface2); border-radius: 4px; overflow: hidden; }
.quality-sub-bar-fill { height: 100%; border-radius: 4px; transition: width 0.4s ease; }
.quality-sub-bar-fill.high { background: var(--green); }
.quality-sub-bar-fill.mid { background: var(--yellow); }
.quality-sub-bar-fill.low { background: var(--red); }
.quality-sub-bar-value { font-size: 13px; font-family: var(--mono); font-weight: 600; width: 32px; text-align: right; flex-shrink: 0; }
.quality-rationale { font-size: 13px; color: var(--text2); line-height: 1.6; margin-top: 12px; }
.quality-rationale li { margin-bottom: 4px; }
.quality-footer { display: flex; justify-content: space-between; align-items: center; margin-top: 12px; font-size: 13px; color: var(--text3); }

/* AI-03: Rewrite drawer (Phase 20 Plan 05 — UI-SPEC verbatim) */
.rewrite-drawer {
  position: fixed; bottom: 0; left: 0; right: 0;
  max-height: 70vh;
  background: var(--surface);
  border-top: 1px solid var(--border);
  border-radius: 16px 16px 0 0;
  z-index: 200;
  box-shadow: var(--shadow-lg);
  display: flex; flex-direction: column;
  animation: slideUp 0.25s ease;
}
.rewrite-drawer-header { display: flex; align-items: center; justify-content: space-between; padding: 16px; border-bottom: 1px solid var(--border); }
.rewrite-drawer-title { font-size: 16px; font-weight: 600; }
.rewrite-drawer-body { display: grid; grid-template-columns: 1fr 1fr; gap: 1px; background: var(--border); flex: 1; overflow: hidden; }
.rewrite-col { background: var(--surface2); padding: 16px; overflow-y: auto; font-size: 14px; line-height: 1.6; position: relative; }
.rewrite-col-label { font-size: 13px; font-weight: 600; color: var(--text3); margin-bottom: 8px; text-transform: uppercase; letter-spacing: 0.5px; }
.rewrite-col-label.new { color: var(--accent); }
.rewrite-stream-stripe { height: 3px; background: var(--gradient-ai); background-size: 200%; animation: gradientShift 1.5s linear infinite; position: absolute; top: 0; left: 0; right: 0; border-radius: 2px 2px 0 0; }
@keyframes gradientShift { 0% { background-position: 0% 50%; } 100% { background-position: 200% 50%; } }
.rewrite-drawer-footer { display: flex; gap: 8px; padding: 12px 16px; border-top: 1px solid var(--border); justify-content: flex-end; }
.rewrite-drawer-footer .btn-secondary:hover { border-color: var(--red); color: var(--red); }
.rewrite-tone-row { border-bottom: 1px solid var(--border); padding: 12px 16px; }
.chat-suggestion.selected { border-color: var(--accent); color: var(--accent); background: var(--accent-dim); }
.chat-suggestion:disabled { opacity: 0.4; cursor: not-allowed; }
@media (max-width: 768px) { .rewrite-drawer-body { grid-template-columns: 1fr; } }
@keyframes slideUp { from { transform: translateY(100%); } to { transform: translateY(0); } }

/* AI-04: Budget panel (Phase 20 Plan 06 — UI-SPEC verbatim) */
.budget-bar-track { width: 100%; height: 8px; background: var(--surface2); border-radius: 4px; overflow: hidden; margin-bottom: 8px; }
.budget-bar-fill { height: 100%; border-radius: 4px; transition: width 0.4s ease; background: var(--accent); }
.budget-bar-fill.warn { background: var(--yellow); }
.budget-bar-fill.over { background: var(--red); }
.budget-bar-label { font-size: 13px; font-family: var(--mono); color: var(--text2); }
.budget-sparkline { height: 48px; width: 100%; }
.toast.toast-budget { border-left: 4px solid var(--red); }

/* AI-04 global 402 state — Phase 20 Plan 06 */
.ai-trigger[disabled], button[disabled].ai-trigger { opacity: 0.4; cursor: not-allowed; }

/* pc4 (2026-04-22) — Proposals filter collapse: styles for the Filters toggle
   button (in the search/sort row) and the collapsible #proposals-filters-panel
   that wraps the Type + Updated chip rows. No new color tokens — reuses
   var(--border), var(--bg2), var(--text1), var(--blue) already in use across
   proposal-list.js renderers. */
.proposal-filters-toggle {
  font-size: 13px;
  padding: 6px 12px;
  border-radius: 4px;
  border: 1px solid var(--border);
  background: var(--bg2);
  color: var(--text1);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  white-space: nowrap;
}
.proposal-filters-toggle:hover { background: var(--bg3, var(--bg2)); }
.proposal-filters-toggle:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; }
.proposal-filters-toggle.has-active { border-color: var(--blue); color: var(--blue); }
#proposals-filters-badge { font-weight: 600; }
#proposals-filters-panel {
  padding: 10px 12px;
  margin-bottom: 12px;
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: 6px;
}
#proposals-filters-panel #proposals-type-filter { margin-bottom: 6px; }
#proposals-filters-panel #proposals-date-filter { margin-bottom: 0; }

/* ---------------------------------------------------------------------------
   Phase 20 Stage 2 (pauh) — AI budget meter
   Rendered by dashboard/js/ai-budget-meter.js into #ai-budget-meter-mount.
   --------------------------------------------------------------------------- */
.ai-meter-wrap {
  display: block;
  padding: 0 12px 8px;
}
.ai-meter {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface2);
  color: var(--text2);
  font: inherit;
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
}
.ai-meter:hover { background: var(--surface); border-color: var(--accent, #E39821); }
.ai-meter:focus-visible { outline: 2px solid var(--accent, #E39821); outline-offset: 2px; }
.ai-meter__bar {
  flex: 1 1 auto;
  height: 5px;
  background: var(--border);
  border-radius: 3px;
  overflow: hidden;
  min-width: 40px;
}
.ai-meter__fill {
  display: block;
  height: 100%;
  transition: width 0.3s ease;
  background: #10b981; /* default emerald — overridden per tier below */
}
.ai-meter__label {
  flex: 0 0 auto;
  font-variant-numeric: tabular-nums;
  color: inherit;
  white-space: nowrap;
}
.ai-meter--normal    .ai-meter__fill { background: #10b981; }
.ai-meter--warning   .ai-meter__fill { background: #f59e0b; }
.ai-meter--warning   { color: #d97706; border-color: #fcd34d; }
.ai-meter--critical  .ai-meter__fill { background: #ef4444; }
.ai-meter--critical  { color: #dc2626; border-color: #fecaca; }
.ai-meter--exhausted .ai-meter__fill { background: #991b1b; }
.ai-meter--exhausted { color: #991b1b; border-color: #fecaca; background: #fef2f2; }
.ai-meter--unknown   { color: var(--text3); }

/* NOTE (260428-mp4): list-view opp cards no longer render .opp-type-badge —
   they use .opp-notice-type small-caps text instead. This block remains for
   detail-page mirror (card.js Opps.renderTypeBadge L1045) and workspace.js. */
/* Phase 24 (4B) — Solicitation type badge. Per-type colors verbatim from
   STAGE-4-solicitation-type-classifier.md lines 612-631. BEM-style modifier
   class follows the spec (`.opp-type-badge--{type_key}`); existing project
   convention is single-hyphen but spec is locked. */
.opp-type-badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 12px;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  white-space: nowrap;
}
/* Stage 5A: AA 4.5:1 contrast verified — all 11 pairs pass WCAG AA */
.opp-type-badge--sources_sought  { background: #dbeafe; color: #1e40af; } /* 7.15:1 PASS */
.opp-type-badge--rfi             { background: #e0e7ff; color: #3730a3; } /* 8.06:1 PASS */
.opp-type-badge--rfq             { background: #d1fae5; color: #065f46; } /* 6.78:1 PASS */
.opp-type-badge--rfp             { background: #fef3c7; color: #92400e; } /* 6.37:1 PASS */
.opp-type-badge--idiq_task_order { background: #fce7f3; color: #9d174d; } /* 6.71:1 PASS */
.opp-type-badge--bpa_call        { background: #f3e8ff; color: #6b21a8; } /* 7.39:1 PASS */
.opp-type-badge--white_paper     { background: #ecfccb; color: #3f6212; } /* 6.52:1 PASS */
.opp-type-badge--special_notice  { background: #f3f4f6; color: #374151; font-style: italic; } /* 9.37:1 PASS */
.opp-type-badge--award_notice    { background: #f3f4f6; color: #69707e; } /* 4.52:1 PASS — was #6b7280 (4.39 FAIL) */
.opp-type-badge--justification   { background: #f3f4f6; color: #69707e; } /* 4.52:1 PASS — was #6b7280 (4.39 FAIL) */
.opp-type-badge--unknown         { background: #fef3c7; color: #92400e; } /* 6.37:1 PASS */

/* Override link rendered next to the badge on opp detail page */
.opp-type-override-link {
  font-size: 11px;
  color: var(--text2);
  text-decoration: underline;
  margin-left: 8px;
  cursor: pointer;
}
.opp-type-override-link:hover { color: var(--accent); }

/* Pre-flight panel for Bid Writer */
.bw-preflight {
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 14px 16px;
  margin-bottom: 12px;
  background: var(--bg2);
}
.bw-preflight__header {
  display: flex; align-items: center; gap: 8px; margin-bottom: 8px;
}
.bw-preflight__warning {
  color: #991b1b; background: #fef2f2; border-radius: 6px;
  padding: 8px 10px; margin: 8px 0; font-size: 13px;
}
.bw-preflight__sections, .bw-preflight__prohibited {
  margin: 8px 0; font-size: 13px;
}
.bw-preflight__prohibited { color: #92400e; }
.bw-preflight__length { font-size: 12px; color: var(--text2); margin: 8px 0; }

/* Refusal card for non-biddable types (mirrors core.js budget-exhausted shape) */
.bw-refusal {
  border: 1px solid var(--border);
  background: var(--bg2);
  color: var(--text);
  border-radius: 10px;
  padding: 14px 16px;
}
.bw-refusal__title { font-weight: 700; font-size: 14px; margin-bottom: 6px; }
.bw-refusal__warning {
  color: #92400e; background: #fef3c7; border-radius: 6px;
  padding: 8px 10px; margin-top: 8px; font-size: 13px;
}

/* ============================================================ */
/* Stage 5A — WCAG 2.1 AA / Section 508 accessibility          */
/* ============================================================ */

/* Global :focus-visible fallback — catches any focusable element not
   already covered by a specific rule. Paired rules above (btn-primary,
   nav-btn, a, etc.) use outline: 2px solid var(--accent); this is the
   safety net for everything else. */
:focus-visible {
  outline: 2px solid var(--accent, #726EF0);
  outline-offset: 2px;
}

/* Fix: .ai-input had outline:none with no paired :focus-visible rule.
   The input is a focusable text field; focus must be visible. */
.ai-input:focus-visible {
  outline: 2px solid var(--accent, #726EF0);
  outline-offset: 2px;
  border-color: var(--accent, #726EF0);
}

/* Fix: .pricing-table input had outline:none; :focus already adds
   border-color, add outline for keyboard-only users too. */
.pricing-table input:focus-visible {
  outline: 2px solid var(--accent, #726EF0);
  outline-offset: 1px;
}

/* Fix: .ss-header-cell / .ss-cell had outline:none — these are
   contenteditable-style cells with tabindex; focus must be visible. */
.ss-header-cell:focus-visible,
.ss-cell:focus-visible {
  outline: 2px solid var(--accent, #726EF0);
  outline-offset: -1px;
}

/* Override modal — accessible replacement for window.prompt in card.js */
.override-modal {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
}
.override-modal__panel {
  background: var(--surface, #fff);
  color: var(--text, #111);
  border: 1px solid var(--border, #e2e6ef);
  border-radius: 12px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.28);
  padding: 24px;
  max-width: 480px;
  width: 100%;
}
.override-modal__panel h3 {
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 12px;
}
.override-modal__panel p {
  font-size: 13px;
  color: var(--text2, #555);
  margin-bottom: 14px;
}
.override-modal label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: var(--text2, #555);
  margin-bottom: 4px;
  margin-top: 12px;
}
.override-modal select,
.override-modal textarea {
  width: 100%;
  box-sizing: border-box;
  padding: 9px 12px;
  border: 1px solid var(--border, #d1d5db);
  border-radius: 8px;
  background: var(--surface2, #f9fafb);
  color: var(--text, #111);
  font-family: inherit;
  font-size: 13px;
}
.override-modal select:focus-visible,
.override-modal textarea:focus-visible {
  outline: 2px solid var(--accent, #726EF0);
  outline-offset: 2px;
  border-color: var(--accent, #726EF0);
}
.override-modal__actions {
  display: flex;
  flex-direction: row;
  gap: 8px;
  justify-content: flex-end;
  margin-top: 16px;
}

/* ============================================================
   Stage 5C — mobile-responsive (quick-260427-qvt)
   Spec: bidchamp-intel/handoff/batch-2/STAGE-5C-mobile-responsive.md
   Locked breakpoints: 480 / 768 / 1024 (mobile-first, additive over legacy
   1100/768 blocks at lines 710 / 715 / 763 / 1416 / 2068)
   ============================================================ */

/* --- 5C.2: Touch target baseline (mobile only, WCAG 2.5.5 + Apple HIG 44px) --- */
@media (max-width: 768px) {
  /* Universal hit-area inflation for known small icon buttons */
  .nav-btn,
  .filter-chip,
  .toast-dismiss,
  .modal-close,
  .opp-modal-close,
  .opp-type-override-link,
  .pagination-prev,
  .pagination-next,
  .dropdown-chevron,
  .btn-icon,
  .btn-icon-small,
  button.icon-only {
    min-width: 44px;
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }

  .nav-btn { padding: 12px 14px; }
  .filter-chip { padding: 10px 12px; }

  /* Form input baseline — 44px hit area + 16px font (prevents iOS zoom-on-focus). */
  input[type="text"], input[type="email"], input[type="password"],
  input[type="tel"], input[type="number"], input[type="search"],
  input[type="date"], input[type="url"], select, textarea {
    min-height: 44px;
    padding: 10px 12px;
    font-size: 16px;
  }

  /* Adjacent-target gap (>=8px) for stacked controls. */
  .nav-btn + .nav-btn,
  .filter-chip + .filter-chip,
  .btn + .btn { margin-left: 0; margin-top: 8px; }

  /* opp-type-override-link is rendered inline next to badge — keep flex
     baseline but allow inline rendering. */
  .opp-type-override-link { padding: 12px; }
}

/* --- Narrow phone overrides (<=480px) --- */
@media (max-width: 480px) {
  .main { padding: 14px 12px; padding-top: 50px; }
  .field-row { grid-template-columns: 1fr; gap: 8px; }
  .page-title { font-size: 18px; }
}

/* --- iPhone notch / safe-area handling (5C.1, viewport-fit=cover companion) --- */
@supports (padding: env(safe-area-inset-bottom)) {
  body { padding-bottom: env(safe-area-inset-bottom); }
  .sticky-bottom-mobile { bottom: env(safe-area-inset-bottom); }
}

/* --- 5C.3: Hamburger nav drawer (mobile only) --- */

/* Desktop default — hamburger hidden, sidebar visible at its existing layout. */
.nav-hamburger {
  display: none;
  background: var(--card-bg, transparent);
  border: 1px solid var(--border, transparent);
  border-radius: 8px;
  padding: 10px;
  cursor: pointer;
  color: var(--text);
  min-width: 44px;
  min-height: 44px;
  align-items: center;
  justify-content: center;
}
.nav-hamburger:focus-visible {
  outline: 2px solid var(--accent, #726EF0);
  outline-offset: 2px;
}

@media (max-width: 768px) {
  /* Show hamburger fixed at top-left on mobile (above sidebar drawer). */
  .nav-hamburger {
    display: inline-flex;
    position: fixed;
    top: 10px;
    left: 10px;
    z-index: 101;
  }

  /* Sidebar = off-canvas drawer on mobile when also #main-nav.
     The legacy @media (max-width: 768px) block at styles.css:715 already
     positions .sidebar fixed/off-screen and reveals it on .open — Stage 5C
     adds the safe-area-inset-bottom padding + dynamic viewport height. */
  #main-nav.sidebar {
    height: 100vh;
    height: 100dvh;
    padding-bottom: env(safe-area-inset-bottom, 0);
  }

  /* Backdrop overlay — appears when drawer is open. Replaces the legacy
     `.sidebar.open ~ .main::before` pseudo-element approach with a real
     element so the click-to-close handler can attach. */
  .nav-backdrop {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.4);
    z-index: 99;
  }
  .nav-backdrop.show { display: block; }
}

.nav-backdrop[hidden] { display: none; }

/* --- 5C.4: Bid writer mobile single-column + sticky Generate (quick-260427-qvt) ---
   Spec class names (.bw-layout / .bw-sections / .bw-section-tab / .bw-quality-widget)
   were proposals. Actual DOM uses:
   - .ws-grid          — workspace 2-pane outer (already collapses at line 746).
   - .proposal-editor-layout / .ped-sidebar — full proposal editor (already collapses
     at line 756-757).
   - .bw-preflight     — Phase 24 preflight panel hosting the canonical Generate
     button (id="bw-preflight-confirm").
   - .ws-tabs          — section-tab strip (already horizontal-scroll at 743-745).
   Below adds the missing piece: sticky-bottom for the Phase 24 Generate confirm
   button on mobile so it's always reachable, never below-fold.
*/
@media (max-width: 768px) {
  /* Collapse any bid-writer-shaped grid (covers spec-style names if used). */
  .bw-layout,
  .bid-writer-grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  /* Section-tab strip — horizontal-scroll if a future container uses these
     class names; .ws-tabs already handles this at 743-745. */
  .bw-sections,
  .bw-section-tabs {
    display: flex;
    overflow-x: auto;
    flex-wrap: nowrap;
    gap: 8px;
    padding-bottom: 8px;
    -webkit-overflow-scrolling: touch;
  }
  .bw-section-tab,
  .bw-section-item {
    flex: 0 0 auto;
    white-space: nowrap;
    padding: 12px 16px;
    min-height: 44px;
  }

  /* Phase 24 preflight: turn the Generate confirm button row into a sticky
     bottom action bar on mobile so the primary CTA is always reachable. */
  .bw-preflight {
    padding-bottom: 64px; /* reserve space for sticky bar */
  }
  .bw-preflight #bw-preflight-confirm,
  .bw-preflight #bw-preflight-cancel {
    min-height: 44px;
  }
  .bw-preflight #bw-preflight-confirm {
    position: sticky;
    bottom: env(safe-area-inset-bottom, 0);
    width: calc(100% - 90px);
    margin-top: 12px;
    z-index: 5;
    box-shadow: 0 -2px 8px rgba(0, 0, 0, 0.12);
  }

  /* Future-proof: any container explicitly opting into sticky Generate. */
  .bw-generate-sticky,
  .bw-quality-widget {
    position: sticky;
    bottom: env(safe-area-inset-bottom, 0);
    background: var(--surface, #fff);
    box-shadow: 0 -2px 8px rgba(0, 0, 0, 0.1);
    padding: 12px;
    z-index: 10;
  }
  .bw-generate-sticky button,
  .bw-quality-widget button.btn-primary {
    width: 100%;
    min-height: 44px;
  }
}

/* --- 5C.5: Kanban mobile vertical stack + tap-menu (quick-260427-qvt) --- */
@media (max-width: 768px) {
  /* Override the JS-injected inline style `min-width:900px` so the board
     reflows into a single column on phones (no horizontal scroll). */
  .kanban-board {
    min-width: 0 !important;
    flex-direction: column !important;
    width: 100%;
    overflow-x: visible;
  }
  .kanban-col,
  .kanban-swimlane {
    margin-bottom: 24px;
    min-width: 0 !important;
    width: 100%;
  }

  /* Drag handle hidden on touch — replaced by tap menu trigger. */
  .kanban-card-drag-handle { display: none; }
}

/* Tap-menu trigger (visible on touch viewports — see _isTouch in kanban.js) */
.kanban-card-menu-trigger {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 44px;
  min-height: 44px;
  background: transparent;
  border: 0;
  cursor: pointer;
  font-size: 18px;
  color: var(--text2, #555);
}
.kanban-card-menu-trigger:focus-visible {
  outline: 2px solid var(--accent, #726EF0);
  outline-offset: 2px;
  border-radius: 4px;
}

/* Tap-menu action sheet — used by _openKanbanMoveMenu on touch viewports */
.kanban-move-sheet {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: var(--surface, #fff);
  border-top: 1px solid var(--border, #e5e7eb);
  box-shadow: 0 -4px 16px rgba(0, 0, 0, 0.15);
  z-index: 200;
  padding: 12px;
  padding-bottom: calc(12px + env(safe-area-inset-bottom, 0));
}
.kanban-move-sheet__title {
  font-weight: 700;
  font-size: 13px;
  color: var(--text2, #555);
  padding: 4px 8px 8px;
}
.kanban-move-sheet__item,
.kanban-move-sheet__cancel {
  display: block;
  width: 100%;
  text-align: left;
  background: transparent;
  border: 0;
  border-top: 1px solid var(--border, #e5e7eb);
  padding: 14px 8px;
  font-size: 15px;
  color: var(--text);
  cursor: pointer;
  min-height: 44px;
  font-family: inherit;
}
.kanban-move-sheet__cancel { color: var(--text2, #555); font-weight: 600; }
.kanban-move-sheet__item:hover,
.kanban-move-sheet__item:focus-visible {
  background: var(--surface2, #f3f4f6);
  outline: none;
}
.kanban-move-sheet__item:focus-visible {
  outline: 2px solid var(--accent, #726EF0);
  outline-offset: -2px;
}

/* ============================================================
   Stage 5C.6 — Admin responsive (stat-row + table-stacked)
   ============================================================
   Used on /admin.html where the stats grid stays multi-column
   on desktop but stacks vertically on phones, and wide tables
   convert to label-prefixed cards via data-label attributes.
   See TOUCH-TARGET-AUDIT.md and STAGE-5C-mobile-responsive.md.
*/
@media (max-width: 768px) {
  /* 5C.6.a — Stat tile rows stack vertically on phones.
     quick-260511-oe9 Wave 3: removed forced flags on .stat-row props (no
     competing desktop rule found via grep). Retained the forced flags on
     children min-width/width because flex items default to min-width:auto
     which JS-set inline min-width could override. */
  .stat-row {
    flex-direction: column;
    gap: 12px;
  }
  .stat-row > .stat,
  .stat-row > div {
    min-width: 0 !important;
    width: 100% !important;
  }

  /* 5C.6.b — Wide tables convert to stacked cards.
     Each <td> must have a data-label="" attribute so the
     label appears as a prefix when the layout flattens. */
  .table-stacked thead {
    /* Hide column header row — labels move into td::before */
    display: none;
  }
  .table-stacked,
  .table-stacked tbody,
  .table-stacked tbody tr,
  .table-stacked tbody td {
    display: block;
    width: 100%;
  }
  .table-stacked tbody tr {
    margin-bottom: 12px;
    padding: 12px;
    border: 1px solid var(--border, #e5e7eb);
    border-radius: 8px;
    background: var(--surface, #fff);
  }
  .table-stacked tbody td {
    /* quick-260511-oe9 Wave 3: removed forced flag on text-align (no competing
       rule for .table-stacked tbody td in scope; UA <td> default text-align is
       inherit, easily beaten by author rule). */
    padding: 6px 0;
    border: 0;
    text-align: left;
    min-height: 44px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
  }
  .table-stacked tbody td::before {
    content: attr(data-label) ": ";
    font-weight: 600;
    color: var(--text2, #555);
    flex: 0 0 auto;
    margin-right: 8px;
  }
  /* Empty data-label rows (loading/empty states) hide the prefix */
  .table-stacked tbody td[data-label=""]::before {
    content: "";
    margin-right: 0;
  }
}

/* === Phase 25: Section L/M Compliance Matrix === */

.compliance-container {
  padding: 0;
}

.compliance-stats-row {
  display: flex;
  gap: 16px;
  padding: 12px 16px;
  background: var(--surface2);
  border-radius: 8px;
  margin-bottom: 12px;
  font-size: 13px;
  color: var(--text);
  flex-wrap: wrap;
}
.compliance-stats-row strong { color: var(--accent); }

.compliance-filter-chips {
  display: flex;
  gap: 6px;
  margin-bottom: 12px;
  flex-wrap: wrap;
}
.compliance-filter-chip {
  padding: 4px 10px;
  border-radius: 12px;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text3);
  font-size: 12px;
  cursor: pointer;
  font-family: inherit;
}
.compliance-filter-chip:hover { color: var(--text); }
.compliance-filter-chip.active {
  background: var(--accent);
  color: var(--surface);
  border-color: var(--accent);
}

.compliance-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
.compliance-table th,
.compliance-table td {
  padding: 8px 10px;
  text-align: left;
  border-bottom: 1px solid var(--border);
  vertical-align: top;
}
.compliance-table th {
  background: var(--surface2);
  color: var(--text);
  font-weight: 600;
  cursor: pointer;
  user-select: none;
}
.compliance-table th[aria-sort="ascending"]::after { content: " \25B2"; color: var(--accent); }
.compliance-table th[aria-sort="descending"]::after { content: " \25BC"; color: var(--accent); }
.compliance-table td.l-paragraph {
  font-family: var(--mono);
  color: var(--accent);
  white-space: nowrap;
}
.compliance-table td.requirement {
  max-width: 360px;
  color: var(--text);
  line-height: 1.4;
}
.compliance-table tr:hover td { background: var(--surface2); }

/* Status pills — reuse design tokens, no new color variables. */
.status-pill {
  display: inline-block;
  padding: 2px 10px;
  border-radius: 10px;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.4px;
}
.status-pill.status-pending   { background: var(--surface2); color: var(--text3); border: 1px solid var(--border); }
.status-pill.status-addressed { background: rgba(0,150,90,0.15); color: var(--green); border: 1px solid var(--green); }
.status-pill.status-verified  { background: var(--green); color: var(--surface); }
.status-pill.status-missed    { background: rgba(220,50,50,0.15); color: var(--red); border: 1px solid var(--red); }

.compliance-row-actions {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}
.compliance-row-actions button {
  padding: 4px 8px;
  font-size: 11px;
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text3);
  border-radius: 6px;
  cursor: pointer;
  font-family: inherit;
}
.compliance-row-actions button:hover { color: var(--text); border-color: var(--text); }

.compliance-export-dropdown {
  position: relative;
  display: inline-block;
}

/*
 * Bid-writer side-panel — Phase 25 UI surface NEW to the codebase.
 * NOT a global right-edge fixed panel (would collide with z-index of
 * workspace-switcher dropdown). Scoped to bidwriter ws-panel only.
 * Pattern-mapper callout #3 resolution: side-panel is local + dismissible
 * by tab-switch, uses existing tokens, no new variables introduced.
 */
.compliance-side-panel {
  margin: 12px 0;
  padding: 12px 14px;
  background: var(--surface2);
  border-left: 3px solid var(--accent);
  border-radius: 6px;
  font-size: 13px;
  color: var(--text);
}
.compliance-side-panel h4 {
  margin: 0 0 8px;
  font-size: 13px;
  font-weight: 700;
  color: var(--text);
}
.compliance-side-panel ul {
  margin: 0;
  padding-left: 18px;
}
.compliance-side-panel li {
  padding: 2px 0;
  color: var(--text3);
  cursor: pointer;
}
.compliance-side-panel li:hover { color: var(--accent); }

/* Empty state */
.compliance-empty-state {
  padding: 40px 20px;
  text-align: center;
  color: var(--text3);
}
.compliance-empty-state .btn-primary { margin-top: 12px; }

/* Mobile stacking — table to cards on narrow viewports */
@media (max-width: 768px) {
  .compliance-table thead { display: none; }
  .compliance-table tr { display: block; padding: 8px 0; border-bottom: 1px solid var(--border); }
  .compliance-table td { display: block; padding: 4px 8px; border: none; }
  .compliance-table td.l-paragraph { font-size: 12px; }
  .compliance-table td.requirement { max-width: none; }
}

/* === S-6 (260501-bj8): Team-nav onboarding tooltip ===
   Anchored next to the Team nav-btn in the sidebar. Position is set by JS
   (core.js maybeShowTeamTooltip) using getBoundingClientRect of the target btn.
   Dismiss flag is user-scoped via USER_KEYS in core.js. */
.team-onboarding-tip {
  position: fixed;
  z-index: 9000;
  max-width: 320px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: 0 12px 32px rgba(0,0,0,0.4);
  padding: 16px 18px;
  font-family: inherit;
}
.team-onboarding-tip[hidden] { display: none; }
.team-onboarding-tip-arrow {
  position: absolute;
  left: -8px; top: 24px;
  width: 14px; height: 14px;
  background: var(--surface);
  border-left: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  transform: rotate(45deg);
}
.team-onboarding-tip-title { font-size: 15px; font-weight: 700; color: var(--text); margin-bottom: 6px; }
.team-onboarding-tip-sub { font-size: 13px; color: var(--text2); line-height: 1.5; margin-bottom: 14px; }
.team-onboarding-tip-actions { display: flex; gap: 8px; }
.team-onboarding-tip-actions .btn-primary,
.team-onboarding-tip-actions .btn-secondary { padding: 8px 14px; font-size: 13px; }
@media (max-width: 768px) {
  .team-onboarding-tip { max-width: calc(100vw - 32px); left: 16px !important; right: 16px; }
  .team-onboarding-tip-arrow { display: none; }
}

/* === CALENDAR (260511-ewf) — #page-calendar (lines ~1236-1245) === */
.cal-page-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.cal-page-actions {
  display: flex;
  gap: 8px;
}

/* === SAM GUIDE (260511-ewf) — #page-sam-guide (lines ~1226-1233) === */
.sam-guide-tracker { margin-bottom: 20px; }
/* End SPA INLINE-STYLE SWEEP (260511-ewf) — Chunk B */

/* ===========================================
   Phase 32 — Market Intel filter panel
   Mirror of .filter-panel scoped to `mi-*`
   All values use palette tokens (CLAUDE.md absolute rule).
   =========================================== */

.mi-filter-toolbar {
  display: flex;
  gap: 8px;
  align-items: center;
  margin-bottom: 12px;
}

.mi-active-filter-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 12px;
}

.mi-filter-panel {
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 16px;
  margin-bottom: 16px;
}

.mi-filter-group {
  margin-bottom: 16px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border);
}

.mi-filter-group:last-child {
  border-bottom: none;
  padding-bottom: 0;
  margin-bottom: 0;
}

.mi-filter-group-title {
  font-weight: 600;
  color: var(--text);
  margin-bottom: 8px;
  font-size: 14px;
}

.mi-filter-group-subtitle {
  font-weight: 500;
  color: var(--text2);
  margin: 12px 0 6px;
  font-size: 13px;
}

.mi-filter-two-col {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px;
  margin-bottom: 8px;
}

.mi-chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 6px 0 12px;
}

.mi-chip {
  background: var(--surface);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 4px 12px;
  font-size: 13px;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
}

.mi-chip:hover {
  background: var(--surface2);
  border-color: var(--accent-dim);
}

.mi-chip-active,
.mi-chip.mi-chip-active {
  background: var(--accent);
  color: var(--surface);
  border-color: var(--accent);
}

.mi-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: var(--accent-dim);
  color: var(--text);
  border-radius: 12px;
  padding: 2px 8px;
  font-size: 12px;
}

.mi-pill-label {
  color: var(--text2);
  font-weight: 500;
}

.mi-pill-x {
  background: transparent;
  border: none;
  color: var(--text2);
  cursor: pointer;
  font-size: 14px;
  padding: 0 2px;
  line-height: 1;
}

.mi-pill-x:hover {
  color: var(--text);
}

.mi-filter-actions {
  display: flex;
  gap: 8px;
  margin-top: 12px;
}

.mi-vendor-typeahead-wrap {
  position: relative;
}

.mi-typeahead-dropdown {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 6px;
  max-height: 240px;
  overflow-y: auto;
  z-index: 10;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.mi-typeahead-item {
  padding: 6px 12px;
  cursor: pointer;
  color: var(--text);
  font-size: 13px;
}

.mi-typeahead-item:hover,
.mi-typeahead-item.mi-typeahead-active {
  background: var(--surface2);
}

.mi-results-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 12px;
}

.mi-results-table {
  display: block;
}
/* end Phase 32 Market Intel filter panel */

/* ===========================================
   Phase 32 — Vendor drill-down modal
   Reuses prop-modal-overlay + prop-modal base styles.
   All values use palette tokens (CLAUDE.md absolute rule).
   =========================================== */

.mi-drilldown-modal {
  /* base layout inherited from .prop-modal-overlay */
}

.mi-drilldown-tabs {
  display: flex;
  gap: 4px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 12px;
  padding: 0 16px;
}

.mi-drilldown-tab {
  background: transparent;
  border: none;
  border-bottom: 2px solid transparent;
  color: var(--text2);
  padding: 8px 12px;
  font-size: 14px;
  cursor: pointer;
  transition: color 0.15s, border-bottom-color 0.15s;
}

.mi-drilldown-tab:hover {
  color: var(--text);
}

.mi-drilldown-tab-active {
  color: var(--accent);
  border-bottom-color: var(--accent);
  font-weight: 600;
}

.mi-drilldown-panel {
  padding: 12px 16px;
}

.mi-drilldown-error-banner {
  background: var(--surface2);
  color: var(--text);
  border-left: 4px solid var(--orange);
  padding: 10px 14px;
  margin: 0 16px 12px;
  border-radius: 4px;
  font-size: 13px;
}

.mi-drilldown-loading {
  color: var(--text2);
  padding: 16px 0;
  font-style: italic;
}

.mi-drilldown-empty {
  color: var(--text3);
  padding: 16px 0;
  text-align: center;
}

.mi-drilldown-dl {
  display: grid;
  grid-template-columns: max-content 1fr;
  gap: 6px 12px;
  margin: 0;
}

.mi-drilldown-dl dt {
  color: var(--text2);
  font-weight: 500;
  font-size: 13px;
}

.mi-drilldown-dl dd {
  color: var(--text);
  margin: 0;
  font-size: 14px;
}

.mi-drilldown-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.mi-drilldown-table th,
.mi-drilldown-table td {
  border-bottom: 1px solid var(--border);
  padding: 6px 8px;
  text-align: left;
  color: var(--text);
}

.mi-drilldown-table th {
  color: var(--text2);
  font-weight: 600;
  background: var(--surface2);
}

.mi-drilldown-peers-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.mi-drilldown-peer-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 0;
  border-bottom: 1px solid var(--border);
}

.mi-drilldown-peer-name {
  color: var(--text);
  font-weight: 500;
  flex: 1;
}

.mi-drilldown-peer-overlap {
  color: var(--text3);
  font-size: 12px;
}

.mi-drilldown-risk-score {
  font-size: 16px;
  color: var(--text);
  padding: 12px 0;
}

.mi-drilldown-risk-flags {
  margin: 0;
  padding-left: 20px;
  color: var(--text);
}

.mi-drilldown-risk-flags li {
  padding: 4px 0;
  color: var(--red);
}

.mi-typeahead-uei {
  color: var(--text3);
  font-size: 11px;
}

.mi-vendor-row {
  cursor: pointer;
}

.mi-vendor-row:hover {
  background: var(--surface2);
}
/* end Phase 32 vendor drill-down */

