:root {
  color-scheme: light;
  --bg: #f5f7fa;
  --panel: #ffffff;
  --text: #1d2939;
  --muted: #667085;
  --line: #d8dee8;
  --accent: #136f63;
  --accent-strong: #0b564d;
  --danger: #b42318;
  --danger-bg: #fff1f0;
  --success: #067647;
  --success-bg: #ecfdf3;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  letter-spacing: 0;
}

a {
  color: var(--accent);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

button,
input {
  font: inherit;
}

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

button:hover {
  background: var(--accent-strong);
}

.secondary-button {
  min-height: 36px;
  border: 1px solid var(--line);
  background: #ffffff;
  color: var(--text);
  padding: 0 12px;
}

.secondary-button:hover {
  background: #eef2f6;
}

.auth-page {
  display: grid;
  place-items: center;
  padding: 24px;
}

.auth-shell {
  width: min(100%, 420px);
}

.auth-panel,
.panel {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: 0 18px 50px rgba(29, 41, 57, 0.08);
  padding: 28px;
}

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

h1 {
  margin: 0;
  font-size: clamp(28px, 5vw, 38px);
  line-height: 1.1;
}

.form-stack {
  display: grid;
  gap: 18px;
  margin-top: 24px;
}

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

input {
  width: 100%;
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #ffffff;
  color: var(--text);
  padding: 0 12px;
}

input:focus {
  border-color: var(--accent);
  outline: 3px solid rgba(19, 111, 99, 0.16);
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 68px;
  border-bottom: 1px solid var(--line);
  background: #ffffff;
  padding: 0 28px;
}

.brand {
  color: var(--text);
  font-weight: 800;
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 16px;
  color: var(--muted);
  font-size: 14px;
}

.nav-actions form {
  margin: 0;
}

.page-shell {
  width: min(1180px, calc(100% - 40px));
  margin: 34px auto 56px;
}

.page-shell.narrow {
  width: min(100%, 560px);
}

.page-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 22px;
}

.page-heading > p {
  margin: 0;
  color: var(--muted);
  font-weight: 700;
}

.alert {
  border-radius: 6px;
  margin: 18px 0;
  padding: 12px 14px;
  font-weight: 700;
}

.alert-error {
  border: 1px solid #fecdca;
  background: var(--danger-bg);
  color: var(--danger);
}

.alert-success {
  border: 1px solid #abefc6;
  background: var(--success-bg);
  color: var(--success);
}

.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
}

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

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

th {
  background: #f8fafc;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

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

code {
  color: #344054;
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  font-size: 13px;
}

.status {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  border-radius: 999px;
  background: #ecfdf3;
  color: var(--success);
  font-size: 12px;
  font-weight: 800;
  padding: 0 10px;
}

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

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

.inline-form {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0;
}

.inline-form input {
  width: 190px;
  min-height: 36px;
}

.inline-form button {
  min-width: 120px;
  white-space: nowrap;
}

@media (max-width: 720px) {
  .topbar,
  .nav-actions,
  .page-heading {
    align-items: flex-start;
    flex-direction: column;
  }

  .topbar {
    padding: 18px 20px;
  }

  .nav-actions {
    gap: 10px;
  }

  .page-shell {
    width: min(100% - 28px, 1180px);
    margin-top: 24px;
  }
}
