:root {
  color-scheme: light;
  --ink: #182033;
  --muted: #667085;
  --line: #d9dee8;
  --surface: #ffffff;
  --page: #f5f7fb;
  --primary: #1c5f86;
  --primary-strong: #164a69;
  --accent: #bf7a19;
  --good: #157a4f;
  --bad: #b42318;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--page);
  color: var(--ink);
}

.topbar {
  align-items: center;
  background: #16213e;
  color: #fff;
  display: flex;
  justify-content: space-between;
  min-height: 112px;
  padding: 24px clamp(18px, 4vw, 48px);
}

.eyebrow {
  color: #b7c5d8;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0;
  margin: 0 0 6px;
  text-transform: uppercase;
}

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

h1 {
  font-size: clamp(1.55rem, 5vw, 2.6rem);
  line-height: 1.05;
  margin-bottom: 0;
}

h2 {
  font-size: 1.2rem;
  margin-bottom: 6px;
}

.status-pill {
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: 999px;
  color: #fff;
  flex: 0 0 auto;
  font-size: 0.8rem;
  font-weight: 700;
  padding: 8px 12px;
}

.app-shell {
  margin: 0 auto;
  max-width: 980px;
  padding: 18px;
}

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

.tab,
button {
  border: 1px solid var(--line);
  border-radius: 8px;
  cursor: pointer;
  font: inherit;
  font-weight: 700;
  min-height: 44px;
  padding: 10px 12px;
}

.tab {
  background: #e9edf4;
  color: var(--ink);
}

.tab.active,
.primary {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
}

.primary:hover {
  background: var(--primary-strong);
}

.panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  display: none;
  padding: clamp(16px, 4vw, 28px);
}

.panel.active {
  display: block;
}

.section-head p {
  color: var(--muted);
  line-height: 1.5;
  margin-bottom: 18px;
}

.compact {
  margin-top: 26px;
}

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

label {
  color: #344054;
  display: grid;
  font-size: 0.88rem;
  font-weight: 700;
  gap: 7px;
}

.wide {
  grid-column: 1 / -1;
}

input,
select {
  background: #fff;
  border: 1px solid #c8d0dc;
  border-radius: 8px;
  color: var(--ink);
  font: inherit;
  min-height: 44px;
  padding: 10px 12px;
  width: 100%;
}

input[readonly] {
  background: #f0f3f8;
}

.divider {
  border-top: 1px solid var(--line);
  margin: 24px 0;
}

.notice {
  border-radius: 8px;
  display: none;
  font-weight: 700;
  line-height: 1.45;
  margin-top: 16px;
  padding: 12px;
}

.notice.show {
  display: block;
}

.notice.good {
  background: #e9f8f1;
  color: var(--good);
}

.notice.bad {
  background: #fff0ee;
  color: var(--bad);
}

.notice.info {
  background: #fff8e8;
  color: #8a5108;
}

.inline-form {
  display: flex;
  gap: 10px;
}

.inline-form input {
  flex: 1 1 auto;
}

.table-wrap {
  border: 1px solid var(--line);
  border-radius: 8px;
  margin-top: 16px;
  overflow-x: auto;
}

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

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

th {
  background: #edf1f7;
  color: #344054;
  font-size: 0.78rem;
  text-transform: uppercase;
}

td {
  color: #344054;
  font-size: 0.92rem;
}

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

code {
  background: #eef2f6;
  border-radius: 4px;
  padding: 2px 5px;
}

@media (max-width: 680px) {
  .topbar {
    align-items: flex-start;
    flex-direction: column;
    gap: 14px;
  }

  .app-shell {
    padding: 12px;
  }

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

  .tabs {
    position: sticky;
    top: 0;
    z-index: 3;
  }

  .inline-form {
    flex-direction: column;
  }
}
