:root {
  --ink: #2d3542;
  --muted: #697483;
  --line: #d7dde6;
  --panel: #ffffff;
  --page: #f4f5f8;
  --rail: #2d3645;
  --rail-dark: #252e3c;
  --blue: #2d91f3;
  --blue-dark: #1f72c4;
  --blue-soft: #e8f3ff;
  --purple: #8857e8;
  --orange: #ff7226;
  --red: #ef4548;
  --gold: #ffc259;
  --green: #79c79a;
  --shadow: 0 12px 26px rgba(30, 42, 56, 0.14);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  color: var(--ink);
  background: var(--page);
  font-family: Arial, Helvetica, sans-serif;
}

.app-shell {
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  min-height: 100vh;
}

.brand-rail {
  position: sticky;
  top: 0;
  height: 100vh;
  padding: 24px 8px;
  background: var(--rail);
  color: #ffffff;
  overflow-y: auto;
}

.brand-lockup {
  display: flex;
  justify-content: center;
  margin-bottom: 30px;
}

.brand-logo {
  display: block;
  width: min(200px, 86%);
  height: auto;
  object-fit: contain;
}

.rail-nav {
  display: grid;
  gap: 6px;
}

.rail-link {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 50px;
  padding: 0 14px;
  color: #ffffff;
  border-radius: 6px;
  font-size: 15px;
  font-weight: 700;
  text-decoration: none;
}

.rail-link:hover,
.rail-link.active {
  background: #2468b8;
}

.rail-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  color: #45a9f4;
  flex: 0 0 20px;
}

.rail-icon svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.rail-link.active .rail-icon {
  color: #ffffff;
}

.app-content {
  min-width: 0;
}

button,
input,
textarea,
select {
  font: inherit;
}

button {
  cursor: pointer;
}

.app-header {
  display: flex;
  align-items: center;
  gap: 18px;
  min-height: 70px;
  padding: 10px 26px;
  background: #ffffff;
  border-bottom: 1px solid #bfc4cb;
  box-shadow: 0 1px 3px rgba(32, 40, 52, 0.18);
}

.header-title {
  min-width: 0;
  flex: 1;
}

.sync-status {
  flex: 0 0 auto;
  min-width: 112px;
  border: 1px solid #bfc4cb;
  border-radius: 6px;
  padding: 6px 10px;
  color: #394252;
  background: #f6f8fa;
  font-size: 12px;
  font-weight: 700;
  text-align: center;
  white-space: nowrap;
}

.sync-status[data-sync-status="synced"] {
  border-color: #7db59a;
  color: #17633c;
  background: #eef8f2;
}

.sync-status[data-sync-status="saving"],
.sync-status[data-sync-status="connecting"] {
  border-color: #c8aa62;
  color: #6b4b08;
  background: #fff7df;
}

.sync-status[data-sync-status="offline"],
.sync-status[data-sync-status="error"] {
  border-color: #cc8a8a;
  color: #8a2424;
  background: #fff1f1;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 0;
  font-size: 24px;
  overflow-wrap: anywhere;
}

h2 {
  margin-bottom: 0;
  font-size: 24px;
}

h3 {
  margin-bottom: 14px;
  font-size: 17px;
}

.eyebrow {
  margin-bottom: 5px;
  color: var(--blue);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0;
  text-transform: uppercase;
}

.muted {
  color: var(--muted);
  line-height: 1.45;
}

.table-actions,
.form-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.table-actions {
  justify-content: space-between;
  margin-bottom: 10px;
}

.compact-input {
  max-width: 300px;
}

.panel-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.panel-title-row h3 {
  margin-bottom: 0;
}

.panel-title-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.profile-actions-menu {
  position: relative;
}

.actions-dropdown {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  z-index: 10;
  display: none;
  min-width: 150px;
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 14px 28px rgba(30, 42, 56, 0.18);
}

.actions-dropdown.active {
  display: grid;
}

.actions-dropdown button {
  justify-content: flex-start;
  width: 100%;
  min-height: 34px;
  border: 0;
  border-radius: 6px;
  padding: 0 10px;
  color: var(--ink);
  background: transparent;
  font-weight: 700;
  text-align: left;
}

.actions-dropdown button:hover,
.actions-dropdown button:focus-visible {
  background: var(--blue-soft);
  outline: none;
}

.actions-dropdown .danger-menu-item {
  color: var(--red);
}

.actions-dropdown .danger-menu-item:hover,
.actions-dropdown .danger-menu-item:focus-visible {
  background: #fff1f2;
}

.compact-btn {
  min-height: 30px;
  padding: 0 12px;
}

.profile-close-btn {
  min-height: 30px;
  min-width: 30px;
  padding: 0 8px;
}

.phase-tracker {
  position: sticky;
  top: 76px;
  z-index: 5;
  display: grid;
  grid-template-columns: repeat(6, minmax(128px, 1fr));
  gap: 10px;
  padding: 12px 26px 12px;
  background: #ffffff;
  border-bottom: 1px solid #e4e8ee;
  overflow-x: auto;
}

.phase-progress-strip {
  position: sticky;
  top: 0;
  z-index: 6;
  display: grid;
  grid-template-columns: minmax(190px, auto) minmax(220px, 1fr);
  align-items: center;
  gap: 18px;
  padding: 14px 26px;
  background: #ffffff;
  border-bottom: 1px solid #e4e8ee;
}

.phase-progress-strip strong {
  display: block;
  margin-bottom: 2px;
}

.phase-progress-strip p {
  margin: 0;
}

.phase {
  position: relative;
  min-height: 54px;
  padding: 8px 10px;
  color: #546173;
  background: #ffffff;
  border: 1px solid #c8e9fb;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 700;
  text-align: left;
}

.phase span {
  display: inline-grid;
  place-items: center;
  width: 24px;
  height: 24px;
  margin-right: 6px;
  color: #ffffff;
  background: #9aa6b4;
  border-radius: 999px;
  font-weight: 700;
}

.phase.active {
  color: #ffffff;
  background: var(--blue);
  border-color: var(--blue);
  box-shadow: 0 4px 10px rgba(45, 145, 243, 0.28);
}

.phase.complete {
  color: var(--blue-dark);
  background: var(--blue-soft);
  border-color: #b9dcfb;
}

.phase.complete span {
  background: var(--blue);
  font-size: 0;
}

.phase.complete span::before {
  content: "✓";
  font-size: 15px;
  line-height: 1;
}

.phase.complete::after {
  content: "Complete";
  position: absolute;
  right: 8px;
  bottom: 5px;
  color: var(--blue-dark);
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

.phase.active.complete {
  color: #ffffff;
  background: var(--blue);
}

.phase.active.complete span {
  color: var(--blue);
  background: #ffffff;
}

.phase.active.complete::after {
  color: #ffffff;
}

main {
  display: grid;
  grid-template-columns: 330px minmax(0, 1fr);
  gap: 22px;
  padding: 22px 26px 34px;
}

.sidebar,
.workspace {
  min-width: 0;
}

.sidebar {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.panel {
  min-width: 0;
  container-type: inline-size;
  background: var(--panel);
  border: 1px solid #e2e6ec;
  border-radius: 14px;
  box-shadow: var(--shadow);
  padding: 20px;
}

.context-panel {
  border-color: #a9d5fb;
  background: linear-gradient(180deg, #f7fbff 0%, #ffffff 46%);
  box-shadow: 0 10px 24px rgba(45, 145, 243, 0.16);
}

.context-panel h2 {
  margin: -20px -20px 16px;
  padding: 14px 18px;
  color: #ffffff;
  background: #64748b;
  border-radius: 14px 14px 0 0;
  font-size: 20px;
}

.context-panel {
  background: #edf2f7;
  border-color: #cbd5e1;
  box-shadow: none;
}

.context-panel label {
  color: #46566b;
}

.context-panel input,
.context-panel textarea,
.context-panel select {
  border-color: #bfdcf5;
}

.customer-snapshot {
  display: grid;
  gap: 10px;
}

.snapshot-row {
  display: grid;
  gap: 3px;
  padding: 9px 10px;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  background: #f8fafc;
}

.snapshot-row strong {
  color: #617088;
  font-size: 12px;
  text-transform: uppercase;
}

.snapshot-row span {
  color: var(--ink);
  font-weight: 700;
  overflow-wrap: anywhere;
}

.readonly-field input {
  color: #536174;
  background: #eef7ff;
  font-weight: 700;
}

.view {
  display: none;
  scroll-margin-top: 150px;
}

.view.active {
  display: block;
}

.module-view {
  display: none;
}

.module-view.active {
  display: block;
}

.onboarder-list-view,
.onboarder-detail-view {
  display: none;
}

.onboarder-list-view.active,
.onboarder-detail-view.active {
  display: block;
}

.onboarder-list-view > .view-header {
  padding: 22px 26px 0;
}

.onboarder-list-view > .panel {
  margin: 22px 26px 34px;
}

.detail-toolbar {
  padding: 18px 26px 0;
  background: #ffffff;
}

.onboarding-customer-list {
  display: grid;
  gap: 10px;
}

.onboarding-customer-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 18px;
  width: 100%;
  padding: 14px 16px;
  color: var(--ink);
  background: #ffffff;
  border: 1px solid #dce3ed;
  border-radius: 8px;
  text-align: left;
}

.onboarding-customer-item:hover,
.onboarding-customer-item:focus-visible {
  border-color: var(--blue);
  background: var(--blue-soft);
  outline: none;
}

.onboarding-customer-item strong,
.onboarding-customer-item small {
  display: block;
}

.onboarding-customer-item small {
  margin-top: 4px;
  color: var(--muted);
}

.queue-status {
  color: var(--blue-dark);
  font-weight: 700;
}

.meetings-home {
  display: grid;
  gap: 14px;
  padding: 14px 26px 0;
}

.meetings-overview {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(300px, 420px);
  align-items: stretch;
  gap: 16px;
}

.meetings-overview > div,
.today-meetings-panel {
  padding: 20px;
  border: 1px solid #e0e6ee;
  border-radius: 8px;
  background: #ffffff;
  box-shadow: var(--shadow);
}

.meetings-overview h2 {
  margin: 4px 0 8px;
  color: #1f2a3d;
  font-size: 32px;
}

.meetings-overview p {
  margin: 0;
}

.today-meetings-panel {
  display: grid;
  grid-template-columns: minmax(170px, 220px) minmax(0, 1fr);
  align-items: center;
  gap: 14px;
}

.today-meetings-panel > div:first-child {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.today-meetings-panel span {
  color: #1f2a3d;
  font-weight: 800;
}

.today-meetings-panel strong {
  display: grid;
  place-items: center;
  min-width: 42px;
  height: 42px;
  border-radius: 999px;
  background: var(--orange);
  color: #ffffff;
  font-size: 22px;
}

.today-meetings-list {
  display: grid;
  gap: 8px;
  margin-top: 0;
}

.today-meetings-list p {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 10px;
  border-radius: 8px;
  background: #fff7ed;
  color: #475569;
  font-size: 14px;
}

.today-meetings-list strong {
  flex: 0 0 auto;
  color: #c45311;
}

.home-calendar-card {
  min-height: 210px;
  overflow: hidden;
  border-radius: 8px;
  background: #ffffff;
  box-shadow: var(--shadow);
  border: 1px solid #e0e6ee;
}

.calendar-split-header {
  display: grid;
  place-items: center;
  padding: 12px 16px;
  border-bottom: 1px solid #e6ebf2;
}

.calendar-split-header h3 {
  margin: 0 0 2px;
}

.calendar-split-header p {
  margin: 0;
}

.calendar-shared-nav {
  display: grid;
  grid-template-columns: 36px minmax(150px, 1fr) 36px;
  align-items: center;
  min-height: 42px;
  width: min(360px, 100%);
  border-radius: 8px;
  padding: 0 6px;
  background: #6058ea;
  color: #ffffff;
  text-align: center;
}

.calendar-shared-nav strong {
  font-size: 16px;
}

.calendar-nav {
  width: 30px;
  height: 30px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: #ffffff;
  font-size: 20px;
  line-height: 1;
}

.calendar-nav:hover,
.calendar-nav:focus-visible {
  background: rgba(255, 255, 255, 0.18);
  outline: none;
}

.calendar-pair {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  padding: 14px;
}

.mini-calendar-card {
  overflow: hidden;
  border: 1px solid #e0e6ee;
  border-radius: 8px;
  background: #ffffff;
}

.external-calendar {
  border-color: #9bd6aa;
  background: #f5fbf7;
}

.internal-calendar {
  border-color: #9cc9f4;
  background: #f3f8ff;
}

.mini-calendar-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 13px 14px 10px;
  background: #f8fafc;
  border-bottom: 1px solid #e8edf4;
}

.external-calendar .mini-calendar-title {
  background: #2f8f46;
  border-bottom-color: #24753a;
}

.internal-calendar .mini-calendar-title {
  background: #2d8ce7;
  border-bottom-color: #1d70bd;
}

.mini-calendar-title strong {
  color: #ffffff;
  font-size: 15px;
}

.mini-calendar-title span {
  padding: 4px 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.2);
  color: #ffffff;
  font-size: 12px;
  font-weight: 800;
}

.mini-calendar-weekdays,
.mini-calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
}

.mini-calendar-weekdays {
  padding: 9px 12px 3px;
  color: #64748b;
  font-size: 10px;
  font-weight: 800;
  text-align: center;
}

.external-calendar .mini-calendar-weekdays {
  color: #24753a;
}

.internal-calendar .mini-calendar-weekdays {
  color: #1d70bd;
}

.mini-calendar-grid {
  gap: 2px 3px;
  padding: 0 12px 8px;
}

.mini-calendar-day {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 22px;
  color: #1f2937;
  font-size: 13px;
  border-radius: 999px;
}

.mini-calendar-day.muted {
  color: #b7c0cc;
}

.mini-calendar-day.has-meeting {
  color: #ffffff;
  background: #2f8f46;
  font-weight: 800;
}

.internal-calendar .mini-calendar-day.has-meeting {
  background: #2d8ce7;
}

.mini-calendar-day.today {
  outline: 2px solid #7ed2ff;
  outline-offset: 1px;
}

.mini-calendar-day small {
  position: absolute;
  right: -2px;
  bottom: -3px;
  min-width: 14px;
  height: 14px;
  padding: 0 3px;
  border-radius: 999px;
  background: #6058ea;
  color: #ffffff;
  font-size: 9px;
  line-height: 14px;
}

.calendar-events {
  border-top: 1px solid #e7ebf1;
  background: #fbfcfe;
}

.calendar-events-title {
  padding: 6px 12px 4px;
  color: #6058ea;
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}

.external-calendar .calendar-events-title {
  color: #24753a;
}

.internal-calendar .calendar-events-title {
  color: #1d70bd;
}

.calendar-events-list {
  display: grid;
  gap: 3px;
  padding: 0 12px 8px;
}

.calendar-events-list p {
  display: grid;
  grid-template-columns: 26px minmax(0, 1fr);
  gap: 8px;
  margin: 0;
  color: #475569;
  font-size: 12px;
  line-height: 1.3;
}

.calendar-events-list strong {
  color: #6058ea;
}

.empty-calendar-event {
  grid-template-columns: 1fr !important;
}

.profiles-layout {
  padding: 22px 26px 34px;
}

.meeting-schedule-panel {
  margin: 22px 26px 34px;
}

.meeting-table-wrap {
  overflow-x: auto;
}

.meeting-table {
  display: grid;
  min-width: 1500px;
  gap: 0;
  border: 1px solid #dce3ed;
  border-radius: 10px;
  overflow: hidden;
}

.meeting-row {
  display: grid;
  grid-template-columns: 150px 210px 140px 140px 120px 170px minmax(260px, 1fr) 120px 130px 42px;
  align-items: center;
  background: #ffffff;
}

.meeting-row:not(.meeting-header) {
  border-left: 5px solid transparent;
}

.meeting-row:nth-child(odd):not(.meeting-header) {
  background: #f8fafc;
}

.meeting-row.meeting-external:not(.meeting-header) {
  border-left-color: #2f8f46;
  background: #f5fbf7;
}

.meeting-row.meeting-internal:not(.meeting-header) {
  border-left-color: #2d8ce7;
  background: #f3f8ff;
}

.meeting-row.meeting-external:nth-child(odd):not(.meeting-header) {
  background: #edf8f1;
}

.meeting-row.meeting-internal:nth-child(odd):not(.meeting-header) {
  background: #eaf4ff;
}

.meeting-row.completed {
  color: #7a8493;
  background: #f1f4f7;
}

.meeting-row > span,
.meeting-row > input,
.meeting-row > select,
.meeting-row > button {
  min-height: 42px;
  border: 0;
  border-right: 1px solid #e4e9f0;
  border-top: 1px solid #e4e9f0;
  border-radius: 0;
}

.meeting-row > input,
.meeting-row > select {
  padding: 8px 10px;
  background: transparent;
}

.meeting-row .meeting-audience {
  justify-self: center;
  width: calc(100% - 24px);
  max-width: 104px;
  min-height: 28px;
  margin: 0;
  padding: 4px 22px 4px 12px;
  border: 1px solid #d2dce8;
  border-radius: 999px;
  font-weight: 800;
  text-align: center;
}

.meeting-row.meeting-external .meeting-audience {
  background: #dcfce7;
  color: #166534;
  border-color: #86efac;
}

.meeting-row.meeting-internal .meeting-audience {
  background: #dbeafe;
  color: #1d4ed8;
  border-color: #93c5fd;
}

.meeting-row > button {
  border-right: 0;
}

.meeting-header {
  color: #ffffff;
  background: var(--blue);
  font-weight: 700;
}

.meeting-header span {
  display: flex;
  align-items: center;
  padding: 8px 10px;
  border-top: 0;
  border-color: rgba(255, 255, 255, 0.22);
}

.profiles-layout {
  grid-template-columns: minmax(320px, 0.8fr) minmax(0, 1.2fr);
}

#profilesModule > .view-header {
  padding: 22px 26px 0;
}

.profile-form-panel {
  display: none;
  margin: 0 26px 34px;
}

.profile-form-panel.active {
  display: block;
}

.profile-form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.profile-edit-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.profile-form-grid h4 {
  grid-column: 1 / -1;
  margin: 10px 0 0;
  padding: 10px 12px;
  color: #ffffff;
  background: var(--blue);
  border-radius: 8px;
  font-size: 15px;
}

.form-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  grid-column: 1 / -1;
  justify-content: flex-end;
  margin-top: 14px;
}

.view-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}

.grid {
  display: grid;
  gap: 18px;
}

.grid.two {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.launch-plan-panel {
  margin-top: 18px;
}

.launch-plan-form label {
  align-content: start;
}

.launch-plan-form textarea {
  min-height: 118px;
}

.grid.two.launch-plan-grid {
  align-items: start;
  grid-template-columns: 1fr;
}

#launchPlan .task-row {
  grid-template-columns: 32px minmax(180px, 2fr) minmax(120px, 1fr) 140px 150px 42px;
}

#launchPlan .task-row .task-owner,
#launchPlan .task-row .task-due,
#launchPlan .task-row .task-source,
#launchPlan .task-row .remove-task {
  grid-column: auto;
}

.stack,
.form-panel {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

input,
textarea,
select {
  width: 100%;
  color: var(--ink);
  background: #ffffff;
  border: 1px solid #d2d7df;
  border-radius: 7px;
  padding: 10px 11px;
  font-size: 14px;
}

textarea {
  resize: vertical;
  line-height: 1.45;
}

.primary-btn,
.secondary-btn,
.complete-btn,
.danger-btn,
.icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  border-radius: 7px;
  border: 1px solid transparent;
  padding: 0 14px;
  text-decoration: none;
  font-weight: 700;
}

.helper-text {
  min-height: 18px;
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 12px;
}

.primary-btn,
.complete-btn {
  color: #ffffff;
  background: var(--blue);
  box-shadow: 0 4px 8px rgba(45, 145, 243, 0.24);
}

.primary-btn:hover,
.complete-btn:hover {
  background: var(--blue-dark);
}

.secondary-btn {
  color: #111827;
  background: #ffffff;
  border-color: #41b9ef;
}

.danger-btn {
  color: #ffffff;
  background: var(--red);
  box-shadow: 0 4px 8px rgba(239, 69, 72, 0.22);
}

.danger-btn:hover {
  background: #d9383b;
}

.icon-btn {
  min-width: 38px;
  padding: 0 11px;
  color: var(--ink);
  background: #f0f3f1;
  border-color: var(--line);
}

.icon-btn.danger {
  color: var(--red);
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 20;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(15, 23, 42, 0.48);
}

.modal-backdrop.active {
  display: flex;
}

.modal-card {
  width: min(520px, 100%);
  padding: 26px;
  border-radius: 10px;
  background: #ffffff;
  box-shadow: 0 24px 60px rgba(15, 23, 42, 0.28);
}

.modal-card h3 {
  margin-top: 0;
  margin-bottom: 10px;
}

.modal-card p {
  margin-top: 0;
  color: var(--muted);
  line-height: 1.5;
}

.danger-modal {
  border-top: 5px solid var(--red);
}

.modal-warning {
  padding: 12px 14px;
  border: 1px solid #fecaca;
  border-radius: 8px;
  color: #991b1b;
  background: #fff1f2;
  font-weight: 700;
  line-height: 1.4;
}

.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 22px;
}

.meter {
  height: 10px;
  overflow: hidden;
  background: #e6ebe8;
  border-radius: 999px;
}

#progressFill {
  width: 0;
  height: 100%;
  background: var(--blue);
  transition: width 180ms ease;
}

.summary-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.summary-item,
.signal,
.file-item,
.question-card,
.check-item {
  border: 1px solid #e2e6ec;
  border-radius: 8px;
  background: #ffffff;
}

.summary-item {
  padding: 12px;
}

.summary-item strong {
  display: block;
  margin-bottom: 5px;
  color: var(--muted);
  font-size: 12px;
  text-transform: uppercase;
}

.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.signal {
  padding: 8px 10px;
  color: var(--blue-dark);
  background: var(--blue-soft);
  font-size: 13px;
  font-weight: 700;
}

.discovery-agenda-panel {
  margin-bottom: 18px;
}

.decision-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.decision-item {
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr);
  align-items: center;
  gap: 8px;
  padding: 9px 10px;
  border: 1px solid #e2e6ec;
  border-radius: 8px;
  background: #ffffff;
  color: var(--ink);
  font-size: 13px;
}

.decision-item input {
  width: 16px;
  height: 16px;
  padding: 0;
}

.email-preview {
  display: grid;
  gap: 6px;
  margin-top: 16px;
  padding: 14px;
  border: 1px solid #d8e9fb;
  border-radius: 8px;
  background: var(--blue-soft);
}

.email-preview strong {
  color: #536174;
  font-size: 12px;
  text-transform: uppercase;
}

.email-preview span {
  color: var(--blue-dark);
  overflow-wrap: anywhere;
  font-weight: 700;
}

.question-list {
  display: grid;
  gap: 10px;
}

.discovery-workspace-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(320px, 0.55fr);
  gap: 18px;
  align-items: start;
}

.discovery-brief-panel {
  min-width: 0;
}

.discovery-section-card {
  overflow: hidden;
  border: 1px solid #dce6f2;
  border-radius: 8px;
  background: #ffffff;
}

.discovery-section-card + .discovery-section-card {
  margin-top: 10px;
}

.discovery-section-card summary {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  padding: 13px 14px;
  cursor: pointer;
  color: #1f2a3d;
  background: #f8fafc;
  border-bottom: 1px solid transparent;
  font-weight: 800;
}

.discovery-section-card[open] summary {
  border-bottom-color: #e3eaf2;
}

.discovery-section-card summary small {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.discovery-question-grid {
  display: grid;
  gap: 10px;
  padding: 12px;
}

.discovery-question-row {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr);
  gap: 12px;
  padding: 12px;
  border: 1px solid #e2e6ec;
  border-radius: 8px;
  background: #ffffff;
}

.discovery-status {
  display: grid;
  place-items: start center;
}

.discovery-status span {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 8px;
  color: #ffffff;
  font-size: 18px;
  font-weight: 900;
}

.discovery-question-row.confirmed .discovery-status span {
  background: #2f8f46;
}

.discovery-question-row.discuss .discovery-status span {
  background: #d89b12;
}

.discovery-question-row.partial .discovery-status span {
  background: #7c8a9b;
}

.discovery-question-row.missing .discovery-status span {
  background: #2d8ce7;
}

.discovery-question-body {
  display: grid;
  gap: 10px;
  min-width: 0;
}

.discovery-question-body h4 {
  margin: 0;
  color: #1f2a3d;
  font-size: 15px;
  line-height: 1.35;
}

.precall-note {
  padding: 10px 12px;
  border-radius: 8px;
  background: #f8fafc;
  border: 1px solid #e4e9f0;
}

.precall-note strong,
.call-note-field {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.precall-note p {
  margin: 5px 0 0;
  color: #334155;
  font-size: 13px;
  line-height: 1.45;
  text-transform: none;
  font-weight: 500;
}

.call-note-field {
  display: grid;
  gap: 6px;
}

.call-note-field textarea {
  min-height: 86px;
  resize: vertical;
  color: var(--ink);
  font-size: 14px;
  font-weight: 500;
  text-transform: none;
}

.discovery-plan-summary {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px;
  border: 1px solid #cfe7fb;
  border-radius: 8px;
  color: var(--blue-dark);
  background: var(--blue-soft);
  font-size: 13px;
}

.question-section {
  display: grid;
  gap: 8px;
}

.question-section h4 {
  margin: 8px 0 0;
}

.question-list-inner {
  display: grid;
  gap: 8px;
}

.question-card {
  padding: 12px;
}

.question-card span {
  display: block;
  margin-bottom: 5px;
  color: var(--blue);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
}

.task-table {
  display: grid;
  gap: 8px;
}

.task-row {
  display: grid;
  grid-template-columns: 32px minmax(180px, 2fr) minmax(120px, 1fr) 140px 150px 42px;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.task-row input[type="checkbox"] {
  width: 20px;
  height: 20px;
}

.task-row.done .task-title {
  color: var(--muted);
  text-decoration: line-through;
}

@container (max-width: 560px) {
  .task-row {
    grid-template-columns: 32px minmax(0, 1fr);
  }

  .task-row .task-owner,
  .task-row .task-due,
  .task-row .task-source,
  .task-row .remove-task {
    grid-column: 2;
  }

  .task-row .remove-task {
    justify-self: start;
  }
}

.file-list,
.mini-checklist {
  display: grid;
  gap: 8px;
}

.launch-date-card {
  display: grid;
  grid-column: 1 / -1;
  align-content: center;
  min-height: 160px;
  color: #ffffff;
  background: var(--blue);
  border-color: #1f7fd7;
  box-shadow: var(--shadow);
}

.launch-date-card span {
  font-size: 13px;
  font-weight: 800;
  text-transform: uppercase;
  opacity: 0.9;
}

.launch-date-card strong {
  margin-top: 10px;
  font-size: 38px;
  line-height: 1.05;
}

.launch-date-card p {
  margin: 12px 0 0;
  color: rgba(255, 255, 255, 0.86);
  font-weight: 700;
}

.convert-profile-btn {
  max-width: 220px;
  white-space: normal;
  line-height: 1.2;
  padding: 10px 16px;
  font-size: 14px;
}

.customer-record-edit-section {
  margin-bottom: 14px;
}

.customer-record-edit-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  padding: 14px;
}

.customer-record-edit-grid label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.customer-record-edit-grid input,
.customer-record-edit-grid textarea {
  color: var(--ink);
  font-size: 14px;
  font-weight: 500;
  text-transform: none;
}

.customer-record-edit-grid textarea {
  min-height: 96px;
  resize: vertical;
}

.file-item,
.check-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
}

button.check-item {
  width: 100%;
  color: inherit;
  font: inherit;
  text-align: left;
}

.check-item.done {
  color: var(--blue-dark);
  background: var(--blue-soft);
}

pre {
  max-height: 520px;
  overflow: auto;
  margin: 0;
  padding: 16px;
  background: #101815;
  border-radius: 8px;
  color: #d8eee3;
  white-space: pre-wrap;
}

.profile-record {
  display: grid;
  gap: 18px;
}

.profiles-list {
  display: grid;
  gap: 10px;
}

.profile-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 16px;
}

.profile-tab {
  min-height: 36px;
  padding: 0 12px;
  color: var(--blue-dark);
  background: #ffffff;
  border: 1px solid #b9dcfb;
  border-radius: 7px;
  font-weight: 700;
}

.profile-tab.active {
  color: #ffffff;
  background: var(--blue);
  border-color: var(--blue);
}

.profile-list-item {
  display: grid;
  gap: 5px;
  width: 100%;
  padding: 13px 14px;
  color: var(--ink);
  background: #ffffff;
  border: 1px solid #dce3ed;
  border-radius: 8px;
  text-align: left;
}

.profile-list-item:hover,
.profile-list-item.active {
  border-color: var(--blue);
  background: var(--blue-soft);
}

.profile-list-item span {
  color: var(--muted);
  font-size: 13px;
}

.profile-section {
  border: 1px solid #e2e6ec;
  border-radius: 10px;
  overflow: hidden;
}

.profile-section h4 {
  margin: 0;
  padding: 12px 14px;
  color: #ffffff;
  background: var(--blue);
  font-size: 15px;
}

.profile-row {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  gap: 14px;
  padding: 12px 14px;
  border-top: 1px solid #e8ebf0;
}

.profile-row strong {
  color: #536174;
  font-size: 13px;
}

.profile-row span {
  line-height: 1.45;
}

.profile-row em {
  color: #87909d;
  font-style: normal;
}

.profile-table {
  display: grid;
  border: 1px solid #e2e6ec;
  border-radius: 10px;
  overflow: hidden;
}

.profile-table-row {
  display: grid;
  grid-template-columns: 120px 150px 140px 170px minmax(0, 1fr);
}

.renewal-table .profile-table-row {
  grid-template-columns: 150px 150px 140px minmax(0, 1fr);
}

.contact-history-table .profile-table-row {
  grid-template-columns: 120px 130px 160px minmax(0, 1fr);
}

.contact-history-form {
  display: grid;
  gap: 14px;
  margin-bottom: 18px;
  padding: 16px;
  border: 1px solid #d8e9fb;
  border-radius: 10px;
  background: var(--blue-soft);
}

.profile-table-row.header {
  color: #ffffff;
  background: var(--blue);
  font-weight: 700;
}

.profile-table-row span {
  min-width: 0;
  padding: 11px 12px;
  border-right: 1px solid #e8ebf0;
  border-top: 1px solid #e8ebf0;
  overflow-wrap: anywhere;
}

.profile-table-row.header span {
  border-top: 0;
}

.profile-table-row span:last-child {
  border-right: 0;
}

@media (max-width: 1050px) {
  .app-shell {
    grid-template-columns: 1fr;
  }

  .brand-rail {
    position: static;
    height: auto;
    padding: 14px;
  }

  .brand-lockup {
    justify-content: flex-start;
    margin-bottom: 12px;
  }

  .brand-logo {
    width: 180px;
  }

  .rail-nav {
    grid-template-columns: repeat(3, minmax(150px, 1fr));
    overflow-x: auto;
  }

  main,
  .grid.two,
  .meetings-overview,
  .calendar-pair,
  .discovery-workspace-grid,
  .profiles-layout {
    grid-template-columns: 1fr;
  }

  .calendar-split-header {
    place-items: stretch;
  }

  .today-meetings-panel {
    grid-template-columns: 1fr;
  }

  .sidebar {
    order: 2;
  }

  .task-row {
    grid-template-columns: 32px 1fr;
  }

  .task-row .task-owner,
  .task-row .task-due,
  .task-row .task-source,
  .task-row .remove-task {
    grid-column: 2;
  }

  .profile-row {
    grid-template-columns: 1fr;
    gap: 5px;
  }

  .decision-list {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .app-header,
  .view-header,
  .form-row {
    align-items: stretch;
    flex-direction: column;
  }

  .app-header,
  main,
  .meetings-home,
  .profiles-layout,
  .meeting-schedule-panel,
  .onboarder-list-view > .view-header,
  .detail-toolbar,
  .phase-progress-strip,
  .phase-tracker {
    padding-left: 14px;
    padding-right: 14px;
  }

  .phase-progress-strip {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .onboarder-list-view > .panel {
    margin-left: 14px;
    margin-right: 14px;
  }

  .profile-form-panel {
    margin-left: 14px;
    margin-right: 14px;
  }

  .meeting-schedule-panel {
    margin-left: 14px;
    margin-right: 14px;
  }

  .onboarding-customer-item {
    grid-template-columns: 1fr;
  }

  .app-header {
    align-items: flex-start;
  }

  h1 {
    font-size: 22px;
  }

  .summary-grid {
    grid-template-columns: 1fr;
  }

  .discovery-section-card summary,
  .discovery-question-row {
    grid-template-columns: 1fr;
  }

  .discovery-status {
    place-items: start;
  }

  .profile-form-grid {
    grid-template-columns: 1fr;
  }

  .customer-record-edit-grid {
    grid-template-columns: 1fr;
  }

  .profile-edit-form {
    grid-template-columns: 1fr;
  }

  .profile-table-row,
  .renewal-table .profile-table-row,
  .contact-history-table .profile-table-row {
    grid-template-columns: 1fr;
  }

  .profile-table-row span {
    border-right: 0;
  }

  .phase-tracker {
    max-width: 100vw;
  }
}
