/* ============================================================
   表单收集服务 · 公共表单 / 管理后台
   ============================================================ */

:root {
  --ink: #16211d;
  --ink-soft: #293a34;
  --muted: #66736e;
  --faint: #8b9691;
  --paper: #f3f1e9;
  --surface: #fffefa;
  --surface-2: #faf8f1;
  --line: #e0dcd0;
  --line-strong: #cbc5b6;
  --accent: #0f766e;
  --accent-strong: #0a5b55;
  --accent-soft: #e7f3ef;
  --accent-ink: #073b37;
  --danger: #b42318;
  --danger-soft: #fef3f2;
  --warn: #9a6700;
  --sidebar: #142923;
  --sidebar-2: #0d1e19;
  --shadow-sm: 0 1px 2px rgba(22, 33, 29, .05), 0 4px 14px rgba(22, 33, 29, .04);
  --shadow-md: 0 12px 34px rgba(22, 33, 29, .08), 0 2px 8px rgba(22, 33, 29, .04);
  --shadow-lg: 0 28px 80px rgba(22, 33, 29, .16), 0 8px 24px rgba(22, 33, 29, .08);
  --radius-sm: 10px;
  --radius: 16px;
  --radius-lg: 26px;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB",
    "Microsoft YaHei", "Noto Sans SC", sans-serif;
  --mono: ui-monospace, SFMono-Regular, "SF Mono", Consolas, "Liberation Mono", monospace;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font);
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body,
button,
input,
select,
textarea {
  font-family: var(--font);
}

img,
svg {
  display: block;
}

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

button {
  cursor: pointer;
}

[hidden] {
  display: none !important;
}

::selection {
  background: var(--accent);
  color: #fff;
}

:focus-visible {
  outline: 3px solid color-mix(in srgb, var(--accent) 45%, transparent);
  outline-offset: 2px;
}

/* ============================================================
   公共页
   ============================================================ */

.public-page {
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  position: relative;
  overflow-x: hidden;
  background:
    linear-gradient(rgba(22, 33, 29, .025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(22, 33, 29, .025) 1px, transparent 1px),
    var(--paper);
  background-size: 56px 56px;
}

.page-glow {
  position: fixed;
  border-radius: 50%;
  filter: blur(2px);
  pointer-events: none;
  z-index: 0;
}

.page-glow-a {
  width: 520px;
  height: 520px;
  top: -240px;
  right: -120px;
  background: radial-gradient(circle, rgba(15, 118, 110, .16), rgba(15, 118, 110, 0) 68%);
}

.page-glow-b {
  width: 460px;
  height: 460px;
  left: -220px;
  bottom: -180px;
  background: radial-gradient(circle, rgba(188, 149, 76, .14), rgba(188, 149, 76, 0) 68%);
}

.public-header {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 28px 36px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: -.01em;
}

.brand-mark {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border-radius: 11px;
  background: var(--ink);
  color: #fff;
  box-shadow: 0 5px 14px rgba(22, 33, 29, .14);
}

.brand-mark svg {
  width: 20px;
  height: 20px;
}

.brand-mark-dark {
  background: rgba(255, 255, 255, .1);
  color: #e8f3ef;
  box-shadow: none;
}

.secure-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 13px;
  border: 1px solid rgba(22, 33, 29, .1);
  border-radius: 999px;
  background: rgba(255, 254, 250, .56);
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .02em;
  backdrop-filter: blur(8px);
}

.secure-dot,
.status-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #17a673;
  box-shadow: 0 0 0 4px rgba(23, 166, 115, .12);
}

.form-shell {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 44px 36px 72px;
  display: grid;
  grid-template-columns: minmax(0, .92fr) minmax(0, 1.08fr);
  gap: clamp(36px, 6vw, 82px);
  align-items: start;
}

.form-intro {
  padding-top: 44px;
  position: sticky;
  top: 36px;
}

.eyebrow {
  margin: 0 0 18px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .2em;
  color: var(--accent);
}

.form-intro h1 {
  margin: 0;
  font-size: clamp(2.45rem, 4.5vw, 4.35rem);
  line-height: 1.04;
  letter-spacing: -.055em;
  font-weight: 680;
  text-wrap: balance;
}

.intro-copy {
  margin: 24px 0 0;
  max-width: 44ch;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.85;
  white-space: pre-line;
}

.intro-points {
  list-style: none;
  margin: 36px 0 0;
  padding: 0;
  display: grid;
  gap: 17px;
}

.intro-points li {
  display: flex;
  gap: 14px;
  align-items: flex-start;
}

.point-icon {
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 700;
  color: var(--muted);
  background: rgba(255, 254, 250, .55);
}

.intro-points strong {
  display: block;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.5;
}

.intro-points small {
  display: block;
  margin-top: 2px;
  font-size: 12.5px;
  color: var(--faint);
  line-height: 1.6;
}

.intro-footnote {
  margin: 32px 0 0;
  padding-top: 18px;
  border-top: 1px solid var(--line);
  max-width: 36ch;
  font-size: 12px;
  color: var(--faint);
  line-height: 1.7;
}

.form-card {
  position: relative;
  background: var(--surface);
  border: 1px solid rgba(22, 33, 29, .09);
  border-radius: var(--radius-lg);
  padding: clamp(24px, 4vw, 42px);
  box-shadow: var(--shadow-lg);
  animation: rise-in .55s cubic-bezier(.22, .8, .3, 1) both;
}

.form-card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 4px;
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  background: linear-gradient(90deg, var(--accent), color-mix(in srgb, var(--accent) 35%, #d8c08a));
}

.form-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 26px;
}

.form-kicker {
  margin: 0 0 7px;
  font-size: 11px;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--faint);
  font-weight: 700;
}

.form-card-head h2 {
  margin: 0;
  font-size: clamp(1.25rem, 2vw, 1.55rem);
  line-height: 1.35;
  letter-spacing: -.025em;
}

.required-note {
  flex: 0 0 auto;
  padding-top: 6px;
  font-size: 11.5px;
  color: var(--faint);
}

.required-note i {
  font-style: normal;
  color: var(--danger);
  font-weight: 700;
}

.fields {
  display: grid;
  gap: 21px;
}

.field {
  min-width: 0;
}

.field-label {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 7px;
  margin-bottom: 8px;
  font-size: 13.5px;
  font-weight: 650;
  color: var(--ink-soft);
}

.field-required {
  color: var(--danger);
  font-size: 13px;
}

.field-help {
  flex: 1 0 100%;
  margin-left: 0;
  order: 3;
  font-weight: 400;
  font-size: 11.5px;
  line-height: 1.5;
  color: var(--faint);
}

.field-input,
.field-textarea,
.field-select {
  width: 100%;
  border: 1px solid var(--line-strong);
  border-radius: 12px;
  background: #fff;
  color: var(--ink);
  font-size: 15px;
  line-height: 1.5;
  padding: 13px 15px;
  transition: border-color .16s ease, box-shadow .16s ease, background .16s ease;
}

.field-input::placeholder,
.field-textarea::placeholder {
  color: #a7b0ac;
}

.field-input:hover,
.field-textarea:hover,
.field-select:hover {
  border-color: #aaa393;
}

.field-input:focus,
.field-textarea:focus,
.field-select:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 13%, transparent);
}

.field-textarea {
  resize: vertical;
  min-height: 108px;
}

.select-wrap {
  position: relative;
}

.select-wrap::after {
  content: "";
  position: absolute;
  right: 16px;
  top: 50%;
  width: 7px;
  height: 7px;
  border-right: 1.8px solid var(--muted);
  border-bottom: 1.8px solid var(--muted);
  transform: translateY(-70%) rotate(45deg);
  pointer-events: none;
}

.field-select {
  appearance: none;
  padding-right: 42px;
  cursor: pointer;
}

.field.has-error .field-input,
.field.has-error .field-textarea,
.field.has-error .field-select {
  border-color: var(--danger);
  background: #fffbfa;
}

.field.has-error .field-input:focus,
.field.has-error .field-textarea:focus,
.field.has-error .field-select:focus {
  box-shadow: 0 0 0 4px rgba(180, 35, 24, .1);
}

.field-error {
  margin: 7px 0 0;
  font-size: 12px;
  color: var(--danger);
  line-height: 1.5;
}

/* 可重复填写表格 */
.table-field {
  border: 1px solid var(--line-strong);
  border-radius: 12px;
  background: #fff;
  overflow: hidden;
}

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

.repeat-table {
  width: 100%;
  min-width: 440px;
  border-collapse: collapse;
}

.repeat-table th {
  padding: 10px 12px;
  border-bottom: 1px solid var(--line);
  background: var(--surface-2);
  color: var(--muted);
  font-size: 11px;
  font-weight: 650;
  text-align: left;
  white-space: nowrap;
}

.repeat-table td {
  padding: 8px;
  border-bottom: 1px solid #efebe1;
}

.repeat-table tr:last-child td {
  border-bottom: 0;
}

.table-input {
  width: 100%;
  min-width: 96px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 9px 10px;
  color: var(--ink);
  font-size: 13.5px;
  background: #fff;
}

.table-input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 12%, transparent);
}

.table-action-head,
.table-action-cell {
  width: 44px;
  text-align: center !important;
}

.table-remove {
  width: 27px;
  height: 27px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #fff;
  color: var(--faint);
  font-size: 16px;
  line-height: 1;
}

.table-remove:hover:not(:disabled) {
  border-color: #ecc5c0;
  color: var(--danger);
  background: var(--danger-soft);
}

.table-remove:disabled {
  opacity: .35;
  cursor: not-allowed;
}

.table-add-wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px;
  border-top: 1px solid var(--line);
  background: var(--surface-2);
}

.btn-table-add {
  border: 1px solid color-mix(in srgb, var(--accent) 35%, var(--line));
  border-radius: 8px;
  background: var(--accent-soft);
  color: var(--accent-strong);
  padding: 7px 11px;
  font-size: 12px;
  font-weight: 650;
}

.btn-table-add:hover:not(:disabled) {
  background: color-mix(in srgb, var(--accent) 16%, #fff);
}

.btn-table-add:disabled {
  opacity: .45;
  cursor: not-allowed;
}

.table-hint {
  color: var(--faint);
  font-size: 10.5px;
}

.field.has-error .table-field {
  border-color: var(--danger);
  background: #fffbfa;
}

/* 附件上传 */
.file-field {
  border: 1px solid var(--line-strong);
  border-radius: 12px;
  background: #fff;
  overflow: hidden;
}

.file-drop {
  position: relative;
  display: flex;
  align-items: center;
  gap: 13px;
  padding: 18px 16px;
  cursor: pointer;
  background:
    linear-gradient(135deg, rgba(29, 111, 184, .06), rgba(29, 111, 184, .015)),
    #fff;
  transition: background .16s ease, border-color .16s ease;
}

.file-drop:hover,
.file-drop:focus-visible,
.file-drop.is-dragging {
  background: var(--accent-soft);
  outline: none;
}

.file-drop.has-files {
  padding-bottom: 12px;
}

.file-input {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  pointer-events: none;
}

.file-icon {
  flex: 0 0 auto;
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 20px;
  font-weight: 700;
}

.file-copy {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.file-copy strong {
  color: var(--ink-soft);
  font-size: 13px;
  font-weight: 650;
}

.file-copy small {
  color: var(--faint);
  font-size: 10.5px;
  line-height: 1.5;
}

.file-list {
  display: grid;
  gap: 6px;
  padding: 0 12px 10px;
}

.file-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-2);
}

.file-meta {
  min-width: 0;
  display: flex;
  align-items: baseline;
  gap: 8px;
}

.file-meta strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--ink-soft);
  font-size: 11.5px;
  font-weight: 600;
}

.file-meta small {
  color: var(--faint);
  font-size: 9.5px;
  white-space: nowrap;
}

.file-remove {
  margin-left: auto;
  flex: 0 0 auto;
  width: 24px;
  height: 24px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  color: var(--faint);
  font-size: 15px;
  line-height: 1;
}

.file-remove:hover {
  border-color: #ecc5c0;
  color: var(--danger);
  background: var(--danger-soft);
}

.file-message {
  margin: 0;
  padding: 8px 13px;
  border-top: 1px solid #f2d7d3;
  background: var(--danger-soft);
  color: var(--danger);
  font-size: 11px;
  line-height: 1.5;
}

.field.has-error .file-field {
  border-color: var(--danger);
  background: #fffbfa;
}

/* 星级评分 */
.rating-group {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 6px 0;
}

.rating-star {
  appearance: none;
  border: 0;
  background: transparent;
  padding: 2px;
  font-size: 32px;
  line-height: 1;
  color: #d7d2c5;
  cursor: pointer;
  transition: color .12s ease, transform .12s ease;
}

.rating-star:hover,
.rating-star:focus-visible {
  color: #d7a23f;
  transform: scale(1.06);
}

.rating-star.is-on {
  color: #d7a23f;
}

.rating-hint {
  margin-left: 8px;
  color: var(--faint);
  font-size: 11.5px;
}

.field.has-error .rating-star {
  color: #d7d2c5;
}

.field.has-error .rating-star.is-on {
  color: #d7a23f;
}

/* 复选框 */
.check-field {
  display: flex;
  gap: 11px;
  align-items: flex-start;
  padding: 13px 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface-2);
  cursor: pointer;
  transition: border-color .16s ease, background .16s ease;
}

.check-field:hover {
  border-color: var(--line-strong);
}

.check-field input {
  position: absolute;
  opacity: 0;
  width: 1px;
  height: 1px;
}

.check-box {
  flex: 0 0 auto;
  width: 19px;
  height: 19px;
  margin-top: 1px;
  border: 1.5px solid #a9a192;
  border-radius: 5px;
  background: #fff;
  display: grid;
  place-items: center;
  transition: all .16s ease;
}

.check-box::after {
  content: "";
  width: 9px;
  height: 5px;
  border-left: 2px solid #fff;
  border-bottom: 2px solid #fff;
  transform: rotate(-45deg) translateY(-1px) scale(0);
  transition: transform .14s ease;
}

.check-field input:checked + .check-box {
  background: var(--accent);
  border-color: var(--accent);
}

.check-field input:checked + .check-box::after {
  transform: rotate(-45deg) translateY(-1px) scale(1);
}

.check-field input:focus-visible + .check-box {
  outline: 3px solid color-mix(in srgb, var(--accent) 35%, transparent);
  outline-offset: 2px;
}

.check-text {
  font-size: 13.5px;
  line-height: 1.55;
  color: var(--ink-soft);
}

.field.has-error .check-field {
  border-color: var(--danger);
  background: #fffbfa;
}

/* 单选 */
.radio-group {
  display: grid;
  gap: 9px;
}

.radio-option {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 13px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: var(--surface-2);
  cursor: pointer;
  font-size: 14px;
  transition: border-color .16s ease, background .16s ease;
}

.radio-option:hover {
  border-color: var(--line-strong);
}

.radio-option input {
  position: absolute;
  opacity: 0;
}

.radio-dot {
  width: 17px;
  height: 17px;
  border-radius: 50%;
  border: 1.5px solid #a9a192;
  background: #fff;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
}

.radio-dot::after {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent);
  transform: scale(0);
  transition: transform .14s ease;
}

.radio-option input:checked + .radio-dot {
  border-color: var(--accent);
}

.radio-option input:checked + .radio-dot::after {
  transform: scale(1);
}

.radio-option:has(input:checked) {
  border-color: color-mix(in srgb, var(--accent) 45%, var(--line));
  background: var(--accent-soft);
}

.honeypot {
  position: absolute !important;
  left: -9999px !important;
  width: 1px !important;
  height: 1px !important;
  overflow: hidden !important;
}

.form-alert {
  margin: 18px 0 0;
  padding: 12px 14px;
  border: 1px solid #f2c7c2;
  border-radius: 10px;
  background: var(--danger-soft);
  color: #8a1c12;
  font-size: 13px;
  line-height: 1.6;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 1px solid transparent;
  border-radius: 10px;
  padding: 11px 17px;
  font-size: 13.5px;
  font-weight: 650;
  line-height: 1.35;
  transition: transform .15s ease, background .15s ease, border-color .15s ease, box-shadow .15s ease;
  white-space: nowrap;
}

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

.btn-primary {
  background: var(--accent);
  color: #fff;
  box-shadow: 0 7px 18px color-mix(in srgb, var(--accent) 22%, transparent);
}

.btn-primary:hover {
  background: var(--accent-strong);
}

.btn-secondary {
  background: #fff;
  border-color: var(--line-strong);
  color: var(--ink-soft);
}

.btn-secondary:hover {
  border-color: #a9a192;
  background: var(--surface-2);
}

.btn-quiet {
  background: transparent;
  border-color: transparent;
  color: var(--muted);
}

.btn-quiet:hover {
  background: rgba(22, 33, 29, .055);
  color: var(--ink);
}

.btn-small {
  padding: 8px 12px;
  font-size: 12.5px;
}

.btn-submit {
  width: 100%;
  margin-top: 24px;
  padding: 15px 20px;
  font-size: 15px;
  border-radius: 12px;
}

.btn-submit:disabled {
  opacity: .72;
  cursor: wait;
  transform: none;
}

.form-consent {
  margin: 13px 0 0;
  text-align: center;
  color: var(--faint);
  font-size: 11px;
  line-height: 1.6;
}

.form-loading {
  min-height: 240px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  color: var(--muted);
  font-size: 13px;
}

.spinner {
  width: 18px;
  height: 18px;
  border: 2px solid rgba(22, 33, 29, .12);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin .7s linear infinite;
}

.spinner-light {
  border-color: rgba(255, 255, 255, .28);
  border-top-color: #fff;
}

.result-panel {
  min-height: 360px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 30px 10px;
}

.result-panel h3 {
  margin: 20px 0 8px;
  font-size: 1.45rem;
  letter-spacing: -.02em;
}

.result-panel p {
  margin: 0;
  max-width: 38ch;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.8;
  white-space: pre-line;
}

.result-panel .btn {
  margin-top: 24px;
}

.result-icon {
  width: 54px;
  height: 54px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--danger-soft);
  color: var(--danger);
  font-weight: 800;
  font-size: 22px;
}

.success-check {
  width: 84px;
  height: 84px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: var(--accent);
  background: var(--accent-soft);
  box-shadow: 0 0 0 10px color-mix(in srgb, var(--accent) 6%, transparent);
  animation: pop-in .45s cubic-bezier(.2, 1.4, .4, 1) both;
}

.success-check svg {
  width: 46px;
  height: 46px;
}

.receipt {
  margin-top: 18px !important;
  padding: 7px 12px;
  border: 1px dashed var(--line-strong);
  border-radius: 999px;
  font-family: var(--mono);
  font-size: 11px !important;
  color: var(--faint) !important;
}

.public-footer {
  position: relative;
  z-index: 1;
  margin-top: auto;
  padding: 24px 36px 30px;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 12px;
  color: var(--faint);
  font-size: 11.5px;
  letter-spacing: .01em;
}

.footer-sep {
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: var(--line-strong);
}

/* 首页目录 */
.index-page {
  justify-content: flex-start;
}

.index-shell {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 880px;
  margin: 0 auto;
  padding: clamp(46px, 9vh, 100px) 32px 80px;
}

.index-shell h1 {
  margin: 0;
  font-size: clamp(2.2rem, 5.5vw, 4rem);
  line-height: 1.08;
  letter-spacing: -.055em;
  font-weight: 680;
}

.index-lead {
  margin: 20px 0 38px;
  max-width: 54ch;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.8;
}

.form-directory {
  display: grid;
  gap: 12px;
}

.directory-card {
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 22px 24px;
  background: var(--surface);
  border: 1px solid rgba(22, 33, 29, .1);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}

.directory-card:hover {
  transform: translateY(-2px);
  border-color: color-mix(in srgb, var(--accent) 35%, var(--line));
  box-shadow: var(--shadow-md);
}

.directory-index {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--faint);
}

.directory-copy {
  min-width: 0;
  display: grid;
  gap: 5px;
}

.directory-copy strong {
  font-size: 16px;
  letter-spacing: -.015em;
}

.directory-copy small {
  color: var(--muted);
  font-size: 12.5px;
  line-height: 1.5;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.directory-arrow {
  margin-left: auto;
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 16px;
  flex: 0 0 auto;
}

.empty-state {
  padding: 52px 30px;
  text-align: center;
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius);
  background: rgba(255, 254, 250, .6);
}

.empty-state h2 {
  margin: 0 0 8px;
  font-size: 1.2rem;
}

.empty-state p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

/* ============================================================
   管理后台
   ============================================================ */

.admin-page {
  background: var(--paper);
}

.admin-shell {
  min-height: 100svh;
  display: grid;
  grid-template-columns: 256px minmax(0, 1fr);
}

.admin-sidebar {
  position: sticky;
  top: 0;
  height: 100svh;
  display: flex;
  flex-direction: column;
  padding: 26px 18px 22px;
  background:
    radial-gradient(500px 240px at 10% 0%, rgba(50, 132, 111, .18), transparent 70%),
    linear-gradient(170deg, var(--sidebar), var(--sidebar-2));
  color: #dce9e4;
  overflow-y: auto;
}

.admin-brand {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 4px 8px 28px;
  color: #f1f7f4;
}

.admin-brand strong {
  display: block;
  font-size: 13.5px;
  letter-spacing: -.01em;
  line-height: 1.4;
}

.admin-brand small {
  display: block;
  margin-top: 2px;
  color: rgba(220, 233, 228, .45);
  font-family: var(--mono);
  font-size: 8.5px;
  letter-spacing: .15em;
}

.admin-nav {
  display: grid;
  gap: 4px;
  padding-top: 20px;
  border-top: 1px solid rgba(255, 255, 255, .08);
}

.nav-item {
  appearance: none;
  border: 0;
  width: 100%;
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 11px 12px;
  border-radius: 9px;
  background: transparent;
  color: rgba(220, 233, 228, .66);
  font-size: 13px;
  font-weight: 600;
  text-align: left;
  transition: background .15s ease, color .15s ease;
}

.nav-item:hover {
  background: rgba(255, 255, 255, .06);
  color: #fff;
}

.nav-item.is-active {
  background: rgba(255, 255, 255, .11);
  color: #fff;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .06);
}

.nav-icon {
  width: 18px;
  height: 18px;
  color: rgba(220, 233, 228, .58);
}

.nav-icon svg {
  width: 18px;
  height: 18px;
}

.nav-item.is-active .nav-icon {
  color: #79d6bf;
}

.nav-badge {
  margin-left: auto;
  min-width: 20px;
  height: 20px;
  padding: 0 6px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: #d97745;
  color: #fff;
  font-size: 10px;
  font-weight: 800;
}

.sidebar-foot {
  margin-top: auto;
  padding-top: 22px;
  border-top: 1px solid rgba(255, 255, 255, .08);
}

.server-state {
  display: flex;
  gap: 11px;
  align-items: flex-start;
  padding: 4px 6px 14px;
}

.server-state .status-dot {
  margin-top: 5px;
  flex: 0 0 auto;
}

.server-state strong {
  display: block;
  font-size: 11.5px;
  font-weight: 650;
  color: rgba(235, 245, 241, .84);
}

.server-state small {
  display: block;
  margin-top: 3px;
  font-size: 10px;
  color: rgba(220, 233, 228, .42);
  line-height: 1.5;
}

.status-dot.is-offline {
  background: #d97745;
  box-shadow: 0 0 0 4px rgba(217, 119, 69, .14);
}

.sidebar-link {
  display: block;
  padding: 9px 10px;
  border-radius: 8px;
  color: rgba(220, 233, 228, .55);
  font-size: 11px;
  transition: background .15s ease, color .15s ease;
}

.sidebar-link:hover {
  background: rgba(255, 255, 255, .06);
  color: #fff;
}

.admin-workspace {
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.admin-topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 20px 34px;
  border-bottom: 1px solid rgba(22, 33, 29, .09);
  background: rgba(243, 241, 233, .86);
  backdrop-filter: blur(14px);
}

.topbar-kicker {
  margin: 0 0 3px;
  color: var(--faint);
  font-family: var(--mono);
  font-size: 8.5px;
  letter-spacing: .18em;
}

.admin-topbar h1 {
  margin: 0;
  font-size: 23px;
  line-height: 1.2;
  letter-spacing: -.035em;
  font-weight: 680;
}

.topbar-actions {
  display: flex;
  gap: 8px;
  align-items: center;
}

.topbar-actions .btn-primary {
  padding: 10px 15px;
  font-size: 12.5px;
}

.refresh-icon {
  display: inline-block;
  font-size: 15px;
  line-height: 1;
}

.admin-content {
  flex: 1;
  padding: 28px 34px 60px;
  max-width: 1440px;
  width: 100%;
}

.admin-section {
  display: none;
  animation: fade-in .25s ease both;
}

.admin-section.is-active {
  display: block;
}

/* 统计卡片 */
.stat-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.stat-card {
  position: relative;
  padding: 20px 20px 18px;
  background: var(--surface);
  border: 1px solid rgba(22, 33, 29, .09);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}

.stat-card-accent {
  background: linear-gradient(145deg, #133d35, #1a574a);
  color: #edf8f4;
  border-color: transparent;
}

.stat-card-accent::after {
  content: "";
  position: absolute;
  right: -50px;
  top: -70px;
  width: 170px;
  height: 170px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, .12);
  box-shadow: 0 0 0 28px rgba(255, 255, 255, .035);
}

.stat-label {
  display: block;
  font-size: 11px;
  font-weight: 650;
  letter-spacing: .04em;
  color: var(--faint);
}

.stat-card-accent .stat-label {
  color: rgba(237, 248, 244, .62);
}

.stat-value {
  display: block;
  margin: 10px 0 7px;
  font-family: var(--mono);
  font-size: 34px;
  line-height: 1;
  letter-spacing: -.04em;
  font-weight: 600;
}

.stat-meta {
  display: block;
  font-size: 10.5px;
  color: var(--faint);
  line-height: 1.4;
}

.stat-card-accent .stat-meta {
  color: rgba(237, 248, 244, .5);
}

/* 面板 */
.overview-grid {
  margin-top: 18px;
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(0, .7fr);
  gap: 18px;
}

.panel {
  background: var(--surface);
  border: 1px solid rgba(22, 33, 29, .09);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}

.panel-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 20px;
  border-bottom: 1px solid var(--line);
}

.panel-head h2 {
  margin: 0;
  font-size: 14.5px;
  letter-spacing: -.015em;
}

.panel-head p {
  margin: 4px 0 0;
  color: var(--faint);
  font-size: 11px;
}

.text-button {
  appearance: none;
  border: 0;
  background: transparent;
  padding: 4px;
  color: var(--accent);
  font-size: 11.5px;
  font-weight: 650;
  white-space: nowrap;
}

.text-button:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.compact-list {
  min-height: 120px;
}

.compact-row {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 13px 20px;
  border: 0;
  border-bottom: 1px solid #eeeae0;
  background: transparent;
  text-align: left;
  transition: background .14s ease;
}

.compact-row:last-child {
  border-bottom: 0;
}

button.compact-row:hover {
  background: var(--surface-2);
}

.compact-avatar {
  flex: 0 0 auto;
  width: 33px;
  height: 33px;
  display: grid;
  place-items: center;
  border-radius: 9px;
  background: var(--accent-soft);
  color: var(--accent-strong);
  font-size: 11px;
  font-weight: 800;
}

.compact-main {
  min-width: 0;
  display: grid;
  gap: 3px;
}

.compact-main strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 12.5px;
  font-weight: 650;
}

.compact-main small {
  color: var(--faint);
  font-size: 10.5px;
}

.compact-side {
  margin-left: auto;
  flex: 0 0 auto;
  text-align: right;
  display: grid;
  gap: 4px;
  justify-items: end;
}

.compact-time {
  color: var(--faint);
  font-size: 10px;
  white-space: nowrap;
}

.muted-placeholder {
  margin: 0;
  padding: 34px 20px;
  text-align: center;
  color: var(--faint);
  font-size: 12px;
}

/* 区块标题与工具条 */
.section-toolbar {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 18px;
}

.section-toolbar-wrap {
  align-items: flex-start;
  flex-wrap: wrap;
}

.section-toolbar h2 {
  margin: 0;
  font-size: 19px;
  letter-spacing: -.025em;
}

.section-toolbar p {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}

.toolbar-actions {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
}

/* 表单卡片 */
.form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 14px;
}

.form-tile {
  display: flex;
  flex-direction: column;
  min-height: 205px;
  padding: 20px;
  background: var(--surface);
  border: 1px solid rgba(22, 33, 29, .09);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  transition: transform .16s ease, box-shadow .16s ease;
}

.form-tile:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.form-tile.is-inactive {
  opacity: .72;
}

.form-tile-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.form-swatch {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--tile-accent, var(--accent));
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--tile-accent, var(--accent)) 12%, transparent);
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 8px;
  border-radius: 999px;
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: .03em;
}

.badge-live {
  background: #e8f6ef;
  color: #137a56;
}

.badge-off {
  background: #f0eee7;
  color: var(--faint);
}

.badge-unread {
  background: #fdf0e7;
  color: #b75a2a;
}

.badge-read {
  background: #eef2ef;
  color: #76827d;
}

.form-tile h3 {
  margin: 16px 0 6px;
  font-size: 16px;
  line-height: 1.35;
  letter-spacing: -.02em;
}

.form-tile-desc {
  margin: 0;
  color: var(--muted);
  font-size: 11.5px;
  line-height: 1.6;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.form-tile-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 14px;
  color: var(--faint);
  font-size: 10.5px;
}

.form-tile-meta code {
  font-family: var(--mono);
  font-size: 9.5px;
}

.form-tile-actions {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-top: auto;
  padding-top: 15px;
  border-top: 1px solid #efebe1;
}

.tile-action {
  appearance: none;
  border: 0;
  background: transparent;
  color: var(--muted);
  padding: 6px 8px;
  border-radius: 7px;
  font-size: 10.5px;
  font-weight: 600;
}

.tile-action:hover {
  background: rgba(22, 33, 29, .055);
  color: var(--ink);
}

.tile-action.is-danger:hover {
  background: var(--danger-soft);
  color: var(--danger);
}

.tile-action:last-child {
  margin-left: auto;
}

/* 筛选 */
.filter-bar {
  display: flex;
  align-items: flex-end;
  gap: 10px;
  flex-wrap: wrap;
  padding: 14px 16px;
  background: var(--surface);
  border: 1px solid rgba(22, 33, 29, .09);
  border-radius: var(--radius) var(--radius) 0 0;
  border-bottom: 0;
}

.filter-field {
  display: grid;
  gap: 5px;
}

.filter-field > span {
  color: var(--faint);
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: .06em;
}

.filter-field select,
.filter-field input {
  height: 34px;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  padding: 0 10px;
  font-size: 12px;
}

.filter-field select {
  min-width: 150px;
}

.filter-search {
  flex: 1;
  min-width: 180px;
}

.filter-search input {
  width: 100%;
}

.filter-check {
  display: flex;
  align-items: center;
  gap: 7px;
  height: 34px;
  padding: 0 11px;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: #fff;
  color: var(--muted);
  font-size: 11.5px;
  white-space: nowrap;
}

.filter-check input {
  accent-color: var(--accent);
}

/* 表格 */
.table-wrap {
  background: var(--surface);
  border: 1px solid rgba(22, 33, 29, .09);
  border-radius: 0 0 var(--radius) var(--radius);
  overflow-x: auto;
  overflow-y: hidden;
  box-shadow: var(--shadow-sm);
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 720px;
}

.data-table th {
  padding: 11px 16px;
  text-align: left;
  background: #faf8f1;
  border-bottom: 1px solid var(--line);
  color: var(--faint);
  font-size: 9.5px;
  letter-spacing: .06em;
  font-weight: 700;
  white-space: nowrap;
}

.data-table td {
  padding: 13px 16px;
  border-bottom: 1px solid #eeeae0;
  font-size: 12px;
  vertical-align: middle;
}

.data-table tbody tr {
  cursor: pointer;
  transition: background .13s ease;
}

.data-table tbody tr:hover {
  background: var(--surface-2);
}

.data-table tbody tr:last-child td {
  border-bottom: 0;
}

.data-table tr.is-unread td:first-child {
  box-shadow: inset 3px 0 0 var(--accent);
}

.col-state {
  width: 88px;
}

.col-action {
  width: 90px;
  text-align: right !important;
}

.cell-primary {
  display: block;
  max-width: 460px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: 600;
  color: var(--ink-soft);
}

.cell-secondary {
  display: block;
  margin-top: 2px;
  color: var(--faint);
  font-size: 10.5px;
}

.cell-source {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--muted);
  white-space: nowrap;
}

.mini-swatch {
  width: 6px;
  height: 6px;
  border-radius: 50%;
}

.cell-time {
  white-space: nowrap;
  color: var(--faint);
  font-variant-numeric: tabular-nums;
}

.table-action {
  appearance: none;
  border: 0;
  background: transparent;
  color: var(--accent);
  font-size: 11px;
  font-weight: 650;
  padding: 4px 2px;
}

.table-action:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.table-empty {
  padding: 56px 20px;
  text-align: center;
}

.empty-mark {
  display: block;
  color: var(--line-strong);
  font-size: 30px;
  line-height: 1;
}

.table-empty h3 {
  margin: 12px 0 5px;
  font-size: 14px;
}

.table-empty p {
  margin: 0;
  color: var(--faint);
  font-size: 11.5px;
}

.table-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 4px 0;
  color: var(--faint);
  font-size: 10.5px;
}

/* 弹窗 */
.modal {
  width: min(820px, calc(100vw - 32px));
  max-height: calc(100svh - 40px);
  padding: 0;
  border: 0;
  border-radius: 18px;
  background: transparent;
  color: var(--ink);
  box-shadow: var(--shadow-lg);
}

.modal::backdrop {
  background: rgba(11, 22, 18, .55);
  backdrop-filter: blur(3px);
}

.modal-detail {
  width: min(620px, calc(100vw - 32px));
}

.modal-card {
  display: flex;
  flex-direction: column;
  max-height: calc(100svh - 40px);
  margin: 0;
  background: var(--surface);
  border-radius: 18px;
  overflow: hidden;
}

.modal-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 22px 24px 16px;
  border-bottom: 1px solid var(--line);
}

.modal-kicker {
  margin: 0 0 4px;
  color: var(--faint);
  font-family: var(--mono);
  font-size: 8.5px;
  letter-spacing: .18em;
}

.modal-head h2 {
  margin: 0;
  font-size: 19px;
  letter-spacing: -.03em;
}

.icon-button {
  appearance: none;
  width: 31px;
  height: 31px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--muted);
  font-size: 20px;
  line-height: 1;
  display: grid;
  place-items: center;
}

.icon-button:hover {
  background: var(--surface-2);
  color: var(--ink);
}

.modal-body {
  padding: 22px 24px;
  overflow-y: auto;
}

.modal-foot {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  padding: 14px 24px;
  border-top: 1px solid var(--line);
  background: #fbf9f3;
}

/* 编辑器 */
.editor-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.field-span-2 {
  grid-column: 1 / -1;
}

.field-control {
  display: grid;
  gap: 5px;
  min-width: 0;
}

.field-control > span {
  color: var(--ink-soft);
  font-size: 11px;
  font-weight: 650;
}

.field-control > span b {
  color: var(--danger);
}

.field-control input,
.field-control textarea,
.field-control select {
  width: 100%;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  padding: 9px 11px;
  font-size: 12.5px;
  line-height: 1.4;
}

.field-control textarea {
  resize: vertical;
}

.field-control input:focus,
.field-control textarea:focus,
.field-control select:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 11%, transparent);
}

.field-control small {
  color: var(--faint);
  font-size: 9.5px;
  line-height: 1.5;
}

.input-prefix {
  display: flex;
  align-items: stretch;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: #fff;
  overflow: hidden;
}

.input-prefix:focus-within {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 11%, transparent);
}

.input-prefix em {
  display: flex;
  align-items: center;
  padding: 0 9px;
  background: #f2efe6;
  border-right: 1px solid var(--line);
  color: var(--faint);
  font-family: var(--mono);
  font-size: 10px;
  font-style: normal;
}

.input-prefix input {
  border: 0;
  box-shadow: none !important;
  font-family: var(--mono);
  font-size: 11px;
}

.color-control {
  display: flex;
  align-items: center;
  gap: 9px;
  height: 36px;
  padding: 4px 9px 4px 4px;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: #fff;
  width: fit-content;
}

.color-control input[type="color"] {
  width: 28px;
  height: 28px;
  padding: 0;
  border: 0;
  border-radius: 6px;
  background: none;
  cursor: pointer;
}

.color-control code {
  font-family: var(--mono);
  font-size: 10.5px;
  color: var(--muted);
}

.field-builder-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin: 26px 0 12px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
}

.field-builder-head h3 {
  margin: 0;
  font-size: 13.5px;
}

.field-builder-head p {
  margin: 4px 0 0;
  color: var(--faint);
  font-size: 10px;
}

.editor-fields {
  display: grid;
  gap: 9px;
}

.editor-field {
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fdfbf6;
  padding: 10px;
}

.editor-field-head {
  display: grid;
  grid-template-columns: 24px minmax(110px, 1.3fr) 104px auto auto auto;
  gap: 7px;
  align-items: center;
}

.move-group {
  display: inline-flex;
  gap: 2px;
}

.icon-mini:disabled {
  opacity: .35;
  cursor: not-allowed;
}

.is-hidden {
  display: none !important;
}

.field-order {
  color: var(--faint);
  font-family: var(--mono);
  font-size: 9px;
  text-align: center;
}

.editor-field-head input,
.editor-field-head select {
  width: 100%;
  min-width: 0;
  border: 1px solid var(--line-strong);
  border-radius: 7px;
  background: #fff;
  padding: 7px 8px;
  font-size: 11.5px;
}

.editor-field-head input:focus,
.editor-field-head select:focus {
  outline: none;
  border-color: var(--accent);
}

.required-toggle {
  display: flex;
  align-items: center;
  gap: 4px;
  color: var(--muted);
  font-size: 9.5px;
  white-space: nowrap;
  cursor: pointer;
}

.required-toggle input {
  width: 13px;
  height: 13px;
  accent-color: var(--accent);
}

.icon-mini {
  appearance: none;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  width: 24px;
  height: 24px;
  display: grid;
  place-items: center;
  color: var(--muted);
  font-size: 11px;
  padding: 0;
}

.icon-mini:hover {
  border-color: var(--line-strong);
  color: var(--ink);
}

.icon-mini.is-danger:hover {
  border-color: #ecc5c0;
  color: var(--danger);
  background: var(--danger-soft);
}

.editor-field-body {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 7px;
  margin-top: 7px;
  padding-left: 31px;
}

.editor-field-body label {
  display: grid;
  gap: 3px;
  color: var(--faint);
  font-size: 9px;
}

.editor-field-body input,
.editor-field-body textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  padding: 6px 8px;
  font-size: 11px;
  color: var(--ink);
  resize: vertical;
}

.editor-field-body input:focus,
.editor-field-body textarea:focus {
  outline: none;
  border-color: var(--accent);
}

.editor-field-body .span-2 {
  grid-column: 1 / -1;
}

.inline-range {
  display: flex;
  align-items: center;
  gap: 6px;
}

.inline-range input {
  width: 70px;
}

.inline-range::before {
  content: "最少";
  color: var(--faint);
  font-size: 9px;
}

.inline-range::after {
  content: "最多";
  color: var(--faint);
  font-size: 9px;
}

.inline-range input + input {
  margin-left: 2px;
}

.file-options {
  display: grid;
  grid-template-columns: 70px 80px minmax(0, 1fr);
  gap: 6px;
}

.file-options input {
  width: 100%;
  min-width: 0;
}

.switch-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-top: 20px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  cursor: pointer;
}

.switch-row strong {
  display: block;
  font-size: 11.5px;
}

.switch-row small {
  display: block;
  margin-top: 3px;
  color: var(--faint);
  font-size: 9.5px;
  line-height: 1.5;
}

.switch-input {
  appearance: none;
  flex: 0 0 auto;
  width: 36px;
  height: 20px;
  border-radius: 999px;
  background: #c9c5ba;
  position: relative;
  cursor: pointer;
  transition: background .15s ease;
}

.switch-input::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 3px rgba(0, 0, 0, .18);
  transition: transform .15s ease;
}

.switch-input:checked {
  background: var(--accent);
}

.switch-input:checked::after {
  transform: translateX(16px);
}

/* 提交详情 */
.detail-list {
  display: grid;
  gap: 0;
}

.detail-row {
  display: grid;
  grid-template-columns: minmax(90px, .4fr) minmax(0, 1fr);
  gap: 16px;
  padding: 11px 0;
  border-bottom: 1px solid #eeeae0;
}

.detail-row:last-child {
  border-bottom: 0;
}

.detail-key {
  color: var(--faint);
  font-size: 10.5px;
  line-height: 1.7;
}

.detail-value {
  font-size: 12.5px;
  line-height: 1.7;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.detail-meta {
  margin-top: 16px;
  padding: 13px 14px;
  border-radius: 9px;
  background: var(--surface-2);
  border: 1px solid var(--line);
  color: var(--faint);
  font-size: 10px;
  line-height: 1.8;
  font-family: var(--mono);
}

.attachment-link {
  display: inline-flex;
  align-items: baseline;
  gap: 4px;
  color: var(--accent);
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.attachment-link small {
  color: var(--faint);
  font-weight: 400;
  text-decoration: none;
}

/* Toast */
.toast-stack {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 1000;
  display: grid;
  gap: 8px;
  width: min(360px, calc(100vw - 40px));
}

.toast {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 13px 15px;
  border-radius: 11px;
  background: #182a24;
  color: #eaf5f1;
  box-shadow: var(--shadow-lg);
  font-size: 12px;
  line-height: 1.55;
  animation: toast-in .25s ease both;
}

.toast.is-error {
  background: #4b1915;
  color: #ffe9e6;
}

.toast-mark {
  flex: 0 0 auto;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: rgba(255, 255, 255, .13);
  color: #9fe3ce;
  font-size: 10px;
  font-weight: 800;
}

.toast.is-error .toast-mark {
  color: #ffb4aa;
}

/* 登录失效 */
.auth-lost {
  position: fixed;
  inset: 0;
  z-index: 2000;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(11, 22, 18, .6);
  backdrop-filter: blur(4px);
}

.auth-lost-card {
  width: min(380px, 100%);
  padding: 30px;
  border-radius: 18px;
  background: var(--surface);
  text-align: center;
  box-shadow: var(--shadow-lg);
}

.auth-lost-mark {
  width: 46px;
  height: 46px;
  margin: 0 auto 14px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--danger-soft);
  color: var(--danger);
  font-weight: 800;
}

.auth-lost-card h2 {
  margin: 0 0 8px;
  font-size: 18px;
}

.auth-lost-card p {
  margin: 0 0 18px;
  color: var(--muted);
  font-size: 12.5px;
  line-height: 1.7;
}

/* ============================================================
   DSH exact-style public form
   ============================================================ */

@font-face {
  font-family: "Montserrat";
  src: url("/static/fonts/montserrat.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Montserrat";
  src: url("/static/fonts/montserrat-500.woff2") format("woff2");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "DM Sans";
  src: url("/static/fonts/dm-sans-400.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "DM Sans";
  src: url("/static/fonts/dm-sans-500.woff2") format("woff2");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}

.dsh-page {
  --dsh-bg: #0a0a0a;
  --dsh-panel: #0f0f11;
  --dsh-panel-2: #161618;
  --dsh-border: rgba(255, 255, 255, .1);
  --dsh-text: #f9fafb;
  --dsh-muted: #9ca3af;
  --dsh-dim: #6b7280;
  min-height: 100svh;
  position: relative;
  isolation: isolate;
  color: var(--dsh-text);
  background: var(--dsh-bg);
  font-family: "DM Sans", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    "Noto Sans SC", "PingFang SC", "Microsoft YaHei", sans-serif;
}

/* 参考页的顶部光晕必须覆盖导航栏，而不是从 hero 才开始 */
.dsh-page::before {
  content: "";
  display: block;
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: min(1180px, 125vh);
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(ellipse 700px 620px at 10% 0%, rgba(140, 190, 245, .10), transparent 72%),
    radial-gradient(ellipse 640px 560px at 24% 18%, rgba(120, 175, 235, .10), transparent 72%),
    radial-gradient(ellipse 1000px 900px at 98% -12%, rgba(130, 175, 255, .22), transparent 72%),
    radial-gradient(ellipse 1200px 950px at 50% -6%, #2a507c 0%, #284d78 22%, #20405e 45%, #1b3548 66%, #10283a 82%, rgba(10, 10, 10, 0) 94%),
    linear-gradient(180deg, #122a45 0%, #0c1b2c 62%, #0a0a0a 92%);
}

.dsh-page .page-glow {
  display: none;
}

.dsh-page .dsh-header,
.dsh-page .dsh-hero,
.dsh-page .dsh-footer {
  position: relative;
  z-index: 1;
}

.dsh-page .dsh-header {
  position: relative;
  z-index: 3;
  width: min(1140px, calc(100% - 48px));
  margin: 0 auto;
  padding: 28px 0 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border: 0;
  background: transparent;
  backdrop-filter: none;
}

.dsh-brand {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  color: #f9fafb;
  text-decoration: none;
}

.dsh-brand-mark {
  width: 27px;
  height: 27px;
  display: grid;
  place-items: center;
  color: #fff;
}

.dsh-brand-mark svg {
  width: 25px;
  height: 25px;
}

.dsh-brand-name {
  font-family: "Montserrat", "DM Sans", sans-serif;
  font-size: 21px;
  font-weight: 500;
  letter-spacing: -.7px;
  line-height: 1;
}

.dsh-brand-pill {
  padding: 4px 6px;
  border-radius: 3px;
  background: #fff;
  color: #0a0a0a;
  font-family: "DM Sans", sans-serif;
  font-size: 8px;
  font-weight: 500;
  letter-spacing: .14em;
  line-height: 1;
  transform: translateY(-1px);
}

.dsh-locale {
  display: inline-flex;
  align-items: center;
  padding: 4px;
  border: 1px solid rgba(255, 255, 255, .08);
  border-radius: 999px;
  background: rgba(255, 255, 255, .045);
  color: rgba(229, 231, 235, .52);
  font-size: 10.5px;
  line-height: 1;
  backdrop-filter: blur(10px);
}

.dsh-locale span {
  padding: 6px 11px;
  border-radius: 999px;
}

.dsh-locale .is-active {
  background: rgba(255, 255, 255, .24);
  color: #f8fafc;
  font-weight: 400;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .035);
}

.dsh-hero {
  position: relative;
  z-index: 1;
  min-height: 100svh;
  padding: 0 24px 90px;
  text-align: center;
  background: transparent;
}

.dsh-hero::before {
  content: "";
  position: absolute;
  top: 0;
  left: 50%;
  width: min(900px, 78vw);
  height: 660px;
  transform: translateX(-50%);
  pointer-events: none;
  background: radial-gradient(ellipse at center, rgba(188, 219, 255, .12), transparent 66%);
  filter: blur(18px);
}

.hero-badge {
  position: relative;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 92px;
  color: rgba(229, 231, 235, .48);
  font-size: 9px;
  font-weight: 400;
  letter-spacing: .12em;
}

.hero-badge-icon {
  color: rgba(219, 234, 254, .55);
  font-size: 11px;
}

.hero-title {
  position: relative;
  z-index: 1;
  margin: 22px auto 0;
  color: #fff;
  font-family: "Montserrat", "DM Sans", "Noto Sans SC", "PingFang SC", sans-serif;
  font-size: 40px;
  font-weight: 400;
  line-height: 1.48;
  letter-spacing: -.8px;
  text-align: center;
}

.hero-title span {
  display: block;
}

.hero-title-zh {
  font-family: "DM Sans", "Noto Sans SC", "PingFang SC", "Microsoft YaHei", sans-serif;
  font-weight: 400;
  letter-spacing: -1.4px;
}

.hero-subtitle {
  position: relative;
  z-index: 1;
  max-width: 700px;
  margin: 22px auto 0;
  color: rgba(229, 231, 235, .54);
  font-size: 13.5px;
  font-weight: 400;
  line-height: 1.9;
  white-space: normal;
}

.hero-cta {
  position: relative;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 42px;
  margin-top: 28px;
  padding: 0 20px;
  border: 1px solid rgba(255, 255, 255, .5);
  border-radius: 999px;
  background: #fff;
  color: #111;
  font-size: 12.5px;
  font-weight: 500;
  letter-spacing: .01em;
  box-shadow: 0 10px 34px rgba(0, 0, 0, .22), inset 0 -1px 0 rgba(0, 0, 0, .08);
  transition: background .16s ease, transform .16s ease, box-shadow .16s ease;
}

.hero-cta svg {
  width: 14px;
  height: 14px;
}

.hero-cta:hover {
  background: #f0f1f3;
  transform: translateY(-1px);
  box-shadow: 0 14px 38px rgba(0, 0, 0, .28);
}

.app-window {
  position: relative;
  z-index: 2;
  width: min(1020px, calc(100vw - 48px));
  height: min(780px, calc(100svh - 64px));
  margin: 100px auto 0;
  border-radius: 16px;
  background: var(--dsh-panel);
  text-align: left;
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, .12),
    0 24px 72px rgba(0, 0, 0, .28);
  overflow: hidden;
  /* 关键：overflow:hidden 仍可被文件输入聚焦滚动，导致窗口内部整块上移变空白 */
  overflow: clip;
  scroll-margin-top: 20px;
}

.dsh-page .window-bar {
  height: 46px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 15px;
  border-bottom: 1px solid rgba(255, 255, 255, .065);
  background: #1a1a1c;
}

.dsh-page .window-dots {
  display: inline-flex;
  gap: 7px;
}

.dsh-page .window-dots i {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #ff5f57;
}

.dsh-page .window-dots i:nth-child(2) {
  background: #febc2e;
}

.dsh-page .window-dots i:nth-child(3) {
  background: #28c840;
}

.dsh-page .window-title {
  margin-left: 5px;
  color: rgba(209, 213, 219, .48);
  font-family: "DM Sans", sans-serif;
  font-size: 8px;
  letter-spacing: .16em;
}

.dsh-page .window-badge {
  margin-left: auto;
  padding: 3px 8px;
  border: 1px solid rgba(101, 224, 189, .16);
  border-radius: 999px;
  background: rgba(101, 224, 189, .06);
  color: rgba(110, 231, 196, .7);
  font-family: "DM Sans", sans-serif;
  font-size: 7.5px;
  letter-spacing: .13em;
}

.app-body {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  height: calc(100% - 46px);
  min-height: 0;
}

.app-sidebar {
  display: flex;
  flex-direction: column;
  min-height: 0;
  padding: 18px 13px 15px;
  border-right: 1px solid rgba(255, 255, 255, .07);
  background: #161618;
  color: #d1d5db;
}

.app-brand {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 3px 5px 19px;
}

.app-brand-mark {
  width: 27px;
  height: 27px;
  display: grid;
  place-items: center;
  border-radius: 7px;
  background: rgba(255, 255, 255, .07);
  color: #e5e7eb;
}

.app-brand-mark svg {
  width: 16px;
  height: 16px;
}

.app-brand strong {
  display: block;
  color: #f3f4f6;
  font-family: "Montserrat", "DM Sans", sans-serif;
  font-size: 12px;
  font-weight: 400;
  letter-spacing: -.1px;
  line-height: 1.3;
}

.app-brand small {
  display: block;
  margin-top: 2px;
  color: rgba(156, 163, 175, .48);
  font-size: 6.5px;
  letter-spacing: .16em;
}

.side-section-label {
  padding: 10px 7px 7px;
  color: rgba(156, 163, 175, .42);
  font-size: 8px;
  letter-spacing: .13em;
}

.side-nav {
  display: grid;
  gap: 2px;
}

.side-nav-item {
  appearance: none;
  width: 100%;
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 8px 9px;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: rgba(209, 213, 219, .66);
  font-family: inherit;
  font-size: 10.5px;
  text-align: left;
  cursor: pointer;
  transition: background .14s ease, color .14s ease;
}

.side-nav-item:hover {
  background: rgba(255, 255, 255, .06);
  color: #f3f4f6;
}

.side-nav-icon {
  width: 14px;
  color: rgba(156, 163, 175, .55);
  font-size: 12px;
  text-align: center;
}

.side-meta {
  margin-top: auto;
  padding: 14px 7px 2px;
  border-top: 1px solid rgba(255, 255, 255, .07);
  color: rgba(156, 163, 175, .55);
  font-size: 9px;
  line-height: 1.75;
}

.side-meta p {
  margin: 0;
}

.side-meta p strong {
  display: block;
  margin-bottom: 5px;
  color: rgba(229, 231, 235, .76);
  font-size: 9.5px;
  font-weight: 500;
}

.side-meta p i {
  color: #f87171;
  font-style: normal;
}

.side-status {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 11px;
  color: rgba(110, 231, 196, .62);
  font-size: 8.5px;
}

.side-status span {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #34d399;
  box-shadow: 0 0 8px rgba(52, 211, 153, .6);
}

.app-main {
  min-height: 0;
  padding: 27px 34px 44px;
  overflow-y: auto;
  background: #0f0f11;
  scrollbar-width: thin;
  scrollbar-color: #34343a transparent;
}

.app-main::-webkit-scrollbar {
  width: 7px;
}

.app-main::-webkit-scrollbar-thumb {
  border-radius: 999px;
  background: #34343a;
}

.app-main .form-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  margin: 0 0 24px;
  padding: 0 0 20px;
  border-bottom: 1px solid rgba(255, 255, 255, .075);
}

.app-main .form-kicker {
  margin: 0 0 7px;
  color: rgba(156, 163, 175, .5);
  font-size: 8px;
  letter-spacing: .14em;
}

.app-main .form-card-head h2 {
  margin: 0;
  color: #f9fafb;
  font-family: "DM Sans", "Noto Sans SC", "PingFang SC", sans-serif;
  font-size: 19px;
  font-weight: 500;
  letter-spacing: -.3px;
  line-height: 1.35;
}

.app-main .required-note {
  flex: 0 0 auto;
  padding-top: 4px;
  color: rgba(156, 163, 175, .48);
  font-size: 9px;
}

.app-main .required-note i {
  color: #f87171;
}

.app-main .fields {
  gap: 19px;
}

.app-main .field-label {
  color: #e5e7eb;
  font-size: 12px;
  font-weight: 500;
  margin-bottom: 7px;
}

.app-main .field-required {
  color: #f87171;
}

.app-main .field-help {
  color: rgba(156, 163, 175, .5);
  font-size: 10px;
}

.app-main .field-input,
.app-main .field-textarea,
.app-main .field-select,
.app-main .table-input {
  border: 1px solid #2b2b31;
  border-radius: 8px;
  background: #18181b;
  color: #f4f4f5;
  font-size: 13px;
  box-shadow: none;
}

.app-main .field-input {
  padding: 11px 12px;
}

.app-main .field-textarea {
  padding: 11px 12px;
}

.app-main .field-input::placeholder,
.app-main .field-textarea::placeholder {
  color: #5f6068;
}

.app-main .field-input:hover,
.app-main .field-textarea:hover,
.app-main .field-select:hover,
.app-main .table-input:hover {
  border-color: #414149;
}

.app-main .field-input:focus,
.app-main .field-textarea:focus,
.app-main .field-select:focus,
.app-main .table-input:focus {
  border-color: #3b82f6;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, .13);
}

.app-main .select-wrap::after {
  border-color: #73737d;
}

.app-main .check-field,
.app-main .radio-option {
  border: 1px solid #2b2b31;
  background: #17171a;
  color: #e5e7eb;
}

.app-main .check-field:hover,
.app-main .radio-option:hover {
  border-color: #414149;
}

.app-main .check-text {
  color: #d4d4d8;
  font-size: 12.5px;
}

.app-main .check-box {
  border-color: #4b4b54;
  background: #111113;
}

.app-main .check-field input:checked + .check-box {
  border-color: #3b82f6;
  background: #2563eb;
}

.app-main .radio-dot {
  border-color: #4b4b54;
  background: #111113;
}

.app-main .radio-option input:checked + .radio-dot {
  border-color: #3b82f6;
}

.app-main .radio-option:has(input:checked) {
  border-color: rgba(59, 130, 246, .6);
  background: rgba(37, 99, 235, .1);
}

.app-main .field.has-error .field-input,
.app-main .field.has-error .field-textarea,
.app-main .field.has-error .field-select {
  border-color: #f87171;
  background: #1d1416;
}

.app-main .table-field {
  border-color: #2b2b31;
  background: #141416;
}

.app-main .repeat-table th {
  border-bottom-color: #2b2b31;
  background: #1b1b1e;
  color: #9ca3af;
}

.app-main .repeat-table td {
  border-bottom-color: #242428;
}

.app-main .table-input {
  min-width: 80px;
}

.app-main .table-add-wrap {
  border-top-color: #2b2b31;
  background: #18181b;
}

.app-main .btn-table-add {
  border-color: rgba(59, 130, 246, .32);
  background: rgba(37, 99, 235, .12);
  color: #93c5fd;
}

.app-main .table-hint {
  color: #6b7280;
}

.app-main .table-remove {
  border-color: #35353b;
  background: #18181b;
  color: #9ca3af;
}

.app-main .file-field {
  border-color: #2b2b31;
  background: #141416;
}

.app-main .file-drop {
  background: #17171a;
}

.app-main .file-drop:hover,
.app-main .file-drop:focus-visible,
.app-main .file-drop.is-dragging {
  background: rgba(37, 99, 235, .09);
}

.app-main .file-icon {
  background: rgba(59, 130, 246, .14);
  color: #93c5fd;
}

.app-main .file-copy strong {
  color: #e5e7eb;
}

.app-main .file-copy small {
  color: #6b7280;
}

.app-main .file-item {
  border-color: #2b2b31;
  background: #1b1b1e;
}

.app-main .file-meta strong {
  color: #e5e7eb;
}

.app-main .file-remove {
  border-color: #35353b;
  background: #18181b;
  color: #9ca3af;
}

.app-main .rating-star {
  color: #3f3f46;
}

.app-main .rating-star.is-on,
.app-main .rating-star:hover {
  color: #f5c451;
}

.app-main .rating-hint {
  color: #6b7280;
}

.app-main .btn-primary {
  border: 1px solid #fff;
  border-radius: 8px;
  background: #fff;
  color: #09090b;
  box-shadow: 0 8px 24px rgba(0, 0, 0, .24);
}

.app-main .btn-primary:hover {
  background: #e8e8ea;
}

.app-main .btn-submit {
  width: 100%;
  min-height: 46px;
  margin-top: 24px;
  padding: 12px 18px;
  font-size: 13px;
  font-weight: 500;
  letter-spacing: .01em;
}

.app-main .form-consent {
  color: #5f6068;
  font-size: 9.5px;
}

.app-main .form-alert {
  border-color: rgba(248, 113, 113, .24);
  background: rgba(127, 29, 29, .18);
  color: #fca5a5;
}

.app-main .result-panel h3 {
  color: #f9fafb;
}

.app-main .result-panel p {
  color: #9ca3af;
}

.app-main .success-check {
  color: #93c5fd;
  background: rgba(37, 99, 235, .15);
  box-shadow: 0 0 0 10px rgba(59, 130, 246, .045);
}

.app-main .receipt {
  border-color: #35353b;
  color: #6b7280 !important;
}

.app-main .form-loading {
  color: #9ca3af;
}

.app-main .btn-secondary {
  border-color: #35353b;
  background: #18181b;
  color: #e5e7eb;
}

.app-main .btn-secondary:hover {
  background: #222226;
}

.dsh-footer {
  border-top: 1px solid rgba(255, 255, 255, .055);
  background: #0a0a0a;
  color: rgba(156, 163, 175, .38);
  padding-top: 20px;
  padding-bottom: 22px;
}

.dsh-footer .footer-sep {
  background: rgba(255, 255, 255, .14);
}

@media (max-width: 900px) {
  .app-window {
    height: min(720px, calc(100svh - 40px));
  }

  .app-body {
    grid-template-columns: 190px minmax(0, 1fr);
  }

  .app-main {
    padding: 23px 24px 38px;
  }

  .side-nav-item {
    font-size: 10px;
  }
}

@media (max-width: 680px) {
  .dsh-page .dsh-header {
    width: calc(100% - 32px);
    padding-top: 17px;
  }

  .dsh-brand-name {
    font-size: 17px;
  }

  .dsh-brand-mark {
    width: 23px;
    height: 23px;
  }

  .dsh-brand-mark svg {
    width: 21px;
    height: 21px;
  }

  .dsh-locale {
    font-size: 8.5px;
  }

  .dsh-locale span {
    padding: 4px 8px;
  }

  .dsh-hero {
    padding: 0 12px 52px;
    background: transparent;
  }

  .hero-badge {
    margin-top: 48px;
    font-size: 8px;
  }

  .hero-title {
    margin-top: 12px;
    font-size: 31px;
    line-height: 1.42;
    letter-spacing: -.6px;
  }

  .hero-title-zh {
    letter-spacing: -.8px;
  }

  .hero-subtitle {
    margin-top: 16px;
    padding: 0 8px;
    font-size: 12.5px;
    line-height: 1.8;
  }

  .hero-cta {
    min-height: 39px;
    margin-top: 21px;
    padding: 0 17px;
    font-size: 11.5px;
  }

  .app-window {
    width: calc(100vw - 20px);
    height: auto;
    margin-top: 36px;
    border-radius: 13px;
  }

  .dsh-page .window-bar {
    height: 39px;
    padding: 0 12px;
  }

  .dsh-page .window-dots i {
    width: 8px;
    height: 8px;
  }

  .dsh-page .window-title {
    font-size: 7px;
  }

  .app-body {
    display: block;
    height: auto;
  }

  .app-sidebar {
    display: none;
  }

  .app-main {
    padding: 20px 15px 27px;
    overflow: visible;
  }

  .app-main .form-card-head {
    margin-bottom: 19px;
    padding-bottom: 16px;
  }

  .app-main .form-card-head h2 {
    font-size: 17px;
  }

  .app-main .field-label {
    font-size: 12px;
  }

  .app-main .field-input,
  .app-main .field-textarea,
  .app-main .field-select {
    font-size: 16px;
    padding: 11px 12px;
  }

  .dsh-footer {
    padding: 17px 14px 21px;
    font-size: 9.5px;
  }
}

.public-page {
  --public-ink: #f6f9ff;
  --public-muted: rgba(218, 231, 250, .68);
  --public-faint: rgba(191, 210, 237, .46);
  --public-line: rgba(255, 255, 255, .11);
  color: var(--public-ink);
  background:
    radial-gradient(1100px 720px at 50% -18%, rgba(48, 113, 255, .50), transparent 62%),
    radial-gradient(820px 560px at 92% 8%, rgba(100, 72, 255, .20), transparent 66%),
    radial-gradient(720px 520px at -8% 78%, rgba(0, 186, 255, .12), transparent 64%),
    linear-gradient(158deg, #050b18 0%, #07182e 46%, #050b18 100%);
  background-attachment: fixed;
}

.public-page::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(255, 255, 255, .035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, .035) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: radial-gradient(ellipse 90% 70% at 50% 0%, #000 0%, transparent 78%);
  -webkit-mask-image: radial-gradient(ellipse 90% 70% at 50% 0%, #000 0%, transparent 78%);
}

.public-page .page-glow-a {
  width: 760px;
  height: 760px;
  top: -360px;
  right: -180px;
  background: radial-gradient(circle, rgba(59, 130, 246, .30), rgba(59, 130, 246, 0) 68%);
  filter: blur(8px);
}

.public-page .page-glow-b {
  width: 620px;
  height: 620px;
  left: -260px;
  bottom: -180px;
  background: radial-gradient(circle, rgba(24, 210, 197, .13), rgba(24, 210, 197, 0) 68%);
  filter: blur(10px);
}

.public-page .public-header {
  min-height: 84px;
  border-bottom: 1px solid rgba(255, 255, 255, .07);
  background: linear-gradient(180deg, rgba(5, 12, 25, .78), rgba(5, 12, 25, .18));
  backdrop-filter: blur(18px);
}

.public-page .brand {
  color: #f8fbff;
  font-weight: 600;
  letter-spacing: .01em;
}

.public-page .brand-mark {
  color: #dceaff;
  background: rgba(255, 255, 255, .075);
  border: 1px solid rgba(255, 255, 255, .14);
  box-shadow: 0 8px 28px rgba(0, 0, 0, .22), inset 0 1px 0 rgba(255, 255, 255, .1);
}

.public-page .secure-badge {
  color: #c5d6ec;
  background: rgba(255, 255, 255, .055);
  border-color: rgba(255, 255, 255, .13);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .08);
}

.public-page .secure-dot {
  background: #65e0bd;
  box-shadow: 0 0 0 4px rgba(101, 224, 189, .12), 0 0 16px rgba(101, 224, 189, .55);
}

.public-page .form-shell {
  padding-top: clamp(42px, 7vw, 76px);
  padding-bottom: 78px;
  gap: clamp(42px, 6vw, 90px);
}

.public-page .form-intro {
  padding-top: 52px;
}

.public-page .eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #8fb9ff;
  font-size: 10px;
  letter-spacing: .18em;
}

.eyebrow-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #6fa8ff;
  box-shadow: 0 0 12px rgba(111, 168, 255, .8);
}

.public-page .form-intro h1 {
  color: #f8fbff;
  font-weight: 620;
  letter-spacing: -.055em;
  text-shadow: 0 8px 50px rgba(0, 20, 60, .38);
  max-width: 11ch;
}

.public-page .intro-copy {
  max-width: 42ch;
  color: var(--public-muted);
  font-size: 15.5px;
  line-height: 1.9;
}

.hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 24px;
}

.hero-meta span {
  padding: 6px 10px;
  border: 1px solid rgba(255, 255, 255, .12);
  border-radius: 999px;
  background: rgba(255, 255, 255, .045);
  color: rgba(210, 226, 248, .72);
  font-size: 10px;
  letter-spacing: .03em;
  backdrop-filter: blur(10px);
}

.public-page .intro-points {
  margin-top: 30px;
  gap: 10px;
}

.public-page .intro-points li {
  padding: 12px 14px;
  border: 1px solid rgba(255, 255, 255, .095);
  border-radius: 13px;
  background: linear-gradient(135deg, rgba(255, 255, 255, .055), rgba(255, 255, 255, .018));
  backdrop-filter: blur(12px);
}

.public-page .point-icon {
  width: 29px;
  height: 29px;
  color: #a9c5e9;
  border-color: rgba(255, 255, 255, .15);
  background: rgba(255, 255, 255, .035);
}

.public-page .intro-points strong {
  color: #e8f1fe;
  font-size: 12.5px;
}

.public-page .intro-points small {
  color: rgba(188, 208, 235, .52);
}

.public-page .intro-footnote {
  border-top-color: rgba(255, 255, 255, .1);
  color: var(--public-faint);
}

.public-page .form-card {
  padding: 0;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, .22);
  border-radius: 24px;
  background: #f6f9fd;
  color: #1a2b42;
  box-shadow:
    0 50px 140px rgba(0, 0, 0, .58),
    0 8px 30px rgba(0, 0, 0, .28),
    inset 0 1px 0 rgba(255, 255, 255, .7);
}

.public-page .radio-option,
.public-page .check-text {
  color: #263a55;
}

.public-page .form-card::before {
  display: none;
}

.form-window-bar {
  height: 44px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 15px;
  background: linear-gradient(180deg, #0d1b2e, #091423);
  border-bottom: 1px solid rgba(255, 255, 255, .06);
}

.window-dots {
  display: inline-flex;
  gap: 6px;
}

.window-dots i {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #ff5f57;
}

.window-dots i:nth-child(2) {
  background: #febc2e;
}

.window-dots i:nth-child(3) {
  background: #28c840;
}

.window-title {
  margin-left: 3px;
  color: rgba(213, 229, 249, .54);
  font-family: var(--mono);
  font-size: 8.5px;
  letter-spacing: .16em;
}

.window-badge {
  margin-left: auto;
  padding: 3px 8px;
  border: 1px solid rgba(90, 225, 187, .22);
  border-radius: 999px;
  background: rgba(53, 190, 151, .09);
  color: #8fe5ca;
  font-family: var(--mono);
  font-size: 8px;
  letter-spacing: .12em;
}

.form-card-inner {
  padding: clamp(24px, 3.6vw, 40px);
}

.public-page .form-card-head {
  padding-bottom: 22px;
  border-bottom-color: #e1e8f2;
}

.public-page .form-kicker {
  color: #7789a2;
}

.public-page .form-card-head h2 {
  color: #101d31;
  font-weight: 680;
}

.public-page .required-note {
  color: #8b9bb0;
}

.public-page .field-label {
  color: #253a55;
}

.public-page .field-help {
  color: #8494aa;
}

.public-page .field-input,
.public-page .field-textarea,
.public-page .field-select,
.public-page .table-input {
  color: #14233a;
  border-color: #d7e1ee;
  background: #fff;
  box-shadow: 0 1px 2px rgba(22, 46, 80, .025);
}

.public-page .field-input::placeholder,
.public-page .field-textarea::placeholder {
  color: #9eacc0;
}

.public-page .field-input:hover,
.public-page .field-textarea:hover,
.public-page .field-select:hover,
.public-page .table-input:hover {
  border-color: #b4c4d9;
}

.public-page .field-input:focus,
.public-page .field-textarea:focus,
.public-page .field-select:focus,
.public-page .table-input:focus {
  border-color: #2f74df;
  box-shadow: 0 0 0 4px rgba(47, 116, 223, .13);
}

.public-page .check-field,
.public-page .radio-option {
  border-color: #dbe5f1;
  background: #f7fafe;
}

.public-page .radio-option:hover {
  border-color: #b8c9df;
}

.public-page .radio-option:has(input:checked) {
  border-color: rgba(47, 116, 223, .42);
  background: #edf4ff;
}

.public-page .field.has-error .field-input,
.public-page .field.has-error .field-textarea,
.public-page .field.has-error .field-select {
  background: #fffafa;
}

.public-page .btn-primary {
  background: linear-gradient(135deg, #337ff4 0%, #1e5fd2 100%);
  box-shadow: 0 14px 28px rgba(37, 105, 219, .30), inset 0 1px 0 rgba(255, 255, 255, .22);
}

.public-page .btn-primary:hover {
  background: linear-gradient(135deg, #3c89ff 0%, #1b55bf 100%);
  box-shadow: 0 16px 34px rgba(37, 105, 219, .38);
}

.public-page .btn-submit {
  border-radius: 12px;
  padding: 15px 20px;
  letter-spacing: .01em;
}

.public-page .btn-secondary {
  color: #263b56;
  border-color: #cdd9e8;
  background: #fff;
}

.public-page .form-consent {
  color: #8b9aae;
}

.public-page .form-loading {
  color: #64748b;
}

.public-page .result-panel h3 {
  color: #122238;
}

.public-page .result-panel p {
  color: #61728a;
}

.public-page .success-check {
  color: #2168d5;
  background: #e9f2ff;
  box-shadow: 0 0 0 10px rgba(47, 124, 246, .07);
}

.public-page .receipt {
  border-color: #cfdbea;
  color: #8092aa !important;
}

.public-page .public-footer {
  color: rgba(190, 210, 238, .42);
  border-top: 1px solid rgba(255, 255, 255, .06);
  padding-top: 20px;
}

.public-page .footer-sep {
  background: rgba(255, 255, 255, .18);
}

/* 首页目录也使用深色玻璃卡片 */
.public-page .index-shell h1 {
  color: #f8fbff;
}

.public-page .index-shell .eyebrow {
  color: #8fb9ff;
}

.public-page .index-lead {
  color: var(--public-muted);
}

.public-page .directory-card {
  background: linear-gradient(135deg, rgba(255, 255, 255, .065), rgba(255, 255, 255, .022));
  border-color: rgba(255, 255, 255, .11);
  box-shadow: 0 16px 40px rgba(0, 0, 0, .16);
  backdrop-filter: blur(12px);
  color: #f5f9ff;
}

.public-page .directory-card:hover {
  border-color: rgba(126, 174, 255, .34);
  box-shadow: 0 20px 52px rgba(0, 0, 0, .26);
}

.public-page .directory-copy small {
  color: rgba(200, 219, 243, .55);
}

.public-page .directory-arrow {
  color: #a8c9ff;
  background: rgba(80, 143, 255, .14);
}

.public-page .empty-state {
  border-color: rgba(255, 255, 255, .16);
  background: rgba(255, 255, 255, .04);
  color: #e7f0fe;
}

.public-page .empty-state p {
  color: rgba(196, 216, 242, .55);
}

@media (max-width: 900px) {
  .public-page .form-intro {
    padding-top: 8px;
  }

  .public-page .intro-points {
    margin-top: 22px;
  }

  .public-page .form-shell {
    gap: 26px;
  }

  .public-page .form-card {
    border-radius: 20px;
  }

  .form-card-inner {
    padding: 24px 21px 26px;
  }
}

@media (max-width: 680px) {
  .public-page .public-header {
    min-height: 64px;
    padding: 14px 16px;
  }

  .public-page .secure-badge {
    color: #d3e3f8;
  }

  .public-page .form-shell {
    padding: 18px 12px 46px;
  }

  .public-page .form-intro h1 {
    font-size: clamp(2.05rem, 10.5vw, 2.9rem);
    max-width: 14ch;
  }

  .public-page .intro-copy {
    font-size: 13.5px;
    line-height: 1.8;
  }

  .public-page .hero-meta {
    margin-top: 16px;
  }

  .public-page .hero-meta span {
    font-size: 9px;
    padding: 5px 8px;
  }

  .public-page .form-card {
    border-radius: 18px;
  }

  .form-window-bar {
    height: 38px;
    padding: 0 12px;
  }

  .window-title {
    font-size: 7.5px;
  }

  .form-card-inner {
    padding: 20px 16px 23px;
  }

  .public-page .form-card-head h2 {
    font-size: 1.12rem;
  }

  .public-page .public-footer {
    padding: 18px 16px 24px;
  }
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

@keyframes rise-in {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes fade-in {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes pop-in {
  from { opacity: 0; transform: scale(.7); }
  to { opacity: 1; transform: scale(1); }
}

@keyframes toast-in {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
    scroll-behavior: auto !important;
  }
}

/* ============================================================
   响应式
   ============================================================ */

@media (max-width: 1100px) {
  .admin-shell {
    grid-template-columns: 220px minmax(0, 1fr);
  }

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

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

@media (max-width: 900px) {
  .form-shell {
    grid-template-columns: 1fr;
    gap: 30px;
    padding-top: 18px;
  }

  .form-intro {
    position: static;
    padding-top: 0;
  }

  .form-intro h1 {
    max-width: 16ch;
  }

  .intro-points {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
  }

  .intro-points li {
    display: block;
    padding: 13px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: rgba(255, 254, 250, .5);
  }

  .point-icon {
    margin-bottom: 9px;
  }

  .intro-footnote {
    display: none;
  }

  .admin-shell {
    display: block;
  }

  .admin-sidebar {
    position: static;
    height: auto;
    padding: 14px 18px;
    flex-direction: row;
    align-items: center;
    gap: 18px;
    overflow: visible;
  }

  .admin-brand {
    padding: 0;
    flex: 0 0 auto;
  }

  .admin-brand span:last-child {
    display: none;
  }

  .admin-nav {
    display: flex;
    gap: 3px;
    padding: 0;
    border: 0;
    overflow-x: auto;
  }

  .nav-item {
    width: auto;
    padding: 8px 11px;
    white-space: nowrap;
  }

  .nav-icon {
    display: none;
  }

  .sidebar-foot {
    margin-left: auto;
    padding: 0;
    border: 0;
  }

  .server-state,
  .sidebar-link {
    display: none;
  }

  .admin-topbar {
    position: static;
    padding: 18px 20px;
  }

  .admin-content {
    padding: 20px 20px 50px;
  }

  .admin-topbar h1 {
    font-size: 20px;
  }

  .editor-field-head {
    grid-template-columns: 20px minmax(90px, 1fr) 96px auto auto auto;
  }
}

@media (max-width: 680px) {
  .public-header {
    padding: 18px 18px;
  }

  .secure-badge {
    padding: 7px 10px;
    font-size: 10px;
  }

  .brand {
    font-size: 13px;
  }

  .brand-mark {
    width: 32px;
    height: 32px;
    border-radius: 9px;
  }

  .form-shell {
    padding: 10px 16px 50px;
  }

  .form-intro h1 {
    font-size: clamp(2rem, 10vw, 2.8rem);
  }

  .intro-copy {
    margin-top: 15px;
    font-size: 14px;
  }

  .intro-points {
    display: none;
  }

  .form-card {
    padding: 22px 18px 24px;
    border-radius: 20px;
  }

  .form-card-head {
    padding-bottom: 18px;
    margin-bottom: 20px;
  }

  .form-card-head h2 {
    font-size: 1.15rem;
  }

  .required-note {
    font-size: 10.5px;
  }

  .field-input,
  .field-textarea,
  .field-select {
    font-size: 16px; /* 避免 iOS 聚焦时自动放大 */
    padding: 12px 13px;
  }

  .btn-submit {
    padding: 14px 18px;
  }

  .public-footer {
    padding: 18px 18px 26px;
  }

  .index-shell {
    padding: 30px 18px 60px;
  }

  .directory-card {
    padding: 18px;
  }

  .directory-copy small {
    max-width: 55vw;
  }

  .topbar-actions .btn-quiet {
    display: none;
  }

  .topbar-actions .btn-primary {
    padding: 9px 11px;
  }

  .stat-grid {
    gap: 9px;
  }

  .stat-card {
    padding: 15px;
  }

  .stat-value {
    font-size: 28px;
  }

  .admin-content {
    padding: 16px 14px 44px;
  }

  .admin-topbar {
    padding: 14px 14px;
  }

  .admin-topbar h1 {
    font-size: 18px;
  }

  .section-toolbar {
    flex-direction: column;
    align-items: stretch;
  }

  .section-toolbar .btn {
    align-self: flex-start;
  }

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

  .filter-bar {
    gap: 8px;
  }

  .filter-field,
  .filter-search {
    flex: 1 1 140px;
  }

  .filter-field select {
    min-width: 0;
    width: 100%;
  }

  .modal {
    width: calc(100vw - 16px);
    max-height: calc(100svh - 16px);
  }

  .modal-card {
    max-height: calc(100svh - 16px);
  }

  .modal-head,
  .modal-body,
  .modal-foot {
    padding-left: 16px;
    padding-right: 16px;
  }

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

  .field-span-2 {
    grid-column: auto;
  }

  .editor-field-head {
    grid-template-columns: 18px minmax(0, 1fr) 92px auto;
    row-gap: 5px;
  }

  .editor-field-head .required-toggle {
    grid-column: 2 / 3;
  }

  .editor-field-head .move-group {
    grid-column: 2 / 3;
    justify-self: start;
  }

  .editor-field-head .icon-mini.is-danger {
    justify-self: end;
  }

  .editor-field-body {
    grid-template-columns: 1fr;
    padding-left: 0;
  }

  .editor-field-body .span-2 {
    grid-column: auto;
  }

  .detail-row {
    grid-template-columns: 1fr;
    gap: 3px;
  }

  .data-table {
    min-width: 640px;
  }
}

@media (max-width: 420px) {
  .admin-nav {
    gap: 0;
  }

  .nav-item {
    padding: 8px;
  }

  .nav-badge {
    display: none;
  }

  .topbar-actions .btn-primary {
    font-size: 11px;
  }

  .stat-label {
    font-size: 9.5px;
  }

  .stat-value {
    font-size: 24px;
  }
}

/* 自定义下拉选择：暗色、居中箭头、可滚动选项面板 */
.select-wrap.custom-select {
  position: relative;
}

.select-wrap.custom-select::after {
  display: none;
}

.select-wrap .native-select {
  display: none;
}

.select-trigger {
  width: 100%;
  min-height: 42px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px;
  border: 1px solid #2b2b31;
  border-radius: 8px;
  background: #18181b;
  color: #f4f4f5;
  font-family: inherit;
  font-size: 13px;
  line-height: 1.4;
  text-align: left;
  cursor: pointer;
  transition: border-color .16s ease, box-shadow .16s ease, background .16s ease;
}

.select-trigger:hover {
  border-color: #414149;
  background: #1b1b1f;
}

.select-trigger:focus-visible,
.custom-select.is-open .select-trigger {
  outline: none;
  border-color: #3b82f6;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, .13);
}

.select-value {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.select-value.is-placeholder {
  color: #5f6068;
}

.select-chevron {
  position: relative;
  flex: 0 0 16px;
  width: 16px;
  height: 16px;
  color: #777781;
  transition: transform .18s ease, color .18s ease;
}

.select-chevron::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 6px;
  height: 6px;
  border-right: 1.7px solid currentColor;
  border-bottom: 1.7px solid currentColor;
  transform: translate(-50%, -50%) rotate(45deg);
}

.custom-select.is-open .select-chevron {
  color: #93c5fd;
  transform: rotate(180deg);
}

.select-menu {
  position: absolute;
  top: calc(100% + 7px);
  left: 0;
  right: 0;
  z-index: 80;
  max-height: 240px;
  padding: 5px;
  overflow-y: auto;
  overscroll-behavior: contain;
  border: 1px solid #303038;
  border-radius: 10px;
  background: rgba(22, 22, 25, .985);
  box-shadow: 0 18px 50px rgba(0, 0, 0, .52), 0 2px 8px rgba(0, 0, 0, .28);
  backdrop-filter: blur(16px);
  scrollbar-width: thin;
  scrollbar-color: #3a3a42 transparent;
  animation: select-pop .14s ease-out;
}

.select-menu[hidden] {
  display: none;
}

.select-menu.drop-up {
  top: auto;
  bottom: calc(100% + 7px);
}

.select-menu::-webkit-scrollbar {
  width: 7px;
}

.select-menu::-webkit-scrollbar-thumb {
  border-radius: 999px;
  background: #3a3a42;
}

.select-option {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-height: 34px;
  padding: 8px 10px;
  border-radius: 7px;
  color: #c9c9d1;
  font-size: 12.5px;
  line-height: 1.4;
  cursor: pointer;
  user-select: none;
}

.select-option:hover,
.select-option:focus-visible {
  outline: none;
  background: #29292f;
  color: #fafafa;
}

.select-option.is-selected {
  background: rgba(59, 130, 246, .13);
  color: #f8fafc;
}

.select-option.is-selected:hover,
.select-option.is-selected:focus-visible {
  background: rgba(59, 130, 246, .21);
}

.select-option-label {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.select-check {
  flex: 0 0 auto;
  color: #60a5fa;
  font-size: 12px;
  opacity: 0;
  transform: translateY(-.5px);
}

.select-option.is-selected .select-check {
  opacity: 1;
}

.app-main .field.has-error .select-trigger {
  border-color: #f87171;
  background: #1d1416;
}

@keyframes select-pop {
  from { opacity: 0; transform: translateY(-4px) scale(.985); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

@media (max-width: 680px) {
  .select-trigger {
    min-height: 46px;
    padding: 11px 12px;
    font-size: 16px;
  }

  .select-option {
    min-height: 40px;
    font-size: 15px;
  }

  .select-menu {
    max-height: 220px;
  }
}

.select-option[data-value=""] {
  margin-bottom: 4px;
  border-bottom: 1px solid #2a2a30;
  border-radius: 7px 7px 0 0;
  color: #74747e;
}

/* ============================================================
   Admin dark theme — same palette as the public form
   ============================================================ */

.admin-page {
  --ink: #f9fafb;
  --ink-soft: #e5e7eb;
  --muted: #9ca3af;
  --faint: #6b7280;
  --paper: #0a0a0a;
  --surface: #0f0f11;
  --surface-2: #161618;
  --line: rgba(255, 255, 255, .08);
  --line-strong: #2b2b31;
  --accent: #3b82f6;
  --accent-strong: #60a5fa;
  --accent-soft: rgba(59, 130, 246, .12);
  --accent-ink: #dbeafe;
  --danger: #f87171;
  --danger-soft: rgba(248, 113, 113, .12);
  --warn: #fbbf24;
  --sidebar: #0d0d0f;
  --sidebar-2: #09090b;
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, .35), 0 8px 24px rgba(0, 0, 0, .18);
  --shadow-md: 0 16px 40px rgba(0, 0, 0, .35);
  --shadow-lg: 0 28px 80px rgba(0, 0, 0, .55);
  --radius: 14px;
  color-scheme: dark;
  color: var(--ink);
  background: #0a0a0a;
  font-family: "DM Sans", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    "Noto Sans SC", "PingFang SC", "Microsoft YaHei", sans-serif;
}

.admin-page .admin-shell {
  background:
    radial-gradient(1000px 520px at 26% -12%, rgba(45, 111, 199, .16), transparent 62%),
    #0a0a0a;
}

.admin-page .admin-sidebar {
  background:
    radial-gradient(420px 280px at 18% 0%, rgba(59, 130, 246, .10), transparent 70%),
    linear-gradient(180deg, #111113 0%, #0a0a0c 100%);
  border-right: 1px solid var(--line);
  color: #d4d4d8;
}

.admin-page .admin-brand {
  color: #f8fafc;
}

.admin-page .brand-mark-dark {
  background: rgba(255, 255, 255, .07);
  border: 1px solid rgba(255, 255, 255, .09);
  color: #e5e7eb;
  box-shadow: none;
}

.admin-page .admin-brand strong {
  font-family: "Montserrat", "DM Sans", "Noto Sans SC", sans-serif;
  font-size: 14px;
  font-weight: 500;
  letter-spacing: -.02em;
}

.admin-page .admin-brand small {
  color: rgba(156, 163, 175, .45);
}

.admin-page .admin-nav {
  border-top-color: var(--line);
}

.admin-page .nav-item {
  color: rgba(212, 212, 216, .62);
  font-weight: 500;
}

.admin-page .nav-item:hover {
  background: rgba(255, 255, 255, .06);
  color: #f8fafc;
}

.admin-page .nav-item.is-active {
  background: rgba(255, 255, 255, .09);
  color: #f8fafc;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .06);
}

.admin-page .nav-icon {
  color: rgba(156, 163, 175, .55);
}

.admin-page .nav-item.is-active .nav-icon {
  color: #93c5fd;
}

.admin-page .nav-badge {
  background: #3b82f6;
  color: #fff;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, .12);
}

.admin-page .sidebar-foot {
  border-top-color: var(--line);
}

.admin-page .server-state strong {
  color: rgba(244, 244, 245, .86);
  font-weight: 500;
}

.admin-page .server-state small,
.admin-page .sidebar-link {
  color: rgba(156, 163, 175, .52);
}

.admin-page .sidebar-link:hover {
  background: rgba(255, 255, 255, .06);
  color: #f8fafc;
}

.admin-page .status-dot {
  background: #34d399;
  box-shadow: 0 0 0 4px rgba(52, 211, 153, .12);
}

.admin-page .admin-topbar {
  border-bottom-color: var(--line);
  background: rgba(10, 10, 10, .74);
  backdrop-filter: blur(18px);
}

.admin-page .topbar-kicker {
  color: #7a7a85;
}

.admin-page .admin-topbar h1,
.admin-page .section-toolbar h2,
.admin-page .modal-head h2,
.admin-page .panel-head h2,
.admin-page .form-tile h3 {
  color: #f8fafc;
  font-family: "Montserrat", "DM Sans", "Noto Sans SC", sans-serif;
  font-weight: 500;
  letter-spacing: -.02em;
}

.admin-page .admin-topbar h1 {
  font-size: 22px;
}

.admin-page .admin-content {
  color: var(--ink);
}

.admin-page .btn-primary {
  border: 1px solid #fff;
  background: #fff;
  color: #09090b;
  box-shadow: 0 8px 24px rgba(0, 0, 0, .24);
}

.admin-page .btn-primary:hover {
  background: #e8e8ea;
  color: #09090b;
}

.admin-page .btn-secondary {
  border-color: #35353b;
  background: #18181b;
  color: #e5e7eb;
}

.admin-page .btn-secondary:hover {
  border-color: #45454d;
  background: #222226;
}

.admin-page .btn-quiet {
  border-color: transparent;
  background: transparent;
  color: #9ca3af;
}

.admin-page .btn-quiet:hover {
  background: rgba(255, 255, 255, .06);
  color: #f8fafc;
}

.admin-page .stat-card,
.admin-page .panel,
.admin-page .form-tile,
.admin-page .filter-bar,
.admin-page .table-wrap {
  border-color: var(--line);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}

.admin-page .stat-card-accent {
  border-color: rgba(59, 130, 246, .26);
  background:
    radial-gradient(300px 200px at 92% -20%, rgba(96, 165, 250, .22), transparent 70%),
    linear-gradient(145deg, #102844 0%, #0c1b2e 100%);
  color: #eff6ff;
  box-shadow: 0 16px 40px rgba(0, 0, 0, .30), inset 0 1px 0 rgba(255, 255, 255, .06);
}

.admin-page .stat-card-accent::after {
  border-color: rgba(147, 197, 253, .14);
  box-shadow: 0 0 0 28px rgba(147, 197, 253, .035);
}

.admin-page .stat-label,
.admin-page .stat-meta {
  color: #8b8b95;
}

.admin-page .stat-card-accent .stat-label {
  color: rgba(219, 234, 254, .58);
}

.admin-page .stat-card-accent .stat-meta {
  color: rgba(219, 234, 254, .45);
}

.admin-page .stat-value {
  color: #f8fafc;
}

.admin-page .panel-head {
  border-bottom-color: var(--line);
}

.admin-page .panel-head p,
.admin-page .section-toolbar p,
.admin-page .muted-placeholder,
.admin-page .form-tile-desc,
.admin-page .form-tile-meta,
.admin-page .compact-main small,
.admin-page .compact-time {
  color: #8b8b95;
}

.admin-page .text-button,
.admin-page .table-action,
.admin-page .attachment-link {
  color: #93c5fd;
}

.admin-page .compact-row {
  border-bottom-color: rgba(255, 255, 255, .055);
}

.admin-page button.compact-row:hover,
.admin-page .data-table tbody tr:hover {
  background: #161618;
}

.admin-page .compact-avatar {
  background: rgba(59, 130, 246, .13);
  color: #93c5fd;
}

.admin-page .form-tile {
  transition: transform .16s ease, border-color .16s ease, box-shadow .16s ease;
}

.admin-page .form-tile:hover {
  border-color: rgba(59, 130, 246, .3);
  box-shadow: 0 18px 44px rgba(0, 0, 0, .35);
}

.admin-page .form-tile-actions {
  border-top-color: var(--line);
}

.admin-page .tile-action {
  color: #9ca3af;
}

.admin-page .tile-action:hover {
  background: rgba(255, 255, 255, .06);
  color: #f8fafc;
}

.admin-page .tile-action.is-danger:hover {
  background: var(--danger-soft);
  color: #fca5a5;
}

.admin-page .badge-live {
  background: rgba(52, 211, 153, .12);
  color: #6ee7b7;
}

.admin-page .badge-off {
  background: rgba(255, 255, 255, .06);
  color: #9ca3af;
}

.admin-page .badge-unread {
  background: rgba(249, 115, 22, .12);
  color: #fdba74;
}

.admin-page .badge-read {
  background: rgba(255, 255, 255, .05);
  color: #8b8b95;
}

.admin-page .filter-bar {
  border-bottom: 0;
}

.admin-page .filter-field > span {
  color: #8b8b95;
}

.admin-page .filter-field select,
.admin-page .filter-field input,
.admin-page .filter-check,
.admin-page .field-control input,
.admin-page .field-control textarea,
.admin-page .field-control select,
.admin-page .editor-field-head input,
.admin-page .editor-field-head select,
.admin-page .editor-field-body input,
.admin-page .editor-field-body textarea {
  border-color: #2b2b31;
  background: #18181b;
  color: #f4f4f5;
}

.admin-page .filter-field select option,
.admin-page .field-control select option,
.admin-page .editor-field-head select option,
.admin-page .editor-field-body select option {
  background: #18181b;
  color: #f4f4f5;
}

.admin-page .filter-field select:focus,
.admin-page .filter-field input:focus,
.admin-page .filter-check:focus-within,
.admin-page .field-control input:focus,
.admin-page .field-control textarea:focus,
.admin-page .field-control select:focus,
.admin-page .editor-field-head input:focus,
.admin-page .editor-field-head select:focus,
.admin-page .editor-field-body input:focus,
.admin-page .editor-field-body textarea:focus {
  border-color: #3b82f6;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, .13);
}

.admin-page .filter-check input {
  accent-color: #3b82f6;
}

.admin-page .table-wrap {
  border-top: 0;
  border-radius: 0 0 var(--radius) var(--radius);
}

.admin-page .data-table th {
  background: #141416;
  border-bottom-color: var(--line);
  color: #8b8b95;
}

.admin-page .data-table td {
  border-bottom-color: rgba(255, 255, 255, .055);
  color: #d4d4d8;
}

.admin-page .data-table tr.is-unread td:first-child {
  box-shadow: inset 3px 0 0 #3b82f6;
}

.admin-page .cell-primary {
  color: #f4f4f5;
}

.admin-page .cell-secondary,
.admin-page .cell-time,
.admin-page .cell-source {
  color: #8b8b95;
}

.admin-page .table-empty h3 {
  color: #f4f4f5;
}

.admin-page .empty-mark {
  color: #3f3f46;
}

.admin-page .table-footer {
  color: #6b7280;
}

.admin-page .modal::backdrop {
  background: rgba(0, 0, 0, .68);
  backdrop-filter: blur(6px);
}

.admin-page .modal-card {
  border: 1px solid rgba(255, 255, 255, .1);
  background: #0f0f11;
  box-shadow: 0 32px 100px rgba(0, 0, 0, .65);
}

.admin-page .modal-head {
  border-bottom-color: var(--line);
}

.admin-page .modal-kicker {
  color: #7a7a85;
}

.admin-page .modal-foot {
  border-top-color: var(--line);
  background: #121214;
}

.admin-page .icon-button {
  border-color: #35353b;
  background: #18181b;
  color: #9ca3af;
}

.admin-page .icon-button:hover {
  border-color: #45454d;
  background: #222226;
  color: #f8fafc;
}

.admin-page .field-control > span {
  color: #d4d4d8;
}

.admin-page .field-control small {
  color: #6b7280;
}

.admin-page .input-prefix {
  border-color: #2b2b31;
  background: #18181b;
}

.admin-page .input-prefix:focus-within {
  border-color: #3b82f6;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, .13);
}

.admin-page .input-prefix em {
  border-right-color: #2b2b31;
  background: #202024;
  color: #777781;
}

.admin-page .color-control {
  border-color: #2b2b31;
  background: #18181b;
}

.admin-page .color-control code {
  color: #9ca3af;
}

.admin-page .field-builder-head {
  border-top-color: var(--line);
}

.admin-page .field-builder-head p {
  color: #6b7280;
}

.admin-page .editor-field {
  border-color: #26262c;
  background: #121214;
}

.admin-page .editor-field-body label {
  color: #6b7280;
}

.admin-page .icon-mini {
  border-color: #35353b;
  background: #18181b;
  color: #9ca3af;
}

.admin-page .icon-mini:hover {
  border-color: #45454d;
  color: #f8fafc;
}

.admin-page .icon-mini.is-danger:hover {
  border-color: rgba(248, 113, 113, .3);
  background: var(--danger-soft);
  color: #fca5a5;
}

.admin-page .required-toggle {
  color: #9ca3af;
}

.admin-page .required-toggle input {
  accent-color: #3b82f6;
}

.admin-page .switch-row {
  border-color: #2b2b31;
  background: #121214;
}

.admin-page .switch-row small {
  color: #6b7280;
}

.admin-page .switch-input {
  background: #3f3f46;
}

.admin-page .switch-input:checked {
  background: #3b82f6;
}

.admin-page .detail-row {
  border-bottom-color: rgba(255, 255, 255, .055);
}

.admin-page .detail-key {
  color: #8b8b95;
}

.admin-page .detail-value {
  color: #e5e7eb;
}

.admin-page .detail-meta {
  border-color: var(--line);
  background: #161618;
  color: #777781;
}

.admin-page .attachment-link small {
  color: #777781;
}

.admin-page .toast {
  border: 1px solid rgba(255, 255, 255, .1);
  background: rgba(22, 22, 25, .97);
  color: #f4f4f5;
  backdrop-filter: blur(16px);
}

.admin-page .toast.is-error {
  border-color: rgba(248, 113, 113, .2);
  background: rgba(52, 20, 20, .97);
  color: #fecaca;
}

.admin-page .toast-mark {
  background: rgba(59, 130, 246, .16);
  color: #93c5fd;
}

.admin-page .auth-lost {
  background: rgba(0, 0, 0, .72);
}

.admin-page .auth-lost-card {
  border: 1px solid var(--line);
  background: #0f0f11;
  color: #f4f4f5;
}

.admin-page .auth-lost-card h2 {
  color: #f8fafc;
}

.admin-page .auth-lost-card p {
  color: #9ca3af;
}

@media (max-width: 900px) {
  .admin-page .admin-sidebar {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }
}

@media (max-width: 680px) {
  .admin-page {
    background: #0a0a0a;
  }
}

.admin-page .btn-danger {
  background: rgba(248, 113, 113, .12);
  border: 1px solid rgba(248, 113, 113, .24);
  color: #fca5a5;
}
.admin-page .btn-danger:hover {
  background: rgba(248, 113, 113, .2);
  border-color: rgba(248, 113, 113, .4);
}
.admin-page #delete-submission-button {
  margin-right: auto;
}
.admin-page .col-action {
  width: 120px;
}
.admin-page .table-action-danger {
  color: #f87171;
  margin-left: 8px;
}

/* ============================================================
   Form directory / index — DSH-style landing page
   ============================================================ */

.index-page {
  min-height: 100svh;
  display: flex;
  flex-direction: column;
}

.index-page::before {
  height: min(900px, 100vh);
}

.index-main {
  position: relative;
  z-index: 1;
  flex: 1;
  display: flex;
  flex-direction: column;
  width: min(900px, calc(100% - 48px));
  margin: 0 auto;
  padding: 78px 0 88px;
  text-align: center;
}

@media (min-width: 900px) {
  .index-main {
    justify-content: center;
  }
}

.index-page .dsh-footer {
  margin-top: auto;
}

.index-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: rgba(229, 231, 235, .48);
  font-size: 9px;
  letter-spacing: .12em;
}

.index-badge span {
  color: rgba(219, 234, 254, .55);
  font-size: 11px;
}

.index-hero h1 {
  margin: 14px auto 0;
  color: #f8fbff;
  font-family: "Montserrat", "DM Sans", "Noto Sans SC", "PingFang SC", sans-serif;
  font-size: clamp(34px, 4vw, 46px);
  font-weight: 400;
  line-height: 1.35;
  letter-spacing: -.045em;
}

.index-lead {
  max-width: 590px;
  margin: 18px auto 0;
  color: rgba(229, 231, 235, .52);
  font-size: 13px;
  line-height: 1.85;
}

.index-meta {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 22px;
}

.index-meta-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  border: 1px solid rgba(255, 255, 255, .11);
  border-radius: 999px;
  background: rgba(255, 255, 255, .045);
  color: rgba(210, 226, 248, .70);
  font-size: 9.5px;
  letter-spacing: .02em;
  backdrop-filter: blur(10px);
}

.index-meta-pill i {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #65e0bd;
  box-shadow: 0 0 9px rgba(101, 224, 189, .65);
}

.index-window {
  margin: 34px auto 0;
  border-radius: 16px;
  background: #0f0f11;
  text-align: left;
  overflow: hidden;
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, .12),
    0 24px 72px rgba(0, 0, 0, .28);
}

.index-window-body {
  padding: 20px 24px 18px;
}

.index-directory-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1px 2px 12px;
  color: rgba(156, 163, 175, .48);
  font-size: 8px;
  letter-spacing: .15em;
}

.index-count {
  color: rgba(147, 197, 253, .6);
  font-variant-numeric: tabular-nums;
}

.form-directory {
  gap: 8px;
}

.directory-card {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 15px 16px;
  border: 1px solid #2b2b31;
  border-radius: 10px;
  background: #161618;
  color: #f5f9ff;
  box-shadow: none;
  transform: none;
  transition: border-color .16s ease, background .16s ease, transform .16s ease;
}

.directory-card:hover {
  border-color: color-mix(in srgb, var(--accent) 48%, #2b2b31);
  background: #1c1c20;
  transform: translateX(2px);
  box-shadow: none;
}

.directory-index {
  width: 22px;
  flex: 0 0 22px;
  color: #62626b;
  font-family: "DM Sans", monospace;
  font-size: 10px;
  font-variant-numeric: tabular-nums;
}

.directory-copy {
  min-width: 0;
  display: grid;
  gap: 4px;
}

.directory-copy strong {
  color: #f4f4f5;
  font-size: 14px;
  font-weight: 500;
  letter-spacing: -.01em;
}

.directory-copy small {
  max-width: none;
  color: #8b8b95;
  font-size: 11px;
  line-height: 1.5;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.directory-arrow {
  width: 32px;
  height: 32px;
  margin-left: auto;
  flex: 0 0 32px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: rgba(59, 130, 246, .13);
  color: #93c5fd;
  transition: background .16s ease, transform .16s ease;
}

.directory-arrow svg {
  width: 15px;
  height: 15px;
}

.directory-card:hover .directory-arrow {
  background: rgba(59, 130, 246, .22);
  transform: translateX(2px);
}

.index-note {
  display: flex;
  align-items: center;
  gap: 7px;
  margin: 15px 2px 0;
  color: #5f6068;
  font-size: 9px;
}

.index-note span {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: rgba(52, 211, 153, .7);
}

.index-features {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-top: 14px;
  text-align: left;
}

.index-feature {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px 14px;
  border: 1px solid rgba(255, 255, 255, .075);
  border-radius: 10px;
  background: rgba(255, 255, 255, .028);
}

.index-feature-icon {
  width: 25px;
  height: 25px;
  flex: 0 0 25px;
  display: grid;
  place-items: center;
  border-radius: 7px;
  background: rgba(59, 130, 246, .12);
  color: #93c5fd;
  font-size: 13px;
}

.index-feature strong {
  display: block;
  color: rgba(244, 244, 245, .88);
  font-size: 10.5px;
  font-weight: 500;
  line-height: 1.5;
}

.index-feature p {
  margin: 2px 0 0;
  color: #777781;
  font-size: 9px;
  line-height: 1.5;
}

.index-page .empty-state {
  padding: 42px 20px;
  border: 1px dashed rgba(255, 255, 255, .12);
  border-radius: 10px;
  background: rgba(255, 255, 255, .025);
  color: #f4f4f5;
}

.index-page .empty-icon {
  display: block;
  margin-bottom: 10px;
  color: #52525b;
  font-size: 26px;
}

.index-page .empty-state h2 {
  margin: 0 0 5px;
  color: #f4f4f5;
  font-size: 14px;
}

.index-page .empty-state p {
  margin: 0;
  color: #8b8b95;
  font-size: 11px;
}

@media (max-width: 680px) {
  .index-main {
    width: calc(100% - 20px);
    padding: 50px 0 54px;
  }

  .index-hero h1 {
    font-size: 32px;
    letter-spacing: -.04em;
  }

  .index-lead {
    padding: 0 6px;
    font-size: 12px;
  }

  .index-window {
    margin-top: 27px;
    border-radius: 13px;
  }

  .index-window-body {
    padding: 16px 14px 15px;
  }

  .directory-card {
    gap: 11px;
    padding: 13px 12px;
  }

  .directory-copy strong {
    font-size: 13px;
  }

  .directory-copy small {
    max-width: calc(100vw - 130px);
    font-size: 10.5px;
  }

  .index-badge {
    font-size: 8px;
  }

  .index-features {
    grid-template-columns: 1fr;
    gap: 6px;
    margin-top: 10px;
  }

  .index-feature {
    padding: 9px 11px;
  }
}

/* ============================================================
   首页目录 · 2026 refresh
   ============================================================ */
.index-page {
  --idx-bg: #07111f;
  --idx-panel: rgba(14, 28, 48, .72);
  --idx-panel-strong: rgba(18, 35, 59, .9);
  --idx-line: rgba(164, 190, 226, .14);
  --idx-line-strong: rgba(164, 190, 226, .24);
  --idx-ink: #f7fbff;
  --idx-muted: rgba(209, 225, 246, .66);
  --idx-faint: rgba(170, 194, 226, .42);
  --idx-blue: #7fb5ff;
  --idx-blue-strong: #2f74df;
  color: var(--idx-ink);
  background:
    radial-gradient(1000px 520px at 82% -12%, rgba(44, 101, 190, .30), transparent 62%),
    radial-gradient(760px 440px at 3% 105%, rgba(28, 78, 145, .22), transparent 66%),
    linear-gradient(rgba(132, 164, 210, .035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(132, 164, 210, .035) 1px, transparent 1px),
    var(--idx-bg);
  background-size: auto, auto, 58px 58px, 58px 58px, auto;
}

.index-page .page-glow-a {
  background: radial-gradient(circle, rgba(55, 117, 216, .22), rgba(55, 117, 216, 0) 68%);
}

.index-page .page-glow-b {
  background: radial-gradient(circle, rgba(35, 88, 166, .16), rgba(35, 88, 166, 0) 68%);
}

.index-page .public-header {
  max-width: 1180px;
  padding: 22px 40px;
  border-bottom: 1px solid var(--idx-line);
}

.index-page .brand {
  color: var(--idx-ink);
  font-size: 14px;
  letter-spacing: .01em;
}

.index-page .brand-mark {
  background: linear-gradient(145deg, #3b7fe6, #183b72);
  box-shadow: 0 8px 24px rgba(31, 92, 184, .32);
}

.index-page .secure-badge {
  border-color: var(--idx-line);
  background: rgba(14, 30, 52, .58);
  color: var(--idx-muted);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .03);
}

.index-page .secure-dot {
  background: #46d39a;
  box-shadow: 0 0 0 4px rgba(70, 211, 154, .12), 0 0 16px rgba(70, 211, 154, .45);
}

.index-page .index-shell {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 1180px;
  margin: 0 auto;
  padding: clamp(56px, 9vh, 96px) 40px clamp(56px, 9vh, 96px);
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(380px, .8fr);
  gap: clamp(36px, 6vw, 84px);
  align-items: center;
}

.index-page .index-shell::before {
  content: "";
  position: absolute;
  z-index: -1;
  top: 4%;
  right: -140px;
  width: 460px;
  height: 460px;
  border: 1px solid rgba(126, 174, 255, .12);
  border-radius: 50%;
  box-shadow: 0 0 0 34px rgba(126, 174, 255, .025), 0 0 0 70px rgba(126, 174, 255, .018);
  pointer-events: none;
}

.index-page .index-hero {
  position: relative;
  max-width: 600px;
  animation: idx-rise .72s cubic-bezier(.22, .8, .24, 1) both;
}

.index-page .index-shell .eyebrow {
  display: flex;
  align-items: center;
  gap: 11px;
  margin: 0 0 22px;
  color: var(--idx-blue);
  font-size: 10.5px;
  letter-spacing: .22em;
}

.index-page .eyebrow-dot {
  width: 22px;
  height: 1px;
  background: linear-gradient(90deg, rgba(127, 181, 255, .15), var(--idx-blue));
}

.index-page .index-shell h1 {
  margin: 0;
  max-width: 11ch;
  color: #f8fbff;
  background: linear-gradient(118deg, #ffffff 28%, #c4dafb 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  font-size: clamp(2.9rem, 5.1vw, 4.7rem);
  line-height: 1.04;
  letter-spacing: -.06em;
  font-weight: 680;
  text-wrap: balance;
}

.index-page .index-lead {
  max-width: 44ch;
  margin: 24px 0 0;
  color: var(--idx-muted);
  font-size: 15.5px;
  line-height: 1.9;
  letter-spacing: .005em;
}

.index-page .index-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  margin-top: 32px;
}

.index-page .meta-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border: 1px solid var(--idx-line);
  border-radius: 999px;
  background: rgba(255, 255, 255, .035);
  color: var(--idx-muted);
  font-size: 11.5px;
  letter-spacing: .02em;
  white-space: nowrap;
}

.index-page .meta-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--idx-blue);
  box-shadow: 0 0 8px rgba(127, 181, 255, .7);
}

.index-page .index-directory {
  position: relative;
  padding: 18px;
  border: 1px solid var(--idx-line);
  border-radius: 24px;
  background: linear-gradient(150deg, rgba(22, 42, 70, .76), rgba(10, 23, 41, .72));
  box-shadow: 0 30px 80px rgba(0, 0, 0, .28), inset 0 1px 0 rgba(255, 255, 255, .05);
  backdrop-filter: blur(18px);
  overflow: hidden;
  animation: idx-rise .72s .1s cubic-bezier(.22, .8, .24, 1) both;
}

.index-page .index-directory::before {
  content: "";
  position: absolute;
  inset: -1px 18% auto;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(127, 181, 255, .55), transparent);
}

.index-page .directory-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 4px 5px 14px;
  border-bottom: 1px solid var(--idx-line);
  color: var(--idx-faint);
  font-family: var(--mono);
  font-size: 9.5px;
  letter-spacing: .18em;
}

.index-page .directory-head span:last-child {
  color: rgba(127, 181, 255, .58);
}

.index-page .form-directory {
  display: grid;
  gap: 10px;
  padding-top: 12px;
}

.index-page .directory-card {
  position: relative;
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) 42px;
  align-items: center;
  gap: 16px;
  padding: 19px 18px;
  border: 1px solid rgba(164, 190, 226, .12);
  border-radius: 17px;
  background: linear-gradient(135deg, rgba(255, 255, 255, .06), rgba(255, 255, 255, .022));
  box-shadow: 0 10px 28px rgba(0, 0, 0, .12);
  color: var(--idx-ink);
  overflow: hidden;
  isolation: isolate;
  transition: transform .22s ease, border-color .22s ease, box-shadow .22s ease;
}

.index-page .directory-card::before {
  content: "";
  position: absolute;
  inset: 16px auto 16px 0;
  width: 2px;
  border-radius: 0 2px 2px 0;
  background: linear-gradient(180deg, var(--accent), transparent);
  opacity: .95;
}

.index-page .directory-card::after {
  content: "";
  position: absolute;
  z-index: -1;
  width: 180px;
  height: 180px;
  right: -70px;
  top: -90px;
  border-radius: 50%;
  background: radial-gradient(circle, color-mix(in srgb, var(--accent) 22%, transparent), transparent 68%);
  opacity: 0;
  transition: opacity .22s ease;
}

.index-page .directory-card:hover {
  transform: translateY(-3px);
  border-color: rgba(126, 174, 255, .30);
  box-shadow: 0 20px 46px rgba(0, 0, 0, .26);
}

.index-page .directory-card:hover::after {
  opacity: 1;
}

.index-page .directory-card:focus-visible {
  outline: 2px solid rgba(127, 181, 255, .8);
  outline-offset: 3px;
}

.index-page .directory-index {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border: 1px solid color-mix(in srgb, var(--accent) 32%, transparent);
  border-radius: 12px;
  background: color-mix(in srgb, var(--accent) 12%, transparent);
  color: color-mix(in srgb, var(--accent) 68%, white);
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: .04em;
}

.index-page .directory-copy {
  min-width: 0;
  display: grid;
  gap: 6px;
}

.index-page .directory-copy strong {
  color: var(--idx-ink);
  font-size: 17px;
  font-weight: 650;
  letter-spacing: -.015em;
  line-height: 1.35;
}

.index-page .directory-copy small {
  display: -webkit-box;
  max-width: none;
  color: var(--idx-muted);
  font-size: 12.5px;
  line-height: 1.65;
  overflow: hidden;
  white-space: normal;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.index-page .directory-arrow {
  width: 40px;
  height: 40px;
  margin-left: 0;
  border: 1px solid rgba(127, 181, 255, .16);
  border-radius: 50%;
  background: rgba(127, 181, 255, .09);
  color: var(--idx-blue);
  font-size: 15px;
  transition: transform .22s ease, background .22s ease, border-color .22s ease;
}

.index-page .directory-card:hover .directory-arrow {
  transform: translateX(2px);
  border-color: rgba(127, 181, 255, .34);
  background: rgba(127, 181, 255, .16);
}

.index-page .directory-note {
  display: flex;
  align-items: center;
  gap: 9px;
  margin: 16px 2px 0;
  color: var(--idx-faint);
  font-size: 10.5px;
  letter-spacing: .03em;
}

.index-page .note-line {
  width: 14px;
  height: 1px;
  background: rgba(127, 181, 255, .35);
}

.index-page .empty-state {
  margin-top: 12px;
  padding: 42px 24px;
  border: 1px dashed var(--idx-line-strong);
  border-radius: 17px;
  background: rgba(255, 255, 255, .025);
  color: var(--idx-ink);
}

.index-page .empty-state h2 {
  font-size: 16px;
  font-weight: 650;
}

.index-page .empty-state p {
  color: var(--idx-muted);
  font-size: 12.5px;
}

.index-page .public-footer {
  width: 100%;
  max-width: 1180px;
  margin: 0 auto;
  padding: 18px 40px 28px;
  border-top: 1px solid var(--idx-line);
  color: var(--idx-faint);
  font-size: 10.5px;
  letter-spacing: .04em;
}

@keyframes idx-rise {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: translateY(0); }
}

@media (max-width: 980px) {
  .index-page .index-shell {
    max-width: 760px;
    grid-template-columns: minmax(0, 1fr);
    gap: 38px;
    padding-top: 52px;
  }

  .index-page .index-hero,
  .index-page .index-shell h1 {
    max-width: none;
  }

  .index-page .index-shell::before {
    right: -220px;
    top: auto;
    bottom: -120px;
    opacity: .65;
  }
}

@media (max-width: 680px) {
  .index-page .public-header {
    padding: 18px 20px;
  }

  .index-page .index-shell {
    padding: 38px 20px 54px;
    gap: 30px;
  }

  .index-page .index-shell h1 {
    font-size: clamp(2.35rem, 11vw, 3rem);
    letter-spacing: -.05em;
  }

  .index-page .index-lead {
    margin-top: 18px;
    font-size: 14px;
    line-height: 1.8;
  }

  .index-page .index-meta {
    margin-top: 24px;
  }

  .index-page .meta-pill {
    padding: 7px 10px;
    font-size: 10.5px;
  }

  .index-page .index-directory {
    padding: 13px;
    border-radius: 20px;
  }

  .index-page .directory-card {
    grid-template-columns: 34px minmax(0, 1fr) 36px;
    gap: 12px;
    padding: 17px 14px;
  }

  .index-page .directory-index {
    width: 32px;
    height: 32px;
    border-radius: 10px;
    font-size: 9.5px;
  }

  .index-page .directory-copy strong {
    font-size: 15.5px;
  }

  .index-page .directory-copy small {
    font-size: 12px;
  }

  .index-page .directory-arrow {
    width: 34px;
    height: 34px;
  }

  .index-page .public-footer {
    padding: 16px 20px 22px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .index-page .index-hero,
  .index-page .index-directory,
  .index-page .directory-card {
    animation: none;
  }

  .index-page .directory-card,
  .index-page .directory-arrow {
    transition: none;
  }
}
