/* Dashboard Layout (shared by mentor + mentee) */

.dashboard-layout {
  display: flex;
  min-height: 100vh;
}

/* Sidebar */
.dashboard-sidebar {
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  width: 260px;
  background: #f7f7f8;
  border-right: 1px solid var(--color-border);
  display: flex;
  flex-direction: column;
  z-index: 100;
}

.sidebar-header {
  padding: var(--spacing-lg) var(--spacing-xl);
  border-bottom: 1px solid var(--color-border);
}

.sidebar-header .logo {
  display: flex;
  align-items: center;
  gap: var(--spacing-sm);
  text-decoration: none;
  color: var(--color-text);
  font-weight: 700;
  font-size: var(--font-size-lg);
}

.sidebar-nav {
  flex: 1;
  padding: var(--spacing-md) 0;
  overflow-y: auto;
}

.sidebar-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--spacing-sm) var(--spacing-xl);
  color: var(--color-text-secondary);
  text-decoration: none;
  font-size: var(--font-size-sm);
  font-weight: 500;
  transition: background 0.15s, color 0.15s;
  border-left: 3px solid transparent;
}

.sidebar-link:hover {
  color: var(--color-text);
  background: rgba(0, 0, 0, 0.04);
}

.sidebar-link--active {
  color: var(--color-primary);
  background: rgba(0, 0, 0, 0.06);
  border-left-color: var(--color-primary);
}

.sidebar-link-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 1.5px solid currentColor;
  font-size: 11px;
  font-weight: 700;
  line-height: 1;
  margin-right: var(--spacing-sm);
  flex-shrink: 0;
}

.sidebar-link-label {
  flex: 1;
}

.sidebar-nav-divider {
  height: 1px;
  background: var(--color-border);
  margin: var(--spacing-sm) var(--spacing-xl);
}

.sidebar-badge {
  background: var(--color-primary);
  color: #fff;
  font-size: var(--font-size-xs);
  font-weight: 600;
  padding: 2px 7px;
  border-radius: 10px;
  min-width: 20px;
  text-align: center;
}

/* Warnings section */
.sidebar-warnings {
  padding: var(--spacing-md) var(--spacing-xl);
  border-top: 1px solid var(--color-border);
  display: flex;
  flex-direction: column;
  gap: var(--spacing-xs);
}

.sidebar-warnings-heading {
  font-size: var(--font-size-xs);
  font-weight: 600;
  color: #ca8a04;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin: 0 0 var(--spacing-xs) 0;
}

.sidebar-warning {
  display: flex;
  align-items: center;
  gap: var(--spacing-xs);
}

.sidebar-warning-icon {
  color: #ca8a04;
  font-size: var(--font-size-sm);
  flex-shrink: 0;
}

.sidebar-warning-link {
  font-size: var(--font-size-xs);
  color: #ca8a04;
  text-decoration: underline;
  flex: 1;
}

.sidebar-warning-link:hover {
  color: #a16207;
}

/* Share section */
.sidebar-share {
  padding: var(--spacing-md) var(--spacing-xl);
  border-top: 1px solid var(--color-border);
}

.sidebar-share-label {
  display: block;
  font-size: var(--font-size-xs);
  color: var(--color-text-secondary);
  margin-bottom: var(--spacing-sm);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.sidebar-share-input-group {
  display: flex;
  gap: 0;
}

.sidebar-share-input {
  flex: 1;
  min-width: 0;
  padding: 6px 10px;
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-right: none;
  border-radius: var(--radius-sm) 0 0 var(--radius-sm);
  color: var(--color-text-secondary);
  font-size: var(--font-size-xs);
  font-family: inherit;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sidebar-share-btn {
  padding: 6px 12px;
  background: var(--color-primary);
  color: #fff;
  border: 1px solid var(--color-primary);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  font-size: var(--font-size-xs);
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.15s;
}

.sidebar-share-btn:hover {
  background: var(--color-primary-hover);
}

/* Sidebar footer */
.sidebar-footer {
  padding: var(--spacing-md) var(--spacing-xl);
  border-top: 1px solid var(--color-border);
}

.sidebar-sign-out {
  padding: var(--spacing-xs) var(--spacing-sm);
  background: transparent;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  color: var(--color-text-secondary);
  font-size: var(--font-size-xs);
  font-family: inherit;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}

.sidebar-sign-out:hover {
  background: rgba(255, 68, 68, 0.1);
  color: var(--color-error);
  border-color: var(--color-error);
}

/* Main content area */
.dashboard-main {
  flex: 1;
  margin-left: 260px;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.dashboard-content {
  padding: var(--spacing-xl) var(--spacing-2xl);
  flex: 1;
}

/* Mobile header (hidden on desktop) */
.dashboard-mobile-header {
  display: none;
}

.dashboard-sidebar-overlay {
  display: none;
}

/* Dashboard page */
.dashboard__title {
  font-size: var(--font-size-2xl);
  font-weight: 700;
  margin-bottom: var(--spacing-xl);
}

.dashboard__stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: var(--spacing-lg);
  margin-bottom: var(--spacing-2xl);
}

.stat-card {
  background: var(--color-card);
  border: 1px solid var(--color-border);
  border-radius: 12px;
  padding: var(--spacing-xl);
  display: flex;
  flex-direction: column;
  gap: var(--spacing-sm);
}

.stat-card__label {
  font-size: var(--font-size-sm);
  color: var(--color-text-secondary);
  font-weight: 500;
}

.stat-card__value {
  font-size: var(--font-size-2xl);
  font-weight: 700;
  color: var(--color-text);
}

.dashboard__chart-card {
  background: var(--color-card);
  border: 1px solid var(--color-border);
  border-radius: 12px;
  padding: var(--spacing-xl);
}

.dashboard__chart-title {
  font-size: var(--font-size-lg);
  font-weight: 600;
  margin-bottom: var(--spacing-lg);
}

.dashboard__chart-container {
  position: relative;
  height: 300px;
}

.dashboard__chart-container canvas {
  width: 100% !important;
  height: 100% !important;
}

/* ENG-730: the line under the stats pointing at the rate card. Quiet on purpose — it is
   a reference for someone already looking at their earnings, not a call to action. */
.dashboard__rate-card {
  margin: 0 0 var(--spacing-2xl);
  color: var(--color-text-secondary);
  font-size: var(--font-size-sm);
  line-height: 1.5;
}

/* The stats grid carries a 2xl bottom margin of its own, which would leave this line
   floating a long way below the figures it refers to. Tightened only when it is actually
   followed by the link, so every other dashboard keeps its original spacing. */
.dashboard__stats:has(+ .dashboard__rate-card) {
  margin-bottom: var(--spacing-lg);
}

.dashboard__rate-card-link {
  color: var(--color-primary);
  font-weight: 600;
  text-decoration: none;
}

.dashboard__rate-card-link:hover {
  text-decoration: underline;
}

.dashboard__stripe-action {
  margin-bottom: var(--spacing-lg);
}

.dashboard__stripe-setup {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--spacing-lg);
  padding: var(--spacing-lg);
  margin-bottom: var(--spacing-lg);
  background: rgba(202, 138, 4, 0.08);
  border: 1px solid rgba(202, 138, 4, 0.3);
  border-radius: var(--radius-md);
}

.dashboard__stripe-setup-status {
  font-weight: 600;
  margin: 0 0 var(--spacing-xs) 0;
}

.dashboard__stripe-setup-note {
  color: var(--color-text-secondary);
  font-size: var(--font-size-sm);
  margin: 0;
}

/* ========================================
   Bookings Calendar
   ======================================== */

.cal-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

.cal-nav__title {
  margin: 0;
  font-size: 1rem;
  font-weight: 600;
}

.cal-nav__arrow {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  color: var(--color-text-secondary);
  text-decoration: none;
  font-size: 1.1rem;
  transition: background 0.15s, color 0.15s;
}

.cal-nav__arrow:hover {
  background: rgba(0, 0, 0, 0.06);
  color: var(--color-text);
}

/* Weekly calendar grid */

.week-cal {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  overflow: hidden;
}

.week-cal__day {
  border-right: 1px solid var(--color-border);
  min-height: 120px;
}

.week-cal__day:last-child {
  border-right: none;
}

.week-cal__day-header {
  padding: 8px 4px;
  text-align: center;
  border-bottom: 1px solid var(--color-border);
  background: rgba(0, 0, 0, 0.02);
}

.week-cal__day--today .week-cal__day-header {
  background: rgba(59, 91, 254, 0.06);
}

.week-cal__day-name {
  font-size: 0.6rem;
  text-transform: uppercase;
  color: var(--color-text-secondary);
  font-weight: 600;
  letter-spacing: 0.06em;
}

.week-cal__day-num {
  font-size: 1rem;
  font-weight: 600;
  color: var(--color-text);
  width: 30px;
  height: 30px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 3px auto 0;
}

.week-cal__day--today .week-cal__day-num {
  background: var(--color-primary);
  color: #fff;
}

.week-cal__bookings {
  padding: 6px 4px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.week-cal__booking {
  display: block;
  padding: 4px 5px;
  border-radius: 4px;
  font-size: 0.68rem;
  text-decoration: none;
  border-left: 2px solid var(--color-primary);
  background: rgba(59, 91, 254, 0.08);
  color: var(--color-primary);
  line-height: 1.35;
  overflow: hidden;
  transition: opacity 0.15s;
}

.week-cal__booking:hover {
  opacity: 0.8;
}

.week-cal__booking--completed {
  background: rgba(34, 197, 94, 0.1);
  color: #22c55e;
  border-left-color: #22c55e;
}

.week-cal__booking--needs_completion {
  background: rgba(245, 158, 11, 0.1);
  color: #f59e0b;
  border-left-color: #f59e0b;
}

.week-cal__booking--canceled,
.week-cal__booking--rejected {
  background: rgba(100, 100, 100, 0.07);
  color: var(--color-text-secondary);
  border-left-color: var(--color-text-secondary);
}

.week-cal__booking-time {
  display: block;
  font-weight: 700;
}

.week-cal__booking-name {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Mobile responsive */
@media (max-width: 768px) {
  .dashboard-sidebar {
    transform: translateX(-100%);
    transition: transform 0.3s ease;
  }

  .dashboard-sidebar.open {
    transform: translateX(0);
  }

  .dashboard-main {
    margin-left: 0;
  }

  .dashboard-mobile-header {
    display: flex;
    align-items: center;
    gap: var(--spacing-md);
    padding: var(--spacing-md) var(--spacing-lg);
    border-bottom: 1px solid var(--color-border);
    background: #f7f7f8;
  }

  .dashboard-mobile-header .logo {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    text-decoration: none;
    color: var(--color-text);
    font-weight: 700;
    font-size: var(--font-size-lg);
  }

  .dashboard-sidebar-toggle {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
  }

  .dashboard-sidebar-toggle .hamburger-line {
    display: block;
    width: 22px;
    height: 2px;
    background: var(--color-text);
    border-radius: 1px;
  }

  .dashboard-sidebar-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.3);
    z-index: 99;
  }

  .dashboard-sidebar-overlay.open {
    display: block;
  }

  .dashboard-content {
    padding: var(--spacing-lg);
  }

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

  .dashboard__chart-container {
    height: 220px;
  }

  /* Hide sidebar logo & header on desktop in sidebar */
  .sidebar-header .logo {
    font-size: var(--font-size-base);
  }

  .career-timeline__stats {
    grid-template-columns: 1fr 1fr;
  }
}

/* ========================================
   Career Timeline
   ======================================== */

.career-timeline {
  max-width: 720px;
}

.career-timeline__heading {
  margin-bottom: var(--spacing-xl);
}

.career-timeline__title {
  font-size: var(--font-size-2xl);
  font-weight: 700;
  margin-bottom: var(--spacing-xs);
}

.career-timeline__subtitle {
  font-size: var(--font-size-sm);
  color: var(--color-text-secondary);
  margin: 0;
  line-height: 1.5;
}

.career-timeline__stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: var(--spacing-lg);
  margin-bottom: var(--spacing-2xl);
}

.career-timeline__section-title {
  font-size: var(--font-size-lg);
  font-weight: 600;
  margin-bottom: var(--spacing-lg);
}

.career-timeline__next-steps {
  background: var(--color-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: var(--spacing-xl);
  margin-bottom: var(--spacing-2xl);
}

.career-timeline__next-steps-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: var(--spacing-sm);
}

.career-timeline__next-steps-list li {
  display: flex;
  align-items: flex-start;
  gap: var(--spacing-sm);
  font-size: var(--font-size-sm);
  color: var(--color-text);
}

.career-timeline__next-steps-list li::before {
  content: '→';
  color: var(--color-primary);
  font-weight: 600;
  flex-shrink: 0;
  margin-top: 1px;
}

/* ENG-699: this summary reads from the step records now, so it can say which are
   already done rather than listing everything as outstanding. */
.career-timeline__next-step--completed {
  color: var(--color-text-muted, #888);
  text-decoration: line-through;
}

.career-timeline__next-steps-list li.career-timeline__next-step--completed::before {
  content: '✓';
  color: var(--color-text-muted, #888);
}

.career-timeline__events {
  margin-bottom: var(--spacing-2xl);
}

.timeline {
  position: relative;
  padding-left: 24px;
}

.timeline::before {
  content: '';
  position: absolute;
  left: 7px;
  top: 0;
  bottom: 0;
  width: 2px;
  background: var(--color-border);
}

.timeline-event {
  position: relative;
  display: flex;
  gap: var(--spacing-lg);
  padding-bottom: var(--spacing-xl);
}

.timeline-event:last-child {
  padding-bottom: 0;
}

.timeline-event__dot {
  position: absolute;
  left: -20px;
  top: 4px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--color-border);
  border: 2px solid var(--color-bg);
  flex-shrink: 0;
}

.timeline-event--joined .timeline-event__dot {
  background: var(--color-primary);
}

.timeline-event--session_completed .timeline-event__dot {
  background: var(--color-success);
}

.timeline-event--goal_set .timeline-event__dot {
  background: #f59e0b;
}

.timeline-event__content {
  flex: 1;
  background: var(--color-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: var(--spacing-md) var(--spacing-lg);
}

.timeline-event__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--spacing-md);
}

.timeline-event__title {
  font-weight: 600;
  font-size: var(--font-size-sm);
  color: var(--color-text);
}

.timeline-event__date {
  font-size: var(--font-size-xs);
  color: var(--color-text-muted);
  white-space: nowrap;
  flex-shrink: 0;
}

.timeline-event__description {
  margin-top: var(--spacing-xs);
  font-size: var(--font-size-sm);
  color: var(--color-text-secondary);
}

/* ========================================
   Goals Card
   ======================================== */

.goals-card {
  background: var(--color-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: var(--spacing-xl);
  margin-bottom: var(--spacing-2xl);
}

.goals-card__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--spacing-lg);
}

.goals-card__header-actions {
  display: flex;
  align-items: center;
  gap: var(--spacing-sm);
}

.goals-card__edit-btn,
.goals-card__complete-btn {
  font-size: var(--font-size-xs);
  padding: 4px 12px;
}

.goals-card__value-row {
  display: flex;
  align-items: center;
  gap: var(--spacing-sm);
  flex-wrap: wrap;
}

.goals-card__completed-badge {
  display: inline-block;
  font-size: var(--font-size-xs);
  font-weight: 600;
  color: var(--color-success);
  background: rgba(34, 197, 94, 0.12);
  border-radius: var(--radius-sm);
  padding: 2px 8px;
}

.goals-card__fields {
  display: flex;
  flex-direction: column;
  gap: var(--spacing-md);
}

.goals-card__field {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.goals-card__label {
  font-size: var(--font-size-xs);
  font-weight: 600;
  color: var(--color-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.goals-card__value {
  font-size: var(--font-size-sm);
  color: var(--color-text);
}

.goals-card__empty {
  font-size: var(--font-size-sm);
  color: var(--color-text-secondary);
}

.goals-card__form-fields {
  display: flex;
  flex-direction: column;
  gap: var(--spacing-lg);
  margin-bottom: var(--spacing-lg);
}

.goals-card__error {
  font-size: var(--font-size-sm);
  color: var(--color-error);
  margin-bottom: var(--spacing-md);
}

.goals-card__form-actions {
  display: flex;
  gap: var(--spacing-sm);
}

/* Session prep (ENG-546) */
.session-prep__slots {
  display: flex;
  flex-direction: column;
  gap: var(--spacing-sm);
}

.session-prep-summary {
  margin: 0 0 var(--spacing-md);
}

.session-prep-summary__item {
  margin-bottom: var(--spacing-md);
}

.session-prep-summary__item dt {
  font-size: var(--font-size-sm);
  font-weight: 600;
  color: var(--color-text-muted, #666);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 2px;
}

.session-prep-summary__item dd {
  margin: 0;
  color: var(--color-text, #111);
}

.session-prep-summary__chips {
  list-style: none;
  margin: 4px 0 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: var(--spacing-sm);
}

.session-prep-summary__chips li {
  background: var(--color-bg, #f5f5f5);
  border: 1px solid var(--color-border, #e6e6e3);
  border-radius: 999px;
  padding: 4px 12px;
  font-size: var(--font-size-sm);
}

/* ========================================
   Session Completed Event Card
   ======================================== */

.timeline-event__content--session {
  border-left: 3px solid var(--color-success);
}

.session-event__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--spacing-md);
  margin-bottom: var(--spacing-sm);
}

.session-event__focus {
  font-size: var(--font-size-xs);
  color: var(--color-text-muted);
  font-style: italic;
  margin-bottom: var(--spacing-sm);
}

.session-event__summary {
  font-size: var(--font-size-sm);
  color: var(--color-text-secondary);
  line-height: 1.6;
  margin-bottom: var(--spacing-md);
}

.session-event__next-steps {
  margin-bottom: var(--spacing-md);
}

.session-event__next-steps-label {
  font-size: var(--font-size-xs);
  font-weight: 600;
  color: var(--color-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: var(--spacing-xs);
}

.session-event__next-steps-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.next-step-item {
  display: flex;
  align-items: flex-start;
  gap: var(--spacing-sm);
  font-size: var(--font-size-sm);
  color: var(--color-text);
  padding: 2px 0;
}

/* ENG-695: the three-state control, replacing the checkbox. A ring that fills as the
   step moves: empty, half, then a check. The state is also written in words beside the
   label, so it does not rest on colour alone. */
.next-step-item__state {
  margin-top: 1px;
  flex-shrink: 0;
  width: 17px;
  height: 17px;
  padding: 0;
  border-radius: 50%;
  border: 1.5px solid var(--color-border);
  background: transparent;
  cursor: pointer;
  display: grid;
  place-items: center;
  transition: border-color 0.15s, background 0.15s;
}

.next-step-item__state:hover:not(:disabled) {
  border-color: var(--color-primary);
}

.next-step-item__state:disabled {
  opacity: 0.5;
  cursor: default;
}

.next-step-item__mark {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: transparent;
}

/* in progress — a half-filled ring, so it is distinct from done at a glance and not
   just a lighter shade of it */
.next-step-item--in_progress .next-step-item__state {
  border-color: var(--color-primary);
}

.next-step-item--in_progress .next-step-item__mark {
  background: linear-gradient(to right, var(--color-primary) 50%, transparent 50%);
}

.next-step-item--completed .next-step-item__state {
  border-color: var(--color-success);
  background: var(--color-success);
}

.next-step-item--completed .next-step-item__mark {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background: transparent;
  /* the tick, drawn rather than an icon font or an inline svg per row */
  box-shadow: none;
  position: relative;
}

.next-step-item--completed .next-step-item__mark::after {
  content: "";
  position: absolute;
  left: 5px;
  top: 2px;
  width: 4px;
  height: 8px;
  border: solid #fff;
  border-width: 0 1.6px 1.6px 0;
  transform: rotate(45deg);
}

.next-step-item__body {
  display: flex;
  flex-direction: column;
  gap: 1px;
  min-width: 0;
}

.next-step-item__label {
  line-height: 1.5;
  transition: color 0.15s, text-decoration 0.15s;
}

.next-step-item--completed .next-step-item__label {
  color: var(--color-text-muted);
  text-decoration: line-through;
}

.next-step-item__source,
.next-step-item__state-text {
  font-size: var(--font-size-xs);
  color: var(--color-text-muted);
}

/* ENG-695: the unified plan, grouped by the session the advice came from */
.career-timeline__plan {
  margin-bottom: var(--spacing-xl);
}

.career-timeline__plan-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--spacing-sm);
  flex-wrap: wrap;
}

.career-timeline__plan-count {
  font-size: var(--font-size-sm);
  color: var(--color-text-muted);
  margin: 0;
}

.plan-group + .plan-group {
  margin-top: var(--spacing-md);
  padding-top: var(--spacing-md);
  border-top: 1px solid var(--color-border);
}

.plan-group__head {
  display: flex;
  align-items: baseline;
  gap: var(--spacing-sm);
  margin-bottom: 6px;
}

.plan-group__mentor {
  font-size: var(--font-size-sm);
  font-weight: 600;
  color: var(--color-text);
}

.plan-group__date {
  font-size: var(--font-size-xs);
  color: var(--color-text-muted);
}

.plan-group__steps {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

/* ENG-694: remove and restore.
   The remove trigger sits at the end of the row and stays faint until the row is hovered
   or it has keyboard focus — it is a destructive-looking action on a list people read
   far more often than they edit, and a row of hard × marks reads as a list of things to
   get rid of. Always reachable by keyboard regardless of the hover rule. */
.next-step-item__remove {
  margin-left: auto;
  position: relative;
  flex-shrink: 0;
}

.next-step-item__remove-trigger {
  list-style: none;
  cursor: pointer;
  padding: 0 4px;
  font-size: var(--font-size-sm);
  line-height: 1.2;
  color: var(--color-text-muted);
  opacity: 0;
  transition: opacity 0.15s, color 0.15s;
}

.next-step-item__remove-trigger::-webkit-details-marker { display: none; }

.next-step-item:hover .next-step-item__remove-trigger,
.next-step-item__remove[open] .next-step-item__remove-trigger,
.next-step-item__remove-trigger:focus-visible {
  opacity: 1;
}

.next-step-item__remove-trigger:hover {
  color: var(--color-danger, #e5484d);
}

.next-step-item__remove-menu {
  position: absolute;
  right: 0;
  top: 100%;
  z-index: 20;
  min-width: 232px;
  padding: 6px;
  background: var(--color-surface, #14141f);
  border: 1px solid var(--color-border);
  border-radius: 8px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.next-step-item__remove-head {
  font-size: var(--font-size-xs);
  color: var(--color-text-muted);
  margin: 4px 8px 6px;
}

.next-step-item__reason {
  text-align: left;
  background: none;
  border: none;
  color: var(--color-text);
  font: inherit;
  font-size: var(--font-size-sm);
  padding: 7px 8px;
  border-radius: 5px;
  cursor: pointer;
}

.next-step-item__reason:hover {
  background: rgba(255, 255, 255, 0.06);
}

.removed-steps {
  margin-bottom: var(--spacing-xl);
}

.removed-steps__summary {
  cursor: pointer;
  font-size: var(--font-size-sm);
  color: var(--color-text-muted);
}

.removed-steps__list {
  list-style: none;
  margin: var(--spacing-sm) 0 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: var(--spacing-sm);
}

.removed-step {
  display: flex;
  align-items: flex-start;
  gap: var(--spacing-sm);
}

.removed-step__body {
  display: flex;
  flex-direction: column;
  gap: 1px;
  min-width: 0;
}

/* Struck through, like a completed step, but in the muted colour rather than the success
   one — removed is not done, and the two must not read the same. */
.removed-step__label {
  font-size: var(--font-size-sm);
  color: var(--color-text-muted);
  text-decoration: line-through;
}

.removed-step__meta {
  font-size: var(--font-size-xs);
  color: var(--color-text-muted);
}

.removed-step__restore {
  margin-left: auto;
  flex-shrink: 0;
  background: none;
  border: 1px solid var(--color-border);
  border-radius: 999px;
  color: var(--color-text-secondary);
  font: inherit;
  font-size: var(--font-size-xs);
  padding: 4px 12px;
  cursor: pointer;
  transition: border-color 0.15s, color 0.15s;
}

.removed-step__restore:hover {
  border-color: var(--color-primary);
  color: var(--color-primary);
}

.session-event__link {
  display: inline-block;
  font-size: var(--font-size-xs);
  font-weight: 500;
  color: var(--color-text-secondary);
  text-decoration: none;
  border-top: 1px solid var(--color-border);
  padding-top: var(--spacing-sm);
  margin-top: var(--spacing-xs);
  width: 100%;
  transition: color 0.15s;
}

.session-event__link:hover {
  color: var(--color-text);
}

/* ========================================
   Recommended Next Action Card
   ======================================== */

.recommended-action {
  display: flex;
  flex-direction: column;
  gap: var(--spacing-md);
  background: var(--color-card);
  border: 1px solid var(--color-border);
  border-left: 4px solid var(--color-primary);
  border-radius: var(--radius-md);
  padding: var(--spacing-xl);
  margin-bottom: var(--spacing-2xl);
}

.recommended-action__badge {
  display: inline-block;
  font-size: var(--font-size-xs);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--color-primary);
}

.recommended-action__message {
  font-size: var(--font-size-base);
  color: var(--color-text);
  line-height: 1.5;
  margin: 0;
}

.recommended-action__cta {
  align-self: flex-start;
}

.recommended-action--book_first_session,
.recommended-action--book_followup {
  border-left-color: var(--color-success);
}

.recommended-action--book_first_session .recommended-action__badge,
.recommended-action--book_followup .recommended-action__badge {
  color: var(--color-success);
}

.recommended-action--incomplete_next_step {
  border-left-color: #f59e0b;
}

.recommended-action--incomplete_next_step .recommended-action__badge {
  color: #f59e0b;
}

/* ========================================
   Read More
   ======================================== */

.session-event__read-more {
  font-size: var(--font-size-xs);
  color: var(--color-primary);
  text-decoration: none;
  margin-left: var(--spacing-xs);
  white-space: nowrap;
}

.session-event__read-more:hover {
  text-decoration: underline;
}

/* ========================================
   Portfolio Review Timeline Event
   ======================================== */

.timeline-event--portfolio_review_completed .timeline-event__dot {
  background: #a78bfa;
  border-color: #a78bfa;
}

/* ========================================
   Monthly Breakdown (Sales)
   ======================================== */

.monthly-breakdown {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: var(--spacing-md);
}

.monthly-breakdown__card {
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: 8px;
  padding: var(--spacing-md);
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.monthly-breakdown__month {
  font-size: var(--font-size-sm);
  font-weight: 700;
  color: var(--color-text);
  margin-bottom: 4px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.monthly-breakdown__row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 8px;
}

.monthly-breakdown__label {
  font-size: 0.7rem;
  color: var(--color-text-secondary);
  white-space: nowrap;
}

.monthly-breakdown__value {
  font-size: var(--font-size-sm);
  font-weight: 600;
  color: var(--color-text);
  white-space: nowrap;
}

.monthly-breakdown__value--accent {
  color: var(--color-primary);
}

.monthly-breakdown__divider {
  border-top: 1px solid var(--color-border);
  margin: 4px 0;
}
