/* ============================================================
   omniOne: product mocks of the coach dashboard.
   .wk is the shared week calendar (hero + preview);
   .cockpit is the full dashboard shown in the preview section.
   Everything is opaque: no backdrop blur on moving or overlapping parts.
   ============================================================ */

/* ----------  Week calendar  ---------- */
.wk { container: wk / inline-size; min-width: 0; color: var(--c-700); font-size: 12px; }
.wk-head { display: flex; align-items: center; gap: 8px; margin-bottom: 11px; min-width: 0; }
.wk-nav {
  width: 26px; height: 26px;
  flex: none;
  display: grid; place-items: center;
  border: 1px solid var(--glass-border);
  border-radius: 8px;
  color: var(--c-500);
}
.wk-nav svg { width: 14px; height: 14px; }
.wk-kw { flex: none; color: var(--c-900); font-size: 0.95rem; letter-spacing: -0.01em; }
.wk-range { min-width: 0; overflow: hidden; color: var(--c-500); text-overflow: ellipsis; white-space: nowrap; }
.wk-seg {
  flex: none;
  display: flex;
  margin-left: auto;
  padding: 2px;
  border: 1px solid var(--glass-border);
  border-radius: 9px;
  background: var(--glass-inset);
}
.wk-seg span { padding: 4px 9px; border-radius: 7px; color: var(--c-500); font-size: 0.7rem; font-weight: 600; }
.wk-seg .on { background: var(--surface); color: var(--c-900); box-shadow: var(--shadow-xs); }

.wk-body { display: grid; grid-template-columns: 112px minmax(0, 1fr); gap: 8px; }
.wk-backlog {
  display: flex;
  flex-direction: column;
  gap: 3px;
  padding: 10px;
  border: 1px solid var(--tone-red-line);
  border-radius: 12px;
  background: linear-gradient(var(--tone-red-bg), var(--tone-red-bg)), var(--surface);
}
.wk-backlog b { color: var(--tone-red); font-size: 1.45rem; line-height: 1; }
.wk-backlog-label { margin-bottom: 6px; color: var(--tone-red); font-size: 0.7rem; font-weight: 600; }
.wk-backlog-row { display: flex; justify-content: space-between; gap: 6px; color: var(--c-700); font-size: 0.68rem; white-space: nowrap; }
.wk-backlog-row em { color: var(--tone-red); font-style: normal; font-weight: 600; }

.wk-days {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  overflow: hidden;
  border: 1px solid var(--glass-border);
  border-radius: 12px;
  background: var(--surface);
}
.wk-day {
  min-width: 0;
  min-height: 150px;
  display: flex;
  flex-direction: column;
  padding: 8px 5px 6px;
  border-left: 1px solid var(--glass-border);
}
.wk-day:first-child { border-left: 0; }
.wk-day.is-weekend { background: var(--glass-inset); }
.wk-day.is-today { background: color-mix(in srgb, var(--sky) 7%, var(--surface)); }
.wk-dow { color: var(--c-500); font-size: 0.6rem; font-weight: 700; letter-spacing: 0.06em; text-align: center; text-transform: uppercase; }
.wk-num {
  width: 24px; height: 24px;
  margin: 3px auto 0;
  border-radius: 999px;
  color: var(--c-900);
  font-size: 0.86rem;
  font-weight: 600;
  line-height: 24px;
  text-align: center;
  font-variant-numeric: tabular-nums;
}
.is-today .wk-num { background: var(--sky); color: #fff; }
:root[data-theme="dark"] .is-today .wk-num { color: #04223a; }
.wk-tag {
  visibility: hidden;
  margin: 2px 0 6px;
  color: var(--sky-dark);
  font-size: 0.56rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  line-height: 1.2;
  text-align: center;
  text-transform: uppercase;
}
.is-today .wk-tag { visibility: visible; }
.wk-events { display: flex; flex-direction: column; gap: 4px; }
.wk-ev {
  display: block;
  overflow: hidden;
  padding: 3px 5px;
  border: 1px solid var(--tone-line);
  border-radius: 7px;
  background: var(--tone-bg);
  color: var(--tone);
  font-size: 0.64rem;
  font-weight: 600;
  text-overflow: ellipsis;
  white-space: nowrap;
  transition: opacity 200ms ease;
}
.wk-ev::before {
  content: "";
  display: inline-block;
  width: 6px; height: 6px;
  margin-right: 4px;
  border-radius: 2px;
  background: currentColor;
  vertical-align: 1px;
}
.is-past .wk-num, .is-past .wk-events { opacity: 0.62; }
.wk-count {
  margin-top: auto;
  padding-top: 5px;
  border-top: 1px solid var(--glass-border);
  color: var(--c-500);
  font-size: 0.64rem;
  text-align: center;
}

@container wk (max-width: 620px) {
  .wk-body { grid-template-columns: 94px minmax(0, 1fr); }
  .wk-day { padding-inline: 3px; }
  .wk-ev { padding: 2px 3px; font-size: 0.58rem; }
  .wk-ev::before { display: none; }
}
/* Phones: the week becomes a swipeable strip with the backlog pinned on the left. */
@container wk (max-width: 500px) {
  .wk-range { display: none; }
  .wk-body {
    display: flex;
    gap: 6px;
    overflow-x: auto;
    overscroll-behavior-x: contain;
    scroll-snap-type: x mandatory;
    scroll-padding-left: 118px;
    scrollbar-width: none;
  }
  .wk-body::-webkit-scrollbar { display: none; }
  .wk-backlog { position: sticky; left: 0; z-index: 1; flex: 0 0 112px; }
  .wk-days { display: flex; gap: 6px; overflow: visible; border: 0; background: none; }
  .wk-day {
    flex: 0 0 84px;
    min-height: 140px;
    padding-inline: 5px;
    border: 1px solid var(--glass-border);
    border-radius: 11px;
    background: var(--surface);
    scroll-snap-align: start;
  }
  .wk-day:first-child { border-left: 1px solid var(--glass-border); }
  .wk-day.is-weekend { background: linear-gradient(var(--glass-inset), var(--glass-inset)), var(--surface); }
  .wk-day.is-today { border-color: var(--sky); }
  .wk-ev { padding: 3px 5px; font-size: 0.62rem; }
}

/* ----------  Dashboard frame  ---------- */
.cockpit {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--glass-border);
  border-radius: 24px;
  background: var(--surface);
  box-shadow: var(--shadow-panel);
  color: var(--c-700);
  font-size: 13px;
}
.svg-sprite { position: absolute; width: 0; height: 0; overflow: hidden; }

.ck-top {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--glass-border);
}
.ck-bar-start { display: flex; align-items: center; gap: 12px; }
.ck-bar-center { flex: 1; display: flex; justify-content: center; min-width: 0; }
.ck-menu {
  width: 32px; height: 32px;
  flex: none;
  display: grid; place-items: center;
  border: 1px solid var(--glass-border);
  border-radius: 9px;
  background: var(--glass-inset);
  color: var(--c-600);
}
.ck-menu svg { width: 17px; height: 17px; }
.ck-brand { display: flex; align-items: center; gap: 9px; }
.ck-logo img { width: 26px; height: 26px; }
.ck-title strong { color: var(--c-900); font-size: 0.92rem; letter-spacing: -0.01em; }
.ck-top-right { display: flex; align-items: center; gap: 10px; }
.ck-search {
  display: flex; align-items: center; gap: 8px;
  height: 32px;
  min-width: 230px;
  padding: 0 14px;
  border: 1px solid var(--glass-border);
  border-radius: 10px;
  background: var(--glass-inset);
  color: var(--c-500);
  font-size: 0.78rem;
  white-space: nowrap;
}
.ck-search svg { width: 14px; height: 14px; }
.ck-bell {
  position: relative;
  width: 32px; height: 32px;
  display: grid; place-items: center;
  border: 1px solid var(--glass-border);
  border-radius: 9px;
  background: var(--glass-inset);
  color: var(--c-600);
}
.ck-bell svg { width: 16px; height: 16px; }
.ck-bell .dot {
  position: absolute;
  top: -5px; right: -5px;
  min-width: 17px; height: 17px;
  padding: 0 4px;
  display: grid; place-items: center;
  border: 2px solid var(--surface);
  border-radius: 999px;
  background: #dc2626;
  color: #fff;
  font-size: 0.6rem;
  font-weight: 700;
}
.ck-chip {
  display: flex; align-items: center; gap: 8px;
  height: 34px;
  padding: 0 12px 0 5px;
  border: 1px solid var(--glass-border);
  border-radius: 999px;
  background: var(--glass-inset);
}
.ck-chip .av {
  width: 24px; height: 24px;
  display: grid; place-items: center;
  border-radius: 999px;
  background: var(--sky-bg);
  color: var(--sky-dark);
  font-size: 0.6rem;
  font-weight: 800;
}
.ck-chip .role { display: grid; line-height: 1.1; }
.ck-chip .role b { color: var(--c-900); font-size: 0.74rem; white-space: nowrap; }
.ck-chip .role span { color: var(--c-500); font-size: 0.54rem; letter-spacing: 0.09em; text-transform: uppercase; white-space: nowrap; }

.ck-main { display: grid; gap: 16px; padding: 18px 20px 20px; }
.ck-pagehead { display: flex; align-items: center; gap: 11px; }
.ck-ph-ic {
  width: 34px; height: 34px;
  flex: none;
  display: grid; place-items: center;
  border-radius: 10px;
  background: var(--sky-bg);
  color: var(--sky-dark);
}
.ck-ph-ic svg { width: 17px; height: 17px; }
.ck-pagehead strong {
  color: var(--c-900);
  font-family: "Libre Baskerville", Georgia, serif;
  font-size: 1.3rem;
  font-weight: 400;
  letter-spacing: -0.01em;
}
.ck-status-all {
  margin-left: auto;
  padding: 7px 12px;
  border-radius: 9px;
  background: var(--c-900);
  color: #fff;
  font-size: 0.74rem;
  font-weight: 700;
  white-space: nowrap;
}
:root[data-theme="dark"] .ck-status-all { background: #f6f8fc; color: #0a0f1d; }

.ck-list { padding-top: 12px; border-top: 1px solid var(--glass-border); }
.ck-list-head { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 2px; }
.ck-list-head b { color: var(--c-900); font-size: 0.92rem; }
.ck-list-head span { color: var(--c-500); font-size: 0.74rem; }
.ck-date {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 12px 0 2px;
  color: var(--c-600);
  font-size: 0.72rem;
  font-weight: 600;
}
.ck-today-tag {
  padding: 1px 7px;
  border-radius: 999px;
  background: var(--sky-bg);
  color: var(--sky-dark);
  font-size: 0.58rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.ck-row {
  display: grid;
  grid-template-columns: 8px 30px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  padding: 8px 6px;
  border-bottom: 1px solid var(--hairline);
  transition: opacity 200ms ease;
}
.ck-row:last-child { border-bottom: 0; }
.ck-unread { width: 6px; height: 6px; border-radius: 999px; background: var(--sky); }
.ck-unread.is-read { background: transparent; }
.ck-ic {
  width: 30px; height: 30px;
  display: grid; place-items: center;
  border: 1px solid var(--tone-line);
  border-radius: 9px;
  background: var(--tone-bg);
  color: var(--tone);
}
.ck-ic svg { width: 15px; height: 15px; }
.ck-txt { display: grid; min-width: 0; }
.ck-txt b { color: var(--c-900); font-size: 0.82rem; }
.ck-txt span { overflow: hidden; color: var(--c-500); font-size: 0.74rem; text-overflow: ellipsis; white-space: nowrap; }
.ck-when { color: var(--c-500); font-size: 0.7rem; white-space: nowrap; }

/* Colour legend focus: everything else steps back */
.cockpit[data-focus] .wk-ev,
.cockpit[data-focus] .ck-row,
.cockpit[data-focus] .wk-backlog { opacity: 0.22; }
.cockpit[data-focus="red"] .t-red,
.cockpit[data-focus="red"] .wk-backlog,
.cockpit[data-focus="amber"] .t-amber,
.cockpit[data-focus="blue"] .t-blue,
.cockpit[data-focus="grey"] .t-grey { opacity: 1; }
.wk-backlog { transition: opacity 200ms ease; }

/* Responsive by container (the preview frame) */
@container ck (max-width: 760px) {
  .ck-search { display: none; }
  .ck-chip .role { display: none; }
  .ck-chip { padding-right: 5px; }
}
@container ck (max-width: 520px) {
  .ck-top { padding: 10px 12px; }
  .ck-bell { display: none; }
  .ck-main { gap: 14px; padding: 14px 12px 14px; }
  .ck-pagehead strong { font-size: 1.12rem; }
  .ck-ph-ic { display: none; }
  .ck-status-all { padding: 6px 9px; font-size: 0.68rem; }
  .ck-row { grid-template-columns: 6px 28px minmax(0, 1fr); gap: 8px; padding-inline: 2px; }
  .ck-when { display: none; }
}
@supports not (container-type: inline-size) {
  @media (max-width: 560px) {
    .ck-search, .ck-chip .role, .ck-bell { display: none; }
  }
}
