* { box-sizing: border-box; }

:root {
  --bg: #f4f7f2;
  --surface: #ffffff;
  --surface-soft: #f8faf6;
  --line: #d7e0d8;
  --line-strong: #bfd0c1;
  --text: #173127;
  --muted: #627068;
  --muted-2: #85928a;
  --brand: #245e49;
  --brand-2: #1d4e3d;
  --brand-soft: #e8f1ea;
  --danger: #8f4b4b;
  --shadow: 0 16px 40px rgba(21, 39, 31, 0.08);
}

body {
  margin: 0;
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(36, 94, 73, 0.08), transparent 28%),
    linear-gradient(180deg, #fafcf8 0%, var(--bg) 100%);
  font: 14px/1.5 -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
}

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

a:hover {
  color: var(--brand-2);
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 14px 24px;
  background: rgba(255, 255, 255, 0.92);
  border-bottom: 1px solid rgba(215, 224, 216, 0.9);
  backdrop-filter: blur(14px);
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
  color: var(--text);
}

.brand-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--brand), #1e7a58);
  color: #fff;
  font-size: 18px;
  font-weight: 800;
  box-shadow: var(--shadow);
}

.brand strong,
.brand small {
  display: block;
}

.brand strong {
  font-size: 15px;
  line-height: 1.2;
}

.brand small {
  color: var(--muted);
  font-size: 12px;
  margin-top: 2px;
}

nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 8px 14px;
}

nav a {
  color: var(--muted);
  font-weight: 650;
  padding: 8px 10px;
  border-radius: 10px;
}

nav a:hover {
  background: var(--brand-soft);
}

.nav-exit {
  color: var(--danger);
}

.container {
  width: min(1200px, calc(100% - 32px));
  margin: 28px auto 64px;
}

.hero,
.panel,
.login-panel,
.metric,
.page-head {
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: var(--shadow);
}

.hero {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  padding: 24px;
  margin-bottom: 18px;
}

.hero-copy {
  max-width: 720px;
}

.hero h1,
.page-head h1,
.login-panel h1 {
  margin: 4px 0 10px;
  line-height: 1.15;
  color: var(--text);
}

.hero h1 {
  font-size: 34px;
}

.hero p {
  margin: 0;
  color: var(--muted);
  font-size: 15px;
}

.hero-badges {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
  max-width: 280px;
}

.hero-badges span,
.page-count {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  padding: 0 12px;
  border-radius: 999px;
  background: var(--brand-soft);
  color: var(--brand-2);
  font-weight: 700;
  white-space: nowrap;
}

.eyebrow {
  margin: 0;
  color: #6a7d73;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.metrics {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
  gap: 12px;
  margin-bottom: 18px;
}

.metric {
  display: grid;
  gap: 8px;
  min-height: 96px;
  padding: 16px;
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.metric:hover {
  transform: translateY(-1px);
  box-shadow: 0 18px 32px rgba(21, 39, 31, 0.12);
}

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

.metric strong {
  font-size: 30px;
  line-height: 1;
  color: var(--text);
}

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

.panel,
.login-panel {
  padding: 22px;
}

.panel {
  margin-bottom: 18px;
}

.panel-title {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
}

h2 {
  margin: 4px 0 0;
  font-size: 19px;
  color: var(--text);
}

.page-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 22px;
  margin-bottom: 18px;
}

.form {
  display: grid;
  gap: 14px;
}

.grid-form {
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  align-items: end;
}

label {
  display: grid;
  gap: 7px;
  color: #42554d;
  font-weight: 700;
}

input,
textarea {
  width: 100%;
  border: 1px solid var(--line-strong);
  border-radius: 12px;
  padding: 12px 13px;
  font: inherit;
  color: var(--text);
  background: var(--surface);
  outline: none;
  transition: border-color 0.16s ease, box-shadow 0.16s ease;
}

input:focus,
textarea:focus {
  border-color: #7bb197;
  box-shadow: 0 0 0 4px rgba(36, 94, 73, 0.12);
}

textarea {
  resize: vertical;
  min-height: 92px;
}

button,
.text-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  border: 0;
  border-radius: 12px;
  padding: 0 16px;
  font: inherit;
  font-weight: 800;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

button {
  color: #fff;
  background: linear-gradient(135deg, var(--brand), #1f7655);
  box-shadow: 0 10px 20px rgba(36, 94, 73, 0.18);
}

button:hover {
  transform: translateY(-1px);
}

.text-action {
  min-height: 32px;
  padding: 0 10px;
  color: var(--brand);
  background: var(--brand-soft);
}

.inline {
  display: inline;
}

.inline button {
  min-height: 32px;
  padding: 0 10px;
  margin-left: 8px;
  background: linear-gradient(135deg, #a15656, var(--danger));
  box-shadow: none;
}

.flash {
  margin-bottom: 14px;
  padding: 12px 14px;
  border: 1px solid #bfd7c7;
  border-radius: 12px;
  background: #eef6f1;
  color: var(--brand-2);
  font-weight: 700;
}

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

table {
  width: 100%;
  border-collapse: collapse;
  background: #fff;
}

th,
td {
  border-bottom: 1px solid #e7ece8;
  padding: 12px 10px;
  text-align: left;
  vertical-align: top;
  max-width: 260px;
  overflow-wrap: anywhere;
}

th {
  background: #f4f7f3;
  color: #4d6057;
  font-weight: 800;
}

tbody tr:hover {
  background: #fafdf8;
}

.empty {
  color: var(--muted-2);
  text-align: center;
  padding: 18px 10px;
}

.login-panel {
  width: min(440px, 100%);
  margin: 72px auto;
}

.login-copy {
  margin: 0 0 18px;
  color: var(--muted);
}

@media (max-width: 900px) {
  .topbar,
  .hero,
  .page-head,
  .panel-title {
    flex-direction: column;
    align-items: flex-start;
  }

  nav {
    justify-content: flex-start;
  }

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

