/* PRTY OS — home screen styles. Screen-specific layout only; reuse components.css for everything else. */

/* ---------- Header summary ---------- */
.home-summary { display: inline-flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.home-summary__item { display: inline-flex; align-items: center; gap: 6px; color: var(--text-2); }
.home-summary__item.is-critical { color: var(--text); }
.home-summary__sep { color: var(--text-4); }

/* ---------- Attention: three equal columns, dominant ---------- */
.home-attn {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--s-4);
  align-items: stretch;
}
.home-attn__col { display: flex; flex-direction: column; min-height: 280px; overflow: hidden; }
/* Severity line along the top edge — only when the column has items */
.home-attn__col.has-items { box-shadow: inset 0 2px 0 var(--c); }
.home-attn__col--today.has-items { box-shadow: none; }

.home-attn__head {
  display: flex; align-items: flex-start; justify-content: space-between; gap: var(--s-3);
  padding: var(--s-4) var(--s-4) 14px;
  border-bottom: 1px solid var(--line-soft);
}
.home-attn__titles { min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.home-attn__label { display: flex; align-items: center; gap: 8px; font-size: var(--fs-14); font-weight: 600; letter-spacing: -0.01em; }
.home-attn__hint { font-size: var(--fs-12); color: var(--text-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.home-attn__count { font-size: var(--fs-32); font-weight: 600; letter-spacing: -0.03em; line-height: 1; color: var(--c, var(--text)); }
.home-attn__col--today .home-attn__count { color: var(--text); }
.home-attn__count.is-zero { color: var(--text-4); }

.home-attn__body { flex: 1; display: flex; flex-direction: column; }
.home-attn__body .issue { min-height: 52px; }
.home-attn__foot { border-top: 1px solid var(--line-soft); }

.home-attn__sub {
  display: flex; align-items: center; justify-content: space-between;
  height: 30px; padding: 0 var(--s-4);
  background: var(--bg-2);
  border-bottom: 1px solid var(--line-soft);
  border-top: 1px solid var(--line-soft);
  font-size: var(--fs-11); font-weight: 600; text-transform: uppercase; letter-spacing: 0.08em; color: var(--text-3);
}
.home-attn__body > .home-attn__sub:first-child { border-top: 0; }
.home-attn__more .issue__title { font-weight: 400; color: var(--text-2); }
.home-attn__more .issue { min-height: 46px; }

.home-attn__toggle {
  display: flex; align-items: center; gap: 8px; width: 100%;
  height: 40px; padding: 0 var(--s-4);
  color: var(--text-2); font-size: var(--fs-12); font-weight: 500;
  transition: background var(--dur-1), color var(--dur-1);
}
.home-attn__toggle:hover { background: var(--hover); color: var(--text); }
.home-attn__toggle .icon { margin-left: auto; color: var(--text-3); }

.home-clear { display: flex; align-items: center; gap: 8px; padding: var(--s-4); color: var(--text-3); font-size: var(--fs-13); }
.home-clear .icon { color: var(--green); }

/* Rows with a secondary action (decisions) and agenda rows (today) */
.home-row { color: inherit; }
.home-row__link { color: inherit; min-width: 0; }
.home-row__due { font-size: var(--fs-12); color: var(--text-3); white-space: nowrap; }
.home-row__action .icon { color: var(--text-3); }
.home-row__action:hover .icon { color: var(--green); }
@media (hover: hover) {
  .home-row__action { opacity: 0; transition: opacity var(--dur-1) var(--ease); }
  .home-row:hover .home-row__action, .home-row__action:focus-visible { opacity: 1; }
}

.home-agenda__when {
  width: 52px; flex-shrink: 0;
  font-size: var(--fs-12); font-weight: 500; color: var(--text-3);
  white-space: nowrap;
}
.home-agenda__when.is-today { color: var(--text); font-weight: 600; }
.home-agenda .issue__meta .icon { color: var(--text-4); }

/* ---------- Lower sections: same 3-column grid ---------- */
.home-grid3 {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--s-4);
  align-items: stretch;
}
.home-quiet { display: flex; flex-direction: column; }
.home-quiet > .panel__body { flex: 1; }

/* Quiet panels: lighter than the attention section */
.home .panel--quiet .panel__title { font-weight: 600; color: var(--text-2); }
.home .panel--quiet .tbl th { background: var(--bg); }

/* Mini stats row inside quiet panels */
.home-mini { display: grid; grid-template-columns: repeat(var(--mini-cols, 3), minmax(0, 1fr)); border-bottom: 1px solid var(--line-soft); }
.home-mini__cell { display: flex; flex-direction: column; gap: 4px; padding: 12px var(--s-4); min-width: 0; border-left: 1px solid var(--line-soft); color: inherit; transition: background var(--dur-1); }
.home-mini__cell:first-child { border-left: 0; }
.home-mini__cell.is-link:hover { background: var(--hover); }
.home-mini__label { font-size: var(--fs-11); font-weight: 500; text-transform: uppercase; letter-spacing: 0.07em; color: var(--text-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.home-mini__value { font-size: var(--fs-20); font-weight: 600; letter-spacing: -0.02em; line-height: 1.15; white-space: nowrap; }
.home-mini__value.is-zero { color: var(--text-4); }
.home-mini__sub { font-size: var(--fs-12); color: var(--text-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* Ticket sales table */
.home-sales__tbl td { height: 56px; }
.home-evname { display: flex; flex-direction: column; gap: 2px; min-width: 180px; max-width: 280px; color: inherit; }
.home-evname:hover .t-strong { text-decoration: underline; text-decoration-color: var(--line-strong); text-underline-offset: 3px; }
.home-cap { display: flex; flex-direction: column; gap: 6px; width: 180px; }
.home-be { justify-content: flex-end; }
.home-status { display: inline-flex; align-items: center; gap: 4px; padding: 2px 8px; border-radius: 999px; font-size: var(--fs-12); font-weight: 600; white-space: nowrap; border: 1px solid var(--line-strong, var(--line)); color: var(--text-2); }
.home-status.tone-green { color: var(--green); }
.home-status.tone-amber { color: var(--amber); }
.home-held { display: inline-flex; align-items: center; gap: 6px; color: var(--amber); font-weight: 600; }
.home-held__why { max-width: 440px; margin-top: 2px; }
.home-upd { gap: 2px; }
.home-stale { font-size: var(--fs-11, 11px); font-weight: 600; color: var(--amber); border: 1px solid currentColor; border-radius: 4px; padding: 0 4px; width: max-content; }
.home-msale .list-row__main { min-width: 0; }
.home-msale .row--between { flex-wrap: wrap; gap: 2px 8px; }
.home-msale .capbar { width: 100%; }

/* Advancing / marketing / finance rows */
.home-adv { min-height: 56px; }
.home-mkt, .home-inv { min-height: 52px; }
.home-inv__side { flex-direction: column; align-items: flex-end; gap: 1px; }
.home-quiet .panel__foot a { color: var(--text-2); }
.home-quiet .panel__foot a:hover { color: var(--text); }

/* Upcoming events: aligned columns */
.home-up {
  display: grid;
  grid-template-columns: 40px minmax(180px, 1.3fr) 112px minmax(0, 1.4fr) 200px 44px;
  gap: var(--s-4);
  min-height: 60px;
  color: inherit;
}
.home-up__name { min-width: 0; }
.home-up__cap { display: flex; align-items: center; gap: 10px; min-width: 0; }
.home-up__cap .capbar { flex: 1; }
.home-up__cap > .num { width: 34px; text-align: right; }
.home-up__health { display: flex; justify-content: flex-end; }
.home-up__warn { display: inline-flex; align-items: center; gap: 4px; color: var(--c); font-size: var(--fs-12); font-weight: 500; }

/* ---------- Responsive ---------- */
@media (max-width: 1280px) {
  .home-up { grid-template-columns: 40px minmax(160px, 1.2fr) 112px minmax(0, 1fr) 160px 40px; }
}
@media (max-width: 1100px) {
  .home-attn { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .home-attn__col--today { grid-column: 1 / -1; min-height: 0; }
  .home-grid3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .home-grid3 > :last-child { grid-column: 1 / -1; }
  .home-up { grid-template-columns: 40px minmax(0, 1fr) 112px 160px 40px; }
  .home-up__lineup { display: none; }
}
@media (max-width: 720px) {
  .home-attn, .home-grid3 { grid-template-columns: minmax(0, 1fr); }
  .home-attn__col--today, .home-grid3 > :last-child { grid-column: auto; }
  .home-attn__col { min-height: 0; }
  .home-attn__count { font-size: var(--fs-24); }
  .home-attn__body .issue { min-height: 56px; }
  .home-up {
    grid-template-columns: 40px minmax(0, 1fr) auto;
    grid-template-areas: "date name status" "date cap cap";
    row-gap: 8px; column-gap: var(--s-3);
    padding-top: 12px; padding-bottom: 12px;
  }
  .home-up .dateblock { grid-area: date; align-self: start; }
  .home-up__name { grid-area: name; }
  .home-up__status { grid-area: status; align-self: start; }
  .home-up__cap { grid-area: cap; }
  .home-up__health { display: none; }
  .home-mini__value { font-size: 18px; }
}
