/* Weekly reports: weeks, editor, customer map and presentation */
.reports { display: flex; flex-direction: column; gap: 20px; }
.breadcrumb { font-size: 13px; color: var(--text-muted); a:hover { color: var(--brand-strong); } }
.page__actions { display: flex; gap: 8px; align-items: center; }

.bubble {
  display: inline-block; flex: none; width: 18px; height: 18px; border-radius: 50%;
  background: var(--bubble, var(--border-strong));
  &[data-health="red"] { --bubble: var(--danger); } &[data-health="yellow"] { --bubble: var(--warning); } &[data-health="green"] { --bubble: var(--success); }
  &[data-health="none"] { --bubble: var(--border-strong); }
}
.bubble--sm { width: 12px; height: 12px; }
.bubble--lg { width: 28px; height: 28px; }
.bubble--xl { width: 64px; height: 64px; }

.week { display: flex; flex-direction: column; gap: 12px; padding: 16px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); }
.week__head { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.week__title { font-size: 18px; font-weight: 700; }
.pms { display: flex; gap: 6px; margin-left: 8px; }
.pm { position: relative; .avatar { width: 30px; height: 30px; font-size: 12px; } }
.pm__mark {
  position: absolute; right: -4px; bottom: -4px; display: grid; place-items: center; width: 16px; height: 16px; border-radius: 50%;
  font-size: 10px; font-weight: 700; color: #fff; background: var(--warning); box-shadow: 0 0 0 2px var(--surface);
  .icon { width: 11px; height: 11px; stroke-width: 3; }
}
.pm.is-ready .pm__mark { background: var(--success); }
.week__progress { display: flex; align-items: center; gap: 8px; margin-left: auto; }
.week__bar { display: inline-block; width: 120px; height: 6px; border-radius: 3px; background: var(--surface-2); overflow: hidden; span { display: block; height: 100%; background: var(--success); } }
.week__list { display: flex; flex-direction: column; gap: 4px; }
.week__open { align-self: flex-start; }
.week__row {
  display: grid; grid-template-columns: minmax(0, 1fr) 190px minmax(140px, 200px) 64px 120px; align-items: center; gap: 12px;
  padding: 8px 10px; border-radius: var(--radius); color: var(--text); white-space: nowrap;
  &:hover { background: var(--surface-2); }
  .badge { text-align: center; }
}
.week__project { min-width: 0; font-weight: 500; overflow: hidden; text-overflow: ellipsis; }
.week__time { text-align: right; }
.week-history { display: flex; flex-direction: column; gap: 4px; }
.week-history__row { display: flex; align-items: center; gap: 12px; padding: 8px 12px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); }
.week-history__link { display: flex; gap: 8px; min-width: 260px; color: var(--text); &:hover { color: var(--brand-strong); } }
.week-history__bubbles { display: flex; gap: 3px; flex: 1; }
.badge--muted { color: var(--text-muted); background: var(--surface-2); }

.report-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; }
.report-card {
  display: flex; flex-direction: column; gap: 6px; height: 100%; padding: 12px 14px; color: var(--text);
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg);
  &:hover { border-color: var(--border-strong); box-shadow: var(--shadow); }
}
.report-card__top { display: flex; align-items: center; gap: 8px; }
.report-card__foot { display: flex; align-items: center; justify-content: space-between; margin-top: auto; }
.report-card--add { border-style: dashed; &:hover { box-shadow: none; } }
.report-card__form { display: flex; flex-direction: column; gap: 8px; }

.report-editor__fields { border: 0; padding: 0; margin: 0; min-width: 0; display: flex; flex-direction: column; gap: 16px; &:disabled .input, &:disabled .rcol__text { opacity: 0.85; } }
.report-editor__head { display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: space-between; gap: 16px; }
.slide__title h1 { font-size: 26px; font-weight: 700; color: var(--brand); }
.health { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: var(--text-2); .bubble { width: 12px; height: 12px; } }
.health-pick { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; }
.health-pick__row { display: flex; align-items: center; gap: 14px; }
.health-pick__name { font-weight: 600; }
.health-slider { display: flex; align-items: center; gap: 8px; color: var(--text-muted); font-weight: 700; }
.health-slider input {
  width: 180px; height: 8px; margin: 0; appearance: none; border-radius: 4px; cursor: pointer;
  background: linear-gradient(90deg, var(--danger), var(--warning), var(--success));
  &::-webkit-slider-thumb { appearance: none; width: 22px; height: 22px; border-radius: 50%; background: var(--surface); border: 3px solid var(--text); box-shadow: var(--shadow); }
  &::-moz-range-thumb { width: 16px; height: 16px; border-radius: 50%; background: var(--surface); border: 3px solid var(--text); }
}
.health-pick__row[data-health="none"] .health-slider input::-webkit-slider-thumb { border-color: var(--border-strong); }

.health-pick__option { cursor: pointer; input { position: absolute; opacity: 0; pointer-events: none; } .bubble { opacity: 0.45; transition: transform 0.1s; } input:checked + .bubble { opacity: 1; transform: scale(1.15); box-shadow: 0 0 0 3px var(--surface), 0 0 0 5px var(--text-2); } &:hover .bubble { opacity: 1; } }
.report-editor__actions { display: flex; align-items: center; gap: 10px; }

.report-grid { display: grid; gap: 12px; }
.report-grid--columns { grid-template-columns: repeat(5, minmax(0, 1fr)); }

.profile { display: flex; flex-direction: column; gap: 14px; padding: 4px 0 6px; border-bottom: 1px solid var(--border); }
.profile__facts { display: flex; flex-wrap: wrap; gap: 8px 40px; div { display: flex; flex-direction: column; gap: 2px; } dt { font-size: 11px; font-weight: 500; letter-spacing: 0.06em; text-transform: uppercase; color: var(--text-muted); } dd { font-size: 15px; font-weight: 500; } }
.profile__about { max-width: 70ch; color: var(--text-2); line-height: 1.5; }
.tiles { display: flex; flex-wrap: wrap; gap: 10px; }
.tile { display: flex; flex-direction: column; gap: 2px; min-width: 130px; padding: 10px 14px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); &.is-alert .tile__value { color: var(--danger); } }
.tile__value { font-size: 20px; font-weight: 700; line-height: 1.1; }
.tile__label { font-size: 12px; color: var(--text-muted); }
.present .profile__facts dd { font-size: 18px; }
.present .tile__value { font-size: 26px; }
.rcol {
  display: flex; flex-direction: column; min-width: 0; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); overflow: hidden;
  h2 { display: flex; align-items: center; gap: 8px; padding: 8px 12px; font-size: 13px; font-weight: 600; letter-spacing: 0.02em; color: var(--tone); background: color-mix(in srgb, var(--tone) 12%, var(--surface)); border-bottom: 2px solid var(--tone); }
  &[data-tone="summary"] { --tone: var(--accent); } &[data-tone="notes"] { --tone: var(--text-muted); }
  &[data-tone="green"] { --tone: var(--success); } &[data-tone="yellow"] { --tone: var(--warning); } &[data-tone="red"] { --tone: var(--danger); } &[data-tone="blue"] { --tone: var(--brand); }
}
.rcol__fields { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 10px; padding: 12px; label { display: flex; flex-direction: column; gap: 4px; font-size: 12px; color: var(--text-2); } }
.rcol__text { flex: 1; min-height: 180px; padding: 10px 12px; border: 0; background: transparent; color: var(--text); font: inherit; line-height: 1.5; resize: vertical; &:focus { outline: none; background: var(--surface-2); } }
.rcol .markdown { padding: 10px 12px; line-height: 1.5; ul, ol { padding-left: 20px; } }

.wmap { display: flex; flex-direction: column; gap: 16px; }
.wmap .tiles { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); .tile { min-width: 0; } }
.charts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.chart { display: flex; flex-direction: column; gap: 8px; padding: 12px 14px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); }
.chart__title { display: flex; align-items: center; justify-content: space-between; gap: 12px; font-size: 13px; font-weight: 600; }
.chart__legend { display: flex; gap: 12px; font-size: 12px; font-weight: 400; color: var(--text-2); span { display: flex; align-items: center; gap: 5px; } i { width: 10px; height: 10px; border-radius: 2px; } }
.chart__svg { width: 100%; height: auto; font-size: 11px; }
.chart__label { fill: var(--text); font-size: 12px; }
.chart__value { fill: var(--text-muted); }
.present .chart__label { font-size: 13px; }

.cmap { display: flex; flex-direction: column; gap: 8px; }
.cmap__row { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 8px; align-items: stretch; --tone: var(--border-strong); }
.cmap__row[data-health="red"] { --tone: var(--danger); } .cmap__row[data-health="yellow"] { --tone: var(--warning); } .cmap__row[data-health="green"] { --tone: var(--success); }
.cmap__status {
  display: flex; align-items: center; gap: 8px; padding: 10px 14px; font-size: 13px; font-weight: 500;
  border-radius: var(--radius-lg); border: 1px solid color-mix(in srgb, var(--tone) 40%, var(--border)); background: color-mix(in srgb, var(--tone) 10%, var(--surface));
}
.cmap__lane {
  display: flex; flex-wrap: wrap; align-content: flex-start; gap: 6px; min-height: 44px; padding: 8px 10px;
  border-radius: var(--radius-lg); border: 1px dashed color-mix(in srgb, var(--tone) 35%, var(--border)); background: color-mix(in srgb, var(--tone) 6%, var(--surface));
}
.cmap__project { display: inline-flex; align-items: center; gap: 4px; padding: 4px 10px; border-radius: 999px; background: var(--surface); border: 1px solid var(--border-strong); color: var(--text); font-size: 13px; font-weight: 500; &:hover { border-color: var(--tone); color: var(--brand-strong); } }
.cmap__trend { margin-left: 3px; font-size: 11px; color: var(--text-muted); }

body.present { display: flex; flex-direction: column; min-height: 100dvh; background: var(--bg); }
.present .slide { flex: 1; display: flex; flex-direction: column; gap: 20px; padding: 36px 48px; max-width: 1400px; width: 100%; margin: 0 auto; }
.present .slide__title h1 { font-size: 40px; }
.slide__head { display: flex; align-items: flex-start; justify-content: space-between; gap: 24px; }
.slide__logo { height: 36px; }
.slide__health { display: flex; align-items: center; gap: 24px; }
.slide__status { display: flex; flex-direction: column; align-items: center; gap: 6px; text-align: center; strong { font-size: 15px; } }
.legend { display: flex; flex-direction: column; gap: 4px; font-size: 13px; li { display: flex; align-items: center; gap: 8px; } }
.present .rcol .markdown { font-size: 17px; }
.present .report-grid--columns .rcol { min-height: 300px; }
.present__bar { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 10px 24px; border-top: 1px solid var(--border); background: var(--surface); }
.present__dots { display: flex; gap: 6px; }
.present__dot { width: 10px; height: 10px; padding: 0; border: 0; border-radius: 50%; background: var(--border-strong); cursor: pointer; &[aria-current="true"] { background: var(--brand); } }

@media (max-width: 899px) {
  .week__row { grid-template-columns: minmax(0, 1fr) auto; white-space: normal; .hint:not(.week__time), .badge { display: none; } }
  .report-grid--columns { grid-template-columns: 1fr; }
  .wmap .tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .charts { grid-template-columns: 1fr; }
  .cmap__row { grid-template-columns: 1fr; }
  .present .slide { padding: 20px 16px; }
}
