/* My Work page + right-side Calendar panel. Reuses the manage-portal design
   tokens defined globally in app_v2.css/manage.css (--bg, --surface,
   --border, --radius, --radius-sm, --muted, --accent, --danger) -- no new
   palette. Loaded only on /manage/my-work (see manage/my_work.html). */

.mp-mywork {
  display: flex;
  align-items: flex-start;
  gap: 24px;
  min-height: 0;
}

.mp-mywork__main {
  flex: 1 1 auto;
  min-width: 0;
}

/* -- My Work empty state --------------------------------------------------- */

.mp-mywork__empty {
  display: inline-flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 10px;
  max-width: 420px;
  margin-top: 18px;
  padding: 22px 22px 24px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
}

.mp-mywork__empty-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: var(--accent-soft, rgba(255, 90, 0, 0.1));
  color: var(--accent);
  margin-bottom: 4px;
}

.mp-mywork__empty-title {
  margin: 0;
  font-size: 1.02rem;
  font-weight: 800;
  letter-spacing: -0.01em;
}

.mp-mywork__empty-body {
  margin: 0;
  color: var(--muted);
  font-weight: 600;
  font-size: 0.88rem;
  line-height: 1.5;
}

/* -- Calendar panel shell --------------------------------------------- */

.mp-cal {
  flex: 0 0 clamp(360px, 27vw, 440px);
  position: sticky;
  top: 0;
  align-self: flex-start;
  width: clamp(360px, 27vw, 440px);
  height: var(--mp-cal-viewport-height, auto);
  max-height: var(--mp-cal-viewport-height, calc(100dvh - 32px));
  min-width: 0;
  transition: width 180ms ease, flex-basis 180ms ease;
}

.mp-cal[data-state="expanded"] {
  flex: 1 1 54%;
  width: auto;
}

.mp-cal[data-state="collapsed"] {
  display: flex;
  flex: 0 0 44px;
  justify-content: flex-end;
  width: 44px;
  height: auto;
  max-height: none;
  margin-left: auto;
}

.mp-cal__collapsed-btn {
  display: none;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border: 1px solid var(--border);
  border-radius: 50%;
  background: var(--surface);
  color: var(--muted);
  box-shadow: 0 2px 10px rgba(17, 17, 17, 0.08);
  cursor: pointer;
}

.mp-cal__collapsed-btn:hover {
  color: var(--accent);
  border-color: var(--border-hover, var(--border));
}

.mp-cal[data-state="collapsed"] .mp-cal__collapsed-btn {
  display: flex;
}

.mp-cal[data-state="collapsed"] .mp-cal__panel {
  display: none;
}

.mp-cal__panel {
  display: flex;
  flex-direction: column;
  width: 100%;
  height: var(--mp-cal-viewport-height, auto);
  max-height: var(--mp-cal-viewport-height, calc(100dvh - 32px));
  background: var(--surface);
  border: 1px solid #e5e7eb;
  border-radius: 18px;
  box-shadow: 0 4px 20px rgba(17, 17, 17, 0.05);
  overflow: hidden;
}

/* -- Header -------------------------------------------------------------- */

.mp-cal__header {
  flex: 0 0 auto;
  padding: 18px 20px 14px;
  border-bottom: 1px solid var(--border);
}

.mp-cal__header-top {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px 16px;
  margin-bottom: 14px;
}

.mp-cal__title {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 800;
  letter-spacing: -0.01em;
}

.mp-cal__header-right {
  display: flex;
  align-items: center;
  gap: 8px;
}

/* Segmented Day / Week control */
.mp-cal__views {
  display: inline-flex;
  gap: 2px;
  padding: 3px;
  border-radius: 10px;
  background: var(--surface2, #f2f2f2);
}

.mp-cal__view {
  min-height: 30px;
  padding: 0 14px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: 0.8rem;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
}

.mp-cal__view:hover:not(:disabled) {
  color: var(--text);
}

.mp-cal__view.is-active {
  background: var(--surface);
  color: var(--text);
  box-shadow: 0 1px 3px rgba(17, 17, 17, 0.1);
}

.mp-cal__icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  padding: 0;
  border: 1px solid transparent;
  border-radius: 8px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
}

.mp-cal__icon-btn:hover {
  background: var(--accent-soft, rgba(255, 90, 0, 0.08));
  color: var(--text);
}

.mp-cal__nav {
  display: flex;
  align-items: center;
  gap: 10px;
}

.mp-cal__nav-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  flex: 0 0 auto;
  border: 1px solid var(--border);
  border-radius: 50%;
  background: var(--surface);
  color: var(--muted);
  cursor: pointer;
}

.mp-cal__nav-btn:hover {
  color: var(--text);
  border-color: var(--border-hover, var(--border));
}

.mp-cal__range {
  flex: 1 1 auto;
  min-width: 0;
  text-align: center;
  color: var(--text);
  font-weight: 800;
  font-size: 0.92rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mp-cal__today-btn {
  flex: 0 0 auto;
  padding: 6px 12px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface);
  color: var(--text);
  font-weight: 700;
  font-size: 0.78rem;
  cursor: pointer;
}

.mp-cal__today-btn:hover {
  border-color: var(--accent-border, rgba(255, 90, 0, 0.3));
  color: var(--accent);
}

/* -- Body / states --------------------------------------------------------- */

.mp-cal__body {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  min-height: 0;
}

.mp-cal__state {
  margin: 18px;
  padding: 22px 18px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface2, #f2f2f2);
  text-align: center;
  color: var(--muted);
  font-size: 0.86rem;
}

.mp-cal__state-title {
  margin: 0 0 6px;
  color: var(--text);
  font-weight: 800;
  font-size: 0.92rem;
}

.mp-cal__state .mp-btn {
  margin-top: 12px;
}

.mp-cal__skeleton {
  margin: 12px 18px 0;
  height: 220px;
  border-radius: var(--radius-sm);
  background: linear-gradient(90deg, var(--bg) 25%, rgba(17, 17, 17, 0.04) 37%, var(--bg) 63%);
  background-size: 400% 100%;
  animation: mp-cal-shimmer 1.4s ease infinite;
}

@keyframes mp-cal-shimmer {
  0% { background-position: 100% 50%; }
  100% { background-position: 0 50%; }
}

/* -- All-day row --------------------------------------------------------- */

.mp-cal__allday {
  flex: 0 0 auto;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 10px 18px;
  border-bottom: 1px solid var(--border);
}

.mp-cal__allday[hidden] {
  display: none;
}

.mp-cal__allday-chip {
  padding: 4px 10px;
  border-radius: 999px;
  background: var(--accent-soft, rgba(255, 90, 0, 0.1));
  color: var(--text);
  font-size: 0.78rem;
  font-weight: 700;
  cursor: pointer;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* -- Week header row (expanded view only) --------------------------------- */

.mp-cal__week-headers {
  display: grid;
  grid-template-columns: 44px repeat(7, minmax(90px, 1fr));
  flex: 0 0 auto;
  padding: 10px 12px 0;
}

.mp-cal__week-headers[hidden] {
  display: none;
}

.mp-cal__week-header-cell {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: 6px 4px 10px;
  text-align: center;
  border-bottom: 2px solid transparent;
}

.mp-cal__week-header-day {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
}

.mp-cal__week-header-date {
  font-size: 0.9rem;
  font-weight: 800;
  color: var(--text);
}

.mp-cal__week-header-cell.is-today {
  border-bottom-color: var(--accent);
}

.mp-cal__week-header-cell.is-today .mp-cal__week-header-day,
.mp-cal__week-header-cell.is-today .mp-cal__week-header-date {
  color: var(--accent);
}

/* -- Timeline -------------------------------------------------------------- */

.mp-cal__scroll {
  flex: 1 1 auto;
  overflow-y: auto;
  overflow-x: auto;
  min-height: 260px;
  scrollbar-width: thin;
  scrollbar-color: rgba(17, 17, 17, 0.18) transparent;
}

.mp-cal__scroll::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

.mp-cal__scroll::-webkit-scrollbar-thumb {
  background: rgba(17, 17, 17, 0.15);
  border-radius: 999px;
}

.mp-cal__scroll::-webkit-scrollbar-track {
  background: transparent;
}

.mp-cal__timeline {
  position: relative;
  display: flex;
  align-items: stretch;
  margin: 0 18px;
}

.mp-cal[data-state="expanded"] .mp-cal__timeline {
  display: grid;
  grid-template-columns: 44px repeat(7, minmax(90px, 1fr));
  margin: 0;
  padding: 0 12px;
}

.mp-cal__hour-label-col {
  flex: 0 0 44px;
  width: 44px;
}

.mp-cal__hour-row {
  position: absolute;
  left: 0;
  right: 0;
  border-top: 1px solid rgba(17, 17, 17, 0.06);
}

.mp-cal__hour-label {
  position: absolute;
  left: 0;
  top: -7px;
  width: 100%;
  padding-right: 8px;
  text-align: right;
  font-size: 0.66rem;
  font-weight: 600;
  color: var(--muted);
  white-space: nowrap;
  box-sizing: border-box;
}

.mp-cal__day-col {
  position: relative;
  flex: 1 1 auto;
  min-width: 0;
  border-left: 1px solid rgba(17, 17, 17, 0.06);
}

.mp-cal__now-line {
  position: absolute;
  left: 0;
  right: 0;
  height: 0;
  border-top: 1.5px solid var(--danger, #b42318);
  z-index: 3;
  pointer-events: none;
}

.mp-cal__now-line::before {
  content: "";
  position: absolute;
  left: -4px;
  top: -4px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--danger, #b42318);
}

/* -- Event cards ------------------------------------------------------------ */

.mp-cal__event {
  --mp-event-bg: rgba(255, 90, 0, 0.07);
  --mp-event-border: rgba(255, 90, 0, 0.18);
  position: absolute;
  overflow: hidden;
  padding: 6px 8px 6px 9px;
  border-radius: 8px;
  border: 1px solid var(--mp-event-border);
  border-left: 3px solid var(--mp-event-border);
  background: var(--mp-event-bg);
  color: var(--text);
  font-size: 0.76rem;
  line-height: 1.3;
  cursor: pointer;
  z-index: 2;
  transition: box-shadow 0.12s ease, border-color 0.12s ease;
}

.mp-cal__event:hover,
.mp-cal__event:focus-visible {
  border-left-color: var(--accent);
  box-shadow: 0 2px 8px rgba(17, 17, 17, 0.12);
}

.mp-cal__event.is-selected {
  border-left-color: var(--accent);
  border-left-width: 3px;
  box-shadow: 0 0 0 1px var(--accent) inset;
}

.mp-cal__event:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 1px;
}

.mp-cal__event-title {
  display: block;
  font-weight: 600;
  font-size: 0.8rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mp-cal__event-time {
  display: block;
  margin-top: 1px;
  color: var(--muted);
  font-size: 0.7rem;
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mp-cal__event.is-compact {
  padding: 3px 6px 3px 8px;
}

.mp-cal__event.is-compact .mp-cal__event-time {
  display: none;
}

.mp-cal__event.is-tiny .mp-cal__event-title {
  font-size: 0.68rem;
}

/* -- Extra button variant used only by the event modal's tertiary action -- */

.mp-btn--text {
  border-color: transparent;
  background: transparent;
  color: var(--muted);
}

.mp-btn--text:hover {
  color: var(--text);
  border-color: transparent;
  background: var(--surface2, #f2f2f2);
}

/* -- Event modal ------------------------------------------------------------ */

/* Must outrank the calendar panel's own mobile full-screen z-index (200,
   see the <=560px rule below) -- otherwise the panel covers the modal and
   opening an event on a phone appears to silently do nothing. */
.mp-modal--event {
  z-index: 210;
}

.mp-modal--event .mp-modal__backdrop {
  background: rgba(17, 17, 17, 0.4);
}

.mp-modal__dialog--event {
  display: flex;
  flex-direction: column;
  width: min(92vw, 560px);
  max-height: 88vh;
  padding: 0;
  border-radius: 20px;
  overflow: hidden;
  background: var(--surface);
  box-shadow: 0 24px 64px rgba(17, 17, 17, 0.22);
  text-align: left;
}

/* Two-column "pre-meeting briefing" layout (current meeting + previous
   meeting side by side) needs real width to not feel cramped -- widened
   here, at >=900px, from the single-column 560px above. */
@media (min-width: 900px) {
  .mp-modal__dialog--event {
    width: min(92vw, 1000px);
    max-height: 82vh;
  }
}

.mp-cal-modal__close {
  position: absolute;
  top: 16px;
  right: 16px;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border: 0;
  border-radius: 50%;
  background: var(--surface2, #f2f2f2);
  color: var(--muted);
  cursor: pointer;
}

.mp-cal-modal__close:hover {
  color: var(--text);
  background: rgba(17, 17, 17, 0.1);
}

.mp-cal-modal__scroll {
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  padding: 22px 24px 8px;
}

.mp-cal-modal__head {
  flex: 0 0 auto;
  padding-right: 34px;
  margin-bottom: 14px;
}

/* Two-column body: current meeting (left) | divider | previous meeting
   (right). On desktop, the RIGHT column owns its own scroll (see spec:
   the previous-meeting list can be long without inflating the whole
   modal); the outer .mp-cal-modal__scroll above stops scrolling itself
   once this kicks in, so the header/left column stay put while browsing
   previous-meeting content. Collapses to a single stacked column below
   900px -- see the responsive block at the end of this file. */
@media (min-width: 900px) {
  .mp-cal-modal__scroll {
    overflow: hidden;
    padding-bottom: 0;
  }

  .mp-cal-modal__grid {
    display: grid;
    grid-template-columns: minmax(280px, 0.4fr) 1px minmax(360px, 0.6fr);
    flex: 1 1 auto;
    min-height: 0;
  }

  .mp-cal-modal__col {
    min-height: 0;
    overflow-y: auto;
  }

  .mp-cal-modal__col--current {
    padding: 6px 22px 22px 24px;
  }

  .mp-cal-modal__col--previous {
    padding: 6px 24px 22px 22px;
  }

  .mp-cal-modal__divider {
    background: var(--border);
  }
}

.mp-cal-modal__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  margin-bottom: 12px;
  border-radius: 11px;
  background: var(--accent-soft, rgba(255, 90, 0, 0.1));
  color: var(--accent);
}

.mp-cal-modal__title {
  margin: 0 0 6px;
  font-size: 1.2rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.3;
}

.mp-cal-modal__when {
  margin: 0;
  color: var(--muted);
  font-weight: 600;
  font-size: 0.88rem;
}

.mp-cal-modal__body {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding-bottom: 20px;
}

.mp-cal-modal__people-section {
  min-width: 0;
}

.mp-cal-modal__row {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

.mp-cal-modal__row-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  flex: 0 0 auto;
  margin-top: 1px;
  border-radius: 8px;
  background: var(--surface2, #f2f2f2);
  color: var(--muted);
}

.mp-cal-modal__row-text {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
  flex: 1 1 auto;
}

.mp-cal-modal__row-label {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--muted);
}

.mp-cal-modal__row-value {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--text);
  word-break: break-word;
}

/* Attendee identities */

.mp-cal-avatar {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  flex: 0 0 32px;
  overflow: hidden;
  border-radius: 50%;
  border: 1px solid rgba(17, 17, 17, 0.06);
  font-size: 0.66rem;
  font-weight: 800;
  color: var(--text);
  letter-spacing: 0.01em;
}

.mp-cal-avatar__initials {
  position: relative;
  z-index: 0;
}

.mp-cal-avatar__photo {
  position: absolute;
  inset: 0;
  z-index: 1;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.mp-cal-avatar--a { background: rgba(255, 90, 0, 0.16); }
.mp-cal-avatar--b { background: rgba(59, 130, 246, 0.14); }
.mp-cal-avatar--c { background: rgba(16, 163, 74, 0.14); }
.mp-cal-avatar--d { background: rgba(147, 51, 234, 0.13); }
.mp-cal-avatar--e { background: rgba(217, 119, 6, 0.15); }

.mp-cal-attendees {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.mp-cal-person {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  padding: 3px 0;
}

.mp-cal-person__identity {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  min-width: 0;
}

.mp-cal-person__name,
.mp-cal-person__email {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mp-cal-person__name {
  color: var(--text);
  font-size: 0.86rem;
  font-weight: 700;
}

.mp-cal-person__email {
  margin-top: 1px;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 600;
}

.mp-cal-attendee--extra[hidden] {
  display: none;
}

.mp-cal-attendees__toggle {
  align-self: flex-start;
  min-height: 30px;
  margin-top: 3px;
  padding: 4px 10px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface2, #f2f2f2);
  color: var(--muted);
  font: inherit;
  font-size: 0.75rem;
  font-weight: 700;
  cursor: pointer;
}

.mp-cal-attendees__toggle:hover,
.mp-cal-attendees__toggle:focus-visible {
  border-color: var(--accent-border, rgba(255, 90, 0, 0.3));
  color: var(--text);
}

.mp-cal-attendees__toggle:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

/* Action cards (Join meeting / Open in Google Calendar) */

.mp-cal-modal__actions-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.mp-cal-action {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 0;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--surface);
  transition: border-color 0.12s ease, background 0.12s ease;
}

.mp-cal-action:hover,
.mp-cal-action:focus-within {
  border-color: var(--accent-border, rgba(255, 90, 0, 0.3));
  background: var(--accent-soft, rgba(255, 90, 0, 0.05));
}

.mp-cal-action:focus-within {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.mp-cal-action__primary {
  display: flex;
  flex: 1 1 auto;
  align-items: center;
  gap: 10px;
  min-width: 0;
  padding: 10px 4px 10px 12px;
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.mp-cal-action__primary:focus,
.mp-cal-action__copy:focus {
  outline: 0;
}

.mp-cal-action__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  flex: 0 0 auto;
  border-radius: 9px;
  background: var(--accent-soft, rgba(255, 90, 0, 0.1));
  color: var(--accent);
}

.mp-cal-action__text {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
  flex: 1 1 auto;
}

.mp-cal-action__title {
  font-size: 0.88rem;
  font-weight: 800;
  color: var(--text);
}

.mp-cal-action__subtitle {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mp-cal-action__chevron {
  flex: 0 0 auto;
  margin-right: 12px;
  color: var(--muted);
}

.mp-cal-action__copy {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-height: 30px;
  padding: 0 8px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
  color: var(--muted);
  font: inherit;
  font-size: 0.72rem;
  font-weight: 700;
  white-space: nowrap;
  cursor: pointer;
}

.mp-cal-action__copy:hover {
  border-color: var(--accent-border, rgba(255, 90, 0, 0.3));
  color: var(--text);
}

/* Description */

.mp-cal-modal__section-label {
  margin: 0 0 8px;
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--muted);
}

.mp-cal-modal__description {
  font-size: 0.86rem;
  line-height: 1.55;
  color: var(--text);
  word-break: break-word;
}

.mp-cal-modal__description a {
  color: var(--accent);
}

.mp-cal-modal__invite-slot {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 0 18px;
  color: var(--muted);
  font-size: 0.72rem;
}

.mp-cal-modal__invite-slot[hidden] {
  display: none;
}

.mp-cal-modal__invite {
  border: 0;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: 0.82rem;
  font-weight: 700;
}

.mp-cal-toast-stack {
  position: fixed;
  top: calc(20px + var(--safe-top, 0px));
  right: 20px;
  z-index: 220;
  display: flex;
  flex-direction: column;
  gap: 8px;
  pointer-events: none;
}

.mp-cal-toast {
  padding: 10px 14px;
  border: 1px solid rgba(21, 128, 61, 0.25);
  border-radius: 10px;
  background: #eaf7ee;
  color: #17663a;
  box-shadow: 0 8px 24px rgba(17, 17, 17, 0.14);
  font-size: 0.82rem;
  font-weight: 750;
}

/* -- Meeting Continuity (previous meeting summary + linked Tasks) --------- */
/* Renders into the modal's right ("previous meeting") column -- see
   .mp-cal-modal__col--previous above for the column/scroll mechanics. On
   the stacked mobile layout this same markup just flows normally below
   the current-meeting column (see the responsive block at the end of this
   file), so nothing here needs its own mobile variant. */

.mp-cal-continuity {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.mp-cal-continuity__header {
  display: flex;
  align-items: center;
  gap: 10px;
}

.mp-cal-continuity__header-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  flex: 0 0 auto;
  border-radius: 9px;
  background: var(--accent-soft, rgba(255, 90, 0, 0.1));
  color: var(--accent);
}

.mp-cal-continuity__header-text {
  display: flex;
  flex-direction: column;
  gap: 1px;
  min-width: 0;
}

.mp-cal-continuity__eyebrow {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.mp-cal-continuity__date {
  color: var(--text);
  font-size: 0.92rem;
  font-weight: 800;
  letter-spacing: -0.01em;
}

.mp-cal-continuity__section {
  min-width: 0;
}

.mp-cal-continuity__summary {
  margin: 0;
  font-size: 0.86rem;
  line-height: 1.55;
  color: var(--text);
}

.mp-cal-continuity__topic {
  margin-bottom: 8px;
}

.mp-cal-continuity__topic:last-child {
  margin-bottom: 0;
}

.mp-cal-continuity__topic-title {
  margin: 0 0 3px;
  font-size: 0.84rem;
  font-weight: 750;
  color: var(--text);
}

.mp-cal-continuity__topic ul {
  margin: 0;
  padding-left: 18px;
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.5;
}

.mp-cal-continuity__empty {
  margin: 0;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 600;
}

/* Compact "did they finish what they committed to" readout, placed right
   under the header/date and ahead of Summary/Topics (spec: visible within
   the first few seconds of opening the meeting). */
.mp-cal-continuity__progress-block {
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface2, #f7f7f7);
}

.mp-cal-continuity__progress-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 8px;
}

.mp-cal-continuity__progress-count {
  color: var(--text);
  font-size: 0.82rem;
  font-weight: 700;
}

.mp-cal-continuity__progress-pct {
  flex: 0 0 auto;
  color: var(--accent);
  font-size: 0.96rem;
  font-weight: 800;
}

.mp-cal-progress {
  flex: 1 1 auto;
  height: 6px;
  border-radius: 999px;
  background: var(--surface, #fff);
  overflow: hidden;
}

.mp-cal-progress__fill {
  height: 100%;
  border-radius: 999px;
  background: var(--accent);
}

.mp-cal-continuity__attention {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 700;
}

/* -- Empty / processing / unavailable states -------------------------------- */

.mp-cal-continuity__empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 32px 16px;
  text-align: center;
}

.mp-cal-continuity__empty-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: var(--surface2, #f2f2f2);
  color: var(--muted);
}

.mp-cal-continuity__empty-title {
  margin: 0;
  max-width: 26ch;
  color: var(--text);
  font-size: 0.88rem;
  font-weight: 750;
}

.mp-cal-continuity__empty-body {
  margin: 0;
  max-width: 30ch;
  color: var(--muted);
  font-size: 0.8rem;
  line-height: 1.5;
}

/* -- Loading skeleton -------------------------------------------------------- */

.mp-cal-continuity-skeleton {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding-top: 2px;
}

.mp-cal-continuity-skeleton__bar {
  height: 12px;
  border-radius: 6px;
  background: var(--surface2, #f0f0f0);
  animation: mp-cal-skeleton-pulse 1.3s ease-in-out infinite;
}

.mp-cal-continuity-skeleton__bar--title {
  width: 55%;
  height: 16px;
}

.mp-cal-continuity-skeleton__bar--wide {
  width: 92%;
}

.mp-cal-continuity-skeleton__bar--short {
  width: 40%;
}

@keyframes mp-cal-skeleton-pulse {
  0%, 100% { opacity: 0.55; }
  50% { opacity: 1; }
}

.mp-cal-task-group {
  margin-top: 10px;
}

.mp-cal-task-group:first-of-type {
  margin-top: 0;
}

.mp-cal-task-group__person {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 0 0 6px;
  color: var(--text);
  font-size: 0.82rem;
  font-weight: 800;
}

.mp-cal-task-group__count {
  color: var(--muted);
  font-size: 0.74rem;
  font-weight: 700;
}

.mp-cal-task-group__tasks {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.mp-cal-task {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 6px 6px;
  border-radius: 8px;
  text-decoration: none;
  color: inherit;
}

a.mp-cal-task:hover,
a.mp-cal-task:focus-visible {
  background: var(--surface2, #f2f2f2);
}

a.mp-cal-task:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 1px;
}

.mp-cal-task__icon {
  flex: 0 0 auto;
  margin-top: 1px;
  color: var(--muted);
}

.mp-cal-task.is-done .mp-cal-task__icon {
  color: #17663a;
}

.mp-cal-task.is-overdue .mp-cal-task__icon {
  color: var(--danger, #c0392b);
}

.mp-cal-task__body {
  display: flex;
  flex-direction: column;
  gap: 1px;
  min-width: 0;
}

.mp-cal-task__title {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--text);
}

.mp-cal-task.is-done .mp-cal-task__title {
  color: var(--muted);
  text-decoration: line-through;
  text-decoration-color: rgba(23, 102, 58, 0.35);
}

.mp-cal-task__meta {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--danger, #c0392b);
}

.mp-cal-task.is-open .mp-cal-task__meta {
  color: var(--muted);
}

/* -- Responsive ------------------------------------------------------------ */

/* Event modal: below the two-column breakpoint (see the `min-width: 900px`
   rules above), .mp-cal-modal__grid/__col are plain block elements with no
   layout rules of their own, so "Current meeting" then "Previous meeting"
   already stack naturally in source order -- this block only needs to
   turn the (desktop-only) vertical divider into a horizontal one between
   the stacked sections, and let the whole modal scroll as one column
   again (.mp-cal-modal__scroll regains its own overflow here, since above
   900px that job moves to the individual columns instead). Deliberately
   its own breakpoint, not reused from the 860px/560px rules below (those
   govern the unrelated My Work page layout and the calendar-panel-as-
   fullscreen behavior). */
@media (max-width: 899px) {
  .mp-cal-modal__divider {
    display: none;
  }

  .mp-cal-modal__col--previous {
    margin-top: 18px;
    padding-top: 18px;
    border-top: 1px solid var(--border);
  }
}

@media (max-width: 860px) {
  .mp-mywork {
    flex-direction: column;
  }

  .mp-mywork__main,
  .mp-cal {
    flex-basis: auto;
    width: 100%;
  }

  .mp-cal {
    position: static;
    max-height: none;
  }

  .mp-cal[data-state="compact"],
  .mp-cal[data-state="expanded"] {
    flex-basis: auto;
    width: 100%;
  }

  .mp-cal[data-state="collapsed"] {
    align-self: flex-end;
    flex-basis: 44px;
    width: 44px;
  }
}

@media (max-width: 560px) {
  .mp-cal[data-state="compact"] .mp-cal__panel,
  .mp-cal[data-state="expanded"] .mp-cal__panel {
    position: fixed;
    inset: 0;
    z-index: 200;
    width: auto;
    max-height: none;
    border-radius: 0;
  }

  .mp-cal[data-state="collapsed"] .mp-cal__collapsed-btn {
    position: fixed;
    right: 16px;
    top: calc(72px + var(--safe-top, 0px));
    bottom: auto;
    z-index: 150;
    box-shadow: 0 4px 16px rgba(17, 17, 17, 0.18);
  }

  .mp-cal[data-state="expanded"] .mp-cal__timeline,
  .mp-cal[data-state="expanded"] .mp-cal__week-headers {
    grid-template-columns: 36px repeat(7, minmax(72px, 1fr));
  }

  .mp-modal__dialog--event {
    position: fixed;
    inset: auto 12px calc(12px + var(--safe-bottom, 0px)) 12px;
    width: auto;
    max-height: calc(92vh - var(--safe-bottom, 0px));
    border-radius: 20px;
  }

  .mp-cal-action__copy span {
    display: none;
  }

  .mp-cal-toast-stack {
    right: 16px;
    left: 16px;
  }
}
