/* =========================================================================
   星禾工作台 · 定制选配下单平台  —  Apple 风格
   设计基调：纯净 · 留白 · 克制（Apple 设计语言）
   配色：#f5f5f7 灰白底 + 白卡片 + Apple 蓝 #0071e3
   ========================================================================= */

:root {
  --bg: #f5f5f7;
  --surface: #ffffff;
  --text: #1d1d1f;
  --text-soft: #6e6e73;
  --muted: #86868b;
  --border: #d2d2d7;
  --border-soft: #e8e8ed;
  --accent: #0071e3;
  --accent-hover: #0077ed;
  --accent-active: #006edb;
  --accent-soft: #f0f6ff;
  --danger: #d70015;
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.06);
  --shadow-md: 0 6px 28px rgba(0, 0, 0, 0.07);
  --radius: 18px;
  --radius-sm: 12px;
  --radius-pill: 980px;
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text",
    "Helvetica Neue", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", system-ui, sans-serif;
}

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

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

.container {
  width: 100%;
  max-width: 860px;
  margin: 0 auto;
  padding: 0 22px;
}

/* ----------------------------- 顶部品牌 ----------------------------- */
.site-header { padding: 64px 0 36px; text-align: center; }
.brand {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  font-size: 30px;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--text);
}
.brand .mark {
  width: 44px; height: 44px;
  border-radius: 12px;
  background: linear-gradient(160deg, #0a84ff, #0060df);
  color: #fff;
  display: grid; place-items: center;
  font-size: 22px; font-weight: 600;
  letter-spacing: 0;
  box-shadow: 0 4px 12px rgba(0, 113, 227, 0.3);
}
.brand .sub {
  display: block;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 3px;
  color: var(--muted);
  margin-top: 6px;
}
.site-header h1 {
  font-size: 40px;
  font-weight: 600;
  letter-spacing: -0.03em;
  margin: 26px 0 12px;
}
.site-header p.lead {
  margin: 0 auto;
  max-width: 560px;
  color: var(--text-soft);
  font-size: 19px;
  font-weight: 400;
  letter-spacing: -0.01em;
}

/* ----------------------------- 卡片 ----------------------------- */
.card {
  background: var(--surface);
  border: none;
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
  padding: 32px;
  margin-bottom: 24px;
}
.card-title {
  font-size: 22px;
  font-weight: 600;
  letter-spacing: -0.02em;
  margin: 0 0 6px;
}
.card-desc {
  color: var(--text-soft);
  font-size: 15px;
  margin: 0 0 24px;
}

/* ----------------------------- 版本切换（分段控件） ----------------------------- */
.version-tabs {
  display: flex;
  gap: 2px;
  background: #e3e3e8;
  padding: 3px;
  border-radius: 14px;
  max-width: 440px;
  margin: 0 auto 30px;
}
.version-tab {
  flex: 1;
  background: transparent;
  border: none;
  border-radius: 11px;
  padding: 11px 6px;
  cursor: pointer;
  text-align: center;
  transition: background .2s, box-shadow .2s;
  font-family: inherit;
  user-select: none;
}
.version-tab .vt-name { font-size: 15px; font-weight: 500; color: var(--text); letter-spacing: -0.01em; }
.version-tab .vt-tag { font-size: 11px; color: var(--muted); margin-top: 2px; }
.version-tab.active {
  background: #fff;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.12);
}
.version-tab.active .vt-name { font-weight: 600; }

/* ----------------------------- 表单字段 ----------------------------- */
.field { margin-bottom: 26px; }
.field:last-child { margin-bottom: 0; }
.field-label {
  display: block;
  font-size: 15px;
  font-weight: 600;
  letter-spacing: -0.01em;
  margin-bottom: 10px;
  color: var(--text);
}
.field-label .req { color: var(--danger); margin-left: 3px; }
.field-hint { font-size: 13px; color: var(--muted); margin: -2px 0 12px; }

/* 子字段（选择特定费用项时出现，如自定义域名前缀） */
.sub-field {
  margin-top: 16px;
  padding: 16px;
  border-radius: var(--radius-sm);
  background: #f5f5f7;
  border: 1px solid var(--border);
}
.sub-field[hidden] { display: none; }

/* 行内代码（域名预览等） */
code {
  font-family: 'SF Mono', ui-monospace, 'Menlo', 'Consolas', monospace;
  font-size: 13px;
  background: #f0f0f3;
  color: var(--accent);
  padding: 2px 7px;
  border-radius: 6px;
  letter-spacing: -0.01em;
}

input[type="text"],
textarea {
  width: 100%;
  font-family: inherit;
  font-size: 16px;
  color: var(--text);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 13px 15px;
  transition: border-color .18s, box-shadow .18s;
}
input[type="text"]:focus,
textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 4px rgba(0, 113, 227, 0.18);
}
textarea { resize: vertical; min-height: 88px; line-height: 1.5; }
::placeholder { color: #a1a1a6; }

/* 功能需求多行 */
.func-grid { display: grid; gap: 14px; }
.func-row label {
  display: block;
  font-size: 13px;
  color: var(--text-soft);
  margin-bottom: 6px;
  font-weight: 500;
}

/* ----------------------------- 单选卡片 ----------------------------- */
.radio-cards { display: grid; gap: 12px; }
.radio-cards.cols-2 { grid-template-columns: repeat(2, 1fr); }
.radio-option {
  display: flex;
  align-items: center;
  gap: 11px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 15px 17px;
  cursor: pointer;
  background: var(--surface);
  transition: border-color .18s, background .18s, box-shadow .18s;
  font-size: 15px;
  color: var(--text);
}
.radio-option:hover { border-color: #b0b0b6; }
.radio-option input { accent-color: var(--accent); width: 18px; height: 18px; }
.radio-option.checked {
  border-color: var(--accent);
  background: var(--accent-soft);
  box-shadow: 0 0 0 1px var(--accent) inset;
}
.radio-option .ro-price { margin-left: auto; color: var(--accent); font-weight: 600; font-size: 15px; }
.radio-option .ro-note { color: var(--muted); font-size: 13px; }


/* ----------------------------- 按钮 ----------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: inherit;
  font-size: 16px;
  font-weight: 500;
  letter-spacing: -0.01em;
  padding: 14px 30px;
  border-radius: var(--radius-pill);
  border: 1px solid transparent;
  cursor: pointer;
  transition: background .18s, opacity .18s, transform .12s;
}
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-hover); }
.btn-primary:active { background: var(--accent-active); transform: scale(0.985); }
.btn-block { width: 100%; }
.btn-ghost {
  background: transparent; color: var(--accent);
  border-color: transparent;
}
.btn-ghost:hover { background: var(--accent-soft); }
.btn:disabled { opacity: .5; cursor: not-allowed; }

/* ----------------------------- 提示 / 成功 ----------------------------- */
.form-error {
  display: none;
  background: #fff0f0;
  border: 1px solid #f3c4c4;
  color: var(--danger);
  border-radius: var(--radius-sm);
  padding: 12px 15px;
  font-size: 14px;
  margin-bottom: 20px;
}
.form-error.show { display: block; }

.success-panel { text-align: center; padding: 26px 10px 10px; }
.success-panel .ok-icon {
  width: 64px; height: 64px; margin: 0 auto 18px;
  border-radius: 50%;
  background: #e6f7ec;
  color: #1aa85a;
  display: grid; place-items: center;
  font-size: 34px; font-weight: 700;
}
.success-panel h3 { margin: 0 0 8px; font-size: 24px; letter-spacing: -0.02em; }
.success-panel p { color: var(--text-soft); margin: 0 0 22px; font-size: 15px; }
.summary {
  text-align: left;
  background: #fbfbfd;
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-sm);
  padding: 18px 20px;
  font-size: 14px;
  margin-bottom: 22px;
}
.summary .s-row { display: flex; gap: 12px; padding: 5px 0; }
.summary .s-key { color: var(--muted); min-width: 96px; }
.summary .s-val { color: var(--text); flex: 1; }

.footnote { text-align: center; color: var(--muted); font-size: 13px; padding: 10px 0 56px; }

/* =====================================================================
   管理后台
   ===================================================================== */
.admin-header {
  display: flex; align-items: center; justify-content: space-between;
  flex-wrap: wrap; gap: 14px;
  padding: 40px 0 26px;
}
.admin-header h1 { font-size: 28px; font-weight: 600; letter-spacing: -0.02em; margin: 0; }
.admin-header .live {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 13px; color: var(--text-soft);
}
.admin-header .dot {
  width: 9px; height: 9px; border-radius: 50%;
  background: #c7c7cc; transition: background .3s;
}
.admin-header .dot.on { background: #34c759; box-shadow: 0 0 0 3px rgba(52, 199, 89, .2); }

.stats { display: grid; grid-template-columns: repeat(6, 1fr); gap: 14px; margin-bottom: 26px; }
.stat {
  background: var(--surface); border: none;
  border-radius: var(--radius-sm); padding: 20px; text-align: center;
  box-shadow: var(--shadow-sm);
}
.stat .num { font-size: 30px; font-weight: 600; letter-spacing: -0.02em; color: var(--accent); }
.stat .lbl { font-size: 13px; color: var(--muted); margin-top: 4px; }
.stat-undelivered .num { color: #ff9f0a; }
.stat-delivered .num { color: #34c759; }

.toolbar { display: flex; gap: 16px; align-items: flex-end; margin-bottom: 20px; flex-wrap: wrap; }
.filter-group { display: flex; flex-direction: column; gap: 6px; }
.filter-group label { font-size: 12.5px; color: var(--muted); font-weight: 500; }
.toolbar select {
  font-family: inherit; font-size: 15px; color: var(--text);
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-sm); padding: 10px 14px; cursor: pointer; min-width: 130px;
}
.toolbar select:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 4px rgba(0, 113, 227, .18); }
.toolbar .count { color: var(--muted); font-size: 13px; margin-left: auto; align-self: center; }

/* 交付状态徽标 */
.deliver-badge {
  font-size: 12px; font-weight: 600; padding: 3px 10px; border-radius: 999px; line-height: 1.5;
}
.deliver-badge.pending { color: #b8760a; background: rgba(255, 159, 10, .14); }
.deliver-badge.done { color: #1a8a3c; background: rgba(52, 199, 89, .16); }

/* 卡片底部操作区 */
.oc-foot {
  display: flex; justify-content: flex-end; gap: 10px;
  padding: 14px 20px; border-top: 1px solid var(--border);
  margin: 4px -20px -20px; border-bottom-left-radius: var(--radius); border-bottom-right-radius: var(--radius);
}
.btn-sm { padding: 8px 16px; font-size: 14px; border-radius: 980px; }

.order-card {
  background: var(--surface);
  border: none;
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  padding: 22px 24px;
  margin-bottom: 16px;
}
.order-card .oc-head {
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  padding-bottom: 15px; margin-bottom: 15px;
  border-bottom: 1px solid var(--border-soft);
}
.badge {
  font-size: 12.5px; font-weight: 600; letter-spacing: 0;
  padding: 5px 13px; border-radius: var(--radius-pill);
}
.badge.basic { background: #e8f3ec; color: #1a7f4b; }
.badge.standard { background: #eaf1fb; color: #0a64d6; }
.badge.advanced { background: #f0e9fb; color: #7a3bc4; }
.oc-id { color: var(--muted); font-size: 13px; }
.oc-time { color: var(--muted); font-size: 13px; margin-left: auto; }

.oc-body { display: grid; grid-template-columns: 1fr 1fr; gap: 14px 24px; }
.oc-item .k { font-size: 12px; color: var(--muted); margin-bottom: 4px; letter-spacing: 0; }
.oc-item .v { font-size: 15px; color: var(--text); }
.oc-item.full { grid-column: 1 / -1; }
.func-list { margin: 0; padding-left: 20px; font-size: 15px; color: var(--text); }
.func-list li { margin: 3px 0; }
.color-chip {
  display: inline-block; width: 18px; height: 18px; border-radius: 6px;
  vertical-align: -4px; margin-right: 8px; border: 1px solid rgba(0, 0, 0, .1);
}
.empty {
  text-align: center; color: var(--muted); padding: 70px 20px; font-size: 15px;
}

/* ----------------------------- 登录页 ----------------------------- */
.login-screen {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: 24px;
}
.login-card {
  width: 100%;
  max-width: 380px;
  background: var(--surface);
  border: none;
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
  padding: 40px 34px;
  text-align: center;
}
.login-brand .mark {
  width: 52px; height: 52px;
  border-radius: 14px;
  background: linear-gradient(160deg, #0a84ff, #0060df);
  color: #fff;
  display: inline-grid; place-items: center;
  font-size: 26px; font-weight: 600;
  box-shadow: 0 4px 12px rgba(0, 113, 227, 0.3);
  margin-bottom: 18px;
}
.login-card h1 { font-size: 24px; font-weight: 600; letter-spacing: -0.02em; margin: 0 0 8px; }
.login-sub { color: var(--text-soft); font-size: 14px; margin: 0 0 26px; }
.login-card form { text-align: left; }
.login-card input[type="password"] {
  width: 100%;
  font-family: inherit;
  font-size: 16px;
  color: var(--text);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 14px 15px;
  transition: border-color .18s, box-shadow .18s;
}
.login-card input[type="password"]:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 4px rgba(0, 113, 227, 0.18);
}
.login-error {
  display: none;
  color: var(--danger);
  font-size: 13.5px;
  margin-top: 12px;
}
.login-error.show { display: block; }
.admin-actions { display: flex; gap: 8px; flex-wrap: wrap; }

/* ----------------------------- 响应式 ----------------------------- */
@media (max-width: 640px) {
  .site-header { padding: 44px 0 28px; }
  .brand { font-size: 24px; }
  .site-header h1 { font-size: 30px; }
  .site-header p.lead { font-size: 16px; }
  .card { padding: 22px; }
  .version-tabs { max-width: 100%; }
  .radio-cards.cols-2 { grid-template-columns: 1fr; }
  .stats { grid-template-columns: repeat(2, 1fr); }
  .oc-body { grid-template-columns: 1fr; }
  .admin-header h1 { font-size: 22px; }
}
