:root {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: #20232b;
  background: #fff;
  font-size: 14px;
  line-height: 1.5;
  --brand: #9d2148;
  --muted: #6b7280;
  --line: #e2e5eb;
  --blue: #2860cc;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
}
button,
input,
select,
textarea {
  font: inherit;
}
button,
a,
input,
select,
textarea {
  outline-offset: 3px;
}
button,
a {
  touch-action: manipulation;
}
a {
  color: var(--blue);
  text-decoration: none;
}
a:hover {
  text-decoration: underline;
}
button {
  cursor: pointer;
  background: white;
  border: 1px solid var(--line);
  border-radius: 5px;
  padding: 8px 12px;
  color: inherit;
}
button:hover {
  background: #f4f5f8;
}
button:disabled {
  cursor: not-allowed;
  opacity: 0.55;
}
button:focus-visible,
a:focus-visible {
  outline: 2px solid var(--blue);
}
.sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  width: 216px;
  background: #f6f7fa;
  border-right: 1px solid var(--line);
  padding: 24px 16px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}
.brand {
  display: flex;
  gap: 9px;
  align-items: center;
  color: #25212b;
  font-size: 17px;
  font-weight: 700;
}
.brand img {
  width: 32px;
  height: 32px;
  object-fit: contain;
}
.brand small {
  display: block;
  font-size: 12px;
  color: var(--muted);
  font-weight: 400;
}
.sidebar nav {
  display: grid;
  gap: 5px;
  margin-top: 20px;
}
.sidebar nav button {
  border: 0;
  text-align: left;
  padding: 11px 14px;
  background: transparent;
}
.sidebar nav button.active {
  background: #f1e3e9;
  color: #8f183c;
  border-left: 3px solid var(--brand);
  font-weight: 600;
}
.account-link {
  margin-top: auto;
}
.sidebar > small {
  color: var(--muted);
}
.workspace {
  margin-left: 216px;
}
header {
  height: 66px;
  border-bottom: 1px solid var(--line);
  padding: 0 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  position: sticky;
  top: 0;
  background: #fff;
  z-index: 2;
}
.header-actions {
  display: flex;
  align-items: center;
  gap: 18px;
}
.header-actions > span {
  font-size: 12px;
  color: var(--muted);
}
.icon-button {
  width: 36px;
  height: 36px;
  display: inline-grid;
  place-items: center;
  padding: 0;
  font-size: 22px;
}
main {
  padding: 26px 28px;
  max-width: 1680px;
  margin: auto;
}
.page-heading {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  margin-bottom: 18px;
}
h1 {
  font-size: 25px;
  line-height: 1.25;
  margin: 0;
}
h2 {
  font-size: 18px;
  margin: 0 0 16px;
}
h3 {
  font-size: 14px;
  margin: 22px 0 10px;
}
.eyebrow {
  font-size: 11px;
  color: var(--brand);
  font-weight: 700;
  margin: 0 0 4px;
}
.page-heading > span {
  font-size: 12px;
  color: var(--muted);
}
.notice {
  padding: 10px 14px;
  background: #f4f6f9;
  border-left: 3px solid #ccd0d8;
  margin: 10px 0 20px;
}
.notice.error {
  border-color: #bb3154;
  background: #fff0f3;
  color: #8a1837;
}
.notice:empty {
  display: none;
}
.stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin: 24px 0 28px;
  gap: 0;
}
.stat {
  border-right: 1px solid var(--line);
  padding: 0 20px;
}
.stat:first-child {
  padding-left: 0;
}
.stat:last-child {
  border: 0;
}
.stat span {
  display: block;
  color: var(--muted);
  font-size: 12px;
}
.stat strong {
  display: block;
  font-size: 28px;
  font-weight: 650;
  line-height: 1.6;
}
.stat small {
  font-size: 11px;
  color: var(--muted);
}
.filters {
  display: flex;
  gap: 16px;
  align-items: end;
  margin-bottom: 18px;
}
.filters label {
  display: grid;
  gap: 5px;
  font-size: 12px;
  color: var(--muted);
}
.filters .search {
  flex: 1;
  max-width: 520px;
}
input,
select,
textarea {
  min-width: 0;
  border: 1px solid #d7dbe3;
  border-radius: 5px;
  padding: 9px 11px;
  background: white;
  color: #222;
}
input,
textarea {
  width: 100%;
}
select {
  min-width: 165px;
}
.content {
  min-height: 220px;
}
.table-scroll {
  overflow: auto;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
table {
  border-collapse: collapse;
  width: 100%;
  text-align: left;
  font-size: 13px;
  white-space: nowrap;
}
th {
  font-size: 11px;
  color: var(--muted);
  font-weight: 600;
  background: #f6f7fa;
}
th,
td {
  padding: 13px 12px;
  border-bottom: 1px solid #eef0f4;
}
tbody tr:last-child td {
  border: 0;
}
tbody tr:hover {
  background: #faf7f9;
}
.email-button {
  color: var(--blue);
  padding: 0;
  border: 0;
  background: none;
  text-align: left;
}
.email-button:hover {
  background: none;
  text-decoration: underline;
}
.badge {
  padding: 3px 7px;
  border-radius: 4px;
  background: #f0f1f4;
  font-size: 11px;
}
.badge.good {
  background: #e5f5eb;
  color: #14783b;
}
.badge.error {
  background: #fde8ee;
  color: #a62145;
}
.badge.manual {
  background: #f4e9f0;
  color: #852247;
}
.muted,
.coverage,
.empty {
  color: var(--muted);
}
.coverage {
  font-size: 12px;
  margin-top: 22px;
  max-width: 950px;
}
.empty {
  text-align: center;
  padding: 60px 20px;
}
.facts {
  display: grid;
  grid-template-columns: minmax(130px, 1fr) 2fr;
  gap: 9px;
  margin: 0;
}
.facts dt {
  color: var(--muted);
}
.facts dd {
  margin: 0;
  overflow-wrap: anywhere;
}
.section-band {
  border-top: 1px solid var(--line);
  padding: 22px 0;
}
.section-band:first-child {
  border-top: 0;
}
.section-band h2 {
  margin-bottom: 12px;
}
.section-band p {
  margin: 7px 0;
}
.status-line {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
}
.primary {
  background: var(--brand);
  color: white;
  border-color: var(--brand);
  display: inline-block;
  border-radius: 5px;
  padding: 9px 14px;
}
.primary:hover {
  background: #821c3d;
  color: white;
}
dialog {
  width: min(680px, calc(100% - 28px));
  max-height: 90dvh;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 24px;
  box-shadow: 0 12px 60px #17152324;
}
dialog::backdrop {
  background: #15132155;
}
.dialog-head {
  display: flex;
  justify-content: space-between;
  align-items: start;
  gap: 12px;
  margin-bottom: 20px;
}
.dialog-head h2 {
  font-size: 17px;
  overflow-wrap: anywhere;
  margin: 5px 0;
}
.event-list {
  margin: 0;
  padding-left: 18px;
}
.event-list li {
  padding: 7px 0;
  border-bottom: 1px solid #f0f1f4;
}
.event-list time {
  font-size: 11px;
  color: var(--muted);
  display: block;
}
.draft-form {
  display: grid;
  gap: 14px;
  max-width: 760px;
}
.draft-form label {
  display: grid;
  gap: 5px;
}
.draft-form textarea {
  min-height: 190px;
  resize: vertical;
}
.check-label {
  display: flex !important;
  align-items: start;
  gap: 8px;
}
.check-label input {
  width: auto;
  margin-top: 4px;
}
.draft-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}
.inline-note {
  font-size: 12px;
  color: var(--muted);
}
[hidden] {
  display: none !important;
}
@media (max-width: 1000px) {
  .sidebar {
    width: 172px;
    padding: 20px 10px;
  }
  .brand {
    font-size: 14px;
  }
  .workspace {
    margin-left: 172px;
  }
  main {
    padding: 22px 18px;
  }
  header {
    padding: 0 18px;
  }
  .filters {
    flex-wrap: wrap;
  }
  .filters .search {
    min-width: 220px;
  }
  .stat {
    padding: 0 10px;
  }
}
@media (max-width: 650px) {
  .sidebar {
    position: static;
    width: 100%;
    padding: 14px 16px;
    border-right: 0;
    border-bottom: 1px solid var(--line);
    gap: 8px;
  }
  .brand {
    font-size: 16px;
  }
  .sidebar nav {
    display: flex;
    overflow: auto;
    gap: 4px;
    margin-top: 5px;
  }
  .sidebar nav button {
    flex: none;
    white-space: nowrap;
    font-size: 12px;
    padding: 8px;
  }
  .sidebar nav button.active {
    border-left: 0;
    border-bottom: 2px solid var(--brand);
  }
  .sidebar > small,
  .account-link {
    display: none;
  }
  .workspace {
    margin: 0;
  }
  header {
    height: 54px;
    font-size: 12px;
    padding: 0 16px;
  }
  .header-actions > span {
    display: none;
  }
  .header-actions {
    gap: 12px;
  }
  main {
    padding: 22px 16px;
  }
  .page-heading > span {
    display: none;
  }
  .stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    row-gap: 18px;
  }
  .stat:nth-child(3) {
    padding-left: 0;
  }
  .stat:nth-child(2) {
    border: 0;
  }
  .stat strong {
    font-size: 25px;
  }
  .filters {
    gap: 10px;
  }
  .filters .search {
    min-width: 100%;
    max-width: none;
  }
  .filters > label:not(.search) {
    flex: 1;
    width: calc(50% - 5px);
  }
  select {
    min-width: 0;
    width: 100%;
  }
  .facts {
    grid-template-columns: 1fr 1.5fr;
  }
  dialog {
    padding: 18px;
  }
  .notice {
    font-size: 12px;
  }
}
