:root {
  --bg: #07131f;
  --paper: rgba(9, 30, 46, 0.82);
  --paper-strong: rgba(10, 37, 57, 0.94);
  --ink: #ebf6ff;
  --muted: #91b8d3;
  --line: rgba(125, 195, 255, 0.18);
  --line-strong: rgba(125, 195, 255, 0.34);
  --accent: #7dd0ff;
  --accent-strong: #c6eeff;
  --accent-soft: rgba(125, 208, 255, 0.14);
  --highlight: #4ea4d5;
  --shadow: 0 24px 70px rgba(1, 10, 18, 0.42);
  --radius-lg: 24px;
  --radius-md: 14px;
  --radius-sm: 10px;
  --page-width: 2200px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  color-scheme: light;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "IBM Plex Mono", monospace;
  color: var(--ink);
  background:
    radial-gradient(circle at top left, rgba(31, 112, 170, 0.34), transparent 22%),
    radial-gradient(circle at top right, rgba(125, 208, 255, 0.18), transparent 18%),
    linear-gradient(180deg, #0b1c2b 0%, #07131f 52%, #040c15 100%);
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(125, 208, 255, 0.08) 1px, transparent 1px),
    linear-gradient(90deg, rgba(125, 208, 255, 0.08) 1px, transparent 1px),
    linear-gradient(rgba(125, 208, 255, 0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(125, 208, 255, 0.025) 1px, transparent 1px);
  background-size: 120px 120px, 120px 120px, 24px 24px, 24px 24px;
  mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.66), transparent 96%);
}

a,
button,
input {
  font: inherit;
}

button {
  border: 0;
  cursor: pointer;
}

input {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 12px 16px;
  background: rgba(6, 25, 39, 0.78);
  color: var(--ink);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.02);
}

input::placeholder {
  color: #6f99b6;
}

input:focus-visible,
button:focus-visible,
a:focus-visible,
.sort-button:focus-visible {
  outline: 3px solid rgba(125, 208, 255, 0.28);
  outline-offset: 2px;
}

[hidden] {
  display: none !important;
}

.lock-screen {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 20px;
}

.lock-card {
  width: min(100%, 420px);
  display: grid;
  gap: 14px;
  padding: 28px;
  border-radius: var(--radius-lg);
  background:
    linear-gradient(180deg, rgba(11, 39, 59, 0.94), rgba(7, 24, 38, 0.94)),
    linear-gradient(135deg, rgba(125, 208, 255, 0.08), transparent 50%);
  border: 1px solid var(--line-strong);
  box-shadow: var(--shadow);
}

.lock-label {
  margin: 0;
  color: var(--accent);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.lock-title {
  margin: 0;
  font-family: "Space Grotesk", sans-serif;
  font-size: 1.6rem;
  line-height: 1.05;
  text-transform: uppercase;
}

.lock-message {
  min-height: 1.2em;
  margin: 0;
  color: var(--accent-strong);
}

.page-shell {
  width: min(calc(100vw - 24px), var(--page-width));
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  min-height: 100dvh;
  height: 100dvh;
  padding: 24px 0 40px;
  overflow: hidden;
}

.hero {
  display: grid;
  flex: 0 0 auto;
  gap: 18px;
  padding: 28px;
  border-radius: var(--radius-lg);
  background:
    linear-gradient(180deg, rgba(11, 39, 59, 0.92), rgba(7, 24, 38, 0.92)),
    linear-gradient(135deg, rgba(125, 208, 255, 0.09), transparent 42%);
  border: 1px solid var(--line-strong);
  box-shadow: var(--shadow);
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(90deg, transparent 0, transparent calc(100% - 130px), rgba(125, 208, 255, 0.15) calc(100% - 130px), rgba(125, 208, 255, 0.15) calc(100% - 128px), transparent calc(100% - 128px)),
    linear-gradient(0deg, transparent 0, transparent calc(100% - 64px), rgba(125, 208, 255, 0.12) calc(100% - 64px), rgba(125, 208, 255, 0.12) calc(100% - 62px), transparent calc(100% - 62px));
}

.hero-copy {
  display: grid;
  gap: 8px;
  max-width: 760px;
  position: relative;
  z-index: 1;
}

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

.hero h1,
.toolbar h2 {
  margin: 0;
  font-family: "Space Grotesk", sans-serif;
}

.hero h1 {
  font-size: clamp(2.2rem, 4.6vw, 3.8rem);
  line-height: 0.95;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  text-shadow: 0 0 24px rgba(125, 208, 255, 0.12);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  position: relative;
  z-index: 1;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 18px;
  border-radius: 999px;
  text-decoration: none;
  transition:
    transform 150ms ease,
    background-color 150ms ease,
    border-color 150ms ease,
    color 150ms ease,
    box-shadow 150ms ease;
}

.button:hover,
.button:focus-visible,
.sort-button:hover {
  transform: translateY(-1px);
}

.button-primary {
  background: var(--accent);
  color: #062033;
  box-shadow: 0 0 0 1px rgba(198, 238, 255, 0.2), 0 0 28px rgba(125, 208, 255, 0.18);
}

.button-primary:hover,
.button-primary:focus-visible {
  background: var(--accent-strong);
}

.button-secondary {
  background: rgba(8, 28, 43, 0.88);
  color: var(--ink);
  border: 1px solid var(--line);
}

.panel {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  min-height: 0;
  min-width: 0;
  margin-top: 18px;
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--paper);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  backdrop-filter: blur(14px);
}

.toolbar {
  display: grid;
  gap: 16px;
  padding: 18px;
  border-bottom: 1px solid var(--line);
  background:
    linear-gradient(180deg, rgba(10, 37, 57, 0.9), rgba(8, 29, 45, 0.78)),
    linear-gradient(90deg, rgba(125, 208, 255, 0.08), transparent 52%);
}

.toolbar-copy {
  display: grid;
  gap: 6px;
}

.toolbar h2 {
  font-size: clamp(1.55rem, 2.6vw, 2.2rem);
  line-height: 1;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.status-message {
  margin: 0;
  color: var(--muted);
}

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

.search-field {
  flex: 1 1 320px;
  min-width: 0;
  width: min(100%, 360px);
  display: grid;
  gap: 8px;
}

#reset-filter-button {
  flex: 0 0 auto;
  white-space: nowrap;
}

.search-label {
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}

.table-shell {
  display: flex;
  flex: 1 1 auto;
  min-height: 0;
  min-width: 0;
  padding: 8px 12px 12px;
}

.table-scroll {
  flex: 1 1 auto;
  min-height: 0;
  min-width: 0;
  overflow: auto;
  border-radius: calc(var(--radius-lg) - 10px);
  border: 1px solid var(--line);
  background:
    linear-gradient(180deg, rgba(7, 24, 38, 0.96), rgba(7, 24, 38, 0.94)),
    linear-gradient(90deg, rgba(125, 208, 255, 0.02), transparent 60%);
}

table {
  width: max-content;
  min-width: 100%;
  border-collapse: collapse;
}

thead th {
  position: sticky;
  top: 0;
  z-index: 1;
  min-width: max-content;
  padding: 0;
  text-align: left;
  background: rgba(11, 39, 59, 0.98);
  border-bottom: 1px solid var(--line-strong);
}

.sort-button {
  width: max-content;
  min-width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 14px 16px;
  border-radius: 0;
  background: transparent;
  color: var(--ink);
  font-size: 0.86rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  white-space: nowrap;
}

.sort-button > span:first-child,
.sort-indicator {
  flex: 0 0 auto;
}

th[aria-sort="ascending"] .sort-button,
th[aria-sort="descending"] .sort-button {
  background: var(--accent-soft);
}

.sort-indicator::before {
  content: "↕";
  font-size: 1rem;
  color: rgba(145, 184, 211, 0.7);
}

th[aria-sort="ascending"] .sort-indicator::before {
  content: "↑";
  color: var(--accent);
}

th[aria-sort="descending"] .sort-indicator::before {
  content: "↓";
  color: var(--accent);
}

tbody td {
  min-width: 9rem;
  padding: 14px 16px;
  vertical-align: top;
  border-bottom: 1px solid var(--line);
  color: var(--ink);
  line-height: 1.45;
}

tbody tr:nth-child(even) td {
  background: rgba(125, 208, 255, 0.035);
}

tbody tr:hover td {
  background: rgba(125, 208, 255, 0.09);
}

.cell-filter-button {
  display: inline;
  width: auto;
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  text-align: left;
  line-height: inherit;
  cursor: pointer;
}

.cell-filter-button:hover,
.cell-filter-button:focus-visible {
  color: var(--accent-strong);
}

.cell-empty {
  color: rgba(145, 184, 211, 0.52);
}

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

@media (min-width: 860px) {
  .hero {
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: end;
  }

  .toolbar {
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: end;
  }

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

@media (max-width: 859px) {
  .page-shell {
    width: min(calc(100vw - 10px), var(--page-width));
    padding-top: 10px;
  }

  .hero,
  .toolbar {
    padding: 16px;
  }

  .hero {
    flex-shrink: 0;
  }

  .hero-actions {
    flex-direction: column;
  }

  .button {
    width: 100%;
  }

  .search-field {
    width: 100%;
  }

  .toolbar-actions {
    flex-wrap: wrap;
  }

  .table-shell {
    padding: 4px;
  }

}

@media print {
  :root {
    --paper: #ffffff;
    --paper-strong: #ffffff;
    --ink: #000000;
    --muted: #303030;
    --line: rgba(0, 0, 0, 0.14);
    --line-strong: rgba(0, 0, 0, 0.22);
  }

  @page {
    size: landscape;
    margin: 0.5in;
  }

  body {
    min-height: auto;
    background: #ffffff;
  }

  body::before,
  .lock-screen,
  .hero-actions,
  .toolbar-actions {
    display: none !important;
  }

  .page-shell {
    width: 100%;
    min-height: 0;
    height: auto;
    padding: 0;
    overflow: visible;
  }

  .hero,
  .panel,
  .table-scroll {
    box-shadow: none;
    border: 0;
    background: #ffffff;
  }

  .hero {
    padding: 0 0 16px;
    border-radius: 0;
  }

  .panel {
    display: block;
    margin-top: 0;
  }

  .toolbar {
    padding: 0 0 12px;
    border-bottom: 0;
    background: transparent;
  }

  .table-shell {
    display: block;
    min-height: 0;
    padding: 0;
  }

  .table-scroll {
    min-height: 0;
    overflow: visible;
    border-radius: 0;
  }

  table {
    width: 100%;
    min-width: 0;
  }

  thead th {
    position: static;
    background: #f3f3f3;
  }

  tbody tr:hover td,
  tbody tr:nth-child(even) td {
    background: transparent;
  }

  tbody tr {
    break-inside: avoid;
  }
}
