:root {
  color-scheme: light;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: #17283c;
  background: #f5f9fd;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
}

* {
  box-sizing: border-box;
}

body {
  min-width: 320px;
  min-height: 100vh;
  margin: 0;
  background: radial-gradient(ellipse at 88% -18%, rgba(25, 163, 255, 0.09), transparent 40%), #f5f9fd;
}

a {
  color: inherit;
  text-decoration: none;
}

button, input {
  font: inherit;
}

button, a, input {
  -webkit-tap-highlight-color: transparent;
}

.topbar {
  height: 72px;
  display: flex;
  align-items: center;
  gap: 44px;
  padding: 0 max(28px, (100vw - 1180px) / 2);
  background: rgba(255, 255, 255, 0.94);
  border-bottom: 1px solid #e3ebf3;
  box-shadow: 0 8px 28px rgba(27, 61, 91, 0.06);
  backdrop-filter: blur(16px);
}

.brand {
  display: inline-flex;
  align-items: center;
  color: #17283c;
  font-weight: 750;
  letter-spacing: -0.03em;
  font-size: 17px;
}

.topnav {
  display: flex;
  align-items: center;
  gap: 26px;
  height: 100%;
  color: #66788d;
  font-size: 13px;
  font-weight: 600;
}

.topnav a {
  height: 100%;
  display: flex;
  align-items: center;
  border-bottom: 2px solid transparent;
}

.topnav a:hover {
  color: #0785dc;
  border-color: #19a3ff;
}

.account {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 16px;
}

.account-email {
  color: #66788d;
  font-size: 12px;
}

.account form {
  margin: 0;
}

.page-shell {
  width: min(1180px, 100% - 48px);
  margin: 42px auto 80px;
}

.auth-shell {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 28px 18px;
  background: radial-gradient(ellipse at 12% 8%, rgba(25, 163, 255, 0.1), transparent 42%), radial-gradient(ellipse at 90% 88%, rgba(25, 163, 255, 0.06), transparent 38%), #f5f9fd;
}

h1, h2, h3, p {
  margin-top: 0;
}

h1 {
  margin-bottom: 10px;
  font-size: clamp(30px, 4vw, 40px);
  line-height: 1.15;
  letter-spacing: -0.045em;
  font-weight: 700;
}

.case-heading {
  margin-bottom: 8px;
  font-size: clamp(20px, 2.6vw, 26px);
  line-height: 1.25;
  letter-spacing: -0.03em;
  font-weight: 700;
}

h2 {
  margin-bottom: 6px;
  font-size: 18px;
  letter-spacing: -0.025em;
}

h3 {
  margin-bottom: 5px;
  font-size: 15px;
}

.muted {
  color: #66788d;
  font-size: 13px;
  line-height: 1.65;
}

.eyebrow {
  margin-bottom: 9px;
  color: #0785dc;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.16em;
}

.heading-period {
  color: #19a3ff;
}

.page-heading, .case-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 26px;
}

.page-heading p:last-child, .case-title-row p:last-child {
  margin-bottom: 0;
}

.button {
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 0 17px;
  border: 1px solid transparent;
  border-radius: 8px;
  cursor: pointer;
  font-size: 12px;
  font-weight: 700;
  transition: background 0.16s, transform 0.16s, border-color 0.16s;
}

.button:hover {
  transform: translateY(-1px);
}

.button-primary {
  color: #fff;
  background: #19a3ff;
  box-shadow: 0 5px 17px rgba(25, 163, 255, 0.2);
}

.button-primary:hover {
  background: #0785dc;
}

.button-secondary {
  color: #17283c;
  background: #fff;
  border-color: #e3ebf3;
}

.button-secondary:hover, .button-quiet:hover {
  color: #0785dc;
  border-color: #19a3ff;
}

.button-quiet {
  color: #66788d;
  background: transparent;
  border-color: #e3ebf3;
}

.button-small {
  min-height: 33px;
  padding: 0 12px;
  font-size: 11px;
}

.button-wide {
  width: 100%;
  margin-top: 10px;
}

button:disabled {
  opacity: 0.55;
  cursor: wait;
  transform: none;
}

.stat-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  margin-bottom: 20px;
}

.stat-card {
  min-height: 119px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  padding: 18px 20px;
  border: 1px solid #e3ebf3;
  border-radius: 11px;
  background: #fff;
  box-shadow: 0 6px 20px rgba(27, 61, 91, 0.045);
}

.stat-label {
  color: #66788d;
  font-size: 13px;
  font-weight: 650;
}

.stat-card strong {
  margin: 8px 0 2px;
  font-size: 26px;
  line-height: 1;
  letter-spacing: -0.04em;
}

.stat-card .stat-value {
  font-size: 18px;
}

.stat-note {
  color: #8a99aa;
  font-size: 10px;
}

.panel {
  margin-bottom: 18px;
  overflow: hidden;
  border: 1px solid #e3ebf3;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 6px 22px rgba(27, 61, 91, 0.045);
}

.panel > h2 {
  margin: 0;
  padding: 20px 22px;
}

.panel > h3 {
  margin: 0;
  padding: 20px 22px 0;
  padding-left: 0;
}

.panel > .detail-list, .panel > .party-list, .panel > .subheading, .panel > .muted {
  margin-right: 22px;
  margin-left: 22px;
}

.panel-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 20px 22px;
}

.panel-heading h2 {
  margin-bottom: 4px;
}

.panel-heading p {
  margin-bottom: 0;
}

.panel-compact .panel-heading {
  padding-bottom: 14px;
}

.search-form {
  display: flex;
  gap: 7px;
}

input {
  height: 42px;
  width: 100%;
  padding: 0 12px;
  color: #17283c;
  outline: none;
  border: 1px solid #d7e2ed;
  border-radius: 7px;
  background: #fff;
  font-size: 12px;
  transition: border 0.15s, box-shadow 0.15s;
}

input:focus {
  border-color: #19a3ff;
  box-shadow: 0 0 0 3px rgba(25, 163, 255, 0.13);
}

.search-form input {
  width: 200px;
  height: 36px;
}

.search-form .button {
  min-height: 36px;
}

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

table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
}

th {
  padding: 11px 18px;
  color: #75879a;
  background: #f5f8fb;
  border-top: 1px solid #e3ebf3;
  border-bottom: 1px solid #e3ebf3;
  font-size: 9px;
  font-weight: 750;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  white-space: nowrap;
}

td {
  padding: 14px 18px;
  color: #52677d;
  border-bottom: 1px solid #edf2f7;
  font-size: 11px;
  vertical-align: top;
}

tbody tr:last-child td {
  border-bottom: 0;
}

tbody tr:hover {
  background: #f7fbff;
}

.cell-primary {
  color: #17283c;
  font-weight: 700;
}

.cell-primary a:hover, .text-link:hover {
  color: #0785dc;
  text-decoration: underline;
}

.text-link {
  color: #0785dc;
  font-size: 11px;
  font-weight: 700;
  white-space: nowrap;
}

.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 46px 20px 50px;
  text-align: center;
}

.empty-state .muted {
  margin-bottom: 17px;
}

.empty-state h3 {
  margin-bottom: 5px;
  font-size: 16px;
}

.empty-icon {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  margin-bottom: 14px;
  border-radius: 14px;
  color: #0785dc;
  background: #e8f5ff;
  font-size: 22px;
}

.empty-inline {
  padding: 0 22px 22px;
  font-size: 12px;
}

.activity-list {
  padding: 0 22px 12px;
}

.activity-row {
  min-height: 62px;
  display: flex;
  align-items: center;
  gap: 13px;
  border-top: 1px solid #edf2f7;
}

.activity-main {
  min-width: 0;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.activity-main strong {
  font-size: 11px;
}

.activity-main > span, .activity-row time {
  color: #66788d;
  font-size: 10px;
}

.status-dot {
  flex: 0 0 8px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #9ca8a2;
}

.status-dot.status-complete {
  background: #25a977;
}

.status-dot.status-error {
  background: #db5968;
}

.status-dot.status-starting, .status-dot.status-solving_captcha, .status-dot.status-capturing {
  background: #d39a35;
}

.status-pill {
  padding: 4px 8px;
  border-radius: 99px;
  color: #52677d;
  background: #eef3f8;
  font-size: 9px;
  font-weight: 700;
  white-space: nowrap;
}

.status-pill-complete {
  color: #14845f;
  background: #e8f7f0;
}

.status-pill-error {
  color: #bf3f50;
  background: #fff0f1;
}

.status-pill-starting, .status-pill-solving_captcha, .status-pill-capturing {
  color: #946313;
  background: #fff6e5;
}

.auth-card {
  width: min(100%, 414px);
  padding: 32px;
  border: 1px solid #e3ebf3;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 22px 60px rgba(27, 61, 91, 0.12);
  backdrop-filter: blur(16px);
}

.auth-brand {
  margin-bottom: 31px;
}

.auth-card h1 {
  font-size: 30px;
}

.auth-card > .muted {
  margin-bottom: 25px;
}

.form-stack {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.form-stack label {
  margin-top: 5px;
  color: #344b62;
  font-size: 11px;
  font-weight: 700;
}

.field-hint {
  margin-top: -6px;
  color: #8393a5;
  font-size: 10px;
}

.auth-footer {
  margin: 23px 0 0;
  padding-top: 18px;
  border-top: 1px solid #e3ebf3;
  color: #66788d;
  text-align: center;
  font-size: 11px;
}

.auth-footer a {
  color: #0785dc;
  font-weight: 700;
}

.flash-stack {
  display: grid;
  gap: 8px;
  margin-bottom: 18px;
}

.flash {
  padding: 12px 14px;
  border-radius: 8px;
  font-size: 12px;
}

.flash-error {
  color: #913442;
  background: #fff0f1;
  border: 1px solid #f2cbd0;
}

.flash-success {
  color: #176747;
  background: #e8f7f0;
  border: 1px solid #c7ead9;
}

.back-link {
  display: inline-block;
  margin-bottom: 19px;
  color: #66788d;
  font-size: 11px;
  font-weight: 650;
}

.back-link:hover {
  color: #0785dc;
}

.lookup-layout {
  display: grid;
  grid-template-columns: 1fr minmax(360px, 470px);
  align-items: start;
  gap: 56px;
  padding-top: 25px;
}

.lookup-intro {
  max-width: 470px;
  padding-top: 19px;
}

.lookup-intro > .muted {
  max-width: 430px;
  font-size: 14px;
}

.privacy-note {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  margin-top: 28px;
  padding: 15px;
  border: 1px solid #cce9fb;
  border-radius: 10px;
  background: linear-gradient(130deg, #eff9ff, #f5fbff);
  color: #0785dc;
}

.privacy-note > span {
  font-size: 16px;
}

.privacy-note p {
  margin: 0;
  color: #526b80;
  font-size: 11px;
  line-height: 1.6;
}

.privacy-note strong {
  color: #183b58;
}

.lookup-panel {
  padding: 22px;
}

.lookup-panel > h2 {
  padding: 0;
}

.lookup-panel > p {
  margin: 5px 0 19px;
}

.lookup-progress {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-top: 22px;
  padding: 15px;
  border: 1px solid #dceaf5;
  border-radius: 9px;
  background: #f7fbff;
}

.lookup-progress[hidden], .lookup-failure[hidden] {
  display: none;
}

.progress-spinner {
  flex: 0 0 17px;
  width: 17px;
  height: 17px;
  border: 2px solid #dceaf5;
  border-top-color: #19a3ff;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}

.lookup-progress strong, .lookup-failure strong {
  font-size: 11px;
}

.lookup-progress p, .lookup-failure p {
  margin: 4px 0 0;
  color: #66788d;
  font-size: 10px;
  line-height: 1.5;
}

.lookup-failure {
  margin-top: 20px;
  padding: 15px;
  border: 1px solid #f2cbd0;
  border-radius: 9px;
  background: #fff8f8;
}

.lookup-failure .button {
  margin-top: 13px;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}
.detail-stats {
  margin-top: 20px;
}

.detail-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.detail-list {
  display: grid;
  grid-template-columns: minmax(120px, 0.75fr) 1.25fr;
  margin-top: 18px;
  margin-bottom: 21px;
  font-size: 11px;
}

.detail-list dt, .detail-list dd {
  margin: 0;
  padding: 10px 0;
  border-bottom: 1px solid #edf0ee;
}

.detail-list dt {
  color: #66788d;
}

.detail-list dd {
  color: #17283c;
  font-weight: 600;
}

.subheading {
  margin-top: 19px;
  margin-bottom: 6px;
  color: #19a3ff;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.party-list {
  padding: 0;
  list-style: none;
}

.party-list li {
  display: flex;
  flex-direction: column;
  gap: 3px;
  padding: 9px 0;
  border-bottom: 1px solid #edf0ee;
  font-size: 11px;
}

.party-list li span {
  color: #66788d;
  font-size: 10px;
}

.detail-grid .panel {
  padding-bottom: 8px;
}

.detail-grid .panel > h2 {
  padding-top: 20px;
}

.data-footnote {
  color: #87928d;
  font-size: 10px;
  text-align: right;
}

.activity-list-full {
  padding-top: 2px;
}

.log-item {
  display: flex;
  align-items: flex-start;
  gap: 13px;
  padding: 16px 0;
  border-top: 1px solid #edf0ee;
}

.log-item > .status-dot {
  margin-top: 5px;
}

.log-item time {
  color: #66788d;
  font-size: 10px;
  white-space: nowrap;
}

.log-title {
  display: flex;
  align-items: center;
  gap: 8px;
}

.log-item p {
  margin: 5px 0 0;
  color: #66788d;
  font-size: 11px;
}

.log-item .log-error {
  color: #bf3f50;
}

.log-item details {
  margin-top: 8px;
  color: #66788d;
  font-size: 10px;
}

.log-item summary {
  cursor: pointer;
}

.log-item pre {
  max-width: 620px;
  overflow: auto;
  padding: 10px;
  border-radius: 6px;
  background: #f6f7f6;
  color: #59635f;
  font: 10px/1.5 ui-monospace, monospace;
  white-space: pre-wrap;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.detail-list dt, .detail-list dd, .party-list li {
  border-color: #edf2f7;
}

.detail-list dt, .party-list li span {
  color: #66788d;
}

.detail-list dd, .party-list li strong {
  color: #17283c;
}

.subheading {
  color: #0785dc;
}

.lookup-failure strong, .lookup-progress strong {
  color: #17283c;
}

.lookup-failure p, .lookup-progress p {
  color: #66788d;
}

.log-item pre {
  background: #f3f7fb;
  color: #42576d;
}

.topnav a:focus-visible, .button:focus-visible, .text-link:focus-visible, input:focus-visible {
  outline: 2px solid #19a3ff;
  outline-offset: 3px;
}

@media (max-width: 780px) {
  .topbar {
    height: 64px;
    gap: 20px;
    padding: 0 18px;
  }
  .topnav {
    gap: 14px;
    font-size: 11px;
  }
  .account-email {
    display: none;
  }
  .page-shell {
    width: min(100% - 28px, 1180px);
    margin-top: 27px;
  }
  .lookup-layout {
    grid-template-columns: 1fr;
    gap: 18px;
    padding-top: 4px;
  }
  .lookup-intro {
    padding-top: 0;
  }
}
@media (max-width: 580px) {
  .topbar {
    gap: 15px;
    padding: 0 13px;
  }
  .brand {
    font-size: 14px;
  }
  .topnav {
    gap: 10px;
    font-size: 10px;
  }
  .account {
    gap: 6px;
  }
  .button-small {
    min-height: 30px;
    padding: 0 9px;
  }
  .page-heading, .case-title-row {
    align-items: flex-start;
    flex-direction: column;
  }
  .page-heading > .button, .case-title-row > form, .case-title-row > form .button {
    width: 100%;
  }
  .stat-grid {
    grid-template-columns: 1fr;
    gap: 8px;
  }
  .stat-card {
    min-height: 95px;
  }
  .detail-grid {
    grid-template-columns: 1fr;
    gap: 0;
  }
  .panel-heading {
    align-items: flex-start;
    flex-direction: column;
  }
  .search-form {
    width: 100%;
  }
  .search-form input {
    flex: 1;
    width: auto;
    min-width: 0;
  }
  .activity-row {
    align-items: flex-start;
    flex-wrap: wrap;
    padding: 12px 0;
  }
  .activity-row .activity-main {
    flex-basis: calc(100% - 25px);
  }
  .activity-row time {
    margin-left: 21px;
  }
  .auth-card {
    padding: 25px 21px;
  }
  .lookup-panel {
    padding: 18px;
  }
  .log-item {
    flex-wrap: wrap;
  }
  .log-item time {
    margin-left: 21px;
  }
}
