:root {
  --bg: #ffffff;
  --text: #1a1a1a;
  --muted: #8a8a8a;
  --line: #f0f0f0;
  --accent: #2d2d2d;
  --accent-soft: #f7f7f7;
  --radius: 25px;
  --space: 32px;
  --space-lg: 48px;
  --space-sm: 16px;
  --font: "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
}

body {
  letter-spacing: 0.01em;
}

a {
  color: inherit;
  text-decoration: none;
}

.page {
  min-height: 100vh;
  background: var(--bg);
}

.wrap {
  width: min(1120px, calc(100% - 64px));
  margin: 0 auto;
  padding: var(--space-lg) 0;
}

.brand {
  font-size: 42px;
  font-weight: 700;
  letter-spacing: 0.04em;
  margin: 0 0 12px;
}

.lead {
  margin: 0;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.7;
}

.panel {
  margin-top: var(--space-lg);
  padding: var(--space-lg);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--bg);
}

.field {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 28px;
}

.field label {
  font-size: 14px;
  color: var(--muted);
}

.field input {
  height: 56px;
  padding: 0 20px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--bg);
  font-size: 16px;
  outline: none;
  transition: border-color 0.2s ease;
}

.field input:focus {
  border-color: #d0d0d0;
}

.captcha-row,
.code-row {
  display: flex;
  align-items: center;
  gap: 12px;
}

.captcha-row img {
  height: 56px;
  width: 160px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  cursor: pointer;
  object-fit: contain;
  background: var(--bg);
  flex: 0 0 160px;
}

.captcha-row input,
.code-row input {
  flex: 1;
  margin: 0;
}

.code-row .btn {
  flex: 0 0 auto;
  min-width: 120px;
  white-space: nowrap;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin-top: 8px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 52px;
  min-height: 52px;
  padding: 0 28px;
  border: none;
  border-radius: var(--radius);
  background: var(--accent);
  color: #fff;
  font-family: "Microsoft YaHei UI", "Microsoft YaHei", "PingFang SC", "Hiragino Sans GB", sans-serif;
  font-size: 15px;
  font-weight: 400;
  line-height: 1;
  letter-spacing: 0;
  -webkit-appearance: none;
  appearance: none;
  cursor: pointer;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

a.btn {
  text-decoration: none;
  box-sizing: border-box;
}

/* 中文字形在 em 盒内偏上：用内层标签做光学下移 */
.btn > .btn-text {
  display: inline-block;
  transform: translateY(0.08em);
  line-height: 1;
}

.btn:hover {
  opacity: 0.92;
}

.btn:active {
  transform: scale(0.98);
}

.btn-ghost {
  background: var(--accent-soft);
  color: var(--text);
}

.btn-ghost > .btn-text {
  /* 浅底对比更强，中文视觉重心略偏上 */
  transform: translateY(0.1em);
}

.msg {
  min-height: 24px;
  margin: 0 0 20px;
  color: #c45c5c;
  font-size: 14px;
}

.topbar {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: var(--space);
  padding-bottom: var(--space);
  border-bottom: 1px solid var(--line);
}

.topbar .brand {
  font-size: 34px;
  margin: 0;
}

.toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin: var(--space) 0;
}

.search {
  flex: 1 1 280px;
  height: 52px;
  padding: 0 22px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--bg);
  font-size: 15px;
  outline: none;
}

.letters {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin: 8px 0 var(--space);
}

.letter {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 52px;
  height: 44px;
  padding: 0 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--bg);
  color: var(--muted);
  font-family: inherit;
  font-size: 15px;
  line-height: 1;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.letter.active,
.letter:hover {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 24px;
}

.card {
  padding: 28px 24px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--bg);
  transition: border-color 0.2s ease, transform 0.2s ease;
}

.card:hover {
  border-color: #e4e4e4;
  transform: translateY(-2px);
}

.card .title {
  margin: 0 0 8px;
  font-size: 22px;
  font-weight: 650;
}

.card .meta {
  margin: 0 0 20px;
  color: var(--muted);
  font-size: 13px;
}

.stepper {
  display: flex;
  align-items: center;
  gap: 10px;
}

.stepper button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: var(--accent-soft);
  color: var(--text);
  font-family: inherit;
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
}

.stepper input {
  width: 72px;
  height: 40px;
  border: 1px solid var(--line);
  border-radius: 20px;
  text-align: center;
  font-size: 16px;
  outline: none;
}

.empty {
  padding: var(--space-lg) 0;
  color: var(--muted);
  text-align: center;
}

.table-wrap {
  overflow-x: auto;
}

.admin-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

.admin-table th,
.admin-table td {
  padding: 14px 12px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: middle;
}

.admin-table th {
  color: var(--muted);
  font-weight: 600;
  white-space: nowrap;
}

.badge {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 10px;
  border-radius: 14px;
  background: var(--accent-soft);
  color: var(--text);
  font-size: 12px;
}

.badge-warn {
  background: #f4ecec;
  color: #a35b5b;
}

.row-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.hours-input {
  width: 84px;
  height: 40px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 20px;
  font-size: 14px;
  outline: none;
}

.btn-sm {
  height: 40px;
  min-height: 40px;
  padding: 0 16px;
  font-size: 13px;
}

.pager {
  display: flex;
  gap: 12px;
  align-items: center;
  margin-top: 20px;
  color: var(--muted);
  font-size: 14px;
}

@media (max-width: 720px) {
  .wrap {
    width: calc(100% - 40px);
    padding: 32px 0;
  }

  .brand {
    font-size: 32px;
  }

  .panel {
    padding: 28px;
  }

  .topbar {
    flex-direction: column;
    align-items: flex-start;
  }
}
