:root {
  --bg: #f3f5f7;
  --panel: #ffffff;
  --line: #dde4ea;
  --text: #1f2933;
  --muted: #677481;
  --brand: #b80f2d;
  --brand-dark: #8f0c24;
  --ok: #136f45;
  --ok-bg: #e8f5ef;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font-family: Arial, Helvetica, sans-serif;
  font-size: 15px;
}

.topbar {
  height: 64px;
  padding: 0 28px;
  background: var(--panel);
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.topbar strong {
  display: block;
}

.topbar span {
  color: var(--muted);
  font-size: 13px;
}

.topbar nav {
  display: flex;
  align-items: center;
  gap: 16px;
}

.topbar a,
.button-link {
  color: var(--brand);
  text-decoration: none;
  font-weight: 700;
}

.page {
  width: min(1120px, calc(100% - 32px));
  margin: 24px auto 48px;
}

.search-panel,
.result-card,
.empty-state,
.login-card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 10px 25px rgba(31, 41, 51, 0.06);
}

.search-panel {
  padding: 24px;
  margin-bottom: 18px;
}

.eyebrow {
  display: block;
  color: var(--brand);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  margin-bottom: 8px;
}

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

h1 {
  font-size: 24px;
  margin-bottom: 20px;
}

h2 {
  font-size: 20px;
  margin-bottom: 0;
}

h3 {
  font-size: 16px;
  margin-bottom: 12px;
}

.search-form label,
.login-card label {
  display: block;
  font-weight: 700;
  margin-bottom: 8px;
}

.search-form div {
  display: grid;
  grid-template-columns: 1fr 160px;
  gap: 10px;
}

input {
  width: 100%;
  min-height: 44px;
  border: 1px solid #cbd5df;
  border-radius: 6px;
  padding: 0 12px;
  font-size: 15px;
}

button {
  min-height: 44px;
  border: 0;
  border-radius: 6px;
  background: var(--brand);
  color: #fff;
  font-weight: 700;
  cursor: pointer;
}

button:hover {
  background: var(--brand-dark);
}

.hint,
.muted {
  color: var(--muted);
}

.hint {
  margin: 12px 0 0;
  font-size: 13px;
}

.search-alert {
  margin: 12px 0 0;
}

.alert {
  border: 1px solid #f4c7c7;
  background: #fff2f2;
  color: #8a1f1f;
  border-radius: 6px;
  padding: 12px 14px;
  margin-bottom: 16px;
}

.result-card,
.empty-state {
  padding: 22px;
  margin-bottom: 16px;
}

.result-head {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: flex-start;
  border-bottom: 1px solid var(--line);
  padding-bottom: 16px;
  margin-bottom: 16px;
}

.result-head > strong,
.status {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  border-radius: 999px;
  padding: 0 10px;
  font-size: 12px;
}

.result-head > strong {
  color: var(--ok);
  background: var(--ok-bg);
}

.status {
  color: var(--brand);
  background: #fae8ec;
  font-weight: 700;
  margin-bottom: 8px;
}

.info-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 18px;
}

.info-grid div {
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 10px 12px;
}

.info-grid span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  margin-bottom: 4px;
}

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

table {
  width: 100%;
  border-collapse: collapse;
  min-width: 760px;
}

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

th {
  color: #46515c;
  font-size: 12px;
  text-transform: uppercase;
}

.login-page {
  display: grid;
  place-items: center;
  padding: 24px;
  background: linear-gradient(140deg, #8f0c24, #c51f3f);
}

.login-card {
  width: min(420px, 100%);
  padding: 28px;
}

.brand span {
  color: var(--brand);
  font-weight: 700;
}

.brand h1 {
  margin: 6px 0 8px;
}

.login-card form {
  display: grid;
  gap: 10px;
}

.login-card button {
  margin-top: 8px;
}

@media (max-width: 760px) {
  .topbar {
    height: auto;
    padding: 14px 16px;
    align-items: flex-start;
    gap: 10px;
  }

  .page {
    width: calc(100% - 20px);
    margin-top: 12px;
  }

  .search-panel,
  .result-card,
  .empty-state {
    padding: 16px;
  }

  .search-form div,
  .info-grid {
    grid-template-columns: 1fr;
  }

  .result-head {
    display: block;
  }

  .result-head > strong {
    margin-top: 12px;
  }
}
