:root {
  --primary: #0f766e;
  --primary-dark: #115e59;
  --primary-soft: #ccfbf1;
  --accent: #f59e0b;
  --text: #1f2937;
  --text-light: #6b7280;
  --border: #e5e7eb;
  --bg: #f6f7f9;
  --card: #ffffff;
  --danger: #dc2626;
  --radius: 12px;
  --shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  color: var(--text);
  background: var(--bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

.container { max-width: 720px; margin: 0 auto; padding: 0 16px 60px; }

/* 顶部品牌头 */
.hero {
  background: linear-gradient(135deg, var(--primary-dark), var(--primary));
  color: #fff;
  padding: 28px 16px 22px;
  text-align: center;
}
.hero .brand { font-size: 15px; opacity: 0.9; letter-spacing: 1px; }
.hero h1 { font-size: 24px; margin: 6px 0 4px; font-weight: 700; }
.hero .sub { font-size: 13px; opacity: 0.85; }

.card {
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 20px 18px;
  margin-top: 16px;
}

.section-title {
  font-size: 17px;
  font-weight: 700;
  margin-bottom: 4px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.section-title .bar {
  width: 4px; height: 18px; background: var(--accent); border-radius: 2px; display: inline-block;
}
.section-desc { font-size: 13px; color: var(--text-light); margin-bottom: 16px; }

.field { margin-bottom: 18px; }
.field:last-child { margin-bottom: 0; }

.field-label {
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 8px;
  display: block;
}
.field-label .req { color: var(--danger); margin-left: 2px; }

input[type="text"],
input[type="number"],
input[type="date"],
textarea {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 11px 13px;
  font-size: 15px;
  background: #fff;
  color: var(--text);
  transition: border-color .15s, box-shadow .15s;
  font-family: inherit;
}
input:focus, textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(15, 118, 110, 0.12);
}
textarea { resize: vertical; min-height: 88px; }

/* 选项组（radio / checkbox 共用 chip 样式） */
.options { display: flex; flex-wrap: wrap; gap: 10px; }
.options label {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 14px;
  border: 1px solid var(--border);
  border-radius: 999px;
  font-size: 14px;
  cursor: pointer;
  background: #fff;
  transition: all .15s;
  user-select: none;
}
.options label:hover { border-color: var(--primary); }
.options input { position: absolute; opacity: 0; width: 0; height: 0; }
.options input:checked + span, .options input:checked ~ .opt-text { }
.options input:checked { }
.options label:has(input:checked) {
  background: var(--primary-soft);
  border-color: var(--primary);
  color: var(--primary-dark);
  font-weight: 600;
}
.opt-text { pointer-events: none; }

/* 文件上传 */
.file-drop {
  border: 1.5px dashed var(--border);
  border-radius: 10px;
  padding: 18px;
  text-align: center;
  color: var(--text-light);
  font-size: 14px;
  cursor: pointer;
  transition: all .15s;
}
.file-drop:hover { border-color: var(--primary); color: var(--primary); }
.file-drop.has-file { border-style: solid; border-color: var(--primary); color: var(--primary-dark); }
.file-drop input[type="file"] { display: none; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  border: none;
  border-radius: 12px;
  padding: 14px;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  transition: all .15s;
  font-family: inherit;
}
.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-dark); }
.btn-primary:disabled { opacity: .6; cursor: not-allowed; }
.btn-ghost { background: #fff; color: var(--primary); border: 1px solid var(--primary); }
.btn-sm { width: auto; padding: 7px 14px; font-size: 13px; border-radius: 9px; }

/* 提交成功 */
.success-box { text-align: center; padding: 40px 16px; }
.success-box .icon {
  width: 68px; height: 68px; border-radius: 50%;
  background: var(--primary-soft); color: var(--primary);
  font-size: 34px; display: flex; align-items: center; justify-content: center;
  margin: 0 auto 18px;
}
.success-box h2 { font-size: 20px; margin-bottom: 8px; }
.success-box p { color: var(--text-light); font-size: 14px; }

/* toast */
.toast {
  position: fixed; top: 16px; left: 50%; transform: translateX(-50%);
  background: #333; color: #fff; padding: 10px 20px; border-radius: 999px;
  font-size: 14px; z-index: 999; opacity: 0; pointer-events: none;
  transition: opacity .25s; max-width: 90vw; text-align: center;
}
.toast.show { opacity: 1; }
.toast.error { background: var(--danger); }

/* ===== 后台管理 ===== */
.admin-header {
  background: linear-gradient(135deg, var(--primary-dark), var(--primary));
  color: #fff;
  padding: 14px 20px;
  display: flex; align-items: center; justify-content: space-between;
}
.admin-header .title { font-size: 18px; font-weight: 700; }
.user-info { display: flex; align-items: center; gap: 10px; font-size: 14px; }
.avatar {
  width: 34px; height: 34px; border-radius: 50%; background: #fff; color: var(--primary);
  display: flex; align-items: center; justify-content: center; font-weight: 700; overflow: hidden;
}
.avatar img { width: 100%; height: 100%; object-fit: cover; }

.admin-wrap { max-width: 860px; margin: 0 auto; padding: 16px; }

.tabs { display: flex; gap: 8px; margin-bottom: 16px; }
.tab {
  flex: 1; text-align: center; padding: 11px; border-radius: 10px;
  background: #fff; border: 1px solid var(--border); font-size: 14px; font-weight: 600;
  cursor: pointer; color: var(--text-light);
}
.tab.active { background: var(--primary); color: #fff; border-color: var(--primary); }

.stat-row { display: flex; gap: 12px; margin-bottom: 16px; flex-wrap: wrap; }
.stat {
  flex: 1; min-width: 100px; background: #fff; border-radius: var(--radius);
  padding: 14px; box-shadow: var(--shadow); text-align: center;
}
.stat .num { font-size: 24px; font-weight: 800; color: var(--primary); }
.stat .lbl { font-size: 12px; color: var(--text-light); margin-top: 2px; }

.sub-list { display: flex; flex-direction: column; gap: 10px; }
.sub-item {
  background: #fff; border-radius: var(--radius); box-shadow: var(--shadow);
  padding: 14px 16px; cursor: pointer; transition: transform .1s;
}
.sub-item:hover { transform: translateY(-1px); }
.sub-item .top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 6px; }
.sub-item .name { font-weight: 700; font-size: 15px; }
.sub-item .time { font-size: 12px; color: var(--text-light); }
.sub-item .meta { font-size: 13px; color: var(--text-light); }
.badge { font-size: 11px; padding: 2px 9px; border-radius: 999px; font-weight: 600; }
.badge.new { background: #fef3c7; color: #b45309; }
.badge.processing { background: #dbeafe; color: #1d4ed8; }
.badge.done { background: #d1fae5; color: #047857; }

.link-item {
  background: #fff; border-radius: var(--radius); box-shadow: var(--shadow);
  padding: 14px 16px; margin-bottom: 10px;
}
.link-item .url {
  font-size: 12px; color: var(--text-light); word-break: break-all;
  background: var(--bg); padding: 8px 10px; border-radius: 8px; margin: 8px 0;
}
.link-actions { display: flex; gap: 8px; flex-wrap: wrap; }

.empty { text-align: center; color: var(--text-light); padding: 50px 0; font-size: 14px; }

/* 详情弹层 */
.modal-mask {
  position: fixed; inset: 0; background: rgba(0,0,0,0.45); z-index: 100;
  display: none; align-items: center; justify-content: center; padding: 16px;
}
.modal-mask.show { display: flex; }
.modal {
  background: #fff; border-radius: 14px; max-width: 620px; width: 100%;
  max-height: 86vh; overflow: hidden; display: flex; flex-direction: column;
}
.modal-head { padding: 16px 20px; border-bottom: 1px solid var(--border); display: flex; justify-content: space-between; align-items: center; }
.modal-body { padding: 16px 20px; overflow-y: auto; }
.modal-foot { padding: 14px 20px; border-top: 1px solid var(--border); display: flex; gap: 10px; justify-content: flex-end; }
.detail-kv { display: flex; border-bottom: 1px solid #f3f4f6; padding: 7px 0; font-size: 14px; }
.detail-kv .k { width: 150px; flex-shrink: 0; color: var(--text-light); }
.detail-kv .v { flex: 1; word-break: break-word; white-space: pre-wrap; }

.login-box { text-align: center; padding: 60px 20px; }
.login-box .logo { font-size: 44px; margin-bottom: 12px; }
.login-box h2 { margin-bottom: 6px; }
.login-box p { color: var(--text-light); font-size: 14px; margin-bottom: 26px; }
.btn-feishu { background: #3370ff; color: #fff; }
.btn-feishu:hover { background: #2859d6; }

@media (max-width: 480px) {
  .hero h1 { font-size: 21px; }
  .detail-kv { flex-direction: column; }
  .detail-kv .k { width: auto; margin-bottom: 2px; }
}