:root {
  color-scheme: light;
  --bg: #eff6fb;
  --panel: rgba(255, 255, 255, 0.82);
  --panel-soft: rgba(238, 245, 241, 0.82);
  --ink: #17211f;
  --muted: #5e6c67;
  --line: rgba(216, 225, 221, 0.82);
  --teal: #0f766e;
  --teal-dark: #0a5f59;
  --rose: #be123c;
  --shadow: 0 18px 46px rgba(27, 52, 75, 0.14);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    linear-gradient(90deg, rgba(236, 246, 255, 0.38), rgba(246, 250, 255, 0.68)),
    linear-gradient(180deg, rgba(236, 246, 255, 0.08), rgba(213, 232, 248, 0.42)),
    url("/assets/background-022.png") center / cover fixed no-repeat,
    var(--bg);
  color: var(--ink);
  font-family: "Microsoft YaHei", "PingFang SC", "Segoe UI", sans-serif;
}

button,
input,
textarea {
  font: inherit;
}

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

.app-shell {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 28px 0 40px;
}

.user-shell {
  width: min(960px, calc(100% - 32px));
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 18px 0 22px;
}

.brand {
  display: flex;
  align-items: center;
  min-width: 0;
  gap: 16px;
}

.brand-art {
  width: 86px;
  height: 58px;
  object-fit: cover;
  border-radius: 8px;
  box-shadow: 0 8px 20px rgba(43, 81, 116, 0.18);
}

.eyebrow {
  margin: 0 0 4px;
  color: var(--teal);
  font-size: 13px;
  font-weight: 700;
}

h1,
h2 {
  margin: 0;
  letter-spacing: 0;
}

h1 {
  font-size: clamp(28px, 5vw, 44px);
  line-height: 1.05;
}

h2 {
  font-size: 18px;
}

.panel,
.metric {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
  backdrop-filter: blur(14px) saturate(130%);
  -webkit-backdrop-filter: blur(14px) saturate(130%);
}

.panel {
  padding: 18px;
}

.panel-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 16px;
}

.auth-layout {
  min-height: 520px;
  display: grid;
  place-items: center;
}

.auth-panel {
  width: min(420px, 100%);
  display: grid;
  gap: 10px;
}

.submit-layout {
  display: grid;
  grid-template-columns: 320px minmax(0, 1fr);
  gap: 16px;
  align-items: start;
}

.submit-layout > * {
  min-width: 0;
}

.submit-panel {
  display: grid;
  gap: 10px;
}

.identity-card {
  display: grid;
  gap: 8px;
  padding: 14px;
  border-radius: 8px;
  background: var(--panel-soft);
}

.identity-card span {
  font-size: 26px;
  font-weight: 800;
}

.identity-card strong,
.mini-stats strong {
  color: var(--teal-dark);
}

.mini-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 12px;
}

.mini-stats div {
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.mini-stats span,
.metric span,
label,
.subtle {
  color: var(--muted);
  font-size: 13px;
}

label {
  font-weight: 700;
}

input,
textarea {
  width: 100%;
  border: 1px solid rgba(190, 210, 220, 0.9);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.88);
  color: var(--ink);
  outline: none;
}

input {
  min-height: 42px;
  padding: 0 12px;
}

input:focus,
textarea:focus {
  border-color: var(--teal);
  box-shadow: 0 0 0 3px rgba(15, 118, 110, 0.12);
}

.btn {
  min-height: 40px;
  border: 1px solid transparent;
  border-radius: 8px;
  padding: 0 16px;
  cursor: pointer;
  transition: transform 0.15s ease, border-color 0.15s ease, background 0.15s ease;
  white-space: nowrap;
}

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

.wide {
  width: 100%;
}

.primary {
  background: var(--teal);
  color: #ffffff;
}

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

.secondary {
  background: rgba(232, 243, 239, 0.9);
  color: var(--teal-dark);
  border-color: #b8d8d0;
}

.ghost {
  background: rgba(255, 255, 255, 0.78);
  color: var(--ink);
  border-color: var(--line);
}

.link-btn {
  display: inline-flex;
  align-items: center;
}

.top-actions,
.admin-tools {
  display: flex;
  align-items: center;
  gap: 10px;
}

.pill {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  border-radius: 999px;
  padding: 0 10px;
  color: var(--teal-dark);
  background: rgba(232, 243, 239, 0.9);
  font-size: 13px;
  font-weight: 700;
}

.success-pill {
  color: #166534;
  background: #dcfce7;
}

.preview {
  margin: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  background: rgba(248, 250, 249, 0.9);
}

.preview img {
  display: block;
  width: 100%;
  max-height: 280px;
  object-fit: contain;
  background: #ffffff;
}

.preview figcaption {
  padding: 8px 10px;
  color: var(--muted);
  font-size: 12px;
}

.form-message {
  min-height: 22px;
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

.form-message.error {
  color: var(--rose);
}

.form-message.success {
  color: var(--teal);
}

.metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}

.metric {
  min-height: 92px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.metric strong {
  margin-top: 6px;
  font-size: 28px;
}

.list-panel {
  margin-top: 0;
}

.search {
  max-width: 240px;
}

.table-wrap {
  overflow: auto;
  max-height: 620px;
  border: 1px solid var(--line);
  border-radius: 8px;
}

table {
  width: 100%;
  border-collapse: collapse;
  min-width: 820px;
  background: rgba(255, 255, 255, 0.88);
}

th,
td {
  padding: 12px 10px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  font-size: 14px;
}

th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: rgba(238, 245, 241, 0.96);
  color: #29413b;
  font-weight: 800;
}

.status {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  border-radius: 999px;
  padding: 0 10px;
  font-size: 12px;
  font-weight: 800;
}

.status.done {
  background: #dcfce7;
  color: #166534;
}

.status.todo {
  background: #fee2e2;
  color: #991b1b;
}

.thumb {
  width: 50px;
  height: 36px;
  object-fit: cover;
  border-radius: 6px;
  border: 1px solid var(--line);
  vertical-align: middle;
}

.hidden {
  display: none !important;
}

@media (max-width: 880px) {
  .app-shell,
  .user-shell {
    width: min(100% - 20px, 720px);
    padding-top: 12px;
  }

  .topbar,
  .panel-heading {
    align-items: flex-start;
    flex-direction: column;
  }

  .submit-layout,
  .metrics {
    grid-template-columns: 1fr;
  }

  .admin-tools,
  .top-actions {
    width: 100%;
    flex-wrap: wrap;
  }

  .admin-tools .search {
    max-width: none;
  }
}
