/* Fixboard views: the report form, the issue page (resolution panel,
   timeline, replies, team controls) and the team page. The board is in
   board.css. */

/* ------------------------------------------------------------ report form */

.page--report .page-head, .page--admin .page-head { max-width: 720px; }
.report-layout { display: grid; grid-template-columns: minmax(0, 1fr); gap: 24px; align-items: start; }
@media (min-width: 1000px) { .report-layout { grid-template-columns: minmax(0, 720px) minmax(0, 300px); gap: 32px; } }
.report-form { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.form-section {
  display: flex; flex-direction: column; gap: 18px;
  padding: 18px 16px 20px; border-radius: var(--radius-lg);
  background: var(--surface); border: 1px solid var(--border); box-shadow: var(--shadow-1);
}
@media (min-width: 720px) { .form-section { padding: 22px 24px 24px; } }
.form-section__head { display: flex; align-items: flex-start; gap: 12px; }
.form-section__num {
  flex-shrink: 0; display: inline-flex; align-items: center; justify-content: center;
  width: 28px; height: 28px; margin-top: 1px; border-radius: 50%;
  background: var(--brand-wash); color: var(--brand-ink); font-weight: 750; font-size: 0.875rem;
}
.form-section__heading { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.form-section__title { font-size: 1.1875rem; font-weight: 700; letter-spacing: -0.01em; line-height: 1.35; }
.form-section__intro { color: var(--text-3); font-size: 0.9375rem; }
.form-section__body { display: flex; flex-direction: column; gap: 20px; }
.form-submit { display: flex; flex-direction: column; gap: 12px; padding: 4px 0 0; }
.form-submit .btn--lg { width: 100%; }
@media (min-width: 720px) { .form-submit .btn--lg { width: auto; align-self: flex-start; min-width: 240px; } }
.form-submit__alt { color: var(--text-3); font-size: 0.9375rem; display: flex; align-items: center; flex-wrap: wrap; }

.report-tips {
  display: none; position: sticky; top: calc(var(--header-h) + 20px);
  padding: 20px; border-radius: var(--radius-lg);
  background: var(--surface); border: 1px solid var(--border); box-shadow: var(--shadow-1);
}
@media (min-width: 1000px) { .report-tips { display: flex; flex-direction: column; gap: 12px; } }
.report-tips__title { font-size: 1rem; font-weight: 700; }
.report-tips__list { display: flex; flex-direction: column; gap: 10px; }
.report-tips__list li { display: flex; gap: 10px; align-items: flex-start; color: var(--text-2); font-size: 0.9375rem; }
.report-tips__list .icon { flex-shrink: 0; margin-top: 2px; color: var(--st-fixed); }
.report-tips__note {
  display: flex; gap: 8px; align-items: flex-start; margin-top: 4px; padding-top: 12px; border-top: 1px solid var(--border);
  color: var(--st-needs-ink); font-size: 0.875rem; font-weight: 600;
}
.report-tips__note .icon { flex-shrink: 0; margin-top: 2px; }

/* ------------------------------------------------------------ issue page */

.issue-body { display: flex; flex-direction: column; gap: 20px; }
.issue-skeleton { display: flex; flex-direction: column; gap: 14px; }
.issue-head { display: flex; flex-direction: column; gap: 12px; }
.issue-head__top { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.issue-head__id { color: var(--text-3); font-weight: 700; font-size: 1.0625rem; font-variant-numeric: tabular-nums; }
.issue-head__team { margin-left: auto; }
@media (min-width: 960px) { .issue-head__team { display: none; } }
.issue-title { font-size: 1.5rem; line-height: 1.25; font-weight: 750; letter-spacing: -0.02em; overflow-wrap: anywhere; }
@media (min-width: 900px) { .issue-title { font-size: 1.875rem; } }
.issue-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; color: var(--text-2); font-size: 0.9375rem; }
.issue-meta__item { overflow-wrap: anywhere; }
/* The issue page shows the whole project name: it wraps instead of the
   board's ellipsis. */
.issue-meta .chip--project { white-space: normal; overflow-wrap: anywhere; }

.issue-layout { display: grid; grid-template-columns: minmax(0, 1fr); gap: 20px; align-items: start; }
.issue-main { display: flex; flex-direction: column; gap: 20px; min-width: 0; }
.issue-aside { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
@media (min-width: 960px) {
  .issue-layout { grid-template-columns: minmax(0, 1fr) 340px; gap: 28px; }
}

.issue-section {
  display: flex; flex-direction: column; gap: 16px;
  padding: 18px 16px 20px; border-radius: var(--radius-lg);
  background: var(--surface); border: 1px solid var(--border); box-shadow: var(--shadow-1);
}
@media (min-width: 720px) { .issue-section { padding: 22px 24px 24px; } }
.issue-section__title { display: flex; align-items: center; gap: 8px; font-size: 1.125rem; font-weight: 700; }
.issue-section__count {
  padding: 0 8px; border-radius: var(--radius-pill); background: var(--surface-3); color: var(--text-2);
  font-size: 0.8125rem; font-weight: 700; line-height: 1.6;
}
.report-block { display: flex; flex-direction: column; gap: 4px; }
.report-block__label { font-size: 0.8125rem; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; color: var(--text-3); }
.report-block__text { color: var(--text); }
.report-facts { display: grid; gap: 8px; padding: 12px 14px; border-radius: var(--radius); background: var(--surface-2); border: 1px solid var(--border); }
.report-facts__row { display: grid; grid-template-columns: 72px minmax(0, 1fr); gap: 12px; font-size: 0.9375rem; }
.report-facts__row dt { color: var(--text-3); font-weight: 600; }

.details-card { display: flex; flex-direction: column; gap: 14px; padding: 18px; }
.details-card__list { display: flex; flex-direction: column; gap: 10px; }
.details-card__row { display: grid; grid-template-columns: 112px minmax(0, 1fr); gap: 10px; align-items: baseline; font-size: 0.9375rem; }
.details-card__row dt { color: var(--text-3); font-weight: 600; }
.details-card__row dd { overflow-wrap: anywhere; }
.details-card .btn { align-self: flex-start; }
@media (max-width: 959px) { .details-card { display: none; } }

/* ------------------------------------------------------------ resolution panel */

.resolution {
  overflow: hidden; border-radius: var(--radius-lg);
  background: var(--surface); border: 1px solid var(--border); box-shadow: var(--shadow-2);
}
.resolution.is-resolved { border-color: rgba(22, 163, 74, 0.45); }
.resolution.is-partial { border-color: rgba(13, 148, 136, 0.45); }
.resolution__head {
  display: flex; align-items: center; gap: 16px; padding: 20px 18px;
  background: var(--c-bg); color: var(--c-ink);
}
.resolution__mark {
  flex-shrink: 0; display: inline-flex; align-items: center; justify-content: center;
  width: 60px; height: 60px; border-radius: 50%;
  background: var(--surface); color: var(--c); box-shadow: 0 0 0 6px var(--halo);
}
.resolution.is-resolved .resolution__mark {
  background: var(--st-fixed-mark); color: #FFFFFF;
  box-shadow: 0 0 0 7px rgba(22, 163, 74, 0.18), 0 8px 20px rgba(22, 163, 74, 0.35);
  animation: check-pop 0.5s var(--ease) both;
}
.resolution.is-resolved .resolution__mark .icon { stroke-width: 3; }
.resolution__heading { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.resolution__title { font-size: 1.5rem; font-weight: 800; letter-spacing: -0.02em; line-height: 1.2; }
.resolution__lead { font-weight: 600; }
.resolution__by { font-size: 0.875rem; opacity: 0.95; }
.resolution__content { display: flex; flex-direction: column; gap: 18px; padding: 20px 18px; }
.resolution__block { display: flex; flex-direction: column; gap: 6px; }
.resolution__label { font-size: 0.8125rem; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; color: var(--text-3); }
.resolution__text { font-size: 1rem; }
.resolution__ref { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; color: var(--text-3); font-size: 0.875rem; }
.resolution__ref code { padding: 2px 6px; border-radius: 6px; background: var(--code-bg); color: var(--text-2); overflow-wrap: anywhere; }
.resolution__counts { display: flex; flex-wrap: wrap; gap: 8px 16px; }
.resolution__answers { display: flex; flex-direction: column; gap: 12px; padding: 18px; border-top: 1px solid var(--border); background: var(--surface-2); }
.resolution__ask { font-weight: 700; }
.resolution__buttons { display: flex; flex-wrap: wrap; gap: 10px; }
.resolution__buttons .btn { flex: 1 1 180px; }
@media (min-width: 720px) {
  .resolution__head, .resolution__content, .resolution__answers { padding-left: 24px; padding-right: 24px; }
  .resolution__buttons .btn { flex: 0 0 auto; }
}
@keyframes check-pop {
  0% { transform: scale(0.4); opacity: 0; }
  60% { transform: scale(1.08); opacity: 1; }
  100% { transform: scale(1); }
}

/* ------------------------------------------------------------ timeline */

/* Each entry draws the connector down to the next icon, so a single entry
   has no stray line and the line always stops at the last icon. */
.tl { display: flex; flex-direction: column; gap: 18px; }
.tl-item { position: relative; display: flex; gap: 12px; }
.tl-item:not(:last-child)::after {
  content: ""; position: absolute; left: 15px; top: 36px; bottom: -14px; width: 2px;
  border-radius: 1px; background: var(--border-mid);
}
.tl-item__icon {
  position: relative; z-index: 1; flex-shrink: 0; display: inline-flex; align-items: center; justify-content: center;
  width: 32px; height: 32px; border-radius: 50%;
  background: var(--surface-3); color: var(--text-2); box-shadow: 0 0 0 4px var(--surface);
}
.tl-item.tone-open .tl-item__icon { background: var(--st-open-bg); color: var(--st-open); }
.tl-item.tone-in_progress .tl-item__icon { background: var(--st-progress-bg); color: var(--st-progress); }
.tl-item.tone-needs_info .tl-item__icon { background: var(--st-needs-bg); color: var(--st-needs); }
.tl-item.tone-resolved .tl-item__icon { background: var(--st-fixed-mark); color: #FFFFFF; }
.tl-item.tone-partial .tl-item__icon { background: var(--st-partial-bg); color: var(--st-partial); }
.tl-item.tone-declined .tl-item__icon { background: var(--st-declined-bg); color: var(--st-declined); }
.tl-item.tone-warn .tl-item__icon { background: var(--urgent-bg); color: var(--urgent); }
.tl-item__main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 8px; padding-top: 5px; }
/* The head reads as one sentence ("Ubhay [Team] closed this as [Fixed]")
   and wraps like text; badges sit inline on the same baseline. */
.tl-item__head { color: var(--text-2); font-size: 0.9375rem; line-height: 1.7; overflow-wrap: anywhere; }
.tl-item__head > .tag, .tl-item__head > .badge { vertical-align: 1px; margin: 0 2px; }
.tl-item__author { color: var(--text); font-weight: 700; }
/* The time has its own line under the sentence, so it never wraps onto a
   line of its own that starts with a separator. */
.tl-item__time { display: block; color: var(--text-3); font-size: 0.875rem; line-height: 1.45; white-space: nowrap; }
.tl-item__body { padding: 12px 14px; border-radius: var(--radius); background: var(--surface-2); border: 1px solid var(--border); }
.tl-item.is-hidden .tl-item__main { padding: 8px 10px 10px; border-radius: var(--radius); border: 1px dashed var(--border-mid); background: repeating-linear-gradient(135deg, transparent 0 10px, var(--surface-3) 10px 12px); }
.tl-item__toggle { align-self: flex-start; }

/* ------------------------------------------------------------ replies */

.reply-form { display: flex; flex-direction: column; gap: 16px; }
.reply-form__title { font-size: 1rem; font-weight: 700; }
.reply-form__actions { display: flex; flex-wrap: wrap; gap: 10px; }
.reply-form__actions .btn--primary { min-width: 160px; }
@media (max-width: 559px) { .reply-form__actions .btn { flex: 1 1 140px; } }
.resolution__form:empty { display: none; }
.resolution__form .reply-form { padding: 16px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--border); }

/* ------------------------------------------------------------ team controls */

.team {
  display: flex; flex-direction: column; overflow: hidden;
  border-radius: var(--radius-lg); background: var(--surface);
  border: 1px solid var(--border); box-shadow: var(--shadow-1);
}
.team__head { display: flex; flex-direction: column; gap: 4px; padding: 16px 18px; background: var(--brand-wash); color: var(--brand-ink); }
.team__title { display: flex; align-items: center; gap: 8px; font-size: 1.0625rem; font-weight: 750; }
.team__byline { font-size: 0.875rem; color: var(--text-2); display: flex; flex-wrap: wrap; align-items: center; gap: 0 6px; }
.team__byline a { display: inline-flex; align-items: center; min-height: 44px; font-weight: 700; }
.team__section { border-top: 1px solid var(--border); }
.team__summary {
  display: flex; align-items: center; gap: 10px; min-height: 52px; padding: 0 18px;
  font-weight: 650; cursor: pointer; list-style: none;
}
.team__summary::-webkit-details-marker { display: none; }
@media (hover: hover) { .team__summary:hover { background: var(--surface-2); } }
.team__summary .icon:first-child { color: var(--text-3); }
.team__chevron { margin-left: auto; color: var(--text-3); transition: transform 0.2s var(--ease); }
.team__section[open] .team__chevron { transform: rotate(180deg); }
.team__body { padding: 4px 18px 20px; }
.team__form { display: flex; flex-direction: column; gap: 16px; }
.team__form > .btn { align-self: flex-start; }
.team__help { color: var(--text-2); font-size: 0.9375rem; }
.team .choices--segmented { grid-template-columns: 1fr; }
@media (min-width: 560px) and (max-width: 959px) { .team .choices--segmented { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.md-preview { border: 1px dashed var(--border-strong); border-radius: var(--radius); padding: 12px 14px; background: var(--surface-2); display: flex; flex-direction: column; gap: 8px; }
.md-preview__label { font-size: 0.8125rem; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; color: var(--text-3); }
.md-preview__empty { color: var(--text-3); font-size: 0.9375rem; }

/* ------------------------------------------------------------ team page */

.admin-slot { max-width: 720px; }
.admin-stack { display: flex; flex-direction: column; gap: 16px; }
.admin-card { display: flex; flex-direction: column; gap: 18px; padding: 20px; }
@media (min-width: 720px) { .admin-card { padding: 24px; } }
.admin-card > .btn { align-self: flex-start; }
.admin-card__title { font-size: 1.1875rem; font-weight: 700; }
.admin-card__status { display: flex; gap: 14px; align-items: flex-start; }
.admin-card__shield { flex-shrink: 0; display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; border-radius: 50%; background: var(--brand-wash); color: var(--brand-ink); }
.admin-card__name { display: flex; flex-direction: column; gap: 12px; }
.admin-card__name .btn { align-self: flex-start; }
.attention { display: flex; flex-direction: column; gap: 10px; padding: 20px; }
@media (min-width: 720px) { .attention { padding: 24px; } }
.attention__list { display: flex; flex-direction: column; margin-top: 4px; }
.attention__item + .attention__item { border-top: 1px solid var(--border); }
.attention__link { display: flex; align-items: center; gap: 12px; min-height: 56px; padding: 10px 4px; color: inherit; text-decoration: none; }
@media (hover: hover) { .attention__link:hover .attention__title { color: var(--brand-ink); text-decoration: underline; } }
.attention__link > .icon { flex-shrink: 0; margin-left: auto; color: var(--text-3); }
.attention__text { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.attention__title { font-weight: 650; overflow-wrap: anywhere; }
.attention__meta { color: var(--text-3); font-size: 0.875rem; }
.attention__text .tag { align-self: flex-start; }
