/* Leadership Meeting Portal */
* { box-sizing: border-box; margin: 0; padding: 0; }
:root {
  --bg: #d9e6f8; /* light blue page background */
  --pageink: #17224d; /* text sitting directly on the light background */
  --panel: #ffffff; /* white cards, tabs, boxes */
  --ink: #17224d; /* dark-blue text inside the white cards */
  --muted: #5c6b93;
  --line: #dfe6f2;
  --accent: #1f6feb;
  --accent-dark: #17549c;
  --ok: #1a7f4b;
  --warn: #b07a10;
  --bad: #c0392b;
  --sidebar: #281e66;
}
body { font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif; background: var(--bg); color: var(--ink); }
[hidden] { display: none !important; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.tiny { font-size: 11px; }
.center { text-align: center; }

/* ---------- login ---------- */
.login-body { min-height: 100vh; display: flex; align-items: center; justify-content: center; background: linear-gradient(135deg, #14202e 0%, #1f3a5f 100%); }
/* Penthouse backdrop: uses assets/login-bg.jpg if present, SVG recreation as fallback */
.login-body.penthouse { background: #0a0e1e; }
.login-body.penthouse::before {
  content: ''; position: fixed; inset: 0; z-index: 0;
  background-image: url('assets/login-bg.jpg'), url('assets/login-bg.png'), url('assets/login-bg.webp'), url('assets/login-bg.svg');
  background-size: cover;
  background-position: center;
  filter: saturate(1.25) contrast(1.12) brightness(.98);
}
.login-body.penthouse::after {
  content: ''; position: fixed; inset: 0; z-index: 0;
  background: radial-gradient(ellipse at center, rgba(6,8,16,.18) 0%, rgba(6,8,16,.5) 100%);
}
.login-split { position: relative; z-index: 1; display: flex; gap: 34px; align-items: center; justify-content: center; flex-wrap: wrap; padding: 30px; }
.login-card { background: var(--panel); padding: 40px 36px; border-radius: 14px; width: 400px; max-width: 92vw; box-shadow: 0 20px 60px rgba(0,0,0,.35); }
/* Navy card with light-blue accents, two columns (form + statement) */
.login-card.glass {
  width: 500px; padding: 50px 46px;
  background: linear-gradient(160deg, rgba(20,24,64,.9) 0%, rgba(13,16,44,.94) 55%, rgba(23,30,84,.9) 100%);
  backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(110,170,255,.45); color: #eef2fb;
  box-shadow: 0 30px 80px rgba(0,0,0,.6), 0 0 44px rgba(90,160,255,.22), inset 0 1px 0 rgba(255,255,255,.08);
}
.login-card.glass.wide { width: 900px; max-width: 94vw; min-height: 576px; display: grid; grid-template-columns: 1.05fr 1fr; gap: 44px; align-items: center; padding: 64px 52px; }
.login-statement { border-left: 2px solid rgba(110,170,255,.5); padding-left: 36px; display: flex; flex-direction: column; gap: 16px; }
.login-statement p { color: #fff; font-size: 16.5px; line-height: 1.65; }
.login-statement strong { color: #8ec2ff; }
@media (max-width: 900px) { .login-card.glass.wide { grid-template-columns: 1fr; } .login-statement { border-left: 0; padding-left: 0; border-top: 2px solid rgba(110,170,255,.5); padding-top: 22px; } }
.login-card.glass h1 { color: #fff; font-size: 25px; }
.login-card.glass label { color: #d9e4f8; }
.login-card.glass input { background: rgba(255,255,255,.07); border-color: rgba(110,170,255,.4); color: #fff; padding: 19px 20px; font-size: 17px; border-radius: 12px; } /* enlarged, warehouse-style */
.login-card.glass input:focus { outline-color: #6eaaff; }
.login-card.glass .pw-toggle { color: #8ec2ff; }
.login-card.glass .login-logo { background: linear-gradient(135deg, #6eaaff, #1f6feb); box-shadow: 0 6px 24px rgba(90,160,255,.5); width: 62px; height: 62px; font-size: 24px; }
.login-card.glass .btn-primary { background: linear-gradient(135deg, #6eaaff, #2f7fe8); border-color: #6eaaff; color: #0b1230; padding: 13px 16px; font-size: 15.5px; font-weight: 700; }
.login-card.glass .btn-primary:hover { background: linear-gradient(135deg, #84b9ff, #4a92f0); color: #0b1230; }
.muted-light { color: #aebadb; }

/* house-format login: wordmark + title masthead, quote, side card */
.login-body.penthouse { display: block; }
.login-masthead { position: relative; z-index: 1; text-align: center; padding: 56px 70px 0 0; margin-left: auto; width: 62%; transform: translateX(-48px); }
.masthead-row { display: flex; align-items: center; justify-content: center; gap: 18px; flex-wrap: wrap; }
.cp-wordmark { background: #fff; border-radius: 22px; padding: 15px 38px; font-size: 51px; color: #2b2178; letter-spacing: -0.5px; box-shadow: 0 8px 30px rgba(0,0,0,.35); }
.cp-wordmark strong { color: #372b86; font-weight: 800; }
.masthead-title { font-size: 44px; font-weight: 700; letter-spacing: 0.5px; color: #2b2178;
  -webkit-text-stroke: 3px #fff; paint-order: stroke fill;
  text-shadow: 0 3px 14px rgba(0,0,0,.35); }
.masthead-quote { margin: 62px auto 0; max-width: 620px; font-size: 21px; font-style: italic; font-weight: 600; color: #e6eeff; text-shadow: 0 2px 12px rgba(0,0,0,.6); line-height: 2.25; }
.login-side { position: absolute; top: 170px; left: 78px; z-index: 2; display: flex; align-items: flex-start; }
.login-card.glass.side-card { width: 560px; max-width: 92vw; padding: 46px 50px 52px; display: flex; min-height: 700px;
  background: #2a1a70; border: 0; backdrop-filter: none; -webkit-backdrop-filter: none; }
.side-card .login-form-col { display: flex; flex-direction: column; flex: 1; width: 100%; }
.side-card form { display: flex; flex-direction: column; flex: 1; }
.side-card form .btn-block { margin-top: auto; }
.side-card form label:first-of-type { margin-top: 14px; }
#signupForm .btn-block { margin-top: 26px; }
.role-pill { cursor: pointer; }
.side-card input { background: #131233; border: 1px solid rgba(120,130,210,.45); border-radius: 12px; color: #eef2fb; padding: 13px 15px; }
.side-card input::placeholder { color: #8a90bd; }
.side-card .pw-toggle { background: #2b2a58; border-radius: 9px; padding: 5px 12px; color: #cfd6f6; top: 50%; transform: translateY(-50%); }
.side-card select { background: #131233; border: 1px solid rgba(120,130,210,.45); border-radius: 12px; color: #eef2fb; padding: 12px 14px; }
.side-card form label { text-transform: uppercase; letter-spacing: 1.5px; font-size: 12px; color: #aebadb; }
.side-card .btn-primary { border-radius: 30px; text-transform: uppercase; letter-spacing: 2px; font-weight: 800; }
.login-tabs { display: flex; gap: 0; background: rgba(255,255,255,.08); border-radius: 14px; padding: 4px; margin: 0 0 26px; }
.login-tab { flex: 1; border: 0; background: transparent; color: #aebadb; border-radius: 11px; padding: 13px 10px; font: inherit; font-size: 14px; font-weight: 800; letter-spacing: 2px; text-transform: uppercase; cursor: pointer; }
.login-tab.active { background: #4f74d0; color: #fff; }
.role-pills { display: flex; gap: 12px; justify-content: center; margin: 26px 0 20px; }
.role-pill { border: 1px solid rgba(140,170,255,.35); color: #8a93c4; border-radius: 30px; padding: 13px 34px; font-size: 14.5px; font-weight: 700; letter-spacing: 2.5px; text-transform: uppercase; transition: all .25s; }
.role-pill.active { color: #fff; border-color: #6eaaff; background: rgba(110,170,255,.18); box-shadow: 0 0 18px rgba(110,170,255,.35); }
@media (max-width: 700px) { .login-side { justify-content: center; padding-left: 0; } .masthead-title { font-size: 28px; } .cp-wordmark { font-size: 22px; } }

/* ---------- access cards ---------- */
.access-card { width: 380px; max-width: 92vw; aspect-ratio: 1.62; border-radius: 18px; perspective: 900px; }
.access-card-inner {
  width: 100%; height: 100%; border-radius: 18px; padding: 24px 26px;
  display: flex; flex-direction: column; gap: 10px; color: #eef2f8;
  border: 1px solid rgba(255,255,255,.2);
  box-shadow: 0 24px 60px rgba(0,0,0,.5), inset 0 1px 0 rgba(255,255,255,.25);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  transition: background .45s, border-color .45s, box-shadow .45s, transform .45s;
  background: linear-gradient(135deg, rgba(31,111,235,.55) 0%, rgba(20,40,90,.75) 60%, rgba(12,20,48,.85) 100%);
}
.access-card[data-role="exec"] .access-card-inner {
  background: linear-gradient(135deg, rgba(255,36,64,.5) 0%, rgba(70,10,26,.82) 55%, rgba(20,8,16,.9) 100%);
  border-color: rgba(255,120,140,.35);
  box-shadow: 0 24px 60px rgba(120,0,20,.55), inset 0 1px 0 rgba(255,180,190,.3);
  transform: rotateY(360deg);
}
.access-top { display: flex; justify-content: space-between; align-items: center; }
.access-chip { width: 42px; height: 30px; border-radius: 6px; background: linear-gradient(135deg, #f4d47c, #c99b3f); box-shadow: inset 0 0 0 2px rgba(0,0,0,.18); }
.access-brand { font-size: 11px; letter-spacing: 1.5px; font-weight: 700; color: rgba(255,255,255,.75); }
.access-role { font-size: 22px; font-weight: 800; letter-spacing: 3px; margin-top: 6px; text-shadow: 0 2px 12px rgba(0,0,0,.4); }
.access-card[data-role="exec"] .access-role { color: #ffd9de; }
.access-name { font-size: 13px; letter-spacing: 2px; color: rgba(255,255,255,.85); font-weight: 600; min-height: 18px; }
.access-perms { display: flex; flex-wrap: wrap; gap: 6px; margin-top: auto; }
.access-perms span { font-size: 11px; font-weight: 600; background: rgba(255,255,255,.14); border: 1px solid rgba(255,255,255,.18); padding: 4px 10px; border-radius: 20px; }
.access-card[data-role="exec"] .access-perms span { background: rgba(255,60,86,.2); border-color: rgba(255,120,140,.3); }
.access-foot { font-size: 11px; }
.login-brand { text-align: center; margin-bottom: 26px; }
.login-brand h1 { font-size: 21px; margin: 12px 0 4px; }
.login-logo { width: 52px; height: 52px; border-radius: 12px; background: var(--accent); color: #fff; font-weight: 700; display: inline-flex; align-items: center; justify-content: center; font-size: 20px; letter-spacing: 1px; }
.small-logo { width: 38px; height: 38px; font-size: 15px; }
label { display: block; font-size: 13px; font-weight: 600; margin: 14px 0 5px; }
input, textarea, select { width: 100%; padding: 10px 12px; border: 1px solid var(--line); border-radius: 8px; font: inherit; font-size: 14px; background: #fff; color: var(--ink); }
input:focus, textarea:focus, select:focus { outline: 2px solid var(--accent); outline-offset: -1px; }
.pw-wrap { position: relative; }
.pw-toggle { position: absolute; right: 8px; top: 50%; transform: translateY(-50%); border: 0; background: none; color: var(--accent); font-size: 12px; cursor: pointer; font-weight: 600; }

/* ---------- buttons ---------- */
.btn { border: 1px solid var(--line); background: #fff; color: var(--ink); padding: 9px 16px; border-radius: 8px; font: inherit; font-size: 14px; font-weight: 600; cursor: pointer; }
.btn:hover { border-color: var(--accent); color: var(--accent); }
.btn-primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-dark); color: #fff; }
.btn-ghost { background: transparent; border-color: transparent; color: var(--muted); }
.btn-ghost:hover { color: var(--ink); }
.btn.small { padding: 6px 11px; font-size: 12.5px; }
.btn-block { width: 100%; margin-top: 20px; }
.error-msg { background: #fdecea; color: var(--bad); border: 1px solid #f5c6c0; border-radius: 8px; padding: 9px 12px; font-size: 13px; margin-top: 12px; }

/* ---------- layout ---------- */
.layout { display: flex; flex-direction: column; min-height: 100vh; }
.sidebar { background: var(--sidebar); color: #dcdaf0; display: flex; flex-direction: row; align-items: center; flex-wrap: wrap; padding: 12px 22px; gap: 8px; position: sticky; top: 0; height: auto; z-index: 40; box-shadow: 0 2px 10px rgba(20,12,60,.25); }
.sidebar-brand { display: flex; gap: 10px; align-items: center; padding: 0 6px; }
.sidebar-brand strong { color: #fff; font-size: 15px; }
nav { display: flex; flex-direction: row; flex-wrap: wrap; gap: 4px; align-items: center; }
.nav-btn { text-align: left; background: none; border: 0; color: #bdbadf; padding: 9px 13px; border-radius: 8px; font: inherit; font-size: 14px; cursor: pointer; white-space: nowrap; }
.nav-btn:hover { background: rgba(255,255,255,.08); color: #fff; }
.nav-btn.active { background: #4f74d0; color: #fff; font-weight: 600; }
.sidebar-meeting { background: rgba(255,255,255,.06); border-radius: 10px; padding: 8px 14px; font-size: 12.5px; margin-left: auto; display: flex; align-items: baseline; gap: 8px; white-space: nowrap; }
.sidebar-meeting strong { color: #fff; display: inline; margin: 0; }
.sidebar-meeting .phase-line { margin-top: 0; }
.phase { display: inline-block; padding: 2px 8px; border-radius: 20px; font-size: 11px; font-weight: 700; margin-right: 4px; }
.phase.pre { background: #2c4a73; color: #bcd6f7; }
.phase.live { background: #7a2e26; color: #ffd2cb; }
.phase.post { background: #1e5c3f; color: #bdeeD5; }
.phase-line { margin-top: 4px; color: #aba8d3; }
.sidebar-footer { display: none; }
.sidebar-footer .muted { color: #9d9ac6; }

.main { padding: 10px 26px 40px; max-width: 100%; width: 100%; margin: 0; }
.topbar { display: flex; justify-content: flex-end; align-items: center; margin-bottom: 6px; gap: 12px; flex-wrap: wrap; min-height: 0; }
.topbar h2 { display: none; }
.topbar h2 { font-size: 22px; }
.topbar-right { display: flex; gap: 10px; align-items: center; }
.topbar-right select { width: auto; }

/* ---------- objectives banner ---------- */
.objectives { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-bottom: 22px; }
.objective { background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: 13px 15px; display: flex; gap: 12px; align-items: center; }
.objective strong { display: block; font-size: 13.5px; }
.obj-num { width: 28px; height: 28px; flex: 0 0 28px; border-radius: 50%; background: var(--accent); color: #fff; display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 14px; }

/* ---------- notes ---------- */
.note-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(295px, 1fr)); gap: 14px; align-items: start; }
.note-card { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 18px; display: flex; flex-direction: column; gap: 12px; }
.note-card.draft { border-style: dashed; background: #fbfcfe; }
.note-card.finalised { border-left: 4px solid var(--ok); }
.note-head { display: flex; justify-content: space-between; gap: 10px; align-items: flex-start; }
.note-head h3 { font-size: 16px; margin-top: 3px; }
.note-meta { font-size: 12.5px; color: var(--muted); }
.badges { display: flex; flex-direction: column; gap: 5px; align-items: flex-end; flex-shrink: 0; }
.state, .res { font-size: 11px; font-weight: 700; padding: 3px 9px; border-radius: 20px; white-space: nowrap; }
.state.draft { background: #eef1f5; color: var(--muted); }
.state.published { background: #e3edfb; color: var(--accent-dark); }
.state.finalised { background: #e2f3ea; color: var(--ok); }
.res.unresolved { background: #fdecea; color: var(--bad); }
.res.in-progress { background: #fbf3e0; color: var(--warn); }
.res.resolved { background: #e2f3ea; color: var(--ok); }
.anon-badge { background: #f0e9fb; color: #6b3fa0; font-size: 11.5px; font-weight: 700; padding: 2px 9px; border-radius: 20px; }
.obj-block p { font-size: 14px; margin-top: 3px; white-space: pre-wrap; }
.obj-block.final { background: #f2faf6; border-radius: 8px; padding: 9px 11px; }
.obj-tag { display: inline-block; font-size: 10.5px; font-weight: 800; text-transform: uppercase; letter-spacing: .5px; color: var(--accent-dark); background: #e3edfb; padding: 2px 7px; border-radius: 4px; }
.pills { font-size: 12.5px; color: var(--muted); display: flex; gap: 5px; flex-wrap: wrap; align-items: center; }
.pill { background: #eef1f5; padding: 2px 9px; border-radius: 20px; font-size: 11.5px; font-weight: 600; color: #45566a; }
.note-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.note-actions:empty { display: none; }
.note-foot { border-top: 1px solid var(--line); padding-top: 8px; }

/* ---------- alerts ---------- */
.note-card.alerted { border-color: #e4b8b2; box-shadow: 0 0 0 3px rgba(192,57,43,.08); }
.alert-banner { background: #fdecea; color: var(--bad); font-size: 12px; font-weight: 700; padding: 6px 11px; border-radius: 8px; }
.btn-alert { border-color: #e4b8b2; color: var(--bad); }
.btn-alert:hover { background: #fdecea; border-color: var(--bad); color: var(--bad); }
.alert-panel { background: #fdf3f2; border: 1px solid #f0d4d0; border-radius: 12px; padding: 16px 18px 18px; margin-bottom: 26px; }
.alert-panel h3 { color: var(--bad); margin-bottom: 12px; }
.alert-word { color: var(--bad); }
.alert-row span { color: #7d2c22; }
.report-alert { background: #fdf7f6; border-left: 3px solid var(--bad); padding-left: 12px; }

/* ---------- progress ---------- */
.progress-row { display: flex; align-items: center; gap: 10px; }
.progress-track { flex: 1; height: 8px; background: #eef1f5; border-radius: 6px; overflow: hidden; }
.progress-fill { height: 100%; background: var(--accent); border-radius: 6px; transition: width .25s; }
.progress-fill.done { background: var(--ok); }
.progress-num { font-size: 12.5px; font-weight: 700; width: 38px; text-align: right; }
.progress-edit { width: 90px; padding: 0; }
input[type="range"] { accent-color: var(--accent); border: 0; }

/* ---------- Claude assessment ---------- */
.assessment { background: linear-gradient(135deg, #f7f4ff 0%, #f2f7ff 100%); border: 1px solid #ddd6f3; border-radius: 10px; padding: 11px 13px; display: flex; flex-direction: column; gap: 6px; }
.assessment-head { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.claude-tag { font-size: 11px; font-weight: 800; color: #5b3fa8; letter-spacing: .3px; }
.sev { font-size: 11px; font-weight: 700; padding: 3px 9px; border-radius: 20px; white-space: nowrap; }
.sev.low { background: #e2f3ea; color: var(--ok); }
.sev.moderate { background: #fbf3e0; color: var(--warn); }
.sev.high { background: #fdeade; color: #c05621; }
.sev.critical { background: #fdecea; color: var(--bad); }
.next-steps { margin: 2px 0 2px 18px; }
.next-steps li { margin-bottom: 2px; }
.assess-apply { display: flex; justify-content: space-between; align-items: center; gap: 10px; border-top: 1px solid #ddd6f3; padding-top: 8px; flex-wrap: wrap; }
.assessment.in-modal { margin-top: 14px; }
.btn-claude { border-color: #ddd6f3; color: #5b3fa8; }
.btn-claude:hover { background: #f7f4ff; border-color: #5b3fa8; color: #5b3fa8; }

/* ---------- discussion ---------- */
.thread summary { cursor: pointer; font-size: 13px; font-weight: 600; color: var(--accent-dark); }
.comments { display: flex; flex-direction: column; gap: 8px; margin: 10px 0; }
.comment { background: #f6f8fb; border-radius: 8px; padding: 8px 11px; font-size: 13.5px; }
.comment-head { margin-bottom: 2px; font-size: 12.5px; }
.comment-form { display: flex; gap: 8px; }
.comment-form input { flex: 1; }

/* ---------- modals ---------- */
.modal-backdrop { position: fixed; inset: 0; background: rgba(15,25,38,.55); display: flex; align-items: center; justify-content: center; padding: 20px; z-index: 50; }
.modal { background: var(--panel); border-radius: 14px; padding: 26px 28px; width: 620px; max-width: 100%; max-height: 92vh; overflow-y: auto; }
#projectModal .modal { width: 1020px; }
#projectModal h3.tight { margin-bottom: 2px; }
.project-grid { display: grid; grid-template-columns: 1fr 1fr; column-gap: 22px; }
.project-grid label { margin-top: 10px; }
.project-grid .muted.tiny { margin: 2px 0 4px; }
.pg-full { grid-column: 1 / -1; }
.modal h3 { margin-bottom: 4px; }
.modal-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 22px; }
.dept-checks { display: flex; gap: 8px; flex-wrap: wrap; }
.check-pill { display: inline-flex; gap: 6px; align-items: center; border: 1px solid var(--line); border-radius: 20px; padding: 5px 12px; font-size: 13px; font-weight: 500; cursor: pointer; margin: 0; }
.check-pill input { width: auto; }
.check-row { display: flex; gap: 9px; align-items: flex-start; font-weight: 400; font-size: 13.5px; margin-top: 16px; cursor: pointer; }
.check-row input { width: auto; margin-top: 2px; }

/* ---------- announcements ---------- */
.ann-list { display: flex; flex-direction: column; gap: 16px; max-width: 860px; }
.ann-card { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 18px 20px; display: flex; flex-direction: column; gap: 12px; border-left: 4px solid var(--accent); }
.ann-card.warning { border-left-color: var(--warn); }
.warn-badge { color: var(--warn); font-weight: 700; }
.eff-date { font-size: 12px; font-weight: 700; background: #e3edfb; color: var(--accent-dark); padding: 4px 11px; border-radius: 20px; white-space: nowrap; }
.weight-box { border: 1px solid var(--line); border-radius: 9px; padding: 9px 12px; display: flex; flex-direction: column; gap: 5px; margin-top: 10px; }
.weight-box.compact { margin-top: 0; }
.weight-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.weight-track { height: 8px; background: #eef1f5; border-radius: 6px; overflow: hidden; }
.weight-fill { height: 100%; border-radius: 6px; transition: width .25s, background .25s; background: var(--ok); width: 17%; }
.weight-fill.w1 { background: var(--ok); }
.weight-fill.w2 { background: #d99a1b; }
.weight-fill.w3 { background: #c05621; }
.weight-fill.w4 { background: var(--bad); }
.w1-text { color: var(--ok); } .w2-text { color: #b07a10; } .w3-text { color: #c05621; } .w4-text { color: var(--bad); }
.ok-text { color: var(--ok); font-weight: 700; }
.ann-actions-block { border-top: 1px solid var(--line); padding-top: 11px; display: flex; flex-direction: column; gap: 7px; }
.ann-actions-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.progress-track.slim { height: 6px; }
.ann-action { display: flex; align-items: center; gap: 9px; background: #f6f8fb; border-radius: 8px; padding: 7px 11px; font-size: 13.5px; cursor: default; margin: 0; font-weight: 400; }
.ann-action input[type="checkbox"] { width: 16px; height: 16px; flex-shrink: 0; accent-color: var(--ok); cursor: pointer; }
.ann-action.done .ann-action-text { text-decoration: line-through; color: var(--muted); }
.ann-action-text { flex: 1; }
.ann-action-who { white-space: nowrap; }
.ann-action .btn { padding: 1px 7px; }
.ann-add-action { display: grid; grid-template-columns: 1fr 150px 120px auto; gap: 7px; margin-top: 3px; }
.ann-add-action.aims-form { grid-template-columns: 1fr 160px auto; }
.ann-add-action.forecast-form { grid-template-columns: 1fr 140px 130px auto; }
.forecast-row { cursor: default; }
.forecast-trend { font-size: 18px; flex-shrink: 0; }
.ann-add-action input, .ann-add-action select { padding: 7px 9px; font-size: 13px; }
.report-action { margin-bottom: 3px; }
.report-action .tick { color: var(--ok); font-weight: 800; }
.report-action .untick { color: var(--bad); font-weight: 800; }
.appendix-head { margin: 34px 0 14px; font-size: 18px; border-top: 2px solid var(--line); padding-top: 22px; }
@media (max-width: 860px) { .ann-add-action { grid-template-columns: 1fr 1fr; } }

/* ---------- presentations ---------- */
.pres-list { display: flex; flex-direction: column; gap: 12px; max-width: 860px; }
.pres-card { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 13px 17px; display: flex; flex-direction: column; gap: 11px; }
.pres-row { display: flex; align-items: center; gap: 14px; background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 13px 17px; }
.pres-row.borderless { border: 0; padding: 0; background: none; border-radius: 0; }
.pres-desc-edit { display: flex; flex-direction: column; gap: 6px; align-items: flex-start; }
.pres-desc-edit label { margin: 0; }
.pres-icon { font-size: 26px; }
.pres-main { flex: 1; min-width: 0; }
.pres-title { font-weight: 700; font-size: 15px; }
.new-badge { font-size: 10px; font-weight: 800; background: #e2f3ea; color: var(--ok); padding: 2px 8px; border-radius: 20px; vertical-align: 2px; letter-spacing: .5px; }
#uploadPresBtn { cursor: pointer; }

/* ---------- department summaries (report) ---------- */
.dept-summary-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 14px; }
.dept-summary { border: 1px solid var(--line); border-radius: 10px; padding: 14px 16px; display: flex; flex-direction: column; gap: 9px; break-inside: avoid; }

.dept-summary h3 { font-size: 15px; border-bottom: 1px solid var(--line); padding-bottom: 6px; }
.dept-summary-lines { display: flex; flex-direction: column; gap: 4px; }
.dept-aims { border-top: 1px dashed var(--line); padding-top: 8px; display: flex; flex-direction: column; gap: 4px; }

/* presentation comment box */
.pres-comment-form { align-items: flex-end; border-top: 1px solid var(--line); padding-top: 11px; }
.pres-comment-form textarea { resize: vertical; }
.comment { white-space: pre-wrap; }

/* ---------- build presentation (full-width, centred) ---------- */
.build-stage { max-width: 1100px; margin: 0 auto 18px; width: 100%; }
.build-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; flex-wrap: wrap; padding: 0; border: 0; }
.build-head h4 { font-size: 15.5px; }
.build-chat { min-height: 32vh; max-height: 42vh; border: 1px solid var(--line); border-radius: 10px; background: #fafbfd; padding: 11px 14px; overflow-y: auto; display: flex; flex-direction: column; gap: 8px; }
.build-form { display: flex; flex-direction: column; gap: 7px; padding: 0; border: 0; }
.build-form textarea { width: 100%; min-height: 56px; resize: vertical; font-size: 14px; }
.build-form-row { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.meeting-choice { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-top: 10px; }
.meeting-card { display: flex; flex-direction: column; gap: 4px; align-items: flex-start; text-align: left; background: var(--panel); border: 2px solid var(--line); border-radius: 12px; padding: 18px 20px; font: inherit; cursor: pointer; }
.meeting-card:hover { border-color: var(--accent); background: #f4f8ff; }
.meeting-card strong { font-size: 16px; }
.mission-statement { font-size: 16.5px; font-weight: 600; margin: 6px 0 10px; }
.full-bleed .main { max-width: 100%; }
.mission-layout { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: 24px; align-items: stretch; }
.mission-left { display: flex; flex-direction: column; }
.mission-left > .ws-stage:first-child { min-height: 300px; justify-content: flex-start; gap: 16px; }
.mission-left .sm-cols { flex: 1; }
.sm-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; align-items: stretch; }
.sm-col:last-child > .ws-stage { height: 100%; }
.sm-col:first-child > .ws-stage.mission-card:last-child { flex: 1; }
.sm-col { display: flex; flex-direction: column; gap: 14px; min-width: 0; }
@media (max-width: 1100px) { .sm-cols { grid-template-columns: 1fr; } }
.mission-left .ws-stage { max-width: 100%; }
.mission-narrative { max-width: 100ch; }
.mission-left p, .mission-statement { max-width: 100ch; }
.mission-right { position: sticky; top: 100px; align-self: start; text-align: center; display: flex; flex-direction: column; gap: 16px; }
.mission-right img { width: 100%; height: auto; border-radius: 14px; box-shadow: 0 8px 26px rgba(20,12,60,.28); }
.mission-right .vision-fill { height: calc(100vh - 150px); object-fit: cover; }
.aims-img { width: 100%; flex: 1; min-height: 380px; object-fit: cover; border-radius: 14px; box-shadow: 0 8px 26px rgba(20,12,60,.28); }
.mission-progress-pill { background: #e8f1e9; border: 1px solid #bcd9c2; color: #1e5c3f; font-weight: 700; }
.ann-layout { display: grid; grid-template-columns: 1fr 1.5fr; gap: 22px; align-items: stretch; min-height: calc(100vh - 235px); }
.ann-right-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; align-items: stretch; }
.ann-subcol { display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.projects-panel { flex: 1; }
.ann-subcol .vision-panel { flex: 1; }
.ann-left > .ws-stage:first-child { min-height: 46vh; }
.ann-date-pill input[type="date"] { width: auto; padding: 4px 8px; border: 0; background: transparent; font-size: 13px; color: var(--ink); }
.vision-panel .vision-mini { flex: 1 0 auto; }
.vision-panel .vision-go { margin-top: auto; }
@media (max-width: 1100px) { .ann-right-cols { grid-template-columns: 1fr; } }
.sidebar-cycle { margin-left: auto; display: flex; gap: 10px; align-items: center; }
.sidebar-cycle select { width: auto; }
.page-meeting { background: var(--panel); color: var(--ink); border: 1px solid var(--line); display: block; margin-left: 0; margin-top: 14px; white-space: normal; border-radius: 12px; padding: 14px 16px; }
.page-meeting strong { color: var(--ink); display: block; margin: 3px 0 4px; }
.page-meeting .muted, .page-meeting .phase-line { color: var(--muted); }
.ann-right { position: sticky; top: 120px; }
.vision-panel .mission-statement { font-size: 13.5px; margin: 2px 0 8px; }
.vision-mini { border-top: 1px solid var(--line); padding-top: 8px; margin-top: 8px; }
.vision-panel .btn { margin-top: 10px; }
.mission-achieved { font-weight: 700; color: var(--muted); }
.mission-achieved.yes { color: var(--ok); }
.project-item details summary { cursor: pointer; color: var(--accent); font-weight: 600; }
.modal { position: relative; }
.modal-x { position: absolute; top: 14px; right: 16px; border: 0; background: none; font-size: 16px; color: var(--muted); cursor: pointer; }
.modal-x:hover { color: var(--ink); }
@media (max-width: 900px) { .ann-layout { grid-template-columns: 1fr; } .ann-right { position: static; } }
@media (max-width: 900px) { .mission-layout { grid-template-columns: 1fr; } .mission-right { position: static; } }

/* issues: emergency + always-open chat */
.note-card.emergency { border: 2px solid #c0392b; box-shadow: 0 0 0 3px rgba(192,57,43,.12); }
.emergency-banner { background: #c0392b; color: #fff; font-weight: 800; letter-spacing: .5px; padding: 6px 12px; border-radius: 8px 8px 0 0; margin: -14px -16px 10px; text-align: center; }
.raised-line { color: #7a2e26; margin-bottom: 6px; }
.thread.chat-open { border-top: 1px solid var(--line); margin-top: 10px; padding-top: 10px; }
.thread.chat-open .comments { max-height: 260px; overflow-y: auto; margin: 8px 0; }
.thread.chat-open textarea { width: 100%; min-height: 58px; resize: vertical; }
.pres-synopsis { margin-top: 6px; background: #f4f7fc; border-left: 3px solid var(--accent); padding: 7px 10px; border-radius: 0 8px 8px 0;
  display: -webkit-box; -webkit-line-clamp: 6; -webkit-box-orient: vertical; overflow: hidden; cursor: pointer; }
.pres-synopsis.open { -webkit-line-clamp: unset; }
.chat-attach-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chat-attach-chips[hidden] { display: none; }
.chat-chip { display: inline-flex; align-items: center; gap: 6px; background: #eef2fb; border: 1px solid #cdd9f2; color: var(--accent-dark); }
.chat-chip button { background: none; border: 0; cursor: pointer; color: inherit; font-size: 12px; padding: 0; }
.main > #content > .ws-stage:not(.build-stage), .main #content > p.muted,
.main #content > .pres-card, .main #content > .empty,
.main #content > .ann-month { max-width: 1100px; margin-left: auto; margin-right: auto; }
#content > .ws-stage { margin-bottom: 16px; }

/* ---------- presentation builder ---------- */
.objectives.two { grid-template-columns: repeat(2, 1fr); }
.pres-grid { display: grid; grid-template-columns: 1.15fr 1fr; gap: 18px; min-height: calc(100vh - 220px); }
.pres-grid .ws-left { padding: 0; overflow: visible; }
.pres-chat { border: 1px solid var(--line); border-radius: 12px; background: var(--panel); display: flex; flex-direction: column; min-height: 520px; max-height: calc(100vh - 200px); position: sticky; top: 20px; }
.pres-dept { display: flex; flex-direction: column; gap: 7px; margin-bottom: 6px; }
.pres-context { color: #45566a; margin-top: 3px; white-space: pre-wrap; }
.assessment.slim { padding: 8px 11px; }
@media (max-width: 1000px) { .pres-grid { grid-template-columns: 1fr; } .pres-chat { position: static; max-height: none; } }

/* present mode */
.present-overlay { position: fixed; inset: 0; z-index: 200; background: #0b0f1a; display: flex; flex-direction: column; }
.present-bar { display: flex; justify-content: space-between; align-items: center; padding: 10px 16px; color: #fff; background: #141b2c; }
.present-overlay iframe { flex: 1; border: 0; width: 100%; background: #1c2433; }

/* information exchange */
.info-card { gap: 9px; }
.info-card.request { border-left: 4px solid var(--warn); }
.info-card.send { border-left: 4px solid var(--ok); }
.info-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.info-head .btn { margin-left: auto; }
.info-badge { font-size: 11px; font-weight: 800; padding: 3px 10px; border-radius: 20px; }
.info-badge.request { background: #fbf3e0; color: var(--warn); }
.info-badge.send { background: #e2f3ea; color: var(--ok); }
.info-card .comment-form textarea { flex: 1; resize: vertical; }

/* ---------- workspace ---------- */
.workspace { background: var(--bg); border-radius: 14px; width: 1150px; max-width: 96vw; height: 92vh; display: flex; flex-direction: column; overflow: hidden; }
.ws-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 16px 22px; background: var(--panel); border-bottom: 1px solid var(--line); }
.ws-head h3 { font-size: 18px; }
.ws-grid { display: grid; grid-template-columns: 1.25fr 1fr; gap: 0; flex: 1; min-height: 0; }
.ws-left { overflow-y: auto; padding: 18px 20px 30px; display: flex; flex-direction: column; gap: 14px; }
.ws-stage { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 15px 17px; display: flex; flex-direction: column; gap: 9px; }
.ws-stage h4 { display: flex; align-items: center; gap: 9px; font-size: 14.5px; }
.ws-stage label { margin: 4px 0 0; }
.ws-row { display: flex; gap: 8px; flex-wrap: wrap; }
.ws-files-head { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.ws-upload { cursor: pointer; display: inline-block; }
.ws-files { display: flex; flex-direction: column; gap: 4px; }
.ws-files:empty { display: none; }
.ws-file { display: flex; align-items: center; gap: 8px; background: #f6f8fb; border-radius: 7px; padding: 5px 10px; font-size: 13px; justify-content: space-between; }
.ws-file-name { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; flex: 1; }
.ws-file .btn { padding: 2px 7px; }
.ws-summary { white-space: pre-wrap; }
.polish-box { border-color: #c9e2c9; background: #f4faf4; }
.ws-intervention-form { display: grid; grid-template-columns: 130px 1fr 1.4fr auto; gap: 7px; }
.ws-intervention-form select, .ws-intervention-form input { padding: 7px 9px; font-size: 13px; }
.intervention-tag { background: #fff3e0; color: #a05a1c; }
.interventions { display: flex; flex-direction: column; gap: 4px; }
.intervention-line { font-size: 13px; }
.suggestion { background: #f7f4ff; border: 1px solid #e6def7; }

/* workspace chat */
.ws-right { display: flex; flex-direction: column; border-left: 1px solid var(--line); background: var(--panel); min-height: 0; }
.ws-chat-head { padding: 13px 16px; border-bottom: 1px solid var(--line); display: flex; flex-direction: column; gap: 2px; }
.ws-chat { flex: 1; overflow-y: auto; padding: 14px 16px; display: flex; flex-direction: column; gap: 10px; background: #fafbfd; }
.chat-msg { display: flex; flex-direction: column; max-width: 92%; }
.chat-msg.user { align-self: flex-end; align-items: flex-end; }
.chat-msg.assistant { align-self: flex-start; align-items: flex-start; }
.chat-bubble { padding: 9px 13px; border-radius: 12px; font-size: 13.5px; white-space: pre-wrap; }
.chat-msg.user .chat-bubble { background: var(--accent); color: #fff; border-bottom-right-radius: 4px; }
.chat-msg.assistant .chat-bubble { background: #fff; border: 1px solid #ddd6f3; border-bottom-left-radius: 4px; }
.chat-save { margin-top: 3px; font-size: 11px; padding: 2px 8px; }
.chat-empty { padding: 20px 6px; }
.ws-chat-form { display: flex; gap: 8px; padding: 12px 14px; border-top: 1px solid var(--line); align-items: flex-end; }
.ws-chat-form textarea { flex: 1; resize: none; }

@media (max-width: 980px) {
  .ws-grid { grid-template-columns: 1fr; overflow-y: auto; }
  .ws-right { border-left: 0; border-top: 1px solid var(--line); min-height: 420px; }
  .ws-intervention-form { grid-template-columns: 1fr 1fr; }
}

/* ---------- exec / stats ---------- */
.stat-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 12px; margin-bottom: 24px; }
.stat { background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: 14px 16px; text-align: center; }
.stat-num { font-size: 26px; font-weight: 800; }
.stat-num.ok { color: var(--ok); }
.stat-num.warn { color: var(--warn); }
.stat-num.bad { color: var(--bad); }
.dept-heading { margin: 26px 0 12px; font-size: 17px; }
.empty { background: var(--panel); border: 1px dashed var(--line); border-radius: 12px; padding: 44px; text-align: center; color: var(--muted); }

/* ---------- report ---------- */
.report-toolbar { display: flex; justify-content: space-between; align-items: center; margin-bottom: 16px; gap: 12px; }
.report { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 34px 38px; }
.report-head { border-bottom: 2px solid var(--ink); padding-bottom: 14px; margin-bottom: 22px; }
.report-head h1 { font-size: 23px; margin-bottom: 4px; }
.report-dept { margin-top: 26px; }
.report-dept h2 { font-size: 17px; border-bottom: 1px solid var(--line); padding-bottom: 6px; margin-bottom: 12px; }
.report-note { margin-bottom: 18px; break-inside: avoid; }
.report-note-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.report-table { width: 100%; border-collapse: collapse; margin-top: 8px; font-size: 13.5px; }
.report-table th { text-align: left; width: 190px; vertical-align: top; padding: 7px 10px; background: #f6f8fb; border: 1px solid var(--line); font-size: 12.5px; }
.report-table td { padding: 7px 10px; border: 1px solid var(--line); white-space: pre-wrap; }

@media print {
  .sidebar, .topbar, .objectives, .no-print { display: none !important; }
  .layout { display: block; }
  .main { padding: 0; max-width: none; }
  .report { border: 0; padding: 0; }
  body { background: #fff; }
}

@media (max-width: 860px) {
  .sidebar { position: static; }
  .sidebar-meeting { margin-left: 0; }
  .objectives { grid-template-columns: 1fr; }
}

/* group summary */
.shared-badge { background: #e3edfb; color: var(--accent-dark); }
.group-item { display: flex; flex-direction: column; gap: 3px; border-top: 1px dashed var(--line); padding-top: 8px; margin-top: 4px; }
.group-item:first-of-type { border-top: 0; padding-top: 0; }
.appendix-head.first { margin-top: 6px; border-top: 0; padding-top: 0; }
.claude-tag.tiny { font-size: 10px; }

/* aims 3-step + meeting notes */
.aim-block { display: flex; flex-direction: column; gap: 5px; margin-bottom: 8px; }
.aim-steps { display: flex; flex-direction: column; gap: 4px; padding: 8px 12px 8px 34px; background: #fafbfd; border-radius: 8px; }
.meeting-note { background: #fffdf4; border: 1px solid #f0e8c8; border-radius: 8px; padding: 8px 11px; }
.meeting-note-row { align-items: center; }
.meeting-note-row .ann-action-text { white-space: pre-wrap; }
#mnForm textarea { flex: 1; resize: vertical; }

/* exec intervention */
.exec-intervention { background: #fdf7ef; border: 1px solid #eeddc2; border-radius: 8px; padding: 9px 11px; }
.exec-intervention .comment-form textarea { resize: vertical; }

/* fixed sign-out + editable brand name */
#settingsBtn { background: #c6cede; color: #17224d; border-color: #c6cede; font-weight: 700; }
#settingsBtn:hover { background: #d7deeb; color: #17224d; }
.signout-top { background: #6eaaff; color: #0b1230; border-color: #6eaaff; font-weight: 700; }
.signout-top:hover { background: #84b9ff; color: #0b1230; }
.brand-name-wrap { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; }
.brand-name-wrap strong { color: #fff; font-size: 15px; }
.name-edit { border: 0; background: none; cursor: pointer; font-size: 12px; opacity: .7; }
.name-edit:hover { opacity: 1; }
.brand-name-wrap .muted { width: 100%; }

/* ---------- Central Pharma theme: dark-blue page, white cards with dark-blue text ---------- */
body { color: var(--pageink); }
.topbar h2, #content > .dept-heading, .dept-heading, .appendix-head { color: var(--pageink); }
.main > .topbar .muted, #content > p.muted { color: #5c6b93; }
.dept-heading .muted { color: #7b8bb5; }
/* cards are white with dark-blue text */
.ws-stage, .note-card, .pres-card, .stat, .modal, .meeting-card, .report-toolbar,
.dept-summary, .objective, .report, .alert-panel { color: var(--ink); }
.ws-stage h3, .ws-stage h4, .note-card h3, .modal h3, .dept-summary h3, .report h1, .report h2, .report h3, .stat .stat-num { color: var(--ink); }
.empty { background: #eef3fb; border-color: #cfd9ec; color: #5c6b93; }
.report-toolbar { background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: 10px 14px; }
.toolbar-plain { display: flex; justify-content: flex-end; gap: 10px; margin-bottom: 8px; }
.aims-stats { align-items: center; }
.aims-stats .btn { flex: 0 0 auto; margin-left: 6px; }
.resume-panel { background: var(--panel); border-radius: 12px; padding: 14px 16px; }
/* white controls and light islands inside the blue cards keep dark-blue text */
input, textarea, select { color: #17224d; }
.btn { color: #17224d; }
.btn:hover { color: var(--accent); }
.btn-primary, .btn-primary:hover { color: #fff; }
.btn-ghost { color: var(--muted); }
.btn-ghost:hover { color: var(--ink); }
.chat-msg .chat-bubble { color: #17224d; }
.chat-msg.user .chat-bubble { color: #fff; }
.comment, .ann-action, .aim-steps, .obj-block.final, .pres-synopsis,
.meeting-note, .group-item.meeting-note, .report-table th, .report-table td, .vision-mini .mission-statement { color: #17224d; }
.build-chat .muted, .ws-chat .muted, .comment .muted, .ann-action .muted, .aim-steps .muted { color: #5c6b93; }
.meeting-card:hover { background: #f4f8ff; }
.meeting-card.selected { background: #e8f0fe; border-color: var(--accent); }
.progress-track { background: #e3e8ee; }
.raised-line { color: #a03a2c; }

/* presentation split: builder left half, upcoming + previous + group summary right half */
.pres-layout { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; align-items: stretch; }
.pres-left > .ws-stage:first-child { flex: 1; }
.pres-layout .build-stage { max-width: 100%; margin: 0; }
.pres-layout .build-chat { min-height: 37vh; max-height: 45vh; }
/* exec builder after type selection: fills the whole page width */
.build-stage.build-full { max-width: 50%; margin: 0; }
.build-full .build-chat { min-height: 240px; height: calc(100vh - 470px); max-height: none; }
.build-full .purpose-row input, .build-full textarea { width: 100%; }
.pres-left, .pres-right { min-width: 0; display: flex; flex-direction: column; gap: 16px; }
.pres-right .ws-stage { max-width: 100%; }
@media (max-width: 1000px) { .pres-layout { grid-template-columns: 1fr; } }

/* meeting chooser: options stacked row by row on the left */
.chooser-title { font-size: 19px; }
.meeting-choice-rows { display: flex; flex-direction: column; gap: 14px; align-items: stretch; }
.meeting-choice-rows .meeting-card { padding: 22px 24px; gap: 6px; }
.meeting-choice-rows .meeting-card strong { font-size: 19px; }
.meeting-choice-rows .meeting-card span { font-size: 15px; }
.meeting-card.selected { border-color: var(--accent); background: #e8f0fe; box-shadow: 0 0 0 3px rgba(31,111,235,.18); }
.meeting-choice-rows .btn-primary { align-self: flex-start; margin-top: 6px; }
.resume-panel { display: flex; flex-direction: column; gap: 8px; border-top: 1px solid var(--line); padding-top: 12px; margin-top: 4px; }
.resume-row { display: flex; flex-direction: column; gap: 2px; align-items: flex-start; text-align: left; background: #f4f8ff; border: 1px solid var(--line); border-radius: 10px; padding: 10px 14px; font: inherit; cursor: pointer; color: var(--ink); }
.resume-row:hover { border-color: var(--accent); }

.purpose-row { display: flex; align-items: center; gap: 10px; }
.purpose-row label { white-space: nowrap; margin: 0; }
.purpose-row input { flex: 1; }

/* action points: mine left, company right */
.aims-layout { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; align-items: stretch; }
.aims-col { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.aims-col .ws-stage { max-width: 100%; }
@media (max-width: 1000px) { .aims-layout { grid-template-columns: 1fr; } }

/* issue actions pinned at the bottom of the card */
.note-actions-bottom { border-top: 1px solid var(--line); padding-top: 10px; }

/* uniform issue cards: same height, long content clipped until Read more */
.issue-tabs { display: flex; gap: 10px; margin-bottom: 16px; }
.issue-tabs .tab-count { opacity: .8; font-weight: 500; }
.note-grid .note-card { height: 500px; }
.note-grid .note-card .note-body { flex: 1 1 auto; min-height: 0; overflow: hidden; }
.note-grid .note-card .thread.chat-open .comments { max-height: 110px; }
.note-grid .note-card.expanded { height: auto; }
.note-grid .note-card.expanded .note-body { overflow: visible; }
.note-grid .note-card.expanded .thread.chat-open .comments { max-height: 300px; }
.note-foot-row { display: flex; justify-content: space-between; align-items: center; }
.read-toggle { color: var(--accent); }

/* group summary fills the left column */
.pres-left .dept-summary-grid { grid-template-columns: 1fr; }

/* presentation item: synopsis left, meeting notes right, actions bottom-right */
.pres-row-v2 { display: flex; flex-direction: column; gap: 10px; }
.pres-row-top { display: flex; gap: 12px; align-items: flex-start; }
.pres-row-top .pres-main { flex: 1.2; min-width: 0; }
.pres-note-col { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 8px; }
.pres-note-col .meeting-note { background: #fdf8e7; border-radius: 8px; padding: 9px 11px; }
.pres-row-actions { display: flex; justify-content: flex-end; align-items: center; gap: 8px; border-top: 1px solid var(--line); padding-top: 10px; }

/* narrow right column: let content rows wrap instead of crushing */
.pres-right .pres-row { flex-wrap: wrap; }
.pres-right .pres-main { flex: 1 1 220px; min-width: 0; }

/* dark scrollbars */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(140,160,220,.4); border-radius: 6px; }
::-webkit-scrollbar-thumb:hover { background: rgba(140,160,220,.65); }

.report-download-bottom { position: fixed; right: 18px; bottom: 14px; z-index: 90; margin: 0; }

.img-popup-backdrop { position: fixed; inset: 0; background: rgba(10,14,30,.75); display: flex; align-items: center; justify-content: center; z-index: 200; padding: 30px; }
.img-popup { background: var(--panel); border-radius: 14px; padding: 16px; max-width: 90vw; max-height: 90vh; display: flex; flex-direction: column; gap: 10px; box-shadow: 0 20px 60px rgba(0,0,0,.4); }
.img-popup-head { display: flex; justify-content: space-between; align-items: center; gap: 16px; font-weight: 600; }
.img-popup img { max-width: 100%; max-height: 74vh; object-fit: contain; border-radius: 8px; }
.img-popup a { align-self: flex-start; }

.issue-topline { display: flex; justify-content: space-between; align-items: center; margin-bottom: 14px; }
.issue-topline .issue-tabs { margin-bottom: 0; }

/* builder header actions pushed to the right */
.build-head-actions { margin-left: auto; display: flex; gap: 8px; }
.resume-item { display: flex; gap: 6px; align-items: stretch; }
.resume-item .resume-row { flex: 1; }
.resume-del { flex: 0 0 auto; }

/* ============ RESPONSIVE: adapt to narrow windows and phones ============ */
@media (max-width: 1024px) {
  /* app: every multi-column grid collapses to a single column */
  .pres-layout, .ann-layout, .ann-right-cols, .mission-layout, .sm-cols, .aims-layout,
  .dept-summary-grid, .note-grid { grid-template-columns: 1fr !important; }
  .main { padding: 10px 16px 40px; }
  .mission-right { position: static; }
  .mission-right .vision-fill { height: auto; }

  /* top bar wraps cleanly, stays readable */
  .sidebar { padding: 10px 14px; gap: 8px 12px; }
  .sidebar-brand strong { font-size: 14px; }
  nav { gap: 2px; }
  .nav-btn { padding: 8px 10px; font-size: 13px; }
  .sidebar-cycle { flex-wrap: wrap; }

  /* login: stop the absolute overlap — flow masthead above a centred card */
  .login-body.penthouse { display: flex; flex-direction: column; align-items: center; min-height: 100vh; padding: 24px 16px 40px; }
  .login-masthead { position: static; width: 100%; max-width: 640px; margin: 0 auto; padding: 20px 0 0; transform: none; }
  .masthead-quote { margin: 24px auto 0; font-size: 17px; line-height: 1.7; max-width: 560px; }
  .masthead-title { font-size: 34px; }
  .cp-wordmark { font-size: 34px; padding: 12px 26px; }
  .login-side { position: static; margin: 26px auto 0; padding: 0; width: 100%; max-width: 560px; justify-content: center; }
  .login-card.glass.side-card { width: 100%; min-height: 0; padding: 30px 26px 34px; }
  .side-card form label:first-of-type { margin-top: 18px; }
  .role-pills { margin: 20px 0 18px; }
}

@media (max-width: 560px) {
  .masthead-row { gap: 8px; }
  .cp-wordmark { font-size: 26px; padding: 10px 20px; }
  .masthead-title { font-size: 24px; -webkit-text-stroke: 2px #fff; }
  .masthead-quote { font-size: 15px; }
  .role-pill { padding: 11px 20px; font-size: 12.5px; letter-spacing: 1.5px; }
  .stat-row, .aims-stats { flex-direction: column; }
  .build-head-actions { margin-left: 0; }
  .report-download-bottom { right: 10px; bottom: 10px; }
}
