:root {
  --bg: #f9fafb;
  --panel: #ffffff;
  --panel-strong: #ffffff;
  --text: #101828;
  --muted: #4a5565;
  --muted-soft: #6a7282;
  --accent: #155dfc;
  --accent-dark: #1447e6;
  --line: #e5e7eb;
  --line-strong: #d1d5dc;
  --shadow: 0 1px 2px rgba(16, 24, 40, 0.05);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: ui-sans-serif, system-ui, sans-serif, "Apple Color Emoji",
    "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";
  color: var(--text);
  background:
    radial-gradient(circle at 94% 0%, rgba(103, 232, 249, 0.32), transparent 30%),
    radial-gradient(circle at 5% 100%, rgba(96, 165, 250, 0.24), transparent 34%),
    linear-gradient(180deg, #eef7ff 0%, #f8fbff 48%, #f9fafb 100%);
  -webkit-font-smoothing: antialiased;
}

button,
.hero-link,
input,
select {
  font: inherit;
}

.app-shell {
  width: min(1280px, calc(100% - 32px));
  margin: 0 auto;
  padding: 24px 0 40px;
  display: grid;
  gap: 18px;
}

.hero-card,
.card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: var(--shadow);
}

.hero-card {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  width: 100vw;
  max-width: none;
  height: 56px;
  min-height: 56px;
  margin: -24px 0 0 calc(50% - 50vw);
  padding: 0 max(16px, calc((100vw - 1280px) / 2 + 16px));
  align-items: center;
  min-height: 0;
  border: 0;
  border-bottom: 1px solid #111827;
  border-radius: 0;
  background: #ffffff;
  box-shadow: none;
  box-sizing: border-box;
}

.hero-actions {
  display: flex;
  align-items: center;
  flex-wrap: nowrap;
  gap: 12px;
  justify-content: flex-end;
}

.hero-card > div:first-child {
  display: flex;
  align-items: center;
  min-width: 0;
  gap: 12px;
}

.card {
  padding: 24px;
}

.eyebrow {
  margin: 0 0 6px;
  text-transform: uppercase;
  letter-spacing: 0.025em;
  font-size: 0.75rem;
  font-family: inherit;
  color: var(--accent);
  font-weight: 600;
}

h1,
h2 {
  margin: 0;
  font-family: inherit;
  color: var(--text);
}

.hero-card h1 {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: #101828;
  font-size: 0.875rem;
  font-weight: 600;
}

.hero-card h1::after {
  content: "|";
  color: #6a7282;
  font-weight: 400;
}

.hero-card .eyebrow {
  display: none;
}

.hero-copy {
  margin: 8px 0 0;
  max-width: 760px;
  font-size: 1.02rem;
}

.hero-link,
button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 6px;
  padding: 8px 16px;
  background: var(--accent);
  color: #fff;
  font-family: inherit;
  font-size: 0.875rem;
  font-weight: 600;
  line-height: 1.25;
  text-decoration: none;
  cursor: pointer;
  box-shadow: var(--shadow);
  transition: background 150ms ease, border-color 150ms ease, color 150ms ease;
}

button:hover,
.hero-link:hover {
  background: var(--accent-dark);
}

.secondary-button {
  background: #ffffff;
  color: #364153;
  border: 1px solid var(--line-strong);
  width: auto;
  min-height: 34px;
  padding: 6px 12px;
  font-size: 0.875rem;
  font-weight: 500;
  box-shadow: none;
  white-space: nowrap;
}

.secondary-button:hover {
  background: #f3f4f6;
  color: #101828;
}

.icon-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  min-width: 34px;
  min-height: 34px;
  padding: 0;
}

.button-icon {
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
}

.brand-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 34px;
  color: #101828;
  font-size: 0.875rem;
  font-weight: 700;
  line-height: 1.2;
  text-decoration: none;
  white-space: nowrap;
}

.brand-link:hover {
  color: #1447e6;
}

.brand-logo {
  width: 22px;
  height: 30px;
  object-fit: contain;
  flex: 0 0 auto;
}

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

.summary-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 12px;
}

.access-panel {
  display: grid;
  gap: 8px;
  margin-bottom: 16px;
}

.access-field {
  max-width: 520px;
}

.access-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
}

.access-status {
  margin: 0;
  color: var(--muted);
  font-size: 0.9rem;
}

.summary-chip {
  min-width: 126px;
  padding: 6px 10px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: #f9fafb;
}

.summary-chip span {
  display: block;
  color: var(--muted);
  font-size: 0.7rem;
  line-height: 1.1;
}

.summary-chip strong {
  display: block;
  margin-top: 1px;
  font-size: 1rem;
  line-height: 1.15;
  font-family: inherit;
}

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

.full-width {
  grid-column: 1 / -1;
}

.hidden {
  display: none !important;
}

label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 0.92rem;
}

input,
select {
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 10px 12px;
  background: var(--panel-strong);
  color: #101828;
}

.filters-grid label {
  font-size: 0.82rem;
}

.filters-grid input,
.filters-grid select {
  padding: 7px 9px;
  font-size: 0.84rem;
}

input:focus,
select:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 1px var(--accent);
}

.status-message {
  margin: 0;
  color: var(--muted);
  font-size: 0.9rem;
}

.table-wrapper {
  overflow-x: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
}

th,
td {
  padding: 8px 6px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
  font-size: 0.85rem;
}

th {
  white-space: nowrap;
  color: var(--muted);
  font-size: 0.78rem;
  letter-spacing: 0.03em;
  font-family: inherit;
}

.sort-button {
  padding: 0;
  background: transparent;
  color: inherit;
  border: 0;
}

.sort-button:hover {
  background: transparent;
  color: var(--text);
}

.sort-button::after {
  content: " \2195";
  color: #92a2b8;
}

.sort-button.active.sort-asc::after {
  content: " \2191";
  color: var(--accent);
}

.sort-button.active.sort-desc::after {
  content: " \2193";
  color: var(--accent);
}

.activity-cell {
  white-space: pre-line;
  min-width: 320px;
}

.empty-state {
  text-align: center;
  color: var(--muted);
}

@media (max-width: 980px) {
  .summary-grid,
  .filters-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 720px) {
  .app-shell {
    width: min(100%, calc(100% - 24px));
    padding: 24px 0 28px;
  }

  .card-header {
    flex-direction: column;
    align-items: stretch;
  }

  .hero-card {
    flex-direction: row;
    align-items: center;
    padding: 0 16px;
  }

  .hero-card h1::after {
    display: none;
  }

  .hero-actions {
    justify-content: flex-end;
  }

  .hero-actions .hero-link {
    text-align: center;
  }

  .brand-link span {
    display: none;
  }

  .summary-grid,
  .filters-grid {
    grid-template-columns: 1fr;
  }

  .access-row {
    grid-template-columns: 1fr;
  }
}
