:root {
  --bg: #d9dde3;
  --surface: #ffffff;
  --surface-strong: #101828;
  --text: #182230;
  --muted: #667085;
  --line: #d9e2ec;
  --green: #1f9d55;
  --blue: #2f80ed;
  --amber: #f2a007;
  --red: #dc3e42;
  --teal: #0694a2;
  --shadow: 0 18px 50px rgba(16, 24, 40, 0.11);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "Segoe UI", Arial, sans-serif;
  line-height: 1.5;
}

a {
  color: inherit;
}

.app-header {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 14px clamp(16px, 4vw, 48px);
  background: rgba(255, 255, 255, 0.92);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(14px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-width: 220px;
  text-decoration: none;
}

.brand-mark {
  width: 42px;
  height: 42px;
  border-radius: 8px;
  object-fit: cover;
}

.brand strong,
.brand small {
  display: block;
}

.brand small,
.panel-label,
.report-card small {
  color: var(--muted);
  font-size: 0.86rem;
}

.main-nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.main-nav a,
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 9px 14px;
  border-radius: 8px;
  text-decoration: none;
  font-weight: 700;
}

.main-nav a {
  color: var(--muted);
}

.main-nav a:hover {
  background: #e9eef5;
  color: var(--text);
}

.section-band {
  padding: clamp(36px, 7vw, 76px) clamp(16px, 4vw, 48px);
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(300px, 0.92fr);
  gap: clamp(24px, 4vw, 54px);
  align-items: center;
  min-height: calc(100vh - 72px);
  background:
    linear-gradient(120deg, rgba(16, 24, 40, 0.92), rgba(16, 24, 40, 0.68)),
    url("https://images.unsplash.com/photo-1551288049-bebda4e38f71?auto=format&fit=crop&w=1600&q=80") center/cover;
  color: #ffffff;
}

.hero h1 {
  max-width: 760px;
  margin: 0;
  font-size: clamp(2.35rem, 6vw, 5rem);
  line-height: 1;
  letter-spacing: 0;
}

.hero-text {
  max-width: 680px;
  color: rgba(255, 255, 255, 0.82);
  font-size: 1.14rem;
}

.eyebrow {
  margin: 0 0 10px;
  color: var(--teal);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.hero .eyebrow {
  color: #8de3dd;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 28px;
}

.button.primary {
  background: #ffffff;
  color: var(--surface-strong);
}

.button.secondary {
  border: 1px solid rgba(255, 255, 255, 0.45);
  color: #ffffff;
}

.button.upload-button {
  border: 0;
  background: var(--surface-strong);
  color: #ffffff;
  cursor: pointer;
}

.button.upload-button:disabled {
  cursor: wait;
  opacity: 0.62;
}

.outline-button {
  border: 1px solid var(--surface-strong);
  background: transparent;
  color: var(--surface-strong);
}

.ghost-button {
  border: 1px solid var(--line);
  background: #f7fafc;
  color: var(--muted);
  cursor: pointer;
}

.status-panel,
.chart-shell,
.report-card,
.metric-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.status-panel {
  display: grid;
  gap: 20px;
  padding: clamp(20px, 3vw, 30px);
  color: var(--text);
}

.status-panel strong {
  display: block;
  margin-top: 4px;
  font-size: 1.7rem;
}

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

.mini-card {
  min-height: 96px;
  padding: 14px;
  border-radius: 8px;
  background: #f7fafc;
}

.mini-card strong {
  font-size: 1.45rem;
}

.section-heading {
  max-width: 760px;
  margin-bottom: 24px;
}

.section-heading h2 {
  margin: 0;
  font-size: clamp(1.8rem, 4vw, 3rem);
  line-height: 1.05;
  letter-spacing: 0;
}

.section-heading p:last-child {
  color: var(--muted);
}

.access-body {
  min-height: 100vh;
}

.access-main {
  display: grid;
  place-items: center;
  min-height: calc(100vh - 72px);
  padding: clamp(24px, 6vw, 64px);
}

.access-shell {
  width: min(100%, 760px);
  padding: clamp(22px, 4vw, 34px);
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.access-shell.is-hidden {
  display: none;
}

.is-hidden {
  display: none !important;
}

.access-shell .section-heading {
  margin-bottom: 18px;
}

.access-shell h1 {
  margin: 0;
  font-size: clamp(2rem, 5vw, 3.2rem);
  line-height: 1.05;
  letter-spacing: 0;
}

.login-form,
.mail-form {
  display: grid;
  gap: 14px;
}

.login-form label,
.mail-form label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-weight: 800;
}

.login-form input,
.mail-form input,
.mail-form select,
.mail-form textarea {
  width: 100%;
  min-height: 44px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f7fafc;
  color: var(--text);
  font: inherit;
  font-weight: 700;
}

.mail-form textarea {
  min-height: 150px;
  resize: vertical;
}

.login-form input:focus,
.mail-form input:focus,
.mail-form select:focus,
.mail-form textarea:focus,
.file-picker:focus-within {
  border-color: var(--teal);
  outline: 3px solid rgba(6, 148, 162, 0.14);
}

.compact-upload {
  box-shadow: none;
}

.mail-shell {
  margin-top: 18px;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.mail-shell .section-heading {
  margin-bottom: 14px;
}

.mail-shell h2 {
  margin: 0;
  font-size: clamp(1.45rem, 3vw, 2rem);
  line-height: 1.08;
  letter-spacing: 0;
}

.mail-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.inbox-layout {
  display: grid;
  grid-template-columns: minmax(260px, 0.9fr) minmax(320px, 1.1fr);
  gap: 12px;
}

.inbox-list,
.inbox-reader {
  min-height: 300px;
  max-height: 520px;
  overflow: auto;
}

.inbox-empty {
  margin: 0;
  padding: 14px;
  border: 1px dashed var(--line);
  border-radius: 8px;
  color: var(--muted);
  font-weight: 800;
}

.inbox-empty.is-error {
  color: var(--red);
}

.inbox-item {
  display: grid;
  gap: 6px;
  width: 100%;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fafc;
  cursor: pointer;
  font: inherit;
  text-align: left;
}

.inbox-item + .inbox-item {
  margin-top: 10px;
}

.inbox-item:hover,
.inbox-item.is-active {
  border-color: var(--teal);
  background: rgba(6, 148, 162, 0.08);
}

.inbox-item-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}

.inbox-item-head strong {
  color: var(--text);
}

.inbox-item-head time,
.inbox-item p {
  color: var(--muted);
  font-size: 0.88rem;
}

.inbox-item p {
  margin: 0;
}

.inbox-preview {
  color: var(--text) !important;
  white-space: pre-wrap;
}

.inbox-reader {
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
}

.inbox-reader-head {
  display: grid;
  gap: 4px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
}

.inbox-reader h3 {
  margin: 0;
  color: var(--text);
  font-size: 1.15rem;
  line-height: 1.2;
}

.inbox-reader time {
  color: var(--muted);
  font-size: 0.86rem;
  font-weight: 800;
}

.inbox-meta {
  display: grid;
  gap: 8px;
  margin: 14px 0;
}

.inbox-meta div {
  display: grid;
  grid-template-columns: 82px 1fr;
  gap: 10px;
}

.inbox-meta dt,
.inbox-meta dd {
  margin: 0;
  min-width: 0;
  overflow-wrap: anywhere;
}

.inbox-meta dt {
  color: var(--muted);
  font-weight: 900;
}

.inbox-body {
  padding: 14px;
  border-radius: 8px;
  background: #f8fafc;
  color: var(--text);
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.inbox-body.is-empty {
  border: 1px dashed var(--line);
  color: var(--muted);
  font-weight: 800;
}

.access-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 16px;
}

.dashboard-grid {
  display: grid;
  grid-template-columns: minmax(260px, 360px) minmax(0, 1fr);
  gap: 18px;
  align-items: stretch;
}

.metric-list {
  display: grid;
  gap: 12px;
}

.metric-card {
  padding: 18px;
  box-shadow: none;
}

.metric-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.metric-name {
  font-size: 1.35rem;
  font-weight: 800;
}

.metric-value {
  font-size: 1.65rem;
  font-weight: 800;
}

.meter {
  height: 10px;
  margin-top: 14px;
  overflow: hidden;
  border-radius: 999px;
  background: #e9eef5;
}

.meter span {
  display: block;
  height: 100%;
  border-radius: inherit;
}

.chart-shell {
  position: relative;
  min-width: 0;
  padding: 18px;
  box-shadow: none;
}

.chart-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 12px;
}

.chart-tools {
  display: grid;
  justify-items: end;
  gap: 10px;
}

.status-filter,
.month-filter,
.week-filter {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 6px;
}

.date-range-filter {
  display: inline-grid;
  gap: 6px;
  justify-items: stretch;
  padding: 8px;
  border: 1px solid #cfd7e3;
  border-radius: 2px;
  background: #ffffff;
  color: var(--text);
  box-shadow: 0 12px 24px rgba(16, 24, 40, 0.12);
}

.date-range-title {
  color: var(--text);
  font-size: 0.78rem;
  font-weight: 900;
  line-height: 1;
}

.date-range-fields {
  display: grid;
  grid-template-columns: minmax(112px, 1fr) minmax(112px, 1fr) 26px;
  align-items: end;
  gap: 6px;
}

.date-range-filter label {
  display: grid;
  gap: 4px;
  min-width: 0;
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 800;
}

.date-range-filter input {
  width: 100%;
  min-height: 28px;
  padding: 4px 7px;
  border: 1px solid var(--line);
  border-radius: 2px;
  background: #f7fafc;
  color: #111827;
  font: inherit;
  font-size: 0.78rem;
  font-weight: 800;
}

.date-clear {
  width: 26px;
  height: 28px;
  border: 1px solid var(--line);
  border-radius: 2px;
  background: #f7fafc;
  color: var(--muted);
  cursor: pointer;
  font-size: 0.82rem;
  font-weight: 900;
  line-height: 1;
}

.date-clear:hover {
  border-color: var(--teal);
  color: var(--teal);
}

.filter-toggle {
  min-height: 32px;
  padding: 6px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f7fafc;
  color: var(--muted);
  cursor: pointer;
  font-size: 0.82rem;
  font-weight: 800;
}

.filter-toggle.is-active {
  border-color: var(--teal);
  background: rgba(6, 148, 162, 0.1);
  color: var(--teal);
}

.legend {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px;
}

.legend-toggle {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 34px;
  padding: 6px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f7fafc;
  color: var(--muted);
  cursor: pointer;
  font-size: 0.86rem;
  font-weight: 700;
}

.legend-toggle.is-active {
  border-color: rgba(16, 24, 40, 0.2);
  background: #ffffff;
  color: var(--text);
  box-shadow: 0 8px 18px rgba(16, 24, 40, 0.08);
}

.legend-toggle:not(.is-active) {
  opacity: 0.48;
}

.legend-toggle i {
  width: 10px;
  height: 10px;
  border-radius: 999px;
}

canvas {
  display: block;
  width: 100%;
  max-height: 420px;
}

.chart-tooltip {
  position: absolute;
  z-index: 2;
  display: grid;
  gap: 6px;
  min-width: 168px;
  padding: 12px;
  border: 1px solid rgba(16, 24, 40, 0.18);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 16px 34px rgba(16, 24, 40, 0.16);
  color: var(--text);
  opacity: 0;
  pointer-events: none;
  transform: translateY(4px);
  transition: opacity 120ms ease, transform 120ms ease;
}

.chart-tooltip.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.chart-tooltip strong {
  margin-bottom: 2px;
  font-size: 0.92rem;
}

.chart-tooltip span {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  color: var(--muted);
  font-size: 0.88rem;
  font-weight: 700;
}

.chart-tooltip i {
  width: 9px;
  height: 9px;
  margin-right: auto;
  border-radius: 999px;
}

.chart-tooltip b {
  color: var(--text);
}

.advisor-table-shell {
  margin-top: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.ac-chart-shell {
  margin-top: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.ac-chart {
  padding: 18px;
}

.ac-chart-summary {
  display: inline-grid;
  gap: 2px;
  min-width: 120px;
  margin-bottom: 14px;
  padding: 12px 14px;
  border-radius: 8px;
  background: #f7fafc;
}

.ac-chart-summary strong {
  font-size: 1.6rem;
  line-height: 1;
}

.ac-list {
  display: grid;
  gap: 10px;
}

.ac-item {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
}

.ac-item[open] {
  box-shadow: 0 14px 34px rgba(16, 24, 40, 0.08);
}

.ac-row {
  display: grid;
  grid-template-columns: minmax(220px, 0.42fr) minmax(220px, 1fr) 52px;
  gap: 12px;
  align-items: center;
  min-height: 54px;
  padding: 12px 14px;
  cursor: pointer;
  list-style: none;
}

.ac-row::-webkit-details-marker {
  display: none;
}

.ac-row::before {
  content: "+";
  display: grid;
  width: 22px;
  height: 22px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 4px;
  color: var(--muted);
  font-weight: 800;
  grid-column: 1;
  grid-row: 1;
}

.ac-item[open] .ac-row::before {
  content: "-";
}

.ac-label {
  overflow: hidden;
  padding-left: 34px;
  color: var(--text);
  font-size: 0.86rem;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
  grid-column: 1;
  grid-row: 1;
}

.ac-track {
  height: 26px;
  overflow: hidden;
  border-radius: 4px;
  background: linear-gradient(90deg, #eef8fb, #d7edf5);
}

.ac-track span {
  display: block;
  min-width: 5px;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #79c9e0, #125e78);
}

.ac-row strong {
  color: var(--text);
  text-align: right;
  font-size: 0.95rem;
}

.ac-detail {
  border-top: 1px solid var(--line);
  overflow-x: auto;
}

.ac-detail-table {
  width: 100%;
  min-width: 680px;
  border-collapse: collapse;
  font-size: 0.84rem;
}

.ac-detail-table th,
.ac-detail-table td {
  padding: 10px 14px;
  border-bottom: 1px solid var(--line);
  text-align: left;
}

.ac-detail-table th {
  background: #f7fafc;
  color: var(--muted);
  font-size: 0.76rem;
  text-transform: uppercase;
}

.ac-detail-table tr:last-child td {
  border-bottom: 0;
}

.table-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 18px;
  border-bottom: 1px solid var(--line);
}

.table-heading strong {
  display: block;
  margin-top: 2px;
  font-size: 1.05rem;
}

.table-tools {
  display: grid;
  justify-items: end;
  gap: 8px;
}

.table-scroll {
  max-height: 520px;
  overflow: auto;
}

.table-empty {
  padding: 22px;
  color: var(--muted);
  font-weight: 700;
}

.advisor-table {
  width: 100%;
  min-width: 1180px;
  border-collapse: collapse;
  font-size: 0.86rem;
}

.advisor-table th {
  position: sticky;
  top: 0;
  z-index: 1;
  padding: 10px 8px;
  background: #124f64;
  color: #ffffff;
  font-weight: 700;
  text-align: center;
  vertical-align: bottom;
}

.advisor-table td {
  padding: 6px 8px;
  border-bottom: 1px solid #b9d8e6;
  color: #101828;
  text-align: center;
  white-space: nowrap;
}

.advisor-table .identity-cell {
  background: #c4e7f3;
  text-align: left;
}

.advisor-table .group-cell {
  background: #48b3d7;
  color: #ffffff;
  font-weight: 800;
  vertical-align: top;
}

.advisor-table .group-cell.light {
  background: #c4e7f3;
  color: #101828;
}

.advisor-table tbody tr:hover td {
  filter: brightness(0.97);
}

.advisor-table tfoot td {
  position: sticky;
  bottom: 0;
  border-top: 2px solid #124f64;
  background: #ffffff;
  font-weight: 800;
}

.upload-shell {
  display: grid;
  grid-template-columns: minmax(220px, 0.65fr) minmax(280px, 1fr);
  gap: 16px;
  align-items: center;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.upload-copy strong {
  display: block;
  margin-top: 4px;
  font-size: 1.35rem;
}

.upload-form {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px;
}

.file-picker {
  position: relative;
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  min-width: min(100%, 280px);
  padding: 9px 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f7fafc;
  color: var(--text);
  cursor: pointer;
  font-weight: 800;
}

.file-picker input {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}

.upload-status {
  grid-column: 1 / -1;
  min-height: 22px;
  margin: 0;
  color: var(--muted);
  font-weight: 800;
}

.upload-status.is-loading {
  color: var(--blue);
}

.upload-status.is-success {
  color: var(--green);
}

.upload-status.is-error {
  color: var(--red);
}

.monitor-cell {
  background: #ffffff;
  text-align: center;
  font-weight: 800;
}

.score-cell {
  text-align: center;
}

.heat-good {
  background: #63be7b;
}

.heat-mid {
  background: #ffeb84;
}

.heat-low {
  background: #f4a261;
}

.heat-bad {
  background: #f8696b;
}

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

.report-card {
  display: grid;
  min-height: 150px;
  align-content: end;
  gap: 6px;
  padding: 20px;
  text-decoration: none;
  box-shadow: none;
  transition: transform 160ms ease, box-shadow 160ms ease;
}

.report-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow);
}

.report-card span {
  color: var(--teal);
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
}

.report-card strong {
  font-size: 1.2rem;
}

.donation-section {
  background: #eef3f8;
}

.donation-form {
  display: grid;
  grid-template-columns: minmax(140px, 0.6fr) minmax(220px, 1fr) minmax(180px, 0.8fr) auto;
  gap: 14px;
  align-items: end;
  max-width: 1040px;
}

.donation-form label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-weight: 800;
}

.donation-form input {
  width: 100%;
  min-height: 44px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  color: var(--text);
  font: inherit;
  font-weight: 700;
}

.donation-form input:focus {
  border-color: var(--teal);
  outline: 3px solid rgba(6, 148, 162, 0.14);
}

.donation-form .upload-status {
  grid-column: 1 / -1;
}

.donation-return {
  text-align: center;
}

.payment-modal {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(15, 23, 42, 0.5);
}

.payment-modal.is-visible {
  display: flex;
}

.payment-modal-panel {
  width: min(520px, 100%);
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  box-shadow: var(--shadow);
  padding: 20px;
}

.payment-modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
}

.payment-modal-head h3 {
  margin: 0;
}

.payment-close {
  width: 36px;
  height: 36px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f7fafc;
  color: var(--muted);
  cursor: pointer;
  font: inherit;
  font-weight: 800;
}

.payment-options {
  display: grid;
  gap: 12px;
}

.payment-option {
  display: grid;
  gap: 4px;
  width: 100%;
  min-height: 84px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f7fafc;
  color: var(--text);
  cursor: pointer;
  font: inherit;
  text-align: left;
}

.payment-option:hover {
  border-color: var(--teal);
  background: #ffffff;
}

.payment-option strong {
  font-size: 1.05rem;
}

.payment-option span {
  color: var(--muted);
  font-weight: 700;
}

@media (max-width: 900px) {
  .app-header,
  .hero,
  .dashboard-grid,
  .report-grid,
  .upload-shell,
  .inbox-layout,
  .donation-form {
    grid-template-columns: 1fr;
  }

  .app-header {
    display: grid;
  }

  .main-nav {
    justify-content: flex-start;
  }

  .chart-header,
  .chart-tools {
    align-items: stretch;
    justify-items: stretch;
  }

  .status-filter,
  .month-filter,
  .week-filter,
  .legend {
    justify-content: flex-start;
  }

  .date-range-filter {
    justify-self: stretch;
  }

  .date-range-fields {
    grid-template-columns: 1fr;
  }

  .date-clear {
    width: 100%;
  }

  .table-heading,
  .table-tools,
  .upload-form {
    align-items: stretch;
    justify-items: stretch;
    justify-content: flex-start;
  }

  .hero {
    min-height: auto;
  }

  .ac-row {
    grid-template-columns: minmax(0, 1fr) 48px;
  }

  .ac-label {
    grid-column: 1 / -1;
    white-space: normal;
  }

  .ac-track {
    grid-column: 1;
  }

  .ac-row strong {
    grid-column: 2;
  }

  .mail-heading {
    display: grid;
  }
}

@media (max-width: 560px) {
  .brand {
    min-width: 0;
  }

  .status-grid {
    grid-template-columns: 1fr;
  }

  .main-nav a {
    flex: 1 1 120px;
  }
}
