:root {
  --bg: #f6f7f9;
  --text: #15202b;
  --muted: #647184;
  --line: #d9dee7;
  --panel: #ffffff;
  --accent: #0f766e;
  --accent-dark: #115e59;
  --danger: #b42318;
  --warn: #b45309;
  --ok: #15803d;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
  line-height: 1.5;
}

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

.topbar {
  min-height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 0 32px;
  background: #ffffff;
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  z-index: 2;
}

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

nav {
  display: flex;
  gap: 8px;
}

nav a,
.subnav a {
  padding: 8px 12px;
  border-radius: 6px;
  color: var(--muted);
}

nav a.active,
nav a:hover,
.subnav a:hover {
  background: #e7f5f2;
  color: var(--accent-dark);
}

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

.hero {
  min-height: 220px;
  display: flex;
  align-items: center;
  padding: 34px;
  border-radius: 8px;
  background:
    linear-gradient(90deg, rgba(8, 47, 73, 0.9), rgba(15, 118, 110, 0.72)),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='1200' height='320'%3E%3Crect fill='%2315202b' width='1200' height='320'/%3E%3Cg fill='%23ffffff' opacity='.12'%3E%3Crect x='60' y='50' width='180' height='90' rx='10'/%3E%3Crect x='280' y='110' width='220' height='120' rx='10'/%3E%3Crect x='560' y='45' width='190' height='160' rx='10'/%3E%3Crect x='830' y='90' width='240' height='110' rx='10'/%3E%3C/g%3E%3C/svg%3E");
  color: #ffffff;
  margin-bottom: 18px;
}

.hero h1 {
  font-size: 34px;
  line-height: 1.15;
  margin: 6px 0 10px;
}

.hero p {
  max-width: 680px;
  color: rgba(255, 255, 255, 0.86);
}

.eyebrow {
  margin: 0;
  font-size: 13px;
  letter-spacing: 0;
  font-weight: 700;
}

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

.login {
  max-width: 460px;
}

label {
  display: block;
  font-weight: 700;
  margin-bottom: 8px;
}

input,
select,
textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 11px 12px;
  font: inherit;
  background: #fff;
}

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

button {
  border: 0;
  border-radius: 6px;
  background: var(--accent);
  color: #fff;
  font-weight: 700;
  padding: 11px 16px;
  cursor: pointer;
  white-space: nowrap;
}

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

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

button.ghost {
  background: #475569;
}

.login button,
.claim-box button {
  width: 100%;
  margin-top: 14px;
}

.notice,
.alert {
  padding: 12px 14px;
  border-radius: 6px;
  margin: 14px 0;
}

.notice {
  background: #e7f5f2;
  color: var(--accent-dark);
}

.alert {
  background: #fff7ed;
  color: var(--warn);
}

.subnav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 18px;
  color: var(--muted);
}

.task-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: var(--muted);
}

.badge,
.mini {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 4px 10px;
  border-radius: 999px;
  background: #e7f5f2;
  color: var(--accent-dark);
  font-weight: 700;
  font-size: 13px;
}

.mini {
  min-height: 24px;
  border-radius: 6px;
}

.mini.rejected {
  background: #fee4e2;
  color: var(--danger);
}

.mini.approved {
  background: #dcfce7;
  color: var(--ok);
}

.mini.expired,
.mini.disabled {
  background: #e2e8f0;
  color: #475569;
}

.task-card h2 {
  font-size: 28px;
  margin: 18px 0 4px;
}

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

.link-box {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  margin-top: 18px;
}

.link-box a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
  border: 1px solid var(--accent);
  padding: 0 16px;
  font-weight: 700;
}

.claim-box {
  margin-top: 18px;
}

.stats {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 12px;
  margin-bottom: 16px;
}

.stat {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 16px;
}

.stat b {
  display: block;
  font-size: 28px;
}

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

.filters,
.grid-form {
  display: grid;
  grid-template-columns: 180px 1fr auto;
  gap: 10px;
  margin-bottom: 16px;
}

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

.grid-form textarea,
.grid-form button {
  grid-column: 1 / -1;
}

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

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

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

th {
  background: #f8fafc;
  color: #334155;
  font-size: 13px;
}

.inline {
  display: grid;
  grid-template-columns: minmax(120px, 1fr) auto auto auto;
  gap: 6px;
  min-width: 420px;
}

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

@media (max-width: 760px) {
  .topbar,
  .subnav,
  .task-head {
    align-items: flex-start;
    flex-direction: column;
  }

  .container {
    width: min(100% - 20px, 1180px);
    margin-top: 16px;
  }

  .hero {
    padding: 24px;
  }

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

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

  .filters,
  .link-box,
  .grid-form {
    grid-template-columns: 1fr;
  }

  .link-box a {
    min-height: 44px;
  }
}
