:root {
  --bg: #f3f7f5;
  --ink: #0f1e28;
  --muted: #536372;
  --muted-2: #61707d;
  --line: #d5e2e5;
  --panel: #ffffff;
  --brand: #006c67;
  --brand-strong: #005651;
  --accent: #df8c24;
  --ok: #1e8c4b;
  --warn: #a45d00;
  --err: #a23438;
  --radius: 18px;
  --shadow: 0 18px 36px rgba(7, 42, 54, 0.1);
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
}

body {
  font-family: "Sora", "Avenir Next", "Segoe UI", sans-serif;
  color: var(--ink);
  background:
    radial-gradient(circle at 8% 0%, #d9efea 0%, transparent 30%),
    radial-gradient(circle at 95% 10%, #ffe2bd 0%, transparent 24%),
    linear-gradient(180deg, #f6faf8 0%, var(--bg) 100%);
  min-height: 100vh;
}

.bg-grid {
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(12, 44, 59, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(12, 44, 59, 0.03) 1px, transparent 1px);
  background-size: 38px 38px;
  mask-image: radial-gradient(circle at 50% 18%, black 36%, transparent 86%);
}

.shell {
  position: relative;
  width: min(1160px, 92vw);
  margin: 0 auto;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(244, 249, 247, 0.9);
  border-bottom: 1px solid rgba(0, 88, 84, 0.12);
  backdrop-filter: blur(10px);
}

.topbar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.95rem 0;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  color: var(--ink);
  text-decoration: none;
}

.brand-dot {
  width: 35px;
  height: 35px;
  border-radius: 11px;
  background: linear-gradient(140deg, var(--brand) 0%, #11aaa2 100%);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.44);
}

.brand-name {
  font-size: 0.98rem;
  letter-spacing: 0.06em;
  font-weight: 700;
}

.nav {
  display: flex;
  align-items: center;
  gap: 0.8rem;
}

.nav a {
  font-size: 0.89rem;
  color: #123546;
  padding: 0.38rem 0.6rem;
  border-radius: 10px;
  text-decoration: none;
}

.nav a:hover {
  background: rgba(0, 108, 103, 0.08);
}

.shell > .hero:first-child {
  margin-top: 1.15rem;
}

.hero {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: flex-start;
  margin-bottom: 0.95rem;
  padding: 1rem;
  border-radius: var(--radius);
  background: linear-gradient(145deg, rgba(0, 108, 103, 0.11), rgba(223, 140, 36, 0.08));
  border: 1px solid rgba(0, 108, 103, 0.22);
  box-shadow: var(--shadow);
}

.hero h1 {
  margin: 0.3rem 0 0.7rem;
  font-size: clamp(1.25rem, 3vw, 1.95rem);
  line-height: 1.12;
}

.eyebrow {
  margin: 0;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: #245368;
  font-size: 11px;
  font-weight: 700;
}

.subtle {
  margin: 0;
  color: var(--muted);
  max-width: 72ch;
  line-height: 1.5;
  font-size: 0.92rem;
}

.hero-actions {
  display: flex;
  gap: 0.55rem;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.panel {
  margin-top: 0.82rem;
  padding: 0.9rem;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--panel);
  box-shadow: var(--shadow);
}

.panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.7rem;
  margin-bottom: 0.72rem;
}

.panel h2 {
  margin: 0;
  font-size: 1rem;
}

.card {
  background: linear-gradient(180deg, #ffffff, #fcfefe);
  border: 1px solid #dfeaed;
  border-radius: 12px;
  padding: 0.78rem;
}

.card h3 {
  margin: 0 0 0.58rem;
  font-size: 0.9rem;
  color: #173d52;
}

.grid {
  display: grid;
  gap: 0.75rem;
}

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

label {
  display: block;
  margin-bottom: 0.62rem;
  font-size: 12px;
  color: var(--muted);
  font-weight: 500;
}

input,
select,
button,
textarea {
  font: inherit;
}

input,
select {
  width: 100%;
  margin-top: 0.35rem;
  border-radius: 10px;
  border: 1px solid #d5e3e8;
  background: #ffffff;
  color: var(--ink);
  padding: 0.6rem 0.72rem;
  min-height: 40px;
}

input:focus,
select:focus {
  outline: 2px solid rgba(0, 108, 103, 0.22);
  border-color: rgba(0, 108, 103, 0.4);
}

.btn {
  border: 0;
  background: linear-gradient(120deg, var(--brand) 0%, #00847d 100%);
  color: #ffffff;
  padding: 0.58rem 0.78rem;
  min-height: 40px;
  border-radius: 10px;
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  font-weight: 700;
  font-size: 0.82rem;
  transition: transform 120ms ease, filter 120ms ease, opacity 120ms ease;
  box-shadow: 0 8px 18px rgba(0, 108, 103, 0.28);
}

.btn:hover {
  filter: brightness(1.04);
  text-decoration: none;
}

.btn:active {
  transform: translateY(1px);
}

.btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.btn-secondary {
  background: #ffffff;
  color: var(--brand);
  border: 1px solid rgba(0, 108, 103, 0.25);
  box-shadow: none;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.35rem;
}

.kv {
  display: grid;
  grid-template-columns: 168px 1fr;
  gap: 0.55rem;
  align-items: start;
  padding: 0.24rem 0;
}

.kv span {
  color: var(--muted-2);
  font-size: 12px;
}

.kv strong {
  font-weight: 600;
}

code {
  background: #eaf2f4;
  border: 1px solid #d5e3e9;
  border-radius: 6px;
  padding: 0.08rem 0.34rem;
  color: #1f4255;
  word-break: break-all;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
  font-size: 12px;
}

.muted {
  color: var(--muted-2);
  font-size: 12px;
  line-height: 1.45;
}

.table-wrap {
  overflow: auto;
  border-radius: 12px;
  border: 1px solid #dce8ed;
}

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

th,
td {
  text-align: left;
  padding: 0.56rem;
  border-bottom: 1px solid #e4edf1;
  vertical-align: top;
  font-size: 12px;
  color: #1f4358;
}

th {
  color: #426173;
  font-weight: 700;
  background: #f7fcfd;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.json,
.log {
  background: #f7fcfd;
  color: #1f4358;
  border: 1px solid #d6e5eb;
  border-radius: 10px;
  padding: 0.58rem;
  overflow: auto;
  max-height: 260px;
  font-size: 12px;
  line-height: 1.45;
  white-space: pre-wrap;
  word-break: break-word;
}

.log {
  max-height: 220px;
}

.list {
  margin: 0;
  padding-left: 1.05rem;
  color: var(--muted);
  line-height: 1.48;
  font-size: 0.87rem;
}

.badge-ok,
.badge-warn,
.badge-err {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  padding: 0.17rem 0.5rem;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.03em;
}

.badge-ok {
  color: #11592b;
  background: #daf4e3;
}

.badge-warn {
  color: #794100;
  background: #ffe7c8;
}

.badge-err {
  color: #7a272c;
  background: #f8d9dd;
}

@media (max-width: 980px) {
  .grid.two {
    grid-template-columns: 1fr;
  }

  .hero {
    flex-direction: column;
  }

  .hero-actions {
    justify-content: flex-start;
  }

  .kv {
    grid-template-columns: 1fr;
    gap: 0.24rem;
  }
}

@media (max-width: 720px) {
  .topbar-inner {
    flex-wrap: wrap;
  }

  .nav {
    width: 100%;
    justify-content: flex-start;
    overflow-x: auto;
    padding-bottom: 0.3rem;
  }
}
