:root {
  --bg: #f6f7f9;
  --panel: #ffffff;
  --ink: #17202a;
  --muted: #637083;
  --line: #dfe4ea;
  --primary: #176b5d;
  --primary-dark: #0f4f45;
  --danger: #b42318;
  --warn: #9a6700;
  --good: #087443;
  --shadow: 0 18px 45px rgba(23, 32, 42, 0.08);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  color: var(--ink);
  background: var(--bg);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

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

button,
input,
select {
  font: inherit;
}

.auth-layout {
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(280px, 1fr) minmax(320px, 460px);
}

.auth-brand {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 8vw;
  background: #103c45;
  color: #fff;
}

.auth-brand h1 {
  max-width: 720px;
  margin: 12px 0;
  font-size: 46px;
  line-height: 1.02;
}

.auth-brand p {
  max-width: 560px;
  color: rgba(255, 255, 255, 0.78);
  font-size: 18px;
}

.product-mark {
  width: 56px;
  height: 56px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.32);
  border-radius: 8px;
  font-weight: 800;
  font-size: 24px;
}

.auth-card {
  align-self: center;
  margin: 48px;
  padding: 32px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.auth-card.single {
  grid-column: 1 / -1;
  justify-self: center;
  width: min(520px, calc(100vw - 32px));
}

.auth-card h2,
.auth-card h1,
.panel h3,
.summary-band h2,
.topbar h1 {
  margin: 0;
}

.eyebrow {
  margin: 0 0 8px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0;
  text-transform: uppercase;
}

.auth-brand .eyebrow {
  color: rgba(255, 255, 255, 0.72);
}

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

.compact-copy {
  margin: 10px 0 16px;
  overflow-wrap: anywhere;
  font-size: 13px;
}

.stack {
  display: grid;
  gap: 16px;
}

label {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

input,
select {
  min-height: 42px;
  width: 100%;
  padding: 10px 12px;
  color: var(--ink);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 6px;
}

input:focus,
select:focus {
  outline: 2px solid rgba(23, 107, 93, 0.18);
  border-color: var(--primary);
}

.primary-button,
.ghost-button,
.danger-button {
  min-height: 40px;
  padding: 10px 14px;
  border: 0;
  border-radius: 6px;
  cursor: pointer;
  font-weight: 800;
  text-align: center;
}

.primary-button {
  color: #fff;
  background: var(--primary);
}

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

.ghost-button {
  color: var(--ink);
  background: #eef2f4;
}

.danger-button {
  color: #fff;
  background: var(--danger);
}

button:disabled,
select:disabled {
  cursor: not-allowed;
  opacity: 0.55;
}

.link-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.app-layout {
  width: min(1180px, calc(100vw - 32px));
  margin: 0 auto;
  padding: 28px 0 56px;
}

.topbar,
.summary-band,
.panel-title,
.status-row,
.table-head,
.table-row,
.button-row,
.topbar-actions {
  display: flex;
  align-items: center;
}

.topbar,
.summary-band,
.panel-title {
  justify-content: space-between;
  gap: 18px;
}

.topbar {
  margin-bottom: 24px;
}

.topbar-actions {
  gap: 12px;
}

.topbar-actions a {
  color: var(--muted);
  font-weight: 800;
}

.summary-band {
  margin-bottom: 20px;
  padding: 28px;
  color: #fff;
  background: #103c45;
  border-radius: 8px;
}

.summary-band p {
  margin-bottom: 0;
  color: rgba(255, 255, 255, 0.74);
}

.summary-meta {
  min-width: 240px;
  display: grid;
  gap: 6px;
  overflow-wrap: anywhere;
}

.summary-meta span {
  color: rgba(255, 255, 255, 0.64);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

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

.grid.two {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.grid.three {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.panel {
  padding: 22px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.warning-panel {
  border-color: rgba(180, 35, 24, 0.32);
}

.panel-title {
  margin-bottom: 18px;
}

.small-link {
  color: var(--primary);
  font-weight: 800;
}

.status-list {
  display: grid;
  gap: 10px;
}

.status-row,
.table-head,
.table-row {
  justify-content: space-between;
  gap: 12px;
}

.status-row {
  padding: 12px 0;
  border-top: 1px solid var(--line);
}

.pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 26px;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}

.pill.good {
  color: var(--good);
  background: #e8f6ef;
}

.pill.bad {
  color: var(--danger);
  background: #fdeceb;
}

.pill.warn {
  color: var(--warn);
  background: #fff4d6;
}

.pill.muted {
  color: var(--muted);
  background: #eef2f4;
}

.button-row {
  flex-wrap: wrap;
  gap: 8px;
}

.table {
  display: grid;
  gap: 0;
}

.table-head,
.table-row {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1.2fr;
  padding: 12px 0;
  border-top: 1px solid var(--line);
}

.table-head {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.table-row.compact {
  grid-template-columns: 1fr auto;
}

.empty {
  margin: 0;
  padding: 14px 0 0;
}

.compact-copy {
  margin: -4px 0 0;
}

.notice {
  margin-bottom: 18px;
  padding: 14px 16px;
  border-radius: 8px;
  font-weight: 700;
}

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

.notice-error {
  color: var(--danger);
  background: #fdeceb;
}

.checkbox-row {
  grid-template-columns: auto 1fr;
  align-items: center;
}

.checkbox-row input {
  width: auto;
  min-height: auto;
}

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

@media (max-width: 900px) {
  .auth-layout,
  .grid.two,
  .grid.three {
    grid-template-columns: 1fr;
  }

  .auth-brand {
    min-height: 42vh;
    padding: 40px 24px;
  }

  .auth-brand h1 {
    font-size: 34px;
  }

  .auth-card {
    margin: 24px;
  }

  .topbar,
  .summary-band,
  .panel-title {
    align-items: flex-start;
    flex-direction: column;
  }

  .topbar-actions,
  .button-row {
    align-items: stretch;
    width: 100%;
  }

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

  .table-head {
    display: none;
  }

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