/* Team dashboard, on top of home.css and team.css. Most of the markup is drawn by dashboard.js. */

/* Header band: nav, notices, then the sign-in hero or the team's title and figures. */
.dash-hero .wrap { padding-bottom: 0; }
.dash-hero #notice { margin: 0 0 8px; }
#signin.team-hero .hero-grid { padding-top: 24px; }
.dash-band { padding: 8px 0 40px; }
.dash-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: 16px 24px; }
.dash-head .eyebrow { margin-bottom: 14px; }
.dash-head h1 { font-size: clamp(36px, 4.6vw, 60px); letter-spacing: -.045em; margin: 0 0 10px; line-height: 1.02; }
.dash-head .account { font-size: 14px; margin: 0; display: flex; flex-wrap: wrap; gap: 4px 12px; }
.dash-head .account strong { font-weight: 500; }
.company-picker { display: grid; gap: 6px; font-size: 12px; font-weight: 600; letter-spacing: 1.5px; text-transform: uppercase; }
.company-picker select { min-width: 220px; text-transform: none; letter-spacing: 0; font-weight: 500; }

.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 32px; margin-top: 30px; }
.stats:empty { display: none; }
.stat { border-top: 1px solid var(--night-line); padding: 18px 0 0; display: grid; gap: 4px; }
.stat .muted { font-size: 13px; color: var(--night-muted); }
.stat strong { font-size: 36px; font-weight: 500; letter-spacing: -1px; font-variant-numeric: tabular-nums; line-height: 1.15; }

/* Body */
.dash-body { padding-top: 36px; padding-bottom: 72px; }
.notice.banner { margin: 0 0 12px; }
.notice[data-kind="caution"] { background: #fff1d6; color: #6b3d00; }
.notice a { color: inherit; font-weight: 600; text-decoration: underline; text-underline-offset: 3px; }

select, textarea, input[type="search"] {
  font: inherit; font-size: 15px; color: var(--ink); background: #fff; border: 1px solid #cfcdc5; border-radius: 10px; padding: 11px 14px;
}
select { padding-right: 36px; appearance: none; background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%2320201f' stroke-width='1.6'/%3E%3C/svg%3E") no-repeat right 14px center; }
textarea { width: 100%; resize: vertical; }
input[type="search"] { width: 100%; }
select:focus-visible, textarea:focus-visible, input:focus-visible, button:focus-visible, a:focus-visible { outline: 3px solid var(--orange); outline-offset: 2px; }

.button { display: inline-flex; align-items: center; justify-content: center; text-align: center; }
.button.secondary { background: transparent; color: var(--ink); border: 1px solid var(--ink); padding: 11px 16px; }
.button.secondary:hover:not(:disabled) { background: #fff; }
.filters .button.secondary { padding: 11px 16px; font-size: 14px; }

.toolbar { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 14px; align-items: center; margin: 12px 0 18px; }
.tabs { display: inline-flex; flex-wrap: wrap; background: #fff; border: 1px solid var(--line); border-radius: 999px; padding: 4px; gap: 2px; }
.tabs button { border: 0; background: none; color: var(--muted); padding: 9px 16px; border-radius: 999px; font-size: 14px; font-weight: 500; }
.tabs button:hover { color: var(--ink); }
.tabs button[aria-selected="true"] { background: var(--ink); color: #fff; }
.filters { display: flex; flex-wrap: wrap; gap: 8px; }

.report-list { background: #fff; border: 1px solid var(--line); border-radius: 16px; overflow: hidden; }
.report-row {
  font: inherit; color: inherit; text-align: left; width: 100%; border: 0; background: none;
  display: grid; grid-template-columns: 1fr auto 220px; gap: 20px; align-items: center; padding: 18px 22px;
  border-bottom: 1px solid var(--line);
}
.report-row:last-child { border-bottom: 0; }
.report-row:hover { background: #fbfaf6; }
.report-row:focus-visible { outline: 3px solid var(--orange); outline-offset: -3px; }
.report-row .who, .report-row .figures { display: grid; gap: 2px; }
.report-row .who strong { font-weight: 600; font-size: 16px; }
.report-row .figures { text-align: right; font-variant-numeric: tabular-nums; }
.report-row .figures strong { font-size: 18px; font-weight: 600; }
/* home.css uses .status for the hero phone; reset it here. */
.report-row .status { display: block; margin: 0; padding: 0; font-size: 13px; font-weight: 600; justify-self: end; text-align: right; }
.report-row .status::before { content: ''; display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: currentColor; margin-right: 8px; vertical-align: 1px; }
[data-tone="brand"] { color: var(--orange-deep); }
[data-tone="positive"] { color: #2f6b2a; }
[data-tone="caution"] { color: #a15c00; }
[data-tone="muted"] { color: var(--muted); }
.empty { padding: 56px 20px; text-align: center; }
.empty p { margin: 4px 0; font-size: 16px; }
.empty .muted { font-size: 14px; }

/* Report detail */
dialog.detail { border: 0; border-radius: 18px; padding: 0; width: min(900px, calc(100vw - 32px)); max-height: calc(100vh - 48px);
  background: var(--paper); color: var(--ink); box-shadow: 0 30px 80px #0000004d; }
dialog.detail::backdrop { background: #20201fb3; }
.detail-inner { padding: 30px clamp(18px, 4vw, 38px) 36px; }
.detail-head { display: flex; justify-content: space-between; gap: 16px; align-items: flex-start; border-bottom: 1px solid var(--line); padding-bottom: 18px; }
.detail-head h2 { margin: 0 0 6px; font-size: 28px; letter-spacing: -1px; font-weight: 600; line-height: 1.15; }
.detail-head p { margin: 0; }
.detail .close { font-size: 14px; border: 1px solid var(--ink); border-radius: 8px; padding: 8px 14px; text-decoration: none; }
.detail-figures { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin: 22px 0; }
.detail-figures div { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; display: grid; gap: 2px; }
.detail-figures strong { font-size: 24px; font-weight: 600; letter-spacing: -.5px; font-variant-numeric: tabular-nums; }
.detail-figures .muted { font-size: 13px; }
.detail h3 { font-size: 13px; font-weight: 600; letter-spacing: 1.5px; text-transform: uppercase; margin: 28px 0 10px; }
.detail .table-scroll { overflow-x: auto; margin: 0; background: #fff; border: 1px solid var(--line); border-radius: 12px; }
table.data { width: 100%; border-collapse: collapse; font-size: 14px; }
table.data th, table.data td { text-align: left; padding: 11px 14px; border-bottom: 1px solid var(--line); vertical-align: top; }
table.data tbody tr:last-child td { border-bottom: 0; }
table.data th { font-weight: 600; font-size: 12px; color: var(--muted); background: #f6f5f0; }
table.data .num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.review { background: var(--sand); border-radius: 14px; padding: 6px 20px 20px; }
.review h3 { margin-top: 16px; }
.review-status { font-weight: 600; margin: 0 0 12px; font-size: 15px; }
.review p { font-size: 14px; }
.actions-row { display: flex; gap: 8px; flex-wrap: wrap; }
.send-back { display: grid; grid-template-columns: 1fr auto; gap: 8px; align-items: start; margin-top: 14px; }
.caution { color: #a15c00; }
.small { font-size: 13px !important; }
.contact-chooser { display: grid; gap: 8px; margin: 0 0 14px; }
.contact-chooser p { margin: 0; }
.contact-results { display: grid; gap: 4px; }
.contact { font: inherit; font-size: 14px; text-align: left; background: #fff; border: 1px solid var(--line); border-radius: 10px; padding: 10px 14px; color: var(--ink); }
.contact:hover { border-color: var(--ink); }
.detail-actions { margin-top: 24px; }

@media (max-width: 900px) {
  .stats { gap: 10px; }
  .stat { padding: 14px 0 0; }
  .stat strong { font-size: 26px; }
}
@media (max-width: 680px) {
  .stats { grid-template-columns: 1fr; }
  .dash-head { display: block; }
  .company-picker { margin-top: 18px; }
  .company-picker select { width: 100%; }
  .toolbar { display: grid; }
  .tabs { display: grid; grid-template-columns: 1fr 1fr; border-radius: 14px; }
  .tabs button { border-radius: 10px; }
  .filters select { flex: 1 1 140px; }
  .report-row { grid-template-columns: 1fr auto; gap: 8px 16px; padding: 16px; }
  .report-row .status { grid-column: 1 / -1; justify-self: start; text-align: left; }
  .detail-figures { grid-template-columns: 1fr 1fr; }
  .send-back { grid-template-columns: 1fr; }
}

@media print {
  body.dashboard-page > *:not(dialog) { display: none !important; }
  dialog.detail { position: static; display: block; width: auto; max-height: none; box-shadow: none; background: #fff; }
  dialog.detail::backdrop { display: none; }
  .review, .close, .detail-actions { display: none !important; }
}
