/* ── Week Planner ──────────────────────────────────────────────────────────── */

/* Panel: full-bleed, flex column */
#panel-week-planner {
  max-width: none;
  padding: 0;
  overflow: hidden;
  height: calc(100vh - var(--hdr-h, 63px));
}
#panel-week-planner.active { display: flex; flex-direction: column; }

/* ── Tab bar ───────────────────────────────────────────────── */
.wp-tabbar {
  display: flex;
  gap: 0;
  border-bottom: 2px solid var(--g100);
  flex-shrink: 0;
  background: var(--w);
  padding: 0 20px;
}

.wp-tab-btn {
  font-family: var(--f);
  font-size: 13px;
  font-weight: 600;
  padding: 12px 20px 10px;
  background: transparent;
  border: none;
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  cursor: pointer;
  color: var(--g400);
  transition: color .12s, border-color .12s;
}
.wp-tab-btn:hover  { color: var(--g900); }
.wp-tab-btn.active { color: var(--or); border-bottom-color: var(--or); }

/* ── Tab panes ─────────────────────────────────────────────── */
.wp-tab-pane          { display: none; flex: 1; overflow: hidden; min-height: 0; }
.wp-tab-pane.active   { display: flex; flex-direction: column; }

/* ══════════════════════════════════════════════════════════════
   SUMMARY TAB
═══════════════════════════════════════════════════════════════ */
.wp-sum-page {
  flex: 1;
  overflow-y: auto;
  padding: 24px 32px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

/* Header row */
.wp-sum-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.wp-sum-nav {
  display: flex;
  align-items: center;
  gap: 6px;
}

.wp-nav-btn {
  font-family: var(--f);
  font-size: 18px;
  font-weight: 300;
  line-height: 1;
  padding: 4px 10px;
  background: var(--w);
  border: 1.5px solid var(--g200);
  border-radius: var(--rsm);
  cursor: pointer;
  color: var(--g600);
  transition: background .12s, border-color .12s, color .12s;
}
.wp-nav-btn:hover { background: var(--g50); border-color: var(--g400); color: var(--g900); }

.wp-nav-ghost-btn {
  font-family: var(--f);
  font-size: 12px;
  font-weight: 600;
  padding: 5px 12px;
  background: transparent;
  border: 1.5px solid var(--g200);
  border-radius: var(--rsm);
  cursor: pointer;
  color: var(--g600);
  transition: background .12s, border-color .12s, color .12s;
}
.wp-nav-ghost-btn:hover { background: var(--g50); color: var(--g900); }

.wp-sum-week-label {
  font-size: 15px;
  font-weight: 600;
  color: var(--g900);
  min-width: 160px;
  text-align: center;
}

.wp-settings-btn {
  font-family: var(--f);
  font-size: 12px;
  font-weight: 600;
  padding: 6px 14px;
  background: var(--w);
  border: 1.5px solid var(--g200);
  border-radius: var(--rsm);
  cursor: pointer;
  color: var(--g600);
  display: flex;
  align-items: center;
  gap: 6px;
  transition: background .12s, border-color .12s, color .12s;
}
.wp-settings-btn:hover { background: var(--g50); border-color: var(--g400); color: var(--g900); }

/* Member filter chips */
.wp-sum-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.wp-sum-chip {
  display: flex;
  align-items: center;
  gap: 6px;
  font-family: var(--f);
  font-size: 12px;
  font-weight: 500;
  padding: 5px 12px;
  background: var(--w);
  border: 1.5px solid var(--g200);
  border-radius: 20px;
  cursor: pointer;
  color: var(--g600);
  user-select: none;
  transition: border-color .12s, background .12s, color .12s;
}
.wp-sum-chip:hover { border-color: var(--or); color: var(--g900); }
.wp-sum-chip input { accent-color: var(--or); cursor: pointer; }
.wp-sum-chip:has(input:checked) {
  background: var(--olt);
  border-color: var(--or);
  color: var(--g900);
}

/* Member bar rows */
.wp-sum-bars {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.wp-sum-row {
  display: grid;
  grid-template-columns: 120px 1fr;
  align-items: center;
  gap: 12px;
  background: var(--w);
  border: 1px solid var(--g100);
  border-radius: var(--rmd);
  padding: 8px 14px;
  box-shadow: var(--ss);
}

/* Right column: bar stacked above stats */
.wp-sum-right {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
}

.wp-sum-total {
  font-size: 12.5px;
  color: var(--g600);
}
.wp-sum-total strong { color: var(--g900); font-weight: 600; }

.wp-sum-name {
  font-size: 13px;
  font-weight: 600;
  color: var(--g900);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Bar column — tooltip wrapper */
.wp-sum-bar-col {
  position: relative;
}

.wp-sum-bar {
  height: 10px;
  background: var(--g100);
  border-radius: 5px;
  overflow: hidden;
  display: flex;
}

.wp-sum-seg {
  height: 100%;
  transition: width .3s;
}
.wp-seg-bill  { background: var(--or); }
.wp-seg-unbil { background: var(--g400); }
.wp-seg-meet  { background: var(--g200); }

.wp-sum-row.wp-sum-full .wp-sum-bar { outline: 1.5px solid #16a34a; }

/* Hover tooltip */
.wp-sum-tooltip {
  display: none;
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  z-index: 50;
  background: var(--g900);
  color: var(--w);
  border-radius: var(--rmd);
  box-shadow: var(--sm);
  min-width: 320px;
  max-width: 440px;
  pointer-events: none;
}
.wp-sum-bar-col:hover .wp-sum-tooltip { display: block; }
.wp-tt-inner { padding: 10px 14px; }
.wp-tt-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
  font-size: 11.5px;
  padding: 4px 0;
  border-bottom: 1px solid rgba(255,255,255,.08);
  align-items: baseline;
}
.wp-tt-row:last-child { border-bottom: none; }
.wp-tt-proj  { overflow: hidden; }
.wp-tt-code  { font-weight: 700; color: var(--w); white-space: nowrap; }
.wp-tt-name  { font-size: 11px; color: rgba(255,255,255,.6); margin-left: 5px; }
.wp-tt-hrs   { text-align: right; font-variant-numeric: tabular-nums; color: var(--or); font-weight: 600; white-space: nowrap; }
.wp-tt-empty { font-size: 11.5px; color: rgba(255,255,255,.45); padding: 2px 0; }

.wp-sum-nums {
  font-size: 12px;
  color: var(--g600);
}
.wp-sum-nums strong { color: var(--g900); }

/* ── Section headings ──────────────────────────────────────── */
.wp-sum-section-title {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .07em;
  text-transform: uppercase;
  color: var(--g400);
  padding-bottom: 2px;
  border-bottom: 1px solid var(--g100);
}

/* ── By-project leaderboard ────────────────────────────────── */
.wp-sum-projects {
  display: flex;
  flex-direction: column;
  gap: 9px;
  padding-bottom: 8px;
}

.wp-proj-row {
  display: grid;
  grid-template-columns: 42px 220px 1fr 90px;
  align-items: center;
  gap: 12px;
  background: var(--w);
  border: 1px solid var(--g100);
  border-radius: var(--rmd);
  padding: 13px 16px;
  box-shadow: var(--ss);
  position: relative;
  cursor: default;
  outline: none;
  transition: border-color .12s;
}
.wp-proj-row:hover,
.wp-proj-row:focus-within { border-color: var(--or); }

.wp-proj-rank {
  font-size: 13px;
  font-weight: 700;
  color: var(--g400);
  text-align: right;
  font-variant-numeric: tabular-nums;
}
.wp-proj-rank.wp-proj-rank-1 { color: var(--or); }

.wp-proj-name {
  font-size: 13px;
  font-weight: 600;
  color: var(--g900);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.wp-proj-bar-wrap {
  background: var(--g100);
  border-radius: 5px;
  height: 8px;
  overflow: hidden;
}
.wp-proj-bar {
  height: 100%;
  background: var(--or);
  border-radius: 5px;
  transition: width .3s;
}

.wp-proj-hrs {
  font-size: 13px;
  font-weight: 700;
  color: var(--g900);
  font-variant-numeric: tabular-nums;
  text-align: right;
  white-space: nowrap;
}

/* Per-project popover */
.wp-proj-popover {
  display: none;
  position: absolute;
  top: calc(100% + 6px);
  left: 16px;
  z-index: 50;
  width: max-content;
  background: var(--g900);
  color: var(--w);
  border-radius: var(--rmd);
  box-shadow: var(--sm);
  padding: 10px 14px;
  pointer-events: none;
}
.wp-proj-row:hover .wp-proj-popover,
.wp-proj-row:focus-within .wp-proj-popover { display: block; }

.wp-proj-pop-hdr {
  font-size: 12px;
  font-weight: 700;
  color: var(--w);
  margin-bottom: 8px;
  padding-bottom: 6px;
  border-bottom: 1px solid rgba(255,255,255,.12);
}

.wp-proj-pop-row {
  display: flex;
  align-items: baseline;
  gap: 16px;
  justify-content: space-between;
  padding: 3px 0;
  font-size: 11.5px;
}

.wp-proj-pop-name {
  font-weight: 600;
  white-space: nowrap;
}

.wp-proj-pop-hrs {
  text-align: right;
  font-variant-numeric: tabular-nums;
  color: var(--or);
  font-weight: 600;
  white-space: nowrap;
}

/* ── Settings modal ────────────────────────────────────────── */
.wp-modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15,20,25,.32);
  z-index: 300;
}

.wp-modal {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: var(--w);
  border-radius: var(--rmd);
  box-shadow: 0 8px 40px rgba(0,0,0,.18);
  z-index: 301;
  width: 340px;
  display: flex;
  flex-direction: column;
}

.wp-modal-hdr {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid var(--g100);
}

.wp-modal-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--g900);
}

.wp-modal-body {
  padding: 20px;
}
.wp-modal-body .fr { margin-bottom: 12px; }
.wp-modal-body .fr:last-child { margin-bottom: 0; }

.wp-modal-footer {
  padding: 14px 20px;
  border-top: 1px solid var(--g100);
  display: flex;
  justify-content: flex-end;
}

/* ══════════════════════════════════════════════════════════════
   MY WEEK TAB
═══════════════════════════════════════════════════════════════ */

.wp-myweek-layout {
  display: flex;
  flex: 1;
  overflow: hidden;
  min-height: 0;
}

/* ── Project browser (left pane) ───────────────────────────── */
.wp-proj-browser {
  width: 260px;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  border-right: 1px solid var(--g100);
  background: var(--w);
  overflow: hidden;
}

.wp-proj-search-wrap {
  padding: 10px 10px 6px;
  flex-shrink: 0;
  position: relative;
}

.wp-proj-search {
  width: 100%;
  font-family: var(--f);
  font-size: 12.5px;
  padding: 7px 30px 7px 10px;
  border: 1.5px solid var(--g200);
  border-radius: var(--rsm);
  outline: none;
  color: var(--g900);
  background: var(--g50);
  box-sizing: border-box;
  transition: border-color .15s, background .15s;
}
.wp-proj-search:focus { border-color: var(--or); background: var(--w); box-shadow: 0 0 0 3px rgba(250,166,26,.1); }
.wp-proj-search::placeholder { color: var(--g400); }

.wp-proj-search-clear {
  position: absolute;
  right: 16px;
  top: 50%;
  transform: translateY(-50%);
  width: 18px;
  height: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  background: var(--g200);
  border: none;
  border-radius: 50%;
  color: var(--g600);
  font-size: 13px;
  line-height: 1;
  cursor: pointer;
  transition: background .12s, color .12s;
}
.wp-proj-search-clear:hover { background: var(--g400); color: var(--w); }

.wp-proj-list-scroll {
  flex: 1;
  overflow-y: auto;
  padding: 4px 6px;
}

.wp-proj-list { display: flex; flex-direction: column; }

.wp-proj-item {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 8px 6px 8px 8px;
  border-radius: var(--rsm);
  cursor: grab;
  transition: background .1s, filter .1s;
  border-bottom: 1px solid var(--g100);
}
.wp-proj-item:last-child { border-bottom: none; }
.wp-proj-item:hover { background: var(--g50); }
.wp-proj-item:active { cursor: grabbing; }
/* Starred items use inline tinted background — hover via filter so inline bg is preserved */
.wp-proj-item.wp-proj-starred:hover { background: transparent; filter: brightness(0.96); }

.wp-proj-item-body {
  flex: 1;
  min-width: 0;
  pointer-events: none;
}

.wp-proj-code {
  font-size: 12px;
  font-weight: 700;
  color: var(--g900);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.wp-proj-company {
  font-size: 11.5px;
  color: var(--g600);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-top: 1px;
}

.wp-proj-name {
  font-size: 11px;
  color: var(--g400);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-top: 1px;
}

.wp-star-btn {
  flex-shrink: 0;
  width: 26px;
  height: 26px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  color: var(--g200);
  padding: 0;
  transition: color .12s, background .12s;
}
.wp-star-btn:hover  { color: var(--or); background: var(--g50); }
.wp-star-btn.starred { color: var(--or); }

.wp-proj-divider {
  height: 1px;
  background: var(--g200);
  margin: 6px 4px;
}

/* Unbillable template block */
.wp-unbillable-row {
  padding: 8px 8px 10px;
  border-top: 1px solid var(--g100);
  flex-shrink: 0;
}

.wp-unbil-template {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 8px 9px;
  min-height: 64px;
  background: #f1f0ea;
  border: 1px solid #e6e6e2;
  border-radius: var(--rsm);
  cursor: grab;
  transition: filter .1s;
  user-select: none;
  box-sizing: border-box;
}
.wp-unbil-template:hover  { filter: brightness(0.97); }
.wp-unbil-template:active { cursor: grabbing; }

.wp-unbil-tmpl-hdr {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: #a6a59d;
  pointer-events: none;
}

.wp-unbil-tmpl-row {
  display: flex;
  align-items: flex-start;
  gap: 7px;
  flex: 1;
}

.wp-unbil-grip {
  flex-shrink: 0;
  color: #a6a59d;
  pointer-events: none;
  margin-top: 2px;
}

.wp-unbil-tmpl-input {
  flex: 1;
  font-family: var(--f);
  font-size: 11.5px;
  font-weight: 600;
  padding: 0;
  border: none;
  outline: none;
  background: transparent;
  color: #5d5c55;
  min-width: 0;
  cursor: text;
  line-height: 1.4;
  resize: none;
}
.wp-unbil-tmpl-input::placeholder { color: #a6a59d; }

/* ── Calendar pane (right) ─────────────────────────────────── */
.wp-cal-pane {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  min-width: 0;
  background: var(--w);
  position: relative;
}

/* Delete bin — appears when dragging a task event */
.wp-del-bin {
  position: absolute;
  top: 50px;
  right: 20px;
  width: 52px;
  height: 52px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--w);
  border: 1.5px solid var(--g200);
  border-radius: var(--rmd);
  color: var(--g400);
  box-shadow: var(--sm);
  z-index: 20;
  opacity: 0;
  pointer-events: none;
  transition: opacity .15s, background .15s, border-color .15s, color .15s, transform .15s;
  transform: scale(.9);
}
.wp-del-bin.wp-bin-visible {
  opacity: 1;
  pointer-events: auto;
  transform: scale(1);
}
.wp-del-bin.wp-bin-hover {
  background: #fee2e2;
  border-color: #dc2626;
  color: #dc2626;
  transform: scale(1.12);
}

.wp-cal-el {
  flex: 1;
  min-height: 0;
  padding: 8px 14px 0;
  overflow: hidden;
  /* The grid is a drag surface — never let a click-drag select event text
     (Ctrl-drag to duplicate is especially prone to starting a text selection). */
  -webkit-user-select: none;
  user-select: none;
}

/* FullCalendar theme overrides */
.wp-cal-el .fc               { height: 100%; font-family: var(--f); font-size: 12px; }
.wp-cal-el .fc-toolbar-title { font-size: 13px; font-weight: 600; }
.wp-cal-el .fc-button {
  font-family: var(--f);
  font-size: 11.5px;
  font-weight: 600;
  background: var(--w);
  border-color: var(--g200);
  color: var(--g600);
  text-transform: capitalize;
  padding: 4px 10px;
}
.wp-cal-el .fc-button:hover                                   { background: var(--g50); border-color: var(--g400); color: var(--g900); }
.wp-cal-el .fc-button-primary:not(.fc-button-active):not(:disabled) { background: var(--w); }
.wp-cal-el .fc-button-active,
.wp-cal-el .fc-button-primary.fc-button-active                { background: var(--or) !important; border-color: var(--or) !important; color: #fff !important; }
.wp-cal-el .fc-button:focus                                   { box-shadow: 0 0 0 3px rgba(250,166,26,.2); }
.wp-cal-el .fc-timegrid-col.fc-day-today                      { background: rgba(250,166,26,.04); }
.wp-cal-el .fc-event                                          { font-size: 11px; border-radius: 4px; cursor: pointer; border: none; }
.wp-cal-el .fc-event.wp-task-evt                              { border-width: 1px !important; border-style: solid !important; }

/* Alt-drag to duplicate: a floating ghost copy follows the cursor (the original
   event is never touched). See wpGhostMouseDown. */
.wp-drag-ghost {
  position: fixed;
  z-index: 500;
  pointer-events: none;
  box-sizing: border-box;
  border: 1px solid #e6e6e2;
  border-radius: 4px;
  background: #f1f0ea;
  color: #5d5c55;
  padding: 4px 6px;
  overflow: hidden;
  opacity: .72;
  box-shadow: var(--sm);
}
.wp-drag-ghost-title {
  font-family: var(--f);
  font-size: 12.5px;
  font-weight: 700;
  line-height: 1.18;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
body.wp-ghosting, body.wp-ghosting * { cursor: copy !important; -webkit-user-select: none; user-select: none; }
.wp-cal-el .fc-col-header-cell-cushion                        { text-decoration: none; color: var(--g900); padding: 4px 0; }

/* Day column header */
.wp-col-hdr        { display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 2px 0 4px; }
.wp-col-day-name   { font-size: 12px; font-weight: 600; color: var(--g900); }
.wp-col-stats      { font-size: 10.5px; color: var(--g400); display: flex; align-items: center; gap: 4px; flex-wrap: wrap; justify-content: center; }
.wp-ds-sep         { color: var(--g200); }

/* Colour states for day stats / week summary */
.wp-buf-grn { color: #16a34a; font-weight: 600; }
.wp-buf-amb { color: #d97706; font-weight: 600; }
.wp-buf-red { color: #dc2626; font-weight: 600; }

/* Custom event content */
.wp-evt {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 4px 6px;
  height: 100%;
  overflow: hidden;
}
/* Project name / description: never shrinks — always shown first */
.wp-evt-proj {
  font-size: 12.5px;
  font-weight: 700;
  line-height: 1.18;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  flex-shrink: 0;
}
/* Code row: collapses when not enough room */
.wp-evt-code {
  font-size: 11px;
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  flex-shrink: 1;
  min-height: 0;
  opacity: .8;
}
/* Description row: optional free-text note; wraps up to 2 lines, collapses under pressure */
.wp-evt-desc {
  font-size: 11px;
  line-height: 1.25;
  font-weight: 500;
  opacity: .72;
  overflow: hidden;
  flex-shrink: 2;
  min-height: 0;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  word-break: break-word;
}
/* Billable / unbilled row: pinned to bottom, collapses before the code row */
.wp-evt-bill {
  font-size: 11px;
  flex-shrink: 3;
  min-height: 0;
  overflow: hidden;
  display: flex;
  align-items: center;
  gap: 4px;
  opacity: .85;
}
/* Saturated dot preceding the Billable label */
.wp-evt-dot {
  display: inline-block;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  flex-shrink: 0;
}
.wp-evt-unbil-lbl { opacity: .75; }

/* Outlook event */
.wp-evt-ol {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  padding: 2px 4px;
  height: 100%;
  overflow: hidden;
}
.wp-evt-ol-title { font-size: 11px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wp-cal-el .wp-outlook-evt { opacity: .75; }
/* Meeting marked billable: orange edge always visible, label when tall enough.
   Inset box-shadow rather than border-left — FullCalendar sets border-color
   inline on the event element, which would override a stylesheet border. */
.wp-cal-el .wp-outlook-evt.wp-ol-billable {
  box-shadow: inset 3px 0 0 var(--or);
  opacity: .9;
}
.wp-evt-ol-bill { color: var(--or); }
.wp-evt-ol-bill .wp-evt-dot { background: var(--or); }

/* Note line in the Outlook meeting detail panel */
.wp-ol-note {
  font-size: 12px;
  color: var(--g400);
  margin: -4px 0 8px;
}

/* Undo action inside the Week Planner toast */
.wp-toast-undo {
  font-family: inherit;
  font-size: 12px;
  font-weight: 600;
  color: var(--w);
  background: rgba(255, 255, 255, .16);
  border: 1px solid rgba(255, 255, 255, .35);
  border-radius: 6px;
  padding: 3px 10px;
  margin-left: 4px;
  cursor: pointer;
}
.wp-toast-undo:hover { background: rgba(255, 255, 255, .28); }

/* Week summary bar */
.wp-week-summary {
  flex-shrink: 0;
  border-bottom: 1px solid var(--g100);
  padding: 7px 16px;
  min-height: 34px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  background: var(--w);
}

/* Person picker (view-as) */
.wp-view-picker {
  font-family: var(--f);
  font-size: 12px;
  font-weight: 500;
  padding: 4px 8px;
  border: 1.5px solid var(--g200);
  border-radius: var(--rsm);
  background: var(--w);
  color: var(--g600);
  cursor: pointer;
  outline: none;
  flex-shrink: 0;
  transition: border-color .15s, color .15s;
}
.wp-view-picker:focus { border-color: var(--or); }
.wp-week-summary.wp-viewing-other .wp-view-picker {
  border-color: var(--or);
  color: var(--or);
  font-weight: 600;
}

/* Right-hand group: duplicate hint + person picker */
.wp-ws-right { display: flex; align-items: center; gap: 14px; flex-shrink: 0; }
.wp-dup-hint {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11.5px;
  color: var(--g400);
  white-space: nowrap;
  user-select: none;
}
.wp-dup-hint svg { color: var(--g300); flex-shrink: 0; }
.wp-dup-hint kbd {
  font-family: var(--f);
  font-size: 10.5px;
  font-weight: 600;
  color: var(--g600);
  background: var(--g50);
  border: 1px solid var(--g200);
  border-radius: 4px;
  padding: 0 5px;
  line-height: 16px;
}
/* Hint is irrelevant when viewing someone else's week (read-only) or when the
   strip gets tight. */
.wp-week-summary.wp-viewing-other .wp-dup-hint { display: none; }
@media (max-width: 980px) { .wp-dup-hint { display: none; } }
.wp-wk-inner {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 12px;
  color: var(--g600);
  flex-wrap: wrap;
}
.wp-wk-lbl {
  font-size: 10.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .07em;
  color: var(--g400);
}
.wp-wk-sep { color: var(--g200); }
.wp-wk-inner strong { color: var(--g900); }

/* ── Detail panel ──────────────────────────────────────────── */
.wp-detail-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15,20,25,.32);
  z-index: 200;
}

.wp-detail-panel {
  position: fixed;
  top: var(--hdr-h, 63px);
  right: 0;
  bottom: 0;
  width: 420px;
  background: var(--w);
  z-index: 201;
  display: flex;
  flex-direction: column;
  box-shadow: -6px 0 24px rgba(0,0,0,.1);
  transform: translateX(100%);
  transition: transform 220ms cubic-bezier(.2,.7,.3,1);
  overflow: hidden;
}
.wp-detail-panel.open { transform: translateX(0); }

.wp-detail-hdr {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 18px;
  border-bottom: 1px solid var(--g100);
  flex-shrink: 0;
}
.wp-detail-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--g900);
}

.wp-detail-body {
  flex: 1;
  overflow-y: auto;
  padding: 18px;
}
.wp-detail-body .fr   { margin-bottom: 12px; }
.wp-detail-body .fg2  { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 12px; }
.wp-detail-body .fg2 .fr { margin-bottom: 0; }

.wp-detail-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 8px;
}

.wp-del-btn {
  color: #dc2626 !important;
  border-color: #dc2626 !important;
}
.wp-del-btn:hover { background: #dc2626 !important; color: #fff !important; }

.wp-toggle-label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--g600);
  cursor: pointer;
  user-select: none;
}
.wp-toggle-label input { accent-color: var(--or); cursor: pointer; }

.wp-readonly-input {
  background: var(--g50) !important;
  color: var(--g400) !important;
  cursor: default;
}

/* Toast */
#panel-week-planner .toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: var(--g900);
  color: var(--w);
  padding: 10px 20px;
  border-radius: var(--rlg);
  font-size: 13px;
  font-weight: 500;
  opacity: 0;
  pointer-events: none;
  transition: opacity .22s, transform .22s;
  z-index: 400;
  white-space: nowrap;
}
#panel-week-planner .toast.show  { opacity: 1; transform: translateX(-50%) translateY(0); }
#panel-week-planner .toast.err   { background: #dc2626; }
